Version Description
2021-09-21 =
- Fix unsecured reports
Download this release
Release Info
Developer | joshuaflow |
Plugin | WooCommerce Admin |
Version | 1.2.5 |
Comparing to | |
See all releases |
Code changes from version 2.2.6 to 1.2.5
- dist/app/index.js +11999 -13519
dist/app/index.js
CHANGED
@@ -35,7 +35,7 @@ this["wc"] = this["wc"] || {}; this["wc"]["app"] =
|
|
35 |
/******/
|
36 |
/******/ // object to store loaded CSS chunks
|
37 |
/******/ var installedCssChunks = {
|
38 |
-
/******/
|
39 |
/******/ }
|
40 |
/******/ var isCssRtlEnabled = function() {
|
41 |
/******/ return document.dir === 'rtl';
|
@@ -45,25 +45,16 @@ this["wc"] = this["wc"] || {}; this["wc"]["app"] =
|
|
45 |
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
46 |
/******/ // Promise = chunk loading, 0 = chunk loaded
|
47 |
/******/ var installedChunks = {
|
48 |
-
/******/
|
49 |
/******/ };
|
50 |
/******/
|
51 |
/******/
|
52 |
/******/
|
53 |
/******/ // script path function
|
54 |
-
/******/ function webpackJsonpScriptSrc(chunkId) {
|
55 |
-
/******/ return __webpack_require__.p + "chunks/" + ({"7":"activity-panels-help","8":"activity-panels-inbox","9":"analytics-report","10":"analytics-report-categories","11":"analytics-report-coupons","12":"analytics-report-customers","13":"analytics-report-downloads","14":"analytics-report-orders","15":"analytics-report-products","16":"analytics-report-revenue","17":"analytics-report-stock","18":"analytics-report-taxes","19":"analytics-report-variations","20":"analytics-settings","27":"customizable-dashboard","28":"dashboard","29":"dashboard-charts","32":"homescreen","34":"leaderboards","36":"marketing-overview","46":"profile-wizard","47":"store-alerts","48":"store-performance","49":"task-list","51":"wcpay-usage-modal"}[chunkId]||chunkId) + ".js"
|
56 |
-
/******/ }
|
57 |
-
/******/
|
58 |
/******/ function jsonpScriptSrc(chunkId) {
|
59 |
-
/******/
|
60 |
-
/******/ if ( window.wcAdminAssets && window.wcAdminAssets.version ) {
|
61 |
-
/******/ src += '?ver=' + window.wcAdminAssets.version;
|
62 |
-
/******/ }
|
63 |
-
/******/ return src;
|
64 |
/******/ }
|
65 |
/******/
|
66 |
-
/******/
|
67 |
/******/ // The require function
|
68 |
/******/ function __webpack_require__(moduleId) {
|
69 |
/******/
|
@@ -95,7 +86,7 @@ this["wc"] = this["wc"] || {}; this["wc"]["app"] =
|
|
95 |
/******/
|
96 |
/******/
|
97 |
/******/ // mini-css-extract-plugin CSS loading
|
98 |
-
/******/ var cssChunks = {"0":1,"4":1,"
|
99 |
/******/ if(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]);
|
100 |
/******/ else if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) {
|
101 |
/******/ promises.push(installedCssChunks[chunkId] = new Promise(function(resolve, reject) {
|
@@ -128,9 +119,6 @@ this["wc"] = this["wc"] || {}; this["wc"]["app"] =
|
|
128 |
/******/ reject(err);
|
129 |
/******/ };
|
130 |
/******/ linkTag.href = fullhref;
|
131 |
-
/******/ if ( window.wcAdminAssets && window.wcAdminAssets.version ) {
|
132 |
-
/******/ linkTag.href += '?ver=' + window.wcAdminAssets.version;
|
133 |
-
/******/ }
|
134 |
/******/
|
135 |
/******/ var head = document.getElementsByTagName("head")[0];
|
136 |
/******/ head.appendChild(linkTag);
|
@@ -250,7 +238,7 @@ this["wc"] = this["wc"] || {}; this["wc"]["app"] =
|
|
250 |
/******/ // on error function for async loading
|
251 |
/******/ __webpack_require__.oe = function(err) { console.error(err); throw err; };
|
252 |
/******/
|
253 |
-
/******/ var jsonpArray = window["
|
254 |
/******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray);
|
255 |
/******/ jsonpArray.push = webpackJsonpCallback;
|
256 |
/******/ jsonpArray = jsonpArray.slice();
|
@@ -259,17 +247,19 @@ this["wc"] = this["wc"] || {}; this["wc"]["app"] =
|
|
259 |
/******/
|
260 |
/******/
|
261 |
/******/ // Load entry module and return exports
|
262 |
-
/******/ return __webpack_require__(__webpack_require__.s =
|
263 |
/******/ })
|
264 |
/************************************************************************/
|
265 |
-
/******/ (
|
266 |
-
|
|
|
267 |
/***/ (function(module, exports) {
|
268 |
|
269 |
-
(function() { module.exports =
|
270 |
|
271 |
/***/ }),
|
272 |
-
|
|
|
273 |
/***/ (function(module, exports, __webpack_require__) {
|
274 |
|
275 |
/**
|
@@ -282,228 +272,13 @@ this["wc"] = this["wc"] || {}; this["wc"]["app"] =
|
|
282 |
if (false) { var throwOnDirectAccess, ReactIs; } else {
|
283 |
// By explicitly using `prop-types` you are opting into new production behavior.
|
284 |
// http://fb.me/prop-types-in-prod
|
285 |
-
module.exports = __webpack_require__(
|
286 |
-
}
|
287 |
-
|
288 |
-
|
289 |
-
/***/ }),
|
290 |
-
/* 2 */
|
291 |
-
/***/ (function(module, exports) {
|
292 |
-
|
293 |
-
(function() { module.exports = window["wp"]["i18n"]; }());
|
294 |
-
|
295 |
-
/***/ }),
|
296 |
-
/* 3 */
|
297 |
-
/***/ (function(module, exports, __webpack_require__) {
|
298 |
-
|
299 |
-
/* WEBPACK VAR INJECTION */(function(global) {var check = function (it) {
|
300 |
-
return it && it.Math == Math && it;
|
301 |
-
};
|
302 |
-
|
303 |
-
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
304 |
-
module.exports =
|
305 |
-
/* global globalThis -- safe */
|
306 |
-
check(typeof globalThis == 'object' && globalThis) ||
|
307 |
-
check(typeof window == 'object' && window) ||
|
308 |
-
check(typeof self == 'object' && self) ||
|
309 |
-
check(typeof global == 'object' && global) ||
|
310 |
-
// eslint-disable-next-line no-new-func -- fallback
|
311 |
-
(function () { return this; })() || Function('return this')();
|
312 |
-
|
313 |
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(96)))
|
314 |
-
|
315 |
-
/***/ }),
|
316 |
-
/* 4 */
|
317 |
-
/***/ (function(module, exports) {
|
318 |
-
|
319 |
-
(function() { module.exports = window["wp"]["components"]; }());
|
320 |
-
|
321 |
-
/***/ }),
|
322 |
-
/* 5 */
|
323 |
-
/***/ (function(module, exports) {
|
324 |
-
|
325 |
-
(function() { module.exports = window["lodash"]; }());
|
326 |
-
|
327 |
-
/***/ }),
|
328 |
-
/* 6 */
|
329 |
-
/***/ (function(module, exports) {
|
330 |
-
|
331 |
-
module.exports = function (exec) {
|
332 |
-
try {
|
333 |
-
return !!exec();
|
334 |
-
} catch (error) {
|
335 |
-
return true;
|
336 |
-
}
|
337 |
-
};
|
338 |
-
|
339 |
-
|
340 |
-
/***/ }),
|
341 |
-
/* 7 */
|
342 |
-
/***/ (function(module, exports) {
|
343 |
-
|
344 |
-
function _defineProperty(obj, key, value) {
|
345 |
-
if (key in obj) {
|
346 |
-
Object.defineProperty(obj, key, {
|
347 |
-
value: value,
|
348 |
-
enumerable: true,
|
349 |
-
configurable: true,
|
350 |
-
writable: true
|
351 |
-
});
|
352 |
-
} else {
|
353 |
-
obj[key] = value;
|
354 |
-
}
|
355 |
-
|
356 |
-
return obj;
|
357 |
}
|
358 |
|
359 |
-
module.exports = _defineProperty;
|
360 |
-
|
361 |
-
/***/ }),
|
362 |
-
/* 8 */
|
363 |
-
/***/ (function(module, exports, __webpack_require__) {
|
364 |
-
|
365 |
-
var global = __webpack_require__(3);
|
366 |
-
var shared = __webpack_require__(58);
|
367 |
-
var has = __webpack_require__(11);
|
368 |
-
var uid = __webpack_require__(55);
|
369 |
-
var NATIVE_SYMBOL = __webpack_require__(62);
|
370 |
-
var USE_SYMBOL_AS_UID = __webpack_require__(93);
|
371 |
-
|
372 |
-
var WellKnownSymbolsStore = shared('wks');
|
373 |
-
var Symbol = global.Symbol;
|
374 |
-
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;
|
375 |
-
|
376 |
-
module.exports = function (name) {
|
377 |
-
if (!has(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
|
378 |
-
if (NATIVE_SYMBOL && has(Symbol, name)) {
|
379 |
-
WellKnownSymbolsStore[name] = Symbol[name];
|
380 |
-
} else {
|
381 |
-
WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
|
382 |
-
}
|
383 |
-
} return WellKnownSymbolsStore[name];
|
384 |
-
};
|
385 |
-
|
386 |
|
387 |
/***/ }),
|
388 |
-
/* 9 */
|
389 |
-
/***/ (function(module, exports, __webpack_require__) {
|
390 |
-
|
391 |
-
var isObject = __webpack_require__(10);
|
392 |
-
|
393 |
-
module.exports = function (it) {
|
394 |
-
if (!isObject(it)) {
|
395 |
-
throw TypeError(String(it) + ' is not an object');
|
396 |
-
} return it;
|
397 |
-
};
|
398 |
-
|
399 |
-
|
400 |
-
/***/ }),
|
401 |
-
/* 10 */
|
402 |
-
/***/ (function(module, exports) {
|
403 |
-
|
404 |
-
module.exports = function (it) {
|
405 |
-
return typeof it === 'object' ? it !== null : typeof it === 'function';
|
406 |
-
};
|
407 |
-
|
408 |
-
|
409 |
-
/***/ }),
|
410 |
-
/* 11 */
|
411 |
-
/***/ (function(module, exports) {
|
412 |
-
|
413 |
-
var hasOwnProperty = {}.hasOwnProperty;
|
414 |
-
|
415 |
-
module.exports = function (it, key) {
|
416 |
-
return hasOwnProperty.call(it, key);
|
417 |
-
};
|
418 |
-
|
419 |
-
|
420 |
-
/***/ }),
|
421 |
-
/* 12 */
|
422 |
-
/***/ (function(module, exports, __webpack_require__) {
|
423 |
-
|
424 |
-
var global = __webpack_require__(3);
|
425 |
-
var getOwnPropertyDescriptor = __webpack_require__(33).f;
|
426 |
-
var createNonEnumerableProperty = __webpack_require__(19);
|
427 |
-
var redefine = __webpack_require__(27);
|
428 |
-
var setGlobal = __webpack_require__(46);
|
429 |
-
var copyConstructorProperties = __webpack_require__(103);
|
430 |
-
var isForced = __webpack_require__(74);
|
431 |
-
|
432 |
-
/*
|
433 |
-
options.target - name of the target object
|
434 |
-
options.global - target is the global object
|
435 |
-
options.stat - export as static methods of target
|
436 |
-
options.proto - export as prototype methods of target
|
437 |
-
options.real - real prototype method for the `pure` version
|
438 |
-
options.forced - export even if the native feature is available
|
439 |
-
options.bind - bind methods to the target, required for the `pure` version
|
440 |
-
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
|
441 |
-
options.unsafe - use the simple assignment of property instead of delete + defineProperty
|
442 |
-
options.sham - add a flag to not completely full polyfills
|
443 |
-
options.enumerable - export as enumerable property
|
444 |
-
options.noTargetGet - prevent calling a getter on target
|
445 |
-
*/
|
446 |
-
module.exports = function (options, source) {
|
447 |
-
var TARGET = options.target;
|
448 |
-
var GLOBAL = options.global;
|
449 |
-
var STATIC = options.stat;
|
450 |
-
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
451 |
-
if (GLOBAL) {
|
452 |
-
target = global;
|
453 |
-
} else if (STATIC) {
|
454 |
-
target = global[TARGET] || setGlobal(TARGET, {});
|
455 |
-
} else {
|
456 |
-
target = (global[TARGET] || {}).prototype;
|
457 |
-
}
|
458 |
-
if (target) for (key in source) {
|
459 |
-
sourceProperty = source[key];
|
460 |
-
if (options.noTargetGet) {
|
461 |
-
descriptor = getOwnPropertyDescriptor(target, key);
|
462 |
-
targetProperty = descriptor && descriptor.value;
|
463 |
-
} else targetProperty = target[key];
|
464 |
-
FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
465 |
-
// contained in target
|
466 |
-
if (!FORCED && targetProperty !== undefined) {
|
467 |
-
if (typeof sourceProperty === typeof targetProperty) continue;
|
468 |
-
copyConstructorProperties(sourceProperty, targetProperty);
|
469 |
-
}
|
470 |
-
// add a flag to not completely full polyfills
|
471 |
-
if (options.sham || (targetProperty && targetProperty.sham)) {
|
472 |
-
createNonEnumerableProperty(sourceProperty, 'sham', true);
|
473 |
-
}
|
474 |
-
// extend global
|
475 |
-
redefine(target, key, sourceProperty, options);
|
476 |
-
}
|
477 |
-
};
|
478 |
-
|
479 |
-
|
480 |
-
/***/ }),
|
481 |
-
/* 13 */
|
482 |
-
/***/ (function(module, exports, __webpack_require__) {
|
483 |
|
484 |
-
|
485 |
-
|
486 |
-
// Detect IE8's incomplete defineProperty implementation
|
487 |
-
module.exports = !fails(function () {
|
488 |
-
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
489 |
-
});
|
490 |
-
|
491 |
-
|
492 |
-
/***/ }),
|
493 |
-
/* 14 */
|
494 |
-
/***/ (function(module, exports) {
|
495 |
-
|
496 |
-
function _getPrototypeOf(o) {
|
497 |
-
module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
498 |
-
return o.__proto__ || Object.getPrototypeOf(o);
|
499 |
-
};
|
500 |
-
return _getPrototypeOf(o);
|
501 |
-
}
|
502 |
-
|
503 |
-
module.exports = _getPrototypeOf;
|
504 |
-
|
505 |
-
/***/ }),
|
506 |
-
/* 15 */
|
507 |
/***/ (function(module, exports, __webpack_require__) {
|
508 |
|
509 |
/*!
|
@@ -561,7667 +336,7043 @@ module.exports = _getPrototypeOf;
|
|
561 |
|
562 |
|
563 |
/***/ }),
|
564 |
-
/* 16 */
|
565 |
-
/***/ (function(module, exports) {
|
566 |
|
567 |
-
|
|
|
568 |
|
569 |
-
|
570 |
-
/*
|
571 |
-
|
|
|
|
|
572 |
|
573 |
-
var DESCRIPTORS = __webpack_require__(13);
|
574 |
-
var IE8_DOM_DEFINE = __webpack_require__(72);
|
575 |
-
var anObject = __webpack_require__(9);
|
576 |
-
var toPrimitive = __webpack_require__(40);
|
577 |
-
|
578 |
-
var nativeDefineProperty = Object.defineProperty;
|
579 |
-
|
580 |
-
// `Object.defineProperty` method
|
581 |
-
// https://tc39.es/ecma262/#sec-object.defineproperty
|
582 |
-
exports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
|
583 |
-
anObject(O);
|
584 |
-
P = toPrimitive(P, true);
|
585 |
-
anObject(Attributes);
|
586 |
-
if (IE8_DOM_DEFINE) try {
|
587 |
-
return nativeDefineProperty(O, P, Attributes);
|
588 |
-
} catch (error) { /* empty */ }
|
589 |
-
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
|
590 |
-
if ('value' in Attributes) O[P] = Attributes.value;
|
591 |
-
return O;
|
592 |
-
};
|
593 |
|
|
|
|
|
|
|
594 |
|
595 |
-
/***/ }),
|
596 |
-
/* 18 */
|
597 |
-
/***/ (function(module, exports) {
|
598 |
|
599 |
-
function
|
600 |
-
|
601 |
-
|
|
|
|
|
|
|
602 |
}
|
603 |
|
604 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
605 |
}
|
606 |
|
607 |
-
|
|
|
608 |
|
609 |
/***/ }),
|
610 |
-
/* 19 */
|
611 |
-
/***/ (function(module, exports, __webpack_require__) {
|
612 |
|
613 |
-
|
614 |
-
|
615 |
-
var createPropertyDescriptor = __webpack_require__(39);
|
616 |
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
623 |
|
624 |
|
625 |
-
/***/ }),
|
626 |
-
/* 20 */
|
627 |
-
/***/ (function(module, exports) {
|
628 |
|
629 |
-
(function() { module.exports = window["React"]; }());
|
630 |
|
631 |
-
/***/ }),
|
632 |
-
/* 21 */
|
633 |
-
/***/ (function(module, exports, __webpack_require__) {
|
634 |
|
635 |
-
// toObject with fallback for non-array-like ES3 strings
|
636 |
-
var IndexedObject = __webpack_require__(71);
|
637 |
-
var requireObjectCoercible = __webpack_require__(32);
|
638 |
|
639 |
-
module.exports = function (it) {
|
640 |
-
return IndexedObject(requireObjectCoercible(it));
|
641 |
-
};
|
642 |
|
643 |
|
644 |
-
/***/ }),
|
645 |
-
/* 22 */
|
646 |
-
/***/ (function(module, exports) {
|
647 |
|
648 |
-
function
|
649 |
-
if (!(instance instanceof Constructor)) {
|
650 |
-
throw new TypeError("Cannot call a class as a function");
|
651 |
-
}
|
652 |
-
}
|
653 |
|
654 |
-
|
655 |
|
656 |
-
|
657 |
-
|
658 |
-
|
|
|
|
|
|
|
|
|
659 |
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
descriptor.enumerable = descriptor.enumerable || false;
|
664 |
-
descriptor.configurable = true;
|
665 |
-
if ("value" in descriptor) descriptor.writable = true;
|
666 |
-
Object.defineProperty(target, descriptor.key, descriptor);
|
667 |
-
}
|
668 |
-
}
|
669 |
|
670 |
-
function _createClass(Constructor, protoProps, staticProps) {
|
671 |
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
672 |
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
673 |
-
return Constructor;
|
674 |
-
}
|
675 |
|
676 |
-
module.exports = _createClass;
|
677 |
|
678 |
-
/***/ }),
|
679 |
-
/* 24 */
|
680 |
-
/***/ (function(module, exports, __webpack_require__) {
|
681 |
|
682 |
-
var setPrototypeOf = __webpack_require__(204);
|
683 |
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
688 |
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
|
|
698 |
|
699 |
-
|
|
|
700 |
|
701 |
-
|
702 |
-
/* 25 */
|
703 |
-
/***/ (function(module, exports, __webpack_require__) {
|
704 |
|
705 |
-
|
|
|
706 |
|
707 |
-
|
708 |
|
709 |
-
|
710 |
-
|
711 |
-
return call;
|
712 |
-
}
|
713 |
|
714 |
-
|
715 |
-
}
|
716 |
|
717 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
718 |
|
719 |
-
|
720 |
-
|
721 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
722 |
|
723 |
-
(
|
|
|
|
|
724 |
|
725 |
-
|
726 |
-
|
727 |
-
|
|
|
|
|
728 |
|
729 |
-
var
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
var inspectSource = __webpack_require__(68);
|
734 |
-
var InternalStateModule = __webpack_require__(45);
|
735 |
-
|
736 |
-
var getInternalState = InternalStateModule.get;
|
737 |
-
var enforceInternalState = InternalStateModule.enforce;
|
738 |
-
var TEMPLATE = String(String).split('String');
|
739 |
-
|
740 |
-
(module.exports = function (O, key, value, options) {
|
741 |
-
var unsafe = options ? !!options.unsafe : false;
|
742 |
-
var simple = options ? !!options.enumerable : false;
|
743 |
-
var noTargetGet = options ? !!options.noTargetGet : false;
|
744 |
-
var state;
|
745 |
-
if (typeof value == 'function') {
|
746 |
-
if (typeof key == 'string' && !has(value, 'name')) {
|
747 |
-
createNonEnumerableProperty(value, 'name', key);
|
748 |
-
}
|
749 |
-
state = enforceInternalState(value);
|
750 |
-
if (!state.source) {
|
751 |
-
state.source = TEMPLATE.join(typeof key == 'string' ? key : '');
|
752 |
-
}
|
753 |
-
}
|
754 |
-
if (O === global) {
|
755 |
-
if (simple) O[key] = value;
|
756 |
-
else setGlobal(key, value);
|
757 |
-
return;
|
758 |
-
} else if (!unsafe) {
|
759 |
-
delete O[key];
|
760 |
-
} else if (!noTargetGet && O[key]) {
|
761 |
-
simple = true;
|
762 |
-
}
|
763 |
-
if (simple) O[key] = value;
|
764 |
-
else createNonEnumerableProperty(O, key, value);
|
765 |
-
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
766 |
-
})(Function.prototype, 'toString', function toString() {
|
767 |
-
return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
|
768 |
-
});
|
769 |
|
|
|
|
|
770 |
|
771 |
-
|
772 |
-
/* 28 */
|
773 |
-
/***/ (function(module, exports) {
|
774 |
|
775 |
-
(function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
776 |
|
777 |
-
|
778 |
-
|
779 |
-
|
|
|
|
|
780 |
|
781 |
-
(function() { module.exports = window["moment"]; }());
|
782 |
|
783 |
-
|
784 |
-
|
785 |
-
/***/ (function(module, exports) {
|
786 |
|
787 |
-
|
|
|
|
|
788 |
|
789 |
-
|
790 |
-
|
791 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
792 |
|
|
|
793 |
|
794 |
-
|
795 |
-
|
796 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
797 |
|
798 |
-
var
|
799 |
-
var global = __webpack_require__(3);
|
800 |
|
801 |
-
|
802 |
-
|
803 |
-
}
|
804 |
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
|
|
|
|
|
|
809 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
810 |
|
811 |
-
|
812 |
-
|
813 |
-
/***/ (function(module, exports) {
|
814 |
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
|
|
|
|
|
|
|
|
820 |
};
|
821 |
|
|
|
822 |
|
823 |
/***/ }),
|
824 |
-
/* 33 */
|
825 |
-
/***/ (function(module, exports, __webpack_require__) {
|
826 |
|
827 |
-
|
828 |
-
|
829 |
-
var createPropertyDescriptor = __webpack_require__(39);
|
830 |
-
var toIndexedObject = __webpack_require__(21);
|
831 |
-
var toPrimitive = __webpack_require__(40);
|
832 |
-
var has = __webpack_require__(11);
|
833 |
-
var IE8_DOM_DEFINE = __webpack_require__(72);
|
834 |
-
|
835 |
-
var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
836 |
-
|
837 |
-
// `Object.getOwnPropertyDescriptor` method
|
838 |
-
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
839 |
-
exports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
|
840 |
-
O = toIndexedObject(O);
|
841 |
-
P = toPrimitive(P, true);
|
842 |
-
if (IE8_DOM_DEFINE) try {
|
843 |
-
return nativeGetOwnPropertyDescriptor(O, P);
|
844 |
-
} catch (error) { /* empty */ }
|
845 |
-
if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);
|
846 |
-
};
|
847 |
|
|
|
|
|
|
|
|
|
848 |
|
849 |
-
|
850 |
-
/* 34 */
|
851 |
-
/***/ (function(module, exports, __webpack_require__) {
|
852 |
|
853 |
-
|
854 |
|
855 |
-
|
856 |
|
857 |
-
|
858 |
-
// https://tc39.es/ecma262/#sec-tolength
|
859 |
-
module.exports = function (argument) {
|
860 |
-
return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
861 |
-
};
|
862 |
|
|
|
863 |
|
864 |
-
|
865 |
-
/* 35 */
|
866 |
-
/***/ (function(module, exports) {
|
867 |
|
868 |
-
(function() {
|
869 |
|
870 |
-
|
871 |
-
/* 36 */
|
872 |
-
/***/ (function(module, exports) {
|
873 |
|
874 |
-
|
875 |
|
|
|
876 |
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
var fails = __webpack_require__(6);
|
885 |
|
886 |
-
|
|
|
|
|
|
|
887 |
|
888 |
-
// `Object.keys` method
|
889 |
-
// https://tc39.es/ecma262/#sec-object.keys
|
890 |
-
$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
|
891 |
-
keys: function keys(it) {
|
892 |
-
return nativeKeys(toObject(it));
|
893 |
-
}
|
894 |
-
});
|
895 |
|
896 |
|
897 |
/***/ }),
|
898 |
-
/* 38 */
|
899 |
-
/***/ (function(module, exports, __webpack_require__) {
|
900 |
|
901 |
-
|
902 |
-
|
903 |
-
// `ToObject` abstract operation
|
904 |
-
// https://tc39.es/ecma262/#sec-toobject
|
905 |
-
module.exports = function (argument) {
|
906 |
-
return Object(requireObjectCoercible(argument));
|
907 |
-
};
|
908 |
-
|
909 |
-
|
910 |
-
/***/ }),
|
911 |
-
/* 39 */
|
912 |
/***/ (function(module, exports) {
|
913 |
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
writable: !(bitmap & 4),
|
919 |
-
value: value
|
920 |
-
};
|
921 |
-
};
|
922 |
|
|
|
|
|
|
|
|
|
|
|
|
|
923 |
|
924 |
-
|
925 |
-
|
926 |
-
/***/ (function(module, exports, __webpack_require__) {
|
927 |
|
928 |
-
|
929 |
-
|
930 |
-
// `ToPrimitive` abstract operation
|
931 |
-
// https://tc39.es/ecma262/#sec-toprimitive
|
932 |
-
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
|
933 |
-
// and the second argument - flag - preferred type is a string
|
934 |
-
module.exports = function (input, PREFERRED_STRING) {
|
935 |
-
if (!isObject(input)) return input;
|
936 |
-
var fn, val;
|
937 |
-
if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
|
938 |
-
if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
|
939 |
-
if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
|
940 |
-
throw TypeError("Can't convert object to primitive value");
|
941 |
-
};
|
942 |
|
|
|
943 |
|
944 |
/***/ }),
|
945 |
-
|
|
|
946 |
/***/ (function(module, exports, __webpack_require__) {
|
947 |
|
948 |
"use strict";
|
949 |
|
950 |
-
var $ = __webpack_require__(12);
|
951 |
-
var $filter = __webpack_require__(75).filter;
|
952 |
-
var arrayMethodHasSpeciesSupport = __webpack_require__(89);
|
953 |
-
|
954 |
-
var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
|
955 |
-
|
956 |
-
// `Array.prototype.filter` method
|
957 |
-
// https://tc39.es/ecma262/#sec-array.prototype.filter
|
958 |
-
// with adding support of @@species
|
959 |
-
$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
|
960 |
-
filter: function filter(callbackfn /* , thisArg */) {
|
961 |
-
return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
962 |
-
}
|
963 |
-
});
|
964 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
965 |
|
966 |
-
|
967 |
-
|
968 |
-
|
|
|
|
|
969 |
|
970 |
-
|
971 |
-
|
|
|
|
|
|
|
|
|
972 |
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
|
|
|
|
|
|
|
|
|
|
977 |
};
|
978 |
|
|
|
979 |
|
980 |
/***/ }),
|
981 |
-
/* 43 */
|
982 |
-
/***/ (function(module, exports, __webpack_require__) {
|
983 |
|
984 |
-
|
|
|
985 |
|
986 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
987 |
|
988 |
-
|
|
|
|
|
989 |
|
990 |
-
var
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
991 |
|
992 |
-
function
|
993 |
-
|
994 |
-
|
|
|
|
|
|
|
|
|
995 |
|
996 |
-
|
|
|
|
|
997 |
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
|
1002 |
-
|
|
|
|
|
|
|
|
|
|
|
1003 |
|
1004 |
-
var iterableToArray = __webpack_require__(180);
|
1005 |
|
1006 |
-
|
|
|
|
|
1007 |
|
1008 |
-
var nonIterableSpread = __webpack_require__(181);
|
1009 |
|
1010 |
-
|
1011 |
-
return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
|
1012 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1013 |
|
1014 |
-
module.exports = _toConsumableArray;
|
1015 |
-
|
1016 |
-
/***/ }),
|
1017 |
-
/* 45 */
|
1018 |
-
/***/ (function(module, exports, __webpack_require__) {
|
1019 |
-
|
1020 |
-
var NATIVE_WEAK_MAP = __webpack_require__(106);
|
1021 |
-
var global = __webpack_require__(3);
|
1022 |
-
var isObject = __webpack_require__(10);
|
1023 |
-
var createNonEnumerableProperty = __webpack_require__(19);
|
1024 |
-
var objectHas = __webpack_require__(11);
|
1025 |
-
var shared = __webpack_require__(47);
|
1026 |
-
var sharedKey = __webpack_require__(52);
|
1027 |
-
var hiddenKeys = __webpack_require__(36);
|
1028 |
|
1029 |
-
|
1030 |
-
|
|
|
|
|
|
|
1031 |
|
1032 |
-
|
1033 |
-
|
1034 |
-
}
|
1035 |
|
1036 |
-
|
1037 |
-
|
1038 |
-
var state;
|
1039 |
-
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
1040 |
-
throw TypeError('Incompatible receiver, ' + TYPE + ' required');
|
1041 |
-
} return state;
|
1042 |
-
};
|
1043 |
-
};
|
1044 |
|
1045 |
-
if (
|
1046 |
-
|
1047 |
-
|
1048 |
-
var wmhas = store.has;
|
1049 |
-
var wmset = store.set;
|
1050 |
-
set = function (it, metadata) {
|
1051 |
-
metadata.facade = it;
|
1052 |
-
wmset.call(store, it, metadata);
|
1053 |
-
return metadata;
|
1054 |
-
};
|
1055 |
-
get = function (it) {
|
1056 |
-
return wmget.call(store, it) || {};
|
1057 |
-
};
|
1058 |
-
has = function (it) {
|
1059 |
-
return wmhas.call(store, it);
|
1060 |
-
};
|
1061 |
-
} else {
|
1062 |
-
var STATE = sharedKey('state');
|
1063 |
-
hiddenKeys[STATE] = true;
|
1064 |
-
set = function (it, metadata) {
|
1065 |
-
metadata.facade = it;
|
1066 |
-
createNonEnumerableProperty(it, STATE, metadata);
|
1067 |
-
return metadata;
|
1068 |
-
};
|
1069 |
-
get = function (it) {
|
1070 |
-
return objectHas(it, STATE) ? it[STATE] : {};
|
1071 |
-
};
|
1072 |
-
has = function (it) {
|
1073 |
-
return objectHas(it, STATE);
|
1074 |
-
};
|
1075 |
-
}
|
1076 |
|
1077 |
-
|
1078 |
-
set: set,
|
1079 |
-
get: get,
|
1080 |
-
has: has,
|
1081 |
-
enforce: enforce,
|
1082 |
-
getterFor: getterFor
|
1083 |
-
};
|
1084 |
|
|
|
|
|
|
|
1085 |
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
|
|
1089 |
|
1090 |
-
|
1091 |
-
|
|
|
1092 |
|
1093 |
-
|
1094 |
-
try {
|
1095 |
-
createNonEnumerableProperty(global, key, value);
|
1096 |
-
} catch (error) {
|
1097 |
-
global[key] = value;
|
1098 |
-
} return value;
|
1099 |
-
};
|
1100 |
|
|
|
|
|
|
|
1101 |
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
|
1106 |
-
|
1107 |
-
|
|
|
1108 |
|
1109 |
-
var
|
1110 |
-
|
|
|
|
|
1111 |
|
1112 |
-
|
|
|
|
|
|
|
1113 |
|
|
|
|
|
|
|
1114 |
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
|
1119 |
-
// IE8- don't enum bug keys
|
1120 |
-
module.exports = [
|
1121 |
-
'constructor',
|
1122 |
-
'hasOwnProperty',
|
1123 |
-
'isPrototypeOf',
|
1124 |
-
'propertyIsEnumerable',
|
1125 |
-
'toLocaleString',
|
1126 |
-
'toString',
|
1127 |
-
'valueOf'
|
1128 |
-
];
|
1129 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1130 |
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
|
1135 |
-
|
1136 |
-
|
1137 |
-
var forEach = __webpack_require__(149);
|
1138 |
-
var createNonEnumerableProperty = __webpack_require__(19);
|
1139 |
-
|
1140 |
-
for (var COLLECTION_NAME in DOMIterables) {
|
1141 |
-
var Collection = global[COLLECTION_NAME];
|
1142 |
-
var CollectionPrototype = Collection && Collection.prototype;
|
1143 |
-
// some Chrome versions have non-configurable methods on DOMTokenList
|
1144 |
-
if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
|
1145 |
-
createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);
|
1146 |
-
} catch (error) {
|
1147 |
-
CollectionPrototype.forEach = forEach;
|
1148 |
}
|
1149 |
-
}
|
1150 |
|
|
|
|
|
1151 |
|
1152 |
-
|
1153 |
-
|
1154 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1155 |
|
1156 |
-
(function() { module.exports = window["wc"]["navigation"]; }());
|
1157 |
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1161 |
|
1162 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1163 |
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
|
|
|
|
|
|
|
|
1167 |
|
1168 |
-
var
|
|
|
1169 |
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
}
|
1177 |
-
});
|
1178 |
|
|
|
|
|
|
|
|
|
|
|
1179 |
|
1180 |
-
|
1181 |
-
|
1182 |
-
/***/ (function(module, exports, __webpack_require__) {
|
1183 |
-
|
1184 |
-
var shared = __webpack_require__(58);
|
1185 |
-
var uid = __webpack_require__(55);
|
1186 |
|
1187 |
-
|
|
|
|
|
|
|
|
|
1188 |
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
|
|
|
|
|
|
|
|
1192 |
|
|
|
|
|
|
|
1193 |
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
|
1198 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1199 |
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
var DESCRIPTORS = __webpack_require__(13);
|
1205 |
-
var NATIVE_SYMBOL = __webpack_require__(62);
|
1206 |
-
var USE_SYMBOL_AS_UID = __webpack_require__(93);
|
1207 |
-
var fails = __webpack_require__(6);
|
1208 |
-
var has = __webpack_require__(11);
|
1209 |
-
var isArray = __webpack_require__(84);
|
1210 |
-
var isObject = __webpack_require__(10);
|
1211 |
-
var anObject = __webpack_require__(9);
|
1212 |
-
var toObject = __webpack_require__(38);
|
1213 |
-
var toIndexedObject = __webpack_require__(21);
|
1214 |
-
var toPrimitive = __webpack_require__(40);
|
1215 |
-
var createPropertyDescriptor = __webpack_require__(39);
|
1216 |
-
var nativeObjectCreate = __webpack_require__(69);
|
1217 |
-
var objectKeys = __webpack_require__(54);
|
1218 |
-
var getOwnPropertyNamesModule = __webpack_require__(56);
|
1219 |
-
var getOwnPropertyNamesExternal = __webpack_require__(147);
|
1220 |
-
var getOwnPropertySymbolsModule = __webpack_require__(79);
|
1221 |
-
var getOwnPropertyDescriptorModule = __webpack_require__(33);
|
1222 |
-
var definePropertyModule = __webpack_require__(17);
|
1223 |
-
var propertyIsEnumerableModule = __webpack_require__(76);
|
1224 |
-
var createNonEnumerableProperty = __webpack_require__(19);
|
1225 |
-
var redefine = __webpack_require__(27);
|
1226 |
-
var shared = __webpack_require__(58);
|
1227 |
-
var sharedKey = __webpack_require__(52);
|
1228 |
-
var hiddenKeys = __webpack_require__(36);
|
1229 |
-
var uid = __webpack_require__(55);
|
1230 |
-
var wellKnownSymbol = __webpack_require__(8);
|
1231 |
-
var wrappedWellKnownSymbolModule = __webpack_require__(119);
|
1232 |
-
var defineWellKnownSymbol = __webpack_require__(148);
|
1233 |
-
var setToStringTag = __webpack_require__(90);
|
1234 |
-
var InternalStateModule = __webpack_require__(45);
|
1235 |
-
var $forEach = __webpack_require__(75).forEach;
|
1236 |
-
|
1237 |
-
var HIDDEN = sharedKey('hidden');
|
1238 |
-
var SYMBOL = 'Symbol';
|
1239 |
-
var PROTOTYPE = 'prototype';
|
1240 |
-
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
|
1241 |
-
var setInternalState = InternalStateModule.set;
|
1242 |
-
var getInternalState = InternalStateModule.getterFor(SYMBOL);
|
1243 |
-
var ObjectPrototype = Object[PROTOTYPE];
|
1244 |
-
var $Symbol = global.Symbol;
|
1245 |
-
var $stringify = getBuiltIn('JSON', 'stringify');
|
1246 |
-
var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
1247 |
-
var nativeDefineProperty = definePropertyModule.f;
|
1248 |
-
var nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f;
|
1249 |
-
var nativePropertyIsEnumerable = propertyIsEnumerableModule.f;
|
1250 |
-
var AllSymbols = shared('symbols');
|
1251 |
-
var ObjectPrototypeSymbols = shared('op-symbols');
|
1252 |
-
var StringToSymbolRegistry = shared('string-to-symbol-registry');
|
1253 |
-
var SymbolToStringRegistry = shared('symbol-to-string-registry');
|
1254 |
-
var WellKnownSymbolsStore = shared('wks');
|
1255 |
-
var QObject = global.QObject;
|
1256 |
-
// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
|
1257 |
-
var USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
|
1258 |
-
|
1259 |
-
// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
|
1260 |
-
var setSymbolDescriptor = DESCRIPTORS && fails(function () {
|
1261 |
-
return nativeObjectCreate(nativeDefineProperty({}, 'a', {
|
1262 |
-
get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; }
|
1263 |
-
})).a != 7;
|
1264 |
-
}) ? function (O, P, Attributes) {
|
1265 |
-
var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P);
|
1266 |
-
if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];
|
1267 |
-
nativeDefineProperty(O, P, Attributes);
|
1268 |
-
if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {
|
1269 |
-
nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor);
|
1270 |
-
}
|
1271 |
-
} : nativeDefineProperty;
|
1272 |
-
|
1273 |
-
var wrap = function (tag, description) {
|
1274 |
-
var symbol = AllSymbols[tag] = nativeObjectCreate($Symbol[PROTOTYPE]);
|
1275 |
-
setInternalState(symbol, {
|
1276 |
-
type: SYMBOL,
|
1277 |
-
tag: tag,
|
1278 |
-
description: description
|
1279 |
-
});
|
1280 |
-
if (!DESCRIPTORS) symbol.description = description;
|
1281 |
-
return symbol;
|
1282 |
-
};
|
1283 |
|
1284 |
-
|
1285 |
-
|
1286 |
-
} : function (it) {
|
1287 |
-
return Object(it) instanceof $Symbol;
|
1288 |
-
};
|
1289 |
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
var key = toPrimitive(P, true);
|
1294 |
-
anObject(Attributes);
|
1295 |
-
if (has(AllSymbols, key)) {
|
1296 |
-
if (!Attributes.enumerable) {
|
1297 |
-
if (!has(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {}));
|
1298 |
-
O[HIDDEN][key] = true;
|
1299 |
} else {
|
1300 |
-
|
1301 |
-
|
1302 |
-
}
|
1303 |
-
} return nativeDefineProperty(O, key, Attributes);
|
1304 |
-
};
|
1305 |
-
|
1306 |
-
var $defineProperties = function defineProperties(O, Properties) {
|
1307 |
-
anObject(O);
|
1308 |
-
var properties = toIndexedObject(Properties);
|
1309 |
-
var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));
|
1310 |
-
$forEach(keys, function (key) {
|
1311 |
-
if (!DESCRIPTORS || $propertyIsEnumerable.call(properties, key)) $defineProperty(O, key, properties[key]);
|
1312 |
-
});
|
1313 |
-
return O;
|
1314 |
-
};
|
1315 |
|
1316 |
-
|
1317 |
-
|
1318 |
-
};
|
1319 |
|
1320 |
-
|
1321 |
-
var P = toPrimitive(V, true);
|
1322 |
-
var enumerable = nativePropertyIsEnumerable.call(this, P);
|
1323 |
-
if (this === ObjectPrototype && has(AllSymbols, P) && !has(ObjectPrototypeSymbols, P)) return false;
|
1324 |
-
return enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true;
|
1325 |
-
};
|
1326 |
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
if (descriptor && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) {
|
1333 |
-
descriptor.enumerable = true;
|
1334 |
-
}
|
1335 |
-
return descriptor;
|
1336 |
-
};
|
1337 |
|
1338 |
-
var $getOwnPropertyNames = function getOwnPropertyNames(O) {
|
1339 |
-
var names = nativeGetOwnPropertyNames(toIndexedObject(O));
|
1340 |
-
var result = [];
|
1341 |
-
$forEach(names, function (key) {
|
1342 |
-
if (!has(AllSymbols, key) && !has(hiddenKeys, key)) result.push(key);
|
1343 |
-
});
|
1344 |
-
return result;
|
1345 |
-
};
|
1346 |
|
1347 |
-
var
|
1348 |
-
|
1349 |
-
var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));
|
1350 |
-
var result = [];
|
1351 |
-
$forEach(names, function (key) {
|
1352 |
-
if (has(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || has(ObjectPrototype, key))) {
|
1353 |
-
result.push(AllSymbols[key]);
|
1354 |
-
}
|
1355 |
-
});
|
1356 |
-
return result;
|
1357 |
-
};
|
1358 |
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
$Symbol = function Symbol() {
|
1363 |
-
if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');
|
1364 |
-
var description = !arguments.length || arguments[0] === undefined ? undefined : String(arguments[0]);
|
1365 |
-
var tag = uid(description);
|
1366 |
-
var setter = function (value) {
|
1367 |
-
if (this === ObjectPrototype) setter.call(ObjectPrototypeSymbols, value);
|
1368 |
-
if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
|
1369 |
-
setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));
|
1370 |
-
};
|
1371 |
-
if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });
|
1372 |
-
return wrap(tag, description);
|
1373 |
-
};
|
1374 |
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1378 |
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
|
|
1382 |
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames;
|
1387 |
-
getOwnPropertySymbolsModule.f = $getOwnPropertySymbols;
|
1388 |
|
1389 |
-
|
1390 |
-
|
1391 |
-
};
|
1392 |
|
1393 |
-
if (
|
1394 |
-
|
1395 |
-
nativeDefineProperty($Symbol[PROTOTYPE], 'description', {
|
1396 |
-
configurable: true,
|
1397 |
-
get: function description() {
|
1398 |
-
return getInternalState(this).description;
|
1399 |
-
}
|
1400 |
-
});
|
1401 |
-
if (!IS_PURE) {
|
1402 |
-
redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });
|
1403 |
-
}
|
1404 |
}
|
|
|
|
|
|
|
|
|
|
|
1405 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1406 |
|
1407 |
-
$({ global: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, {
|
1408 |
-
Symbol: $Symbol
|
1409 |
-
});
|
1410 |
|
1411 |
-
|
1412 |
-
|
1413 |
-
|
1414 |
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];
|
1431 |
-
},
|
1432 |
-
useSetter: function () { USE_SETTER = true; },
|
1433 |
-
useSimple: function () { USE_SETTER = false; }
|
1434 |
-
});
|
1435 |
|
1436 |
-
$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, {
|
1437 |
-
// `Object.create` method
|
1438 |
-
// https://tc39.es/ecma262/#sec-object.create
|
1439 |
-
create: $create,
|
1440 |
-
// `Object.defineProperty` method
|
1441 |
-
// https://tc39.es/ecma262/#sec-object.defineproperty
|
1442 |
-
defineProperty: $defineProperty,
|
1443 |
-
// `Object.defineProperties` method
|
1444 |
-
// https://tc39.es/ecma262/#sec-object.defineproperties
|
1445 |
-
defineProperties: $defineProperties,
|
1446 |
-
// `Object.getOwnPropertyDescriptor` method
|
1447 |
-
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
|
1448 |
-
getOwnPropertyDescriptor: $getOwnPropertyDescriptor
|
1449 |
-
});
|
1450 |
|
1451 |
-
|
1452 |
-
|
1453 |
-
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
1454 |
-
getOwnPropertyNames: $getOwnPropertyNames,
|
1455 |
-
// `Object.getOwnPropertySymbols` method
|
1456 |
-
// https://tc39.es/ecma262/#sec-object.getownpropertysymbols
|
1457 |
-
getOwnPropertySymbols: $getOwnPropertySymbols
|
1458 |
-
});
|
1459 |
|
1460 |
-
|
1461 |
-
|
1462 |
-
$({ target: 'Object', stat: true, forced: fails(function () { getOwnPropertySymbolsModule.f(1); }) }, {
|
1463 |
-
getOwnPropertySymbols: function getOwnPropertySymbols(it) {
|
1464 |
-
return getOwnPropertySymbolsModule.f(toObject(it));
|
1465 |
}
|
1466 |
-
});
|
1467 |
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
|
1479 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1480 |
|
1481 |
-
|
1482 |
-
|
1483 |
-
|
1484 |
-
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
|
1489 |
-
|
1490 |
-
|
1491 |
-
|
1492 |
-
|
1493 |
-
};
|
1494 |
-
args[1] = replacer;
|
1495 |
-
return $stringify.apply(null, args);
|
1496 |
-
}
|
1497 |
-
});
|
1498 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1499 |
|
1500 |
-
|
1501 |
-
|
1502 |
-
|
1503 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1504 |
}
|
1505 |
-
|
1506 |
-
|
1507 |
-
|
|
|
|
|
|
|
1508 |
|
1509 |
-
|
|
|
|
|
|
|
1510 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1511 |
|
1512 |
-
|
1513 |
-
|
1514 |
-
|
|
|
1515 |
|
1516 |
-
|
1517 |
-
|
|
|
1518 |
|
1519 |
-
|
1520 |
-
|
1521 |
-
module.exports = Object.keys || function keys(O) {
|
1522 |
-
return internalObjectKeys(O, enumBugKeys);
|
1523 |
-
};
|
1524 |
|
|
|
|
|
|
|
1525 |
|
1526 |
-
|
1527 |
-
|
1528 |
-
|
|
|
1529 |
|
1530 |
-
|
1531 |
-
|
|
|
1532 |
|
1533 |
-
|
1534 |
-
|
1535 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1536 |
|
|
|
|
|
|
|
|
|
1537 |
|
1538 |
-
/***/ }),
|
1539 |
-
/* 56 */
|
1540 |
-
/***/ (function(module, exports, __webpack_require__) {
|
1541 |
|
1542 |
-
|
1543 |
-
|
|
|
|
|
1544 |
|
1545 |
-
|
|
|
|
|
|
|
1546 |
|
1547 |
-
// `Object.getOwnPropertyNames` method
|
1548 |
-
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
1549 |
-
exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
1550 |
-
return internalObjectKeys(O, hiddenKeys);
|
1551 |
-
};
|
1552 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1553 |
|
1554 |
-
|
1555 |
-
|
1556 |
-
|
|
|
1557 |
|
1558 |
-
|
|
|
|
|
|
|
|
|
1559 |
|
|
|
|
|
|
|
|
|
1560 |
|
1561 |
-
/***/ }),
|
1562 |
-
/* 58 */
|
1563 |
-
/***/ (function(module, exports, __webpack_require__) {
|
1564 |
|
1565 |
-
|
1566 |
-
|
|
|
1567 |
|
1568 |
-
|
1569 |
-
|
1570 |
-
|
1571 |
-
|
1572 |
-
|
1573 |
-
|
1574 |
-
}
|
|
|
|
|
1575 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1576 |
|
1577 |
-
|
1578 |
-
|
1579 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1580 |
|
1581 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1582 |
|
1583 |
-
|
1584 |
-
|
1585 |
-
|
|
|
|
|
|
|
1586 |
|
1587 |
-
|
1588 |
-
|
1589 |
-
|
1590 |
-
|
1591 |
-
|
|
|
|
|
|
|
|
|
|
|
1592 |
|
1593 |
-
|
1594 |
-
var
|
1595 |
|
1596 |
-
|
1597 |
-
|
1598 |
-
$({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, {
|
1599 |
-
getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {
|
1600 |
-
return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key);
|
1601 |
}
|
1602 |
-
});
|
1603 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1604 |
|
1605 |
/***/ }),
|
1606 |
-
/* 61 */
|
1607 |
-
/***/ (function(module, exports, __webpack_require__) {
|
1608 |
|
1609 |
-
|
1610 |
-
|
1611 |
-
|
1612 |
-
|
1613 |
-
var
|
1614 |
-
var
|
1615 |
-
|
1616 |
-
|
1617 |
-
|
1618 |
-
|
1619 |
-
|
1620 |
-
var O = toIndexedObject(object);
|
1621 |
-
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
1622 |
-
var keys = ownKeys(O);
|
1623 |
-
var result = {};
|
1624 |
-
var index = 0;
|
1625 |
-
var key, descriptor;
|
1626 |
-
while (keys.length > index) {
|
1627 |
-
descriptor = getOwnPropertyDescriptor(O, key = keys[index++]);
|
1628 |
-
if (descriptor !== undefined) createProperty(result, key, descriptor);
|
1629 |
-
}
|
1630 |
-
return result;
|
1631 |
-
}
|
1632 |
-
});
|
1633 |
|
1634 |
|
1635 |
-
/***/ }),
|
1636 |
-
/* 62 */
|
1637 |
-
/***/ (function(module, exports, __webpack_require__) {
|
1638 |
|
1639 |
-
var IS_NODE = __webpack_require__(77);
|
1640 |
-
var V8_VERSION = __webpack_require__(63);
|
1641 |
-
var fails = __webpack_require__(6);
|
1642 |
|
1643 |
-
|
1644 |
-
|
1645 |
-
|
1646 |
-
|
1647 |
-
|
1648 |
-
|
1649 |
-
|
|
|
1650 |
|
1651 |
|
1652 |
-
/***/ }),
|
1653 |
-
/* 63 */
|
1654 |
-
/***/ (function(module, exports, __webpack_require__) {
|
1655 |
|
1656 |
-
|
1657 |
-
var
|
|
|
|
|
|
|
1658 |
|
1659 |
-
|
1660 |
-
var
|
1661 |
-
var v8 = versions && versions.v8;
|
1662 |
-
var match, version;
|
1663 |
|
1664 |
-
if (
|
1665 |
-
|
1666 |
-
|
1667 |
-
|
1668 |
-
|
1669 |
-
if (!match || match[1] >= 74) {
|
1670 |
-
match = userAgent.match(/Chrome\/(\d+)/);
|
1671 |
-
if (match) version = match[1];
|
1672 |
}
|
1673 |
-
}
|
1674 |
|
1675 |
-
|
|
|
|
|
|
|
|
|
1676 |
|
1677 |
|
1678 |
-
|
1679 |
-
/* 64 */
|
1680 |
-
/***/ (function(module, exports, __webpack_require__) {
|
1681 |
|
1682 |
-
|
1683 |
-
|
1684 |
-
|
1685 |
-
|
1686 |
-
|
1687 |
-
var create = __webpack_require__(69);
|
1688 |
-
var bind = __webpack_require__(212);
|
1689 |
-
var fails = __webpack_require__(6);
|
1690 |
-
|
1691 |
-
var nativeConstruct = getBuiltIn('Reflect', 'construct');
|
1692 |
-
|
1693 |
-
// `Reflect.construct` method
|
1694 |
-
// https://tc39.es/ecma262/#sec-reflect.construct
|
1695 |
-
// MS Edge supports only 2 arguments and argumentsList argument is optional
|
1696 |
-
// FF Nightly sets third argument as `new.target`, but does not create `this` from it
|
1697 |
-
var NEW_TARGET_BUG = fails(function () {
|
1698 |
-
function F() { /* empty */ }
|
1699 |
-
return !(nativeConstruct(function () { /* empty */ }, [], F) instanceof F);
|
1700 |
-
});
|
1701 |
-
var ARGS_BUG = !fails(function () {
|
1702 |
-
nativeConstruct(function () { /* empty */ });
|
1703 |
-
});
|
1704 |
-
var FORCED = NEW_TARGET_BUG || ARGS_BUG;
|
1705 |
-
|
1706 |
-
$({ target: 'Reflect', stat: true, forced: FORCED, sham: FORCED }, {
|
1707 |
-
construct: function construct(Target, args /* , newTarget */) {
|
1708 |
-
aFunction(Target);
|
1709 |
-
anObject(args);
|
1710 |
-
var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
|
1711 |
-
if (ARGS_BUG && !NEW_TARGET_BUG) return nativeConstruct(Target, args, newTarget);
|
1712 |
-
if (Target == newTarget) {
|
1713 |
-
// w/o altered newTarget, optimization for 0-4 arguments
|
1714 |
-
switch (args.length) {
|
1715 |
-
case 0: return new Target();
|
1716 |
-
case 1: return new Target(args[0]);
|
1717 |
-
case 2: return new Target(args[0], args[1]);
|
1718 |
-
case 3: return new Target(args[0], args[1], args[2]);
|
1719 |
-
case 4: return new Target(args[0], args[1], args[2], args[3]);
|
1720 |
-
}
|
1721 |
-
// w/o altered newTarget, lot of arguments case
|
1722 |
-
var $args = [null];
|
1723 |
-
$args.push.apply($args, args);
|
1724 |
-
return new (bind.apply(Target, $args))();
|
1725 |
}
|
1726 |
-
|
1727 |
-
|
1728 |
-
|
1729 |
-
|
1730 |
-
return isObject(result) ? result : instance;
|
1731 |
}
|
1732 |
-
});
|
1733 |
|
|
|
|
|
|
|
|
|
|
|
1734 |
|
1735 |
-
|
1736 |
-
|
1737 |
-
/***/ (function(module, exports) {
|
1738 |
|
1739 |
-
(
|
|
|
|
|
|
|
|
|
1740 |
|
1741 |
-
|
1742 |
-
|
1743 |
-
/***/ (function(module, exports, __webpack_require__) {
|
1744 |
|
1745 |
-
"
|
|
|
1746 |
|
1747 |
-
|
1748 |
-
var fails = __webpack_require__(6);
|
1749 |
-
var isArray = __webpack_require__(84);
|
1750 |
-
var isObject = __webpack_require__(10);
|
1751 |
-
var toObject = __webpack_require__(38);
|
1752 |
-
var toLength = __webpack_require__(34);
|
1753 |
-
var createProperty = __webpack_require__(102);
|
1754 |
-
var arraySpeciesCreate = __webpack_require__(109);
|
1755 |
-
var arrayMethodHasSpeciesSupport = __webpack_require__(89);
|
1756 |
-
var wellKnownSymbol = __webpack_require__(8);
|
1757 |
-
var V8_VERSION = __webpack_require__(63);
|
1758 |
-
|
1759 |
-
var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
|
1760 |
-
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
|
1761 |
-
var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
|
1762 |
-
|
1763 |
-
// We can't use this feature detection in V8 since it causes
|
1764 |
-
// deoptimization and serious performance degradation
|
1765 |
-
// https://github.com/zloirock/core-js/issues/679
|
1766 |
-
var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {
|
1767 |
-
var array = [];
|
1768 |
-
array[IS_CONCAT_SPREADABLE] = false;
|
1769 |
-
return array.concat()[0] !== array;
|
1770 |
-
});
|
1771 |
|
1772 |
-
|
|
|
1773 |
|
1774 |
-
|
1775 |
-
|
1776 |
-
|
1777 |
-
|
1778 |
-
|
|
|
1779 |
|
1780 |
-
var
|
1781 |
-
|
1782 |
-
|
1783 |
-
|
1784 |
-
// with adding support of @@isConcatSpreadable and @@species
|
1785 |
-
$({ target: 'Array', proto: true, forced: FORCED }, {
|
1786 |
-
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
1787 |
-
concat: function concat(arg) {
|
1788 |
-
var O = toObject(this);
|
1789 |
-
var A = arraySpeciesCreate(O, 0);
|
1790 |
-
var n = 0;
|
1791 |
-
var i, k, length, len, E;
|
1792 |
-
for (i = -1, length = arguments.length; i < length; i++) {
|
1793 |
-
E = i === -1 ? O : arguments[i];
|
1794 |
-
if (isConcatSpreadable(E)) {
|
1795 |
-
len = toLength(E.length);
|
1796 |
-
if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
1797 |
-
for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
|
1798 |
-
} else {
|
1799 |
-
if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
1800 |
-
createProperty(A, n++, E);
|
1801 |
}
|
1802 |
}
|
1803 |
-
A.length = n;
|
1804 |
-
return A;
|
1805 |
-
}
|
1806 |
-
});
|
1807 |
|
|
|
|
|
1808 |
|
1809 |
-
|
1810 |
-
|
1811 |
-
/***/ (function(module, exports, __webpack_require__) {
|
1812 |
|
1813 |
-
|
1814 |
-
var isObject = __webpack_require__(10);
|
1815 |
|
1816 |
-
|
1817 |
-
|
1818 |
-
var EXISTS = isObject(document) && isObject(document.createElement);
|
1819 |
|
1820 |
-
|
1821 |
-
|
1822 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1823 |
|
1824 |
|
1825 |
-
/***/ }),
|
1826 |
-
/* 68 */
|
1827 |
-
/***/ (function(module, exports, __webpack_require__) {
|
1828 |
|
1829 |
-
var store = __webpack_require__(47);
|
1830 |
|
1831 |
-
var functionToString = Function.toString;
|
1832 |
|
1833 |
-
// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
|
1834 |
-
if (typeof store.inspectSource != 'function') {
|
1835 |
-
store.inspectSource = function (it) {
|
1836 |
-
return functionToString.call(it);
|
1837 |
-
};
|
1838 |
-
}
|
1839 |
|
1840 |
-
module.exports = store.inspectSource;
|
1841 |
|
|
|
|
|
|
|
1842 |
|
1843 |
-
|
1844 |
-
|
1845 |
-
|
1846 |
|
1847 |
-
var anObject = __webpack_require__(9);
|
1848 |
-
var defineProperties = __webpack_require__(104);
|
1849 |
-
var enumBugKeys = __webpack_require__(48);
|
1850 |
-
var hiddenKeys = __webpack_require__(36);
|
1851 |
-
var html = __webpack_require__(98);
|
1852 |
-
var documentCreateElement = __webpack_require__(67);
|
1853 |
-
var sharedKey = __webpack_require__(52);
|
1854 |
|
1855 |
-
|
1856 |
-
|
1857 |
-
|
1858 |
-
var SCRIPT = 'script';
|
1859 |
-
var IE_PROTO = sharedKey('IE_PROTO');
|
1860 |
|
1861 |
-
var EmptyConstructor = function () { /* empty */ };
|
1862 |
|
1863 |
-
var scriptTag = function (content) {
|
1864 |
-
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
|
1865 |
-
};
|
1866 |
|
1867 |
-
|
1868 |
-
|
1869 |
-
|
1870 |
-
|
1871 |
-
|
1872 |
-
activeXDocument = null; // avoid memory leak
|
1873 |
-
return temp;
|
1874 |
-
};
|
1875 |
|
1876 |
-
|
1877 |
-
var NullProtoObjectViaIFrame = function () {
|
1878 |
-
// Thrash, waste and sodomy: IE GC bug
|
1879 |
-
var iframe = documentCreateElement('iframe');
|
1880 |
-
var JS = 'java' + SCRIPT + ':';
|
1881 |
-
var iframeDocument;
|
1882 |
-
iframe.style.display = 'none';
|
1883 |
-
html.appendChild(iframe);
|
1884 |
-
// https://github.com/zloirock/core-js/issues/475
|
1885 |
-
iframe.src = String(JS);
|
1886 |
-
iframeDocument = iframe.contentWindow.document;
|
1887 |
-
iframeDocument.open();
|
1888 |
-
iframeDocument.write(scriptTag('document.F=Object'));
|
1889 |
-
iframeDocument.close();
|
1890 |
-
return iframeDocument.F;
|
1891 |
-
};
|
1892 |
|
1893 |
-
|
1894 |
-
|
1895 |
-
|
1896 |
-
|
1897 |
-
// avoid IE GC bug
|
1898 |
-
var activeXDocument;
|
1899 |
-
var NullProtoObject = function () {
|
1900 |
-
try {
|
1901 |
-
/* global ActiveXObject -- old IE */
|
1902 |
-
activeXDocument = document.domain && new ActiveXObject('htmlfile');
|
1903 |
-
} catch (error) { /* ignore */ }
|
1904 |
-
NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
|
1905 |
-
var length = enumBugKeys.length;
|
1906 |
-
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
1907 |
-
return NullProtoObject();
|
1908 |
-
};
|
1909 |
|
1910 |
-
|
1911 |
-
|
1912 |
-
// `Object.create` method
|
1913 |
-
// https://tc39.es/ecma262/#sec-object.create
|
1914 |
-
module.exports = Object.create || function create(O, Properties) {
|
1915 |
-
var result;
|
1916 |
-
if (O !== null) {
|
1917 |
-
EmptyConstructor[PROTOTYPE] = anObject(O);
|
1918 |
-
result = new EmptyConstructor();
|
1919 |
-
EmptyConstructor[PROTOTYPE] = null;
|
1920 |
-
// add "__proto__" for Object.getPrototypeOf polyfill
|
1921 |
-
result[IE_PROTO] = O;
|
1922 |
-
} else result = NullProtoObject();
|
1923 |
-
return Properties === undefined ? result : defineProperties(result, Properties);
|
1924 |
-
};
|
1925 |
|
|
|
1926 |
|
1927 |
-
|
1928 |
-
|
1929 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1930 |
|
1931 |
-
|
1932 |
-
|
1933 |
-
|
1934 |
-
|
1935 |
-
|
|
|
|
|
|
|
|
|
|
|
1936 |
|
|
|
|
|
|
|
1937 |
|
1938 |
-
|
1939 |
-
/* 71 */
|
1940 |
-
/***/ (function(module, exports, __webpack_require__) {
|
1941 |
|
1942 |
-
|
1943 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1944 |
|
1945 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1946 |
|
1947 |
-
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
1948 |
-
module.exports = fails(function () {
|
1949 |
-
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
1950 |
-
// eslint-disable-next-line no-prototype-builtins -- safe
|
1951 |
-
return !Object('z').propertyIsEnumerable(0);
|
1952 |
-
}) ? function (it) {
|
1953 |
-
return classof(it) == 'String' ? split.call(it, '') : Object(it);
|
1954 |
-
} : Object;
|
1955 |
|
|
|
|
|
|
|
|
|
|
|
1956 |
|
1957 |
-
/***/ }),
|
1958 |
-
/* 72 */
|
1959 |
-
/***/ (function(module, exports, __webpack_require__) {
|
1960 |
|
1961 |
-
|
1962 |
-
|
1963 |
-
|
|
|
1964 |
|
1965 |
-
// Thank's IE8 for his funny defineProperty
|
1966 |
-
module.exports = !DESCRIPTORS && !fails(function () {
|
1967 |
-
return Object.defineProperty(createElement('div'), 'a', {
|
1968 |
-
get: function () { return 7; }
|
1969 |
-
}).a != 7;
|
1970 |
-
});
|
1971 |
|
|
|
1972 |
|
1973 |
-
|
1974 |
-
/* 73 */
|
1975 |
-
/***/ (function(module, exports, __webpack_require__) {
|
1976 |
|
1977 |
-
|
1978 |
-
|
1979 |
-
|
1980 |
-
var hiddenKeys = __webpack_require__(36);
|
1981 |
|
1982 |
-
|
1983 |
-
|
1984 |
-
|
1985 |
-
|
1986 |
-
|
1987 |
-
|
1988 |
-
|
1989 |
-
|
1990 |
-
|
1991 |
-
|
1992 |
-
|
1993 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1994 |
|
|
|
|
|
|
|
|
|
1995 |
|
1996 |
-
|
1997 |
-
|
1998 |
-
|
|
|
|
|
|
|
1999 |
|
2000 |
-
var fails = __webpack_require__(6);
|
2001 |
|
2002 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2003 |
|
2004 |
-
|
2005 |
-
|
2006 |
-
return value == POLYFILL ? true
|
2007 |
-
: value == NATIVE ? false
|
2008 |
-
: typeof detection == 'function' ? fails(detection)
|
2009 |
-
: !!detection;
|
2010 |
-
};
|
2011 |
|
2012 |
-
|
2013 |
-
|
2014 |
-
};
|
2015 |
|
2016 |
-
var
|
2017 |
-
var
|
2018 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019 |
|
2020 |
-
|
|
|
2021 |
|
|
|
|
|
2022 |
|
2023 |
/***/ }),
|
2024 |
-
|
|
|
2025 |
/***/ (function(module, exports, __webpack_require__) {
|
2026 |
|
2027 |
-
|
2028 |
-
|
2029 |
-
|
2030 |
-
var
|
2031 |
-
var
|
2032 |
-
|
2033 |
-
|
2034 |
-
|
2035 |
-
|
2036 |
-
|
2037 |
-
|
2038 |
-
|
2039 |
-
|
2040 |
-
|
2041 |
-
|
2042 |
-
|
2043 |
-
|
2044 |
-
return function ($this, callbackfn, that, specificCreate) {
|
2045 |
-
var O = toObject($this);
|
2046 |
-
var self = IndexedObject(O);
|
2047 |
-
var boundFunction = bind(callbackfn, that, 3);
|
2048 |
-
var length = toLength(self.length);
|
2049 |
-
var index = 0;
|
2050 |
-
var create = specificCreate || arraySpeciesCreate;
|
2051 |
-
var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined;
|
2052 |
-
var value, result;
|
2053 |
-
for (;length > index; index++) if (NO_HOLES || index in self) {
|
2054 |
-
value = self[index];
|
2055 |
-
result = boundFunction(value, index, O);
|
2056 |
-
if (TYPE) {
|
2057 |
-
if (IS_MAP) target[index] = result; // map
|
2058 |
-
else if (result) switch (TYPE) {
|
2059 |
-
case 3: return true; // some
|
2060 |
-
case 5: return value; // find
|
2061 |
-
case 6: return index; // findIndex
|
2062 |
-
case 2: push.call(target, value); // filter
|
2063 |
-
} else switch (TYPE) {
|
2064 |
-
case 4: return false; // every
|
2065 |
-
case 7: push.call(target, value); // filterOut
|
2066 |
-
}
|
2067 |
-
}
|
2068 |
}
|
2069 |
-
return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
|
2070 |
-
};
|
2071 |
};
|
2072 |
|
2073 |
-
|
2074 |
-
|
2075 |
-
|
2076 |
-
|
2077 |
-
// `Array.prototype.map` method
|
2078 |
-
// https://tc39.es/ecma262/#sec-array.prototype.map
|
2079 |
-
map: createMethod(1),
|
2080 |
-
// `Array.prototype.filter` method
|
2081 |
-
// https://tc39.es/ecma262/#sec-array.prototype.filter
|
2082 |
-
filter: createMethod(2),
|
2083 |
-
// `Array.prototype.some` method
|
2084 |
-
// https://tc39.es/ecma262/#sec-array.prototype.some
|
2085 |
-
some: createMethod(3),
|
2086 |
-
// `Array.prototype.every` method
|
2087 |
-
// https://tc39.es/ecma262/#sec-array.prototype.every
|
2088 |
-
every: createMethod(4),
|
2089 |
-
// `Array.prototype.find` method
|
2090 |
-
// https://tc39.es/ecma262/#sec-array.prototype.find
|
2091 |
-
find: createMethod(5),
|
2092 |
-
// `Array.prototype.findIndex` method
|
2093 |
-
// https://tc39.es/ecma262/#sec-array.prototype.findIndex
|
2094 |
-
findIndex: createMethod(6),
|
2095 |
-
// `Array.prototype.filterOut` method
|
2096 |
-
// https://github.com/tc39/proposal-array-filtering
|
2097 |
-
filterOut: createMethod(7)
|
2098 |
};
|
2099 |
|
|
|
2100 |
|
2101 |
-
|
2102 |
-
|
2103 |
-
|
2104 |
-
|
2105 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2106 |
|
2107 |
-
var
|
2108 |
-
|
|
|
|
|
|
|
|
|
|
|
2109 |
|
2110 |
-
|
2111 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2112 |
|
2113 |
-
|
2114 |
-
|
2115 |
-
|
2116 |
-
|
2117 |
-
return !!descriptor && descriptor.enumerable;
|
2118 |
-
} : nativePropertyIsEnumerable;
|
2119 |
|
|
|
|
|
2120 |
|
2121 |
-
|
2122 |
-
|
2123 |
-
|
|
|
|
|
|
|
|
|
2124 |
|
2125 |
-
var
|
2126 |
-
var global = __webpack_require__(3);
|
2127 |
|
2128 |
-
|
|
|
|
|
2129 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2130 |
|
2131 |
-
|
2132 |
-
|
2133 |
-
/***/ (function(module, exports) {
|
2134 |
|
2135 |
-
(
|
|
|
|
|
2136 |
|
2137 |
-
|
2138 |
-
|
2139 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2140 |
|
2141 |
-
|
|
|
2142 |
|
|
|
|
|
|
|
|
|
2143 |
|
2144 |
-
|
2145 |
-
|
2146 |
-
|
2147 |
|
2148 |
-
|
2149 |
-
|
2150 |
-
|
2151 |
-
|
2152 |
|
2153 |
-
|
2154 |
-
|
2155 |
-
|
|
|
2156 |
}
|
2157 |
-
|
2158 |
}
|
|
|
2159 |
|
2160 |
-
|
2161 |
-
|
|
|
|
|
2162 |
|
2163 |
-
|
2164 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2165 |
|
2166 |
-
module.exports =
|
|
|
|
|
2167 |
|
2168 |
-
|
2169 |
-
|
2170 |
-
/***/ (function(module, exports, __webpack_require__) {
|
2171 |
|
2172 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2173 |
|
2174 |
-
|
2175 |
|
|
|
|
|
|
|
2176 |
|
2177 |
-
|
2178 |
-
|
2179 |
-
|
|
|
|
|
|
|
|
|
|
|
2180 |
|
2181 |
-
var
|
2182 |
|
2183 |
-
|
2184 |
-
|
|
|
2185 |
|
2186 |
-
|
|
|
|
|
2187 |
|
2188 |
-
|
|
|
2189 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2190 |
|
2191 |
-
|
2192 |
-
|
2193 |
-
/***/ (function(module, exports, __webpack_require__) {
|
2194 |
|
2195 |
-
|
2196 |
-
|
2197 |
-
|
2198 |
-
|
2199 |
-
|
2200 |
-
|
2201 |
-
|
2202 |
-
|
2203 |
-
|
2204 |
-
var index = toAbsoluteIndex(fromIndex, length);
|
2205 |
-
var value;
|
2206 |
-
// Array#includes uses SameValueZero equality algorithm
|
2207 |
-
// eslint-disable-next-line no-self-compare -- NaN check
|
2208 |
-
if (IS_INCLUDES && el != el) while (length > index) {
|
2209 |
-
value = O[index++];
|
2210 |
-
// eslint-disable-next-line no-self-compare -- NaN check
|
2211 |
-
if (value != value) return true;
|
2212 |
-
// Array#indexOf ignores holes, Array#includes - not
|
2213 |
-
} else for (;length > index; index++) {
|
2214 |
-
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
2215 |
-
} return !IS_INCLUDES && -1;
|
2216 |
-
};
|
2217 |
-
};
|
2218 |
|
2219 |
-
|
2220 |
-
// `Array.prototype.includes` method
|
2221 |
-
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
2222 |
-
includes: createMethod(true),
|
2223 |
-
// `Array.prototype.indexOf` method
|
2224 |
-
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
2225 |
-
indexOf: createMethod(false)
|
2226 |
};
|
2227 |
|
2228 |
|
2229 |
/***/ }),
|
2230 |
-
|
|
|
2231 |
/***/ (function(module, exports, __webpack_require__) {
|
2232 |
|
2233 |
-
|
2234 |
|
2235 |
-
// `IsArray` abstract operation
|
2236 |
-
// https://tc39.es/ecma262/#sec-isarray
|
2237 |
-
module.exports = Array.isArray || function isArray(arg) {
|
2238 |
-
return classof(arg) == 'Array';
|
2239 |
-
};
|
2240 |
|
|
|
2241 |
|
2242 |
-
|
2243 |
-
|
2244 |
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
2245 |
|
2246 |
-
|
2247 |
-
|
2248 |
-
|
2249 |
-
|
2250 |
-
|
2251 |
-
|
2252 |
-
|
2253 |
-
|
2254 |
-
|
2255 |
-
|
2256 |
-
|
2257 |
-
|
2258 |
-
|
2259 |
-
|
2260 |
-
|
2261 |
-
|
2262 |
-
|
2263 |
-
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2);
|
2264 |
-
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);
|
2265 |
-
|
2266 |
-
|
2267 |
-
|
2268 |
-
|
2269 |
-
/**
|
2270 |
-
* External dependencies
|
2271 |
-
*/
|
2272 |
-
// Remove mutable data from settings object to prevent access. Data stores should be used instead.
|
2273 |
-
|
2274 |
-
var mutableSources = ['wcAdminSettings', 'preloadSettings'];
|
2275 |
-
var settings = (typeof wcSettings === "undefined" ? "undefined" : _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(wcSettings)) === 'object' ? wcSettings : {};
|
2276 |
-
var SOURCE = Object.keys(settings).reduce(function (source, key) {
|
2277 |
-
if (!mutableSources.includes(key)) {
|
2278 |
-
source[key] = settings[key];
|
2279 |
-
}
|
2280 |
-
|
2281 |
-
return source;
|
2282 |
-
}, {});
|
2283 |
-
var ADMIN_URL = SOURCE.adminUrl;
|
2284 |
-
var COUNTRIES = SOURCE.countries;
|
2285 |
-
var CURRENCY = SOURCE.currency;
|
2286 |
-
var LOCALE = SOURCE.locale;
|
2287 |
-
var ORDER_STATUSES = SOURCE.orderStatuses;
|
2288 |
-
var SITE_TITLE = SOURCE.siteTitle;
|
2289 |
-
var WC_ASSET_URL = SOURCE.wcAssetUrl;
|
2290 |
-
/**
|
2291 |
-
* Retrieves a setting value from the setting state.
|
2292 |
-
*
|
2293 |
-
* @param {string} name The identifier for the setting.
|
2294 |
-
* @param {*} [fallback=false] The value to use as a fallback
|
2295 |
-
* if the setting is not in the
|
2296 |
-
* state.
|
2297 |
-
* @param {Function} [filter=( val ) => val] A callback for filtering the
|
2298 |
-
* value before it's returned.
|
2299 |
-
* Receives both the found value
|
2300 |
-
* (if it exists for the key) and
|
2301 |
-
* the provided fallback arg.
|
2302 |
-
*
|
2303 |
-
* @return {*} The value present in the settings state for the given
|
2304 |
-
* name.
|
2305 |
-
*/
|
2306 |
-
|
2307 |
-
function getSetting(name) {
|
2308 |
-
var fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
2309 |
-
var filter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function (val) {
|
2310 |
-
return val;
|
2311 |
-
};
|
2312 |
|
2313 |
-
|
2314 |
-
|
2315 |
-
|
|
|
|
|
2316 |
|
2317 |
-
|
2318 |
-
|
2319 |
-
|
2320 |
-
|
2321 |
-
* Sets a value to a property on the settings state.
|
2322 |
-
*
|
2323 |
-
* NOTE: This feature is to be removed in favour of data stores when a full migration
|
2324 |
-
* is complete.
|
2325 |
-
*
|
2326 |
-
* @deprecated
|
2327 |
-
*
|
2328 |
-
* @param {string} name The setting property key for the
|
2329 |
-
* setting being mutated.
|
2330 |
-
* @param {*} value The value to set.
|
2331 |
-
* @param {Function} [filter=( val ) => val] Allows for providing a callback
|
2332 |
-
* to sanitize the setting (eg.
|
2333 |
-
* ensure it's a number)
|
2334 |
-
*/
|
2335 |
|
2336 |
-
function setSetting(name, value) {
|
2337 |
-
var filter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function (val) {
|
2338 |
return val;
|
2339 |
-
};
|
2340 |
-
|
2341 |
-
if (mutableSources.includes(name)) {
|
2342 |
-
throw new Error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Mutable settings should be mutated via data store.'));
|
2343 |
-
}
|
2344 |
-
|
2345 |
-
SOURCE[name] = filter(value);
|
2346 |
-
}
|
2347 |
-
/**
|
2348 |
-
* Returns a string with the site's wp-admin URL appended. JS version of `admin_url`.
|
2349 |
-
*
|
2350 |
-
* @param {string} path Relative path.
|
2351 |
-
* @return {string} Full admin URL.
|
2352 |
-
*/
|
2353 |
-
|
2354 |
-
function getAdminLink(path) {
|
2355 |
-
return (ADMIN_URL || '') + path;
|
2356 |
-
}
|
2357 |
-
|
2358 |
-
/***/ }),
|
2359 |
-
/* 86 */
|
2360 |
-
/***/ (function(module, exports, __webpack_require__) {
|
2361 |
-
|
2362 |
-
var getBuiltIn = __webpack_require__(31);
|
2363 |
-
var getOwnPropertyNamesModule = __webpack_require__(56);
|
2364 |
-
var getOwnPropertySymbolsModule = __webpack_require__(79);
|
2365 |
-
var anObject = __webpack_require__(9);
|
2366 |
-
|
2367 |
-
// all object keys, includes non-enumerable and symbols
|
2368 |
-
module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
|
2369 |
-
var keys = getOwnPropertyNamesModule.f(anObject(it));
|
2370 |
-
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
2371 |
-
return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
|
2372 |
};
|
2373 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2374 |
|
2375 |
-
|
2376 |
-
|
2377 |
-
|
2378 |
-
|
2379 |
-
|
2380 |
-
|
2381 |
-
module.exports = getBuiltIn('navigator', 'userAgent') || '';
|
2382 |
|
|
|
|
|
2383 |
|
2384 |
-
|
2385 |
-
|
2386 |
-
|
|
|
|
|
|
|
|
|
2387 |
|
2388 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2389 |
|
2390 |
-
|
2391 |
-
|
|
|
|
|
|
|
2392 |
|
2393 |
-
|
2394 |
-
|
2395 |
-
$({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
|
2396 |
-
exec: exec
|
2397 |
-
});
|
2398 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2399 |
|
2400 |
-
|
2401 |
-
|
2402 |
-
|
2403 |
|
2404 |
-
|
2405 |
-
|
2406 |
-
|
2407 |
|
2408 |
-
|
|
|
|
|
|
|
|
|
|
|
2409 |
|
2410 |
-
|
2411 |
-
// We can't use this feature detection in V8 since it causes
|
2412 |
-
// deoptimization and serious performance degradation
|
2413 |
-
// https://github.com/zloirock/core-js/issues/677
|
2414 |
-
return V8_VERSION >= 51 || !fails(function () {
|
2415 |
-
var array = [];
|
2416 |
-
var constructor = array.constructor = {};
|
2417 |
-
constructor[SPECIES] = function () {
|
2418 |
-
return { foo: 1 };
|
2419 |
-
};
|
2420 |
-
return array[METHOD_NAME](Boolean).foo !== 1;
|
2421 |
-
});
|
2422 |
};
|
2423 |
|
|
|
|
|
2424 |
|
2425 |
-
|
2426 |
-
|
2427 |
-
|
2428 |
|
2429 |
-
|
2430 |
-
|
2431 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2432 |
|
2433 |
-
|
|
|
2434 |
|
2435 |
-
|
2436 |
-
if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
|
2437 |
-
defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });
|
2438 |
-
}
|
2439 |
};
|
2440 |
|
|
|
|
|
|
|
|
|
2441 |
|
2442 |
-
|
2443 |
-
|
2444 |
-
/***/ (function(module, exports, __webpack_require__) {
|
2445 |
-
|
2446 |
-
"use strict";
|
2447 |
-
|
2448 |
-
var regexpFlags = __webpack_require__(114);
|
2449 |
-
var stickyHelpers = __webpack_require__(137);
|
2450 |
-
|
2451 |
-
var nativeExec = RegExp.prototype.exec;
|
2452 |
-
// This always refers to the native implementation, because the
|
2453 |
-
// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
|
2454 |
-
// which loads this file before patching the method.
|
2455 |
-
var nativeReplace = String.prototype.replace;
|
2456 |
-
|
2457 |
-
var patchedExec = nativeExec;
|
2458 |
|
2459 |
-
|
2460 |
-
var re1 = /a/;
|
2461 |
-
var re2 = /b*/g;
|
2462 |
-
nativeExec.call(re1, 'a');
|
2463 |
-
nativeExec.call(re2, 'a');
|
2464 |
-
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
2465 |
-
})();
|
2466 |
|
2467 |
-
var
|
|
|
2468 |
|
2469 |
-
//
|
2470 |
-
// eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing
|
2471 |
-
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
|
2472 |
|
2473 |
-
var
|
|
|
2474 |
|
2475 |
-
if
|
2476 |
-
patchedExec = function exec(str) {
|
2477 |
-
var re = this;
|
2478 |
-
var lastIndex, reCopy, match, i;
|
2479 |
-
var sticky = UNSUPPORTED_Y && re.sticky;
|
2480 |
-
var flags = regexpFlags.call(re);
|
2481 |
-
var source = re.source;
|
2482 |
-
var charsAdded = 0;
|
2483 |
-
var strCopy = str;
|
2484 |
|
2485 |
-
|
2486 |
-
|
2487 |
-
|
2488 |
-
|
2489 |
-
|
|
|
|
|
|
|
2490 |
|
2491 |
-
|
2492 |
-
|
2493 |
-
|
2494 |
-
|
2495 |
-
|
2496 |
-
|
2497 |
-
|
2498 |
-
|
2499 |
-
|
2500 |
-
|
2501 |
-
|
2502 |
-
|
2503 |
-
if (NPCG_INCLUDED) {
|
2504 |
-
reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
|
2505 |
-
}
|
2506 |
-
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
|
2507 |
-
|
2508 |
-
match = nativeExec.call(sticky ? reCopy : re, strCopy);
|
2509 |
-
|
2510 |
-
if (sticky) {
|
2511 |
-
if (match) {
|
2512 |
-
match.input = match.input.slice(charsAdded);
|
2513 |
-
match[0] = match[0].slice(charsAdded);
|
2514 |
-
match.index = re.lastIndex;
|
2515 |
-
re.lastIndex += match[0].length;
|
2516 |
-
} else re.lastIndex = 0;
|
2517 |
-
} else if (UPDATES_LAST_INDEX_WRONG && match) {
|
2518 |
-
re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
|
2519 |
-
}
|
2520 |
-
if (NPCG_INCLUDED && match && match.length > 1) {
|
2521 |
-
// Fix browsers whose `exec` methods don't consistently return `undefined`
|
2522 |
-
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
|
2523 |
-
nativeReplace.call(match[0], reCopy, function () {
|
2524 |
-
for (i = 1; i < arguments.length - 2; i++) {
|
2525 |
-
if (arguments[i] === undefined) match[i] = undefined;
|
2526 |
}
|
2527 |
-
|
2528 |
}
|
2529 |
|
2530 |
-
|
2531 |
-
};
|
2532 |
-
}
|
2533 |
|
2534 |
-
|
|
|
|
|
2535 |
|
|
|
|
|
2536 |
|
2537 |
-
|
2538 |
-
|
2539 |
-
|
|
|
|
|
|
|
|
|
|
|
2540 |
|
2541 |
-
(
|
|
|
|
|
|
|
2542 |
|
2543 |
-
|
2544 |
-
|
2545 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2546 |
|
2547 |
-
|
|
|
2548 |
|
2549 |
-
|
2550 |
-
|
2551 |
-
|
2552 |
-
&& typeof Symbol.iterator == 'symbol';
|
2553 |
|
|
|
|
|
2554 |
|
2555 |
-
|
2556 |
-
/* 94 */
|
2557 |
-
/***/ (function(module, exports, __webpack_require__) {
|
2558 |
|
2559 |
-
var
|
|
|
|
|
|
|
|
|
|
|
2560 |
|
2561 |
-
|
2562 |
-
module.exports = function (fn, that, length) {
|
2563 |
-
aFunction(fn);
|
2564 |
-
if (that === undefined) return fn;
|
2565 |
-
switch (length) {
|
2566 |
-
case 0: return function () {
|
2567 |
-
return fn.call(that);
|
2568 |
-
};
|
2569 |
-
case 1: return function (a) {
|
2570 |
-
return fn.call(that, a);
|
2571 |
-
};
|
2572 |
-
case 2: return function (a, b) {
|
2573 |
-
return fn.call(that, a, b);
|
2574 |
-
};
|
2575 |
-
case 3: return function (a, b, c) {
|
2576 |
-
return fn.call(that, a, b, c);
|
2577 |
-
};
|
2578 |
-
}
|
2579 |
-
return function (/* ...args */) {
|
2580 |
-
return fn.apply(that, arguments);
|
2581 |
-
};
|
2582 |
};
|
2583 |
|
2584 |
|
2585 |
/***/ }),
|
2586 |
-
|
|
|
2587 |
/***/ (function(module, exports) {
|
2588 |
|
2589 |
-
(function() { module.exports =
|
2590 |
|
2591 |
/***/ }),
|
2592 |
-
/* 96 */
|
2593 |
-
/***/ (function(module, exports) {
|
2594 |
|
2595 |
-
|
|
|
2596 |
|
2597 |
-
|
2598 |
-
g = (function() {
|
2599 |
-
return this;
|
2600 |
-
})();
|
2601 |
|
2602 |
-
|
2603 |
-
|
2604 |
-
|
2605 |
-
|
2606 |
-
// This works if the window reference is available
|
2607 |
-
if (typeof window === "object") g = window;
|
2608 |
-
}
|
2609 |
|
2610 |
-
|
2611 |
-
|
2612 |
-
// easier to handle this case. if(!global) { ...}
|
2613 |
|
2614 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2615 |
|
|
|
|
|
2616 |
|
2617 |
-
|
2618 |
-
/* 97 */
|
2619 |
-
/***/ (function(module, exports, __webpack_require__) {
|
2620 |
|
2621 |
-
|
2622 |
|
2623 |
-
|
2624 |
-
|
2625 |
|
2626 |
-
|
2627 |
-
|
2628 |
-
|
2629 |
-
|
2630 |
-
|
2631 |
-
|
2632 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2633 |
|
|
|
|
|
2634 |
|
2635 |
/***/ }),
|
2636 |
-
/* 98 */
|
2637 |
-
/***/ (function(module, exports, __webpack_require__) {
|
2638 |
-
|
2639 |
-
var getBuiltIn = __webpack_require__(31);
|
2640 |
|
2641 |
-
|
|
|
2642 |
|
|
|
2643 |
|
2644 |
/***/ }),
|
2645 |
-
|
2646 |
-
|
2647 |
/***/ (function(module, exports, __webpack_require__) {
|
2648 |
|
2649 |
-
|
2650 |
-
|
2651 |
-
|
|
|
|
|
|
|
|
|
2652 |
|
2653 |
-
// `Object.prototype.toString` method
|
2654 |
-
// https://tc39.es/ecma262/#sec-object.prototype.tostring
|
2655 |
-
if (!TO_STRING_TAG_SUPPORT) {
|
2656 |
-
redefine(Object.prototype, 'toString', toString, { unsafe: true });
|
2657 |
-
}
|
2658 |
|
2659 |
|
2660 |
-
|
2661 |
-
/* 101 */
|
2662 |
-
/***/ (function(module, exports) {
|
2663 |
|
2664 |
-
|
|
|
|
|
2665 |
|
2666 |
-
|
2667 |
-
|
2668 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2669 |
|
2670 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2671 |
|
2672 |
-
|
2673 |
-
var definePropertyModule = __webpack_require__(17);
|
2674 |
-
var createPropertyDescriptor = __webpack_require__(39);
|
2675 |
|
2676 |
-
|
2677 |
-
var propertyKey = toPrimitive(key);
|
2678 |
-
if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
|
2679 |
-
else object[propertyKey] = value;
|
2680 |
};
|
2681 |
|
2682 |
|
2683 |
/***/ }),
|
2684 |
-
|
|
|
2685 |
/***/ (function(module, exports, __webpack_require__) {
|
2686 |
|
2687 |
-
|
2688 |
-
|
2689 |
-
|
2690 |
-
|
|
|
|
|
|
|
|
|
2691 |
|
2692 |
-
|
2693 |
-
|
2694 |
-
|
2695 |
-
|
2696 |
-
for (var i = 0; i < keys.length; i++) {
|
2697 |
-
var key = keys[i];
|
2698 |
-
if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
2699 |
-
}
|
2700 |
-
};
|
2701 |
|
2702 |
|
2703 |
/***/ }),
|
2704 |
-
/* 104 */
|
2705 |
-
/***/ (function(module, exports, __webpack_require__) {
|
2706 |
|
2707 |
-
|
2708 |
-
|
2709 |
-
var anObject = __webpack_require__(9);
|
2710 |
-
var objectKeys = __webpack_require__(54);
|
2711 |
-
|
2712 |
-
// `Object.defineProperties` method
|
2713 |
-
// https://tc39.es/ecma262/#sec-object.defineproperties
|
2714 |
-
module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {
|
2715 |
-
anObject(O);
|
2716 |
-
var keys = objectKeys(Properties);
|
2717 |
-
var length = keys.length;
|
2718 |
-
var index = 0;
|
2719 |
-
var key;
|
2720 |
-
while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);
|
2721 |
-
return O;
|
2722 |
-
};
|
2723 |
|
|
|
2724 |
|
2725 |
/***/ }),
|
2726 |
-
|
2727 |
-
/***/
|
|
|
2728 |
|
2729 |
"use strict";
|
2730 |
-
|
2731 |
-
|
2732 |
-
|
2733 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return NavigationMenu; });
|
2734 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return NavigationItem; });
|
2735 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return Text; });
|
2736 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return useSlot; });
|
2737 |
-
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
|
2738 |
-
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__);
|
2739 |
-
/**
|
2740 |
-
* External dependencies
|
2741 |
-
*/
|
2742 |
|
2743 |
/**
|
2744 |
-
*
|
|
|
|
|
|
|
|
|
|
|
2745 |
*/
|
|
|
|
|
2746 |
|
2747 |
-
|
2748 |
-
|
2749 |
-
|
2750 |
-
var NavigationMenu = _wordpress_components__WEBPACK_IMPORTED_MODULE_0__["NavigationMenu"] || _wordpress_components__WEBPACK_IMPORTED_MODULE_0__["__experimentalNavigationMenu"];
|
2751 |
-
var NavigationItem = _wordpress_components__WEBPACK_IMPORTED_MODULE_0__["NavigationItem"] || _wordpress_components__WEBPACK_IMPORTED_MODULE_0__["__experimentalNavigationItem"];
|
2752 |
-
var Text = _wordpress_components__WEBPACK_IMPORTED_MODULE_0__["Text"] || _wordpress_components__WEBPACK_IMPORTED_MODULE_0__["__experimentalText"];
|
2753 |
-
var useSlot = _wordpress_components__WEBPACK_IMPORTED_MODULE_0__["useSlot"] || _wordpress_components__WEBPACK_IMPORTED_MODULE_0__["__experimentalUseSlot"];
|
2754 |
|
2755 |
-
|
2756 |
-
|
2757 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2758 |
|
2759 |
-
|
2760 |
-
|
2761 |
|
2762 |
-
|
|
|
2763 |
|
2764 |
-
module.exports =
|
2765 |
|
2766 |
|
2767 |
/***/ }),
|
2768 |
-
|
|
|
2769 |
/***/ (function(module, exports, __webpack_require__) {
|
2770 |
|
2771 |
"use strict";
|
2772 |
|
2773 |
-
var $ = __webpack_require__(12);
|
2774 |
-
var $includes = __webpack_require__(83).includes;
|
2775 |
-
var addToUnscopables = __webpack_require__(118);
|
2776 |
|
2777 |
-
|
2778 |
-
|
2779 |
-
|
2780 |
-
|
2781 |
-
|
2782 |
-
|
2783 |
-
}
|
|
|
|
|
|
|
2784 |
|
2785 |
-
|
2786 |
-
|
|
|
2787 |
|
|
|
|
|
|
|
2788 |
|
2789 |
-
|
2790 |
-
|
2791 |
-
|
2792 |
-
|
2793 |
-
|
2794 |
-
"@babel/helpers - typeof";
|
2795 |
-
|
2796 |
-
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
2797 |
-
module.exports = _typeof = function _typeof(obj) {
|
2798 |
-
return typeof obj;
|
2799 |
-
};
|
2800 |
-
} else {
|
2801 |
-
module.exports = _typeof = function _typeof(obj) {
|
2802 |
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
2803 |
-
};
|
2804 |
-
}
|
2805 |
|
2806 |
-
|
2807 |
}
|
2808 |
|
2809 |
-
module.exports =
|
|
|
2810 |
|
2811 |
/***/ }),
|
2812 |
-
|
|
|
2813 |
/***/ (function(module, exports, __webpack_require__) {
|
2814 |
|
2815 |
-
|
2816 |
-
|
2817 |
-
|
2818 |
-
|
2819 |
-
|
2820 |
-
|
2821 |
-
|
2822 |
-
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
2823 |
-
module.exports = function (originalArray, length) {
|
2824 |
-
var C;
|
2825 |
-
if (isArray(originalArray)) {
|
2826 |
-
C = originalArray.constructor;
|
2827 |
-
// cross-realm fallback
|
2828 |
-
if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
|
2829 |
-
else if (isObject(C)) {
|
2830 |
-
C = C[SPECIES];
|
2831 |
-
if (C === null) C = undefined;
|
2832 |
-
}
|
2833 |
-
} return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
|
2834 |
-
};
|
2835 |
|
2836 |
|
2837 |
-
/***/ }),
|
2838 |
-
/* 110 */
|
2839 |
-
/***/ (function(module, exports) {
|
2840 |
|
2841 |
-
|
2842 |
|
|
|
|
|
|
|
2843 |
|
2844 |
-
|
2845 |
-
|
2846 |
-
|
2847 |
|
2848 |
-
|
|
|
2849 |
|
2850 |
-
|
2851 |
-
__webpack_require__(88);
|
2852 |
-
var redefine = __webpack_require__(27);
|
2853 |
-
var fails = __webpack_require__(6);
|
2854 |
-
var wellKnownSymbol = __webpack_require__(8);
|
2855 |
-
var regexpExec = __webpack_require__(91);
|
2856 |
-
var createNonEnumerableProperty = __webpack_require__(19);
|
2857 |
-
|
2858 |
-
var SPECIES = wellKnownSymbol('species');
|
2859 |
-
|
2860 |
-
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
|
2861 |
-
// #replace needs built-in support for named groups.
|
2862 |
-
// #match works fine because it just return the exec results, even if it has
|
2863 |
-
// a "grops" property.
|
2864 |
-
var re = /./;
|
2865 |
-
re.exec = function () {
|
2866 |
-
var result = [];
|
2867 |
-
result.groups = { a: '7' };
|
2868 |
-
return result;
|
2869 |
-
};
|
2870 |
-
return ''.replace(re, '$<a>') !== '7';
|
2871 |
-
});
|
2872 |
|
2873 |
-
|
2874 |
-
//
|
2875 |
-
var REPLACE_KEEPS_$0 = (function () {
|
2876 |
-
return 'a'.replace(/./, '$0') === '$0';
|
2877 |
-
})();
|
2878 |
|
2879 |
-
|
2880 |
-
|
2881 |
-
|
2882 |
-
|
2883 |
-
|
|
|
|
|
2884 |
}
|
2885 |
-
|
2886 |
-
})();
|
2887 |
-
|
2888 |
-
// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
|
2889 |
-
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
|
2890 |
-
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
|
2891 |
-
// eslint-disable-next-line regexp/no-empty-group -- required for testing
|
2892 |
-
var re = /(?:)/;
|
2893 |
-
var originalExec = re.exec;
|
2894 |
-
re.exec = function () { return originalExec.apply(this, arguments); };
|
2895 |
-
var result = 'ab'.split(re);
|
2896 |
-
return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
|
2897 |
-
});
|
2898 |
-
|
2899 |
-
module.exports = function (KEY, length, exec, sham) {
|
2900 |
-
var SYMBOL = wellKnownSymbol(KEY);
|
2901 |
|
2902 |
-
|
2903 |
-
|
2904 |
-
|
2905 |
-
|
2906 |
-
|
|
|
|
|
|
|
2907 |
});
|
2908 |
|
2909 |
-
|
2910 |
-
|
2911 |
-
var execCalled = false;
|
2912 |
-
var re = /a/;
|
2913 |
|
2914 |
-
|
2915 |
-
|
2916 |
-
|
2917 |
-
|
2918 |
-
|
2919 |
-
|
2920 |
-
|
2921 |
-
|
2922 |
-
|
2923 |
-
|
2924 |
-
re[SYMBOL] = /./[SYMBOL];
|
2925 |
-
}
|
2926 |
|
2927 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2928 |
|
2929 |
-
|
2930 |
-
|
2931 |
-
|
|
|
2932 |
|
2933 |
if (
|
2934 |
-
|
2935 |
-
|
2936 |
-
|
2937 |
-
|
2938 |
-
|
2939 |
-
|
2940 |
-
)) ||
|
2941 |
-
(KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
|
2942 |
) {
|
2943 |
-
|
2944 |
-
|
2945 |
-
|
2946 |
-
|
2947 |
-
|
2948 |
-
|
2949 |
-
// We avoid it by directly calling the native @@method method.
|
2950 |
-
return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
|
2951 |
-
}
|
2952 |
-
return { done: true, value: nativeMethod.call(str, regexp, arg2) };
|
2953 |
-
}
|
2954 |
-
return { done: false };
|
2955 |
-
}, {
|
2956 |
-
REPLACE_KEEPS_$0: REPLACE_KEEPS_$0,
|
2957 |
-
REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
|
2958 |
-
});
|
2959 |
-
var stringMethod = methods[0];
|
2960 |
-
var regexMethod = methods[1];
|
2961 |
-
|
2962 |
-
redefine(String.prototype, KEY, stringMethod);
|
2963 |
-
redefine(RegExp.prototype, SYMBOL, length == 2
|
2964 |
-
// 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
|
2965 |
-
// 21.2.5.11 RegExp.prototype[@@split](string, limit)
|
2966 |
-
? function (string, arg) { return regexMethod.call(string, this, arg); }
|
2967 |
-
// 21.2.5.6 RegExp.prototype[@@match](string)
|
2968 |
-
// 21.2.5.9 RegExp.prototype[@@search](string)
|
2969 |
-
: function (string) { return regexMethod.call(string, this); }
|
2970 |
);
|
|
|
2971 |
}
|
2972 |
|
2973 |
-
|
2974 |
-
|
2975 |
-
|
|
|
2976 |
|
2977 |
-
|
2978 |
-
|
2979 |
-
|
2980 |
-
|
2981 |
-
|
2982 |
-
|
2983 |
-
|
2984 |
-
|
2985 |
-
|
2986 |
-
|
2987 |
-
var exec = R.exec;
|
2988 |
-
if (typeof exec === 'function') {
|
2989 |
-
var result = exec.call(R, S);
|
2990 |
-
if (typeof result !== 'object') {
|
2991 |
-
throw TypeError('RegExp exec method returned something other than an Object or null');
|
2992 |
}
|
2993 |
-
|
2994 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2995 |
|
2996 |
-
|
2997 |
-
|
|
|
2998 |
}
|
2999 |
|
3000 |
-
return
|
3001 |
-
}
|
3002 |
-
|
3003 |
-
|
3004 |
|
3005 |
-
|
3006 |
-
|
3007 |
-
|
|
|
3008 |
|
3009 |
-
|
3010 |
-
|
3011 |
-
|
|
|
|
|
|
|
|
|
3012 |
|
3013 |
-
var
|
3014 |
-
|
3015 |
-
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
3016 |
|
3017 |
-
|
3018 |
-
var
|
3019 |
-
|
3020 |
-
|
3021 |
-
|
|
|
|
|
|
|
|
|
3022 |
};
|
3023 |
|
3024 |
-
|
3025 |
-
|
3026 |
-
|
3027 |
-
|
3028 |
-
|
3029 |
-
|
3030 |
-
|
3031 |
-
|
3032 |
-
|
3033 |
-
|
|
|
3034 |
};
|
3035 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3036 |
|
3037 |
-
|
3038 |
-
|
3039 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3040 |
|
3041 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3042 |
|
3043 |
-
|
3044 |
-
|
3045 |
-
|
3046 |
-
|
3047 |
-
|
3048 |
-
var
|
3049 |
-
|
3050 |
-
|
3051 |
-
|
3052 |
-
|
3053 |
-
|
3054 |
-
|
3055 |
-
|
3056 |
-
|
3057 |
-
};
|
3058 |
|
|
|
3059 |
|
3060 |
-
|
3061 |
-
/* 115 */,
|
3062 |
-
/* 116 */
|
3063 |
-
/***/ (function(module, exports, __webpack_require__) {
|
3064 |
|
3065 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3066 |
|
3067 |
-
|
3068 |
-
|
3069 |
-
|
3070 |
-
|
|
|
3071 |
|
3072 |
-
|
3073 |
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
3074 |
|
3075 |
-
|
3076 |
-
|
3077 |
-
|
3078 |
-
|
3079 |
-
|
3080 |
-
|
|
|
|
|
3081 |
}
|
3082 |
|
3083 |
-
return
|
3084 |
}
|
3085 |
|
3086 |
-
module.exports =
|
|
|
3087 |
|
3088 |
/***/ }),
|
3089 |
-
|
3090 |
-
/***/
|
|
|
3091 |
|
3092 |
"use strict";
|
3093 |
-
|
3094 |
-
|
3095 |
-
|
3096 |
-
|
3097 |
-
|
|
|
|
|
3098 |
|
3099 |
-
for (var key in source) {
|
3100 |
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
3101 |
-
target[key] = source[key];
|
3102 |
-
}
|
3103 |
-
}
|
3104 |
-
}
|
3105 |
|
3106 |
-
return target;
|
3107 |
-
};
|
3108 |
|
3109 |
-
|
3110 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3111 |
|
3112 |
-
|
3113 |
-
/* 118 */
|
3114 |
-
/***/ (function(module, exports, __webpack_require__) {
|
3115 |
|
3116 |
-
|
3117 |
-
var create = __webpack_require__(69);
|
3118 |
-
var definePropertyModule = __webpack_require__(17);
|
3119 |
|
3120 |
-
|
3121 |
-
|
3122 |
|
3123 |
-
|
3124 |
-
|
3125 |
-
if (
|
3126 |
-
|
3127 |
-
|
3128 |
-
|
3129 |
-
|
3130 |
-
|
|
|
|
|
|
|
|
|
3131 |
|
3132 |
-
//
|
3133 |
-
|
3134 |
-
|
3135 |
-
}
|
3136 |
|
|
|
3137 |
|
3138 |
/***/ }),
|
3139 |
-
|
|
|
3140 |
/***/ (function(module, exports, __webpack_require__) {
|
3141 |
|
3142 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3143 |
|
3144 |
-
exports.f = wellKnownSymbol;
|
3145 |
|
3146 |
|
3147 |
-
|
3148 |
-
/* 120 */,
|
3149 |
-
/* 121 */
|
3150 |
-
/***/ (function(module, exports, __webpack_require__) {
|
3151 |
|
3152 |
-
|
|
|
|
|
|
|
|
|
|
|
3153 |
|
3154 |
-
var
|
3155 |
|
3156 |
-
|
3157 |
-
var method = [][METHOD_NAME];
|
3158 |
-
return !!method && fails(function () {
|
3159 |
-
// eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing
|
3160 |
-
method.call(null, argument || function () { throw 1; }, 1);
|
3161 |
-
});
|
3162 |
-
};
|
3163 |
|
|
|
3164 |
|
3165 |
/***/ }),
|
3166 |
-
|
|
|
3167 |
/***/ (function(module, exports, __webpack_require__) {
|
3168 |
|
3169 |
"use strict";
|
3170 |
|
3171 |
-
var charAt = __webpack_require__(125).charAt;
|
3172 |
|
3173 |
-
|
3174 |
-
//
|
3175 |
-
|
3176 |
-
|
3177 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3178 |
|
|
|
|
|
|
|
|
|
|
|
3179 |
|
3180 |
/***/ }),
|
3181 |
-
|
|
|
3182 |
/***/ (function(module, exports, __webpack_require__) {
|
3183 |
|
3184 |
"use strict";
|
3185 |
|
3186 |
-
|
3187 |
-
|
3188 |
-
|
3189 |
-
|
3190 |
-
|
3191 |
-
|
3192 |
-
|
3193 |
-
|
3194 |
-
|
3195 |
-
|
3196 |
-
|
3197 |
-
|
3198 |
-
|
3199 |
-
|
3200 |
-
|
3201 |
-
// https://tc39.es/ecma262/#sec-array.prototype.values
|
3202 |
-
// `Array.prototype[@@iterator]` method
|
3203 |
-
// https://tc39.es/ecma262/#sec-array.prototype-@@iterator
|
3204 |
-
// `CreateArrayIterator` internal method
|
3205 |
-
// https://tc39.es/ecma262/#sec-createarrayiterator
|
3206 |
-
module.exports = defineIterator(Array, 'Array', function (iterated, kind) {
|
3207 |
-
setInternalState(this, {
|
3208 |
-
type: ARRAY_ITERATOR,
|
3209 |
-
target: toIndexedObject(iterated), // target
|
3210 |
-
index: 0, // next index
|
3211 |
-
kind: kind // kind
|
3212 |
});
|
3213 |
-
|
3214 |
-
|
3215 |
-
|
3216 |
-
var state = getInternalState(this);
|
3217 |
-
var target = state.target;
|
3218 |
-
var kind = state.kind;
|
3219 |
-
var index = state.index++;
|
3220 |
-
if (!target || index >= target.length) {
|
3221 |
-
state.target = undefined;
|
3222 |
-
return { value: undefined, done: true };
|
3223 |
-
}
|
3224 |
-
if (kind == 'keys') return { value: index, done: false };
|
3225 |
-
if (kind == 'values') return { value: target[index], done: false };
|
3226 |
-
return { value: [index, target[index]], done: false };
|
3227 |
-
}, 'values');
|
3228 |
|
3229 |
-
|
3230 |
-
|
3231 |
-
|
3232 |
-
|
3233 |
|
3234 |
-
|
3235 |
-
|
3236 |
-
|
3237 |
-
|
|
|
|
|
|
|
3238 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3239 |
|
3240 |
-
|
3241 |
-
|
3242 |
-
/***/ (function(module, exports) {
|
3243 |
|
3244 |
-
|
3245 |
-
|
|
|
|
|
3246 |
|
3247 |
-
|
3248 |
-
arr2[i] = arr[i];
|
3249 |
}
|
3250 |
|
3251 |
-
|
3252 |
-
|
3253 |
-
|
3254 |
-
|
3255 |
-
|
3256 |
-
|
3257 |
-
|
3258 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3259 |
|
3260 |
-
|
3261 |
-
|
3262 |
-
|
3263 |
-
|
3264 |
-
var createMethod = function (CONVERT_TO_STRING) {
|
3265 |
-
return function ($this, pos) {
|
3266 |
-
var S = String(requireObjectCoercible($this));
|
3267 |
-
var position = toInteger(pos);
|
3268 |
-
var size = S.length;
|
3269 |
-
var first, second;
|
3270 |
-
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
|
3271 |
-
first = S.charCodeAt(position);
|
3272 |
-
return first < 0xD800 || first > 0xDBFF || position + 1 === size
|
3273 |
-
|| (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
|
3274 |
-
? CONVERT_TO_STRING ? S.charAt(position) : first
|
3275 |
-
: CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
|
3276 |
-
};
|
3277 |
-
};
|
3278 |
|
3279 |
-
|
3280 |
-
// `String.prototype.codePointAt` method
|
3281 |
-
// https://tc39.es/ecma262/#sec-string.prototype.codepointat
|
3282 |
-
codeAt: createMethod(false),
|
3283 |
-
// `String.prototype.at` method
|
3284 |
-
// https://github.com/mathiasbynens/String.prototype.at
|
3285 |
-
charAt: createMethod(true)
|
3286 |
-
};
|
3287 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3288 |
|
3289 |
-
|
3290 |
-
|
3291 |
-
|
|
|
3292 |
|
3293 |
-
(function() { module.exports = window["wp"]["keycodes"]; }());
|
3294 |
|
3295 |
-
|
3296 |
-
|
3297 |
-
|
|
|
|
|
|
|
3298 |
|
3299 |
-
|
3300 |
-
|
3301 |
-
module.exports = {
|
3302 |
-
CSSRuleList: 0,
|
3303 |
-
CSSStyleDeclaration: 0,
|
3304 |
-
CSSValueList: 0,
|
3305 |
-
ClientRectList: 0,
|
3306 |
-
DOMRectList: 0,
|
3307 |
-
DOMStringList: 0,
|
3308 |
-
DOMTokenList: 1,
|
3309 |
-
DataTransferItemList: 0,
|
3310 |
-
FileList: 0,
|
3311 |
-
HTMLAllCollection: 0,
|
3312 |
-
HTMLCollection: 0,
|
3313 |
-
HTMLFormElement: 0,
|
3314 |
-
HTMLSelectElement: 0,
|
3315 |
-
MediaList: 0,
|
3316 |
-
MimeTypeArray: 0,
|
3317 |
-
NamedNodeMap: 0,
|
3318 |
-
NodeList: 1,
|
3319 |
-
PaintRequestList: 0,
|
3320 |
-
Plugin: 0,
|
3321 |
-
PluginArray: 0,
|
3322 |
-
SVGLengthList: 0,
|
3323 |
-
SVGNumberList: 0,
|
3324 |
-
SVGPathSegList: 0,
|
3325 |
-
SVGPointList: 0,
|
3326 |
-
SVGStringList: 0,
|
3327 |
-
SVGTransformList: 0,
|
3328 |
-
SourceBufferList: 0,
|
3329 |
-
StyleSheetList: 0,
|
3330 |
-
TextTrackCueList: 0,
|
3331 |
-
TextTrackList: 0,
|
3332 |
-
TouchList: 0
|
3333 |
-
};
|
3334 |
|
|
|
|
|
|
|
3335 |
|
3336 |
-
|
3337 |
-
|
3338 |
-
|
3339 |
|
3340 |
-
|
|
|
3341 |
|
3342 |
-
|
3343 |
-
|
|
|
|
|
3344 |
|
3345 |
-
|
3346 |
-
|
3347 |
-
|
3348 |
-
|
3349 |
-
|
3350 |
-
|
|
|
|
|
3351 |
|
3352 |
-
|
3353 |
-
|
3354 |
-
|
3355 |
|
3356 |
-
|
3357 |
-
|
3358 |
-
|
3359 |
-
_setPrototypeOf(subClass, superClass);
|
3360 |
-
}
|
3361 |
|
3362 |
-
|
3363 |
-
|
3364 |
-
/***/ (function(module, exports, __webpack_require__) {
|
3365 |
|
3366 |
-
|
3367 |
-
|
3368 |
-
|
3369 |
-
var FunctionPrototype = Function.prototype;
|
3370 |
-
var FunctionPrototypeToString = FunctionPrototype.toString;
|
3371 |
-
var nameRE = /^\s*function ([^ (]*)/;
|
3372 |
-
var NAME = 'name';
|
3373 |
-
|
3374 |
-
// Function instances `.name` property
|
3375 |
-
// https://tc39.es/ecma262/#sec-function-instances-name
|
3376 |
-
if (DESCRIPTORS && !(NAME in FunctionPrototype)) {
|
3377 |
-
defineProperty(FunctionPrototype, NAME, {
|
3378 |
-
configurable: true,
|
3379 |
-
get: function () {
|
3380 |
-
try {
|
3381 |
-
return FunctionPrototypeToString.call(this).match(nameRE)[1];
|
3382 |
-
} catch (error) {
|
3383 |
-
return '';
|
3384 |
-
}
|
3385 |
}
|
3386 |
-
});
|
3387 |
-
}
|
3388 |
|
|
|
|
|
3389 |
|
3390 |
-
|
3391 |
-
|
3392 |
-
|
3393 |
-
|
3394 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3395 |
|
3396 |
-
|
3397 |
-
|
|
|
|
|
|
|
3398 |
|
3399 |
-
|
3400 |
-
// https://tc39.es/ecma262/#sec-object.prototype.tostring
|
3401 |
-
module.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {
|
3402 |
-
return '[object ' + classof(this) + ']';
|
3403 |
-
};
|
3404 |
|
|
|
|
|
|
|
|
|
|
|
|
|
3405 |
|
3406 |
-
|
3407 |
-
|
3408 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3409 |
|
3410 |
-
var arrayLikeToArray = __webpack_require__(124);
|
3411 |
|
3412 |
-
function
|
3413 |
-
|
3414 |
-
|
3415 |
-
|
3416 |
-
|
3417 |
-
|
3418 |
-
|
3419 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
3420 |
|
3421 |
-
module.exports = _unsupportedIterableToArray;
|
3422 |
|
3423 |
-
|
3424 |
-
|
3425 |
-
|
|
|
3426 |
|
3427 |
-
|
|
|
3428 |
|
3429 |
-
|
3430 |
-
|
3431 |
-
|
|
|
|
|
3432 |
|
3433 |
-
|
3434 |
-
|
3435 |
-
|
3436 |
-
|
3437 |
-
|
3438 |
-
var sourceKeys = Object.keys(source);
|
3439 |
-
var key, i;
|
3440 |
|
3441 |
-
|
3442 |
-
key = sourceKeys[i];
|
3443 |
-
if (excluded.indexOf(key) >= 0) continue;
|
3444 |
-
target[key] = source[key];
|
3445 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3446 |
|
3447 |
-
return target;
|
3448 |
-
}
|
3449 |
-
|
3450 |
-
/***/ }),
|
3451 |
-
/* 134 */
|
3452 |
-
/***/ (function(module, exports) {
|
3453 |
-
|
3454 |
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
3455 |
-
try {
|
3456 |
-
var info = gen[key](arg);
|
3457 |
-
var value = info.value;
|
3458 |
-
} catch (error) {
|
3459 |
-
reject(error);
|
3460 |
-
return;
|
3461 |
-
}
|
3462 |
|
3463 |
-
|
3464 |
-
|
3465 |
-
} else {
|
3466 |
-
Promise.resolve(value).then(_next, _throw);
|
3467 |
}
|
3468 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
3469 |
|
3470 |
-
function _asyncToGenerator(fn) {
|
3471 |
-
return function () {
|
3472 |
-
var self = this,
|
3473 |
-
args = arguments;
|
3474 |
-
return new Promise(function (resolve, reject) {
|
3475 |
-
var gen = fn.apply(self, args);
|
3476 |
|
3477 |
-
|
3478 |
-
|
3479 |
-
|
|
|
3480 |
|
3481 |
-
|
3482 |
-
|
3483 |
-
}
|
3484 |
|
3485 |
-
|
3486 |
-
|
3487 |
-
};
|
3488 |
}
|
3489 |
|
3490 |
-
module.exports =
|
3491 |
|
3492 |
/***/ }),
|
3493 |
-
/* 135 */
|
3494 |
-
/***/ (function(module, exports, __webpack_require__) {
|
3495 |
|
3496 |
-
|
|
|
|
|
|
|
|
|
|
|
3497 |
|
3498 |
-
var
|
3499 |
-
var
|
3500 |
-
var
|
3501 |
-
var
|
3502 |
-
var
|
3503 |
-
var
|
3504 |
-
var getSubstitution = __webpack_require__(168);
|
3505 |
-
var regExpExec = __webpack_require__(112);
|
3506 |
|
3507 |
-
|
3508 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3509 |
|
3510 |
-
|
3511 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3512 |
};
|
3513 |
|
3514 |
-
|
3515 |
-
|
3516 |
-
|
3517 |
-
|
3518 |
-
|
3519 |
-
|
3520 |
-
|
3521 |
-
|
3522 |
-
|
3523 |
-
|
3524 |
-
|
3525 |
-
|
3526 |
-
|
3527 |
-
|
3528 |
-
|
3529 |
-
|
3530 |
-
|
3531 |
-
|
3532 |
-
|
3533 |
-
|
3534 |
-
|
3535 |
-
|
3536 |
-
|
3537 |
-
|
3538 |
-
|
3539 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3540 |
|
3541 |
-
|
3542 |
-
|
|
|
|
|
|
|
|
|
|
|
3543 |
|
3544 |
-
|
3545 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3546 |
|
3547 |
-
|
3548 |
-
|
3549 |
-
|
3550 |
-
|
3551 |
-
|
3552 |
-
|
3553 |
-
|
3554 |
-
var result = regExpExec(rx, S);
|
3555 |
-
if (result === null) break;
|
3556 |
|
3557 |
-
|
3558 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3559 |
|
3560 |
-
|
3561 |
-
|
3562 |
-
|
3563 |
|
3564 |
-
|
3565 |
-
|
3566 |
-
|
3567 |
-
|
3568 |
-
|
3569 |
-
var matched = String(result[0]);
|
3570 |
-
var position = max(min(toInteger(result.index), S.length), 0);
|
3571 |
-
var captures = [];
|
3572 |
-
// NOTE: This is equivalent to
|
3573 |
-
// captures = result.slice(1).map(maybeToString)
|
3574 |
-
// but for some reason `nativeSlice.call(result, 1, result.length)` (called in
|
3575 |
-
// the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
|
3576 |
-
// causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
|
3577 |
-
for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
|
3578 |
-
var namedCaptures = result.groups;
|
3579 |
-
if (functionalReplace) {
|
3580 |
-
var replacerArgs = [matched].concat(captures, position, S);
|
3581 |
-
if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
|
3582 |
-
var replacement = String(replaceValue.apply(undefined, replacerArgs));
|
3583 |
-
} else {
|
3584 |
-
replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
|
3585 |
-
}
|
3586 |
-
if (position >= nextSourcePosition) {
|
3587 |
-
accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
|
3588 |
-
nextSourcePosition = position + matched.length;
|
3589 |
-
}
|
3590 |
-
}
|
3591 |
-
return accumulatedResult + S.slice(nextSourcePosition);
|
3592 |
-
}
|
3593 |
-
];
|
3594 |
-
});
|
3595 |
|
3596 |
|
3597 |
/***/ }),
|
3598 |
-
|
|
|
3599 |
/***/ (function(module, exports) {
|
3600 |
|
3601 |
-
|
3602 |
-
if (
|
3603 |
-
|
3604 |
-
|
3605 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
3606 |
|
|
|
|
|
3607 |
|
3608 |
-
|
3609 |
-
/* 137 */
|
3610 |
-
/***/ (function(module, exports, __webpack_require__) {
|
3611 |
|
3612 |
-
|
3613 |
|
|
|
|
|
3614 |
|
3615 |
-
|
|
|
|
|
3616 |
|
3617 |
-
|
3618 |
-
|
3619 |
-
|
3620 |
-
|
3621 |
-
}
|
3622 |
|
3623 |
-
|
3624 |
-
|
3625 |
-
var re = RE('a', 'y');
|
3626 |
-
re.lastIndex = 2;
|
3627 |
-
return re.exec('abcd') != null;
|
3628 |
-
});
|
3629 |
|
3630 |
-
|
3631 |
-
|
3632 |
-
|
3633 |
-
|
3634 |
-
|
3635 |
-
}
|
|
|
3636 |
|
|
|
|
|
3637 |
|
3638 |
/***/ }),
|
3639 |
-
|
3640 |
-
|
3641 |
-
/***/ (function(module,
|
3642 |
|
3643 |
"use strict";
|
3644 |
|
3645 |
-
|
3646 |
-
|
3647 |
-
|
3648 |
-
|
3649 |
|
3650 |
-
|
|
|
3651 |
|
3652 |
-
|
3653 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3654 |
|
3655 |
-
|
3656 |
-
|
3657 |
-
$({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, {
|
3658 |
-
join: function join(separator) {
|
3659 |
-
return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
|
3660 |
}
|
3661 |
-
});
|
3662 |
|
|
|
|
|
3663 |
|
3664 |
-
|
3665 |
-
|
3666 |
-
|
|
|
|
|
|
|
|
|
|
|
3667 |
|
3668 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3669 |
|
3670 |
-
var
|
3671 |
-
|
3672 |
-
|
3673 |
-
|
|
|
|
|
|
|
|
|
|
|
3674 |
|
3675 |
-
|
3676 |
-
|
3677 |
-
$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
|
3678 |
-
includes: function includes(searchString /* , position = 0 */) {
|
3679 |
-
return !!~String(requireObjectCoercible(this))
|
3680 |
-
.indexOf(notARegExp(searchString), arguments.length > 1 ? arguments[1] : undefined);
|
3681 |
}
|
3682 |
-
});
|
3683 |
|
|
|
|
|
|
|
3684 |
|
3685 |
-
|
3686 |
-
|
3687 |
-
|
|
|
|
|
|
|
3688 |
|
3689 |
-
|
|
|
|
|
3690 |
|
3691 |
-
/***/ }),
|
3692 |
-
/* 142 */
|
3693 |
-
/***/ (function(module, exports, __webpack_require__) {
|
3694 |
|
3695 |
-
"use strict";
|
3696 |
|
3697 |
-
var redefine = __webpack_require__(27);
|
3698 |
-
var anObject = __webpack_require__(9);
|
3699 |
-
var fails = __webpack_require__(6);
|
3700 |
-
var flags = __webpack_require__(114);
|
3701 |
|
3702 |
-
|
3703 |
-
|
3704 |
-
|
3705 |
|
3706 |
-
var
|
3707 |
-
|
3708 |
-
var
|
3709 |
|
3710 |
-
|
3711 |
-
|
3712 |
-
|
3713 |
-
redefine(RegExp.prototype, TO_STRING, function toString() {
|
3714 |
-
var R = anObject(this);
|
3715 |
-
var p = String(R.source);
|
3716 |
-
var rf = R.flags;
|
3717 |
-
var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? flags.call(R) : rf);
|
3718 |
-
return '/' + p + '/' + f;
|
3719 |
-
}, { unsafe: true });
|
3720 |
-
}
|
3721 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3722 |
|
3723 |
-
|
3724 |
-
|
3725 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3726 |
|
3727 |
-
|
3728 |
-
|
3729 |
-
|
3730 |
-
|
3731 |
-
|
3732 |
-
|
3733 |
-
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
3734 |
-
module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
3735 |
-
var CORRECT_SETTER = false;
|
3736 |
-
var test = {};
|
3737 |
-
var setter;
|
3738 |
-
try {
|
3739 |
-
setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
|
3740 |
-
setter.call(test, []);
|
3741 |
-
CORRECT_SETTER = test instanceof Array;
|
3742 |
-
} catch (error) { /* empty */ }
|
3743 |
-
return function setPrototypeOf(O, proto) {
|
3744 |
-
anObject(O);
|
3745 |
-
aPossiblePrototype(proto);
|
3746 |
-
if (CORRECT_SETTER) setter.call(O, proto);
|
3747 |
-
else O.__proto__ = proto;
|
3748 |
-
return O;
|
3749 |
-
};
|
3750 |
-
}() : undefined);
|
3751 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3752 |
|
3753 |
/***/ }),
|
3754 |
-
/* 144 */
|
3755 |
-
/***/ (function(module, exports, __webpack_require__) {
|
3756 |
-
|
3757 |
-
var isObject = __webpack_require__(10);
|
3758 |
-
var classof = __webpack_require__(30);
|
3759 |
-
var wellKnownSymbol = __webpack_require__(8);
|
3760 |
-
|
3761 |
-
var MATCH = wellKnownSymbol('match');
|
3762 |
|
3763 |
-
|
3764 |
-
|
3765 |
-
module.exports = function (it) {
|
3766 |
-
var isRegExp;
|
3767 |
-
return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');
|
3768 |
-
};
|
3769 |
|
|
|
3770 |
|
3771 |
-
|
3772 |
-
/*
|
3773 |
-
/***/ (function(module, exports) {
|
3774 |
|
3775 |
-
|
|
|
3776 |
|
3777 |
-
|
3778 |
-
/* 146 */
|
3779 |
-
/***/ (function(module, exports, __webpack_require__) {
|
3780 |
|
3781 |
-
|
3782 |
-
|
3783 |
-
|
3784 |
-
|
3785 |
-
|
3786 |
-
|
3787 |
-
|
3788 |
-
|
3789 |
-
var
|
3790 |
-
|
3791 |
-
|
3792 |
-
|
3793 |
-
|
3794 |
-
if (CollectionPrototype) {
|
3795 |
-
// some Chrome versions have non-configurable methods on DOMTokenList
|
3796 |
-
if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
|
3797 |
-
createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
|
3798 |
-
} catch (error) {
|
3799 |
-
CollectionPrototype[ITERATOR] = ArrayValues;
|
3800 |
-
}
|
3801 |
-
if (!CollectionPrototype[TO_STRING_TAG]) {
|
3802 |
-
createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
|
3803 |
-
}
|
3804 |
-
if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
|
3805 |
-
// some Chrome versions have non-configurable methods on DOMTokenList
|
3806 |
-
if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
|
3807 |
-
createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
|
3808 |
-
} catch (error) {
|
3809 |
-
CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
|
3810 |
-
}
|
3811 |
-
}
|
3812 |
-
}
|
3813 |
}
|
|
|
|
|
|
|
3814 |
|
3815 |
|
|
|
|
|
|
|
|
|
3816 |
/***/ }),
|
3817 |
-
/* 147 */
|
3818 |
-
/***/ (function(module, exports, __webpack_require__) {
|
3819 |
|
3820 |
-
|
3821 |
-
|
3822 |
|
3823 |
-
|
3824 |
|
3825 |
-
|
3826 |
-
|
|
|
|
|
3827 |
|
3828 |
-
|
3829 |
-
try {
|
3830 |
-
return nativeGetOwnPropertyNames(it);
|
3831 |
-
} catch (error) {
|
3832 |
-
return windowNames.slice();
|
3833 |
-
}
|
3834 |
-
};
|
3835 |
|
3836 |
-
//
|
3837 |
-
|
3838 |
-
|
3839 |
-
? getWindowNames(it)
|
3840 |
-
: nativeGetOwnPropertyNames(toIndexedObject(it));
|
3841 |
-
};
|
3842 |
|
|
|
|
|
3843 |
|
3844 |
-
|
3845 |
-
|
3846 |
-
/***/ (function(module, exports, __webpack_require__) {
|
3847 |
|
3848 |
-
|
3849 |
-
var
|
3850 |
-
var
|
3851 |
-
var defineProperty = __webpack_require__(17).f;
|
3852 |
|
3853 |
-
|
3854 |
-
|
3855 |
-
if (!has(Symbol, NAME)) defineProperty(Symbol, NAME, {
|
3856 |
-
value: wrappedWellKnownSymbolModule.f(NAME)
|
3857 |
-
});
|
3858 |
-
};
|
3859 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3860 |
|
3861 |
-
|
3862 |
-
|
3863 |
-
|
|
|
3864 |
|
3865 |
-
|
|
|
|
|
3866 |
|
3867 |
-
|
3868 |
-
|
|
|
3869 |
|
3870 |
-
var
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3871 |
|
3872 |
-
|
3873 |
-
|
3874 |
-
|
3875 |
-
|
3876 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3877 |
|
3878 |
|
3879 |
-
|
3880 |
-
|
3881 |
-
|
|
|
|
|
|
|
|
|
|
|
3882 |
|
3883 |
-
|
3884 |
-
|
3885 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3886 |
|
3887 |
-
var SPECIES = wellKnownSymbol('species');
|
3888 |
|
3889 |
-
|
3890 |
-
|
3891 |
-
|
3892 |
-
var C = anObject(O).constructor;
|
3893 |
-
var S;
|
3894 |
-
return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aFunction(S);
|
3895 |
-
};
|
3896 |
|
|
|
|
|
|
|
3897 |
|
3898 |
-
|
3899 |
-
|
3900 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
3901 |
|
3902 |
-
|
|
|
3903 |
|
3904 |
-
|
3905 |
-
|
3906 |
-
|
3907 |
-
|
3908 |
-
|
3909 |
-
|
3910 |
-
|
3911 |
-
|
3912 |
-
|
3913 |
-
|
3914 |
-
|
3915 |
-
|
3916 |
-
|
3917 |
-
|
3918 |
-
|
|
|
|
|
|
|
|
|
3919 |
});
|
3920 |
-
|
3921 |
-
|
3922 |
-
|
3923 |
-
|
3924 |
-
var string = state.string;
|
3925 |
-
var index = state.index;
|
3926 |
-
var point;
|
3927 |
-
if (index >= string.length) return { value: undefined, done: true };
|
3928 |
-
point = charAt(string, index);
|
3929 |
-
state.index += point.length;
|
3930 |
-
return { value: point, done: false };
|
3931 |
-
});
|
3932 |
|
|
|
3933 |
|
3934 |
-
/***/ }),
|
3935 |
-
/* 152 */
|
3936 |
-
/***/ (function(module, exports, __webpack_require__) {
|
3937 |
|
3938 |
-
var redefine = __webpack_require__(27);
|
3939 |
|
3940 |
-
|
3941 |
-
|
3942 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3943 |
};
|
|
|
|
|
|
|
|
|
|
|
3944 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3945 |
|
3946 |
-
|
3947 |
-
|
3948 |
-
|
|
|
|
|
|
|
3949 |
|
3950 |
-
|
|
|
|
|
3951 |
|
3952 |
-
|
3953 |
-
|
3954 |
-
|
3955 |
-
|
3956 |
|
3957 |
-
var
|
|
|
|
|
|
|
3958 |
|
3959 |
-
|
3960 |
-
|
3961 |
-
var defineProperty = definePropertyModule.f;
|
3962 |
|
3963 |
-
|
3964 |
-
|
3965 |
-
|
3966 |
-
|
3967 |
-
|
|
|
|
|
|
|
|
|
3968 |
}
|
3969 |
-
};
|
3970 |
|
|
|
|
|
3971 |
|
3972 |
-
|
3973 |
-
|
3974 |
-
/***/ (function(module, exports, __webpack_require__) {
|
3975 |
|
3976 |
-
|
3977 |
-
|
3978 |
-
var
|
3979 |
-
|
3980 |
-
var getIteratorMethod = __webpack_require__(155);
|
3981 |
-
var iteratorClose = __webpack_require__(172);
|
3982 |
|
3983 |
-
|
3984 |
-
|
3985 |
-
|
3986 |
-
};
|
3987 |
|
3988 |
-
|
3989 |
-
|
3990 |
-
|
3991 |
-
var IS_ITERATOR = !!(options && options.IS_ITERATOR);
|
3992 |
-
var INTERRUPTED = !!(options && options.INTERRUPTED);
|
3993 |
-
var fn = bind(unboundFunction, that, 1 + AS_ENTRIES + INTERRUPTED);
|
3994 |
-
var iterator, iterFn, index, length, result, next, step;
|
3995 |
-
|
3996 |
-
var stop = function (condition) {
|
3997 |
-
if (iterator) iteratorClose(iterator);
|
3998 |
-
return new Result(true, condition);
|
3999 |
-
};
|
4000 |
|
4001 |
-
|
4002 |
-
|
4003 |
-
|
4004 |
-
return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
|
4005 |
-
} return INTERRUPTED ? fn(value, stop) : fn(value);
|
4006 |
-
};
|
4007 |
|
4008 |
-
|
4009 |
-
|
4010 |
-
|
4011 |
-
iterFn = getIteratorMethod(iterable);
|
4012 |
-
if (typeof iterFn != 'function') throw TypeError('Target is not iterable');
|
4013 |
-
// optimisation for array iterators
|
4014 |
-
if (isArrayIteratorMethod(iterFn)) {
|
4015 |
-
for (index = 0, length = toLength(iterable.length); length > index; index++) {
|
4016 |
-
result = callFn(iterable[index]);
|
4017 |
-
if (result && result instanceof Result) return result;
|
4018 |
-
} return new Result(false);
|
4019 |
-
}
|
4020 |
-
iterator = iterFn.call(iterable);
|
4021 |
}
|
|
|
4022 |
|
4023 |
-
|
4024 |
-
|
4025 |
-
|
4026 |
-
|
4027 |
-
} catch (error) {
|
4028 |
-
iteratorClose(iterator);
|
4029 |
-
throw error;
|
4030 |
-
}
|
4031 |
-
if (typeof result == 'object' && result && result instanceof Result) return result;
|
4032 |
-
} return new Result(false);
|
4033 |
-
};
|
4034 |
|
|
|
|
|
|
|
|
|
4035 |
|
4036 |
-
|
4037 |
-
|
4038 |
-
|
|
|
|
|
4039 |
|
4040 |
-
var
|
4041 |
-
var
|
4042 |
-
var
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4043 |
|
4044 |
-
|
|
|
|
|
|
|
|
|
|
|
4045 |
|
4046 |
-
|
4047 |
-
|
4048 |
-
|
4049 |
-
|
4050 |
-
|
|
|
|
|
4051 |
|
4052 |
|
4053 |
-
|
4054 |
-
|
4055 |
-
|
|
|
|
|
4056 |
|
4057 |
-
|
4058 |
-
var
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4059 |
|
4060 |
-
|
4061 |
-
|
4062 |
-
|
4063 |
-
if (
|
4064 |
-
// it can work only with native `setPrototypeOf`
|
4065 |
-
setPrototypeOf &&
|
4066 |
-
// we haven't completely correct pre-ES6 way for getting `new.target`, so use this
|
4067 |
-
typeof (NewTarget = dummy.constructor) == 'function' &&
|
4068 |
-
NewTarget !== Wrapper &&
|
4069 |
-
isObject(NewTargetPrototype = NewTarget.prototype) &&
|
4070 |
-
NewTargetPrototype !== Wrapper.prototype
|
4071 |
-
) setPrototypeOf($this, NewTargetPrototype);
|
4072 |
-
return $this;
|
4073 |
-
};
|
4074 |
|
|
|
|
|
|
|
4075 |
|
4076 |
-
|
4077 |
-
|
4078 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4079 |
|
4080 |
-
|
4081 |
-
|
4082 |
-
var bind = __webpack_require__(94);
|
4083 |
-
var html = __webpack_require__(98);
|
4084 |
-
var createElement = __webpack_require__(67);
|
4085 |
-
var IS_IOS = __webpack_require__(158);
|
4086 |
-
var IS_NODE = __webpack_require__(77);
|
4087 |
-
|
4088 |
-
var location = global.location;
|
4089 |
-
var set = global.setImmediate;
|
4090 |
-
var clear = global.clearImmediate;
|
4091 |
-
var process = global.process;
|
4092 |
-
var MessageChannel = global.MessageChannel;
|
4093 |
-
var Dispatch = global.Dispatch;
|
4094 |
-
var counter = 0;
|
4095 |
-
var queue = {};
|
4096 |
-
var ONREADYSTATECHANGE = 'onreadystatechange';
|
4097 |
-
var defer, channel, port;
|
4098 |
-
|
4099 |
-
var run = function (id) {
|
4100 |
-
// eslint-disable-next-line no-prototype-builtins -- safe
|
4101 |
-
if (queue.hasOwnProperty(id)) {
|
4102 |
-
var fn = queue[id];
|
4103 |
-
delete queue[id];
|
4104 |
-
fn();
|
4105 |
}
|
4106 |
-
};
|
4107 |
|
4108 |
-
|
4109 |
-
|
4110 |
-
|
4111 |
-
};
|
4112 |
-
};
|
4113 |
|
4114 |
-
|
4115 |
-
|
4116 |
-
}
|
4117 |
|
4118 |
-
|
4119 |
-
|
4120 |
-
|
4121 |
-
};
|
4122 |
|
4123 |
-
|
4124 |
-
|
4125 |
-
set = function setImmediate(fn) {
|
4126 |
-
var args = [];
|
4127 |
-
var i = 1;
|
4128 |
-
while (arguments.length > i) args.push(arguments[i++]);
|
4129 |
-
queue[++counter] = function () {
|
4130 |
-
// eslint-disable-next-line no-new-func -- spec requirement
|
4131 |
-
(typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args);
|
4132 |
-
};
|
4133 |
-
defer(counter);
|
4134 |
-
return counter;
|
4135 |
-
};
|
4136 |
-
clear = function clearImmediate(id) {
|
4137 |
-
delete queue[id];
|
4138 |
-
};
|
4139 |
-
// Node.js 0.8-
|
4140 |
-
if (IS_NODE) {
|
4141 |
-
defer = function (id) {
|
4142 |
-
process.nextTick(runner(id));
|
4143 |
-
};
|
4144 |
-
// Sphere (JS game engine) Dispatch API
|
4145 |
-
} else if (Dispatch && Dispatch.now) {
|
4146 |
-
defer = function (id) {
|
4147 |
-
Dispatch.now(runner(id));
|
4148 |
-
};
|
4149 |
-
// Browsers with MessageChannel, includes WebWorkers
|
4150 |
-
// except iOS - https://github.com/zloirock/core-js/issues/624
|
4151 |
-
} else if (MessageChannel && !IS_IOS) {
|
4152 |
-
channel = new MessageChannel();
|
4153 |
-
port = channel.port2;
|
4154 |
-
channel.port1.onmessage = listener;
|
4155 |
-
defer = bind(port.postMessage, port, 1);
|
4156 |
-
// Browsers with postMessage, skip WebWorkers
|
4157 |
-
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
|
4158 |
-
} else if (
|
4159 |
-
global.addEventListener &&
|
4160 |
-
typeof postMessage == 'function' &&
|
4161 |
-
!global.importScripts &&
|
4162 |
-
location && location.protocol !== 'file:' &&
|
4163 |
-
!fails(post)
|
4164 |
-
) {
|
4165 |
-
defer = post;
|
4166 |
-
global.addEventListener('message', listener, false);
|
4167 |
-
// IE8-
|
4168 |
-
} else if (ONREADYSTATECHANGE in createElement('script')) {
|
4169 |
-
defer = function (id) {
|
4170 |
-
html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
|
4171 |
-
html.removeChild(this);
|
4172 |
-
run(id);
|
4173 |
-
};
|
4174 |
-
};
|
4175 |
-
// Rest old browsers
|
4176 |
-
} else {
|
4177 |
-
defer = function (id) {
|
4178 |
-
setTimeout(runner(id), 0);
|
4179 |
-
};
|
4180 |
}
|
|
|
|
|
|
|
4181 |
}
|
|
|
4182 |
|
4183 |
-
module.exports = {
|
4184 |
-
set: set,
|
4185 |
-
clear: clear
|
4186 |
-
};
|
4187 |
|
4188 |
|
4189 |
-
|
4190 |
-
|
4191 |
-
|
|
|
|
|
4192 |
|
4193 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4194 |
|
4195 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4196 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4197 |
|
4198 |
-
/***/ }),
|
4199 |
-
/* 159 */
|
4200 |
-
/***/ (function(module, exports, __webpack_require__) {
|
4201 |
|
4202 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4203 |
|
4204 |
-
var aFunction = __webpack_require__(70);
|
4205 |
|
4206 |
-
var PromiseCapability = function (C) {
|
4207 |
-
var resolve, reject;
|
4208 |
-
this.promise = new C(function ($$resolve, $$reject) {
|
4209 |
-
if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
|
4210 |
-
resolve = $$resolve;
|
4211 |
-
reject = $$reject;
|
4212 |
-
});
|
4213 |
-
this.resolve = aFunction(resolve);
|
4214 |
-
this.reject = aFunction(reject);
|
4215 |
-
};
|
4216 |
|
4217 |
-
|
4218 |
-
|
4219 |
-
|
4220 |
};
|
|
|
|
|
|
|
|
|
|
|
4221 |
|
|
|
|
|
|
|
|
|
|
|
|
|
4222 |
|
4223 |
-
|
4224 |
-
|
4225 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4226 |
|
4227 |
-
|
|
|
4228 |
|
4229 |
-
|
4230 |
-
|
4231 |
-
|
4232 |
-
|
4233 |
-
|
|
|
|
|
|
|
4234 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4235 |
|
4236 |
-
/***/ }),
|
4237 |
-
/* 161 */,
|
4238 |
-
/* 162 */
|
4239 |
-
/***/ (function(module, exports, __webpack_require__) {
|
4240 |
|
4241 |
-
"use strict";
|
4242 |
|
4243 |
|
4244 |
-
var stringify = __webpack_require__(227);
|
4245 |
-
var parse = __webpack_require__(228);
|
4246 |
-
var formats = __webpack_require__(169);
|
4247 |
|
4248 |
-
module.exports = {
|
4249 |
-
formats: formats,
|
4250 |
-
parse: parse,
|
4251 |
-
stringify: stringify
|
4252 |
-
};
|
4253 |
|
4254 |
|
4255 |
-
/***/ }),
|
4256 |
-
/* 163 */
|
4257 |
-
/***/ (function(module, exports) {
|
4258 |
|
4259 |
-
|
4260 |
|
4261 |
-
|
4262 |
-
|
4263 |
-
|
4264 |
|
4265 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4266 |
|
4267 |
-
|
4268 |
-
|
4269 |
-
|
4270 |
-
|
4271 |
-
|
4272 |
-
|
4273 |
-
var redefineAll = __webpack_require__(152);
|
4274 |
-
var setToStringTag = __webpack_require__(90);
|
4275 |
-
var setSpecies = __webpack_require__(153);
|
4276 |
-
var isObject = __webpack_require__(10);
|
4277 |
-
var aFunction = __webpack_require__(70);
|
4278 |
-
var anInstance = __webpack_require__(136);
|
4279 |
-
var inspectSource = __webpack_require__(68);
|
4280 |
-
var iterate = __webpack_require__(154);
|
4281 |
-
var checkCorrectnessOfIteration = __webpack_require__(165);
|
4282 |
-
var speciesConstructor = __webpack_require__(150);
|
4283 |
-
var task = __webpack_require__(157).set;
|
4284 |
-
var microtask = __webpack_require__(194);
|
4285 |
-
var promiseResolve = __webpack_require__(196);
|
4286 |
-
var hostReportErrors = __webpack_require__(197);
|
4287 |
-
var newPromiseCapabilityModule = __webpack_require__(159);
|
4288 |
-
var perform = __webpack_require__(198);
|
4289 |
-
var InternalStateModule = __webpack_require__(45);
|
4290 |
-
var isForced = __webpack_require__(74);
|
4291 |
-
var wellKnownSymbol = __webpack_require__(8);
|
4292 |
-
var IS_NODE = __webpack_require__(77);
|
4293 |
-
var V8_VERSION = __webpack_require__(63);
|
4294 |
-
|
4295 |
-
var SPECIES = wellKnownSymbol('species');
|
4296 |
-
var PROMISE = 'Promise';
|
4297 |
-
var getInternalState = InternalStateModule.get;
|
4298 |
-
var setInternalState = InternalStateModule.set;
|
4299 |
-
var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
|
4300 |
-
var PromiseConstructor = NativePromise;
|
4301 |
-
var TypeError = global.TypeError;
|
4302 |
-
var document = global.document;
|
4303 |
-
var process = global.process;
|
4304 |
-
var $fetch = getBuiltIn('fetch');
|
4305 |
-
var newPromiseCapability = newPromiseCapabilityModule.f;
|
4306 |
-
var newGenericPromiseCapability = newPromiseCapability;
|
4307 |
-
var DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);
|
4308 |
-
var NATIVE_REJECTION_EVENT = typeof PromiseRejectionEvent == 'function';
|
4309 |
-
var UNHANDLED_REJECTION = 'unhandledrejection';
|
4310 |
-
var REJECTION_HANDLED = 'rejectionhandled';
|
4311 |
-
var PENDING = 0;
|
4312 |
-
var FULFILLED = 1;
|
4313 |
-
var REJECTED = 2;
|
4314 |
-
var HANDLED = 1;
|
4315 |
-
var UNHANDLED = 2;
|
4316 |
-
var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
|
4317 |
-
|
4318 |
-
var FORCED = isForced(PROMISE, function () {
|
4319 |
-
var GLOBAL_CORE_JS_PROMISE = inspectSource(PromiseConstructor) !== String(PromiseConstructor);
|
4320 |
-
if (!GLOBAL_CORE_JS_PROMISE) {
|
4321 |
-
// V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
|
4322 |
-
// https://bugs.chromium.org/p/chromium/issues/detail?id=830565
|
4323 |
-
// We can't detect it synchronously, so just check versions
|
4324 |
-
if (V8_VERSION === 66) return true;
|
4325 |
-
// Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
|
4326 |
-
if (!IS_NODE && !NATIVE_REJECTION_EVENT) return true;
|
4327 |
-
}
|
4328 |
-
// We need Promise#finally in the pure version for preventing prototype pollution
|
4329 |
-
if (IS_PURE && !PromiseConstructor.prototype['finally']) return true;
|
4330 |
-
// We can't use @@species feature detection in V8 since it causes
|
4331 |
-
// deoptimization and performance degradation
|
4332 |
-
// https://github.com/zloirock/core-js/issues/679
|
4333 |
-
if (V8_VERSION >= 51 && /native code/.test(PromiseConstructor)) return false;
|
4334 |
-
// Detect correctness of subclassing with @@species support
|
4335 |
-
var promise = PromiseConstructor.resolve(1);
|
4336 |
-
var FakePromise = function (exec) {
|
4337 |
-
exec(function () { /* empty */ }, function () { /* empty */ });
|
4338 |
};
|
4339 |
-
var constructor = promise.constructor = {};
|
4340 |
-
constructor[SPECIES] = FakePromise;
|
4341 |
-
return !(promise.then(function () { /* empty */ }) instanceof FakePromise);
|
4342 |
-
});
|
4343 |
|
4344 |
-
|
4345 |
-
|
4346 |
-
|
|
|
|
|
|
|
4347 |
|
4348 |
-
|
4349 |
-
|
4350 |
-
|
4351 |
-
return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
|
4352 |
-
};
|
4353 |
|
4354 |
-
|
4355 |
-
|
4356 |
-
|
4357 |
-
|
4358 |
-
|
4359 |
-
|
4360 |
-
|
4361 |
-
|
4362 |
-
|
4363 |
-
|
4364 |
-
|
4365 |
-
|
4366 |
-
var resolve = reaction.resolve;
|
4367 |
-
var reject = reaction.reject;
|
4368 |
-
var domain = reaction.domain;
|
4369 |
-
var result, then, exited;
|
4370 |
-
try {
|
4371 |
-
if (handler) {
|
4372 |
-
if (!ok) {
|
4373 |
-
if (state.rejection === UNHANDLED) onHandleUnhandled(state);
|
4374 |
-
state.rejection = HANDLED;
|
4375 |
-
}
|
4376 |
-
if (handler === true) result = value;
|
4377 |
-
else {
|
4378 |
-
if (domain) domain.enter();
|
4379 |
-
result = handler(value); // can throw
|
4380 |
-
if (domain) {
|
4381 |
-
domain.exit();
|
4382 |
-
exited = true;
|
4383 |
-
}
|
4384 |
-
}
|
4385 |
-
if (result === reaction.promise) {
|
4386 |
-
reject(TypeError('Promise-chain cycle'));
|
4387 |
-
} else if (then = isThenable(result)) {
|
4388 |
-
then.call(result, resolve, reject);
|
4389 |
-
} else resolve(result);
|
4390 |
-
} else reject(value);
|
4391 |
-
} catch (error) {
|
4392 |
-
if (domain && !exited) domain.exit();
|
4393 |
-
reject(error);
|
4394 |
-
}
|
4395 |
}
|
4396 |
-
state.reactions = [];
|
4397 |
-
state.notified = false;
|
4398 |
-
if (isReject && !state.rejection) onUnhandled(state);
|
4399 |
-
});
|
4400 |
-
};
|
4401 |
|
4402 |
-
|
4403 |
-
|
4404 |
-
|
4405 |
-
|
4406 |
-
event.promise = promise;
|
4407 |
-
event.reason = reason;
|
4408 |
-
event.initEvent(name, false, true);
|
4409 |
-
global.dispatchEvent(event);
|
4410 |
-
} else event = { promise: promise, reason: reason };
|
4411 |
-
if (!NATIVE_REJECTION_EVENT && (handler = global['on' + name])) handler(event);
|
4412 |
-
else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
|
4413 |
-
};
|
4414 |
|
4415 |
-
|
4416 |
-
|
4417 |
-
var promise = state.facade;
|
4418 |
-
var value = state.value;
|
4419 |
-
var IS_UNHANDLED = isUnhandled(state);
|
4420 |
-
var result;
|
4421 |
-
if (IS_UNHANDLED) {
|
4422 |
-
result = perform(function () {
|
4423 |
-
if (IS_NODE) {
|
4424 |
-
process.emit('unhandledRejection', value, promise);
|
4425 |
-
} else dispatchEvent(UNHANDLED_REJECTION, promise, value);
|
4426 |
});
|
4427 |
-
|
4428 |
-
|
4429 |
-
if (result.error) throw result.value;
|
4430 |
}
|
4431 |
-
}
|
4432 |
-
};
|
4433 |
|
4434 |
-
|
4435 |
-
|
4436 |
-
|
4437 |
|
4438 |
-
|
4439 |
-
|
4440 |
-
var promise = state.facade;
|
4441 |
-
if (IS_NODE) {
|
4442 |
-
process.emit('rejectionHandled', promise);
|
4443 |
-
} else dispatchEvent(REJECTION_HANDLED, promise, state.value);
|
4444 |
-
});
|
4445 |
-
};
|
4446 |
|
4447 |
-
|
4448 |
-
|
4449 |
-
|
4450 |
};
|
4451 |
-
};
|
4452 |
|
4453 |
-
|
4454 |
-
|
4455 |
-
|
4456 |
-
if (unwrap) state = unwrap;
|
4457 |
-
state.value = value;
|
4458 |
-
state.state = REJECTED;
|
4459 |
-
notify(state, true);
|
4460 |
-
};
|
4461 |
|
4462 |
-
|
4463 |
-
if (state.done) return;
|
4464 |
-
state.done = true;
|
4465 |
-
if (unwrap) state = unwrap;
|
4466 |
-
try {
|
4467 |
-
if (state.facade === value) throw TypeError("Promise can't be resolved itself");
|
4468 |
-
var then = isThenable(value);
|
4469 |
-
if (then) {
|
4470 |
-
microtask(function () {
|
4471 |
-
var wrapper = { done: false };
|
4472 |
-
try {
|
4473 |
-
then.call(value,
|
4474 |
-
bind(internalResolve, wrapper, state),
|
4475 |
-
bind(internalReject, wrapper, state)
|
4476 |
-
);
|
4477 |
-
} catch (error) {
|
4478 |
-
internalReject(wrapper, error, state);
|
4479 |
-
}
|
4480 |
-
});
|
4481 |
-
} else {
|
4482 |
-
state.value = value;
|
4483 |
-
state.state = FULFILLED;
|
4484 |
-
notify(state, false);
|
4485 |
}
|
4486 |
-
} catch (error) {
|
4487 |
-
internalReject({ done: false }, error, state);
|
4488 |
-
}
|
4489 |
-
};
|
4490 |
|
4491 |
-
|
4492 |
-
|
4493 |
-
|
4494 |
-
PromiseConstructor = function Promise(executor) {
|
4495 |
-
anInstance(this, PromiseConstructor, PROMISE);
|
4496 |
-
aFunction(executor);
|
4497 |
-
Internal.call(this);
|
4498 |
-
var state = getInternalState(this);
|
4499 |
-
try {
|
4500 |
-
executor(bind(internalResolve, state), bind(internalReject, state));
|
4501 |
-
} catch (error) {
|
4502 |
-
internalReject(state, error);
|
4503 |
-
}
|
4504 |
};
|
4505 |
-
|
4506 |
-
|
4507 |
-
|
4508 |
-
|
4509 |
-
|
4510 |
-
notified: false,
|
4511 |
-
parent: false,
|
4512 |
-
reactions: [],
|
4513 |
-
rejection: false,
|
4514 |
-
state: PENDING,
|
4515 |
-
value: undefined
|
4516 |
-
});
|
4517 |
};
|
4518 |
-
|
4519 |
-
|
4520 |
-
|
4521 |
-
|
4522 |
-
|
4523 |
-
|
4524 |
-
|
4525 |
-
|
4526 |
-
reaction.domain = IS_NODE ? process.domain : undefined;
|
4527 |
-
state.parent = true;
|
4528 |
-
state.reactions.push(reaction);
|
4529 |
-
if (state.state != PENDING) notify(state, false);
|
4530 |
-
return reaction.promise;
|
4531 |
-
},
|
4532 |
-
// `Promise.prototype.catch` method
|
4533 |
-
// https://tc39.es/ecma262/#sec-promise.prototype.catch
|
4534 |
-
'catch': function (onRejected) {
|
4535 |
-
return this.then(undefined, onRejected);
|
4536 |
-
}
|
4537 |
-
});
|
4538 |
-
OwnPromiseCapability = function () {
|
4539 |
-
var promise = new Internal();
|
4540 |
-
var state = getInternalState(promise);
|
4541 |
-
this.promise = promise;
|
4542 |
-
this.resolve = bind(internalResolve, state);
|
4543 |
-
this.reject = bind(internalReject, state);
|
4544 |
};
|
4545 |
-
|
4546 |
-
|
4547 |
-
|
4548 |
-
: newGenericPromiseCapability(C);
|
4549 |
};
|
4550 |
|
4551 |
-
|
4552 |
-
|
4553 |
-
|
4554 |
-
// wrap native Promise#then for native async functions
|
4555 |
-
redefine(NativePromise.prototype, 'then', function then(onFulfilled, onRejected) {
|
4556 |
-
var that = this;
|
4557 |
-
return new PromiseConstructor(function (resolve, reject) {
|
4558 |
-
nativeThen.call(that, resolve, reject);
|
4559 |
-
}).then(onFulfilled, onRejected);
|
4560 |
-
// https://github.com/zloirock/core-js/issues/640
|
4561 |
-
}, { unsafe: true });
|
4562 |
-
|
4563 |
-
// wrap fetch result
|
4564 |
-
if (typeof $fetch == 'function') $({ global: true, enumerable: true, forced: true }, {
|
4565 |
-
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
4566 |
-
fetch: function fetch(input /* , init */) {
|
4567 |
-
return promiseResolve(PromiseConstructor, $fetch.apply(global, arguments));
|
4568 |
-
}
|
4569 |
-
});
|
4570 |
-
}
|
4571 |
-
}
|
4572 |
|
4573 |
-
|
4574 |
-
|
4575 |
-
|
|
|
4576 |
|
4577 |
-
|
4578 |
-
setSpecies(PROMISE);
|
4579 |
|
4580 |
-
|
|
|
4581 |
|
4582 |
-
|
4583 |
-
|
4584 |
-
|
4585 |
-
|
4586 |
-
reject: function reject(r) {
|
4587 |
-
var capability = newPromiseCapability(this);
|
4588 |
-
capability.reject.call(undefined, r);
|
4589 |
-
return capability.promise;
|
4590 |
-
}
|
4591 |
-
});
|
4592 |
|
4593 |
-
|
4594 |
-
// `Promise.resolve` method
|
4595 |
-
// https://tc39.es/ecma262/#sec-promise.resolve
|
4596 |
-
resolve: function resolve(x) {
|
4597 |
-
return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x);
|
4598 |
-
}
|
4599 |
-
});
|
4600 |
|
4601 |
-
|
4602 |
-
|
4603 |
-
// https://tc39.es/ecma262/#sec-promise.all
|
4604 |
-
all: function all(iterable) {
|
4605 |
-
var C = this;
|
4606 |
-
var capability = newPromiseCapability(C);
|
4607 |
-
var resolve = capability.resolve;
|
4608 |
-
var reject = capability.reject;
|
4609 |
-
var result = perform(function () {
|
4610 |
-
var $promiseResolve = aFunction(C.resolve);
|
4611 |
-
var values = [];
|
4612 |
-
var counter = 0;
|
4613 |
-
var remaining = 1;
|
4614 |
-
iterate(iterable, function (promise) {
|
4615 |
-
var index = counter++;
|
4616 |
-
var alreadyCalled = false;
|
4617 |
-
values.push(undefined);
|
4618 |
-
remaining++;
|
4619 |
-
$promiseResolve.call(C, promise).then(function (value) {
|
4620 |
-
if (alreadyCalled) return;
|
4621 |
-
alreadyCalled = true;
|
4622 |
-
values[index] = value;
|
4623 |
-
--remaining || resolve(values);
|
4624 |
-
}, reject);
|
4625 |
-
});
|
4626 |
-
--remaining || resolve(values);
|
4627 |
-
});
|
4628 |
-
if (result.error) reject(result.value);
|
4629 |
-
return capability.promise;
|
4630 |
-
},
|
4631 |
-
// `Promise.race` method
|
4632 |
-
// https://tc39.es/ecma262/#sec-promise.race
|
4633 |
-
race: function race(iterable) {
|
4634 |
-
var C = this;
|
4635 |
-
var capability = newPromiseCapability(C);
|
4636 |
-
var reject = capability.reject;
|
4637 |
-
var result = perform(function () {
|
4638 |
-
var $promiseResolve = aFunction(C.resolve);
|
4639 |
-
iterate(iterable, function (promise) {
|
4640 |
-
$promiseResolve.call(C, promise).then(capability.resolve, reject);
|
4641 |
-
});
|
4642 |
-
});
|
4643 |
-
if (result.error) reject(result.value);
|
4644 |
-
return capability.promise;
|
4645 |
-
}
|
4646 |
-
});
|
4647 |
|
|
|
|
|
|
|
|
|
4648 |
|
4649 |
-
|
4650 |
-
|
4651 |
-
/***/ (function(module, exports, __webpack_require__) {
|
4652 |
|
4653 |
-
var
|
4654 |
|
4655 |
-
|
4656 |
-
var SAFE_CLOSING = false;
|
4657 |
|
4658 |
-
|
4659 |
-
|
4660 |
-
|
4661 |
-
next: function () {
|
4662 |
-
return { done: !!called++ };
|
4663 |
-
},
|
4664 |
-
'return': function () {
|
4665 |
-
SAFE_CLOSING = true;
|
4666 |
}
|
4667 |
};
|
4668 |
-
iteratorWithReturn[ITERATOR] = function () {
|
4669 |
-
return this;
|
4670 |
-
};
|
4671 |
-
// eslint-disable-next-line no-throw-literal -- required for testing
|
4672 |
-
Array.from(iteratorWithReturn, function () { throw 2; });
|
4673 |
-
} catch (error) { /* empty */ }
|
4674 |
-
|
4675 |
-
module.exports = function (exec, SKIP_CLOSING) {
|
4676 |
-
if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
|
4677 |
-
var ITERATION_SUPPORT = false;
|
4678 |
-
try {
|
4679 |
-
var object = {};
|
4680 |
-
object[ITERATOR] = function () {
|
4681 |
-
return {
|
4682 |
-
next: function () {
|
4683 |
-
return { done: ITERATION_SUPPORT = true };
|
4684 |
-
}
|
4685 |
-
};
|
4686 |
-
};
|
4687 |
-
exec(object);
|
4688 |
-
} catch (error) { /* empty */ }
|
4689 |
-
return ITERATION_SUPPORT;
|
4690 |
-
};
|
4691 |
|
|
|
|
|
|
|
|
|
4692 |
|
4693 |
-
|
4694 |
-
|
4695 |
-
|
4696 |
|
4697 |
-
"
|
|
|
4698 |
|
4699 |
-
|
4700 |
-
|
4701 |
-
var getPrototypeOf = __webpack_require__(174);
|
4702 |
-
var setPrototypeOf = __webpack_require__(143);
|
4703 |
-
var setToStringTag = __webpack_require__(90);
|
4704 |
-
var createNonEnumerableProperty = __webpack_require__(19);
|
4705 |
-
var redefine = __webpack_require__(27);
|
4706 |
-
var wellKnownSymbol = __webpack_require__(8);
|
4707 |
-
var IS_PURE = __webpack_require__(57);
|
4708 |
-
var Iterators = __webpack_require__(110);
|
4709 |
-
var IteratorsCore = __webpack_require__(173);
|
4710 |
-
|
4711 |
-
var IteratorPrototype = IteratorsCore.IteratorPrototype;
|
4712 |
-
var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
|
4713 |
-
var ITERATOR = wellKnownSymbol('iterator');
|
4714 |
-
var KEYS = 'keys';
|
4715 |
-
var VALUES = 'values';
|
4716 |
-
var ENTRIES = 'entries';
|
4717 |
-
|
4718 |
-
var returnThis = function () { return this; };
|
4719 |
-
|
4720 |
-
module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
|
4721 |
-
createIteratorConstructor(IteratorConstructor, NAME, next);
|
4722 |
-
|
4723 |
-
var getIterationMethod = function (KIND) {
|
4724 |
-
if (KIND === DEFAULT && defaultIterator) return defaultIterator;
|
4725 |
-
if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
|
4726 |
-
switch (KIND) {
|
4727 |
-
case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
|
4728 |
-
case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
|
4729 |
-
case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
|
4730 |
-
} return function () { return new IteratorConstructor(this); };
|
4731 |
};
|
4732 |
|
4733 |
-
|
4734 |
-
|
4735 |
-
|
4736 |
-
|
4737 |
-
|
4738 |
-
|
4739 |
-
|
4740 |
-
|
4741 |
-
|
4742 |
-
|
4743 |
-
|
4744 |
-
|
4745 |
-
|
4746 |
-
|
4747 |
-
|
4748 |
-
|
4749 |
-
|
4750 |
-
|
4751 |
-
|
4752 |
-
|
4753 |
-
|
4754 |
-
|
4755 |
-
|
4756 |
-
|
4757 |
-
|
4758 |
-
}
|
4759 |
|
4760 |
-
|
4761 |
-
if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
|
4762 |
-
INCORRECT_VALUES_NAME = true;
|
4763 |
-
defaultIterator = function values() { return nativeIterator.call(this); };
|
4764 |
-
}
|
4765 |
|
4766 |
-
|
4767 |
-
|
4768 |
-
|
4769 |
-
|
4770 |
-
Iterators[NAME] = defaultIterator;
|
4771 |
|
4772 |
-
|
4773 |
-
|
4774 |
-
methods = {
|
4775 |
-
values: getIterationMethod(VALUES),
|
4776 |
-
keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
|
4777 |
-
entries: getIterationMethod(ENTRIES)
|
4778 |
-
};
|
4779 |
-
if (FORCED) for (KEY in methods) {
|
4780 |
-
if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
|
4781 |
-
redefine(IterablePrototype, KEY, methods[KEY]);
|
4782 |
-
}
|
4783 |
-
} else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
|
4784 |
-
}
|
4785 |
|
4786 |
-
|
4787 |
-
|
|
|
|
|
4788 |
|
|
|
4789 |
|
4790 |
-
|
4791 |
-
|
4792 |
-
|
4793 |
-
/***/ (function(module, exports, __webpack_require__) {
|
4794 |
|
4795 |
-
|
4796 |
-
|
4797 |
-
var floor = Math.floor;
|
4798 |
-
var replace = ''.replace;
|
4799 |
-
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
|
4800 |
-
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
|
4801 |
-
|
4802 |
-
// https://tc39.es/ecma262/#sec-getsubstitution
|
4803 |
-
module.exports = function (matched, str, position, captures, namedCaptures, replacement) {
|
4804 |
-
var tailPos = position + matched.length;
|
4805 |
-
var m = captures.length;
|
4806 |
-
var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
|
4807 |
-
if (namedCaptures !== undefined) {
|
4808 |
-
namedCaptures = toObject(namedCaptures);
|
4809 |
-
symbols = SUBSTITUTION_SYMBOLS;
|
4810 |
-
}
|
4811 |
-
return replace.call(replacement, symbols, function (match, ch) {
|
4812 |
-
var capture;
|
4813 |
-
switch (ch.charAt(0)) {
|
4814 |
-
case '$': return '$';
|
4815 |
-
case '&': return matched;
|
4816 |
-
case '`': return str.slice(0, position);
|
4817 |
-
case "'": return str.slice(tailPos);
|
4818 |
-
case '<':
|
4819 |
-
capture = namedCaptures[ch.slice(1, -1)];
|
4820 |
-
break;
|
4821 |
-
default: // \d\d?
|
4822 |
-
var n = +ch;
|
4823 |
-
if (n === 0) return match;
|
4824 |
-
if (n > m) {
|
4825 |
-
var f = floor(n / 10);
|
4826 |
-
if (f === 0) return match;
|
4827 |
-
if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
|
4828 |
-
return match;
|
4829 |
-
}
|
4830 |
-
capture = captures[n - 1];
|
4831 |
-
}
|
4832 |
-
return capture === undefined ? '' : capture;
|
4833 |
-
});
|
4834 |
-
};
|
4835 |
|
|
|
4836 |
|
4837 |
-
|
4838 |
-
/* 169 */
|
4839 |
-
/***/ (function(module, exports, __webpack_require__) {
|
4840 |
|
4841 |
-
|
|
|
4842 |
|
|
|
|
|
|
|
4843 |
|
4844 |
-
|
4845 |
-
var percentTwenties = /%20/g;
|
4846 |
|
4847 |
-
|
4848 |
-
|
4849 |
-
RFC3986: 'RFC3986'
|
4850 |
-
};
|
4851 |
|
4852 |
-
|
4853 |
-
|
4854 |
-
|
4855 |
-
|
4856 |
-
return replace.call(value, percentTwenties, '+');
|
4857 |
-
},
|
4858 |
-
RFC3986: function (value) {
|
4859 |
-
return String(value);
|
4860 |
}
|
4861 |
-
|
4862 |
-
|
4863 |
-
RFC3986: Format.RFC3986
|
4864 |
-
};
|
4865 |
|
|
|
|
|
|
|
|
|
4866 |
|
4867 |
-
|
4868 |
-
|
4869 |
-
|
|
|
4870 |
|
4871 |
-
|
|
|
|
|
|
|
|
|
4872 |
|
4873 |
-
|
4874 |
-
|
4875 |
-
|
4876 |
-
var sameValue = __webpack_require__(214);
|
4877 |
-
var regExpExec = __webpack_require__(112);
|
4878 |
-
|
4879 |
-
// @@search logic
|
4880 |
-
fixRegExpWellKnownSymbolLogic('search', 1, function (SEARCH, nativeSearch, maybeCallNative) {
|
4881 |
-
return [
|
4882 |
-
// `String.prototype.search` method
|
4883 |
-
// https://tc39.es/ecma262/#sec-string.prototype.search
|
4884 |
-
function search(regexp) {
|
4885 |
-
var O = requireObjectCoercible(this);
|
4886 |
-
var searcher = regexp == undefined ? undefined : regexp[SEARCH];
|
4887 |
-
return searcher !== undefined ? searcher.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
|
4888 |
-
},
|
4889 |
-
// `RegExp.prototype[@@search]` method
|
4890 |
-
// https://tc39.es/ecma262/#sec-regexp.prototype-@@search
|
4891 |
-
function (regexp) {
|
4892 |
-
var res = maybeCallNative(nativeSearch, regexp, this);
|
4893 |
-
if (res.done) return res.value;
|
4894 |
-
|
4895 |
-
var rx = anObject(regexp);
|
4896 |
-
var S = String(this);
|
4897 |
-
|
4898 |
-
var previousLastIndex = rx.lastIndex;
|
4899 |
-
if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
|
4900 |
-
var result = regExpExec(rx, S);
|
4901 |
-
if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
|
4902 |
-
return result === null ? -1 : result.index;
|
4903 |
-
}
|
4904 |
-
];
|
4905 |
-
});
|
4906 |
|
|
|
|
|
4907 |
|
4908 |
-
|
4909 |
-
|
4910 |
-
/***/ (function(module, exports, __webpack_require__) {
|
4911 |
|
4912 |
-
|
4913 |
-
|
|
|
|
|
4914 |
|
4915 |
-
|
4916 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4917 |
|
4918 |
-
|
4919 |
-
|
4920 |
-
|
4921 |
-
};
|
4922 |
|
|
|
|
|
|
|
4923 |
|
4924 |
-
|
4925 |
-
|
4926 |
-
/***/ (function(module, exports, __webpack_require__) {
|
4927 |
|
4928 |
-
|
4929 |
|
4930 |
-
|
4931 |
-
|
4932 |
-
if (returnMethod !== undefined) {
|
4933 |
-
return anObject(returnMethod.call(iterator)).value;
|
4934 |
-
}
|
4935 |
-
};
|
4936 |
|
|
|
|
|
|
|
4937 |
|
4938 |
-
|
4939 |
-
|
4940 |
-
/***/ (function(module, exports, __webpack_require__) {
|
4941 |
|
4942 |
-
|
4943 |
|
4944 |
-
|
4945 |
-
|
4946 |
-
var createNonEnumerableProperty = __webpack_require__(19);
|
4947 |
-
var has = __webpack_require__(11);
|
4948 |
-
var wellKnownSymbol = __webpack_require__(8);
|
4949 |
-
var IS_PURE = __webpack_require__(57);
|
4950 |
|
4951 |
-
var
|
4952 |
-
|
|
|
4953 |
|
4954 |
-
var
|
4955 |
|
4956 |
-
|
4957 |
-
|
4958 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4959 |
|
4960 |
-
if ([].keys) {
|
4961 |
-
arrayIterator = [].keys();
|
4962 |
-
// Safari 8 has buggy iterators w/o `next`
|
4963 |
-
if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
|
4964 |
-
else {
|
4965 |
-
PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));
|
4966 |
-
if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
|
4967 |
-
}
|
4968 |
-
}
|
4969 |
|
4970 |
-
var NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () {
|
4971 |
-
var test = {};
|
4972 |
-
// FF44- legacy iterators case
|
4973 |
-
return IteratorPrototype[ITERATOR].call(test) !== test;
|
4974 |
-
});
|
4975 |
|
4976 |
-
|
|
|
|
|
|
|
4977 |
|
4978 |
-
|
4979 |
-
|
4980 |
-
|
|
|
4981 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4982 |
|
4983 |
-
module.exports = {
|
4984 |
-
IteratorPrototype: IteratorPrototype,
|
4985 |
-
BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
|
4986 |
-
};
|
4987 |
|
4988 |
|
4989 |
/***/ }),
|
4990 |
-
|
|
|
4991 |
/***/ (function(module, exports, __webpack_require__) {
|
4992 |
|
4993 |
-
|
4994 |
-
|
4995 |
-
|
4996 |
-
|
4997 |
-
|
4998 |
-
|
4999 |
-
var ObjectPrototype = Object.prototype;
|
5000 |
-
|
5001 |
-
// `Object.getPrototypeOf` method
|
5002 |
-
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
5003 |
-
module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {
|
5004 |
-
O = toObject(O);
|
5005 |
-
if (has(O, IE_PROTO)) return O[IE_PROTO];
|
5006 |
-
if (typeof O.constructor == 'function' && O instanceof O.constructor) {
|
5007 |
-
return O.constructor.prototype;
|
5008 |
-
} return O instanceof Object ? ObjectPrototype : null;
|
5009 |
-
};
|
5010 |
|
5011 |
|
5012 |
/***/ }),
|
5013 |
-
|
5014 |
-
|
5015 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5016 |
|
5017 |
"use strict";
|
5018 |
-
var isProduction = "production" === 'production';
|
5019 |
-
var prefix = 'Invariant failed';
|
5020 |
-
function invariant(condition, message) {
|
5021 |
-
if (condition) {
|
5022 |
-
return;
|
5023 |
-
}
|
5024 |
-
if (isProduction) {
|
5025 |
-
throw new Error(prefix);
|
5026 |
-
}
|
5027 |
-
throw new Error(prefix + ": " + (message || ''));
|
5028 |
-
}
|
5029 |
|
5030 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5031 |
|
|
|
5032 |
|
5033 |
-
|
5034 |
-
|
5035 |
-
/***/ (function(module, exports, __webpack_require__) {
|
5036 |
|
5037 |
-
|
|
|
5038 |
|
5039 |
-
|
5040 |
-
var
|
5041 |
-
var anObject = __webpack_require__(9);
|
5042 |
-
var requireObjectCoercible = __webpack_require__(32);
|
5043 |
-
var speciesConstructor = __webpack_require__(150);
|
5044 |
-
var advanceStringIndex = __webpack_require__(122);
|
5045 |
-
var toLength = __webpack_require__(34);
|
5046 |
-
var callRegExpExec = __webpack_require__(112);
|
5047 |
-
var regexpExec = __webpack_require__(91);
|
5048 |
-
var fails = __webpack_require__(6);
|
5049 |
-
|
5050 |
-
var arrayPush = [].push;
|
5051 |
-
var min = Math.min;
|
5052 |
-
var MAX_UINT32 = 0xFFFFFFFF;
|
5053 |
-
|
5054 |
-
// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError
|
5055 |
-
var SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); });
|
5056 |
-
|
5057 |
-
// @@split logic
|
5058 |
-
fixRegExpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) {
|
5059 |
-
var internalSplit;
|
5060 |
-
if (
|
5061 |
-
'abbc'.split(/(b)*/)[1] == 'c' ||
|
5062 |
-
// eslint-disable-next-line regexp/no-empty-group -- required for testing
|
5063 |
-
'test'.split(/(?:)/, -1).length != 4 ||
|
5064 |
-
'ab'.split(/(?:ab)*/).length != 2 ||
|
5065 |
-
'.'.split(/(.?)(.?)/).length != 4 ||
|
5066 |
-
// eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing
|
5067 |
-
'.'.split(/()()/).length > 1 ||
|
5068 |
-
''.split(/.?/).length
|
5069 |
-
) {
|
5070 |
-
// based on es5-shim implementation, need to rework it
|
5071 |
-
internalSplit = function (separator, limit) {
|
5072 |
-
var string = String(requireObjectCoercible(this));
|
5073 |
-
var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
|
5074 |
-
if (lim === 0) return [];
|
5075 |
-
if (separator === undefined) return [string];
|
5076 |
-
// If `separator` is not a regex, use native split
|
5077 |
-
if (!isRegExp(separator)) {
|
5078 |
-
return nativeSplit.call(string, separator, lim);
|
5079 |
-
}
|
5080 |
-
var output = [];
|
5081 |
-
var flags = (separator.ignoreCase ? 'i' : '') +
|
5082 |
-
(separator.multiline ? 'm' : '') +
|
5083 |
-
(separator.unicode ? 'u' : '') +
|
5084 |
-
(separator.sticky ? 'y' : '');
|
5085 |
-
var lastLastIndex = 0;
|
5086 |
-
// Make `global` and avoid `lastIndex` issues by working with a copy
|
5087 |
-
var separatorCopy = new RegExp(separator.source, flags + 'g');
|
5088 |
-
var match, lastIndex, lastLength;
|
5089 |
-
while (match = regexpExec.call(separatorCopy, string)) {
|
5090 |
-
lastIndex = separatorCopy.lastIndex;
|
5091 |
-
if (lastIndex > lastLastIndex) {
|
5092 |
-
output.push(string.slice(lastLastIndex, match.index));
|
5093 |
-
if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1));
|
5094 |
-
lastLength = match[0].length;
|
5095 |
-
lastLastIndex = lastIndex;
|
5096 |
-
if (output.length >= lim) break;
|
5097 |
-
}
|
5098 |
-
if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
|
5099 |
-
}
|
5100 |
-
if (lastLastIndex === string.length) {
|
5101 |
-
if (lastLength || !separatorCopy.test('')) output.push('');
|
5102 |
-
} else output.push(string.slice(lastLastIndex));
|
5103 |
-
return output.length > lim ? output.slice(0, lim) : output;
|
5104 |
-
};
|
5105 |
-
// Chakra, V8
|
5106 |
-
} else if ('0'.split(undefined, 0).length) {
|
5107 |
-
internalSplit = function (separator, limit) {
|
5108 |
-
return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);
|
5109 |
-
};
|
5110 |
-
} else internalSplit = nativeSplit;
|
5111 |
-
|
5112 |
-
return [
|
5113 |
-
// `String.prototype.split` method
|
5114 |
-
// https://tc39.es/ecma262/#sec-string.prototype.split
|
5115 |
-
function split(separator, limit) {
|
5116 |
-
var O = requireObjectCoercible(this);
|
5117 |
-
var splitter = separator == undefined ? undefined : separator[SPLIT];
|
5118 |
-
return splitter !== undefined
|
5119 |
-
? splitter.call(separator, O, limit)
|
5120 |
-
: internalSplit.call(String(O), separator, limit);
|
5121 |
-
},
|
5122 |
-
// `RegExp.prototype[@@split]` method
|
5123 |
-
// https://tc39.es/ecma262/#sec-regexp.prototype-@@split
|
5124 |
-
//
|
5125 |
-
// NOTE: This cannot be properly polyfilled in engines that don't support
|
5126 |
-
// the 'y' flag.
|
5127 |
-
function (regexp, limit) {
|
5128 |
-
var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit);
|
5129 |
-
if (res.done) return res.value;
|
5130 |
-
|
5131 |
-
var rx = anObject(regexp);
|
5132 |
-
var S = String(this);
|
5133 |
-
var C = speciesConstructor(rx, RegExp);
|
5134 |
-
|
5135 |
-
var unicodeMatching = rx.unicode;
|
5136 |
-
var flags = (rx.ignoreCase ? 'i' : '') +
|
5137 |
-
(rx.multiline ? 'm' : '') +
|
5138 |
-
(rx.unicode ? 'u' : '') +
|
5139 |
-
(SUPPORTS_Y ? 'y' : 'g');
|
5140 |
-
|
5141 |
-
// ^(? + rx + ) is needed, in combination with some S slicing, to
|
5142 |
-
// simulate the 'y' flag.
|
5143 |
-
var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);
|
5144 |
-
var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
|
5145 |
-
if (lim === 0) return [];
|
5146 |
-
if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];
|
5147 |
-
var p = 0;
|
5148 |
-
var q = 0;
|
5149 |
-
var A = [];
|
5150 |
-
while (q < S.length) {
|
5151 |
-
splitter.lastIndex = SUPPORTS_Y ? q : 0;
|
5152 |
-
var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q));
|
5153 |
-
var e;
|
5154 |
-
if (
|
5155 |
-
z === null ||
|
5156 |
-
(e = min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p
|
5157 |
-
) {
|
5158 |
-
q = advanceStringIndex(S, q, unicodeMatching);
|
5159 |
-
} else {
|
5160 |
-
A.push(S.slice(p, q));
|
5161 |
-
if (A.length === lim) return A;
|
5162 |
-
for (var i = 1; i <= z.length - 1; i++) {
|
5163 |
-
A.push(z[i]);
|
5164 |
-
if (A.length === lim) return A;
|
5165 |
-
}
|
5166 |
-
q = p = e;
|
5167 |
-
}
|
5168 |
-
}
|
5169 |
-
A.push(S.slice(p));
|
5170 |
-
return A;
|
5171 |
-
}
|
5172 |
-
];
|
5173 |
-
}, !SUPPORTS_Y);
|
5174 |
|
|
|
|
|
5175 |
|
5176 |
-
|
5177 |
-
|
5178 |
-
|
|
|
5179 |
|
5180 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
5181 |
|
5182 |
-
|
5183 |
-
var
|
5184 |
-
var isForced = __webpack_require__(74);
|
5185 |
-
var redefine = __webpack_require__(27);
|
5186 |
-
var has = __webpack_require__(11);
|
5187 |
-
var classof = __webpack_require__(30);
|
5188 |
-
var inheritIfRequired = __webpack_require__(156);
|
5189 |
-
var toPrimitive = __webpack_require__(40);
|
5190 |
-
var fails = __webpack_require__(6);
|
5191 |
-
var create = __webpack_require__(69);
|
5192 |
-
var getOwnPropertyNames = __webpack_require__(56).f;
|
5193 |
-
var getOwnPropertyDescriptor = __webpack_require__(33).f;
|
5194 |
-
var defineProperty = __webpack_require__(17).f;
|
5195 |
-
var trim = __webpack_require__(188).trim;
|
5196 |
-
|
5197 |
-
var NUMBER = 'Number';
|
5198 |
-
var NativeNumber = global[NUMBER];
|
5199 |
-
var NumberPrototype = NativeNumber.prototype;
|
5200 |
-
|
5201 |
-
// Opera ~12 has broken Object#toString
|
5202 |
-
var BROKEN_CLASSOF = classof(create(NumberPrototype)) == NUMBER;
|
5203 |
-
|
5204 |
-
// `ToNumber` abstract operation
|
5205 |
-
// https://tc39.es/ecma262/#sec-tonumber
|
5206 |
-
var toNumber = function (argument) {
|
5207 |
-
var it = toPrimitive(argument, false);
|
5208 |
-
var first, third, radix, maxCode, digits, length, index, code;
|
5209 |
-
if (typeof it == 'string' && it.length > 2) {
|
5210 |
-
it = trim(it);
|
5211 |
-
first = it.charCodeAt(0);
|
5212 |
-
if (first === 43 || first === 45) {
|
5213 |
-
third = it.charCodeAt(2);
|
5214 |
-
if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
|
5215 |
-
} else if (first === 48) {
|
5216 |
-
switch (it.charCodeAt(1)) {
|
5217 |
-
case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i
|
5218 |
-
case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i
|
5219 |
-
default: return +it;
|
5220 |
-
}
|
5221 |
-
digits = it.slice(2);
|
5222 |
-
length = digits.length;
|
5223 |
-
for (index = 0; index < length; index++) {
|
5224 |
-
code = digits.charCodeAt(index);
|
5225 |
-
// parseInt parses a string to a first unavailable symbol
|
5226 |
-
// but ToNumber should return NaN if a string contains unavailable symbols
|
5227 |
-
if (code < 48 || code > maxCode) return NaN;
|
5228 |
-
} return parseInt(digits, radix);
|
5229 |
-
}
|
5230 |
-
} return +it;
|
5231 |
-
};
|
5232 |
|
5233 |
-
|
5234 |
-
|
5235 |
-
if (isForced(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) {
|
5236 |
-
var NumberWrapper = function Number(value) {
|
5237 |
-
var it = arguments.length < 1 ? 0 : value;
|
5238 |
-
var dummy = this;
|
5239 |
-
return dummy instanceof NumberWrapper
|
5240 |
-
// check on 1..constructor(foo) case
|
5241 |
-
&& (BROKEN_CLASSOF ? fails(function () { NumberPrototype.valueOf.call(dummy); }) : classof(dummy) != NUMBER)
|
5242 |
-
? inheritIfRequired(new NativeNumber(toNumber(it)), dummy, NumberWrapper) : toNumber(it);
|
5243 |
-
};
|
5244 |
-
for (var keys = DESCRIPTORS ? getOwnPropertyNames(NativeNumber) : (
|
5245 |
-
// ES3:
|
5246 |
-
'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
|
5247 |
-
// ES2015 (in case, if modules with ES2015 Number statics required before):
|
5248 |
-
'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
|
5249 |
-
'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,' +
|
5250 |
-
// ESNext
|
5251 |
-
'fromString,range'
|
5252 |
-
).split(','), j = 0, key; keys.length > j; j++) {
|
5253 |
-
if (has(NativeNumber, key = keys[j]) && !has(NumberWrapper, key)) {
|
5254 |
-
defineProperty(NumberWrapper, key, getOwnPropertyDescriptor(NativeNumber, key));
|
5255 |
-
}
|
5256 |
-
}
|
5257 |
-
NumberWrapper.prototype = NumberPrototype;
|
5258 |
-
NumberPrototype.constructor = NumberWrapper;
|
5259 |
-
redefine(global, NUMBER, NumberWrapper);
|
5260 |
}
|
|
|
|
|
5261 |
|
5262 |
|
5263 |
-
/***/ }),
|
5264 |
-
/* 179 */
|
5265 |
-
/***/ (function(module, exports, __webpack_require__) {
|
5266 |
|
5267 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5268 |
|
5269 |
-
|
5270 |
-
|
5271 |
-
|
5272 |
|
5273 |
-
|
|
|
|
|
5274 |
|
5275 |
-
/***/ }),
|
5276 |
-
/* 180 */
|
5277 |
-
/***/ (function(module, exports) {
|
5278 |
|
5279 |
-
|
5280 |
-
|
5281 |
-
|
5282 |
|
5283 |
-
module.exports = _iterableToArray;
|
5284 |
|
5285 |
-
|
5286 |
-
|
5287 |
-
|
5288 |
|
5289 |
-
|
5290 |
-
|
5291 |
-
|
|
|
|
|
|
|
5292 |
|
5293 |
-
|
|
|
|
|
5294 |
|
5295 |
-
|
5296 |
-
|
5297 |
-
|
|
|
5298 |
|
5299 |
-
|
5300 |
-
|
5301 |
-
|
|
|
5302 |
|
5303 |
-
|
|
|
|
|
|
|
5304 |
|
5305 |
-
|
5306 |
-
|
5307 |
-
|
|
|
5308 |
|
5309 |
-
|
5310 |
-
|
5311 |
-
|
5312 |
-
|
5313 |
-
var _d = false;
|
5314 |
-
var _e = undefined;
|
5315 |
|
5316 |
-
|
5317 |
-
|
5318 |
-
|
|
|
5319 |
|
5320 |
-
|
5321 |
-
|
5322 |
-
|
5323 |
-
|
5324 |
-
_e = err;
|
5325 |
-
} finally {
|
5326 |
-
try {
|
5327 |
-
if (!_n && _i["return"] != null) _i["return"]();
|
5328 |
-
} finally {
|
5329 |
-
if (_d) throw _e;
|
5330 |
-
}
|
5331 |
-
}
|
5332 |
|
5333 |
-
|
5334 |
-
|
|
|
|
|
5335 |
|
5336 |
-
|
|
|
|
|
|
|
5337 |
|
5338 |
-
|
5339 |
-
|
5340 |
-
|
|
|
5341 |
|
5342 |
-
|
5343 |
-
|
5344 |
-
|
|
|
5345 |
|
5346 |
-
|
|
|
|
|
|
|
5347 |
|
5348 |
-
|
5349 |
-
|
5350 |
-
|
5351 |
-
|
5352 |
-
/***/ (function(module, exports, __webpack_require__) {
|
5353 |
|
5354 |
-
|
|
|
|
|
|
|
5355 |
|
5356 |
-
var
|
5357 |
-
|
5358 |
-
|
5359 |
-
|
5360 |
-
|
5361 |
-
|
5362 |
-
|
5363 |
-
|
5364 |
-
|
5365 |
-
|
5366 |
-
|
5367 |
-
|
5368 |
-
|
5369 |
-
|
5370 |
-
|
5371 |
-
|
5372 |
-
|
5373 |
-
|
5374 |
-
|
5375 |
-
|
5376 |
-
|
5377 |
-
|
5378 |
-
|
5379 |
-
|
5380 |
-
|
5381 |
-
|
5382 |
-
|
5383 |
-
|
5384 |
-
|
5385 |
-
|
5386 |
-
|
5387 |
-
|
5388 |
-
|
5389 |
-
|
5390 |
-
|
5391 |
-
|
5392 |
-
|
5393 |
-
|
5394 |
-
|
5395 |
-
|
5396 |
-
|
5397 |
-
|
5398 |
-
|
5399 |
-
return
|
|
|
|
|
|
|
5400 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5401 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5402 |
|
|
|
|
|
|
|
5403 |
|
5404 |
-
|
5405 |
-
/* 188 */
|
5406 |
-
/***/ (function(module, exports, __webpack_require__) {
|
5407 |
|
5408 |
-
var
|
5409 |
-
var whitespaces = __webpack_require__(189);
|
5410 |
|
5411 |
-
var
|
5412 |
-
var
|
5413 |
-
var
|
5414 |
|
5415 |
-
|
5416 |
-
|
5417 |
-
|
5418 |
-
|
5419 |
-
|
5420 |
-
|
5421 |
-
|
|
|
5422 |
};
|
5423 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5424 |
|
5425 |
-
|
5426 |
-
|
5427 |
-
|
5428 |
-
start: createMethod(1),
|
5429 |
-
// `String.prototype.{ trimRight, trimEnd }` methods
|
5430 |
-
// https://tc39.es/ecma262/#sec-string.prototype.trimend
|
5431 |
-
end: createMethod(2),
|
5432 |
-
// `String.prototype.trim` method
|
5433 |
-
// https://tc39.es/ecma262/#sec-string.prototype.trim
|
5434 |
-
trim: createMethod(3)
|
5435 |
-
};
|
5436 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5437 |
|
5438 |
-
|
5439 |
-
|
5440 |
-
|
5441 |
|
5442 |
-
|
5443 |
-
module.exports = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
|
5444 |
-
'\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
|
5445 |
|
|
|
5446 |
|
5447 |
-
|
5448 |
-
/*
|
5449 |
-
|
5450 |
-
|
5451 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5452 |
|
5453 |
-
"
|
|
|
|
|
5454 |
|
5455 |
-
var
|
5456 |
-
var $find = __webpack_require__(75).find;
|
5457 |
-
var addToUnscopables = __webpack_require__(118);
|
5458 |
|
5459 |
-
|
5460 |
-
|
|
|
|
|
|
|
5461 |
|
5462 |
-
|
5463 |
-
|
|
|
5464 |
|
5465 |
-
|
5466 |
-
|
5467 |
-
$({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
|
5468 |
-
find: function find(callbackfn /* , that = undefined */) {
|
5469 |
-
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
5470 |
-
}
|
5471 |
});
|
5472 |
-
|
5473 |
-
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
5474 |
-
addToUnscopables(FIND);
|
5475 |
-
|
5476 |
|
5477 |
/***/ }),
|
5478 |
-
/* 193 */
|
5479 |
-
/***/ (function(module, exports, __webpack_require__) {
|
5480 |
-
|
5481 |
-
var global = __webpack_require__(3);
|
5482 |
|
5483 |
-
|
|
|
5484 |
|
|
|
5485 |
|
5486 |
/***/ }),
|
5487 |
-
|
|
|
5488 |
/***/ (function(module, exports, __webpack_require__) {
|
5489 |
|
5490 |
-
|
5491 |
-
var getOwnPropertyDescriptor = __webpack_require__(33).f;
|
5492 |
-
var macrotask = __webpack_require__(157).set;
|
5493 |
-
var IS_IOS = __webpack_require__(158);
|
5494 |
-
var IS_WEBOS_WEBKIT = __webpack_require__(195);
|
5495 |
-
var IS_NODE = __webpack_require__(77);
|
5496 |
-
|
5497 |
-
var MutationObserver = global.MutationObserver || global.WebKitMutationObserver;
|
5498 |
-
var document = global.document;
|
5499 |
-
var process = global.process;
|
5500 |
-
var Promise = global.Promise;
|
5501 |
-
// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
|
5502 |
-
var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask');
|
5503 |
-
var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
|
5504 |
-
|
5505 |
-
var flush, head, last, notify, toggle, node, promise, then;
|
5506 |
-
|
5507 |
-
// modern engines have queueMicrotask method
|
5508 |
-
if (!queueMicrotask) {
|
5509 |
-
flush = function () {
|
5510 |
-
var parent, fn;
|
5511 |
-
if (IS_NODE && (parent = process.domain)) parent.exit();
|
5512 |
-
while (head) {
|
5513 |
-
fn = head.fn;
|
5514 |
-
head = head.next;
|
5515 |
-
try {
|
5516 |
-
fn();
|
5517 |
-
} catch (error) {
|
5518 |
-
if (head) notify();
|
5519 |
-
else last = undefined;
|
5520 |
-
throw error;
|
5521 |
-
}
|
5522 |
-
} last = undefined;
|
5523 |
-
if (parent) parent.enter();
|
5524 |
-
};
|
5525 |
|
5526 |
-
// browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
|
5527 |
-
// also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
|
5528 |
-
if (!IS_IOS && !IS_NODE && !IS_WEBOS_WEBKIT && MutationObserver && document) {
|
5529 |
-
toggle = true;
|
5530 |
-
node = document.createTextNode('');
|
5531 |
-
new MutationObserver(flush).observe(node, { characterData: true });
|
5532 |
-
notify = function () {
|
5533 |
-
node.data = toggle = !toggle;
|
5534 |
-
};
|
5535 |
-
// environments with maybe non-completely correct, but existent Promise
|
5536 |
-
} else if (Promise && Promise.resolve) {
|
5537 |
-
// Promise.resolve without an argument throws an error in LG WebOS 2
|
5538 |
-
promise = Promise.resolve(undefined);
|
5539 |
-
then = promise.then;
|
5540 |
-
notify = function () {
|
5541 |
-
then.call(promise, flush);
|
5542 |
-
};
|
5543 |
-
// Node.js without promises
|
5544 |
-
} else if (IS_NODE) {
|
5545 |
-
notify = function () {
|
5546 |
-
process.nextTick(flush);
|
5547 |
-
};
|
5548 |
-
// for other environments - macrotask based on:
|
5549 |
-
// - setImmediate
|
5550 |
-
// - MessageChannel
|
5551 |
-
// - window.postMessag
|
5552 |
-
// - onreadystatechange
|
5553 |
-
// - setTimeout
|
5554 |
-
} else {
|
5555 |
-
notify = function () {
|
5556 |
-
// strange IE + webpack dev server bug - use .call(global)
|
5557 |
-
macrotask.call(global, flush);
|
5558 |
-
};
|
5559 |
-
}
|
5560 |
-
}
|
5561 |
|
5562 |
-
|
5563 |
-
|
5564 |
-
|
5565 |
-
|
5566 |
-
|
5567 |
-
|
5568 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5569 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5570 |
|
|
|
|
|
|
|
|
|
|
|
5571 |
|
5572 |
-
/***/ }),
|
5573 |
-
/* 195 */
|
5574 |
-
/***/ (function(module, exports, __webpack_require__) {
|
5575 |
|
5576 |
-
|
|
|
5577 |
|
5578 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5579 |
|
|
|
|
|
|
|
|
|
5580 |
|
5581 |
-
|
5582 |
-
/* 196 */
|
5583 |
-
/***/ (function(module, exports, __webpack_require__) {
|
5584 |
|
5585 |
-
|
5586 |
-
|
5587 |
-
|
5588 |
-
|
5589 |
-
module.exports = function (C, x) {
|
5590 |
-
anObject(C);
|
5591 |
-
if (isObject(x) && x.constructor === C) return x;
|
5592 |
-
var promiseCapability = newPromiseCapability.f(C);
|
5593 |
-
var resolve = promiseCapability.resolve;
|
5594 |
-
resolve(x);
|
5595 |
-
return promiseCapability.promise;
|
5596 |
-
};
|
5597 |
|
|
|
|
|
5598 |
|
5599 |
-
|
5600 |
-
|
5601 |
-
/***/ (function(module, exports, __webpack_require__) {
|
5602 |
|
5603 |
-
|
|
|
5604 |
|
5605 |
-
|
5606 |
-
|
5607 |
-
|
5608 |
-
|
|
|
|
|
5609 |
}
|
5610 |
-
};
|
5611 |
|
|
|
|
|
5612 |
|
5613 |
-
|
5614 |
-
/* 198 */
|
5615 |
-
/***/ (function(module, exports) {
|
5616 |
-
|
5617 |
-
module.exports = function (exec) {
|
5618 |
-
try {
|
5619 |
-
return { error: false, value: exec() };
|
5620 |
-
} catch (error) {
|
5621 |
-
return { error: true, value: error };
|
5622 |
-
}
|
5623 |
-
};
|
5624 |
|
5625 |
|
5626 |
/***/ }),
|
5627 |
-
|
5628 |
-
/***/
|
|
|
5629 |
|
5630 |
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5631 |
|
5632 |
-
var IteratorPrototype = __webpack_require__(173).IteratorPrototype;
|
5633 |
-
var create = __webpack_require__(69);
|
5634 |
-
var createPropertyDescriptor = __webpack_require__(39);
|
5635 |
-
var setToStringTag = __webpack_require__(90);
|
5636 |
-
var Iterators = __webpack_require__(110);
|
5637 |
|
5638 |
-
var returnThis = function () { return this; };
|
5639 |
|
5640 |
-
|
5641 |
-
|
5642 |
-
|
5643 |
-
setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);
|
5644 |
-
Iterators[TO_STRING_TAG] = returnThis;
|
5645 |
-
return IteratorConstructor;
|
5646 |
-
};
|
5647 |
|
5648 |
|
5649 |
-
|
5650 |
-
|
5651 |
-
|
|
|
5652 |
|
5653 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5654 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5655 |
|
5656 |
-
|
5657 |
|
5658 |
-
|
5659 |
-
|
5660 |
|
5661 |
-
|
5662 |
-
var array = [];
|
5663 |
-
for (var i = 0; i < 256; ++i) {
|
5664 |
-
array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
|
5665 |
-
}
|
5666 |
|
5667 |
-
|
5668 |
-
}());
|
5669 |
|
5670 |
-
|
5671 |
-
|
5672 |
-
var item = queue.pop();
|
5673 |
-
var obj = item.obj[item.prop];
|
5674 |
|
5675 |
-
|
5676 |
-
var compacted = [];
|
5677 |
|
5678 |
-
|
5679 |
-
if (typeof obj[j] !== 'undefined') {
|
5680 |
-
compacted.push(obj[j]);
|
5681 |
-
}
|
5682 |
-
}
|
5683 |
|
5684 |
-
|
5685 |
-
|
5686 |
-
}
|
5687 |
-
};
|
5688 |
|
5689 |
-
|
5690 |
-
|
5691 |
-
|
5692 |
-
|
5693 |
-
|
5694 |
-
|
5695 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5696 |
|
5697 |
-
return obj;
|
5698 |
-
};
|
5699 |
|
5700 |
-
var merge = function merge(target, source, options) {
|
5701 |
-
/* eslint no-param-reassign: 0 */
|
5702 |
-
if (!source) {
|
5703 |
-
return target;
|
5704 |
-
}
|
5705 |
|
5706 |
-
if (typeof source !== 'object') {
|
5707 |
-
if (isArray(target)) {
|
5708 |
-
target.push(source);
|
5709 |
-
} else if (target && typeof target === 'object') {
|
5710 |
-
if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) {
|
5711 |
-
target[source] = true;
|
5712 |
-
}
|
5713 |
-
} else {
|
5714 |
-
return [target, source];
|
5715 |
-
}
|
5716 |
|
5717 |
-
return target;
|
5718 |
-
}
|
5719 |
|
5720 |
-
if (!target || typeof target !== 'object') {
|
5721 |
-
return [target].concat(source);
|
5722 |
-
}
|
5723 |
|
5724 |
-
var mergeTarget = target;
|
5725 |
-
if (isArray(target) && !isArray(source)) {
|
5726 |
-
mergeTarget = arrayToObject(target, options);
|
5727 |
-
}
|
5728 |
|
5729 |
-
if (isArray(target) && isArray(source)) {
|
5730 |
-
source.forEach(function (item, i) {
|
5731 |
-
if (has.call(target, i)) {
|
5732 |
-
var targetItem = target[i];
|
5733 |
-
if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
|
5734 |
-
target[i] = merge(targetItem, item, options);
|
5735 |
-
} else {
|
5736 |
-
target.push(item);
|
5737 |
-
}
|
5738 |
-
} else {
|
5739 |
-
target[i] = item;
|
5740 |
-
}
|
5741 |
-
});
|
5742 |
-
return target;
|
5743 |
-
}
|
5744 |
|
5745 |
-
|
5746 |
-
var value = source[key];
|
5747 |
|
5748 |
-
|
5749 |
-
acc[key] = merge(acc[key], value, options);
|
5750 |
-
} else {
|
5751 |
-
acc[key] = value;
|
5752 |
-
}
|
5753 |
-
return acc;
|
5754 |
-
}, mergeTarget);
|
5755 |
-
};
|
5756 |
|
5757 |
-
var
|
5758 |
-
return Object.keys(source).reduce(function (acc, key) {
|
5759 |
-
acc[key] = source[key];
|
5760 |
-
return acc;
|
5761 |
-
}, target);
|
5762 |
-
};
|
5763 |
|
5764 |
-
|
5765 |
-
var strWithoutPlus = str.replace(/\+/g, ' ');
|
5766 |
-
if (charset === 'iso-8859-1') {
|
5767 |
-
// unescape never throws, no try...catch needed:
|
5768 |
-
return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
|
5769 |
-
}
|
5770 |
-
// utf-8
|
5771 |
-
try {
|
5772 |
-
return decodeURIComponent(strWithoutPlus);
|
5773 |
-
} catch (e) {
|
5774 |
-
return strWithoutPlus;
|
5775 |
-
}
|
5776 |
-
};
|
5777 |
|
5778 |
-
|
5779 |
-
|
5780 |
-
|
5781 |
-
if (str.length === 0) {
|
5782 |
-
return str;
|
5783 |
-
}
|
5784 |
|
5785 |
-
var string = str;
|
5786 |
-
if (typeof str === 'symbol') {
|
5787 |
-
string = Symbol.prototype.toString.call(str);
|
5788 |
-
} else if (typeof str !== 'string') {
|
5789 |
-
string = String(str);
|
5790 |
-
}
|
5791 |
|
5792 |
-
if (charset === 'iso-8859-1') {
|
5793 |
-
return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
|
5794 |
-
return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
|
5795 |
-
});
|
5796 |
-
}
|
5797 |
|
5798 |
-
var out = '';
|
5799 |
-
for (var i = 0; i < string.length; ++i) {
|
5800 |
-
var c = string.charCodeAt(i);
|
5801 |
|
5802 |
-
|
5803 |
-
|
5804 |
-
|
5805 |
-
|| c === 0x5F // _
|
5806 |
-
|| c === 0x7E // ~
|
5807 |
-
|| (c >= 0x30 && c <= 0x39) // 0-9
|
5808 |
-
|| (c >= 0x41 && c <= 0x5A) // a-z
|
5809 |
-
|| (c >= 0x61 && c <= 0x7A) // A-Z
|
5810 |
-
|| (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( )
|
5811 |
-
) {
|
5812 |
-
out += string.charAt(i);
|
5813 |
-
continue;
|
5814 |
-
}
|
5815 |
|
5816 |
-
if (c < 0x80) {
|
5817 |
-
out = out + hexTable[c];
|
5818 |
-
continue;
|
5819 |
-
}
|
5820 |
|
5821 |
-
if (c < 0x800) {
|
5822 |
-
out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
|
5823 |
-
continue;
|
5824 |
-
}
|
5825 |
|
5826 |
-
|
5827 |
-
|
5828 |
-
|
5829 |
-
}
|
5830 |
|
5831 |
-
i += 1;
|
5832 |
-
c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
|
5833 |
-
out += hexTable[0xF0 | (c >> 18)]
|
5834 |
-
+ hexTable[0x80 | ((c >> 12) & 0x3F)]
|
5835 |
-
+ hexTable[0x80 | ((c >> 6) & 0x3F)]
|
5836 |
-
+ hexTable[0x80 | (c & 0x3F)];
|
5837 |
-
}
|
5838 |
|
5839 |
-
return out;
|
5840 |
-
};
|
5841 |
|
5842 |
-
var compact = function compact(value) {
|
5843 |
-
var queue = [{ obj: { o: value }, prop: 'o' }];
|
5844 |
-
var refs = [];
|
5845 |
|
5846 |
-
for (var i = 0; i < queue.length; ++i) {
|
5847 |
-
var item = queue[i];
|
5848 |
-
var obj = item.obj[item.prop];
|
5849 |
|
5850 |
-
var keys = Object.keys(obj);
|
5851 |
-
for (var j = 0; j < keys.length; ++j) {
|
5852 |
-
var key = keys[j];
|
5853 |
-
var val = obj[key];
|
5854 |
-
if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
|
5855 |
-
queue.push({ obj: obj, prop: key });
|
5856 |
-
refs.push(val);
|
5857 |
-
}
|
5858 |
-
}
|
5859 |
-
}
|
5860 |
|
5861 |
-
compactQueue(queue);
|
5862 |
|
5863 |
-
|
5864 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5865 |
|
5866 |
-
var
|
5867 |
-
|
|
|
|
|
5868 |
};
|
5869 |
|
5870 |
-
var
|
5871 |
-
|
5872 |
-
return false;
|
5873 |
-
}
|
5874 |
|
5875 |
-
|
5876 |
-
};
|
5877 |
|
5878 |
-
|
5879 |
-
|
5880 |
-
};
|
5881 |
|
5882 |
-
|
5883 |
-
if (isArray(val)) {
|
5884 |
-
var mapped = [];
|
5885 |
-
for (var i = 0; i < val.length; i += 1) {
|
5886 |
-
mapped.push(fn(val[i]));
|
5887 |
-
}
|
5888 |
-
return mapped;
|
5889 |
-
}
|
5890 |
-
return fn(val);
|
5891 |
-
};
|
5892 |
|
5893 |
-
|
5894 |
-
|
5895 |
-
|
5896 |
-
|
5897 |
-
|
5898 |
-
|
5899 |
-
encode: encode,
|
5900 |
-
isBuffer: isBuffer,
|
5901 |
-
isRegExp: isRegExp,
|
5902 |
-
maybeMap: maybeMap,
|
5903 |
-
merge: merge
|
5904 |
-
};
|
5905 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5906 |
|
5907 |
-
|
5908 |
-
/*
|
5909 |
-
|
5910 |
-
|
|
|
|
|
|
|
|
|
|
|
5911 |
|
5912 |
-
|
5913 |
|
5914 |
-
|
5915 |
-
|
5916 |
-
|
5917 |
-
|
5918 |
-
|
5919 |
-
__webpack_require__.d(__webpack_exports__, "d", function() { return /* binding */ createPath; });
|
5920 |
|
5921 |
-
|
|
|
|
|
|
|
5922 |
|
5923 |
-
|
5924 |
-
|
|
|
5925 |
|
5926 |
-
|
5927 |
-
|
5928 |
-
|
5929 |
-
}
|
|
|
|
|
5930 |
|
5931 |
-
|
5932 |
-
|
5933 |
-
for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {
|
5934 |
-
list[i] = list[k];
|
5935 |
-
}
|
5936 |
|
5937 |
-
|
5938 |
-
|
|
|
|
|
|
|
|
|
5939 |
|
5940 |
-
|
5941 |
-
|
5942 |
-
|
5943 |
|
5944 |
-
var
|
5945 |
-
var
|
5946 |
|
5947 |
-
var
|
5948 |
-
var
|
5949 |
-
var
|
|
|
|
|
|
|
5950 |
|
5951 |
-
if (
|
5952 |
-
|
5953 |
-
|
5954 |
-
|
5955 |
-
|
5956 |
-
fromParts.pop();
|
5957 |
-
fromParts = fromParts.concat(toParts);
|
5958 |
}
|
5959 |
|
5960 |
-
|
|
|
|
|
|
|
|
|
|
|
5961 |
|
5962 |
-
|
5963 |
-
if (fromParts.length) {
|
5964 |
-
var last = fromParts[fromParts.length - 1];
|
5965 |
-
hasTrailingSlash = last === '.' || last === '..' || last === '';
|
5966 |
-
} else {
|
5967 |
-
hasTrailingSlash = false;
|
5968 |
-
}
|
5969 |
|
5970 |
-
|
5971 |
-
|
5972 |
-
var part = fromParts[i];
|
5973 |
|
5974 |
-
|
5975 |
-
|
5976 |
-
|
5977 |
-
|
5978 |
-
|
5979 |
-
} else if (up) {
|
5980 |
-
spliceOne(fromParts, i);
|
5981 |
-
up--;
|
5982 |
-
}
|
5983 |
-
}
|
5984 |
|
5985 |
-
|
5986 |
|
5987 |
-
|
5988 |
-
mustEndAbs &&
|
5989 |
-
fromParts[0] !== '' &&
|
5990 |
-
(!fromParts[0] || !isAbsolute(fromParts[0]))
|
5991 |
-
)
|
5992 |
-
fromParts.unshift('');
|
5993 |
|
5994 |
-
|
|
|
5995 |
|
5996 |
-
|
5997 |
|
5998 |
-
|
5999 |
-
}
|
|
|
|
|
6000 |
|
6001 |
-
|
|
|
|
|
6002 |
|
6003 |
-
//
|
6004 |
-
|
6005 |
-
|
6006 |
-
}
|
6007 |
|
6008 |
-
|
6009 |
-
|
6010 |
-
|
6011 |
|
6012 |
-
|
6013 |
-
|
|
|
6014 |
|
6015 |
-
|
6016 |
-
|
6017 |
-
|
6018 |
-
a.length === b.length &&
|
6019 |
-
a.every(function(item, index) {
|
6020 |
-
return valueEqual(item, b[index]);
|
6021 |
-
})
|
6022 |
-
);
|
6023 |
-
}
|
6024 |
|
6025 |
-
|
6026 |
-
|
6027 |
-
|
6028 |
|
6029 |
-
|
|
|
|
|
6030 |
|
6031 |
-
|
6032 |
-
|
6033 |
-
|
6034 |
-
}
|
6035 |
|
6036 |
-
|
6037 |
-
|
6038 |
|
6039 |
-
|
|
|
6040 |
|
6041 |
-
// EXTERNAL MODULE:
|
6042 |
-
var
|
6043 |
|
6044 |
-
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6045 |
|
|
|
|
|
6046 |
|
|
|
|
|
|
|
6047 |
|
|
|
|
|
|
|
6048 |
|
|
|
6049 |
|
6050 |
|
6051 |
-
function addLeadingSlash(path) {
|
6052 |
-
return path.charAt(0) === '/' ? path : '/' + path;
|
6053 |
-
}
|
6054 |
-
function stripLeadingSlash(path) {
|
6055 |
-
return path.charAt(0) === '/' ? path.substr(1) : path;
|
6056 |
-
}
|
6057 |
-
function hasBasename(path, prefix) {
|
6058 |
-
return path.toLowerCase().indexOf(prefix.toLowerCase()) === 0 && '/?#'.indexOf(path.charAt(prefix.length)) !== -1;
|
6059 |
-
}
|
6060 |
-
function stripBasename(path, prefix) {
|
6061 |
-
return hasBasename(path, prefix) ? path.substr(prefix.length) : path;
|
6062 |
-
}
|
6063 |
-
function stripTrailingSlash(path) {
|
6064 |
-
return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;
|
6065 |
-
}
|
6066 |
-
function parsePath(path) {
|
6067 |
-
var pathname = path || '/';
|
6068 |
-
var search = '';
|
6069 |
-
var hash = '';
|
6070 |
-
var hashIndex = pathname.indexOf('#');
|
6071 |
|
6072 |
-
if (hashIndex !== -1) {
|
6073 |
-
hash = pathname.substr(hashIndex);
|
6074 |
-
pathname = pathname.substr(0, hashIndex);
|
6075 |
-
}
|
6076 |
|
6077 |
-
var searchIndex = pathname.indexOf('?');
|
6078 |
|
6079 |
-
|
6080 |
-
|
6081 |
-
|
|
|
|
|
|
|
|
|
|
|
6082 |
}
|
|
|
6083 |
|
|
|
|
|
6084 |
return {
|
6085 |
-
|
6086 |
-
|
6087 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6088 |
};
|
6089 |
}
|
6090 |
-
function createPath(location) {
|
6091 |
-
var pathname = location.pathname,
|
6092 |
-
search = location.search,
|
6093 |
-
hash = location.hash;
|
6094 |
-
var path = pathname || '/';
|
6095 |
-
if (search && search !== '?') path += search.charAt(0) === '?' ? search : "?" + search;
|
6096 |
-
if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : "#" + hash;
|
6097 |
-
return path;
|
6098 |
-
}
|
6099 |
|
6100 |
-
function
|
6101 |
-
|
|
|
6102 |
|
6103 |
-
|
6104 |
-
|
6105 |
-
location = parsePath(path);
|
6106 |
-
location.state = state;
|
6107 |
-
} else {
|
6108 |
-
// One-arg form: push(location)
|
6109 |
-
location = Object(esm_extends["a" /* default */])({}, path);
|
6110 |
-
if (location.pathname === undefined) location.pathname = '';
|
6111 |
|
6112 |
-
|
6113 |
-
if (location.search.charAt(0) !== '?') location.search = '?' + location.search;
|
6114 |
-
} else {
|
6115 |
-
location.search = '';
|
6116 |
-
}
|
6117 |
|
6118 |
-
|
6119 |
-
|
6120 |
-
|
6121 |
-
|
6122 |
-
}
|
6123 |
|
6124 |
-
|
6125 |
-
|
6126 |
|
6127 |
-
|
6128 |
-
|
6129 |
-
|
6130 |
-
if (e instanceof URIError) {
|
6131 |
-
throw new URIError('Pathname "' + location.pathname + '" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');
|
6132 |
-
} else {
|
6133 |
-
throw e;
|
6134 |
}
|
6135 |
-
}
|
6136 |
|
6137 |
-
|
6138 |
|
6139 |
-
|
6140 |
-
|
6141 |
-
if (!location.pathname) {
|
6142 |
-
location.pathname = currentLocation.pathname;
|
6143 |
-
} else if (location.pathname.charAt(0) !== '/') {
|
6144 |
-
location.pathname = resolve_pathname(location.pathname, currentLocation.pathname);
|
6145 |
-
}
|
6146 |
-
} else {
|
6147 |
-
// When there is no prior location and pathname is empty, set it to /
|
6148 |
-
if (!location.pathname) {
|
6149 |
-
location.pathname = '/';
|
6150 |
-
}
|
6151 |
-
}
|
6152 |
|
6153 |
-
|
6154 |
-
}
|
6155 |
-
function locationsAreEqual(a, b) {
|
6156 |
-
return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && value_equal(a.state, b.state);
|
6157 |
-
}
|
6158 |
-
|
6159 |
-
function createTransitionManager() {
|
6160 |
-
var prompt = null;
|
6161 |
-
|
6162 |
-
function setPrompt(nextPrompt) {
|
6163 |
-
false ? undefined : void 0;
|
6164 |
-
prompt = nextPrompt;
|
6165 |
-
return function () {
|
6166 |
-
if (prompt === nextPrompt) prompt = null;
|
6167 |
};
|
6168 |
-
}
|
6169 |
|
6170 |
-
|
6171 |
-
|
6172 |
-
|
6173 |
-
|
6174 |
-
|
6175 |
-
var result = typeof prompt === 'function' ? prompt(location, action) : prompt;
|
6176 |
|
6177 |
-
|
6178 |
-
|
6179 |
-
getUserConfirmation(result, callback);
|
6180 |
} else {
|
6181 |
-
|
6182 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6183 |
}
|
6184 |
-
} else {
|
6185 |
-
// Return false from a transition hook to cancel the transition.
|
6186 |
-
callback(result !== false);
|
6187 |
}
|
6188 |
-
}
|
6189 |
-
callback(true);
|
6190 |
-
}
|
6191 |
-
}
|
6192 |
|
6193 |
-
|
|
|
|
|
6194 |
|
6195 |
-
|
6196 |
-
|
6197 |
|
6198 |
-
|
6199 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6200 |
}
|
6201 |
|
6202 |
-
|
6203 |
-
|
6204 |
-
|
6205 |
-
|
6206 |
-
|
6207 |
-
});
|
6208 |
};
|
6209 |
-
}
|
6210 |
|
6211 |
-
|
6212 |
-
|
6213 |
-
|
6214 |
-
|
6215 |
|
6216 |
-
|
6217 |
-
|
6218 |
-
}
|
6219 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6220 |
|
|
|
6221 |
return {
|
6222 |
-
|
6223 |
-
|
6224 |
-
appendListener: appendListener,
|
6225 |
-
notifyListeners: notifyListeners
|
6226 |
};
|
6227 |
}
|
6228 |
|
6229 |
-
var
|
6230 |
-
function getConfirmation(message, callback) {
|
6231 |
-
callback(window.confirm(message)); // eslint-disable-line no-alert
|
6232 |
-
}
|
6233 |
-
/**
|
6234 |
-
* Returns true if the HTML5 history API is supported. Taken from Modernizr.
|
6235 |
-
*
|
6236 |
-
* https://github.com/Modernizr/Modernizr/blob/master/LICENSE
|
6237 |
-
* https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js
|
6238 |
-
* changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586
|
6239 |
-
*/
|
6240 |
|
6241 |
-
|
6242 |
-
var ua = window.navigator.userAgent;
|
6243 |
-
if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;
|
6244 |
-
return window.history && 'pushState' in window.history;
|
6245 |
-
}
|
6246 |
-
/**
|
6247 |
-
* Returns true if browser fires popstate on hash change.
|
6248 |
-
* IE10 and IE11 do not.
|
6249 |
-
*/
|
6250 |
|
6251 |
-
|
6252 |
-
|
6253 |
-
}
|
6254 |
-
/**
|
6255 |
-
* Returns false if using go(n) with hash history causes a full page reload.
|
6256 |
-
*/
|
6257 |
|
6258 |
-
|
6259 |
-
|
6260 |
-
}
|
6261 |
-
/**
|
6262 |
-
* Returns true if a given popstate event is an extraneous WebKit event.
|
6263 |
-
* Accounts for the fact that Chrome on iOS fires real popstate events
|
6264 |
-
* containing undefined state when pressing the back button.
|
6265 |
-
*/
|
6266 |
|
6267 |
-
|
6268 |
-
|
6269 |
-
|
6270 |
|
6271 |
-
|
6272 |
-
var
|
6273 |
|
6274 |
-
|
6275 |
-
|
6276 |
-
return window.history.state || {};
|
6277 |
-
} catch (e) {
|
6278 |
-
// IE 11 sometimes throws when accessing window.history.state
|
6279 |
-
// See https://github.com/ReactTraining/history/pull/289
|
6280 |
-
return {};
|
6281 |
-
}
|
6282 |
-
}
|
6283 |
-
/**
|
6284 |
-
* Creates a history object that uses the HTML5 history API including
|
6285 |
-
* pushState, replaceState, and the popstate event.
|
6286 |
-
*/
|
6287 |
|
|
|
|
|
|
|
6288 |
|
6289 |
-
|
6290 |
-
if (props === void 0) {
|
6291 |
-
props = {};
|
6292 |
-
}
|
6293 |
|
6294 |
-
!canUseDOM ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0;
|
6295 |
-
var globalHistory = window.history;
|
6296 |
-
var canUseHistory = supportsHistory();
|
6297 |
-
var needsHashChangeListener = !supportsPopStateOnHashChange();
|
6298 |
-
var _props = props,
|
6299 |
-
_props$forceRefresh = _props.forceRefresh,
|
6300 |
-
forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,
|
6301 |
-
_props$getUserConfirm = _props.getUserConfirmation,
|
6302 |
-
getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,
|
6303 |
-
_props$keyLength = _props.keyLength,
|
6304 |
-
keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;
|
6305 |
-
var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';
|
6306 |
|
6307 |
-
function getDOMLocation(historyState) {
|
6308 |
-
var _ref = historyState || {},
|
6309 |
-
key = _ref.key,
|
6310 |
-
state = _ref.state;
|
6311 |
|
6312 |
-
var _window$location = window.location,
|
6313 |
-
pathname = _window$location.pathname,
|
6314 |
-
search = _window$location.search,
|
6315 |
-
hash = _window$location.hash;
|
6316 |
-
var path = pathname + search + hash;
|
6317 |
-
false ? undefined : void 0;
|
6318 |
-
if (basename) path = stripBasename(path, basename);
|
6319 |
-
return createLocation(path, state, key);
|
6320 |
-
}
|
6321 |
|
6322 |
-
function createKey() {
|
6323 |
-
return Math.random().toString(36).substr(2, keyLength);
|
6324 |
-
}
|
6325 |
|
6326 |
-
var transitionManager = createTransitionManager();
|
6327 |
|
6328 |
-
function setState(nextState) {
|
6329 |
-
Object(esm_extends["a" /* default */])(history, nextState);
|
6330 |
|
6331 |
-
history.length = globalHistory.length;
|
6332 |
-
transitionManager.notifyListeners(history.location, history.action);
|
6333 |
-
}
|
6334 |
|
6335 |
-
function handlePopState(event) {
|
6336 |
-
// Ignore extraneous popstate events in WebKit.
|
6337 |
-
if (isExtraneousPopstateEvent(event)) return;
|
6338 |
-
handlePop(getDOMLocation(event.state));
|
6339 |
-
}
|
6340 |
|
6341 |
-
function handleHashChange() {
|
6342 |
-
handlePop(getDOMLocation(getHistoryState()));
|
6343 |
-
}
|
6344 |
|
6345 |
-
var forceNextPop = false;
|
6346 |
|
6347 |
-
function handlePop(location) {
|
6348 |
-
if (forceNextPop) {
|
6349 |
-
forceNextPop = false;
|
6350 |
-
setState();
|
6351 |
-
} else {
|
6352 |
-
var action = 'POP';
|
6353 |
-
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
|
6354 |
-
if (ok) {
|
6355 |
-
setState({
|
6356 |
-
action: action,
|
6357 |
-
location: location
|
6358 |
-
});
|
6359 |
-
} else {
|
6360 |
-
revertPop(location);
|
6361 |
-
}
|
6362 |
-
});
|
6363 |
-
}
|
6364 |
-
}
|
6365 |
|
6366 |
-
function revertPop(fromLocation) {
|
6367 |
-
var toLocation = history.location; // TODO: We could probably make this more reliable by
|
6368 |
-
// keeping a list of keys we've seen in sessionStorage.
|
6369 |
-
// Instead, we just default to 0 for keys we don't know.
|
6370 |
|
6371 |
-
|
6372 |
-
if (toIndex === -1) toIndex = 0;
|
6373 |
-
var fromIndex = allKeys.indexOf(fromLocation.key);
|
6374 |
-
if (fromIndex === -1) fromIndex = 0;
|
6375 |
-
var delta = toIndex - fromIndex;
|
6376 |
|
6377 |
-
|
6378 |
-
|
6379 |
-
|
6380 |
-
|
6381 |
-
|
6382 |
|
6383 |
-
|
6384 |
-
|
|
|
6385 |
|
6386 |
-
|
6387 |
-
|
6388 |
-
|
6389 |
|
6390 |
-
|
6391 |
-
|
6392 |
-
|
6393 |
-
|
6394 |
-
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
|
6395 |
-
if (!ok) return;
|
6396 |
-
var href = createHref(location);
|
6397 |
-
var key = location.key,
|
6398 |
-
state = location.state;
|
6399 |
|
6400 |
-
|
6401 |
-
|
6402 |
-
|
6403 |
-
|
6404 |
-
|
|
|
|
|
|
|
6405 |
|
6406 |
-
|
6407 |
-
|
6408 |
-
|
6409 |
-
|
6410 |
-
|
6411 |
-
|
6412 |
-
|
6413 |
-
|
6414 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6415 |
location: location
|
6416 |
});
|
|
|
|
|
6417 |
}
|
6418 |
-
}
|
6419 |
-
|
6420 |
-
|
6421 |
-
|
6422 |
-
});
|
6423 |
}
|
6424 |
|
6425 |
-
|
6426 |
-
false ? undefined : void 0;
|
6427 |
-
var action = 'REPLACE';
|
6428 |
-
var location = createLocation(path, state, createKey(), history.location);
|
6429 |
-
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
|
6430 |
-
if (!ok) return;
|
6431 |
-
var href = createHref(location);
|
6432 |
-
var key = location.key,
|
6433 |
-
state = location.state;
|
6434 |
|
6435 |
-
|
6436 |
-
|
6437 |
-
key: key,
|
6438 |
-
state: state
|
6439 |
-
}, null, href);
|
6440 |
|
6441 |
-
|
6442 |
-
|
6443 |
-
|
6444 |
-
|
6445 |
-
|
6446 |
-
|
6447 |
-
|
6448 |
-
|
6449 |
-
|
6450 |
-
|
6451 |
-
|
6452 |
-
|
6453 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
6454 |
}
|
6455 |
});
|
6456 |
-
}
|
6457 |
|
6458 |
-
|
6459 |
-
|
6460 |
-
}
|
6461 |
|
6462 |
-
|
6463 |
-
go(-1);
|
6464 |
-
}
|
6465 |
|
6466 |
-
|
6467 |
-
|
6468 |
-
|
6469 |
|
6470 |
-
|
|
|
|
|
|
|
6471 |
|
6472 |
-
function
|
6473 |
-
|
6474 |
|
6475 |
-
|
6476 |
-
|
6477 |
-
if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);
|
6478 |
-
} else if (listenerCount === 0) {
|
6479 |
-
window.removeEventListener(PopStateEvent, handlePopState);
|
6480 |
-
if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);
|
6481 |
}
|
|
|
|
|
|
|
|
|
6482 |
}
|
6483 |
|
6484 |
-
var
|
6485 |
|
6486 |
-
function
|
6487 |
-
|
6488 |
-
|
6489 |
-
|
|
|
|
|
6490 |
|
6491 |
-
|
|
|
6492 |
|
6493 |
-
|
6494 |
-
checkDOMListeners(1);
|
6495 |
-
isBlocked = true;
|
6496 |
-
}
|
6497 |
|
6498 |
-
|
6499 |
-
|
6500 |
-
|
6501 |
-
|
6502 |
-
}
|
6503 |
|
6504 |
-
|
6505 |
-
|
6506 |
}
|
6507 |
|
6508 |
-
|
6509 |
-
var unlisten = transitionManager.appendListener(listener);
|
6510 |
-
checkDOMListeners(1);
|
6511 |
-
return function () {
|
6512 |
-
checkDOMListeners(-1);
|
6513 |
-
unlisten();
|
6514 |
-
};
|
6515 |
-
}
|
6516 |
|
6517 |
-
|
6518 |
-
|
6519 |
-
action: 'POP',
|
6520 |
-
location: initialLocation,
|
6521 |
-
createHref: createHref,
|
6522 |
-
push: push,
|
6523 |
-
replace: replace,
|
6524 |
-
go: go,
|
6525 |
-
goBack: goBack,
|
6526 |
-
goForward: goForward,
|
6527 |
-
block: block,
|
6528 |
-
listen: listen
|
6529 |
};
|
6530 |
-
return history;
|
6531 |
-
}
|
6532 |
|
6533 |
-
|
6534 |
-
|
6535 |
-
|
6536 |
-
encodePath: function encodePath(path) {
|
6537 |
-
return path.charAt(0) === '!' ? path : '!/' + stripLeadingSlash(path);
|
6538 |
-
},
|
6539 |
-
decodePath: function decodePath(path) {
|
6540 |
-
return path.charAt(0) === '!' ? path.substr(1) : path;
|
6541 |
-
}
|
6542 |
-
},
|
6543 |
-
noslash: {
|
6544 |
-
encodePath: stripLeadingSlash,
|
6545 |
-
decodePath: addLeadingSlash
|
6546 |
-
},
|
6547 |
-
slash: {
|
6548 |
-
encodePath: addLeadingSlash,
|
6549 |
-
decodePath: addLeadingSlash
|
6550 |
-
}
|
6551 |
-
};
|
6552 |
|
6553 |
-
function
|
6554 |
-
|
6555 |
-
|
6556 |
-
}
|
6557 |
|
6558 |
-
function
|
6559 |
-
|
6560 |
-
|
6561 |
-
var href = window.location.href;
|
6562 |
-
var hashIndex = href.indexOf('#');
|
6563 |
-
return hashIndex === -1 ? '' : href.substring(hashIndex + 1);
|
6564 |
-
}
|
6565 |
|
6566 |
-
|
6567 |
-
|
6568 |
-
}
|
6569 |
|
6570 |
-
|
6571 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6572 |
}
|
6573 |
|
6574 |
-
|
6575 |
-
if (props === void 0) {
|
6576 |
-
props = {};
|
6577 |
-
}
|
6578 |
|
6579 |
-
|
6580 |
-
|
6581 |
-
|
6582 |
-
var _props = props,
|
6583 |
-
_props$getUserConfirm = _props.getUserConfirmation,
|
6584 |
-
getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,
|
6585 |
-
_props$hashType = _props.hashType,
|
6586 |
-
hashType = _props$hashType === void 0 ? 'slash' : _props$hashType;
|
6587 |
-
var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';
|
6588 |
-
var _HashPathCoders$hashT = HashPathCoders[hashType],
|
6589 |
-
encodePath = _HashPathCoders$hashT.encodePath,
|
6590 |
-
decodePath = _HashPathCoders$hashT.decodePath;
|
6591 |
|
6592 |
-
|
6593 |
-
|
6594 |
-
|
6595 |
-
|
6596 |
-
|
|
|
|
|
6597 |
}
|
6598 |
|
6599 |
-
|
|
|
|
|
|
|
|
|
6600 |
|
6601 |
-
function setState(nextState) {
|
6602 |
-
Object(esm_extends["a" /* default */])(history, nextState);
|
6603 |
|
6604 |
-
|
6605 |
-
|
|
|
6606 |
}
|
6607 |
|
6608 |
-
|
6609 |
-
|
6610 |
-
|
6611 |
-
function locationsAreEqual$$1(a, b) {
|
6612 |
-
return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash;
|
6613 |
}
|
6614 |
|
6615 |
-
|
6616 |
-
|
6617 |
-
|
|
|
6618 |
|
6619 |
-
|
6620 |
-
|
6621 |
-
|
6622 |
-
} else {
|
6623 |
-
var location = getDOMLocation();
|
6624 |
-
var prevLocation = history.location;
|
6625 |
-
if (!forceNextPop && locationsAreEqual$$1(prevLocation, location)) return; // A hashchange doesn't always == location change.
|
6626 |
|
6627 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6628 |
|
6629 |
-
|
6630 |
-
|
|
|
6631 |
}
|
6632 |
-
}
|
6633 |
|
6634 |
-
|
6635 |
-
|
6636 |
-
|
6637 |
-
|
6638 |
-
|
6639 |
-
|
6640 |
-
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
|
6641 |
-
if (ok) {
|
6642 |
-
setState({
|
6643 |
-
action: action,
|
6644 |
-
location: location
|
6645 |
-
});
|
6646 |
-
} else {
|
6647 |
-
revertPop(location);
|
6648 |
-
}
|
6649 |
-
});
|
6650 |
-
}
|
6651 |
-
}
|
6652 |
|
6653 |
-
|
6654 |
-
|
6655 |
-
|
6656 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
6657 |
|
6658 |
-
|
6659 |
-
if (toIndex === -1) toIndex = 0;
|
6660 |
-
var fromIndex = allPaths.lastIndexOf(createPath(fromLocation));
|
6661 |
-
if (fromIndex === -1) fromIndex = 0;
|
6662 |
-
var delta = toIndex - fromIndex;
|
6663 |
|
6664 |
-
|
6665 |
-
|
6666 |
-
|
6667 |
-
}
|
6668 |
-
} // Ensure the hash is encoded properly before doing anything else.
|
6669 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6670 |
|
6671 |
-
|
6672 |
-
|
6673 |
-
|
6674 |
-
|
6675 |
-
var allPaths = [createPath(initialLocation)]; // Public interface
|
6676 |
|
6677 |
-
|
6678 |
-
|
6679 |
-
|
|
|
|
|
6680 |
|
6681 |
-
if (baseTag && baseTag.getAttribute('href')) {
|
6682 |
-
href = stripHash(window.location.href);
|
6683 |
-
}
|
6684 |
|
6685 |
-
|
|
|
|
|
6686 |
}
|
6687 |
|
6688 |
-
|
6689 |
-
|
6690 |
-
|
6691 |
-
|
6692 |
-
|
6693 |
-
if (!ok) return;
|
6694 |
-
var path = createPath(location);
|
6695 |
-
var encodedPath = encodePath(basename + path);
|
6696 |
-
var hashChanged = getHashPath() !== encodedPath;
|
6697 |
|
6698 |
-
|
6699 |
-
|
6700 |
-
|
6701 |
-
|
6702 |
-
|
6703 |
-
|
6704 |
-
|
6705 |
-
|
6706 |
-
|
6707 |
-
|
6708 |
-
|
6709 |
-
|
6710 |
-
location: location
|
6711 |
-
});
|
6712 |
-
} else {
|
6713 |
-
false ? undefined : void 0;
|
6714 |
-
setState();
|
6715 |
-
}
|
6716 |
-
});
|
6717 |
-
}
|
6718 |
|
6719 |
-
|
6720 |
-
|
6721 |
-
|
6722 |
-
|
6723 |
-
|
6724 |
-
|
6725 |
-
|
6726 |
-
var encodedPath = encodePath(basename + path);
|
6727 |
-
var hashChanged = getHashPath() !== encodedPath;
|
6728 |
|
6729 |
-
|
6730 |
-
|
6731 |
-
|
6732 |
-
|
6733 |
-
|
6734 |
-
|
6735 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6736 |
|
6737 |
-
|
6738 |
-
|
6739 |
-
|
6740 |
-
action: action,
|
6741 |
-
location: location
|
6742 |
-
});
|
6743 |
-
});
|
6744 |
-
}
|
6745 |
|
6746 |
-
|
6747 |
-
|
6748 |
-
|
6749 |
-
|
|
|
|
|
|
|
|
|
6750 |
|
6751 |
-
function goBack() {
|
6752 |
-
go(-1);
|
6753 |
-
}
|
6754 |
|
6755 |
-
|
6756 |
-
|
|
|
|
|
|
|
|
|
|
|
6757 |
}
|
6758 |
|
6759 |
-
var
|
6760 |
|
6761 |
-
function
|
6762 |
-
|
6763 |
|
6764 |
-
|
6765 |
-
|
6766 |
-
|
6767 |
-
|
6768 |
-
|
6769 |
-
}
|
6770 |
|
6771 |
-
|
|
|
|
|
|
|
6772 |
|
6773 |
-
|
6774 |
-
|
6775 |
-
|
6776 |
-
|
|
|
6777 |
|
6778 |
-
|
|
|
|
|
6779 |
|
6780 |
-
|
6781 |
-
|
6782 |
-
|
6783 |
-
}
|
|
|
6784 |
|
6785 |
-
|
6786 |
-
|
6787 |
-
isBlocked = false;
|
6788 |
-
checkDOMListeners(-1);
|
6789 |
-
}
|
6790 |
|
6791 |
-
|
6792 |
-
};
|
6793 |
-
}
|
6794 |
|
6795 |
-
|
6796 |
-
|
6797 |
-
|
6798 |
-
return function () {
|
6799 |
-
checkDOMListeners(-1);
|
6800 |
-
unlisten();
|
6801 |
-
};
|
6802 |
-
}
|
6803 |
|
6804 |
-
|
6805 |
-
|
6806 |
-
|
6807 |
-
|
6808 |
-
|
6809 |
-
push: push,
|
6810 |
-
replace: replace,
|
6811 |
-
go: go,
|
6812 |
-
goBack: goBack,
|
6813 |
-
goForward: goForward,
|
6814 |
-
block: block,
|
6815 |
-
listen: listen
|
6816 |
-
};
|
6817 |
-
return history;
|
6818 |
}
|
6819 |
|
6820 |
-
function
|
6821 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6822 |
}
|
|
|
|
|
6823 |
/**
|
6824 |
-
*
|
|
|
|
|
|
|
6825 |
*/
|
6826 |
|
6827 |
|
6828 |
-
|
6829 |
-
|
6830 |
-
|
6831 |
-
|
6832 |
|
6833 |
-
|
6834 |
-
|
6835 |
-
_props$initialEntries = _props.initialEntries,
|
6836 |
-
initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,
|
6837 |
-
_props$initialIndex = _props.initialIndex,
|
6838 |
-
initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,
|
6839 |
-
_props$keyLength = _props.keyLength,
|
6840 |
-
keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;
|
6841 |
-
var transitionManager = createTransitionManager();
|
6842 |
|
6843 |
-
|
6844 |
-
|
|
|
6845 |
|
6846 |
-
|
6847 |
-
transitionManager.notifyListeners(history.location, history.action);
|
6848 |
-
}
|
6849 |
|
6850 |
-
|
6851 |
-
|
6852 |
-
|
6853 |
|
6854 |
-
|
6855 |
-
|
6856 |
-
|
6857 |
-
}); // Public interface
|
6858 |
|
6859 |
-
|
6860 |
-
|
6861 |
-
|
6862 |
-
false ? undefined : void 0;
|
6863 |
-
var action = 'PUSH';
|
6864 |
-
var location = createLocation(path, state, createKey(), history.location);
|
6865 |
-
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
|
6866 |
-
if (!ok) return;
|
6867 |
-
var prevIndex = history.index;
|
6868 |
-
var nextIndex = prevIndex + 1;
|
6869 |
-
var nextEntries = history.entries.slice(0);
|
6870 |
|
6871 |
-
|
6872 |
-
|
6873 |
-
|
6874 |
-
nextEntries.push(location);
|
6875 |
-
}
|
6876 |
|
6877 |
-
|
6878 |
-
action: action,
|
6879 |
-
location: location,
|
6880 |
-
index: nextIndex,
|
6881 |
-
entries: nextEntries
|
6882 |
-
});
|
6883 |
-
});
|
6884 |
}
|
6885 |
|
6886 |
-
|
6887 |
-
false ? undefined : void 0;
|
6888 |
-
var action = 'REPLACE';
|
6889 |
-
var location = createLocation(path, state, createKey(), history.location);
|
6890 |
-
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
|
6891 |
-
if (!ok) return;
|
6892 |
-
history.entries[history.index] = location;
|
6893 |
-
setState({
|
6894 |
-
action: action,
|
6895 |
-
location: location
|
6896 |
-
});
|
6897 |
-
});
|
6898 |
-
}
|
6899 |
|
6900 |
-
function
|
6901 |
-
var
|
6902 |
-
|
6903 |
-
|
6904 |
-
|
6905 |
-
|
6906 |
-
|
6907 |
-
|
6908 |
-
|
6909 |
-
|
6910 |
-
});
|
6911 |
-
} else {
|
6912 |
-
// Mimic the behavior of DOM histories by
|
6913 |
-
// causing a render after a cancelled POP.
|
6914 |
-
setState();
|
6915 |
-
}
|
6916 |
-
});
|
6917 |
-
}
|
6918 |
|
6919 |
-
function
|
6920 |
-
|
6921 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
6922 |
|
6923 |
-
|
6924 |
-
|
6925 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6926 |
|
6927 |
-
|
6928 |
-
|
6929 |
-
return nextIndex >= 0 && nextIndex < history.entries.length;
|
6930 |
-
}
|
6931 |
|
6932 |
-
|
6933 |
-
if (prompt === void 0) {
|
6934 |
-
prompt = false;
|
6935 |
-
}
|
6936 |
|
6937 |
-
|
6938 |
-
|
|
|
6939 |
|
6940 |
-
|
6941 |
-
|
|
|
|
|
|
|
|
|
|
|
6942 |
}
|
6943 |
|
6944 |
-
var
|
6945 |
-
length: entries.length,
|
6946 |
-
action: 'POP',
|
6947 |
-
location: entries[index],
|
6948 |
-
index: index,
|
6949 |
-
entries: entries,
|
6950 |
-
createHref: createHref,
|
6951 |
-
push: push,
|
6952 |
-
replace: replace,
|
6953 |
-
go: go,
|
6954 |
-
goBack: goBack,
|
6955 |
-
goForward: goForward,
|
6956 |
-
canGo: canGo,
|
6957 |
-
block: block,
|
6958 |
-
listen: listen
|
6959 |
-
};
|
6960 |
-
return history;
|
6961 |
-
}
|
6962 |
|
|
|
|
|
6963 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6964 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6965 |
|
6966 |
-
|
6967 |
-
|
6968 |
-
/***/ (function(module, exports, __webpack_require__) {
|
6969 |
|
6970 |
-
|
6971 |
|
6972 |
-
|
6973 |
-
|
6974 |
-
|
6975 |
-
var requireObjectCoercible = __webpack_require__(32);
|
6976 |
-
var advanceStringIndex = __webpack_require__(122);
|
6977 |
-
var regExpExec = __webpack_require__(112);
|
6978 |
-
|
6979 |
-
// @@match logic
|
6980 |
-
fixRegExpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) {
|
6981 |
-
return [
|
6982 |
-
// `String.prototype.match` method
|
6983 |
-
// https://tc39.es/ecma262/#sec-string.prototype.match
|
6984 |
-
function match(regexp) {
|
6985 |
-
var O = requireObjectCoercible(this);
|
6986 |
-
var matcher = regexp == undefined ? undefined : regexp[MATCH];
|
6987 |
-
return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
|
6988 |
-
},
|
6989 |
-
// `RegExp.prototype[@@match]` method
|
6990 |
-
// https://tc39.es/ecma262/#sec-regexp.prototype-@@match
|
6991 |
-
function (regexp) {
|
6992 |
-
var res = maybeCallNative(nativeMatch, regexp, this);
|
6993 |
-
if (res.done) return res.value;
|
6994 |
-
|
6995 |
-
var rx = anObject(regexp);
|
6996 |
-
var S = String(this);
|
6997 |
-
|
6998 |
-
if (!rx.global) return regExpExec(rx, S);
|
6999 |
-
|
7000 |
-
var fullUnicode = rx.unicode;
|
7001 |
-
rx.lastIndex = 0;
|
7002 |
-
var A = [];
|
7003 |
-
var n = 0;
|
7004 |
-
var result;
|
7005 |
-
while ((result = regExpExec(rx, S)) !== null) {
|
7006 |
-
var matchStr = String(result[0]);
|
7007 |
-
A[n] = matchStr;
|
7008 |
-
if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
|
7009 |
-
n++;
|
7010 |
-
}
|
7011 |
-
return n === 0 ? null : A;
|
7012 |
-
}
|
7013 |
-
];
|
7014 |
-
});
|
7015 |
|
|
|
|
|
7016 |
|
7017 |
-
|
7018 |
-
|
7019 |
-
|
7020 |
|
7021 |
-
|
7022 |
-
|
7023 |
-
|
7024 |
-
|
|
|
|
|
7025 |
};
|
7026 |
|
7027 |
-
|
|
|
|
|
|
|
|
|
|
|
7028 |
}
|
7029 |
|
7030 |
-
|
|
|
|
|
7031 |
|
7032 |
-
|
7033 |
-
|
7034 |
-
|
|
|
7035 |
|
7036 |
-
|
7037 |
-
|
7038 |
-
|
7039 |
-
|
7040 |
-
var uid = __webpack_require__(55);
|
7041 |
-
var FREEZING = __webpack_require__(253);
|
7042 |
|
7043 |
-
var
|
7044 |
-
|
|
|
|
|
|
|
7045 |
|
7046 |
-
|
7047 |
-
|
7048 |
-
};
|
7049 |
|
7050 |
-
var
|
7051 |
-
defineProperty(it, METADATA, { value: {
|
7052 |
-
objectID: 'O' + ++id, // object ID
|
7053 |
-
weakData: {} // weak collections IDs
|
7054 |
-
} });
|
7055 |
-
};
|
7056 |
|
7057 |
-
var fastKey = function (it, create) {
|
7058 |
-
// return a primitive with prefix
|
7059 |
-
if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
|
7060 |
-
if (!has(it, METADATA)) {
|
7061 |
-
// can't set metadata to uncaught frozen object
|
7062 |
-
if (!isExtensible(it)) return 'F';
|
7063 |
-
// not necessary to add metadata
|
7064 |
-
if (!create) return 'E';
|
7065 |
-
// add missing metadata
|
7066 |
-
setMetadata(it);
|
7067 |
-
// return object ID
|
7068 |
-
} return it[METADATA].objectID;
|
7069 |
-
};
|
7070 |
|
7071 |
-
|
7072 |
-
if (!has(it, METADATA)) {
|
7073 |
-
// can't set metadata to uncaught frozen object
|
7074 |
-
if (!isExtensible(it)) return true;
|
7075 |
-
// not necessary to add metadata
|
7076 |
-
if (!create) return false;
|
7077 |
-
// add missing metadata
|
7078 |
-
setMetadata(it);
|
7079 |
-
// return the store of weak collections IDs
|
7080 |
-
} return it[METADATA].weakData;
|
7081 |
-
};
|
7082 |
|
7083 |
-
//
|
7084 |
-
var
|
7085 |
-
if (FREEZING && meta.REQUIRED && isExtensible(it) && !has(it, METADATA)) setMetadata(it);
|
7086 |
-
return it;
|
7087 |
-
};
|
7088 |
|
7089 |
-
|
7090 |
-
|
7091 |
-
fastKey: fastKey,
|
7092 |
-
getWeakData: getWeakData,
|
7093 |
-
onFreeze: onFreeze
|
7094 |
-
};
|
7095 |
|
7096 |
-
|
|
|
7097 |
|
|
|
|
|
7098 |
|
7099 |
-
|
7100 |
-
|
7101 |
-
/* 207 */
|
7102 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7103 |
|
7104 |
-
|
|
|
7105 |
|
7106 |
-
|
7107 |
-
|
7108 |
-
throw TypeError("The method doesn't accept regular expressions");
|
7109 |
-
} return it;
|
7110 |
-
};
|
7111 |
|
|
|
|
|
7112 |
|
7113 |
-
|
7114 |
-
|
7115 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7116 |
|
7117 |
-
|
|
|
7118 |
|
7119 |
-
|
7120 |
|
7121 |
-
module.exports = function (METHOD_NAME) {
|
7122 |
-
var regexp = /./;
|
7123 |
-
try {
|
7124 |
-
'/./'[METHOD_NAME](regexp);
|
7125 |
-
} catch (error1) {
|
7126 |
-
try {
|
7127 |
-
regexp[MATCH] = false;
|
7128 |
-
return '/./'[METHOD_NAME](regexp);
|
7129 |
-
} catch (error2) { /* empty */ }
|
7130 |
-
} return false;
|
7131 |
-
};
|
7132 |
|
7133 |
|
7134 |
-
/***/ }),
|
7135 |
-
/* 209 */
|
7136 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7137 |
|
7138 |
-
var DESCRIPTORS = __webpack_require__(13);
|
7139 |
-
var global = __webpack_require__(3);
|
7140 |
-
var isForced = __webpack_require__(74);
|
7141 |
-
var inheritIfRequired = __webpack_require__(156);
|
7142 |
-
var defineProperty = __webpack_require__(17).f;
|
7143 |
-
var getOwnPropertyNames = __webpack_require__(56).f;
|
7144 |
-
var isRegExp = __webpack_require__(144);
|
7145 |
-
var getFlags = __webpack_require__(114);
|
7146 |
-
var stickyHelpers = __webpack_require__(137);
|
7147 |
-
var redefine = __webpack_require__(27);
|
7148 |
-
var fails = __webpack_require__(6);
|
7149 |
-
var setInternalState = __webpack_require__(45).set;
|
7150 |
-
var setSpecies = __webpack_require__(153);
|
7151 |
-
var wellKnownSymbol = __webpack_require__(8);
|
7152 |
-
|
7153 |
-
var MATCH = wellKnownSymbol('match');
|
7154 |
-
var NativeRegExp = global.RegExp;
|
7155 |
-
var RegExpPrototype = NativeRegExp.prototype;
|
7156 |
-
var re1 = /a/g;
|
7157 |
-
var re2 = /a/g;
|
7158 |
-
|
7159 |
-
// "new" should create a new object, old webkit bug
|
7160 |
-
var CORRECT_NEW = new NativeRegExp(re1) !== re1;
|
7161 |
-
|
7162 |
-
var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;
|
7163 |
-
|
7164 |
-
var FORCED = DESCRIPTORS && isForced('RegExp', (!CORRECT_NEW || UNSUPPORTED_Y || fails(function () {
|
7165 |
-
re2[MATCH] = false;
|
7166 |
-
// RegExp constructor can alter flags and IsRegExp works correct with @@match
|
7167 |
-
return NativeRegExp(re1) != re1 || NativeRegExp(re2) == re2 || NativeRegExp(re1, 'i') != '/a/i';
|
7168 |
-
})));
|
7169 |
-
|
7170 |
-
// `RegExp` constructor
|
7171 |
-
// https://tc39.es/ecma262/#sec-regexp-constructor
|
7172 |
-
if (FORCED) {
|
7173 |
-
var RegExpWrapper = function RegExp(pattern, flags) {
|
7174 |
-
var thisIsRegExp = this instanceof RegExpWrapper;
|
7175 |
-
var patternIsRegExp = isRegExp(pattern);
|
7176 |
-
var flagsAreUndefined = flags === undefined;
|
7177 |
-
var sticky;
|
7178 |
-
|
7179 |
-
if (!thisIsRegExp && patternIsRegExp && pattern.constructor === RegExpWrapper && flagsAreUndefined) {
|
7180 |
-
return pattern;
|
7181 |
-
}
|
7182 |
-
|
7183 |
-
if (CORRECT_NEW) {
|
7184 |
-
if (patternIsRegExp && !flagsAreUndefined) pattern = pattern.source;
|
7185 |
-
} else if (pattern instanceof RegExpWrapper) {
|
7186 |
-
if (flagsAreUndefined) flags = getFlags.call(pattern);
|
7187 |
-
pattern = pattern.source;
|
7188 |
-
}
|
7189 |
-
|
7190 |
-
if (UNSUPPORTED_Y) {
|
7191 |
-
sticky = !!flags && flags.indexOf('y') > -1;
|
7192 |
-
if (sticky) flags = flags.replace(/y/g, '');
|
7193 |
-
}
|
7194 |
-
|
7195 |
-
var result = inheritIfRequired(
|
7196 |
-
CORRECT_NEW ? new NativeRegExp(pattern, flags) : NativeRegExp(pattern, flags),
|
7197 |
-
thisIsRegExp ? this : RegExpPrototype,
|
7198 |
-
RegExpWrapper
|
7199 |
-
);
|
7200 |
|
7201 |
-
if (UNSUPPORTED_Y && sticky) setInternalState(result, { sticky: sticky });
|
7202 |
|
7203 |
-
return result;
|
7204 |
-
};
|
7205 |
-
var proxy = function (key) {
|
7206 |
-
key in RegExpWrapper || defineProperty(RegExpWrapper, key, {
|
7207 |
-
configurable: true,
|
7208 |
-
get: function () { return NativeRegExp[key]; },
|
7209 |
-
set: function (it) { NativeRegExp[key] = it; }
|
7210 |
-
});
|
7211 |
-
};
|
7212 |
-
var keys = getOwnPropertyNames(NativeRegExp);
|
7213 |
-
var index = 0;
|
7214 |
-
while (keys.length > index) proxy(keys[index++]);
|
7215 |
-
RegExpPrototype.constructor = RegExpWrapper;
|
7216 |
-
RegExpWrapper.prototype = RegExpPrototype;
|
7217 |
-
redefine(global, 'RegExp', RegExpWrapper);
|
7218 |
-
}
|
7219 |
|
7220 |
-
|
7221 |
-
setSpecies('RegExp');
|
7222 |
|
|
|
7223 |
|
7224 |
-
|
7225 |
-
|
7226 |
-
|
7227 |
|
7228 |
-
"use strict";
|
7229 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return STORE_KEY; });
|
7230 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return API_NAMESPACE; });
|
7231 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return QUEUE_OPTION_NAME; });
|
7232 |
-
var STORE_KEY = 'wc/customer-effort-score';
|
7233 |
-
var API_NAMESPACE = '/wc-admin';
|
7234 |
-
var QUEUE_OPTION_NAME = 'woocommerce_ces_tracks_queue';
|
7235 |
|
7236 |
-
/***/ }),
|
7237 |
-
/* 211 */
|
7238 |
-
/***/ (function(module, exports) {
|
7239 |
|
7240 |
-
(function() { module.exports = window["wp"]["date"]; }());
|
7241 |
|
7242 |
-
/***/ }),
|
7243 |
-
/* 212 */
|
7244 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7245 |
|
7246 |
-
|
|
|
|
|
7247 |
|
7248 |
-
var aFunction = __webpack_require__(70);
|
7249 |
-
var isObject = __webpack_require__(10);
|
7250 |
|
7251 |
-
var slice = [].slice;
|
7252 |
-
var factories = {};
|
7253 |
|
7254 |
-
|
7255 |
-
|
7256 |
-
|
7257 |
-
// eslint-disable-next-line no-new-func -- we have no proper alternatives, IE8- only
|
7258 |
-
factories[argsLength] = Function('C,a', 'return new C(' + list.join(',') + ')');
|
7259 |
-
} return factories[argsLength](C, args);
|
7260 |
-
};
|
7261 |
|
7262 |
-
|
7263 |
-
|
7264 |
-
|
7265 |
-
|
7266 |
-
|
7267 |
-
|
7268 |
-
|
7269 |
-
|
7270 |
-
|
7271 |
-
|
7272 |
-
return
|
7273 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7274 |
|
|
|
7275 |
|
7276 |
-
|
7277 |
-
|
7278 |
-
|
|
|
|
|
|
|
|
|
|
|
7279 |
|
7280 |
-
|
7281 |
|
7282 |
-
|
7283 |
-
|
7284 |
-
F.prototype.constructor = null;
|
7285 |
-
return Object.getPrototypeOf(new F()) !== F.prototype;
|
7286 |
-
});
|
7287 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7288 |
|
7289 |
-
|
7290 |
-
|
7291 |
-
|
7292 |
|
7293 |
-
|
7294 |
-
|
7295 |
-
|
7296 |
-
|
7297 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7298 |
};
|
|
|
|
|
7299 |
|
|
|
7300 |
|
7301 |
-
|
7302 |
-
|
7303 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7304 |
|
7305 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7306 |
/**
|
7307 |
-
*
|
|
|
7308 |
*
|
7309 |
-
*
|
7310 |
-
*
|
|
|
7311 |
*/
|
7312 |
|
|
|
|
|
7313 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7314 |
|
7315 |
-
|
7316 |
|
7317 |
-
function
|
7318 |
-
|
7319 |
-
|
|
|
|
|
|
|
7320 |
|
7321 |
-
|
7322 |
-
|
7323 |
-
|
7324 |
-
|
7325 |
-
|
7326 |
-
|
7327 |
-
|
7328 |
-
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
7329 |
-
'Use PropTypes.checkPropTypes() to call them. ' +
|
7330 |
-
'Read more at http://fb.me/use-check-prop-types'
|
7331 |
-
);
|
7332 |
-
err.name = 'Invariant Violation';
|
7333 |
-
throw err;
|
7334 |
-
};
|
7335 |
-
shim.isRequired = shim;
|
7336 |
-
function getShim() {
|
7337 |
-
return shim;
|
7338 |
-
};
|
7339 |
-
// Important!
|
7340 |
-
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
|
7341 |
-
var ReactPropTypes = {
|
7342 |
-
array: shim,
|
7343 |
-
bool: shim,
|
7344 |
-
func: shim,
|
7345 |
-
number: shim,
|
7346 |
-
object: shim,
|
7347 |
-
string: shim,
|
7348 |
-
symbol: shim,
|
7349 |
|
7350 |
-
any: shim,
|
7351 |
-
arrayOf: getShim,
|
7352 |
-
element: shim,
|
7353 |
-
elementType: shim,
|
7354 |
-
instanceOf: getShim,
|
7355 |
-
node: shim,
|
7356 |
-
objectOf: getShim,
|
7357 |
-
oneOf: getShim,
|
7358 |
-
oneOfType: getShim,
|
7359 |
-
shape: getShim,
|
7360 |
-
exact: getShim,
|
7361 |
|
7362 |
-
|
7363 |
-
|
7364 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7365 |
|
7366 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
7367 |
|
7368 |
-
|
|
|
7369 |
};
|
|
|
|
|
|
|
7370 |
|
|
|
|
|
|
|
7371 |
|
7372 |
-
|
7373 |
-
|
7374 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7375 |
|
7376 |
-
|
7377 |
-
|
7378 |
-
* Copyright (c) 2013-present, Facebook, Inc.
|
7379 |
-
*
|
7380 |
-
* This source code is licensed under the MIT license found in the
|
7381 |
-
* LICENSE file in the root directory of this source tree.
|
7382 |
-
*/
|
7383 |
|
|
|
|
|
|
|
7384 |
|
|
|
|
|
7385 |
|
7386 |
-
|
|
|
7387 |
|
7388 |
-
|
|
|
|
|
7389 |
|
|
|
|
|
|
|
7390 |
|
7391 |
-
|
7392 |
-
|
7393 |
-
/* 218 */,
|
7394 |
-
/* 219 */,
|
7395 |
-
/* 220 */,
|
7396 |
-
/* 221 */
|
7397 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7398 |
|
7399 |
-
|
7400 |
|
7401 |
-
var DESCRIPTORS = __webpack_require__(13);
|
7402 |
-
var fails = __webpack_require__(6);
|
7403 |
-
var objectKeys = __webpack_require__(54);
|
7404 |
-
var getOwnPropertySymbolsModule = __webpack_require__(79);
|
7405 |
-
var propertyIsEnumerableModule = __webpack_require__(76);
|
7406 |
-
var toObject = __webpack_require__(38);
|
7407 |
-
var IndexedObject = __webpack_require__(71);
|
7408 |
|
7409 |
-
|
7410 |
-
|
|
|
7411 |
|
7412 |
-
// `Object.assign` method
|
7413 |
-
// https://tc39.es/ecma262/#sec-object.assign
|
7414 |
-
module.exports = !nativeAssign || fails(function () {
|
7415 |
-
// should have correct order of operations (Edge bug)
|
7416 |
-
if (DESCRIPTORS && nativeAssign({ b: 1 }, nativeAssign(defineProperty({}, 'a', {
|
7417 |
-
enumerable: true,
|
7418 |
-
get: function () {
|
7419 |
-
defineProperty(this, 'b', {
|
7420 |
-
value: 3,
|
7421 |
-
enumerable: false
|
7422 |
-
});
|
7423 |
-
}
|
7424 |
-
}), { b: 2 })).b !== 1) return true;
|
7425 |
-
// should work with symbols and should have deterministic property order (V8 bug)
|
7426 |
-
var A = {};
|
7427 |
-
var B = {};
|
7428 |
-
/* global Symbol -- required for testing */
|
7429 |
-
var symbol = Symbol();
|
7430 |
-
var alphabet = 'abcdefghijklmnopqrst';
|
7431 |
-
A[symbol] = 7;
|
7432 |
-
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
7433 |
-
return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;
|
7434 |
-
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
|
7435 |
-
var T = toObject(target);
|
7436 |
-
var argumentsLength = arguments.length;
|
7437 |
-
var index = 1;
|
7438 |
-
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
7439 |
-
var propertyIsEnumerable = propertyIsEnumerableModule.f;
|
7440 |
-
while (argumentsLength > index) {
|
7441 |
-
var S = IndexedObject(arguments[index++]);
|
7442 |
-
var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);
|
7443 |
-
var length = keys.length;
|
7444 |
-
var j = 0;
|
7445 |
-
var key;
|
7446 |
-
while (length > j) {
|
7447 |
-
key = keys[j++];
|
7448 |
-
if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key];
|
7449 |
-
}
|
7450 |
-
} return T;
|
7451 |
-
} : nativeAssign;
|
7452 |
|
7453 |
|
7454 |
-
|
7455 |
-
|
7456 |
-
|
7457 |
-
|
7458 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
7459 |
|
7460 |
-
"
|
7461 |
-
|
7462 |
-
|
7463 |
-
|
7464 |
-
|
7465 |
-
|
7466 |
-
|
7467 |
-
|
7468 |
-
|
7469 |
-
|
7470 |
-
|
7471 |
-
obj[key] = value;
|
7472 |
-
}
|
7473 |
|
7474 |
-
|
7475 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
7476 |
|
7477 |
-
|
7478 |
-
|
7479 |
-
|
|
|
7480 |
|
7481 |
-
|
7482 |
-
|
7483 |
-
|
7484 |
|
7485 |
-
function _objectWithoutProperties(source, excluded) {
|
7486 |
-
if (source == null) return {};
|
7487 |
-
var target = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(source, excluded);
|
7488 |
-
var key, i;
|
7489 |
|
7490 |
-
if (Object.getOwnPropertySymbols) {
|
7491 |
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
7492 |
|
7493 |
-
|
7494 |
-
|
7495 |
-
|
7496 |
-
|
7497 |
-
|
7498 |
-
|
|
|
|
|
|
|
|
|
|
|
7499 |
}
|
7500 |
|
7501 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7502 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
7503 |
|
7504 |
-
|
7505 |
-
|
7506 |
-
/* 227 */
|
7507 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7508 |
|
7509 |
-
|
|
|
|
|
7510 |
|
|
|
|
|
|
|
7511 |
|
7512 |
-
var
|
7513 |
-
|
7514 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7515 |
|
7516 |
-
var
|
7517 |
-
|
7518 |
-
|
7519 |
-
|
7520 |
-
|
7521 |
-
|
7522 |
-
|
7523 |
-
|
7524 |
-
|
7525 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7526 |
}
|
7527 |
-
}
|
7528 |
|
7529 |
-
|
7530 |
-
|
7531 |
-
|
7532 |
-
|
7533 |
-
}
|
|
|
|
|
7534 |
|
7535 |
-
|
|
|
7536 |
|
7537 |
-
|
7538 |
-
var defaults = {
|
7539 |
-
addQueryPrefix: false,
|
7540 |
-
allowDots: false,
|
7541 |
-
charset: 'utf-8',
|
7542 |
-
charsetSentinel: false,
|
7543 |
-
delimiter: '&',
|
7544 |
-
encode: true,
|
7545 |
-
encoder: utils.encode,
|
7546 |
-
encodeValuesOnly: false,
|
7547 |
-
format: defaultFormat,
|
7548 |
-
formatter: formats.formatters[defaultFormat],
|
7549 |
-
// deprecated
|
7550 |
-
indices: false,
|
7551 |
-
serializeDate: function serializeDate(date) {
|
7552 |
-
return toISO.call(date);
|
7553 |
-
},
|
7554 |
-
skipNulls: false,
|
7555 |
-
strictNullHandling: false
|
7556 |
-
};
|
7557 |
|
7558 |
-
var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
|
7559 |
-
return typeof v === 'string'
|
7560 |
-
|| typeof v === 'number'
|
7561 |
-
|| typeof v === 'boolean'
|
7562 |
-
|| typeof v === 'symbol'
|
7563 |
-
|| typeof v === 'bigint';
|
7564 |
-
};
|
7565 |
|
7566 |
-
var stringify = function stringify(
|
7567 |
-
object,
|
7568 |
-
prefix,
|
7569 |
-
generateArrayPrefix,
|
7570 |
-
strictNullHandling,
|
7571 |
-
skipNulls,
|
7572 |
-
encoder,
|
7573 |
-
filter,
|
7574 |
-
sort,
|
7575 |
-
allowDots,
|
7576 |
-
serializeDate,
|
7577 |
-
format,
|
7578 |
-
formatter,
|
7579 |
-
encodeValuesOnly,
|
7580 |
-
charset
|
7581 |
-
) {
|
7582 |
-
var obj = object;
|
7583 |
-
if (typeof filter === 'function') {
|
7584 |
-
obj = filter(prefix, obj);
|
7585 |
-
} else if (obj instanceof Date) {
|
7586 |
-
obj = serializeDate(obj);
|
7587 |
-
} else if (generateArrayPrefix === 'comma' && isArray(obj)) {
|
7588 |
-
obj = utils.maybeMap(obj, function (value) {
|
7589 |
-
if (value instanceof Date) {
|
7590 |
-
return serializeDate(value);
|
7591 |
-
}
|
7592 |
-
return value;
|
7593 |
-
});
|
7594 |
-
}
|
7595 |
|
7596 |
-
if (obj === null) {
|
7597 |
-
if (strictNullHandling) {
|
7598 |
-
return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix;
|
7599 |
-
}
|
7600 |
|
7601 |
-
obj = '';
|
7602 |
-
}
|
7603 |
|
7604 |
-
if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {
|
7605 |
-
if (encoder) {
|
7606 |
-
var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format);
|
7607 |
-
return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))];
|
7608 |
-
}
|
7609 |
-
return [formatter(prefix) + '=' + formatter(String(obj))];
|
7610 |
-
}
|
7611 |
|
7612 |
-
var values = [];
|
7613 |
|
7614 |
-
if (typeof obj === 'undefined') {
|
7615 |
-
return values;
|
7616 |
-
}
|
7617 |
|
7618 |
-
|
7619 |
-
if (generateArrayPrefix === 'comma' && isArray(obj)) {
|
7620 |
-
// we need to join elements in
|
7621 |
-
objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : undefined }];
|
7622 |
-
} else if (isArray(filter)) {
|
7623 |
-
objKeys = filter;
|
7624 |
-
} else {
|
7625 |
-
var keys = Object.keys(obj);
|
7626 |
-
objKeys = sort ? keys.sort(sort) : keys;
|
7627 |
-
}
|
7628 |
|
7629 |
-
|
7630 |
-
var key = objKeys[i];
|
7631 |
-
var value = typeof key === 'object' && key.value !== undefined ? key.value : obj[key];
|
7632 |
|
7633 |
-
|
7634 |
-
|
7635 |
-
|
7636 |
|
7637 |
-
var keyPrefix = isArray(obj)
|
7638 |
-
? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(prefix, key) : prefix
|
7639 |
-
: prefix + (allowDots ? '.' + key : '[' + key + ']');
|
7640 |
|
7641 |
-
pushToArray(values, stringify(
|
7642 |
-
value,
|
7643 |
-
keyPrefix,
|
7644 |
-
generateArrayPrefix,
|
7645 |
-
strictNullHandling,
|
7646 |
-
skipNulls,
|
7647 |
-
encoder,
|
7648 |
-
filter,
|
7649 |
-
sort,
|
7650 |
-
allowDots,
|
7651 |
-
serializeDate,
|
7652 |
-
format,
|
7653 |
-
formatter,
|
7654 |
-
encodeValuesOnly,
|
7655 |
-
charset
|
7656 |
-
));
|
7657 |
-
}
|
7658 |
|
7659 |
-
return values;
|
7660 |
-
};
|
7661 |
|
7662 |
-
var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
|
7663 |
-
if (!opts) {
|
7664 |
-
return defaults;
|
7665 |
-
}
|
7666 |
|
7667 |
-
if (opts.encoder !== null && opts.encoder !== undefined && typeof opts.encoder !== 'function') {
|
7668 |
-
throw new TypeError('Encoder has to be a function.');
|
7669 |
-
}
|
7670 |
|
7671 |
-
var charset = opts.charset || defaults.charset;
|
7672 |
-
if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
|
7673 |
-
throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
|
7674 |
-
}
|
7675 |
|
7676 |
-
var format = formats['default'];
|
7677 |
-
if (typeof opts.format !== 'undefined') {
|
7678 |
-
if (!has.call(formats.formatters, opts.format)) {
|
7679 |
-
throw new TypeError('Unknown format option provided.');
|
7680 |
-
}
|
7681 |
-
format = opts.format;
|
7682 |
-
}
|
7683 |
-
var formatter = formats.formatters[format];
|
7684 |
|
7685 |
-
var filter = defaults.filter;
|
7686 |
-
if (typeof opts.filter === 'function' || isArray(opts.filter)) {
|
7687 |
-
filter = opts.filter;
|
7688 |
-
}
|
7689 |
|
7690 |
-
|
7691 |
-
|
7692 |
-
|
7693 |
-
charset: charset,
|
7694 |
-
charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
|
7695 |
-
delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,
|
7696 |
-
encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,
|
7697 |
-
encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,
|
7698 |
-
encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,
|
7699 |
-
filter: filter,
|
7700 |
-
format: format,
|
7701 |
-
formatter: formatter,
|
7702 |
-
serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,
|
7703 |
-
skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,
|
7704 |
-
sort: typeof opts.sort === 'function' ? opts.sort : null,
|
7705 |
-
strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
|
7706 |
-
};
|
7707 |
-
};
|
7708 |
|
7709 |
-
module.exports = function (object, opts) {
|
7710 |
-
var obj = object;
|
7711 |
-
var options = normalizeStringifyOptions(opts);
|
7712 |
|
7713 |
-
var objKeys;
|
7714 |
-
var filter;
|
7715 |
|
7716 |
-
if (typeof options.filter === 'function') {
|
7717 |
-
filter = options.filter;
|
7718 |
-
obj = filter('', obj);
|
7719 |
-
} else if (isArray(options.filter)) {
|
7720 |
-
filter = options.filter;
|
7721 |
-
objKeys = filter;
|
7722 |
-
}
|
7723 |
|
7724 |
-
var keys = [];
|
7725 |
|
7726 |
-
|
7727 |
-
|
7728 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7729 |
|
7730 |
-
var arrayFormat;
|
7731 |
-
if (opts && opts.arrayFormat in arrayPrefixGenerators) {
|
7732 |
-
arrayFormat = opts.arrayFormat;
|
7733 |
-
} else if (opts && 'indices' in opts) {
|
7734 |
-
arrayFormat = opts.indices ? 'indices' : 'repeat';
|
7735 |
-
} else {
|
7736 |
-
arrayFormat = 'indices';
|
7737 |
-
}
|
7738 |
|
7739 |
-
|
|
|
7740 |
|
7741 |
-
|
7742 |
-
|
7743 |
-
}
|
7744 |
|
7745 |
-
|
7746 |
-
objKeys.sort(options.sort);
|
7747 |
-
}
|
7748 |
|
7749 |
-
|
7750 |
-
|
7751 |
|
7752 |
-
|
7753 |
-
continue;
|
7754 |
-
}
|
7755 |
-
pushToArray(keys, stringify(
|
7756 |
-
obj[key],
|
7757 |
-
key,
|
7758 |
-
generateArrayPrefix,
|
7759 |
-
options.strictNullHandling,
|
7760 |
-
options.skipNulls,
|
7761 |
-
options.encode ? options.encoder : null,
|
7762 |
-
options.filter,
|
7763 |
-
options.sort,
|
7764 |
-
options.allowDots,
|
7765 |
-
options.serializeDate,
|
7766 |
-
options.format,
|
7767 |
-
options.formatter,
|
7768 |
-
options.encodeValuesOnly,
|
7769 |
-
options.charset
|
7770 |
-
));
|
7771 |
-
}
|
7772 |
|
7773 |
-
|
7774 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7775 |
|
7776 |
-
|
7777 |
-
|
7778 |
-
|
7779 |
-
|
7780 |
-
|
7781 |
-
|
7782 |
-
prefix += 'utf8=%E2%9C%93&';
|
7783 |
-
}
|
7784 |
-
}
|
7785 |
|
7786 |
-
|
7787 |
-
|
|
|
|
|
|
|
7788 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7789 |
|
7790 |
-
|
7791 |
-
|
7792 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7793 |
|
7794 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7795 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7796 |
|
7797 |
-
|
|
|
7798 |
|
7799 |
-
|
7800 |
-
var
|
|
|
|
|
|
|
7801 |
|
7802 |
-
|
7803 |
-
|
7804 |
-
|
7805 |
-
|
7806 |
-
|
7807 |
-
|
7808 |
-
|
7809 |
-
|
7810 |
-
|
7811 |
-
|
7812 |
-
|
7813 |
-
|
7814 |
-
|
7815 |
-
|
7816 |
-
plainObjects: false,
|
7817 |
-
strictNullHandling: false
|
7818 |
-
};
|
7819 |
|
7820 |
-
|
7821 |
-
|
7822 |
-
|
7823 |
-
|
7824 |
-
}
|
7825 |
|
7826 |
-
var
|
7827 |
-
|
7828 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7829 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7830 |
|
7831 |
-
|
7832 |
-
|
|
|
7833 |
|
7834 |
-
|
7835 |
-
|
7836 |
-
|
7837 |
-
|
7838 |
-
|
7839 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7840 |
|
7841 |
-
|
7842 |
-
|
7843 |
|
7844 |
-
var
|
7845 |
-
|
7846 |
-
|
7847 |
-
|
7848 |
-
|
7849 |
-
|
7850 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
7851 |
|
7852 |
-
var charset = options.charset;
|
7853 |
-
if (options.charsetSentinel) {
|
7854 |
-
for (i = 0; i < parts.length; ++i) {
|
7855 |
-
if (parts[i].indexOf('utf8=') === 0) {
|
7856 |
-
if (parts[i] === charsetSentinel) {
|
7857 |
-
charset = 'utf-8';
|
7858 |
-
} else if (parts[i] === isoSentinel) {
|
7859 |
-
charset = 'iso-8859-1';
|
7860 |
-
}
|
7861 |
-
skipIndex = i;
|
7862 |
-
i = parts.length; // The eslint settings do not allow break;
|
7863 |
-
}
|
7864 |
-
}
|
7865 |
-
}
|
7866 |
|
7867 |
-
for (i = 0; i < parts.length; ++i) {
|
7868 |
-
if (i === skipIndex) {
|
7869 |
-
continue;
|
7870 |
-
}
|
7871 |
-
var part = parts[i];
|
7872 |
|
7873 |
-
var bracketEqualsPos = part.indexOf(']=');
|
7874 |
-
var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
|
7875 |
|
7876 |
-
var key, val;
|
7877 |
-
if (pos === -1) {
|
7878 |
-
key = options.decoder(part, defaults.decoder, charset, 'key');
|
7879 |
-
val = options.strictNullHandling ? null : '';
|
7880 |
-
} else {
|
7881 |
-
key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
|
7882 |
-
val = utils.maybeMap(
|
7883 |
-
parseArrayValue(part.slice(pos + 1), options),
|
7884 |
-
function (encodedVal) {
|
7885 |
-
return options.decoder(encodedVal, defaults.decoder, charset, 'value');
|
7886 |
-
}
|
7887 |
-
);
|
7888 |
-
}
|
7889 |
|
7890 |
-
if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
|
7891 |
-
val = interpretNumericEntities(val);
|
7892 |
-
}
|
7893 |
|
7894 |
-
if (part.indexOf('[]=') > -1) {
|
7895 |
-
val = isArray(val) ? [val] : val;
|
7896 |
-
}
|
7897 |
|
7898 |
-
if (has.call(obj, key)) {
|
7899 |
-
obj[key] = utils.combine(obj[key], val);
|
7900 |
-
} else {
|
7901 |
-
obj[key] = val;
|
7902 |
-
}
|
7903 |
-
}
|
7904 |
|
7905 |
-
|
7906 |
-
};
|
7907 |
|
7908 |
-
|
7909 |
-
var leaf = valuesParsed ? val : parseArrayValue(val, options);
|
7910 |
|
7911 |
-
|
7912 |
-
|
7913 |
-
|
7914 |
|
7915 |
-
if (root === '[]' && options.parseArrays) {
|
7916 |
-
obj = [].concat(leaf);
|
7917 |
-
} else {
|
7918 |
-
obj = options.plainObjects ? Object.create(null) : {};
|
7919 |
-
var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
|
7920 |
-
var index = parseInt(cleanRoot, 10);
|
7921 |
-
if (!options.parseArrays && cleanRoot === '') {
|
7922 |
-
obj = { 0: leaf };
|
7923 |
-
} else if (
|
7924 |
-
!isNaN(index)
|
7925 |
-
&& root !== cleanRoot
|
7926 |
-
&& String(index) === cleanRoot
|
7927 |
-
&& index >= 0
|
7928 |
-
&& (options.parseArrays && index <= options.arrayLimit)
|
7929 |
-
) {
|
7930 |
-
obj = [];
|
7931 |
-
obj[index] = leaf;
|
7932 |
-
} else {
|
7933 |
-
obj[cleanRoot] = leaf;
|
7934 |
-
}
|
7935 |
-
}
|
7936 |
|
7937 |
-
leaf = obj;
|
7938 |
-
}
|
7939 |
|
7940 |
-
return leaf;
|
7941 |
-
};
|
7942 |
|
7943 |
-
var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
|
7944 |
-
if (!givenKey) {
|
7945 |
-
return;
|
7946 |
-
}
|
7947 |
|
7948 |
-
|
7949 |
-
|
|
|
7950 |
|
7951 |
-
// The regex chunks
|
7952 |
|
7953 |
-
var brackets = /(\[[^[\]]*])/;
|
7954 |
-
var child = /(\[[^[\]]*])/g;
|
7955 |
|
7956 |
-
// Get the parent
|
7957 |
|
7958 |
-
|
7959 |
-
|
|
|
7960 |
|
7961 |
-
// Stash the parent if it exists
|
7962 |
|
7963 |
-
var keys = [];
|
7964 |
-
if (parent) {
|
7965 |
-
// If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
|
7966 |
-
if (!options.plainObjects && has.call(Object.prototype, parent)) {
|
7967 |
-
if (!options.allowPrototypes) {
|
7968 |
-
return;
|
7969 |
-
}
|
7970 |
-
}
|
7971 |
|
7972 |
-
keys.push(parent);
|
7973 |
-
}
|
7974 |
|
7975 |
-
// Loop through children appending to the array until we hit depth
|
7976 |
|
7977 |
-
|
7978 |
-
|
7979 |
-
i += 1;
|
7980 |
-
if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
|
7981 |
-
if (!options.allowPrototypes) {
|
7982 |
-
return;
|
7983 |
-
}
|
7984 |
-
}
|
7985 |
-
keys.push(segment[1]);
|
7986 |
-
}
|
7987 |
|
7988 |
-
|
7989 |
|
7990 |
-
|
7991 |
-
|
7992 |
-
}
|
7993 |
|
7994 |
-
|
7995 |
-
};
|
7996 |
|
7997 |
-
|
7998 |
-
|
7999 |
-
|
8000 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8001 |
|
8002 |
-
|
8003 |
-
|
8004 |
-
|
8005 |
-
|
8006 |
-
|
8007 |
-
|
8008 |
}
|
8009 |
-
|
8010 |
-
|
8011 |
-
|
8012 |
-
|
8013 |
-
|
8014 |
-
|
8015 |
-
|
8016 |
-
|
8017 |
-
|
8018 |
-
|
8019 |
-
|
8020 |
-
|
8021 |
-
|
8022 |
-
|
8023 |
-
|
8024 |
-
parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
|
8025 |
-
parseArrays: opts.parseArrays !== false,
|
8026 |
-
plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
|
8027 |
-
strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
|
8028 |
-
};
|
8029 |
-
};
|
8030 |
-
|
8031 |
-
module.exports = function (str, opts) {
|
8032 |
-
var options = normalizeParseOptions(opts);
|
8033 |
|
8034 |
-
|
8035 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8036 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
8037 |
|
8038 |
-
|
8039 |
-
|
|
|
8040 |
|
8041 |
-
|
8042 |
|
8043 |
-
|
8044 |
-
|
8045 |
-
|
8046 |
-
var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');
|
8047 |
-
obj = utils.merge(obj, newObj, options);
|
8048 |
-
}
|
8049 |
|
8050 |
-
|
8051 |
-
}
|
|
|
|
|
|
|
|
|
8052 |
|
|
|
|
|
|
|
|
|
8053 |
|
8054 |
-
|
8055 |
-
/* 229 */
|
8056 |
-
/***/ (function(module, exports, __webpack_require__) {
|
8057 |
|
8058 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8059 |
|
8060 |
-
|
8061 |
-
|
8062 |
-
var isForced = __webpack_require__(74);
|
8063 |
-
var redefine = __webpack_require__(27);
|
8064 |
-
var InternalMetadataModule = __webpack_require__(205);
|
8065 |
-
var iterate = __webpack_require__(154);
|
8066 |
-
var anInstance = __webpack_require__(136);
|
8067 |
-
var isObject = __webpack_require__(10);
|
8068 |
-
var fails = __webpack_require__(6);
|
8069 |
-
var checkCorrectnessOfIteration = __webpack_require__(165);
|
8070 |
-
var setToStringTag = __webpack_require__(90);
|
8071 |
-
var inheritIfRequired = __webpack_require__(156);
|
8072 |
-
|
8073 |
-
module.exports = function (CONSTRUCTOR_NAME, wrapper, common) {
|
8074 |
-
var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;
|
8075 |
-
var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;
|
8076 |
-
var ADDER = IS_MAP ? 'set' : 'add';
|
8077 |
-
var NativeConstructor = global[CONSTRUCTOR_NAME];
|
8078 |
-
var NativePrototype = NativeConstructor && NativeConstructor.prototype;
|
8079 |
-
var Constructor = NativeConstructor;
|
8080 |
-
var exported = {};
|
8081 |
-
|
8082 |
-
var fixMethod = function (KEY) {
|
8083 |
-
var nativeMethod = NativePrototype[KEY];
|
8084 |
-
redefine(NativePrototype, KEY,
|
8085 |
-
KEY == 'add' ? function add(value) {
|
8086 |
-
nativeMethod.call(this, value === 0 ? 0 : value);
|
8087 |
-
return this;
|
8088 |
-
} : KEY == 'delete' ? function (key) {
|
8089 |
-
return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);
|
8090 |
-
} : KEY == 'get' ? function get(key) {
|
8091 |
-
return IS_WEAK && !isObject(key) ? undefined : nativeMethod.call(this, key === 0 ? 0 : key);
|
8092 |
-
} : KEY == 'has' ? function has(key) {
|
8093 |
-
return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);
|
8094 |
-
} : function set(key, value) {
|
8095 |
-
nativeMethod.call(this, key === 0 ? 0 : key, value);
|
8096 |
-
return this;
|
8097 |
-
}
|
8098 |
-
);
|
8099 |
-
};
|
8100 |
|
8101 |
-
|
8102 |
-
|
8103 |
-
|
8104 |
-
|
8105 |
-
|
8106 |
-
|
|
|
|
|
|
|
8107 |
|
8108 |
-
if (REPLACE) {
|
8109 |
-
// create collection constructor
|
8110 |
-
Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);
|
8111 |
-
InternalMetadataModule.REQUIRED = true;
|
8112 |
-
} else if (isForced(CONSTRUCTOR_NAME, true)) {
|
8113 |
-
var instance = new Constructor();
|
8114 |
-
// early implementations not supports chaining
|
8115 |
-
var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;
|
8116 |
-
// V8 ~ Chromium 40- weak-collections throws on primitives, but should return false
|
8117 |
-
var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });
|
8118 |
-
// most early implementations doesn't supports iterables, most modern - not close it correctly
|
8119 |
-
// eslint-disable-next-line no-new -- required for testing
|
8120 |
-
var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); });
|
8121 |
-
// for early implementations -0 and +0 not the same
|
8122 |
-
var BUGGY_ZERO = !IS_WEAK && fails(function () {
|
8123 |
-
// V8 ~ Chromium 42- fails only with 5+ elements
|
8124 |
-
var $instance = new NativeConstructor();
|
8125 |
-
var index = 5;
|
8126 |
-
while (index--) $instance[ADDER](index, index);
|
8127 |
-
return !$instance.has(-0);
|
8128 |
-
});
|
8129 |
|
8130 |
-
if (!ACCEPT_ITERABLES) {
|
8131 |
-
Constructor = wrapper(function (dummy, iterable) {
|
8132 |
-
anInstance(dummy, Constructor, CONSTRUCTOR_NAME);
|
8133 |
-
var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);
|
8134 |
-
if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
|
8135 |
-
return that;
|
8136 |
-
});
|
8137 |
-
Constructor.prototype = NativePrototype;
|
8138 |
-
NativePrototype.constructor = Constructor;
|
8139 |
-
}
|
8140 |
|
8141 |
-
if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {
|
8142 |
-
fixMethod('delete');
|
8143 |
-
fixMethod('has');
|
8144 |
-
IS_MAP && fixMethod('get');
|
8145 |
-
}
|
8146 |
|
8147 |
-
if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);
|
8148 |
|
8149 |
-
// weak collections should not contains .clear method
|
8150 |
-
if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear;
|
8151 |
-
}
|
8152 |
|
8153 |
-
exported[CONSTRUCTOR_NAME] = Constructor;
|
8154 |
-
$({ global: true, forced: Constructor != NativeConstructor }, exported);
|
8155 |
|
8156 |
-
|
8157 |
|
8158 |
-
|
8159 |
|
8160 |
-
|
8161 |
-
|
|
|
8162 |
|
8163 |
|
8164 |
-
|
8165 |
-
|
8166 |
-
/* 231 */
|
8167 |
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
8168 |
|
8169 |
-
|
8170 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getCountryCode; });
|
8171 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getCurrencyRegion; });
|
8172 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return getProductIdsForCart; });
|
8173 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getCategorizedOnboardingProducts; });
|
8174 |
-
/* unused harmony export getProductList */
|
8175 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return getPriceValue; });
|
8176 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return isWCAdmin; });
|
8177 |
-
/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44);
|
8178 |
-
/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__);
|
8179 |
-
/* harmony import */ var core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(177);
|
8180 |
-
/* harmony import */ var core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_1__);
|
8181 |
-
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(88);
|
8182 |
-
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_2__);
|
8183 |
-
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(107);
|
8184 |
-
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_3__);
|
8185 |
-
/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(140);
|
8186 |
-
/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_4__);
|
8187 |
-
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(51);
|
8188 |
-
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_5__);
|
8189 |
-
/* harmony import */ var core_js_modules_es_set_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(248);
|
8190 |
-
/* harmony import */ var core_js_modules_es_set_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_set_js__WEBPACK_IMPORTED_MODULE_6__);
|
8191 |
-
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(100);
|
8192 |
-
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_7__);
|
8193 |
-
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(151);
|
8194 |
-
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_8__);
|
8195 |
-
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(123);
|
8196 |
-
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_9__);
|
8197 |
-
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(146);
|
8198 |
-
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10__);
|
8199 |
-
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(66);
|
8200 |
-
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_11__);
|
8201 |
-
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(49);
|
8202 |
-
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_12__);
|
8203 |
-
/* harmony import */ var core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(192);
|
8204 |
-
/* harmony import */ var core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_13__);
|
8205 |
-
/* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(178);
|
8206 |
-
/* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_14__);
|
8207 |
-
/* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(135);
|
8208 |
-
/* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_15__);
|
8209 |
-
/* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(132);
|
8210 |
-
/* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_16__);
|
8211 |
-
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(5);
|
8212 |
-
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_17__);
|
8213 |
-
/* harmony import */ var _woocommerce_wc_admin_settings__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(85);
|
8214 |
|
|
|
|
|
8215 |
|
|
|
|
|
8216 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8217 |
|
|
|
|
|
8218 |
|
|
|
|
|
|
|
|
|
8219 |
|
|
|
|
|
8220 |
|
|
|
|
|
8221 |
|
|
|
|
|
8222 |
|
|
|
|
|
8223 |
|
|
|
|
|
8224 |
|
|
|
8225 |
|
8226 |
|
8227 |
|
@@ -8235,3955 +7386,3845 @@ module.exports = function (CONSTRUCTOR_NAME, wrapper, common) {
|
|
8235 |
|
8236 |
|
8237 |
/**
|
8238 |
-
*
|
8239 |
-
*
|
8240 |
-
* @param {string} countryState Country state string, e.g. US:GA.
|
8241 |
-
* @return {string} Country string.
|
8242 |
*/
|
8243 |
|
8244 |
-
function getCountryCode(countryState) {
|
8245 |
-
if (!countryState) {
|
8246 |
-
return null;
|
8247 |
-
}
|
8248 |
-
|
8249 |
-
return countryState.split(':')[0];
|
8250 |
-
}
|
8251 |
-
function getCurrencyRegion(countryState) {
|
8252 |
-
var region = getCountryCode(countryState);
|
8253 |
-
var euCountries = Object(lodash__WEBPACK_IMPORTED_MODULE_17__["without"])(Object(_woocommerce_wc_admin_settings__WEBPACK_IMPORTED_MODULE_18__[/* getSetting */ "g"])('onboarding', {
|
8254 |
-
euCountries: []
|
8255 |
-
}).euCountries, 'GB');
|
8256 |
|
8257 |
-
if (euCountries.includes(region)) {
|
8258 |
-
region = 'EU';
|
8259 |
-
}
|
8260 |
|
8261 |
-
return region;
|
8262 |
-
}
|
8263 |
/**
|
8264 |
-
*
|
8265 |
-
*
|
8266 |
-
* @param {Object} profileItems Onboarding profile.
|
8267 |
-
* @param {boolean} includeInstalledItems Include installed items in returned product IDs.
|
8268 |
-
* @param {Array} installedPlugins Installed plugins.
|
8269 |
-
* @return {Array} Product Ids.
|
8270 |
*/
|
8271 |
|
8272 |
-
|
8273 |
-
var includeInstalledItems = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
8274 |
-
var installedPlugins = arguments.length > 2 ? arguments[2] : undefined;
|
8275 |
-
var productList = getProductList(profileItems, includeInstalledItems, installedPlugins);
|
8276 |
-
var productIds = productList.map(function (product) {
|
8277 |
-
return product.id || product.product;
|
8278 |
-
});
|
8279 |
-
return productIds;
|
8280 |
-
}
|
8281 |
/**
|
8282 |
-
*
|
8283 |
*
|
8284 |
-
* @param
|
8285 |
-
* @param
|
8286 |
-
* @
|
|
|
|
|
|
|
8287 |
*/
|
8288 |
|
8289 |
-
function
|
8290 |
-
var
|
8291 |
-
|
8292 |
-
|
|
|
|
|
|
|
8293 |
|
8294 |
-
var
|
|
|
|
|
|
|
|
|
8295 |
|
8296 |
-
|
8297 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8298 |
|
8299 |
-
|
8300 |
-
|
8301 |
-
|
8302 |
-
|
8303 |
-
|
8304 |
-
}
|
8305 |
-
|
8306 |
-
|
8307 |
-
|
8308 |
-
|
8309 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8310 |
|
8311 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
8312 |
});
|
8313 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8314 |
}
|
8315 |
-
/**
|
8316 |
-
* Gets a product list for items based on the product types and theme selected in the onboarding profiler.
|
8317 |
-
*
|
8318 |
-
* @param {Object} profileItems Onboarding profile.
|
8319 |
-
* @param {boolean} includeInstalledItems Include installed items in returned product list.
|
8320 |
-
* @param {Array} installedPlugins Installed plugins.
|
8321 |
-
* @return {Array} Products.
|
8322 |
-
*/
|
8323 |
|
8324 |
-
|
8325 |
-
|
8326 |
-
|
8327 |
-
|
8328 |
-
var productList = []; // The population of onboarding.productTypes only happens if the task list should be shown
|
8329 |
-
// so bail early if it isn't present.
|
8330 |
|
8331 |
-
|
8332 |
-
return productList;
|
8333 |
-
}
|
8334 |
|
8335 |
-
var productTypes = profileItems.product_types || [];
|
8336 |
-
productTypes.forEach(function (productType) {
|
8337 |
-
if (onboarding.productTypes[productType] && onboarding.productTypes[productType].product && (includeInstalledItems || !installedPlugins.includes(onboarding.productTypes[productType].slug))) {
|
8338 |
-
productList.push(onboarding.productTypes[productType]);
|
8339 |
-
}
|
8340 |
-
});
|
8341 |
-
var theme = onboarding.themes.find(function (themeData) {
|
8342 |
-
return themeData.slug === profileItems.theme;
|
8343 |
-
});
|
8344 |
|
8345 |
-
if (theme && theme.id && getPriceValue(theme.price) > 0 && (includeInstalledItems || !theme.is_installed)) {
|
8346 |
-
productList.push(theme);
|
8347 |
-
}
|
8348 |
|
8349 |
-
return productList;
|
8350 |
-
}
|
8351 |
-
/**
|
8352 |
-
* Get the value of a price from a string, removing any non-numeric characters.
|
8353 |
-
*
|
8354 |
-
* @param {string} string Price string.
|
8355 |
-
* @return {number} Number value.
|
8356 |
-
*/
|
8357 |
|
8358 |
-
|
8359 |
-
|
8360 |
-
|
|
|
|
|
|
|
|
|
8361 |
/**
|
8362 |
-
*
|
8363 |
-
*
|
8364 |
-
* @param {*} url - the url to test
|
8365 |
-
* @return {boolean} true if the url is a wc-admin URL
|
8366 |
*/
|
8367 |
|
8368 |
-
function isWCAdmin(url) {
|
8369 |
-
return /admin.php\?page=wc-admin/.test(url);
|
8370 |
-
}
|
8371 |
|
8372 |
-
/***/ }),
|
8373 |
-
/* 232 */,
|
8374 |
-
/* 233 */
|
8375 |
-
/***/ (function(module, exports) {
|
8376 |
|
8377 |
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
8378 |
-
if (source == null) return {};
|
8379 |
-
var target = {};
|
8380 |
-
var sourceKeys = Object.keys(source);
|
8381 |
-
var key, i;
|
8382 |
|
8383 |
-
for (i = 0; i < sourceKeys.length; i++) {
|
8384 |
-
key = sourceKeys[i];
|
8385 |
-
if (excluded.indexOf(key) >= 0) continue;
|
8386 |
-
target[key] = source[key];
|
8387 |
-
}
|
8388 |
|
8389 |
-
return target;
|
8390 |
-
}
|
8391 |
|
8392 |
-
|
|
|
|
|
8393 |
|
8394 |
-
/***/ }),
|
8395 |
-
/* 234 */
|
8396 |
-
/***/ (function(module, exports, __webpack_require__) {
|
8397 |
|
8398 |
-
"use strict";
|
8399 |
|
8400 |
-
var bind = __webpack_require__(94);
|
8401 |
-
var toObject = __webpack_require__(38);
|
8402 |
-
var callWithSafeIterationClosing = __webpack_require__(252);
|
8403 |
-
var isArrayIteratorMethod = __webpack_require__(171);
|
8404 |
-
var toLength = __webpack_require__(34);
|
8405 |
-
var createProperty = __webpack_require__(102);
|
8406 |
-
var getIteratorMethod = __webpack_require__(155);
|
8407 |
-
|
8408 |
-
// `Array.from` method implementation
|
8409 |
-
// https://tc39.es/ecma262/#sec-array.from
|
8410 |
-
module.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
|
8411 |
-
var O = toObject(arrayLike);
|
8412 |
-
var C = typeof this == 'function' ? this : Array;
|
8413 |
-
var argumentsLength = arguments.length;
|
8414 |
-
var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
|
8415 |
-
var mapping = mapfn !== undefined;
|
8416 |
-
var iteratorMethod = getIteratorMethod(O);
|
8417 |
-
var index = 0;
|
8418 |
-
var length, result, step, iterator, next, value;
|
8419 |
-
if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);
|
8420 |
-
// if the target is not iterable or it's an array with the default iterator - use a simple case
|
8421 |
-
if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) {
|
8422 |
-
iterator = iteratorMethod.call(O);
|
8423 |
-
next = iterator.next;
|
8424 |
-
result = new C();
|
8425 |
-
for (;!(step = next.call(iterator)).done; index++) {
|
8426 |
-
value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
|
8427 |
-
createProperty(result, index, value);
|
8428 |
-
}
|
8429 |
-
} else {
|
8430 |
-
length = toLength(O.length);
|
8431 |
-
result = new C(length);
|
8432 |
-
for (;length > index; index++) {
|
8433 |
-
value = mapping ? mapfn(O[index], index) : O[index];
|
8434 |
-
createProperty(result, index, value);
|
8435 |
-
}
|
8436 |
-
}
|
8437 |
-
result.length = index;
|
8438 |
-
return result;
|
8439 |
-
};
|
8440 |
|
|
|
|
|
8441 |
|
8442 |
-
|
8443 |
-
/* 235 */
|
8444 |
-
/***/ (function(module, exports, __webpack_require__) {
|
8445 |
|
8446 |
-
|
|
|
8447 |
|
8448 |
-
|
8449 |
-
|
8450 |
-
var redefineAll = __webpack_require__(152);
|
8451 |
-
var bind = __webpack_require__(94);
|
8452 |
-
var anInstance = __webpack_require__(136);
|
8453 |
-
var iterate = __webpack_require__(154);
|
8454 |
-
var defineIterator = __webpack_require__(166);
|
8455 |
-
var setSpecies = __webpack_require__(153);
|
8456 |
-
var DESCRIPTORS = __webpack_require__(13);
|
8457 |
-
var fastKey = __webpack_require__(205).fastKey;
|
8458 |
-
var InternalStateModule = __webpack_require__(45);
|
8459 |
-
|
8460 |
-
var setInternalState = InternalStateModule.set;
|
8461 |
-
var internalStateGetterFor = InternalStateModule.getterFor;
|
8462 |
|
8463 |
-
|
8464 |
-
|
8465 |
-
|
8466 |
-
|
8467 |
-
|
8468 |
-
|
8469 |
-
|
8470 |
-
|
8471 |
-
|
8472 |
-
|
|
|
|
|
8473 |
});
|
8474 |
-
|
8475 |
-
|
8476 |
-
});
|
8477 |
-
|
8478 |
-
var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);
|
8479 |
|
8480 |
-
|
8481 |
-
|
8482 |
-
var entry = getEntry(that, key);
|
8483 |
-
var previous, index;
|
8484 |
-
// change existing entry
|
8485 |
-
if (entry) {
|
8486 |
-
entry.value = value;
|
8487 |
-
// create new entry
|
8488 |
-
} else {
|
8489 |
-
state.last = entry = {
|
8490 |
-
index: index = fastKey(key, true),
|
8491 |
-
key: key,
|
8492 |
-
value: value,
|
8493 |
-
previous: previous = state.last,
|
8494 |
-
next: undefined,
|
8495 |
-
removed: false
|
8496 |
-
};
|
8497 |
-
if (!state.first) state.first = entry;
|
8498 |
-
if (previous) previous.next = entry;
|
8499 |
-
if (DESCRIPTORS) state.size++;
|
8500 |
-
else that.size++;
|
8501 |
-
// add to index
|
8502 |
-
if (index !== 'F') state.index[index] = entry;
|
8503 |
-
} return that;
|
8504 |
-
};
|
8505 |
|
8506 |
-
|
8507 |
-
|
8508 |
-
|
8509 |
-
|
8510 |
-
|
8511 |
-
if (index !== 'F') return state.index[index];
|
8512 |
-
// frozen object case
|
8513 |
-
for (entry = state.first; entry; entry = entry.next) {
|
8514 |
-
if (entry.key == key) return entry;
|
8515 |
-
}
|
8516 |
-
};
|
8517 |
|
8518 |
-
|
8519 |
-
|
8520 |
-
|
8521 |
-
|
8522 |
-
|
8523 |
-
|
8524 |
-
|
8525 |
-
|
8526 |
-
|
8527 |
-
|
8528 |
-
|
8529 |
-
|
8530 |
-
|
8531 |
-
|
8532 |
-
|
8533 |
-
|
8534 |
-
|
8535 |
-
},
|
8536 |
-
// 23.1.3.3 Map.prototype.delete(key)
|
8537 |
-
// 23.2.3.4 Set.prototype.delete(value)
|
8538 |
-
'delete': function (key) {
|
8539 |
-
var that = this;
|
8540 |
-
var state = getInternalState(that);
|
8541 |
-
var entry = getEntry(that, key);
|
8542 |
-
if (entry) {
|
8543 |
-
var next = entry.next;
|
8544 |
-
var prev = entry.previous;
|
8545 |
-
delete state.index[entry.index];
|
8546 |
-
entry.removed = true;
|
8547 |
-
if (prev) prev.next = next;
|
8548 |
-
if (next) next.previous = prev;
|
8549 |
-
if (state.first == entry) state.first = next;
|
8550 |
-
if (state.last == entry) state.last = prev;
|
8551 |
-
if (DESCRIPTORS) state.size--;
|
8552 |
-
else that.size--;
|
8553 |
-
} return !!entry;
|
8554 |
-
},
|
8555 |
-
// 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)
|
8556 |
-
// 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)
|
8557 |
-
forEach: function forEach(callbackfn /* , that = undefined */) {
|
8558 |
-
var state = getInternalState(this);
|
8559 |
-
var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
|
8560 |
-
var entry;
|
8561 |
-
while (entry = entry ? entry.next : state.first) {
|
8562 |
-
boundFunction(entry.value, entry.key, this);
|
8563 |
-
// revert to the last existing entry
|
8564 |
-
while (entry && entry.removed) entry = entry.previous;
|
8565 |
-
}
|
8566 |
-
},
|
8567 |
-
// 23.1.3.7 Map.prototype.has(key)
|
8568 |
-
// 23.2.3.7 Set.prototype.has(value)
|
8569 |
-
has: function has(key) {
|
8570 |
-
return !!getEntry(this, key);
|
8571 |
-
}
|
8572 |
-
});
|
8573 |
|
8574 |
-
|
8575 |
-
// 23.1.3.6 Map.prototype.get(key)
|
8576 |
-
get: function get(key) {
|
8577 |
-
var entry = getEntry(this, key);
|
8578 |
-
return entry && entry.value;
|
8579 |
-
},
|
8580 |
-
// 23.1.3.9 Map.prototype.set(key, value)
|
8581 |
-
set: function set(key, value) {
|
8582 |
-
return define(this, key === 0 ? 0 : key, value);
|
8583 |
-
}
|
8584 |
-
} : {
|
8585 |
-
// 23.2.3.1 Set.prototype.add(value)
|
8586 |
-
add: function add(value) {
|
8587 |
-
return define(this, value = value === 0 ? 0 : value, value);
|
8588 |
-
}
|
8589 |
-
});
|
8590 |
-
if (DESCRIPTORS) defineProperty(C.prototype, 'size', {
|
8591 |
-
get: function () {
|
8592 |
-
return getInternalState(this).size;
|
8593 |
-
}
|
8594 |
-
});
|
8595 |
-
return C;
|
8596 |
-
},
|
8597 |
-
setStrong: function (C, CONSTRUCTOR_NAME, IS_MAP) {
|
8598 |
-
var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';
|
8599 |
-
var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME);
|
8600 |
-
var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME);
|
8601 |
-
// add .keys, .values, .entries, [@@iterator]
|
8602 |
-
// 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11
|
8603 |
-
defineIterator(C, CONSTRUCTOR_NAME, function (iterated, kind) {
|
8604 |
-
setInternalState(this, {
|
8605 |
-
type: ITERATOR_NAME,
|
8606 |
-
target: iterated,
|
8607 |
-
state: getInternalCollectionState(iterated),
|
8608 |
-
kind: kind,
|
8609 |
-
last: undefined
|
8610 |
-
});
|
8611 |
-
}, function () {
|
8612 |
-
var state = getInternalIteratorState(this);
|
8613 |
-
var kind = state.kind;
|
8614 |
-
var entry = state.last;
|
8615 |
-
// revert to the last existing entry
|
8616 |
-
while (entry && entry.removed) entry = entry.previous;
|
8617 |
-
// get next entry
|
8618 |
-
if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {
|
8619 |
-
// or finish the iteration
|
8620 |
-
state.target = undefined;
|
8621 |
-
return { value: undefined, done: true };
|
8622 |
-
}
|
8623 |
-
// return step by kind
|
8624 |
-
if (kind == 'keys') return { value: entry.key, done: false };
|
8625 |
-
if (kind == 'values') return { value: entry.value, done: false };
|
8626 |
-
return { value: [entry.key, entry.value], done: false };
|
8627 |
-
}, IS_MAP ? 'entries' : 'values', !IS_MAP, true);
|
8628 |
|
8629 |
-
// add [@@species], 23.1.2.2, 23.2.2.2
|
8630 |
-
setSpecies(CONSTRUCTOR_NAME);
|
8631 |
-
}
|
8632 |
-
};
|
8633 |
|
8634 |
|
8635 |
-
/***/ }),
|
8636 |
-
/* 236 */,
|
8637 |
-
/* 237 */,
|
8638 |
-
/* 238 */,
|
8639 |
-
/* 239 */,
|
8640 |
-
/* 240 */,
|
8641 |
-
/* 241 */,
|
8642 |
-
/* 242 */,
|
8643 |
-
/* 243 */,
|
8644 |
-
/* 244 */,
|
8645 |
-
/* 245 */,
|
8646 |
-
/* 246 */,
|
8647 |
-
/* 247 */
|
8648 |
-
/***/ (function(module, exports) {
|
8649 |
|
8650 |
-
(function() { module.exports = window["wc"]["currency"]; }());
|
8651 |
|
8652 |
-
/***/ }),
|
8653 |
-
/* 248 */
|
8654 |
-
/***/ (function(module, exports, __webpack_require__) {
|
8655 |
|
8656 |
-
"use strict";
|
8657 |
|
8658 |
-
var collection = __webpack_require__(229);
|
8659 |
-
var collectionStrong = __webpack_require__(235);
|
8660 |
|
8661 |
-
// `Set` constructor
|
8662 |
-
// https://tc39.es/ecma262/#sec-set-objects
|
8663 |
-
module.exports = collection('Set', function (init) {
|
8664 |
-
return function Set() { return init(this, arguments.length ? arguments[0] : undefined); };
|
8665 |
-
}, collectionStrong);
|
8666 |
|
8667 |
|
8668 |
-
|
8669 |
-
/* 249 */
|
8670 |
-
/***/ (function(module, exports, __webpack_require__) {
|
8671 |
|
8672 |
-
var
|
8673 |
-
var objectKeys = __webpack_require__(54);
|
8674 |
-
var toIndexedObject = __webpack_require__(21);
|
8675 |
-
var propertyIsEnumerable = __webpack_require__(76).f;
|
8676 |
-
|
8677 |
-
// `Object.{ entries, values }` methods implementation
|
8678 |
-
var createMethod = function (TO_ENTRIES) {
|
8679 |
-
return function (it) {
|
8680 |
-
var O = toIndexedObject(it);
|
8681 |
-
var keys = objectKeys(O);
|
8682 |
-
var length = keys.length;
|
8683 |
-
var i = 0;
|
8684 |
-
var result = [];
|
8685 |
-
var key;
|
8686 |
-
while (length > i) {
|
8687 |
-
key = keys[i++];
|
8688 |
-
if (!DESCRIPTORS || propertyIsEnumerable.call(O, key)) {
|
8689 |
-
result.push(TO_ENTRIES ? [key, O[key]] : O[key]);
|
8690 |
-
}
|
8691 |
-
}
|
8692 |
-
return result;
|
8693 |
-
};
|
8694 |
-
};
|
8695 |
|
8696 |
-
|
8697 |
-
// `Object.entries` method
|
8698 |
-
// https://tc39.es/ecma262/#sec-object.entries
|
8699 |
-
entries: createMethod(true),
|
8700 |
-
// `Object.values` method
|
8701 |
-
// https://tc39.es/ecma262/#sec-object.values
|
8702 |
-
values: createMethod(false)
|
8703 |
-
};
|
8704 |
|
|
|
8705 |
|
8706 |
-
|
8707 |
-
|
8708 |
-
|
8709 |
|
8710 |
-
var $ = __webpack_require__(12);
|
8711 |
-
var assign = __webpack_require__(221);
|
8712 |
|
8713 |
-
// `Object.assign` method
|
8714 |
-
// https://tc39.es/ecma262/#sec-object.assign
|
8715 |
-
$({ target: 'Object', stat: true, forced: Object.assign !== assign }, {
|
8716 |
-
assign: assign
|
8717 |
-
});
|
8718 |
|
8719 |
|
8720 |
-
/***/ }),
|
8721 |
-
/* 251 */,
|
8722 |
-
/* 252 */
|
8723 |
-
/***/ (function(module, exports, __webpack_require__) {
|
8724 |
|
8725 |
-
var anObject = __webpack_require__(9);
|
8726 |
-
var iteratorClose = __webpack_require__(172);
|
8727 |
|
8728 |
-
|
8729 |
-
|
8730 |
-
|
8731 |
-
return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
|
8732 |
-
// 7.4.6 IteratorClose(iterator, completion)
|
8733 |
-
} catch (error) {
|
8734 |
-
iteratorClose(iterator);
|
8735 |
-
throw error;
|
8736 |
-
}
|
8737 |
-
};
|
8738 |
|
8739 |
|
8740 |
-
/***/ }),
|
8741 |
-
/* 253 */
|
8742 |
-
/***/ (function(module, exports, __webpack_require__) {
|
8743 |
|
8744 |
-
var fails = __webpack_require__(6);
|
8745 |
|
8746 |
-
|
8747 |
-
|
8748 |
-
|
|
|
8749 |
|
8750 |
|
8751 |
-
/***/ }),
|
8752 |
-
/* 254 */
|
8753 |
-
/***/ (function(module, exports, __webpack_require__) {
|
8754 |
|
8755 |
-
var fails = __webpack_require__(6);
|
8756 |
-
var wellKnownSymbol = __webpack_require__(8);
|
8757 |
-
var IS_PURE = __webpack_require__(57);
|
8758 |
|
8759 |
-
var ITERATOR = wellKnownSymbol('iterator');
|
8760 |
|
8761 |
-
module.exports = !fails(function () {
|
8762 |
-
var url = new URL('b?a=1&b=2&c=3', 'http://a');
|
8763 |
-
var searchParams = url.searchParams;
|
8764 |
-
var result = '';
|
8765 |
-
url.pathname = 'c%20d';
|
8766 |
-
searchParams.forEach(function (value, key) {
|
8767 |
-
searchParams['delete']('b');
|
8768 |
-
result += key + value;
|
8769 |
-
});
|
8770 |
-
return (IS_PURE && !url.toJSON)
|
8771 |
-
|| !searchParams.sort
|
8772 |
-
|| url.href !== 'http://a/c%20d?a=1&c=3'
|
8773 |
-
|| searchParams.get('c') !== '3'
|
8774 |
-
|| String(new URLSearchParams('?a=1')) !== 'a=1'
|
8775 |
-
|| !searchParams[ITERATOR]
|
8776 |
-
// throws in Edge
|
8777 |
-
|| new URL('https://a@b').username !== 'a'
|
8778 |
-
|| new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'
|
8779 |
-
// not punycoded in Edge
|
8780 |
-
|| new URL('http://тест').host !== 'xn--e1aybc'
|
8781 |
-
// not escaped in Chrome 62-
|
8782 |
-
|| new URL('http://a#б').hash !== '#%D0%B1'
|
8783 |
-
// fails in Chrome 66-
|
8784 |
-
|| result !== 'a1c3'
|
8785 |
-
// throws in Safari
|
8786 |
-
|| new URL('http://x', undefined).host !== 'x';
|
8787 |
-
});
|
8788 |
|
8789 |
|
8790 |
-
|
8791 |
-
/*
|
8792 |
-
|
8793 |
-
/* 257 */,
|
8794 |
-
/* 258 */,
|
8795 |
-
/* 259 */,
|
8796 |
-
/* 260 */,
|
8797 |
-
/* 261 */,
|
8798 |
-
/* 262 */
|
8799 |
-
/***/ (function(module, exports) {
|
8800 |
|
8801 |
-
|
|
|
8802 |
|
8803 |
-
|
8804 |
-
/* 263 */,
|
8805 |
-
/* 264 */,
|
8806 |
-
/* 265 */,
|
8807 |
-
/* 266 */,
|
8808 |
-
/* 267 */,
|
8809 |
-
/* 268 */
|
8810 |
-
/***/ (function(module, exports, __webpack_require__) {
|
8811 |
|
8812 |
-
|
|
|
8813 |
|
|
|
|
|
8814 |
|
8815 |
-
|
8816 |
-
|
8817 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8818 |
|
|
|
|
|
8819 |
|
8820 |
-
|
8821 |
-
|
8822 |
-
/* 270 */,
|
8823 |
-
/* 271 */,
|
8824 |
-
/* 272 */,
|
8825 |
-
/* 273 */,
|
8826 |
-
/* 274 */,
|
8827 |
-
/* 275 */,
|
8828 |
-
/* 276 */,
|
8829 |
-
/* 277 */
|
8830 |
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
8831 |
|
8832 |
-
|
8833 |
-
/* harmony import */ var core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(164);
|
8834 |
-
/* harmony import */ var core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_0__);
|
8835 |
-
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(100);
|
8836 |
-
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_1__);
|
8837 |
-
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(151);
|
8838 |
-
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_2__);
|
8839 |
-
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(123);
|
8840 |
-
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_3__);
|
8841 |
-
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(146);
|
8842 |
-
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_4__);
|
8843 |
-
/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(41);
|
8844 |
-
/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_5__);
|
8845 |
-
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(2);
|
8846 |
-
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__);
|
8847 |
-
/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(141);
|
8848 |
-
/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__);
|
8849 |
-
/* harmony import */ var _woocommerce_wc_admin_settings__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(85);
|
8850 |
-
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(0);
|
8851 |
-
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);
|
8852 |
|
|
|
|
|
|
|
|
|
|
|
8853 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8854 |
|
|
|
|
|
|
|
8855 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8856 |
|
|
|
|
|
8857 |
|
|
|
|
|
|
|
|
|
|
|
8858 |
|
8859 |
-
|
8860 |
-
* External dependencies
|
8861 |
-
*/
|
8862 |
|
|
|
|
|
|
|
8863 |
|
8864 |
|
|
|
8865 |
|
8866 |
-
|
8867 |
-
|
8868 |
-
|
8869 |
-
* Internal dependencies
|
8870 |
-
*/
|
8871 |
|
8872 |
-
|
8873 |
-
|
8874 |
-
|
8875 |
-
|
8876 |
-
|
8877 |
-
});
|
8878 |
-
var VariationsReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["lazy"])(function () {
|
8879 |
-
return Promise.all(/* import() | analytics-report-variations */[__webpack_require__.e(0), __webpack_require__.e(2), __webpack_require__.e(19)]).then(__webpack_require__.bind(null, 585));
|
8880 |
-
});
|
8881 |
-
var OrdersReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["lazy"])(function () {
|
8882 |
-
return Promise.all(/* import() | analytics-report-orders */[__webpack_require__.e(0), __webpack_require__.e(5), __webpack_require__.e(14)]).then(__webpack_require__.bind(null, 586));
|
8883 |
-
});
|
8884 |
-
var CategoriesReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["lazy"])(function () {
|
8885 |
-
return Promise.all(/* import() | analytics-report-categories */[__webpack_require__.e(0), __webpack_require__.e(2), __webpack_require__.e(10)]).then(__webpack_require__.bind(null, 582));
|
8886 |
-
});
|
8887 |
-
var CouponsReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["lazy"])(function () {
|
8888 |
-
return Promise.all(/* import() | analytics-report-coupons */[__webpack_require__.e(0), __webpack_require__.e(11)]).then(__webpack_require__.bind(null, 587));
|
8889 |
-
});
|
8890 |
-
var TaxesReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["lazy"])(function () {
|
8891 |
-
return Promise.all(/* import() | analytics-report-taxes */[__webpack_require__.e(0), __webpack_require__.e(18)]).then(__webpack_require__.bind(null, 588));
|
8892 |
-
});
|
8893 |
-
var DownloadsReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["lazy"])(function () {
|
8894 |
-
return Promise.all(/* import() | analytics-report-downloads */[__webpack_require__.e(0), __webpack_require__.e(13)]).then(__webpack_require__.bind(null, 589));
|
8895 |
-
});
|
8896 |
-
var StockReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["lazy"])(function () {
|
8897 |
-
return Promise.all(/* import() | analytics-report-stock */[__webpack_require__.e(0), __webpack_require__.e(17)]).then(__webpack_require__.bind(null, 581));
|
8898 |
-
});
|
8899 |
-
var CustomersReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["lazy"])(function () {
|
8900 |
-
return Promise.all(/* import() | analytics-report-customers */[__webpack_require__.e(0), __webpack_require__.e(12)]).then(__webpack_require__.bind(null, 583));
|
8901 |
-
});
|
8902 |
-
/* harmony default export */ __webpack_exports__["a"] = (function () {
|
8903 |
-
var reports = [{
|
8904 |
-
report: 'revenue',
|
8905 |
-
title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__["__"])('Revenue', 'woocommerce-admin'),
|
8906 |
-
component: RevenueReport,
|
8907 |
-
navArgs: {
|
8908 |
-
id: 'woocommerce-analytics-revenue'
|
8909 |
-
}
|
8910 |
-
}, {
|
8911 |
-
report: 'products',
|
8912 |
-
title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__["__"])('Products', 'woocommerce-admin'),
|
8913 |
-
component: ProductsReport,
|
8914 |
-
navArgs: {
|
8915 |
-
id: 'woocommerce-analytics-products'
|
8916 |
-
}
|
8917 |
-
}, {
|
8918 |
-
report: 'variations',
|
8919 |
-
title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__["__"])('Variations', 'woocommerce-admin'),
|
8920 |
-
component: VariationsReport,
|
8921 |
-
navArgs: {
|
8922 |
-
id: 'woocommerce-analytics-variations'
|
8923 |
-
}
|
8924 |
-
}, {
|
8925 |
-
report: 'orders',
|
8926 |
-
title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__["__"])('Orders', 'woocommerce-admin'),
|
8927 |
-
component: OrdersReport,
|
8928 |
-
navArgs: {
|
8929 |
-
id: 'woocommerce-analytics-orders'
|
8930 |
-
}
|
8931 |
-
}, {
|
8932 |
-
report: 'categories',
|
8933 |
-
title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__["__"])('Categories', 'woocommerce-admin'),
|
8934 |
-
component: CategoriesReport,
|
8935 |
-
navArgs: {
|
8936 |
-
id: 'woocommerce-analytics-categories'
|
8937 |
-
}
|
8938 |
-
}, {
|
8939 |
-
report: 'coupons',
|
8940 |
-
title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__["__"])('Coupons', 'woocommerce-admin'),
|
8941 |
-
component: CouponsReport,
|
8942 |
-
navArgs: {
|
8943 |
-
id: 'woocommerce-analytics-coupons'
|
8944 |
}
|
8945 |
}, {
|
8946 |
-
|
8947 |
-
|
8948 |
-
|
8949 |
-
|
8950 |
-
|
8951 |
-
|
8952 |
-
|
8953 |
-
|
8954 |
-
|
8955 |
-
|
8956 |
-
|
8957 |
-
|
|
|
|
|
|
|
8958 |
}
|
8959 |
-
}
|
8960 |
-
|
8961 |
-
|
8962 |
-
|
8963 |
-
|
8964 |
-
|
8965 |
-
|
8966 |
-
|
8967 |
-
|
8968 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8969 |
}
|
8970 |
-
}]
|
8971 |
-
return Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__["applyFilters"])(REPORTS_FILTER, reports);
|
8972 |
-
});
|
8973 |
|
8974 |
-
|
8975 |
-
|
8976 |
-
/***/ (function(module, exports, __webpack_require__) {
|
8977 |
|
8978 |
-
"use strict";
|
8979 |
|
|
|
|
|
|
|
8980 |
|
8981 |
-
var
|
8982 |
|
8983 |
-
|
8984 |
-
|
8985 |
-
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
|
8986 |
-
*/
|
8987 |
-
var REACT_STATICS = {
|
8988 |
-
childContextTypes: true,
|
8989 |
-
contextType: true,
|
8990 |
-
contextTypes: true,
|
8991 |
-
defaultProps: true,
|
8992 |
-
displayName: true,
|
8993 |
-
getDefaultProps: true,
|
8994 |
-
getDerivedStateFromError: true,
|
8995 |
-
getDerivedStateFromProps: true,
|
8996 |
-
mixins: true,
|
8997 |
-
propTypes: true,
|
8998 |
-
type: true
|
8999 |
-
};
|
9000 |
-
var KNOWN_STATICS = {
|
9001 |
-
name: true,
|
9002 |
-
length: true,
|
9003 |
-
prototype: true,
|
9004 |
-
caller: true,
|
9005 |
-
callee: true,
|
9006 |
-
arguments: true,
|
9007 |
-
arity: true
|
9008 |
-
};
|
9009 |
-
var FORWARD_REF_STATICS = {
|
9010 |
-
'$$typeof': true,
|
9011 |
-
render: true,
|
9012 |
-
defaultProps: true,
|
9013 |
-
displayName: true,
|
9014 |
-
propTypes: true
|
9015 |
-
};
|
9016 |
-
var MEMO_STATICS = {
|
9017 |
-
'$$typeof': true,
|
9018 |
-
compare: true,
|
9019 |
-
defaultProps: true,
|
9020 |
-
displayName: true,
|
9021 |
-
propTypes: true,
|
9022 |
-
type: true
|
9023 |
-
};
|
9024 |
-
var TYPE_STATICS = {};
|
9025 |
-
TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
|
9026 |
-
TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
|
9027 |
-
|
9028 |
-
function getStatics(component) {
|
9029 |
-
// React v16.11 and below
|
9030 |
-
if (reactIs.isMemo(component)) {
|
9031 |
-
return MEMO_STATICS;
|
9032 |
-
} // React v16.12 and above
|
9033 |
-
|
9034 |
-
|
9035 |
-
return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;
|
9036 |
-
}
|
9037 |
-
|
9038 |
-
var defineProperty = Object.defineProperty;
|
9039 |
-
var getOwnPropertyNames = Object.getOwnPropertyNames;
|
9040 |
-
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
9041 |
-
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
9042 |
-
var getPrototypeOf = Object.getPrototypeOf;
|
9043 |
-
var objectPrototype = Object.prototype;
|
9044 |
-
function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
|
9045 |
-
if (typeof sourceComponent !== 'string') {
|
9046 |
-
// don't hoist over string (html) components
|
9047 |
-
if (objectPrototype) {
|
9048 |
-
var inheritedComponent = getPrototypeOf(sourceComponent);
|
9049 |
-
|
9050 |
-
if (inheritedComponent && inheritedComponent !== objectPrototype) {
|
9051 |
-
hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
|
9052 |
-
}
|
9053 |
-
}
|
9054 |
-
|
9055 |
-
var keys = getOwnPropertyNames(sourceComponent);
|
9056 |
-
|
9057 |
-
if (getOwnPropertySymbols) {
|
9058 |
-
keys = keys.concat(getOwnPropertySymbols(sourceComponent));
|
9059 |
-
}
|
9060 |
-
|
9061 |
-
var targetStatics = getStatics(targetComponent);
|
9062 |
-
var sourceStatics = getStatics(sourceComponent);
|
9063 |
-
|
9064 |
-
for (var i = 0; i < keys.length; ++i) {
|
9065 |
-
var key = keys[i];
|
9066 |
|
9067 |
-
|
9068 |
-
var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
|
9069 |
-
|
9070 |
-
try {
|
9071 |
-
// Avoid failures from read-only properties
|
9072 |
-
defineProperty(targetComponent, key, descriptor);
|
9073 |
-
} catch (e) {}
|
9074 |
-
}
|
9075 |
-
}
|
9076 |
}
|
9077 |
|
9078 |
-
|
9079 |
-
|
9080 |
-
|
9081 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9082 |
|
|
|
|
|
9083 |
|
9084 |
/***/ }),
|
9085 |
-
/* 279 */
|
9086 |
-
/***/ (function(module, exports) {
|
9087 |
|
9088 |
-
|
9089 |
-
|
9090 |
-
/***/ }),
|
9091 |
-
/* 280 */
|
9092 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
9093 |
|
9094 |
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9095 |
|
9096 |
-
// EXPORTS
|
9097 |
-
__webpack_require__.d(__webpack_exports__, "c", function() { return /* binding */ layout_PrimaryLayout; });
|
9098 |
-
__webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ PageLayout; });
|
9099 |
-
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ EmbedLayout; });
|
9100 |
-
|
9101 |
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.reflect.construct.js
|
9102 |
-
var es_reflect_construct = __webpack_require__(64);
|
9103 |
-
|
9104 |
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.keys.js
|
9105 |
-
var es_object_keys = __webpack_require__(37);
|
9106 |
-
|
9107 |
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.js
|
9108 |
-
var es_symbol = __webpack_require__(53);
|
9109 |
-
|
9110 |
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.get-own-property-descriptor.js
|
9111 |
-
var es_object_get_own_property_descriptor = __webpack_require__(60);
|
9112 |
-
|
9113 |
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.for-each.js
|
9114 |
-
var web_dom_collections_for_each = __webpack_require__(49);
|
9115 |
-
|
9116 |
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.get-own-property-descriptors.js
|
9117 |
-
var es_object_get_own_property_descriptors = __webpack_require__(61);
|
9118 |
|
9119 |
-
|
9120 |
-
|
9121 |
-
|
9122 |
|
9123 |
-
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectWithoutProperties.js
|
9124 |
-
var objectWithoutProperties = __webpack_require__(116);
|
9125 |
-
var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
|
9126 |
|
9127 |
-
|
9128 |
-
|
9129 |
-
|
9130 |
|
9131 |
-
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/classCallCheck.js
|
9132 |
-
var classCallCheck = __webpack_require__(22);
|
9133 |
-
var classCallCheck_default = /*#__PURE__*/__webpack_require__.n(classCallCheck);
|
9134 |
|
9135 |
-
|
9136 |
-
var
|
9137 |
-
var
|
|
|
|
|
|
|
|
|
|
|
9138 |
|
9139 |
-
|
9140 |
-
var inherits = __webpack_require__(24);
|
9141 |
-
var inherits_default = /*#__PURE__*/__webpack_require__.n(inherits);
|
9142 |
|
9143 |
-
|
9144 |
-
|
9145 |
-
var possibleConstructorReturn_default = /*#__PURE__*/__webpack_require__.n(possibleConstructorReturn);
|
9146 |
|
9147 |
-
|
9148 |
-
var getPrototypeOf = __webpack_require__(14);
|
9149 |
-
var getPrototypeOf_default = /*#__PURE__*/__webpack_require__.n(getPrototypeOf);
|
9150 |
|
9151 |
-
|
9152 |
-
var external_wp_element_ = __webpack_require__(0);
|
9153 |
|
9154 |
-
|
9155 |
-
|
9156 |
|
9157 |
-
|
9158 |
-
|
|
|
|
|
|
|
9159 |
|
9160 |
-
|
9161 |
-
|
9162 |
|
9163 |
-
|
9164 |
-
var es_array_iterator = __webpack_require__(123);
|
9165 |
|
9166 |
-
|
9167 |
-
var web_dom_collections_iterator = __webpack_require__(146);
|
9168 |
|
9169 |
-
|
9170 |
-
|
9171 |
|
9172 |
-
|
9173 |
-
var es_regexp_exec = __webpack_require__(88);
|
9174 |
|
9175 |
-
//
|
9176 |
-
|
9177 |
|
9178 |
-
//
|
9179 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9180 |
|
9181 |
-
|
9182 |
-
var
|
|
|
9183 |
|
9184 |
-
|
9185 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9186 |
|
9187 |
-
|
9188 |
-
|
|
|
|
|
9189 |
|
9190 |
-
//
|
9191 |
-
|
|
|
|
|
|
|
9192 |
|
9193 |
-
// EXTERNAL MODULE: external ["wp","data"]
|
9194 |
-
var external_wp_data_ = __webpack_require__(26);
|
9195 |
|
9196 |
-
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js + 1 modules
|
9197 |
-
var inheritsLoose = __webpack_require__(128);
|
9198 |
|
9199 |
-
// EXTERNAL MODULE: external "React"
|
9200 |
-
var external_React_ = __webpack_require__(20);
|
9201 |
-
var external_React_default = /*#__PURE__*/__webpack_require__.n(external_React_);
|
9202 |
|
9203 |
-
|
9204 |
-
|
9205 |
-
|
9206 |
|
9207 |
-
|
9208 |
-
var esm_history = __webpack_require__(202);
|
9209 |
|
9210 |
-
|
9211 |
-
|
9212 |
|
9213 |
-
|
9214 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9215 |
|
9216 |
-
|
9217 |
-
|
|
|
|
|
|
|
|
|
9218 |
|
9219 |
-
// EXTERNAL MODULE: ./node_modules/path-to-regexp/index.js
|
9220 |
-
var path_to_regexp = __webpack_require__(317);
|
9221 |
-
var path_to_regexp_default = /*#__PURE__*/__webpack_require__.n(path_to_regexp);
|
9222 |
|
9223 |
-
|
9224 |
-
var react_is = __webpack_require__(268);
|
9225 |
|
9226 |
-
|
9227 |
-
|
9228 |
|
9229 |
-
|
9230 |
-
var hoist_non_react_statics_cjs = __webpack_require__(278);
|
9231 |
-
var hoist_non_react_statics_cjs_default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics_cjs);
|
9232 |
|
9233 |
-
|
9234 |
|
|
|
|
|
9235 |
|
|
|
9236 |
|
|
|
9237 |
|
|
|
|
|
9238 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9239 |
|
|
|
|
|
|
|
|
|
9240 |
|
|
|
|
|
|
|
|
|
9241 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9242 |
|
|
|
9243 |
|
|
|
|
|
9244 |
|
|
|
|
|
|
|
|
|
|
|
|
|
9245 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9246 |
|
9247 |
-
|
|
|
9248 |
|
9249 |
-
|
9250 |
-
var context = Object(esm["a" /* default */])();
|
9251 |
-
context.displayName = name;
|
9252 |
-
return context;
|
9253 |
-
};
|
9254 |
|
9255 |
-
|
9256 |
-
|
9257 |
-
react_router_createNamedContext("Router-History");
|
9258 |
|
9259 |
-
|
9260 |
|
9261 |
-
var createNamedContext$1 = function createNamedContext(name) {
|
9262 |
-
var context = Object(esm["a" /* default */])();
|
9263 |
-
context.displayName = name;
|
9264 |
-
return context;
|
9265 |
-
};
|
9266 |
|
9267 |
-
|
9268 |
-
/*#__PURE__*/
|
9269 |
-
createNamedContext$1("Router");
|
9270 |
|
9271 |
-
|
9272 |
-
* The public API for putting history on context.
|
9273 |
-
*/
|
9274 |
|
9275 |
-
var
|
9276 |
-
|
9277 |
-
|
9278 |
-
|
|
|
|
|
9279 |
|
9280 |
-
|
9281 |
-
|
9282 |
-
|
9283 |
-
|
9284 |
-
|
9285 |
-
|
9286 |
-
|
9287 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9288 |
|
9289 |
-
|
9290 |
-
|
|
|
9291 |
|
9292 |
-
|
9293 |
-
|
9294 |
-
|
9295 |
-
}; // This is a bit of a hack. We have to start listening for location
|
9296 |
-
// changes here in the constructor in case there are any <Redirect>s
|
9297 |
-
// on the initial render. If there are, they will replace/push when
|
9298 |
-
// they mount and since cDM fires in children before parents, we may
|
9299 |
-
// get a new location before the <Router> is mounted.
|
9300 |
|
9301 |
-
|
9302 |
-
|
|
|
|
|
|
|
|
|
|
|
9303 |
|
9304 |
-
|
9305 |
-
|
9306 |
-
|
9307 |
-
|
9308 |
-
|
9309 |
-
|
9310 |
-
|
9311 |
-
|
9312 |
-
|
9313 |
-
|
9314 |
-
|
9315 |
|
9316 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9317 |
}
|
9318 |
|
9319 |
-
|
|
|
9320 |
|
9321 |
-
|
9322 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9323 |
|
9324 |
-
|
9325 |
-
|
9326 |
-
|
9327 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9328 |
}
|
9329 |
-
}
|
9330 |
|
9331 |
-
|
9332 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9333 |
};
|
9334 |
|
9335 |
-
_proto.
|
9336 |
-
return
|
9337 |
-
value: {
|
9338 |
-
history: this.props.history,
|
9339 |
-
location: this.state.location,
|
9340 |
-
match: Router.computeRootMatch(this.state.location.pathname),
|
9341 |
-
staticContext: this.props.staticContext
|
9342 |
-
}
|
9343 |
-
}, external_React_default.a.createElement(historyContext.Provider, {
|
9344 |
-
children: this.props.children || null,
|
9345 |
-
value: this.props.history
|
9346 |
-
}));
|
9347 |
};
|
9348 |
|
9349 |
-
|
9350 |
-
}(external_React_default.a.Component);
|
9351 |
|
9352 |
-
|
9353 |
|
9354 |
-
|
9355 |
-
|
9356 |
-
|
9357 |
|
9358 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9359 |
/*#__PURE__*/
|
9360 |
-
function (
|
9361 |
-
|
9362 |
|
9363 |
-
function
|
9364 |
var _this;
|
9365 |
|
9366 |
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
9367 |
args[_key] = arguments[_key];
|
9368 |
}
|
9369 |
|
9370 |
-
_this =
|
9371 |
-
_this.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9372 |
return _this;
|
9373 |
}
|
9374 |
|
9375 |
-
|
|
|
|
|
|
|
|
|
|
|
9376 |
|
9377 |
-
|
9378 |
-
|
9379 |
-
history: this.history,
|
9380 |
-
children: this.props.children
|
9381 |
-
});
|
9382 |
-
};
|
9383 |
|
9384 |
-
|
9385 |
-
|
|
|
9386 |
|
9387 |
-
|
|
|
9388 |
|
9389 |
-
|
9390 |
-
|
9391 |
-
|
9392 |
-
|
|
|
9393 |
|
9394 |
-
|
9395 |
-
|
|
|
|
|
|
|
|
|
|
|
9396 |
}
|
9397 |
|
9398 |
-
var
|
9399 |
|
9400 |
-
|
9401 |
-
if (
|
9402 |
-
|
|
|
9403 |
|
9404 |
-
|
9405 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9406 |
};
|
9407 |
|
9408 |
-
|
9409 |
-
|
9410 |
};
|
9411 |
|
9412 |
-
|
9413 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
9414 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9415 |
|
9416 |
-
|
9417 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9418 |
|
9419 |
/**
|
9420 |
-
*
|
9421 |
*/
|
9422 |
|
9423 |
-
|
9424 |
-
|
9425 |
-
|
9426 |
-
|
9427 |
-
return external_React_default.a.createElement(react_router_context.Consumer, null, function (context) {
|
9428 |
-
!context ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0;
|
9429 |
-
if (!when || context.staticContext) return null;
|
9430 |
-
var method = context.history.block;
|
9431 |
-
return external_React_default.a.createElement(react_router_Lifecycle, {
|
9432 |
-
onMount: function onMount(self) {
|
9433 |
-
self.release = method(message);
|
9434 |
-
},
|
9435 |
-
onUpdate: function onUpdate(self, prevProps) {
|
9436 |
-
if (prevProps.message !== message) {
|
9437 |
-
self.release();
|
9438 |
-
self.release = method(message);
|
9439 |
-
}
|
9440 |
-
},
|
9441 |
-
onUnmount: function onUnmount(self) {
|
9442 |
-
self.release();
|
9443 |
-
},
|
9444 |
-
message: message
|
9445 |
-
});
|
9446 |
-
});
|
9447 |
-
}
|
9448 |
|
9449 |
-
|
|
|
9450 |
|
9451 |
-
|
9452 |
-
|
9453 |
-
|
|
|
|
|
|
|
9454 |
|
9455 |
-
|
9456 |
-
if (cache[path]) return cache[path];
|
9457 |
-
var generator = path_to_regexp_default.a.compile(path);
|
9458 |
|
9459 |
-
|
9460 |
-
cache[path] = generator;
|
9461 |
-
cacheCount++;
|
9462 |
}
|
9463 |
|
9464 |
-
return
|
9465 |
-
}
|
9466 |
-
/**
|
9467 |
-
* Public API for generating a URL pathname from a path and parameters.
|
9468 |
-
*/
|
9469 |
|
|
|
|
|
|
|
9470 |
|
9471 |
-
function
|
9472 |
-
|
9473 |
-
|
9474 |
-
|
|
|
|
|
|
|
|
|
9475 |
|
9476 |
-
|
9477 |
-
|
9478 |
-
}
|
9479 |
|
9480 |
-
|
9481 |
-
|
9482 |
-
|
9483 |
-
}
|
9484 |
|
9485 |
-
|
9486 |
-
|
9487 |
-
|
|
|
|
|
|
|
9488 |
|
9489 |
-
|
9490 |
-
|
9491 |
-
|
9492 |
-
|
9493 |
-
|
9494 |
-
|
9495 |
-
|
9496 |
-
|
9497 |
-
|
9498 |
-
|
9499 |
-
|
9500 |
-
|
9501 |
-
|
9502 |
-
// set the new location immediately.
|
9503 |
|
9504 |
-
|
9505 |
-
|
9506 |
-
|
9507 |
-
|
|
|
9508 |
|
9509 |
-
return external_React_default.a.createElement(react_router_Lifecycle, {
|
9510 |
-
onMount: function onMount() {
|
9511 |
-
method(location);
|
9512 |
-
},
|
9513 |
-
onUpdate: function onUpdate(self, prevProps) {
|
9514 |
-
var prevLocation = Object(esm_history["b" /* createLocation */])(prevProps.to);
|
9515 |
|
9516 |
-
|
9517 |
-
|
9518 |
-
|
9519 |
-
|
9520 |
-
|
9521 |
-
|
9522 |
-
to: to
|
9523 |
-
});
|
9524 |
});
|
9525 |
-
|
|
|
9526 |
|
9527 |
-
|
|
|
9528 |
|
9529 |
-
var
|
9530 |
-
|
9531 |
-
var
|
9532 |
|
9533 |
-
|
9534 |
-
|
9535 |
-
var pathCache = cache$1[cacheKey] || (cache$1[cacheKey] = {});
|
9536 |
-
if (pathCache[path]) return pathCache[path];
|
9537 |
-
var keys = [];
|
9538 |
-
var regexp = path_to_regexp_default()(path, keys, options);
|
9539 |
-
var result = {
|
9540 |
-
regexp: regexp,
|
9541 |
-
keys: keys
|
9542 |
-
};
|
9543 |
|
9544 |
-
|
9545 |
-
|
9546 |
-
|
9547 |
-
|
|
|
|
|
|
|
|
|
9548 |
|
9549 |
-
|
9550 |
-
|
9551 |
-
/**
|
9552 |
-
* Public API for matching a URL pathname to a path.
|
9553 |
-
*/
|
9554 |
|
|
|
|
|
|
|
|
|
9555 |
|
9556 |
-
|
9557 |
-
|
9558 |
-
options = {};
|
9559 |
-
}
|
9560 |
|
9561 |
-
|
9562 |
-
|
9563 |
-
|
9564 |
-
|
9565 |
-
|
|
|
|
|
9566 |
|
9567 |
-
|
9568 |
-
|
9569 |
-
|
9570 |
-
|
9571 |
-
|
9572 |
-
strict = _options$strict === void 0 ? false : _options$strict,
|
9573 |
-
_options$sensitive = _options.sensitive,
|
9574 |
-
sensitive = _options$sensitive === void 0 ? false : _options$sensitive;
|
9575 |
-
var paths = [].concat(path);
|
9576 |
-
return paths.reduce(function (matched, path) {
|
9577 |
-
if (!path && path !== "") return null;
|
9578 |
-
if (matched) return matched;
|
9579 |
|
9580 |
-
var _compilePath = compilePath$1(path, {
|
9581 |
-
end: exact,
|
9582 |
-
strict: strict,
|
9583 |
-
sensitive: sensitive
|
9584 |
-
}),
|
9585 |
-
regexp = _compilePath.regexp,
|
9586 |
-
keys = _compilePath.keys;
|
9587 |
|
9588 |
-
|
9589 |
-
|
9590 |
-
|
9591 |
-
|
9592 |
-
|
9593 |
-
if (exact && !isExact) return null;
|
9594 |
-
return {
|
9595 |
-
path: path,
|
9596 |
-
// the path used to match
|
9597 |
-
url: path === "/" && url === "" ? "/" : url,
|
9598 |
-
// the matched portion of the URL
|
9599 |
-
isExact: isExact,
|
9600 |
-
// whether or not we matched exactly
|
9601 |
-
params: keys.reduce(function (memo, key, index) {
|
9602 |
-
memo[key.name] = values[index];
|
9603 |
-
return memo;
|
9604 |
-
}, {})
|
9605 |
-
};
|
9606 |
-
}, null);
|
9607 |
-
}
|
9608 |
|
9609 |
-
|
9610 |
-
|
9611 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9612 |
|
9613 |
-
|
9614 |
-
var value = children(props);
|
9615 |
-
false ? undefined : void 0;
|
9616 |
-
return value || null;
|
9617 |
-
}
|
9618 |
-
/**
|
9619 |
-
* The public API for matching a single path and rendering.
|
9620 |
-
*/
|
9621 |
|
|
|
9622 |
|
9623 |
-
var
|
9624 |
-
|
9625 |
-
|
9626 |
-
|
|
|
|
|
|
|
9627 |
|
9628 |
-
function Route() {
|
9629 |
-
return _React$Component.apply(this, arguments) || this;
|
9630 |
-
}
|
9631 |
|
9632 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
9633 |
|
9634 |
-
_proto.render = function render() {
|
9635 |
-
var _this = this;
|
9636 |
|
9637 |
-
|
9638 |
-
!context$1 ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0;
|
9639 |
-
var location = _this.props.location || context$1.location;
|
9640 |
-
var match = _this.props.computedMatch ? _this.props.computedMatch // <Switch> already computed the match for us
|
9641 |
-
: _this.props.path ? matchPath(location.pathname, _this.props) : context$1.match;
|
9642 |
|
9643 |
-
|
9644 |
-
|
9645 |
-
|
9646 |
-
|
|
|
9647 |
|
9648 |
-
|
9649 |
-
|
9650 |
-
|
9651 |
-
render = _this$props.render; // Preact uses an empty array as children by
|
9652 |
-
// default, so use null if that's the case.
|
9653 |
|
9654 |
-
if (Array.isArray(children) && children.length === 0) {
|
9655 |
-
children = null;
|
9656 |
-
}
|
9657 |
|
9658 |
-
|
9659 |
-
|
9660 |
-
}, props.match ? children ? typeof children === "function" ? false ? undefined : children(props) : children : component ? external_React_default.a.createElement(component, props) : render ? render(props) : null : typeof children === "function" ? false ? undefined : children(props) : null);
|
9661 |
-
});
|
9662 |
-
};
|
9663 |
|
9664 |
-
return Route;
|
9665 |
-
}(external_React_default.a.Component);
|
9666 |
|
9667 |
-
if (
|
9668 |
|
9669 |
-
|
9670 |
-
|
9671 |
-
|
|
|
|
|
9672 |
|
9673 |
-
function addBasename(basename, location) {
|
9674 |
-
if (!basename) return location;
|
9675 |
-
return Object(esm_extends["a" /* default */])({}, location, {
|
9676 |
-
pathname: addLeadingSlash(basename) + location.pathname
|
9677 |
-
});
|
9678 |
-
}
|
9679 |
|
9680 |
-
|
9681 |
-
|
9682 |
-
|
9683 |
-
|
9684 |
-
|
9685 |
-
pathname: location.pathname.substr(base.length)
|
9686 |
-
});
|
9687 |
-
}
|
9688 |
|
9689 |
-
|
9690 |
-
|
9691 |
-
}
|
9692 |
|
9693 |
-
function
|
9694 |
-
|
9695 |
-
false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) ;
|
9696 |
-
};
|
9697 |
-
}
|
9698 |
-
|
9699 |
-
function noop() {}
|
9700 |
-
/**
|
9701 |
-
* The public top-level API for a "static" <Router>, so-called because it
|
9702 |
-
* can't actually change the current location. Instead, it just records
|
9703 |
-
* location changes in a context object. Useful mainly in testing and
|
9704 |
-
* server-rendering scenarios.
|
9705 |
-
*/
|
9706 |
|
|
|
|
|
|
|
|
|
|
|
9707 |
|
9708 |
-
var
|
9709 |
-
|
9710 |
-
|
9711 |
-
Object(inheritsLoose["a" /* default */])(StaticRouter, _React$Component);
|
9712 |
|
9713 |
-
|
9714 |
-
|
|
|
|
|
9715 |
|
9716 |
-
|
9717 |
-
|
9718 |
-
|
|
|
|
|
|
|
|
|
9719 |
|
9720 |
-
|
|
|
|
|
9721 |
|
9722 |
-
|
9723 |
-
|
9724 |
-
|
|
|
|
|
9725 |
|
9726 |
-
|
9727 |
-
|
9728 |
-
|
9729 |
|
9730 |
-
|
9731 |
-
|
9732 |
-
|
|
|
|
|
9733 |
|
9734 |
-
|
9735 |
-
|
9736 |
-
};
|
9737 |
|
9738 |
-
|
|
|
9739 |
}
|
9740 |
|
9741 |
-
|
|
|
|
|
9742 |
|
9743 |
-
|
9744 |
-
|
9745 |
-
_this$props$basename = _this$props.basename,
|
9746 |
-
basename = _this$props$basename === void 0 ? "" : _this$props$basename,
|
9747 |
-
_this$props$context = _this$props.context,
|
9748 |
-
context = _this$props$context === void 0 ? {} : _this$props$context;
|
9749 |
-
context.action = action;
|
9750 |
-
context.location = addBasename(basename, Object(esm_history["b" /* createLocation */])(location));
|
9751 |
-
context.url = createURL(context.location);
|
9752 |
-
};
|
9753 |
|
9754 |
-
|
9755 |
-
var _this$props2 = this.props,
|
9756 |
-
_this$props2$basename = _this$props2.basename,
|
9757 |
-
basename = _this$props2$basename === void 0 ? "" : _this$props2$basename,
|
9758 |
-
_this$props2$context = _this$props2.context,
|
9759 |
-
context = _this$props2$context === void 0 ? {} : _this$props2$context,
|
9760 |
-
_this$props2$location = _this$props2.location,
|
9761 |
-
location = _this$props2$location === void 0 ? "/" : _this$props2$location,
|
9762 |
-
rest = Object(objectWithoutPropertiesLoose["a" /* default */])(_this$props2, ["basename", "context", "location"]);
|
9763 |
|
9764 |
-
|
9765 |
-
createHref: function createHref(path) {
|
9766 |
-
return addLeadingSlash(basename + createURL(path));
|
9767 |
-
},
|
9768 |
-
action: "POP",
|
9769 |
-
location: stripBasename(basename, Object(esm_history["b" /* createLocation */])(location)),
|
9770 |
-
push: this.handlePush,
|
9771 |
-
replace: this.handleReplace,
|
9772 |
-
go: staticHandler("go"),
|
9773 |
-
goBack: staticHandler("goBack"),
|
9774 |
-
goForward: staticHandler("goForward"),
|
9775 |
-
listen: this.handleListen,
|
9776 |
-
block: this.handleBlock
|
9777 |
-
};
|
9778 |
-
return external_React_default.a.createElement(react_router_Router, Object(esm_extends["a" /* default */])({}, rest, {
|
9779 |
-
history: history,
|
9780 |
-
staticContext: context
|
9781 |
-
}));
|
9782 |
-
};
|
9783 |
|
9784 |
-
|
9785 |
-
|
|
|
9786 |
|
9787 |
-
|
|
|
|
|
|
|
9788 |
|
9789 |
-
|
9790 |
-
|
9791 |
-
*/
|
9792 |
|
9793 |
-
var
|
9794 |
/*#__PURE__*/
|
9795 |
-
function (
|
9796 |
-
|
9797 |
-
|
9798 |
-
function Switch() {
|
9799 |
-
return _React$Component.apply(this, arguments) || this;
|
9800 |
-
}
|
9801 |
|
9802 |
-
|
|
|
9803 |
|
9804 |
-
|
9805 |
-
|
|
|
|
|
|
|
|
|
9806 |
|
9807 |
-
|
9808 |
-
!context ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0;
|
9809 |
-
var location = _this.props.location || context.location;
|
9810 |
-
var element, match; // We use React.Children.forEach instead of React.Children.toArray().find()
|
9811 |
-
// here because toArray adds keys to all child elements and we do not want
|
9812 |
-
// to trigger an unmount/remount for two <Route>s that render the same
|
9813 |
-
// component at different URLs.
|
9814 |
|
9815 |
-
|
9816 |
-
|
9817 |
-
|
9818 |
-
|
9819 |
-
match = path ? matchPath(location.pathname, Object(esm_extends["a" /* default */])({}, child.props, {
|
9820 |
-
path: path
|
9821 |
-
})) : context.match;
|
9822 |
-
}
|
9823 |
-
});
|
9824 |
-
return match ? external_React_default.a.cloneElement(element, {
|
9825 |
-
location: location,
|
9826 |
-
computedMatch: match
|
9827 |
-
}) : null;
|
9828 |
-
});
|
9829 |
};
|
9830 |
|
9831 |
-
|
9832 |
-
|
9833 |
-
|
9834 |
-
if (false) {}
|
9835 |
|
9836 |
-
|
9837 |
-
|
9838 |
-
|
9839 |
|
9840 |
-
|
9841 |
-
|
9842 |
|
9843 |
-
|
9844 |
-
|
9845 |
-
|
9846 |
|
9847 |
-
|
9848 |
-
|
9849 |
-
|
9850 |
-
|
9851 |
-
|
9852 |
-
|
9853 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9854 |
|
9855 |
-
|
9856 |
-
|
|
|
9857 |
|
9858 |
-
|
|
|
|
|
|
|
9859 |
|
9860 |
-
|
9861 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
9862 |
|
9863 |
-
|
9864 |
-
|
9865 |
-
if (false) {}
|
9866 |
|
9867 |
-
|
9868 |
-
|
9869 |
-
function
|
9870 |
-
|
9871 |
-
|
9872 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9873 |
}
|
9874 |
-
function useParams() {
|
9875 |
-
if (false) {}
|
9876 |
|
9877 |
-
|
9878 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9879 |
}
|
9880 |
-
function useRouteMatch(path) {
|
9881 |
-
if (false) {}
|
9882 |
|
9883 |
-
|
9884 |
-
|
9885 |
-
|
9886 |
-
|
9887 |
|
9888 |
-
|
|
|
9889 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9890 |
|
9891 |
-
|
|
|
|
|
|
|
9892 |
|
9893 |
-
|
9894 |
-
|
|
|
9895 |
|
9896 |
-
|
9897 |
-
|
|
|
|
|
|
|
9898 |
|
9899 |
-
|
9900 |
-
var external_wc_components_ = __webpack_require__(145);
|
9901 |
|
9902 |
-
|
9903 |
-
|
|
|
|
|
9904 |
|
9905 |
-
|
9906 |
-
|
|
|
|
|
9907 |
|
9908 |
-
|
9909 |
-
|
|
|
9910 |
|
9911 |
-
|
9912 |
-
|
|
|
9913 |
|
9914 |
-
|
9915 |
-
|
|
|
9916 |
|
9917 |
-
|
9918 |
-
|
9919 |
|
9920 |
-
|
9921 |
-
|
|
|
|
|
9922 |
|
9923 |
-
|
9924 |
-
var
|
9925 |
|
9926 |
-
|
9927 |
-
|
|
|
|
|
|
|
|
|
9928 |
|
9929 |
-
|
9930 |
-
var es_object_assign = __webpack_require__(250);
|
9931 |
|
9932 |
-
|
9933 |
-
var
|
9934 |
|
9935 |
-
|
9936 |
-
|
|
|
9937 |
|
9938 |
-
|
9939 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9940 |
|
9941 |
-
|
9942 |
-
|
|
|
|
|
|
|
9943 |
|
9944 |
-
|
9945 |
-
|
|
|
9946 |
|
9947 |
-
|
|
|
9948 |
|
|
|
9949 |
|
|
|
|
|
|
|
|
|
|
|
9950 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9951 |
|
|
|
|
|
|
|
9952 |
|
|
|
|
|
|
|
|
|
|
|
9953 |
|
9954 |
|
|
|
9955 |
|
9956 |
-
|
|
|
|
|
9957 |
|
9958 |
-
|
|
|
|
|
|
|
|
|
9959 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9960 |
|
|
|
|
|
9961 |
|
|
|
|
|
|
|
|
|
|
|
9962 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9963 |
|
9964 |
|
|
|
|
|
|
|
9965 |
|
|
|
|
|
|
|
|
|
|
|
|
|
9966 |
|
|
|
|
|
9967 |
|
|
|
|
|
|
|
9968 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9969 |
|
9970 |
|
|
|
|
|
|
|
9971 |
|
|
|
|
|
|
|
9972 |
|
|
|
|
|
|
|
|
|
|
|
9973 |
|
|
|
|
|
9974 |
|
9975 |
|
|
|
9976 |
|
9977 |
-
|
9978 |
-
|
9979 |
-
|
9980 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9981 |
|
|
|
|
|
9982 |
|
|
|
|
|
9983 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9984 |
|
|
|
|
|
|
|
|
|
|
|
9985 |
|
|
|
|
|
9986 |
|
|
|
|
|
9987 |
|
9988 |
-
|
9989 |
-
|
9990 |
-
*/
|
9991 |
|
|
|
9992 |
|
|
|
|
|
|
|
9993 |
|
9994 |
-
var
|
9995 |
-
return __webpack_require__.e(/* import() | analytics-report */ 9).then(__webpack_require__.bind(null, 691));
|
9996 |
-
});
|
9997 |
-
var AnalyticsSettings = Object(external_wp_element_["lazy"])(function () {
|
9998 |
-
return __webpack_require__.e(/* import() | analytics-settings */ 20).then(__webpack_require__.bind(null, 711));
|
9999 |
-
});
|
10000 |
-
var Dashboard = Object(external_wp_element_["lazy"])(function () {
|
10001 |
-
return __webpack_require__.e(/* import() | dashboard */ 28).then(__webpack_require__.bind(null, 692));
|
10002 |
-
});
|
10003 |
-
var Homescreen = Object(external_wp_element_["lazy"])(function () {
|
10004 |
-
return Promise.all(/* import() | homescreen */[__webpack_require__.e(1), __webpack_require__.e(3), __webpack_require__.e(52), __webpack_require__.e(4), __webpack_require__.e(32)]).then(__webpack_require__.bind(null, 708));
|
10005 |
-
});
|
10006 |
-
var MarketingOverview = Object(external_wp_element_["lazy"])(function () {
|
10007 |
-
return Promise.all(/* import() | marketing-overview */[__webpack_require__.e(3), __webpack_require__.e(36)]).then(__webpack_require__.bind(null, 712));
|
10008 |
-
});
|
10009 |
-
var ProfileWizard = Object(external_wp_element_["lazy"])(function () {
|
10010 |
-
return Promise.all(/* import() | profile-wizard */[__webpack_require__.e(53), __webpack_require__.e(46)]).then(__webpack_require__.bind(null, 709));
|
10011 |
-
});
|
10012 |
-
var SettingsGroup = Object(external_wp_element_["lazy"])(function () {
|
10013 |
-
return Promise.all(/* import() | profile-wizard */[__webpack_require__.e(53), __webpack_require__.e(46)]).then(__webpack_require__.bind(null, 704));
|
10014 |
-
});
|
10015 |
-
var PAGES_FILTER = 'woocommerce_admin_pages_list';
|
10016 |
-
var controller_getPages = function getPages() {
|
10017 |
-
var pages = [];
|
10018 |
-
var initialBreadcrumbs = [['', wcSettings.woocommerceTranslation]];
|
10019 |
-
pages.push({
|
10020 |
-
container: Homescreen,
|
10021 |
-
path: '/',
|
10022 |
-
breadcrumbs: [].concat(initialBreadcrumbs, [Object(external_wp_i18n_["__"])('Home', 'woocommerce-admin')]),
|
10023 |
-
wpOpenMenu: 'toplevel_page_woocommerce',
|
10024 |
-
navArgs: {
|
10025 |
-
id: 'woocommerce-home'
|
10026 |
-
},
|
10027 |
-
capability: 'manage_woocommerce'
|
10028 |
-
});
|
10029 |
|
10030 |
-
|
10031 |
-
|
10032 |
-
|
10033 |
-
|
10034 |
-
|
10035 |
-
|
10036 |
-
navArgs: {
|
10037 |
-
id: 'woocommerce-analytics-overview'
|
10038 |
-
},
|
10039 |
-
capability: 'view_woocommerce_reports'
|
10040 |
-
});
|
10041 |
-
pages.push({
|
10042 |
-
container: AnalyticsSettings,
|
10043 |
-
path: '/analytics/settings',
|
10044 |
-
breadcrumbs: [].concat(initialBreadcrumbs, [['/analytics/revenue', Object(external_wp_i18n_["__"])('Analytics', 'woocommerce-admin')], Object(external_wp_i18n_["__"])('Settings', 'woocommerce-admin')]),
|
10045 |
-
wpOpenMenu: 'toplevel_page_wc-admin-path--analytics-overview',
|
10046 |
-
navArgs: {
|
10047 |
-
id: 'woocommerce-analytics-settings'
|
10048 |
-
},
|
10049 |
-
capability: 'view_woocommerce_reports'
|
10050 |
-
});
|
10051 |
-
pages.push({
|
10052 |
-
container: AnalyticsReport,
|
10053 |
-
path: '/customers',
|
10054 |
-
breadcrumbs: [].concat(initialBreadcrumbs, [Object(external_wp_i18n_["__"])('Customers', 'woocommerce-admin')]),
|
10055 |
-
wpOpenMenu: 'toplevel_page_woocommerce',
|
10056 |
-
navArgs: {
|
10057 |
-
id: 'woocommerce-analytics-customers'
|
10058 |
-
},
|
10059 |
-
capability: 'view_woocommerce_reports'
|
10060 |
-
});
|
10061 |
-
pages.push({
|
10062 |
-
container: AnalyticsReport,
|
10063 |
-
path: '/analytics/:report',
|
10064 |
-
breadcrumbs: function breadcrumbs(_ref) {
|
10065 |
-
var match = _ref.match;
|
10066 |
-
var report = Object(external_lodash_["find"])(Object(get_reports["a" /* default */])(), {
|
10067 |
-
report: match.params.report
|
10068 |
});
|
|
|
10069 |
|
10070 |
-
|
10071 |
-
|
10072 |
-
|
10073 |
-
|
10074 |
-
|
10075 |
-
|
10076 |
-
|
10077 |
-
|
10078 |
-
|
10079 |
-
|
10080 |
|
10081 |
-
|
10082 |
-
|
10083 |
-
container: MarketingOverview,
|
10084 |
-
path: '/marketing',
|
10085 |
-
breadcrumbs: [].concat(initialBreadcrumbs, [['/marketing', Object(external_wp_i18n_["__"])('Marketing', 'woocommerce-admin')], Object(external_wp_i18n_["__"])('Overview', 'woocommerce-admin')]),
|
10086 |
-
wpOpenMenu: 'toplevel_page_woocommerce-marketing',
|
10087 |
-
navArgs: {
|
10088 |
-
id: 'woocommerce-marketing-overview'
|
10089 |
-
},
|
10090 |
-
capability: 'view_woocommerce_reports'
|
10091 |
-
});
|
10092 |
-
}
|
10093 |
|
10094 |
-
|
10095 |
-
|
10096 |
-
|
10097 |
-
|
10098 |
-
|
10099 |
-
|
10100 |
-
|
10101 |
-
|
|
|
10102 |
|
10103 |
-
|
10104 |
-
|
10105 |
-
|
10106 |
-
|
10107 |
-
|
10108 |
-
|
10109 |
-
// @todo This might need to be refactored to retreive groups via data store.
|
10110 |
-
var settingsPages = Object(wc_admin_settings["g" /* getSetting */])('settingsPages');
|
10111 |
-
var page = settingsPages[match.params.page];
|
10112 |
|
10113 |
-
|
10114 |
-
|
10115 |
-
}
|
10116 |
|
10117 |
-
|
10118 |
-
|
10119 |
-
wpOpenMenu: 'toplevel_page_woocommerce',
|
10120 |
-
capability: 'manage_woocommerce'
|
10121 |
-
});
|
10122 |
-
}
|
10123 |
|
10124 |
-
|
10125 |
-
|
10126 |
-
|
10127 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10128 |
|
10129 |
-
|
|
|
|
|
|
|
|
|
10130 |
|
10131 |
-
function Controller() {
|
10132 |
-
classCallCheck_default()(this, Controller);
|
10133 |
|
10134 |
-
|
10135 |
-
|
10136 |
|
10137 |
-
|
10138 |
-
key: "componentDidMount",
|
10139 |
-
value: function componentDidMount() {
|
10140 |
-
window.document.documentElement.scrollTop = 0;
|
10141 |
-
window.document.body.classList.remove('woocommerce-admin-is-loading');
|
10142 |
-
}
|
10143 |
-
}, {
|
10144 |
-
key: "componentDidUpdate",
|
10145 |
-
value: function componentDidUpdate(prevProps) {
|
10146 |
-
var prevBaseQuery = Object(external_lodash_["omit"])(prevProps.query, 'chartType', 'filter', 'paged');
|
10147 |
-
var baseQuery = Object(external_lodash_["omit"])(this.props.query, 'chartType', 'filter', 'paged');
|
10148 |
|
10149 |
-
|
10150 |
-
|
10151 |
-
|
10152 |
-
|
10153 |
-
}
|
10154 |
|
10155 |
-
|
10156 |
-
|
10157 |
-
|
10158 |
-
|
10159 |
-
|
10160 |
-
|
10161 |
-
|
10162 |
-
|
10163 |
-
|
10164 |
-
|
10165 |
-
|
10166 |
-
|
10167 |
-
|
10168 |
-
|
10169 |
-
|
10170 |
-
|
10171 |
-
|
10172 |
-
|
10173 |
-
params: params,
|
10174 |
-
path: url,
|
10175 |
-
pathMatch: page.path,
|
10176 |
-
query: query
|
10177 |
-
}));
|
10178 |
-
}
|
10179 |
-
}]);
|
10180 |
|
10181 |
-
|
10182 |
-
|
10183 |
-
|
10184 |
-
|
10185 |
-
|
10186 |
-
|
10187 |
-
|
10188 |
-
|
10189 |
-
* @param {Array} excludedScreens - wc-admin screens to avoid updating.
|
10190 |
-
*/
|
10191 |
|
10192 |
-
|
10193 |
-
|
10194 |
-
var search = Object(external_lodash_["last"])(item.href.split('?'));
|
10195 |
-
var query = Object(lib["parse"])(search);
|
10196 |
-
var path = query.path || 'homescreen';
|
10197 |
-
var screen = Object(external_wc_navigation_["getScreenFromPath"])(path);
|
10198 |
-
var isExcludedScreen = excludedScreens.includes(screen);
|
10199 |
-
var href = 'admin.php?' + Object(lib["stringify"])(Object.assign(query, isExcludedScreen ? {} : nextQuery)); // Replace the href so you can see the url on hover.
|
10200 |
|
10201 |
-
|
|
|
|
|
|
|
10202 |
|
10203 |
-
|
10204 |
-
|
10205 |
-
|
10206 |
-
|
10207 |
-
}
|
10208 |
-
} // Update's wc-admin links in wp-admin menu
|
10209 |
-
|
10210 |
-
window.wpNavMenuUrlUpdate = function (query) {
|
10211 |
-
var nextQuery = Object(external_wc_navigation_["getPersistedQuery"])(query);
|
10212 |
-
var excludedScreens = Object(external_wc_navigation_["getQueryExcludedScreens"])();
|
10213 |
-
Array.from(document.querySelectorAll('#adminmenu a')).forEach(function (item) {
|
10214 |
-
return updateLinkHref(item, nextQuery, excludedScreens);
|
10215 |
-
});
|
10216 |
-
}; // When the route changes, we need to update wp-admin's menu with the correct section & current link
|
10217 |
-
|
10218 |
-
|
10219 |
-
window.wpNavMenuClassChange = function (page, url) {
|
10220 |
-
Array.from(document.getElementsByClassName('current')).forEach(function (item) {
|
10221 |
-
item.classList.remove('current');
|
10222 |
-
});
|
10223 |
-
var submenu = Array.from(document.querySelectorAll('.wp-has-current-submenu'));
|
10224 |
-
submenu.forEach(function (element) {
|
10225 |
-
element.classList.remove('wp-has-current-submenu');
|
10226 |
-
element.classList.remove('wp-menu-open');
|
10227 |
-
element.classList.remove('selected');
|
10228 |
-
element.classList.add('wp-not-current-submenu');
|
10229 |
-
element.classList.add('menu-top');
|
10230 |
-
});
|
10231 |
-
var pageUrl = url === '/' ? 'admin.php?page=wc-admin' : 'admin.php?page=wc-admin&path=' + encodeURIComponent(url);
|
10232 |
-
var currentItemsSelector = url === '/' ? "li > a[href$=\"".concat(pageUrl, "\"], li > a[href*=\"").concat(pageUrl, "?\"]") : "li > a[href*=\"".concat(pageUrl, "\"]");
|
10233 |
-
var currentItems = document.querySelectorAll(currentItemsSelector);
|
10234 |
-
Array.from(currentItems).forEach(function (item) {
|
10235 |
-
item.parentElement.classList.add('current');
|
10236 |
-
});
|
10237 |
|
10238 |
-
|
10239 |
-
|
|
|
10240 |
|
10241 |
-
|
10242 |
-
|
10243 |
-
|
10244 |
-
|
10245 |
-
|
10246 |
-
|
10247 |
-
|
|
|
|
|
10248 |
|
10249 |
-
|
10250 |
-
|
10251 |
-
|
10252 |
-
|
10253 |
-
|
|
|
|
|
|
|
|
|
10254 |
|
10255 |
-
|
10256 |
-
|
|
|
10257 |
|
10258 |
-
|
10259 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10260 |
|
10261 |
-
//
|
10262 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10263 |
|
10264 |
-
|
10265 |
-
|
10266 |
-
|
|
|
|
|
|
|
10267 |
|
10268 |
-
|
10269 |
-
|
|
|
10270 |
|
10271 |
-
|
10272 |
-
|
|
|
|
|
|
|
10273 |
|
10274 |
-
|
10275 |
-
|
|
|
|
|
|
|
10276 |
|
10277 |
-
|
10278 |
-
|
10279 |
|
10280 |
-
|
10281 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10282 |
|
10283 |
-
|
10284 |
-
|
10285 |
|
10286 |
-
|
10287 |
-
|
10288 |
-
|
|
|
10289 |
|
10290 |
-
|
10291 |
-
var
|
|
|
|
|
10292 |
|
10293 |
-
|
10294 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
10295 |
|
10296 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10297 |
|
|
|
10298 |
|
10299 |
-
|
10300 |
-
|
10301 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10302 |
|
10303 |
-
|
10304 |
-
|
10305 |
-
|
10306 |
-
}, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
|
10307 |
-
fillRule: "evenodd",
|
10308 |
-
d: "M6 5.5h12a.5.5 0 01.5.5v7H14a2 2 0 11-4 0H5.5V6a.5.5 0 01.5-.5zm-.5 9V18a.5.5 0 00.5.5h12a.5.5 0 00.5-.5v-3.5h-3.337a3.5 3.5 0 01-6.326 0H5.5zM4 13V6a2 2 0 012-2h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2v-5z",
|
10309 |
-
clipRule: "evenodd"
|
10310 |
-
}));
|
10311 |
-
/* harmony default export */ var library_inbox = (inbox_inbox);
|
10312 |
-
//# sourceMappingURL=inbox.js.map
|
10313 |
-
// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/help.js
|
10314 |
|
|
|
|
|
10315 |
|
10316 |
-
|
10317 |
-
|
10318 |
-
|
|
|
|
|
|
|
|
|
|
|
10319 |
|
10320 |
-
|
10321 |
-
|
10322 |
-
|
10323 |
-
}
|
10324 |
-
|
10325 |
-
})
|
10326 |
-
|
10327 |
-
//# sourceMappingURL=help.js.map
|
10328 |
-
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/external.js
|
10329 |
-
var external = __webpack_require__(596);
|
10330 |
|
10331 |
-
|
10332 |
-
|
|
|
|
|
|
|
|
|
|
|
10333 |
|
10334 |
-
|
10335 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10336 |
|
10337 |
-
|
10338 |
-
|
10339 |
-
*
|
10340 |
*/
|
10341 |
|
|
|
|
|
10342 |
|
10343 |
-
|
10344 |
-
|
10345 |
-
|
10346 |
-
|
10347 |
|
10348 |
-
|
10349 |
-
page: 1,
|
10350 |
-
per_page: external_wc_data_["QUERY_DEFAULTS"].pageSize,
|
10351 |
-
status: 'unactioned',
|
10352 |
-
type: external_wc_data_["QUERY_DEFAULTS"].noteTypes,
|
10353 |
-
orderby: 'date',
|
10354 |
-
order: 'desc'
|
10355 |
};
|
10356 |
-
function getUnreadNotes(select) {
|
10357 |
-
var _select = select(external_wc_data_["NOTES_STORE_NAME"]),
|
10358 |
-
getNotes = _select.getNotes,
|
10359 |
-
getNotesError = _select.getNotesError,
|
10360 |
-
isResolving = _select.isResolving;
|
10361 |
|
10362 |
-
|
10363 |
-
|
10364 |
-
|
10365 |
-
|
10366 |
-
var lastRead = parseInt(userData && userData.woocommerce_meta && userData.woocommerce_meta.activity_panel_inbox_last_read, 10);
|
10367 |
|
10368 |
-
|
10369 |
-
|
10370 |
-
|
|
|
|
|
10371 |
|
10372 |
-
|
10373 |
-
|
10374 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10375 |
|
10376 |
-
if (isError || isRequesting) {
|
10377 |
-
return null;
|
10378 |
-
}
|
10379 |
|
10380 |
-
var
|
10381 |
-
|
10382 |
-
|
10383 |
-
|
10384 |
-
|
10385 |
-
|
10386 |
-
}
|
10387 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10388 |
|
|
|
|
|
|
|
10389 |
|
|
|
|
|
|
|
|
|
|
|
10390 |
|
10391 |
-
/**
|
10392 |
-
*
|
|
|
10393 |
*/
|
10394 |
|
|
|
|
|
|
|
|
|
10395 |
|
10396 |
-
|
10397 |
-
|
10398 |
-
var icon = _ref.icon,
|
10399 |
-
title = _ref.title,
|
10400 |
-
name = _ref.name,
|
10401 |
-
unread = _ref.unread,
|
10402 |
-
selected = _ref.selected,
|
10403 |
-
isPanelOpen = _ref.isPanelOpen,
|
10404 |
-
onTabClick = _ref.onTabClick;
|
10405 |
-
var className = classnames_default()('woocommerce-layout__activity-panel-tab', {
|
10406 |
-
'is-active': isPanelOpen && selected,
|
10407 |
-
'has-unread': unread
|
10408 |
-
});
|
10409 |
-
var tabKey = "activity-panel-tab-".concat(name);
|
10410 |
-
return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
|
10411 |
-
role: "tab",
|
10412 |
-
className: className,
|
10413 |
-
"aria-selected": selected,
|
10414 |
-
"aria-controls": "activity-panel-".concat(name),
|
10415 |
-
key: tabKey,
|
10416 |
-
id: tabKey,
|
10417 |
-
onClick: function onClick() {
|
10418 |
-
onTabClick(name);
|
10419 |
-
}
|
10420 |
-
}, icon, title, ' ', unread && Object(external_wp_element_["createElement"])("span", {
|
10421 |
-
className: "screen-reader-text"
|
10422 |
-
}, Object(external_wp_i18n_["__"])('unread activity', 'woocommerce-admin')));
|
10423 |
};
|
10424 |
-
// CONCATENATED MODULE: ./client/header/activity-panel/tabs/index.js
|
10425 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10426 |
|
|
|
|
|
|
|
|
|
|
|
|
|
10427 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10428 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10429 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10430 |
|
10431 |
-
|
10432 |
-
|
10433 |
-
|
|
|
|
|
|
|
10434 |
|
|
|
|
|
10435 |
|
|
|
10436 |
|
10437 |
-
|
10438 |
-
|
10439 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10440 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10441 |
|
10442 |
-
var tabs_Tabs = function Tabs(_ref) {
|
10443 |
-
var tabs = _ref.tabs,
|
10444 |
-
_onTabClick = _ref.onTabClick,
|
10445 |
-
selectedTabName = _ref.selectedTab,
|
10446 |
-
_ref$tabOpen = _ref.tabOpen,
|
10447 |
-
tabOpen = _ref$tabOpen === void 0 ? false : _ref$tabOpen;
|
10448 |
|
10449 |
-
|
10450 |
-
|
10451 |
-
|
10452 |
-
|
10453 |
-
|
10454 |
-
|
10455 |
-
|
10456 |
-
|
10457 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10458 |
|
|
|
10459 |
|
10460 |
-
|
10461 |
-
|
10462 |
-
tabOpen: tabOpen,
|
10463 |
-
currentTab: selectedTabName
|
10464 |
});
|
10465 |
-
}
|
10466 |
-
return Object(external_wp_element_["createElement"])(external_wp_components_["NavigableMenu"], {
|
10467 |
-
role: "tablist",
|
10468 |
-
orientation: "horizontal",
|
10469 |
-
className: "woocommerce-layout__activity-panel-tabs"
|
10470 |
-
}, tabs && tabs.map(function (tab, i) {
|
10471 |
-
if (tab.component) {
|
10472 |
-
var Comp = tab.component,
|
10473 |
-
options = tab.options;
|
10474 |
-
return Object(external_wp_element_["createElement"])(Comp, extends_default()({
|
10475 |
-
key: i
|
10476 |
-
}, options));
|
10477 |
-
}
|
10478 |
-
|
10479 |
-
return Object(external_wp_element_["createElement"])(tab_Tab, extends_default()({
|
10480 |
-
key: i,
|
10481 |
-
index: i,
|
10482 |
-
isPanelOpen: tabIsOpenState,
|
10483 |
-
selected: currentTab === tab.name
|
10484 |
-
}, tab, {
|
10485 |
-
onTabClick: function onTabClick() {
|
10486 |
-
var isTabOpen = currentTab === tab.name || currentTab === '' ? !tabIsOpenState : true; // If a panel is being opened, or if an existing panel is already open and a different one is being opened, record a track.
|
10487 |
-
|
10488 |
-
if (!isTabOpen || currentTab !== tab.name) {
|
10489 |
-
Object(external_wc_tracks_["recordEvent"])('activity_panel_open', {
|
10490 |
-
tab: tab.name
|
10491 |
-
});
|
10492 |
-
}
|
10493 |
-
|
10494 |
-
setTabState({
|
10495 |
-
tabOpen: isTabOpen,
|
10496 |
-
currentTab: tab.name
|
10497 |
-
});
|
10498 |
|
10499 |
-
|
10500 |
-
|
10501 |
-
|
10502 |
-
|
10503 |
-
|
10504 |
-
|
10505 |
-
|
10506 |
-
|
10507 |
-
|
10508 |
-
|
10509 |
-
|
10510 |
-
|
10511 |
-
|
10512 |
-
|
10513 |
-
|
10514 |
-
|
10515 |
-
|
10516 |
-
|
10517 |
-
|
10518 |
-
|
10519 |
-
|
10520 |
-
|
10521 |
-
|
10522 |
-
}));
|
10523 |
-
};
|
10524 |
-
// CONCATENATED MODULE: ./client/header/activity-panel/display-options/icons/display.js
|
10525 |
|
|
|
|
|
10526 |
|
10527 |
-
|
10528 |
-
|
10529 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
10530 |
|
10531 |
-
var
|
10532 |
-
|
10533 |
-
className: "woocommerce-layout__activity-panel-tab-icon",
|
10534 |
-
width: "24",
|
10535 |
-
height: "24",
|
10536 |
-
viewBox: "3 3 24 24",
|
10537 |
-
fill: "none",
|
10538 |
-
xmlns: "http://www.w3.org/2000/svg"
|
10539 |
-
}, Object(external_wp_element_["createElement"])("path", {
|
10540 |
-
d: "M13.8053 15.3982C13.8053 15.7965 13.4867 16.1947 13.0089 16.1947H6.79646C6.55752 16.1947 6.39823 16.115 6.23894 15.9558C6.07965 15.7965 6 15.6372 6 15.3982V6.79646C6 6.63717 6.15929 6.39823 6.23894 6.23894C6.39823 6.07965 6.55752 6 6.79646 6H13.0089C13.4071 6 13.8053 6.31858 13.8053 6.79646V15.3982Z",
|
10541 |
-
strokeWidth: "1.5",
|
10542 |
-
strokeLinecap: "round",
|
10543 |
-
strokeLinejoin: "round"
|
10544 |
-
}), Object(external_wp_element_["createElement"])("path", {
|
10545 |
-
d: "M23.9203 10.6195C23.9203 11.0177 23.6017 11.4159 23.1238 11.4159H16.9115C16.6725 11.4159 16.5132 11.3363 16.3539 11.177C16.1946 11.0177 16.115 10.8584 16.115 10.6195V6.79646C16.115 6.39823 16.4336 6 16.9115 6H23.1238C23.5221 6 23.9203 6.31858 23.9203 6.79646V10.6195Z",
|
10546 |
-
strokeWidth: "1.5",
|
10547 |
-
strokeLinecap: "round",
|
10548 |
-
strokeLinejoin: "round"
|
10549 |
-
}), Object(external_wp_element_["createElement"])("path", {
|
10550 |
-
d: "M13.8053 23.2035C13.8053 23.4424 13.7257 23.6017 13.5664 23.761C13.4071 23.9203 13.2478 23.9999 13.0089 23.9999H6.79646C6.39823 23.9999 6 23.6813 6 23.2035V19.3804C6 19.1415 6.07965 18.9822 6.23894 18.8229C6.39823 18.6636 6.55752 18.584 6.79646 18.584H13.0089C13.4071 18.584 13.8053 18.9026 13.8053 19.3804V23.2035Z",
|
10551 |
-
strokeWidth: "1.5",
|
10552 |
-
strokeLinecap: "round",
|
10553 |
-
strokeLinejoin: "round"
|
10554 |
-
}), Object(external_wp_element_["createElement"])("path", {
|
10555 |
-
d: "M16.9912 23.9999C16.7522 23.9999 16.5929 23.9202 16.4336 23.7609C16.2743 23.6016 16.1947 23.4423 16.1947 23.2034V14.6016C16.1947 14.3627 16.2743 14.2034 16.4336 14.0441C16.5929 13.8848 16.7522 13.8052 16.9912 13.8052H23.2036C23.4425 13.8052 23.6018 13.8848 23.7611 14.0441C23.9204 14.2034 24 14.3627 24 14.6016V23.2034C24 23.6016 23.6814 23.9999 23.2036 23.9999H16.9912Z",
|
10556 |
-
strokeWidth: "1.5",
|
10557 |
-
strokeLinecap: "round",
|
10558 |
-
strokeLinejoin: "round"
|
10559 |
-
})), Object(external_wp_i18n_["__"])('Display', 'woocommerce-admin'));
|
10560 |
-
};
|
10561 |
-
// CONCATENATED MODULE: ./client/header/activity-panel/display-options/icons/single-column.js
|
10562 |
-
|
10563 |
-
var single_column_SingleColumnIcon = function SingleColumnIcon() {
|
10564 |
-
return Object(external_wp_element_["createElement"])("svg", {
|
10565 |
-
className: "woocommerce-layout__activity-panel-tab-icon",
|
10566 |
-
width: "12",
|
10567 |
-
height: "14",
|
10568 |
-
viewBox: "0 0 12 14",
|
10569 |
-
fill: "none",
|
10570 |
-
xmlns: "http://www.w3.org/2000/svg"
|
10571 |
-
}, Object(external_wp_element_["createElement"])("rect", {
|
10572 |
-
x: "0.5",
|
10573 |
-
y: "0.5",
|
10574 |
-
width: "11",
|
10575 |
-
height: "13",
|
10576 |
-
strokeWidth: "1"
|
10577 |
-
}));
|
10578 |
-
};
|
10579 |
-
// CONCATENATED MODULE: ./client/header/activity-panel/display-options/icons/two-columns.js
|
10580 |
-
|
10581 |
-
var two_columns_TwoColumnsIcon = function TwoColumnsIcon() {
|
10582 |
-
return Object(external_wp_element_["createElement"])("svg", {
|
10583 |
-
className: "woocommerce-layout__activity-panel-tab-icon",
|
10584 |
-
width: "18",
|
10585 |
-
height: "14",
|
10586 |
-
viewBox: "0 0 18 14",
|
10587 |
-
fill: "none",
|
10588 |
-
xmlns: "http://www.w3.org/2000/svg"
|
10589 |
-
}, Object(external_wp_element_["createElement"])("rect", {
|
10590 |
-
x: "0.5",
|
10591 |
-
y: "0.5",
|
10592 |
-
width: "7",
|
10593 |
-
height: "13",
|
10594 |
-
strokeWidth: "1"
|
10595 |
-
}), Object(external_wp_element_["createElement"])("rect", {
|
10596 |
-
x: "9.5",
|
10597 |
-
y: "0.5",
|
10598 |
-
width: "7",
|
10599 |
-
height: "13",
|
10600 |
-
strokeWidth: "1"
|
10601 |
-
}));
|
10602 |
-
};
|
10603 |
-
// CONCATENATED MODULE: ./client/header/activity-panel/display-options/index.js
|
10604 |
|
|
|
|
|
|
|
10605 |
|
10606 |
-
|
10607 |
-
|
10608 |
-
|
|
|
|
|
|
|
10609 |
|
|
|
|
|
10610 |
|
|
|
10611 |
|
|
|
|
|
10612 |
|
|
|
|
|
10613 |
|
10614 |
-
|
10615 |
-
|
10616 |
-
|
|
|
10617 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10618 |
|
|
|
|
|
|
|
10619 |
|
|
|
10620 |
|
10621 |
-
var
|
10622 |
-
value: 'single_column',
|
10623 |
-
label: Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(single_column_SingleColumnIcon, null), Object(external_wp_i18n_["__"])('Single column', 'woocommerce-admin'))
|
10624 |
-
}, {
|
10625 |
-
value: 'two_columns',
|
10626 |
-
label: Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(two_columns_TwoColumnsIcon, null), Object(external_wp_i18n_["__"])('Two columns', 'woocommerce-admin'))
|
10627 |
-
}];
|
10628 |
-
var display_options_DisplayOptions = function DisplayOptions() {
|
10629 |
-
var defaultHomescreenLayout = Object(external_wp_data_["useSelect"])(function (select) {
|
10630 |
-
var _select = select(external_wc_data_["OPTIONS_STORE_NAME"]),
|
10631 |
-
getOption = _select.getOption;
|
10632 |
|
10633 |
-
|
|
|
|
|
|
|
|
|
10634 |
});
|
10635 |
-
|
10636 |
-
|
10637 |
-
|
10638 |
-
|
10639 |
-
|
10640 |
-
return Object(external_wp_element_["createElement"])(external_wp_components_["DropdownMenu"], {
|
10641 |
-
icon: Object(external_wp_element_["createElement"])(display_DisplayIcon, null)
|
10642 |
-
/* translators: button label text should, if possible, be under 16 characters. */
|
10643 |
-
,
|
10644 |
-
label: Object(external_wp_i18n_["__"])('Display options', 'woocommerce-admin'),
|
10645 |
-
toggleProps: {
|
10646 |
-
className: 'woocommerce-layout__activity-panel-tab display-options',
|
10647 |
-
onClick: function onClick() {
|
10648 |
-
return Object(external_wc_tracks_["recordEvent"])('homescreen_display_click');
|
10649 |
-
}
|
10650 |
-
},
|
10651 |
-
popoverProps: {
|
10652 |
-
className: 'woocommerce-layout__activity-panel-popover'
|
10653 |
-
}
|
10654 |
-
}, function (_ref) {
|
10655 |
-
var onClose = _ref.onClose;
|
10656 |
-
return Object(external_wp_element_["createElement"])(external_wp_components_["MenuGroup"], {
|
10657 |
-
className: "woocommerce-layout__homescreen-display-options",
|
10658 |
-
label: Object(external_wp_i18n_["__"])('Layout', 'woocommerce-admin')
|
10659 |
-
}, Object(external_wp_element_["createElement"])(external_wp_components_["MenuItemsChoice"], {
|
10660 |
-
choices: LAYOUTS,
|
10661 |
-
onSelect: function onSelect(newLayout) {
|
10662 |
-
updateUserPreferences({
|
10663 |
-
homepage_layout: newLayout
|
10664 |
-
});
|
10665 |
-
onClose();
|
10666 |
-
Object(external_wc_tracks_["recordEvent"])('homescreen_display_option', {
|
10667 |
-
display_option: newLayout
|
10668 |
-
});
|
10669 |
-
},
|
10670 |
-
value: layout || defaultHomescreenLayout
|
10671 |
-
}));
|
10672 |
});
|
10673 |
-
|
10674 |
-
|
10675 |
-
|
10676 |
-
|
10677 |
-
// EXTERNAL MODULE: ./client/header/activity-panel/highlight-tooltip/style.scss
|
10678 |
-
var highlight_tooltip_style = __webpack_require__(425);
|
10679 |
-
|
10680 |
-
// CONCATENATED MODULE: ./client/header/activity-panel/highlight-tooltip/index.js
|
10681 |
-
|
10682 |
-
|
10683 |
-
|
10684 |
-
/**
|
10685 |
-
* External dependencies
|
10686 |
-
*/
|
10687 |
-
|
10688 |
-
|
10689 |
-
|
10690 |
-
|
10691 |
-
|
10692 |
-
|
10693 |
-
/**
|
10694 |
-
* Internal dependencies
|
10695 |
-
*/
|
10696 |
-
|
10697 |
|
10698 |
-
|
10699 |
-
|
10700 |
-
function HighlightTooltip(_ref) {
|
10701 |
-
var title = _ref.title,
|
10702 |
-
closeButtonText = _ref.closeButtonText,
|
10703 |
-
content = _ref.content,
|
10704 |
-
_ref$show = _ref.show,
|
10705 |
-
show = _ref$show === void 0 ? true : _ref$show,
|
10706 |
-
id = _ref.id,
|
10707 |
-
onClose = _ref.onClose,
|
10708 |
-
delay = _ref.delay,
|
10709 |
-
_ref$onShow = _ref.onShow,
|
10710 |
-
onShow = _ref$onShow === void 0 ? external_lodash_["noop"] : _ref$onShow,
|
10711 |
-
_ref$useAnchor = _ref.useAnchor,
|
10712 |
-
useAnchor = _ref$useAnchor === void 0 ? false : _ref$useAnchor;
|
10713 |
-
|
10714 |
-
var _useState = Object(external_wp_element_["useState"])(delay > 0 ? null : show),
|
10715 |
-
_useState2 = slicedToArray_default()(_useState, 2),
|
10716 |
-
showHighlight = _useState2[0],
|
10717 |
-
setShowHighlight = _useState2[1];
|
10718 |
-
|
10719 |
-
var _useState3 = Object(external_wp_element_["useState"])(null),
|
10720 |
-
_useState4 = slicedToArray_default()(_useState3, 2),
|
10721 |
-
node = _useState4[0],
|
10722 |
-
setNode = _useState4[1];
|
10723 |
-
|
10724 |
-
var _useState5 = Object(external_wp_element_["useState"])(null),
|
10725 |
-
_useState6 = slicedToArray_default()(_useState5, 2),
|
10726 |
-
anchorRect = _useState6[0],
|
10727 |
-
setAnchorRect = _useState6[1];
|
10728 |
-
|
10729 |
-
Object(external_wp_element_["useEffect"])(function () {
|
10730 |
-
var element = document.getElementById(id);
|
10731 |
-
var container, parent;
|
10732 |
-
|
10733 |
-
if (element && !node) {
|
10734 |
-
// Add tooltip container
|
10735 |
-
if (!useAnchor) {
|
10736 |
-
parent = element.parentElement;
|
10737 |
-
} else {
|
10738 |
-
parent = document.createElement('div');
|
10739 |
-
document.body.appendChild(parent);
|
10740 |
-
}
|
10741 |
|
10742 |
-
|
10743 |
-
|
10744 |
-
|
10745 |
-
|
10746 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10747 |
|
10748 |
-
|
10749 |
-
|
10750 |
-
|
10751 |
-
|
10752 |
-
parentElement.removeChild(container);
|
10753 |
|
10754 |
-
|
10755 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10756 |
}
|
10757 |
-
}
|
10758 |
-
|
10759 |
-
if (timeoutId) {
|
10760 |
-
clearTimeout(timeoutId);
|
10761 |
-
}
|
10762 |
-
};
|
10763 |
-
}, []);
|
10764 |
-
Object(external_wp_element_["useEffect"])(function () {
|
10765 |
-
if (!showHighlight && node) {
|
10766 |
-
node.classList.remove(SHOW_CLASS);
|
10767 |
-
}
|
10768 |
-
}, [showHighlight]);
|
10769 |
-
Object(external_wp_element_["useEffect"])(function () {
|
10770 |
-
if (show !== showHighlight && showHighlight !== null && node) {
|
10771 |
-
setShowHighlight(show);
|
10772 |
-
|
10773 |
-
if (!show) {
|
10774 |
-
node.classList.remove(SHOW_CLASS);
|
10775 |
-
} else if (node) {
|
10776 |
-
triggerShowTooltip(node);
|
10777 |
-
}
|
10778 |
-
}
|
10779 |
-
}, [show]);
|
10780 |
-
Object(external_wp_element_["useLayoutEffect"])(function () {
|
10781 |
-
window.addEventListener('resize', updateSize);
|
10782 |
-
return function () {
|
10783 |
-
return window.removeEventListener('resize', updateSize);
|
10784 |
-
};
|
10785 |
-
}, []);
|
10786 |
|
10787 |
-
|
10788 |
-
|
10789 |
-
|
10790 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10791 |
}
|
10792 |
}
|
10793 |
|
10794 |
-
var
|
10795 |
-
|
10796 |
-
|
10797 |
-
|
10798 |
-
timeoutId = setTimeout(function () {
|
10799 |
-
timeoutId = null;
|
10800 |
-
showTooltip(container);
|
10801 |
-
}, delay);
|
10802 |
-
} else if (!showHighlight) {
|
10803 |
-
showTooltip(container);
|
10804 |
-
}
|
10805 |
|
10806 |
-
|
10807 |
-
|
|
|
|
|
10808 |
|
10809 |
-
|
10810 |
-
var element = document.getElementById(id);
|
10811 |
|
10812 |
-
if (
|
10813 |
-
|
10814 |
-
}
|
10815 |
|
10816 |
-
|
10817 |
-
|
10818 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10819 |
|
10820 |
-
|
10821 |
-
|
10822 |
-
|
|
|
10823 |
|
10824 |
-
|
10825 |
-
|
10826 |
|
10827 |
-
if (
|
10828 |
-
|
10829 |
}
|
10830 |
-
};
|
10831 |
-
|
10832 |
-
if (!node) {
|
10833 |
-
return null;
|
10834 |
-
}
|
10835 |
-
|
10836 |
-
return Object(external_wp_element_["createPortal"])(Object(external_wp_element_["createElement"])("div", {
|
10837 |
-
className: "highlight-tooltip__portal"
|
10838 |
-
}, showHighlight ? Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["IsolatedEventContainer"], {
|
10839 |
-
className: "highlight-tooltip__overlay"
|
10840 |
-
}), Object(external_wp_element_["createElement"])(external_wp_components_["Popover"], {
|
10841 |
-
className: "highlight-tooltip__popover",
|
10842 |
-
noArrow: false,
|
10843 |
-
anchorRect: anchorRect,
|
10844 |
-
focusOnMount: "container"
|
10845 |
-
}, Object(external_wp_element_["createElement"])(external_wp_components_["Card"], {
|
10846 |
-
size: "medium"
|
10847 |
-
}, Object(external_wp_element_["createElement"])(external_wp_components_["CardHeader"], null, title, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
|
10848 |
-
isSmall: true,
|
10849 |
-
onClick: triggerClose,
|
10850 |
-
icon: library_close["a" /* default */]
|
10851 |
-
})), Object(external_wp_element_["createElement"])(external_wp_components_["CardBody"], null, content || null), Object(external_wp_element_["createElement"])(external_wp_components_["CardFooter"], {
|
10852 |
-
isBorderless: true
|
10853 |
-
}, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
|
10854 |
-
size: "small",
|
10855 |
-
isPrimary: true,
|
10856 |
-
onClick: triggerClose
|
10857 |
-
}, closeButtonText || Object(external_wp_i18n_["__"])('Close', 'woocommerce-admin')))))) : null), node);
|
10858 |
-
}
|
10859 |
-
|
10860 |
-
HighlightTooltip.propTypes = {
|
10861 |
-
/**
|
10862 |
-
* The id of the element it should highlight, should be unique per HighlightTooltip.
|
10863 |
-
*/
|
10864 |
-
id: prop_types_default.a.string.isRequired,
|
10865 |
-
|
10866 |
-
/**
|
10867 |
-
* Title of the popup
|
10868 |
-
*/
|
10869 |
-
title: prop_types_default.a.string.isRequired,
|
10870 |
-
|
10871 |
-
/**
|
10872 |
-
* Text of the close button.
|
10873 |
-
*/
|
10874 |
-
closeButtonText: prop_types_default.a.string.isRequired,
|
10875 |
-
|
10876 |
-
/**
|
10877 |
-
* Content of the popup, can be either text or react element.
|
10878 |
-
*/
|
10879 |
-
content: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.node]),
|
10880 |
-
|
10881 |
-
/**
|
10882 |
-
* If to show the popup, defaults to true.
|
10883 |
-
*/
|
10884 |
-
show: prop_types_default.a.bool,
|
10885 |
-
|
10886 |
-
/**
|
10887 |
-
* Callback for when the user closes the popup.
|
10888 |
-
*/
|
10889 |
-
onClose: prop_types_default.a.func,
|
10890 |
-
|
10891 |
-
/**
|
10892 |
-
* This will delay the popup from appearing by the number of ms.
|
10893 |
-
*/
|
10894 |
-
delay: prop_types_default.a.number,
|
10895 |
-
|
10896 |
-
/**
|
10897 |
-
* A callback for when the tooltip is shown.
|
10898 |
-
*/
|
10899 |
-
onShow: prop_types_default.a.func,
|
10900 |
-
|
10901 |
-
/**
|
10902 |
-
* useAnchor, will append the tooltip to the body tag, and make use of the anchorRect to display the tooltip.
|
10903 |
-
* Defaults to false.
|
10904 |
-
*/
|
10905 |
-
useAnchor: prop_types_default.a.bool
|
10906 |
-
};
|
10907 |
-
|
10908 |
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.find.js
|
10909 |
-
var es_array_find = __webpack_require__(192);
|
10910 |
-
|
10911 |
-
// EXTERNAL MODULE: external ["wp","dom"]
|
10912 |
-
var external_wp_dom_ = __webpack_require__(262);
|
10913 |
-
|
10914 |
-
// CONCATENATED MODULE: ./client/hooks/useFocusOnMount.js
|
10915 |
-
|
10916 |
-
|
10917 |
-
/**
|
10918 |
-
* This hook was directly copied from https://github.com/WordPress/gutenberg/blob/master/packages/compose/src/hooks/use-focus-on-mount/index.js
|
10919 |
-
* to avoid its absence in older versions of WordPress.
|
10920 |
-
*
|
10921 |
-
* This can be removed once the minimum supported version of WordPress includes this hook.
|
10922 |
-
*/
|
10923 |
|
10924 |
-
|
10925 |
-
* External dependencies
|
10926 |
-
*/
|
10927 |
-
|
10928 |
-
|
10929 |
-
/**
|
10930 |
-
* Hook used to focus the first tabbable element on mount.
|
10931 |
-
*
|
10932 |
-
* @param {boolean|string} focusOnMount Focus on mount mode.
|
10933 |
-
* @return {Function} Ref callback.
|
10934 |
-
*
|
10935 |
-
* @example
|
10936 |
-
* ```js
|
10937 |
-
* import { useFocusOnMount } from '@wordpress/compose';
|
10938 |
-
*
|
10939 |
-
* const WithFocusOnMount = () => {
|
10940 |
-
* const ref = useFocusOnMount()
|
10941 |
-
* return (
|
10942 |
-
* <div ref={ ref }>
|
10943 |
-
* <Button />
|
10944 |
-
* <Button />
|
10945 |
-
* </div>
|
10946 |
-
* );
|
10947 |
-
* }
|
10948 |
-
* ```
|
10949 |
-
*/
|
10950 |
-
|
10951 |
-
function useFocusOnMount() {
|
10952 |
-
var focusOnMount = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'firstElement';
|
10953 |
-
var focusOnMountRef = Object(external_wp_element_["useRef"])(focusOnMount);
|
10954 |
-
Object(external_wp_element_["useEffect"])(function () {
|
10955 |
-
focusOnMountRef.current = focusOnMount;
|
10956 |
-
}, [focusOnMount]);
|
10957 |
-
return Object(external_wp_element_["useCallback"])(function (node) {
|
10958 |
-
if (!node || focusOnMountRef.current === false) {
|
10959 |
-
return;
|
10960 |
-
}
|
10961 |
|
10962 |
-
if (
|
10963 |
-
|
10964 |
}
|
10965 |
|
10966 |
-
|
10967 |
-
|
10968 |
-
|
10969 |
-
var firstTabbable = external_wp_dom_["focus"].tabbable.find(node)[0];
|
10970 |
|
10971 |
-
|
10972 |
-
|
10973 |
-
}
|
10974 |
-
}
|
10975 |
|
10976 |
-
|
10977 |
-
|
10978 |
-
|
10979 |
-
|
10980 |
-
|
10981 |
-
|
10982 |
-
|
10983 |
-
|
10984 |
-
|
10985 |
-
|
10986 |
-
|
10987 |
-
|
10988 |
-
|
10989 |
-
|
10990 |
-
|
10991 |
-
|
10992 |
-
|
10993 |
-
|
10994 |
-
|
10995 |
-
|
10996 |
-
|
10997 |
-
|
10998 |
-
|
10999 |
-
|
11000 |
-
|
11001 |
-
|
11002 |
-
|
11003 |
-
|
11004 |
-
|
11005 |
-
|
11006 |
-
|
11007 |
-
|
11008 |
-
|
11009 |
-
|
11010 |
-
|
11011 |
-
|
11012 |
-
|
11013 |
-
|
11014 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11015 |
|
11016 |
-
|
11017 |
-
|
11018 |
-
|
11019 |
-
return true;
|
11020 |
|
11021 |
-
|
11022 |
-
|
11023 |
-
|
11024 |
-
eventTarget.type);
|
11025 |
}
|
11026 |
|
11027 |
-
return
|
11028 |
}
|
11029 |
-
/* eslint-enable jsdoc/valid-types */
|
11030 |
|
11031 |
-
|
11032 |
-
|
11033 |
-
|
|
|
|
|
|
|
|
|
|
|
11034 |
|
11035 |
-
|
11036 |
-
|
11037 |
-
* @param {SyntheticEvent} event input related event.
|
11038 |
-
*/
|
11039 |
|
11040 |
-
|
11041 |
-
* @typedef FocusOutsideReactElement
|
11042 |
-
* @property {EventCallback} handleFocusOutside callback for a focus outside event.
|
11043 |
-
*/
|
11044 |
|
11045 |
-
|
11046 |
-
|
11047 |
-
*/
|
11048 |
|
11049 |
-
|
11050 |
-
|
11051 |
-
* @property {EventCallback} onFocus An event handler for focus events.
|
11052 |
-
* @property {EventCallback} onBlur An event handler for blur events.
|
11053 |
-
* @property {EventCallback} onMouseDown An event handler for mouse down events.
|
11054 |
-
* @property {EventCallback} onMouseUp An event handler for mouse up events.
|
11055 |
-
* @property {EventCallback} onTouchStart An event handler for touch start events.
|
11056 |
-
* @property {EventCallback} onTouchEnd An event handler for touch end events.
|
11057 |
-
*/
|
11058 |
|
11059 |
-
|
11060 |
-
|
11061 |
-
* element the event handlers are bound to.
|
11062 |
-
*
|
11063 |
-
* @param {EventCallback} onFocusOutside A callback triggered when focus moves outside
|
11064 |
-
* the element the event handlers are bound to.
|
11065 |
-
*
|
11066 |
-
* @return {FocusOutsideReturnValue} An object containing event handlers. Bind the event handlers
|
11067 |
-
* to a wrapping element element to capture when focus moves
|
11068 |
-
* outside that element.
|
11069 |
-
*/
|
11070 |
|
|
|
|
|
|
|
11071 |
|
11072 |
-
|
11073 |
-
|
11074 |
-
|
11075 |
-
currentOnFocusOutside.current = onFocusOutside;
|
11076 |
-
}, [onFocusOutside]);
|
11077 |
-
var preventBlurCheck = Object(external_wp_element_["useRef"])(false);
|
11078 |
-
/**
|
11079 |
-
* @type {import('react').MutableRefObject<number | undefined>}
|
11080 |
-
*/
|
11081 |
|
11082 |
-
|
11083 |
-
|
11084 |
-
|
11085 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11086 |
|
11087 |
-
|
11088 |
-
|
11089 |
-
}
|
11090 |
|
11091 |
-
Object(external_wp_element_["useEffect"])(function () {
|
11092 |
-
return function () {
|
11093 |
-
return cancelBlurCheck();
|
11094 |
-
};
|
11095 |
-
}, []); // Cancel a blur check if the callback or ref is no longer provided.
|
11096 |
|
11097 |
-
|
11098 |
-
|
11099 |
-
cancelBlurCheck();
|
11100 |
-
}
|
11101 |
-
}, [onFocusOutside, cancelBlurCheck]);
|
11102 |
-
/**
|
11103 |
-
* Handles a mousedown or mouseup event to respectively assign and
|
11104 |
-
* unassign a flag for preventing blur check on button elements. Some
|
11105 |
-
* browsers, namely Firefox and Safari, do not emit a focus event on
|
11106 |
-
* button elements when clicked, while others do. The logic here
|
11107 |
-
* intends to normalize this as treating click on buttons as focus.
|
11108 |
-
*
|
11109 |
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus
|
11110 |
-
*
|
11111 |
-
* @param {SyntheticEvent} event Event for mousedown or mouseup.
|
11112 |
-
*/
|
11113 |
-
|
11114 |
-
var normalizeButtonFocus = Object(external_wp_element_["useCallback"])(function (event) {
|
11115 |
-
var type = event.type,
|
11116 |
-
target = event.target;
|
11117 |
-
var isInteractionEnd = Object(external_lodash_["includes"])(['mouseup', 'touchend'], type);
|
11118 |
|
11119 |
-
|
11120 |
-
|
11121 |
-
|
11122 |
-
|
11123 |
-
|
11124 |
-
|
11125 |
-
|
11126 |
-
* A callback triggered when a blur event occurs on the element the handler
|
11127 |
-
* is bound to.
|
11128 |
-
*
|
11129 |
-
* Calls the `onFocusOutside` callback in an immediate timeout if focus has
|
11130 |
-
* move outside the bound element and is still within the document.
|
11131 |
-
*
|
11132 |
-
* @param {SyntheticEvent} event Blur event.
|
11133 |
-
*/
|
11134 |
|
11135 |
-
|
11136 |
-
|
11137 |
-
|
11138 |
-
|
|
|
|
|
|
|
11139 |
|
11140 |
-
|
11141 |
-
|
11142 |
-
|
|
|
|
|
|
|
|
|
11143 |
|
11144 |
-
blurCheckTimeoutId.current = setTimeout(function () {
|
11145 |
-
// If document is not focused then focus should remain
|
11146 |
-
// inside the wrapped component and therefore we cancel
|
11147 |
-
// this blur event thereby leaving focus in place.
|
11148 |
-
// https://developer.mozilla.org/en-US/docs/Web/API/Document/hasFocus.
|
11149 |
-
if (!document.hasFocus()) {
|
11150 |
-
event.preventDefault();
|
11151 |
-
return;
|
11152 |
-
}
|
11153 |
|
11154 |
-
|
11155 |
-
currentOnFocusOutside.current(event);
|
11156 |
-
}
|
11157 |
-
}, 0);
|
11158 |
-
}, []);
|
11159 |
-
return {
|
11160 |
-
onFocus: cancelBlurCheck,
|
11161 |
-
onMouseDown: normalizeButtonFocus,
|
11162 |
-
onMouseUp: normalizeButtonFocus,
|
11163 |
-
onTouchStart: normalizeButtonFocus,
|
11164 |
-
onTouchEnd: normalizeButtonFocus,
|
11165 |
-
onBlur: queueBlurCheck
|
11166 |
-
};
|
11167 |
-
}
|
11168 |
-
// CONCATENATED MODULE: ./client/header/activity-panel/panel.js
|
11169 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11170 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11171 |
|
11172 |
-
|
11173 |
-
|
11174 |
-
|
|
|
|
|
|
|
|
|
11175 |
|
|
|
|
|
11176 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11177 |
|
11178 |
-
|
11179 |
-
*
|
11180 |
-
|
|
|
|
|
|
|
|
|
|
|
11181 |
|
|
|
|
|
|
|
|
|
|
|
|
|
11182 |
|
|
|
|
|
|
|
|
|
11183 |
|
11184 |
-
|
11185 |
-
var
|
11186 |
-
|
11187 |
-
|
11188 |
-
|
11189 |
-
|
11190 |
-
closePanel = _ref.closePanel,
|
11191 |
-
clearPanel = _ref.clearPanel;
|
11192 |
-
var panelClass = 'woocommerce-layout__activity-panel-wrapper';
|
11193 |
|
11194 |
-
|
11195 |
-
|
|
|
|
|
|
|
|
|
|
|
11196 |
|
11197 |
-
|
11198 |
-
|
11199 |
-
|
11200 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11201 |
|
11202 |
-
var possibleFocusPanel = function possibleFocusPanel() {
|
11203 |
-
if (!containerRef.current || !isPanelOpen || !tab) {
|
11204 |
-
return;
|
11205 |
-
}
|
11206 |
|
11207 |
-
|
11208 |
-
|
11209 |
|
11210 |
-
|
11211 |
-
if (e && e.propertyName === 'transform') {
|
11212 |
-
clearPanel();
|
11213 |
-
possibleFocusPanel();
|
11214 |
-
}
|
11215 |
-
};
|
11216 |
|
11217 |
-
|
11218 |
-
|
11219 |
-
|
11220 |
-
|
11221 |
-
|
11222 |
-
|
11223 |
-
|
|
|
|
|
|
|
11224 |
|
11225 |
-
|
11226 |
-
|
11227 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11228 |
});
|
11229 |
-
}
|
11230 |
-
|
11231 |
-
if (!content) {
|
11232 |
-
return null;
|
11233 |
-
}
|
11234 |
-
|
11235 |
-
var classNames = classnames_default()(panelClass, {
|
11236 |
-
'is-open': isPanelOpen,
|
11237 |
-
'is-switching': isPanelSwitching
|
11238 |
});
|
11239 |
-
|
11240 |
-
|
11241 |
-
|
11242 |
-
|
11243 |
-
|
11244 |
-
|
11245 |
-
|
11246 |
-
|
11247 |
-
|
11248 |
-
|
11249 |
-
|
11250 |
-
|
11251 |
-
|
11252 |
-
|
11253 |
-
|
|
|
|
|
|
|
11254 |
};
|
11255 |
-
/* harmony default export */ var panel = (panel_Panel);
|
11256 |
-
// CONCATENATED MODULE: ./client/header/activity-panel/index.js
|
11257 |
-
|
11258 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11259 |
|
|
|
|
|
|
|
11260 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11261 |
|
|
|
|
|
|
|
11262 |
|
|
|
|
|
11263 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11264 |
|
|
|
|
|
|
|
11265 |
|
|
|
11266 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11267 |
|
11268 |
|
11269 |
-
|
11270 |
-
|
11271 |
-
|
|
|
|
|
|
|
|
|
11272 |
|
|
|
|
|
|
|
|
|
|
|
11273 |
|
|
|
|
|
|
|
|
|
|
|
11274 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11275 |
|
11276 |
|
|
|
11277 |
|
|
|
|
|
11278 |
|
|
|
11279 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11280 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11281 |
|
11282 |
/**
|
11283 |
-
*
|
|
|
|
|
|
|
|
|
11284 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11285 |
|
|
|
|
|
|
|
|
|
|
|
|
|
11286 |
|
|
|
|
|
|
|
|
|
|
|
11287 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11288 |
|
|
|
|
|
|
|
|
|
|
|
11289 |
|
|
|
|
|
|
|
|
|
|
|
11290 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11291 |
|
|
|
|
|
|
|
|
|
11292 |
|
|
|
|
|
|
|
|
|
11293 |
|
11294 |
-
|
11295 |
-
|
11296 |
-
});
|
11297 |
-
var InboxPanel = Object(external_wp_element_["lazy"])(function () {
|
11298 |
-
return Promise.all(/* import() | activity-panels-inbox */[__webpack_require__.e(1), __webpack_require__.e(3), __webpack_require__.e(4), __webpack_require__.e(8)]).then(__webpack_require__.bind(null, 689));
|
11299 |
-
});
|
11300 |
-
var activity_panel_ActivityPanel = function ActivityPanel(_ref) {
|
11301 |
-
var isEmbedded = _ref.isEmbedded,
|
11302 |
-
query = _ref.query,
|
11303 |
-
userPreferencesData = _ref.userPreferencesData;
|
11304 |
-
|
11305 |
-
var _useState = Object(external_wp_element_["useState"])(''),
|
11306 |
-
_useState2 = slicedToArray_default()(_useState, 2),
|
11307 |
-
currentTab = _useState2[0],
|
11308 |
-
setCurrentTab = _useState2[1];
|
11309 |
-
|
11310 |
-
var _useState3 = Object(external_wp_element_["useState"])(false),
|
11311 |
-
_useState4 = slicedToArray_default()(_useState3, 2),
|
11312 |
-
isPanelClosing = _useState4[0],
|
11313 |
-
setIsPanelClosing = _useState4[1];
|
11314 |
-
|
11315 |
-
var _useState5 = Object(external_wp_element_["useState"])(false),
|
11316 |
-
_useState6 = slicedToArray_default()(_useState5, 2),
|
11317 |
-
isPanelOpen = _useState6[0],
|
11318 |
-
setIsPanelOpen = _useState6[1];
|
11319 |
-
|
11320 |
-
var _useState7 = Object(external_wp_element_["useState"])(false),
|
11321 |
-
_useState8 = slicedToArray_default()(_useState7, 2),
|
11322 |
-
isPanelSwitching = _useState8[0],
|
11323 |
-
setIsPanelSwitching = _useState8[1];
|
11324 |
-
|
11325 |
-
var _useSelect = Object(external_wp_data_["useSelect"])(function (select) {
|
11326 |
-
var _select = select(external_wc_data_["OPTIONS_STORE_NAME"]),
|
11327 |
-
getOption = _select.getOption,
|
11328 |
-
isResolving = _select.isResolving;
|
11329 |
|
11330 |
-
|
11331 |
-
|
11332 |
-
|
11333 |
-
|
11334 |
-
|
11335 |
-
|
11336 |
-
|
11337 |
-
|
11338 |
-
|
11339 |
-
|
11340 |
-
setupTaskListComplete = _useSelect.setupTaskListComplete,
|
11341 |
-
setupTaskListHidden = _useSelect.setupTaskListHidden,
|
11342 |
-
trackedCompletedTasks = _useSelect.trackedCompletedTasks;
|
11343 |
|
11344 |
-
|
11345 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11346 |
|
11347 |
-
|
11348 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11349 |
|
11350 |
-
|
11351 |
-
|
11352 |
-
|
|
|
|
|
|
|
11353 |
|
11354 |
-
|
11355 |
-
|
|
|
|
|
11356 |
}
|
|
|
11357 |
|
11358 |
-
|
11359 |
-
|
11360 |
-
|
11361 |
-
|
11362 |
-
|
11363 |
-
var _closePanel = function closePanel() {
|
11364 |
-
setIsPanelClosing(true);
|
11365 |
-
setIsPanelOpen(false);
|
11366 |
-
};
|
11367 |
|
11368 |
-
|
11369 |
-
|
11370 |
-
setIsPanelClosing(false);
|
11371 |
-
setIsPanelSwitching(false);
|
11372 |
-
setCurrentTab('');
|
11373 |
-
}
|
11374 |
-
};
|
11375 |
|
11376 |
-
|
11377 |
-
|
11378 |
-
};
|
11379 |
|
11380 |
-
|
11381 |
-
|
11382 |
-
}; // @todo Pull in dynamic unread status/count
|
11383 |
|
|
|
|
|
11384 |
|
11385 |
-
|
11386 |
-
|
11387 |
-
|
11388 |
-
|
11389 |
-
|
11390 |
-
icon: library_inbox
|
11391 |
-
}),
|
11392 |
-
unread: hasUnreadNotes,
|
11393 |
-
visible: (isEmbedded || !isHomescreen()) && !isPerformingSetupTask()
|
11394 |
-
};
|
11395 |
-
var setup = {
|
11396 |
-
name: 'setup',
|
11397 |
-
title: Object(external_wp_i18n_["__"])('Finish setup', 'woocommerce-admin'),
|
11398 |
-
icon: Object(external_wp_element_["createElement"])(setup_progress_SetupProgress, null),
|
11399 |
-
onClick: function onClick() {
|
11400 |
-
var currentLocation = window.location.href;
|
11401 |
-
var homescreenLocation = Object(wc_admin_settings["f" /* getAdminLink */])('admin.php?page=wc-admin'); // Don't navigate if we're already on the homescreen, this will cause an infinite loop
|
11402 |
-
|
11403 |
-
if (currentLocation !== homescreenLocation) {
|
11404 |
-
// Ensure that if the user is trying to get to the task list they can see it even if
|
11405 |
-
// it was dismissed.
|
11406 |
-
if (setupTaskListHidden === 'no') {
|
11407 |
-
redirectToHomeScreen();
|
11408 |
-
} else {
|
11409 |
-
updateOptions({
|
11410 |
-
woocommerce_task_list_hidden: 'no'
|
11411 |
-
}).then(redirectToHomeScreen);
|
11412 |
}
|
11413 |
-
}
|
11414 |
|
11415 |
-
|
11416 |
-
|
11417 |
-
|
11418 |
-
|
11419 |
-
var help = {
|
11420 |
-
name: 'help',
|
11421 |
-
title: Object(external_wp_i18n_["__"])('Help', 'woocommerce-admin'),
|
11422 |
-
icon: Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
|
11423 |
-
icon: library_help
|
11424 |
-
}),
|
11425 |
-
visible: isHomescreen() && !isEmbedded || isPerformingSetupTask()
|
11426 |
-
};
|
11427 |
-
var displayOptions = {
|
11428 |
-
component: display_options_DisplayOptions,
|
11429 |
-
visible: !isEmbedded && isHomescreen() && !isPerformingSetupTask()
|
11430 |
-
};
|
11431 |
-
var previewSite = {
|
11432 |
-
name: 'previewSite',
|
11433 |
-
title: Object(external_wp_i18n_["__"])('Preview site', 'woocommerce-admin'),
|
11434 |
-
icon: Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
|
11435 |
-
icon: external["a" /* default */]
|
11436 |
-
}),
|
11437 |
-
visible: query.page === 'wc-admin' && query.task === 'appearance',
|
11438 |
-
onClick: function onClick() {
|
11439 |
-
window.open(window.wcSettings.siteUrl);
|
11440 |
-
return null;
|
11441 |
}
|
11442 |
-
};
|
11443 |
-
return [inbox, setup, previewSite, displayOptions, help].filter(function (tab) {
|
11444 |
-
return tab.visible;
|
11445 |
-
});
|
11446 |
-
};
|
11447 |
|
11448 |
-
|
11449 |
-
|
|
|
|
|
11450 |
|
11451 |
-
|
11452 |
-
|
11453 |
-
|
|
|
|
|
|
|
|
|
11454 |
|
11455 |
-
|
11456 |
-
|
11457 |
-
taskName: task
|
11458 |
-
});
|
11459 |
|
11460 |
-
|
11461 |
-
|
11462 |
-
|
11463 |
-
};
|
11464 |
|
11465 |
-
|
11466 |
-
|
11467 |
-
Object(external_wc_navigation_["getHistory"])().push(Object(external_wc_navigation_["getNewPath"])({}, '/', {}));
|
11468 |
-
} else {
|
11469 |
-
window.location.href = Object(wc_admin_settings["f" /* getAdminLink */])('admin.php?page=wc-admin');
|
11470 |
-
}
|
11471 |
-
};
|
11472 |
|
11473 |
-
|
11474 |
-
|
11475 |
|
11476 |
-
|
11477 |
-
userPreferencesData.updateUserPreferences({
|
11478 |
-
help_panel_highlight_shown: 'yes'
|
11479 |
-
});
|
11480 |
-
}
|
11481 |
-
};
|
11482 |
|
11483 |
-
|
11484 |
-
|
11485 |
-
|
11486 |
-
var highlightShown = userPreferencesData && userPreferencesData.help_panel_highlight_shown;
|
11487 |
|
11488 |
-
|
11489 |
-
return true;
|
11490 |
}
|
11491 |
|
11492 |
-
return
|
11493 |
-
}
|
11494 |
-
|
11495 |
-
var tabs = getTabs();
|
11496 |
-
var headerId = Object(external_lodash_["uniqueId"])('activity-panel-header_');
|
11497 |
-
var showHelpHighlightTooltip = shouldShowHelpTooltip();
|
11498 |
-
return Object(external_wp_element_["createElement"])("div", null, Object(external_wp_element_["createElement"])(external_wc_components_["H"], {
|
11499 |
-
id: headerId,
|
11500 |
-
className: "screen-reader-text"
|
11501 |
-
}, Object(external_wp_i18n_["__"])('Store Activity', 'woocommerce-admin')), Object(external_wp_element_["createElement"])(external_wc_components_["Section"], {
|
11502 |
-
component: "aside",
|
11503 |
-
id: "woocommerce-activity-panel",
|
11504 |
-
className: "woocommerce-layout__activity-panel",
|
11505 |
-
"aria-labelledby": headerId
|
11506 |
-
}, Object(external_wp_element_["createElement"])(tabs_Tabs, {
|
11507 |
-
tabs: tabs,
|
11508 |
-
tabOpen: isPanelOpen,
|
11509 |
-
selectedTab: currentTab,
|
11510 |
-
onTabClick: function onTabClick(tab, tabOpen) {
|
11511 |
-
if (tab.onClick) {
|
11512 |
-
tab.onClick();
|
11513 |
-
return;
|
11514 |
-
}
|
11515 |
|
11516 |
-
togglePanel(tab, tabOpen);
|
11517 |
-
}
|
11518 |
-
}), Object(external_wp_element_["createElement"])(panel_Panel, {
|
11519 |
-
currentTab: true,
|
11520 |
-
isPanelOpen: isPanelOpen,
|
11521 |
-
isPanelSwitching: isPanelSwitching,
|
11522 |
-
tab: Object(external_lodash_["find"])(getTabs(), {
|
11523 |
-
name: currentTab
|
11524 |
-
}),
|
11525 |
-
content: getPanelContent(currentTab),
|
11526 |
-
closePanel: function closePanel() {
|
11527 |
-
return _closePanel();
|
11528 |
-
},
|
11529 |
-
clearPanel: function clearPanel() {
|
11530 |
-
return _clearPanel();
|
11531 |
-
}
|
11532 |
-
})), showHelpHighlightTooltip ? Object(external_wp_element_["createElement"])(HighlightTooltip, {
|
11533 |
-
delay: 1000,
|
11534 |
-
useAnchor: true,
|
11535 |
-
title: Object(external_wp_i18n_["__"])("We're here for help", 'woocommerce-admin'),
|
11536 |
-
content: Object(external_wp_i18n_["__"])('If you have any questions, feel free to explore the WooCommerce docs listed here.', 'woocommerce-admin'),
|
11537 |
-
closeButtonText: Object(external_wp_i18n_["__"])('Got it', 'woocommerce-admin'),
|
11538 |
-
id: "activity-panel-tab-help",
|
11539 |
-
onClose: function onClose() {
|
11540 |
-
return closedHelpPanelHighlight();
|
11541 |
-
},
|
11542 |
-
onShow: function onShow() {
|
11543 |
-
return Object(external_wc_tracks_["recordEvent"])('help_tooltip_view');
|
11544 |
-
}
|
11545 |
-
}) : null);
|
11546 |
-
};
|
11547 |
-
activity_panel_ActivityPanel.defaultProps = {
|
11548 |
-
getHistory: external_wc_navigation_["getHistory"]
|
11549 |
-
};
|
11550 |
-
/* harmony default export */ var activity_panel = (activity_panel_ActivityPanel);
|
11551 |
-
// CONCATENATED MODULE: ./client/lib/platform/index.js
|
11552 |
-
var ANDROID_PLATFORM = 'android';
|
11553 |
-
var IOS_PLATFORM = 'ios';
|
11554 |
-
var UNKNOWN_PLATFORM = 'unknown';
|
11555 |
/**
|
11556 |
-
*
|
11557 |
-
*
|
11558 |
-
*
|
|
|
11559 |
*/
|
11560 |
-
|
11561 |
-
|
11562 |
-
|
11563 |
-
return IOS_PLATFORM;
|
11564 |
-
} else if (/Android/i.test(window.navigator.userAgent)) {
|
11565 |
-
return ANDROID_PLATFORM;
|
11566 |
-
}
|
11567 |
-
|
11568 |
-
return UNKNOWN_PLATFORM;
|
11569 |
-
};
|
11570 |
-
// CONCATENATED MODULE: ./client/mobile-banner/app-icon.js
|
11571 |
-
|
11572 |
-
var app_icon_AppIcon = function AppIcon() {
|
11573 |
-
return Object(external_wp_element_["createElement"])("svg", {
|
11574 |
-
width: "37",
|
11575 |
-
height: "37",
|
11576 |
-
viewBox: "0 0 92 92",
|
11577 |
-
fill: "none",
|
11578 |
-
xmlns: "http://www.w3.org/2000/svg"
|
11579 |
-
}, Object(external_wp_element_["createElement"])("rect", {
|
11580 |
-
width: "92",
|
11581 |
-
height: "92",
|
11582 |
-
rx: "21.3953",
|
11583 |
-
fill: "#7F54B3"
|
11584 |
-
}), Object(external_wp_element_["createElement"])("path", {
|
11585 |
-
fillRule: "evenodd",
|
11586 |
-
clipRule: "evenodd",
|
11587 |
-
d: "M72.5937 28.043H19.8094C16.4781 28.0459 13.7783 30.7705 13.7754 34.1324V54.4501C13.7783 57.812 16.4781 60.5366 19.8094 60.5395H44.8229L56.2573 66.9607L53.6672 60.5395H72.599C74.2009 60.5402 75.7374 59.8983 76.8702 58.7552C78.0029 57.612 78.639 56.0614 78.6383 54.4447V34.1324C78.6376 32.5157 78.0002 30.9657 76.8664 29.8235C75.7327 28.6814 74.1956 28.0408 72.5937 28.043ZM19.1057 32.4208C18.4658 32.4324 17.8646 32.7359 17.467 33.2482C17.0888 33.7635 16.9404 34.4175 17.058 35.0502C18.5962 45.0986 20.0338 51.8757 21.371 55.3816C21.8779 56.658 22.4896 57.2703 23.2063 57.2185C24.3075 57.1489 25.6263 55.5968 27.1627 52.5621C27.9964 50.8412 29.2602 48.2662 30.9539 44.837C32.3785 49.88 34.309 53.6787 36.7456 56.2331C37.4291 56.9436 38.1204 57.2748 38.8195 57.2266C39.4185 57.1931 39.953 56.8315 40.217 56.2813C40.4753 55.7358 40.5806 55.1278 40.5211 54.5248C40.3516 52.0703 40.5919 48.667 41.2421 44.3149C41.9081 39.8057 42.7523 36.5818 43.7749 34.6432C43.9822 34.2526 44.0733 33.8087 44.037 33.366C44.0039 32.7587 43.7116 32.1969 43.2374 31.829C42.7745 31.4367 42.1799 31.2446 41.5803 31.2935C40.8334 31.3325 40.1682 31.7885 39.8499 32.4797C38.2331 35.5019 37.0812 40.4109 36.3943 47.2068C35.2823 44.2394 34.4509 41.1703 33.9114 38.0412C33.623 36.4613 32.9037 35.7125 31.7536 35.7946C30.9592 35.8589 30.3063 36.3944 29.7819 37.4012L24.0348 48.5643C23.0997 44.6692 22.2205 39.9289 21.3972 34.3433C21.1997 32.9652 20.4358 32.3244 19.1057 32.4208ZM69.9089 34.6877C71.6969 35.0381 73.2407 36.2 74.1186 37.8559C74.9693 39.3247 75.3946 41.1161 75.3946 43.23C75.4148 45.9567 74.7062 48.6357 73.3477 50.9687C71.7778 53.7023 69.7195 55.0691 67.1727 55.0691C66.6933 55.0668 66.2153 55.0128 65.7467 54.9078C63.9584 54.5581 62.4143 53.396 61.5371 51.7396C60.6864 50.2452 60.261 48.4411 60.261 46.3272C60.2357 43.6127 60.945 40.9454 62.3079 38.6295C63.9023 35.8959 65.9607 34.5291 68.4829 34.5291C68.9623 34.5304 69.4402 34.5836 69.9089 34.6877ZM68.7937 49.4848C69.7707 48.5773 70.4399 47.2269 70.8012 45.4337V45.4419C70.9315 44.7826 70.9959 44.1112 70.9933 43.4382C70.986 42.5849 70.8291 41.74 70.5302 40.9452C70.1443 39.901 69.6304 39.3124 68.9884 39.1793C68.0378 38.9643 67.1239 39.5256 66.2469 40.8632C65.5812 41.8393 65.109 42.9432 64.8577 44.1106C64.7276 44.7708 64.6632 45.4432 64.6657 46.1171C64.6739 46.9677 64.8308 47.8096 65.1287 48.6019C65.5146 49.6388 66.0294 50.2274 66.6731 50.3678C67.3169 50.5081 68.0237 50.2138 68.7937 49.4848ZM57.9079 37.8559C57.0291 36.2008 55.4854 35.0392 53.6976 34.6877C53.2279 34.5837 52.749 34.5306 52.2687 34.5291C49.7443 34.5291 47.6856 35.8959 46.0927 38.6295C44.7295 40.9454 44.0201 43.6127 44.0454 46.3272C44.0454 48.4411 44.4699 50.2452 45.319 51.7396C46.1976 53.3949 47.7414 54.5566 49.5294 54.9078C49.999 55.0126 50.4779 55.0667 50.9582 55.0691C53.5055 55.0691 55.5642 53.7023 57.1343 50.9687C58.4922 48.6355 59.2001 45.9565 59.1789 43.23C59.1789 41.1161 58.7544 39.3247 57.9053 37.8559H57.9079ZM54.5903 45.4337C54.2307 47.2269 53.5614 48.5773 52.5825 49.4848C51.8115 50.2065 51.101 50.5017 50.4589 50.3678C49.8169 50.2338 49.3011 49.6461 48.9169 48.6019C48.6181 47.8097 48.4603 46.9678 48.4511 46.1171C48.4495 45.4431 48.5148 44.7707 48.6459 44.1106C48.8971 42.9432 49.3694 41.8393 50.0353 40.8632C50.9124 39.5256 51.8264 38.9643 52.7773 39.1793C53.4193 39.3124 53.9333 39.901 54.3193 40.9452C54.617 41.7404 54.7739 42.585 54.7824 43.4382C54.785 44.1112 54.7207 44.7826 54.5903 45.4419V45.4337Z",
|
11588 |
-
fill: "white"
|
11589 |
-
}));
|
11590 |
-
};
|
11591 |
-
// EXTERNAL MODULE: ./client/mobile-banner/style.scss
|
11592 |
-
var mobile_banner_style = __webpack_require__(427);
|
11593 |
-
|
11594 |
-
// CONCATENATED MODULE: ./client/mobile-banner/constants.js
|
11595 |
-
// The Play Store link is defined as an exported constant mainly for the sake of testing the Mobile App Banner.
|
11596 |
-
// It is nearly impossible to fake navigation in JSDOM 16, so exposing this link for mocking allows us to
|
11597 |
-
// avoid triggering a navigation.
|
11598 |
-
var PLAY_STORE_LINK = 'https://play.google.com/store/apps/details?id=com.woocommerce.android';
|
11599 |
-
var TRACKING_EVENT_NAME = 'wcadmin_mobile_android_banner_click';
|
11600 |
-
// CONCATENATED MODULE: ./client/mobile-banner/index.js
|
11601 |
-
|
11602 |
-
|
11603 |
|
11604 |
/**
|
11605 |
-
*
|
|
|
|
|
|
|
11606 |
*/
|
11607 |
-
|
11608 |
-
|
11609 |
-
|
11610 |
|
11611 |
/**
|
11612 |
-
*
|
|
|
|
|
|
|
|
|
11613 |
*/
|
|
|
|
|
|
|
|
|
11614 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11615 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11616 |
|
11617 |
-
|
11618 |
-
|
11619 |
-
|
11620 |
-
|
11621 |
-
|
11622 |
-
|
11623 |
-
|
11624 |
-
|
11625 |
-
|
11626 |
-
|
11627 |
-
|
11628 |
-
|
11629 |
-
// position fixed. This can be refactored away when we move away from the activity panel
|
11630 |
-
// in future.
|
11631 |
-
layout.classList.add(SHOW_APP_BANNER_MODIFIER_CLASS);
|
11632 |
-
}
|
11633 |
}
|
|
|
11634 |
|
11635 |
-
|
11636 |
-
|
11637 |
-
layout.classList.remove(SHOW_APP_BANNER_MODIFIER_CLASS);
|
11638 |
-
}
|
11639 |
-
};
|
11640 |
-
}, []);
|
11641 |
-
|
11642 |
-
var _useState = Object(external_wp_element_["useState"])(false),
|
11643 |
-
_useState2 = slicedToArray_default()(_useState, 2),
|
11644 |
-
isDismissed = _useState2[0],
|
11645 |
-
setDismissed = _useState2[1]; // On iOS the "Smart App Banner" meta tag is used so only display this on Android.
|
11646 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11647 |
|
11648 |
-
|
11649 |
-
|
11650 |
-
className: "woocommerce-mobile-app-banner"
|
11651 |
-
}, Object(external_wp_element_["createElement"])(external_wp_components_["Icon"], {
|
11652 |
-
icon: "no-alt",
|
11653 |
-
"data-testid": "dismiss-btn",
|
11654 |
-
onClick: function onClick() {
|
11655 |
-
onDismiss();
|
11656 |
-
setDismissed(true);
|
11657 |
-
Object(external_wc_tracks_["recordEvent"])(TRACKING_EVENT_NAME, {
|
11658 |
-
action: 'dismiss'
|
11659 |
-
});
|
11660 |
-
}
|
11661 |
-
}), Object(external_wp_element_["createElement"])(app_icon_AppIcon, null), Object(external_wp_element_["createElement"])("div", {
|
11662 |
-
className: "woocommerce-mobile-app-banner__description"
|
11663 |
-
}, Object(external_wp_element_["createElement"])("p", {
|
11664 |
-
className: "woocommerce-mobile-app-banner__description__text"
|
11665 |
-
}, Object(external_wp_i18n_["__"])('Run your store from anywhere', 'woocommerce-admin')), Object(external_wp_element_["createElement"])("p", {
|
11666 |
-
className: "woocommerce-mobile-app-banner__description__text"
|
11667 |
-
}, Object(external_wp_i18n_["__"])('Download the WooCommerce app', 'woocommerce-admin'))), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
|
11668 |
-
href: PLAY_STORE_LINK,
|
11669 |
-
isSecondary: true,
|
11670 |
-
onClick: function onClick() {
|
11671 |
-
onInstall();
|
11672 |
-
setDismissed(true);
|
11673 |
-
Object(external_wc_tracks_["recordEvent"])(TRACKING_EVENT_NAME, {
|
11674 |
-
action: 'install'
|
11675 |
-
});
|
11676 |
-
}
|
11677 |
-
}, Object(external_wp_i18n_["__"])('Install', 'woocommerce-admin')));
|
11678 |
}
|
11679 |
|
11680 |
-
|
11681 |
-
};
|
11682 |
-
// CONCATENATED MODULE: ./client/hooks/useIsScrolled.js
|
11683 |
|
|
|
|
|
11684 |
|
11685 |
/**
|
11686 |
-
*
|
|
|
|
|
|
|
|
|
|
|
11687 |
*/
|
|
|
|
|
|
|
11688 |
|
11689 |
-
|
11690 |
-
|
11691 |
-
|
11692 |
-
|
11693 |
-
|
11694 |
-
|
11695 |
-
|
11696 |
-
|
11697 |
-
|
11698 |
-
|
11699 |
-
}
|
|
|
|
|
11700 |
|
11701 |
-
|
11702 |
-
rafHandle.current = window.requestAnimationFrame(updateIsScrolled);
|
11703 |
-
};
|
11704 |
|
11705 |
-
|
11706 |
-
|
11707 |
-
|
11708 |
-
window.cancelAnimationFrame(rafHandle.current);
|
11709 |
-
};
|
11710 |
-
}, []);
|
11711 |
-
return isScrolled;
|
11712 |
-
}
|
11713 |
-
// EXTERNAL MODULE: external ["wp","plugins"]
|
11714 |
-
var external_wp_plugins_ = __webpack_require__(279);
|
11715 |
|
11716 |
-
//
|
11717 |
-
var
|
|
|
11718 |
|
11719 |
-
|
11720 |
-
|
11721 |
-
|
|
|
|
|
11722 |
|
11723 |
-
|
11724 |
-
var es_object_values = __webpack_require__(285);
|
11725 |
|
11726 |
-
|
11727 |
-
|
|
|
11728 |
|
11729 |
-
|
11730 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11731 |
|
11732 |
-
|
11733 |
-
|
|
|
11734 |
|
11735 |
-
|
11736 |
-
var
|
11737 |
|
11738 |
-
//
|
|
|
|
|
|
|
|
|
|
|
|
|
11739 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11740 |
|
|
|
|
|
11741 |
|
11742 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11743 |
|
11744 |
-
|
11745 |
|
|
|
|
|
|
|
11746 |
|
|
|
|
|
|
|
11747 |
|
|
|
|
|
11748 |
|
11749 |
|
|
|
11750 |
|
|
|
|
|
11751 |
|
|
|
|
|
|
|
11752 |
|
11753 |
|
|
|
11754 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11755 |
|
|
|
|
|
11756 |
|
|
|
11757 |
|
|
|
11758 |
|
|
|
|
|
11759 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11760 |
|
11761 |
|
11762 |
/**
|
11763 |
* External dependencies
|
11764 |
*/
|
|
|
11765 |
|
11766 |
-
|
11767 |
-
|
11768 |
-
|
11769 |
-
|
11770 |
-
|
11771 |
-
if (url.indexOf('http') === 0) {
|
11772 |
-
return url;
|
11773 |
}
|
11774 |
|
11775 |
-
return
|
11776 |
-
};
|
11777 |
-
|
11778 |
-
|
11779 |
-
|
11780 |
-
|
11781 |
-
var
|
11782 |
-
|
11783 |
-
|
11784 |
-
var _escapedUrl$split = escapedUrl.split(/\\\?|#/),
|
11785 |
-
_escapedUrl$split2 = slicedToArray_default()(_escapedUrl$split, 3),
|
11786 |
-
path = _escapedUrl$split2[0],
|
11787 |
-
args = _escapedUrl$split2[1],
|
11788 |
-
hash = _escapedUrl$split2[2];
|
11789 |
-
|
11790 |
-
var hashExpression = hash ? "(.*#".concat(hash, "$)") : '';
|
11791 |
-
var argsExpression = args ? args.split('&').reduce(function (acc, param) {
|
11792 |
-
return "".concat(acc, "(?=.*[?|&]").concat(param, "(&|$|#))");
|
11793 |
-
}, '') : '';
|
11794 |
-
return '^' + path + argsExpression + hashExpression;
|
11795 |
-
};
|
11796 |
-
/**
|
11797 |
-
* Get a match score for a menu item given a location.
|
11798 |
-
*/
|
11799 |
-
|
11800 |
-
var getMatchScore = function getMatchScore(location, itemUrl) {
|
11801 |
-
var itemExpression = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
11802 |
-
|
11803 |
-
if (!itemUrl) {
|
11804 |
-
return 0;
|
11805 |
-
}
|
11806 |
-
|
11807 |
-
var fullUrl = utils_getFullUrl(itemUrl);
|
11808 |
-
var href = location.href; // Return highest possible score for exact match.
|
11809 |
-
|
11810 |
-
if (fullUrl === href) {
|
11811 |
-
return Number.MAX_SAFE_INTEGER;
|
11812 |
-
}
|
11813 |
-
|
11814 |
-
var defaultExpression = utils_getDefaultMatchExpression(fullUrl);
|
11815 |
-
var regexp = new RegExp(itemExpression || defaultExpression, 'i');
|
11816 |
-
return (decodeURIComponent(href).match(regexp) || []).length;
|
11817 |
-
};
|
11818 |
-
|
11819 |
/**
|
11820 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11821 |
*
|
11822 |
-
* @
|
11823 |
-
*
|
11824 |
*/
|
11825 |
-
var addHistoryListener = function addHistoryListener(listener) {
|
11826 |
-
// Monkey patch pushState to allow trigger the pushstate event listener.
|
11827 |
-
if (!window.wcNavigation.historyPatched) {
|
11828 |
-
(function (history) {
|
11829 |
-
/* global CustomEvent */
|
11830 |
-
var pushState = history.pushState;
|
11831 |
-
var replaceState = history.replaceState;
|
11832 |
|
11833 |
-
|
11834 |
-
|
11835 |
-
|
11836 |
-
|
11837 |
-
|
11838 |
-
|
11839 |
-
history.replaceState = function (state, title, url) {
|
11840 |
-
var replaceStateEvent = new CustomEvent('replacestate', state);
|
11841 |
-
window.dispatchEvent(replaceStateEvent);
|
11842 |
-
return replaceState.apply(history, [state, title, url]);
|
11843 |
-
};
|
11844 |
|
11845 |
-
|
11846 |
-
|
11847 |
}
|
11848 |
|
11849 |
-
|
11850 |
-
|
11851 |
-
|
11852 |
-
return function () {
|
11853 |
-
window.removeEventListener('popstate', listener);
|
11854 |
-
window.removeEventListener('pushstate', listener);
|
11855 |
-
window.removeEventListener('replacestate', listener);
|
11856 |
-
};
|
11857 |
-
};
|
11858 |
/**
|
11859 |
-
*
|
11860 |
*
|
11861 |
-
*
|
11862 |
-
|
11863 |
-
|
11864 |
-
|
11865 |
-
|
11866 |
-
|
11867 |
-
|
11868 |
-
|
11869 |
-
|
11870 |
-
|
11871 |
-
|
11872 |
-
|
11873 |
-
}
|
11874 |
-
});
|
11875 |
-
return matchedItem || null;
|
11876 |
-
};
|
11877 |
-
/**
|
11878 |
-
* Available menu IDs.
|
11879 |
*/
|
11880 |
|
11881 |
-
|
|
|
|
|
|
|
11882 |
|
11883 |
-
|
11884 |
-
|
11885 |
-
*/
|
11886 |
-
var defaultCategories = {
|
11887 |
-
woocommerce: {
|
11888 |
-
id: 'woocommerce',
|
11889 |
-
isCategory: true,
|
11890 |
-
menuId: 'primary',
|
11891 |
-
migrate: true,
|
11892 |
-
order: 10,
|
11893 |
-
parent: '',
|
11894 |
-
title: 'WooCommerce'
|
11895 |
}
|
11896 |
-
};
|
11897 |
-
/**
|
11898 |
-
* Sort an array of menu items by their order property.
|
11899 |
-
*
|
11900 |
-
* @param {Array} menuItems Array of menu items.
|
11901 |
-
* @return {Array} Sorted menu items.
|
11902 |
-
*/
|
11903 |
-
|
11904 |
-
var sortMenuItems = function sortMenuItems(menuItems) {
|
11905 |
-
return menuItems.sort(function (a, b) {
|
11906 |
-
if (a.order === b.order) {
|
11907 |
-
return a.title.localeCompare(b.title);
|
11908 |
-
}
|
11909 |
|
11910 |
-
|
11911 |
-
|
11912 |
-
};
|
11913 |
/**
|
11914 |
-
*
|
11915 |
*
|
11916 |
-
* @param {
|
11917 |
-
* @
|
11918 |
-
* @return {Object} Mapped menu items and categories.
|
11919 |
*/
|
11920 |
|
11921 |
-
|
11922 |
-
|
|
|
11923 |
|
11924 |
-
|
11925 |
-
// Set up the category if it doesn't yet exist.
|
11926 |
-
if (!acc[item.parent]) {
|
11927 |
-
acc[item.parent] = {};
|
11928 |
-
menuIds.forEach(function (menuId) {
|
11929 |
-
acc[item.parent][menuId] = [];
|
11930 |
-
});
|
11931 |
-
} // Incorrect menu ID.
|
11932 |
|
|
|
|
|
11933 |
|
11934 |
-
|
11935 |
-
|
11936 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11937 |
|
11938 |
|
11939 |
-
if (currentUserCan && item.capability && !currentUserCan(item.capability)) {
|
11940 |
-
return acc;
|
11941 |
-
} // Add categories.
|
11942 |
|
11943 |
|
11944 |
-
if (item.isCategory) {
|
11945 |
-
categories[item.id] = item;
|
11946 |
-
}
|
11947 |
|
11948 |
-
var menuIdArray = acc[item.parent][item.menuId];
|
11949 |
|
11950 |
-
if (menuIdArray) {
|
11951 |
-
menuIdArray.push(item);
|
11952 |
-
}
|
11953 |
|
11954 |
-
|
11955 |
-
}, {});
|
11956 |
-
return {
|
11957 |
-
items: items,
|
11958 |
-
categories: categories
|
11959 |
-
};
|
11960 |
-
};
|
11961 |
-
// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/wordpress.js
|
11962 |
|
|
|
11963 |
|
11964 |
/**
|
11965 |
-
*
|
11966 |
*/
|
11967 |
|
11968 |
-
var wordpress = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
|
11969 |
-
xmlns: "http://www.w3.org/2000/svg",
|
11970 |
-
viewBox: "-2 -2 24 24"
|
11971 |
-
}, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
|
11972 |
-
d: "M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"
|
11973 |
-
}));
|
11974 |
-
/* harmony default export */ var library_wordpress = (wordpress);
|
11975 |
-
//# sourceMappingURL=wordpress.js.map
|
11976 |
-
// CONCATENATED MODULE: ./client/navigation/components/header/index.js
|
11977 |
-
|
11978 |
|
11979 |
|
11980 |
/**
|
11981 |
-
*
|
11982 |
*/
|
11983 |
|
11984 |
|
11985 |
|
11986 |
-
|
11987 |
-
|
11988 |
-
|
11989 |
-
|
11990 |
-
|
11991 |
-
|
11992 |
/**
|
11993 |
-
*
|
|
|
11994 |
*/
|
11995 |
|
|
|
|
|
11996 |
|
|
|
11997 |
|
|
|
|
|
11998 |
|
11999 |
-
|
12000 |
-
|
12001 |
-
var homeUrl = Object(wc_admin_settings["g" /* getSetting */])('homeUrl', '');
|
12002 |
-
var isScrolled = useIsScrolled();
|
12003 |
|
12004 |
-
|
12005 |
-
|
12006 |
-
|
12007 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12008 |
|
12009 |
-
|
12010 |
-
|
12011 |
-
|
12012 |
-
|
|
|
|
|
|
|
|
|
|
|
12013 |
|
12014 |
-
|
12015 |
-
|
12016 |
-
document.body.classList.remove(navClasses.expanded);
|
12017 |
-
setIsFolded(true);
|
12018 |
-
};
|
12019 |
|
12020 |
-
|
12021 |
-
|
12022 |
-
|
12023 |
-
|
12024 |
-
|
12025 |
|
12026 |
-
|
12027 |
-
|
12028 |
-
|
12029 |
-
|
12030 |
-
foldNav();
|
12031 |
-
}
|
12032 |
-
};
|
12033 |
|
12034 |
-
|
12035 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12036 |
|
12037 |
-
|
12038 |
-
foldNav();
|
12039 |
-
} else {
|
12040 |
-
expandNav();
|
12041 |
-
}
|
12042 |
-
};
|
12043 |
|
12044 |
-
|
12045 |
-
|
12046 |
-
var foldEvents = [{
|
12047 |
-
eventName: 'orientationchange',
|
12048 |
-
handler: function handler(e) {
|
12049 |
-
return foldOnMobile(e.target.screen.availWidth);
|
12050 |
-
}
|
12051 |
-
}, {
|
12052 |
-
eventName: 'resize',
|
12053 |
-
handler: Object(external_lodash_["debounce"])(function () {
|
12054 |
-
return foldOnMobile();
|
12055 |
-
}, 200)
|
12056 |
-
}];
|
12057 |
|
12058 |
-
|
12059 |
-
var _foldEvents$_i = _foldEvents[_i],
|
12060 |
-
eventName = _foldEvents$_i.eventName,
|
12061 |
-
handler = _foldEvents$_i.handler;
|
12062 |
-
window.addEventListener(eventName, handler, false);
|
12063 |
-
}
|
12064 |
|
12065 |
-
|
12066 |
-
|
12067 |
-
|
12068 |
-
}, []);
|
12069 |
-
var buttonIcon = Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
|
12070 |
-
size: "36px",
|
12071 |
-
icon: library_wordpress
|
12072 |
-
});
|
12073 |
|
12074 |
-
|
12075 |
-
var _select = select('core/data'),
|
12076 |
-
isResolving = _select.isResolving;
|
12077 |
|
12078 |
-
|
12079 |
-
|
12080 |
|
12081 |
-
|
12082 |
-
|
12083 |
-
isRequestingSiteIcon: isResolving('core', 'getEntityRecord', ['root', '__unstableBase', undefined]),
|
12084 |
-
siteIconUrl: siteData.siteIconUrl
|
12085 |
-
};
|
12086 |
-
}),
|
12087 |
-
isRequestingSiteIcon = _useSelect.isRequestingSiteIcon,
|
12088 |
-
siteIconUrl = _useSelect.siteIconUrl;
|
12089 |
|
12090 |
-
|
12091 |
-
|
12092 |
-
alt: Object(external_wp_i18n_["__"])('Site Icon'),
|
12093 |
-
src: siteIconUrl
|
12094 |
-
});
|
12095 |
-
} else if (isRequestingSiteIcon) {
|
12096 |
-
buttonIcon = null;
|
12097 |
-
}
|
12098 |
|
12099 |
-
|
12100 |
-
|
12101 |
-
|
12102 |
-
return Object(external_wp_element_["createElement"])("div", {
|
12103 |
-
className: className
|
12104 |
-
}, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
|
12105 |
-
onClick: function onClick() {
|
12106 |
-
return toggleFolded();
|
12107 |
-
},
|
12108 |
-
className: "woocommerce-navigation-header__site-icon",
|
12109 |
-
"aria-label": "Fold navigation",
|
12110 |
-
role: "switch",
|
12111 |
-
"aria-checked": isFolded ? 'true' : 'false'
|
12112 |
-
}, buttonIcon), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
|
12113 |
-
href: homeUrl,
|
12114 |
-
className: "woocommerce-navigation-header__site-title",
|
12115 |
-
as: "span"
|
12116 |
-
}, Object(external_wp_htmlEntities_["decodeEntities"])(siteTitle)));
|
12117 |
-
};
|
12118 |
|
12119 |
-
|
12120 |
-
|
12121 |
-
|
|
|
|
|
12122 |
|
12123 |
-
// EXTERNAL MODULE: ./client/
|
12124 |
-
var
|
12125 |
|
12126 |
-
//
|
|
|
12127 |
|
|
|
|
|
12128 |
|
|
|
12129 |
|
12130 |
|
12131 |
/**
|
12132 |
* External dependencies
|
12133 |
*/
|
12134 |
|
12135 |
-
|
12136 |
-
|
|
|
12137 |
|
12138 |
|
12139 |
/**
|
12140 |
-
*
|
12141 |
*/
|
12142 |
|
12143 |
|
12144 |
-
var favorite_button_FavoriteButton = function FavoriteButton(_ref) {
|
12145 |
-
var id = _ref.id;
|
12146 |
|
12147 |
-
var _useSelect = Object(external_wp_data_["useSelect"])(function (select) {
|
12148 |
-
return {
|
12149 |
-
favorites: select(external_wc_data_["NAVIGATION_STORE_NAME"]).getFavorites(),
|
12150 |
-
isResolving: select(external_wc_data_["NAVIGATION_STORE_NAME"]).isResolving('getFavorites')
|
12151 |
-
};
|
12152 |
-
}),
|
12153 |
-
favorites = _useSelect.favorites,
|
12154 |
-
isResolving = _useSelect.isResolving;
|
12155 |
|
12156 |
-
|
12157 |
-
|
12158 |
-
|
12159 |
|
12160 |
-
var
|
|
|
12161 |
|
12162 |
-
var
|
12163 |
-
|
12164 |
-
|
12165 |
-
|
12166 |
-
|
12167 |
-
|
|
|
|
|
12168 |
});
|
12169 |
};
|
12170 |
|
12171 |
-
|
12172 |
-
|
12173 |
-
|
12174 |
-
|
12175 |
-
|
12176 |
-
|
12177 |
-
|
12178 |
-
|
12179 |
-
|
12180 |
-
|
12181 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12182 |
});
|
12183 |
};
|
12184 |
-
/* harmony default export */ var favorite_button = (favorite_button_FavoriteButton);
|
12185 |
-
// CONCATENATED MODULE: ./client/navigation/components/favorites-tooltip/index.js
|
12186 |
|
|
|
|
|
12187 |
|
12188 |
|
12189 |
/**
|
@@ -12192,655 +11233,768 @@ var favorite_button_FavoriteButton = function FavoriteButton(_ref) {
|
|
12192 |
|
12193 |
|
12194 |
|
|
|
12195 |
/**
|
12196 |
* Internal dependencies
|
12197 |
*/
|
12198 |
|
12199 |
|
12200 |
-
var
|
12201 |
-
var
|
12202 |
-
|
12203 |
-
|
12204 |
-
|
12205 |
-
|
12206 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12207 |
return {
|
12208 |
-
|
12209 |
-
|
12210 |
-
|
12211 |
};
|
12212 |
-
})
|
12213 |
-
|
12214 |
-
|
12215 |
-
|
12216 |
-
|
12217 |
-
|
12218 |
-
|
12219 |
-
|
12220 |
-
|
12221 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12222 |
}
|
|
|
12223 |
|
12224 |
-
|
12225 |
-
return null;
|
12226 |
-
}
|
12227 |
|
12228 |
-
|
12229 |
-
|
12230 |
-
title: Object(external_wp_i18n_["__"])('Introducing favorites', 'woocommerce-admin'),
|
12231 |
-
content: Object(external_wp_i18n_["__"])('You can now favorite your extensions to pin them in the top level of the navigation.', 'woocommerce-admin'),
|
12232 |
-
closeButtonText: Object(external_wp_i18n_["__"])('Got it', 'woocommerce-admin'),
|
12233 |
-
id: "woocommerce-navigation-favorite-button",
|
12234 |
-
onClose: function onClose() {
|
12235 |
-
return updateOptions(defineProperty_default()({}, tooltipHiddenOption, 'yes'));
|
12236 |
-
},
|
12237 |
-
useAnchor: true
|
12238 |
-
});
|
12239 |
-
};
|
12240 |
-
/* harmony default export */ var favorites_tooltip = (favorites_tooltip_FavoritesTooltip);
|
12241 |
-
// CONCATENATED MODULE: ./client/navigation/components/category-title/index.js
|
12242 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12243 |
|
|
|
|
|
12244 |
|
12245 |
-
|
12246 |
-
* Internal dependencies
|
12247 |
-
*/
|
12248 |
|
|
|
12249 |
|
|
|
|
|
12250 |
|
12251 |
-
|
12252 |
-
|
12253 |
-
|
12254 |
-
|
12255 |
-
|
12256 |
-
|
12257 |
|
12258 |
-
if (['plugins', 'favorites'].includes(menuId)) {
|
12259 |
-
return Object(external_wp_element_["createElement"])("span", {
|
12260 |
-
className: className
|
12261 |
-
}, Object(external_wp_element_["createElement"])("span", {
|
12262 |
-
className: "".concat(className, "__text")
|
12263 |
-
}, title), Object(external_wp_element_["createElement"])(favorite_button_FavoriteButton, {
|
12264 |
-
id: id
|
12265 |
-
}), Object(external_wp_element_["createElement"])(favorites_tooltip_FavoritesTooltip, null));
|
12266 |
-
}
|
12267 |
|
12268 |
-
|
12269 |
-
className: className
|
12270 |
-
}, title);
|
12271 |
-
};
|
12272 |
-
/* harmony default export */ var category_title = (category_title_CategoryTitle);
|
12273 |
-
// CONCATENATED MODULE: ./client/navigation/components/Item/index.js
|
12274 |
|
|
|
12275 |
|
12276 |
/**
|
12277 |
* External dependencies
|
12278 |
*/
|
12279 |
|
|
|
|
|
|
|
12280 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12281 |
|
12282 |
-
|
12283 |
-
var
|
12284 |
-
var
|
12285 |
-
|
12286 |
-
|
12287 |
-
|
12288 |
-
|
12289 |
-
|
12290 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12291 |
});
|
12292 |
-
}
|
12293 |
-
|
12294 |
-
|
12295 |
-
|
12296 |
-
|
12297 |
-
|
12298 |
|
12299 |
-
|
12300 |
-
|
12301 |
-
|
12302 |
-
item: item.id
|
12303 |
-
}, Object(external_wp_element_["createElement"])("div", {
|
12304 |
-
onClick: function onClick() {
|
12305 |
-
return trackClick(item.id);
|
12306 |
-
}
|
12307 |
-
}, Object(external_wp_element_["createElement"])(external_wc_navigation_["WooNavigationItem"].Slot, {
|
12308 |
-
name: item.id
|
12309 |
-
})));
|
12310 |
-
}
|
12311 |
-
|
12312 |
-
return Object(external_wp_element_["createElement"])(build_module["c" /* NavigationItem */], {
|
12313 |
-
key: item.id,
|
12314 |
-
item: item.id,
|
12315 |
-
title: item.title,
|
12316 |
-
href: item.url,
|
12317 |
-
navigateToMenu: !item.url && item.id,
|
12318 |
-
onClick: function onClick() {
|
12319 |
-
return trackClick(item.id);
|
12320 |
-
},
|
12321 |
-
hideIfTargetMenuEmpty: true
|
12322 |
});
|
12323 |
-
|
12324 |
-
};
|
12325 |
-
|
12326 |
-
/* harmony default export */ var components_Item = (Item_Item);
|
12327 |
-
// CONCATENATED MODULE: ./client/navigation/components/container/primary-menu.js
|
12328 |
-
|
12329 |
-
|
12330 |
-
|
12331 |
/**
|
12332 |
-
*
|
|
|
|
|
|
|
|
|
|
|
12333 |
*/
|
12334 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12335 |
|
|
|
|
|
|
|
12336 |
|
12337 |
-
|
12338 |
-
|
12339 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12340 |
|
|
|
12341 |
|
|
|
|
|
12342 |
|
12343 |
-
|
12344 |
-
|
12345 |
-
|
12346 |
-
|
12347 |
-
|
|
|
|
|
12348 |
|
12349 |
-
|
12350 |
-
|
12351 |
-
|
12352 |
|
12353 |
-
var rootBackLabel = Object(external_wp_hooks_["applyFilters"])('woocommerce_navigation_root_back_label', Object(external_wp_i18n_["__"])('WordPress Dashboard', 'woocommerce-admin'));
|
12354 |
-
var rootBackUrl = Object(external_wp_hooks_["applyFilters"])('woocommerce_navigation_root_back_url', window.wcNavigation.rootBackUrl);
|
12355 |
-
var isRootBackVisible = category.id === 'woocommerce' && rootBackUrl;
|
12356 |
-
return Object(external_wp_element_["createElement"])(build_module["d" /* NavigationMenu */], {
|
12357 |
-
title: Object(external_wp_element_["createElement"])(category_title, {
|
12358 |
-
category: category
|
12359 |
-
}),
|
12360 |
-
menu: category.id,
|
12361 |
-
parentMenu: category.parent,
|
12362 |
-
backButtonLabel: isRootBackVisible ? rootBackLabel : category.backButtonLabel || null,
|
12363 |
-
onBackButtonClick: isRootBackVisible ? function () {
|
12364 |
-
onBackClick('woocommerce');
|
12365 |
-
window.location = rootBackUrl;
|
12366 |
-
} : function () {
|
12367 |
-
return onBackClick(category.id);
|
12368 |
-
}
|
12369 |
-
}, !!primaryItems.length && Object(external_wp_element_["createElement"])(build_module["b" /* NavigationGroup */], null, primaryItems.map(function (item) {
|
12370 |
-
return Object(external_wp_element_["createElement"])(components_Item, {
|
12371 |
-
key: item.id,
|
12372 |
-
item: item
|
12373 |
-
});
|
12374 |
-
})), !!pluginItems.length && Object(external_wp_element_["createElement"])(build_module["b" /* NavigationGroup */], {
|
12375 |
-
title: category.id === 'woocommerce' ? Object(external_wp_i18n_["__"])('Extensions', 'woocommerce-admin') : null
|
12376 |
-
}, pluginItems.map(function (item) {
|
12377 |
-
return Object(external_wp_element_["createElement"])(components_Item, {
|
12378 |
-
key: item.id,
|
12379 |
-
item: item
|
12380 |
-
});
|
12381 |
-
})));
|
12382 |
-
};
|
12383 |
-
// CONCATENATED MODULE: ./client/navigation/components/container/secondary-menu.js
|
12384 |
|
|
|
|
|
|
|
12385 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12386 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12387 |
/**
|
12388 |
-
*
|
12389 |
*/
|
12390 |
|
12391 |
/**
|
12392 |
-
*
|
|
|
|
|
12393 |
*/
|
12394 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12395 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12396 |
|
12397 |
-
var
|
12398 |
-
var
|
12399 |
-
|
12400 |
-
|
|
|
12401 |
|
12402 |
-
if (
|
12403 |
-
return
|
12404 |
}
|
12405 |
|
12406 |
-
|
12407 |
-
return Object(external_wp_element_["createElement"])(build_module["d" /* NavigationMenu */], {
|
12408 |
-
className: "components-navigation__menu-secondary",
|
12409 |
-
title: !isRoot && Object(external_wp_element_["createElement"])(category_title, {
|
12410 |
-
category: category
|
12411 |
-
}),
|
12412 |
-
menu: category.id,
|
12413 |
-
parentMenu: category.parent,
|
12414 |
-
backButtonLabel: category.backButtonLabel || null,
|
12415 |
-
onBackButtonClick: isRoot ? null : function () {
|
12416 |
-
return onBackClick(category.id);
|
12417 |
-
}
|
12418 |
-
}, Object(external_wp_element_["createElement"])(build_module["b" /* NavigationGroup */], {
|
12419 |
-
onBackButtonClick: function onBackButtonClick() {
|
12420 |
-
return onBackClick(category.id);
|
12421 |
-
}
|
12422 |
-
}, items.map(function (item) {
|
12423 |
-
return Object(external_wp_element_["createElement"])(components_Item, {
|
12424 |
-
key: item.id,
|
12425 |
-
item: item
|
12426 |
-
});
|
12427 |
-
})));
|
12428 |
};
|
12429 |
-
// CONCATENATED MODULE: ./client/navigation/components/container/index.js
|
12430 |
|
|
|
|
|
|
|
12431 |
|
|
|
12432 |
|
|
|
|
|
12433 |
|
|
|
|
|
12434 |
|
|
|
|
|
|
|
12435 |
|
|
|
|
|
12436 |
|
12437 |
-
|
12438 |
-
* External dependencies
|
12439 |
-
*/
|
12440 |
|
|
|
12441 |
|
|
|
|
|
12442 |
|
|
|
|
|
|
|
12443 |
|
|
|
|
|
|
|
|
|
12444 |
|
|
|
|
|
|
|
|
|
|
|
12445 |
|
12446 |
-
|
12447 |
-
|
12448 |
-
|
|
|
12449 |
|
|
|
|
|
12450 |
|
|
|
12451 |
|
|
|
|
|
12452 |
|
|
|
|
|
|
|
|
|
|
|
|
|
12453 |
|
|
|
12454 |
|
12455 |
-
|
12456 |
-
var _useSelect = Object(external_wp_data_["useSelect"])(function (select) {
|
12457 |
-
return {
|
12458 |
-
menuItems: select(external_wc_data_["NAVIGATION_STORE_NAME"]).getMenuItems()
|
12459 |
-
};
|
12460 |
-
}),
|
12461 |
-
menuItems = _useSelect.menuItems;
|
12462 |
|
12463 |
-
|
12464 |
-
|
12465 |
-
document.documentElement.classList.remove('wp-toolbar');
|
12466 |
-
document.body.classList.add('has-woocommerce-navigation');
|
12467 |
-
var adminMenu = document.getElementById('adminmenumain');
|
12468 |
|
12469 |
-
|
12470 |
-
return;
|
12471 |
-
}
|
12472 |
|
12473 |
-
|
12474 |
-
}, []);
|
12475 |
|
12476 |
-
|
12477 |
-
|
12478 |
-
activeItem = _useState2[0],
|
12479 |
-
setActiveItem = _useState2[1];
|
12480 |
|
12481 |
-
|
12482 |
-
_useState4 = slicedToArray_default()(_useState3, 2),
|
12483 |
-
activeLevel = _useState4[0],
|
12484 |
-
setActiveLevel = _useState4[1];
|
12485 |
|
12486 |
-
|
12487 |
-
var initialMatchedItem = getMatchingItem(menuItems);
|
12488 |
|
12489 |
-
|
12490 |
-
|
12491 |
-
setActiveLevel(initialMatchedItem.parent);
|
12492 |
-
}
|
12493 |
|
12494 |
-
|
12495 |
-
setTimeout(function () {
|
12496 |
-
var matchedItem = getMatchingItem(menuItems);
|
12497 |
|
12498 |
-
|
12499 |
-
setActiveItem(matchedItem);
|
12500 |
-
setActiveLevel(matchedItem.parent);
|
12501 |
-
}
|
12502 |
-
}, 0);
|
12503 |
-
});
|
12504 |
-
return removeListener;
|
12505 |
-
}, [menuItems]);
|
12506 |
|
12507 |
-
|
12508 |
-
currentUserCan = _useUser.currentUserCan;
|
12509 |
|
12510 |
-
|
12511 |
-
return getMappedItemsCategories(menuItems, currentUserCan);
|
12512 |
-
}, [menuItems, currentUserCan]),
|
12513 |
-
categories = _useMemo.categories,
|
12514 |
-
items = _useMemo.items;
|
12515 |
|
12516 |
-
|
|
|
|
|
12517 |
|
12518 |
-
|
12519 |
-
Object(external_wc_tracks_["recordEvent"])('navigation_back_click', {
|
12520 |
-
category: id
|
12521 |
-
});
|
12522 |
-
};
|
12523 |
|
12524 |
-
|
12525 |
-
var classes = classnames_default()('woocommerce-navigation', {
|
12526 |
-
'is-root': isRoot
|
12527 |
-
});
|
12528 |
-
return Object(external_wp_element_["createElement"])("div", {
|
12529 |
-
className: classes
|
12530 |
-
}, Object(external_wp_element_["createElement"])(header, null), Object(external_wp_element_["createElement"])("div", {
|
12531 |
-
className: "woocommerce-navigation__wrapper",
|
12532 |
-
ref: navDomRef
|
12533 |
-
}, Object(external_wp_element_["createElement"])(build_module["a" /* Navigation */], {
|
12534 |
-
activeItem: activeItem ? activeItem.id : null,
|
12535 |
-
activeMenu: activeLevel,
|
12536 |
-
onActivateMenu: function onActivateMenu() {
|
12537 |
-
if (navDomRef && navDomRef.current) {
|
12538 |
-
navDomRef.current.scrollTop = 0;
|
12539 |
-
}
|
12540 |
|
12541 |
-
|
12542 |
-
|
12543 |
-
}, Object.values(categories).map(function (category) {
|
12544 |
-
var categoryItems = items[category.id];
|
12545 |
-
return !!categoryItems && [Object(external_wp_element_["createElement"])(primary_menu_PrimaryMenu, {
|
12546 |
-
key: category.id,
|
12547 |
-
category: category,
|
12548 |
-
onBackClick: onBackClick,
|
12549 |
-
primaryItems: [].concat(toConsumableArray_default()(categoryItems.primary), toConsumableArray_default()(categoryItems.favorites)),
|
12550 |
-
pluginItems: categoryItems.plugins
|
12551 |
-
}), Object(external_wp_element_["createElement"])(secondary_menu_SecondaryMenu, {
|
12552 |
-
key: "secondary/".concat(category.id),
|
12553 |
-
category: category,
|
12554 |
-
onBackClick: onBackClick,
|
12555 |
-
items: categoryItems.secondary
|
12556 |
-
})];
|
12557 |
-
}))));
|
12558 |
-
};
|
12559 |
|
12560 |
-
|
12561 |
-
// CONCATENATED MODULE: ./client/navigation/index.js
|
12562 |
|
12563 |
|
12564 |
-
|
12565 |
-
|
12566 |
-
|
12567 |
|
|
|
|
|
|
|
12568 |
|
12569 |
|
12570 |
/**
|
12571 |
-
* Internal
|
12572 |
*/
|
12573 |
|
12574 |
|
|
|
12575 |
|
|
|
12576 |
|
12577 |
-
var
|
12578 |
-
return Object(external_wp_element_["createElement"])(external_wc_navigation_["NavSlotFillProvider"], null, Object(external_wp_element_["createElement"])(container, null), Object(external_wp_element_["createElement"])(external_wp_plugins_["PluginArea"], null));
|
12579 |
-
};
|
12580 |
|
12581 |
-
var
|
12582 |
-
/* harmony default export */ var navigation = (HydratedNavigation);
|
12583 |
-
// CONCATENATED MODULE: ./client/header/index.js
|
12584 |
|
|
|
12585 |
|
|
|
12586 |
|
|
|
12587 |
|
12588 |
-
|
12589 |
|
12590 |
-
function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12591 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12592 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12593 |
|
|
|
|
|
|
|
12594 |
|
|
|
|
|
|
|
|
|
|
|
12595 |
|
|
|
|
|
12596 |
|
|
|
|
|
|
|
|
|
12597 |
|
12598 |
|
|
|
12599 |
|
|
|
|
|
|
|
12600 |
|
|
|
|
|
|
|
|
|
12601 |
|
|
|
|
|
12602 |
|
|
|
12603 |
|
|
|
|
|
|
|
|
|
|
|
|
|
12604 |
|
|
|
|
|
|
|
12605 |
|
|
|
|
|
12606 |
|
12607 |
-
|
12608 |
-
* External dependencies
|
12609 |
-
*/
|
12610 |
|
|
|
|
|
12611 |
|
|
|
|
|
|
|
|
|
12612 |
|
|
|
|
|
|
|
12613 |
|
|
|
|
|
12614 |
|
|
|
12615 |
|
|
|
|
|
12616 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12617 |
|
|
|
12618 |
|
|
|
|
|
12619 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12620 |
|
|
|
|
|
|
|
|
|
|
|
12621 |
|
12622 |
-
|
12623 |
-
* Internal dependencies
|
12624 |
-
*/
|
12625 |
|
|
|
12626 |
|
|
|
|
|
12627 |
|
|
|
|
|
|
|
|
|
|
|
12628 |
|
|
|
12629 |
|
|
|
12630 |
|
|
|
|
|
12631 |
|
12632 |
-
|
12633 |
-
var currentUrl = new URL(window.location.href);
|
12634 |
-
var task = currentUrl.searchParams.get('task');
|
12635 |
|
12636 |
-
if (task) {
|
12637 |
-
var homeText = Object(external_wp_i18n_["__"])('WooCommerce Home', 'woocommerce-admin');
|
12638 |
|
12639 |
-
|
12640 |
-
Object(external_wc_tracks_["recordEvent"])('topbar_back_button', {
|
12641 |
-
page_name: header_getPageTitle(window.title)
|
12642 |
-
});
|
12643 |
-
Object(external_wc_navigation_["updateQueryString"])({}, Object(external_wc_navigation_["getHistory"])().location.pathname, {});
|
12644 |
-
}; // if it's a task list page, render a back button to the homescreen
|
12645 |
-
|
12646 |
-
|
12647 |
-
return Object(external_wp_element_["createElement"])(external_wp_components_["Tooltip"], {
|
12648 |
-
text: homeText
|
12649 |
-
}, Object(external_wp_element_["createElement"])("div", {
|
12650 |
-
tabIndex: "0",
|
12651 |
-
role: "button",
|
12652 |
-
"data-testid": "header-back-button",
|
12653 |
-
className: "woocommerce-layout__header-back-button",
|
12654 |
-
onKeyDown: function onKeyDown(_ref) {
|
12655 |
-
var keyCode = _ref.keyCode;
|
12656 |
-
|
12657 |
-
if (keyCode === external_wp_keycodes_["ENTER"] || keyCode === external_wp_keycodes_["SPACE"]) {
|
12658 |
-
navigateHome();
|
12659 |
-
}
|
12660 |
-
}
|
12661 |
-
}, Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
|
12662 |
-
icon: chevron_left["a" /* default */],
|
12663 |
-
onClick: navigateHome
|
12664 |
-
})));
|
12665 |
-
}
|
12666 |
|
12667 |
-
|
12668 |
-
};
|
12669 |
|
12670 |
-
var
|
12671 |
-
var currentUrl = new URL(window.location.href);
|
12672 |
-
var task = currentUrl.searchParams.get('task'); // If it's the task list then render a title based on which task the user is on.
|
12673 |
|
12674 |
-
|
12675 |
-
payments: Object(external_wp_i18n_["__"])('Choose payment methods', 'woocommerce-admin'),
|
12676 |
-
tax: Object(external_wp_i18n_["__"])('Add tax rates', 'woocommerce-admin'),
|
12677 |
-
appearance: Object(external_wp_i18n_["__"])('Personalize your store', 'woocommerce-admin'),
|
12678 |
-
products: Object(external_wp_i18n_["__"])('Add products', 'woocommerce-admin'),
|
12679 |
-
shipping: Object(external_wp_i18n_["__"])('Set up shipping costs', 'woocommerce-admin')
|
12680 |
-
}[task] || defaultTitle;
|
12681 |
-
};
|
12682 |
|
12683 |
-
|
12684 |
-
var sections = _ref2.sections,
|
12685 |
-
_ref2$isEmbedded = _ref2.isEmbedded,
|
12686 |
-
isEmbedded = _ref2$isEmbedded === void 0 ? false : _ref2$isEmbedded,
|
12687 |
-
query = _ref2.query;
|
12688 |
-
var headerElement = Object(external_wp_element_["useRef"])(null);
|
12689 |
-
var siteTitle = Object(wc_admin_settings["g" /* getSetting */])('siteTitle', '');
|
12690 |
-
var pageTitle = sections.slice(-1)[0];
|
12691 |
-
var isScrolled = useIsScrolled();
|
12692 |
-
|
12693 |
-
var _useUserPreferences = Object(external_wc_data_["useUserPreferences"])(),
|
12694 |
-
updateUserPreferences = _useUserPreferences.updateUserPreferences,
|
12695 |
-
userData = objectWithoutProperties_default()(_useUserPreferences, ["updateUserPreferences"]);
|
12696 |
-
|
12697 |
-
var isModalDismissed = userData.android_app_banner_dismissed === 'yes';
|
12698 |
-
var debounceTimer = null;
|
12699 |
-
var className = classnames_default()('woocommerce-layout__header', {
|
12700 |
-
'is-scrolled': isScrolled
|
12701 |
-
});
|
12702 |
-
Object(external_wp_element_["useLayoutEffect"])(function () {
|
12703 |
-
updateBodyMargin();
|
12704 |
-
window.addEventListener('resize', updateBodyMargin);
|
12705 |
-
return function () {
|
12706 |
-
window.removeEventListener('resize', updateBodyMargin);
|
12707 |
-
var wpBody = document.querySelector('#wpbody');
|
12708 |
|
12709 |
-
|
12710 |
-
return;
|
12711 |
-
}
|
12712 |
|
12713 |
-
|
12714 |
-
|
12715 |
-
|
12716 |
|
12717 |
-
|
12718 |
-
|
12719 |
-
debounceTimer = setTimeout(function () {
|
12720 |
-
var wpBody = document.querySelector('#wpbody');
|
12721 |
|
12722 |
-
|
12723 |
-
|
12724 |
-
}
|
12725 |
|
12726 |
-
|
12727 |
-
|
12728 |
-
};
|
12729 |
|
12730 |
-
|
12731 |
-
if (!isEmbedded) {
|
12732 |
-
var documentTitle = sections.map(function (section) {
|
12733 |
-
return Array.isArray(section) ? section[1] : section;
|
12734 |
-
}).reverse().join(' ‹ ');
|
12735 |
-
var decodedTitle = Object(external_wp_htmlEntities_["decodeEntities"])(Object(external_wp_i18n_["sprintf"])(
|
12736 |
-
/* translators: 1: document title. 2: page title */
|
12737 |
-
Object(external_wp_i18n_["__"])('%1$s ‹ %2$s — WooCommerce', 'woocommerce-admin'), documentTitle, siteTitle));
|
12738 |
|
12739 |
-
|
12740 |
-
|
12741 |
-
}
|
12742 |
}
|
12743 |
-
}, [isEmbedded, sections, siteTitle]);
|
12744 |
|
12745 |
-
|
12746 |
-
|
12747 |
-
|
12748 |
-
|
12749 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12750 |
|
12751 |
-
|
12752 |
-
|
12753 |
-
return Object(external_wp_element_["createElement"])("div", {
|
12754 |
-
className: className,
|
12755 |
-
ref: headerElement
|
12756 |
-
}, !isModalDismissed && Object(external_wp_element_["createElement"])(mobile_banner_MobileAppBanner, {
|
12757 |
-
onDismiss: dismissHandler,
|
12758 |
-
onInstall: dismissHandler
|
12759 |
-
}), Object(external_wp_element_["createElement"])("div", {
|
12760 |
-
className: "woocommerce-layout__header-wrapper"
|
12761 |
-
}, window.wcAdminFeatures.navigation && Object(external_wp_element_["createElement"])(navigation, null), header_renderTaskListBackButton(), Object(external_wp_element_["createElement"])(build_module["e" /* Text */], {
|
12762 |
-
className: "woocommerce-layout__header-heading ".concat(backButtonClass),
|
12763 |
-
as: "h1",
|
12764 |
-
variant: "subtitle.small"
|
12765 |
-
}, header_getPageTitle(Object(external_wp_htmlEntities_["decodeEntities"])(pageTitle))), window.wcAdminFeatures['activity-panels'] && Object(external_wp_element_["createElement"])(activity_panel, {
|
12766 |
-
isEmbedded: isEmbedded,
|
12767 |
-
query: query,
|
12768 |
-
userPreferencesData: header_objectSpread(header_objectSpread({}, userData), {}, {
|
12769 |
-
updateUserPreferences: updateUserPreferences
|
12770 |
-
})
|
12771 |
-
})));
|
12772 |
-
};
|
12773 |
-
// CONCATENATED MODULE: ./client/layout/notices.js
|
12774 |
|
|
|
12775 |
|
|
|
|
|
12776 |
|
|
|
12777 |
|
|
|
|
|
12778 |
|
|
|
|
|
12779 |
|
12780 |
|
|
|
12781 |
|
12782 |
-
|
12783 |
-
|
12784 |
-
function notices_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
12785 |
-
|
12786 |
-
/**
|
12787 |
-
* External dependencies
|
12788 |
-
*/
|
12789 |
-
|
12790 |
-
|
12791 |
-
var notices_Notices = /*#__PURE__*/function (_Component) {
|
12792 |
-
inherits_default()(Notices, _Component);
|
12793 |
-
|
12794 |
-
var _super = notices_createSuper(Notices);
|
12795 |
-
|
12796 |
-
function Notices() {
|
12797 |
-
classCallCheck_default()(this, Notices);
|
12798 |
-
|
12799 |
-
return _super.apply(this, arguments);
|
12800 |
-
}
|
12801 |
-
|
12802 |
-
createClass_default()(Notices, [{
|
12803 |
-
key: "render",
|
12804 |
-
value: function render() {
|
12805 |
-
return Object(external_wp_element_["createElement"])("div", {
|
12806 |
-
id: "woocommerce-layout__notice-list",
|
12807 |
-
className: "woocommerce-layout__notice-list"
|
12808 |
-
});
|
12809 |
-
}
|
12810 |
-
}]);
|
12811 |
-
|
12812 |
-
return Notices;
|
12813 |
-
}(external_wp_element_["Component"]);
|
12814 |
-
|
12815 |
-
/* harmony default export */ var layout_notices = (notices_Notices);
|
12816 |
-
// EXTERNAL MODULE: external "regeneratorRuntime"
|
12817 |
-
var external_regeneratorRuntime_ = __webpack_require__(16);
|
12818 |
-
var external_regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(external_regeneratorRuntime_);
|
12819 |
-
|
12820 |
-
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js
|
12821 |
-
var asyncToGenerator = __webpack_require__(134);
|
12822 |
-
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
12823 |
-
|
12824 |
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.weak-map.js
|
12825 |
-
var es_weak_map = __webpack_require__(432);
|
12826 |
-
|
12827 |
-
// EXTERNAL MODULE: ./node_modules/react-spring/web.cjs.js
|
12828 |
-
var web_cjs = __webpack_require__(315);
|
12829 |
-
|
12830 |
-
// EXTERNAL MODULE: ./client/layout/transient-notices/snackbar/index.js
|
12831 |
-
var snackbar = __webpack_require__(392);
|
12832 |
-
|
12833 |
-
// CONCATENATED MODULE: ./client/layout/transient-notices/snackbar/list.js
|
12834 |
-
|
12835 |
-
|
12836 |
-
|
12837 |
-
|
12838 |
-
|
12839 |
|
|
|
|
|
12840 |
|
12841 |
|
|
|
12842 |
|
|
|
|
|
12843 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12844 |
|
12845 |
|
12846 |
/**
|
@@ -12848,6 +12002,9 @@ var snackbar = __webpack_require__(392);
|
|
12848 |
*/
|
12849 |
|
12850 |
|
|
|
|
|
|
|
12851 |
|
12852 |
|
12853 |
|
@@ -12856,216 +12013,107 @@ var snackbar = __webpack_require__(392);
|
|
12856 |
*/
|
12857 |
|
12858 |
|
12859 |
-
|
12860 |
-
* Renders a list of notices.
|
12861 |
-
*
|
12862 |
-
* @param {Object} $0 Props passed to the component.
|
12863 |
-
* @param {Array} $0.notices Array of notices to render.
|
12864 |
-
* @param {Function} $0.onRemove Function called when a notice should be removed / dismissed.
|
12865 |
-
* @param {Function} $0.onRemove2 Function called when a notice should be removed / dismissed.
|
12866 |
-
* @param {Object} $0.className Name of the class used by the component.
|
12867 |
-
* @param {Object} $0.children Array of children to be rendered inside the notice list.
|
12868 |
-
* @return {Object} The rendered notices list.
|
12869 |
-
*/
|
12870 |
|
12871 |
-
function
|
12872 |
-
var
|
12873 |
-
className = _ref.className,
|
12874 |
children = _ref.children,
|
|
|
|
|
12875 |
_ref$onRemove = _ref.onRemove,
|
12876 |
-
onRemove = _ref$onRemove === void 0 ?
|
12877 |
-
|
12878 |
-
|
12879 |
-
|
12880 |
-
|
12881 |
-
var _useState = Object(external_wp_element_["useState"])(function () {
|
12882 |
-
return new WeakMap();
|
12883 |
-
}),
|
12884 |
-
_useState2 = slicedToArray_default()(_useState, 1),
|
12885 |
-
refMap = _useState2[0];
|
12886 |
-
|
12887 |
-
var transitions = Object(web_cjs["useTransition"])(notices, function (notice) {
|
12888 |
-
return notice.id;
|
12889 |
-
}, {
|
12890 |
-
from: {
|
12891 |
-
opacity: 0,
|
12892 |
-
height: 0
|
12893 |
-
},
|
12894 |
-
enter: function enter(item) {
|
12895 |
-
return /*#__PURE__*/function () {
|
12896 |
-
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/external_regeneratorRuntime_default.a.mark(function _callee(next) {
|
12897 |
-
return external_regeneratorRuntime_default.a.wrap(function _callee$(_context) {
|
12898 |
-
while (1) {
|
12899 |
-
switch (_context.prev = _context.next) {
|
12900 |
-
case 0:
|
12901 |
-
_context.next = 2;
|
12902 |
-
return next({
|
12903 |
-
opacity: 1,
|
12904 |
-
height: refMap.get(item).offsetHeight
|
12905 |
-
});
|
12906 |
-
|
12907 |
-
case 2:
|
12908 |
-
return _context.abrupt("return", _context.sent);
|
12909 |
-
|
12910 |
-
case 3:
|
12911 |
-
case "end":
|
12912 |
-
return _context.stop();
|
12913 |
-
}
|
12914 |
-
}
|
12915 |
-
}, _callee);
|
12916 |
-
}));
|
12917 |
-
|
12918 |
-
return function (_x) {
|
12919 |
-
return _ref2.apply(this, arguments);
|
12920 |
-
};
|
12921 |
-
}();
|
12922 |
-
},
|
12923 |
-
leave: function leave() {
|
12924 |
-
return /*#__PURE__*/function () {
|
12925 |
-
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/external_regeneratorRuntime_default.a.mark(function _callee2(next) {
|
12926 |
-
return external_regeneratorRuntime_default.a.wrap(function _callee2$(_context2) {
|
12927 |
-
while (1) {
|
12928 |
-
switch (_context2.prev = _context2.next) {
|
12929 |
-
case 0:
|
12930 |
-
_context2.next = 2;
|
12931 |
-
return next({
|
12932 |
-
opacity: 0
|
12933 |
-
});
|
12934 |
-
|
12935 |
-
case 2:
|
12936 |
-
_context2.next = 4;
|
12937 |
-
return next({
|
12938 |
-
height: 0
|
12939 |
-
});
|
12940 |
-
|
12941 |
-
case 4:
|
12942 |
-
case "end":
|
12943 |
-
return _context2.stop();
|
12944 |
-
}
|
12945 |
-
}
|
12946 |
-
}, _callee2);
|
12947 |
-
}));
|
12948 |
-
|
12949 |
-
return function (_x2) {
|
12950 |
-
return _ref3.apply(this, arguments);
|
12951 |
-
};
|
12952 |
-
}();
|
12953 |
-
},
|
12954 |
-
immediate: isReducedMotion
|
12955 |
-
});
|
12956 |
-
className = classnames_default()('components-snackbar-list', className);
|
12957 |
-
|
12958 |
-
var removeNotice = function removeNotice(notice) {
|
12959 |
return function () {
|
12960 |
-
|
12961 |
-
|
12962 |
-
onRemove2(notice.id);
|
12963 |
};
|
12964 |
-
};
|
12965 |
-
|
12966 |
-
return Object(external_wp_element_["createElement"])("div", {
|
12967 |
-
className: className
|
12968 |
-
}, children, transitions.map(function (_ref4) {
|
12969 |
-
var notice = _ref4.item,
|
12970 |
-
key = _ref4.key,
|
12971 |
-
style = _ref4.props;
|
12972 |
-
return Object(external_wp_element_["createElement"])(web_cjs["animated"].div, {
|
12973 |
-
key: key,
|
12974 |
-
style: style
|
12975 |
-
}, Object(external_wp_element_["createElement"])("div", {
|
12976 |
-
className: "components-snackbar-list__notice-container",
|
12977 |
-
ref: function ref(_ref5) {
|
12978 |
-
return _ref5 && refMap.set(notice, _ref5);
|
12979 |
-
}
|
12980 |
-
}, Object(external_wp_element_["createElement"])(snackbar["a" /* default */], extends_default()({}, Object(external_lodash_["omit"])(notice, ['content']), {
|
12981 |
-
onRemove: removeNotice(notice)
|
12982 |
-
}), notice.content)));
|
12983 |
-
}));
|
12984 |
-
}
|
12985 |
-
|
12986 |
-
/* harmony default export */ var list = (SnackbarList);
|
12987 |
-
// EXTERNAL MODULE: ./client/layout/transient-notices/style.scss
|
12988 |
-
var transient_notices_style = __webpack_require__(435);
|
12989 |
-
|
12990 |
-
// CONCATENATED MODULE: ./client/layout/transient-notices/index.js
|
12991 |
-
|
12992 |
-
|
12993 |
-
|
12994 |
-
/**
|
12995 |
-
* External dependencies
|
12996 |
-
*/
|
12997 |
-
|
12998 |
-
|
12999 |
|
13000 |
-
|
13001 |
-
|
13002 |
-
|
|
|
13003 |
|
|
|
|
|
13004 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13005 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13006 |
|
13007 |
-
|
13008 |
-
|
13009 |
-
onRemove = _useDispatch.removeNotice;
|
13010 |
|
13011 |
-
|
13012 |
-
onRemove2 = _useDispatch2.removeNotice;
|
13013 |
|
13014 |
-
|
13015 |
-
|
13016 |
-
// to Gutenberg this needs to be changed back to just core/notices.
|
13017 |
-
var notices = select('core/notices').getNotices();
|
13018 |
-
var notices2 = select('core/notices2').getNotices();
|
13019 |
-
return {
|
13020 |
-
notices: notices,
|
13021 |
-
notices2: notices2
|
13022 |
-
};
|
13023 |
-
});
|
13024 |
-
/**
|
13025 |
-
* Combines the two notices in the component vs in the useSelect, as we don't want to
|
13026 |
-
* create new object references on each useSelect call.
|
13027 |
-
*/
|
13028 |
|
13029 |
-
|
13030 |
-
|
13031 |
-
_noticeData$notices = noticeData.notices2,
|
13032 |
-
notices2 = _noticeData$notices === void 0 ? [] : _noticeData$notices;
|
13033 |
-
return notices.concat(notices2);
|
13034 |
-
};
|
13035 |
|
13036 |
-
var className = props.className;
|
13037 |
-
var classes = classnames_default()('woocommerce-transient-notices', 'components-notices__snackbar', className);
|
13038 |
-
var notices = getNotices();
|
13039 |
-
return Object(external_wp_element_["createElement"])(list, {
|
13040 |
-
notices: notices,
|
13041 |
-
className: classes,
|
13042 |
-
onRemove: onRemove,
|
13043 |
-
onRemove2: onRemove2
|
13044 |
-
});
|
13045 |
-
}
|
13046 |
|
13047 |
-
|
13048 |
-
/**
|
13049 |
-
* Additional class name to style the component.
|
13050 |
-
*/
|
13051 |
-
className: prop_types_default.a.string,
|
13052 |
|
13053 |
-
|
13054 |
-
|
13055 |
-
*/
|
13056 |
-
notices: prop_types_default.a.array
|
13057 |
};
|
13058 |
-
/* harmony default export */ var transient_notices = (TransientNotices);
|
13059 |
-
// CONCATENATED MODULE: ./client/layout/navigation.js
|
13060 |
|
|
|
13061 |
|
|
|
13062 |
|
|
|
|
|
13063 |
|
13064 |
-
|
13065 |
-
|
13066 |
-
|
13067 |
-
|
13068 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13069 |
|
13070 |
|
13071 |
|
@@ -13073,14 +12121,18 @@ function navigation_objectSpread(target) { for (var i = 1; i < arguments.length;
|
|
13073 |
|
13074 |
|
13075 |
|
|
|
13076 |
|
|
|
13077 |
|
13078 |
/**
|
13079 |
* External dependencies
|
13080 |
*/
|
13081 |
|
13082 |
|
13083 |
-
|
|
|
|
|
13084 |
|
13085 |
|
13086 |
/**
|
@@ -13089,107 +12141,159 @@ function navigation_objectSpread(target) { for (var i = 1; i < arguments.length;
|
|
13089 |
|
13090 |
|
13091 |
|
|
|
|
|
|
|
|
|
13092 |
|
|
|
|
|
13093 |
|
|
|
|
|
13094 |
|
13095 |
-
|
13096 |
-
|
13097 |
-
|
13098 |
-
|
13099 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13100 |
|
13101 |
-
|
13102 |
-
|
13103 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13104 |
|
|
|
|
|
13105 |
|
13106 |
-
|
13107 |
-
|
13108 |
-
|
13109 |
-
|
13110 |
-
|
13111 |
-
|
13112 |
|
13113 |
-
|
13114 |
-
}, 0);
|
13115 |
-
});
|
13116 |
-
}, []);
|
13117 |
-
/**
|
13118 |
-
* If the current page is embedded, stay with the default urls
|
13119 |
-
* provided by Navigation because the router isn't present to
|
13120 |
-
* respond to <Link /> component's manipulation of the url.
|
13121 |
-
*/
|
13122 |
|
13123 |
-
|
13124 |
-
|
13125 |
-
}
|
13126 |
|
13127 |
-
|
13128 |
-
|
13129 |
-
|
13130 |
-
|
13131 |
-
|
13132 |
-
|
13133 |
-
|
13134 |
-
|
13135 |
-
|
13136 |
-
|
13137 |
-
|
|
|
|
|
|
|
|
|
|
|
13138 |
|
13139 |
-
|
13140 |
-
});
|
13141 |
-
return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, pages.map(function (page) {
|
13142 |
-
return Object(external_wp_element_["createElement"])(external_wc_navigation_["WooNavigationItem"], {
|
13143 |
-
item: page.navArgs.id,
|
13144 |
-
key: page.navArgs.id
|
13145 |
-
}, Object(external_wp_element_["createElement"])(external_wc_components_["Link"], {
|
13146 |
-
className: "components-button",
|
13147 |
-
href: Object(external_wc_navigation_["getNewPath"])(pathIsExcluded(page.path) ? {} : persistedQuery, page.path, {}),
|
13148 |
-
type: "wc-admin"
|
13149 |
-
}, page.breadcrumbs[page.breadcrumbs.length - 1]));
|
13150 |
-
}), reports.map(function (item) {
|
13151 |
-
return Object(external_wp_element_["createElement"])(external_wc_navigation_["WooNavigationItem"], {
|
13152 |
-
item: item.navArgs.id,
|
13153 |
-
key: item.navArgs.id
|
13154 |
-
}, Object(external_wp_element_["createElement"])(external_wc_components_["Link"], {
|
13155 |
-
className: "components-button",
|
13156 |
-
href: Object(external_wc_navigation_["getNewPath"])(pathIsExcluded(item.report) ? {} : persistedQuery, "/analytics/".concat(item.report), {}),
|
13157 |
-
type: "wc-admin"
|
13158 |
-
}, item.title));
|
13159 |
-
}));
|
13160 |
};
|
13161 |
|
13162 |
-
Object(external_wp_plugins_["registerPlugin"])('wc-admin-navigation', {
|
13163 |
-
render: navigation_NavigationPlugin
|
13164 |
-
});
|
13165 |
-
// CONCATENATED MODULE: ./client/layout/index.js
|
13166 |
|
|
|
13167 |
|
|
|
|
|
13168 |
|
|
|
13169 |
|
|
|
|
|
|
|
|
|
13170 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13171 |
|
|
|
13172 |
|
|
|
13173 |
|
|
|
|
|
13174 |
|
|
|
13175 |
|
|
|
13176 |
|
|
|
|
|
13177 |
|
|
|
|
|
13178 |
|
|
|
|
|
13179 |
|
|
|
|
|
13180 |
|
|
|
|
|
13181 |
|
13182 |
-
|
|
|
13183 |
|
13184 |
-
|
|
|
13185 |
|
13186 |
-
|
|
|
13187 |
|
13188 |
-
|
|
|
13189 |
|
|
|
|
|
13190 |
|
|
|
|
|
13191 |
|
|
|
|
|
13192 |
|
|
|
13193 |
|
13194 |
|
13195 |
|
@@ -13204,5180 +12308,9342 @@ function layout_isNativeReflectConstruct() { if (typeof Reflect === "undefined"
|
|
13204 |
* External dependencies
|
13205 |
*/
|
13206 |
|
|
|
|
|
|
|
13207 |
|
13208 |
|
13209 |
|
13210 |
|
|
|
|
|
13211 |
|
|
|
|
|
|
|
|
|
|
|
13212 |
|
|
|
|
|
13213 |
|
|
|
|
|
|
|
|
|
13214 |
|
|
|
|
|
13215 |
|
|
|
13216 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13217 |
|
13218 |
-
|
13219 |
-
/**
|
13220 |
-
* Internal dependencies
|
13221 |
-
*/
|
13222 |
-
|
13223 |
-
|
13224 |
-
|
13225 |
-
|
13226 |
-
|
13227 |
-
|
13228 |
-
|
13229 |
-
var StoreAlerts = Object(external_wp_element_["lazy"])(function () {
|
13230 |
-
return Promise.all(/* import() | store-alerts */[__webpack_require__.e(1), __webpack_require__.e(47)]).then(__webpack_require__.bind(null, 714));
|
13231 |
-
});
|
13232 |
-
var WCPayUsageModal = Object(external_wp_element_["lazy"])(function () {
|
13233 |
-
return __webpack_require__.e(/* import() | wcpay-usage-modal */ 51).then(__webpack_require__.bind(null, 609));
|
13234 |
-
});
|
13235 |
-
var layout_PrimaryLayout = /*#__PURE__*/function (_Component) {
|
13236 |
-
inherits_default()(PrimaryLayout, _Component);
|
13237 |
-
|
13238 |
-
var _super = layout_createSuper(PrimaryLayout);
|
13239 |
-
|
13240 |
-
function PrimaryLayout() {
|
13241 |
-
classCallCheck_default()(this, PrimaryLayout);
|
13242 |
-
|
13243 |
-
return _super.apply(this, arguments);
|
13244 |
-
}
|
13245 |
-
|
13246 |
-
createClass_default()(PrimaryLayout, [{
|
13247 |
-
key: "render",
|
13248 |
-
value: function render() {
|
13249 |
-
var children = this.props.children;
|
13250 |
-
return Object(external_wp_element_["createElement"])("div", {
|
13251 |
-
className: "woocommerce-layout__primary",
|
13252 |
-
id: "woocommerce-layout__primary"
|
13253 |
-
}, window.wcAdminFeatures['store-alerts'] && Object(external_wp_element_["createElement"])(external_wp_element_["Suspense"], {
|
13254 |
-
fallback: Object(external_wp_element_["createElement"])(external_wc_components_["Spinner"], null)
|
13255 |
-
}, Object(external_wp_element_["createElement"])(StoreAlerts, null)), Object(external_wp_element_["createElement"])(layout_notices, null), children);
|
13256 |
-
}
|
13257 |
-
}]);
|
13258 |
-
|
13259 |
-
return PrimaryLayout;
|
13260 |
-
}(external_wp_element_["Component"]);
|
13261 |
-
|
13262 |
-
var layout_Layout = /*#__PURE__*/function (_Component2) {
|
13263 |
-
inherits_default()(_Layout, _Component2);
|
13264 |
-
|
13265 |
-
var _super2 = layout_createSuper(_Layout);
|
13266 |
-
|
13267 |
-
function _Layout() {
|
13268 |
-
classCallCheck_default()(this, _Layout);
|
13269 |
-
|
13270 |
-
return _super2.apply(this, arguments);
|
13271 |
-
}
|
13272 |
-
|
13273 |
-
createClass_default()(_Layout, [{
|
13274 |
key: "componentDidMount",
|
13275 |
value: function componentDidMount() {
|
13276 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
13277 |
}
|
13278 |
}, {
|
13279 |
-
key: "
|
13280 |
-
value: function
|
13281 |
-
|
13282 |
-
|
13283 |
-
|
13284 |
-
|
13285 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13286 |
}
|
13287 |
|
13288 |
-
|
13289 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13290 |
}
|
13291 |
}
|
13292 |
}, {
|
13293 |
-
key: "
|
13294 |
-
value: function
|
13295 |
-
|
13296 |
-
|
13297 |
-
|
13298 |
-
isEmbedded = _this$props.isEmbedded,
|
13299 |
-
isJetpackConnected = _this$props.isJetpackConnected;
|
13300 |
-
var navigationFlag = {
|
13301 |
-
has_navigation: !!window.wcNavigation
|
13302 |
-
};
|
13303 |
|
13304 |
-
|
13305 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13306 |
|
13307 |
-
|
13308 |
-
is_embedded: true
|
13309 |
-
}, navigationFlag));
|
13310 |
return;
|
13311 |
}
|
13312 |
|
13313 |
-
var
|
13314 |
|
13315 |
-
if (!
|
13316 |
return;
|
13317 |
-
} // Remove leading slash, and camel case remaining pathname
|
13318 |
-
|
13319 |
-
|
13320 |
-
var path = pathname.substring(1).replace(/\//g, '_'); // When pathname is `/` we are on the home screen.
|
13321 |
-
|
13322 |
-
if (path.length === 0) {
|
13323 |
-
path = 'home_screen';
|
13324 |
-
}
|
13325 |
-
|
13326 |
-
Object(external_wc_tracks_["recordPageView"])(path, layout_objectSpread({
|
13327 |
-
jetpack_installed: installedPlugins.includes('jetpack'),
|
13328 |
-
jetpack_active: activePlugins.includes('jetpack'),
|
13329 |
-
jetpack_connected: isJetpackConnected
|
13330 |
-
}, navigationFlag));
|
13331 |
-
}
|
13332 |
-
}, {
|
13333 |
-
key: "getQuery",
|
13334 |
-
value: function getQuery(searchString) {
|
13335 |
-
if (!searchString) {
|
13336 |
-
return {};
|
13337 |
}
|
13338 |
|
13339 |
-
var
|
13340 |
-
|
13341 |
-
|
13342 |
-
}, {
|
13343 |
-
key: "isWCPaySettingsPage",
|
13344 |
-
value: function isWCPaySettingsPage() {
|
13345 |
-
var _getQuery = Object(external_wc_navigation_["getQuery"])(),
|
13346 |
-
page = _getQuery.page,
|
13347 |
-
section = _getQuery.section,
|
13348 |
-
tab = _getQuery.tab;
|
13349 |
|
13350 |
-
|
|
|
|
|
|
|
13351 |
}
|
13352 |
}, {
|
13353 |
key: "render",
|
13354 |
value: function render() {
|
13355 |
var _this$props2 = this.props,
|
13356 |
-
|
13357 |
-
|
13358 |
|
13359 |
-
|
13360 |
-
|
13361 |
-
|
13362 |
-
var breadcrumbs = page.breadcrumbs;
|
13363 |
-
var query = this.getQuery(location && location.search);
|
13364 |
-
return Object(external_wp_element_["createElement"])("div", {
|
13365 |
-
className: "woocommerce-layout"
|
13366 |
-
}, Object(external_wp_element_["createElement"])(client_header_Header, {
|
13367 |
-
sections: Object(external_lodash_["isFunction"])(breadcrumbs) ? breadcrumbs(this.props) : breadcrumbs,
|
13368 |
-
isEmbedded: isEmbedded,
|
13369 |
-
query: query
|
13370 |
-
}), Object(external_wp_element_["createElement"])(transient_notices, null), !isEmbedded && Object(external_wp_element_["createElement"])(layout_PrimaryLayout, null, Object(external_wp_element_["createElement"])("div", {
|
13371 |
-
className: "woocommerce-layout__main"
|
13372 |
-
}, Object(external_wp_element_["createElement"])(controller_Controller, extends_default()({}, restProps, {
|
13373 |
-
query: query
|
13374 |
-
})))), isEmbedded && this.isWCPaySettingsPage() && Object(external_wp_element_["createElement"])(external_wp_element_["Suspense"], {
|
13375 |
-
fallback: null
|
13376 |
-
}, Object(external_wp_element_["createElement"])(WCPayUsageModal, null)));
|
13377 |
}
|
13378 |
}]);
|
13379 |
|
13380 |
-
return
|
13381 |
-
}(
|
13382 |
|
13383 |
-
|
13384 |
-
|
13385 |
-
|
13386 |
-
|
13387 |
-
]),
|
13388 |
-
path: prop_types_default.a.string,
|
13389 |
-
breadcrumbs: prop_types_default.a.oneOfType([prop_types_default.a.func, prop_types_default.a.arrayOf(prop_types_default.a.oneOfType([prop_types_default.a.arrayOf(prop_types_default.a.string), prop_types_default.a.string]))]).isRequired,
|
13390 |
-
wpOpenMenu: prop_types_default.a.string
|
13391 |
-
}).isRequired
|
13392 |
};
|
13393 |
-
var Layout = Object(external_wp_compose_["compose"])(Object(external_wc_data_["withPluginsHydration"])(layout_objectSpread(layout_objectSpread({}, window.wcSettings.plugins || {}), {}, {
|
13394 |
-
jetpackStatus: window.wcSettings.dataEndpoints && window.wcSettings.dataEndpoints.jetpackStatus || false
|
13395 |
-
})), Object(external_wp_data_["withSelect"])(function (select, _ref) {
|
13396 |
-
var isEmbedded = _ref.isEmbedded;
|
13397 |
|
13398 |
-
|
13399 |
-
|
13400 |
-
|
13401 |
-
|
13402 |
|
13403 |
-
var _select = select(external_wc_data_["PLUGINS_STORE_NAME"]),
|
13404 |
-
getActivePlugins = _select.getActivePlugins,
|
13405 |
-
getInstalledPlugins = _select.getInstalledPlugins,
|
13406 |
-
isJetpackConnected = _select.isJetpackConnected;
|
13407 |
|
13408 |
-
return {
|
13409 |
-
activePlugins: getActivePlugins(),
|
13410 |
-
isJetpackConnected: isJetpackConnected(),
|
13411 |
-
installedPlugins: getInstalledPlugins()
|
13412 |
-
};
|
13413 |
-
}))(layout_Layout);
|
13414 |
|
13415 |
-
var layout_PageLayout = function _PageLayout() {
|
13416 |
-
var _useUser = Object(external_wc_data_["useUser"])(),
|
13417 |
-
currentUserCan = _useUser.currentUserCan;
|
13418 |
-
|
13419 |
-
return Object(external_wp_element_["createElement"])(react_router_Router, {
|
13420 |
-
history: Object(external_wc_navigation_["getHistory"])()
|
13421 |
-
}, Object(external_wp_element_["createElement"])(react_router_Switch, null, controller_getPages().filter(function (page) {
|
13422 |
-
return !page.capability || currentUserCan(page.capability);
|
13423 |
-
}).map(function (page) {
|
13424 |
-
return Object(external_wp_element_["createElement"])(react_router_Route, {
|
13425 |
-
key: page.path,
|
13426 |
-
path: page.path,
|
13427 |
-
exact: true,
|
13428 |
-
render: function render(props) {
|
13429 |
-
return Object(external_wp_element_["createElement"])(Layout, extends_default()({
|
13430 |
-
page: page
|
13431 |
-
}, props));
|
13432 |
-
}
|
13433 |
-
});
|
13434 |
-
})));
|
13435 |
-
};
|
13436 |
|
13437 |
-
|
|
|
|
|
13438 |
|
13439 |
-
|
13440 |
-
|
13441 |
-
|
13442 |
-
breadcrumbs: Object(wc_admin_settings["g" /* getSetting */])('embedBreadcrumbs', [])
|
13443 |
-
},
|
13444 |
-
isEmbedded: true
|
13445 |
-
});
|
13446 |
-
};
|
13447 |
|
13448 |
-
var EmbedLayout = Object(external_wp_compose_["compose"])(window.wcSettings.preloadOptions ? Object(external_wc_data_["withOptionsHydration"])(layout_objectSpread({}, window.wcSettings.preloadOptions)) : external_lodash_["identity"])(layout_EmbedLayout);
|
13449 |
|
13450 |
-
/***/ }),
|
13451 |
-
/* 281 */
|
13452 |
-
/***/ (function(module, exports) {
|
13453 |
|
13454 |
-
|
|
|
|
|
13455 |
|
13456 |
-
/***/ }),
|
13457 |
-
/* 282 */,
|
13458 |
-
/* 283 */
|
13459 |
-
/***/ (function(module, exports, __webpack_require__) {
|
13460 |
|
13461 |
-
|
13462 |
-
var
|
13463 |
-
|
|
|
|
|
|
|
13464 |
|
13465 |
-
var
|
13466 |
-
|
13467 |
-
|
|
|
13468 |
|
13469 |
-
|
13470 |
-
|
13471 |
-
|
13472 |
-
|
13473 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13474 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13475 |
|
13476 |
/***/ }),
|
13477 |
-
|
13478 |
-
|
13479 |
/***/ (function(module, exports, __webpack_require__) {
|
13480 |
|
13481 |
-
var
|
13482 |
-
var $values = __webpack_require__(249).values;
|
13483 |
|
13484 |
-
|
13485 |
-
|
13486 |
-
|
13487 |
-
|
13488 |
-
|
13489 |
-
|
13490 |
-
|
|
|
13491 |
|
|
|
13492 |
|
13493 |
/***/ }),
|
13494 |
-
/* 286 */,
|
13495 |
-
/* 287 */
|
13496 |
-
/***/ (function(module, exports, __webpack_require__) {
|
13497 |
|
13498 |
-
|
|
|
13499 |
|
13500 |
-
|
13501 |
-
|
13502 |
-
|
13503 |
-
|
13504 |
-
|
13505 |
-
|
13506 |
-
|
13507 |
-
var redefine = __webpack_require__(27);
|
13508 |
-
var anInstance = __webpack_require__(136);
|
13509 |
-
var has = __webpack_require__(11);
|
13510 |
-
var assign = __webpack_require__(221);
|
13511 |
-
var arrayFrom = __webpack_require__(234);
|
13512 |
-
var codeAt = __webpack_require__(125).codeAt;
|
13513 |
-
var toASCII = __webpack_require__(294);
|
13514 |
-
var setToStringTag = __webpack_require__(90);
|
13515 |
-
var URLSearchParamsModule = __webpack_require__(295);
|
13516 |
-
var InternalStateModule = __webpack_require__(45);
|
13517 |
-
|
13518 |
-
var NativeURL = global.URL;
|
13519 |
-
var URLSearchParams = URLSearchParamsModule.URLSearchParams;
|
13520 |
-
var getInternalSearchParamsState = URLSearchParamsModule.getState;
|
13521 |
-
var setInternalState = InternalStateModule.set;
|
13522 |
-
var getInternalURLState = InternalStateModule.getterFor('URL');
|
13523 |
-
var floor = Math.floor;
|
13524 |
-
var pow = Math.pow;
|
13525 |
-
|
13526 |
-
var INVALID_AUTHORITY = 'Invalid authority';
|
13527 |
-
var INVALID_SCHEME = 'Invalid scheme';
|
13528 |
-
var INVALID_HOST = 'Invalid host';
|
13529 |
-
var INVALID_PORT = 'Invalid port';
|
13530 |
-
|
13531 |
-
var ALPHA = /[A-Za-z]/;
|
13532 |
-
var ALPHANUMERIC = /[\d+-.A-Za-z]/;
|
13533 |
-
var DIGIT = /\d/;
|
13534 |
-
var HEX_START = /^(0x|0X)/;
|
13535 |
-
var OCT = /^[0-7]+$/;
|
13536 |
-
var DEC = /^\d+$/;
|
13537 |
-
var HEX = /^[\dA-Fa-f]+$/;
|
13538 |
-
/* eslint-disable no-control-regex -- safe */
|
13539 |
-
var FORBIDDEN_HOST_CODE_POINT = /[\u0000\t\u000A\u000D #%/:?@[\\]]/;
|
13540 |
-
var FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT = /[\u0000\t\u000A\u000D #/:?@[\\]]/;
|
13541 |
-
var LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE = /^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g;
|
13542 |
-
var TAB_AND_NEW_LINE = /[\t\u000A\u000D]/g;
|
13543 |
-
/* eslint-enable no-control-regex -- safe */
|
13544 |
-
var EOF;
|
13545 |
-
|
13546 |
-
var parseHost = function (url, input) {
|
13547 |
-
var result, codePoints, index;
|
13548 |
-
if (input.charAt(0) == '[') {
|
13549 |
-
if (input.charAt(input.length - 1) != ']') return INVALID_HOST;
|
13550 |
-
result = parseIPv6(input.slice(1, -1));
|
13551 |
-
if (!result) return INVALID_HOST;
|
13552 |
-
url.host = result;
|
13553 |
-
// opaque host
|
13554 |
-
} else if (!isSpecial(url)) {
|
13555 |
-
if (FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT.test(input)) return INVALID_HOST;
|
13556 |
-
result = '';
|
13557 |
-
codePoints = arrayFrom(input);
|
13558 |
-
for (index = 0; index < codePoints.length; index++) {
|
13559 |
-
result += percentEncode(codePoints[index], C0ControlPercentEncodeSet);
|
13560 |
-
}
|
13561 |
-
url.host = result;
|
13562 |
} else {
|
13563 |
-
|
13564 |
-
|
13565 |
-
|
13566 |
-
if (result === null) return INVALID_HOST;
|
13567 |
-
url.host = result;
|
13568 |
}
|
13569 |
-
};
|
13570 |
|
13571 |
-
|
13572 |
-
|
13573 |
-
var partsLength, numbers, index, part, radix, number, ipv4;
|
13574 |
-
if (parts.length && parts[parts.length - 1] == '') {
|
13575 |
-
parts.pop();
|
13576 |
-
}
|
13577 |
-
partsLength = parts.length;
|
13578 |
-
if (partsLength > 4) return input;
|
13579 |
-
numbers = [];
|
13580 |
-
for (index = 0; index < partsLength; index++) {
|
13581 |
-
part = parts[index];
|
13582 |
-
if (part == '') return input;
|
13583 |
-
radix = 10;
|
13584 |
-
if (part.length > 1 && part.charAt(0) == '0') {
|
13585 |
-
radix = HEX_START.test(part) ? 16 : 8;
|
13586 |
-
part = part.slice(radix == 8 ? 1 : 2);
|
13587 |
-
}
|
13588 |
-
if (part === '') {
|
13589 |
-
number = 0;
|
13590 |
-
} else {
|
13591 |
-
if (!(radix == 10 ? DEC : radix == 8 ? OCT : HEX).test(part)) return input;
|
13592 |
-
number = parseInt(part, radix);
|
13593 |
-
}
|
13594 |
-
numbers.push(number);
|
13595 |
-
}
|
13596 |
-
for (index = 0; index < partsLength; index++) {
|
13597 |
-
number = numbers[index];
|
13598 |
-
if (index == partsLength - 1) {
|
13599 |
-
if (number >= pow(256, 5 - partsLength)) return null;
|
13600 |
-
} else if (number > 255) return null;
|
13601 |
-
}
|
13602 |
-
ipv4 = numbers.pop();
|
13603 |
-
for (index = 0; index < numbers.length; index++) {
|
13604 |
-
ipv4 += numbers[index] * pow(256, 3 - index);
|
13605 |
-
}
|
13606 |
-
return ipv4;
|
13607 |
-
};
|
13608 |
|
13609 |
-
|
13610 |
-
var parseIPv6 = function (input) {
|
13611 |
-
var address = [0, 0, 0, 0, 0, 0, 0, 0];
|
13612 |
-
var pieceIndex = 0;
|
13613 |
-
var compress = null;
|
13614 |
-
var pointer = 0;
|
13615 |
-
var value, length, numbersSeen, ipv4Piece, number, swaps, swap;
|
13616 |
|
13617 |
-
|
13618 |
-
return input.charAt(pointer);
|
13619 |
-
};
|
13620 |
|
13621 |
-
|
13622 |
-
|
13623 |
-
pointer += 2;
|
13624 |
-
pieceIndex++;
|
13625 |
-
compress = pieceIndex;
|
13626 |
-
}
|
13627 |
-
while (char()) {
|
13628 |
-
if (pieceIndex == 8) return;
|
13629 |
-
if (char() == ':') {
|
13630 |
-
if (compress !== null) return;
|
13631 |
-
pointer++;
|
13632 |
-
pieceIndex++;
|
13633 |
-
compress = pieceIndex;
|
13634 |
-
continue;
|
13635 |
-
}
|
13636 |
-
value = length = 0;
|
13637 |
-
while (length < 4 && HEX.test(char())) {
|
13638 |
-
value = value * 16 + parseInt(char(), 16);
|
13639 |
-
pointer++;
|
13640 |
-
length++;
|
13641 |
-
}
|
13642 |
-
if (char() == '.') {
|
13643 |
-
if (length == 0) return;
|
13644 |
-
pointer -= length;
|
13645 |
-
if (pieceIndex > 6) return;
|
13646 |
-
numbersSeen = 0;
|
13647 |
-
while (char()) {
|
13648 |
-
ipv4Piece = null;
|
13649 |
-
if (numbersSeen > 0) {
|
13650 |
-
if (char() == '.' && numbersSeen < 4) pointer++;
|
13651 |
-
else return;
|
13652 |
-
}
|
13653 |
-
if (!DIGIT.test(char())) return;
|
13654 |
-
while (DIGIT.test(char())) {
|
13655 |
-
number = parseInt(char(), 10);
|
13656 |
-
if (ipv4Piece === null) ipv4Piece = number;
|
13657 |
-
else if (ipv4Piece == 0) return;
|
13658 |
-
else ipv4Piece = ipv4Piece * 10 + number;
|
13659 |
-
if (ipv4Piece > 255) return;
|
13660 |
-
pointer++;
|
13661 |
-
}
|
13662 |
-
address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece;
|
13663 |
-
numbersSeen++;
|
13664 |
-
if (numbersSeen == 2 || numbersSeen == 4) pieceIndex++;
|
13665 |
-
}
|
13666 |
-
if (numbersSeen != 4) return;
|
13667 |
-
break;
|
13668 |
-
} else if (char() == ':') {
|
13669 |
-
pointer++;
|
13670 |
-
if (!char()) return;
|
13671 |
-
} else if (char()) return;
|
13672 |
-
address[pieceIndex++] = value;
|
13673 |
-
}
|
13674 |
-
if (compress !== null) {
|
13675 |
-
swaps = pieceIndex - compress;
|
13676 |
-
pieceIndex = 7;
|
13677 |
-
while (pieceIndex != 0 && swaps > 0) {
|
13678 |
-
swap = address[pieceIndex];
|
13679 |
-
address[pieceIndex--] = address[compress + swaps - 1];
|
13680 |
-
address[compress + --swaps] = swap;
|
13681 |
-
}
|
13682 |
-
} else if (pieceIndex != 8) return;
|
13683 |
-
return address;
|
13684 |
-
};
|
13685 |
|
13686 |
-
|
13687 |
-
|
13688 |
-
|
13689 |
-
|
13690 |
-
|
13691 |
-
|
13692 |
-
|
13693 |
-
|
13694 |
-
|
13695 |
-
|
13696 |
-
|
13697 |
-
|
13698 |
-
currStart = null;
|
13699 |
-
currLength = 0;
|
13700 |
-
} else {
|
13701 |
-
if (currStart === null) currStart = index;
|
13702 |
-
++currLength;
|
13703 |
-
}
|
13704 |
-
}
|
13705 |
-
if (currLength > maxLength) {
|
13706 |
-
maxIndex = currStart;
|
13707 |
-
maxLength = currLength;
|
13708 |
-
}
|
13709 |
-
return maxIndex;
|
13710 |
-
};
|
13711 |
|
13712 |
-
var serializeHost = function (host) {
|
13713 |
-
var result, index, compress, ignore0;
|
13714 |
-
// ipv4
|
13715 |
-
if (typeof host == 'number') {
|
13716 |
-
result = [];
|
13717 |
-
for (index = 0; index < 4; index++) {
|
13718 |
-
result.unshift(host % 256);
|
13719 |
-
host = floor(host / 256);
|
13720 |
-
} return result.join('.');
|
13721 |
-
// ipv6
|
13722 |
-
} else if (typeof host == 'object') {
|
13723 |
-
result = '';
|
13724 |
-
compress = findLongestZeroSequence(host);
|
13725 |
-
for (index = 0; index < 8; index++) {
|
13726 |
-
if (ignore0 && host[index] === 0) continue;
|
13727 |
-
if (ignore0) ignore0 = false;
|
13728 |
-
if (compress === index) {
|
13729 |
-
result += index ? ':' : '::';
|
13730 |
-
ignore0 = true;
|
13731 |
-
} else {
|
13732 |
-
result += host[index].toString(16);
|
13733 |
-
if (index < 7) result += ':';
|
13734 |
-
}
|
13735 |
-
}
|
13736 |
-
return '[' + result + ']';
|
13737 |
-
} return host;
|
13738 |
-
};
|
13739 |
|
13740 |
-
|
13741 |
-
|
13742 |
-
|
13743 |
-
});
|
13744 |
-
var pathPercentEncodeSet = assign({}, fragmentPercentEncodeSet, {
|
13745 |
-
'#': 1, '?': 1, '{': 1, '}': 1
|
13746 |
-
});
|
13747 |
-
var userinfoPercentEncodeSet = assign({}, pathPercentEncodeSet, {
|
13748 |
-
'/': 1, ':': 1, ';': 1, '=': 1, '@': 1, '[': 1, '\\': 1, ']': 1, '^': 1, '|': 1
|
13749 |
-
});
|
13750 |
|
13751 |
-
var percentEncode = function (char, set) {
|
13752 |
-
var code = codeAt(char, 0);
|
13753 |
-
return code > 0x20 && code < 0x7F && !has(set, char) ? char : encodeURIComponent(char);
|
13754 |
-
};
|
13755 |
|
13756 |
-
|
13757 |
-
|
13758 |
-
|
13759 |
-
http: 80,
|
13760 |
-
https: 443,
|
13761 |
-
ws: 80,
|
13762 |
-
wss: 443
|
13763 |
-
};
|
13764 |
|
13765 |
-
var isSpecial = function (url) {
|
13766 |
-
return has(specialSchemes, url.scheme);
|
13767 |
-
};
|
13768 |
|
13769 |
-
var includesCredentials = function (url) {
|
13770 |
-
return url.username != '' || url.password != '';
|
13771 |
-
};
|
13772 |
|
13773 |
-
var cannotHaveUsernamePasswordPort = function (url) {
|
13774 |
-
return !url.host || url.cannotBeABaseURL || url.scheme == 'file';
|
13775 |
-
};
|
13776 |
|
13777 |
-
var isWindowsDriveLetter = function (string, normalized) {
|
13778 |
-
var second;
|
13779 |
-
return string.length == 2 && ALPHA.test(string.charAt(0))
|
13780 |
-
&& ((second = string.charAt(1)) == ':' || (!normalized && second == '|'));
|
13781 |
-
};
|
13782 |
|
13783 |
-
|
13784 |
-
|
13785 |
-
return string.length > 1 && isWindowsDriveLetter(string.slice(0, 2)) && (
|
13786 |
-
string.length == 2 ||
|
13787 |
-
((third = string.charAt(2)) === '/' || third === '\\' || third === '?' || third === '#')
|
13788 |
-
);
|
13789 |
-
};
|
13790 |
|
13791 |
-
|
13792 |
-
|
13793 |
-
|
13794 |
-
|
13795 |
-
path.pop();
|
13796 |
-
}
|
13797 |
-
};
|
13798 |
|
13799 |
-
|
13800 |
-
|
13801 |
-
|
13802 |
|
13803 |
-
var
|
13804 |
-
|
13805 |
-
|
13806 |
-
};
|
13807 |
|
13808 |
-
|
13809 |
-
var
|
13810 |
-
|
13811 |
-
|
13812 |
-
var
|
13813 |
-
var
|
13814 |
-
var RELATIVE = {};
|
13815 |
-
var RELATIVE_SLASH = {};
|
13816 |
-
var SPECIAL_AUTHORITY_SLASHES = {};
|
13817 |
-
var SPECIAL_AUTHORITY_IGNORE_SLASHES = {};
|
13818 |
-
var AUTHORITY = {};
|
13819 |
-
var HOST = {};
|
13820 |
-
var HOSTNAME = {};
|
13821 |
-
var PORT = {};
|
13822 |
-
var FILE = {};
|
13823 |
-
var FILE_SLASH = {};
|
13824 |
-
var FILE_HOST = {};
|
13825 |
-
var PATH_START = {};
|
13826 |
-
var PATH = {};
|
13827 |
-
var CANNOT_BE_A_BASE_URL_PATH = {};
|
13828 |
-
var QUERY = {};
|
13829 |
-
var FRAGMENT = {};
|
13830 |
-
|
13831 |
-
// eslint-disable-next-line max-statements -- TODO
|
13832 |
-
var parseURL = function (url, input, stateOverride, base) {
|
13833 |
-
var state = stateOverride || SCHEME_START;
|
13834 |
-
var pointer = 0;
|
13835 |
-
var buffer = '';
|
13836 |
-
var seenAt = false;
|
13837 |
-
var seenBracket = false;
|
13838 |
-
var seenPasswordToken = false;
|
13839 |
-
var codePoints, char, bufferCodePoints, failure;
|
13840 |
-
|
13841 |
-
if (!stateOverride) {
|
13842 |
-
url.scheme = '';
|
13843 |
-
url.username = '';
|
13844 |
-
url.password = '';
|
13845 |
-
url.host = null;
|
13846 |
-
url.port = null;
|
13847 |
-
url.path = [];
|
13848 |
-
url.query = null;
|
13849 |
-
url.fragment = null;
|
13850 |
-
url.cannotBeABaseURL = false;
|
13851 |
-
input = input.replace(LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE, '');
|
13852 |
-
}
|
13853 |
-
|
13854 |
-
input = input.replace(TAB_AND_NEW_LINE, '');
|
13855 |
-
|
13856 |
-
codePoints = arrayFrom(input);
|
13857 |
-
|
13858 |
-
while (pointer <= codePoints.length) {
|
13859 |
-
char = codePoints[pointer];
|
13860 |
-
switch (state) {
|
13861 |
-
case SCHEME_START:
|
13862 |
-
if (char && ALPHA.test(char)) {
|
13863 |
-
buffer += char.toLowerCase();
|
13864 |
-
state = SCHEME;
|
13865 |
-
} else if (!stateOverride) {
|
13866 |
-
state = NO_SCHEME;
|
13867 |
-
continue;
|
13868 |
-
} else return INVALID_SCHEME;
|
13869 |
-
break;
|
13870 |
|
13871 |
-
|
13872 |
-
|
13873 |
-
buffer += char.toLowerCase();
|
13874 |
-
} else if (char == ':') {
|
13875 |
-
if (stateOverride && (
|
13876 |
-
(isSpecial(url) != has(specialSchemes, buffer)) ||
|
13877 |
-
(buffer == 'file' && (includesCredentials(url) || url.port !== null)) ||
|
13878 |
-
(url.scheme == 'file' && !url.host)
|
13879 |
-
)) return;
|
13880 |
-
url.scheme = buffer;
|
13881 |
-
if (stateOverride) {
|
13882 |
-
if (isSpecial(url) && specialSchemes[url.scheme] == url.port) url.port = null;
|
13883 |
-
return;
|
13884 |
-
}
|
13885 |
-
buffer = '';
|
13886 |
-
if (url.scheme == 'file') {
|
13887 |
-
state = FILE;
|
13888 |
-
} else if (isSpecial(url) && base && base.scheme == url.scheme) {
|
13889 |
-
state = SPECIAL_RELATIVE_OR_AUTHORITY;
|
13890 |
-
} else if (isSpecial(url)) {
|
13891 |
-
state = SPECIAL_AUTHORITY_SLASHES;
|
13892 |
-
} else if (codePoints[pointer + 1] == '/') {
|
13893 |
-
state = PATH_OR_AUTHORITY;
|
13894 |
-
pointer++;
|
13895 |
-
} else {
|
13896 |
-
url.cannotBeABaseURL = true;
|
13897 |
-
url.path.push('');
|
13898 |
-
state = CANNOT_BE_A_BASE_URL_PATH;
|
13899 |
-
}
|
13900 |
-
} else if (!stateOverride) {
|
13901 |
-
buffer = '';
|
13902 |
-
state = NO_SCHEME;
|
13903 |
-
pointer = 0;
|
13904 |
-
continue;
|
13905 |
-
} else return INVALID_SCHEME;
|
13906 |
-
break;
|
13907 |
|
13908 |
-
|
13909 |
-
|
13910 |
-
|
13911 |
-
|
13912 |
-
|
13913 |
-
|
13914 |
-
|
13915 |
-
|
13916 |
-
state = FRAGMENT;
|
13917 |
-
break;
|
13918 |
-
}
|
13919 |
-
state = base.scheme == 'file' ? FILE : RELATIVE;
|
13920 |
-
continue;
|
13921 |
|
13922 |
-
|
13923 |
-
if (char == '/' && codePoints[pointer + 1] == '/') {
|
13924 |
-
state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
|
13925 |
-
pointer++;
|
13926 |
-
} else {
|
13927 |
-
state = RELATIVE;
|
13928 |
-
continue;
|
13929 |
-
} break;
|
13930 |
|
13931 |
-
|
13932 |
-
|
13933 |
-
state = AUTHORITY;
|
13934 |
-
break;
|
13935 |
-
} else {
|
13936 |
-
state = PATH;
|
13937 |
-
continue;
|
13938 |
-
}
|
13939 |
|
13940 |
-
|
13941 |
-
|
13942 |
-
|
13943 |
-
|
13944 |
-
|
13945 |
-
|
13946 |
-
url.port = base.port;
|
13947 |
-
url.path = base.path.slice();
|
13948 |
-
url.query = base.query;
|
13949 |
-
} else if (char == '/' || (char == '\\' && isSpecial(url))) {
|
13950 |
-
state = RELATIVE_SLASH;
|
13951 |
-
} else if (char == '?') {
|
13952 |
-
url.username = base.username;
|
13953 |
-
url.password = base.password;
|
13954 |
-
url.host = base.host;
|
13955 |
-
url.port = base.port;
|
13956 |
-
url.path = base.path.slice();
|
13957 |
-
url.query = '';
|
13958 |
-
state = QUERY;
|
13959 |
-
} else if (char == '#') {
|
13960 |
-
url.username = base.username;
|
13961 |
-
url.password = base.password;
|
13962 |
-
url.host = base.host;
|
13963 |
-
url.port = base.port;
|
13964 |
-
url.path = base.path.slice();
|
13965 |
-
url.query = base.query;
|
13966 |
-
url.fragment = '';
|
13967 |
-
state = FRAGMENT;
|
13968 |
-
} else {
|
13969 |
-
url.username = base.username;
|
13970 |
-
url.password = base.password;
|
13971 |
-
url.host = base.host;
|
13972 |
-
url.port = base.port;
|
13973 |
-
url.path = base.path.slice();
|
13974 |
-
url.path.pop();
|
13975 |
-
state = PATH;
|
13976 |
-
continue;
|
13977 |
-
} break;
|
13978 |
|
13979 |
-
|
13980 |
-
|
13981 |
-
|
13982 |
-
|
13983 |
-
|
13984 |
-
|
13985 |
-
|
13986 |
-
|
13987 |
-
|
13988 |
-
|
13989 |
-
|
13990 |
-
|
13991 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13992 |
|
13993 |
-
|
13994 |
-
|
13995 |
-
|
13996 |
-
|
13997 |
-
break;
|
13998 |
|
13999 |
-
|
14000 |
-
|
14001 |
-
|
14002 |
-
continue;
|
14003 |
-
} break;
|
14004 |
-
|
14005 |
-
case AUTHORITY:
|
14006 |
-
if (char == '@') {
|
14007 |
-
if (seenAt) buffer = '%40' + buffer;
|
14008 |
-
seenAt = true;
|
14009 |
-
bufferCodePoints = arrayFrom(buffer);
|
14010 |
-
for (var i = 0; i < bufferCodePoints.length; i++) {
|
14011 |
-
var codePoint = bufferCodePoints[i];
|
14012 |
-
if (codePoint == ':' && !seenPasswordToken) {
|
14013 |
-
seenPasswordToken = true;
|
14014 |
-
continue;
|
14015 |
-
}
|
14016 |
-
var encodedCodePoints = percentEncode(codePoint, userinfoPercentEncodeSet);
|
14017 |
-
if (seenPasswordToken) url.password += encodedCodePoints;
|
14018 |
-
else url.username += encodedCodePoints;
|
14019 |
-
}
|
14020 |
-
buffer = '';
|
14021 |
-
} else if (
|
14022 |
-
char == EOF || char == '/' || char == '?' || char == '#' ||
|
14023 |
-
(char == '\\' && isSpecial(url))
|
14024 |
-
) {
|
14025 |
-
if (seenAt && buffer == '') return INVALID_AUTHORITY;
|
14026 |
-
pointer -= arrayFrom(buffer).length + 1;
|
14027 |
-
buffer = '';
|
14028 |
-
state = HOST;
|
14029 |
-
} else buffer += char;
|
14030 |
-
break;
|
14031 |
|
14032 |
-
|
14033 |
-
|
14034 |
-
|
14035 |
-
|
14036 |
-
|
14037 |
-
|
14038 |
-
|
14039 |
-
failure = parseHost(url, buffer);
|
14040 |
-
if (failure) return failure;
|
14041 |
-
buffer = '';
|
14042 |
-
state = PORT;
|
14043 |
-
if (stateOverride == HOSTNAME) return;
|
14044 |
-
} else if (
|
14045 |
-
char == EOF || char == '/' || char == '?' || char == '#' ||
|
14046 |
-
(char == '\\' && isSpecial(url))
|
14047 |
-
) {
|
14048 |
-
if (isSpecial(url) && buffer == '') return INVALID_HOST;
|
14049 |
-
if (stateOverride && buffer == '' && (includesCredentials(url) || url.port !== null)) return;
|
14050 |
-
failure = parseHost(url, buffer);
|
14051 |
-
if (failure) return failure;
|
14052 |
-
buffer = '';
|
14053 |
-
state = PATH_START;
|
14054 |
-
if (stateOverride) return;
|
14055 |
-
continue;
|
14056 |
-
} else {
|
14057 |
-
if (char == '[') seenBracket = true;
|
14058 |
-
else if (char == ']') seenBracket = false;
|
14059 |
-
buffer += char;
|
14060 |
-
} break;
|
14061 |
-
|
14062 |
-
case PORT:
|
14063 |
-
if (DIGIT.test(char)) {
|
14064 |
-
buffer += char;
|
14065 |
-
} else if (
|
14066 |
-
char == EOF || char == '/' || char == '?' || char == '#' ||
|
14067 |
-
(char == '\\' && isSpecial(url)) ||
|
14068 |
-
stateOverride
|
14069 |
-
) {
|
14070 |
-
if (buffer != '') {
|
14071 |
-
var port = parseInt(buffer, 10);
|
14072 |
-
if (port > 0xFFFF) return INVALID_PORT;
|
14073 |
-
url.port = (isSpecial(url) && port === specialSchemes[url.scheme]) ? null : port;
|
14074 |
-
buffer = '';
|
14075 |
-
}
|
14076 |
-
if (stateOverride) return;
|
14077 |
-
state = PATH_START;
|
14078 |
-
continue;
|
14079 |
-
} else return INVALID_PORT;
|
14080 |
-
break;
|
14081 |
|
14082 |
-
|
14083 |
-
|
14084 |
-
|
14085 |
-
|
14086 |
-
|
14087 |
-
|
14088 |
-
url.path = base.path.slice();
|
14089 |
-
url.query = base.query;
|
14090 |
-
} else if (char == '?') {
|
14091 |
-
url.host = base.host;
|
14092 |
-
url.path = base.path.slice();
|
14093 |
-
url.query = '';
|
14094 |
-
state = QUERY;
|
14095 |
-
} else if (char == '#') {
|
14096 |
-
url.host = base.host;
|
14097 |
-
url.path = base.path.slice();
|
14098 |
-
url.query = base.query;
|
14099 |
-
url.fragment = '';
|
14100 |
-
state = FRAGMENT;
|
14101 |
-
} else {
|
14102 |
-
if (!startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {
|
14103 |
-
url.host = base.host;
|
14104 |
-
url.path = base.path.slice();
|
14105 |
-
shortenURLsPath(url);
|
14106 |
-
}
|
14107 |
-
state = PATH;
|
14108 |
-
continue;
|
14109 |
-
}
|
14110 |
-
} else {
|
14111 |
-
state = PATH;
|
14112 |
-
continue;
|
14113 |
-
} break;
|
14114 |
|
14115 |
-
|
14116 |
-
|
14117 |
-
|
14118 |
-
|
14119 |
-
|
14120 |
-
|
14121 |
-
|
14122 |
-
|
14123 |
-
|
14124 |
-
|
14125 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14126 |
|
14127 |
-
|
14128 |
-
|
14129 |
-
|
14130 |
-
|
14131 |
-
|
14132 |
-
|
14133 |
-
|
14134 |
-
|
14135 |
-
|
14136 |
-
failure = parseHost(url, buffer);
|
14137 |
-
if (failure) return failure;
|
14138 |
-
if (url.host == 'localhost') url.host = '';
|
14139 |
-
if (stateOverride) return;
|
14140 |
-
buffer = '';
|
14141 |
-
state = PATH_START;
|
14142 |
-
} continue;
|
14143 |
-
} else buffer += char;
|
14144 |
-
break;
|
14145 |
|
14146 |
-
|
14147 |
-
|
14148 |
-
|
14149 |
-
|
14150 |
-
|
14151 |
-
|
14152 |
-
|
14153 |
-
|
14154 |
-
url.fragment = '';
|
14155 |
-
state = FRAGMENT;
|
14156 |
-
} else if (char != EOF) {
|
14157 |
-
state = PATH;
|
14158 |
-
if (char != '/') continue;
|
14159 |
-
} break;
|
14160 |
-
|
14161 |
-
case PATH:
|
14162 |
-
if (
|
14163 |
-
char == EOF || char == '/' ||
|
14164 |
-
(char == '\\' && isSpecial(url)) ||
|
14165 |
-
(!stateOverride && (char == '?' || char == '#'))
|
14166 |
-
) {
|
14167 |
-
if (isDoubleDot(buffer)) {
|
14168 |
-
shortenURLsPath(url);
|
14169 |
-
if (char != '/' && !(char == '\\' && isSpecial(url))) {
|
14170 |
-
url.path.push('');
|
14171 |
-
}
|
14172 |
-
} else if (isSingleDot(buffer)) {
|
14173 |
-
if (char != '/' && !(char == '\\' && isSpecial(url))) {
|
14174 |
-
url.path.push('');
|
14175 |
-
}
|
14176 |
-
} else {
|
14177 |
-
if (url.scheme == 'file' && !url.path.length && isWindowsDriveLetter(buffer)) {
|
14178 |
-
if (url.host) url.host = '';
|
14179 |
-
buffer = buffer.charAt(0) + ':'; // normalize windows drive letter
|
14180 |
-
}
|
14181 |
-
url.path.push(buffer);
|
14182 |
-
}
|
14183 |
-
buffer = '';
|
14184 |
-
if (url.scheme == 'file' && (char == EOF || char == '?' || char == '#')) {
|
14185 |
-
while (url.path.length > 1 && url.path[0] === '') {
|
14186 |
-
url.path.shift();
|
14187 |
-
}
|
14188 |
-
}
|
14189 |
-
if (char == '?') {
|
14190 |
-
url.query = '';
|
14191 |
-
state = QUERY;
|
14192 |
-
} else if (char == '#') {
|
14193 |
-
url.fragment = '';
|
14194 |
-
state = FRAGMENT;
|
14195 |
-
}
|
14196 |
-
} else {
|
14197 |
-
buffer += percentEncode(char, pathPercentEncodeSet);
|
14198 |
-
} break;
|
14199 |
-
|
14200 |
-
case CANNOT_BE_A_BASE_URL_PATH:
|
14201 |
-
if (char == '?') {
|
14202 |
-
url.query = '';
|
14203 |
-
state = QUERY;
|
14204 |
-
} else if (char == '#') {
|
14205 |
-
url.fragment = '';
|
14206 |
-
state = FRAGMENT;
|
14207 |
-
} else if (char != EOF) {
|
14208 |
-
url.path[0] += percentEncode(char, C0ControlPercentEncodeSet);
|
14209 |
-
} break;
|
14210 |
-
|
14211 |
-
case QUERY:
|
14212 |
-
if (!stateOverride && char == '#') {
|
14213 |
-
url.fragment = '';
|
14214 |
-
state = FRAGMENT;
|
14215 |
-
} else if (char != EOF) {
|
14216 |
-
if (char == "'" && isSpecial(url)) url.query += '%27';
|
14217 |
-
else if (char == '#') url.query += '%23';
|
14218 |
-
else url.query += percentEncode(char, C0ControlPercentEncodeSet);
|
14219 |
-
} break;
|
14220 |
-
|
14221 |
-
case FRAGMENT:
|
14222 |
-
if (char != EOF) url.fragment += percentEncode(char, fragmentPercentEncodeSet);
|
14223 |
-
break;
|
14224 |
}
|
|
|
|
|
|
|
14225 |
|
14226 |
-
|
14227 |
-
|
14228 |
-
|
|
|
|
|
|
|
|
|
14229 |
|
14230 |
-
|
14231 |
-
|
14232 |
-
var
|
14233 |
-
|
14234 |
-
|
14235 |
-
|
14236 |
-
|
14237 |
-
|
14238 |
-
|
14239 |
-
|
14240 |
-
|
14241 |
-
|
14242 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14243 |
}
|
14244 |
-
|
14245 |
-
|
14246 |
-
|
14247 |
-
|
14248 |
-
|
14249 |
-
|
14250 |
-
|
14251 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14252 |
};
|
14253 |
-
|
14254 |
-
that.href = serializeURL.call(that);
|
14255 |
-
that.origin = getOrigin.call(that);
|
14256 |
-
that.protocol = getProtocol.call(that);
|
14257 |
-
that.username = getUsername.call(that);
|
14258 |
-
that.password = getPassword.call(that);
|
14259 |
-
that.host = getHost.call(that);
|
14260 |
-
that.hostname = getHostname.call(that);
|
14261 |
-
that.port = getPort.call(that);
|
14262 |
-
that.pathname = getPathname.call(that);
|
14263 |
-
that.search = getSearch.call(that);
|
14264 |
-
that.searchParams = getSearchParams.call(that);
|
14265 |
-
that.hash = getHash.call(that);
|
14266 |
-
}
|
14267 |
-
};
|
14268 |
|
14269 |
-
|
14270 |
-
|
14271 |
-
|
14272 |
-
|
14273 |
-
|
14274 |
-
var username = url.username;
|
14275 |
-
var password = url.password;
|
14276 |
-
var host = url.host;
|
14277 |
-
var port = url.port;
|
14278 |
-
var path = url.path;
|
14279 |
-
var query = url.query;
|
14280 |
-
var fragment = url.fragment;
|
14281 |
-
var output = scheme + ':';
|
14282 |
-
if (host !== null) {
|
14283 |
-
output += '//';
|
14284 |
-
if (includesCredentials(url)) {
|
14285 |
-
output += username + (password ? ':' + password : '') + '@';
|
14286 |
-
}
|
14287 |
-
output += serializeHost(host);
|
14288 |
-
if (port !== null) output += ':' + port;
|
14289 |
-
} else if (scheme == 'file') output += '//';
|
14290 |
-
output += url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';
|
14291 |
-
if (query !== null) output += '?' + query;
|
14292 |
-
if (fragment !== null) output += '#' + fragment;
|
14293 |
-
return output;
|
14294 |
-
};
|
14295 |
|
14296 |
-
var
|
14297 |
-
|
14298 |
-
|
14299 |
-
|
14300 |
-
if (scheme == 'blob') try {
|
14301 |
-
return new URL(scheme.path[0]).origin;
|
14302 |
-
} catch (error) {
|
14303 |
-
return 'null';
|
14304 |
-
}
|
14305 |
-
if (scheme == 'file' || !isSpecial(url)) return 'null';
|
14306 |
-
return scheme + '://' + serializeHost(url.host) + (port !== null ? ':' + port : '');
|
14307 |
-
};
|
14308 |
|
14309 |
-
|
14310 |
-
|
14311 |
-
|
|
|
|
|
|
|
14312 |
|
14313 |
-
|
14314 |
-
|
14315 |
-
};
|
14316 |
|
14317 |
-
|
14318 |
-
|
14319 |
-
|
|
|
14320 |
|
14321 |
-
|
14322 |
-
|
14323 |
-
|
14324 |
-
|
14325 |
-
return host === null ? ''
|
14326 |
-
: port === null ? serializeHost(host)
|
14327 |
-
: serializeHost(host) + ':' + port;
|
14328 |
-
};
|
14329 |
|
14330 |
-
|
14331 |
-
|
14332 |
-
|
14333 |
-
}
|
14334 |
|
14335 |
-
|
14336 |
-
|
14337 |
-
return port === null ? '' : String(port);
|
14338 |
-
};
|
14339 |
|
14340 |
-
|
14341 |
-
|
14342 |
-
|
14343 |
-
|
14344 |
-
|
|
|
|
|
|
|
|
|
14345 |
|
14346 |
-
|
14347 |
-
|
14348 |
-
|
14349 |
-
|
14350 |
|
14351 |
-
|
14352 |
-
|
14353 |
-
|
|
|
|
|
14354 |
|
14355 |
-
|
14356 |
-
var fragment = getInternalURLState(this).fragment;
|
14357 |
-
return fragment ? '#' + fragment : '';
|
14358 |
-
};
|
14359 |
|
14360 |
-
|
14361 |
-
|
14362 |
-
}
|
14363 |
|
14364 |
-
|
14365 |
-
|
14366 |
-
|
14367 |
-
|
14368 |
-
|
14369 |
-
|
14370 |
-
|
14371 |
-
|
14372 |
-
|
14373 |
-
|
14374 |
-
|
14375 |
-
|
14376 |
-
|
14377 |
-
|
14378 |
-
|
14379 |
-
|
14380 |
-
|
14381 |
-
|
14382 |
-
|
14383 |
-
|
14384 |
-
|
14385 |
-
|
14386 |
-
|
14387 |
-
|
14388 |
-
|
14389 |
-
|
14390 |
-
url.username = '';
|
14391 |
-
for (var i = 0; i < codePoints.length; i++) {
|
14392 |
-
url.username += percentEncode(codePoints[i], userinfoPercentEncodeSet);
|
14393 |
-
}
|
14394 |
-
}),
|
14395 |
-
// `URL.prototype.password` accessors pair
|
14396 |
-
// https://url.spec.whatwg.org/#dom-url-password
|
14397 |
-
password: accessorDescriptor(getPassword, function (password) {
|
14398 |
-
var url = getInternalURLState(this);
|
14399 |
-
var codePoints = arrayFrom(String(password));
|
14400 |
-
if (cannotHaveUsernamePasswordPort(url)) return;
|
14401 |
-
url.password = '';
|
14402 |
-
for (var i = 0; i < codePoints.length; i++) {
|
14403 |
-
url.password += percentEncode(codePoints[i], userinfoPercentEncodeSet);
|
14404 |
-
}
|
14405 |
-
}),
|
14406 |
-
// `URL.prototype.host` accessors pair
|
14407 |
-
// https://url.spec.whatwg.org/#dom-url-host
|
14408 |
-
host: accessorDescriptor(getHost, function (host) {
|
14409 |
-
var url = getInternalURLState(this);
|
14410 |
-
if (url.cannotBeABaseURL) return;
|
14411 |
-
parseURL(url, String(host), HOST);
|
14412 |
-
}),
|
14413 |
-
// `URL.prototype.hostname` accessors pair
|
14414 |
-
// https://url.spec.whatwg.org/#dom-url-hostname
|
14415 |
-
hostname: accessorDescriptor(getHostname, function (hostname) {
|
14416 |
-
var url = getInternalURLState(this);
|
14417 |
-
if (url.cannotBeABaseURL) return;
|
14418 |
-
parseURL(url, String(hostname), HOSTNAME);
|
14419 |
-
}),
|
14420 |
-
// `URL.prototype.port` accessors pair
|
14421 |
-
// https://url.spec.whatwg.org/#dom-url-port
|
14422 |
-
port: accessorDescriptor(getPort, function (port) {
|
14423 |
-
var url = getInternalURLState(this);
|
14424 |
-
if (cannotHaveUsernamePasswordPort(url)) return;
|
14425 |
-
port = String(port);
|
14426 |
-
if (port == '') url.port = null;
|
14427 |
-
else parseURL(url, port, PORT);
|
14428 |
-
}),
|
14429 |
-
// `URL.prototype.pathname` accessors pair
|
14430 |
-
// https://url.spec.whatwg.org/#dom-url-pathname
|
14431 |
-
pathname: accessorDescriptor(getPathname, function (pathname) {
|
14432 |
-
var url = getInternalURLState(this);
|
14433 |
-
if (url.cannotBeABaseURL) return;
|
14434 |
-
url.path = [];
|
14435 |
-
parseURL(url, pathname + '', PATH_START);
|
14436 |
-
}),
|
14437 |
-
// `URL.prototype.search` accessors pair
|
14438 |
-
// https://url.spec.whatwg.org/#dom-url-search
|
14439 |
-
search: accessorDescriptor(getSearch, function (search) {
|
14440 |
-
var url = getInternalURLState(this);
|
14441 |
-
search = String(search);
|
14442 |
-
if (search == '') {
|
14443 |
-
url.query = null;
|
14444 |
-
} else {
|
14445 |
-
if ('?' == search.charAt(0)) search = search.slice(1);
|
14446 |
-
url.query = '';
|
14447 |
-
parseURL(url, search, QUERY);
|
14448 |
-
}
|
14449 |
-
getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);
|
14450 |
-
}),
|
14451 |
-
// `URL.prototype.searchParams` getter
|
14452 |
-
// https://url.spec.whatwg.org/#dom-url-searchparams
|
14453 |
-
searchParams: accessorDescriptor(getSearchParams),
|
14454 |
-
// `URL.prototype.hash` accessors pair
|
14455 |
-
// https://url.spec.whatwg.org/#dom-url-hash
|
14456 |
-
hash: accessorDescriptor(getHash, function (hash) {
|
14457 |
-
var url = getInternalURLState(this);
|
14458 |
-
hash = String(hash);
|
14459 |
-
if (hash == '') {
|
14460 |
-
url.fragment = null;
|
14461 |
-
return;
|
14462 |
}
|
14463 |
-
|
14464 |
-
|
14465 |
-
parseURL(url, hash, FRAGMENT);
|
14466 |
-
})
|
14467 |
-
});
|
14468 |
-
}
|
14469 |
|
14470 |
-
//
|
14471 |
-
//
|
14472 |
-
|
14473 |
-
|
14474 |
-
|
14475 |
-
|
14476 |
-
|
14477 |
-
//
|
14478 |
-
|
14479 |
-
|
14480 |
-
|
14481 |
-
|
14482 |
-
|
14483 |
-
|
14484 |
-
|
14485 |
-
|
14486 |
-
|
14487 |
-
|
14488 |
-
|
14489 |
-
|
14490 |
-
|
14491 |
-
|
14492 |
-
|
14493 |
-
|
14494 |
-
|
14495 |
-
|
14496 |
-
});
|
14497 |
-
}
|
14498 |
|
14499 |
-
|
|
|
|
|
|
|
14500 |
|
14501 |
-
|
14502 |
-
|
14503 |
-
});
|
14504 |
|
|
|
14505 |
|
14506 |
-
|
14507 |
-
|
14508 |
-
|
14509 |
-
|
14510 |
-
|
14511 |
-
|
14512 |
-
/* 293 */
|
14513 |
-
/***/ (function(module, exports) {
|
14514 |
|
14515 |
-
|
14516 |
|
14517 |
-
|
14518 |
-
|
14519 |
-
|
|
|
|
|
|
|
14520 |
|
14521 |
-
|
|
|
|
|
|
|
14522 |
|
14523 |
-
//
|
14524 |
-
|
14525 |
-
|
14526 |
-
|
14527 |
-
|
14528 |
-
|
14529 |
-
|
14530 |
-
|
14531 |
-
|
14532 |
-
|
14533 |
-
|
14534 |
-
|
14535 |
-
var OVERFLOW_ERROR = 'Overflow: input needs wider integers to process';
|
14536 |
-
var baseMinusTMin = base - tMin;
|
14537 |
-
var floor = Math.floor;
|
14538 |
-
var stringFromCharCode = String.fromCharCode;
|
14539 |
-
|
14540 |
-
/**
|
14541 |
-
* Creates an array containing the numeric code points of each Unicode
|
14542 |
-
* character in the string. While JavaScript uses UCS-2 internally,
|
14543 |
-
* this function will convert a pair of surrogate halves (each of which
|
14544 |
-
* UCS-2 exposes as separate characters) into a single code point,
|
14545 |
-
* matching UTF-16.
|
14546 |
-
*/
|
14547 |
-
var ucs2decode = function (string) {
|
14548 |
-
var output = [];
|
14549 |
-
var counter = 0;
|
14550 |
-
var length = string.length;
|
14551 |
-
while (counter < length) {
|
14552 |
-
var value = string.charCodeAt(counter++);
|
14553 |
-
if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
|
14554 |
-
// It's a high surrogate, and there is a next character.
|
14555 |
-
var extra = string.charCodeAt(counter++);
|
14556 |
-
if ((extra & 0xFC00) == 0xDC00) { // Low surrogate.
|
14557 |
-
output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
|
14558 |
-
} else {
|
14559 |
-
// It's an unmatched surrogate; only append this code unit, in case the
|
14560 |
-
// next code unit is the high surrogate of a surrogate pair.
|
14561 |
-
output.push(value);
|
14562 |
-
counter--;
|
14563 |
}
|
|
|
14564 |
} else {
|
14565 |
-
|
|
|
14566 |
}
|
|
|
|
|
|
|
|
|
|
|
14567 |
}
|
14568 |
-
return output;
|
14569 |
-
};
|
14570 |
|
14571 |
-
|
14572 |
-
|
14573 |
-
|
14574 |
-
var digitToBasic = function (digit) {
|
14575 |
-
// 0..25 map to ASCII a..z or A..Z
|
14576 |
-
// 26..35 map to ASCII 0..9
|
14577 |
-
return digit + 22 + 75 * (digit < 26);
|
14578 |
-
};
|
14579 |
|
14580 |
-
|
14581 |
-
* Bias adaptation function as per section 3.4 of RFC 3492.
|
14582 |
-
* https://tools.ietf.org/html/rfc3492#section-3.4
|
14583 |
-
*/
|
14584 |
-
var adapt = function (delta, numPoints, firstTime) {
|
14585 |
-
var k = 0;
|
14586 |
-
delta = firstTime ? floor(delta / damp) : delta >> 1;
|
14587 |
-
delta += floor(delta / numPoints);
|
14588 |
-
for (; delta > baseMinusTMin * tMax >> 1; k += base) {
|
14589 |
-
delta = floor(delta / baseMinusTMin);
|
14590 |
-
}
|
14591 |
-
return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
|
14592 |
-
};
|
14593 |
|
14594 |
-
|
14595 |
-
|
14596 |
-
|
14597 |
-
|
14598 |
-
//
|
14599 |
-
|
14600 |
-
|
|
|
14601 |
|
14602 |
-
|
14603 |
-
|
|
|
14604 |
|
14605 |
-
|
14606 |
-
|
14607 |
|
14608 |
-
|
14609 |
-
|
14610 |
-
|
14611 |
-
var bias = initialBias;
|
14612 |
-
var i, currentValue;
|
14613 |
|
14614 |
-
|
14615 |
-
|
14616 |
-
|
14617 |
-
if (currentValue < 0x80) {
|
14618 |
-
output.push(stringFromCharCode(currentValue));
|
14619 |
}
|
|
|
|
|
14620 |
}
|
14621 |
|
14622 |
-
|
14623 |
-
|
|
|
|
|
|
|
|
|
14624 |
|
14625 |
-
|
14626 |
-
|
14627 |
-
|
|
|
|
|
|
|
|
|
14628 |
}
|
14629 |
|
14630 |
-
|
14631 |
-
|
14632 |
-
|
14633 |
-
|
14634 |
-
|
14635 |
-
|
14636 |
-
|
14637 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14638 |
}
|
14639 |
-
}
|
14640 |
|
14641 |
-
|
14642 |
-
|
14643 |
-
|
14644 |
-
|
14645 |
-
|
|
|
|
|
14646 |
|
14647 |
-
|
14648 |
-
|
|
|
|
|
|
|
|
|
14649 |
|
14650 |
-
|
14651 |
-
|
14652 |
-
if (currentValue < n && ++delta > maxInt) {
|
14653 |
-
throw RangeError(OVERFLOW_ERROR);
|
14654 |
}
|
14655 |
-
if (currentValue == n) {
|
14656 |
-
// Represent delta as a generalized variable-length integer.
|
14657 |
-
var q = delta;
|
14658 |
-
for (var k = base; /* no condition */; k += base) {
|
14659 |
-
var t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
|
14660 |
-
if (q < t) break;
|
14661 |
-
var qMinusT = q - t;
|
14662 |
-
var baseMinusT = base - t;
|
14663 |
-
output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT)));
|
14664 |
-
q = floor(qMinusT / baseMinusT);
|
14665 |
-
}
|
14666 |
|
14667 |
-
|
14668 |
-
|
14669 |
-
|
14670 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14671 |
}
|
14672 |
}
|
14673 |
|
14674 |
-
|
14675 |
-
|
14676 |
}
|
14677 |
-
|
14678 |
-
};
|
14679 |
|
14680 |
-
|
14681 |
-
|
14682 |
-
var labels = input.toLowerCase().replace(regexSeparators, '\u002E').split('.');
|
14683 |
-
var i, label;
|
14684 |
-
for (i = 0; i < labels.length; i++) {
|
14685 |
-
label = labels[i];
|
14686 |
-
encoded.push(regexNonASCII.test(label) ? 'xn--' + encode(label) : label);
|
14687 |
}
|
14688 |
-
return encoded.join('.');
|
14689 |
-
};
|
14690 |
|
|
|
|
|
14691 |
|
14692 |
-
|
14693 |
-
|
14694 |
-
|
|
|
|
|
|
|
|
|
|
|
14695 |
|
14696 |
-
|
|
|
14697 |
|
14698 |
-
|
14699 |
-
__webpack_require__(123);
|
14700 |
-
var $ = __webpack_require__(12);
|
14701 |
-
var getBuiltIn = __webpack_require__(31);
|
14702 |
-
var USE_NATIVE_URL = __webpack_require__(254);
|
14703 |
-
var redefine = __webpack_require__(27);
|
14704 |
-
var redefineAll = __webpack_require__(152);
|
14705 |
-
var setToStringTag = __webpack_require__(90);
|
14706 |
-
var createIteratorConstructor = __webpack_require__(199);
|
14707 |
-
var InternalStateModule = __webpack_require__(45);
|
14708 |
-
var anInstance = __webpack_require__(136);
|
14709 |
-
var hasOwn = __webpack_require__(11);
|
14710 |
-
var bind = __webpack_require__(94);
|
14711 |
-
var classof = __webpack_require__(113);
|
14712 |
-
var anObject = __webpack_require__(9);
|
14713 |
-
var isObject = __webpack_require__(10);
|
14714 |
-
var create = __webpack_require__(69);
|
14715 |
-
var createPropertyDescriptor = __webpack_require__(39);
|
14716 |
-
var getIterator = __webpack_require__(296);
|
14717 |
-
var getIteratorMethod = __webpack_require__(155);
|
14718 |
-
var wellKnownSymbol = __webpack_require__(8);
|
14719 |
-
|
14720 |
-
var $fetch = getBuiltIn('fetch');
|
14721 |
-
var Headers = getBuiltIn('Headers');
|
14722 |
-
var ITERATOR = wellKnownSymbol('iterator');
|
14723 |
-
var URL_SEARCH_PARAMS = 'URLSearchParams';
|
14724 |
-
var URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator';
|
14725 |
-
var setInternalState = InternalStateModule.set;
|
14726 |
-
var getInternalParamsState = InternalStateModule.getterFor(URL_SEARCH_PARAMS);
|
14727 |
-
var getInternalIteratorState = InternalStateModule.getterFor(URL_SEARCH_PARAMS_ITERATOR);
|
14728 |
-
|
14729 |
-
var plus = /\+/g;
|
14730 |
-
var sequences = Array(4);
|
14731 |
-
|
14732 |
-
var percentSequence = function (bytes) {
|
14733 |
-
return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp('((?:%[\\da-f]{2}){' + bytes + '})', 'gi'));
|
14734 |
-
};
|
14735 |
|
14736 |
-
|
14737 |
-
|
14738 |
-
|
14739 |
-
|
14740 |
-
|
14741 |
-
|
14742 |
-
|
|
|
|
|
|
|
|
|
14743 |
|
14744 |
-
|
14745 |
-
|
14746 |
-
var bytes = 4;
|
14747 |
-
try {
|
14748 |
-
return decodeURIComponent(result);
|
14749 |
-
} catch (error) {
|
14750 |
-
while (bytes) {
|
14751 |
-
result = result.replace(percentSequence(bytes--), percentDecode);
|
14752 |
-
}
|
14753 |
-
return result;
|
14754 |
-
}
|
14755 |
-
};
|
14756 |
|
14757 |
-
var
|
|
|
|
|
|
|
|
|
14758 |
|
14759 |
-
|
14760 |
-
|
14761 |
-
"'": '%27',
|
14762 |
-
'(': '%28',
|
14763 |
-
')': '%29',
|
14764 |
-
'~': '%7E',
|
14765 |
-
'%20': '+'
|
14766 |
-
};
|
14767 |
|
14768 |
-
|
14769 |
-
|
14770 |
-
|
|
|
14771 |
|
14772 |
-
var
|
14773 |
-
|
14774 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14775 |
|
14776 |
-
|
14777 |
-
if (query) {
|
14778 |
-
var attributes = query.split('&');
|
14779 |
-
var index = 0;
|
14780 |
-
var attribute, entry;
|
14781 |
-
while (index < attributes.length) {
|
14782 |
-
attribute = attributes[index++];
|
14783 |
-
if (attribute.length) {
|
14784 |
-
entry = attribute.split('=');
|
14785 |
-
result.push({
|
14786 |
-
key: deserialize(entry.shift()),
|
14787 |
-
value: deserialize(entry.join('='))
|
14788 |
-
});
|
14789 |
}
|
14790 |
-
}
|
14791 |
-
}
|
14792 |
-
};
|
14793 |
|
14794 |
-
var
|
14795 |
-
|
14796 |
-
|
14797 |
-
};
|
14798 |
|
14799 |
-
|
14800 |
-
|
14801 |
-
|
|
|
|
|
|
|
14802 |
|
14803 |
-
|
14804 |
-
|
14805 |
-
|
14806 |
-
iterator: getIterator(getInternalParamsState(params).entries),
|
14807 |
-
kind: kind
|
14808 |
-
});
|
14809 |
-
}, 'Iterator', function next() {
|
14810 |
-
var state = getInternalIteratorState(this);
|
14811 |
-
var kind = state.kind;
|
14812 |
-
var step = state.iterator.next();
|
14813 |
-
var entry = step.value;
|
14814 |
-
if (!step.done) {
|
14815 |
-
step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value];
|
14816 |
-
} return step;
|
14817 |
-
});
|
14818 |
|
14819 |
-
|
14820 |
-
|
14821 |
-
|
14822 |
-
|
14823 |
-
|
14824 |
-
|
14825 |
-
|
14826 |
-
|
14827 |
-
|
14828 |
-
|
14829 |
-
|
14830 |
-
|
14831 |
-
|
14832 |
-
|
14833 |
-
|
|
|
14834 |
|
14835 |
-
|
14836 |
-
|
14837 |
-
|
14838 |
-
if (typeof iteratorMethod === 'function') {
|
14839 |
-
iterator = iteratorMethod.call(init);
|
14840 |
-
next = iterator.next;
|
14841 |
-
while (!(step = next.call(iterator)).done) {
|
14842 |
-
entryIterator = getIterator(anObject(step.value));
|
14843 |
-
entryNext = entryIterator.next;
|
14844 |
-
if (
|
14845 |
-
(first = entryNext.call(entryIterator)).done ||
|
14846 |
-
(second = entryNext.call(entryIterator)).done ||
|
14847 |
-
!entryNext.call(entryIterator).done
|
14848 |
-
) throw TypeError('Expected sequence with length 2');
|
14849 |
-
entries.push({ key: first.value + '', value: second.value + '' });
|
14850 |
}
|
14851 |
-
}
|
14852 |
-
}
|
14853 |
-
parseSearchParams(entries, typeof init === 'string' ? init.charAt(0) === '?' ? init.slice(1) : init : init + '');
|
14854 |
-
}
|
14855 |
-
}
|
14856 |
-
};
|
14857 |
|
14858 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14859 |
|
14860 |
-
|
14861 |
-
|
14862 |
-
|
14863 |
-
|
14864 |
-
|
14865 |
-
|
14866 |
-
|
14867 |
-
|
14868 |
-
},
|
14869 |
-
// `URLSearchParams.prototype.delete` method
|
14870 |
-
// https://url.spec.whatwg.org/#dom-urlsearchparams-delete
|
14871 |
-
'delete': function (name) {
|
14872 |
-
validateArgumentsLength(arguments.length, 1);
|
14873 |
-
var state = getInternalParamsState(this);
|
14874 |
-
var entries = state.entries;
|
14875 |
-
var key = name + '';
|
14876 |
-
var index = 0;
|
14877 |
-
while (index < entries.length) {
|
14878 |
-
if (entries[index].key === key) entries.splice(index, 1);
|
14879 |
-
else index++;
|
14880 |
-
}
|
14881 |
-
state.updateURL();
|
14882 |
-
},
|
14883 |
-
// `URLSearchParams.prototype.get` method
|
14884 |
-
// https://url.spec.whatwg.org/#dom-urlsearchparams-get
|
14885 |
-
get: function get(name) {
|
14886 |
-
validateArgumentsLength(arguments.length, 1);
|
14887 |
-
var entries = getInternalParamsState(this).entries;
|
14888 |
-
var key = name + '';
|
14889 |
-
var index = 0;
|
14890 |
-
for (; index < entries.length; index++) {
|
14891 |
-
if (entries[index].key === key) return entries[index].value;
|
14892 |
-
}
|
14893 |
-
return null;
|
14894 |
-
},
|
14895 |
-
// `URLSearchParams.prototype.getAll` method
|
14896 |
-
// https://url.spec.whatwg.org/#dom-urlsearchparams-getall
|
14897 |
-
getAll: function getAll(name) {
|
14898 |
-
validateArgumentsLength(arguments.length, 1);
|
14899 |
-
var entries = getInternalParamsState(this).entries;
|
14900 |
-
var key = name + '';
|
14901 |
-
var result = [];
|
14902 |
-
var index = 0;
|
14903 |
-
for (; index < entries.length; index++) {
|
14904 |
-
if (entries[index].key === key) result.push(entries[index].value);
|
14905 |
-
}
|
14906 |
-
return result;
|
14907 |
-
},
|
14908 |
-
// `URLSearchParams.prototype.has` method
|
14909 |
-
// https://url.spec.whatwg.org/#dom-urlsearchparams-has
|
14910 |
-
has: function has(name) {
|
14911 |
-
validateArgumentsLength(arguments.length, 1);
|
14912 |
-
var entries = getInternalParamsState(this).entries;
|
14913 |
-
var key = name + '';
|
14914 |
-
var index = 0;
|
14915 |
-
while (index < entries.length) {
|
14916 |
-
if (entries[index++].key === key) return true;
|
14917 |
-
}
|
14918 |
-
return false;
|
14919 |
-
},
|
14920 |
-
// `URLSearchParams.prototype.set` method
|
14921 |
-
// https://url.spec.whatwg.org/#dom-urlsearchparams-set
|
14922 |
-
set: function set(name, value) {
|
14923 |
-
validateArgumentsLength(arguments.length, 1);
|
14924 |
-
var state = getInternalParamsState(this);
|
14925 |
-
var entries = state.entries;
|
14926 |
-
var found = false;
|
14927 |
-
var key = name + '';
|
14928 |
-
var val = value + '';
|
14929 |
-
var index = 0;
|
14930 |
-
var entry;
|
14931 |
-
for (; index < entries.length; index++) {
|
14932 |
-
entry = entries[index];
|
14933 |
-
if (entry.key === key) {
|
14934 |
-
if (found) entries.splice(index--, 1);
|
14935 |
-
else {
|
14936 |
-
found = true;
|
14937 |
-
entry.value = val;
|
14938 |
-
}
|
14939 |
}
|
14940 |
-
|
14941 |
-
|
14942 |
-
|
14943 |
-
|
14944 |
-
|
14945 |
-
|
14946 |
-
|
14947 |
-
|
14948 |
-
|
14949 |
-
// Array#sort is not stable in some engines
|
14950 |
-
var slice = entries.slice();
|
14951 |
-
var entry, entriesIndex, sliceIndex;
|
14952 |
-
entries.length = 0;
|
14953 |
-
for (sliceIndex = 0; sliceIndex < slice.length; sliceIndex++) {
|
14954 |
-
entry = slice[sliceIndex];
|
14955 |
-
for (entriesIndex = 0; entriesIndex < sliceIndex; entriesIndex++) {
|
14956 |
-
if (entries[entriesIndex].key > entry.key) {
|
14957 |
-
entries.splice(entriesIndex, 0, entry);
|
14958 |
-
break;
|
14959 |
-
}
|
14960 |
}
|
14961 |
-
if (entriesIndex === sliceIndex) entries.push(entry);
|
14962 |
-
}
|
14963 |
-
state.updateURL();
|
14964 |
-
},
|
14965 |
-
// `URLSearchParams.prototype.forEach` method
|
14966 |
-
forEach: function forEach(callback /* , thisArg */) {
|
14967 |
-
var entries = getInternalParamsState(this).entries;
|
14968 |
-
var boundFunction = bind(callback, arguments.length > 1 ? arguments[1] : undefined, 3);
|
14969 |
-
var index = 0;
|
14970 |
-
var entry;
|
14971 |
-
while (index < entries.length) {
|
14972 |
-
entry = entries[index++];
|
14973 |
-
boundFunction(entry.value, entry.key, this);
|
14974 |
-
}
|
14975 |
-
},
|
14976 |
-
// `URLSearchParams.prototype.keys` method
|
14977 |
-
keys: function keys() {
|
14978 |
-
return new URLSearchParamsIterator(this, 'keys');
|
14979 |
-
},
|
14980 |
-
// `URLSearchParams.prototype.values` method
|
14981 |
-
values: function values() {
|
14982 |
-
return new URLSearchParamsIterator(this, 'values');
|
14983 |
-
},
|
14984 |
-
// `URLSearchParams.prototype.entries` method
|
14985 |
-
entries: function entries() {
|
14986 |
-
return new URLSearchParamsIterator(this, 'entries');
|
14987 |
-
}
|
14988 |
-
}, { enumerable: true });
|
14989 |
|
14990 |
-
|
14991 |
-
|
14992 |
|
14993 |
-
|
14994 |
-
|
14995 |
-
|
14996 |
-
|
14997 |
-
var result = [];
|
14998 |
-
var index = 0;
|
14999 |
-
var entry;
|
15000 |
-
while (index < entries.length) {
|
15001 |
-
entry = entries[index++];
|
15002 |
-
result.push(serialize(entry.key) + '=' + serialize(entry.value));
|
15003 |
-
} return result.join('&');
|
15004 |
-
}, { enumerable: true });
|
15005 |
|
15006 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15007 |
|
15008 |
-
|
15009 |
-
|
15010 |
-
});
|
15011 |
|
15012 |
-
|
15013 |
-
|
15014 |
-
|
15015 |
-
|
15016 |
-
|
15017 |
-
|
15018 |
-
|
15019 |
-
|
15020 |
-
|
15021 |
-
|
15022 |
-
|
15023 |
-
|
15024 |
-
|
15025 |
-
|
15026 |
-
|
15027 |
-
|
15028 |
-
|
15029 |
-
|
15030 |
-
|
15031 |
-
});
|
15032 |
}
|
|
|
15033 |
}
|
15034 |
-
|
15035 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15036 |
}
|
15037 |
-
}
|
15038 |
-
}
|
15039 |
|
15040 |
-
|
15041 |
-
|
15042 |
-
|
15043 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15044 |
|
15045 |
|
15046 |
/***/ }),
|
15047 |
-
|
|
|
15048 |
/***/ (function(module, exports, __webpack_require__) {
|
15049 |
|
15050 |
-
|
15051 |
-
var getIteratorMethod = __webpack_require__(155);
|
15052 |
|
15053 |
-
|
15054 |
-
|
15055 |
-
|
15056 |
-
|
15057 |
-
} return anObject(iteratorMethod.call(it));
|
15058 |
-
};
|
15059 |
|
|
|
15060 |
|
15061 |
/***/ }),
|
15062 |
-
/* 297 */
|
15063 |
-
/***/ (function(module, exports) {
|
15064 |
|
15065 |
-
|
15066 |
-
|
15067 |
|
15068 |
-
//
|
15069 |
-
// don't break things. But we need to wrap it in a try catch in case it is
|
15070 |
-
// wrapped in strict mode code which doesn't define any globals. It's inside a
|
15071 |
-
// function because try/catches deoptimize in certain engines.
|
15072 |
|
15073 |
-
|
15074 |
-
var cachedClearTimeout;
|
15075 |
|
15076 |
-
|
15077 |
-
|
15078 |
-
}
|
15079 |
-
function defaultClearTimeout () {
|
15080 |
-
throw new Error('clearTimeout has not been defined');
|
15081 |
-
}
|
15082 |
-
(function () {
|
15083 |
-
try {
|
15084 |
-
if (typeof setTimeout === 'function') {
|
15085 |
-
cachedSetTimeout = setTimeout;
|
15086 |
-
} else {
|
15087 |
-
cachedSetTimeout = defaultSetTimout;
|
15088 |
-
}
|
15089 |
-
} catch (e) {
|
15090 |
-
cachedSetTimeout = defaultSetTimout;
|
15091 |
-
}
|
15092 |
-
try {
|
15093 |
-
if (typeof clearTimeout === 'function') {
|
15094 |
-
cachedClearTimeout = clearTimeout;
|
15095 |
-
} else {
|
15096 |
-
cachedClearTimeout = defaultClearTimeout;
|
15097 |
-
}
|
15098 |
-
} catch (e) {
|
15099 |
-
cachedClearTimeout = defaultClearTimeout;
|
15100 |
-
}
|
15101 |
-
} ())
|
15102 |
-
function runTimeout(fun) {
|
15103 |
-
if (cachedSetTimeout === setTimeout) {
|
15104 |
-
//normal enviroments in sane situations
|
15105 |
-
return setTimeout(fun, 0);
|
15106 |
-
}
|
15107 |
-
// if setTimeout wasn't available but was latter defined
|
15108 |
-
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
15109 |
-
cachedSetTimeout = setTimeout;
|
15110 |
-
return setTimeout(fun, 0);
|
15111 |
-
}
|
15112 |
-
try {
|
15113 |
-
// when when somebody has screwed with setTimeout but no I.E. maddness
|
15114 |
-
return cachedSetTimeout(fun, 0);
|
15115 |
-
} catch(e){
|
15116 |
-
try {
|
15117 |
-
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
15118 |
-
return cachedSetTimeout.call(null, fun, 0);
|
15119 |
-
} catch(e){
|
15120 |
-
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
|
15121 |
-
return cachedSetTimeout.call(this, fun, 0);
|
15122 |
-
}
|
15123 |
-
}
|
15124 |
|
|
|
15125 |
|
15126 |
-
}
|
15127 |
-
function runClearTimeout(marker) {
|
15128 |
-
if (cachedClearTimeout === clearTimeout) {
|
15129 |
-
//normal enviroments in sane situations
|
15130 |
-
return clearTimeout(marker);
|
15131 |
-
}
|
15132 |
-
// if clearTimeout wasn't available but was latter defined
|
15133 |
-
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
15134 |
-
cachedClearTimeout = clearTimeout;
|
15135 |
-
return clearTimeout(marker);
|
15136 |
-
}
|
15137 |
-
try {
|
15138 |
-
// when when somebody has screwed with setTimeout but no I.E. maddness
|
15139 |
-
return cachedClearTimeout(marker);
|
15140 |
-
} catch (e){
|
15141 |
-
try {
|
15142 |
-
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
15143 |
-
return cachedClearTimeout.call(null, marker);
|
15144 |
-
} catch (e){
|
15145 |
-
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
|
15146 |
-
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
|
15147 |
-
return cachedClearTimeout.call(this, marker);
|
15148 |
-
}
|
15149 |
-
}
|
15150 |
|
|
|
|
|
15151 |
|
|
|
15152 |
|
15153 |
-
}
|
15154 |
-
var queue = [];
|
15155 |
-
var draining = false;
|
15156 |
-
var currentQueue;
|
15157 |
-
var queueIndex = -1;
|
15158 |
|
15159 |
-
|
15160 |
-
|
15161 |
-
|
15162 |
-
|
15163 |
-
|
15164 |
-
|
15165 |
-
|
15166 |
-
|
15167 |
-
|
15168 |
-
|
15169 |
-
|
15170 |
-
|
15171 |
-
|
15172 |
-
|
|
|
15173 |
|
15174 |
-
|
15175 |
-
|
15176 |
-
|
15177 |
-
|
15178 |
-
|
15179 |
-
|
|
|
|
|
|
|
15180 |
|
15181 |
-
|
15182 |
-
|
15183 |
-
|
15184 |
-
|
15185 |
-
|
15186 |
-
|
15187 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15188 |
}
|
15189 |
}
|
15190 |
-
queueIndex = -1;
|
15191 |
-
len = queue.length;
|
15192 |
-
}
|
15193 |
-
currentQueue = null;
|
15194 |
-
draining = false;
|
15195 |
-
runClearTimeout(timeout);
|
15196 |
-
}
|
15197 |
|
15198 |
-
|
15199 |
-
|
15200 |
-
|
15201 |
-
|
15202 |
-
args[i - 1] = arguments[i];
|
15203 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15204 |
}
|
15205 |
-
queue.push(new Item(fun, args));
|
15206 |
-
if (queue.length === 1 && !draining) {
|
15207 |
-
runTimeout(drainQueue);
|
15208 |
-
}
|
15209 |
-
};
|
15210 |
|
15211 |
-
|
15212 |
-
function Item(fun, array) {
|
15213 |
-
this.fun = fun;
|
15214 |
-
this.array = array;
|
15215 |
}
|
15216 |
-
Item.prototype.run = function () {
|
15217 |
-
this.fun.apply(null, this.array);
|
15218 |
-
};
|
15219 |
-
process.title = 'browser';
|
15220 |
-
process.browser = true;
|
15221 |
-
process.env = {};
|
15222 |
-
process.argv = [];
|
15223 |
-
process.version = ''; // empty string to avoid regexp issues
|
15224 |
-
process.versions = {};
|
15225 |
-
|
15226 |
-
function noop() {}
|
15227 |
|
15228 |
-
|
15229 |
-
process.addListener = noop;
|
15230 |
-
process.once = noop;
|
15231 |
-
process.off = noop;
|
15232 |
-
process.removeListener = noop;
|
15233 |
-
process.removeAllListeners = noop;
|
15234 |
-
process.emit = noop;
|
15235 |
-
process.prependListener = noop;
|
15236 |
-
process.prependOnceListener = noop;
|
15237 |
|
15238 |
-
process.listeners = function (name) { return [] }
|
15239 |
|
15240 |
-
|
15241 |
-
throw new Error('process.binding is not supported');
|
15242 |
-
};
|
15243 |
|
15244 |
-
|
15245 |
-
|
15246 |
-
throw new Error('process.chdir is not supported');
|
15247 |
-
};
|
15248 |
-
process.umask = function() { return 0; };
|
15249 |
|
|
|
15250 |
|
15251 |
/***/ }),
|
15252 |
-
|
|
|
15253 |
/***/ (function(module, exports, __webpack_require__) {
|
15254 |
|
15255 |
-
|
15256 |
-
/** @license React v16.13.1
|
15257 |
-
* react-is.production.min.js
|
15258 |
-
*
|
15259 |
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
15260 |
-
*
|
15261 |
-
* This source code is licensed under the MIT license found in the
|
15262 |
-
* LICENSE file in the root directory of this source tree.
|
15263 |
-
*/
|
15264 |
|
15265 |
-
|
15266 |
-
Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
|
15267 |
-
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;
|
15268 |
-
exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};
|
15269 |
-
exports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};
|
15270 |
-
exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;
|
15271 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15272 |
|
15273 |
/***/ }),
|
15274 |
-
/* 299 */,
|
15275 |
-
/* 300 */,
|
15276 |
-
/* 301 */,
|
15277 |
-
/* 302 */,
|
15278 |
-
/* 303 */,
|
15279 |
-
/* 304 */,
|
15280 |
-
/* 305 */,
|
15281 |
-
/* 306 */,
|
15282 |
-
/* 307 */,
|
15283 |
-
/* 308 */,
|
15284 |
-
/* 309 */,
|
15285 |
-
/* 310 */,
|
15286 |
-
/* 311 */,
|
15287 |
-
/* 312 */,
|
15288 |
-
/* 313 */,
|
15289 |
-
/* 314 */,
|
15290 |
-
/* 315 */
|
15291 |
-
/***/ (function(module, exports, __webpack_require__) {
|
15292 |
|
15293 |
-
|
|
|
15294 |
|
|
|
|
|
|
|
15295 |
|
15296 |
-
Object.defineProperty(exports, '__esModule', { value: true });
|
15297 |
|
15298 |
-
|
15299 |
|
15300 |
-
|
15301 |
-
|
15302 |
-
var React = __webpack_require__(20);
|
15303 |
-
var React__default = _interopDefault(React);
|
15304 |
-
var _inheritsLoose = _interopDefault(__webpack_require__(434));
|
15305 |
-
var _assertThisInitialized = _interopDefault(__webpack_require__(18));
|
15306 |
|
15307 |
-
|
15308 |
-
arr: Array.isArray,
|
15309 |
-
obj: function obj(a) {
|
15310 |
-
return Object.prototype.toString.call(a) === '[object Object]';
|
15311 |
-
},
|
15312 |
-
fun: function fun(a) {
|
15313 |
-
return typeof a === 'function';
|
15314 |
-
},
|
15315 |
-
str: function str(a) {
|
15316 |
-
return typeof a === 'string';
|
15317 |
-
},
|
15318 |
-
num: function num(a) {
|
15319 |
-
return typeof a === 'number';
|
15320 |
-
},
|
15321 |
-
und: function und(a) {
|
15322 |
-
return a === void 0;
|
15323 |
-
},
|
15324 |
-
nul: function nul(a) {
|
15325 |
-
return a === null;
|
15326 |
-
},
|
15327 |
-
set: function set(a) {
|
15328 |
-
return a instanceof Set;
|
15329 |
-
},
|
15330 |
-
map: function map(a) {
|
15331 |
-
return a instanceof Map;
|
15332 |
-
},
|
15333 |
-
equ: function equ(a, b) {
|
15334 |
-
if (typeof a !== typeof b) return false;
|
15335 |
-
if (is.str(a) || is.num(a)) return a === b;
|
15336 |
-
if (is.obj(a) && is.obj(b) && Object.keys(a).length + Object.keys(b).length === 0) return true;
|
15337 |
-
var i;
|
15338 |
|
15339 |
-
|
15340 |
-
if (!(i in b)) return false;
|
15341 |
-
}
|
15342 |
|
15343 |
-
|
15344 |
-
|
15345 |
-
}
|
15346 |
|
15347 |
-
|
15348 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15349 |
};
|
15350 |
-
function merge(target, lowercase) {
|
15351 |
-
if (lowercase === void 0) {
|
15352 |
-
lowercase = true;
|
15353 |
-
}
|
15354 |
|
15355 |
-
return function (object) {
|
15356 |
-
return (is.arr(object) ? object : Object.keys(object)).reduce(function (acc, element) {
|
15357 |
-
var key = lowercase ? element[0].toLowerCase() + element.substring(1) : element;
|
15358 |
-
acc[key] = target(key);
|
15359 |
-
return acc;
|
15360 |
-
}, target);
|
15361 |
-
};
|
15362 |
-
}
|
15363 |
-
function useForceUpdate() {
|
15364 |
-
var _useState = React.useState(false),
|
15365 |
-
f = _useState[1];
|
15366 |
|
15367 |
-
|
15368 |
-
return f(function (v) {
|
15369 |
-
return !v;
|
15370 |
-
});
|
15371 |
-
}, []);
|
15372 |
-
return forceUpdate;
|
15373 |
-
}
|
15374 |
-
function withDefault(value, defaultValue) {
|
15375 |
-
return is.und(value) || is.nul(value) ? defaultValue : value;
|
15376 |
-
}
|
15377 |
-
function toArray(a) {
|
15378 |
-
return !is.und(a) ? is.arr(a) ? a : [a] : [];
|
15379 |
-
}
|
15380 |
-
function callProp(obj) {
|
15381 |
-
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
15382 |
-
args[_key - 1] = arguments[_key];
|
15383 |
-
}
|
15384 |
|
15385 |
-
|
15386 |
-
|
15387 |
|
15388 |
-
|
15389 |
-
var to = props.to,
|
15390 |
-
from = props.from,
|
15391 |
-
config = props.config,
|
15392 |
-
onStart = props.onStart,
|
15393 |
-
onRest = props.onRest,
|
15394 |
-
onFrame = props.onFrame,
|
15395 |
-
children = props.children,
|
15396 |
-
reset = props.reset,
|
15397 |
-
reverse = props.reverse,
|
15398 |
-
force = props.force,
|
15399 |
-
immediate = props.immediate,
|
15400 |
-
delay = props.delay,
|
15401 |
-
attach = props.attach,
|
15402 |
-
destroyed = props.destroyed,
|
15403 |
-
interpolateTo = props.interpolateTo,
|
15404 |
-
ref = props.ref,
|
15405 |
-
lazy = props.lazy,
|
15406 |
-
forward = _objectWithoutPropertiesLoose(props, ["to", "from", "config", "onStart", "onRest", "onFrame", "children", "reset", "reverse", "force", "immediate", "delay", "attach", "destroyed", "interpolateTo", "ref", "lazy"]);
|
15407 |
|
15408 |
-
|
|
|
15409 |
}
|
15410 |
|
15411 |
-
|
15412 |
-
var forward = getForwardProps(props);
|
15413 |
-
if (is.und(forward)) return _extends({
|
15414 |
-
to: forward
|
15415 |
-
}, props);
|
15416 |
-
var rest = Object.keys(props).reduce(function (a, k) {
|
15417 |
-
var _extends2;
|
15418 |
|
15419 |
-
|
15420 |
-
|
15421 |
-
|
15422 |
-
|
15423 |
-
|
|
|
|
|
15424 |
}
|
15425 |
-
function handleRef(ref, forward) {
|
15426 |
-
if (forward) {
|
15427 |
-
// If it's a function, assume it's a ref callback
|
15428 |
-
if (is.fun(forward)) forward(ref);else if (is.obj(forward)) {
|
15429 |
-
forward.current = ref;
|
15430 |
-
}
|
15431 |
-
}
|
15432 |
|
15433 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15434 |
}
|
15435 |
|
15436 |
-
|
15437 |
-
/*#__PURE__*/
|
15438 |
-
function () {
|
15439 |
-
function Animated() {
|
15440 |
-
this.payload = void 0;
|
15441 |
-
this.children = [];
|
15442 |
-
}
|
15443 |
|
15444 |
-
|
15445 |
|
15446 |
-
|
15447 |
-
|
15448 |
-
};
|
15449 |
|
15450 |
-
|
15451 |
-
|
15452 |
-
|
|
|
|
|
|
|
|
|
|
|
15453 |
|
15454 |
-
|
|
|
|
|
|
|
|
|
|
|
15455 |
|
15456 |
-
|
|
|
|
|
|
|
|
|
|
|
15457 |
|
15458 |
-
|
15459 |
-
|
15460 |
-
|
15461 |
|
15462 |
-
|
15463 |
-
|
15464 |
-
|
15465 |
-
};
|
15466 |
|
15467 |
-
|
15468 |
-
|
15469 |
-
this.children.splice(index, 1);
|
15470 |
-
if (this.children.length === 0) this.detach();
|
15471 |
};
|
|
|
15472 |
|
15473 |
-
|
15474 |
-
}();
|
15475 |
-
var AnimatedArray =
|
15476 |
-
/*#__PURE__*/
|
15477 |
-
function (_Animated) {
|
15478 |
-
_inheritsLoose(AnimatedArray, _Animated);
|
15479 |
|
15480 |
-
|
15481 |
-
var _this;
|
15482 |
|
15483 |
-
|
15484 |
-
|
15485 |
-
}
|
15486 |
|
15487 |
-
|
15488 |
-
_this.payload = [];
|
15489 |
|
15490 |
-
|
15491 |
-
return _this.payload.forEach(function (p) {
|
15492 |
-
return p instanceof Animated && p.addChild(_assertThisInitialized(_this));
|
15493 |
-
});
|
15494 |
-
};
|
15495 |
|
15496 |
-
|
15497 |
-
|
15498 |
-
return p instanceof Animated && p.removeChild(_assertThisInitialized(_this));
|
15499 |
-
});
|
15500 |
-
};
|
15501 |
|
15502 |
-
|
|
|
|
|
|
|
|
|
15503 |
}
|
15504 |
|
15505 |
-
return
|
15506 |
-
}
|
15507 |
-
var AnimatedObject =
|
15508 |
-
/*#__PURE__*/
|
15509 |
-
function (_Animated2) {
|
15510 |
-
_inheritsLoose(AnimatedObject, _Animated2);
|
15511 |
|
15512 |
-
|
15513 |
-
var _this2;
|
15514 |
|
15515 |
-
|
15516 |
-
|
15517 |
-
}
|
15518 |
|
15519 |
-
|
15520 |
-
_this2.payload = {};
|
15521 |
|
15522 |
-
|
15523 |
-
|
15524 |
-
return s instanceof Animated && s.addChild(_assertThisInitialized(_this2));
|
15525 |
-
});
|
15526 |
-
};
|
15527 |
|
15528 |
-
|
15529 |
-
return Object.values(_this2.payload).forEach(function (s) {
|
15530 |
-
return s instanceof Animated && s.removeChild(_assertThisInitialized(_this2));
|
15531 |
-
});
|
15532 |
-
};
|
15533 |
|
15534 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15535 |
}
|
15536 |
|
15537 |
-
var
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15538 |
|
15539 |
-
|
15540 |
-
|
15541 |
-
|
|
|
|
|
|
|
15542 |
}
|
15543 |
|
15544 |
-
var
|
15545 |
|
15546 |
-
|
15547 |
-
|
15548 |
-
if (animated && !(value instanceof Animated)) continue;
|
15549 |
-
payload[_key4] = value instanceof Animated ? value[animated ? 'getAnimatedValue' : 'getValue']() : value;
|
15550 |
}
|
15551 |
|
15552 |
-
return
|
15553 |
-
};
|
|
|
|
|
|
|
|
|
15554 |
|
15555 |
-
|
15556 |
-
|
15557 |
-
|
|
|
15558 |
|
15559 |
-
|
15560 |
-
|
|
|
15561 |
|
15562 |
-
|
15563 |
-
|
15564 |
-
|
15565 |
-
|
15566 |
-
|
15567 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15568 |
}
|
15569 |
-
|
15570 |
-
|
15571 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15572 |
}
|
15573 |
-
|
15574 |
-
|
15575 |
-
|
15576 |
-
|
15577 |
-
|
15578 |
-
|
15579 |
-
|
15580 |
-
|
15581 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15582 |
}
|
15583 |
-
|
15584 |
-
|
15585 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15586 |
}
|
15587 |
-
|
15588 |
-
|
15589 |
-
|
15590 |
-
|
15591 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15592 |
}
|
15593 |
-
|
15594 |
-
function
|
15595 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15596 |
}
|
15597 |
-
|
15598 |
-
|
15599 |
-
|
15600 |
-
|
15601 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
15602 |
}
|
15603 |
-
|
15604 |
-
function
|
15605 |
-
|
15606 |
}
|
15607 |
-
|
15608 |
-
|
15609 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15610 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
15611 |
|
15612 |
-
|
15613 |
-
|
15614 |
-
|
15615 |
-
|
15616 |
-
injectColorNames: injectColorNames,
|
15617 |
-
get requestFrame () { return requestFrame; },
|
15618 |
-
get cancelFrame () { return cancelFrame; },
|
15619 |
-
injectFrame: injectFrame,
|
15620 |
-
get interpolation () { return interpolation; },
|
15621 |
-
injectStringInterpolator: injectStringInterpolator,
|
15622 |
-
get now () { return now; },
|
15623 |
-
injectNow: injectNow,
|
15624 |
-
get defaultElement () { return defaultElement; },
|
15625 |
-
injectDefaultElement: injectDefaultElement,
|
15626 |
-
get animatedApi () { return animatedApi; },
|
15627 |
-
injectAnimatedApi: injectAnimatedApi,
|
15628 |
-
get createAnimatedStyle () { return createAnimatedStyle; },
|
15629 |
-
injectCreateAnimatedStyle: injectCreateAnimatedStyle,
|
15630 |
-
get manualFrameloop () { return manualFrameloop; },
|
15631 |
-
injectManualFrameloop: injectManualFrameloop
|
15632 |
-
});
|
15633 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15634 |
/**
|
15635 |
-
*
|
15636 |
*/
|
15637 |
|
15638 |
-
var AnimatedProps =
|
15639 |
-
/*#__PURE__*/
|
15640 |
-
function (_AnimatedObject) {
|
15641 |
-
_inheritsLoose(AnimatedProps, _AnimatedObject);
|
15642 |
|
15643 |
-
|
15644 |
-
|
|
|
|
|
15645 |
|
15646 |
-
|
15647 |
-
|
15648 |
-
|
15649 |
-
|
15650 |
-
});
|
15651 |
-
_this.update = callback;
|
15652 |
|
15653 |
-
|
15654 |
|
15655 |
-
|
15656 |
-
}
|
15657 |
|
15658 |
-
|
15659 |
-
|
15660 |
|
15661 |
-
|
15662 |
-
return is.fun(val) && !(val.prototype instanceof React__default.Component);
|
15663 |
-
};
|
15664 |
|
15665 |
-
|
15666 |
-
var AnimatedComponent = React.forwardRef(function (props, ref) {
|
15667 |
-
var forceUpdate = useForceUpdate();
|
15668 |
-
var mounted = React.useRef(true);
|
15669 |
-
var propsAnimated = React.useRef(null);
|
15670 |
-
var node = React.useRef(null);
|
15671 |
-
var attachProps = React.useCallback(function (props) {
|
15672 |
-
var oldPropsAnimated = propsAnimated.current;
|
15673 |
|
15674 |
-
|
15675 |
-
|
15676 |
|
15677 |
-
|
15678 |
-
|
15679 |
-
|
15680 |
|
15681 |
-
|
15682 |
-
|
15683 |
-
|
15684 |
-
|
15685 |
-
|
15686 |
-
|
|
|
|
|
15687 |
|
15688 |
-
|
15689 |
-
oldPropsAnimated && oldPropsAnimated.detach();
|
15690 |
-
}, []);
|
15691 |
-
React.useEffect(function () {
|
15692 |
-
return function () {
|
15693 |
-
mounted.current = false;
|
15694 |
-
propsAnimated.current && propsAnimated.current.detach();
|
15695 |
-
};
|
15696 |
-
}, []);
|
15697 |
-
React.useImperativeHandle(ref, function () {
|
15698 |
-
return animatedApi(node, mounted, forceUpdate);
|
15699 |
-
});
|
15700 |
-
attachProps(props);
|
15701 |
|
15702 |
-
|
15703 |
-
|
15704 |
-
scrollLeft = _getValue.scrollLeft,
|
15705 |
-
animatedProps = _objectWithoutPropertiesLoose(_getValue, ["scrollTop", "scrollLeft"]); // Functions cannot have refs, see:
|
15706 |
-
// See: https://github.com/react-spring/react-spring/issues/569
|
15707 |
|
|
|
|
|
|
|
|
|
|
|
|
|
15708 |
|
15709 |
-
|
15710 |
-
|
15711 |
-
|
15712 |
-
|
15713 |
-
|
15714 |
-
|
15715 |
-
|
15716 |
-
|
15717 |
-
|
|
|
|
|
15718 |
|
15719 |
-
|
15720 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15721 |
|
15722 |
-
|
15723 |
-
|
15724 |
-
var time = now();
|
15725 |
|
15726 |
-
|
15727 |
-
var _ref;
|
15728 |
|
15729 |
-
|
15730 |
-
|
15731 |
-
_ref = _iterator[_i++];
|
15732 |
-
} else {
|
15733 |
-
_i = _iterator.next();
|
15734 |
-
if (_i.done) break;
|
15735 |
-
_ref = _i.value;
|
15736 |
-
}
|
15737 |
|
15738 |
-
|
15739 |
-
|
|
|
|
|
|
|
|
|
|
|
15740 |
|
15741 |
-
|
15742 |
-
|
15743 |
-
|
15744 |
-
|
|
|
15745 |
|
15746 |
-
|
15747 |
-
|
15748 |
|
15749 |
-
|
15750 |
-
var from = config.fromValues[valIdx];
|
15751 |
-
var to = config.toValues[valIdx];
|
15752 |
-
var position = animation.lastPosition;
|
15753 |
-
var isAnimated = to instanceof Animated;
|
15754 |
-
var velocity = Array.isArray(config.initialVelocity) ? config.initialVelocity[valIdx] : config.initialVelocity;
|
15755 |
-
if (isAnimated) to = to.getValue(); // Conclude animation if it's either immediate, or from-values match end-state
|
15756 |
|
15757 |
-
|
15758 |
-
|
15759 |
-
animation.done = true;
|
15760 |
-
continue;
|
15761 |
-
} // Break animation when string values are involved
|
15762 |
|
|
|
|
|
|
|
|
|
|
|
15763 |
|
15764 |
-
|
15765 |
-
animation.setValue(to);
|
15766 |
-
animation.done = true;
|
15767 |
-
continue;
|
15768 |
-
}
|
15769 |
|
15770 |
-
|
15771 |
-
/** Duration easing */
|
15772 |
-
position = from + config.easing((time - animation.startTime) / config.duration) * (to - from);
|
15773 |
-
endOfAnimation = time >= animation.startTime + config.duration;
|
15774 |
-
} else if (config.decay) {
|
15775 |
-
/** Decay easing */
|
15776 |
-
position = from + velocity / (1 - 0.998) * (1 - Math.exp(-(1 - 0.998) * (time - animation.startTime)));
|
15777 |
-
endOfAnimation = Math.abs(animation.lastPosition - position) < 0.1;
|
15778 |
-
if (endOfAnimation) to = position;
|
15779 |
-
} else {
|
15780 |
-
/** Spring easing */
|
15781 |
-
lastTime = animation.lastTime !== void 0 ? animation.lastTime : time;
|
15782 |
-
velocity = animation.lastVelocity !== void 0 ? animation.lastVelocity : config.initialVelocity; // If we lost a lot of frames just jump to the end.
|
15783 |
|
15784 |
-
|
|
|
15785 |
|
15786 |
-
|
15787 |
|
15788 |
-
|
15789 |
-
var force = -config.tension * (position - to);
|
15790 |
-
var damping = -config.friction * velocity;
|
15791 |
-
var acceleration = (force + damping) / config.mass;
|
15792 |
-
velocity = velocity + acceleration * 1 / 1000;
|
15793 |
-
position = position + velocity * 1 / 1000;
|
15794 |
-
} // Conditions for stopping the spring animation
|
15795 |
|
|
|
|
|
15796 |
|
15797 |
-
|
15798 |
-
var isVelocity = Math.abs(velocity) <= config.precision;
|
15799 |
-
var isDisplacement = config.tension !== 0 ? Math.abs(to - position) <= config.precision : true;
|
15800 |
-
endOfAnimation = isOvershooting || isVelocity && isDisplacement;
|
15801 |
-
animation.lastVelocity = velocity;
|
15802 |
-
animation.lastTime = time;
|
15803 |
-
} // Trails aren't done until their parents conclude
|
15804 |
|
15805 |
|
15806 |
-
|
|
|
|
|
15807 |
|
15808 |
-
|
15809 |
-
|
15810 |
-
|
15811 |
-
|
15812 |
-
|
15813 |
|
15814 |
-
animation.setValue(position);
|
15815 |
-
animation.lastPosition = position;
|
15816 |
-
} // Keep track of updated values only when necessary
|
15817 |
|
|
|
15818 |
|
15819 |
-
|
15820 |
-
|
15821 |
|
|
|
|
|
|
|
|
|
15822 |
|
15823 |
-
|
|
|
15824 |
|
15825 |
-
|
15826 |
-
controllers.delete(controller);
|
15827 |
-
controller.stop(true);
|
15828 |
-
}
|
15829 |
-
} // Loop over as long as there are controllers ...
|
15830 |
|
|
|
15831 |
|
15832 |
-
|
15833 |
-
|
15834 |
-
|
15835 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15836 |
}
|
|
|
15837 |
|
15838 |
-
|
15839 |
-
|
|
|
|
|
|
|
15840 |
|
15841 |
-
|
15842 |
-
if (!controllers.has(controller)) controllers.add(controller);
|
15843 |
|
15844 |
-
|
15845 |
-
|
15846 |
-
if (manualFrameloop) requestFrame(manualFrameloop);else requestFrame(update);
|
15847 |
-
}
|
15848 |
-
};
|
15849 |
|
15850 |
-
|
15851 |
-
|
15852 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15853 |
|
15854 |
-
function createInterpolator(range, output, extrapolate) {
|
15855 |
-
if (typeof range === 'function') {
|
15856 |
-
return range;
|
15857 |
-
}
|
15858 |
|
15859 |
-
|
15860 |
-
|
15861 |
-
|
15862 |
-
output: output,
|
15863 |
-
extrapolate: extrapolate
|
15864 |
-
});
|
15865 |
-
}
|
15866 |
|
15867 |
-
|
15868 |
-
|
15869 |
-
|
15870 |
|
15871 |
-
var config = range;
|
15872 |
-
var outputRange = config.output;
|
15873 |
-
var inputRange = config.range || [0, 1];
|
15874 |
-
var extrapolateLeft = config.extrapolateLeft || config.extrapolate || 'extend';
|
15875 |
-
var extrapolateRight = config.extrapolateRight || config.extrapolate || 'extend';
|
15876 |
|
15877 |
-
|
15878 |
-
|
15879 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15880 |
|
15881 |
-
|
15882 |
-
|
15883 |
-
|
15884 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15885 |
}
|
15886 |
|
15887 |
-
|
15888 |
-
|
|
|
15889 |
|
15890 |
-
|
15891 |
-
if (extrapolateLeft === 'identity') return result;else if (extrapolateLeft === 'clamp') result = inputMin;
|
15892 |
-
}
|
15893 |
|
15894 |
-
if (result > inputMax) {
|
15895 |
-
if (extrapolateRight === 'identity') return result;else if (extrapolateRight === 'clamp') result = inputMax;
|
15896 |
-
}
|
15897 |
|
15898 |
-
|
15899 |
-
if (inputMin === inputMax) return input <= inputMin ? outputMin : outputMax; // Input Range
|
15900 |
|
15901 |
-
|
|
|
15902 |
|
15903 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15904 |
|
15905 |
-
|
15906 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15907 |
}
|
|
|
15908 |
|
15909 |
-
|
15910 |
-
for (var i = 1; i < inputRange.length - 1; ++i) {
|
15911 |
-
if (inputRange[i] >= input) break;
|
15912 |
-
}
|
15913 |
|
15914 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15915 |
}
|
15916 |
|
15917 |
-
|
15918 |
-
/*#__PURE__*/
|
15919 |
-
function (_AnimatedArray) {
|
15920 |
-
_inheritsLoose(AnimatedInterpolation, _AnimatedArray);
|
15921 |
|
15922 |
-
|
15923 |
-
|
15924 |
|
15925 |
-
|
15926 |
-
|
15927 |
-
|
15928 |
-
|
15929 |
-
|
|
|
|
|
|
|
|
|
15930 |
}
|
15931 |
|
15932 |
-
|
|
|
|
|
|
|
|
|
|
|
15933 |
|
15934 |
-
|
15935 |
-
|
15936 |
-
|
15937 |
-
|
15938 |
-
|
|
|
15939 |
|
15940 |
-
|
15941 |
-
|
15942 |
-
|
15943 |
|
15944 |
-
|
15945 |
-
|
|
|
|
|
|
|
|
|
15946 |
};
|
|
|
15947 |
|
15948 |
-
|
15949 |
-
}(AnimatedArray);
|
15950 |
|
15951 |
-
|
15952 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15953 |
};
|
15954 |
|
15955 |
-
var
|
15956 |
-
|
15957 |
-
|
15958 |
-
|
15959 |
-
|
15960 |
-
gentle: {
|
15961 |
-
tension: 120,
|
15962 |
-
friction: 14
|
15963 |
-
},
|
15964 |
-
wobbly: {
|
15965 |
-
tension: 180,
|
15966 |
-
friction: 12
|
15967 |
-
},
|
15968 |
-
stiff: {
|
15969 |
-
tension: 210,
|
15970 |
-
friction: 20
|
15971 |
-
},
|
15972 |
-
slow: {
|
15973 |
-
tension: 280,
|
15974 |
-
friction: 60
|
15975 |
-
},
|
15976 |
-
molasses: {
|
15977 |
-
tension: 280,
|
15978 |
-
friction: 120
|
15979 |
}
|
15980 |
};
|
15981 |
|
15982 |
-
/**
|
15983 |
-
*
|
|
|
15984 |
*/
|
|
|
|
|
|
|
15985 |
|
15986 |
-
|
15987 |
-
|
15988 |
-
timeFrame = 1000;
|
15989 |
}
|
15990 |
|
15991 |
-
|
15992 |
-
React.useEffect(function () {
|
15993 |
-
if (is.equ(refs, previous.current)) refs.forEach(function (_ref) {
|
15994 |
-
var current = _ref.current;
|
15995 |
-
return current && current.start();
|
15996 |
-
});else if (timeSteps) {
|
15997 |
-
refs.forEach(function (_ref2, index) {
|
15998 |
-
var current = _ref2.current;
|
15999 |
-
|
16000 |
-
if (current) {
|
16001 |
-
var ctrls = current.controllers;
|
16002 |
-
|
16003 |
-
if (ctrls.length) {
|
16004 |
-
var t = timeFrame * timeSteps[index];
|
16005 |
-
ctrls.forEach(function (ctrl) {
|
16006 |
-
ctrl.queue = ctrl.queue.map(function (e) {
|
16007 |
-
return _extends({}, e, {
|
16008 |
-
delay: e.delay + t
|
16009 |
-
});
|
16010 |
-
});
|
16011 |
-
ctrl.start();
|
16012 |
-
});
|
16013 |
-
}
|
16014 |
-
}
|
16015 |
-
});
|
16016 |
-
} else refs.reduce(function (q, _ref3, rI) {
|
16017 |
-
var current = _ref3.current;
|
16018 |
-
return q = q.then(function () {
|
16019 |
-
return current.start();
|
16020 |
-
});
|
16021 |
-
}, Promise.resolve());
|
16022 |
-
previous.current = refs;
|
16023 |
-
});
|
16024 |
}
|
16025 |
|
16026 |
/**
|
16027 |
-
*
|
16028 |
-
*
|
16029 |
*
|
16030 |
-
*
|
16031 |
-
*
|
16032 |
-
*
|
16033 |
-
* style transform
|
16034 |
-
* View#234 style
|
16035 |
-
* View#123
|
16036 |
*
|
16037 |
-
* A
|
16038 |
-
*
|
16039 |
-
* graph in order to find leaf nodes: the views that we flag as needing
|
16040 |
-
* an update.
|
16041 |
*
|
16042 |
-
*
|
16043 |
-
*
|
16044 |
-
*
|
16045 |
-
*
|
16046 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16047 |
*/
|
16048 |
-
function addAnimatedStyles(node, styles) {
|
16049 |
-
if ('update' in node) {
|
16050 |
-
styles.add(node);
|
16051 |
-
} else {
|
16052 |
-
node.getChildren().forEach(function (child) {
|
16053 |
-
return addAnimatedStyles(child, styles);
|
16054 |
-
});
|
16055 |
-
}
|
16056 |
-
}
|
16057 |
|
16058 |
-
|
16059 |
-
|
16060 |
-
function (_Animated) {
|
16061 |
-
_inheritsLoose(AnimatedValue, _Animated);
|
16062 |
|
16063 |
-
function
|
16064 |
-
|
|
|
16065 |
|
16066 |
-
|
16067 |
-
|
16068 |
-
|
16069 |
-
|
16070 |
-
_this.lastPosition = void 0;
|
16071 |
-
_this.lastVelocity = void 0;
|
16072 |
-
_this.startTime = void 0;
|
16073 |
-
_this.lastTime = void 0;
|
16074 |
-
_this.done = false;
|
16075 |
|
16076 |
-
|
16077 |
-
|
16078 |
-
|
16079 |
-
|
16080 |
|
16081 |
-
|
16082 |
-
|
16083 |
-
};
|
16084 |
|
16085 |
-
|
16086 |
-
|
16087 |
-
_this.lastPosition = _value;
|
16088 |
-
return _this;
|
16089 |
}
|
16090 |
|
16091 |
-
var
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16092 |
|
16093 |
-
|
16094 |
-
if (
|
16095 |
-
|
16096 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
16097 |
|
16098 |
-
this.animatedStyles.forEach(function (animatedStyle) {
|
16099 |
-
return animatedStyle.update();
|
16100 |
-
});
|
16101 |
-
};
|
16102 |
|
16103 |
-
|
16104 |
-
|
16105 |
-
|
|
|
16106 |
|
16107 |
-
|
16108 |
-
|
16109 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16110 |
|
16111 |
-
_proto.interpolate = function interpolate(range, output, extrapolate) {
|
16112 |
-
return new AnimatedInterpolation(this, range, output, extrapolate);
|
16113 |
-
};
|
16114 |
|
16115 |
-
|
16116 |
-
|
|
|
|
|
16117 |
|
16118 |
-
|
16119 |
-
|
16120 |
-
|
16121 |
-
_inheritsLoose(AnimatedValueArray, _AnimatedArray);
|
16122 |
|
16123 |
-
|
16124 |
-
|
|
|
|
|
|
|
|
|
|
|
16125 |
|
16126 |
-
|
16127 |
-
|
16128 |
-
|
16129 |
-
|
16130 |
-
|
|
|
|
|
|
|
|
|
|
|
16131 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16132 |
|
16133 |
-
var _proto = AnimatedValueArray.prototype;
|
16134 |
|
16135 |
-
|
16136 |
-
|
|
|
|
|
16137 |
|
16138 |
-
if (
|
16139 |
-
|
16140 |
}
|
16141 |
|
16142 |
-
if (
|
16143 |
-
|
16144 |
-
value.forEach(function (v, i) {
|
16145 |
-
return _this2.payload[i].setValue(v, flush);
|
16146 |
-
});
|
16147 |
-
}
|
16148 |
-
} else {
|
16149 |
-
this.payload.forEach(function (p) {
|
16150 |
-
return p.setValue(value, flush);
|
16151 |
-
});
|
16152 |
}
|
16153 |
-
};
|
16154 |
|
16155 |
-
|
16156 |
-
|
16157 |
-
|
16158 |
-
}
|
16159 |
-
|
|
|
16160 |
|
16161 |
-
|
16162 |
-
return new AnimatedInterpolation(this, range, output);
|
16163 |
-
};
|
16164 |
|
16165 |
-
|
16166 |
-
|
|
|
|
|
16167 |
|
16168 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16169 |
|
16170 |
-
var Controller =
|
16171 |
-
/*#__PURE__*/
|
16172 |
-
function () {
|
16173 |
-
function Controller() {
|
16174 |
-
var _this = this;
|
16175 |
|
16176 |
-
|
16177 |
-
|
16178 |
-
|
16179 |
-
|
16180 |
-
this.local = 0;
|
16181 |
-
this.props = {};
|
16182 |
-
this.merged = {};
|
16183 |
-
this.animations = {};
|
16184 |
-
this.interpolations = {};
|
16185 |
-
this.values = {};
|
16186 |
-
this.configs = [];
|
16187 |
-
this.listeners = [];
|
16188 |
-
this.queue = [];
|
16189 |
-
this.localQueue = void 0;
|
16190 |
|
16191 |
-
|
16192 |
-
|
16193 |
-
|
|
|
16194 |
|
16195 |
-
|
|
|
|
|
16196 |
}
|
16197 |
-
/**
|
16198 |
-
*
|
16199 |
-
*
|
|
|
|
|
|
|
16200 |
|
16201 |
|
16202 |
-
|
|
|
16203 |
|
16204 |
-
|
16205 |
-
|
16206 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16207 |
|
16208 |
-
|
16209 |
-
|
16210 |
-
|
16211 |
-
|
16212 |
-
|
16213 |
|
16214 |
-
|
16215 |
-
|
16216 |
-
|
16217 |
-
|
16218 |
-
|
16219 |
-
}
|
16220 |
-
}
|
16221 |
-
|
16222 |
-
|
16223 |
-
|
16224 |
-
|
|
|
16225 |
|
16226 |
-
var k = _ref2[0],
|
16227 |
-
v = _ref2[1];
|
16228 |
|
16229 |
-
|
16230 |
-
|
16231 |
-
|
16232 |
-
|
16233 |
-
|
|
|
|
|
|
|
|
|
|
|
16234 |
|
16235 |
-
|
16236 |
-
|
16237 |
-
|
16238 |
-
|
16239 |
-
|
16240 |
-
|
16241 |
-
|
|
|
|
|
|
|
|
|
|
|
16242 |
|
16243 |
|
16244 |
-
|
16245 |
-
|
16246 |
-
|
|
|
|
|
|
|
16247 |
|
16248 |
-
|
16249 |
-
return this;
|
16250 |
-
}
|
16251 |
-
/** start(onEnd)
|
16252 |
-
* This function either executes a queue, if present, or starts the frameloop, which animates */
|
16253 |
-
;
|
16254 |
|
16255 |
-
|
16256 |
-
|
|
|
|
|
|
|
16257 |
|
16258 |
-
|
16259 |
-
|
16260 |
-
|
16261 |
|
16262 |
-
|
16263 |
-
|
16264 |
-
|
16265 |
-
from = _ref3$from === void 0 ? {} : _ref3$from,
|
16266 |
-
_ref3$to = _ref3.to,
|
16267 |
-
to = _ref3$to === void 0 ? {} : _ref3$to;
|
16268 |
-
if (is.obj(from)) _this2.merged = _extends({}, from, _this2.merged);
|
16269 |
-
if (is.obj(to)) _this2.merged = _extends({}, _this2.merged, to);
|
16270 |
-
});
|
16271 |
-
} // The guid helps us tracking frames, a new queue over an old one means an override
|
16272 |
-
// We discard async calls in that caseÍ
|
16273 |
|
|
|
|
|
|
|
16274 |
|
16275 |
-
|
16276 |
-
|
16277 |
-
|
|
|
|
|
|
|
|
|
16278 |
|
16279 |
-
|
16280 |
-
|
16281 |
-
|
|
|
16282 |
|
16283 |
-
|
16284 |
-
|
16285 |
-
|
16286 |
-
|
16287 |
-
|
|
|
16288 |
|
16289 |
-
|
16290 |
-
|
|
|
16291 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16292 |
|
16293 |
-
var async = is.arr(props.to) || is.fun(props.to);
|
16294 |
|
16295 |
-
|
16296 |
-
|
16297 |
-
|
16298 |
-
if (async) _this2.runAsync(props, cb);else _this2.diff(props).start(cb);
|
16299 |
-
}
|
16300 |
-
}, delay);
|
16301 |
-
} else if (async) _this2.runAsync(props, cb);else _this2.diff(props).start(cb);
|
16302 |
-
});
|
16303 |
-
} // Otherwise we kick of the frameloop
|
16304 |
-
else {
|
16305 |
-
if (is.fun(onEnd)) this.listeners.push(onEnd);
|
16306 |
-
if (this.props.onStart) this.props.onStart();
|
16307 |
|
16308 |
-
|
16309 |
-
|
16310 |
|
16311 |
-
|
16312 |
-
};
|
16313 |
|
16314 |
-
|
16315 |
-
|
16316 |
-
|
16317 |
-
});
|
16318 |
-
this.listeners = [];
|
16319 |
-
return this;
|
16320 |
}
|
16321 |
-
/** Pause sets onEnd listeners free, but also removes the controller from the frameloop */
|
16322 |
-
;
|
16323 |
|
16324 |
-
|
16325 |
-
|
16326 |
-
if (finished) stop(this);
|
16327 |
-
return this;
|
16328 |
-
};
|
16329 |
|
16330 |
-
|
16331 |
-
var _this3 = this;
|
16332 |
|
16333 |
-
|
16334 |
-
props = _objectWithoutPropertiesLoose(_ref5, ["delay"]);
|
16335 |
|
16336 |
-
|
16337 |
-
// If the view relies on certain values "from" has to be present
|
16338 |
|
16339 |
-
|
|
|
|
|
|
|
|
|
16340 |
|
16341 |
-
|
16342 |
-
|
16343 |
-
|
|
|
16344 |
|
16345 |
-
|
|
|
|
|
16346 |
|
16347 |
-
|
16348 |
-
queue = queue.then(function () {
|
16349 |
-
//this.stop()
|
16350 |
-
if (local === _this3.guid) return new Promise(function (r) {
|
16351 |
-
return _this3.diff(fresh).start(r);
|
16352 |
-
});
|
16353 |
-
});
|
16354 |
-
};
|
16355 |
|
16356 |
-
|
16357 |
-
|
16358 |
-
}
|
16359 |
-
} else if (is.fun(props.to)) {
|
16360 |
-
var index = 0;
|
16361 |
-
var last;
|
16362 |
-
queue = queue.then(function () {
|
16363 |
-
return props.to( // next(props)
|
16364 |
-
function (p) {
|
16365 |
-
var fresh = _extends({}, props, interpolateTo(p));
|
16366 |
|
16367 |
-
|
16368 |
-
|
|
|
|
|
|
|
16369 |
|
16370 |
-
|
16371 |
-
|
16372 |
-
|
16373 |
-
|
16374 |
-
}, // cancel()
|
16375 |
-
function (finished) {
|
16376 |
-
if (finished === void 0) {
|
16377 |
-
finished = true;
|
16378 |
-
}
|
16379 |
|
16380 |
-
|
16381 |
-
|
16382 |
-
return last;
|
16383 |
-
});
|
16384 |
-
});
|
16385 |
}
|
16386 |
|
16387 |
-
|
|
|
16388 |
};
|
|
|
16389 |
|
16390 |
-
|
16391 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16392 |
|
16393 |
-
this.props = _extends({}, this.props, props);
|
16394 |
-
var _this$props = this.props,
|
16395 |
-
_this$props$from = _this$props.from,
|
16396 |
-
from = _this$props$from === void 0 ? {} : _this$props$from,
|
16397 |
-
_this$props$to = _this$props.to,
|
16398 |
-
to = _this$props$to === void 0 ? {} : _this$props$to,
|
16399 |
-
_this$props$config = _this$props.config,
|
16400 |
-
config = _this$props$config === void 0 ? {} : _this$props$config,
|
16401 |
-
reverse = _this$props.reverse,
|
16402 |
-
attach = _this$props.attach,
|
16403 |
-
reset = _this$props.reset,
|
16404 |
-
immediate = _this$props.immediate; // Reverse values when requested
|
16405 |
|
16406 |
-
|
16407 |
-
|
16408 |
-
|
16409 |
-
|
16410 |
-
} // This will collect all props that were ever set, reset merged props when necessary
|
16411 |
|
|
|
|
|
|
|
16412 |
|
16413 |
-
|
16414 |
-
this.hasChanged = false; // Attachment handling, trailed springs can "attach" themselves to a previous spring
|
16415 |
|
16416 |
-
|
|
|
16417 |
|
16418 |
-
|
16419 |
-
|
16420 |
-
|
16421 |
-
|
16422 |
-
var entry = acc[name] || {}; // Figure out what the value is supposed to be
|
16423 |
|
16424 |
-
|
16425 |
-
|
16426 |
-
var isArray = is.arr(value);
|
16427 |
-
var isInterpolation = !isNumber && !isArray && !isString;
|
16428 |
-
var fromValue = !is.und(from[name]) ? from[name] : value;
|
16429 |
-
var toValue = isNumber || isArray ? value : isString ? value : 1;
|
16430 |
-
var toConfig = callProp(config, name);
|
16431 |
-
if (target) toValue = target.animations[name].parent;
|
16432 |
-
var parent = entry.parent,
|
16433 |
-
interpolation$$1 = entry.interpolation,
|
16434 |
-
toValues = toArray(target ? toValue.getPayload() : toValue),
|
16435 |
-
animatedValues;
|
16436 |
-
var newValue = value;
|
16437 |
-
if (isInterpolation) newValue = interpolation({
|
16438 |
-
range: [0, 1],
|
16439 |
-
output: [value, value]
|
16440 |
-
})(1);
|
16441 |
-
var currentValue = interpolation$$1 && interpolation$$1.getValue(); // Change detection flags
|
16442 |
|
16443 |
-
|
16444 |
-
|
16445 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16446 |
});
|
16447 |
-
|
16448 |
-
|
16449 |
-
|
16450 |
-
|
|
|
|
|
|
|
|
|
16451 |
|
16452 |
-
|
16453 |
-
|
16454 |
|
16455 |
-
|
16456 |
-
|
16457 |
-
|
16458 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16459 |
|
16460 |
-
|
16461 |
-
|
16462 |
-
|
16463 |
-
|
|
|
16464 |
|
16465 |
-
|
16466 |
-
|
16467 |
-
|
16468 |
|
16469 |
-
|
16470 |
-
|
16471 |
-
|
16472 |
-
|
16473 |
-
|
16474 |
-
|
16475 |
-
animatedValues = toArray(parent.getPayload());
|
16476 |
-
if (reset && !isInterpolation) parent.setValue(fromValue, false);
|
16477 |
-
_this4.hasChanged = true; // Reset animated values
|
16478 |
|
16479 |
-
|
16480 |
-
|
16481 |
-
|
16482 |
-
|
16483 |
-
|
16484 |
-
|
16485 |
-
|
16486 |
-
|
16487 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16488 |
|
16489 |
-
|
16490 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16491 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16492 |
|
16493 |
-
|
16494 |
-
|
16495 |
-
|
16496 |
-
|
16497 |
-
animatedValues: animatedValues,
|
16498 |
-
toValues: toValues,
|
16499 |
-
previous: newValue,
|
16500 |
-
config: toConfig,
|
16501 |
-
fromValues: toArray(parent.getValue()),
|
16502 |
-
immediate: callProp(immediate, name),
|
16503 |
-
initialVelocity: withDefault(toConfig.velocity, 0),
|
16504 |
-
clamp: withDefault(toConfig.clamp, false),
|
16505 |
-
precision: withDefault(toConfig.precision, 0.01),
|
16506 |
-
tension: withDefault(toConfig.tension, 170),
|
16507 |
-
friction: withDefault(toConfig.friction, 26),
|
16508 |
-
mass: withDefault(toConfig.mass, 1),
|
16509 |
-
duration: toConfig.duration,
|
16510 |
-
easing: withDefault(toConfig.easing, function (t) {
|
16511 |
-
return t;
|
16512 |
-
}),
|
16513 |
-
decay: toConfig.decay
|
16514 |
-
}), _extends2));
|
16515 |
-
} else {
|
16516 |
-
if (!currentValueDiffersFromGoal) {
|
16517 |
-
var _extends3;
|
16518 |
|
16519 |
-
|
16520 |
-
// which normally constitutes an update, but the actual value (currentValue) matches the target!
|
16521 |
-
// In order to resolve this without causing an animation update we silently flag the animation as done,
|
16522 |
-
// which it technically is. Interpolations also needs a config update with their target set to 1.
|
16523 |
-
if (isInterpolation) {
|
16524 |
-
parent.setValue(1, false);
|
16525 |
-
interpolation$$1.updateConfig({
|
16526 |
-
output: [newValue, newValue]
|
16527 |
-
});
|
16528 |
-
}
|
16529 |
|
16530 |
-
|
16531 |
-
_this4.hasChanged = true;
|
16532 |
-
return _extends({}, acc, (_extends3 = {}, _extends3[name] = _extends({}, acc[name], {
|
16533 |
-
previous: newValue
|
16534 |
-
}), _extends3));
|
16535 |
-
}
|
16536 |
|
16537 |
-
return acc;
|
16538 |
-
}
|
16539 |
-
}, this.animations);
|
16540 |
|
16541 |
-
if (this.hasChanged) {
|
16542 |
-
// Make animations available to frameloop
|
16543 |
-
this.configs = Object.values(this.animations);
|
16544 |
-
this.values = {};
|
16545 |
-
this.interpolations = {};
|
16546 |
|
16547 |
-
|
16548 |
-
|
16549 |
-
|
16550 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16551 |
}
|
16552 |
|
16553 |
-
|
16554 |
-
|
|
|
16555 |
|
16556 |
-
|
16557 |
-
|
16558 |
-
|
16559 |
-
|
16560 |
-
|
16561 |
-
|
16562 |
-
|
16563 |
-
|
16564 |
-
|
16565 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16566 |
|
16567 |
-
return Controller;
|
16568 |
-
}();
|
16569 |
|
16570 |
-
/**
|
16571 |
-
*
|
16572 |
-
* const [props, set] = useSprings(number, (i, controller) => ({ ... }))
|
16573 |
*/
|
16574 |
|
16575 |
-
var useSprings = function useSprings(length, props) {
|
16576 |
-
var mounted = React.useRef(false);
|
16577 |
-
var ctrl = React.useRef();
|
16578 |
-
var isFn = is.fun(props); // The controller maintains the animation values, starts and stops animations
|
16579 |
|
16580 |
-
|
16581 |
-
|
16582 |
-
|
16583 |
-
|
16584 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16585 |
});
|
16586 |
-
ctrl.current = undefined;
|
16587 |
}
|
|
|
|
|
16588 |
|
16589 |
-
|
16590 |
-
|
16591 |
-
|
16592 |
-
|
16593 |
-
|
16594 |
-
ctrl.update(newProps);
|
16595 |
-
if (!ref) ctrl.start();
|
16596 |
-
return ctrl;
|
16597 |
-
}), ref];
|
16598 |
-
}, [length]),
|
16599 |
-
controllers = _useMemo[0],
|
16600 |
-
ref = _useMemo[1];
|
16601 |
|
16602 |
-
|
|
|
|
|
16603 |
|
16604 |
-
|
16605 |
-
|
16606 |
-
|
16607 |
-
return Promise.all(ctrl.current.map(function (c) {
|
16608 |
-
return new Promise(function (r) {
|
16609 |
-
return c.start(r);
|
16610 |
-
});
|
16611 |
-
}));
|
16612 |
-
},
|
16613 |
-
stop: function stop(finished) {
|
16614 |
-
return ctrl.current.forEach(function (c) {
|
16615 |
-
return c.stop(finished);
|
16616 |
-
});
|
16617 |
-
},
|
16618 |
|
16619 |
-
|
16620 |
-
|
16621 |
-
|
|
|
16622 |
|
16623 |
-
|
16624 |
-
|
|
|
16625 |
|
16626 |
-
|
16627 |
-
|
16628 |
-
return ctrl.current.map(function (c, i) {
|
16629 |
-
c.update(isFn ? callProp(updateProps, i, c) : updateProps[i]);
|
16630 |
-
if (!ref) c.start();
|
16631 |
-
});
|
16632 |
-
};
|
16633 |
-
}, [length]); // Update controller if props aren't functional
|
16634 |
|
16635 |
-
|
16636 |
-
|
16637 |
-
|
16638 |
-
|
16639 |
-
|
16640 |
-
|
16641 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16642 |
|
16643 |
-
React.useEffect(function () {
|
16644 |
-
return mounted.current = true, function () {
|
16645 |
-
return ctrl.current.forEach(function (c) {
|
16646 |
-
return c.destroy();
|
16647 |
-
});
|
16648 |
-
};
|
16649 |
-
}, []); // Return animated props, or, anim-props + the update-setter above
|
16650 |
|
16651 |
-
var propValues = ctrl.current.map(function (c) {
|
16652 |
-
return c.getValues();
|
16653 |
-
});
|
16654 |
-
return isFn ? [propValues, updateCtrl, function (finished) {
|
16655 |
-
return ctrl.current.forEach(function (c) {
|
16656 |
-
return c.pause(finished);
|
16657 |
-
});
|
16658 |
-
}] : propValues;
|
16659 |
-
};
|
16660 |
|
16661 |
-
/**
|
16662 |
-
*
|
16663 |
-
* const [props, set] = useSpring(() => ({ ... }))
|
16664 |
*/
|
16665 |
|
16666 |
-
var useSpring = function useSpring(props) {
|
16667 |
-
var isFn = is.fun(props);
|
16668 |
|
16669 |
-
|
16670 |
-
|
16671 |
-
|
16672 |
-
pause = _useSprings[2];
|
16673 |
|
16674 |
-
return isFn ? [result[0], set, pause] : result;
|
16675 |
-
};
|
16676 |
|
16677 |
-
/** API
|
16678 |
-
* const trails = useTrail(number, { ... })
|
16679 |
-
* const [trails, set] = useTrail(number, () => ({ ... }))
|
16680 |
-
*/
|
16681 |
|
16682 |
-
var
|
16683 |
-
|
16684 |
-
|
16685 |
-
|
16686 |
-
var instances = React.useRef();
|
16687 |
|
16688 |
-
|
16689 |
-
|
16690 |
-
|
16691 |
-
|
16692 |
-
|
16693 |
-
|
16694 |
-
|
16695 |
-
|
16696 |
-
});
|
16697 |
-
}),
|
16698 |
-
result = _useSprings[0],
|
16699 |
-
set = _useSprings[1],
|
16700 |
-
pause = _useSprings[2]; // Set up function to update controller
|
16701 |
|
|
|
|
|
|
|
16702 |
|
16703 |
-
|
16704 |
-
|
16705 |
-
|
16706 |
-
|
16707 |
-
|
16708 |
-
|
16709 |
-
|
16710 |
-
|
16711 |
-
|
16712 |
-
|
|
|
16713 |
}
|
16714 |
-
}
|
16715 |
-
});
|
|
|
|
|
|
|
|
|
16716 |
};
|
16717 |
-
}
|
|
|
16718 |
|
16719 |
-
|
16720 |
-
|
16721 |
-
|
|
|
|
|
|
|
16722 |
|
16723 |
-
|
16724 |
-
|
16725 |
-
}, []);
|
16726 |
-
return isFn ? [result, updateCtrl, pause] : result;
|
16727 |
-
};
|
16728 |
|
16729 |
-
|
16730 |
-
* const transitions = useTransition(items, itemKeys, { ... })
|
16731 |
-
* const [transitions, update] = useTransition(items, itemKeys, () => ({ ... }))
|
16732 |
-
*/
|
16733 |
|
16734 |
-
var guid = 0;
|
16735 |
-
var ENTER = 'enter';
|
16736 |
-
var LEAVE = 'leave';
|
16737 |
-
var UPDATE = 'update';
|
16738 |
|
16739 |
-
var mapKeys = function mapKeys(items, keys) {
|
16740 |
-
return (typeof keys === 'function' ? items.map(keys) : toArray(keys)).map(String);
|
16741 |
-
};
|
16742 |
|
16743 |
-
var get = function get(props) {
|
16744 |
-
var items = props.items,
|
16745 |
-
_props$keys = props.keys,
|
16746 |
-
keys = _props$keys === void 0 ? function (item) {
|
16747 |
-
return item;
|
16748 |
-
} : _props$keys,
|
16749 |
-
rest = _objectWithoutPropertiesLoose(props, ["items", "keys"]);
|
16750 |
|
16751 |
-
|
16752 |
-
|
16753 |
-
|
16754 |
-
keys: mapKeys(items, keys)
|
16755 |
-
}, rest);
|
16756 |
-
};
|
16757 |
|
16758 |
-
|
16759 |
-
|
16760 |
-
|
16761 |
-
keys: keyTransform || function (i) {
|
16762 |
-
return i;
|
16763 |
-
}
|
16764 |
-
}, config);
|
16765 |
|
16766 |
-
var _get = get(props),
|
16767 |
-
_get$lazy = _get.lazy,
|
16768 |
-
lazy = _get$lazy === void 0 ? false : _get$lazy,
|
16769 |
-
_get$unique = _get.unique,
|
16770 |
-
_get$reset = _get.reset,
|
16771 |
-
reset = _get$reset === void 0 ? false : _get$reset,
|
16772 |
-
enter = _get.enter,
|
16773 |
-
leave = _get.leave,
|
16774 |
-
update = _get.update,
|
16775 |
-
onDestroyed = _get.onDestroyed,
|
16776 |
-
keys = _get.keys,
|
16777 |
-
items = _get.items,
|
16778 |
-
onFrame = _get.onFrame,
|
16779 |
-
_onRest = _get.onRest,
|
16780 |
-
onStart = _get.onStart,
|
16781 |
-
ref = _get.ref,
|
16782 |
-
extra = _objectWithoutPropertiesLoose(_get, ["lazy", "unique", "reset", "enter", "leave", "update", "onDestroyed", "keys", "items", "onFrame", "onRest", "onStart", "ref"]);
|
16783 |
|
16784 |
-
|
16785 |
-
|
16786 |
-
|
16787 |
-
|
16788 |
-
|
16789 |
-
|
16790 |
-
|
16791 |
-
|
16792 |
-
|
16793 |
-
|
16794 |
-
instances: !mounted.current && new Map(),
|
16795 |
-
forceUpdate: forceUpdate
|
16796 |
});
|
16797 |
-
|
16798 |
-
|
16799 |
-
|
16800 |
-
|
16801 |
-
|
16802 |
-
|
16803 |
-
|
16804 |
-
|
16805 |
-
|
16806 |
-
|
16807 |
-
|
16808 |
-
|
16809 |
-
|
16810 |
-
|
16811 |
-
|
16812 |
-
|
|
|
|
|
|
|
|
|
16813 |
|
16814 |
-
|
16815 |
-
|
16816 |
-
|
16817 |
-
|
16818 |
-
|
16819 |
-
|
|
|
|
|
|
|
|
|
16820 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16821 |
};
|
16822 |
-
});
|
|
|
16823 |
|
16824 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
16825 |
|
16826 |
-
if (state.current.changed) {
|
16827 |
-
|
35 |
/******/
|
36 |
/******/ // object to store loaded CSS chunks
|
37 |
/******/ var installedCssChunks = {
|
38 |
+
/******/ 19: 0
|
39 |
/******/ }
|
40 |
/******/ var isCssRtlEnabled = function() {
|
41 |
/******/ return document.dir === 'rtl';
|
45 |
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
46 |
/******/ // Promise = chunk loading, 0 = chunk loaded
|
47 |
/******/ var installedChunks = {
|
48 |
+
/******/ 19: 0
|
49 |
/******/ };
|
50 |
/******/
|
51 |
/******/
|
52 |
/******/
|
53 |
/******/ // script path function
|
|
|
|
|
|
|
|
|
54 |
/******/ function jsonpScriptSrc(chunkId) {
|
55 |
+
/******/ return __webpack_require__.p + "chunks/" + chunkId + "." + {"0":"14e64a592bdaa342c3a7","1":"3c56dd5478f01faa4b26","2":"20e4990156e0a34c18b0","3":"dd09e8a86b0bcaa9aff7","4":"b94ffcec7f813ed34edb","5":"114a8214ba34dbd3c0f0","6":"99246a03e7b8aa1b8b26","7":"2eb145fe8d6d73093386","8":"339c74aee4cd645690ca","9":"02f4facd9176e0ea6e0a","10":"56ca8e03dceb770c657e","11":"fd724db984ec85c4acb4","12":"78fc0cd185fadcfabd60","13":"30a43bc4e07111ea05c9","14":"e6eec63cf9a29751635b","15":"6038d0db43b0dbc6a868","16":"2939053e1a82a2ae848c","17":"bbfe7f043a98d06cc429","18":"df9e5476385261b65933","23":"c9275cdb19816fe60363","24":"c96cd95056189481403f","25":"d100272c0e3ae443b829","28":"1eb85d89a9e04d20a4c1","29":"e069e25f913b20f89b53","31":"1052ef0a62eecf4b5f4a","32":"e9024fa95c3a496faa27","40":"314f6a9f9e0ee86eb8bf","41":"4efcfa4b8a4e3adf327f","42":"26c7ca1b51a55e317e81","43":"52fe0e41a24d55f1b9b1","44":"e38a65da5bf9ffb4b567","45":"3def7d0e1c4cf927153e"}[chunkId] + ".js"
|
|
|
|
|
|
|
|
|
56 |
/******/ }
|
57 |
/******/
|
|
|
58 |
/******/ // The require function
|
59 |
/******/ function __webpack_require__(moduleId) {
|
60 |
/******/
|
86 |
/******/
|
87 |
/******/
|
88 |
/******/ // mini-css-extract-plugin CSS loading
|
89 |
+
/******/ var cssChunks = {"0":1,"4":1,"6":1,"7":1,"8":1,"13":1,"18":1,"24":1,"25":1,"28":1,"31":1,"32":1,"40":1,"41":1,"42":1,"43":1};
|
90 |
/******/ if(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]);
|
91 |
/******/ else if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) {
|
92 |
/******/ promises.push(installedCssChunks[chunkId] = new Promise(function(resolve, reject) {
|
119 |
/******/ reject(err);
|
120 |
/******/ };
|
121 |
/******/ linkTag.href = fullhref;
|
|
|
|
|
|
|
122 |
/******/
|
123 |
/******/ var head = document.getElementsByTagName("head")[0];
|
124 |
/******/ head.appendChild(linkTag);
|
238 |
/******/ // on error function for async loading
|
239 |
/******/ __webpack_require__.oe = function(err) { console.error(err); throw err; };
|
240 |
/******/
|
241 |
+
/******/ var jsonpArray = window["webpackJsonp"] = window["webpackJsonp"] || [];
|
242 |
/******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray);
|
243 |
/******/ jsonpArray.push = webpackJsonpCallback;
|
244 |
/******/ jsonpArray = jsonpArray.slice();
|
247 |
/******/
|
248 |
/******/
|
249 |
/******/ // Load entry module and return exports
|
250 |
+
/******/ return __webpack_require__(__webpack_require__.s = 430);
|
251 |
/******/ })
|
252 |
/************************************************************************/
|
253 |
+
/******/ ({
|
254 |
+
|
255 |
+
/***/ 0:
|
256 |
/***/ (function(module, exports) {
|
257 |
|
258 |
+
(function() { module.exports = this["wp"]["element"]; }());
|
259 |
|
260 |
/***/ }),
|
261 |
+
|
262 |
+
/***/ 1:
|
263 |
/***/ (function(module, exports, __webpack_require__) {
|
264 |
|
265 |
/**
|
272 |
if (false) { var throwOnDirectAccess, ReactIs; } else {
|
273 |
// By explicitly using `prop-types` you are opting into new production behavior.
|
274 |
// http://fb.me/prop-types-in-prod
|
275 |
+
module.exports = __webpack_require__(138)();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
276 |
}
|
277 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
278 |
|
279 |
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
280 |
|
281 |
+
/***/ 10:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
282 |
/***/ (function(module, exports, __webpack_require__) {
|
283 |
|
284 |
/*!
|
336 |
|
337 |
|
338 |
/***/ }),
|
|
|
|
|
339 |
|
340 |
+
/***/ 100:
|
341 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
342 |
|
343 |
+
"use strict";
|
344 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
345 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
346 |
+
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2);
|
347 |
+
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);
|
348 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
349 |
|
350 |
+
/**
|
351 |
+
* External dependencies
|
352 |
+
*/
|
353 |
|
|
|
|
|
|
|
354 |
|
355 |
+
function Shortcut(_ref) {
|
356 |
+
var shortcut = _ref.shortcut,
|
357 |
+
className = _ref.className;
|
358 |
+
|
359 |
+
if (!shortcut) {
|
360 |
+
return null;
|
361 |
}
|
362 |
|
363 |
+
var displayText;
|
364 |
+
var ariaLabel;
|
365 |
+
|
366 |
+
if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__["isString"])(shortcut)) {
|
367 |
+
displayText = shortcut;
|
368 |
+
}
|
369 |
+
|
370 |
+
if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__["isObject"])(shortcut)) {
|
371 |
+
displayText = shortcut.display;
|
372 |
+
ariaLabel = shortcut.ariaLabel;
|
373 |
+
}
|
374 |
+
|
375 |
+
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("span", {
|
376 |
+
className: className,
|
377 |
+
"aria-label": ariaLabel
|
378 |
+
}, displayText);
|
379 |
}
|
380 |
|
381 |
+
/* harmony default export */ __webpack_exports__["a"] = (Shortcut);
|
382 |
+
//# sourceMappingURL=index.js.map
|
383 |
|
384 |
/***/ }),
|
|
|
|
|
385 |
|
386 |
+
/***/ 101:
|
387 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
388 |
|
389 |
+
"use strict";
|
390 |
+
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(105);
|
391 |
+
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);
|
392 |
+
/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(41);
|
393 |
+
/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);
|
394 |
+
/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(40);
|
395 |
+
/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);
|
396 |
+
/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(59);
|
397 |
+
/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__);
|
398 |
+
/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(44);
|
399 |
+
/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__);
|
400 |
+
/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(29);
|
401 |
+
/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__);
|
402 |
+
/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(42);
|
403 |
+
/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__);
|
404 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(0);
|
405 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__);
|
406 |
+
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(2);
|
407 |
+
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_8__);
|
408 |
+
/* harmony import */ var _wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(77);
|
409 |
+
/* harmony import */ var _wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_9__);
|
410 |
+
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(53);
|
411 |
+
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(19);
|
412 |
+
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__);
|
413 |
|
414 |
|
|
|
|
|
|
|
415 |
|
|
|
416 |
|
|
|
|
|
|
|
417 |
|
|
|
|
|
|
|
418 |
|
|
|
|
|
|
|
419 |
|
420 |
|
|
|
|
|
|
|
421 |
|
422 |
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default()(this, result); }; }
|
|
|
|
|
|
|
|
|
423 |
|
424 |
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
425 |
|
426 |
+
/**
|
427 |
+
* NOTE: This is temporary code. It exists only until a version of `@wordpress/data`
|
428 |
+
* is released which supports this functionality.
|
429 |
+
*
|
430 |
+
* @todo Remove this and use `@wordpress/data` `withSelect` instead after
|
431 |
+
* this PR is merged: https://github.com/WordPress/gutenberg/pull/11460
|
432 |
+
*/
|
433 |
|
434 |
+
/**
|
435 |
+
* External dependencies
|
436 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
437 |
|
|
|
|
|
|
|
|
|
|
|
438 |
|
|
|
439 |
|
|
|
|
|
|
|
440 |
|
|
|
441 |
|
442 |
+
/**
|
443 |
+
* Higher-order component used to inject state-derived props using registered
|
444 |
+
* selectors.
|
445 |
+
*
|
446 |
+
* @param {Function} mapSelectToProps Function called on every state change,
|
447 |
+
* expected to return object of props to
|
448 |
+
* merge with the component's own props.
|
449 |
+
*
|
450 |
+
* @return {Component} Enhanced component with merged state data props.
|
451 |
+
*/
|
452 |
|
453 |
+
var withSelect = function withSelect(mapSelectToProps) {
|
454 |
+
return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"])(function (WrappedComponent) {
|
455 |
+
/**
|
456 |
+
* Default merge props. A constant value is used as the fallback since it
|
457 |
+
* can be more efficiently shallow compared in case component is repeatedly
|
458 |
+
* rendered without its own merge props.
|
459 |
+
*
|
460 |
+
* @type {Object}
|
461 |
+
*/
|
462 |
+
var DEFAULT_MERGE_PROPS = {};
|
463 |
|
464 |
+
var ComponentWithSelect = /*#__PURE__*/function (_Component) {
|
465 |
+
_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default()(ComponentWithSelect, _Component);
|
466 |
|
467 |
+
var _super = _createSuper(ComponentWithSelect);
|
|
|
|
|
468 |
|
469 |
+
function ComponentWithSelect(props) {
|
470 |
+
var _this;
|
471 |
|
472 |
+
_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, ComponentWithSelect);
|
473 |
|
474 |
+
_this = _super.call(this, props);
|
475 |
+
_this.onStoreChange = _this.onStoreChange.bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this));
|
|
|
|
|
476 |
|
477 |
+
_this.subscribe(props.registry);
|
|
|
478 |
|
479 |
+
_this.onUnmounts = {};
|
480 |
+
_this.mergeProps = _this.getNextMergeProps(props);
|
481 |
+
return _this;
|
482 |
+
}
|
483 |
+
/**
|
484 |
+
* Given a props object, returns the next merge props by mapSelectToProps.
|
485 |
+
*
|
486 |
+
* @param {Object} props Props to pass as argument to mapSelectToProps.
|
487 |
+
*
|
488 |
+
* @return {Object} Props to merge into rendered wrapped element.
|
489 |
+
*/
|
490 |
+
|
491 |
+
|
492 |
+
_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(ComponentWithSelect, [{
|
493 |
+
key: "getNextMergeProps",
|
494 |
+
value: function getNextMergeProps(props) {
|
495 |
+
var _this2 = this;
|
496 |
+
|
497 |
+
var storeSelectors = {};
|
498 |
+
var onCompletes = [];
|
499 |
+
var componentContext = {
|
500 |
+
component: this
|
501 |
+
};
|
502 |
|
503 |
+
var getStoreFromRegistry = function getStoreFromRegistry(key, registry, context) {
|
504 |
+
// This is our first time selecting from this store.
|
505 |
+
// Do some lazy-loading of handling at this time.
|
506 |
+
var selectorsForKey = registry.select(key);
|
507 |
+
|
508 |
+
if (Object(lodash__WEBPACK_IMPORTED_MODULE_8__["isFunction"])(selectorsForKey)) {
|
509 |
+
// This store has special handling for its selectors.
|
510 |
+
// We give it a context, and we check for a "resolve"
|
511 |
+
var _selectorsForKey = selectorsForKey(context),
|
512 |
+
selectors = _selectorsForKey.selectors,
|
513 |
+
onComplete = _selectorsForKey.onComplete,
|
514 |
+
onUnmount = _selectorsForKey.onUnmount;
|
515 |
+
|
516 |
+
if (onComplete) {
|
517 |
+
onCompletes.push(onComplete);
|
518 |
+
}
|
519 |
|
520 |
+
if (onUnmount) {
|
521 |
+
_this2.onUnmounts[key] = onUnmount;
|
522 |
+
}
|
523 |
|
524 |
+
storeSelectors[key] = selectors;
|
525 |
+
} else {
|
526 |
+
storeSelectors[key] = selectorsForKey;
|
527 |
+
}
|
528 |
+
};
|
529 |
|
530 |
+
var select = function select(key) {
|
531 |
+
if (!storeSelectors[key]) {
|
532 |
+
getStoreFromRegistry(key, props.registry, componentContext);
|
533 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
534 |
|
535 |
+
return storeSelectors[key];
|
536 |
+
};
|
537 |
|
538 |
+
var selectedProps = mapSelectToProps(select, props.ownProps) || DEFAULT_MERGE_PROPS; // Complete the select for those stores which support it.
|
|
|
|
|
539 |
|
540 |
+
onCompletes.forEach(function (onComplete) {
|
541 |
+
return onComplete();
|
542 |
+
});
|
543 |
+
return selectedProps;
|
544 |
+
}
|
545 |
+
}, {
|
546 |
+
key: "componentDidMount",
|
547 |
+
value: function componentDidMount() {
|
548 |
+
this.canRunSelection = true; // A state change may have occurred between the constructor and
|
549 |
+
// mount of the component (e.g. during the wrapped component's own
|
550 |
+
// constructor), in which case selection should be rerun.
|
551 |
+
|
552 |
+
if (this.hasQueuedSelection) {
|
553 |
+
this.hasQueuedSelection = false;
|
554 |
+
this.onStoreChange();
|
555 |
+
}
|
556 |
+
}
|
557 |
+
}, {
|
558 |
+
key: "componentWillUnmount",
|
559 |
+
value: function componentWillUnmount() {
|
560 |
+
var _this3 = this;
|
561 |
+
|
562 |
+
this.canRunSelection = false;
|
563 |
+
this.unsubscribe();
|
564 |
+
Object.keys(this.onUnmounts).forEach(function (key) {
|
565 |
+
return _this3.onUnmounts[key]();
|
566 |
+
});
|
567 |
+
}
|
568 |
+
}, {
|
569 |
+
key: "shouldComponentUpdate",
|
570 |
+
value: function shouldComponentUpdate(nextProps, nextState) {
|
571 |
+
// Cycle subscription if registry changes.
|
572 |
+
var hasRegistryChanged = nextProps.registry !== this.props.registry;
|
573 |
|
574 |
+
if (hasRegistryChanged) {
|
575 |
+
this.unsubscribe();
|
576 |
+
this.subscribe(nextProps.registry);
|
577 |
+
} // Treat a registry change as equivalent to `ownProps`, to reflect
|
578 |
+
// `mergeProps` to rendered component if and only if updated.
|
579 |
|
|
|
580 |
|
581 |
+
var hasPropsChanged = hasRegistryChanged || !_wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_9___default()(this.props.ownProps, nextProps.ownProps); // Only render if props have changed or merge props have been updated
|
582 |
+
// from the store subscriber.
|
|
|
583 |
|
584 |
+
if (this.state === nextState && !hasPropsChanged) {
|
585 |
+
return false;
|
586 |
+
}
|
587 |
|
588 |
+
if (hasPropsChanged) {
|
589 |
+
var nextMergeProps = this.getNextMergeProps(nextProps);
|
590 |
+
|
591 |
+
if (!_wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_9___default()(this.mergeProps, nextMergeProps)) {
|
592 |
+
// If merge props change as a result of the incoming props,
|
593 |
+
// they should be reflected as such in the upcoming render.
|
594 |
+
// While side effects are discouraged in lifecycle methods,
|
595 |
+
// this component is used heavily, and prior efforts to use
|
596 |
+
// `getDerivedStateFromProps` had demonstrated miserable
|
597 |
+
// performance.
|
598 |
+
this.mergeProps = nextMergeProps;
|
599 |
+
} // Regardless whether merge props are changing, fall through to
|
600 |
+
// incur the render since the component will need to receive
|
601 |
+
// the changed `ownProps`.
|
602 |
|
603 |
+
}
|
604 |
|
605 |
+
return true;
|
606 |
+
}
|
607 |
+
}, {
|
608 |
+
key: "onStoreChange",
|
609 |
+
value: function onStoreChange() {
|
610 |
+
if (!this.canRunSelection) {
|
611 |
+
this.hasQueuedSelection = true;
|
612 |
+
return;
|
613 |
+
}
|
614 |
|
615 |
+
var nextMergeProps = this.getNextMergeProps(this.props);
|
|
|
616 |
|
617 |
+
if (_wordpress_is_shallow_equal__WEBPACK_IMPORTED_MODULE_9___default()(this.mergeProps, nextMergeProps)) {
|
618 |
+
return;
|
619 |
+
}
|
620 |
|
621 |
+
this.mergeProps = nextMergeProps; // Schedule an update. Merge props are not assigned to state since
|
622 |
+
// derivation of merge props from incoming props occurs within
|
623 |
+
// shouldComponentUpdate, where setState is not allowed. setState
|
624 |
+
// is used here instead of forceUpdate because forceUpdate bypasses
|
625 |
+
// shouldComponentUpdate altogether, which isn't desireable if both
|
626 |
+
// state and props change within the same render. Unfortunately,
|
627 |
+
// this requires that next merge props are generated twice.
|
628 |
|
629 |
+
this.setState({});
|
630 |
+
}
|
631 |
+
}, {
|
632 |
+
key: "subscribe",
|
633 |
+
value: function subscribe(registry) {
|
634 |
+
this.unsubscribe = registry.subscribe(this.onStoreChange);
|
635 |
+
}
|
636 |
+
}, {
|
637 |
+
key: "render",
|
638 |
+
value: function render() {
|
639 |
+
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(WrappedComponent, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, this.props.ownProps, this.mergeProps));
|
640 |
+
}
|
641 |
+
}]);
|
642 |
|
643 |
+
return ComponentWithSelect;
|
644 |
+
}(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["Component"]);
|
|
|
645 |
|
646 |
+
return function (ownProps) {
|
647 |
+
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__["RegistryConsumer"], null, function (registry) {
|
648 |
+
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(ComponentWithSelect, {
|
649 |
+
ownProps: ownProps,
|
650 |
+
registry: registry
|
651 |
+
});
|
652 |
+
});
|
653 |
+
};
|
654 |
+
}, 'withSelect');
|
655 |
};
|
656 |
|
657 |
+
/* harmony default export */ __webpack_exports__["a"] = (withSelect);
|
658 |
|
659 |
/***/ }),
|
|
|
|
|
660 |
|
661 |
+
/***/ 104:
|
662 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
663 |
|
664 |
+
"use strict";
|
665 |
+
/* harmony import */ var _woocommerce_date__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23);
|
666 |
+
/* harmony import */ var _woocommerce_date__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_date__WEBPACK_IMPORTED_MODULE_0__);
|
667 |
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "k", function() { return _woocommerce_date__WEBPACK_IMPORTED_MODULE_0__["isoDateFormat"]; });
|
668 |
|
669 |
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _woocommerce_date__WEBPACK_IMPORTED_MODULE_0__["appendTimestamp"]; });
|
|
|
|
|
670 |
|
671 |
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "h", function() { return _woocommerce_date__WEBPACK_IMPORTED_MODULE_0__["getDateParamsFromQuery"]; });
|
672 |
|
673 |
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "f", function() { return _woocommerce_date__WEBPACK_IMPORTED_MODULE_0__["getCurrentDates"]; });
|
674 |
|
675 |
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "j", function() { return _woocommerce_date__WEBPACK_IMPORTED_MODULE_0__["getPreviousDate"]; });
|
|
|
|
|
|
|
|
|
676 |
|
677 |
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "d", function() { return _woocommerce_date__WEBPACK_IMPORTED_MODULE_0__["getAllowedIntervalsForQuery"]; });
|
678 |
|
679 |
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "i", function() { return _woocommerce_date__WEBPACK_IMPORTED_MODULE_0__["getIntervalForQuery"]; });
|
|
|
|
|
680 |
|
681 |
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "e", function() { return _woocommerce_date__WEBPACK_IMPORTED_MODULE_0__["getChartTypeForQuery"]; });
|
682 |
|
683 |
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "c", function() { return _woocommerce_date__WEBPACK_IMPORTED_MODULE_0__["defaultTableDateFormat"]; });
|
|
|
|
|
684 |
|
685 |
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "g", function() { return _woocommerce_date__WEBPACK_IMPORTED_MODULE_0__["getDateFormatsForInterval"]; });
|
686 |
|
687 |
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "b", function() { return _woocommerce_date__WEBPACK_IMPORTED_MODULE_0__["dateValidationMessages"]; });
|
688 |
|
689 |
+
/**
|
690 |
+
* External dependencies
|
691 |
+
*/
|
692 |
|
693 |
+
/**
|
694 |
+
* Internal dependencies
|
695 |
+
*/
|
|
|
696 |
|
697 |
+
/**
|
698 |
+
* WooCommerce dependencies
|
699 |
+
*/
|
700 |
+
// Export the expected API for the consuming app.
|
701 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
702 |
|
703 |
|
704 |
/***/ }),
|
|
|
|
|
705 |
|
706 |
+
/***/ 105:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
707 |
/***/ (function(module, exports) {
|
708 |
|
709 |
+
function _extends() {
|
710 |
+
module.exports = _extends = Object.assign || function (target) {
|
711 |
+
for (var i = 1; i < arguments.length; i++) {
|
712 |
+
var source = arguments[i];
|
|
|
|
|
|
|
|
|
713 |
|
714 |
+
for (var key in source) {
|
715 |
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
716 |
+
target[key] = source[key];
|
717 |
+
}
|
718 |
+
}
|
719 |
+
}
|
720 |
|
721 |
+
return target;
|
722 |
+
};
|
|
|
723 |
|
724 |
+
return _extends.apply(this, arguments);
|
725 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
726 |
|
727 |
+
module.exports = _extends;
|
728 |
|
729 |
/***/ }),
|
730 |
+
|
731 |
+
/***/ 106:
|
732 |
/***/ (function(module, exports, __webpack_require__) {
|
733 |
|
734 |
"use strict";
|
735 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
736 |
|
737 |
+
/**
|
738 |
+
* Copyright (c) 2013-present, Facebook, Inc.
|
739 |
+
*
|
740 |
+
* This source code is licensed under the MIT license found in the
|
741 |
+
* LICENSE file in the root directory of this source tree.
|
742 |
+
*
|
743 |
+
*
|
744 |
+
*/
|
745 |
|
746 |
+
function makeEmptyFunction(arg) {
|
747 |
+
return function () {
|
748 |
+
return arg;
|
749 |
+
};
|
750 |
+
}
|
751 |
|
752 |
+
/**
|
753 |
+
* This function accepts and discards inputs; it has no side effects. This is
|
754 |
+
* primarily useful idiomatically for overridable function endpoints which
|
755 |
+
* always need to be callable, since JS lacks a null-call idiom ala Cocoa.
|
756 |
+
*/
|
757 |
+
var emptyFunction = function emptyFunction() {};
|
758 |
|
759 |
+
emptyFunction.thatReturns = makeEmptyFunction;
|
760 |
+
emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
|
761 |
+
emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
|
762 |
+
emptyFunction.thatReturnsNull = makeEmptyFunction(null);
|
763 |
+
emptyFunction.thatReturnsThis = function () {
|
764 |
+
return this;
|
765 |
+
};
|
766 |
+
emptyFunction.thatReturnsArgument = function (arg) {
|
767 |
+
return arg;
|
768 |
};
|
769 |
|
770 |
+
module.exports = emptyFunction;
|
771 |
|
772 |
/***/ }),
|
|
|
|
|
773 |
|
774 |
+
/***/ 107:
|
775 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
776 |
|
777 |
+
"use strict";
|
778 |
+
/* unused harmony export isHorizontalEdge */
|
779 |
+
/* unused harmony export isVerticalEdge */
|
780 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getRectangleFromRange; });
|
781 |
+
/* unused harmony export computeCaretRect */
|
782 |
+
/* unused harmony export placeCaretAtHorizontalEdge */
|
783 |
+
/* unused harmony export placeCaretAtVerticalEdge */
|
784 |
+
/* unused harmony export isTextField */
|
785 |
+
/* unused harmony export documentHasSelection */
|
786 |
+
/* unused harmony export isEntirelySelected */
|
787 |
+
/* unused harmony export getScrollContainer */
|
788 |
+
/* unused harmony export getOffsetParent */
|
789 |
+
/* unused harmony export replace */
|
790 |
+
/* unused harmony export remove */
|
791 |
+
/* unused harmony export insertAfter */
|
792 |
+
/* unused harmony export unwrap */
|
793 |
+
/* unused harmony export replaceTag */
|
794 |
+
/* unused harmony export wrap */
|
795 |
+
/* unused harmony export __unstableStripHTML */
|
796 |
+
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
797 |
+
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);
|
798 |
+
/**
|
799 |
+
* External dependencies
|
800 |
+
*/
|
801 |
|
802 |
+
/**
|
803 |
+
* Browser dependencies
|
804 |
+
*/
|
805 |
|
806 |
+
var _window = window,
|
807 |
+
DOMParser = _window.DOMParser,
|
808 |
+
getComputedStyle = _window.getComputedStyle;
|
809 |
+
var _window$Node = window.Node,
|
810 |
+
TEXT_NODE = _window$Node.TEXT_NODE,
|
811 |
+
ELEMENT_NODE = _window$Node.ELEMENT_NODE,
|
812 |
+
DOCUMENT_POSITION_PRECEDING = _window$Node.DOCUMENT_POSITION_PRECEDING,
|
813 |
+
DOCUMENT_POSITION_FOLLOWING = _window$Node.DOCUMENT_POSITION_FOLLOWING;
|
814 |
+
/**
|
815 |
+
* Returns true if the given selection object is in the forward direction, or
|
816 |
+
* false otherwise.
|
817 |
+
*
|
818 |
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition
|
819 |
+
*
|
820 |
+
* @param {Selection} selection Selection object to check.
|
821 |
+
*
|
822 |
+
* @return {boolean} Whether the selection is forward.
|
823 |
+
*/
|
824 |
|
825 |
+
function isSelectionForward(selection) {
|
826 |
+
var anchorNode = selection.anchorNode,
|
827 |
+
focusNode = selection.focusNode,
|
828 |
+
anchorOffset = selection.anchorOffset,
|
829 |
+
focusOffset = selection.focusOffset;
|
830 |
+
var position = anchorNode.compareDocumentPosition(focusNode); // Disable reason: `Node#compareDocumentPosition` returns a bitmask value,
|
831 |
+
// so bitwise operators are intended.
|
832 |
|
833 |
+
/* eslint-disable no-bitwise */
|
834 |
+
// Compare whether anchor node precedes focus node. If focus node (where
|
835 |
+
// end of selection occurs) is after the anchor node, it is forward.
|
836 |
|
837 |
+
if (position & DOCUMENT_POSITION_PRECEDING) {
|
838 |
+
return false;
|
839 |
+
}
|
840 |
|
841 |
+
if (position & DOCUMENT_POSITION_FOLLOWING) {
|
842 |
+
return true;
|
843 |
+
}
|
844 |
+
/* eslint-enable no-bitwise */
|
845 |
+
// `compareDocumentPosition` returns 0 when passed the same node, in which
|
846 |
+
// case compare offsets.
|
847 |
|
|
|
848 |
|
849 |
+
if (position === 0) {
|
850 |
+
return anchorOffset <= focusOffset;
|
851 |
+
} // This should never be reached, but return true as default case.
|
852 |
|
|
|
853 |
|
854 |
+
return true;
|
|
|
855 |
}
|
856 |
+
/**
|
857 |
+
* Check whether the selection is at the edge of the container. Checks for
|
858 |
+
* horizontal position by default. Set `onlyVertical` to true to check only
|
859 |
+
* vertically.
|
860 |
+
*
|
861 |
+
* @param {Element} container Focusable element.
|
862 |
+
* @param {boolean} isReverse Set to true to check left, false to check right.
|
863 |
+
* @param {boolean} onlyVertical Set to true to check only vertical position.
|
864 |
+
*
|
865 |
+
* @return {boolean} True if at the edge, false if not.
|
866 |
+
*/
|
867 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
868 |
|
869 |
+
function isEdge(container, isReverse, onlyVertical) {
|
870 |
+
if (Object(lodash__WEBPACK_IMPORTED_MODULE_0__["includes"])(['INPUT', 'TEXTAREA'], container.tagName)) {
|
871 |
+
if (container.selectionStart !== container.selectionEnd) {
|
872 |
+
return false;
|
873 |
+
}
|
874 |
|
875 |
+
if (isReverse) {
|
876 |
+
return container.selectionStart === 0;
|
877 |
+
}
|
878 |
|
879 |
+
return container.value.length === container.selectionStart;
|
880 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
881 |
|
882 |
+
if (!container.isContentEditable) {
|
883 |
+
return true;
|
884 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
885 |
|
886 |
+
var selection = window.getSelection();
|
|
|
|
|
|
|
|
|
|
|
|
|
887 |
|
888 |
+
if (!selection.rangeCount) {
|
889 |
+
return false;
|
890 |
+
}
|
891 |
|
892 |
+
var originalRange = selection.getRangeAt(0);
|
893 |
+
var range = originalRange.cloneRange();
|
894 |
+
var isForward = isSelectionForward(selection);
|
895 |
+
var isCollapsed = selection.isCollapsed; // Collapse in direction of selection.
|
896 |
|
897 |
+
if (!isCollapsed) {
|
898 |
+
range.collapse(!isForward);
|
899 |
+
}
|
900 |
|
901 |
+
var rangeRect = getRectangleFromRange(range);
|
|
|
|
|
|
|
|
|
|
|
|
|
902 |
|
903 |
+
if (!rangeRect) {
|
904 |
+
return false;
|
905 |
+
}
|
906 |
|
907 |
+
var computedStyle = window.getComputedStyle(container);
|
908 |
+
var lineHeight = parseInt(computedStyle.lineHeight, 10) || 0; // Only consider the multiline selection at the edge if the direction is
|
909 |
+
// towards the edge.
|
910 |
|
911 |
+
if (!isCollapsed && rangeRect.height > lineHeight && isForward === isReverse) {
|
912 |
+
return false;
|
913 |
+
}
|
914 |
|
915 |
+
var padding = parseInt(computedStyle["padding".concat(isReverse ? 'Top' : 'Bottom')], 10) || 0; // Calculate a buffer that is half the line height. In some browsers, the
|
916 |
+
// selection rectangle may not fill the entire height of the line, so we add
|
917 |
+
// 3/4 the line height to the selection rectangle to ensure that it is well
|
918 |
+
// over its line boundary.
|
919 |
|
920 |
+
var buffer = 3 * parseInt(lineHeight, 10) / 4;
|
921 |
+
var containerRect = container.getBoundingClientRect();
|
922 |
+
var originalRangeRect = getRectangleFromRange(originalRange);
|
923 |
+
var verticalEdge = isReverse ? containerRect.top + padding > originalRangeRect.top - buffer : containerRect.bottom - padding < originalRangeRect.bottom + buffer;
|
924 |
|
925 |
+
if (!verticalEdge) {
|
926 |
+
return false;
|
927 |
+
}
|
928 |
|
929 |
+
if (onlyVertical) {
|
930 |
+
return true;
|
931 |
+
} // In the case of RTL scripts, the horizontal edge is at the opposite side.
|
932 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
933 |
|
934 |
+
var direction = computedStyle.direction;
|
935 |
+
var isReverseDir = direction === 'rtl' ? !isReverse : isReverse; // To calculate the horizontal position, we insert a test range and see if
|
936 |
+
// this test range has the same horizontal position. This method proves to
|
937 |
+
// be better than a DOM-based calculation, because it ignores empty text
|
938 |
+
// nodes and a trailing line break element. In other words, we need to check
|
939 |
+
// visual positioning, not DOM positioning.
|
940 |
|
941 |
+
var x = isReverseDir ? containerRect.left + 1 : containerRect.right - 1;
|
942 |
+
var y = isReverse ? containerRect.top + buffer : containerRect.bottom - buffer;
|
943 |
+
var testRange = hiddenCaretRangeFromPoint(document, x, y, container);
|
944 |
|
945 |
+
if (!testRange) {
|
946 |
+
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
947 |
}
|
|
|
948 |
|
949 |
+
var side = isReverseDir ? 'left' : 'right';
|
950 |
+
var testRect = getRectangleFromRange(testRange); // Allow the position to be 1px off.
|
951 |
|
952 |
+
return Math.abs(testRect[side] - rangeRect[side]) <= 1;
|
953 |
+
}
|
954 |
+
/**
|
955 |
+
* Check whether the selection is horizontally at the edge of the container.
|
956 |
+
*
|
957 |
+
* @param {Element} container Focusable element.
|
958 |
+
* @param {boolean} isReverse Set to true to check left, false for right.
|
959 |
+
*
|
960 |
+
* @return {boolean} True if at the horizontal edge, false if not.
|
961 |
+
*/
|
962 |
|
|
|
963 |
|
964 |
+
function isHorizontalEdge(container, isReverse) {
|
965 |
+
return isEdge(container, isReverse);
|
966 |
+
}
|
967 |
+
/**
|
968 |
+
* Check whether the selection is vertically at the edge of the container.
|
969 |
+
*
|
970 |
+
* @param {Element} container Focusable element.
|
971 |
+
* @param {boolean} isReverse Set to true to check top, false for bottom.
|
972 |
+
*
|
973 |
+
* @return {boolean} True if at the vertical edge, false if not.
|
974 |
+
*/
|
975 |
|
976 |
+
function isVerticalEdge(container, isReverse) {
|
977 |
+
return isEdge(container, isReverse, true);
|
978 |
+
}
|
979 |
+
/**
|
980 |
+
* Get the rectangle of a given Range.
|
981 |
+
*
|
982 |
+
* @param {Range} range The range.
|
983 |
+
*
|
984 |
+
* @return {DOMRect} The rectangle.
|
985 |
+
*/
|
986 |
|
987 |
+
function getRectangleFromRange(range) {
|
988 |
+
// For uncollapsed ranges, get the rectangle that bounds the contents of the
|
989 |
+
// range; this a rectangle enclosing the union of the bounding rectangles
|
990 |
+
// for all the elements in the range.
|
991 |
+
if (!range.collapsed) {
|
992 |
+
return range.getBoundingClientRect();
|
993 |
+
}
|
994 |
|
995 |
+
var _range = range,
|
996 |
+
startContainer = _range.startContainer; // Correct invalid "BR" ranges. The cannot contain any children.
|
997 |
|
998 |
+
if (startContainer.nodeName === 'BR') {
|
999 |
+
var parentNode = startContainer.parentNode;
|
1000 |
+
var index = Array.from(parentNode.childNodes).indexOf(startContainer);
|
1001 |
+
range = document.createRange();
|
1002 |
+
range.setStart(parentNode, index);
|
1003 |
+
range.setEnd(parentNode, index);
|
1004 |
}
|
|
|
1005 |
|
1006 |
+
var rect = range.getClientRects()[0]; // If the collapsed range starts (and therefore ends) at an element node,
|
1007 |
+
// `getClientRects` can be empty in some browsers. This can be resolved
|
1008 |
+
// by adding a temporary text node with zero-width space to the range.
|
1009 |
+
//
|
1010 |
+
// See: https://stackoverflow.com/a/6847328/995445
|
1011 |
|
1012 |
+
if (!rect) {
|
1013 |
+
var padNode = document.createTextNode("\u200B"); // Do not modify the live range.
|
|
|
|
|
|
|
|
|
1014 |
|
1015 |
+
range = range.cloneRange();
|
1016 |
+
range.insertNode(padNode);
|
1017 |
+
rect = range.getClientRects()[0];
|
1018 |
+
padNode.parentNode.removeChild(padNode);
|
1019 |
+
}
|
1020 |
|
1021 |
+
return rect;
|
1022 |
+
}
|
1023 |
+
/**
|
1024 |
+
* Get the rectangle for the selection in a container.
|
1025 |
+
*
|
1026 |
+
* @return {?DOMRect} The rectangle.
|
1027 |
+
*/
|
1028 |
|
1029 |
+
function computeCaretRect() {
|
1030 |
+
var selection = window.getSelection();
|
1031 |
+
var range = selection.rangeCount ? selection.getRangeAt(0) : null;
|
1032 |
|
1033 |
+
if (!range) {
|
1034 |
+
return;
|
1035 |
+
}
|
1036 |
|
1037 |
+
return getRectangleFromRange(range);
|
1038 |
+
}
|
1039 |
+
/**
|
1040 |
+
* Places the caret at start or end of a given element.
|
1041 |
+
*
|
1042 |
+
* @param {Element} container Focusable element.
|
1043 |
+
* @param {boolean} isReverse True for end, false for start.
|
1044 |
+
*/
|
1045 |
|
1046 |
+
function placeCaretAtHorizontalEdge(container, isReverse) {
|
1047 |
+
if (!container) {
|
1048 |
+
return;
|
1049 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1050 |
|
1051 |
+
if (Object(lodash__WEBPACK_IMPORTED_MODULE_0__["includes"])(['INPUT', 'TEXTAREA'], container.tagName)) {
|
1052 |
+
container.focus();
|
|
|
|
|
|
|
1053 |
|
1054 |
+
if (isReverse) {
|
1055 |
+
container.selectionStart = container.value.length;
|
1056 |
+
container.selectionEnd = container.value.length;
|
|
|
|
|
|
|
|
|
|
|
|
|
1057 |
} else {
|
1058 |
+
container.selectionStart = 0;
|
1059 |
+
container.selectionEnd = 0;
|
1060 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1061 |
|
1062 |
+
return;
|
1063 |
+
}
|
|
|
1064 |
|
1065 |
+
container.focus();
|
|
|
|
|
|
|
|
|
|
|
1066 |
|
1067 |
+
if (!container.isContentEditable) {
|
1068 |
+
return;
|
1069 |
+
} // Select on extent child of the container, not the container itself. This
|
1070 |
+
// avoids the selection always being `endOffset` of 1 when placed at end,
|
1071 |
+
// where `startContainer`, `endContainer` would always be container itself.
|
|
|
|
|
|
|
|
|
|
|
1072 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1073 |
|
1074 |
+
var rangeTarget = container[isReverse ? 'lastChild' : 'firstChild']; // If no range target, it implies that the container is empty. Focusing is
|
1075 |
+
// sufficient for caret to be placed correctly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1076 |
|
1077 |
+
if (!rangeTarget) {
|
1078 |
+
return;
|
1079 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1080 |
|
1081 |
+
var selection = window.getSelection();
|
1082 |
+
var range = document.createRange();
|
1083 |
+
range.selectNodeContents(rangeTarget);
|
1084 |
+
range.collapse(!isReverse);
|
1085 |
+
selection.removeAllRanges();
|
1086 |
+
selection.addRange(range);
|
1087 |
+
}
|
1088 |
+
/**
|
1089 |
+
* Polyfill.
|
1090 |
+
* Get a collapsed range for a given point.
|
1091 |
+
*
|
1092 |
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Document/caretRangeFromPoint
|
1093 |
+
*
|
1094 |
+
* @param {Document} doc The document of the range.
|
1095 |
+
* @param {number} x Horizontal position within the current viewport.
|
1096 |
+
* @param {number} y Vertical position within the current viewport.
|
1097 |
+
*
|
1098 |
+
* @return {?Range} The best range for the given point.
|
1099 |
+
*/
|
1100 |
|
1101 |
+
function caretRangeFromPoint(doc, x, y) {
|
1102 |
+
if (doc.caretRangeFromPoint) {
|
1103 |
+
return doc.caretRangeFromPoint(x, y);
|
1104 |
+
}
|
1105 |
|
1106 |
+
if (!doc.caretPositionFromPoint) {
|
1107 |
+
return null;
|
1108 |
+
}
|
|
|
|
|
1109 |
|
1110 |
+
var point = doc.caretPositionFromPoint(x, y); // If x or y are negative, outside viewport, or there is no text entry node.
|
1111 |
+
// https://developer.mozilla.org/en-US/docs/Web/API/Document/caretRangeFromPoint
|
|
|
1112 |
|
1113 |
+
if (!point) {
|
1114 |
+
return null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1115 |
}
|
1116 |
+
|
1117 |
+
var range = doc.createRange();
|
1118 |
+
range.setStart(point.offsetNode, point.offset);
|
1119 |
+
range.collapse(true);
|
1120 |
+
return range;
|
1121 |
}
|
1122 |
+
/**
|
1123 |
+
* Get a collapsed range for a given point.
|
1124 |
+
* Gives the container a temporary high z-index (above any UI).
|
1125 |
+
* This is preferred over getting the UI nodes and set styles there.
|
1126 |
+
*
|
1127 |
+
* @param {Document} doc The document of the range.
|
1128 |
+
* @param {number} x Horizontal position within the current viewport.
|
1129 |
+
* @param {number} y Vertical position within the current viewport.
|
1130 |
+
* @param {Element} container Container in which the range is expected to be found.
|
1131 |
+
*
|
1132 |
+
* @return {?Range} The best range for the given point.
|
1133 |
+
*/
|
1134 |
|
|
|
|
|
|
|
1135 |
|
1136 |
+
function hiddenCaretRangeFromPoint(doc, x, y, container) {
|
1137 |
+
var originalZIndex = container.style.zIndex;
|
1138 |
+
var originalPosition = container.style.position; // A z-index only works if the element position is not static.
|
1139 |
|
1140 |
+
container.style.zIndex = '10000';
|
1141 |
+
container.style.position = 'relative';
|
1142 |
+
var range = caretRangeFromPoint(doc, x, y);
|
1143 |
+
container.style.zIndex = originalZIndex;
|
1144 |
+
container.style.position = originalPosition;
|
1145 |
+
return range;
|
1146 |
+
}
|
1147 |
+
/**
|
1148 |
+
* Places the caret at the top or bottom of a given element.
|
1149 |
+
*
|
1150 |
+
* @param {Element} container Focusable element.
|
1151 |
+
* @param {boolean} isReverse True for bottom, false for top.
|
1152 |
+
* @param {DOMRect} [rect] The rectangle to position the caret with.
|
1153 |
+
* @param {boolean} [mayUseScroll=true] True to allow scrolling, false to disallow.
|
1154 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
1155 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1156 |
|
1157 |
+
function placeCaretAtVerticalEdge(container, isReverse, rect) {
|
1158 |
+
var mayUseScroll = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
|
|
|
|
|
|
|
|
|
|
|
|
|
1159 |
|
1160 |
+
if (!container) {
|
1161 |
+
return;
|
|
|
|
|
|
|
1162 |
}
|
|
|
1163 |
|
1164 |
+
if (!rect || !container.isContentEditable) {
|
1165 |
+
placeCaretAtHorizontalEdge(container, isReverse);
|
1166 |
+
return;
|
1167 |
+
} // Offset by a buffer half the height of the caret rect. This is needed
|
1168 |
+
// because caretRangeFromPoint may default to the end of the selection if
|
1169 |
+
// offset is too close to the edge. It's unclear how to precisely calculate
|
1170 |
+
// this threshold; it may be the padded area of some combination of line
|
1171 |
+
// height, caret height, and font size. The buffer offset is effectively
|
1172 |
+
// equivalent to a point at half the height of a line of text.
|
1173 |
+
|
1174 |
+
|
1175 |
+
var buffer = rect.height / 2;
|
1176 |
+
var editableRect = container.getBoundingClientRect();
|
1177 |
+
var x = rect.left;
|
1178 |
+
var y = isReverse ? editableRect.bottom - buffer : editableRect.top + buffer;
|
1179 |
+
var range = hiddenCaretRangeFromPoint(document, x, y, container);
|
1180 |
+
|
1181 |
+
if (!range || !container.contains(range.startContainer)) {
|
1182 |
+
if (mayUseScroll && (!range || !range.startContainer || !range.startContainer.contains(container))) {
|
1183 |
+
// Might be out of view.
|
1184 |
+
// Easier than attempting to calculate manually.
|
1185 |
+
container.scrollIntoView(isReverse);
|
1186 |
+
placeCaretAtVerticalEdge(container, isReverse, rect, false);
|
1187 |
+
return;
|
1188 |
+
}
|
1189 |
|
1190 |
+
placeCaretAtHorizontalEdge(container, isReverse);
|
1191 |
+
return;
|
1192 |
+
}
|
1193 |
+
|
1194 |
+
var selection = window.getSelection();
|
1195 |
+
selection.removeAllRanges();
|
1196 |
+
selection.addRange(range);
|
1197 |
+
container.focus(); // Editable was already focussed, it goes back to old range...
|
1198 |
+
// This fixes it.
|
1199 |
+
|
1200 |
+
selection.removeAllRanges();
|
1201 |
+
selection.addRange(range);
|
|
|
|
|
|
|
|
|
|
|
1202 |
}
|
1203 |
+
/**
|
1204 |
+
* Check whether the given element is a text field, where text field is defined
|
1205 |
+
* by the ability to select within the input, or that it is contenteditable.
|
1206 |
+
*
|
1207 |
+
* See: https://html.spec.whatwg.org/#textFieldSelection
|
1208 |
+
*
|
1209 |
+
* @param {HTMLElement} element The HTML element.
|
1210 |
+
*
|
1211 |
+
* @return {boolean} True if the element is an text field, false if not.
|
1212 |
+
*/
|
1213 |
|
1214 |
+
function isTextField(element) {
|
1215 |
+
try {
|
1216 |
+
var nodeName = element.nodeName,
|
1217 |
+
selectionStart = element.selectionStart,
|
1218 |
+
contentEditable = element.contentEditable;
|
1219 |
+
return nodeName === 'INPUT' && selectionStart !== null || nodeName === 'TEXTAREA' || contentEditable === 'true';
|
1220 |
+
} catch (error) {
|
1221 |
+
// Safari throws an exception when trying to get `selectionStart`
|
1222 |
+
// on non-text <input> elements (which, understandably, don't
|
1223 |
+
// have the text selection API). We catch this via a try/catch
|
1224 |
+
// block, as opposed to a more explicit check of the element's
|
1225 |
+
// input types, because of Safari's non-standard behavior. This
|
1226 |
+
// also means we don't have to worry about the list of input
|
1227 |
+
// types that support `selectionStart` changing as the HTML spec
|
1228 |
+
// evolves over time.
|
1229 |
+
return false;
|
1230 |
+
}
|
1231 |
}
|
1232 |
+
/**
|
1233 |
+
* Check wether the current document has a selection.
|
1234 |
+
* This checks both for focus in an input field and general text selection.
|
1235 |
+
*
|
1236 |
+
* @return {boolean} True if there is selection, false if not.
|
1237 |
+
*/
|
1238 |
|
1239 |
+
function documentHasSelection() {
|
1240 |
+
if (isTextField(document.activeElement)) {
|
1241 |
+
return true;
|
1242 |
+
}
|
1243 |
|
1244 |
+
var selection = window.getSelection();
|
1245 |
+
var range = selection.rangeCount ? selection.getRangeAt(0) : null;
|
1246 |
+
return range && !range.collapsed;
|
1247 |
+
}
|
1248 |
+
/**
|
1249 |
+
* Check whether the contents of the element have been entirely selected.
|
1250 |
+
* Returns true if there is no possibility of selection.
|
1251 |
+
*
|
1252 |
+
* @param {Element} element The element to check.
|
1253 |
+
*
|
1254 |
+
* @return {boolean} True if entirely selected, false if not.
|
1255 |
+
*/
|
1256 |
|
1257 |
+
function isEntirelySelected(element) {
|
1258 |
+
if (Object(lodash__WEBPACK_IMPORTED_MODULE_0__["includes"])(['INPUT', 'TEXTAREA'], element.nodeName)) {
|
1259 |
+
return element.selectionStart === 0 && element.value.length === element.selectionEnd;
|
1260 |
+
}
|
1261 |
|
1262 |
+
if (!element.isContentEditable) {
|
1263 |
+
return true;
|
1264 |
+
}
|
1265 |
|
1266 |
+
var selection = window.getSelection();
|
1267 |
+
var range = selection.rangeCount ? selection.getRangeAt(0) : null;
|
|
|
|
|
|
|
1268 |
|
1269 |
+
if (!range) {
|
1270 |
+
return true;
|
1271 |
+
}
|
1272 |
|
1273 |
+
var startContainer = range.startContainer,
|
1274 |
+
endContainer = range.endContainer,
|
1275 |
+
startOffset = range.startOffset,
|
1276 |
+
endOffset = range.endOffset;
|
1277 |
|
1278 |
+
if (startContainer === element && endContainer === element && startOffset === 0 && endOffset === element.childNodes.length) {
|
1279 |
+
return true;
|
1280 |
+
}
|
1281 |
|
1282 |
+
var lastChild = element.lastChild;
|
1283 |
+
var lastChildContentLength = lastChild.nodeType === TEXT_NODE ? lastChild.data.length : lastChild.childNodes.length;
|
1284 |
+
return startContainer === element.firstChild && endContainer === element.lastChild && startOffset === 0 && endOffset === lastChildContentLength;
|
1285 |
+
}
|
1286 |
+
/**
|
1287 |
+
* Given a DOM node, finds the closest scrollable container node.
|
1288 |
+
*
|
1289 |
+
* @param {Element} node Node from which to start.
|
1290 |
+
*
|
1291 |
+
* @return {?Element} Scrollable container node, if found.
|
1292 |
+
*/
|
1293 |
|
1294 |
+
function getScrollContainer(node) {
|
1295 |
+
if (!node) {
|
1296 |
+
return;
|
1297 |
+
} // Scrollable if scrollable height exceeds displayed...
|
1298 |
|
|
|
|
|
|
|
1299 |
|
1300 |
+
if (node.scrollHeight > node.clientHeight) {
|
1301 |
+
// ...except when overflow is defined to be hidden or visible
|
1302 |
+
var _window$getComputedSt = window.getComputedStyle(node),
|
1303 |
+
overflowY = _window$getComputedSt.overflowY;
|
1304 |
|
1305 |
+
if (/(auto|scroll)/.test(overflowY)) {
|
1306 |
+
return node;
|
1307 |
+
}
|
1308 |
+
} // Continue traversing
|
1309 |
|
|
|
|
|
|
|
|
|
|
|
1310 |
|
1311 |
+
return getScrollContainer(node.parentNode);
|
1312 |
+
}
|
1313 |
+
/**
|
1314 |
+
* Returns the closest positioned element, or null under any of the conditions
|
1315 |
+
* of the offsetParent specification. Unlike offsetParent, this function is not
|
1316 |
+
* limited to HTMLElement and accepts any Node (e.g. Node.TEXT_NODE).
|
1317 |
+
*
|
1318 |
+
* @see https://drafts.csswg.org/cssom-view/#dom-htmlelement-offsetparent
|
1319 |
+
*
|
1320 |
+
* @param {Node} node Node from which to find offset parent.
|
1321 |
+
*
|
1322 |
+
* @return {?Node} Offset parent.
|
1323 |
+
*/
|
1324 |
|
1325 |
+
function getOffsetParent(node) {
|
1326 |
+
// Cannot retrieve computed style or offset parent only anything other than
|
1327 |
+
// an element node, so find the closest element node.
|
1328 |
+
var closestElement;
|
1329 |
|
1330 |
+
while (closestElement = node.parentNode) {
|
1331 |
+
if (closestElement.nodeType === ELEMENT_NODE) {
|
1332 |
+
break;
|
1333 |
+
}
|
1334 |
+
}
|
1335 |
|
1336 |
+
if (!closestElement) {
|
1337 |
+
return null;
|
1338 |
+
} // If the closest element is already positioned, return it, as offsetParent
|
1339 |
+
// does not otherwise consider the node itself.
|
1340 |
|
|
|
|
|
|
|
1341 |
|
1342 |
+
if (getComputedStyle(closestElement).position !== 'static') {
|
1343 |
+
return closestElement;
|
1344 |
+
}
|
1345 |
|
1346 |
+
return closestElement.offsetParent;
|
1347 |
+
}
|
1348 |
+
/**
|
1349 |
+
* Given two DOM nodes, replaces the former with the latter in the DOM.
|
1350 |
+
*
|
1351 |
+
* @param {Element} processedNode Node to be removed.
|
1352 |
+
* @param {Element} newNode Node to be inserted in its place.
|
1353 |
+
* @return {void}
|
1354 |
+
*/
|
1355 |
|
1356 |
+
function replace(processedNode, newNode) {
|
1357 |
+
insertAfter(newNode, processedNode.parentNode);
|
1358 |
+
remove(processedNode);
|
1359 |
+
}
|
1360 |
+
/**
|
1361 |
+
* Given a DOM node, removes it from the DOM.
|
1362 |
+
*
|
1363 |
+
* @param {Element} node Node to be removed.
|
1364 |
+
* @return {void}
|
1365 |
+
*/
|
1366 |
|
1367 |
+
function remove(node) {
|
1368 |
+
node.parentNode.removeChild(node);
|
1369 |
+
}
|
1370 |
+
/**
|
1371 |
+
* Given two DOM nodes, inserts the former in the DOM as the next sibling of
|
1372 |
+
* the latter.
|
1373 |
+
*
|
1374 |
+
* @param {Element} newNode Node to be inserted.
|
1375 |
+
* @param {Element} referenceNode Node after which to perform the insertion.
|
1376 |
+
* @return {void}
|
1377 |
+
*/
|
1378 |
|
1379 |
+
function insertAfter(newNode, referenceNode) {
|
1380 |
+
referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);
|
1381 |
+
}
|
1382 |
+
/**
|
1383 |
+
* Unwrap the given node. This means any child nodes are moved to the parent.
|
1384 |
+
*
|
1385 |
+
* @param {Node} node The node to unwrap.
|
1386 |
+
*
|
1387 |
+
* @return {void}
|
1388 |
+
*/
|
1389 |
|
1390 |
+
function unwrap(node) {
|
1391 |
+
var parent = node.parentNode;
|
1392 |
+
|
1393 |
+
while (node.firstChild) {
|
1394 |
+
parent.insertBefore(node.firstChild, node);
|
1395 |
+
}
|
1396 |
|
1397 |
+
parent.removeChild(node);
|
1398 |
+
}
|
1399 |
+
/**
|
1400 |
+
* Replaces the given node with a new node with the given tag name.
|
1401 |
+
*
|
1402 |
+
* @param {Element} node The node to replace
|
1403 |
+
* @param {string} tagName The new tag name.
|
1404 |
+
*
|
1405 |
+
* @return {Element} The new node.
|
1406 |
+
*/
|
1407 |
|
1408 |
+
function replaceTag(node, tagName) {
|
1409 |
+
var newNode = node.ownerDocument.createElement(tagName);
|
1410 |
|
1411 |
+
while (node.firstChild) {
|
1412 |
+
newNode.appendChild(node.firstChild);
|
|
|
|
|
|
|
1413 |
}
|
|
|
1414 |
|
1415 |
+
node.parentNode.replaceChild(newNode, node);
|
1416 |
+
return newNode;
|
1417 |
+
}
|
1418 |
+
/**
|
1419 |
+
* Wraps the given node with a new node with the given tag name.
|
1420 |
+
*
|
1421 |
+
* @param {Element} newNode The node to insert.
|
1422 |
+
* @param {Element} referenceNode The node to wrap.
|
1423 |
+
*/
|
1424 |
+
|
1425 |
+
function wrap(newNode, referenceNode) {
|
1426 |
+
referenceNode.parentNode.insertBefore(newNode, referenceNode);
|
1427 |
+
newNode.appendChild(referenceNode);
|
1428 |
+
}
|
1429 |
+
/**
|
1430 |
+
* Removes any HTML tags from the provided string.
|
1431 |
+
*
|
1432 |
+
* @param {string} html The string containing html.
|
1433 |
+
*
|
1434 |
+
* @return {string} The text content with any html removed.
|
1435 |
+
*/
|
1436 |
+
|
1437 |
+
function __unstableStripHTML(html) {
|
1438 |
+
var document = new DOMParser().parseFromString(html, 'text/html');
|
1439 |
+
return document.body.textContent || '';
|
1440 |
+
}
|
1441 |
+
//# sourceMappingURL=dom.js.map
|
1442 |
|
1443 |
/***/ }),
|
|
|
|
|
1444 |
|
1445 |
+
/***/ 109:
|
1446 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1447 |
+
|
1448 |
+
"use strict";
|
1449 |
+
/* harmony import */ var _babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27);
|
1450 |
+
/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
|
1451 |
+
/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(16);
|
1452 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(0);
|
1453 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__);
|
1454 |
+
/* harmony import */ var _dashicon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(80);
|
1455 |
+
/* harmony import */ var _primitives__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(62);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1456 |
|
1457 |
|
|
|
|
|
|
|
1458 |
|
|
|
|
|
|
|
1459 |
|
1460 |
+
/**
|
1461 |
+
* WordPress dependencies
|
1462 |
+
*/
|
1463 |
+
|
1464 |
+
/**
|
1465 |
+
* Internal dependencies
|
1466 |
+
*/
|
1467 |
+
|
1468 |
|
1469 |
|
|
|
|
|
|
|
1470 |
|
1471 |
+
function Icon(_ref) {
|
1472 |
+
var _ref$icon = _ref.icon,
|
1473 |
+
icon = _ref$icon === void 0 ? null : _ref$icon,
|
1474 |
+
size = _ref.size,
|
1475 |
+
additionalProps = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_ref, ["icon", "size"]);
|
1476 |
|
1477 |
+
// Dashicons should be 20x20 by default.
|
1478 |
+
var dashiconSize = size || 20;
|
|
|
|
|
1479 |
|
1480 |
+
if ('string' === typeof icon) {
|
1481 |
+
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])(_dashicon__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({
|
1482 |
+
icon: icon,
|
1483 |
+
size: dashiconSize
|
1484 |
+
}, additionalProps));
|
|
|
|
|
|
|
1485 |
}
|
|
|
1486 |
|
1487 |
+
if (icon && _dashicon__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"] === icon.type) {
|
1488 |
+
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["cloneElement"])(icon, Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({
|
1489 |
+
size: dashiconSize
|
1490 |
+
}, additionalProps));
|
1491 |
+
} // Icons should be 24x24 by default.
|
1492 |
|
1493 |
|
1494 |
+
var iconSize = size || 24;
|
|
|
|
|
1495 |
|
1496 |
+
if ('function' === typeof icon) {
|
1497 |
+
if (icon.prototype instanceof _wordpress_element__WEBPACK_IMPORTED_MODULE_3__["Component"]) {
|
1498 |
+
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])(icon, Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({
|
1499 |
+
size: iconSize
|
1500 |
+
}, additionalProps));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1501 |
}
|
1502 |
+
|
1503 |
+
return icon(Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({
|
1504 |
+
size: iconSize
|
1505 |
+
}, additionalProps));
|
|
|
1506 |
}
|
|
|
1507 |
|
1508 |
+
if (icon && (icon.type === 'svg' || icon.type === _primitives__WEBPACK_IMPORTED_MODULE_5__[/* SVG */ "b"])) {
|
1509 |
+
var appliedProps = Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({
|
1510 |
+
width: iconSize,
|
1511 |
+
height: iconSize
|
1512 |
+
}, icon.props, additionalProps);
|
1513 |
|
1514 |
+
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])(_primitives__WEBPACK_IMPORTED_MODULE_5__[/* SVG */ "b"], appliedProps);
|
1515 |
+
}
|
|
|
1516 |
|
1517 |
+
if (Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["isValidElement"])(icon)) {
|
1518 |
+
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["cloneElement"])(icon, Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({
|
1519 |
+
size: iconSize
|
1520 |
+
}, additionalProps));
|
1521 |
+
}
|
1522 |
|
1523 |
+
return icon;
|
1524 |
+
}
|
|
|
1525 |
|
1526 |
+
/* harmony default export */ __webpack_exports__["a"] = (Icon);
|
1527 |
+
//# sourceMappingURL=index.js.map
|
1528 |
|
1529 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1530 |
|
1531 |
+
/***/ 11:
|
1532 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1533 |
|
1534 |
+
"use strict";
|
1535 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _extends; });
|
1536 |
+
function _extends() {
|
1537 |
+
_extends = Object.assign || function (target) {
|
1538 |
+
for (var i = 1; i < arguments.length; i++) {
|
1539 |
+
var source = arguments[i];
|
1540 |
|
1541 |
+
for (var key in source) {
|
1542 |
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
1543 |
+
target[key] = source[key];
|
1544 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1545 |
}
|
1546 |
}
|
|
|
|
|
|
|
|
|
1547 |
|
1548 |
+
return target;
|
1549 |
+
};
|
1550 |
|
1551 |
+
return _extends.apply(this, arguments);
|
1552 |
+
}
|
|
|
1553 |
|
1554 |
+
/***/ }),
|
|
|
1555 |
|
1556 |
+
/***/ 110:
|
1557 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
1558 |
|
1559 |
+
"use strict";
|
1560 |
+
/* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7);
|
1561 |
+
/* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
|
1562 |
+
/* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8);
|
1563 |
+
/* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4);
|
1564 |
+
/* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9);
|
1565 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(0);
|
1566 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__);
|
1567 |
+
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(2);
|
1568 |
+
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_6__);
|
1569 |
+
/* harmony import */ var _popover__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(92);
|
1570 |
+
/* harmony import */ var _shortcut__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(100);
|
1571 |
|
1572 |
|
|
|
|
|
|
|
1573 |
|
|
|
1574 |
|
|
|
1575 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1576 |
|
|
|
1577 |
|
1578 |
+
/**
|
1579 |
+
* External dependencies
|
1580 |
+
*/
|
1581 |
|
1582 |
+
/**
|
1583 |
+
* WordPress dependencies
|
1584 |
+
*/
|
1585 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1586 |
|
1587 |
+
/**
|
1588 |
+
* Internal dependencies
|
1589 |
+
*/
|
|
|
|
|
1590 |
|
|
|
1591 |
|
|
|
|
|
|
|
1592 |
|
1593 |
+
/**
|
1594 |
+
* Time over children to wait before showing tooltip
|
1595 |
+
*
|
1596 |
+
* @type {number}
|
1597 |
+
*/
|
|
|
|
|
|
|
1598 |
|
1599 |
+
var TOOLTIP_DELAY = 700;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1600 |
|
1601 |
+
var Tooltip =
|
1602 |
+
/*#__PURE__*/
|
1603 |
+
function (_Component) {
|
1604 |
+
Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(Tooltip, _Component);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1605 |
|
1606 |
+
function Tooltip() {
|
1607 |
+
var _this;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1608 |
|
1609 |
+
Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(this, Tooltip);
|
1610 |
|
1611 |
+
_this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(Tooltip).apply(this, arguments));
|
1612 |
+
_this.delayedSetIsOver = Object(lodash__WEBPACK_IMPORTED_MODULE_6__["debounce"])(function (isOver) {
|
1613 |
+
return _this.setState({
|
1614 |
+
isOver: isOver
|
1615 |
+
});
|
1616 |
+
}, TOOLTIP_DELAY);
|
1617 |
+
/**
|
1618 |
+
* Prebound `isInMouseDown` handler, created as a constant reference to
|
1619 |
+
* assure ability to remove in component unmount.
|
1620 |
+
*
|
1621 |
+
* @type {Function}
|
1622 |
+
*/
|
1623 |
+
|
1624 |
+
_this.cancelIsMouseDown = _this.createSetIsMouseDown(false);
|
1625 |
+
/**
|
1626 |
+
* Whether a the mouse is currently pressed, used in determining whether
|
1627 |
+
* to handle a focus event as displaying the tooltip immediately.
|
1628 |
+
*
|
1629 |
+
* @type {boolean}
|
1630 |
+
*/
|
1631 |
+
|
1632 |
+
_this.isInMouseDown = false;
|
1633 |
+
_this.state = {
|
1634 |
+
isOver: false
|
1635 |
+
};
|
1636 |
+
return _this;
|
1637 |
+
}
|
1638 |
|
1639 |
+
Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Tooltip, [{
|
1640 |
+
key: "componentWillUnmount",
|
1641 |
+
value: function componentWillUnmount() {
|
1642 |
+
this.delayedSetIsOver.cancel();
|
1643 |
+
document.removeEventListener('mouseup', this.cancelIsMouseDown);
|
1644 |
+
}
|
1645 |
+
}, {
|
1646 |
+
key: "emitToChild",
|
1647 |
+
value: function emitToChild(eventName, event) {
|
1648 |
+
var children = this.props.children;
|
1649 |
|
1650 |
+
if (_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["Children"].count(children) !== 1) {
|
1651 |
+
return;
|
1652 |
+
}
|
1653 |
|
1654 |
+
var child = _wordpress_element__WEBPACK_IMPORTED_MODULE_5__["Children"].only(children);
|
|
|
|
|
1655 |
|
1656 |
+
if (typeof child.props[eventName] === 'function') {
|
1657 |
+
child.props[eventName](event);
|
1658 |
+
}
|
1659 |
+
}
|
1660 |
+
}, {
|
1661 |
+
key: "createToggleIsOver",
|
1662 |
+
value: function createToggleIsOver(eventName, isDelayed) {
|
1663 |
+
var _this2 = this;
|
1664 |
|
1665 |
+
return function (event) {
|
1666 |
+
// Preserve original child callback behavior
|
1667 |
+
_this2.emitToChild(eventName, event); // Mouse events behave unreliably in React for disabled elements,
|
1668 |
+
// firing on mouseenter but not mouseleave. Further, the default
|
1669 |
+
// behavior for disabled elements in some browsers is to ignore
|
1670 |
+
// mouse events. Don't bother trying to to handle them.
|
1671 |
+
//
|
1672 |
+
// See: https://github.com/facebook/react/issues/4251
|
1673 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1674 |
|
1675 |
+
if (event.currentTarget.disabled) {
|
1676 |
+
return;
|
1677 |
+
} // A focus event will occur as a result of a mouse click, but it
|
1678 |
+
// should be disambiguated between interacting with the button and
|
1679 |
+
// using an explicit focus shift as a cue to display the tooltip.
|
1680 |
|
|
|
|
|
|
|
1681 |
|
1682 |
+
if ('focus' === event.type && _this2.isInMouseDown) {
|
1683 |
+
return;
|
1684 |
+
} // Needed in case unsetting is over while delayed set pending, i.e.
|
1685 |
+
// quickly blur/mouseleave before delayedSetIsOver is called
|
1686 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1687 |
|
1688 |
+
_this2.delayedSetIsOver.cancel();
|
1689 |
|
1690 |
+
var isOver = Object(lodash__WEBPACK_IMPORTED_MODULE_6__["includes"])(['focus', 'mouseenter'], event.type);
|
|
|
|
|
1691 |
|
1692 |
+
if (isOver === _this2.state.isOver) {
|
1693 |
+
return;
|
1694 |
+
}
|
|
|
1695 |
|
1696 |
+
if (isDelayed) {
|
1697 |
+
_this2.delayedSetIsOver(isOver);
|
1698 |
+
} else {
|
1699 |
+
_this2.setState({
|
1700 |
+
isOver: isOver
|
1701 |
+
});
|
1702 |
+
}
|
1703 |
+
};
|
1704 |
+
}
|
1705 |
+
/**
|
1706 |
+
* Creates an event callback to handle assignment of the `isInMouseDown`
|
1707 |
+
* instance property in response to a `mousedown` or `mouseup` event.
|
1708 |
+
*
|
1709 |
+
* @param {boolean} isMouseDown Whether handler is to be created for the
|
1710 |
+
* `mousedown` event, as opposed to `mouseup`.
|
1711 |
+
*
|
1712 |
+
* @return {Function} Event callback handler.
|
1713 |
+
*/
|
1714 |
|
1715 |
+
}, {
|
1716 |
+
key: "createSetIsMouseDown",
|
1717 |
+
value: function createSetIsMouseDown(isMouseDown) {
|
1718 |
+
var _this3 = this;
|
1719 |
|
1720 |
+
return function (event) {
|
1721 |
+
// Preserve original child callback behavior
|
1722 |
+
_this3.emitToChild(isMouseDown ? 'onMouseDown' : 'onMouseUp', event); // On mouse down, the next `mouseup` should revert the value of the
|
1723 |
+
// instance property and remove its own event handler. The bind is
|
1724 |
+
// made on the document since the `mouseup` might not occur within
|
1725 |
+
// the bounds of the element.
|
1726 |
|
|
|
1727 |
|
1728 |
+
document[isMouseDown ? 'addEventListener' : 'removeEventListener']('mouseup', _this3.cancelIsMouseDown);
|
1729 |
+
_this3.isInMouseDown = isMouseDown;
|
1730 |
+
};
|
1731 |
+
}
|
1732 |
+
}, {
|
1733 |
+
key: "render",
|
1734 |
+
value: function render() {
|
1735 |
+
var _this$props = this.props,
|
1736 |
+
children = _this$props.children,
|
1737 |
+
position = _this$props.position,
|
1738 |
+
text = _this$props.text,
|
1739 |
+
shortcut = _this$props.shortcut;
|
1740 |
|
1741 |
+
if (_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["Children"].count(children) !== 1) {
|
1742 |
+
if (false) {}
|
|
|
|
|
|
|
|
|
|
|
1743 |
|
1744 |
+
return children;
|
1745 |
+
}
|
|
|
1746 |
|
1747 |
+
var child = _wordpress_element__WEBPACK_IMPORTED_MODULE_5__["Children"].only(children);
|
1748 |
+
var isOver = this.state.isOver;
|
1749 |
+
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["cloneElement"])(child, {
|
1750 |
+
onMouseEnter: this.createToggleIsOver('onMouseEnter', true),
|
1751 |
+
onMouseLeave: this.createToggleIsOver('onMouseLeave'),
|
1752 |
+
onClick: this.createToggleIsOver('onClick'),
|
1753 |
+
onFocus: this.createToggleIsOver('onFocus'),
|
1754 |
+
onBlur: this.createToggleIsOver('onBlur'),
|
1755 |
+
onMouseDown: this.createSetIsMouseDown(true),
|
1756 |
+
children: Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["concatChildren"])(child.props.children, isOver && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])(_popover__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], {
|
1757 |
+
focusOnMount: false,
|
1758 |
+
position: position,
|
1759 |
+
className: "components-tooltip",
|
1760 |
+
"aria-hidden": "true",
|
1761 |
+
animate: false
|
1762 |
+
}, text, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])(_shortcut__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"], {
|
1763 |
+
className: "components-tooltip__shortcut",
|
1764 |
+
shortcut: shortcut
|
1765 |
+
})))
|
1766 |
+
});
|
1767 |
+
}
|
1768 |
+
}]);
|
1769 |
|
1770 |
+
return Tooltip;
|
1771 |
+
}(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["Component"]);
|
1772 |
|
1773 |
+
/* harmony default export */ __webpack_exports__["a"] = (Tooltip);
|
1774 |
+
//# sourceMappingURL=index.js.map
|
1775 |
|
1776 |
/***/ }),
|
1777 |
+
|
1778 |
+
/***/ 111:
|
1779 |
/***/ (function(module, exports, __webpack_require__) {
|
1780 |
|
1781 |
+
"use strict";
|
1782 |
+
|
1783 |
+
|
1784 |
+
var utils = __webpack_require__(71);
|
1785 |
+
var formats = __webpack_require__(86);
|
1786 |
+
var has = Object.prototype.hasOwnProperty;
|
1787 |
+
|
1788 |
+
var arrayPrefixGenerators = {
|
1789 |
+
brackets: function brackets(prefix) {
|
1790 |
+
return prefix + '[]';
|
1791 |
+
},
|
1792 |
+
comma: 'comma',
|
1793 |
+
indices: function indices(prefix, key) {
|
1794 |
+
return prefix + '[' + key + ']';
|
1795 |
+
},
|
1796 |
+
repeat: function repeat(prefix) {
|
1797 |
+
return prefix;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1798 |
}
|
|
|
|
|
1799 |
};
|
1800 |
|
1801 |
+
var isArray = Array.isArray;
|
1802 |
+
var push = Array.prototype.push;
|
1803 |
+
var pushToArray = function (arr, valueOrArray) {
|
1804 |
+
push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1805 |
};
|
1806 |
|
1807 |
+
var toISO = Date.prototype.toISOString;
|
1808 |
|
1809 |
+
var defaultFormat = formats['default'];
|
1810 |
+
var defaults = {
|
1811 |
+
addQueryPrefix: false,
|
1812 |
+
allowDots: false,
|
1813 |
+
charset: 'utf-8',
|
1814 |
+
charsetSentinel: false,
|
1815 |
+
delimiter: '&',
|
1816 |
+
encode: true,
|
1817 |
+
encoder: utils.encode,
|
1818 |
+
encodeValuesOnly: false,
|
1819 |
+
format: defaultFormat,
|
1820 |
+
formatter: formats.formatters[defaultFormat],
|
1821 |
+
// deprecated
|
1822 |
+
indices: false,
|
1823 |
+
serializeDate: function serializeDate(date) {
|
1824 |
+
return toISO.call(date);
|
1825 |
+
},
|
1826 |
+
skipNulls: false,
|
1827 |
+
strictNullHandling: false
|
1828 |
+
};
|
1829 |
|
1830 |
+
var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
|
1831 |
+
return typeof v === 'string'
|
1832 |
+
|| typeof v === 'number'
|
1833 |
+
|| typeof v === 'boolean'
|
1834 |
+
|| typeof v === 'symbol'
|
1835 |
+
|| typeof v === 'bigint';
|
1836 |
+
};
|
1837 |
|
1838 |
+
var stringify = function stringify(
|
1839 |
+
object,
|
1840 |
+
prefix,
|
1841 |
+
generateArrayPrefix,
|
1842 |
+
strictNullHandling,
|
1843 |
+
skipNulls,
|
1844 |
+
encoder,
|
1845 |
+
filter,
|
1846 |
+
sort,
|
1847 |
+
allowDots,
|
1848 |
+
serializeDate,
|
1849 |
+
formatter,
|
1850 |
+
encodeValuesOnly,
|
1851 |
+
charset
|
1852 |
+
) {
|
1853 |
+
var obj = object;
|
1854 |
+
if (typeof filter === 'function') {
|
1855 |
+
obj = filter(prefix, obj);
|
1856 |
+
} else if (obj instanceof Date) {
|
1857 |
+
obj = serializeDate(obj);
|
1858 |
+
} else if (generateArrayPrefix === 'comma' && isArray(obj)) {
|
1859 |
+
obj = obj.join(',');
|
1860 |
+
}
|
1861 |
|
1862 |
+
if (obj === null) {
|
1863 |
+
if (strictNullHandling) {
|
1864 |
+
return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key') : prefix;
|
1865 |
+
}
|
|
|
|
|
1866 |
|
1867 |
+
obj = '';
|
1868 |
+
}
|
1869 |
|
1870 |
+
if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {
|
1871 |
+
if (encoder) {
|
1872 |
+
var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key');
|
1873 |
+
return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value'))];
|
1874 |
+
}
|
1875 |
+
return [formatter(prefix) + '=' + formatter(String(obj))];
|
1876 |
+
}
|
1877 |
|
1878 |
+
var values = [];
|
|
|
1879 |
|
1880 |
+
if (typeof obj === 'undefined') {
|
1881 |
+
return values;
|
1882 |
+
}
|
1883 |
|
1884 |
+
var objKeys;
|
1885 |
+
if (isArray(filter)) {
|
1886 |
+
objKeys = filter;
|
1887 |
+
} else {
|
1888 |
+
var keys = Object.keys(obj);
|
1889 |
+
objKeys = sort ? keys.sort(sort) : keys;
|
1890 |
+
}
|
1891 |
|
1892 |
+
for (var i = 0; i < objKeys.length; ++i) {
|
1893 |
+
var key = objKeys[i];
|
|
|
1894 |
|
1895 |
+
if (skipNulls && obj[key] === null) {
|
1896 |
+
continue;
|
1897 |
+
}
|
1898 |
|
1899 |
+
if (isArray(obj)) {
|
1900 |
+
pushToArray(values, stringify(
|
1901 |
+
obj[key],
|
1902 |
+
typeof generateArrayPrefix === 'function' ? generateArrayPrefix(prefix, key) : prefix,
|
1903 |
+
generateArrayPrefix,
|
1904 |
+
strictNullHandling,
|
1905 |
+
skipNulls,
|
1906 |
+
encoder,
|
1907 |
+
filter,
|
1908 |
+
sort,
|
1909 |
+
allowDots,
|
1910 |
+
serializeDate,
|
1911 |
+
formatter,
|
1912 |
+
encodeValuesOnly,
|
1913 |
+
charset
|
1914 |
+
));
|
1915 |
+
} else {
|
1916 |
+
pushToArray(values, stringify(
|
1917 |
+
obj[key],
|
1918 |
+
prefix + (allowDots ? '.' + key : '[' + key + ']'),
|
1919 |
+
generateArrayPrefix,
|
1920 |
+
strictNullHandling,
|
1921 |
+
skipNulls,
|
1922 |
+
encoder,
|
1923 |
+
filter,
|
1924 |
+
sort,
|
1925 |
+
allowDots,
|
1926 |
+
serializeDate,
|
1927 |
+
formatter,
|
1928 |
+
encodeValuesOnly,
|
1929 |
+
charset
|
1930 |
+
));
|
1931 |
+
}
|
1932 |
+
}
|
1933 |
|
1934 |
+
return values;
|
1935 |
+
};
|
1936 |
|
1937 |
+
var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
|
1938 |
+
if (!opts) {
|
1939 |
+
return defaults;
|
1940 |
+
}
|
1941 |
|
1942 |
+
if (opts.encoder !== null && opts.encoder !== undefined && typeof opts.encoder !== 'function') {
|
1943 |
+
throw new TypeError('Encoder has to be a function.');
|
1944 |
+
}
|
1945 |
|
1946 |
+
var charset = opts.charset || defaults.charset;
|
1947 |
+
if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
|
1948 |
+
throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
|
1949 |
+
}
|
1950 |
|
1951 |
+
var format = formats['default'];
|
1952 |
+
if (typeof opts.format !== 'undefined') {
|
1953 |
+
if (!has.call(formats.formatters, opts.format)) {
|
1954 |
+
throw new TypeError('Unknown format option provided.');
|
1955 |
}
|
1956 |
+
format = opts.format;
|
1957 |
}
|
1958 |
+
var formatter = formats.formatters[format];
|
1959 |
|
1960 |
+
var filter = defaults.filter;
|
1961 |
+
if (typeof opts.filter === 'function' || isArray(opts.filter)) {
|
1962 |
+
filter = opts.filter;
|
1963 |
+
}
|
1964 |
|
1965 |
+
return {
|
1966 |
+
addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix,
|
1967 |
+
allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
|
1968 |
+
charset: charset,
|
1969 |
+
charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
|
1970 |
+
delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,
|
1971 |
+
encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,
|
1972 |
+
encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,
|
1973 |
+
encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,
|
1974 |
+
filter: filter,
|
1975 |
+
formatter: formatter,
|
1976 |
+
serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,
|
1977 |
+
skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,
|
1978 |
+
sort: typeof opts.sort === 'function' ? opts.sort : null,
|
1979 |
+
strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
|
1980 |
+
};
|
1981 |
+
};
|
1982 |
|
1983 |
+
module.exports = function (object, opts) {
|
1984 |
+
var obj = object;
|
1985 |
+
var options = normalizeStringifyOptions(opts);
|
1986 |
|
1987 |
+
var objKeys;
|
1988 |
+
var filter;
|
|
|
1989 |
|
1990 |
+
if (typeof options.filter === 'function') {
|
1991 |
+
filter = options.filter;
|
1992 |
+
obj = filter('', obj);
|
1993 |
+
} else if (isArray(options.filter)) {
|
1994 |
+
filter = options.filter;
|
1995 |
+
objKeys = filter;
|
1996 |
+
}
|
1997 |
|
1998 |
+
var keys = [];
|
1999 |
|
2000 |
+
if (typeof obj !== 'object' || obj === null) {
|
2001 |
+
return '';
|
2002 |
+
}
|
2003 |
|
2004 |
+
var arrayFormat;
|
2005 |
+
if (opts && opts.arrayFormat in arrayPrefixGenerators) {
|
2006 |
+
arrayFormat = opts.arrayFormat;
|
2007 |
+
} else if (opts && 'indices' in opts) {
|
2008 |
+
arrayFormat = opts.indices ? 'indices' : 'repeat';
|
2009 |
+
} else {
|
2010 |
+
arrayFormat = 'indices';
|
2011 |
+
}
|
2012 |
|
2013 |
+
var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
|
2014 |
|
2015 |
+
if (!objKeys) {
|
2016 |
+
objKeys = Object.keys(obj);
|
2017 |
+
}
|
2018 |
|
2019 |
+
if (options.sort) {
|
2020 |
+
objKeys.sort(options.sort);
|
2021 |
+
}
|
2022 |
|
2023 |
+
for (var i = 0; i < objKeys.length; ++i) {
|
2024 |
+
var key = objKeys[i];
|
2025 |
|
2026 |
+
if (options.skipNulls && obj[key] === null) {
|
2027 |
+
continue;
|
2028 |
+
}
|
2029 |
+
pushToArray(keys, stringify(
|
2030 |
+
obj[key],
|
2031 |
+
key,
|
2032 |
+
generateArrayPrefix,
|
2033 |
+
options.strictNullHandling,
|
2034 |
+
options.skipNulls,
|
2035 |
+
options.encode ? options.encoder : null,
|
2036 |
+
options.filter,
|
2037 |
+
options.sort,
|
2038 |
+
options.allowDots,
|
2039 |
+
options.serializeDate,
|
2040 |
+
options.formatter,
|
2041 |
+
options.encodeValuesOnly,
|
2042 |
+
options.charset
|
2043 |
+
));
|
2044 |
+
}
|
2045 |
|
2046 |
+
var joined = keys.join(options.delimiter);
|
2047 |
+
var prefix = options.addQueryPrefix === true ? '?' : '';
|
|
|
2048 |
|
2049 |
+
if (options.charsetSentinel) {
|
2050 |
+
if (options.charset === 'iso-8859-1') {
|
2051 |
+
// encodeURIComponent('✓'), the "numeric entity" representation of a checkmark
|
2052 |
+
prefix += 'utf8=%26%2310003%3B&';
|
2053 |
+
} else {
|
2054 |
+
// encodeURIComponent('✓')
|
2055 |
+
prefix += 'utf8=%E2%9C%93&';
|
2056 |
+
}
|
2057 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2058 |
|
2059 |
+
return joined.length > 0 ? prefix + joined : '';
|
|
|
|
|
|
|
|
|
|
|
|
|
2060 |
};
|
2061 |
|
2062 |
|
2063 |
/***/ }),
|
2064 |
+
|
2065 |
+
/***/ 112:
|
2066 |
/***/ (function(module, exports, __webpack_require__) {
|
2067 |
|
2068 |
+
"use strict";
|
2069 |
|
|
|
|
|
|
|
|
|
|
|
2070 |
|
2071 |
+
var utils = __webpack_require__(71);
|
2072 |
|
2073 |
+
var has = Object.prototype.hasOwnProperty;
|
2074 |
+
var isArray = Array.isArray;
|
|
|
2075 |
|
2076 |
+
var defaults = {
|
2077 |
+
allowDots: false,
|
2078 |
+
allowPrototypes: false,
|
2079 |
+
arrayLimit: 20,
|
2080 |
+
charset: 'utf-8',
|
2081 |
+
charsetSentinel: false,
|
2082 |
+
comma: false,
|
2083 |
+
decoder: utils.decode,
|
2084 |
+
delimiter: '&',
|
2085 |
+
depth: 5,
|
2086 |
+
ignoreQueryPrefix: false,
|
2087 |
+
interpretNumericEntities: false,
|
2088 |
+
parameterLimit: 1000,
|
2089 |
+
parseArrays: true,
|
2090 |
+
plainObjects: false,
|
2091 |
+
strictNullHandling: false
|
2092 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2093 |
|
2094 |
+
var interpretNumericEntities = function (str) {
|
2095 |
+
return str.replace(/&#(\d+);/g, function ($0, numberStr) {
|
2096 |
+
return String.fromCharCode(parseInt(numberStr, 10));
|
2097 |
+
});
|
2098 |
+
};
|
2099 |
|
2100 |
+
var parseArrayValue = function (val, options) {
|
2101 |
+
if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
|
2102 |
+
return val.split(',');
|
2103 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2104 |
|
|
|
|
|
2105 |
return val;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2106 |
};
|
2107 |
|
2108 |
+
var maybeMap = function maybeMap(val, fn) {
|
2109 |
+
if (isArray(val)) {
|
2110 |
+
var mapped = [];
|
2111 |
+
for (var i = 0; i < val.length; i += 1) {
|
2112 |
+
mapped.push(fn(val[i]));
|
2113 |
+
}
|
2114 |
+
return mapped;
|
2115 |
+
}
|
2116 |
+
return fn(val);
|
2117 |
+
};
|
2118 |
|
2119 |
+
// This is what browsers will submit when the ✓ character occurs in an
|
2120 |
+
// application/x-www-form-urlencoded body and the encoding of the page containing
|
2121 |
+
// the form is iso-8859-1, or when the submitted form has an accept-charset
|
2122 |
+
// attribute of iso-8859-1. Presumably also with other charsets that do not contain
|
2123 |
+
// the ✓ character, such as us-ascii.
|
2124 |
+
var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓')
|
|
|
2125 |
|
2126 |
+
// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.
|
2127 |
+
var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
|
2128 |
|
2129 |
+
var parseValues = function parseQueryStringValues(str, options) {
|
2130 |
+
var obj = {};
|
2131 |
+
var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
|
2132 |
+
var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
|
2133 |
+
var parts = cleanStr.split(options.delimiter, limit);
|
2134 |
+
var skipIndex = -1; // Keep track of where the utf8 sentinel was found
|
2135 |
+
var i;
|
2136 |
|
2137 |
+
var charset = options.charset;
|
2138 |
+
if (options.charsetSentinel) {
|
2139 |
+
for (i = 0; i < parts.length; ++i) {
|
2140 |
+
if (parts[i].indexOf('utf8=') === 0) {
|
2141 |
+
if (parts[i] === charsetSentinel) {
|
2142 |
+
charset = 'utf-8';
|
2143 |
+
} else if (parts[i] === isoSentinel) {
|
2144 |
+
charset = 'iso-8859-1';
|
2145 |
+
}
|
2146 |
+
skipIndex = i;
|
2147 |
+
i = parts.length; // The eslint settings do not allow break;
|
2148 |
+
}
|
2149 |
+
}
|
2150 |
+
}
|
2151 |
|
2152 |
+
for (i = 0; i < parts.length; ++i) {
|
2153 |
+
if (i === skipIndex) {
|
2154 |
+
continue;
|
2155 |
+
}
|
2156 |
+
var part = parts[i];
|
2157 |
|
2158 |
+
var bracketEqualsPos = part.indexOf(']=');
|
2159 |
+
var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
|
|
|
|
|
|
|
2160 |
|
2161 |
+
var key, val;
|
2162 |
+
if (pos === -1) {
|
2163 |
+
key = options.decoder(part, defaults.decoder, charset, 'key');
|
2164 |
+
val = options.strictNullHandling ? null : '';
|
2165 |
+
} else {
|
2166 |
+
key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
|
2167 |
+
val = maybeMap(
|
2168 |
+
parseArrayValue(part.slice(pos + 1), options),
|
2169 |
+
function (encodedVal) {
|
2170 |
+
return options.decoder(encodedVal, defaults.decoder, charset, 'value');
|
2171 |
+
}
|
2172 |
+
);
|
2173 |
+
}
|
2174 |
|
2175 |
+
if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
|
2176 |
+
val = interpretNumericEntities(val);
|
2177 |
+
}
|
2178 |
|
2179 |
+
if (part.indexOf('[]=') > -1) {
|
2180 |
+
val = isArray(val) ? [val] : val;
|
2181 |
+
}
|
2182 |
|
2183 |
+
if (has.call(obj, key)) {
|
2184 |
+
obj[key] = utils.combine(obj[key], val);
|
2185 |
+
} else {
|
2186 |
+
obj[key] = val;
|
2187 |
+
}
|
2188 |
+
}
|
2189 |
|
2190 |
+
return obj;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2191 |
};
|
2192 |
|
2193 |
+
var parseObject = function (chain, val, options, valuesParsed) {
|
2194 |
+
var leaf = valuesParsed ? val : parseArrayValue(val, options);
|
2195 |
|
2196 |
+
for (var i = chain.length - 1; i >= 0; --i) {
|
2197 |
+
var obj;
|
2198 |
+
var root = chain[i];
|
2199 |
|
2200 |
+
if (root === '[]' && options.parseArrays) {
|
2201 |
+
obj = [].concat(leaf);
|
2202 |
+
} else {
|
2203 |
+
obj = options.plainObjects ? Object.create(null) : {};
|
2204 |
+
var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
|
2205 |
+
var index = parseInt(cleanRoot, 10);
|
2206 |
+
if (!options.parseArrays && cleanRoot === '') {
|
2207 |
+
obj = { 0: leaf };
|
2208 |
+
} else if (
|
2209 |
+
!isNaN(index)
|
2210 |
+
&& root !== cleanRoot
|
2211 |
+
&& String(index) === cleanRoot
|
2212 |
+
&& index >= 0
|
2213 |
+
&& (options.parseArrays && index <= options.arrayLimit)
|
2214 |
+
) {
|
2215 |
+
obj = [];
|
2216 |
+
obj[index] = leaf;
|
2217 |
+
} else {
|
2218 |
+
obj[cleanRoot] = leaf;
|
2219 |
+
}
|
2220 |
+
}
|
2221 |
|
2222 |
+
leaf = obj; // eslint-disable-line no-param-reassign
|
2223 |
+
}
|
2224 |
|
2225 |
+
return leaf;
|
|
|
|
|
|
|
2226 |
};
|
2227 |
|
2228 |
+
var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
|
2229 |
+
if (!givenKey) {
|
2230 |
+
return;
|
2231 |
+
}
|
2232 |
|
2233 |
+
// Transform dot notation to bracket notation
|
2234 |
+
var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2235 |
|
2236 |
+
// The regex chunks
|
|
|
|
|
|
|
|
|
|
|
|
|
2237 |
|
2238 |
+
var brackets = /(\[[^[\]]*])/;
|
2239 |
+
var child = /(\[[^[\]]*])/g;
|
2240 |
|
2241 |
+
// Get the parent
|
|
|
|
|
2242 |
|
2243 |
+
var segment = options.depth > 0 && brackets.exec(key);
|
2244 |
+
var parent = segment ? key.slice(0, segment.index) : key;
|
2245 |
|
2246 |
+
// Stash the parent if it exists
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2247 |
|
2248 |
+
var keys = [];
|
2249 |
+
if (parent) {
|
2250 |
+
// If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
|
2251 |
+
if (!options.plainObjects && has.call(Object.prototype, parent)) {
|
2252 |
+
if (!options.allowPrototypes) {
|
2253 |
+
return;
|
2254 |
+
}
|
2255 |
+
}
|
2256 |
|
2257 |
+
keys.push(parent);
|
2258 |
+
}
|
2259 |
+
|
2260 |
+
// Loop through children appending to the array until we hit depth
|
2261 |
+
|
2262 |
+
var i = 0;
|
2263 |
+
while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
|
2264 |
+
i += 1;
|
2265 |
+
if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
|
2266 |
+
if (!options.allowPrototypes) {
|
2267 |
+
return;
|
2268 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2269 |
}
|
2270 |
+
keys.push(segment[1]);
|
2271 |
}
|
2272 |
|
2273 |
+
// If there's a remainder, just add whatever is left
|
|
|
|
|
2274 |
|
2275 |
+
if (segment) {
|
2276 |
+
keys.push('[' + key.slice(segment.index) + ']');
|
2277 |
+
}
|
2278 |
|
2279 |
+
return parseObject(keys, val, options, valuesParsed);
|
2280 |
+
};
|
2281 |
|
2282 |
+
var normalizeParseOptions = function normalizeParseOptions(opts) {
|
2283 |
+
if (!opts) {
|
2284 |
+
return defaults;
|
2285 |
+
}
|
2286 |
+
|
2287 |
+
if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {
|
2288 |
+
throw new TypeError('Decoder has to be a function.');
|
2289 |
+
}
|
2290 |
|
2291 |
+
if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
|
2292 |
+
throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
|
2293 |
+
}
|
2294 |
+
var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
|
2295 |
|
2296 |
+
return {
|
2297 |
+
allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
|
2298 |
+
allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
|
2299 |
+
arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
|
2300 |
+
charset: charset,
|
2301 |
+
charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
|
2302 |
+
comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
|
2303 |
+
decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
|
2304 |
+
delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
|
2305 |
+
// eslint-disable-next-line no-implicit-coercion, no-extra-parens
|
2306 |
+
depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,
|
2307 |
+
ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
|
2308 |
+
interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
|
2309 |
+
parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
|
2310 |
+
parseArrays: opts.parseArrays !== false,
|
2311 |
+
plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
|
2312 |
+
strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
|
2313 |
+
};
|
2314 |
+
};
|
2315 |
|
2316 |
+
module.exports = function (str, opts) {
|
2317 |
+
var options = normalizeParseOptions(opts);
|
2318 |
|
2319 |
+
if (str === '' || str === null || typeof str === 'undefined') {
|
2320 |
+
return options.plainObjects ? Object.create(null) : {};
|
2321 |
+
}
|
|
|
2322 |
|
2323 |
+
var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
|
2324 |
+
var obj = options.plainObjects ? Object.create(null) : {};
|
2325 |
|
2326 |
+
// Iterate over the keys and setup the new object
|
|
|
|
|
2327 |
|
2328 |
+
var keys = Object.keys(tempObj);
|
2329 |
+
for (var i = 0; i < keys.length; ++i) {
|
2330 |
+
var key = keys[i];
|
2331 |
+
var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');
|
2332 |
+
obj = utils.merge(obj, newObj, options);
|
2333 |
+
}
|
2334 |
|
2335 |
+
return utils.compact(obj);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2336 |
};
|
2337 |
|
2338 |
|
2339 |
/***/ }),
|
2340 |
+
|
2341 |
+
/***/ 12:
|
2342 |
/***/ (function(module, exports) {
|
2343 |
|
2344 |
+
(function() { module.exports = this["moment"]; }());
|
2345 |
|
2346 |
/***/ }),
|
|
|
|
|
2347 |
|
2348 |
+
/***/ 121:
|
2349 |
+
/***/ (function(module, exports, __webpack_require__) {
|
2350 |
|
2351 |
+
var objectWithoutPropertiesLoose = __webpack_require__(266);
|
|
|
|
|
|
|
2352 |
|
2353 |
+
function _objectWithoutProperties(source, excluded) {
|
2354 |
+
if (source == null) return {};
|
2355 |
+
var target = objectWithoutPropertiesLoose(source, excluded);
|
2356 |
+
var key, i;
|
|
|
|
|
|
|
2357 |
|
2358 |
+
if (Object.getOwnPropertySymbols) {
|
2359 |
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
|
2360 |
|
2361 |
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
2362 |
+
key = sourceSymbolKeys[i];
|
2363 |
+
if (excluded.indexOf(key) >= 0) continue;
|
2364 |
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
2365 |
+
target[key] = source[key];
|
2366 |
+
}
|
2367 |
+
}
|
2368 |
|
2369 |
+
return target;
|
2370 |
+
}
|
2371 |
|
2372 |
+
module.exports = _objectWithoutProperties;
|
|
|
|
|
2373 |
|
2374 |
+
/***/ }),
|
2375 |
|
2376 |
+
/***/ 13:
|
2377 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
2378 |
|
2379 |
+
"use strict";
|
2380 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; });
|
2381 |
+
function _defineProperty(obj, key, value) {
|
2382 |
+
if (key in obj) {
|
2383 |
+
Object.defineProperty(obj, key, {
|
2384 |
+
value: value,
|
2385 |
+
enumerable: true,
|
2386 |
+
configurable: true,
|
2387 |
+
writable: true
|
2388 |
+
});
|
2389 |
+
} else {
|
2390 |
+
obj[key] = value;
|
2391 |
+
}
|
2392 |
|
2393 |
+
return obj;
|
2394 |
+
}
|
2395 |
|
2396 |
/***/ }),
|
|
|
|
|
|
|
|
|
2397 |
|
2398 |
+
/***/ 137:
|
2399 |
+
/***/ (function(module, exports) {
|
2400 |
|
2401 |
+
(function() { module.exports = this["wc"]["currency"]; }());
|
2402 |
|
2403 |
/***/ }),
|
2404 |
+
|
2405 |
+
/***/ 138:
|
2406 |
/***/ (function(module, exports, __webpack_require__) {
|
2407 |
|
2408 |
+
"use strict";
|
2409 |
+
/**
|
2410 |
+
* Copyright (c) 2013-present, Facebook, Inc.
|
2411 |
+
*
|
2412 |
+
* This source code is licensed under the MIT license found in the
|
2413 |
+
* LICENSE file in the root directory of this source tree.
|
2414 |
+
*/
|
2415 |
|
|
|
|
|
|
|
|
|
|
|
2416 |
|
2417 |
|
2418 |
+
var ReactPropTypesSecret = __webpack_require__(139);
|
|
|
|
|
2419 |
|
2420 |
+
function emptyFunction() {}
|
2421 |
+
function emptyFunctionWithReset() {}
|
2422 |
+
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
2423 |
|
2424 |
+
module.exports = function() {
|
2425 |
+
function shim(props, propName, componentName, location, propFullName, secret) {
|
2426 |
+
if (secret === ReactPropTypesSecret) {
|
2427 |
+
// It is still safe when called from React.
|
2428 |
+
return;
|
2429 |
+
}
|
2430 |
+
var err = new Error(
|
2431 |
+
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
2432 |
+
'Use PropTypes.checkPropTypes() to call them. ' +
|
2433 |
+
'Read more at http://fb.me/use-check-prop-types'
|
2434 |
+
);
|
2435 |
+
err.name = 'Invariant Violation';
|
2436 |
+
throw err;
|
2437 |
+
};
|
2438 |
+
shim.isRequired = shim;
|
2439 |
+
function getShim() {
|
2440 |
+
return shim;
|
2441 |
+
};
|
2442 |
+
// Important!
|
2443 |
+
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
|
2444 |
+
var ReactPropTypes = {
|
2445 |
+
array: shim,
|
2446 |
+
bool: shim,
|
2447 |
+
func: shim,
|
2448 |
+
number: shim,
|
2449 |
+
object: shim,
|
2450 |
+
string: shim,
|
2451 |
+
symbol: shim,
|
2452 |
|
2453 |
+
any: shim,
|
2454 |
+
arrayOf: getShim,
|
2455 |
+
element: shim,
|
2456 |
+
elementType: shim,
|
2457 |
+
instanceOf: getShim,
|
2458 |
+
node: shim,
|
2459 |
+
objectOf: getShim,
|
2460 |
+
oneOf: getShim,
|
2461 |
+
oneOfType: getShim,
|
2462 |
+
shape: getShim,
|
2463 |
+
exact: getShim,
|
2464 |
+
|
2465 |
+
checkPropTypes: emptyFunctionWithReset,
|
2466 |
+
resetWarningCache: emptyFunction
|
2467 |
+
};
|
2468 |
|
2469 |
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
|
|
|
2470 |
|
2471 |
+
return ReactPropTypes;
|
|
|
|
|
|
|
2472 |
};
|
2473 |
|
2474 |
|
2475 |
/***/ }),
|
2476 |
+
|
2477 |
+
/***/ 139:
|
2478 |
/***/ (function(module, exports, __webpack_require__) {
|
2479 |
|
2480 |
+
"use strict";
|
2481 |
+
/**
|
2482 |
+
* Copyright (c) 2013-present, Facebook, Inc.
|
2483 |
+
*
|
2484 |
+
* This source code is licensed under the MIT license found in the
|
2485 |
+
* LICENSE file in the root directory of this source tree.
|
2486 |
+
*/
|
2487 |
+
|
2488 |
|
2489 |
+
|
2490 |
+
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
2491 |
+
|
2492 |
+
module.exports = ReactPropTypesSecret;
|
|
|
|
|
|
|
|
|
|
|
2493 |
|
2494 |
|
2495 |
/***/ }),
|
|
|
|
|
2496 |
|
2497 |
+
/***/ 14:
|
2498 |
+
/***/ (function(module, exports) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2499 |
|
2500 |
+
(function() { module.exports = this["React"]; }());
|
2501 |
|
2502 |
/***/ }),
|
2503 |
+
|
2504 |
+
/***/ 140:
|
2505 |
+
/***/ (function(module, exports, __webpack_require__) {
|
2506 |
|
2507 |
"use strict";
|
2508 |
+
|
2509 |
+
|
2510 |
+
var keys = Object.keys;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2511 |
|
2512 |
/**
|
2513 |
+
* Returns true if the two objects are shallow equal, or false otherwise.
|
2514 |
+
*
|
2515 |
+
* @param {import('.').ComparableObject} a First object to compare.
|
2516 |
+
* @param {import('.').ComparableObject} b Second object to compare.
|
2517 |
+
*
|
2518 |
+
* @return {boolean} Whether the two objects are shallow equal.
|
2519 |
*/
|
2520 |
+
function isShallowEqualObjects( a, b ) {
|
2521 |
+
var aKeys, bKeys, i, key, aValue;
|
2522 |
|
2523 |
+
if ( a === b ) {
|
2524 |
+
return true;
|
2525 |
+
}
|
|
|
|
|
|
|
|
|
2526 |
|
2527 |
+
aKeys = keys( a );
|
2528 |
+
bKeys = keys( b );
|
2529 |
+
|
2530 |
+
if ( aKeys.length !== bKeys.length ) {
|
2531 |
+
return false;
|
2532 |
+
}
|
2533 |
+
|
2534 |
+
i = 0;
|
2535 |
+
|
2536 |
+
while ( i < aKeys.length ) {
|
2537 |
+
key = aKeys[ i ];
|
2538 |
+
aValue = a[ key ];
|
2539 |
+
|
2540 |
+
if (
|
2541 |
+
// In iterating only the keys of the first object after verifying
|
2542 |
+
// equal lengths, account for the case that an explicit `undefined`
|
2543 |
+
// value in the first is implicitly undefined in the second.
|
2544 |
+
//
|
2545 |
+
// Example: isShallowEqualObjects( { a: undefined }, { b: 5 } )
|
2546 |
+
( aValue === undefined && ! b.hasOwnProperty( key ) ) ||
|
2547 |
+
aValue !== b[ key ]
|
2548 |
+
) {
|
2549 |
+
return false;
|
2550 |
+
}
|
2551 |
|
2552 |
+
i++;
|
2553 |
+
}
|
2554 |
|
2555 |
+
return true;
|
2556 |
+
}
|
2557 |
|
2558 |
+
module.exports = isShallowEqualObjects;
|
2559 |
|
2560 |
|
2561 |
/***/ }),
|
2562 |
+
|
2563 |
+
/***/ 141:
|
2564 |
/***/ (function(module, exports, __webpack_require__) {
|
2565 |
|
2566 |
"use strict";
|
2567 |
|
|
|
|
|
|
|
2568 |
|
2569 |
+
/**
|
2570 |
+
* Returns true if the two arrays are shallow equal, or false otherwise.
|
2571 |
+
*
|
2572 |
+
* @param {any[]} a First array to compare.
|
2573 |
+
* @param {any[]} b Second array to compare.
|
2574 |
+
*
|
2575 |
+
* @return {boolean} Whether the two arrays are shallow equal.
|
2576 |
+
*/
|
2577 |
+
function isShallowEqualArrays( a, b ) {
|
2578 |
+
var i;
|
2579 |
|
2580 |
+
if ( a === b ) {
|
2581 |
+
return true;
|
2582 |
+
}
|
2583 |
|
2584 |
+
if ( a.length !== b.length ) {
|
2585 |
+
return false;
|
2586 |
+
}
|
2587 |
|
2588 |
+
for ( i = 0; i < a.length; i++ ) {
|
2589 |
+
if ( a[ i ] !== b[ i ] ) {
|
2590 |
+
return false;
|
2591 |
+
}
|
2592 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2593 |
|
2594 |
+
return true;
|
2595 |
}
|
2596 |
|
2597 |
+
module.exports = isShallowEqualArrays;
|
2598 |
+
|
2599 |
|
2600 |
/***/ }),
|
2601 |
+
|
2602 |
+
/***/ 142:
|
2603 |
/***/ (function(module, exports, __webpack_require__) {
|
2604 |
|
2605 |
+
"use strict";
|
2606 |
+
/**
|
2607 |
+
* Copyright (c) 2015-present, Facebook, Inc.
|
2608 |
+
*
|
2609 |
+
* This source code is licensed under the MIT license found in the
|
2610 |
+
* LICENSE file in the root directory of this source tree.
|
2611 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2612 |
|
2613 |
|
|
|
|
|
|
|
2614 |
|
2615 |
+
var React = __webpack_require__(14);
|
2616 |
|
2617 |
+
var REACT_ELEMENT_TYPE =
|
2618 |
+
(typeof Symbol === 'function' && Symbol.for && Symbol.for('react.element')) ||
|
2619 |
+
0xeac7;
|
2620 |
|
2621 |
+
var emptyFunction = __webpack_require__(106);
|
2622 |
+
var invariant = __webpack_require__(143);
|
2623 |
+
var warning = __webpack_require__(144);
|
2624 |
|
2625 |
+
var SEPARATOR = '.';
|
2626 |
+
var SUBSEPARATOR = ':';
|
2627 |
|
2628 |
+
var didWarnAboutMaps = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2629 |
|
2630 |
+
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
2631 |
+
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
|
|
|
|
|
2632 |
|
2633 |
+
function getIteratorFn(maybeIterable) {
|
2634 |
+
var iteratorFn =
|
2635 |
+
maybeIterable &&
|
2636 |
+
((ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL]) ||
|
2637 |
+
maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
2638 |
+
if (typeof iteratorFn === 'function') {
|
2639 |
+
return iteratorFn;
|
2640 |
}
|
2641 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2642 |
|
2643 |
+
function escape(key) {
|
2644 |
+
var escapeRegex = /[=:]/g;
|
2645 |
+
var escaperLookup = {
|
2646 |
+
'=': '=0',
|
2647 |
+
':': '=2'
|
2648 |
+
};
|
2649 |
+
var escapedString = ('' + key).replace(escapeRegex, function(match) {
|
2650 |
+
return escaperLookup[match];
|
2651 |
});
|
2652 |
|
2653 |
+
return '$' + escapedString;
|
2654 |
+
}
|
|
|
|
|
2655 |
|
2656 |
+
function getComponentKey(component, index) {
|
2657 |
+
// Do some typechecking here since we call this blindly. We want to ensure
|
2658 |
+
// that we don't block potential future ES APIs.
|
2659 |
+
if (component && typeof component === 'object' && component.key != null) {
|
2660 |
+
// Explicit key
|
2661 |
+
return escape(component.key);
|
2662 |
+
}
|
2663 |
+
// Implicit key determined by the index in the set
|
2664 |
+
return index.toString(36);
|
2665 |
+
}
|
|
|
|
|
2666 |
|
2667 |
+
function traverseAllChildrenImpl(
|
2668 |
+
children,
|
2669 |
+
nameSoFar,
|
2670 |
+
callback,
|
2671 |
+
traverseContext
|
2672 |
+
) {
|
2673 |
+
var type = typeof children;
|
2674 |
|
2675 |
+
if (type === 'undefined' || type === 'boolean') {
|
2676 |
+
// All of the above are perceived as null.
|
2677 |
+
children = null;
|
2678 |
+
}
|
2679 |
|
2680 |
if (
|
2681 |
+
children === null ||
|
2682 |
+
type === 'string' ||
|
2683 |
+
type === 'number' ||
|
2684 |
+
// The following is inlined from ReactElement. This means we can optimize
|
2685 |
+
// some checks. React Fiber also inlines this logic for similar purposes.
|
2686 |
+
(type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE)
|
|
|
|
|
2687 |
) {
|
2688 |
+
callback(
|
2689 |
+
traverseContext,
|
2690 |
+
children,
|
2691 |
+
// If it's the only child, treat the name as if it was wrapped in an array
|
2692 |
+
// so that it's consistent if the number of children grows.
|
2693 |
+
nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2694 |
);
|
2695 |
+
return 1;
|
2696 |
}
|
2697 |
|
2698 |
+
var child;
|
2699 |
+
var nextName;
|
2700 |
+
var subtreeCount = 0; // Count of children found in the current subtree.
|
2701 |
+
var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
|
2702 |
|
2703 |
+
if (Array.isArray(children)) {
|
2704 |
+
for (var i = 0; i < children.length; i++) {
|
2705 |
+
child = children[i];
|
2706 |
+
nextName = nextNamePrefix + getComponentKey(child, i);
|
2707 |
+
subtreeCount += traverseAllChildrenImpl(
|
2708 |
+
child,
|
2709 |
+
nextName,
|
2710 |
+
callback,
|
2711 |
+
traverseContext
|
2712 |
+
);
|
|
|
|
|
|
|
|
|
|
|
2713 |
}
|
2714 |
+
} else {
|
2715 |
+
var iteratorFn = getIteratorFn(children);
|
2716 |
+
if (iteratorFn) {
|
2717 |
+
if (false) {}
|
2718 |
+
|
2719 |
+
var iterator = iteratorFn.call(children);
|
2720 |
+
var step;
|
2721 |
+
var ii = 0;
|
2722 |
+
while (!(step = iterator.next()).done) {
|
2723 |
+
child = step.value;
|
2724 |
+
nextName = nextNamePrefix + getComponentKey(child, ii++);
|
2725 |
+
subtreeCount += traverseAllChildrenImpl(
|
2726 |
+
child,
|
2727 |
+
nextName,
|
2728 |
+
callback,
|
2729 |
+
traverseContext
|
2730 |
+
);
|
2731 |
+
}
|
2732 |
+
} else if (type === 'object') {
|
2733 |
+
var addendum = '';
|
2734 |
+
if (false) {}
|
2735 |
+
var childrenString = '' + children;
|
2736 |
+
invariant(
|
2737 |
+
false,
|
2738 |
+
'Objects are not valid as a React child (found: %s).%s',
|
2739 |
+
childrenString === '[object Object]'
|
2740 |
+
? 'object with keys {' + Object.keys(children).join(', ') + '}'
|
2741 |
+
: childrenString,
|
2742 |
+
addendum
|
2743 |
+
);
|
2744 |
+
}
|
2745 |
+
}
|
2746 |
+
|
2747 |
+
return subtreeCount;
|
2748 |
+
}
|
2749 |
|
2750 |
+
function traverseAllChildren(children, callback, traverseContext) {
|
2751 |
+
if (children == null) {
|
2752 |
+
return 0;
|
2753 |
}
|
2754 |
|
2755 |
+
return traverseAllChildrenImpl(children, '', callback, traverseContext);
|
2756 |
+
}
|
|
|
|
|
2757 |
|
2758 |
+
var userProvidedKeyEscapeRegex = /\/+/g;
|
2759 |
+
function escapeUserProvidedKey(text) {
|
2760 |
+
return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
|
2761 |
+
}
|
2762 |
|
2763 |
+
function cloneAndReplaceKey(oldElement, newKey) {
|
2764 |
+
return React.cloneElement(
|
2765 |
+
oldElement,
|
2766 |
+
{key: newKey},
|
2767 |
+
oldElement.props !== undefined ? oldElement.props.children : undefined
|
2768 |
+
);
|
2769 |
+
}
|
2770 |
|
2771 |
+
var DEFAULT_POOL_SIZE = 10;
|
2772 |
+
var DEFAULT_POOLER = oneArgumentPooler;
|
|
|
2773 |
|
2774 |
+
var oneArgumentPooler = function(copyFieldsFrom) {
|
2775 |
+
var Klass = this;
|
2776 |
+
if (Klass.instancePool.length) {
|
2777 |
+
var instance = Klass.instancePool.pop();
|
2778 |
+
Klass.call(instance, copyFieldsFrom);
|
2779 |
+
return instance;
|
2780 |
+
} else {
|
2781 |
+
return new Klass(copyFieldsFrom);
|
2782 |
+
}
|
2783 |
};
|
2784 |
|
2785 |
+
var addPoolingTo = function addPoolingTo(CopyConstructor, pooler) {
|
2786 |
+
// Casting as any so that flow ignores the actual implementation and trusts
|
2787 |
+
// it to match the type we declared
|
2788 |
+
var NewKlass = CopyConstructor;
|
2789 |
+
NewKlass.instancePool = [];
|
2790 |
+
NewKlass.getPooled = pooler || DEFAULT_POOLER;
|
2791 |
+
if (!NewKlass.poolSize) {
|
2792 |
+
NewKlass.poolSize = DEFAULT_POOL_SIZE;
|
2793 |
+
}
|
2794 |
+
NewKlass.release = standardReleaser;
|
2795 |
+
return NewKlass;
|
2796 |
};
|
2797 |
|
2798 |
+
var standardReleaser = function standardReleaser(instance) {
|
2799 |
+
var Klass = this;
|
2800 |
+
invariant(
|
2801 |
+
instance instanceof Klass,
|
2802 |
+
'Trying to release an instance into a pool of a different type.'
|
2803 |
+
);
|
2804 |
+
instance.destructor();
|
2805 |
+
if (Klass.instancePool.length < Klass.poolSize) {
|
2806 |
+
Klass.instancePool.push(instance);
|
2807 |
+
}
|
2808 |
+
};
|
2809 |
|
2810 |
+
var fourArgumentPooler = function fourArgumentPooler(a1, a2, a3, a4) {
|
2811 |
+
var Klass = this;
|
2812 |
+
if (Klass.instancePool.length) {
|
2813 |
+
var instance = Klass.instancePool.pop();
|
2814 |
+
Klass.call(instance, a1, a2, a3, a4);
|
2815 |
+
return instance;
|
2816 |
+
} else {
|
2817 |
+
return new Klass(a1, a2, a3, a4);
|
2818 |
+
}
|
2819 |
+
};
|
2820 |
|
2821 |
+
function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) {
|
2822 |
+
this.result = mapResult;
|
2823 |
+
this.keyPrefix = keyPrefix;
|
2824 |
+
this.func = mapFunction;
|
2825 |
+
this.context = mapContext;
|
2826 |
+
this.count = 0;
|
2827 |
+
}
|
2828 |
+
MapBookKeeping.prototype.destructor = function() {
|
2829 |
+
this.result = null;
|
2830 |
+
this.keyPrefix = null;
|
2831 |
+
this.func = null;
|
2832 |
+
this.context = null;
|
2833 |
+
this.count = 0;
|
2834 |
+
};
|
2835 |
+
addPoolingTo(MapBookKeeping, fourArgumentPooler);
|
2836 |
+
|
2837 |
+
function mapSingleChildIntoContext(bookKeeping, child, childKey) {
|
2838 |
+
var result = bookKeeping.result;
|
2839 |
+
var keyPrefix = bookKeeping.keyPrefix;
|
2840 |
+
var func = bookKeeping.func;
|
2841 |
+
var context = bookKeeping.context;
|
2842 |
+
|
2843 |
+
var mappedChild = func.call(context, child, bookKeeping.count++);
|
2844 |
+
if (Array.isArray(mappedChild)) {
|
2845 |
+
mapIntoWithKeyPrefixInternal(
|
2846 |
+
mappedChild,
|
2847 |
+
result,
|
2848 |
+
childKey,
|
2849 |
+
emptyFunction.thatReturnsArgument
|
2850 |
+
);
|
2851 |
+
} else if (mappedChild != null) {
|
2852 |
+
if (React.isValidElement(mappedChild)) {
|
2853 |
+
mappedChild = cloneAndReplaceKey(
|
2854 |
+
mappedChild,
|
2855 |
+
// Keep both the (mapped) and old keys if they differ, just as
|
2856 |
+
// traverseAllChildren used to do for objects as children
|
2857 |
+
keyPrefix +
|
2858 |
+
(mappedChild.key && (!child || child.key !== mappedChild.key)
|
2859 |
+
? escapeUserProvidedKey(mappedChild.key) + '/'
|
2860 |
+
: '') +
|
2861 |
+
childKey
|
2862 |
+
);
|
2863 |
+
}
|
2864 |
+
result.push(mappedChild);
|
2865 |
+
}
|
2866 |
+
}
|
2867 |
|
2868 |
+
function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
|
2869 |
+
var escapedPrefix = '';
|
2870 |
+
if (prefix != null) {
|
2871 |
+
escapedPrefix = escapeUserProvidedKey(prefix) + '/';
|
2872 |
+
}
|
2873 |
+
var traverseContext = MapBookKeeping.getPooled(
|
2874 |
+
array,
|
2875 |
+
escapedPrefix,
|
2876 |
+
func,
|
2877 |
+
context
|
2878 |
+
);
|
2879 |
+
traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
|
2880 |
+
MapBookKeeping.release(traverseContext);
|
2881 |
+
}
|
|
|
2882 |
|
2883 |
+
var numericPropertyRegex = /^\d+$/;
|
2884 |
|
2885 |
+
var warnedAboutNumeric = false;
|
|
|
|
|
|
|
2886 |
|
2887 |
+
function createReactFragment(object) {
|
2888 |
+
if (typeof object !== 'object' || !object || Array.isArray(object)) {
|
2889 |
+
warning(
|
2890 |
+
false,
|
2891 |
+
'React.addons.createFragment only accepts a single object. Got: %s',
|
2892 |
+
object
|
2893 |
+
);
|
2894 |
+
return object;
|
2895 |
+
}
|
2896 |
+
if (React.isValidElement(object)) {
|
2897 |
+
warning(
|
2898 |
+
false,
|
2899 |
+
'React.addons.createFragment does not accept a ReactElement ' +
|
2900 |
+
'without a wrapper object.'
|
2901 |
+
);
|
2902 |
+
return object;
|
2903 |
+
}
|
2904 |
|
2905 |
+
invariant(
|
2906 |
+
object.nodeType !== 1,
|
2907 |
+
'React.addons.createFragment(...): Encountered an invalid child; DOM ' +
|
2908 |
+
'elements are not valid children of React components.'
|
2909 |
+
);
|
2910 |
|
2911 |
+
var result = [];
|
|
|
2912 |
|
2913 |
+
for (var key in object) {
|
2914 |
+
if (false) {}
|
2915 |
+
mapIntoWithKeyPrefixInternal(
|
2916 |
+
object[key],
|
2917 |
+
result,
|
2918 |
+
key,
|
2919 |
+
emptyFunction.thatReturnsArgument
|
2920 |
+
);
|
2921 |
}
|
2922 |
|
2923 |
+
return result;
|
2924 |
}
|
2925 |
|
2926 |
+
module.exports = createReactFragment;
|
2927 |
+
|
2928 |
|
2929 |
/***/ }),
|
2930 |
+
|
2931 |
+
/***/ 143:
|
2932 |
+
/***/ (function(module, exports, __webpack_require__) {
|
2933 |
|
2934 |
"use strict";
|
2935 |
+
/**
|
2936 |
+
* Copyright (c) 2013-present, Facebook, Inc.
|
2937 |
+
*
|
2938 |
+
* This source code is licensed under the MIT license found in the
|
2939 |
+
* LICENSE file in the root directory of this source tree.
|
2940 |
+
*
|
2941 |
+
*/
|
2942 |
|
|
|
|
|
|
|
|
|
|
|
|
|
2943 |
|
|
|
|
|
2944 |
|
2945 |
+
/**
|
2946 |
+
* Use invariant() to assert state which your program assumes to be true.
|
2947 |
+
*
|
2948 |
+
* Provide sprintf-style format (only %s is supported) and arguments
|
2949 |
+
* to provide information about what broke and what you were
|
2950 |
+
* expecting.
|
2951 |
+
*
|
2952 |
+
* The invariant message will be stripped in production, but the invariant
|
2953 |
+
* will remain to ensure logic does not differ in production.
|
2954 |
+
*/
|
2955 |
|
2956 |
+
var validateFormat = function validateFormat(format) {};
|
|
|
|
|
2957 |
|
2958 |
+
if (false) {}
|
|
|
|
|
2959 |
|
2960 |
+
function invariant(condition, format, a, b, c, d, e, f) {
|
2961 |
+
validateFormat(format);
|
2962 |
|
2963 |
+
if (!condition) {
|
2964 |
+
var error;
|
2965 |
+
if (format === undefined) {
|
2966 |
+
error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
|
2967 |
+
} else {
|
2968 |
+
var args = [a, b, c, d, e, f];
|
2969 |
+
var argIndex = 0;
|
2970 |
+
error = new Error(format.replace(/%s/g, function () {
|
2971 |
+
return args[argIndex++];
|
2972 |
+
}));
|
2973 |
+
error.name = 'Invariant Violation';
|
2974 |
+
}
|
2975 |
|
2976 |
+
error.framesToPop = 1; // we don't care about invariant's own frame
|
2977 |
+
throw error;
|
2978 |
+
}
|
2979 |
+
}
|
2980 |
|
2981 |
+
module.exports = invariant;
|
2982 |
|
2983 |
/***/ }),
|
2984 |
+
|
2985 |
+
/***/ 144:
|
2986 |
/***/ (function(module, exports, __webpack_require__) {
|
2987 |
|
2988 |
+
"use strict";
|
2989 |
+
/**
|
2990 |
+
* Copyright (c) 2014-present, Facebook, Inc.
|
2991 |
+
*
|
2992 |
+
* This source code is licensed under the MIT license found in the
|
2993 |
+
* LICENSE file in the root directory of this source tree.
|
2994 |
+
*
|
2995 |
+
*/
|
2996 |
|
|
|
2997 |
|
2998 |
|
2999 |
+
var emptyFunction = __webpack_require__(106);
|
|
|
|
|
|
|
3000 |
|
3001 |
+
/**
|
3002 |
+
* Similar to invariant but only logs a warning if the condition is not met.
|
3003 |
+
* This can be used to log issues in development environments in critical
|
3004 |
+
* paths. Removing the logging code for production environments will keep the
|
3005 |
+
* same logic and follow the same code paths.
|
3006 |
+
*/
|
3007 |
|
3008 |
+
var warning = emptyFunction;
|
3009 |
|
3010 |
+
if (false) { var printWarning; }
|
|
|
|
|
|
|
|
|
|
|
|
|
3011 |
|
3012 |
+
module.exports = warning;
|
3013 |
|
3014 |
/***/ }),
|
3015 |
+
|
3016 |
+
/***/ 145:
|
3017 |
/***/ (function(module, exports, __webpack_require__) {
|
3018 |
|
3019 |
"use strict";
|
3020 |
|
|
|
3021 |
|
3022 |
+
function identifyToken(item) {
|
3023 |
+
// {{/example}}
|
3024 |
+
if (item.match(/^\{\{\//)) {
|
3025 |
+
return {
|
3026 |
+
type: 'componentClose',
|
3027 |
+
value: item.replace(/\W/g, '')
|
3028 |
+
};
|
3029 |
+
}
|
3030 |
+
// {{example /}}
|
3031 |
+
if (item.match(/\/\}\}$/)) {
|
3032 |
+
return {
|
3033 |
+
type: 'componentSelfClosing',
|
3034 |
+
value: item.replace(/\W/g, '')
|
3035 |
+
};
|
3036 |
+
}
|
3037 |
+
// {{example}}
|
3038 |
+
if (item.match(/^\{\{/)) {
|
3039 |
+
return {
|
3040 |
+
type: 'componentOpen',
|
3041 |
+
value: item.replace(/\W/g, '')
|
3042 |
+
};
|
3043 |
+
}
|
3044 |
+
return {
|
3045 |
+
type: 'string',
|
3046 |
+
value: item
|
3047 |
+
};
|
3048 |
+
}
|
3049 |
|
3050 |
+
module.exports = function (mixedString) {
|
3051 |
+
var tokenStrings = mixedString.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g); // split to components and strings
|
3052 |
+
return tokenStrings.map(identifyToken);
|
3053 |
+
};
|
3054 |
+
//# sourceMappingURL=tokenize.js.map
|
3055 |
|
3056 |
/***/ }),
|
3057 |
+
|
3058 |
+
/***/ 146:
|
3059 |
/***/ (function(module, exports, __webpack_require__) {
|
3060 |
|
3061 |
"use strict";
|
3062 |
|
3063 |
+
|
3064 |
+
/**
|
3065 |
+
* This is the common logic for both the Node.js and web browser
|
3066 |
+
* implementations of `debug()`.
|
3067 |
+
*/
|
3068 |
+
function setup(env) {
|
3069 |
+
createDebug.debug = createDebug;
|
3070 |
+
createDebug.default = createDebug;
|
3071 |
+
createDebug.coerce = coerce;
|
3072 |
+
createDebug.disable = disable;
|
3073 |
+
createDebug.enable = enable;
|
3074 |
+
createDebug.enabled = enabled;
|
3075 |
+
createDebug.humanize = __webpack_require__(147);
|
3076 |
+
Object.keys(env).forEach(function (key) {
|
3077 |
+
createDebug[key] = env[key];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3078 |
});
|
3079 |
+
/**
|
3080 |
+
* Active `debug` instances.
|
3081 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3082 |
|
3083 |
+
createDebug.instances = [];
|
3084 |
+
/**
|
3085 |
+
* The currently active debug mode names, and names to skip.
|
3086 |
+
*/
|
3087 |
|
3088 |
+
createDebug.names = [];
|
3089 |
+
createDebug.skips = [];
|
3090 |
+
/**
|
3091 |
+
* Map of special "%n" handling functions, for the debug "format" argument.
|
3092 |
+
*
|
3093 |
+
* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
|
3094 |
+
*/
|
3095 |
|
3096 |
+
createDebug.formatters = {};
|
3097 |
+
/**
|
3098 |
+
* Selects a color for a debug namespace
|
3099 |
+
* @param {String} namespace The namespace string for the for the debug instance to be colored
|
3100 |
+
* @return {Number|String} An ANSI color code for the given namespace
|
3101 |
+
* @api private
|
3102 |
+
*/
|
3103 |
|
3104 |
+
function selectColor(namespace) {
|
3105 |
+
var hash = 0;
|
|
|
3106 |
|
3107 |
+
for (var i = 0; i < namespace.length; i++) {
|
3108 |
+
hash = (hash << 5) - hash + namespace.charCodeAt(i);
|
3109 |
+
hash |= 0; // Convert to 32bit integer
|
3110 |
+
}
|
3111 |
|
3112 |
+
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
|
|
|
3113 |
}
|
3114 |
|
3115 |
+
createDebug.selectColor = selectColor;
|
3116 |
+
/**
|
3117 |
+
* Create a debugger with the given `namespace`.
|
3118 |
+
*
|
3119 |
+
* @param {String} namespace
|
3120 |
+
* @return {Function}
|
3121 |
+
* @api public
|
3122 |
+
*/
|
3123 |
+
|
3124 |
+
function createDebug(namespace) {
|
3125 |
+
var prevTime;
|
3126 |
+
|
3127 |
+
function debug() {
|
3128 |
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
3129 |
+
args[_key] = arguments[_key];
|
3130 |
+
}
|
3131 |
|
3132 |
+
// Disabled?
|
3133 |
+
if (!debug.enabled) {
|
3134 |
+
return;
|
3135 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3136 |
|
3137 |
+
var self = debug; // Set `diff` timestamp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3138 |
|
3139 |
+
var curr = Number(new Date());
|
3140 |
+
var ms = curr - (prevTime || curr);
|
3141 |
+
self.diff = ms;
|
3142 |
+
self.prev = prevTime;
|
3143 |
+
self.curr = curr;
|
3144 |
+
prevTime = curr;
|
3145 |
+
args[0] = createDebug.coerce(args[0]);
|
3146 |
|
3147 |
+
if (typeof args[0] !== 'string') {
|
3148 |
+
// Anything else let's inspect with %O
|
3149 |
+
args.unshift('%O');
|
3150 |
+
} // Apply any `formatters` transformations
|
3151 |
|
|
|
3152 |
|
3153 |
+
var index = 0;
|
3154 |
+
args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) {
|
3155 |
+
// If we encounter an escaped % then don't increase the array index
|
3156 |
+
if (match === '%%') {
|
3157 |
+
return match;
|
3158 |
+
}
|
3159 |
|
3160 |
+
index++;
|
3161 |
+
var formatter = createDebug.formatters[format];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3162 |
|
3163 |
+
if (typeof formatter === 'function') {
|
3164 |
+
var val = args[index];
|
3165 |
+
match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format`
|
3166 |
|
3167 |
+
args.splice(index, 1);
|
3168 |
+
index--;
|
3169 |
+
}
|
3170 |
|
3171 |
+
return match;
|
3172 |
+
}); // Apply env-specific formatting (colors, etc.)
|
3173 |
|
3174 |
+
createDebug.formatArgs.call(self, args);
|
3175 |
+
var logFn = self.log || createDebug.log;
|
3176 |
+
logFn.apply(self, args);
|
3177 |
+
}
|
3178 |
|
3179 |
+
debug.namespace = namespace;
|
3180 |
+
debug.enabled = createDebug.enabled(namespace);
|
3181 |
+
debug.useColors = createDebug.useColors();
|
3182 |
+
debug.color = selectColor(namespace);
|
3183 |
+
debug.destroy = destroy;
|
3184 |
+
debug.extend = extend; // Debug.formatArgs = formatArgs;
|
3185 |
+
// debug.rawLog = rawLog;
|
3186 |
+
// env-specific initialization logic for debug instances
|
3187 |
|
3188 |
+
if (typeof createDebug.init === 'function') {
|
3189 |
+
createDebug.init(debug);
|
3190 |
+
}
|
3191 |
|
3192 |
+
createDebug.instances.push(debug);
|
3193 |
+
return debug;
|
3194 |
+
}
|
|
|
|
|
3195 |
|
3196 |
+
function destroy() {
|
3197 |
+
var index = createDebug.instances.indexOf(this);
|
|
|
3198 |
|
3199 |
+
if (index !== -1) {
|
3200 |
+
createDebug.instances.splice(index, 1);
|
3201 |
+
return true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3202 |
}
|
|
|
|
|
3203 |
|
3204 |
+
return false;
|
3205 |
+
}
|
3206 |
|
3207 |
+
function extend(namespace, delimiter) {
|
3208 |
+
var newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
|
3209 |
+
newDebug.log = this.log;
|
3210 |
+
return newDebug;
|
3211 |
+
}
|
3212 |
+
/**
|
3213 |
+
* Enables a debug mode by namespaces. This can include modes
|
3214 |
+
* separated by a colon and wildcards.
|
3215 |
+
*
|
3216 |
+
* @param {String} namespaces
|
3217 |
+
* @api public
|
3218 |
+
*/
|
3219 |
+
|
3220 |
+
|
3221 |
+
function enable(namespaces) {
|
3222 |
+
createDebug.save(namespaces);
|
3223 |
+
createDebug.names = [];
|
3224 |
+
createDebug.skips = [];
|
3225 |
+
var i;
|
3226 |
+
var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
|
3227 |
+
var len = split.length;
|
3228 |
|
3229 |
+
for (i = 0; i < len; i++) {
|
3230 |
+
if (!split[i]) {
|
3231 |
+
// ignore empty strings
|
3232 |
+
continue;
|
3233 |
+
}
|
3234 |
|
3235 |
+
namespaces = split[i].replace(/\*/g, '.*?');
|
|
|
|
|
|
|
|
|
3236 |
|
3237 |
+
if (namespaces[0] === '-') {
|
3238 |
+
createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
|
3239 |
+
} else {
|
3240 |
+
createDebug.names.push(new RegExp('^' + namespaces + '$'));
|
3241 |
+
}
|
3242 |
+
}
|
3243 |
|
3244 |
+
for (i = 0; i < createDebug.instances.length; i++) {
|
3245 |
+
var instance = createDebug.instances[i];
|
3246 |
+
instance.enabled = createDebug.enabled(instance.namespace);
|
3247 |
+
}
|
3248 |
+
}
|
3249 |
+
/**
|
3250 |
+
* Disable debug output.
|
3251 |
+
*
|
3252 |
+
* @return {String} namespaces
|
3253 |
+
* @api public
|
3254 |
+
*/
|
3255 |
|
|
|
3256 |
|
3257 |
+
function disable() {
|
3258 |
+
var namespaces = [].concat(createDebug.names.map(toNamespace), createDebug.skips.map(toNamespace).map(function (namespace) {
|
3259 |
+
return '-' + namespace;
|
3260 |
+
})).join(',');
|
3261 |
+
createDebug.enable('');
|
3262 |
+
return namespaces;
|
3263 |
+
}
|
3264 |
+
/**
|
3265 |
+
* Returns true if the given mode name is enabled, false otherwise.
|
3266 |
+
*
|
3267 |
+
* @param {String} name
|
3268 |
+
* @return {Boolean}
|
3269 |
+
* @api public
|
3270 |
+
*/
|
3271 |
|
|
|
3272 |
|
3273 |
+
function enabled(name) {
|
3274 |
+
if (name[name.length - 1] === '*') {
|
3275 |
+
return true;
|
3276 |
+
}
|
3277 |
|
3278 |
+
var i;
|
3279 |
+
var len;
|
3280 |
|
3281 |
+
for (i = 0, len = createDebug.skips.length; i < len; i++) {
|
3282 |
+
if (createDebug.skips[i].test(name)) {
|
3283 |
+
return false;
|
3284 |
+
}
|
3285 |
+
}
|
3286 |
|
3287 |
+
for (i = 0, len = createDebug.names.length; i < len; i++) {
|
3288 |
+
if (createDebug.names[i].test(name)) {
|
3289 |
+
return true;
|
3290 |
+
}
|
3291 |
+
}
|
|
|
|
|
3292 |
|
3293 |
+
return false;
|
|
|
|
|
|
|
3294 |
}
|
3295 |
+
/**
|
3296 |
+
* Convert regexp to namespace
|
3297 |
+
*
|
3298 |
+
* @param {RegExp} regxep
|
3299 |
+
* @return {String} namespace
|
3300 |
+
* @api private
|
3301 |
+
*/
|
3302 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3303 |
|
3304 |
+
function toNamespace(regexp) {
|
3305 |
+
return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, '*');
|
|
|
|
|
3306 |
}
|
3307 |
+
/**
|
3308 |
+
* Coerce `val`.
|
3309 |
+
*
|
3310 |
+
* @param {Mixed} val
|
3311 |
+
* @return {Mixed}
|
3312 |
+
* @api private
|
3313 |
+
*/
|
3314 |
|
|
|
|
|
|
|
|
|
|
|
|
|
3315 |
|
3316 |
+
function coerce(val) {
|
3317 |
+
if (val instanceof Error) {
|
3318 |
+
return val.stack || val.message;
|
3319 |
+
}
|
3320 |
|
3321 |
+
return val;
|
3322 |
+
}
|
|
|
3323 |
|
3324 |
+
createDebug.enable(createDebug.load());
|
3325 |
+
return createDebug;
|
|
|
3326 |
}
|
3327 |
|
3328 |
+
module.exports = setup;
|
3329 |
|
3330 |
/***/ }),
|
|
|
|
|
3331 |
|
3332 |
+
/***/ 147:
|
3333 |
+
/***/ (function(module, exports) {
|
3334 |
+
|
3335 |
+
/**
|
3336 |
+
* Helpers.
|
3337 |
+
*/
|
3338 |
|
3339 |
+
var s = 1000;
|
3340 |
+
var m = s * 60;
|
3341 |
+
var h = m * 60;
|
3342 |
+
var d = h * 24;
|
3343 |
+
var w = d * 7;
|
3344 |
+
var y = d * 365.25;
|
|
|
|
|
3345 |
|
3346 |
+
/**
|
3347 |
+
* Parse or format the given `val`.
|
3348 |
+
*
|
3349 |
+
* Options:
|
3350 |
+
*
|
3351 |
+
* - `long` verbose formatting [false]
|
3352 |
+
*
|
3353 |
+
* @param {String|Number} val
|
3354 |
+
* @param {Object} [options]
|
3355 |
+
* @throws {Error} throw an error if val is not a non-empty string or a number
|
3356 |
+
* @return {String|Number}
|
3357 |
+
* @api public
|
3358 |
+
*/
|
3359 |
|
3360 |
+
module.exports = function(val, options) {
|
3361 |
+
options = options || {};
|
3362 |
+
var type = typeof val;
|
3363 |
+
if (type === 'string' && val.length > 0) {
|
3364 |
+
return parse(val);
|
3365 |
+
} else if (type === 'number' && isFinite(val)) {
|
3366 |
+
return options.long ? fmtLong(val) : fmtShort(val);
|
3367 |
+
}
|
3368 |
+
throw new Error(
|
3369 |
+
'val is not a non-empty string or a valid number. val=' +
|
3370 |
+
JSON.stringify(val)
|
3371 |
+
);
|
3372 |
};
|
3373 |
|
3374 |
+
/**
|
3375 |
+
* Parse the given `str` and return milliseconds.
|
3376 |
+
*
|
3377 |
+
* @param {String} str
|
3378 |
+
* @return {Number}
|
3379 |
+
* @api private
|
3380 |
+
*/
|
3381 |
+
|
3382 |
+
function parse(str) {
|
3383 |
+
str = String(str);
|
3384 |
+
if (str.length > 100) {
|
3385 |
+
return;
|
3386 |
+
}
|
3387 |
+
var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
|
3388 |
+
str
|
3389 |
+
);
|
3390 |
+
if (!match) {
|
3391 |
+
return;
|
3392 |
+
}
|
3393 |
+
var n = parseFloat(match[1]);
|
3394 |
+
var type = (match[2] || 'ms').toLowerCase();
|
3395 |
+
switch (type) {
|
3396 |
+
case 'years':
|
3397 |
+
case 'year':
|
3398 |
+
case 'yrs':
|
3399 |
+
case 'yr':
|
3400 |
+
case 'y':
|
3401 |
+
return n * y;
|
3402 |
+
case 'weeks':
|
3403 |
+
case 'week':
|
3404 |
+
case 'w':
|
3405 |
+
return n * w;
|
3406 |
+
case 'days':
|
3407 |
+
case 'day':
|
3408 |
+
case 'd':
|
3409 |
+
return n * d;
|
3410 |
+
case 'hours':
|
3411 |
+
case 'hour':
|
3412 |
+
case 'hrs':
|
3413 |
+
case 'hr':
|
3414 |
+
case 'h':
|
3415 |
+
return n * h;
|
3416 |
+
case 'minutes':
|
3417 |
+
case 'minute':
|
3418 |
+
case 'mins':
|
3419 |
+
case 'min':
|
3420 |
+
case 'm':
|
3421 |
+
return n * m;
|
3422 |
+
case 'seconds':
|
3423 |
+
case 'second':
|
3424 |
+
case 'secs':
|
3425 |
+
case 'sec':
|
3426 |
+
case 's':
|
3427 |
+
return n * s;
|
3428 |
+
case 'milliseconds':
|
3429 |
+
case 'millisecond':
|
3430 |
+
case 'msecs':
|
3431 |
+
case 'msec':
|
3432 |
+
case 'ms':
|
3433 |
+
return n;
|
3434 |
+
default:
|
3435 |
+
return undefined;
|
3436 |
+
}
|
3437 |
+
}
|
3438 |
|
3439 |
+
/**
|
3440 |
+
* Short format for `ms`.
|
3441 |
+
*
|
3442 |
+
* @param {Number} ms
|
3443 |
+
* @return {String}
|
3444 |
+
* @api private
|
3445 |
+
*/
|
3446 |
|
3447 |
+
function fmtShort(ms) {
|
3448 |
+
var msAbs = Math.abs(ms);
|
3449 |
+
if (msAbs >= d) {
|
3450 |
+
return Math.round(ms / d) + 'd';
|
3451 |
+
}
|
3452 |
+
if (msAbs >= h) {
|
3453 |
+
return Math.round(ms / h) + 'h';
|
3454 |
+
}
|
3455 |
+
if (msAbs >= m) {
|
3456 |
+
return Math.round(ms / m) + 'm';
|
3457 |
+
}
|
3458 |
+
if (msAbs >= s) {
|
3459 |
+
return Math.round(ms / s) + 's';
|
3460 |
+
}
|
3461 |
+
return ms + 'ms';
|
3462 |
+
}
|
3463 |
|
3464 |
+
/**
|
3465 |
+
* Long format for `ms`.
|
3466 |
+
*
|
3467 |
+
* @param {Number} ms
|
3468 |
+
* @return {String}
|
3469 |
+
* @api private
|
3470 |
+
*/
|
|
|
|
|
3471 |
|
3472 |
+
function fmtLong(ms) {
|
3473 |
+
var msAbs = Math.abs(ms);
|
3474 |
+
if (msAbs >= d) {
|
3475 |
+
return plural(ms, msAbs, d, 'day');
|
3476 |
+
}
|
3477 |
+
if (msAbs >= h) {
|
3478 |
+
return plural(ms, msAbs, h, 'hour');
|
3479 |
+
}
|
3480 |
+
if (msAbs >= m) {
|
3481 |
+
return plural(ms, msAbs, m, 'minute');
|
3482 |
+
}
|
3483 |
+
if (msAbs >= s) {
|
3484 |
+
return plural(ms, msAbs, s, 'second');
|
3485 |
+
}
|
3486 |
+
return ms + ' ms';
|
3487 |
+
}
|
3488 |
|
3489 |
+
/**
|
3490 |
+
* Pluralization helper.
|
3491 |
+
*/
|
3492 |
|
3493 |
+
function plural(ms, msAbs, n, name) {
|
3494 |
+
var isPlural = msAbs >= n * 1.5;
|
3495 |
+
return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
|
3496 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3497 |
|
3498 |
|
3499 |
/***/ }),
|
3500 |
+
|
3501 |
+
/***/ 15:
|
3502 |
/***/ (function(module, exports) {
|
3503 |
|
3504 |
+
function _defineProperty(obj, key, value) {
|
3505 |
+
if (key in obj) {
|
3506 |
+
Object.defineProperty(obj, key, {
|
3507 |
+
value: value,
|
3508 |
+
enumerable: true,
|
3509 |
+
configurable: true,
|
3510 |
+
writable: true
|
3511 |
+
});
|
3512 |
+
} else {
|
3513 |
+
obj[key] = value;
|
3514 |
+
}
|
3515 |
|
3516 |
+
return obj;
|
3517 |
+
}
|
3518 |
|
3519 |
+
module.exports = _defineProperty;
|
|
|
|
|
3520 |
|
3521 |
+
/***/ }),
|
3522 |
|
3523 |
+
/***/ 16:
|
3524 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
3525 |
|
3526 |
+
"use strict";
|
3527 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutProperties; });
|
3528 |
+
/* harmony import */ var _objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(54);
|
3529 |
|
3530 |
+
function _objectWithoutProperties(source, excluded) {
|
3531 |
+
if (source == null) return {};
|
3532 |
+
var target = Object(_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(source, excluded);
|
3533 |
+
var key, i;
|
|
|
3534 |
|
3535 |
+
if (Object.getOwnPropertySymbols) {
|
3536 |
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
|
|
|
|
|
|
|
3537 |
|
3538 |
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
3539 |
+
key = sourceSymbolKeys[i];
|
3540 |
+
if (excluded.indexOf(key) >= 0) continue;
|
3541 |
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
3542 |
+
target[key] = source[key];
|
3543 |
+
}
|
3544 |
+
}
|
3545 |
|
3546 |
+
return target;
|
3547 |
+
}
|
3548 |
|
3549 |
/***/ }),
|
3550 |
+
|
3551 |
+
/***/ 169:
|
3552 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
3553 |
|
3554 |
"use strict";
|
3555 |
|
3556 |
+
// EXPORTS
|
3557 |
+
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ build_module_speak; });
|
3558 |
+
|
3559 |
+
// UNUSED EXPORTS: setup
|
3560 |
|
3561 |
+
// EXTERNAL MODULE: ./node_modules/@wordpress/dom-ready/build-module/index.js
|
3562 |
+
var build_module = __webpack_require__(65);
|
3563 |
|
3564 |
+
// CONCATENATED MODULE: ./node_modules/@wordpress/a11y/build-module/addContainer.js
|
3565 |
+
/**
|
3566 |
+
* Build the live regions markup.
|
3567 |
+
*
|
3568 |
+
* @param {string} ariaLive Optional. Value for the 'aria-live' attribute, default 'polite'.
|
3569 |
+
*
|
3570 |
+
* @return {HTMLDivElement} The ARIA live region HTML element.
|
3571 |
+
*/
|
3572 |
+
var addContainer = function addContainer(ariaLive) {
|
3573 |
+
ariaLive = ariaLive || 'polite';
|
3574 |
+
var container = document.createElement('div');
|
3575 |
+
container.id = 'a11y-speak-' + ariaLive;
|
3576 |
+
container.className = 'a11y-speak-region';
|
3577 |
+
container.setAttribute('style', 'position: absolute;' + 'margin: -1px;' + 'padding: 0;' + 'height: 1px;' + 'width: 1px;' + 'overflow: hidden;' + 'clip: rect(1px, 1px, 1px, 1px);' + '-webkit-clip-path: inset(50%);' + 'clip-path: inset(50%);' + 'border: 0;' + 'word-wrap: normal !important;');
|
3578 |
+
container.setAttribute('aria-live', ariaLive);
|
3579 |
+
container.setAttribute('aria-relevant', 'additions text');
|
3580 |
+
container.setAttribute('aria-atomic', 'true');
|
3581 |
+
var body = document.querySelector('body');
|
3582 |
|
3583 |
+
if (body) {
|
3584 |
+
body.appendChild(container);
|
|
|
|
|
|
|
3585 |
}
|
|
|
3586 |
|
3587 |
+
return container;
|
3588 |
+
};
|
3589 |
|
3590 |
+
/* harmony default export */ var build_module_addContainer = (addContainer);
|
3591 |
+
//# sourceMappingURL=addContainer.js.map
|
3592 |
+
// CONCATENATED MODULE: ./node_modules/@wordpress/a11y/build-module/clear.js
|
3593 |
+
/**
|
3594 |
+
* Clear the a11y-speak-region elements.
|
3595 |
+
*/
|
3596 |
+
var clear = function clear() {
|
3597 |
+
var regions = document.querySelectorAll('.a11y-speak-region');
|
3598 |
|
3599 |
+
for (var i = 0; i < regions.length; i++) {
|
3600 |
+
regions[i].textContent = '';
|
3601 |
+
}
|
3602 |
+
};
|
3603 |
+
|
3604 |
+
/* harmony default export */ var build_module_clear = (clear);
|
3605 |
+
//# sourceMappingURL=clear.js.map
|
3606 |
+
// CONCATENATED MODULE: ./node_modules/@wordpress/a11y/build-module/filterMessage.js
|
3607 |
+
var previousMessage = '';
|
3608 |
+
/**
|
3609 |
+
* Filter the message to be announced to the screenreader.
|
3610 |
+
*
|
3611 |
+
* @param {string} message The message to be announced.
|
3612 |
+
*
|
3613 |
+
* @return {string} The filtered message.
|
3614 |
+
*/
|
3615 |
|
3616 |
+
var filterMessage = function filterMessage(message) {
|
3617 |
+
/*
|
3618 |
+
* Strip HTML tags (if any) from the message string. Ideally, messages should
|
3619 |
+
* be simple strings, carefully crafted for specific use with A11ySpeak.
|
3620 |
+
* When re-using already existing strings this will ensure simple HTML to be
|
3621 |
+
* stripped out and replaced with a space. Browsers will collapse multiple
|
3622 |
+
* spaces natively.
|
3623 |
+
*/
|
3624 |
+
message = message.replace(/<[^<>]+>/g, ' ');
|
3625 |
|
3626 |
+
if (previousMessage === message) {
|
3627 |
+
message += "\xA0";
|
|
|
|
|
|
|
|
|
3628 |
}
|
|
|
3629 |
|
3630 |
+
previousMessage = message;
|
3631 |
+
return message;
|
3632 |
+
};
|
3633 |
|
3634 |
+
/* harmony default export */ var build_module_filterMessage = (filterMessage);
|
3635 |
+
//# sourceMappingURL=filterMessage.js.map
|
3636 |
+
// CONCATENATED MODULE: ./node_modules/@wordpress/a11y/build-module/index.js
|
3637 |
+
/**
|
3638 |
+
* WordPress dependencies
|
3639 |
+
*/
|
3640 |
|
3641 |
+
/**
|
3642 |
+
* Internal dependencies
|
3643 |
+
*/
|
3644 |
|
|
|
|
|
|
|
3645 |
|
|
|
3646 |
|
|
|
|
|
|
|
|
|
3647 |
|
3648 |
+
/**
|
3649 |
+
* Create the live regions.
|
3650 |
+
*/
|
3651 |
|
3652 |
+
var build_module_setup = function setup() {
|
3653 |
+
var containerPolite = document.getElementById('a11y-speak-polite');
|
3654 |
+
var containerAssertive = document.getElementById('a11y-speak-assertive');
|
3655 |
|
3656 |
+
if (containerPolite === null) {
|
3657 |
+
build_module_addContainer('polite');
|
3658 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3659 |
|
3660 |
+
if (containerAssertive === null) {
|
3661 |
+
build_module_addContainer('assertive');
|
3662 |
+
}
|
3663 |
+
};
|
3664 |
+
/**
|
3665 |
+
* Run setup on domReady.
|
3666 |
+
*/
|
3667 |
|
3668 |
+
Object(build_module["a" /* default */])(build_module_setup);
|
3669 |
+
/**
|
3670 |
+
* Allows you to easily announce dynamic interface updates to screen readers using ARIA live regions.
|
3671 |
+
* This module is inspired by the `speak` function in wp-a11y.js
|
3672 |
+
*
|
3673 |
+
* @param {string} message The message to be announced by Assistive Technologies.
|
3674 |
+
* @param {string} ariaLive Optional. The politeness level for aria-live. Possible values:
|
3675 |
+
* polite or assertive. Default polite.
|
3676 |
+
*
|
3677 |
+
* @example
|
3678 |
+
* ```js
|
3679 |
+
* import { speak } from '@wordpress/a11y';
|
3680 |
+
*
|
3681 |
+
* // For polite messages that shouldn't interrupt what screen readers are currently announcing.
|
3682 |
+
* speak( 'The message you want to send to the ARIA live region' );
|
3683 |
+
*
|
3684 |
+
* // For assertive messages that should interrupt what screen readers are currently announcing.
|
3685 |
+
* speak( 'The message you want to send to the ARIA live region', 'assertive' );
|
3686 |
+
* ```
|
3687 |
+
*/
|
3688 |
|
3689 |
+
var build_module_speak = function speak(message, ariaLive) {
|
3690 |
+
// Clear previous messages to allow repeated strings being read out.
|
3691 |
+
build_module_clear();
|
3692 |
+
message = build_module_filterMessage(message);
|
3693 |
+
var containerPolite = document.getElementById('a11y-speak-polite');
|
3694 |
+
var containerAssertive = document.getElementById('a11y-speak-assertive');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3695 |
|
3696 |
+
if (containerAssertive && 'assertive' === ariaLive) {
|
3697 |
+
containerAssertive.textContent = message;
|
3698 |
+
} else if (containerPolite) {
|
3699 |
+
containerPolite.textContent = message;
|
3700 |
+
}
|
3701 |
+
};
|
3702 |
+
//# sourceMappingURL=index.js.map
|
3703 |
|
3704 |
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3705 |
|
3706 |
+
/***/ 17:
|
3707 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
3708 |
|
3709 |
+
"use strict";
|
3710 |
|
3711 |
+
// EXPORTS
|
3712 |
+
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _toConsumableArray; });
|
|
|
3713 |
|
3714 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
|
3715 |
+
var arrayLikeToArray = __webpack_require__(37);
|
3716 |
|
3717 |
+
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
|
|
|
|
|
3718 |
|
3719 |
+
function _arrayWithoutHoles(arr) {
|
3720 |
+
if (Array.isArray(arr)) return Object(arrayLikeToArray["a" /* default */])(arr);
|
3721 |
+
}
|
3722 |
+
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
|
3723 |
+
function _iterableToArray(iter) {
|
3724 |
+
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
|
3725 |
+
}
|
3726 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
|
3727 |
+
var unsupportedIterableToArray = __webpack_require__(52);
|
3728 |
+
|
3729 |
+
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
|
3730 |
+
function _nonIterableSpread() {
|
3731 |
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3732 |
}
|
3733 |
+
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
|
3734 |
+
|
3735 |
+
|
3736 |
|
3737 |
|
3738 |
+
function _toConsumableArray(arr) {
|
3739 |
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || Object(unsupportedIterableToArray["a" /* default */])(arr) || _nonIterableSpread();
|
3740 |
+
}
|
3741 |
+
|
3742 |
/***/ }),
|
|
|
|
|
3743 |
|
3744 |
+
/***/ 170:
|
3745 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
3746 |
|
3747 |
+
"use strict";
|
3748 |
|
3749 |
+
// EXPORTS
|
3750 |
+
__webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ client_ApiClient; });
|
3751 |
+
__webpack_require__.d(__webpack_exports__, "b", function() { return /* reexport */ MINUTE; });
|
3752 |
+
__webpack_require__.d(__webpack_exports__, "c", function() { return /* reexport */ SECOND; });
|
3753 |
|
3754 |
+
// UNUSED EXPORTS: HOUR
|
|
|
|
|
|
|
|
|
|
|
|
|
3755 |
|
3756 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/regenerator/index.js
|
3757 |
+
var regenerator = __webpack_require__(73);
|
3758 |
+
var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
|
|
|
|
|
|
|
3759 |
|
3760 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
|
3761 |
+
var asyncToGenerator = __webpack_require__(70);
|
3762 |
|
3763 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
3764 |
+
var esm_extends = __webpack_require__(11);
|
|
|
3765 |
|
3766 |
+
// EXTERNAL MODULE: ./node_modules/debug/src/browser.js
|
3767 |
+
var browser = __webpack_require__(98);
|
3768 |
+
var browser_default = /*#__PURE__*/__webpack_require__.n(browser);
|
|
|
3769 |
|
3770 |
+
// EXTERNAL MODULE: external "lodash"
|
3771 |
+
var external_lodash_ = __webpack_require__(2);
|
|
|
|
|
|
|
|
|
3772 |
|
3773 |
+
// CONCATENATED MODULE: ./node_modules/@fresh-data/framework/es/client/calculate-updates.js
|
3774 |
+
var DEFAULT_MAX_UPDATE = 30000;
|
3775 |
+
var DEFAULT_MIN_UPDATE = 500;
|
3776 |
+
/**
|
3777 |
+
* Compares requirements against current state for update information.
|
3778 |
+
* Takes a list of requirements and the current state, both keyed by resourceName,
|
3779 |
+
* and returns update information which contains an array of resourceNames that are
|
3780 |
+
* currently needed and when the next update cycle should run, in milleseconds.
|
3781 |
+
* @param {Object} requirementsByResource List of requirements keyed by resourceName.
|
3782 |
+
* @param {Object} resourceState State indexed by resourceName.
|
3783 |
+
* @param {number} [minUpdate] Minimum nextUpdate value.
|
3784 |
+
* @param {number} [maxUpdate] Maximum nextUpdate value.
|
3785 |
+
* @param {Date} [now] Current time (used for tests).
|
3786 |
+
* @return {Object} updateInfo: { nextUpdate, updates }
|
3787 |
+
* @see combineComponentRequirements
|
3788 |
+
*/
|
3789 |
|
3790 |
+
function calculateUpdates(requirementsByResource, resourceState, minUpdate, maxUpdate, now) {
|
3791 |
+
if (minUpdate === void 0) {
|
3792 |
+
minUpdate = DEFAULT_MIN_UPDATE;
|
3793 |
+
}
|
3794 |
|
3795 |
+
if (maxUpdate === void 0) {
|
3796 |
+
maxUpdate = DEFAULT_MAX_UPDATE;
|
3797 |
+
}
|
3798 |
|
3799 |
+
if (now === void 0) {
|
3800 |
+
now = new Date();
|
3801 |
+
}
|
3802 |
|
3803 |
+
var updateInfo = {
|
3804 |
+
updates: [],
|
3805 |
+
nextUpdate: maxUpdate
|
3806 |
+
};
|
3807 |
+
appendUpdatesForResources(updateInfo, requirementsByResource, resourceState, now);
|
3808 |
+
updateInfo.nextUpdate = Math.max(updateInfo.nextUpdate, minUpdate);
|
3809 |
+
return updateInfo;
|
3810 |
+
}
|
3811 |
+
/**
|
3812 |
+
* Iterates resources to analyze needed updates.
|
3813 |
+
* @param {Object} updateInfo Update information to be mutated by this function.
|
3814 |
+
* @param {Object} requirementsByResource List of requirements keyed by resource.
|
3815 |
+
* @param {Object} resourceState State indexed by resourceName.
|
3816 |
+
* @param {Date} [now] Current time (used for tests).
|
3817 |
+
* @see calculateUpdates
|
3818 |
+
* @see appendUpdatesForResource
|
3819 |
+
*/
|
3820 |
|
3821 |
+
function appendUpdatesForResources(updateInfo, requirementsByResource, resourceState, now) {
|
3822 |
+
Object.keys(requirementsByResource).forEach(function (resourceName) {
|
3823 |
+
var requirements = requirementsByResource[resourceName];
|
3824 |
+
var state = resourceState[resourceName] || {};
|
3825 |
+
appendUpdatesForResource(updateInfo, resourceName, requirements, state, now);
|
3826 |
+
});
|
3827 |
+
}
|
3828 |
+
/**
|
3829 |
+
* Analyzes a resource's requirements against its current state..
|
3830 |
+
* @param {Object} updateInfo Update information to be mutated by this function.
|
3831 |
+
* @param {string} resourceName Name of the resource to be analyzed.
|
3832 |
+
* @param {Object} requirements The requirements for this level of the tree.
|
3833 |
+
* @param {Object} state The current state for this resource.
|
3834 |
+
* @param {Date} [now] Current time (used for tests).
|
3835 |
+
* @see appendUpdatesForResources
|
3836 |
+
*/
|
3837 |
|
3838 |
|
3839 |
+
function appendUpdatesForResource(updateInfo, resourceName, requirements, state, now) {
|
3840 |
+
var lastRequested = state.lastRequested,
|
3841 |
+
lastReceived = state.lastReceived;
|
3842 |
+
var isRequested = lastRequested && (!lastReceived || lastRequested > lastReceived);
|
3843 |
+
var timeoutLeft = getTimeoutLeft(requirements.timeout, state, now);
|
3844 |
+
var freshnessLeft = getFreshnessLeft(requirements.freshness, state, now);
|
3845 |
+
var nextUpdate = isRequested && 0 >= freshnessLeft ? timeoutLeft : freshnessLeft;
|
3846 |
+
updateInfo.nextUpdate = Math.min(updateInfo.nextUpdate, nextUpdate);
|
3847 |
|
3848 |
+
if (nextUpdate < 0) {
|
3849 |
+
updateInfo.updates.push(resourceName);
|
3850 |
+
}
|
3851 |
+
}
|
3852 |
+
/**
|
3853 |
+
* Calculates the remaining time left until a timeout is reached.
|
3854 |
+
* @param {Object} timeout The timeout requirements in milliseconds.
|
3855 |
+
* @param {Object} state The matching state for the resource.
|
3856 |
+
* @param {Date} now Current time (used for tests).
|
3857 |
+
* @return {number} Time left until timeout, or MAX_SAFE_INTEGER if not applicable.
|
3858 |
+
*/
|
3859 |
|
|
|
3860 |
|
3861 |
+
function getTimeoutLeft(timeout, state, now) {
|
3862 |
+
var lastRequested = state.lastRequested || Number.MIN_SAFE_INTEGER;
|
3863 |
+
var lastReceived = state.lastReceived || Number.MIN_SAFE_INTEGER;
|
|
|
|
|
|
|
|
|
3864 |
|
3865 |
+
if (timeout && lastRequested && lastRequested > lastReceived) {
|
3866 |
+
return timeout - (now - lastRequested);
|
3867 |
+
}
|
3868 |
|
3869 |
+
return Number.MAX_SAFE_INTEGER;
|
3870 |
+
}
|
3871 |
+
/**
|
3872 |
+
* Calculates the time remaining until this data is considered stale.
|
3873 |
+
* @param {Object} freshness The freshness requirements in milliseconds.
|
3874 |
+
* @param {Object} state The matching state for the resource.
|
3875 |
+
* @param {Date} now Current time (used for tests).
|
3876 |
+
* @return {number} Time left until stale, or MAX_SAFE_INTEGER if not applicable.
|
3877 |
+
*/
|
3878 |
|
3879 |
+
function getFreshnessLeft(freshness, state, now) {
|
3880 |
+
var lastReceived = state.lastReceived;
|
3881 |
|
3882 |
+
if (freshness && lastReceived) {
|
3883 |
+
return freshness - (now - lastReceived);
|
3884 |
+
}
|
3885 |
+
|
3886 |
+
return freshness ? Number.MIN_SAFE_INTEGER : Number.MAX_SAFE_INTEGER;
|
3887 |
+
}
|
3888 |
+
// CONCATENATED MODULE: ./node_modules/@fresh-data/framework/es/devinfo/components.js
|
3889 |
+
/**
|
3890 |
+
* Generates information about components that require resources.
|
3891 |
+
* @param {Object} client The client to inspect.
|
3892 |
+
* @return {Array} An array of objects that describe components and their requirements.
|
3893 |
+
*/
|
3894 |
+
function components_components(client) {
|
3895 |
+
var componentSummaries = [];
|
3896 |
+
client.requirementsByComponent.forEach(function (requirements, component) {
|
3897 |
+
componentSummaries.push({
|
3898 |
+
component: component,
|
3899 |
+
requirements: requirements
|
3900 |
+
});
|
3901 |
});
|
3902 |
+
return componentSummaries;
|
3903 |
+
}
|
3904 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
|
3905 |
+
var objectWithoutPropertiesLoose = __webpack_require__(54);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3906 |
|
3907 |
+
// CONCATENATED MODULE: ./node_modules/@fresh-data/framework/es/devinfo/resources.js
|
3908 |
|
|
|
|
|
|
|
3909 |
|
|
|
3910 |
|
3911 |
+
|
3912 |
+
/**
|
3913 |
+
* Possible statuses of a resource.
|
3914 |
+
*/
|
3915 |
+
|
3916 |
+
var STATUS = {
|
3917 |
+
overdue: 'overdue',
|
3918 |
+
fetching: 'fetching',
|
3919 |
+
stale: 'stale',
|
3920 |
+
fresh: 'fresh',
|
3921 |
+
notRequired: 'notRequired'
|
3922 |
};
|
3923 |
+
/**
|
3924 |
+
* Compiles information about the resources available from a fresh-data client.
|
3925 |
+
* @param {Object} client A fresh-data client to be inspected.
|
3926 |
+
* @return {Object} A list of detailed resource info objects, keyed by resource name.
|
3927 |
+
*/
|
3928 |
|
3929 |
+
function resources_resources(client) {
|
3930 |
+
var resourceState = client.state.resources || {};
|
3931 |
+
var requirements = client.requirementsByResource;
|
3932 |
+
var resourceNames = Object(external_lodash_["union"])(Object.keys(resourceState), Object.keys(requirements));
|
3933 |
+
return resourceNames.reduce(function (resourceInfo, resourceName) {
|
3934 |
+
var resource = resourceState[resourceName] || {};
|
3935 |
+
var data = resource.data;
|
3936 |
+
var status = getStatus(resource, requirements[resourceName]);
|
3937 |
+
var summary = getSummary(status, resource, requirements[resourceName]);
|
3938 |
+
resourceInfo[resourceName] = {
|
3939 |
+
status: status,
|
3940 |
+
summary: summary,
|
3941 |
+
data: data
|
3942 |
+
};
|
3943 |
|
3944 |
+
if (requirements[resourceName]) {
|
3945 |
+
var combinedRequirement = convertRequirement(requirements[resourceName]);
|
3946 |
+
var componentsRequiring = getComponentsForResource(client.requirementsByComponent, resourceName);
|
3947 |
+
resourceInfo[resourceName].combinedRequirement = combinedRequirement;
|
3948 |
+
resourceInfo[resourceName].componentsRequiring = componentsRequiring;
|
3949 |
+
}
|
3950 |
|
3951 |
+
return resourceInfo;
|
3952 |
+
}, {});
|
3953 |
+
}
|
3954 |
|
3955 |
+
function getStatus(resource, requirement) {
|
3956 |
+
if (!requirement) {
|
3957 |
+
return STATUS.notRequired;
|
3958 |
+
}
|
3959 |
|
3960 |
+
var freshness = requirement.freshness,
|
3961 |
+
timeout = requirement.timeout;
|
3962 |
+
var now = new Date();
|
3963 |
+
var freshnessLeft = getFreshnessLeft(freshness, resource, now);
|
3964 |
|
3965 |
+
if (resource && resource.lastRequested > resource.lastReceived) {
|
3966 |
+
var timeoutLeft = getTimeoutLeft(timeout, resource, now);
|
|
|
3967 |
|
3968 |
+
if (timeoutLeft < 0) {
|
3969 |
+
return STATUS.overdue;
|
3970 |
+
}
|
3971 |
+
|
3972 |
+
return STATUS.fetching;
|
3973 |
+
}
|
3974 |
+
|
3975 |
+
if (freshnessLeft < 0) {
|
3976 |
+
return STATUS.stale;
|
3977 |
}
|
|
|
3978 |
|
3979 |
+
return STATUS.fresh;
|
3980 |
+
}
|
3981 |
|
3982 |
+
function getSummary(status, resource, requirement) {
|
3983 |
+
var now = new Date();
|
|
|
3984 |
|
3985 |
+
switch (status) {
|
3986 |
+
case STATUS.overdue:
|
3987 |
+
var timeout = getTimeoutLeft(requirement.timeout, resource, now);
|
3988 |
+
return "Timed out for " + millisToString(-timeout);
|
|
|
|
|
3989 |
|
3990 |
+
case STATUS.fetching:
|
3991 |
+
var timeoutLeft = getTimeoutLeft(requirement.timeout, resource, now);
|
3992 |
+
return millisToString(timeoutLeft) + " until timeout";
|
|
|
3993 |
|
3994 |
+
case STATUS.stale:
|
3995 |
+
var staleness = getFreshnessLeft(requirement.freshness, resource, now);
|
3996 |
+
return "Stale for " + millisToString(-staleness);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3997 |
|
3998 |
+
case STATUS.fresh:
|
3999 |
+
var freshnessLeft = getFreshnessLeft(requirement.freshness, resource, now);
|
4000 |
+
return "Fresh for " + millisToString(freshnessLeft);
|
|
|
|
|
|
|
4001 |
|
4002 |
+
case STATUS.notRequired:
|
4003 |
+
default:
|
4004 |
+
return 'Resource is not fetched directly.';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4005 |
}
|
4006 |
+
}
|
4007 |
|
4008 |
+
function convertRequirement(requirement) {
|
4009 |
+
if (requirement === void 0) {
|
4010 |
+
requirement = {};
|
4011 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4012 |
|
4013 |
+
var _requirement = requirement,
|
4014 |
+
freshness = _requirement.freshness,
|
4015 |
+
timeout = _requirement.timeout,
|
4016 |
+
other = Object(objectWithoutPropertiesLoose["a" /* default */])(_requirement, ["freshness", "timeout"]);
|
4017 |
|
4018 |
+
return Object(esm_extends["a" /* default */])({
|
4019 |
+
freshness: millisToString(freshness),
|
4020 |
+
timeout: millisToString(timeout)
|
4021 |
+
}, other);
|
4022 |
+
}
|
4023 |
|
4024 |
+
var SECOND_IN_MILLIS = 1000;
|
4025 |
+
var MINUTE_IN_MILLIS = SECOND_IN_MILLIS * 60;
|
4026 |
+
var HOUR_IN_MILLIS = MINUTE_IN_MILLIS * 60;
|
4027 |
+
|
4028 |
+
function millisToString(millis) {
|
4029 |
+
if (!millis) {
|
4030 |
+
return '';
|
4031 |
+
}
|
4032 |
+
|
4033 |
+
var hours = Math.floor(millis / HOUR_IN_MILLIS);
|
4034 |
+
millis -= hours * HOUR_IN_MILLIS;
|
4035 |
+
var minutes = Math.floor(millis / MINUTE_IN_MILLIS);
|
4036 |
+
millis -= minutes * MINUTE_IN_MILLIS;
|
4037 |
+
var seconds = millis / SECOND_IN_MILLIS;
|
4038 |
+
var str = '';
|
4039 |
+
str = hours ? hours + " hours " : str;
|
4040 |
+
str = minutes ? "" + str + minutes + " mins " : str;
|
4041 |
+
str = seconds ? "" + str + seconds + " secs " : str;
|
4042 |
+
return str;
|
4043 |
+
}
|
4044 |
|
4045 |
+
function getComponentsForResource(requirementsByComponent, resourceName) {
|
4046 |
+
var components = [];
|
4047 |
+
requirementsByComponent.forEach(function (requirements, component) {
|
4048 |
+
var requirement = Object(external_lodash_["find"])(requirements, {
|
4049 |
+
resourceName: resourceName
|
4050 |
+
});
|
4051 |
|
4052 |
+
if (requirement) {
|
4053 |
+
components.push(component);
|
4054 |
+
}
|
4055 |
+
});
|
4056 |
+
return components.length ? components : null;
|
4057 |
+
}
|
4058 |
+
// CONCATENATED MODULE: ./node_modules/@fresh-data/framework/es/devinfo/summary.js
|
4059 |
|
4060 |
|
4061 |
+
/**
|
4062 |
+
* A string summary of fresh-data client resources
|
4063 |
+
* @param {Object} resources Resources generated by ./resources.js for a client.
|
4064 |
+
* @return {string} A single-line string summary.
|
4065 |
+
*/
|
4066 |
|
4067 |
+
function summary_summary(resources) {
|
4068 |
+
var resourceNames = Object.keys(resources);
|
4069 |
+
var components = [];
|
4070 |
+
var freshCount = 0;
|
4071 |
+
var staleCount = 0;
|
4072 |
+
var timedOutCount = 0;
|
4073 |
+
var fetchingCount = 0;
|
4074 |
+
var notRequiredCount = 0;
|
4075 |
+
resourceNames.forEach(function (resourceName) {
|
4076 |
+
var resource = resources[resourceName];
|
4077 |
+
components = Object(external_lodash_["union"])(components, resource.componentsRequiring);
|
4078 |
+
|
4079 |
+
switch (resource.status) {
|
4080 |
+
case STATUS.overdue:
|
4081 |
+
timedOutCount++;
|
4082 |
+
break;
|
4083 |
|
4084 |
+
case STATUS.fetching:
|
4085 |
+
fetchingCount++;
|
4086 |
+
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4087 |
|
4088 |
+
case STATUS.stale:
|
4089 |
+
staleCount++;
|
4090 |
+
break;
|
4091 |
|
4092 |
+
case STATUS.fresh:
|
4093 |
+
freshCount++;
|
4094 |
+
break;
|
4095 |
+
|
4096 |
+
case STATUS.notRequired:
|
4097 |
+
notRequiredCount++;
|
4098 |
+
}
|
4099 |
+
});
|
4100 |
+
var text = resourceNames.length + " resources, " + components.length + " components ( ";
|
4101 |
|
4102 |
+
if (freshCount) {
|
4103 |
+
text += freshCount + " fresh ";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4104 |
}
|
|
|
4105 |
|
4106 |
+
if (staleCount) {
|
4107 |
+
text += staleCount + " stale ";
|
4108 |
+
}
|
|
|
|
|
4109 |
|
4110 |
+
if (notRequiredCount) {
|
4111 |
+
text += notRequiredCount + " not required ";
|
4112 |
+
}
|
4113 |
|
4114 |
+
if (timedOutCount) {
|
4115 |
+
text += timedOutCount + " timed out ";
|
4116 |
+
}
|
|
|
4117 |
|
4118 |
+
if (fetchingCount) {
|
4119 |
+
text += fetchingCount + " fetching ";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4120 |
}
|
4121 |
+
|
4122 |
+
text += ')';
|
4123 |
+
return text;
|
4124 |
}
|
4125 |
+
// CONCATENATED MODULE: ./node_modules/@fresh-data/framework/es/devinfo/index.js
|
4126 |
|
|
|
|
|
|
|
|
|
4127 |
|
4128 |
|
4129 |
+
var devInfo = {};
|
4130 |
+
/**
|
4131 |
+
* Checks if devInfo is enabled and available.
|
4132 |
+
* @return {boolean} True if dev info is enabled, false if not.
|
4133 |
+
*/
|
4134 |
|
4135 |
+
function isDevInfoEnabled() {
|
4136 |
+
return true === window.__FRESH_DATA_DEV_INFO__;
|
4137 |
+
}
|
4138 |
+
/**
|
4139 |
+
* Called by the ApiClient class to update the dev info data.
|
4140 |
+
* This is called when the client state or requirements change.
|
4141 |
+
* @param {Object} client The client which has been updated.
|
4142 |
+
*/
|
4143 |
|
4144 |
+
function updateDevInfo(client) {
|
4145 |
+
if (isDevInfoEnabled()) {
|
4146 |
+
devInfo[client.getName()] = generateDevInfo(client);
|
4147 |
+
setDevInfoGlobal();
|
4148 |
+
}
|
4149 |
+
}
|
4150 |
+
/**
|
4151 |
+
* Generates the devInfo object for a given client.
|
4152 |
+
* @param {Object} client The client for which the info is generated.
|
4153 |
+
* @return {Object} A devInfo object with summary, resources, and components.
|
4154 |
+
*/
|
4155 |
|
4156 |
+
function generateDevInfo(client) {
|
4157 |
+
var components = components_components(client);
|
4158 |
+
var resources = resources_resources(client);
|
4159 |
+
var summary = summary_summary(resources);
|
4160 |
+
var info = {
|
4161 |
+
summary: summary,
|
4162 |
+
resources: resources,
|
4163 |
+
components: components
|
4164 |
+
};
|
4165 |
+
return info;
|
4166 |
+
}
|
4167 |
+
/**
|
4168 |
+
* Sets the dev info to the global window context.
|
4169 |
+
* This is so it can be referenced by the JavaScript console in the browser.
|
4170 |
+
*/
|
4171 |
|
|
|
|
|
|
|
4172 |
|
4173 |
+
function setDevInfoGlobal() {
|
4174 |
+
if (!window.freshData) {
|
4175 |
+
window.freshData = devInfo;
|
4176 |
+
}
|
4177 |
+
}
|
4178 |
+
// CONCATENATED MODULE: ./node_modules/@fresh-data/framework/es/utils/constants.js
|
4179 |
+
var SECOND = 1000;
|
4180 |
+
var MINUTE = 60 * SECOND;
|
4181 |
+
var HOUR = 60 * MINUTE;
|
4182 |
+
// CONCATENATED MODULE: ./node_modules/@fresh-data/framework/es/client/requirements.js
|
4183 |
|
|
|
4184 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4185 |
|
4186 |
+
var DEFAULTS = {
|
4187 |
+
freshness: Number.MAX_SAFE_INTEGER,
|
4188 |
+
timeout: 20 * SECOND
|
4189 |
};
|
4190 |
+
/**
|
4191 |
+
* Combines component requirements into a requirements list by resourceName.
|
4192 |
+
* @param {Map} requirementsByComponent Key: Component, Value: requirements parameters with resourceName.
|
4193 |
+
* @return {Object} List of requirements by resource name.
|
4194 |
+
*/
|
4195 |
|
4196 |
+
function combineComponentRequirements(requirementsByComponent) {
|
4197 |
+
var requirementsByResource = {};
|
4198 |
+
requirementsByComponent.forEach(function (requirements) {
|
4199 |
+
requirements.forEach(function (requirement) {
|
4200 |
+
var resourceName = requirement.resourceName,
|
4201 |
+
reqParams = Object(objectWithoutPropertiesLoose["a" /* default */])(requirement, ["resourceName"]);
|
4202 |
|
4203 |
+
addResourceRequirement(requirementsByResource, reqParams, resourceName);
|
4204 |
+
});
|
4205 |
+
});
|
4206 |
+
return requirementsByResource;
|
4207 |
+
}
|
4208 |
+
/**
|
4209 |
+
* Mutates the state of requirementsByResource by adding requirement parameters to it.
|
4210 |
+
* @param {Object} requirementsByResource List of requirements keyed by resourceName.
|
4211 |
+
* @param {Object} reqParams New requirement parameters ( e.g. { freshness: 30 * SECOND } )
|
4212 |
+
* @param {string} resourceName Name of resource being required.
|
4213 |
+
*/
|
4214 |
|
4215 |
+
function addResourceRequirement(requirementsByResource, reqParams, resourceName) {
|
4216 |
+
var requirement = requirementsByResource[resourceName] || Object(esm_extends["a" /* default */])({}, DEFAULTS);
|
4217 |
|
4218 |
+
addRequirementParams(requirement, reqParams);
|
4219 |
+
requirementsByResource[resourceName] = requirement;
|
4220 |
+
}
|
4221 |
+
/**
|
4222 |
+
* Merges new requirement parameters into existing ones.
|
4223 |
+
* @param {Object} requirements Contains requirement parameters.
|
4224 |
+
* @param {Object} reqParams New requirement parameters (freshness, timeout), to be merged with existing ones.
|
4225 |
+
*/
|
4226 |
|
4227 |
+
function addRequirementParams(requirements, reqParams) {
|
4228 |
+
var freshness = requirements.freshness || DEFAULTS.freshness;
|
4229 |
+
var timeout = requirements.timeout || DEFAULTS.timeout;
|
4230 |
+
var newFreshness = reqParams.freshness || Number.MAX_SAFE_INTEGER;
|
4231 |
+
var newTimeout = reqParams.timeout || Number.MAX_SAFE_INTEGER;
|
4232 |
+
requirements.freshness = Math.min(freshness, newFreshness);
|
4233 |
+
requirements.timeout = Math.min(timeout, newTimeout);
|
4234 |
+
}
|
4235 |
+
// CONCATENATED MODULE: ./node_modules/@fresh-data/framework/es/client/index.js
|
4236 |
|
|
|
|
|
|
|
|
|
4237 |
|
|
|
4238 |
|
4239 |
|
|
|
|
|
|
|
4240 |
|
|
|
|
|
|
|
|
|
|
|
4241 |
|
4242 |
|
|
|
|
|
|
|
4243 |
|
4244 |
+
var DEFAULT_READ_OPERATION = 'read';
|
4245 |
|
4246 |
+
function _setTimer(callback, delay) {
|
4247 |
+
return window.setTimeout(callback, delay);
|
4248 |
+
}
|
4249 |
|
4250 |
+
function _clearTimer(id) {
|
4251 |
+
return window.clearTimeout(id);
|
4252 |
+
}
|
4253 |
+
|
4254 |
+
var client_ApiClient = function ApiClient(apiSpec, setTimer, clearTimer) {
|
4255 |
+
var _this = this;
|
4256 |
+
|
4257 |
+
if (setTimer === void 0) {
|
4258 |
+
setTimer = _setTimer;
|
4259 |
+
}
|
4260 |
|
4261 |
+
if (clearTimer === void 0) {
|
4262 |
+
clearTimer = _clearTimer;
|
4263 |
+
}
|
4264 |
+
|
4265 |
+
this.getName = function () {
|
4266 |
+
return _this.name || 'UID_' + _this.uid;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4267 |
};
|
|
|
|
|
|
|
|
|
4268 |
|
4269 |
+
this.mapOperations = function (apiOperations) {
|
4270 |
+
return Object.keys(apiOperations).reduce(function (operations, operationName) {
|
4271 |
+
operations[operationName] = function (resourceNames, data) {
|
4272 |
+
var apiOperation = apiOperations[operationName];
|
4273 |
+
return _this.applyOperation(apiOperation, resourceNames, data);
|
4274 |
+
};
|
4275 |
|
4276 |
+
return operations;
|
4277 |
+
}, {});
|
4278 |
+
};
|
|
|
|
|
4279 |
|
4280 |
+
this.setDataHandlers = function (_ref) {
|
4281 |
+
var dataRequested = _ref.dataRequested,
|
4282 |
+
dataReceived = _ref.dataReceived;
|
4283 |
+
_this.dataHandlers = {
|
4284 |
+
dataRequested: dataRequested,
|
4285 |
+
dataReceived: dataReceived
|
4286 |
+
};
|
4287 |
+
};
|
4288 |
+
|
4289 |
+
this.setState = function (state, now) {
|
4290 |
+
if (now === void 0) {
|
4291 |
+
now = new Date();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4292 |
}
|
|
|
|
|
|
|
|
|
|
|
4293 |
|
4294 |
+
if (_this.state !== state) {
|
4295 |
+
_this.state = state;
|
4296 |
+
|
4297 |
+
_this.updateTimer(now);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4298 |
|
4299 |
+
_this.subscriptionCallbacks.forEach(function (callback) {
|
4300 |
+
return callback(_this);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4301 |
});
|
4302 |
+
|
4303 |
+
updateDevInfo(_this);
|
|
|
4304 |
}
|
4305 |
+
};
|
|
|
4306 |
|
4307 |
+
this.subscribe = function (callback) {
|
4308 |
+
if (_this.subscriptionCallbacks.has(callback)) {
|
4309 |
+
_this.debug('Attempting to add a subscription callback twice:', callback);
|
4310 |
|
4311 |
+
return false;
|
4312 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
4313 |
|
4314 |
+
_this.subscriptionCallbacks.add(callback);
|
4315 |
+
|
4316 |
+
return callback;
|
4317 |
};
|
|
|
4318 |
|
4319 |
+
this.unsubscribe = function (callback) {
|
4320 |
+
if (!_this.subscriptionCallbacks.has(callback)) {
|
4321 |
+
_this.debug('Attempting to remove a callback that is not subscribed:', callback);
|
|
|
|
|
|
|
|
|
|
|
4322 |
|
4323 |
+
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4324 |
}
|
|
|
|
|
|
|
|
|
4325 |
|
4326 |
+
_this.subscriptionCallbacks["delete"](callback);
|
4327 |
+
|
4328 |
+
return callback;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4329 |
};
|
4330 |
+
|
4331 |
+
this.getResource = function (resourceName) {
|
4332 |
+
var resources = _this.state.resources || {};
|
4333 |
+
var resource = resources[resourceName] || {};
|
4334 |
+
return resource;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4335 |
};
|
4336 |
+
|
4337 |
+
this.requireResource = function (componentRequirements) {
|
4338 |
+
return function (requirement, resourceName) {
|
4339 |
+
componentRequirements.push(Object(esm_extends["a" /* default */])({}, requirement, {
|
4340 |
+
resourceName: resourceName
|
4341 |
+
}));
|
4342 |
+
return _this.getResource(resourceName);
|
4343 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4344 |
};
|
4345 |
+
|
4346 |
+
this.getMutations = function () {
|
4347 |
+
return _this.mutations;
|
|
|
4348 |
};
|
4349 |
|
4350 |
+
this.getSelectors = function (componentRequirements) {
|
4351 |
+
return mapFunctions(_this.selectors, _this.getResource, _this.requireResource(componentRequirements));
|
4352 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4353 |
|
4354 |
+
this.clearComponentRequirements = function (component, now) {
|
4355 |
+
if (now === void 0) {
|
4356 |
+
now = new Date();
|
4357 |
+
}
|
4358 |
|
4359 |
+
_this.requirementsByComponent["delete"](component);
|
|
|
4360 |
|
4361 |
+
_this.updateRequirementsByResource(now);
|
4362 |
+
};
|
4363 |
|
4364 |
+
this.setComponentRequirements = function (component, componentRequirements, now) {
|
4365 |
+
if (now === void 0) {
|
4366 |
+
now = new Date();
|
4367 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
4368 |
|
4369 |
+
_this.requirementsByComponent.set(component, componentRequirements);
|
|
|
|
|
|
|
|
|
|
|
|
|
4370 |
|
4371 |
+
_this.updateRequirementsByResource(now);
|
4372 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4373 |
|
4374 |
+
this.setComponentData = function (component, selectorFunc, now) {
|
4375 |
+
if (now === void 0) {
|
4376 |
+
now = new Date();
|
4377 |
+
}
|
4378 |
|
4379 |
+
if (selectorFunc) {
|
4380 |
+
var componentRequirements = [];
|
|
|
4381 |
|
4382 |
+
var selectors = _this.getSelectors(componentRequirements);
|
4383 |
|
4384 |
+
selectorFunc(selectors);
|
|
|
4385 |
|
4386 |
+
_this.setComponentRequirements(component, componentRequirements, now);
|
4387 |
+
} else {
|
4388 |
+
_this.clearComponentRequirements(component, now);
|
|
|
|
|
|
|
|
|
|
|
4389 |
}
|
4390 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4391 |
|
4392 |
+
this.updateRequirementsByResource = function (now) {
|
4393 |
+
if (now === void 0) {
|
4394 |
+
now = new Date();
|
4395 |
+
}
|
4396 |
|
4397 |
+
// TODO: Consider using a reducer style function for resource requirements so we don't
|
4398 |
+
// have to do a deep equals check.
|
4399 |
+
var requirementsByResource = combineComponentRequirements(_this.requirementsByComponent);
|
4400 |
|
4401 |
+
if (!Object(external_lodash_["isEqual"])(_this.requirementsByResource, requirementsByResource)) {
|
4402 |
+
_this.requirementsByResource = requirementsByResource;
|
4403 |
|
4404 |
+
_this.updateTimer(now);
|
4405 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4406 |
};
|
4407 |
|
4408 |
+
this.updateRequirementsData =
|
4409 |
+
/*#__PURE__*/
|
4410 |
+
function () {
|
4411 |
+
var _ref2 = Object(asyncToGenerator["a" /* default */])(
|
4412 |
+
/*#__PURE__*/
|
4413 |
+
regenerator_default.a.mark(function _callee(now) {
|
4414 |
+
var requirementsByComponent, requirementsByResource, state, minUpdate, maxUpdate, resourceState, componentCount, resourceCount, _calculateUpdates, nextUpdate, updates, readOperationName, readOperation;
|
4415 |
+
|
4416 |
+
return regenerator_default.a.wrap(function _callee$(_context) {
|
4417 |
+
while (1) {
|
4418 |
+
switch (_context.prev = _context.next) {
|
4419 |
+
case 0:
|
4420 |
+
requirementsByComponent = _this.requirementsByComponent, requirementsByResource = _this.requirementsByResource, state = _this.state, minUpdate = _this.minUpdate, maxUpdate = _this.maxUpdate;
|
4421 |
+
resourceState = state.resources || {};
|
4422 |
+
componentCount = requirementsByComponent.size;
|
4423 |
+
resourceCount = Object.keys(requirementsByResource).length;
|
4424 |
+
|
4425 |
+
_this.debug("Updating requirements for " + componentCount + " components and " + resourceCount + " resources.");
|
4426 |
+
|
4427 |
+
updateDevInfo(_this);
|
4428 |
+
|
4429 |
+
if (Object(external_lodash_["isEmpty"])(requirementsByResource)) {
|
4430 |
+
_context.next = 20;
|
4431 |
+
break;
|
4432 |
+
}
|
|
|
4433 |
|
4434 |
+
_calculateUpdates = calculateUpdates(requirementsByResource, resourceState, minUpdate, maxUpdate, now), nextUpdate = _calculateUpdates.nextUpdate, updates = _calculateUpdates.updates;
|
|
|
|
|
|
|
|
|
4435 |
|
4436 |
+
if (!(updates && updates.length > 0)) {
|
4437 |
+
_context.next = 15;
|
4438 |
+
break;
|
4439 |
+
}
|
|
|
4440 |
|
4441 |
+
readOperationName = _this.readOperationName;
|
4442 |
+
readOperation = _this.operations[readOperationName];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4443 |
|
4444 |
+
if (readOperation) {
|
4445 |
+
_context.next = 13;
|
4446 |
+
break;
|
4447 |
+
}
|
4448 |
|
4449 |
+
throw new Error("Operation \"" + readOperationName + "\" not found.");
|
4450 |
|
4451 |
+
case 13:
|
4452 |
+
_context.next = 15;
|
4453 |
+
return _this.operations[readOperationName](updates);
|
|
|
4454 |
|
4455 |
+
case 15:
|
4456 |
+
_this.debug("Scheduling next update for " + nextUpdate / 1000 + " seconds.");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4457 |
|
4458 |
+
updateDevInfo(_this);
|
4459 |
|
4460 |
+
_this.updateTimer(now, nextUpdate);
|
|
|
|
|
4461 |
|
4462 |
+
_context.next = 21;
|
4463 |
+
break;
|
4464 |
|
4465 |
+
case 20:
|
4466 |
+
if (_this.timeoutId) {
|
4467 |
+
_this.debug('Unscheduling future updates');
|
4468 |
|
4469 |
+
updateDevInfo(_this);
|
|
|
4470 |
|
4471 |
+
_this.updateTimer(now, null);
|
4472 |
+
}
|
|
|
|
|
4473 |
|
4474 |
+
case 21:
|
4475 |
+
case "end":
|
4476 |
+
return _context.stop();
|
4477 |
+
}
|
|
|
|
|
|
|
|
|
4478 |
}
|
4479 |
+
}, _callee);
|
4480 |
+
}));
|
|
|
|
|
4481 |
|
4482 |
+
return function (_x) {
|
4483 |
+
return _ref2.apply(this, arguments);
|
4484 |
+
};
|
4485 |
+
}();
|
4486 |
|
4487 |
+
this.updateTimer = function (now, nextUpdate) {
|
4488 |
+
if (nextUpdate === void 0) {
|
4489 |
+
nextUpdate = undefined;
|
4490 |
+
}
|
4491 |
|
4492 |
+
var requirementsByResource = _this.requirementsByResource,
|
4493 |
+
state = _this.state,
|
4494 |
+
minUpdate = _this.minUpdate,
|
4495 |
+
maxUpdate = _this.maxUpdate;
|
4496 |
+
var resourceState = state.resources || {};
|
4497 |
|
4498 |
+
if (undefined === nextUpdate) {
|
4499 |
+
nextUpdate = calculateUpdates(requirementsByResource, resourceState, minUpdate, maxUpdate, now).nextUpdate;
|
4500 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4501 |
|
4502 |
+
if (_this.timeoutId) {
|
4503 |
+
_this.clearTimer(_this.timeoutId);
|
4504 |
|
4505 |
+
_this.timeoutId = null;
|
4506 |
+
}
|
|
|
4507 |
|
4508 |
+
if (nextUpdate) {
|
4509 |
+
_this.timeoutId = _this.setTimer(_this.updateRequirementsData, nextUpdate);
|
4510 |
+
}
|
4511 |
+
};
|
4512 |
|
4513 |
+
this.applyOperation =
|
4514 |
+
/*#__PURE__*/
|
4515 |
+
function () {
|
4516 |
+
var _ref3 = Object(asyncToGenerator["a" /* default */])(
|
4517 |
+
/*#__PURE__*/
|
4518 |
+
regenerator_default.a.mark(function _callee3(apiOperation, resourceNames, data) {
|
4519 |
+
var operationResult, values, requests;
|
4520 |
+
return regenerator_default.a.wrap(function _callee3$(_context3) {
|
4521 |
+
while (1) {
|
4522 |
+
switch (_context3.prev = _context3.next) {
|
4523 |
+
case 0:
|
4524 |
+
_context3.prev = 0;
|
4525 |
+
|
4526 |
+
_this.dataRequested(resourceNames);
|
4527 |
+
|
4528 |
+
operationResult = apiOperation(resourceNames, data) || [];
|
4529 |
+
values = Object(external_lodash_["isArray"])(operationResult) ? operationResult : [operationResult];
|
4530 |
+
requests = values.map(
|
4531 |
+
/*#__PURE__*/
|
4532 |
+
function () {
|
4533 |
+
var _ref4 = Object(asyncToGenerator["a" /* default */])(
|
4534 |
+
/*#__PURE__*/
|
4535 |
+
regenerator_default.a.mark(function _callee2(value) {
|
4536 |
+
var resources;
|
4537 |
+
return regenerator_default.a.wrap(function _callee2$(_context2) {
|
4538 |
+
while (1) {
|
4539 |
+
switch (_context2.prev = _context2.next) {
|
4540 |
+
case 0:
|
4541 |
+
_context2.next = 2;
|
4542 |
+
return value;
|
4543 |
+
|
4544 |
+
case 2:
|
4545 |
+
resources = _context2.sent;
|
4546 |
+
|
4547 |
+
_this.dataReceived(resources);
|
4548 |
+
|
4549 |
+
return _context2.abrupt("return", resources);
|
4550 |
+
|
4551 |
+
case 5:
|
4552 |
+
case "end":
|
4553 |
+
return _context2.stop();
|
4554 |
+
}
|
4555 |
+
}
|
4556 |
+
}, _callee2);
|
4557 |
+
}));
|
4558 |
+
|
4559 |
+
return function (_x5) {
|
4560 |
+
return _ref4.apply(this, arguments);
|
4561 |
+
};
|
4562 |
+
}());
|
4563 |
+
_context3.next = 7;
|
4564 |
+
return Promise.all(requests);
|
4565 |
+
|
4566 |
+
case 7:
|
4567 |
+
return _context3.abrupt("return", _context3.sent);
|
4568 |
+
|
4569 |
+
case 10:
|
4570 |
+
_context3.prev = 10;
|
4571 |
+
_context3.t0 = _context3["catch"](0);
|
4572 |
+
|
4573 |
+
_this.debug('Error caught while applying operation: ', apiOperation);
|
4574 |
+
|
4575 |
+
throw _context3.t0;
|
4576 |
+
|
4577 |
+
case 14:
|
4578 |
+
case "end":
|
4579 |
+
return _context3.stop();
|
4580 |
+
}
|
4581 |
+
}
|
4582 |
+
}, _callee3, null, [[0, 10]]);
|
4583 |
+
}));
|
4584 |
|
4585 |
+
return function (_x2, _x3, _x4) {
|
4586 |
+
return _ref3.apply(this, arguments);
|
4587 |
+
};
|
4588 |
+
}();
|
4589 |
|
4590 |
+
this.dataRequested = function (resourceNames) {
|
4591 |
+
if (!_this.dataHandlers) {
|
4592 |
+
_this.debug('Data requested before dataHandlers set. Disregarding.');
|
4593 |
|
4594 |
+
return;
|
4595 |
+
}
|
|
|
4596 |
|
4597 |
+
_this.dataHandlers.dataRequested(resourceNames);
|
4598 |
|
4599 |
+
return resourceNames;
|
4600 |
+
};
|
|
|
|
|
|
|
|
|
4601 |
|
4602 |
+
this.dataReceived = function (resources) {
|
4603 |
+
if (!_this.dataHandlers) {
|
4604 |
+
_this.debug('Data received before dataHandlers set. Disregarding.');
|
4605 |
|
4606 |
+
return;
|
4607 |
+
}
|
|
|
4608 |
|
4609 |
+
_this.dataHandlers.dataReceived(resources);
|
4610 |
|
4611 |
+
return resources;
|
4612 |
+
};
|
|
|
|
|
|
|
|
|
4613 |
|
4614 |
+
var _operations = apiSpec.operations,
|
4615 |
+
mutations = apiSpec.mutations,
|
4616 |
+
_selectors = apiSpec.selectors;
|
4617 |
|
4618 |
+
var _readOperationName = apiSpec.readOperationName || DEFAULT_READ_OPERATION;
|
4619 |
|
4620 |
+
this.uid = Object(external_lodash_["uniqueId"])();
|
4621 |
+
this.name = apiSpec.name;
|
4622 |
+
this.debug = browser_default()("fresh-data:api-client[" + this.uid + "]");
|
4623 |
+
this.debug('New ApiClient for apiSpec: ', apiSpec);
|
4624 |
+
this.operations = _operations && this.mapOperations(_operations);
|
4625 |
+
this.mutations = mutations && mapFunctions(mutations, this.operations);
|
4626 |
+
this.selectors = _selectors;
|
4627 |
+
this.readOperationName = _readOperationName;
|
4628 |
+
this.dataHandlers = null;
|
4629 |
+
this.subscriptionCallbacks = new Set();
|
4630 |
+
this.requirementsByComponent = new Map();
|
4631 |
+
this.requirementsByResource = {};
|
4632 |
+
this.minUpdate = DEFAULT_MIN_UPDATE;
|
4633 |
+
this.maxUpdate = DEFAULT_MAX_UPDATE;
|
4634 |
+
this.setTimer = setTimer;
|
4635 |
+
this.clearTimer = clearTimer;
|
4636 |
+
this.timeoutId = null;
|
4637 |
+
this.state = {};
|
4638 |
+
updateDevInfo(this);
|
4639 |
+
};
|
4640 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4641 |
|
|
|
|
|
|
|
|
|
|
|
4642 |
|
4643 |
+
function mapFunctions(functionsByName) {
|
4644 |
+
for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
4645 |
+
params[_key - 1] = arguments[_key];
|
4646 |
+
}
|
4647 |
|
4648 |
+
return Object.keys(functionsByName).reduce(function (mappedFunctions, functionName) {
|
4649 |
+
mappedFunctions[functionName] = functionsByName[functionName].apply(functionsByName, params);
|
4650 |
+
return mappedFunctions;
|
4651 |
+
}, {});
|
4652 |
}
|
4653 |
+
// CONCATENATED MODULE: ./node_modules/@fresh-data/framework/es/index.js
|
4654 |
+
/**
|
4655 |
+
* This is the public API of Fresh Data.
|
4656 |
+
* Below are the parts that can be used within your own application
|
4657 |
+
* in order to use Fresh Data with your own APIs.
|
4658 |
+
*/
|
4659 |
+
// Instantiate an ApiClient with a given apiSpec.
|
4660 |
+
// Use these to express requirement times like freshness and timeout.
|
4661 |
|
|
|
|
|
|
|
|
|
4662 |
|
4663 |
|
4664 |
/***/ }),
|
4665 |
+
|
4666 |
+
/***/ 174:
|
4667 |
/***/ (function(module, exports, __webpack_require__) {
|
4668 |
|
4669 |
+
"use strict";
|
4670 |
+
|
4671 |
+
|
4672 |
+
if (true) {
|
4673 |
+
module.exports = __webpack_require__(210);
|
4674 |
+
} else {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4675 |
|
4676 |
|
4677 |
/***/ }),
|
4678 |
+
|
4679 |
+
/***/ 18:
|
4680 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
4681 |
|
4682 |
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4683 |
|
4684 |
+
// EXPORTS
|
4685 |
+
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ BACKSPACE; });
|
4686 |
+
__webpack_require__.d(__webpack_exports__, "h", function() { return /* binding */ TAB; });
|
4687 |
+
__webpack_require__.d(__webpack_exports__, "c", function() { return /* binding */ ENTER; });
|
4688 |
+
__webpack_require__.d(__webpack_exports__, "d", function() { return /* binding */ ESCAPE; });
|
4689 |
+
__webpack_require__.d(__webpack_exports__, "g", function() { return /* binding */ SPACE; });
|
4690 |
+
__webpack_require__.d(__webpack_exports__, "e", function() { return /* binding */ LEFT; });
|
4691 |
+
__webpack_require__.d(__webpack_exports__, "i", function() { return /* binding */ UP; });
|
4692 |
+
__webpack_require__.d(__webpack_exports__, "f", function() { return /* binding */ RIGHT; });
|
4693 |
+
__webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ DOWN; });
|
4694 |
|
4695 |
+
// UNUSED EXPORTS: DELETE, F10, ALT, CTRL, COMMAND, SHIFT, modifiers, rawShortcut, displayShortcutList, displayShortcut, shortcutAriaLabel, isKeyboardEvent
|
4696 |
|
4697 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
4698 |
+
var defineProperty = __webpack_require__(13);
|
|
|
4699 |
|
4700 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 3 modules
|
4701 |
+
var toConsumableArray = __webpack_require__(17);
|
4702 |
|
4703 |
+
// EXTERNAL MODULE: external "lodash"
|
4704 |
+
var external_lodash_ = __webpack_require__(2);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4705 |
|
4706 |
+
// EXTERNAL MODULE: external {"this":["wp","i18n"]}
|
4707 |
+
var external_this_wp_i18n_ = __webpack_require__(3);
|
4708 |
|
4709 |
+
// CONCATENATED MODULE: ./node_modules/@wordpress/keycodes/build-module/platform.js
|
4710 |
+
/**
|
4711 |
+
* External dependencies
|
4712 |
+
*/
|
4713 |
|
4714 |
+
/**
|
4715 |
+
* Return true if platform is MacOS.
|
4716 |
+
*
|
4717 |
+
* @param {Object} _window window object by default; used for DI testing.
|
4718 |
+
*
|
4719 |
+
* @return {boolean} True if MacOS; false otherwise.
|
4720 |
+
*/
|
4721 |
|
4722 |
+
function isAppleOS() {
|
4723 |
+
var _window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4724 |
|
4725 |
+
var platform = _window.navigator.platform;
|
4726 |
+
return platform.indexOf('Mac') !== -1 || Object(external_lodash_["includes"])(['iPad', 'iPhone'], platform);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4727 |
}
|
4728 |
+
//# sourceMappingURL=platform.js.map
|
4729 |
+
// CONCATENATED MODULE: ./node_modules/@wordpress/keycodes/build-module/index.js
|
4730 |
|
4731 |
|
|
|
|
|
|
|
4732 |
|
4733 |
+
/**
|
4734 |
+
* Note: The order of the modifier keys in many of the [foo]Shortcut()
|
4735 |
+
* functions in this file are intentional and should not be changed. They're
|
4736 |
+
* designed to fit with the standard menu keyboard shortcuts shown in the
|
4737 |
+
* user's platform.
|
4738 |
+
*
|
4739 |
+
* For example, on MacOS menu shortcuts will place Shift before Command, but
|
4740 |
+
* on Windows Control will usually come first. So don't provide your own
|
4741 |
+
* shortcut combos directly to keyboardShortcut().
|
4742 |
+
*/
|
4743 |
|
4744 |
+
/**
|
4745 |
+
* External dependencies
|
4746 |
+
*/
|
4747 |
|
4748 |
+
/**
|
4749 |
+
* WordPress dependencies
|
4750 |
+
*/
|
4751 |
|
|
|
|
|
|
|
4752 |
|
4753 |
+
/**
|
4754 |
+
* Internal dependencies
|
4755 |
+
*/
|
4756 |
|
|
|
4757 |
|
4758 |
+
/**
|
4759 |
+
* @typedef {'primary'|'primaryShift'|'primaryAlt'|'secondary'|'access'|'ctrl'|'alt'|'ctrlShift'|'shift'|'shiftAlt'} WPKeycodeModifier
|
4760 |
+
*/
|
4761 |
|
4762 |
+
/**
|
4763 |
+
* An object of handler functions for each of the possible modifier
|
4764 |
+
* combinations. A handler will return a value for a given key.
|
4765 |
+
*
|
4766 |
+
* @typedef {{[M in WPKeycodeModifier]:(key:string)=>any}} WPKeycodeHandlerByModifier
|
4767 |
+
*/
|
4768 |
|
4769 |
+
/**
|
4770 |
+
* Keycode for BACKSPACE key.
|
4771 |
+
*/
|
4772 |
|
4773 |
+
var BACKSPACE = 8;
|
4774 |
+
/**
|
4775 |
+
* Keycode for TAB key.
|
4776 |
+
*/
|
4777 |
|
4778 |
+
var TAB = 9;
|
4779 |
+
/**
|
4780 |
+
* Keycode for ENTER key.
|
4781 |
+
*/
|
4782 |
|
4783 |
+
var ENTER = 13;
|
4784 |
+
/**
|
4785 |
+
* Keycode for ESCAPE key.
|
4786 |
+
*/
|
4787 |
|
4788 |
+
var ESCAPE = 27;
|
4789 |
+
/**
|
4790 |
+
* Keycode for SPACE key.
|
4791 |
+
*/
|
4792 |
|
4793 |
+
var SPACE = 32;
|
4794 |
+
/**
|
4795 |
+
* Keycode for LEFT key.
|
4796 |
+
*/
|
|
|
|
|
4797 |
|
4798 |
+
var LEFT = 37;
|
4799 |
+
/**
|
4800 |
+
* Keycode for UP key.
|
4801 |
+
*/
|
4802 |
|
4803 |
+
var UP = 38;
|
4804 |
+
/**
|
4805 |
+
* Keycode for RIGHT key.
|
4806 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4807 |
|
4808 |
+
var RIGHT = 39;
|
4809 |
+
/**
|
4810 |
+
* Keycode for DOWN key.
|
4811 |
+
*/
|
4812 |
|
4813 |
+
var DOWN = 40;
|
4814 |
+
/**
|
4815 |
+
* Keycode for DELETE key.
|
4816 |
+
*/
|
4817 |
|
4818 |
+
var DELETE = 46;
|
4819 |
+
/**
|
4820 |
+
* Keycode for F10 key.
|
4821 |
+
*/
|
4822 |
|
4823 |
+
var F10 = 121;
|
4824 |
+
/**
|
4825 |
+
* Keycode for ALT key.
|
4826 |
+
*/
|
4827 |
|
4828 |
+
var ALT = 'alt';
|
4829 |
+
/**
|
4830 |
+
* Keycode for CTRL key.
|
4831 |
+
*/
|
4832 |
|
4833 |
+
var CTRL = 'ctrl';
|
4834 |
+
/**
|
4835 |
+
* Keycode for COMMAND/META key.
|
4836 |
+
*/
|
|
|
4837 |
|
4838 |
+
var COMMAND = 'meta';
|
4839 |
+
/**
|
4840 |
+
* Keycode for SHIFT key.
|
4841 |
+
*/
|
4842 |
|
4843 |
+
var SHIFT = 'shift';
|
4844 |
+
/**
|
4845 |
+
* Object that contains functions that return the available modifier
|
4846 |
+
* depending on platform.
|
4847 |
+
*
|
4848 |
+
* - `primary`: takes a isApple function as a parameter.
|
4849 |
+
* - `primaryShift`: takes a isApple function as a parameter.
|
4850 |
+
* - `primaryAlt`: takes a isApple function as a parameter.
|
4851 |
+
* - `secondary`: takes a isApple function as a parameter.
|
4852 |
+
* - `access`: takes a isApple function as a parameter.
|
4853 |
+
* - `ctrl`
|
4854 |
+
* - `alt`
|
4855 |
+
* - `ctrlShift`
|
4856 |
+
* - `shift`
|
4857 |
+
* - `shiftAlt`
|
4858 |
+
*/
|
4859 |
+
|
4860 |
+
var modifiers = {
|
4861 |
+
primary: function primary(_isApple) {
|
4862 |
+
return _isApple() ? [COMMAND] : [CTRL];
|
4863 |
+
},
|
4864 |
+
primaryShift: function primaryShift(_isApple) {
|
4865 |
+
return _isApple() ? [SHIFT, COMMAND] : [CTRL, SHIFT];
|
4866 |
+
},
|
4867 |
+
primaryAlt: function primaryAlt(_isApple) {
|
4868 |
+
return _isApple() ? [ALT, COMMAND] : [CTRL, ALT];
|
4869 |
+
},
|
4870 |
+
secondary: function secondary(_isApple) {
|
4871 |
+
return _isApple() ? [SHIFT, ALT, COMMAND] : [CTRL, SHIFT, ALT];
|
4872 |
+
},
|
4873 |
+
access: function access(_isApple) {
|
4874 |
+
return _isApple() ? [CTRL, ALT] : [SHIFT, ALT];
|
4875 |
+
},
|
4876 |
+
ctrl: function ctrl() {
|
4877 |
+
return [CTRL];
|
4878 |
+
},
|
4879 |
+
alt: function alt() {
|
4880 |
+
return [ALT];
|
4881 |
+
},
|
4882 |
+
ctrlShift: function ctrlShift() {
|
4883 |
+
return [CTRL, SHIFT];
|
4884 |
+
},
|
4885 |
+
shift: function shift() {
|
4886 |
+
return [SHIFT];
|
4887 |
+
},
|
4888 |
+
shiftAlt: function shiftAlt() {
|
4889 |
+
return [SHIFT, ALT];
|
4890 |
}
|
4891 |
+
};
|
4892 |
+
/**
|
4893 |
+
* An object that contains functions to get raw shortcuts.
|
4894 |
+
* E.g. rawShortcut.primary( 'm' ) will return 'meta+m' on Mac.
|
4895 |
+
* These are intended for user with the KeyboardShortcuts component or TinyMCE.
|
4896 |
+
*
|
4897 |
+
* @type {WPKeycodeHandlerByModifier} Keyed map of functions to raw shortcuts.
|
4898 |
+
*/
|
4899 |
+
|
4900 |
+
var rawShortcut = Object(external_lodash_["mapValues"])(modifiers, function (modifier) {
|
4901 |
+
return function (character) {
|
4902 |
+
var _isApple = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : isAppleOS;
|
4903 |
+
|
4904 |
+
return [].concat(Object(toConsumableArray["a" /* default */])(modifier(_isApple)), [character.toLowerCase()]).join('+');
|
4905 |
+
};
|
4906 |
});
|
4907 |
+
/**
|
4908 |
+
* Return an array of the parts of a keyboard shortcut chord for display
|
4909 |
+
* E.g displayShortcutList.primary( 'm' ) will return [ '⌘', 'M' ] on Mac.
|
4910 |
+
*
|
4911 |
+
* @type {WPKeycodeHandlerByModifier} Keyed map of functions to shortcut
|
4912 |
+
* sequences.
|
4913 |
+
*/
|
4914 |
|
4915 |
+
var displayShortcutList = Object(external_lodash_["mapValues"])(modifiers, function (modifier) {
|
4916 |
+
return function (character) {
|
4917 |
+
var _replacementKeyMap;
|
4918 |
|
4919 |
+
var _isApple = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : isAppleOS;
|
|
|
|
|
4920 |
|
4921 |
+
var isApple = _isApple();
|
|
|
4922 |
|
4923 |
+
var replacementKeyMap = (_replacementKeyMap = {}, Object(defineProperty["a" /* default */])(_replacementKeyMap, ALT, isApple ? '⌥' : 'Alt'), Object(defineProperty["a" /* default */])(_replacementKeyMap, CTRL, isApple ? '^' : 'Ctrl'), Object(defineProperty["a" /* default */])(_replacementKeyMap, COMMAND, '⌘'), Object(defineProperty["a" /* default */])(_replacementKeyMap, SHIFT, isApple ? '⇧' : 'Shift'), _replacementKeyMap);
|
4924 |
+
var modifierKeys = modifier(_isApple).reduce(function (accumulator, key) {
|
4925 |
+
var replacementKey = Object(external_lodash_["get"])(replacementKeyMap, key, key); // If on the Mac, adhere to platform convention and don't show plus between keys.
|
4926 |
|
4927 |
+
if (isApple) {
|
4928 |
+
return [].concat(Object(toConsumableArray["a" /* default */])(accumulator), [replacementKey]);
|
4929 |
+
}
|
4930 |
+
|
4931 |
+
return [].concat(Object(toConsumableArray["a" /* default */])(accumulator), [replacementKey, '+']);
|
4932 |
+
}, []);
|
4933 |
+
var capitalizedCharacter = Object(external_lodash_["capitalize"])(character);
|
4934 |
+
return [].concat(Object(toConsumableArray["a" /* default */])(modifierKeys), [capitalizedCharacter]);
|
4935 |
};
|
4936 |
+
});
|
4937 |
+
/**
|
4938 |
+
* An object that contains functions to display shortcuts.
|
4939 |
+
* E.g. displayShortcut.primary( 'm' ) will return '⌘M' on Mac.
|
4940 |
+
*
|
4941 |
+
* @type {WPKeycodeHandlerByModifier} Keyed map of functions to display
|
4942 |
+
* shortcuts.
|
4943 |
+
*/
|
4944 |
|
4945 |
+
var displayShortcut = Object(external_lodash_["mapValues"])(displayShortcutList, function (shortcutList) {
|
4946 |
+
return function (character) {
|
4947 |
+
var _isApple = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : isAppleOS;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4948 |
|
4949 |
+
return shortcutList(character, _isApple).join('');
|
4950 |
+
};
|
4951 |
+
});
|
4952 |
+
/**
|
4953 |
+
* An object that contains functions to return an aria label for a keyboard shortcut.
|
4954 |
+
* E.g. shortcutAriaLabel.primary( '.' ) will return 'Command + Period' on Mac.
|
4955 |
+
*
|
4956 |
+
* @type {WPKeycodeHandlerByModifier} Keyed map of functions to shortcut ARIA
|
4957 |
+
* labels.
|
4958 |
+
*/
|
4959 |
|
4960 |
+
var shortcutAriaLabel = Object(external_lodash_["mapValues"])(modifiers, function (modifier) {
|
4961 |
+
return function (character) {
|
4962 |
+
var _replacementKeyMap2;
|
4963 |
|
4964 |
+
var _isApple = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : isAppleOS;
|
|
|
|
|
4965 |
|
4966 |
+
var isApple = _isApple();
|
4967 |
|
4968 |
+
var replacementKeyMap = (_replacementKeyMap2 = {}, Object(defineProperty["a" /* default */])(_replacementKeyMap2, SHIFT, 'Shift'), Object(defineProperty["a" /* default */])(_replacementKeyMap2, COMMAND, isApple ? 'Command' : 'Control'), Object(defineProperty["a" /* default */])(_replacementKeyMap2, CTRL, 'Control'), Object(defineProperty["a" /* default */])(_replacementKeyMap2, ALT, isApple ? 'Option' : 'Alt'), Object(defineProperty["a" /* default */])(_replacementKeyMap2, ',', Object(external_this_wp_i18n_["__"])('Comma')), Object(defineProperty["a" /* default */])(_replacementKeyMap2, '.', Object(external_this_wp_i18n_["__"])('Period')), Object(defineProperty["a" /* default */])(_replacementKeyMap2, '`', Object(external_this_wp_i18n_["__"])('Backtick')), _replacementKeyMap2);
|
4969 |
+
return [].concat(Object(toConsumableArray["a" /* default */])(modifier(_isApple)), [character]).map(function (key) {
|
4970 |
+
return Object(external_lodash_["capitalize"])(Object(external_lodash_["get"])(replacementKeyMap, key, key));
|
4971 |
+
}).join(isApple ? ' ' : ' + ');
|
4972 |
+
};
|
4973 |
+
});
|
4974 |
+
/**
|
4975 |
+
* An object that contains functions to check if a keyboard event matches a
|
4976 |
+
* predefined shortcut combination.
|
4977 |
+
* E.g. isKeyboardEvent.primary( event, 'm' ) will return true if the event
|
4978 |
+
* signals pressing ⌘M.
|
4979 |
+
*
|
4980 |
+
* @type {WPKeycodeHandlerByModifier} Keyed map of functions to match events.
|
4981 |
+
*/
|
4982 |
|
4983 |
+
var isKeyboardEvent = Object(external_lodash_["mapValues"])(modifiers, function (getModifiers) {
|
4984 |
+
return function (event, character) {
|
4985 |
+
var _isApple = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : isAppleOS;
|
4986 |
|
4987 |
+
var mods = getModifiers(_isApple);
|
|
|
|
|
4988 |
|
4989 |
+
if (!mods.every(function (key) {
|
4990 |
+
return event["".concat(key, "Key")];
|
4991 |
+
})) {
|
4992 |
+
return false;
|
4993 |
+
}
|
4994 |
|
4995 |
+
if (!character) {
|
4996 |
+
return Object(external_lodash_["includes"])(mods, event.key.toLowerCase());
|
4997 |
+
}
|
4998 |
|
4999 |
+
return event.key === character;
|
5000 |
+
};
|
|
|
|
|
|
|
|
|
5001 |
});
|
5002 |
+
//# sourceMappingURL=index.js.map
|
|
|
|
|
|
|
5003 |
|
5004 |
/***/ }),
|
|
|
|
|
|
|
|
|
5005 |
|
5006 |
+
/***/ 19:
|
5007 |
+
/***/ (function(module, exports) {
|
5008 |
|
5009 |
+
(function() { module.exports = this["wp"]["data"]; }());
|
5010 |
|
5011 |
/***/ }),
|
5012 |
+
|
5013 |
+
/***/ 198:
|
5014 |
/***/ (function(module, exports, __webpack_require__) {
|
5015 |
|
5016 |
+
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5017 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5018 |
|
5019 |
+
var reactIs = __webpack_require__(174);
|
5020 |
+
|
5021 |
+
/**
|
5022 |
+
* Copyright 2015, Yahoo! Inc.
|
5023 |
+
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
|
5024 |
+
*/
|
5025 |
+
var REACT_STATICS = {
|
5026 |
+
childContextTypes: true,
|
5027 |
+
contextType: true,
|
5028 |
+
contextTypes: true,
|
5029 |
+
defaultProps: true,
|
5030 |
+
displayName: true,
|
5031 |
+
getDefaultProps: true,
|
5032 |
+
getDerivedStateFromError: true,
|
5033 |
+
getDerivedStateFromProps: true,
|
5034 |
+
mixins: true,
|
5035 |
+
propTypes: true,
|
5036 |
+
type: true
|
5037 |
+
};
|
5038 |
+
var KNOWN_STATICS = {
|
5039 |
+
name: true,
|
5040 |
+
length: true,
|
5041 |
+
prototype: true,
|
5042 |
+
caller: true,
|
5043 |
+
callee: true,
|
5044 |
+
arguments: true,
|
5045 |
+
arity: true
|
5046 |
};
|
5047 |
+
var FORWARD_REF_STATICS = {
|
5048 |
+
'$$typeof': true,
|
5049 |
+
render: true,
|
5050 |
+
defaultProps: true,
|
5051 |
+
displayName: true,
|
5052 |
+
propTypes: true
|
5053 |
+
};
|
5054 |
+
var MEMO_STATICS = {
|
5055 |
+
'$$typeof': true,
|
5056 |
+
compare: true,
|
5057 |
+
defaultProps: true,
|
5058 |
+
displayName: true,
|
5059 |
+
propTypes: true,
|
5060 |
+
type: true
|
5061 |
+
};
|
5062 |
+
var TYPE_STATICS = {};
|
5063 |
+
TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
|
5064 |
+
TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
|
5065 |
|
5066 |
+
function getStatics(component) {
|
5067 |
+
// React v16.11 and below
|
5068 |
+
if (reactIs.isMemo(component)) {
|
5069 |
+
return MEMO_STATICS;
|
5070 |
+
} // React v16.12 and above
|
5071 |
|
|
|
|
|
|
|
5072 |
|
5073 |
+
return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;
|
5074 |
+
}
|
5075 |
|
5076 |
+
var defineProperty = Object.defineProperty;
|
5077 |
+
var getOwnPropertyNames = Object.getOwnPropertyNames;
|
5078 |
+
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
5079 |
+
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
5080 |
+
var getPrototypeOf = Object.getPrototypeOf;
|
5081 |
+
var objectPrototype = Object.prototype;
|
5082 |
+
function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
|
5083 |
+
if (typeof sourceComponent !== 'string') {
|
5084 |
+
// don't hoist over string (html) components
|
5085 |
+
if (objectPrototype) {
|
5086 |
+
var inheritedComponent = getPrototypeOf(sourceComponent);
|
5087 |
|
5088 |
+
if (inheritedComponent && inheritedComponent !== objectPrototype) {
|
5089 |
+
hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
|
5090 |
+
}
|
5091 |
+
}
|
5092 |
|
5093 |
+
var keys = getOwnPropertyNames(sourceComponent);
|
|
|
|
|
5094 |
|
5095 |
+
if (getOwnPropertySymbols) {
|
5096 |
+
keys = keys.concat(getOwnPropertySymbols(sourceComponent));
|
5097 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5098 |
|
5099 |
+
var targetStatics = getStatics(targetComponent);
|
5100 |
+
var sourceStatics = getStatics(sourceComponent);
|
5101 |
|
5102 |
+
for (var i = 0; i < keys.length; ++i) {
|
5103 |
+
var key = keys[i];
|
|
|
5104 |
|
5105 |
+
if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
|
5106 |
+
var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
|
5107 |
|
5108 |
+
try {
|
5109 |
+
// Avoid failures from read-only properties
|
5110 |
+
defineProperty(targetComponent, key, descriptor);
|
5111 |
+
} catch (e) {}
|
5112 |
+
}
|
5113 |
+
}
|
5114 |
}
|
|
|
5115 |
|
5116 |
+
return targetComponent;
|
5117 |
+
}
|
5118 |
|
5119 |
+
module.exports = hoistNonReactStatics;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5120 |
|
5121 |
|
5122 |
/***/ }),
|
5123 |
+
|
5124 |
+
/***/ 199:
|
5125 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5126 |
|
5127 |
"use strict";
|
5128 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
|
5129 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
|
5130 |
+
/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(48);
|
5131 |
+
/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);
|
5132 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0);
|
5133 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__);
|
5134 |
+
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(26);
|
5135 |
+
/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(200);
|
5136 |
+
/**
|
5137 |
+
* External dependencies
|
5138 |
+
*/
|
5139 |
|
|
|
|
|
|
|
|
|
|
|
5140 |
|
|
|
5141 |
|
5142 |
+
/**
|
5143 |
+
* WooCommerce dependencies
|
5144 |
+
*/
|
|
|
|
|
|
|
|
|
5145 |
|
5146 |
|
5147 |
+
var manageStock = Object(_settings__WEBPACK_IMPORTED_MODULE_3__[/* getSetting */ "g"])('manageStock', 'no');
|
5148 |
+
/**
|
5149 |
+
* Internal dependencies
|
5150 |
+
*/
|
5151 |
|
5152 |
+
var RevenueReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["lazy"])(function () {
|
5153 |
+
return Promise.all(/* import() | analytics-report-revenue */[__webpack_require__.e(1), __webpack_require__.e(0), __webpack_require__.e(15)]).then(__webpack_require__.bind(null, 726));
|
5154 |
+
});
|
5155 |
+
var ProductsReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["lazy"])(function () {
|
5156 |
+
return Promise.all(/* import() | analytics-report-products */[__webpack_require__.e(1), __webpack_require__.e(0), __webpack_require__.e(4), __webpack_require__.e(14)]).then(__webpack_require__.bind(null, 727));
|
5157 |
+
});
|
5158 |
+
var OrdersReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["lazy"])(function () {
|
5159 |
+
return Promise.all(/* import() | analytics-report-orders */[__webpack_require__.e(1), __webpack_require__.e(0), __webpack_require__.e(13)]).then(__webpack_require__.bind(null, 728));
|
5160 |
+
});
|
5161 |
+
var CategoriesReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["lazy"])(function () {
|
5162 |
+
return Promise.all(/* import() | analytics-report-categories */[__webpack_require__.e(1), __webpack_require__.e(0), __webpack_require__.e(4), __webpack_require__.e(9)]).then(__webpack_require__.bind(null, 723));
|
5163 |
+
});
|
5164 |
+
var CouponsReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["lazy"])(function () {
|
5165 |
+
return Promise.all(/* import() | analytics-report-coupons */[__webpack_require__.e(1), __webpack_require__.e(0), __webpack_require__.e(10)]).then(__webpack_require__.bind(null, 729));
|
5166 |
+
});
|
5167 |
+
var TaxesReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["lazy"])(function () {
|
5168 |
+
return Promise.all(/* import() | analytics-report-taxes */[__webpack_require__.e(1), __webpack_require__.e(0), __webpack_require__.e(17)]).then(__webpack_require__.bind(null, 730));
|
5169 |
+
});
|
5170 |
+
var DownloadsReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["lazy"])(function () {
|
5171 |
+
return Promise.all(/* import() | analytics-report-downloads */[__webpack_require__.e(1), __webpack_require__.e(0), __webpack_require__.e(12)]).then(__webpack_require__.bind(null, 731));
|
5172 |
+
});
|
5173 |
+
var StockReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["lazy"])(function () {
|
5174 |
+
return Promise.all(/* import() | analytics-report-stock */[__webpack_require__.e(0), __webpack_require__.e(16)]).then(__webpack_require__.bind(null, 722));
|
5175 |
+
});
|
5176 |
+
var CustomersReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["lazy"])(function () {
|
5177 |
+
return Promise.all(/* import() | analytics-report-customers */[__webpack_require__.e(0), __webpack_require__.e(11)]).then(__webpack_require__.bind(null, 724));
|
5178 |
+
});
|
5179 |
|
5180 |
+
/* harmony default export */ __webpack_exports__["a"] = (function () {
|
5181 |
+
var reports = [{
|
5182 |
+
report: 'revenue',
|
5183 |
+
title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Revenue', 'woocommerce-admin'),
|
5184 |
+
component: RevenueReport
|
5185 |
+
}, {
|
5186 |
+
report: 'products',
|
5187 |
+
title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Products', 'woocommerce-admin'),
|
5188 |
+
component: ProductsReport
|
5189 |
+
}, {
|
5190 |
+
report: 'orders',
|
5191 |
+
title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Orders', 'woocommerce-admin'),
|
5192 |
+
component: OrdersReport
|
5193 |
+
}, {
|
5194 |
+
report: 'categories',
|
5195 |
+
title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Categories', 'woocommerce-admin'),
|
5196 |
+
component: CategoriesReport
|
5197 |
+
}, {
|
5198 |
+
report: 'coupons',
|
5199 |
+
title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Coupons', 'woocommerce-admin'),
|
5200 |
+
component: CouponsReport
|
5201 |
+
}, {
|
5202 |
+
report: 'taxes',
|
5203 |
+
title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Taxes', 'woocommerce-admin'),
|
5204 |
+
component: TaxesReport
|
5205 |
+
}, {
|
5206 |
+
report: 'downloads',
|
5207 |
+
title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Downloads', 'woocommerce-admin'),
|
5208 |
+
component: DownloadsReport
|
5209 |
+
}, manageStock === 'yes' ? {
|
5210 |
+
report: 'stock',
|
5211 |
+
title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Stock', 'woocommerce-admin'),
|
5212 |
+
component: StockReport
|
5213 |
+
} : null, {
|
5214 |
+
report: 'customers',
|
5215 |
+
title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Customers', 'woocommerce-admin'),
|
5216 |
+
component: CustomersReport
|
5217 |
+
}, {
|
5218 |
+
report: 'downloads',
|
5219 |
+
title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Downloads', 'woocommerce-admin'),
|
5220 |
+
component: DownloadsReport
|
5221 |
+
}].filter(Boolean);
|
5222 |
+
return Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__["applyFilters"])(_index__WEBPACK_IMPORTED_MODULE_4__["REPORTS_FILTER"], reports);
|
5223 |
+
});
|
5224 |
|
5225 |
+
/***/ }),
|
5226 |
|
5227 |
+
/***/ 2:
|
5228 |
+
/***/ (function(module, exports) {
|
5229 |
|
5230 |
+
(function() { module.exports = this["lodash"]; }());
|
|
|
|
|
|
|
|
|
5231 |
|
5232 |
+
/***/ }),
|
|
|
5233 |
|
5234 |
+
/***/ 20:
|
5235 |
+
/***/ (function(module, exports) {
|
|
|
|
|
5236 |
|
5237 |
+
(function() { module.exports = this["wp"]["apiFetch"]; }());
|
|
|
5238 |
|
5239 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
5240 |
|
5241 |
+
/***/ 200:
|
5242 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
5243 |
|
5244 |
+
"use strict";
|
5245 |
+
__webpack_require__.r(__webpack_exports__);
|
5246 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "REPORTS_FILTER", function() { return REPORTS_FILTER; });
|
5247 |
+
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15);
|
5248 |
+
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
|
5249 |
+
/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(41);
|
5250 |
+
/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);
|
5251 |
+
/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(40);
|
5252 |
+
/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);
|
5253 |
+
/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(44);
|
5254 |
+
/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);
|
5255 |
+
/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(29);
|
5256 |
+
/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);
|
5257 |
+
/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(42);
|
5258 |
+
/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);
|
5259 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(0);
|
5260 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__);
|
5261 |
+
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(256);
|
5262 |
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(1);
|
5263 |
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_8__);
|
5264 |
+
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(2);
|
5265 |
+
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_9__);
|
5266 |
+
/* harmony import */ var _woocommerce_components__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(63);
|
5267 |
+
/* harmony import */ var _woocommerce_components__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_components__WEBPACK_IMPORTED_MODULE_10__);
|
5268 |
+
/* harmony import */ var _woocommerce_navigation__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(22);
|
5269 |
+
/* harmony import */ var _woocommerce_navigation__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_navigation__WEBPACK_IMPORTED_MODULE_11__);
|
5270 |
+
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(435);
|
5271 |
+
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_12__);
|
5272 |
+
/* harmony import */ var analytics_components_report_error__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(261);
|
5273 |
+
/* harmony import */ var wc_api_items_utils__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(267);
|
5274 |
+
/* harmony import */ var wc_api_with_select__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(101);
|
5275 |
+
/* harmony import */ var lib_currency_context__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(203);
|
5276 |
+
/* harmony import */ var _get_reports__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(199);
|
5277 |
|
|
|
|
|
5278 |
|
|
|
|
|
|
|
|
|
|
|
5279 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5280 |
|
|
|
|
|
5281 |
|
|
|
|
|
|
|
5282 |
|
|
|
|
|
|
|
|
|
5283 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5284 |
|
5285 |
+
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; }
|
|
|
5286 |
|
5287 |
+
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) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___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; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5288 |
|
5289 |
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, result); }; }
|
|
|
|
|
|
|
|
|
|
|
5290 |
|
5291 |
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5292 |
|
5293 |
+
/**
|
5294 |
+
* External dependencies
|
5295 |
+
*/
|
|
|
|
|
|
|
5296 |
|
|
|
|
|
|
|
|
|
|
|
|
|
5297 |
|
|
|
|
|
|
|
|
|
|
|
5298 |
|
|
|
|
|
|
|
5299 |
|
5300 |
+
/**
|
5301 |
+
* WooCommerce dependencies
|
5302 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5303 |
|
|
|
|
|
|
|
|
|
5304 |
|
|
|
|
|
|
|
|
|
5305 |
|
5306 |
+
/**
|
5307 |
+
* Internal dependencies
|
5308 |
+
*/
|
|
|
5309 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5310 |
|
|
|
|
|
5311 |
|
|
|
|
|
|
|
5312 |
|
|
|
|
|
|
|
5313 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5314 |
|
|
|
5315 |
|
5316 |
+
var REPORTS_FILTER = 'woocommerce_admin_reports_list';
|
5317 |
+
/**
|
5318 |
+
* The Customers Report will not have the `report` param supplied by the router/
|
5319 |
+
* because it no longer exists under the path `/analytics/:report`. Use `props.path`/
|
5320 |
+
* instead to determine if the Customers Report is being rendered.
|
5321 |
+
*
|
5322 |
+
* @param {Object} params -url parameters
|
5323 |
+
* @return {string} - report parameter
|
5324 |
+
*/
|
5325 |
|
5326 |
+
var getReportParam = function getReportParam(_ref) {
|
5327 |
+
var params = _ref.params,
|
5328 |
+
path = _ref.path;
|
5329 |
+
return params.report || path.replace(/^\/+/, '');
|
5330 |
};
|
5331 |
|
5332 |
+
var Report = /*#__PURE__*/function (_Component) {
|
5333 |
+
_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(Report, _Component);
|
|
|
|
|
5334 |
|
5335 |
+
var _super = _createSuper(Report);
|
|
|
5336 |
|
5337 |
+
function Report() {
|
5338 |
+
var _this;
|
|
|
5339 |
|
5340 |
+
_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, Report);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5341 |
|
5342 |
+
_this = _super.apply(this, arguments);
|
5343 |
+
_this.state = {
|
5344 |
+
hasError: false
|
5345 |
+
};
|
5346 |
+
return _this;
|
5347 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
5348 |
|
5349 |
+
_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(Report, [{
|
5350 |
+
key: "componentDidCatch",
|
5351 |
+
value: function componentDidCatch(error) {
|
5352 |
+
this.setState({
|
5353 |
+
hasError: true
|
5354 |
+
});
|
5355 |
+
/* eslint-disable no-console */
|
5356 |
|
5357 |
+
console.warn(error);
|
5358 |
+
/* eslint-enable no-console */
|
5359 |
+
}
|
5360 |
+
}, {
|
5361 |
+
key: "render",
|
5362 |
+
value: function render() {
|
5363 |
+
if (this.state.hasError) {
|
5364 |
+
return null;
|
5365 |
+
}
|
5366 |
|
5367 |
+
var isError = this.props.isError;
|
5368 |
|
5369 |
+
if (isError) {
|
5370 |
+
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(analytics_components_report_error__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"], {
|
5371 |
+
isError: true
|
5372 |
+
});
|
5373 |
+
}
|
|
|
5374 |
|
5375 |
+
var reportParam = getReportParam(this.props);
|
5376 |
+
var report = Object(lodash__WEBPACK_IMPORTED_MODULE_9__["find"])(Object(_get_reports__WEBPACK_IMPORTED_MODULE_17__[/* default */ "a"])(), {
|
5377 |
+
report: reportParam
|
5378 |
+
});
|
5379 |
|
5380 |
+
if (!report) {
|
5381 |
+
return null;
|
5382 |
+
}
|
5383 |
|
5384 |
+
var Container = report.component;
|
5385 |
+
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(lib_currency_context__WEBPACK_IMPORTED_MODULE_16__[/* CurrencyContext */ "a"].Provider, {
|
5386 |
+
value: Object(lib_currency_context__WEBPACK_IMPORTED_MODULE_16__[/* getFilteredCurrencyInstance */ "b"])(Object(_woocommerce_navigation__WEBPACK_IMPORTED_MODULE_11__["getQuery"])())
|
5387 |
+
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(Container, this.props));
|
5388 |
+
}
|
5389 |
+
}]);
|
5390 |
|
5391 |
+
return Report;
|
5392 |
+
}(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["Component"]);
|
|
|
|
|
|
|
5393 |
|
5394 |
+
Report.propTypes = {
|
5395 |
+
params: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.object.isRequired
|
5396 |
+
};
|
5397 |
+
/* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(Object(_woocommerce_components__WEBPACK_IMPORTED_MODULE_10__["useFilters"])(REPORTS_FILTER), Object(wc_api_with_select__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"])(function (select, props) {
|
5398 |
+
var query = Object(_woocommerce_navigation__WEBPACK_IMPORTED_MODULE_11__["getQuery"])();
|
5399 |
+
var search = query.search;
|
5400 |
|
5401 |
+
if (!search) {
|
5402 |
+
return {};
|
5403 |
+
}
|
5404 |
|
5405 |
+
var report = getReportParam(props);
|
5406 |
+
var searchWords = Object(_woocommerce_navigation__WEBPACK_IMPORTED_MODULE_11__["getSearchWords"])(query); // Single Category view in Categories Report uses the products endpoint, so search must also.
|
5407 |
|
5408 |
+
var mappedReport = report === 'categories' && query.filter === 'single_category' ? 'products' : report;
|
5409 |
+
var itemsResult = Object(wc_api_items_utils__WEBPACK_IMPORTED_MODULE_14__[/* searchItemsByString */ "b"])(select, mappedReport, searchWords);
|
5410 |
+
var isError = itemsResult.isError,
|
5411 |
+
isRequesting = itemsResult.isRequesting,
|
5412 |
+
items = itemsResult.items;
|
5413 |
+
var ids = Object.keys(items);
|
5414 |
|
5415 |
+
if (!ids.length) {
|
5416 |
+
return {
|
5417 |
+
isError: isError,
|
5418 |
+
isRequesting: isRequesting
|
5419 |
+
};
|
|
|
|
|
5420 |
}
|
5421 |
|
5422 |
+
return {
|
5423 |
+
isError: isError,
|
5424 |
+
isRequesting: isRequesting,
|
5425 |
+
query: _objectSpread({}, props.query, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, mappedReport, ids.join(',')))
|
5426 |
+
};
|
5427 |
+
}))(Report));
|
5428 |
|
5429 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
|
|
5430 |
|
5431 |
+
/***/ 201:
|
5432 |
+
/***/ (function(module, exports) {
|
|
|
5433 |
|
5434 |
+
function _inheritsLoose(subClass, superClass) {
|
5435 |
+
subClass.prototype = Object.create(superClass.prototype);
|
5436 |
+
subClass.prototype.constructor = subClass;
|
5437 |
+
subClass.__proto__ = superClass;
|
5438 |
+
}
|
|
|
|
|
|
|
|
|
|
|
5439 |
|
5440 |
+
module.exports = _inheritsLoose;
|
5441 |
|
5442 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
5443 |
|
5444 |
+
/***/ 202:
|
5445 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5446 |
|
5447 |
+
"use strict";
|
5448 |
|
5449 |
+
// EXPORTS
|
5450 |
+
__webpack_require__.d(__webpack_exports__, "c", function() { return /* binding */ layout_PrimaryLayout; });
|
5451 |
+
__webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ PageLayout; });
|
5452 |
+
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ layout_EmbedLayout; });
|
5453 |
|
5454 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/extends.js
|
5455 |
+
var helpers_extends = __webpack_require__(105);
|
5456 |
+
var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends);
|
5457 |
|
5458 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/defineProperty.js
|
5459 |
+
var defineProperty = __webpack_require__(15);
|
5460 |
+
var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
|
|
|
5461 |
|
5462 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectWithoutProperties.js
|
5463 |
+
var objectWithoutProperties = __webpack_require__(121);
|
5464 |
+
var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
|
5465 |
|
5466 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/classCallCheck.js
|
5467 |
+
var classCallCheck = __webpack_require__(41);
|
5468 |
+
var classCallCheck_default = /*#__PURE__*/__webpack_require__.n(classCallCheck);
|
5469 |
|
5470 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/createClass.js
|
5471 |
+
var createClass = __webpack_require__(40);
|
5472 |
+
var createClass_default = /*#__PURE__*/__webpack_require__.n(createClass);
|
|
|
|
|
|
|
|
|
|
|
|
|
5473 |
|
5474 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js
|
5475 |
+
var possibleConstructorReturn = __webpack_require__(44);
|
5476 |
+
var possibleConstructorReturn_default = /*#__PURE__*/__webpack_require__.n(possibleConstructorReturn);
|
5477 |
|
5478 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/getPrototypeOf.js
|
5479 |
+
var getPrototypeOf = __webpack_require__(29);
|
5480 |
+
var getPrototypeOf_default = /*#__PURE__*/__webpack_require__.n(getPrototypeOf);
|
5481 |
|
5482 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/inherits.js
|
5483 |
+
var inherits = __webpack_require__(42);
|
5484 |
+
var inherits_default = /*#__PURE__*/__webpack_require__.n(inherits);
|
|
|
5485 |
|
5486 |
+
// EXTERNAL MODULE: external {"this":["wp","element"]}
|
5487 |
+
var external_this_wp_element_ = __webpack_require__(0);
|
5488 |
|
5489 |
+
// EXTERNAL MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/compose.js
|
5490 |
+
var compose = __webpack_require__(256);
|
5491 |
|
5492 |
+
// EXTERNAL MODULE: external {"this":["wp","data"]}
|
5493 |
+
var external_this_wp_data_ = __webpack_require__(19);
|
5494 |
|
5495 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
|
5496 |
+
var inheritsLoose = __webpack_require__(76);
|
5497 |
+
|
5498 |
+
// EXTERNAL MODULE: external "React"
|
5499 |
+
var external_React_ = __webpack_require__(14);
|
5500 |
+
var external_React_default = /*#__PURE__*/__webpack_require__.n(external_React_);
|
5501 |
+
|
5502 |
+
// EXTERNAL MODULE: ./node_modules/prop-types/index.js
|
5503 |
+
var prop_types = __webpack_require__(1);
|
5504 |
+
var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
|
5505 |
|
5506 |
+
// EXTERNAL MODULE: ./node_modules/history/esm/history.js + 2 modules
|
5507 |
+
var esm_history = __webpack_require__(90);
|
5508 |
|
5509 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/inheritsLoose.js
|
5510 |
+
var helpers_inheritsLoose = __webpack_require__(201);
|
5511 |
+
var inheritsLoose_default = /*#__PURE__*/__webpack_require__.n(helpers_inheritsLoose);
|
5512 |
|
5513 |
+
// EXTERNAL MODULE: ./node_modules/gud/index.js
|
5514 |
+
var gud = __webpack_require__(416);
|
5515 |
+
var gud_default = /*#__PURE__*/__webpack_require__.n(gud);
|
5516 |
|
5517 |
+
// CONCATENATED MODULE: ./node_modules/mini-create-react-context/dist/esm/index.js
|
5518 |
|
5519 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5520 |
|
|
|
|
|
|
|
|
|
5521 |
|
|
|
5522 |
|
5523 |
+
|
5524 |
+
var MAX_SIGNED_31_BIT_INT = 1073741823;
|
5525 |
+
|
5526 |
+
function objectIs(x, y) {
|
5527 |
+
if (x === y) {
|
5528 |
+
return x !== 0 || 1 / x === 1 / y;
|
5529 |
+
} else {
|
5530 |
+
return x !== x && y !== y;
|
5531 |
}
|
5532 |
+
}
|
5533 |
|
5534 |
+
function createEventEmitter(value) {
|
5535 |
+
var handlers = [];
|
5536 |
return {
|
5537 |
+
on: function on(handler) {
|
5538 |
+
handlers.push(handler);
|
5539 |
+
},
|
5540 |
+
off: function off(handler) {
|
5541 |
+
handlers = handlers.filter(function (h) {
|
5542 |
+
return h !== handler;
|
5543 |
+
});
|
5544 |
+
},
|
5545 |
+
get: function get() {
|
5546 |
+
return value;
|
5547 |
+
},
|
5548 |
+
set: function set(newValue, changedBits) {
|
5549 |
+
value = newValue;
|
5550 |
+
handlers.forEach(function (handler) {
|
5551 |
+
return handler(value, changedBits);
|
5552 |
+
});
|
5553 |
+
}
|
5554 |
};
|
5555 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5556 |
|
5557 |
+
function onlyChild(children) {
|
5558 |
+
return Array.isArray(children) ? children[0] : children;
|
5559 |
+
}
|
5560 |
|
5561 |
+
function createReactContext(defaultValue, calculateChangedBits) {
|
5562 |
+
var _Provider$childContex, _Consumer$contextType;
|
|
|
|
|
|
|
|
|
|
|
|
|
5563 |
|
5564 |
+
var contextProp = '__create-react-context-' + gud_default()() + '__';
|
|
|
|
|
|
|
|
|
5565 |
|
5566 |
+
var Provider =
|
5567 |
+
/*#__PURE__*/
|
5568 |
+
function (_Component) {
|
5569 |
+
inheritsLoose_default()(Provider, _Component);
|
|
|
5570 |
|
5571 |
+
function Provider() {
|
5572 |
+
var _this;
|
5573 |
|
5574 |
+
_this = _Component.apply(this, arguments) || this;
|
5575 |
+
_this.emitter = createEventEmitter(_this.props.value);
|
5576 |
+
return _this;
|
|
|
|
|
|
|
|
|
5577 |
}
|
|
|
5578 |
|
5579 |
+
var _proto = Provider.prototype;
|
5580 |
|
5581 |
+
_proto.getChildContext = function getChildContext() {
|
5582 |
+
var _ref;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5583 |
|
5584 |
+
return _ref = {}, _ref[contextProp] = this.emitter, _ref;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5585 |
};
|
|
|
5586 |
|
5587 |
+
_proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
|
5588 |
+
if (this.props.value !== nextProps.value) {
|
5589 |
+
var oldValue = this.props.value;
|
5590 |
+
var newValue = nextProps.value;
|
5591 |
+
var changedBits;
|
|
|
5592 |
|
5593 |
+
if (objectIs(oldValue, newValue)) {
|
5594 |
+
changedBits = 0;
|
|
|
5595 |
} else {
|
5596 |
+
changedBits = typeof calculateChangedBits === 'function' ? calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;
|
5597 |
+
|
5598 |
+
if (false) {}
|
5599 |
+
|
5600 |
+
changedBits |= 0;
|
5601 |
+
|
5602 |
+
if (changedBits !== 0) {
|
5603 |
+
this.emitter.set(nextProps.value, changedBits);
|
5604 |
+
}
|
5605 |
}
|
|
|
|
|
|
|
5606 |
}
|
5607 |
+
};
|
|
|
|
|
|
|
5608 |
|
5609 |
+
_proto.render = function render() {
|
5610 |
+
return this.props.children;
|
5611 |
+
};
|
5612 |
|
5613 |
+
return Provider;
|
5614 |
+
}(external_React_["Component"]);
|
5615 |
|
5616 |
+
Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[contextProp] = prop_types_default.a.object.isRequired, _Provider$childContex);
|
5617 |
+
|
5618 |
+
var Consumer =
|
5619 |
+
/*#__PURE__*/
|
5620 |
+
function (_Component2) {
|
5621 |
+
inheritsLoose_default()(Consumer, _Component2);
|
5622 |
+
|
5623 |
+
function Consumer() {
|
5624 |
+
var _this2;
|
5625 |
+
|
5626 |
+
_this2 = _Component2.apply(this, arguments) || this;
|
5627 |
+
_this2.state = {
|
5628 |
+
value: _this2.getValue()
|
5629 |
+
};
|
5630 |
+
|
5631 |
+
_this2.onUpdate = function (newValue, changedBits) {
|
5632 |
+
var observedBits = _this2.observedBits | 0;
|
5633 |
+
|
5634 |
+
if ((observedBits & changedBits) !== 0) {
|
5635 |
+
_this2.setState({
|
5636 |
+
value: _this2.getValue()
|
5637 |
+
});
|
5638 |
+
}
|
5639 |
+
};
|
5640 |
+
|
5641 |
+
return _this2;
|
5642 |
}
|
5643 |
|
5644 |
+
var _proto2 = Consumer.prototype;
|
5645 |
+
|
5646 |
+
_proto2.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
|
5647 |
+
var observedBits = nextProps.observedBits;
|
5648 |
+
this.observedBits = observedBits === undefined || observedBits === null ? MAX_SIGNED_31_BIT_INT : observedBits;
|
|
|
5649 |
};
|
|
|
5650 |
|
5651 |
+
_proto2.componentDidMount = function componentDidMount() {
|
5652 |
+
if (this.context[contextProp]) {
|
5653 |
+
this.context[contextProp].on(this.onUpdate);
|
5654 |
+
}
|
5655 |
|
5656 |
+
var observedBits = this.props.observedBits;
|
5657 |
+
this.observedBits = observedBits === undefined || observedBits === null ? MAX_SIGNED_31_BIT_INT : observedBits;
|
5658 |
+
};
|
5659 |
+
|
5660 |
+
_proto2.componentWillUnmount = function componentWillUnmount() {
|
5661 |
+
if (this.context[contextProp]) {
|
5662 |
+
this.context[contextProp].off(this.onUpdate);
|
5663 |
+
}
|
5664 |
+
};
|
5665 |
+
|
5666 |
+
_proto2.getValue = function getValue() {
|
5667 |
+
if (this.context[contextProp]) {
|
5668 |
+
return this.context[contextProp].get();
|
5669 |
+
} else {
|
5670 |
+
return defaultValue;
|
5671 |
+
}
|
5672 |
+
};
|
5673 |
+
|
5674 |
+
_proto2.render = function render() {
|
5675 |
+
return onlyChild(this.props.children)(this.state.value);
|
5676 |
+
};
|
5677 |
+
|
5678 |
+
return Consumer;
|
5679 |
+
}(external_React_["Component"]);
|
5680 |
|
5681 |
+
Consumer.contextTypes = (_Consumer$contextType = {}, _Consumer$contextType[contextProp] = prop_types_default.a.object, _Consumer$contextType);
|
5682 |
return {
|
5683 |
+
Provider: Provider,
|
5684 |
+
Consumer: Consumer
|
|
|
|
|
5685 |
};
|
5686 |
}
|
5687 |
|
5688 |
+
var index = external_React_default.a.createContext || createReactContext;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5689 |
|
5690 |
+
/* harmony default export */ var esm = (index);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5691 |
|
5692 |
+
// EXTERNAL MODULE: ./node_modules/tiny-invariant/dist/tiny-invariant.esm.js
|
5693 |
+
var tiny_invariant_esm = __webpack_require__(78);
|
|
|
|
|
|
|
|
|
5694 |
|
5695 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
5696 |
+
var esm_extends = __webpack_require__(11);
|
|
|
|
|
|
|
|
|
|
|
|
|
5697 |
|
5698 |
+
// EXTERNAL MODULE: ./node_modules/react-router/node_modules/path-to-regexp/index.js
|
5699 |
+
var path_to_regexp = __webpack_require__(258);
|
5700 |
+
var path_to_regexp_default = /*#__PURE__*/__webpack_require__.n(path_to_regexp);
|
5701 |
|
5702 |
+
// EXTERNAL MODULE: ./node_modules/react-is/index.js
|
5703 |
+
var react_is = __webpack_require__(174);
|
5704 |
|
5705 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
|
5706 |
+
var objectWithoutPropertiesLoose = __webpack_require__(54);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5707 |
|
5708 |
+
// EXTERNAL MODULE: ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js
|
5709 |
+
var hoist_non_react_statics_cjs = __webpack_require__(198);
|
5710 |
+
var hoist_non_react_statics_cjs_default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics_cjs);
|
5711 |
|
5712 |
+
// CONCATENATED MODULE: ./node_modules/react-router/esm/react-router.js
|
|
|
|
|
|
|
5713 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5714 |
|
|
|
|
|
|
|
|
|
5715 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5716 |
|
|
|
|
|
|
|
5717 |
|
|
|
5718 |
|
|
|
|
|
5719 |
|
|
|
|
|
|
|
5720 |
|
|
|
|
|
|
|
|
|
|
|
5721 |
|
|
|
|
|
|
|
5722 |
|
|
|
5723 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5724 |
|
|
|
|
|
|
|
|
|
5725 |
|
5726 |
+
// TODO: Replace with React.createContext once we can assume React 16+
|
|
|
|
|
|
|
|
|
5727 |
|
5728 |
+
var react_router_createNamedContext = function createNamedContext(name) {
|
5729 |
+
var context = esm();
|
5730 |
+
context.displayName = name;
|
5731 |
+
return context;
|
5732 |
+
};
|
5733 |
|
5734 |
+
var react_router_context =
|
5735 |
+
/*#__PURE__*/
|
5736 |
+
react_router_createNamedContext("Router");
|
5737 |
|
5738 |
+
/**
|
5739 |
+
* The public API for putting history on context.
|
5740 |
+
*/
|
5741 |
|
5742 |
+
var react_router_Router =
|
5743 |
+
/*#__PURE__*/
|
5744 |
+
function (_React$Component) {
|
5745 |
+
Object(inheritsLoose["a" /* default */])(Router, _React$Component);
|
|
|
|
|
|
|
|
|
|
|
5746 |
|
5747 |
+
Router.computeRootMatch = function computeRootMatch(pathname) {
|
5748 |
+
return {
|
5749 |
+
path: "/",
|
5750 |
+
url: "/",
|
5751 |
+
params: {},
|
5752 |
+
isExact: pathname === "/"
|
5753 |
+
};
|
5754 |
+
};
|
5755 |
|
5756 |
+
function Router(props) {
|
5757 |
+
var _this;
|
5758 |
+
|
5759 |
+
_this = _React$Component.call(this, props) || this;
|
5760 |
+
_this.state = {
|
5761 |
+
location: props.history.location
|
5762 |
+
}; // This is a bit of a hack. We have to start listening for location
|
5763 |
+
// changes here in the constructor in case there are any <Redirect>s
|
5764 |
+
// on the initial render. If there are, they will replace/push when
|
5765 |
+
// they mount and since cDM fires in children before parents, we may
|
5766 |
+
// get a new location before the <Router> is mounted.
|
5767 |
+
|
5768 |
+
_this._isMounted = false;
|
5769 |
+
_this._pendingLocation = null;
|
5770 |
+
|
5771 |
+
if (!props.staticContext) {
|
5772 |
+
_this.unlisten = props.history.listen(function (location) {
|
5773 |
+
if (_this._isMounted) {
|
5774 |
+
_this.setState({
|
5775 |
location: location
|
5776 |
});
|
5777 |
+
} else {
|
5778 |
+
_this._pendingLocation = location;
|
5779 |
}
|
5780 |
+
});
|
5781 |
+
}
|
5782 |
+
|
5783 |
+
return _this;
|
|
|
5784 |
}
|
5785 |
|
5786 |
+
var _proto = Router.prototype;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5787 |
|
5788 |
+
_proto.componentDidMount = function componentDidMount() {
|
5789 |
+
this._isMounted = true;
|
|
|
|
|
|
|
5790 |
|
5791 |
+
if (this._pendingLocation) {
|
5792 |
+
this.setState({
|
5793 |
+
location: this._pendingLocation
|
5794 |
+
});
|
5795 |
+
}
|
5796 |
+
};
|
5797 |
+
|
5798 |
+
_proto.componentWillUnmount = function componentWillUnmount() {
|
5799 |
+
if (this.unlisten) this.unlisten();
|
5800 |
+
};
|
5801 |
+
|
5802 |
+
_proto.render = function render() {
|
5803 |
+
return external_React_default.a.createElement(react_router_context.Provider, {
|
5804 |
+
children: this.props.children || null,
|
5805 |
+
value: {
|
5806 |
+
history: this.props.history,
|
5807 |
+
location: this.state.location,
|
5808 |
+
match: Router.computeRootMatch(this.state.location.pathname),
|
5809 |
+
staticContext: this.props.staticContext
|
5810 |
}
|
5811 |
});
|
5812 |
+
};
|
5813 |
|
5814 |
+
return Router;
|
5815 |
+
}(external_React_default.a.Component);
|
|
|
5816 |
|
5817 |
+
if (false) {}
|
|
|
|
|
5818 |
|
5819 |
+
/**
|
5820 |
+
* The public API for a <Router> that stores location in memory.
|
5821 |
+
*/
|
5822 |
|
5823 |
+
var react_router_MemoryRouter =
|
5824 |
+
/*#__PURE__*/
|
5825 |
+
function (_React$Component) {
|
5826 |
+
Object(inheritsLoose["a" /* default */])(MemoryRouter, _React$Component);
|
5827 |
|
5828 |
+
function MemoryRouter() {
|
5829 |
+
var _this;
|
5830 |
|
5831 |
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
5832 |
+
args[_key] = arguments[_key];
|
|
|
|
|
|
|
|
|
5833 |
}
|
5834 |
+
|
5835 |
+
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
5836 |
+
_this.history = Object(esm_history["c" /* createMemoryHistory */])(_this.props);
|
5837 |
+
return _this;
|
5838 |
}
|
5839 |
|
5840 |
+
var _proto = MemoryRouter.prototype;
|
5841 |
|
5842 |
+
_proto.render = function render() {
|
5843 |
+
return external_React_default.a.createElement(react_router_Router, {
|
5844 |
+
history: this.history,
|
5845 |
+
children: this.props.children
|
5846 |
+
});
|
5847 |
+
};
|
5848 |
|
5849 |
+
return MemoryRouter;
|
5850 |
+
}(external_React_default.a.Component);
|
5851 |
|
5852 |
+
if (false) {}
|
|
|
|
|
|
|
5853 |
|
5854 |
+
var react_router_Lifecycle =
|
5855 |
+
/*#__PURE__*/
|
5856 |
+
function (_React$Component) {
|
5857 |
+
Object(inheritsLoose["a" /* default */])(Lifecycle, _React$Component);
|
|
|
5858 |
|
5859 |
+
function Lifecycle() {
|
5860 |
+
return _React$Component.apply(this, arguments) || this;
|
5861 |
}
|
5862 |
|
5863 |
+
var _proto = Lifecycle.prototype;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5864 |
|
5865 |
+
_proto.componentDidMount = function componentDidMount() {
|
5866 |
+
if (this.props.onMount) this.props.onMount.call(this, this);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5867 |
};
|
|
|
|
|
5868 |
|
5869 |
+
_proto.componentDidUpdate = function componentDidUpdate(prevProps) {
|
5870 |
+
if (this.props.onUpdate) this.props.onUpdate.call(this, this, prevProps);
|
5871 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5872 |
|
5873 |
+
_proto.componentWillUnmount = function componentWillUnmount() {
|
5874 |
+
if (this.props.onUnmount) this.props.onUnmount.call(this, this);
|
5875 |
+
};
|
|
|
5876 |
|
5877 |
+
_proto.render = function render() {
|
5878 |
+
return null;
|
5879 |
+
};
|
|
|
|
|
|
|
|
|
5880 |
|
5881 |
+
return Lifecycle;
|
5882 |
+
}(external_React_default.a.Component);
|
|
|
5883 |
|
5884 |
+
/**
|
5885 |
+
* The public API for prompting the user before navigating away from a screen.
|
5886 |
+
*/
|
5887 |
+
|
5888 |
+
function Prompt(_ref) {
|
5889 |
+
var message = _ref.message,
|
5890 |
+
_ref$when = _ref.when,
|
5891 |
+
when = _ref$when === void 0 ? true : _ref$when;
|
5892 |
+
return external_React_default.a.createElement(react_router_context.Consumer, null, function (context) {
|
5893 |
+
!context ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0;
|
5894 |
+
if (!when || context.staticContext) return null;
|
5895 |
+
var method = context.history.block;
|
5896 |
+
return external_React_default.a.createElement(react_router_Lifecycle, {
|
5897 |
+
onMount: function onMount(self) {
|
5898 |
+
self.release = method(message);
|
5899 |
+
},
|
5900 |
+
onUpdate: function onUpdate(self, prevProps) {
|
5901 |
+
if (prevProps.message !== message) {
|
5902 |
+
self.release();
|
5903 |
+
self.release = method(message);
|
5904 |
+
}
|
5905 |
+
},
|
5906 |
+
onUnmount: function onUnmount(self) {
|
5907 |
+
self.release();
|
5908 |
+
},
|
5909 |
+
message: message
|
5910 |
+
});
|
5911 |
+
});
|
5912 |
}
|
5913 |
|
5914 |
+
if (false) { var messageType; }
|
|
|
|
|
|
|
5915 |
|
5916 |
+
var cache = {};
|
5917 |
+
var cacheLimit = 10000;
|
5918 |
+
var cacheCount = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5919 |
|
5920 |
+
function compilePath(path) {
|
5921 |
+
if (cache[path]) return cache[path];
|
5922 |
+
var generator = path_to_regexp_default.a.compile(path);
|
5923 |
+
|
5924 |
+
if (cacheCount < cacheLimit) {
|
5925 |
+
cache[path] = generator;
|
5926 |
+
cacheCount++;
|
5927 |
}
|
5928 |
|
5929 |
+
return generator;
|
5930 |
+
}
|
5931 |
+
/**
|
5932 |
+
* Public API for generating a URL pathname from a path and parameters.
|
5933 |
+
*/
|
5934 |
|
|
|
|
|
5935 |
|
5936 |
+
function generatePath(path, params) {
|
5937 |
+
if (path === void 0) {
|
5938 |
+
path = "/";
|
5939 |
}
|
5940 |
|
5941 |
+
if (params === void 0) {
|
5942 |
+
params = {};
|
|
|
|
|
|
|
5943 |
}
|
5944 |
|
5945 |
+
return path === "/" ? path : compilePath(path)(params, {
|
5946 |
+
pretty: true
|
5947 |
+
});
|
5948 |
+
}
|
5949 |
|
5950 |
+
/**
|
5951 |
+
* The public API for navigating programmatically with a component.
|
5952 |
+
*/
|
|
|
|
|
|
|
|
|
5953 |
|
5954 |
+
function Redirect(_ref) {
|
5955 |
+
var computedMatch = _ref.computedMatch,
|
5956 |
+
to = _ref.to,
|
5957 |
+
_ref$push = _ref.push,
|
5958 |
+
push = _ref$push === void 0 ? false : _ref$push;
|
5959 |
+
return external_React_default.a.createElement(react_router_context.Consumer, null, function (context) {
|
5960 |
+
!context ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0;
|
5961 |
+
var history = context.history,
|
5962 |
+
staticContext = context.staticContext;
|
5963 |
+
var method = push ? history.push : history.replace;
|
5964 |
+
var location = Object(esm_history["b" /* createLocation */])(computedMatch ? typeof to === "string" ? generatePath(to, computedMatch.params) : Object(esm_extends["a" /* default */])({}, to, {
|
5965 |
+
pathname: generatePath(to.pathname, computedMatch.params)
|
5966 |
+
}) : to); // When rendering in a static context,
|
5967 |
+
// set the new location immediately.
|
5968 |
|
5969 |
+
if (staticContext) {
|
5970 |
+
method(location);
|
5971 |
+
return null;
|
5972 |
}
|
|
|
5973 |
|
5974 |
+
return external_React_default.a.createElement(react_router_Lifecycle, {
|
5975 |
+
onMount: function onMount() {
|
5976 |
+
method(location);
|
5977 |
+
},
|
5978 |
+
onUpdate: function onUpdate(self, prevProps) {
|
5979 |
+
var prevLocation = Object(esm_history["b" /* createLocation */])(prevProps.to);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5980 |
|
5981 |
+
if (!Object(esm_history["e" /* locationsAreEqual */])(prevLocation, Object(esm_extends["a" /* default */])({}, location, {
|
5982 |
+
key: prevLocation.key
|
5983 |
+
}))) {
|
5984 |
+
method(location);
|
5985 |
+
}
|
5986 |
+
},
|
5987 |
+
to: to
|
5988 |
+
});
|
5989 |
+
});
|
5990 |
+
}
|
5991 |
|
5992 |
+
if (false) {}
|
|
|
|
|
|
|
|
|
5993 |
|
5994 |
+
var cache$1 = {};
|
5995 |
+
var cacheLimit$1 = 10000;
|
5996 |
+
var cacheCount$1 = 0;
|
|
|
|
|
5997 |
|
5998 |
+
function compilePath$1(path, options) {
|
5999 |
+
var cacheKey = "" + options.end + options.strict + options.sensitive;
|
6000 |
+
var pathCache = cache$1[cacheKey] || (cache$1[cacheKey] = {});
|
6001 |
+
if (pathCache[path]) return pathCache[path];
|
6002 |
+
var keys = [];
|
6003 |
+
var regexp = path_to_regexp_default()(path, keys, options);
|
6004 |
+
var result = {
|
6005 |
+
regexp: regexp,
|
6006 |
+
keys: keys
|
6007 |
+
};
|
6008 |
|
6009 |
+
if (cacheCount$1 < cacheLimit$1) {
|
6010 |
+
pathCache[path] = result;
|
6011 |
+
cacheCount$1++;
|
6012 |
+
}
|
|
|
6013 |
|
6014 |
+
return result;
|
6015 |
+
}
|
6016 |
+
/**
|
6017 |
+
* Public API for matching a URL pathname to a path.
|
6018 |
+
*/
|
6019 |
|
|
|
|
|
|
|
6020 |
|
6021 |
+
function matchPath(pathname, options) {
|
6022 |
+
if (options === void 0) {
|
6023 |
+
options = {};
|
6024 |
}
|
6025 |
|
6026 |
+
if (typeof options === "string" || Array.isArray(options)) {
|
6027 |
+
options = {
|
6028 |
+
path: options
|
6029 |
+
};
|
6030 |
+
}
|
|
|
|
|
|
|
|
|
6031 |
|
6032 |
+
var _options = options,
|
6033 |
+
path = _options.path,
|
6034 |
+
_options$exact = _options.exact,
|
6035 |
+
exact = _options$exact === void 0 ? false : _options$exact,
|
6036 |
+
_options$strict = _options.strict,
|
6037 |
+
strict = _options$strict === void 0 ? false : _options$strict,
|
6038 |
+
_options$sensitive = _options.sensitive,
|
6039 |
+
sensitive = _options$sensitive === void 0 ? false : _options$sensitive;
|
6040 |
+
var paths = [].concat(path);
|
6041 |
+
return paths.reduce(function (matched, path) {
|
6042 |
+
if (!path && path !== "") return null;
|
6043 |
+
if (matched) return matched;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6044 |
|
6045 |
+
var _compilePath = compilePath$1(path, {
|
6046 |
+
end: exact,
|
6047 |
+
strict: strict,
|
6048 |
+
sensitive: sensitive
|
6049 |
+
}),
|
6050 |
+
regexp = _compilePath.regexp,
|
6051 |
+
keys = _compilePath.keys;
|
|
|
|
|
6052 |
|
6053 |
+
var match = regexp.exec(pathname);
|
6054 |
+
if (!match) return null;
|
6055 |
+
var url = match[0],
|
6056 |
+
values = match.slice(1);
|
6057 |
+
var isExact = pathname === url;
|
6058 |
+
if (exact && !isExact) return null;
|
6059 |
+
return {
|
6060 |
+
path: path,
|
6061 |
+
// the path used to match
|
6062 |
+
url: path === "/" && url === "" ? "/" : url,
|
6063 |
+
// the matched portion of the URL
|
6064 |
+
isExact: isExact,
|
6065 |
+
// whether or not we matched exactly
|
6066 |
+
params: keys.reduce(function (memo, key, index) {
|
6067 |
+
memo[key.name] = values[index];
|
6068 |
+
return memo;
|
6069 |
+
}, {})
|
6070 |
+
};
|
6071 |
+
}, null);
|
6072 |
+
}
|
6073 |
|
6074 |
+
function isEmptyChildren(children) {
|
6075 |
+
return external_React_default.a.Children.count(children) === 0;
|
6076 |
+
}
|
|
|
|
|
|
|
|
|
|
|
6077 |
|
6078 |
+
function evalChildrenDev(children, props, path) {
|
6079 |
+
var value = children(props);
|
6080 |
+
false ? undefined : void 0;
|
6081 |
+
return value || null;
|
6082 |
+
}
|
6083 |
+
/**
|
6084 |
+
* The public API for matching a single path and rendering.
|
6085 |
+
*/
|
6086 |
|
|
|
|
|
|
|
6087 |
|
6088 |
+
var react_router_Route =
|
6089 |
+
/*#__PURE__*/
|
6090 |
+
function (_React$Component) {
|
6091 |
+
Object(inheritsLoose["a" /* default */])(Route, _React$Component);
|
6092 |
+
|
6093 |
+
function Route() {
|
6094 |
+
return _React$Component.apply(this, arguments) || this;
|
6095 |
}
|
6096 |
|
6097 |
+
var _proto = Route.prototype;
|
6098 |
|
6099 |
+
_proto.render = function render() {
|
6100 |
+
var _this = this;
|
6101 |
|
6102 |
+
return external_React_default.a.createElement(react_router_context.Consumer, null, function (context$1) {
|
6103 |
+
!context$1 ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0;
|
6104 |
+
var location = _this.props.location || context$1.location;
|
6105 |
+
var match = _this.props.computedMatch ? _this.props.computedMatch // <Switch> already computed the match for us
|
6106 |
+
: _this.props.path ? matchPath(location.pathname, _this.props) : context$1.match;
|
|
|
6107 |
|
6108 |
+
var props = Object(esm_extends["a" /* default */])({}, context$1, {
|
6109 |
+
location: location,
|
6110 |
+
match: match
|
6111 |
+
});
|
6112 |
|
6113 |
+
var _this$props = _this.props,
|
6114 |
+
children = _this$props.children,
|
6115 |
+
component = _this$props.component,
|
6116 |
+
render = _this$props.render; // Preact uses an empty array as children by
|
6117 |
+
// default, so use null if that's the case.
|
6118 |
|
6119 |
+
if (Array.isArray(children) && children.length === 0) {
|
6120 |
+
children = null;
|
6121 |
+
}
|
6122 |
|
6123 |
+
return external_React_default.a.createElement(react_router_context.Provider, {
|
6124 |
+
value: props
|
6125 |
+
}, props.match ? children ? typeof children === "function" ? false ? undefined : children(props) : children : component ? external_React_default.a.createElement(component, props) : render ? render(props) : null : typeof children === "function" ? false ? undefined : children(props) : null);
|
6126 |
+
});
|
6127 |
+
};
|
6128 |
|
6129 |
+
return Route;
|
6130 |
+
}(external_React_default.a.Component);
|
|
|
|
|
|
|
6131 |
|
6132 |
+
if (false) {}
|
|
|
|
|
6133 |
|
6134 |
+
function addLeadingSlash(path) {
|
6135 |
+
return path.charAt(0) === "/" ? path : "/" + path;
|
6136 |
+
}
|
|
|
|
|
|
|
|
|
|
|
6137 |
|
6138 |
+
function addBasename(basename, location) {
|
6139 |
+
if (!basename) return location;
|
6140 |
+
return Object(esm_extends["a" /* default */])({}, location, {
|
6141 |
+
pathname: addLeadingSlash(basename) + location.pathname
|
6142 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6143 |
}
|
6144 |
|
6145 |
+
function stripBasename(basename, location) {
|
6146 |
+
if (!basename) return location;
|
6147 |
+
var base = addLeadingSlash(basename);
|
6148 |
+
if (location.pathname.indexOf(base) !== 0) return location;
|
6149 |
+
return Object(esm_extends["a" /* default */])({}, location, {
|
6150 |
+
pathname: location.pathname.substr(base.length)
|
6151 |
+
});
|
6152 |
+
}
|
6153 |
+
|
6154 |
+
function createURL(location) {
|
6155 |
+
return typeof location === "string" ? location : Object(esm_history["d" /* createPath */])(location);
|
6156 |
+
}
|
6157 |
+
|
6158 |
+
function staticHandler(methodName) {
|
6159 |
+
return function () {
|
6160 |
+
false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) ;
|
6161 |
+
};
|
6162 |
}
|
6163 |
+
|
6164 |
+
function noop() {}
|
6165 |
/**
|
6166 |
+
* The public top-level API for a "static" <Router>, so-called because it
|
6167 |
+
* can't actually change the current location. Instead, it just records
|
6168 |
+
* location changes in a context object. Useful mainly in testing and
|
6169 |
+
* server-rendering scenarios.
|
6170 |
*/
|
6171 |
|
6172 |
|
6173 |
+
var react_router_StaticRouter =
|
6174 |
+
/*#__PURE__*/
|
6175 |
+
function (_React$Component) {
|
6176 |
+
Object(inheritsLoose["a" /* default */])(StaticRouter, _React$Component);
|
6177 |
|
6178 |
+
function StaticRouter() {
|
6179 |
+
var _this;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6180 |
|
6181 |
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
6182 |
+
args[_key] = arguments[_key];
|
6183 |
+
}
|
6184 |
|
6185 |
+
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
|
|
|
|
6186 |
|
6187 |
+
_this.handlePush = function (location) {
|
6188 |
+
return _this.navigateTo(location, "PUSH");
|
6189 |
+
};
|
6190 |
|
6191 |
+
_this.handleReplace = function (location) {
|
6192 |
+
return _this.navigateTo(location, "REPLACE");
|
6193 |
+
};
|
|
|
6194 |
|
6195 |
+
_this.handleListen = function () {
|
6196 |
+
return noop;
|
6197 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6198 |
|
6199 |
+
_this.handleBlock = function () {
|
6200 |
+
return noop;
|
6201 |
+
};
|
|
|
|
|
6202 |
|
6203 |
+
return _this;
|
|
|
|
|
|
|
|
|
|
|
|
|
6204 |
}
|
6205 |
|
6206 |
+
var _proto = StaticRouter.prototype;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6207 |
|
6208 |
+
_proto.navigateTo = function navigateTo(location, action) {
|
6209 |
+
var _this$props = this.props,
|
6210 |
+
_this$props$basename = _this$props.basename,
|
6211 |
+
basename = _this$props$basename === void 0 ? "" : _this$props$basename,
|
6212 |
+
_this$props$context = _this$props.context,
|
6213 |
+
context = _this$props$context === void 0 ? {} : _this$props$context;
|
6214 |
+
context.action = action;
|
6215 |
+
context.location = addBasename(basename, Object(esm_history["b" /* createLocation */])(location));
|
6216 |
+
context.url = createURL(context.location);
|
6217 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6218 |
|
6219 |
+
_proto.render = function render() {
|
6220 |
+
var _this$props2 = this.props,
|
6221 |
+
_this$props2$basename = _this$props2.basename,
|
6222 |
+
basename = _this$props2$basename === void 0 ? "" : _this$props2$basename,
|
6223 |
+
_this$props2$context = _this$props2.context,
|
6224 |
+
context = _this$props2$context === void 0 ? {} : _this$props2$context,
|
6225 |
+
_this$props2$location = _this$props2.location,
|
6226 |
+
location = _this$props2$location === void 0 ? "/" : _this$props2$location,
|
6227 |
+
rest = Object(objectWithoutPropertiesLoose["a" /* default */])(_this$props2, ["basename", "context", "location"]);
|
6228 |
|
6229 |
+
var history = {
|
6230 |
+
createHref: function createHref(path) {
|
6231 |
+
return addLeadingSlash(basename + createURL(path));
|
6232 |
+
},
|
6233 |
+
action: "POP",
|
6234 |
+
location: stripBasename(basename, Object(esm_history["b" /* createLocation */])(location)),
|
6235 |
+
push: this.handlePush,
|
6236 |
+
replace: this.handleReplace,
|
6237 |
+
go: staticHandler("go"),
|
6238 |
+
goBack: staticHandler("goBack"),
|
6239 |
+
goForward: staticHandler("goForward"),
|
6240 |
+
listen: this.handleListen,
|
6241 |
+
block: this.handleBlock
|
6242 |
+
};
|
6243 |
+
return external_React_default.a.createElement(react_router_Router, Object(esm_extends["a" /* default */])({}, rest, {
|
6244 |
+
history: history,
|
6245 |
+
staticContext: context
|
6246 |
+
}));
|
6247 |
+
};
|
6248 |
|
6249 |
+
return StaticRouter;
|
6250 |
+
}(external_React_default.a.Component);
|
|
|
|
|
6251 |
|
6252 |
+
if (false) {}
|
|
|
|
|
|
|
6253 |
|
6254 |
+
/**
|
6255 |
+
* The public API for rendering the first <Route> that matches.
|
6256 |
+
*/
|
6257 |
|
6258 |
+
var react_router_Switch =
|
6259 |
+
/*#__PURE__*/
|
6260 |
+
function (_React$Component) {
|
6261 |
+
Object(inheritsLoose["a" /* default */])(Switch, _React$Component);
|
6262 |
+
|
6263 |
+
function Switch() {
|
6264 |
+
return _React$Component.apply(this, arguments) || this;
|
6265 |
}
|
6266 |
|
6267 |
+
var _proto = Switch.prototype;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6268 |
|
6269 |
+
_proto.render = function render() {
|
6270 |
+
var _this = this;
|
6271 |
|
6272 |
+
return external_React_default.a.createElement(react_router_context.Consumer, null, function (context) {
|
6273 |
+
!context ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0;
|
6274 |
+
var location = _this.props.location || context.location;
|
6275 |
+
var element, match; // We use React.Children.forEach instead of React.Children.toArray().find()
|
6276 |
+
// here because toArray adds keys to all child elements and we do not want
|
6277 |
+
// to trigger an unmount/remount for two <Route>s that render the same
|
6278 |
+
// component at different URLs.
|
6279 |
|
6280 |
+
external_React_default.a.Children.forEach(_this.props.children, function (child) {
|
6281 |
+
if (match == null && external_React_default.a.isValidElement(child)) {
|
6282 |
+
element = child;
|
6283 |
+
var path = child.props.path || child.props.from;
|
6284 |
+
match = path ? matchPath(location.pathname, Object(esm_extends["a" /* default */])({}, child.props, {
|
6285 |
+
path: path
|
6286 |
+
})) : context.match;
|
6287 |
+
}
|
6288 |
+
});
|
6289 |
+
return match ? external_React_default.a.cloneElement(element, {
|
6290 |
+
location: location,
|
6291 |
+
computedMatch: match
|
6292 |
+
}) : null;
|
6293 |
+
});
|
6294 |
+
};
|
6295 |
|
6296 |
+
return Switch;
|
6297 |
+
}(external_React_default.a.Component);
|
|
|
6298 |
|
6299 |
+
if (false) {}
|
6300 |
|
6301 |
+
/**
|
6302 |
+
* A public higher-order component to access the imperative API
|
6303 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6304 |
|
6305 |
+
function withRouter(Component) {
|
6306 |
+
var displayName = "withRouter(" + (Component.displayName || Component.name) + ")";
|
6307 |
|
6308 |
+
var C = function C(props) {
|
6309 |
+
var wrappedComponentRef = props.wrappedComponentRef,
|
6310 |
+
remainingProps = Object(objectWithoutPropertiesLoose["a" /* default */])(props, ["wrappedComponentRef"]);
|
6311 |
|
6312 |
+
return external_React_default.a.createElement(react_router_context.Consumer, null, function (context) {
|
6313 |
+
!context ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0;
|
6314 |
+
return external_React_default.a.createElement(Component, Object(esm_extends["a" /* default */])({}, remainingProps, context, {
|
6315 |
+
ref: wrappedComponentRef
|
6316 |
+
}));
|
6317 |
+
});
|
6318 |
};
|
6319 |
|
6320 |
+
C.displayName = displayName;
|
6321 |
+
C.WrappedComponent = Component;
|
6322 |
+
|
6323 |
+
if (false) {}
|
6324 |
+
|
6325 |
+
return hoist_non_react_statics_cjs_default()(C, Component);
|
6326 |
}
|
6327 |
|
6328 |
+
var useContext = external_React_default.a.useContext;
|
6329 |
+
function useHistory() {
|
6330 |
+
if (false) {}
|
6331 |
|
6332 |
+
return useContext(react_router_context).history;
|
6333 |
+
}
|
6334 |
+
function useLocation() {
|
6335 |
+
if (false) {}
|
6336 |
|
6337 |
+
return useContext(react_router_context).location;
|
6338 |
+
}
|
6339 |
+
function useParams() {
|
6340 |
+
if (false) {}
|
|
|
|
|
6341 |
|
6342 |
+
var match = useContext(react_router_context).match;
|
6343 |
+
return match ? match.params : {};
|
6344 |
+
}
|
6345 |
+
function useRouteMatch(path) {
|
6346 |
+
if (false) {}
|
6347 |
|
6348 |
+
return path ? matchPath(useLocation().pathname, path) : useContext(react_router_context).match;
|
6349 |
+
}
|
|
|
6350 |
|
6351 |
+
if (false) { var secondaryBuildName, initialBuildName, buildNames, react_router_key, global; }
|
|
|
|
|
|
|
|
|
|
|
6352 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6353 |
|
6354 |
+
//# sourceMappingURL=react-router.js.map
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6355 |
|
6356 |
+
// EXTERNAL MODULE: external "lodash"
|
6357 |
+
var external_lodash_ = __webpack_require__(2);
|
|
|
|
|
|
|
6358 |
|
6359 |
+
// EXTERNAL MODULE: external {"this":["wc","components"]}
|
6360 |
+
var external_this_wc_components_ = __webpack_require__(63);
|
|
|
|
|
|
|
|
|
6361 |
|
6362 |
+
// EXTERNAL MODULE: external {"this":["wc","navigation"]}
|
6363 |
+
var external_this_wc_navigation_ = __webpack_require__(22);
|
6364 |
|
6365 |
+
// EXTERNAL MODULE: ./client/settings/index.js
|
6366 |
+
var settings = __webpack_require__(26);
|
6367 |
|
6368 |
+
// EXTERNAL MODULE: external {"this":["wc","data"]}
|
6369 |
+
var external_this_wc_data_ = __webpack_require__(51);
|
|
|
|
|
6370 |
|
6371 |
+
// EXTERNAL MODULE: ./client/layout/style.scss
|
6372 |
+
var layout_style = __webpack_require__(434);
|
6373 |
|
6374 |
+
// EXTERNAL MODULE: ./node_modules/qs/lib/index.js
|
6375 |
+
var lib = __webpack_require__(58);
|
|
|
|
|
|
|
6376 |
|
6377 |
+
// EXTERNAL MODULE: external {"this":["wp","hooks"]}
|
6378 |
+
var external_this_wp_hooks_ = __webpack_require__(48);
|
6379 |
|
6380 |
+
// EXTERNAL MODULE: external {"this":["wp","i18n"]}
|
6381 |
+
var external_this_wp_i18n_ = __webpack_require__(3);
|
|
|
6382 |
|
6383 |
+
// EXTERNAL MODULE: ./client/analytics/report/get-reports.js
|
6384 |
+
var get_reports = __webpack_require__(199);
|
6385 |
|
6386 |
+
// CONCATENATED MODULE: ./client/layout/controller.js
|
6387 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6388 |
|
6389 |
|
|
|
|
|
|
|
6390 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6391 |
|
|
|
6392 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6393 |
|
6394 |
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = getPrototypeOf_default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf_default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn_default()(this, result); }; }
|
|
|
6395 |
|
6396 |
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
6397 |
|
6398 |
+
/**
|
6399 |
+
* External dependencies
|
6400 |
+
*/
|
6401 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6402 |
|
|
|
|
|
|
|
6403 |
|
|
|
6404 |
|
|
|
|
|
|
|
6405 |
|
6406 |
+
/**
|
6407 |
+
* WooCommerce dependencies
|
6408 |
+
*/
|
6409 |
|
|
|
|
|
6410 |
|
|
|
|
|
6411 |
|
6412 |
+
/**
|
6413 |
+
* Internal dependencies
|
6414 |
+
*/
|
|
|
|
|
|
|
|
|
6415 |
|
6416 |
+
var AnalyticsReport = Object(external_this_wp_element_["lazy"])(function () {
|
6417 |
+
return Promise.resolve(/* import() */).then(__webpack_require__.bind(null, 200));
|
6418 |
+
});
|
6419 |
+
var AnalyticsSettings = Object(external_this_wp_element_["lazy"])(function () {
|
6420 |
+
return __webpack_require__.e(/* import() | analytics-settings */ 18).then(__webpack_require__.bind(null, 906));
|
6421 |
+
});
|
6422 |
+
var Dashboard = Object(external_this_wp_element_["lazy"])(function () {
|
6423 |
+
return __webpack_require__.e(/* import() | dashboard */ 24).then(__webpack_require__.bind(null, 900));
|
6424 |
+
});
|
6425 |
+
var DevDocs = Object(external_this_wp_element_["lazy"])(function () {
|
6426 |
+
return Promise.all(/* import() | devdocs */[__webpack_require__.e(2), __webpack_require__.e(44), __webpack_require__.e(28)]).then(__webpack_require__.bind(null, 907));
|
6427 |
+
});
|
6428 |
+
var Homepage = Object(external_this_wp_element_["lazy"])(function () {
|
6429 |
+
return __webpack_require__.e(/* import() | homepage */ 29).then(__webpack_require__.bind(null, 908));
|
6430 |
+
});
|
6431 |
+
var MarketingOverview = Object(external_this_wp_element_["lazy"])(function () {
|
6432 |
+
return Promise.all(/* import() | marketing-overview */[__webpack_require__.e(2), __webpack_require__.e(45), __webpack_require__.e(32)]).then(__webpack_require__.bind(null, 905));
|
6433 |
+
});
|
6434 |
+
|
6435 |
+
var TIME_EXCLUDED_SCREENS_FILTER = 'woocommerce_admin_time_excluded_screens';
|
6436 |
+
var PAGES_FILTER = 'woocommerce_admin_pages_list';
|
6437 |
+
var controller_getPages = function getPages() {
|
6438 |
+
var pages = [];
|
6439 |
+
var initialBreadcrumbs = [['', wcSettings.woocommerceTranslation]];
|
6440 |
|
6441 |
+
if (false) {}
|
6442 |
|
6443 |
+
if (true) {
|
6444 |
+
pages.push({
|
6445 |
+
container: Dashboard,
|
6446 |
+
path: '/',
|
6447 |
+
breadcrumbs: [].concat(initialBreadcrumbs, [Object(external_this_wp_i18n_["__"])('Dashboard', 'woocommerce-admin')]),
|
6448 |
+
wpOpenMenu: 'toplevel_page_woocommerce'
|
6449 |
+
});
|
6450 |
+
}
|
6451 |
|
6452 |
+
if (false) {}
|
6453 |
|
6454 |
+
if (true) {
|
6455 |
+
if (false) {}
|
|
|
|
|
|
|
6456 |
|
6457 |
+
var ReportWpOpenMenu = "toplevel_page_wc-admin-path--analytics-".concat( false ? undefined : 'revenue');
|
6458 |
+
pages.push({
|
6459 |
+
container: AnalyticsSettings,
|
6460 |
+
path: '/analytics/settings',
|
6461 |
+
breadcrumbs: [].concat(initialBreadcrumbs, [['/analytics/revenue', Object(external_this_wp_i18n_["__"])('Analytics', 'woocommerce-admin')], Object(external_this_wp_i18n_["__"])('Settings', 'woocommerce-admin')]),
|
6462 |
+
wpOpenMenu: ReportWpOpenMenu
|
6463 |
+
});
|
6464 |
+
pages.push({
|
6465 |
+
container: AnalyticsReport,
|
6466 |
+
path: '/customers',
|
6467 |
+
breadcrumbs: [].concat(initialBreadcrumbs, [Object(external_this_wp_i18n_["__"])('Customers', 'woocommerce-admin')]),
|
6468 |
+
wpOpenMenu: 'toplevel_page_woocommerce'
|
6469 |
+
});
|
6470 |
+
pages.push({
|
6471 |
+
container: AnalyticsReport,
|
6472 |
+
path: '/analytics/:report',
|
6473 |
+
breadcrumbs: function breadcrumbs(_ref2) {
|
6474 |
+
var match = _ref2.match;
|
6475 |
+
var report = Object(external_lodash_["find"])(Object(get_reports["a" /* default */])(), {
|
6476 |
+
report: match.params.report
|
6477 |
+
});
|
6478 |
|
6479 |
+
if (!report) {
|
6480 |
+
return [];
|
6481 |
+
}
|
6482 |
|
6483 |
+
return [].concat(initialBreadcrumbs, [['/analytics/revenue', Object(external_this_wp_i18n_["__"])('Analytics', 'woocommerce-admin')], report.title]);
|
6484 |
+
},
|
6485 |
+
wpOpenMenu: ReportWpOpenMenu
|
6486 |
+
});
|
6487 |
+
}
|
6488 |
+
|
6489 |
+
if (true) {
|
6490 |
+
pages.push({
|
6491 |
+
container: MarketingOverview,
|
6492 |
+
path: '/marketing',
|
6493 |
+
breadcrumbs: [].concat(initialBreadcrumbs, [Object(external_this_wp_i18n_["__"])('Marketing', 'woocommerce-admin')]),
|
6494 |
+
wpOpenMenu: 'toplevel_page_wc-admin-path--marketing'
|
6495 |
+
});
|
6496 |
+
}
|
6497 |
+
|
6498 |
+
return Object(external_this_wp_hooks_["applyFilters"])(PAGES_FILTER, pages);
|
6499 |
};
|
6500 |
+
var controller_Controller = /*#__PURE__*/function (_Component) {
|
6501 |
+
inherits_default()(Controller, _Component);
|
6502 |
|
6503 |
+
var _super = _createSuper(Controller);
|
6504 |
|
6505 |
+
function Controller() {
|
6506 |
+
classCallCheck_default()(this, Controller);
|
|
|
6507 |
|
6508 |
+
return _super.apply(this, arguments);
|
6509 |
+
}
|
6510 |
+
|
6511 |
+
createClass_default()(Controller, [{
|
6512 |
+
key: "componentDidMount",
|
6513 |
+
value: function componentDidMount() {
|
6514 |
+
window.document.documentElement.scrollTop = 0;
|
6515 |
+
}
|
6516 |
+
}, {
|
6517 |
+
key: "componentDidUpdate",
|
6518 |
+
value: function componentDidUpdate(prevProps) {
|
6519 |
+
var prevQuery = this.getQuery(prevProps.location.search);
|
6520 |
+
var prevBaseQuery = Object(external_lodash_["omit"])(this.getQuery(prevProps.location.search), 'paged');
|
6521 |
+
var baseQuery = Object(external_lodash_["omit"])(this.getQuery(this.props.location.search), 'paged');
|
6522 |
+
|
6523 |
+
if (prevQuery.paged > 1 && !Object(external_lodash_["isEqual"])(prevBaseQuery, baseQuery)) {
|
6524 |
+
Object(external_this_wc_navigation_["getHistory"])().replace(Object(external_this_wc_navigation_["getNewPath"])({
|
6525 |
+
paged: 1
|
6526 |
+
}));
|
6527 |
+
}
|
6528 |
+
|
6529 |
+
if (prevProps.match.url !== this.props.match.url) {
|
6530 |
+
window.document.documentElement.scrollTop = 0;
|
6531 |
+
}
|
6532 |
+
}
|
6533 |
+
}, {
|
6534 |
+
key: "getQuery",
|
6535 |
+
value: function getQuery(searchString) {
|
6536 |
+
if (!searchString) {
|
6537 |
+
return {};
|
6538 |
+
}
|
6539 |
+
|
6540 |
+
var search = searchString.substring(1);
|
6541 |
+
return Object(lib["parse"])(search);
|
6542 |
+
}
|
6543 |
+
}, {
|
6544 |
+
key: "render",
|
6545 |
+
value: function render() {
|
6546 |
+
var _this$props = this.props,
|
6547 |
+
page = _this$props.page,
|
6548 |
+
match = _this$props.match,
|
6549 |
+
location = _this$props.location;
|
6550 |
+
var url = match.url,
|
6551 |
+
params = match.params;
|
6552 |
+
var query = this.getQuery(location.search);
|
6553 |
+
window.wpNavMenuUrlUpdate(query);
|
6554 |
+
window.wpNavMenuClassChange(page, url);
|
6555 |
+
return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Suspense"], {
|
6556 |
+
fallback: Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Spinner"], null)
|
6557 |
+
}, Object(external_this_wp_element_["createElement"])(page.container, {
|
6558 |
+
params: params,
|
6559 |
+
path: url,
|
6560 |
+
pathMatch: page.path,
|
6561 |
+
query: query
|
6562 |
+
}));
|
6563 |
+
}
|
6564 |
+
}]);
|
6565 |
+
|
6566 |
+
return Controller;
|
6567 |
+
}(external_this_wp_element_["Component"]);
|
6568 |
/**
|
6569 |
+
* Update an anchor's link in sidebar to include persisted queries. Leave excluded screens
|
6570 |
+
* as is.
|
6571 |
*
|
6572 |
+
* @param {HTMLElement} item - Sidebar anchor link.
|
6573 |
+
* @param {Object} nextQuery - A query object to be added to updated hrefs.
|
6574 |
+
* @param {Array} excludedScreens - wc-admin screens to avoid updating.
|
6575 |
*/
|
6576 |
|
6577 |
+
function updateLinkHref(item, nextQuery, excludedScreens) {
|
6578 |
+
var isWCAdmin = /admin.php\?page=wc-admin/.test(item.href);
|
6579 |
|
6580 |
+
if (isWCAdmin) {
|
6581 |
+
var search = Object(external_lodash_["last"])(item.href.split('?'));
|
6582 |
+
var query = Object(lib["parse"])(search);
|
6583 |
+
var path = query.path || 'dashboard';
|
6584 |
+
var screen = path.replace('/analytics', '').replace('/', '');
|
6585 |
+
var isExcludedScreen = excludedScreens.includes(screen);
|
6586 |
+
var href = 'admin.php?' + Object(lib["stringify"])(Object.assign(query, isExcludedScreen ? {} : nextQuery)); // Replace the href so you can see the url on hover.
|
6587 |
|
6588 |
+
item.href = href;
|
6589 |
|
6590 |
+
item.onclick = function (e) {
|
6591 |
+
e.preventDefault();
|
6592 |
+
Object(external_this_wc_navigation_["getHistory"])().push(href);
|
6593 |
+
};
|
6594 |
+
}
|
6595 |
+
} // Update's wc-admin links in wp-admin menu
|
6596 |
|
6597 |
+
window.wpNavMenuUrlUpdate = function (query) {
|
6598 |
+
var excludedScreens = Object(external_this_wp_hooks_["applyFilters"])(TIME_EXCLUDED_SCREENS_FILTER, ['devdocs', 'stock', 'settings', 'customers']);
|
6599 |
+
var nextQuery = Object(external_this_wc_navigation_["getPersistedQuery"])(query);
|
6600 |
+
Array.from(document.querySelectorAll('#adminmenu a')).forEach(function (item) {
|
6601 |
+
return updateLinkHref(item, nextQuery, excludedScreens);
|
6602 |
+
});
|
6603 |
+
}; // When the route changes, we need to update wp-admin's menu with the correct section & current link
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6604 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6605 |
|
6606 |
+
window.wpNavMenuClassChange = function (page, url) {
|
6607 |
+
Array.from(document.getElementsByClassName('current')).forEach(function (item) {
|
6608 |
+
item.classList.remove('current');
|
6609 |
+
});
|
6610 |
+
var submenu = Array.from(document.querySelectorAll('.wp-has-current-submenu'));
|
6611 |
+
submenu.forEach(function (element) {
|
6612 |
+
element.classList.remove('wp-has-current-submenu');
|
6613 |
+
element.classList.remove('wp-menu-open');
|
6614 |
+
element.classList.remove('selected');
|
6615 |
+
element.classList.add('wp-not-current-submenu');
|
6616 |
+
element.classList.add('menu-top');
|
6617 |
+
});
|
6618 |
+
var pageUrl = url === '/' ? 'admin.php?page=wc-admin' : 'admin.php?page=wc-admin&path=' + encodeURIComponent(url);
|
6619 |
+
var currentItemsSelector = url === '/' ? "li > a[href$=\"".concat(pageUrl, "\"], li > a[href*=\"").concat(pageUrl, "?\"]") : "li > a[href*=\"".concat(pageUrl, "\"]");
|
6620 |
+
var currentItems = document.querySelectorAll(currentItemsSelector);
|
6621 |
+
Array.from(currentItems).forEach(function (item) {
|
6622 |
+
item.parentElement.classList.add('current');
|
6623 |
+
});
|
6624 |
|
6625 |
+
if (page.wpOpenMenu) {
|
6626 |
+
var currentMenu = document.querySelector('#' + page.wpOpenMenu);
|
6627 |
+
currentMenu.classList.remove('wp-not-current-submenu');
|
6628 |
+
currentMenu.classList.add('wp-has-current-submenu');
|
6629 |
+
currentMenu.classList.add('wp-menu-open');
|
6630 |
+
currentMenu.classList.add('current');
|
6631 |
+
}
|
6632 |
|
6633 |
+
var wpWrap = document.querySelector('#wpwrap');
|
6634 |
+
wpWrap.classList.remove('wp-responsive-open');
|
6635 |
};
|
6636 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/assertThisInitialized.js
|
6637 |
+
var assertThisInitialized = __webpack_require__(59);
|
6638 |
+
var assertThisInitialized_default = /*#__PURE__*/__webpack_require__.n(assertThisInitialized);
|
6639 |
|
6640 |
+
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
6641 |
+
var classnames = __webpack_require__(10);
|
6642 |
+
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
6643 |
|
6644 |
+
// EXTERNAL MODULE: external {"this":["wp","htmlEntities"]}
|
6645 |
+
var external_this_wp_htmlEntities_ = __webpack_require__(69);
|
|
|
6646 |
|
6647 |
+
// EXTERNAL MODULE: ./client/header/style.scss
|
6648 |
+
var header_style = __webpack_require__(436);
|
|
|
|
|
|
|
|
|
|
|
6649 |
|
6650 |
+
// EXTERNAL MODULE: ./node_modules/react-click-outside/dist/index.js
|
6651 |
+
var dist = __webpack_require__(412);
|
6652 |
+
var dist_default = /*#__PURE__*/__webpack_require__.n(dist);
|
6653 |
|
6654 |
+
// EXTERNAL MODULE: ./node_modules/@wordpress/components/build-module/icon-button/index.js
|
6655 |
+
var icon_button = __webpack_require__(85);
|
6656 |
|
6657 |
+
// EXTERNAL MODULE: ./node_modules/@wordpress/components/build-module/navigable-container/menu.js + 1 modules
|
6658 |
+
var menu = __webpack_require__(424);
|
6659 |
|
6660 |
+
// EXTERNAL MODULE: ./node_modules/gridicons/dist/pages.js
|
6661 |
+
var dist_pages = __webpack_require__(413);
|
6662 |
+
var pages_default = /*#__PURE__*/__webpack_require__.n(dist_pages);
|
6663 |
|
6664 |
+
// EXTERNAL MODULE: ./node_modules/gridicons/dist/cross-small.js
|
6665 |
+
var cross_small = __webpack_require__(414);
|
6666 |
+
var cross_small_default = /*#__PURE__*/__webpack_require__.n(cross_small);
|
6667 |
|
6668 |
+
// EXTERNAL MODULE: ./client/header/activity-panel/style.scss
|
6669 |
+
var activity_panel_style = __webpack_require__(438);
|
|
|
|
|
|
|
|
|
|
|
6670 |
|
6671 |
+
// CONCATENATED MODULE: ./client/header/activity-panel/toggle-bubble.js
|
6672 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6673 |
|
6674 |
+
/**
|
6675 |
+
* External dependencies
|
6676 |
+
*/
|
6677 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6678 |
|
6679 |
|
6680 |
+
var toggle_bubble_ActivityPanelToggleBubble = function ActivityPanelToggleBubble(_ref) {
|
6681 |
+
var _ref$height = _ref.height,
|
6682 |
+
height = _ref$height === void 0 ? 24 : _ref$height,
|
6683 |
+
_ref$width = _ref.width,
|
6684 |
+
width = _ref$width === void 0 ? 24 : _ref$width,
|
6685 |
+
_ref$hasUnread = _ref.hasUnread,
|
6686 |
+
hasUnread = _ref$hasUnread === void 0 ? false : _ref$hasUnread;
|
6687 |
+
var classes = classnames_default()('woocommerce-layout__activity-panel-toggle-bubble', {
|
6688 |
+
'has-unread': hasUnread
|
6689 |
+
});
|
6690 |
+
/* eslint-disable max-len */
|
6691 |
|
6692 |
+
return Object(external_this_wp_element_["createElement"])("div", {
|
6693 |
+
className: classes
|
6694 |
+
}, Object(external_this_wp_element_["createElement"])("svg", {
|
6695 |
+
height: height,
|
6696 |
+
width: width,
|
6697 |
+
viewBox: "0 0 24 24"
|
6698 |
+
}, Object(external_this_wp_element_["createElement"])("path", {
|
6699 |
+
d: "M18.9 2H5.1C3.4 2 2 3.4 2 5.1v10.7C2 17.6 3.4 19 5.1 19H9l6 3-1-3h4.9c1.7 0 3.1-1.4 3.1-3.1V5.1C22 3.4 20.6 2 18.9 2zm-1.5 4.5c-.4.8-.8 2.1-1 3.9-.3 1.8-.4 3.1-.3 4.1 0 .3 0 .5-.1.7-.1.2-.3.4-.6.4s-.6-.1-.9-.4c-1-1-1.8-2.6-2.4-4.6-.7 1.4-1.2 2.4-1.6 3.1-.6 1.2-1.2 1.8-1.6 1.9-.3 0-.5-.2-.8-.7-.5-1.4-1.1-4.2-1.7-8.2 0-.3 0-.5.2-.7.1-.2.4-.3.7-.4.5 0 .9.2.9.8.3 2.3.7 4.2 1.1 5.7l2.4-4.5c.2-.4.4-.6.8-.6.5 0 .8.3.9.9.3 1.4.6 2.6 1 3.7.3-2.7.8-4.7 1.4-5.9.2-.3.4-.5.7-.5.2 0 .5.1.7.2.2.2.3.4.3.6 0 .2 0 .4-.1.5z"
|
6700 |
+
})));
|
6701 |
+
/* eslint-enable max-len */
|
6702 |
+
};
|
|
|
|
|
6703 |
|
6704 |
+
toggle_bubble_ActivityPanelToggleBubble.propTypes = {
|
6705 |
+
height: prop_types_default.a.number,
|
6706 |
+
width: prop_types_default.a.number,
|
6707 |
+
hasUnread: prop_types_default.a.bool
|
6708 |
+
};
|
6709 |
+
/* harmony default export */ var toggle_bubble = (toggle_bubble_ActivityPanelToggleBubble);
|
6710 |
+
// EXTERNAL MODULE: ./client/analytics/settings/config.js + 1 modules
|
6711 |
+
var config = __webpack_require__(263);
|
6712 |
|
6713 |
+
// CONCATENATED MODULE: ./client/header/activity-panel/unread-indicators.js
|
6714 |
+
/**
|
6715 |
+
* WooCommerce dependencies
|
6716 |
+
*/
|
6717 |
|
6718 |
+
/**
|
6719 |
+
* Internal dependencies
|
6720 |
+
*/
|
6721 |
|
|
|
|
|
|
|
|
|
6722 |
|
|
|
|
|
6723 |
|
6724 |
+
function getUnreadNotes(select) {
|
6725 |
+
var _select = select('wc-api'),
|
6726 |
+
getCurrentUserData = _select.getCurrentUserData,
|
6727 |
+
getNotes = _select.getNotes,
|
6728 |
+
getNotesError = _select.getNotesError,
|
6729 |
+
isGetNotesRequesting = _select.isGetNotesRequesting;
|
6730 |
+
|
6731 |
+
var userData = getCurrentUserData();
|
6732 |
+
|
6733 |
+
if (!userData) {
|
6734 |
+
return null;
|
6735 |
}
|
6736 |
|
6737 |
+
var notesQuery = {
|
6738 |
+
page: 1,
|
6739 |
+
per_page: 1,
|
6740 |
+
type: 'info,warning',
|
6741 |
+
orderby: 'date',
|
6742 |
+
order: 'desc'
|
6743 |
+
}; // Disable eslint rule requiring `latestNote` to be defined below because the next two statements
|
6744 |
+
// depend on `getNotes` to have been called.
|
6745 |
+
// eslint-disable-next-line @wordpress/no-unused-vars-before-return
|
6746 |
+
|
6747 |
+
var latestNote = getNotes(notesQuery);
|
6748 |
+
var isError = Boolean(getNotesError(notesQuery));
|
6749 |
+
var isRequesting = isGetNotesRequesting(notesQuery);
|
6750 |
+
|
6751 |
+
if (isError || isRequesting) {
|
6752 |
+
return null;
|
6753 |
+
}
|
6754 |
+
|
6755 |
+
return latestNote[0] && new Date(latestNote[0].date_created_gmt + 'Z').getTime() > userData.activity_panel_inbox_last_read;
|
6756 |
}
|
6757 |
+
function getUnreadOrders(select) {
|
6758 |
+
var _select2 = select('wc-api'),
|
6759 |
+
getItems = _select2.getItems,
|
6760 |
+
getItemsTotalCount = _select2.getItemsTotalCount,
|
6761 |
+
getItemsError = _select2.getItemsError,
|
6762 |
+
isGetItemsRequesting = _select2.isGetItemsRequesting;
|
6763 |
|
6764 |
+
var _select3 = select(external_this_wc_data_["SETTINGS_STORE_NAME"]),
|
6765 |
+
getMutableSetting = _select3.getSetting;
|
|
|
|
|
6766 |
|
6767 |
+
var _getMutableSetting = getMutableSetting('wc_admin', 'wcAdminSettings', {}),
|
6768 |
+
_getMutableSetting$wo = _getMutableSetting.woocommerce_actionable_order_statuses,
|
6769 |
+
orderStatuses = _getMutableSetting$wo === void 0 ? config["a" /* DEFAULT_ACTIONABLE_STATUSES */] : _getMutableSetting$wo;
|
6770 |
|
6771 |
+
if (!orderStatuses.length) {
|
6772 |
+
return false;
|
6773 |
+
}
|
6774 |
|
6775 |
+
var ordersQuery = {
|
6776 |
+
page: 1,
|
6777 |
+
per_page: 1,
|
6778 |
+
// Core endpoint requires per_page > 0.
|
6779 |
+
status: orderStatuses,
|
6780 |
+
_fields: ['id']
|
6781 |
+
};
|
6782 |
+
getItems('orders', ordersQuery); // Disable eslint rule requiring `latestNote` to be defined below because the next two statements
|
6783 |
+
// depend on `getItemsTotalCount` to have been called.
|
6784 |
+
// eslint-disable-next-line @wordpress/no-unused-vars-before-return
|
6785 |
|
6786 |
+
var totalOrders = getItemsTotalCount('orders', ordersQuery);
|
6787 |
+
var isError = Boolean(getItemsError('orders', ordersQuery));
|
6788 |
+
var isRequesting = isGetItemsRequesting('orders', ordersQuery);
|
6789 |
+
|
6790 |
+
if (isError || isRequesting) {
|
6791 |
+
return null;
|
6792 |
+
}
|
6793 |
+
|
6794 |
+
return totalOrders > 0;
|
6795 |
+
}
|
6796 |
+
function getUnapprovedReviews(select) {
|
6797 |
+
var _select4 = select('wc-api'),
|
6798 |
+
getReviewsTotalCount = _select4.getReviewsTotalCount,
|
6799 |
+
getReviewsError = _select4.getReviewsError,
|
6800 |
+
isGetReviewsRequesting = _select4.isGetReviewsRequesting;
|
6801 |
+
|
6802 |
+
var reviewsEnabled = Object(settings["g" /* getSetting */])('reviewsEnabled');
|
6803 |
+
|
6804 |
+
if (reviewsEnabled === 'yes') {
|
6805 |
+
var actionableReviewsQuery = {
|
6806 |
+
page: 1,
|
6807 |
+
// @todo we are not using this review, so when the endpoint supports it,
|
6808 |
+
// it could be replaced with `per_page: 0`
|
6809 |
+
per_page: 1,
|
6810 |
+
status: 'hold'
|
6811 |
+
};
|
6812 |
+
var totalActionableReviews = getReviewsTotalCount(actionableReviewsQuery);
|
6813 |
+
var isActionableReviewsError = Boolean(getReviewsError(actionableReviewsQuery));
|
6814 |
+
var isActionableReviewsRequesting = isGetReviewsRequesting(actionableReviewsQuery);
|
6815 |
+
|
6816 |
+
if (!isActionableReviewsError && !isActionableReviewsRequesting) {
|
6817 |
+
return totalActionableReviews > 0;
|
6818 |
}
|
6819 |
+
}
|
6820 |
|
6821 |
+
return false;
|
6822 |
+
}
|
6823 |
+
function getUnreadStock() {
|
6824 |
+
return Object(settings["g" /* getSetting */])('hasLowStock', false);
|
6825 |
+
}
|
6826 |
+
// EXTERNAL MODULE: ./client/lib/tracks.js
|
6827 |
+
var tracks = __webpack_require__(79);
|
6828 |
|
6829 |
+
// EXTERNAL MODULE: ./client/wc-api/with-select.js
|
6830 |
+
var with_select = __webpack_require__(101);
|
6831 |
|
6832 |
+
// CONCATENATED MODULE: ./client/header/activity-panel/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6833 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6834 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6835 |
|
|
|
|
|
|
|
|
|
6836 |
|
|
|
|
|
6837 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6838 |
|
|
|
6839 |
|
|
|
|
|
|
|
6840 |
|
6841 |
+
function activity_panel_createSuper(Derived) { var hasNativeReflectConstruct = activity_panel_isNativeReflectConstruct(); return function () { var Super = getPrototypeOf_default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf_default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn_default()(this, result); }; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6842 |
|
6843 |
+
function activity_panel_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
|
|
|
6844 |
|
6845 |
+
/**
|
6846 |
+
* External dependencies
|
6847 |
+
*/
|
6848 |
|
|
|
|
|
|
|
6849 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6850 |
|
|
|
|
|
6851 |
|
|
|
|
|
|
|
|
|
6852 |
|
|
|
|
|
|
|
6853 |
|
|
|
|
|
|
|
|
|
6854 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6855 |
|
|
|
|
|
|
|
|
|
6856 |
|
6857 |
+
/**
|
6858 |
+
* Internal dependencies
|
6859 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6860 |
|
|
|
|
|
|
|
6861 |
|
|
|
|
|
6862 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6863 |
|
|
|
6864 |
|
6865 |
+
var InboxPanel = Object(external_this_wp_element_["lazy"])(function () {
|
6866 |
+
return Promise.all(/* import() | activity-panels-inbox */[__webpack_require__.e(2), __webpack_require__.e(3), __webpack_require__.e(6)]).then(__webpack_require__.bind(null, 909));
|
6867 |
+
});
|
6868 |
+
var OrdersPanel = Object(external_this_wp_element_["lazy"])(function () {
|
6869 |
+
return Promise.all(/* import() | activity-panels-orders */[__webpack_require__.e(2), __webpack_require__.e(7)]).then(__webpack_require__.bind(null, 912));
|
6870 |
+
});
|
6871 |
+
var StockPanel = Object(external_this_wp_element_["lazy"])(function () {
|
6872 |
+
return Promise.all(/* import() | activity-panels-stock */[__webpack_require__.e(2), __webpack_require__.e(8)]).then(__webpack_require__.bind(null, 913));
|
6873 |
+
});
|
6874 |
+
var ReviewsPanel = Object(external_this_wp_element_["lazy"])(function () {
|
6875 |
+
return Promise.all(/* import() | activity-panels-inbox */[__webpack_require__.e(2), __webpack_require__.e(3), __webpack_require__.e(6)]).then(__webpack_require__.bind(null, 902));
|
6876 |
+
});
|
6877 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6878 |
|
6879 |
+
var manageStock = Object(settings["g" /* getSetting */])('manageStock', 'no');
|
6880 |
+
var activity_panel_reviewsEnabled = Object(settings["g" /* getSetting */])('reviewsEnabled', 'no');
|
6881 |
|
6882 |
+
var activity_panel_ActivityPanel = /*#__PURE__*/function (_Component) {
|
6883 |
+
inherits_default()(ActivityPanel, _Component);
|
|
|
6884 |
|
6885 |
+
var _super = activity_panel_createSuper(ActivityPanel);
|
|
|
|
|
6886 |
|
6887 |
+
function ActivityPanel() {
|
6888 |
+
var _this;
|
6889 |
|
6890 |
+
classCallCheck_default()(this, ActivityPanel);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6891 |
|
6892 |
+
_this = _super.apply(this, arguments);
|
6893 |
+
_this.togglePanel = _this.togglePanel.bind(assertThisInitialized_default()(_this));
|
6894 |
+
_this.clearPanel = _this.clearPanel.bind(assertThisInitialized_default()(_this));
|
6895 |
+
_this.toggleMobile = _this.toggleMobile.bind(assertThisInitialized_default()(_this));
|
6896 |
+
_this.renderTab = _this.renderTab.bind(assertThisInitialized_default()(_this));
|
6897 |
+
_this.state = {
|
6898 |
+
isPanelOpen: false,
|
6899 |
+
mobileOpen: false,
|
6900 |
+
currentTab: '',
|
6901 |
+
isPanelSwitching: false
|
6902 |
+
};
|
6903 |
+
return _this;
|
6904 |
+
}
|
6905 |
|
6906 |
+
createClass_default()(ActivityPanel, [{
|
6907 |
+
key: "togglePanel",
|
6908 |
+
value: function togglePanel(tabName) {
|
6909 |
+
var _this$state = this.state,
|
6910 |
+
isPanelOpen = _this$state.isPanelOpen,
|
6911 |
+
currentTab = _this$state.currentTab; // If a panel is being opened, or if an existing panel is already open and a different one is being opened, record a track.
|
|
|
|
|
|
|
6912 |
|
6913 |
+
if (!isPanelOpen || tabName !== currentTab) {
|
6914 |
+
Object(tracks["b" /* recordEvent */])('activity_panel_open', {
|
6915 |
+
tab: tabName
|
6916 |
+
});
|
6917 |
+
}
|
6918 |
|
6919 |
+
this.setState(function (state) {
|
6920 |
+
if (tabName === state.currentTab || state.currentTab === '') {
|
6921 |
+
return {
|
6922 |
+
isPanelOpen: !state.isPanelOpen,
|
6923 |
+
currentTab: tabName,
|
6924 |
+
mobileOpen: !state.isPanelOpen
|
6925 |
+
};
|
6926 |
+
}
|
6927 |
|
6928 |
+
return {
|
6929 |
+
currentTab: tabName,
|
6930 |
+
isPanelSwitching: true
|
6931 |
+
};
|
6932 |
+
});
|
6933 |
+
}
|
6934 |
+
}, {
|
6935 |
+
key: "clearPanel",
|
6936 |
+
value: function clearPanel() {
|
6937 |
+
this.setState(function (_ref) {
|
6938 |
+
var isPanelOpen = _ref.isPanelOpen;
|
6939 |
+
return isPanelOpen ? {
|
6940 |
+
isPanelSwitching: false
|
6941 |
+
} : {
|
6942 |
+
currentTab: ''
|
6943 |
+
};
|
6944 |
+
});
|
6945 |
+
} // On smaller screen, the panel buttons are hidden behind a toggle.
|
6946 |
|
6947 |
+
}, {
|
6948 |
+
key: "toggleMobile",
|
6949 |
+
value: function toggleMobile() {
|
6950 |
+
var tabs = this.getTabs();
|
6951 |
+
this.setState(function (state) {
|
6952 |
+
return {
|
6953 |
+
mobileOpen: !state.mobileOpen,
|
6954 |
+
currentTab: state.mobileOpen ? '' : tabs[0].name,
|
6955 |
+
isPanelOpen: !state.mobileOpen
|
6956 |
+
};
|
6957 |
+
});
|
6958 |
+
}
|
6959 |
+
}, {
|
6960 |
+
key: "handleClickOutside",
|
6961 |
+
value: function handleClickOutside() {
|
6962 |
+
var _this$state2 = this.state,
|
6963 |
+
isPanelOpen = _this$state2.isPanelOpen,
|
6964 |
+
currentTab = _this$state2.currentTab;
|
6965 |
+
|
6966 |
+
if (isPanelOpen) {
|
6967 |
+
this.togglePanel(currentTab);
|
6968 |
+
}
|
6969 |
+
} // @todo Pull in dynamic unread status/count
|
6970 |
|
6971 |
+
}, {
|
6972 |
+
key: "getTabs",
|
6973 |
+
value: function getTabs() {
|
6974 |
+
var _this$props = this.props,
|
6975 |
+
hasUnreadNotes = _this$props.hasUnreadNotes,
|
6976 |
+
hasUnreadOrders = _this$props.hasUnreadOrders,
|
6977 |
+
hasUnapprovedReviews = _this$props.hasUnapprovedReviews,
|
6978 |
+
hasUnreadStock = _this$props.hasUnreadStock;
|
6979 |
+
return [{
|
6980 |
+
name: 'inbox',
|
6981 |
+
title: Object(external_this_wp_i18n_["__"])('Inbox', 'woocommerce-admin'),
|
6982 |
+
icon: Object(external_this_wp_element_["createElement"])("i", {
|
6983 |
+
className: "material-icons-outlined"
|
6984 |
+
}, "inbox"),
|
6985 |
+
unread: hasUnreadNotes
|
6986 |
+
}, {
|
6987 |
+
name: 'orders',
|
6988 |
+
title: Object(external_this_wp_i18n_["__"])('Orders', 'woocommerce-admin'),
|
6989 |
+
icon: Object(external_this_wp_element_["createElement"])(pages_default.a, null),
|
6990 |
+
unread: hasUnreadOrders
|
6991 |
+
}, manageStock === 'yes' ? {
|
6992 |
+
name: 'stock',
|
6993 |
+
title: Object(external_this_wp_i18n_["__"])('Stock', 'woocommerce-admin'),
|
6994 |
+
icon: Object(external_this_wp_element_["createElement"])("i", {
|
6995 |
+
className: "material-icons-outlined"
|
6996 |
+
}, "widgets"),
|
6997 |
+
unread: hasUnreadStock
|
6998 |
+
} : null, activity_panel_reviewsEnabled === 'yes' ? {
|
6999 |
+
name: 'reviews',
|
7000 |
+
title: Object(external_this_wp_i18n_["__"])('Reviews', 'woocommerce-admin'),
|
7001 |
+
icon: Object(external_this_wp_element_["createElement"])("i", {
|
7002 |
+
className: "material-icons-outlined"
|
7003 |
+
}, "star_border"),
|
7004 |
+
unread: hasUnapprovedReviews
|
7005 |
+
} : null].filter(Boolean);
|
7006 |
+
}
|
7007 |
+
}, {
|
7008 |
+
key: "getPanelContent",
|
7009 |
+
value: function getPanelContent(tab) {
|
7010 |
+
switch (tab) {
|
7011 |
+
case 'inbox':
|
7012 |
+
return Object(external_this_wp_element_["createElement"])(InboxPanel, null);
|
7013 |
+
|
7014 |
+
case 'orders':
|
7015 |
+
var hasUnreadOrders = this.props.hasUnreadOrders;
|
7016 |
+
return Object(external_this_wp_element_["createElement"])(OrdersPanel, {
|
7017 |
+
hasActionableOrders: hasUnreadOrders
|
7018 |
+
});
|
7019 |
|
7020 |
+
case 'stock':
|
7021 |
+
return Object(external_this_wp_element_["createElement"])(StockPanel, null);
|
7022 |
|
7023 |
+
case 'reviews':
|
7024 |
+
var hasUnapprovedReviews = this.props.hasUnapprovedReviews;
|
7025 |
+
return Object(external_this_wp_element_["createElement"])(ReviewsPanel, {
|
7026 |
+
hasUnapprovedReviews: hasUnapprovedReviews
|
7027 |
+
});
|
7028 |
|
7029 |
+
default:
|
7030 |
+
return null;
|
7031 |
+
}
|
7032 |
+
}
|
7033 |
+
}, {
|
7034 |
+
key: "renderPanel",
|
7035 |
+
value: function renderPanel() {
|
7036 |
+
var _this$state3 = this.state,
|
7037 |
+
isPanelOpen = _this$state3.isPanelOpen,
|
7038 |
+
currentTab = _this$state3.currentTab,
|
7039 |
+
isPanelSwitching = _this$state3.isPanelSwitching;
|
7040 |
+
var tab = Object(external_lodash_["find"])(this.getTabs(), {
|
7041 |
+
name: currentTab
|
7042 |
+
});
|
|
|
|
|
|
|
7043 |
|
7044 |
+
if (!tab) {
|
7045 |
+
return Object(external_this_wp_element_["createElement"])("div", {
|
7046 |
+
className: "woocommerce-layout__activity-panel-wrapper"
|
7047 |
+
});
|
7048 |
+
}
|
7049 |
|
7050 |
+
var classNames = classnames_default()('woocommerce-layout__activity-panel-wrapper', {
|
7051 |
+
'is-open': isPanelOpen,
|
7052 |
+
'is-switching': isPanelSwitching
|
7053 |
+
});
|
7054 |
+
return Object(external_this_wp_element_["createElement"])("div", {
|
7055 |
+
className: classNames,
|
7056 |
+
tabIndex: 0,
|
7057 |
+
role: "tabpanel",
|
7058 |
+
"aria-label": tab.title,
|
7059 |
+
onTransitionEnd: this.clearPanel,
|
7060 |
+
onAnimationEnd: this.clearPanel
|
7061 |
+
}, Object(external_this_wp_element_["createElement"])("div", {
|
7062 |
+
className: "woocommerce-layout__activity-panel-content",
|
7063 |
+
key: 'activity-panel-' + currentTab,
|
7064 |
+
id: 'activity-panel-' + currentTab
|
7065 |
+
}, Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Suspense"], {
|
7066 |
+
fallback: Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Spinner"], null)
|
7067 |
+
}, this.getPanelContent(currentTab))));
|
7068 |
}
|
7069 |
+
}, {
|
7070 |
+
key: "renderTab",
|
7071 |
+
value: function renderTab(tab, i) {
|
7072 |
+
var _this$state4 = this.state,
|
7073 |
+
currentTab = _this$state4.currentTab,
|
7074 |
+
isPanelOpen = _this$state4.isPanelOpen;
|
7075 |
+
var className = classnames_default()('woocommerce-layout__activity-panel-tab', {
|
7076 |
+
'is-active': isPanelOpen && tab.name === currentTab,
|
7077 |
+
'has-unread': tab.unread
|
7078 |
+
});
|
7079 |
+
var selected = tab.name === currentTab;
|
7080 |
+
var tabIndex = -1; // Only make this item tabbable if it is the currently selected item, or the panel is closed and the item is the first item.
|
7081 |
|
7082 |
+
if (selected || !isPanelOpen && i === 0) {
|
7083 |
+
tabIndex = null;
|
7084 |
+
}
|
7085 |
|
7086 |
+
return Object(external_this_wp_element_["createElement"])(icon_button["a" /* default */], {
|
7087 |
+
role: "tab",
|
7088 |
+
className: className,
|
7089 |
+
tabIndex: tabIndex,
|
7090 |
+
"aria-selected": selected,
|
7091 |
+
"aria-controls": 'activity-panel-' + tab.name,
|
7092 |
+
key: 'activity-panel-tab-' + tab.name,
|
7093 |
+
id: 'activity-panel-tab-' + tab.name,
|
7094 |
+
onClick: Object(external_lodash_["partial"])(this.togglePanel, tab.name),
|
7095 |
+
icon: tab.icon
|
7096 |
+
}, tab.title, ' ', tab.unread && Object(external_this_wp_element_["createElement"])("span", {
|
7097 |
+
className: "screen-reader-text"
|
7098 |
+
}, Object(external_this_wp_i18n_["__"])('unread activity', 'woocommerce-admin')));
|
7099 |
+
}
|
7100 |
+
}, {
|
7101 |
+
key: "render",
|
7102 |
+
value: function render() {
|
7103 |
+
var tabs = this.getTabs();
|
7104 |
+
var mobileOpen = this.state.mobileOpen;
|
7105 |
+
var headerId = Object(external_lodash_["uniqueId"])('activity-panel-header_');
|
7106 |
+
var panelClasses = classnames_default()('woocommerce-layout__activity-panel', {
|
7107 |
+
'is-mobile-open': this.state.mobileOpen
|
7108 |
+
});
|
7109 |
+
var hasUnread = tabs.some(function (tab) {
|
7110 |
+
return tab.unread;
|
7111 |
+
});
|
7112 |
+
var viewLabel = hasUnread ? Object(external_this_wp_i18n_["__"])('View Activity Panel, you have unread activity', 'woocommerce-admin') : Object(external_this_wp_i18n_["__"])('View Activity Panel', 'woocommerce-admin');
|
7113 |
+
return Object(external_this_wp_element_["createElement"])("div", null, Object(external_this_wp_element_["createElement"])(external_this_wc_components_["H"], {
|
7114 |
+
id: headerId,
|
7115 |
+
className: "screen-reader-text"
|
7116 |
+
}, Object(external_this_wp_i18n_["__"])('Store Activity', 'woocommerce-admin')), Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Section"], {
|
7117 |
+
component: "aside",
|
7118 |
+
id: "woocommerce-activity-panel",
|
7119 |
+
"aria-labelledby": headerId
|
7120 |
+
}, Object(external_this_wp_element_["createElement"])(icon_button["a" /* default */], {
|
7121 |
+
onClick: this.toggleMobile,
|
7122 |
+
icon: mobileOpen ? Object(external_this_wp_element_["createElement"])(cross_small_default.a, null) : Object(external_this_wp_element_["createElement"])(toggle_bubble, {
|
7123 |
+
hasUnread: hasUnread
|
7124 |
+
}),
|
7125 |
+
label: mobileOpen ? Object(external_this_wp_i18n_["__"])('Close Activity Panel', 'woocommerce-admin') : viewLabel,
|
7126 |
+
"aria-expanded": mobileOpen,
|
7127 |
+
tooltip: false,
|
7128 |
+
className: "woocommerce-layout__activity-panel-mobile-toggle"
|
7129 |
+
}), Object(external_this_wp_element_["createElement"])("div", {
|
7130 |
+
className: panelClasses
|
7131 |
+
}, Object(external_this_wp_element_["createElement"])(menu["a" /* default */], {
|
7132 |
+
role: "tablist",
|
7133 |
+
orientation: "horizontal",
|
7134 |
+
className: "woocommerce-layout__activity-panel-tabs"
|
7135 |
+
}, tabs && tabs.map(this.renderTab)), this.renderPanel())));
|
7136 |
+
}
|
7137 |
+
}]);
|
7138 |
|
7139 |
+
return ActivityPanel;
|
7140 |
+
}(external_this_wp_element_["Component"]);
|
7141 |
|
7142 |
+
/* harmony default export */ var activity_panel = (Object(with_select["a" /* default */])(function (select) {
|
7143 |
+
var hasUnreadNotes = getUnreadNotes(select);
|
7144 |
+
var hasUnreadOrders = getUnreadOrders(select);
|
7145 |
+
var hasUnreadStock = getUnreadStock();
|
7146 |
+
var hasUnapprovedReviews = getUnapprovedReviews(select);
|
7147 |
+
return {
|
7148 |
+
hasUnreadNotes: hasUnreadNotes,
|
7149 |
+
hasUnreadOrders: hasUnreadOrders,
|
7150 |
+
hasUnreadStock: hasUnreadStock,
|
7151 |
+
hasUnapprovedReviews: hasUnapprovedReviews
|
7152 |
+
};
|
7153 |
+
})(dist_default()(activity_panel_ActivityPanel)));
|
7154 |
+
// CONCATENATED MODULE: ./client/header/index.js
|
7155 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7156 |
|
|
|
|
|
|
|
|
|
|
|
7157 |
|
|
|
|
|
7158 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7159 |
|
|
|
|
|
|
|
7160 |
|
|
|
|
|
|
|
7161 |
|
|
|
|
|
|
|
|
|
|
|
|
|
7162 |
|
7163 |
+
function header_createSuper(Derived) { var hasNativeReflectConstruct = header_isNativeReflectConstruct(); return function () { var Super = getPrototypeOf_default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf_default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn_default()(this, result); }; }
|
|
|
7164 |
|
7165 |
+
function header_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
|
7166 |
|
7167 |
+
/**
|
7168 |
+
* External dependencies
|
7169 |
+
*/
|
7170 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7171 |
|
|
|
|
|
7172 |
|
|
|
|
|
7173 |
|
|
|
|
|
|
|
|
|
7174 |
|
7175 |
+
/**
|
7176 |
+
* WooCommerce dependencies
|
7177 |
+
*/
|
7178 |
|
|
|
7179 |
|
|
|
|
|
7180 |
|
|
|
7181 |
|
7182 |
+
/**
|
7183 |
+
* Internal dependencies
|
7184 |
+
*/
|
7185 |
|
|
|
7186 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7187 |
|
|
|
|
|
7188 |
|
|
|
7189 |
|
7190 |
+
var header_Header = /*#__PURE__*/function (_Component) {
|
7191 |
+
inherits_default()(Header, _Component);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7192 |
|
7193 |
+
var _super = header_createSuper(Header);
|
7194 |
|
7195 |
+
function Header() {
|
7196 |
+
var _this;
|
|
|
7197 |
|
7198 |
+
classCallCheck_default()(this, Header);
|
|
|
7199 |
|
7200 |
+
_this = _super.call(this);
|
7201 |
+
_this.state = {
|
7202 |
+
isScrolled: false
|
7203 |
+
};
|
7204 |
+
_this.headerRef = Object(external_this_wp_element_["createRef"])();
|
7205 |
+
_this.onWindowScroll = _this.onWindowScroll.bind(assertThisInitialized_default()(_this));
|
7206 |
+
_this.updateIsScrolled = _this.updateIsScrolled.bind(assertThisInitialized_default()(_this));
|
7207 |
+
_this.trackLinkClick = _this.trackLinkClick.bind(assertThisInitialized_default()(_this));
|
7208 |
+
_this.updateDocumentTitle = _this.updateDocumentTitle.bind(assertThisInitialized_default()(_this));
|
7209 |
+
return _this;
|
7210 |
+
}
|
7211 |
|
7212 |
+
createClass_default()(Header, [{
|
7213 |
+
key: "componentDidMount",
|
7214 |
+
value: function componentDidMount() {
|
7215 |
+
this.threshold = this.headerRef.current.offsetTop;
|
7216 |
+
window.addEventListener('scroll', this.onWindowScroll);
|
7217 |
+
this.updateIsScrolled();
|
7218 |
}
|
7219 |
+
}, {
|
7220 |
+
key: "componentWillUnmount",
|
7221 |
+
value: function componentWillUnmount() {
|
7222 |
+
window.removeEventListener('scroll', this.onWindowScroll);
|
7223 |
+
window.cancelAnimationFrame(this.handle);
|
7224 |
+
}
|
7225 |
+
}, {
|
7226 |
+
key: "onWindowScroll",
|
7227 |
+
value: function onWindowScroll() {
|
7228 |
+
this.handle = window.requestAnimationFrame(this.updateIsScrolled);
|
7229 |
+
}
|
7230 |
+
}, {
|
7231 |
+
key: "updateIsScrolled",
|
7232 |
+
value: function updateIsScrolled() {
|
7233 |
+
var isScrolled = window.pageYOffset > this.threshold - 20;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7234 |
|
7235 |
+
if (isScrolled !== this.state.isScrolled) {
|
7236 |
+
this.setState({
|
7237 |
+
isScrolled: isScrolled
|
7238 |
+
});
|
7239 |
+
}
|
7240 |
+
}
|
7241 |
+
}, {
|
7242 |
+
key: "trackLinkClick",
|
7243 |
+
value: function trackLinkClick(event) {
|
7244 |
+
var href = event.target.closest('a').getAttribute('href');
|
7245 |
+
Object(tracks["b" /* recordEvent */])('navbar_breadcrumb_click', {
|
7246 |
+
href: href,
|
7247 |
+
text: event.target.innerText
|
7248 |
+
});
|
7249 |
}
|
7250 |
+
}, {
|
7251 |
+
key: "updateDocumentTitle",
|
7252 |
+
value: function updateDocumentTitle() {
|
7253 |
+
var _this$props = this.props,
|
7254 |
+
sections = _this$props.sections,
|
7255 |
+
isEmbedded = _this$props.isEmbedded; // Don't modify the document title on existing WooCommerce pages.
|
7256 |
|
7257 |
+
if (isEmbedded) {
|
7258 |
+
return;
|
7259 |
+
}
|
7260 |
|
7261 |
+
var _sections = Array.isArray(sections) ? sections : [sections];
|
7262 |
|
7263 |
+
var documentTitle = _sections.map(function (section) {
|
7264 |
+
return Array.isArray(section) ? section[1] : section;
|
7265 |
+
}).reverse().join(' ‹ ');
|
|
|
|
|
|
|
7266 |
|
7267 |
+
document.title = Object(external_this_wp_htmlEntities_["decodeEntities"])(Object(external_this_wp_i18n_["sprintf"])(Object(external_this_wp_i18n_["__"])('%1$s ‹ %2$s — WooCommerce', 'woocommerce-admin'), documentTitle, Object(settings["g" /* getSetting */])('siteTitle', '')));
|
7268 |
+
}
|
7269 |
+
}, {
|
7270 |
+
key: "render",
|
7271 |
+
value: function render() {
|
7272 |
+
var _this2 = this;
|
7273 |
|
7274 |
+
var _this$props2 = this.props,
|
7275 |
+
sections = _this$props2.sections,
|
7276 |
+
isEmbedded = _this$props2.isEmbedded;
|
7277 |
+
var isScrolled = this.state.isScrolled;
|
7278 |
|
7279 |
+
var _sections = Array.isArray(sections) ? sections : [sections];
|
|
|
|
|
7280 |
|
7281 |
+
this.updateDocumentTitle();
|
7282 |
+
var className = classnames_default()('woocommerce-layout__header', {
|
7283 |
+
'is-scrolled': isScrolled
|
7284 |
+
});
|
7285 |
+
return Object(external_this_wp_element_["createElement"])("div", {
|
7286 |
+
className: className,
|
7287 |
+
ref: this.headerRef
|
7288 |
+
}, Object(external_this_wp_element_["createElement"])("h1", {
|
7289 |
+
className: "woocommerce-layout__header-breadcrumbs"
|
7290 |
+
}, _sections.map(function (section, i) {
|
7291 |
+
var sectionPiece = Array.isArray(section) ? Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Link"], {
|
7292 |
+
href: isEmbedded ? Object(settings["f" /* getAdminLink */])(section[0]) : Object(external_this_wc_navigation_["getNewPath"])({}, section[0], {}),
|
7293 |
+
type: isEmbedded ? 'wp-admin' : 'wc-admin',
|
7294 |
+
onClick: _this2.trackLinkClick
|
7295 |
+
}, section[1]) : section;
|
7296 |
+
return Object(external_this_wp_element_["createElement"])("span", {
|
7297 |
+
key: i
|
7298 |
+
}, Object(external_this_wp_htmlEntities_["decodeEntities"])(sectionPiece));
|
7299 |
+
})), true && Object(external_this_wp_element_["createElement"])(activity_panel, null));
|
7300 |
+
}
|
7301 |
+
}]);
|
7302 |
|
7303 |
+
return Header;
|
7304 |
+
}(external_this_wp_element_["Component"]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7305 |
|
7306 |
+
header_Header.propTypes = {
|
7307 |
+
sections: prop_types_default.a.node.isRequired,
|
7308 |
+
isEmbedded: prop_types_default.a.bool
|
7309 |
+
};
|
7310 |
+
header_Header.defaultProps = {
|
7311 |
+
isEmbedded: false
|
7312 |
+
};
|
7313 |
+
/* harmony default export */ var header = (header_Header);
|
7314 |
+
// CONCATENATED MODULE: ./client/layout/notices.js
|
7315 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7316 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7317 |
|
|
|
|
|
|
|
|
|
|
|
7318 |
|
|
|
7319 |
|
|
|
|
|
|
|
7320 |
|
|
|
|
|
7321 |
|
7322 |
+
function notices_createSuper(Derived) { var hasNativeReflectConstruct = notices_isNativeReflectConstruct(); return function () { var Super = getPrototypeOf_default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf_default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn_default()(this, result); }; }
|
7323 |
|
7324 |
+
function notices_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
7325 |
|
7326 |
+
/**
|
7327 |
+
* External dependencies
|
7328 |
+
*/
|
7329 |
|
7330 |
|
7331 |
+
var notices_Notices = /*#__PURE__*/function (_Component) {
|
7332 |
+
inherits_default()(Notices, _Component);
|
|
|
|
|
7333 |
|
7334 |
+
var _super = notices_createSuper(Notices);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7335 |
|
7336 |
+
function Notices() {
|
7337 |
+
classCallCheck_default()(this, Notices);
|
7338 |
|
7339 |
+
return _super.apply(this, arguments);
|
7340 |
+
}
|
7341 |
|
7342 |
+
createClass_default()(Notices, [{
|
7343 |
+
key: "render",
|
7344 |
+
value: function render() {
|
7345 |
+
return Object(external_this_wp_element_["createElement"])("div", {
|
7346 |
+
id: "woocommerce-layout__notice-list",
|
7347 |
+
className: "woocommerce-layout__notice-list"
|
7348 |
+
});
|
7349 |
+
}
|
7350 |
+
}]);
|
7351 |
|
7352 |
+
return Notices;
|
7353 |
+
}(external_this_wp_element_["Component"]);
|
7354 |
|
7355 |
+
/* harmony default export */ var layout_notices = (notices_Notices);
|
7356 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/regenerator/index.js
|
7357 |
+
var regenerator = __webpack_require__(73);
|
7358 |
+
var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
|
7359 |
|
7360 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
|
7361 |
+
var asyncToGenerator = __webpack_require__(70);
|
7362 |
|
7363 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 3 modules
|
7364 |
+
var slicedToArray = __webpack_require__(21);
|
7365 |
|
7366 |
+
// EXTERNAL MODULE: ./node_modules/react-spring/web.cjs.js
|
7367 |
+
var web_cjs = __webpack_require__(257);
|
7368 |
|
7369 |
+
// EXTERNAL MODULE: ./node_modules/@wordpress/compose/build-module/hooks/use-reduced-motion/index.js
|
7370 |
+
var use_reduced_motion = __webpack_require__(737);
|
7371 |
|
7372 |
+
// EXTERNAL MODULE: ./node_modules/@wordpress/components/build-module/snackbar/index.js
|
7373 |
+
var snackbar = __webpack_require__(415);
|
7374 |
|
7375 |
+
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/snackbar/list.js
|
7376 |
|
7377 |
|
7378 |
|
7386 |
|
7387 |
|
7388 |
/**
|
7389 |
+
* WordPress dependencies
|
|
|
|
|
|
|
7390 |
*/
|
7391 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7392 |
|
|
|
|
|
|
|
7393 |
|
|
|
|
|
7394 |
/**
|
7395 |
+
* Internal dependencies
|
|
|
|
|
|
|
|
|
|
|
7396 |
*/
|
7397 |
|
7398 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7399 |
/**
|
7400 |
+
* Renders a list of notices.
|
7401 |
*
|
7402 |
+
* @param {Object} $0 Props passed to the component.
|
7403 |
+
* @param {Array} $0.notices Array of notices to render.
|
7404 |
+
* @param {Function} $0.onRemove Function called when a notice should be removed / dismissed.
|
7405 |
+
* @param {Object} $0.className Name of the class used by the component.
|
7406 |
+
* @param {Object} $0.children Array of children to be rendered inside the notice list.
|
7407 |
+
* @return {Object} The rendered notices list.
|
7408 |
*/
|
7409 |
|
7410 |
+
function SnackbarList(_ref) {
|
7411 |
+
var notices = _ref.notices,
|
7412 |
+
className = _ref.className,
|
7413 |
+
children = _ref.children,
|
7414 |
+
_ref$onRemove = _ref.onRemove,
|
7415 |
+
onRemove = _ref$onRemove === void 0 ? external_lodash_["noop"] : _ref$onRemove;
|
7416 |
+
var isReducedMotion = Object(use_reduced_motion["a" /* default */])();
|
7417 |
|
7418 |
+
var _useState = Object(external_this_wp_element_["useState"])(function () {
|
7419 |
+
return new WeakMap();
|
7420 |
+
}),
|
7421 |
+
_useState2 = Object(slicedToArray["a" /* default */])(_useState, 1),
|
7422 |
+
refMap = _useState2[0];
|
7423 |
|
7424 |
+
var transitions = Object(web_cjs["useTransition"])(notices, function (notice) {
|
7425 |
+
return notice.id;
|
7426 |
+
}, {
|
7427 |
+
from: {
|
7428 |
+
opacity: 0,
|
7429 |
+
height: 0
|
7430 |
+
},
|
7431 |
+
enter: function enter(item) {
|
7432 |
+
return (
|
7433 |
+
/*#__PURE__*/
|
7434 |
+
function () {
|
7435 |
+
var _ref2 = Object(asyncToGenerator["a" /* default */])(
|
7436 |
+
/*#__PURE__*/
|
7437 |
+
regenerator_default.a.mark(function _callee(next) {
|
7438 |
+
return regenerator_default.a.wrap(function _callee$(_context) {
|
7439 |
+
while (1) {
|
7440 |
+
switch (_context.prev = _context.next) {
|
7441 |
+
case 0:
|
7442 |
+
_context.next = 2;
|
7443 |
+
return next({
|
7444 |
+
opacity: 1,
|
7445 |
+
height: refMap.get(item).offsetHeight
|
7446 |
+
});
|
7447 |
+
|
7448 |
+
case 2:
|
7449 |
+
return _context.abrupt("return", _context.sent);
|
7450 |
+
|
7451 |
+
case 3:
|
7452 |
+
case "end":
|
7453 |
+
return _context.stop();
|
7454 |
+
}
|
7455 |
+
}
|
7456 |
+
}, _callee);
|
7457 |
+
}));
|
7458 |
|
7459 |
+
return function (_x) {
|
7460 |
+
return _ref2.apply(this, arguments);
|
7461 |
+
};
|
7462 |
+
}()
|
7463 |
+
);
|
7464 |
+
},
|
7465 |
+
leave: function leave() {
|
7466 |
+
return (
|
7467 |
+
/*#__PURE__*/
|
7468 |
+
function () {
|
7469 |
+
var _ref3 = Object(asyncToGenerator["a" /* default */])(
|
7470 |
+
/*#__PURE__*/
|
7471 |
+
regenerator_default.a.mark(function _callee2(next) {
|
7472 |
+
return regenerator_default.a.wrap(function _callee2$(_context2) {
|
7473 |
+
while (1) {
|
7474 |
+
switch (_context2.prev = _context2.next) {
|
7475 |
+
case 0:
|
7476 |
+
_context2.next = 2;
|
7477 |
+
return next({
|
7478 |
+
opacity: 0
|
7479 |
+
});
|
7480 |
+
|
7481 |
+
case 2:
|
7482 |
+
_context2.next = 4;
|
7483 |
+
return next({
|
7484 |
+
height: 0
|
7485 |
+
});
|
7486 |
+
|
7487 |
+
case 4:
|
7488 |
+
case "end":
|
7489 |
+
return _context2.stop();
|
7490 |
+
}
|
7491 |
+
}
|
7492 |
+
}, _callee2);
|
7493 |
+
}));
|
7494 |
|
7495 |
+
return function (_x2) {
|
7496 |
+
return _ref3.apply(this, arguments);
|
7497 |
+
};
|
7498 |
+
}()
|
7499 |
+
);
|
7500 |
+
},
|
7501 |
+
immediate: isReducedMotion
|
7502 |
});
|
7503 |
+
className = classnames_default()('components-snackbar-list', className);
|
7504 |
+
|
7505 |
+
var removeNotice = function removeNotice(notice) {
|
7506 |
+
return function () {
|
7507 |
+
return onRemove(notice.id);
|
7508 |
+
};
|
7509 |
+
};
|
7510 |
+
|
7511 |
+
return Object(external_this_wp_element_["createElement"])("div", {
|
7512 |
+
className: className
|
7513 |
+
}, children, transitions.map(function (_ref4) {
|
7514 |
+
var notice = _ref4.item,
|
7515 |
+
key = _ref4.key,
|
7516 |
+
style = _ref4.props;
|
7517 |
+
return Object(external_this_wp_element_["createElement"])(web_cjs["animated"].div, {
|
7518 |
+
key: key,
|
7519 |
+
style: style
|
7520 |
+
}, Object(external_this_wp_element_["createElement"])("div", {
|
7521 |
+
className: "components-snackbar-list__notice-container",
|
7522 |
+
ref: function ref(_ref5) {
|
7523 |
+
return _ref5 && refMap.set(notice, _ref5);
|
7524 |
+
}
|
7525 |
+
}, Object(external_this_wp_element_["createElement"])(snackbar["a" /* default */], Object(esm_extends["a" /* default */])({}, Object(external_lodash_["omit"])(notice, ['content']), {
|
7526 |
+
onRemove: removeNotice(notice)
|
7527 |
+
}), notice.content)));
|
7528 |
+
}));
|
7529 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7530 |
|
7531 |
+
/* harmony default export */ var list = (SnackbarList);
|
7532 |
+
//# sourceMappingURL=list.js.map
|
7533 |
+
// EXTERNAL MODULE: ./client/layout/transient-notices/style.scss
|
7534 |
+
var transient_notices_style = __webpack_require__(439);
|
|
|
|
|
7535 |
|
7536 |
+
// CONCATENATED MODULE: ./client/layout/transient-notices/index.js
|
|
|
|
|
7537 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7538 |
|
|
|
|
|
|
|
7539 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7540 |
|
7541 |
+
|
7542 |
+
|
7543 |
+
|
7544 |
+
function transient_notices_createSuper(Derived) { var hasNativeReflectConstruct = transient_notices_isNativeReflectConstruct(); return function () { var Super = getPrototypeOf_default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf_default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn_default()(this, result); }; }
|
7545 |
+
|
7546 |
+
function transient_notices_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
7547 |
+
|
7548 |
/**
|
7549 |
+
* External dependencies
|
|
|
|
|
|
|
7550 |
*/
|
7551 |
|
|
|
|
|
|
|
7552 |
|
|
|
|
|
|
|
|
|
7553 |
|
|
|
|
|
|
|
|
|
|
|
7554 |
|
|
|
|
|
|
|
|
|
|
|
7555 |
|
|
|
|
|
7556 |
|
7557 |
+
/**
|
7558 |
+
* Internal dependencies
|
7559 |
+
*/
|
7560 |
|
|
|
|
|
|
|
7561 |
|
|
|
7562 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7563 |
|
7564 |
+
var transient_notices_TransientNotices = /*#__PURE__*/function (_Component) {
|
7565 |
+
inherits_default()(TransientNotices, _Component);
|
7566 |
|
7567 |
+
var _super = transient_notices_createSuper(TransientNotices);
|
|
|
|
|
7568 |
|
7569 |
+
function TransientNotices() {
|
7570 |
+
classCallCheck_default()(this, TransientNotices);
|
7571 |
|
7572 |
+
return _super.apply(this, arguments);
|
7573 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7574 |
|
7575 |
+
createClass_default()(TransientNotices, [{
|
7576 |
+
key: "render",
|
7577 |
+
value: function render() {
|
7578 |
+
var _this$props = this.props,
|
7579 |
+
className = _this$props.className,
|
7580 |
+
notices = _this$props.notices,
|
7581 |
+
onRemove = _this$props.onRemove;
|
7582 |
+
var classes = classnames_default()('woocommerce-transient-notices', 'components-notices__snackbar', className);
|
7583 |
+
return Object(external_this_wp_element_["createElement"])(list, {
|
7584 |
+
notices: notices,
|
7585 |
+
className: classes,
|
7586 |
+
onRemove: onRemove
|
7587 |
});
|
7588 |
+
}
|
7589 |
+
}]);
|
|
|
|
|
|
|
7590 |
|
7591 |
+
return TransientNotices;
|
7592 |
+
}(external_this_wp_element_["Component"]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7593 |
|
7594 |
+
transient_notices_TransientNotices.propTypes = {
|
7595 |
+
/**
|
7596 |
+
* Additional class name to style the component.
|
7597 |
+
*/
|
7598 |
+
className: prop_types_default.a.string,
|
|
|
|
|
|
|
|
|
|
|
|
|
7599 |
|
7600 |
+
/**
|
7601 |
+
* Array of notices to be displayed.
|
7602 |
+
*/
|
7603 |
+
notices: prop_types_default.a.array
|
7604 |
+
};
|
7605 |
+
/* harmony default export */ var transient_notices = (Object(compose["a" /* default */])(Object(with_select["a" /* default */])(function (select) {
|
7606 |
+
var notices = select('core/notices').getNotices();
|
7607 |
+
return {
|
7608 |
+
notices: notices
|
7609 |
+
};
|
7610 |
+
}), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
|
7611 |
+
return {
|
7612 |
+
onRemove: dispatch('core/notices').removeNotice
|
7613 |
+
};
|
7614 |
+
}))(transient_notices_TransientNotices));
|
7615 |
+
// EXTERNAL MODULE: ./client/analytics/report/index.js
|
7616 |
+
var analytics_report = __webpack_require__(200);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7617 |
|
7618 |
+
// CONCATENATED MODULE: ./client/layout/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7619 |
|
|
|
|
|
|
|
|
|
7620 |
|
7621 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7622 |
|
|
|
7623 |
|
|
|
|
|
|
|
7624 |
|
|
|
7625 |
|
|
|
|
|
7626 |
|
|
|
|
|
|
|
|
|
|
|
7627 |
|
7628 |
|
7629 |
+
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; }
|
|
|
|
|
7630 |
|
7631 |
+
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) { defineProperty_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; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7632 |
|
7633 |
+
function layout_createSuper(Derived) { var hasNativeReflectConstruct = layout_isNativeReflectConstruct(); return function () { var Super = getPrototypeOf_default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf_default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn_default()(this, result); }; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7634 |
|
7635 |
+
function layout_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
7636 |
|
7637 |
+
/**
|
7638 |
+
* External dependencies
|
7639 |
+
*/
|
7640 |
|
|
|
|
|
7641 |
|
|
|
|
|
|
|
|
|
|
|
7642 |
|
7643 |
|
|
|
|
|
|
|
|
|
7644 |
|
|
|
|
|
7645 |
|
7646 |
+
/**
|
7647 |
+
* WooCommerce dependencies
|
7648 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7649 |
|
7650 |
|
|
|
|
|
|
|
7651 |
|
|
|
7652 |
|
7653 |
+
|
7654 |
+
/**
|
7655 |
+
* Internal dependencies
|
7656 |
+
*/
|
7657 |
|
7658 |
|
|
|
|
|
|
|
7659 |
|
|
|
|
|
|
|
7660 |
|
|
|
7661 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7662 |
|
7663 |
|
7664 |
+
var StoreAlerts = Object(external_this_wp_element_["lazy"])(function () {
|
7665 |
+
return Promise.all(/* import() | store-alerts */[__webpack_require__.e(3), __webpack_require__.e(41)]).then(__webpack_require__.bind(null, 911));
|
7666 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7667 |
|
7668 |
+
var layout_PrimaryLayout = /*#__PURE__*/function (_Component) {
|
7669 |
+
inherits_default()(PrimaryLayout, _Component);
|
7670 |
|
7671 |
+
var _super = layout_createSuper(PrimaryLayout);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7672 |
|
7673 |
+
function PrimaryLayout() {
|
7674 |
+
classCallCheck_default()(this, PrimaryLayout);
|
7675 |
|
7676 |
+
return _super.apply(this, arguments);
|
7677 |
+
}
|
7678 |
|
7679 |
+
createClass_default()(PrimaryLayout, [{
|
7680 |
+
key: "render",
|
7681 |
+
value: function render() {
|
7682 |
+
var children = this.props.children;
|
7683 |
+
return Object(external_this_wp_element_["createElement"])("div", {
|
7684 |
+
className: "woocommerce-layout__primary",
|
7685 |
+
id: "woocommerce-layout__primary"
|
7686 |
+
}, true && Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Suspense"], {
|
7687 |
+
fallback: Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Spinner"], null)
|
7688 |
+
}, Object(external_this_wp_element_["createElement"])(StoreAlerts, null)), Object(external_this_wp_element_["createElement"])(layout_notices, null), children);
|
7689 |
+
}
|
7690 |
+
}]);
|
7691 |
|
7692 |
+
return PrimaryLayout;
|
7693 |
+
}(external_this_wp_element_["Component"]);
|
7694 |
|
7695 |
+
var layout_Layout = /*#__PURE__*/function (_Component2) {
|
7696 |
+
inherits_default()(_Layout, _Component2);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7697 |
|
7698 |
+
var _super2 = layout_createSuper(_Layout);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7699 |
|
7700 |
+
function _Layout() {
|
7701 |
+
classCallCheck_default()(this, _Layout);
|
7702 |
+
|
7703 |
+
return _super2.apply(this, arguments);
|
7704 |
+
}
|
7705 |
|
7706 |
+
createClass_default()(_Layout, [{
|
7707 |
+
key: "componentDidMount",
|
7708 |
+
value: function componentDidMount() {
|
7709 |
+
this.recordPageViewTrack();
|
7710 |
+
}
|
7711 |
+
}, {
|
7712 |
+
key: "componentDidUpdate",
|
7713 |
+
value: function componentDidUpdate(prevProps) {
|
7714 |
+
var previousPath = Object(external_lodash_["get"])(prevProps, 'location.pathname');
|
7715 |
+
var currentPath = Object(external_lodash_["get"])(this.props, 'location.pathname');
|
7716 |
|
7717 |
+
if (!previousPath || !currentPath) {
|
7718 |
+
return;
|
7719 |
+
}
|
7720 |
|
7721 |
+
if (previousPath !== currentPath) {
|
7722 |
+
this.recordPageViewTrack();
|
7723 |
+
}
|
7724 |
+
}
|
7725 |
+
}, {
|
7726 |
+
key: "recordPageViewTrack",
|
7727 |
+
value: function recordPageViewTrack() {
|
7728 |
+
var _this$props = this.props,
|
7729 |
+
activePlugins = _this$props.activePlugins,
|
7730 |
+
installedPlugins = _this$props.installedPlugins,
|
7731 |
+
isEmbedded = _this$props.isEmbedded,
|
7732 |
+
isJetpackConnected = _this$props.isJetpackConnected;
|
7733 |
|
7734 |
+
if (isEmbedded) {
|
7735 |
+
var _path = document.location.pathname + document.location.search;
|
7736 |
|
7737 |
+
Object(tracks["c" /* recordPageView */])(_path, {
|
7738 |
+
isEmbedded: isEmbedded
|
7739 |
+
});
|
7740 |
+
return;
|
7741 |
+
}
|
7742 |
|
7743 |
+
var pathname = Object(external_lodash_["get"])(this.props, 'location.pathname');
|
|
|
|
|
7744 |
|
7745 |
+
if (!pathname) {
|
7746 |
+
return;
|
7747 |
+
} // Remove leading slash, and camel case remaining pathname
|
7748 |
|
7749 |
|
7750 |
+
var path = pathname.substring(1).replace(/\//g, '_'); // When pathname is `/` we are on the dashboard
|
7751 |
|
7752 |
+
if (path.length === 0) {
|
7753 |
+
path = false ? undefined : 'dashboard';
|
7754 |
+
}
|
|
|
|
|
7755 |
|
7756 |
+
Object(tracks["c" /* recordPageView */])(path, {
|
7757 |
+
jetpack_installed: installedPlugins.includes('jetpack'),
|
7758 |
+
jetpack_active: activePlugins.includes('jetpack'),
|
7759 |
+
jetpack_connected: isJetpackConnected
|
7760 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7761 |
}
|
7762 |
}, {
|
7763 |
+
key: "render",
|
7764 |
+
value: function render() {
|
7765 |
+
var _this$props2 = this.props,
|
7766 |
+
isEmbedded = _this$props2.isEmbedded,
|
7767 |
+
restProps = objectWithoutProperties_default()(_this$props2, ["isEmbedded"]);
|
7768 |
+
|
7769 |
+
var breadcrumbs = this.props.page.breadcrumbs;
|
7770 |
+
return Object(external_this_wp_element_["createElement"])("div", {
|
7771 |
+
className: "woocommerce-layout"
|
7772 |
+
}, Object(external_this_wp_element_["createElement"])(header, {
|
7773 |
+
sections: Object(external_lodash_["isFunction"])(breadcrumbs) ? breadcrumbs(this.props) : breadcrumbs,
|
7774 |
+
isEmbedded: isEmbedded
|
7775 |
+
}), Object(external_this_wp_element_["createElement"])(transient_notices, null), !isEmbedded && Object(external_this_wp_element_["createElement"])(layout_PrimaryLayout, null, Object(external_this_wp_element_["createElement"])("div", {
|
7776 |
+
className: "woocommerce-layout__main"
|
7777 |
+
}, Object(external_this_wp_element_["createElement"])(controller_Controller, restProps))));
|
7778 |
}
|
7779 |
+
}]);
|
7780 |
+
|
7781 |
+
return _Layout;
|
7782 |
+
}(external_this_wp_element_["Component"]);
|
7783 |
+
|
7784 |
+
layout_Layout.propTypes = {
|
7785 |
+
isEmbedded: prop_types_default.a.bool,
|
7786 |
+
page: prop_types_default.a.shape({
|
7787 |
+
container: prop_types_default.a.oneOfType([prop_types_default.a.func, prop_types_default.a.object // Support React.lazy
|
7788 |
+
]),
|
7789 |
+
path: prop_types_default.a.string,
|
7790 |
+
breadcrumbs: prop_types_default.a.oneOfType([prop_types_default.a.func, prop_types_default.a.arrayOf(prop_types_default.a.oneOfType([prop_types_default.a.arrayOf(prop_types_default.a.string), prop_types_default.a.string]))]).isRequired,
|
7791 |
+
wpOpenMenu: prop_types_default.a.string
|
7792 |
+
}).isRequired
|
7793 |
+
};
|
7794 |
+
var Layout = Object(compose["a" /* default */])(Object(external_this_wc_data_["withPluginsHydration"])(_objectSpread({}, window.wcSettings.plugins || {}, {
|
7795 |
+
jetpackStatus: window.wcSettings.dataEndpoints && window.wcSettings.dataEndpoints.jetpackStatus || false
|
7796 |
+
})), Object(external_this_wp_data_["withSelect"])(function (select, _ref) {
|
7797 |
+
var isEmbedded = _ref.isEmbedded;
|
7798 |
+
|
7799 |
+
// Embedded pages don't send plugin info to Tracks.
|
7800 |
+
if (isEmbedded) {
|
7801 |
+
return;
|
7802 |
+
}
|
7803 |
+
|
7804 |
+
var _select = select(external_this_wc_data_["PLUGINS_STORE_NAME"]),
|
7805 |
+
getActivePlugins = _select.getActivePlugins,
|
7806 |
+
getInstalledPlugins = _select.getInstalledPlugins,
|
7807 |
+
isJetpackConnected = _select.isJetpackConnected;
|
7808 |
+
|
7809 |
+
return {
|
7810 |
+
activePlugins: getActivePlugins(),
|
7811 |
+
isJetpackConnected: isJetpackConnected(),
|
7812 |
+
installedPlugins: getInstalledPlugins()
|
7813 |
+
};
|
7814 |
+
}))(layout_Layout);
|
7815 |
+
|
7816 |
+
var layout_PageLayout = /*#__PURE__*/function (_Component3) {
|
7817 |
+
inherits_default()(_PageLayout, _Component3);
|
7818 |
+
|
7819 |
+
var _super3 = layout_createSuper(_PageLayout);
|
7820 |
+
|
7821 |
+
function _PageLayout() {
|
7822 |
+
classCallCheck_default()(this, _PageLayout);
|
7823 |
+
|
7824 |
+
return _super3.apply(this, arguments);
|
7825 |
+
}
|
7826 |
+
|
7827 |
+
createClass_default()(_PageLayout, [{
|
7828 |
+
key: "render",
|
7829 |
+
value: function render() {
|
7830 |
+
return Object(external_this_wp_element_["createElement"])(react_router_Router, {
|
7831 |
+
history: Object(external_this_wc_navigation_["getHistory"])()
|
7832 |
+
}, Object(external_this_wp_element_["createElement"])(react_router_Switch, null, controller_getPages().map(function (page) {
|
7833 |
+
return Object(external_this_wp_element_["createElement"])(react_router_Route, {
|
7834 |
+
key: page.path,
|
7835 |
+
path: page.path,
|
7836 |
+
exact: true,
|
7837 |
+
render: function render(props) {
|
7838 |
+
return Object(external_this_wp_element_["createElement"])(Layout, extends_default()({
|
7839 |
+
page: page
|
7840 |
+
}, props));
|
7841 |
+
}
|
7842 |
+
});
|
7843 |
+
})));
|
7844 |
}
|
7845 |
+
}]);
|
|
|
|
|
7846 |
|
7847 |
+
return _PageLayout;
|
7848 |
+
}(external_this_wp_element_["Component"]); // Use the useFilters HoC so PageLayout is re-rendered when filters are used to add new pages or reports
|
|
|
7849 |
|
|
|
7850 |
|
7851 |
+
var PageLayout = Object(external_this_wc_components_["useFilters"])([PAGES_FILTER, analytics_report["REPORTS_FILTER"]])(layout_PageLayout);
|
7852 |
+
var layout_EmbedLayout = /*#__PURE__*/function (_Component4) {
|
7853 |
+
inherits_default()(EmbedLayout, _Component4);
|
7854 |
|
7855 |
+
var _super4 = layout_createSuper(EmbedLayout);
|
7856 |
|
7857 |
+
function EmbedLayout() {
|
7858 |
+
classCallCheck_default()(this, EmbedLayout);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7859 |
|
7860 |
+
return _super4.apply(this, arguments);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7861 |
}
|
7862 |
|
7863 |
+
createClass_default()(EmbedLayout, [{
|
7864 |
+
key: "render",
|
7865 |
+
value: function render() {
|
7866 |
+
return Object(external_this_wp_element_["createElement"])(Layout, {
|
7867 |
+
page: {
|
7868 |
+
breadcrumbs: Object(settings["g" /* getSetting */])('embedBreadcrumbs', [])
|
7869 |
+
},
|
7870 |
+
isEmbedded: true
|
7871 |
+
});
|
7872 |
+
}
|
7873 |
+
}]);
|
7874 |
|
7875 |
+
return EmbedLayout;
|
7876 |
+
}(external_this_wp_element_["Component"]);
|
7877 |
|
7878 |
/***/ }),
|
|
|
|
|
7879 |
|
7880 |
+
/***/ 203:
|
|
|
|
|
|
|
7881 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
7882 |
|
7883 |
"use strict";
|
7884 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getFilteredCurrencyInstance; });
|
7885 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CurrencyContext; });
|
7886 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
7887 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
7888 |
+
/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(48);
|
7889 |
+
/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);
|
7890 |
+
/* harmony import */ var _woocommerce_currency__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(137);
|
7891 |
+
/* harmony import */ var _woocommerce_currency__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_currency__WEBPACK_IMPORTED_MODULE_2__);
|
7892 |
+
/* harmony import */ var _woocommerce_wc_admin_settings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(26);
|
7893 |
+
/**
|
7894 |
+
* External dependencies
|
7895 |
+
*/
|
7896 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7897 |
|
7898 |
+
/**
|
7899 |
+
* WooCommerce dependencies
|
7900 |
+
*/
|
7901 |
|
|
|
|
|
|
|
7902 |
|
7903 |
+
/**
|
7904 |
+
* Internal dependencies
|
7905 |
+
*/
|
7906 |
|
|
|
|
|
|
|
7907 |
|
7908 |
+
var appCurrency = _woocommerce_currency__WEBPACK_IMPORTED_MODULE_2___default()(_woocommerce_wc_admin_settings__WEBPACK_IMPORTED_MODULE_3__[/* CURRENCY */ "b"]);
|
7909 |
+
var getFilteredCurrencyInstance = function getFilteredCurrencyInstance(query) {
|
7910 |
+
var config = appCurrency.getCurrency();
|
7911 |
+
var filteredConfig = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__["applyFilters"])('woocommerce_admin_report_currency', config, query);
|
7912 |
+
return new _woocommerce_currency__WEBPACK_IMPORTED_MODULE_2___default.a(filteredConfig);
|
7913 |
+
};
|
7914 |
+
var CurrencyContext = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createContext"])(appCurrency // default value
|
7915 |
+
);
|
7916 |
|
7917 |
+
/***/ }),
|
|
|
|
|
7918 |
|
7919 |
+
/***/ 204:
|
7920 |
+
/***/ (function(module, exports) {
|
|
|
7921 |
|
7922 |
+
(function() { module.exports = this["wc"]["number"]; }());
|
|
|
|
|
7923 |
|
7924 |
+
/***/ }),
|
|
|
7925 |
|
7926 |
+
/***/ 209:
|
7927 |
+
/***/ (function(module, exports) {
|
7928 |
|
7929 |
+
function _setPrototypeOf(o, p) {
|
7930 |
+
module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
7931 |
+
o.__proto__ = p;
|
7932 |
+
return o;
|
7933 |
+
};
|
7934 |
|
7935 |
+
return _setPrototypeOf(o, p);
|
7936 |
+
}
|
7937 |
|
7938 |
+
module.exports = _setPrototypeOf;
|
|
|
7939 |
|
7940 |
+
/***/ }),
|
|
|
7941 |
|
7942 |
+
/***/ 21:
|
7943 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
7944 |
|
7945 |
+
"use strict";
|
|
|
7946 |
|
7947 |
+
// EXPORTS
|
7948 |
+
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _slicedToArray; });
|
7949 |
|
7950 |
+
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
|
7951 |
+
function _arrayWithHoles(arr) {
|
7952 |
+
if (Array.isArray(arr)) return arr;
|
7953 |
+
}
|
7954 |
+
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
|
7955 |
+
function _iterableToArrayLimit(arr, i) {
|
7956 |
+
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
|
7957 |
+
var _arr = [];
|
7958 |
+
var _n = true;
|
7959 |
+
var _d = false;
|
7960 |
+
var _e = undefined;
|
7961 |
|
7962 |
+
try {
|
7963 |
+
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
7964 |
+
_arr.push(_s.value);
|
7965 |
|
7966 |
+
if (i && _arr.length === i) break;
|
7967 |
+
}
|
7968 |
+
} catch (err) {
|
7969 |
+
_d = true;
|
7970 |
+
_e = err;
|
7971 |
+
} finally {
|
7972 |
+
try {
|
7973 |
+
if (!_n && _i["return"] != null) _i["return"]();
|
7974 |
+
} finally {
|
7975 |
+
if (_d) throw _e;
|
7976 |
+
}
|
7977 |
+
}
|
7978 |
|
7979 |
+
return _arr;
|
7980 |
+
}
|
7981 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
|
7982 |
+
var unsupportedIterableToArray = __webpack_require__(52);
|
7983 |
|
7984 |
+
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
|
7985 |
+
function _nonIterableRest() {
|
7986 |
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
7987 |
+
}
|
7988 |
+
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
|
7989 |
|
|
|
|
|
7990 |
|
|
|
|
|
7991 |
|
|
|
|
|
|
|
7992 |
|
7993 |
+
function _slicedToArray(arr, i) {
|
7994 |
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || Object(unsupportedIterableToArray["a" /* default */])(arr, i) || _nonIterableRest();
|
7995 |
+
}
|
7996 |
|
7997 |
+
/***/ }),
|
|
|
7998 |
|
7999 |
+
/***/ 210:
|
8000 |
+
/***/ (function(module, exports, __webpack_require__) {
|
8001 |
|
8002 |
+
"use strict";
|
8003 |
+
/** @license React v16.13.1
|
8004 |
+
* react-is.production.min.js
|
8005 |
+
*
|
8006 |
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
8007 |
+
*
|
8008 |
+
* This source code is licensed under the MIT license found in the
|
8009 |
+
* LICENSE file in the root directory of this source tree.
|
8010 |
+
*/
|
8011 |
|
8012 |
+
var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
|
8013 |
+
Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
|
8014 |
+
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;
|
8015 |
+
exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};
|
8016 |
+
exports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};
|
8017 |
+
exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;
|
8018 |
|
|
|
|
|
|
|
8019 |
|
8020 |
+
/***/ }),
|
|
|
8021 |
|
8022 |
+
/***/ 22:
|
8023 |
+
/***/ (function(module, exports) {
|
8024 |
|
8025 |
+
(function() { module.exports = this["wc"]["navigation"]; }());
|
|
|
|
|
8026 |
|
8027 |
+
/***/ }),
|
8028 |
|
8029 |
+
/***/ 23:
|
8030 |
+
/***/ (function(module, exports) {
|
8031 |
|
8032 |
+
(function() { module.exports = this["wc"]["date"]; }());
|
8033 |
|
8034 |
+
/***/ }),
|
8035 |
|
8036 |
+
/***/ 24:
|
8037 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
8038 |
|
8039 |
+
"use strict";
|
8040 |
+
/* unused harmony export JETPACK_NAMESPACE */
|
8041 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return NAMESPACE; });
|
8042 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return WC_ADMIN_NAMESPACE; });
|
8043 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return WCS_NAMESPACE; });
|
8044 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DEFAULT_REQUIREMENT; });
|
8045 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return MAX_PER_PAGE; });
|
8046 |
+
/* unused harmony export DEFAULT_ACTIONABLE_STATUSES */
|
8047 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return QUERY_DEFAULTS; });
|
8048 |
+
/* harmony import */ var _fresh_data_framework__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
|
8049 |
+
/**
|
8050 |
+
* External dependencies
|
8051 |
+
*/
|
8052 |
|
8053 |
+
var JETPACK_NAMESPACE = '/jetpack/v4';
|
8054 |
+
var NAMESPACE = '/wc-analytics';
|
8055 |
+
var WC_ADMIN_NAMESPACE = '/wc-admin';
|
8056 |
+
var WCS_NAMESPACE = '/wc/v1'; // WCS endpoints like Stripe are not avaiable on later /wc versions
|
8057 |
|
8058 |
+
var DEFAULT_REQUIREMENT = {
|
8059 |
+
timeout: 1 * _fresh_data_framework__WEBPACK_IMPORTED_MODULE_0__[/* MINUTE */ "b"],
|
8060 |
+
freshness: 30 * _fresh_data_framework__WEBPACK_IMPORTED_MODULE_0__[/* MINUTE */ "b"]
|
8061 |
+
}; // WordPress & WooCommerce both set a hard limit of 100 for the per_page parameter
|
8062 |
|
8063 |
+
var MAX_PER_PAGE = 100;
|
8064 |
+
var DEFAULT_ACTIONABLE_STATUSES = ['processing', 'on-hold'];
|
8065 |
+
var QUERY_DEFAULTS = {
|
8066 |
+
pageSize: 25,
|
8067 |
+
period: 'month',
|
8068 |
+
compare: 'previous_year'
|
8069 |
+
};
|
8070 |
|
8071 |
+
/***/ }),
|
8072 |
|
8073 |
+
/***/ 256:
|
8074 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
8075 |
|
8076 |
+
"use strict";
|
8077 |
+
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
8078 |
+
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);
|
8079 |
+
/**
|
8080 |
+
* External dependencies
|
8081 |
+
*/
|
8082 |
|
8083 |
+
/**
|
8084 |
+
* Composes multiple higher-order components into a single higher-order component. Performs right-to-left function
|
8085 |
+
* composition, where each successive invocation is supplied the return value of the previous.
|
8086 |
+
*
|
8087 |
+
* @param {...Function} hocs The HOC functions to invoke.
|
8088 |
+
*
|
8089 |
+
* @return {Function} Returns the new composite function.
|
8090 |
+
*/
|
8091 |
|
8092 |
+
/* harmony default export */ __webpack_exports__["a"] = (lodash__WEBPACK_IMPORTED_MODULE_0__["flowRight"]);
|
8093 |
+
//# sourceMappingURL=compose.js.map
|
8094 |
|
8095 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
8096 |
|
8097 |
+
/***/ 257:
|
8098 |
+
/***/ (function(module, exports, __webpack_require__) {
|
|
|
8099 |
|
8100 |
+
"use strict";
|
8101 |
|
|
|
|
|
|
|
|
|
|
|
8102 |
|
8103 |
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
|
|
8104 |
|
8105 |
+
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
|
|
|
8106 |
|
8107 |
+
var _extends = _interopDefault(__webpack_require__(105));
|
8108 |
+
var _objectWithoutPropertiesLoose = _interopDefault(__webpack_require__(266));
|
8109 |
+
var React = __webpack_require__(14);
|
8110 |
+
var React__default = _interopDefault(React);
|
8111 |
+
var _inheritsLoose = _interopDefault(__webpack_require__(201));
|
8112 |
+
var _assertThisInitialized = _interopDefault(__webpack_require__(59));
|
8113 |
|
8114 |
+
var is = {
|
8115 |
+
arr: Array.isArray,
|
8116 |
+
obj: function obj(a) {
|
8117 |
+
return Object.prototype.toString.call(a) === '[object Object]';
|
8118 |
+
},
|
8119 |
+
fun: function fun(a) {
|
8120 |
+
return typeof a === 'function';
|
8121 |
+
},
|
8122 |
+
str: function str(a) {
|
8123 |
+
return typeof a === 'string';
|
8124 |
+
},
|
8125 |
+
num: function num(a) {
|
8126 |
+
return typeof a === 'number';
|
8127 |
+
},
|
8128 |
+
und: function und(a) {
|
8129 |
+
return a === void 0;
|
8130 |
+
},
|
8131 |
+
nul: function nul(a) {
|
8132 |
+
return a === null;
|
8133 |
+
},
|
8134 |
+
set: function set(a) {
|
8135 |
+
return a instanceof Set;
|
8136 |
+
},
|
8137 |
+
map: function map(a) {
|
8138 |
+
return a instanceof Map;
|
8139 |
+
},
|
8140 |
+
equ: function equ(a, b) {
|
8141 |
+
if (typeof a !== typeof b) return false;
|
8142 |
+
if (is.str(a) || is.num(a)) return a === b;
|
8143 |
+
if (is.obj(a) && is.obj(b) && Object.keys(a).length + Object.keys(b).length === 0) return true;
|
8144 |
+
var i;
|
8145 |
|
8146 |
+
for (i in a) {
|
8147 |
+
if (!(i in b)) return false;
|
8148 |
+
}
|
8149 |
|
8150 |
+
for (i in b) {
|
8151 |
+
if (a[i] !== b[i]) return false;
|
8152 |
+
}
|
|
|
|
|
|
|
|
|
|
|
8153 |
|
8154 |
+
return is.und(i) ? a === b : true;
|
8155 |
+
}
|
8156 |
+
};
|
8157 |
+
function merge(target, lowercase) {
|
8158 |
+
if (lowercase === void 0) {
|
8159 |
+
lowercase = true;
|
8160 |
+
}
|
8161 |
|
8162 |
+
return function (object) {
|
8163 |
+
return (is.arr(object) ? object : Object.keys(object)).reduce(function (acc, element) {
|
8164 |
+
var key = lowercase ? element[0].toLowerCase() + element.substring(1) : element;
|
8165 |
+
acc[key] = target(key);
|
8166 |
+
return acc;
|
8167 |
+
}, target);
|
8168 |
+
};
|
8169 |
+
}
|
8170 |
+
function useForceUpdate() {
|
8171 |
+
var _useState = React.useState(false),
|
8172 |
+
f = _useState[1];
|
8173 |
|
8174 |
+
var forceUpdate = React.useCallback(function () {
|
8175 |
+
return f(function (v) {
|
8176 |
+
return !v;
|
8177 |
+
});
|
8178 |
+
}, []);
|
8179 |
+
return forceUpdate;
|
8180 |
+
}
|
8181 |
+
function withDefault(value, defaultValue) {
|
8182 |
+
return is.und(value) || is.nul(value) ? defaultValue : value;
|
8183 |
+
}
|
8184 |
+
function toArray(a) {
|
8185 |
+
return !is.und(a) ? is.arr(a) ? a : [a] : [];
|
8186 |
+
}
|
8187 |
+
function callProp(obj) {
|
8188 |
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
8189 |
+
args[_key - 1] = arguments[_key];
|
8190 |
}
|
8191 |
|
8192 |
+
return is.fun(obj) ? obj.apply(void 0, args) : obj;
|
8193 |
+
}
|
8194 |
|
8195 |
+
function getForwardProps(props) {
|
8196 |
+
var to = props.to,
|
8197 |
+
from = props.from,
|
8198 |
+
config = props.config,
|
8199 |
+
onStart = props.onStart,
|
8200 |
+
onRest = props.onRest,
|
8201 |
+
onFrame = props.onFrame,
|
8202 |
+
children = props.children,
|
8203 |
+
reset = props.reset,
|
8204 |
+
reverse = props.reverse,
|
8205 |
+
force = props.force,
|
8206 |
+
immediate = props.immediate,
|
8207 |
+
delay = props.delay,
|
8208 |
+
attach = props.attach,
|
8209 |
+
destroyed = props.destroyed,
|
8210 |
+
interpolateTo = props.interpolateTo,
|
8211 |
+
ref = props.ref,
|
8212 |
+
lazy = props.lazy,
|
8213 |
+
forward = _objectWithoutPropertiesLoose(props, ["to", "from", "config", "onStart", "onRest", "onFrame", "children", "reset", "reverse", "force", "immediate", "delay", "attach", "destroyed", "interpolateTo", "ref", "lazy"]);
|
8214 |
|
8215 |
+
return forward;
|
8216 |
+
}
|
8217 |
+
|
8218 |
+
function interpolateTo(props) {
|
8219 |
+
var forward = getForwardProps(props);
|
8220 |
+
if (is.und(forward)) return _extends({
|
8221 |
+
to: forward
|
8222 |
+
}, props);
|
8223 |
+
var rest = Object.keys(props).reduce(function (a, k) {
|
8224 |
+
var _extends2;
|
8225 |
+
|
8226 |
+
return !is.und(forward[k]) ? a : _extends({}, a, (_extends2 = {}, _extends2[k] = props[k], _extends2));
|
8227 |
+
}, {});
|
8228 |
+
return _extends({
|
8229 |
+
to: forward
|
8230 |
+
}, rest);
|
8231 |
+
}
|
8232 |
+
function handleRef(ref, forward) {
|
8233 |
+
if (forward) {
|
8234 |
+
// If it's a function, assume it's a ref callback
|
8235 |
+
if (is.fun(forward)) forward(ref);else if (is.obj(forward)) {
|
8236 |
+
forward.current = ref;
|
8237 |
}
|
8238 |
+
}
|
8239 |
|
8240 |
+
return ref;
|
8241 |
+
}
|
8242 |
+
|
8243 |
+
var Animated =
|
8244 |
+
/*#__PURE__*/
|
8245 |
+
function () {
|
8246 |
+
function Animated() {
|
8247 |
+
this.payload = void 0;
|
8248 |
+
this.children = [];
|
8249 |
+
}
|
8250 |
+
|
8251 |
+
var _proto = Animated.prototype;
|
8252 |
+
|
8253 |
+
_proto.getAnimatedValue = function getAnimatedValue() {
|
8254 |
+
return this.getValue();
|
8255 |
};
|
8256 |
|
8257 |
+
_proto.getPayload = function getPayload() {
|
8258 |
+
return this.payload || this;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8259 |
};
|
8260 |
|
8261 |
+
_proto.attach = function attach() {};
|
|
|
8262 |
|
8263 |
+
_proto.detach = function detach() {};
|
8264 |
|
8265 |
+
_proto.getChildren = function getChildren() {
|
8266 |
+
return this.children;
|
8267 |
+
};
|
8268 |
|
8269 |
+
_proto.addChild = function addChild(child) {
|
8270 |
+
if (this.children.length === 0) this.attach();
|
8271 |
+
this.children.push(child);
|
8272 |
+
};
|
8273 |
+
|
8274 |
+
_proto.removeChild = function removeChild(child) {
|
8275 |
+
var index = this.children.indexOf(child);
|
8276 |
+
this.children.splice(index, 1);
|
8277 |
+
if (this.children.length === 0) this.detach();
|
8278 |
+
};
|
8279 |
+
|
8280 |
+
return Animated;
|
8281 |
+
}();
|
8282 |
+
var AnimatedArray =
|
8283 |
/*#__PURE__*/
|
8284 |
+
function (_Animated) {
|
8285 |
+
_inheritsLoose(AnimatedArray, _Animated);
|
8286 |
|
8287 |
+
function AnimatedArray() {
|
8288 |
var _this;
|
8289 |
|
8290 |
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
8291 |
args[_key] = arguments[_key];
|
8292 |
}
|
8293 |
|
8294 |
+
_this = _Animated.call.apply(_Animated, [this].concat(args)) || this;
|
8295 |
+
_this.payload = [];
|
8296 |
+
|
8297 |
+
_this.attach = function () {
|
8298 |
+
return _this.payload.forEach(function (p) {
|
8299 |
+
return p instanceof Animated && p.addChild(_assertThisInitialized(_this));
|
8300 |
+
});
|
8301 |
+
};
|
8302 |
+
|
8303 |
+
_this.detach = function () {
|
8304 |
+
return _this.payload.forEach(function (p) {
|
8305 |
+
return p instanceof Animated && p.removeChild(_assertThisInitialized(_this));
|
8306 |
+
});
|
8307 |
+
};
|
8308 |
+
|
8309 |
return _this;
|
8310 |
}
|
8311 |
|
8312 |
+
return AnimatedArray;
|
8313 |
+
}(Animated);
|
8314 |
+
var AnimatedObject =
|
8315 |
+
/*#__PURE__*/
|
8316 |
+
function (_Animated2) {
|
8317 |
+
_inheritsLoose(AnimatedObject, _Animated2);
|
8318 |
|
8319 |
+
function AnimatedObject() {
|
8320 |
+
var _this2;
|
|
|
|
|
|
|
|
|
8321 |
|
8322 |
+
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
8323 |
+
args[_key3] = arguments[_key3];
|
8324 |
+
}
|
8325 |
|
8326 |
+
_this2 = _Animated2.call.apply(_Animated2, [this].concat(args)) || this;
|
8327 |
+
_this2.payload = {};
|
8328 |
|
8329 |
+
_this2.attach = function () {
|
8330 |
+
return Object.values(_this2.payload).forEach(function (s) {
|
8331 |
+
return s instanceof Animated && s.addChild(_assertThisInitialized(_this2));
|
8332 |
+
});
|
8333 |
+
};
|
8334 |
|
8335 |
+
_this2.detach = function () {
|
8336 |
+
return Object.values(_this2.payload).forEach(function (s) {
|
8337 |
+
return s instanceof Animated && s.removeChild(_assertThisInitialized(_this2));
|
8338 |
+
});
|
8339 |
+
};
|
8340 |
+
|
8341 |
+
return _this2;
|
8342 |
}
|
8343 |
|
8344 |
+
var _proto2 = AnimatedObject.prototype;
|
8345 |
|
8346 |
+
_proto2.getValue = function getValue(animated) {
|
8347 |
+
if (animated === void 0) {
|
8348 |
+
animated = false;
|
8349 |
+
}
|
8350 |
|
8351 |
+
var payload = {};
|
8352 |
+
|
8353 |
+
for (var _key4 in this.payload) {
|
8354 |
+
var value = this.payload[_key4];
|
8355 |
+
if (animated && !(value instanceof Animated)) continue;
|
8356 |
+
payload[_key4] = value instanceof Animated ? value[animated ? 'getAnimatedValue' : 'getValue']() : value;
|
8357 |
+
}
|
8358 |
+
|
8359 |
+
return payload;
|
8360 |
};
|
8361 |
|
8362 |
+
_proto2.getAnimatedValue = function getAnimatedValue() {
|
8363 |
+
return this.getValue(true);
|
8364 |
};
|
8365 |
|
8366 |
+
return AnimatedObject;
|
8367 |
+
}(Animated);
|
8368 |
+
|
8369 |
+
var applyAnimatedValues;
|
8370 |
+
function injectApplyAnimatedValues(fn, transform) {
|
8371 |
+
applyAnimatedValues = {
|
8372 |
+
fn: fn,
|
8373 |
+
transform: transform
|
8374 |
};
|
8375 |
+
}
|
8376 |
+
var colorNames;
|
8377 |
+
function injectColorNames(names) {
|
8378 |
+
colorNames = names;
|
8379 |
+
}
|
8380 |
+
var requestFrame = function requestFrame(cb) {
|
8381 |
+
return typeof window !== 'undefined' ? window.requestAnimationFrame(cb) : -1;
|
8382 |
+
};
|
8383 |
+
var cancelFrame = function cancelFrame(id) {
|
8384 |
+
typeof window !== 'undefined' && window.cancelAnimationFrame(id);
|
8385 |
+
};
|
8386 |
+
function injectFrame(raf, caf) {
|
8387 |
+
requestFrame = raf;
|
8388 |
+
cancelFrame = caf;
|
8389 |
+
}
|
8390 |
+
var interpolation;
|
8391 |
+
function injectStringInterpolator(fn) {
|
8392 |
+
interpolation = fn;
|
8393 |
+
}
|
8394 |
+
var now = function now() {
|
8395 |
+
return Date.now();
|
8396 |
+
};
|
8397 |
+
function injectNow(nowFn) {
|
8398 |
+
now = nowFn;
|
8399 |
+
}
|
8400 |
+
var defaultElement;
|
8401 |
+
function injectDefaultElement(el) {
|
8402 |
+
defaultElement = el;
|
8403 |
+
}
|
8404 |
+
var animatedApi = function animatedApi(node) {
|
8405 |
+
return node.current;
|
8406 |
+
};
|
8407 |
+
function injectAnimatedApi(fn) {
|
8408 |
+
animatedApi = fn;
|
8409 |
+
}
|
8410 |
+
var createAnimatedStyle;
|
8411 |
+
function injectCreateAnimatedStyle(factory) {
|
8412 |
+
createAnimatedStyle = factory;
|
8413 |
+
}
|
8414 |
+
var manualFrameloop;
|
8415 |
+
function injectManualFrameloop(callback) {
|
8416 |
+
manualFrameloop = callback;
|
8417 |
+
}
|
8418 |
|
8419 |
+
var Globals = /*#__PURE__*/Object.freeze({
|
8420 |
+
get applyAnimatedValues () { return applyAnimatedValues; },
|
8421 |
+
injectApplyAnimatedValues: injectApplyAnimatedValues,
|
8422 |
+
get colorNames () { return colorNames; },
|
8423 |
+
injectColorNames: injectColorNames,
|
8424 |
+
get requestFrame () { return requestFrame; },
|
8425 |
+
get cancelFrame () { return cancelFrame; },
|
8426 |
+
injectFrame: injectFrame,
|
8427 |
+
get interpolation () { return interpolation; },
|
8428 |
+
injectStringInterpolator: injectStringInterpolator,
|
8429 |
+
get now () { return now; },
|
8430 |
+
injectNow: injectNow,
|
8431 |
+
get defaultElement () { return defaultElement; },
|
8432 |
+
injectDefaultElement: injectDefaultElement,
|
8433 |
+
get animatedApi () { return animatedApi; },
|
8434 |
+
injectAnimatedApi: injectAnimatedApi,
|
8435 |
+
get createAnimatedStyle () { return createAnimatedStyle; },
|
8436 |
+
injectCreateAnimatedStyle: injectCreateAnimatedStyle,
|
8437 |
+
get manualFrameloop () { return manualFrameloop; },
|
8438 |
+
injectManualFrameloop: injectManualFrameloop
|
8439 |
+
});
|
8440 |
|
8441 |
/**
|
8442 |
+
* Wraps the `style` property with `AnimatedStyle`.
|
8443 |
*/
|
8444 |
|
8445 |
+
var AnimatedProps =
|
8446 |
+
/*#__PURE__*/
|
8447 |
+
function (_AnimatedObject) {
|
8448 |
+
_inheritsLoose(AnimatedProps, _AnimatedObject);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8449 |
|
8450 |
+
function AnimatedProps(props, callback) {
|
8451 |
+
var _this;
|
8452 |
|
8453 |
+
_this = _AnimatedObject.call(this) || this;
|
8454 |
+
_this.update = void 0;
|
8455 |
+
_this.payload = !props.style ? props : _extends({}, props, {
|
8456 |
+
style: createAnimatedStyle(props.style)
|
8457 |
+
});
|
8458 |
+
_this.update = callback;
|
8459 |
|
8460 |
+
_this.attach();
|
|
|
|
|
8461 |
|
8462 |
+
return _this;
|
|
|
|
|
8463 |
}
|
8464 |
|
8465 |
+
return AnimatedProps;
|
8466 |
+
}(AnimatedObject);
|
|
|
|
|
|
|
8467 |
|
8468 |
+
var isFunctionComponent = function isFunctionComponent(val) {
|
8469 |
+
return is.fun(val) && !(val.prototype instanceof React__default.Component);
|
8470 |
+
};
|
8471 |
|
8472 |
+
var createAnimatedComponent = function createAnimatedComponent(Component) {
|
8473 |
+
var AnimatedComponent = React.forwardRef(function (props, ref) {
|
8474 |
+
var forceUpdate = useForceUpdate();
|
8475 |
+
var mounted = React.useRef(true);
|
8476 |
+
var propsAnimated = React.useRef(null);
|
8477 |
+
var node = React.useRef(null);
|
8478 |
+
var attachProps = React.useCallback(function (props) {
|
8479 |
+
var oldPropsAnimated = propsAnimated.current;
|
8480 |
|
8481 |
+
var callback = function callback() {
|
8482 |
+
var didUpdate = false;
|
|
|
8483 |
|
8484 |
+
if (node.current) {
|
8485 |
+
didUpdate = applyAnimatedValues.fn(node.current, propsAnimated.current.getAnimatedValue());
|
8486 |
+
}
|
|
|
8487 |
|
8488 |
+
if (!node.current || didUpdate === false) {
|
8489 |
+
// If no referenced node has been found, or the update target didn't have a
|
8490 |
+
// native-responder, then forceUpdate the animation ...
|
8491 |
+
forceUpdate();
|
8492 |
+
}
|
8493 |
+
};
|
8494 |
|
8495 |
+
propsAnimated.current = new AnimatedProps(props, callback);
|
8496 |
+
oldPropsAnimated && oldPropsAnimated.detach();
|
8497 |
+
}, []);
|
8498 |
+
React.useEffect(function () {
|
8499 |
+
return function () {
|
8500 |
+
mounted.current = false;
|
8501 |
+
propsAnimated.current && propsAnimated.current.detach();
|
8502 |
+
};
|
8503 |
+
}, []);
|
8504 |
+
React.useImperativeHandle(ref, function () {
|
8505 |
+
return animatedApi(node, mounted, forceUpdate);
|
8506 |
+
});
|
8507 |
+
attachProps(props);
|
|
|
8508 |
|
8509 |
+
var _getValue = propsAnimated.current.getValue(),
|
8510 |
+
scrollTop = _getValue.scrollTop,
|
8511 |
+
scrollLeft = _getValue.scrollLeft,
|
8512 |
+
animatedProps = _objectWithoutPropertiesLoose(_getValue, ["scrollTop", "scrollLeft"]); // Functions cannot have refs, see:
|
8513 |
+
// See: https://github.com/react-spring/react-spring/issues/569
|
8514 |
|
|
|
|
|
|
|
|
|
|
|
|
|
8515 |
|
8516 |
+
var refFn = isFunctionComponent(Component) ? undefined : function (childRef) {
|
8517 |
+
return node.current = handleRef(childRef, ref);
|
8518 |
+
};
|
8519 |
+
return React__default.createElement(Component, _extends({}, animatedProps, {
|
8520 |
+
ref: refFn
|
8521 |
+
}));
|
|
|
|
|
8522 |
});
|
8523 |
+
return AnimatedComponent;
|
8524 |
+
};
|
8525 |
|
8526 |
+
var active = false;
|
8527 |
+
var controllers = new Set();
|
8528 |
|
8529 |
+
var update = function update() {
|
8530 |
+
if (!active) return false;
|
8531 |
+
var time = now();
|
8532 |
|
8533 |
+
for (var _iterator = controllers, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
|
8534 |
+
var _ref;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8535 |
|
8536 |
+
if (_isArray) {
|
8537 |
+
if (_i >= _iterator.length) break;
|
8538 |
+
_ref = _iterator[_i++];
|
8539 |
+
} else {
|
8540 |
+
_i = _iterator.next();
|
8541 |
+
if (_i.done) break;
|
8542 |
+
_ref = _i.value;
|
8543 |
+
}
|
8544 |
|
8545 |
+
var controller = _ref;
|
8546 |
+
var isActive = false;
|
|
|
|
|
|
|
8547 |
|
8548 |
+
for (var configIdx = 0; configIdx < controller.configs.length; configIdx++) {
|
8549 |
+
var config = controller.configs[configIdx];
|
8550 |
+
var endOfAnimation = void 0,
|
8551 |
+
lastTime = void 0;
|
8552 |
|
8553 |
+
for (var valIdx = 0; valIdx < config.animatedValues.length; valIdx++) {
|
8554 |
+
var animation = config.animatedValues[valIdx]; // If an animation is done, skip, until all of them conclude
|
|
|
|
|
8555 |
|
8556 |
+
if (animation.done) continue;
|
8557 |
+
var from = config.fromValues[valIdx];
|
8558 |
+
var to = config.toValues[valIdx];
|
8559 |
+
var position = animation.lastPosition;
|
8560 |
+
var isAnimated = to instanceof Animated;
|
8561 |
+
var velocity = Array.isArray(config.initialVelocity) ? config.initialVelocity[valIdx] : config.initialVelocity;
|
8562 |
+
if (isAnimated) to = to.getValue(); // Conclude animation if it's either immediate, or from-values match end-state
|
8563 |
|
8564 |
+
if (config.immediate) {
|
8565 |
+
animation.setValue(to);
|
8566 |
+
animation.done = true;
|
8567 |
+
continue;
|
8568 |
+
} // Break animation when string values are involved
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8569 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8570 |
|
8571 |
+
if (typeof from === 'string' || typeof to === 'string') {
|
8572 |
+
animation.setValue(to);
|
8573 |
+
animation.done = true;
|
8574 |
+
continue;
|
8575 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8576 |
|
8577 |
+
if (config.duration !== void 0) {
|
8578 |
+
/** Duration easing */
|
8579 |
+
position = from + config.easing((time - animation.startTime) / config.duration) * (to - from);
|
8580 |
+
endOfAnimation = time >= animation.startTime + config.duration;
|
8581 |
+
} else if (config.decay) {
|
8582 |
+
/** Decay easing */
|
8583 |
+
position = from + velocity / (1 - 0.998) * (1 - Math.exp(-(1 - 0.998) * (time - animation.startTime)));
|
8584 |
+
endOfAnimation = Math.abs(animation.lastPosition - position) < 0.1;
|
8585 |
+
if (endOfAnimation) to = position;
|
8586 |
+
} else {
|
8587 |
+
/** Spring easing */
|
8588 |
+
lastTime = animation.lastTime !== void 0 ? animation.lastTime : time;
|
8589 |
+
velocity = animation.lastVelocity !== void 0 ? animation.lastVelocity : config.initialVelocity; // If we lost a lot of frames just jump to the end.
|
8590 |
|
8591 |
+
if (time > lastTime + 64) lastTime = time; // http://gafferongames.com/game-physics/fix-your-timestep/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8592 |
|
8593 |
+
var numSteps = Math.floor(time - lastTime);
|
8594 |
|
8595 |
+
for (var i = 0; i < numSteps; ++i) {
|
8596 |
+
var force = -config.tension * (position - to);
|
8597 |
+
var damping = -config.friction * velocity;
|
8598 |
+
var acceleration = (force + damping) / config.mass;
|
8599 |
+
velocity = velocity + acceleration * 1 / 1000;
|
8600 |
+
position = position + velocity * 1 / 1000;
|
8601 |
+
} // Conditions for stopping the spring animation
|
8602 |
|
|
|
|
|
|
|
8603 |
|
8604 |
+
var isOvershooting = config.clamp && config.tension !== 0 ? from < to ? position > to : position < to : false;
|
8605 |
+
var isVelocity = Math.abs(velocity) <= config.precision;
|
8606 |
+
var isDisplacement = config.tension !== 0 ? Math.abs(to - position) <= config.precision : true;
|
8607 |
+
endOfAnimation = isOvershooting || isVelocity && isDisplacement;
|
8608 |
+
animation.lastVelocity = velocity;
|
8609 |
+
animation.lastTime = time;
|
8610 |
+
} // Trails aren't done until their parents conclude
|
8611 |
|
|
|
|
|
8612 |
|
8613 |
+
if (isAnimated && !config.toValues[valIdx].done) endOfAnimation = false;
|
|
|
|
|
|
|
|
|
8614 |
|
8615 |
+
if (endOfAnimation) {
|
8616 |
+
// Ensure that we end up with a round value
|
8617 |
+
if (animation.value !== to) position = to;
|
8618 |
+
animation.done = true;
|
8619 |
+
} else isActive = true;
|
8620 |
|
8621 |
+
animation.setValue(position);
|
8622 |
+
animation.lastPosition = position;
|
8623 |
+
} // Keep track of updated values only when necessary
|
|
|
|
|
8624 |
|
|
|
|
|
|
|
8625 |
|
8626 |
+
if (controller.props.onFrame) controller.values[config.name] = config.interpolation.getValue();
|
8627 |
+
} // Update callbacks in the end of the frame
|
|
|
|
|
|
|
8628 |
|
|
|
|
|
8629 |
|
8630 |
+
if (controller.props.onFrame) controller.props.onFrame(controller.values); // Either call onEnd or next frame
|
8631 |
|
8632 |
+
if (!isActive) {
|
8633 |
+
controllers.delete(controller);
|
8634 |
+
controller.stop(true);
|
8635 |
+
}
|
8636 |
+
} // Loop over as long as there are controllers ...
|
8637 |
|
|
|
|
|
|
|
|
|
|
|
|
|
8638 |
|
8639 |
+
if (controllers.size) {
|
8640 |
+
if (manualFrameloop) manualFrameloop();else requestFrame(update);
|
8641 |
+
} else {
|
8642 |
+
active = false;
|
8643 |
+
}
|
|
|
|
|
|
|
8644 |
|
8645 |
+
return active;
|
8646 |
+
};
|
|
|
8647 |
|
8648 |
+
var start = function start(controller) {
|
8649 |
+
if (!controllers.has(controller)) controllers.add(controller);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8650 |
|
8651 |
+
if (!active) {
|
8652 |
+
active = true;
|
8653 |
+
if (manualFrameloop) requestFrame(manualFrameloop);else requestFrame(update);
|
8654 |
+
}
|
8655 |
+
};
|
8656 |
|
8657 |
+
var stop = function stop(controller) {
|
8658 |
+
if (controllers.has(controller)) controllers.delete(controller);
|
8659 |
+
};
|
|
|
8660 |
|
8661 |
+
function createInterpolator(range, output, extrapolate) {
|
8662 |
+
if (typeof range === 'function') {
|
8663 |
+
return range;
|
8664 |
+
}
|
8665 |
|
8666 |
+
if (Array.isArray(range)) {
|
8667 |
+
return createInterpolator({
|
8668 |
+
range: range,
|
8669 |
+
output: output,
|
8670 |
+
extrapolate: extrapolate
|
8671 |
+
});
|
8672 |
+
}
|
8673 |
|
8674 |
+
if (interpolation && typeof range.output[0] === 'string') {
|
8675 |
+
return interpolation(range);
|
8676 |
+
}
|
8677 |
|
8678 |
+
var config = range;
|
8679 |
+
var outputRange = config.output;
|
8680 |
+
var inputRange = config.range || [0, 1];
|
8681 |
+
var extrapolateLeft = config.extrapolateLeft || config.extrapolate || 'extend';
|
8682 |
+
var extrapolateRight = config.extrapolateRight || config.extrapolate || 'extend';
|
8683 |
|
8684 |
+
var easing = config.easing || function (t) {
|
8685 |
+
return t;
|
8686 |
+
};
|
8687 |
|
8688 |
+
return function (input) {
|
8689 |
+
var range = findRange(input, inputRange);
|
8690 |
+
return interpolate(input, inputRange[range], inputRange[range + 1], outputRange[range], outputRange[range + 1], easing, extrapolateLeft, extrapolateRight, config.map);
|
8691 |
+
};
|
8692 |
+
}
|
8693 |
|
8694 |
+
function interpolate(input, inputMin, inputMax, outputMin, outputMax, easing, extrapolateLeft, extrapolateRight, map) {
|
8695 |
+
var result = map ? map(input) : input; // Extrapolate
|
|
|
8696 |
|
8697 |
+
if (result < inputMin) {
|
8698 |
+
if (extrapolateLeft === 'identity') return result;else if (extrapolateLeft === 'clamp') result = inputMin;
|
8699 |
}
|
8700 |
|
8701 |
+
if (result > inputMax) {
|
8702 |
+
if (extrapolateRight === 'identity') return result;else if (extrapolateRight === 'clamp') result = inputMax;
|
8703 |
+
}
|
8704 |
|
8705 |
+
if (outputMin === outputMax) return outputMin;
|
8706 |
+
if (inputMin === inputMax) return input <= inputMin ? outputMin : outputMax; // Input Range
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8707 |
|
8708 |
+
if (inputMin === -Infinity) result = -result;else if (inputMax === Infinity) result = result - inputMin;else result = (result - inputMin) / (inputMax - inputMin); // Easing
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8709 |
|
8710 |
+
result = easing(result); // Output Range
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8711 |
|
8712 |
+
if (outputMin === -Infinity) result = -result;else if (outputMax === Infinity) result = result + outputMin;else result = result * (outputMax - outputMin) + outputMin;
|
8713 |
+
return result;
|
8714 |
+
}
|
8715 |
|
8716 |
+
function findRange(input, inputRange) {
|
8717 |
+
for (var i = 1; i < inputRange.length - 1; ++i) {
|
8718 |
+
if (inputRange[i] >= input) break;
|
8719 |
+
}
|
8720 |
|
8721 |
+
return i - 1;
|
8722 |
+
}
|
|
|
8723 |
|
8724 |
+
var AnimatedInterpolation =
|
8725 |
/*#__PURE__*/
|
8726 |
+
function (_AnimatedArray) {
|
8727 |
+
_inheritsLoose(AnimatedInterpolation, _AnimatedArray);
|
|
|
|
|
|
|
|
|
8728 |
|
8729 |
+
function AnimatedInterpolation(parents, range, output, extrapolate) {
|
8730 |
+
var _this;
|
8731 |
|
8732 |
+
_this = _AnimatedArray.call(this) || this;
|
8733 |
+
_this.calc = void 0;
|
8734 |
+
_this.payload = parents instanceof AnimatedArray && !(parents instanceof AnimatedInterpolation) ? parents.getPayload() : Array.isArray(parents) ? parents : [parents];
|
8735 |
+
_this.calc = createInterpolator(range, output, extrapolate);
|
8736 |
+
return _this;
|
8737 |
+
}
|
8738 |
|
8739 |
+
var _proto = AnimatedInterpolation.prototype;
|
|
|
|
|
|
|
|
|
|
|
|
|
8740 |
|
8741 |
+
_proto.getValue = function getValue() {
|
8742 |
+
return this.calc.apply(this, this.payload.map(function (value) {
|
8743 |
+
return value.getValue();
|
8744 |
+
}));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8745 |
};
|
8746 |
|
8747 |
+
_proto.updateConfig = function updateConfig(range, output, extrapolate) {
|
8748 |
+
this.calc = createInterpolator(range, output, extrapolate);
|
8749 |
+
};
|
|
|
8750 |
|
8751 |
+
_proto.interpolate = function interpolate(range, output, extrapolate) {
|
8752 |
+
return new AnimatedInterpolation(this, range, output, extrapolate);
|
8753 |
+
};
|
8754 |
|
8755 |
+
return AnimatedInterpolation;
|
8756 |
+
}(AnimatedArray);
|
8757 |
|
8758 |
+
var interpolate$1 = function interpolate(parents, range, output) {
|
8759 |
+
return parents && new AnimatedInterpolation(parents, range, output);
|
8760 |
+
};
|
8761 |
|
8762 |
+
var config = {
|
8763 |
+
default: {
|
8764 |
+
tension: 170,
|
8765 |
+
friction: 26
|
8766 |
+
},
|
8767 |
+
gentle: {
|
8768 |
+
tension: 120,
|
8769 |
+
friction: 14
|
8770 |
+
},
|
8771 |
+
wobbly: {
|
8772 |
+
tension: 180,
|
8773 |
+
friction: 12
|
8774 |
+
},
|
8775 |
+
stiff: {
|
8776 |
+
tension: 210,
|
8777 |
+
friction: 20
|
8778 |
+
},
|
8779 |
+
slow: {
|
8780 |
+
tension: 280,
|
8781 |
+
friction: 60
|
8782 |
+
},
|
8783 |
+
molasses: {
|
8784 |
+
tension: 280,
|
8785 |
+
friction: 120
|
8786 |
+
}
|
8787 |
+
};
|
8788 |
|
8789 |
+
/** API
|
8790 |
+
* useChain(references, timeSteps, timeFrame)
|
8791 |
+
*/
|
8792 |
|
8793 |
+
function useChain(refs, timeSteps, timeFrame) {
|
8794 |
+
if (timeFrame === void 0) {
|
8795 |
+
timeFrame = 1000;
|
8796 |
+
}
|
8797 |
|
8798 |
+
var previous = React.useRef();
|
8799 |
+
React.useEffect(function () {
|
8800 |
+
if (is.equ(refs, previous.current)) refs.forEach(function (_ref) {
|
8801 |
+
var current = _ref.current;
|
8802 |
+
return current && current.start();
|
8803 |
+
});else if (timeSteps) {
|
8804 |
+
refs.forEach(function (_ref2, index) {
|
8805 |
+
var current = _ref2.current;
|
8806 |
|
8807 |
+
if (current) {
|
8808 |
+
var ctrls = current.controllers;
|
|
|
8809 |
|
8810 |
+
if (ctrls.length) {
|
8811 |
+
var t = timeFrame * timeSteps[index];
|
8812 |
+
ctrls.forEach(function (ctrl) {
|
8813 |
+
ctrl.queue = ctrl.queue.map(function (e) {
|
8814 |
+
return _extends({}, e, {
|
8815 |
+
delay: e.delay + t
|
8816 |
+
});
|
8817 |
+
});
|
8818 |
+
ctrl.start();
|
8819 |
+
});
|
8820 |
+
}
|
8821 |
+
}
|
8822 |
+
});
|
8823 |
+
} else refs.reduce(function (q, _ref3, rI) {
|
8824 |
+
var current = _ref3.current;
|
8825 |
+
return q = q.then(function () {
|
8826 |
+
return current.start();
|
8827 |
+
});
|
8828 |
+
}, Promise.resolve());
|
8829 |
+
previous.current = refs;
|
8830 |
+
});
|
8831 |
}
|
|
|
|
|
8832 |
|
8833 |
+
/**
|
8834 |
+
* Animated works by building a directed acyclic graph of dependencies
|
8835 |
+
* transparently when you render your Animated components.
|
8836 |
+
*
|
8837 |
+
* new Animated.Value(0)
|
8838 |
+
* .interpolate() .interpolate() new Animated.Value(1)
|
8839 |
+
* opacity translateY scale
|
8840 |
+
* style transform
|
8841 |
+
* View#234 style
|
8842 |
+
* View#123
|
8843 |
+
*
|
8844 |
+
* A) Top Down phase
|
8845 |
+
* When an AnimatedValue is updated, we recursively go down through this
|
8846 |
+
* graph in order to find leaf nodes: the views that we flag as needing
|
8847 |
+
* an update.
|
8848 |
+
*
|
8849 |
+
* B) Bottom Up phase
|
8850 |
+
* When a view is flagged as needing an update, we recursively go back up
|
8851 |
+
* in order to build the new value that it needs. The reason why we need
|
8852 |
+
* this two-phases process is to deal with composite props such as
|
8853 |
+
* transform which can receive values from multiple parents.
|
8854 |
+
*/
|
8855 |
+
function addAnimatedStyles(node, styles) {
|
8856 |
+
if ('update' in node) {
|
8857 |
+
styles.add(node);
|
8858 |
+
} else {
|
8859 |
+
node.getChildren().forEach(function (child) {
|
8860 |
+
return addAnimatedStyles(child, styles);
|
8861 |
+
});
|
8862 |
+
}
|
8863 |
}
|
|
|
|
|
8864 |
|
8865 |
+
var AnimatedValue =
|
8866 |
+
/*#__PURE__*/
|
8867 |
+
function (_Animated) {
|
8868 |
+
_inheritsLoose(AnimatedValue, _Animated);
|
8869 |
|
8870 |
+
function AnimatedValue(_value) {
|
8871 |
+
var _this;
|
8872 |
|
8873 |
+
_this = _Animated.call(this) || this;
|
8874 |
+
_this.animatedStyles = new Set();
|
8875 |
+
_this.value = void 0;
|
8876 |
+
_this.startPosition = void 0;
|
8877 |
+
_this.lastPosition = void 0;
|
8878 |
+
_this.lastVelocity = void 0;
|
8879 |
+
_this.startTime = void 0;
|
8880 |
+
_this.lastTime = void 0;
|
8881 |
+
_this.done = false;
|
8882 |
|
8883 |
+
_this.setValue = function (value, flush) {
|
8884 |
+
if (flush === void 0) {
|
8885 |
+
flush = true;
|
8886 |
+
}
|
8887 |
|
8888 |
+
_this.value = value;
|
8889 |
+
if (flush) _this.flush();
|
8890 |
+
};
|
8891 |
|
8892 |
+
_this.value = _value;
|
8893 |
+
_this.startPosition = _value;
|
8894 |
+
_this.lastPosition = _value;
|
8895 |
+
return _this;
|
8896 |
+
}
|
8897 |
|
8898 |
+
var _proto = AnimatedValue.prototype;
|
|
|
8899 |
|
8900 |
+
_proto.flush = function flush() {
|
8901 |
+
if (this.animatedStyles.size === 0) {
|
8902 |
+
addAnimatedStyles(this, this.animatedStyles);
|
8903 |
+
}
|
8904 |
|
8905 |
+
this.animatedStyles.forEach(function (animatedStyle) {
|
8906 |
+
return animatedStyle.update();
|
8907 |
+
});
|
8908 |
+
};
|
8909 |
|
8910 |
+
_proto.clearStyles = function clearStyles() {
|
8911 |
+
this.animatedStyles.clear();
|
8912 |
+
};
|
8913 |
|
8914 |
+
_proto.getValue = function getValue() {
|
8915 |
+
return this.value;
|
8916 |
+
};
|
8917 |
|
8918 |
+
_proto.interpolate = function interpolate(range, output, extrapolate) {
|
8919 |
+
return new AnimatedInterpolation(this, range, output, extrapolate);
|
8920 |
+
};
|
8921 |
|
8922 |
+
return AnimatedValue;
|
8923 |
+
}(Animated);
|
8924 |
|
8925 |
+
var AnimatedValueArray =
|
8926 |
+
/*#__PURE__*/
|
8927 |
+
function (_AnimatedArray) {
|
8928 |
+
_inheritsLoose(AnimatedValueArray, _AnimatedArray);
|
8929 |
|
8930 |
+
function AnimatedValueArray(values) {
|
8931 |
+
var _this;
|
8932 |
|
8933 |
+
_this = _AnimatedArray.call(this) || this;
|
8934 |
+
_this.payload = values.map(function (n) {
|
8935 |
+
return new AnimatedValue(n);
|
8936 |
+
});
|
8937 |
+
return _this;
|
8938 |
+
}
|
8939 |
|
8940 |
+
var _proto = AnimatedValueArray.prototype;
|
|
|
8941 |
|
8942 |
+
_proto.setValue = function setValue(value, flush) {
|
8943 |
+
var _this2 = this;
|
8944 |
|
8945 |
+
if (flush === void 0) {
|
8946 |
+
flush = true;
|
8947 |
+
}
|
8948 |
|
8949 |
+
if (Array.isArray(value)) {
|
8950 |
+
if (value.length === this.payload.length) {
|
8951 |
+
value.forEach(function (v, i) {
|
8952 |
+
return _this2.payload[i].setValue(v, flush);
|
8953 |
+
});
|
8954 |
+
}
|
8955 |
+
} else {
|
8956 |
+
this.payload.forEach(function (p) {
|
8957 |
+
return p.setValue(value, flush);
|
8958 |
+
});
|
8959 |
+
}
|
8960 |
+
};
|
8961 |
|
8962 |
+
_proto.getValue = function getValue() {
|
8963 |
+
return this.payload.map(function (v) {
|
8964 |
+
return v.getValue();
|
8965 |
+
});
|
8966 |
+
};
|
8967 |
|
8968 |
+
_proto.interpolate = function interpolate(range, output) {
|
8969 |
+
return new AnimatedInterpolation(this, range, output);
|
8970 |
+
};
|
8971 |
|
8972 |
+
return AnimatedValueArray;
|
8973 |
+
}(AnimatedArray);
|
8974 |
|
8975 |
+
var G = 0;
|
8976 |
|
8977 |
+
var Controller =
|
8978 |
+
/*#__PURE__*/
|
8979 |
+
function () {
|
8980 |
+
function Controller() {
|
8981 |
+
var _this = this;
|
8982 |
|
8983 |
+
this.id = void 0;
|
8984 |
+
this.idle = true;
|
8985 |
+
this.hasChanged = false;
|
8986 |
+
this.guid = 0;
|
8987 |
+
this.local = 0;
|
8988 |
+
this.props = {};
|
8989 |
+
this.merged = {};
|
8990 |
+
this.animations = {};
|
8991 |
+
this.interpolations = {};
|
8992 |
+
this.values = {};
|
8993 |
+
this.configs = [];
|
8994 |
+
this.listeners = [];
|
8995 |
+
this.queue = [];
|
8996 |
+
this.localQueue = void 0;
|
8997 |
|
8998 |
+
this.getValues = function () {
|
8999 |
+
return _this.interpolations;
|
9000 |
+
};
|
9001 |
|
9002 |
+
this.id = G++;
|
9003 |
+
}
|
9004 |
+
/** update(props)
|
9005 |
+
* This function filters input props and creates an array of tasks which are executed in .start()
|
9006 |
+
* Each task is allowed to carry a delay, which means it can execute asnychroneously */
|
9007 |
|
9008 |
|
9009 |
+
var _proto = Controller.prototype;
|
9010 |
|
9011 |
+
_proto.update = function update$$1(args) {
|
9012 |
+
//this._id = n + this.id
|
9013 |
+
if (!args) return this; // Extract delay and the to-prop from props
|
9014 |
|
9015 |
+
var _ref = interpolateTo(args),
|
9016 |
+
_ref$delay = _ref.delay,
|
9017 |
+
delay = _ref$delay === void 0 ? 0 : _ref$delay,
|
9018 |
+
to = _ref.to,
|
9019 |
+
props = _objectWithoutPropertiesLoose(_ref, ["delay", "to"]);
|
9020 |
|
9021 |
+
if (is.arr(to) || is.fun(to)) {
|
9022 |
+
// If config is either a function or an array queue it up as is
|
9023 |
+
this.queue.push(_extends({}, props, {
|
9024 |
+
delay: delay,
|
9025 |
+
to: to
|
9026 |
+
}));
|
9027 |
+
} else if (to) {
|
9028 |
+
// Otherwise go through each key since it could be delayed individually
|
9029 |
+
var ops = {};
|
9030 |
+
Object.entries(to).forEach(function (_ref2) {
|
9031 |
+
var _to;
|
9032 |
|
9033 |
+
var k = _ref2[0],
|
9034 |
+
v = _ref2[1];
|
9035 |
|
9036 |
+
// Fetch delay and create an entry, consisting of the to-props, the delay, and basic props
|
9037 |
+
var entry = _extends({
|
9038 |
+
to: (_to = {}, _to[k] = v, _to),
|
9039 |
+
delay: callProp(delay, k)
|
9040 |
+
}, props);
|
9041 |
|
9042 |
+
var previous = ops[entry.delay] && ops[entry.delay].to;
|
9043 |
+
ops[entry.delay] = _extends({}, ops[entry.delay], entry, {
|
9044 |
+
to: _extends({}, previous, entry.to)
|
9045 |
+
});
|
9046 |
+
});
|
9047 |
+
this.queue = Object.values(ops);
|
9048 |
+
} // Sort queue, so that async calls go last
|
9049 |
|
9050 |
|
9051 |
+
this.queue = this.queue.sort(function (a, b) {
|
9052 |
+
return a.delay - b.delay;
|
9053 |
+
}); // Diff the reduced props immediately (they'll contain the from-prop and some config)
|
9054 |
|
9055 |
+
this.diff(props);
|
9056 |
+
return this;
|
9057 |
+
}
|
9058 |
+
/** start(onEnd)
|
9059 |
+
* This function either executes a queue, if present, or starts the frameloop, which animates */
|
9060 |
+
;
|
9061 |
|
9062 |
+
_proto.start = function start$$1(onEnd) {
|
9063 |
+
var _this2 = this;
|
9064 |
|
9065 |
+
// If a queue is present we must excecute it
|
9066 |
+
if (this.queue.length) {
|
9067 |
+
this.idle = false; // Updates can interrupt trailing queues, in that case we just merge values
|
9068 |
|
9069 |
+
if (this.localQueue) {
|
9070 |
+
this.localQueue.forEach(function (_ref3) {
|
9071 |
+
var _ref3$from = _ref3.from,
|
9072 |
+
from = _ref3$from === void 0 ? {} : _ref3$from,
|
9073 |
+
_ref3$to = _ref3.to,
|
9074 |
+
to = _ref3$to === void 0 ? {} : _ref3$to;
|
9075 |
+
if (is.obj(from)) _this2.merged = _extends({}, from, _this2.merged);
|
9076 |
+
if (is.obj(to)) _this2.merged = _extends({}, _this2.merged, to);
|
9077 |
+
});
|
9078 |
+
} // The guid helps us tracking frames, a new queue over an old one means an override
|
9079 |
+
// We discard async calls in that caseÍ
|
9080 |
|
9081 |
|
9082 |
+
var local = this.local = ++this.guid;
|
9083 |
+
var queue = this.localQueue = this.queue;
|
9084 |
+
this.queue = []; // Go through each entry and execute it
|
9085 |
|
9086 |
+
queue.forEach(function (_ref4, index) {
|
9087 |
+
var delay = _ref4.delay,
|
9088 |
+
props = _objectWithoutPropertiesLoose(_ref4, ["delay"]);
|
9089 |
|
9090 |
+
var cb = function cb(finished) {
|
9091 |
+
if (index === queue.length - 1 && local === _this2.guid && finished) {
|
9092 |
+
_this2.idle = true;
|
9093 |
+
if (_this2.props.onRest) _this2.props.onRest(_this2.merged);
|
9094 |
+
}
|
9095 |
|
9096 |
+
if (onEnd) onEnd();
|
9097 |
+
}; // Entries can be delayed, ansyc or immediate
|
9098 |
|
9099 |
|
9100 |
+
var async = is.arr(props.to) || is.fun(props.to);
|
9101 |
|
9102 |
+
if (delay) {
|
9103 |
+
setTimeout(function () {
|
9104 |
+
if (local === _this2.guid) {
|
9105 |
+
if (async) _this2.runAsync(props, cb);else _this2.diff(props).start(cb);
|
9106 |
+
}
|
9107 |
+
}, delay);
|
9108 |
+
} else if (async) _this2.runAsync(props, cb);else _this2.diff(props).start(cb);
|
9109 |
+
});
|
9110 |
+
} // Otherwise we kick of the frameloop
|
9111 |
+
else {
|
9112 |
+
if (is.fun(onEnd)) this.listeners.push(onEnd);
|
9113 |
+
if (this.props.onStart) this.props.onStart();
|
9114 |
|
9115 |
+
start(this);
|
9116 |
+
}
|
9117 |
|
9118 |
+
return this;
|
9119 |
+
};
|
9120 |
|
9121 |
+
_proto.stop = function stop$$1(finished) {
|
9122 |
+
this.listeners.forEach(function (onEnd) {
|
9123 |
+
return onEnd(finished);
|
9124 |
+
});
|
9125 |
+
this.listeners = [];
|
9126 |
+
return this;
|
9127 |
+
}
|
9128 |
+
/** Pause sets onEnd listeners free, but also removes the controller from the frameloop */
|
9129 |
+
;
|
9130 |
|
9131 |
+
_proto.pause = function pause(finished) {
|
9132 |
+
this.stop(true);
|
9133 |
+
if (finished) stop(this);
|
9134 |
+
return this;
|
9135 |
+
};
|
9136 |
|
9137 |
+
_proto.runAsync = function runAsync(_ref5, onEnd) {
|
9138 |
+
var _this3 = this;
|
9139 |
|
9140 |
+
var delay = _ref5.delay,
|
9141 |
+
props = _objectWithoutPropertiesLoose(_ref5, ["delay"]);
|
9142 |
|
9143 |
+
var local = this.local; // If "to" is either a function or an array it will be processed async, therefor "to" should be empty right now
|
9144 |
+
// If the view relies on certain values "from" has to be present
|
|
|
9145 |
|
9146 |
+
var queue = Promise.resolve(undefined);
|
9147 |
|
9148 |
+
if (is.arr(props.to)) {
|
9149 |
+
var _loop = function _loop(i) {
|
9150 |
+
var index = i;
|
9151 |
|
9152 |
+
var fresh = _extends({}, props, interpolateTo(props.to[index]));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9153 |
|
9154 |
+
if (is.arr(fresh.config)) fresh.config = fresh.config[index];
|
9155 |
+
queue = queue.then(function () {
|
9156 |
+
//this.stop()
|
9157 |
+
if (local === _this3.guid) return new Promise(function (r) {
|
9158 |
+
return _this3.diff(fresh).start(r);
|
9159 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9160 |
});
|
9161 |
+
};
|
9162 |
|
9163 |
+
for (var i = 0; i < props.to.length; i++) {
|
9164 |
+
_loop(i);
|
9165 |
+
}
|
9166 |
+
} else if (is.fun(props.to)) {
|
9167 |
+
var index = 0;
|
9168 |
+
var last;
|
9169 |
+
queue = queue.then(function () {
|
9170 |
+
return props.to( // next(props)
|
9171 |
+
function (p) {
|
9172 |
+
var fresh = _extends({}, props, interpolateTo(p));
|
9173 |
|
9174 |
+
if (is.arr(fresh.config)) fresh.config = fresh.config[index];
|
9175 |
+
index++; //this.stop()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9176 |
|
9177 |
+
if (local === _this3.guid) return last = new Promise(function (r) {
|
9178 |
+
return _this3.diff(fresh).start(r);
|
9179 |
+
});
|
9180 |
+
return;
|
9181 |
+
}, // cancel()
|
9182 |
+
function (finished) {
|
9183 |
+
if (finished === void 0) {
|
9184 |
+
finished = true;
|
9185 |
+
}
|
9186 |
|
9187 |
+
return _this3.stop(finished);
|
9188 |
+
}).then(function () {
|
9189 |
+
return last;
|
9190 |
+
});
|
9191 |
+
});
|
9192 |
+
}
|
|
|
|
|
|
|
9193 |
|
9194 |
+
queue.then(onEnd);
|
9195 |
+
};
|
|
|
9196 |
|
9197 |
+
_proto.diff = function diff(props) {
|
9198 |
+
var _this4 = this;
|
|
|
|
|
|
|
|
|
9199 |
|
9200 |
+
this.props = _extends({}, this.props, props);
|
9201 |
+
var _this$props = this.props,
|
9202 |
+
_this$props$from = _this$props.from,
|
9203 |
+
from = _this$props$from === void 0 ? {} : _this$props$from,
|
9204 |
+
_this$props$to = _this$props.to,
|
9205 |
+
to = _this$props$to === void 0 ? {} : _this$props$to,
|
9206 |
+
_this$props$config = _this$props.config,
|
9207 |
+
config = _this$props$config === void 0 ? {} : _this$props$config,
|
9208 |
+
reverse = _this$props.reverse,
|
9209 |
+
attach = _this$props.attach,
|
9210 |
+
reset = _this$props.reset,
|
9211 |
+
immediate = _this$props.immediate; // Reverse values when requested
|
9212 |
|
9213 |
+
if (reverse) {
|
9214 |
+
var _ref6 = [to, from];
|
9215 |
+
from = _ref6[0];
|
9216 |
+
to = _ref6[1];
|
9217 |
+
} // This will collect all props that were ever set, reset merged props when necessary
|
9218 |
|
|
|
|
|
9219 |
|
9220 |
+
this.merged = _extends({}, from, this.merged, to);
|
9221 |
+
this.hasChanged = false; // Attachment handling, trailed springs can "attach" themselves to a previous spring
|
9222 |
|
9223 |
+
var target = attach && attach(this); // Reduces input { name: value } pairs into animated values
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9224 |
|
9225 |
+
this.animations = Object.entries(this.merged).reduce(function (acc, _ref7) {
|
9226 |
+
var name = _ref7[0],
|
9227 |
+
value = _ref7[1];
|
9228 |
+
// Issue cached entries, except on reset
|
9229 |
+
var entry = acc[name] || {}; // Figure out what the value is supposed to be
|
9230 |
|
9231 |
+
var isNumber = is.num(value);
|
9232 |
+
var isString = is.str(value) && !value.startsWith('#') && !/\d/.test(value) && !colorNames[value];
|
9233 |
+
var isArray = is.arr(value);
|
9234 |
+
var isInterpolation = !isNumber && !isArray && !isString;
|
9235 |
+
var fromValue = !is.und(from[name]) ? from[name] : value;
|
9236 |
+
var toValue = isNumber || isArray ? value : isString ? value : 1;
|
9237 |
+
var toConfig = callProp(config, name);
|
9238 |
+
if (target) toValue = target.animations[name].parent;
|
9239 |
+
var parent = entry.parent,
|
9240 |
+
interpolation$$1 = entry.interpolation,
|
9241 |
+
toValues = toArray(target ? toValue.getPayload() : toValue),
|
9242 |
+
animatedValues;
|
9243 |
+
var newValue = value;
|
9244 |
+
if (isInterpolation) newValue = interpolation({
|
9245 |
+
range: [0, 1],
|
9246 |
+
output: [value, value]
|
9247 |
+
})(1);
|
9248 |
+
var currentValue = interpolation$$1 && interpolation$$1.getValue(); // Change detection flags
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9249 |
|
9250 |
+
var isFirst = is.und(parent);
|
9251 |
+
var isActive = !isFirst && entry.animatedValues.some(function (v) {
|
9252 |
+
return !v.done;
|
9253 |
+
});
|
9254 |
+
var currentValueDiffersFromGoal = !is.equ(newValue, currentValue);
|
9255 |
+
var hasNewGoal = !is.equ(newValue, entry.previous);
|
9256 |
+
var hasNewConfig = !is.equ(toConfig, entry.config); // Change animation props when props indicate a new goal (new value differs from previous one)
|
9257 |
+
// and current values differ from it. Config changes trigger a new update as well (though probably shouldn't?)
|
|
|
|
|
9258 |
|
9259 |
+
if (reset || hasNewGoal && currentValueDiffersFromGoal || hasNewConfig) {
|
9260 |
+
var _extends2;
|
|
|
|
|
|
|
|
|
|
|
|
|
9261 |
|
9262 |
+
// Convert regular values into animated values, ALWAYS re-use if possible
|
9263 |
+
if (isNumber || isString) parent = interpolation$$1 = entry.parent || new AnimatedValue(fromValue);else if (isArray) parent = interpolation$$1 = entry.parent || new AnimatedValueArray(fromValue);else if (isInterpolation) {
|
9264 |
+
var prev = entry.interpolation && entry.interpolation.calc(entry.parent.value);
|
9265 |
+
prev = prev !== void 0 && !reset ? prev : fromValue;
|
9266 |
|
9267 |
+
if (entry.parent) {
|
9268 |
+
parent = entry.parent;
|
9269 |
+
parent.setValue(0, false);
|
9270 |
+
} else parent = new AnimatedValue(0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9271 |
|
9272 |
+
var range = {
|
9273 |
+
output: [prev, value]
|
9274 |
+
};
|
9275 |
|
9276 |
+
if (entry.interpolation) {
|
9277 |
+
interpolation$$1 = entry.interpolation;
|
9278 |
+
entry.interpolation.updateConfig(range);
|
9279 |
+
} else interpolation$$1 = parent.interpolate(range);
|
9280 |
+
}
|
9281 |
+
toValues = toArray(target ? toValue.getPayload() : toValue);
|
9282 |
+
animatedValues = toArray(parent.getPayload());
|
9283 |
+
if (reset && !isInterpolation) parent.setValue(fromValue, false);
|
9284 |
+
_this4.hasChanged = true; // Reset animated values
|
9285 |
|
9286 |
+
animatedValues.forEach(function (value) {
|
9287 |
+
value.startPosition = value.value;
|
9288 |
+
value.lastPosition = value.value;
|
9289 |
+
value.lastVelocity = isActive ? value.lastVelocity : undefined;
|
9290 |
+
value.lastTime = isActive ? value.lastTime : undefined;
|
9291 |
+
value.startTime = now();
|
9292 |
+
value.done = false;
|
9293 |
+
value.animatedStyles.clear();
|
9294 |
+
}); // Set immediate values
|
9295 |
|
9296 |
+
if (callProp(immediate, name)) {
|
9297 |
+
parent.setValue(isInterpolation ? toValue : value, false);
|
9298 |
+
}
|
9299 |
|
9300 |
+
return _extends({}, acc, (_extends2 = {}, _extends2[name] = _extends({}, entry, {
|
9301 |
+
name: name,
|
9302 |
+
parent: parent,
|
9303 |
+
interpolation: interpolation$$1,
|
9304 |
+
animatedValues: animatedValues,
|
9305 |
+
toValues: toValues,
|
9306 |
+
previous: newValue,
|
9307 |
+
config: toConfig,
|
9308 |
+
fromValues: toArray(parent.getValue()),
|
9309 |
+
immediate: callProp(immediate, name),
|
9310 |
+
initialVelocity: withDefault(toConfig.velocity, 0),
|
9311 |
+
clamp: withDefault(toConfig.clamp, false),
|
9312 |
+
precision: withDefault(toConfig.precision, 0.01),
|
9313 |
+
tension: withDefault(toConfig.tension, 170),
|
9314 |
+
friction: withDefault(toConfig.friction, 26),
|
9315 |
+
mass: withDefault(toConfig.mass, 1),
|
9316 |
+
duration: toConfig.duration,
|
9317 |
+
easing: withDefault(toConfig.easing, function (t) {
|
9318 |
+
return t;
|
9319 |
+
}),
|
9320 |
+
decay: toConfig.decay
|
9321 |
+
}), _extends2));
|
9322 |
+
} else {
|
9323 |
+
if (!currentValueDiffersFromGoal) {
|
9324 |
+
var _extends3;
|
9325 |
|
9326 |
+
// So ... the current target value (newValue) appears to be different from the previous value,
|
9327 |
+
// which normally constitutes an update, but the actual value (currentValue) matches the target!
|
9328 |
+
// In order to resolve this without causing an animation update we silently flag the animation as done,
|
9329 |
+
// which it technically is. Interpolations also needs a config update with their target set to 1.
|
9330 |
+
if (isInterpolation) {
|
9331 |
+
parent.setValue(1, false);
|
9332 |
+
interpolation$$1.updateConfig({
|
9333 |
+
output: [newValue, newValue]
|
9334 |
+
});
|
9335 |
+
}
|
9336 |
|
9337 |
+
parent.done = true;
|
9338 |
+
_this4.hasChanged = true;
|
9339 |
+
return _extends({}, acc, (_extends3 = {}, _extends3[name] = _extends({}, acc[name], {
|
9340 |
+
previous: newValue
|
9341 |
+
}), _extends3));
|
9342 |
+
}
|
9343 |
|
9344 |
+
return acc;
|
9345 |
+
}
|
9346 |
+
}, this.animations);
|
9347 |
|
9348 |
+
if (this.hasChanged) {
|
9349 |
+
// Make animations available to frameloop
|
9350 |
+
this.configs = Object.values(this.animations);
|
9351 |
+
this.values = {};
|
9352 |
+
this.interpolations = {};
|
9353 |
|
9354 |
+
for (var key in this.animations) {
|
9355 |
+
this.interpolations[key] = this.animations[key].interpolation;
|
9356 |
+
this.values[key] = this.animations[key].interpolation.getValue();
|
9357 |
+
}
|
9358 |
+
}
|
9359 |
|
9360 |
+
return this;
|
9361 |
+
};
|
9362 |
|
9363 |
+
_proto.destroy = function destroy() {
|
9364 |
+
this.stop();
|
9365 |
+
this.props = {};
|
9366 |
+
this.merged = {};
|
9367 |
+
this.animations = {};
|
9368 |
+
this.interpolations = {};
|
9369 |
+
this.values = {};
|
9370 |
+
this.configs = [];
|
9371 |
+
this.local = 0;
|
9372 |
+
};
|
9373 |
|
9374 |
+
return Controller;
|
9375 |
+
}();
|
9376 |
|
9377 |
+
/** API
|
9378 |
+
* const props = useSprings(number, [{ ... }, { ... }, ...])
|
9379 |
+
* const [props, set] = useSprings(number, (i, controller) => ({ ... }))
|
9380 |
+
*/
|
9381 |
|
9382 |
+
var useSprings = function useSprings(length, props) {
|
9383 |
+
var mounted = React.useRef(false);
|
9384 |
+
var ctrl = React.useRef();
|
9385 |
+
var isFn = is.fun(props); // The controller maintains the animation values, starts and stops animations
|
9386 |
|
9387 |
+
var _useMemo = React.useMemo(function () {
|
9388 |
+
// Remove old controllers
|
9389 |
+
if (ctrl.current) {
|
9390 |
+
ctrl.current.map(function (c) {
|
9391 |
+
return c.destroy();
|
9392 |
+
});
|
9393 |
+
ctrl.current = undefined;
|
9394 |
+
}
|
9395 |
|
9396 |
+
var ref;
|
9397 |
+
return [new Array(length).fill().map(function (_, i) {
|
9398 |
+
var ctrl = new Controller();
|
9399 |
+
var newProps = isFn ? callProp(props, i, ctrl) : props[i];
|
9400 |
+
if (i === 0) ref = newProps.ref;
|
9401 |
+
ctrl.update(newProps);
|
9402 |
+
if (!ref) ctrl.start();
|
9403 |
+
return ctrl;
|
9404 |
+
}), ref];
|
9405 |
+
}, [length]),
|
9406 |
+
controllers = _useMemo[0],
|
9407 |
+
ref = _useMemo[1];
|
9408 |
|
9409 |
+
ctrl.current = controllers; // The hooks reference api gets defined here ...
|
9410 |
|
9411 |
+
var api = React.useImperativeHandle(ref, function () {
|
9412 |
+
return {
|
9413 |
+
start: function start() {
|
9414 |
+
return Promise.all(ctrl.current.map(function (c) {
|
9415 |
+
return new Promise(function (r) {
|
9416 |
+
return c.start(r);
|
9417 |
+
});
|
9418 |
+
}));
|
9419 |
+
},
|
9420 |
+
stop: function stop(finished) {
|
9421 |
+
return ctrl.current.forEach(function (c) {
|
9422 |
+
return c.stop(finished);
|
9423 |
+
});
|
9424 |
+
},
|
9425 |
|
9426 |
+
get controllers() {
|
9427 |
+
return ctrl.current;
|
9428 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9429 |
|
9430 |
+
};
|
9431 |
+
}); // This function updates the controllers
|
9432 |
|
9433 |
+
var updateCtrl = React.useMemo(function () {
|
9434 |
+
return function (updateProps) {
|
9435 |
+
return ctrl.current.map(function (c, i) {
|
9436 |
+
c.update(isFn ? callProp(updateProps, i, c) : updateProps[i]);
|
9437 |
+
if (!ref) c.start();
|
9438 |
+
});
|
9439 |
+
};
|
9440 |
+
}, [length]); // Update controller if props aren't functional
|
9441 |
|
9442 |
+
React.useEffect(function () {
|
9443 |
+
if (mounted.current) {
|
9444 |
+
if (!isFn) updateCtrl(props);
|
9445 |
+
} else if (!ref) ctrl.current.forEach(function (c) {
|
9446 |
+
return c.start();
|
9447 |
+
});
|
9448 |
+
}); // Update mounted flag and destroy controller on unmount
|
|
|
|
|
|
|
9449 |
|
9450 |
+
React.useEffect(function () {
|
9451 |
+
return mounted.current = true, function () {
|
9452 |
+
return ctrl.current.forEach(function (c) {
|
9453 |
+
return c.destroy();
|
9454 |
+
});
|
9455 |
+
};
|
9456 |
+
}, []); // Return animated props, or, anim-props + the update-setter above
|
9457 |
|
9458 |
+
var propValues = ctrl.current.map(function (c) {
|
9459 |
+
return c.getValues();
|
9460 |
+
});
|
9461 |
+
return isFn ? [propValues, updateCtrl, function (finished) {
|
9462 |
+
return ctrl.current.forEach(function (c) {
|
9463 |
+
return c.pause(finished);
|
9464 |
+
});
|
9465 |
+
}] : propValues;
|
9466 |
+
};
|
9467 |
|
9468 |
+
/** API
|
9469 |
+
* const props = useSpring({ ... })
|
9470 |
+
* const [props, set] = useSpring(() => ({ ... }))
|
9471 |
*/
|
9472 |
|
9473 |
+
var useSpring = function useSpring(props) {
|
9474 |
+
var isFn = is.fun(props);
|
9475 |
|
9476 |
+
var _useSprings = useSprings(1, isFn ? props : [props]),
|
9477 |
+
result = _useSprings[0],
|
9478 |
+
set = _useSprings[1],
|
9479 |
+
pause = _useSprings[2];
|
9480 |
|
9481 |
+
return isFn ? [result[0], set, pause] : result;
|
|
|
|
|
|
|
|
|
|
|
|
|
9482 |
};
|
|
|
|
|
|
|
|
|
|
|
9483 |
|
9484 |
+
/** API
|
9485 |
+
* const trails = useTrail(number, { ... })
|
9486 |
+
* const [trails, set] = useTrail(number, () => ({ ... }))
|
9487 |
+
*/
|
|
|
9488 |
|
9489 |
+
var useTrail = function useTrail(length, props) {
|
9490 |
+
var mounted = React.useRef(false);
|
9491 |
+
var isFn = is.fun(props);
|
9492 |
+
var updateProps = callProp(props);
|
9493 |
+
var instances = React.useRef();
|
9494 |
|
9495 |
+
var _useSprings = useSprings(length, function (i, ctrl) {
|
9496 |
+
if (i === 0) instances.current = [];
|
9497 |
+
instances.current.push(ctrl);
|
9498 |
+
return _extends({}, updateProps, {
|
9499 |
+
config: callProp(updateProps.config, i),
|
9500 |
+
attach: i > 0 && function () {
|
9501 |
+
return instances.current[i - 1];
|
9502 |
+
}
|
9503 |
+
});
|
9504 |
+
}),
|
9505 |
+
result = _useSprings[0],
|
9506 |
+
set = _useSprings[1],
|
9507 |
+
pause = _useSprings[2]; // Set up function to update controller
|
9508 |
|
|
|
|
|
|
|
9509 |
|
9510 |
+
var updateCtrl = React.useMemo(function () {
|
9511 |
+
return function (props) {
|
9512 |
+
return set(function (i, ctrl) {
|
9513 |
+
var last = props.reverse ? i === 0 : length - 1 === i;
|
9514 |
+
var attachIdx = props.reverse ? i + 1 : i - 1;
|
9515 |
+
var attachController = instances.current[attachIdx];
|
9516 |
+
return _extends({}, props, {
|
9517 |
+
config: callProp(props.config || updateProps.config, i),
|
9518 |
+
attach: attachController && function () {
|
9519 |
+
return attachController;
|
9520 |
+
}
|
9521 |
+
});
|
9522 |
+
});
|
9523 |
+
};
|
9524 |
+
}, [length, updateProps.reverse]); // Update controller if props aren't functional
|
9525 |
|
9526 |
+
React.useEffect(function () {
|
9527 |
+
return void (mounted.current && !isFn && updateCtrl(props));
|
9528 |
+
}); // Update mounted flag and destroy controller on unmount
|
9529 |
|
9530 |
+
React.useEffect(function () {
|
9531 |
+
return void (mounted.current = true);
|
9532 |
+
}, []);
|
9533 |
+
return isFn ? [result, updateCtrl, pause] : result;
|
9534 |
+
};
|
9535 |
|
9536 |
+
/** API
|
9537 |
+
* const transitions = useTransition(items, itemKeys, { ... })
|
9538 |
+
* const [transitions, update] = useTransition(items, itemKeys, () => ({ ... }))
|
9539 |
*/
|
9540 |
|
9541 |
+
var guid = 0;
|
9542 |
+
var ENTER = 'enter';
|
9543 |
+
var LEAVE = 'leave';
|
9544 |
+
var UPDATE = 'update';
|
9545 |
|
9546 |
+
var mapKeys = function mapKeys(items, keys) {
|
9547 |
+
return (typeof keys === 'function' ? items.map(keys) : toArray(keys)).map(String);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9548 |
};
|
|
|
9549 |
|
9550 |
+
var get = function get(props) {
|
9551 |
+
var items = props.items,
|
9552 |
+
_props$keys = props.keys,
|
9553 |
+
keys = _props$keys === void 0 ? function (item) {
|
9554 |
+
return item;
|
9555 |
+
} : _props$keys,
|
9556 |
+
rest = _objectWithoutPropertiesLoose(props, ["items", "keys"]);
|
9557 |
|
9558 |
+
items = toArray(items !== void 0 ? items : null);
|
9559 |
+
return _extends({
|
9560 |
+
items: items,
|
9561 |
+
keys: mapKeys(items, keys)
|
9562 |
+
}, rest);
|
9563 |
+
};
|
9564 |
|
9565 |
+
function useTransition(input, keyTransform, config) {
|
9566 |
+
var props = _extends({
|
9567 |
+
items: input,
|
9568 |
+
keys: keyTransform || function (i) {
|
9569 |
+
return i;
|
9570 |
+
}
|
9571 |
+
}, config);
|
9572 |
|
9573 |
+
var _get = get(props),
|
9574 |
+
_get$lazy = _get.lazy,
|
9575 |
+
lazy = _get$lazy === void 0 ? false : _get$lazy,
|
9576 |
+
_get$unique = _get.unique,
|
9577 |
+
_get$reset = _get.reset,
|
9578 |
+
reset = _get$reset === void 0 ? false : _get$reset,
|
9579 |
+
enter = _get.enter,
|
9580 |
+
leave = _get.leave,
|
9581 |
+
update = _get.update,
|
9582 |
+
onDestroyed = _get.onDestroyed,
|
9583 |
+
keys = _get.keys,
|
9584 |
+
items = _get.items,
|
9585 |
+
onFrame = _get.onFrame,
|
9586 |
+
_onRest = _get.onRest,
|
9587 |
+
onStart = _get.onStart,
|
9588 |
+
ref = _get.ref,
|
9589 |
+
extra = _objectWithoutPropertiesLoose(_get, ["lazy", "unique", "reset", "enter", "leave", "update", "onDestroyed", "keys", "items", "onFrame", "onRest", "onStart", "ref"]);
|
9590 |
|
9591 |
+
var forceUpdate = useForceUpdate();
|
9592 |
+
var mounted = React.useRef(false);
|
9593 |
+
var state = React.useRef({
|
9594 |
+
mounted: false,
|
9595 |
+
first: true,
|
9596 |
+
deleted: [],
|
9597 |
+
current: {},
|
9598 |
+
transitions: [],
|
9599 |
+
prevProps: {},
|
9600 |
+
paused: !!props.ref,
|
9601 |
+
instances: !mounted.current && new Map(),
|
9602 |
+
forceUpdate: forceUpdate
|
9603 |
+
});
|
9604 |
+
React.useImperativeHandle(props.ref, function () {
|
9605 |
+
return {
|
9606 |
+
start: function start() {
|
9607 |
+
return Promise.all(Array.from(state.current.instances).map(function (_ref) {
|
9608 |
+
var c = _ref[1];
|
9609 |
+
return new Promise(function (r) {
|
9610 |
+
return c.start(r);
|
9611 |
+
});
|
9612 |
+
}));
|
9613 |
+
},
|
9614 |
+
stop: function stop(finished) {
|
9615 |
+
return Array.from(state.current.instances).forEach(function (_ref2) {
|
9616 |
+
var c = _ref2[1];
|
9617 |
+
return c.stop(finished);
|
9618 |
+
});
|
9619 |
+
},
|
9620 |
|
9621 |
+
get controllers() {
|
9622 |
+
return Array.from(state.current.instances).map(function (_ref3) {
|
9623 |
+
var c = _ref3[1];
|
9624 |
+
return c;
|
9625 |
+
});
|
9626 |
+
}
|
9627 |
|
9628 |
+
};
|
9629 |
+
}); // Update state
|
9630 |
|
9631 |
+
state.current = diffItems(state.current, props);
|
9632 |
|
9633 |
+
if (state.current.changed) {
|
9634 |
+
// Update state
|
9635 |
+
state.current.transitions.forEach(function (transition) {
|
9636 |
+
var slot = transition.slot,
|
9637 |
+
from = transition.from,
|
9638 |
+
to = transition.to,
|
9639 |
+
config = transition.config,
|
9640 |
+
trail = transition.trail,
|
9641 |
+
key = transition.key,
|
9642 |
+
item = transition.item;
|
9643 |
+
if (!state.current.instances.has(key)) state.current.instances.set(key, new Controller()); // update the map object
|
9644 |
+
|
9645 |
+
var ctrl = state.current.instances.get(key);
|
9646 |
|
9647 |
+
var newProps = _extends({}, extra, {
|
9648 |
+
to: to,
|
9649 |
+
from: from,
|
9650 |
+
config: config,
|
9651 |
+
ref: ref,
|
9652 |
+
onRest: function onRest(values) {
|
9653 |
+
if (state.current.mounted) {
|
9654 |
+
if (transition.destroyed) {
|
9655 |
+
// If no ref is given delete destroyed items immediately
|
9656 |
+
if (!ref && !lazy) cleanUp(state, key);
|
9657 |
+
if (onDestroyed) onDestroyed(item);
|
9658 |
+
} // A transition comes to rest once all its springs conclude
|
9659 |
|
|
|
|
|
|
|
|
|
|
|
|
|
9660 |
|
9661 |
+
var curInstances = Array.from(state.current.instances);
|
9662 |
+
var active = curInstances.some(function (_ref4) {
|
9663 |
+
var c = _ref4[1];
|
9664 |
+
return !c.idle;
|
9665 |
+
});
|
9666 |
+
if (!active && (ref || lazy) && state.current.deleted.length > 0) cleanUp(state);
|
9667 |
+
if (_onRest) _onRest(item, slot, values);
|
9668 |
+
}
|
9669 |
+
},
|
9670 |
+
onStart: onStart && function () {
|
9671 |
+
return onStart(item, slot);
|
9672 |
+
},
|
9673 |
+
onFrame: onFrame && function (values) {
|
9674 |
+
return onFrame(item, slot, values);
|
9675 |
+
},
|
9676 |
+
delay: trail,
|
9677 |
+
reset: reset && slot === ENTER // Update controller
|
9678 |
|
9679 |
+
});
|
9680 |
|
9681 |
+
ctrl.update(newProps);
|
9682 |
+
if (!state.current.paused) ctrl.start();
|
|
|
|
|
9683 |
});
|
9684 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9685 |
|
9686 |
+
React.useEffect(function () {
|
9687 |
+
state.current.mounted = mounted.current = true;
|
9688 |
+
return function () {
|
9689 |
+
state.current.mounted = mounted.current = false;
|
9690 |
+
Array.from(state.current.instances).map(function (_ref5) {
|
9691 |
+
var c = _ref5[1];
|
9692 |
+
return c.destroy();
|
9693 |
+
});
|
9694 |
+
state.current.instances.clear();
|
9695 |
+
};
|
9696 |
+
}, []);
|
9697 |
+
return state.current.transitions.map(function (_ref6) {
|
9698 |
+
var item = _ref6.item,
|
9699 |
+
slot = _ref6.slot,
|
9700 |
+
key = _ref6.key;
|
9701 |
+
return {
|
9702 |
+
item: item,
|
9703 |
+
key: key,
|
9704 |
+
state: slot,
|
9705 |
+
props: state.current.instances.get(key).getValues()
|
9706 |
+
};
|
9707 |
+
});
|
9708 |
+
}
|
|
|
|
|
|
|
9709 |
|
9710 |
+
function cleanUp(state, filterKey) {
|
9711 |
+
var deleted = state.current.deleted;
|
9712 |
|
9713 |
+
var _loop = function _loop() {
|
9714 |
+
if (_isArray) {
|
9715 |
+
if (_i >= _iterator.length) return "break";
|
9716 |
+
_ref8 = _iterator[_i++];
|
9717 |
+
} else {
|
9718 |
+
_i = _iterator.next();
|
9719 |
+
if (_i.done) return "break";
|
9720 |
+
_ref8 = _i.value;
|
9721 |
+
}
|
9722 |
|
9723 |
+
var _ref7 = _ref8;
|
9724 |
+
var key = _ref7.key;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9725 |
|
9726 |
+
var filter = function filter(t) {
|
9727 |
+
return t.key !== key;
|
9728 |
+
};
|
9729 |
|
9730 |
+
if (is.und(filterKey) || filterKey === key) {
|
9731 |
+
state.current.instances.delete(key);
|
9732 |
+
state.current.transitions = state.current.transitions.filter(filter);
|
9733 |
+
state.current.deleted = state.current.deleted.filter(filter);
|
9734 |
+
}
|
9735 |
+
};
|
9736 |
|
9737 |
+
for (var _iterator = deleted, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
|
9738 |
+
var _ref8;
|
9739 |
|
9740 |
+
var _ret = _loop();
|
9741 |
|
9742 |
+
if (_ret === "break") break;
|
9743 |
+
}
|
9744 |
|
9745 |
+
state.current.forceUpdate();
|
9746 |
+
}
|
9747 |
|
9748 |
+
function diffItems(_ref9, props) {
|
9749 |
+
var first = _ref9.first,
|
9750 |
+
prevProps = _ref9.prevProps,
|
9751 |
+
state = _objectWithoutPropertiesLoose(_ref9, ["first", "prevProps"]);
|
9752 |
|
9753 |
+
var _get2 = get(props),
|
9754 |
+
items = _get2.items,
|
9755 |
+
keys = _get2.keys,
|
9756 |
+
initial = _get2.initial,
|
9757 |
+
from = _get2.from,
|
9758 |
+
enter = _get2.enter,
|
9759 |
+
leave = _get2.leave,
|
9760 |
+
update = _get2.update,
|
9761 |
+
_get2$trail = _get2.trail,
|
9762 |
+
trail = _get2$trail === void 0 ? 0 : _get2$trail,
|
9763 |
+
unique = _get2.unique,
|
9764 |
+
config = _get2.config,
|
9765 |
+
_get2$order = _get2.order,
|
9766 |
+
order = _get2$order === void 0 ? [ENTER, LEAVE, UPDATE] : _get2$order;
|
9767 |
|
9768 |
+
var _get3 = get(prevProps),
|
9769 |
+
_keys = _get3.keys,
|
9770 |
+
_items = _get3.items;
|
9771 |
|
9772 |
+
var current = _extends({}, state.current);
|
9773 |
|
9774 |
+
var deleted = [].concat(state.deleted); // Compare next keys with current keys
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9775 |
|
9776 |
+
var currentKeys = Object.keys(current);
|
9777 |
+
var currentSet = new Set(currentKeys);
|
9778 |
+
var nextSet = new Set(keys);
|
9779 |
+
var added = keys.filter(function (item) {
|
9780 |
+
return !currentSet.has(item);
|
9781 |
});
|
9782 |
+
var removed = state.transitions.filter(function (item) {
|
9783 |
+
return !item.destroyed && !nextSet.has(item.originalKey);
|
9784 |
+
}).map(function (i) {
|
9785 |
+
return i.originalKey;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9786 |
});
|
9787 |
+
var updated = keys.filter(function (item) {
|
9788 |
+
return currentSet.has(item);
|
9789 |
+
});
|
9790 |
+
var delay = -trail;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9791 |
|
9792 |
+
while (order.length) {
|
9793 |
+
var changeType = order.shift();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9794 |
|
9795 |
+
switch (changeType) {
|
9796 |
+
case ENTER:
|
9797 |
+
{
|
9798 |
+
added.forEach(function (key, index) {
|
9799 |
+
// In unique mode, remove fading out transitions if their key comes in again
|
9800 |
+
if (unique && deleted.find(function (d) {
|
9801 |
+
return d.originalKey === key;
|
9802 |
+
})) deleted = deleted.filter(function (t) {
|
9803 |
+
return t.originalKey !== key;
|
9804 |
+
});
|
9805 |
+
var keyIndex = keys.indexOf(key);
|
9806 |
+
var item = items[keyIndex];
|
9807 |
+
var slot = first && initial !== void 0 ? 'initial' : ENTER;
|
9808 |
+
current[key] = {
|
9809 |
+
slot: slot,
|
9810 |
+
originalKey: key,
|
9811 |
+
key: unique ? String(key) : guid++,
|
9812 |
+
item: item,
|
9813 |
+
trail: delay = delay + trail,
|
9814 |
+
config: callProp(config, item, slot),
|
9815 |
+
from: callProp(first ? initial !== void 0 ? initial || {} : from : from, item),
|
9816 |
+
to: callProp(enter, item)
|
9817 |
+
};
|
9818 |
+
});
|
9819 |
+
break;
|
9820 |
+
}
|
9821 |
|
9822 |
+
case LEAVE:
|
9823 |
+
{
|
9824 |
+
removed.forEach(function (key) {
|
9825 |
+
var keyIndex = _keys.indexOf(key);
|
|
|
9826 |
|
9827 |
+
var item = _items[keyIndex];
|
9828 |
+
var slot = LEAVE;
|
9829 |
+
deleted.unshift(_extends({}, current[key], {
|
9830 |
+
slot: slot,
|
9831 |
+
destroyed: true,
|
9832 |
+
left: _keys[Math.max(0, keyIndex - 1)],
|
9833 |
+
right: _keys[Math.min(_keys.length, keyIndex + 1)],
|
9834 |
+
trail: delay = delay + trail,
|
9835 |
+
config: callProp(config, item, slot),
|
9836 |
+
to: callProp(leave, item)
|
9837 |
+
}));
|
9838 |
+
delete current[key];
|
9839 |
+
});
|
9840 |
+
break;
|
9841 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9842 |
|
9843 |
+
case UPDATE:
|
9844 |
+
{
|
9845 |
+
updated.forEach(function (key) {
|
9846 |
+
var keyIndex = keys.indexOf(key);
|
9847 |
+
var item = items[keyIndex];
|
9848 |
+
var slot = UPDATE;
|
9849 |
+
current[key] = _extends({}, current[key], {
|
9850 |
+
item: item,
|
9851 |
+
slot: slot,
|
9852 |
+
trail: delay = delay + trail,
|
9853 |
+
config: callProp(config, item, slot),
|
9854 |
+
to: callProp(update, item)
|
9855 |
+
});
|
9856 |
+
});
|
9857 |
+
break;
|
9858 |
+
}
|
9859 |
}
|
9860 |
}
|
9861 |
|
9862 |
+
var out = keys.map(function (key) {
|
9863 |
+
return current[key];
|
9864 |
+
}); // This tries to restore order for deleted items by finding their last known siblings
|
9865 |
+
// only using the left sibling to keep order placement consistent for all deleted items
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9866 |
|
9867 |
+
deleted.forEach(function (_ref10) {
|
9868 |
+
var left = _ref10.left,
|
9869 |
+
right = _ref10.right,
|
9870 |
+
item = _objectWithoutPropertiesLoose(_ref10, ["left", "right"]);
|
9871 |
|
9872 |
+
var pos; // Was it the element on the left, if yes, move there ...
|
|
|
9873 |
|
9874 |
+
if ((pos = out.findIndex(function (t) {
|
9875 |
+
return t.originalKey === left;
|
9876 |
+
})) !== -1) pos += 1; // And if nothing else helps, move it to the start ¯\_(ツ)_/¯
|
9877 |
|
9878 |
+
pos = Math.max(0, pos);
|
9879 |
+
out = [].concat(out.slice(0, pos), [item], out.slice(pos));
|
9880 |
+
});
|
9881 |
+
return _extends({}, state, {
|
9882 |
+
changed: added.length || removed.length || updated.length,
|
9883 |
+
first: first && added.length === 0,
|
9884 |
+
transitions: out,
|
9885 |
+
current: current,
|
9886 |
+
deleted: deleted,
|
9887 |
+
prevProps: props
|
9888 |
+
});
|
9889 |
+
}
|
9890 |
|
9891 |
+
var AnimatedStyle =
|
9892 |
+
/*#__PURE__*/
|
9893 |
+
function (_AnimatedObject) {
|
9894 |
+
_inheritsLoose(AnimatedStyle, _AnimatedObject);
|
9895 |
|
9896 |
+
function AnimatedStyle(style) {
|
9897 |
+
var _this;
|
9898 |
|
9899 |
+
if (style === void 0) {
|
9900 |
+
style = {};
|
9901 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9902 |
|
9903 |
+
_this = _AnimatedObject.call(this) || this;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9904 |
|
9905 |
+
if (style.transform && !(style.transform instanceof Animated)) {
|
9906 |
+
style = applyAnimatedValues.transform(style);
|
9907 |
}
|
9908 |
|
9909 |
+
_this.payload = style;
|
9910 |
+
return _this;
|
9911 |
+
}
|
|
|
9912 |
|
9913 |
+
return AnimatedStyle;
|
9914 |
+
}(AnimatedObject);
|
|
|
|
|
9915 |
|
9916 |
+
// http://www.w3.org/TR/css3-color/#svg-color
|
9917 |
+
var colors = {
|
9918 |
+
transparent: 0x00000000,
|
9919 |
+
aliceblue: 0xf0f8ffff,
|
9920 |
+
antiquewhite: 0xfaebd7ff,
|
9921 |
+
aqua: 0x00ffffff,
|
9922 |
+
aquamarine: 0x7fffd4ff,
|
9923 |
+
azure: 0xf0ffffff,
|
9924 |
+
beige: 0xf5f5dcff,
|
9925 |
+
bisque: 0xffe4c4ff,
|
9926 |
+
black: 0x000000ff,
|
9927 |
+
blanchedalmond: 0xffebcdff,
|
9928 |
+
blue: 0x0000ffff,
|
9929 |
+
blueviolet: 0x8a2be2ff,
|
9930 |
+
brown: 0xa52a2aff,
|
9931 |
+
burlywood: 0xdeb887ff,
|
9932 |
+
burntsienna: 0xea7e5dff,
|
9933 |
+
cadetblue: 0x5f9ea0ff,
|
9934 |
+
chartreuse: 0x7fff00ff,
|
9935 |
+
chocolate: 0xd2691eff,
|
9936 |
+
coral: 0xff7f50ff,
|
9937 |
+
cornflowerblue: 0x6495edff,
|
9938 |
+
cornsilk: 0xfff8dcff,
|
9939 |
+
crimson: 0xdc143cff,
|
9940 |
+
cyan: 0x00ffffff,
|
9941 |
+
darkblue: 0x00008bff,
|
9942 |
+
darkcyan: 0x008b8bff,
|
9943 |
+
darkgoldenrod: 0xb8860bff,
|
9944 |
+
darkgray: 0xa9a9a9ff,
|
9945 |
+
darkgreen: 0x006400ff,
|
9946 |
+
darkgrey: 0xa9a9a9ff,
|
9947 |
+
darkkhaki: 0xbdb76bff,
|
9948 |
+
darkmagenta: 0x8b008bff,
|
9949 |
+
darkolivegreen: 0x556b2fff,
|
9950 |
+
darkorange: 0xff8c00ff,
|
9951 |
+
darkorchid: 0x9932ccff,
|
9952 |
+
darkred: 0x8b0000ff,
|
9953 |
+
darksalmon: 0xe9967aff,
|
9954 |
+
darkseagreen: 0x8fbc8fff,
|
9955 |
+
darkslateblue: 0x483d8bff,
|
9956 |
+
darkslategray: 0x2f4f4fff,
|
9957 |
+
darkslategrey: 0x2f4f4fff,
|
9958 |
+
darkturquoise: 0x00ced1ff,
|
9959 |
+
darkviolet: 0x9400d3ff,
|
9960 |
+
deeppink: 0xff1493ff,
|
9961 |
+
deepskyblue: 0x00bfffff,
|
9962 |
+
dimgray: 0x696969ff,
|
9963 |
+
dimgrey: 0x696969ff,
|
9964 |
+
dodgerblue: 0x1e90ffff,
|
9965 |
+
firebrick: 0xb22222ff,
|
9966 |
+
floralwhite: 0xfffaf0ff,
|
9967 |
+
forestgreen: 0x228b22ff,
|
9968 |
+
fuchsia: 0xff00ffff,
|
9969 |
+
gainsboro: 0xdcdcdcff,
|
9970 |
+
ghostwhite: 0xf8f8ffff,
|
9971 |
+
gold: 0xffd700ff,
|
9972 |
+
goldenrod: 0xdaa520ff,
|
9973 |
+
gray: 0x808080ff,
|
9974 |
+
green: 0x008000ff,
|
9975 |
+
greenyellow: 0xadff2fff,
|
9976 |
+
grey: 0x808080ff,
|
9977 |
+
honeydew: 0xf0fff0ff,
|
9978 |
+
hotpink: 0xff69b4ff,
|
9979 |
+
indianred: 0xcd5c5cff,
|
9980 |
+
indigo: 0x4b0082ff,
|
9981 |
+
ivory: 0xfffff0ff,
|
9982 |
+
khaki: 0xf0e68cff,
|
9983 |
+
lavender: 0xe6e6faff,
|
9984 |
+
lavenderblush: 0xfff0f5ff,
|
9985 |
+
lawngreen: 0x7cfc00ff,
|
9986 |
+
lemonchiffon: 0xfffacdff,
|
9987 |
+
lightblue: 0xadd8e6ff,
|
9988 |
+
lightcoral: 0xf08080ff,
|
9989 |
+
lightcyan: 0xe0ffffff,
|
9990 |
+
lightgoldenrodyellow: 0xfafad2ff,
|
9991 |
+
lightgray: 0xd3d3d3ff,
|
9992 |
+
lightgreen: 0x90ee90ff,
|
9993 |
+
lightgrey: 0xd3d3d3ff,
|
9994 |
+
lightpink: 0xffb6c1ff,
|
9995 |
+
lightsalmon: 0xffa07aff,
|
9996 |
+
lightseagreen: 0x20b2aaff,
|
9997 |
+
lightskyblue: 0x87cefaff,
|
9998 |
+
lightslategray: 0x778899ff,
|
9999 |
+
lightslategrey: 0x778899ff,
|
10000 |
+
lightsteelblue: 0xb0c4deff,
|
10001 |
+
lightyellow: 0xffffe0ff,
|
10002 |
+
lime: 0x00ff00ff,
|
10003 |
+
limegreen: 0x32cd32ff,
|
10004 |
+
linen: 0xfaf0e6ff,
|
10005 |
+
magenta: 0xff00ffff,
|
10006 |
+
maroon: 0x800000ff,
|
10007 |
+
mediumaquamarine: 0x66cdaaff,
|
10008 |
+
mediumblue: 0x0000cdff,
|
10009 |
+
mediumorchid: 0xba55d3ff,
|
10010 |
+
mediumpurple: 0x9370dbff,
|
10011 |
+
mediumseagreen: 0x3cb371ff,
|
10012 |
+
mediumslateblue: 0x7b68eeff,
|
10013 |
+
mediumspringgreen: 0x00fa9aff,
|
10014 |
+
mediumturquoise: 0x48d1ccff,
|
10015 |
+
mediumvioletred: 0xc71585ff,
|
10016 |
+
midnightblue: 0x191970ff,
|
10017 |
+
mintcream: 0xf5fffaff,
|
10018 |
+
mistyrose: 0xffe4e1ff,
|
10019 |
+
moccasin: 0xffe4b5ff,
|
10020 |
+
navajowhite: 0xffdeadff,
|
10021 |
+
navy: 0x000080ff,
|
10022 |
+
oldlace: 0xfdf5e6ff,
|
10023 |
+
olive: 0x808000ff,
|
10024 |
+
olivedrab: 0x6b8e23ff,
|
10025 |
+
orange: 0xffa500ff,
|
10026 |
+
orangered: 0xff4500ff,
|
10027 |
+
orchid: 0xda70d6ff,
|
10028 |
+
palegoldenrod: 0xeee8aaff,
|
10029 |
+
palegreen: 0x98fb98ff,
|
10030 |
+
paleturquoise: 0xafeeeeff,
|
10031 |
+
palevioletred: 0xdb7093ff,
|
10032 |
+
papayawhip: 0xffefd5ff,
|
10033 |
+
peachpuff: 0xffdab9ff,
|
10034 |
+
peru: 0xcd853fff,
|
10035 |
+
pink: 0xffc0cbff,
|
10036 |
+
plum: 0xdda0ddff,
|
10037 |
+
powderblue: 0xb0e0e6ff,
|
10038 |
+
purple: 0x800080ff,
|
10039 |
+
rebeccapurple: 0x663399ff,
|
10040 |
+
red: 0xff0000ff,
|
10041 |
+
rosybrown: 0xbc8f8fff,
|
10042 |
+
royalblue: 0x4169e1ff,
|
10043 |
+
saddlebrown: 0x8b4513ff,
|
10044 |
+
salmon: 0xfa8072ff,
|
10045 |
+
sandybrown: 0xf4a460ff,
|
10046 |
+
seagreen: 0x2e8b57ff,
|
10047 |
+
seashell: 0xfff5eeff,
|
10048 |
+
sienna: 0xa0522dff,
|
10049 |
+
silver: 0xc0c0c0ff,
|
10050 |
+
skyblue: 0x87ceebff,
|
10051 |
+
slateblue: 0x6a5acdff,
|
10052 |
+
slategray: 0x708090ff,
|
10053 |
+
slategrey: 0x708090ff,
|
10054 |
+
snow: 0xfffafaff,
|
10055 |
+
springgreen: 0x00ff7fff,
|
10056 |
+
steelblue: 0x4682b4ff,
|
10057 |
+
tan: 0xd2b48cff,
|
10058 |
+
teal: 0x008080ff,
|
10059 |
+
thistle: 0xd8bfd8ff,
|
10060 |
+
tomato: 0xff6347ff,
|
10061 |
+
turquoise: 0x40e0d0ff,
|
10062 |
+
violet: 0xee82eeff,
|
10063 |
+
wheat: 0xf5deb3ff,
|
10064 |
+
white: 0xffffffff,
|
10065 |
+
whitesmoke: 0xf5f5f5ff,
|
10066 |
+
yellow: 0xffff00ff,
|
10067 |
+
yellowgreen: 0x9acd32ff
|
10068 |
+
};
|
10069 |
|
10070 |
+
// const INTEGER = '[-+]?\\d+';
|
10071 |
+
var NUMBER = '[-+]?\\d*\\.?\\d+';
|
10072 |
+
var PERCENTAGE = NUMBER + '%';
|
|
|
10073 |
|
10074 |
+
function call() {
|
10075 |
+
for (var _len = arguments.length, parts = new Array(_len), _key = 0; _key < _len; _key++) {
|
10076 |
+
parts[_key] = arguments[_key];
|
|
|
10077 |
}
|
10078 |
|
10079 |
+
return '\\(\\s*(' + parts.join(')\\s*,\\s*(') + ')\\s*\\)';
|
10080 |
}
|
|
|
10081 |
|
10082 |
+
var rgb = new RegExp('rgb' + call(NUMBER, NUMBER, NUMBER));
|
10083 |
+
var rgba = new RegExp('rgba' + call(NUMBER, NUMBER, NUMBER, NUMBER));
|
10084 |
+
var hsl = new RegExp('hsl' + call(NUMBER, PERCENTAGE, PERCENTAGE));
|
10085 |
+
var hsla = new RegExp('hsla' + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER));
|
10086 |
+
var hex3 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
|
10087 |
+
var hex4 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
|
10088 |
+
var hex6 = /^#([0-9a-fA-F]{6})$/;
|
10089 |
+
var hex8 = /^#([0-9a-fA-F]{8})$/;
|
10090 |
|
10091 |
+
/*
|
10092 |
+
https://github.com/react-community/normalize-css-color
|
|
|
|
|
10093 |
|
10094 |
+
BSD 3-Clause License
|
|
|
|
|
|
|
10095 |
|
10096 |
+
Copyright (c) 2016, React Community
|
10097 |
+
All rights reserved.
|
|
|
10098 |
|
10099 |
+
Redistribution and use in source and binary forms, with or without
|
10100 |
+
modification, are permitted provided that the following conditions are met:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10101 |
|
10102 |
+
* Redistributions of source code must retain the above copyright notice, this
|
10103 |
+
list of conditions and the following disclaimer.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10104 |
|
10105 |
+
* Redistributions in binary form must reproduce the above copyright notice,
|
10106 |
+
this list of conditions and the following disclaimer in the documentation
|
10107 |
+
and/or other materials provided with the distribution.
|
10108 |
|
10109 |
+
* Neither the name of the copyright holder nor the names of its
|
10110 |
+
contributors may be used to endorse or promote products derived from
|
10111 |
+
this software without specific prior written permission.
|
|
|
|
|
|
|
|
|
|
|
|
|
10112 |
|
10113 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
10114 |
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
10115 |
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
10116 |
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
10117 |
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
10118 |
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
10119 |
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
10120 |
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
10121 |
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
10122 |
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
10123 |
+
*/
|
10124 |
+
function normalizeColor(color) {
|
10125 |
+
var match;
|
10126 |
|
10127 |
+
if (typeof color === 'number') {
|
10128 |
+
return color >>> 0 === color && color >= 0 && color <= 0xffffffff ? color : null;
|
10129 |
+
} // Ordered based on occurrences on Facebook codebase
|
10130 |
|
|
|
|
|
|
|
|
|
|
|
10131 |
|
10132 |
+
if (match = hex6.exec(color)) return parseInt(match[1] + 'ff', 16) >>> 0;
|
10133 |
+
if (colors.hasOwnProperty(color)) return colors[color];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10134 |
|
10135 |
+
if (match = rgb.exec(color)) {
|
10136 |
+
return (parse255(match[1]) << 24 | // r
|
10137 |
+
parse255(match[2]) << 16 | // g
|
10138 |
+
parse255(match[3]) << 8 | // b
|
10139 |
+
0x000000ff) >>> // a
|
10140 |
+
0;
|
10141 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10142 |
|
10143 |
+
if (match = rgba.exec(color)) {
|
10144 |
+
return (parse255(match[1]) << 24 | // r
|
10145 |
+
parse255(match[2]) << 16 | // g
|
10146 |
+
parse255(match[3]) << 8 | // b
|
10147 |
+
parse1(match[4])) >>> // a
|
10148 |
+
0;
|
10149 |
+
}
|
10150 |
|
10151 |
+
if (match = hex3.exec(color)) {
|
10152 |
+
return parseInt(match[1] + match[1] + // r
|
10153 |
+
match[2] + match[2] + // g
|
10154 |
+
match[3] + match[3] + // b
|
10155 |
+
'ff', // a
|
10156 |
+
16) >>> 0;
|
10157 |
+
} // https://drafts.csswg.org/css-color-4/#hex-notation
|
10158 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10159 |
|
10160 |
+
if (match = hex8.exec(color)) return parseInt(match[1], 16) >>> 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10161 |
|
10162 |
+
if (match = hex4.exec(color)) {
|
10163 |
+
return parseInt(match[1] + match[1] + // r
|
10164 |
+
match[2] + match[2] + // g
|
10165 |
+
match[3] + match[3] + // b
|
10166 |
+
match[4] + match[4], // a
|
10167 |
+
16) >>> 0;
|
10168 |
+
}
|
10169 |
|
10170 |
+
if (match = hsl.exec(color)) {
|
10171 |
+
return (hslToRgb(parse360(match[1]), // h
|
10172 |
+
parsePercentage(match[2]), // s
|
10173 |
+
parsePercentage(match[3]) // l
|
10174 |
+
) | 0x000000ff) >>> // a
|
10175 |
+
0;
|
10176 |
+
}
|
10177 |
|
10178 |
+
if (match = hsla.exec(color)) {
|
10179 |
+
return (hslToRgb(parse360(match[1]), // h
|
10180 |
+
parsePercentage(match[2]), // s
|
10181 |
+
parsePercentage(match[3]) // l
|
10182 |
+
) | parse1(match[4])) >>> // a
|
10183 |
+
0;
|
10184 |
+
}
|
10185 |
|
10186 |
+
return null;
|
10187 |
+
}
|
10188 |
|
10189 |
+
function hue2rgb(p, q, t) {
|
10190 |
+
if (t < 0) t += 1;
|
10191 |
+
if (t > 1) t -= 1;
|
10192 |
+
if (t < 1 / 6) return p + (q - p) * 6 * t;
|
10193 |
+
if (t < 1 / 2) return q;
|
10194 |
+
if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
|
10195 |
+
return p;
|
10196 |
+
}
|
10197 |
|
10198 |
+
function hslToRgb(h, s, l) {
|
10199 |
+
var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
10200 |
+
var p = 2 * l - q;
|
10201 |
+
var r = hue2rgb(p, q, h + 1 / 3);
|
10202 |
+
var g = hue2rgb(p, q, h);
|
10203 |
+
var b = hue2rgb(p, q, h - 1 / 3);
|
10204 |
+
return Math.round(r * 255) << 24 | Math.round(g * 255) << 16 | Math.round(b * 255) << 8;
|
10205 |
+
}
|
10206 |
|
10207 |
+
function parse255(str) {
|
10208 |
+
var int = parseInt(str, 10);
|
10209 |
+
if (int < 0) return 0;
|
10210 |
+
if (int > 255) return 255;
|
10211 |
+
return int;
|
10212 |
+
}
|
10213 |
|
10214 |
+
function parse360(str) {
|
10215 |
+
var int = parseFloat(str);
|
10216 |
+
return (int % 360 + 360) % 360 / 360;
|
10217 |
+
}
|
10218 |
|
10219 |
+
function parse1(str) {
|
10220 |
+
var num = parseFloat(str);
|
10221 |
+
if (num < 0) return 0;
|
10222 |
+
if (num > 1) return 255;
|
10223 |
+
return Math.round(num * 255);
|
10224 |
+
}
|
|
|
|
|
|
|
10225 |
|
10226 |
+
function parsePercentage(str) {
|
10227 |
+
// parseFloat conveniently ignores the final %
|
10228 |
+
var int = parseFloat(str);
|
10229 |
+
if (int < 0) return 0;
|
10230 |
+
if (int > 100) return 1;
|
10231 |
+
return int / 100;
|
10232 |
+
}
|
10233 |
|
10234 |
+
function colorToRgba(input) {
|
10235 |
+
var int32Color = normalizeColor(input);
|
10236 |
+
if (int32Color === null) return input;
|
10237 |
+
int32Color = int32Color || 0;
|
10238 |
+
var r = (int32Color & 0xff000000) >>> 24;
|
10239 |
+
var g = (int32Color & 0x00ff0000) >>> 16;
|
10240 |
+
var b = (int32Color & 0x0000ff00) >>> 8;
|
10241 |
+
var a = (int32Color & 0x000000ff) / 255;
|
10242 |
+
return "rgba(" + r + ", " + g + ", " + b + ", " + a + ")";
|
10243 |
+
} // Problem: https://github.com/animatedjs/animated/pull/102
|
10244 |
+
// Solution: https://stackoverflow.com/questions/638565/parsing-scientific-notation-sensibly/658662
|
10245 |
|
|
|
|
|
|
|
|
|
10246 |
|
10247 |
+
var stringShapeRegex = /[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g; // Covers rgb, rgba, hsl, hsla
|
10248 |
+
// Taken from https://gist.github.com/olmokramer/82ccce673f86db7cda5e
|
10249 |
|
10250 |
+
var colorRegex = /(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi; // Covers color names (transparent, blue, etc.)
|
|
|
|
|
|
|
|
|
|
|
10251 |
|
10252 |
+
var colorNamesRegex = new RegExp("(" + Object.keys(colors).join('|') + ")", 'g');
|
10253 |
+
/**
|
10254 |
+
* Supports string shapes by extracting numbers so new values can be computed,
|
10255 |
+
* and recombines those values into new strings of the same shape. Supports
|
10256 |
+
* things like:
|
10257 |
+
*
|
10258 |
+
* rgba(123, 42, 99, 0.36) // colors
|
10259 |
+
* -45deg // values with units
|
10260 |
+
* 0 2px 2px 0px rgba(0, 0, 0, 0.12) // box shadows
|
10261 |
+
*/
|
10262 |
|
10263 |
+
var createStringInterpolator = function createStringInterpolator(config) {
|
10264 |
+
// Replace colors with rgba
|
10265 |
+
var outputRange = config.output.map(function (rangeValue) {
|
10266 |
+
return rangeValue.replace(colorRegex, colorToRgba);
|
10267 |
+
}).map(function (rangeValue) {
|
10268 |
+
return rangeValue.replace(colorNamesRegex, colorToRgba);
|
10269 |
+
});
|
10270 |
+
var outputRanges = outputRange[0].match(stringShapeRegex).map(function () {
|
10271 |
+
return [];
|
10272 |
+
});
|
10273 |
+
outputRange.forEach(function (value) {
|
10274 |
+
value.match(stringShapeRegex).forEach(function (number, i) {
|
10275 |
+
return outputRanges[i].push(+number);
|
10276 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10277 |
});
|
10278 |
+
var interpolations = outputRange[0].match(stringShapeRegex).map(function (_value, i) {
|
10279 |
+
return createInterpolator(_extends({}, config, {
|
10280 |
+
output: outputRanges[i]
|
10281 |
+
}));
|
10282 |
+
});
|
10283 |
+
return function (input) {
|
10284 |
+
var i = 0;
|
10285 |
+
return outputRange[0] // 'rgba(0, 100, 200, 0)'
|
10286 |
+
// ->
|
10287 |
+
// 'rgba(${interpolations[0](input)}, ${interpolations[1](input)}, ...'
|
10288 |
+
.replace(stringShapeRegex, function () {
|
10289 |
+
return interpolations[i++](input);
|
10290 |
+
}) // rgba requires that the r,g,b are integers.... so we want to round them, but we *dont* want to
|
10291 |
+
// round the opacity (4th column).
|
10292 |
+
.replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi, function (_, p1, p2, p3, p4) {
|
10293 |
+
return "rgba(" + Math.round(p1) + ", " + Math.round(p2) + ", " + Math.round(p3) + ", " + p4 + ")";
|
10294 |
+
});
|
10295 |
+
};
|
10296 |
};
|
|
|
|
|
|
|
10297 |
|
10298 |
+
var isUnitlessNumber = {
|
10299 |
+
animationIterationCount: true,
|
10300 |
+
borderImageOutset: true,
|
10301 |
+
borderImageSlice: true,
|
10302 |
+
borderImageWidth: true,
|
10303 |
+
boxFlex: true,
|
10304 |
+
boxFlexGroup: true,
|
10305 |
+
boxOrdinalGroup: true,
|
10306 |
+
columnCount: true,
|
10307 |
+
columns: true,
|
10308 |
+
flex: true,
|
10309 |
+
flexGrow: true,
|
10310 |
+
flexPositive: true,
|
10311 |
+
flexShrink: true,
|
10312 |
+
flexNegative: true,
|
10313 |
+
flexOrder: true,
|
10314 |
+
gridRow: true,
|
10315 |
+
gridRowEnd: true,
|
10316 |
+
gridRowSpan: true,
|
10317 |
+
gridRowStart: true,
|
10318 |
+
gridColumn: true,
|
10319 |
+
gridColumnEnd: true,
|
10320 |
+
gridColumnSpan: true,
|
10321 |
+
gridColumnStart: true,
|
10322 |
+
fontWeight: true,
|
10323 |
+
lineClamp: true,
|
10324 |
+
lineHeight: true,
|
10325 |
+
opacity: true,
|
10326 |
+
order: true,
|
10327 |
+
orphans: true,
|
10328 |
+
tabSize: true,
|
10329 |
+
widows: true,
|
10330 |
+
zIndex: true,
|
10331 |
+
zoom: true,
|
10332 |
+
// SVG-related properties
|
10333 |
+
fillOpacity: true,
|
10334 |
+
floodOpacity: true,
|
10335 |
+
stopOpacity: true,
|
10336 |
+
strokeDasharray: true,
|
10337 |
+
strokeDashoffset: true,
|
10338 |
+
strokeMiterlimit: true,
|
10339 |
+
strokeOpacity: true,
|
10340 |
+
strokeWidth: true
|
10341 |
+
};
|
10342 |
|
10343 |
+
var prefixKey = function prefixKey(prefix, key) {
|
10344 |
+
return prefix + key.charAt(0).toUpperCase() + key.substring(1);
|
10345 |
+
};
|
10346 |
|
10347 |
+
var prefixes = ['Webkit', 'Ms', 'Moz', 'O'];
|
10348 |
+
isUnitlessNumber = Object.keys(isUnitlessNumber).reduce(function (acc, prop) {
|
10349 |
+
prefixes.forEach(function (prefix) {
|
10350 |
+
return acc[prefixKey(prefix, prop)] = acc[prop];
|
10351 |
+
});
|
10352 |
+
return acc;
|
10353 |
+
}, isUnitlessNumber);
|
10354 |
|
10355 |
+
function dangerousStyleValue(name, value, isCustomProperty) {
|
10356 |
+
if (value == null || typeof value === 'boolean' || value === '') return '';
|
10357 |
+
if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
|
10358 |
|
10359 |
+
return ('' + value).trim();
|
10360 |
+
}
|
10361 |
|
10362 |
+
var attributeCache = {};
|
10363 |
+
injectCreateAnimatedStyle(function (style) {
|
10364 |
+
return new AnimatedStyle(style);
|
10365 |
+
});
|
10366 |
+
injectDefaultElement('div');
|
10367 |
+
injectStringInterpolator(createStringInterpolator);
|
10368 |
+
injectColorNames(colors);
|
10369 |
+
injectApplyAnimatedValues(function (instance, props) {
|
10370 |
+
if (instance.nodeType && instance.setAttribute !== undefined) {
|
10371 |
+
var style = props.style,
|
10372 |
+
children = props.children,
|
10373 |
+
scrollTop = props.scrollTop,
|
10374 |
+
scrollLeft = props.scrollLeft,
|
10375 |
+
attributes = _objectWithoutPropertiesLoose(props, ["style", "children", "scrollTop", "scrollLeft"]);
|
10376 |
|
10377 |
+
var filter = instance.nodeName === 'filter' || instance.parentNode && instance.parentNode.nodeName === 'filter';
|
10378 |
+
if (scrollTop !== void 0) instance.scrollTop = scrollTop;
|
10379 |
+
if (scrollLeft !== void 0) instance.scrollLeft = scrollLeft; // Set textContent, if children is an animatable value
|
10380 |
|
10381 |
+
if (children !== void 0) instance.textContent = children; // Set styles ...
|
10382 |
|
10383 |
+
for (var styleName in style) {
|
10384 |
+
if (!style.hasOwnProperty(styleName)) continue;
|
10385 |
+
var isCustomProperty = styleName.indexOf('--') === 0;
|
10386 |
+
var styleValue = dangerousStyleValue(styleName, style[styleName], isCustomProperty);
|
10387 |
+
if (styleName === 'float') styleName = 'cssFloat';
|
10388 |
+
if (isCustomProperty) instance.style.setProperty(styleName, styleValue);else instance.style[styleName] = styleValue;
|
10389 |
+
} // Set attributes ...
|
10390 |
|
10391 |
|
10392 |
+
for (var name in attributes) {
|
10393 |
+
// Attributes are written in dash case
|
10394 |
+
var dashCase = filter ? name : attributeCache[name] || (attributeCache[name] = name.replace(/([A-Z])/g, function (n) {
|
10395 |
+
return '-' + n.toLowerCase();
|
10396 |
+
}));
|
10397 |
+
if (typeof instance.getAttribute(dashCase) !== 'undefined') instance.setAttribute(dashCase, attributes[name]);
|
10398 |
+
}
|
10399 |
|
10400 |
+
return;
|
10401 |
+
} else return false;
|
10402 |
+
}, function (style) {
|
10403 |
+
return style;
|
10404 |
+
});
|
10405 |
|
10406 |
+
var domElements = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', // SVG
|
10407 |
+
'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];
|
10408 |
+
// Extend animated with all the available THREE elements
|
10409 |
+
var apply = merge(createAnimatedComponent, false);
|
10410 |
+
var extendedAnimated = apply(domElements);
|
10411 |
|
10412 |
+
exports.apply = apply;
|
10413 |
+
exports.config = config;
|
10414 |
+
exports.update = update;
|
10415 |
+
exports.animated = extendedAnimated;
|
10416 |
+
exports.a = extendedAnimated;
|
10417 |
+
exports.interpolate = interpolate$1;
|
10418 |
+
exports.Globals = Globals;
|
10419 |
+
exports.useSpring = useSpring;
|
10420 |
+
exports.useTrail = useTrail;
|
10421 |
+
exports.useTransition = useTransition;
|
10422 |
+
exports.useChain = useChain;
|
10423 |
+
exports.useSprings = useSprings;
|
10424 |
|
10425 |
|
10426 |
+
/***/ }),
|
10427 |
|
10428 |
+
/***/ 258:
|
10429 |
+
/***/ (function(module, exports, __webpack_require__) {
|
10430 |
|
10431 |
+
var isarray = __webpack_require__(440)
|
10432 |
|
10433 |
+
/**
|
10434 |
+
* Expose `pathToRegexp`.
|
10435 |
+
*/
|
10436 |
+
module.exports = pathToRegexp
|
10437 |
+
module.exports.parse = parse
|
10438 |
+
module.exports.compile = compile
|
10439 |
+
module.exports.tokensToFunction = tokensToFunction
|
10440 |
+
module.exports.tokensToRegExp = tokensToRegExp
|
10441 |
|
10442 |
+
/**
|
10443 |
+
* The main path matching regexp utility.
|
10444 |
+
*
|
10445 |
+
* @type {RegExp}
|
10446 |
+
*/
|
10447 |
+
var PATH_REGEXP = new RegExp([
|
10448 |
+
// Match escaped characters that would otherwise appear in future matches.
|
10449 |
+
// This allows the user to escape special characters that won't transform.
|
10450 |
+
'(\\\\.)',
|
10451 |
+
// Match Express-style parameters and un-named parameters with a prefix
|
10452 |
+
// and optional suffixes. Matches appear as:
|
10453 |
+
//
|
10454 |
+
// "/:test(\\d+)?" => ["/", "test", "\d+", undefined, "?", undefined]
|
10455 |
+
// "/route(\\d+)" => [undefined, undefined, undefined, "\d+", undefined, undefined]
|
10456 |
+
// "/*" => ["/", undefined, undefined, undefined, undefined, "*"]
|
10457 |
+
'([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))'
|
10458 |
+
].join('|'), 'g')
|
10459 |
|
10460 |
/**
|
10461 |
+
* Parse a string for the raw tokens.
|
10462 |
+
*
|
10463 |
+
* @param {string} str
|
10464 |
+
* @param {Object=} options
|
10465 |
+
* @return {!Array}
|
10466 |
*/
|
10467 |
+
function parse (str, options) {
|
10468 |
+
var tokens = []
|
10469 |
+
var key = 0
|
10470 |
+
var index = 0
|
10471 |
+
var path = ''
|
10472 |
+
var defaultDelimiter = options && options.delimiter || '/'
|
10473 |
+
var res
|
10474 |
|
10475 |
+
while ((res = PATH_REGEXP.exec(str)) != null) {
|
10476 |
+
var m = res[0]
|
10477 |
+
var escaped = res[1]
|
10478 |
+
var offset = res.index
|
10479 |
+
path += str.slice(index, offset)
|
10480 |
+
index = offset + m.length
|
10481 |
|
10482 |
+
// Ignore already escaped sequences.
|
10483 |
+
if (escaped) {
|
10484 |
+
path += escaped[1]
|
10485 |
+
continue
|
10486 |
+
}
|
10487 |
|
10488 |
+
var next = str[index]
|
10489 |
+
var prefix = res[2]
|
10490 |
+
var name = res[3]
|
10491 |
+
var capture = res[4]
|
10492 |
+
var group = res[5]
|
10493 |
+
var modifier = res[6]
|
10494 |
+
var asterisk = res[7]
|
10495 |
|
10496 |
+
// Push the current path onto the tokens.
|
10497 |
+
if (path) {
|
10498 |
+
tokens.push(path)
|
10499 |
+
path = ''
|
10500 |
+
}
|
10501 |
|
10502 |
+
var partial = prefix != null && next != null && next !== prefix
|
10503 |
+
var repeat = modifier === '+' || modifier === '*'
|
10504 |
+
var optional = modifier === '?' || modifier === '*'
|
10505 |
+
var delimiter = res[2] || defaultDelimiter
|
10506 |
+
var pattern = capture || group
|
10507 |
|
10508 |
+
tokens.push({
|
10509 |
+
name: name || key++,
|
10510 |
+
prefix: prefix || '',
|
10511 |
+
delimiter: delimiter,
|
10512 |
+
optional: optional,
|
10513 |
+
repeat: repeat,
|
10514 |
+
partial: partial,
|
10515 |
+
asterisk: !!asterisk,
|
10516 |
+
pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?')
|
10517 |
+
})
|
10518 |
+
}
|
10519 |
|
10520 |
+
// Match any characters still remaining.
|
10521 |
+
if (index < str.length) {
|
10522 |
+
path += str.substr(index)
|
10523 |
+
}
|
10524 |
|
10525 |
+
// If the path exists, push it onto the end.
|
10526 |
+
if (path) {
|
10527 |
+
tokens.push(path)
|
10528 |
+
}
|
10529 |
|
10530 |
+
return tokens
|
10531 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10532 |
|
10533 |
+
/**
|
10534 |
+
* Compile a string to a template function for the path.
|
10535 |
+
*
|
10536 |
+
* @param {string} str
|
10537 |
+
* @param {Object=} options
|
10538 |
+
* @return {!function(Object=, Object=)}
|
10539 |
+
*/
|
10540 |
+
function compile (str, options) {
|
10541 |
+
return tokensToFunction(parse(str, options), options)
|
10542 |
+
}
|
|
|
|
|
|
|
10543 |
|
10544 |
+
/**
|
10545 |
+
* Prettier encoding of URI path segments.
|
10546 |
+
*
|
10547 |
+
* @param {string}
|
10548 |
+
* @return {string}
|
10549 |
+
*/
|
10550 |
+
function encodeURIComponentPretty (str) {
|
10551 |
+
return encodeURI(str).replace(/[\/?#]/g, function (c) {
|
10552 |
+
return '%' + c.charCodeAt(0).toString(16).toUpperCase()
|
10553 |
+
})
|
10554 |
+
}
|
10555 |
|
10556 |
+
/**
|
10557 |
+
* Encode the asterisk parameter. Similar to `pretty`, but allows slashes.
|
10558 |
+
*
|
10559 |
+
* @param {string}
|
10560 |
+
* @return {string}
|
10561 |
+
*/
|
10562 |
+
function encodeAsterisk (str) {
|
10563 |
+
return encodeURI(str).replace(/[?#]/g, function (c) {
|
10564 |
+
return '%' + c.charCodeAt(0).toString(16).toUpperCase()
|
10565 |
+
})
|
10566 |
+
}
|
10567 |
|
10568 |
+
/**
|
10569 |
+
* Expose a method for transforming tokens into the path function.
|
10570 |
+
*/
|
10571 |
+
function tokensToFunction (tokens, options) {
|
10572 |
+
// Compile all the tokens into regexps.
|
10573 |
+
var matches = new Array(tokens.length)
|
10574 |
|
10575 |
+
// Compile all the patterns before compilation.
|
10576 |
+
for (var i = 0; i < tokens.length; i++) {
|
10577 |
+
if (typeof tokens[i] === 'object') {
|
10578 |
+
matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$', flags(options))
|
10579 |
}
|
10580 |
+
}
|
10581 |
|
10582 |
+
return function (obj, opts) {
|
10583 |
+
var path = ''
|
10584 |
+
var data = obj || {}
|
10585 |
+
var options = opts || {}
|
10586 |
+
var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent
|
|
|
|
|
|
|
|
|
10587 |
|
10588 |
+
for (var i = 0; i < tokens.length; i++) {
|
10589 |
+
var token = tokens[i]
|
|
|
|
|
|
|
|
|
|
|
10590 |
|
10591 |
+
if (typeof token === 'string') {
|
10592 |
+
path += token
|
|
|
10593 |
|
10594 |
+
continue
|
10595 |
+
}
|
|
|
10596 |
|
10597 |
+
var value = data[token.name]
|
10598 |
+
var segment
|
10599 |
|
10600 |
+
if (value == null) {
|
10601 |
+
if (token.optional) {
|
10602 |
+
// Prepend partial segment prefixes.
|
10603 |
+
if (token.partial) {
|
10604 |
+
path += token.prefix
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10605 |
}
|
|
|
10606 |
|
10607 |
+
continue
|
10608 |
+
} else {
|
10609 |
+
throw new TypeError('Expected "' + token.name + '" to be defined')
|
10610 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10611 |
}
|
|
|
|
|
|
|
|
|
|
|
10612 |
|
10613 |
+
if (isarray(value)) {
|
10614 |
+
if (!token.repeat) {
|
10615 |
+
throw new TypeError('Expected "' + token.name + '" to not repeat, but received `' + JSON.stringify(value) + '`')
|
10616 |
+
}
|
10617 |
|
10618 |
+
if (value.length === 0) {
|
10619 |
+
if (token.optional) {
|
10620 |
+
continue
|
10621 |
+
} else {
|
10622 |
+
throw new TypeError('Expected "' + token.name + '" to not be empty')
|
10623 |
+
}
|
10624 |
+
}
|
10625 |
|
10626 |
+
for (var j = 0; j < value.length; j++) {
|
10627 |
+
segment = encode(value[j])
|
|
|
|
|
10628 |
|
10629 |
+
if (!matches[i].test(segment)) {
|
10630 |
+
throw new TypeError('Expected all "' + token.name + '" to match "' + token.pattern + '", but received `' + JSON.stringify(segment) + '`')
|
10631 |
+
}
|
|
|
10632 |
|
10633 |
+
path += (j === 0 ? token.prefix : token.delimiter) + segment
|
10634 |
+
}
|
|
|
|
|
|
|
|
|
|
|
10635 |
|
10636 |
+
continue
|
10637 |
+
}
|
10638 |
|
10639 |
+
segment = token.asterisk ? encodeAsterisk(value) : encode(value)
|
|
|
|
|
|
|
|
|
|
|
10640 |
|
10641 |
+
if (!matches[i].test(segment)) {
|
10642 |
+
throw new TypeError('Expected "' + token.name + '" to match "' + token.pattern + '", but received "' + segment + '"')
|
10643 |
+
}
|
|
|
10644 |
|
10645 |
+
path += token.prefix + segment
|
|
|
10646 |
}
|
10647 |
|
10648 |
+
return path
|
10649 |
+
}
|
10650 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10651 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10652 |
/**
|
10653 |
+
* Escape a regular expression string.
|
10654 |
+
*
|
10655 |
+
* @param {string} str
|
10656 |
+
* @return {string}
|
10657 |
*/
|
10658 |
+
function escapeString (str) {
|
10659 |
+
return str.replace(/([.+*?=^!:${}()[\]|\/\\])/g, '\\$1')
|
10660 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10661 |
|
10662 |
/**
|
10663 |
+
* Escape the capturing group by escaping special characters and meaning.
|
10664 |
+
*
|
10665 |
+
* @param {string} group
|
10666 |
+
* @return {string}
|
10667 |
*/
|
10668 |
+
function escapeGroup (group) {
|
10669 |
+
return group.replace(/([=!:$\/()])/g, '\\$1')
|
10670 |
+
}
|
10671 |
|
10672 |
/**
|
10673 |
+
* Attach the keys as a property of the regexp.
|
10674 |
+
*
|
10675 |
+
* @param {!RegExp} re
|
10676 |
+
* @param {Array} keys
|
10677 |
+
* @return {!RegExp}
|
10678 |
*/
|
10679 |
+
function attachKeys (re, keys) {
|
10680 |
+
re.keys = keys
|
10681 |
+
return re
|
10682 |
+
}
|
10683 |
|
10684 |
+
/**
|
10685 |
+
* Get the flags for a regexp from the options.
|
10686 |
+
*
|
10687 |
+
* @param {Object} options
|
10688 |
+
* @return {string}
|
10689 |
+
*/
|
10690 |
+
function flags (options) {
|
10691 |
+
return options && options.sensitive ? '' : 'i'
|
10692 |
+
}
|
10693 |
|
10694 |
+
/**
|
10695 |
+
* Pull out keys from a regexp.
|
10696 |
+
*
|
10697 |
+
* @param {!RegExp} path
|
10698 |
+
* @param {!Array} keys
|
10699 |
+
* @return {!RegExp}
|
10700 |
+
*/
|
10701 |
+
function regexpToRegexp (path, keys) {
|
10702 |
+
// Use a negative lookahead to match only capturing groups.
|
10703 |
+
var groups = path.source.match(/\((?!\?)/g)
|
10704 |
|
10705 |
+
if (groups) {
|
10706 |
+
for (var i = 0; i < groups.length; i++) {
|
10707 |
+
keys.push({
|
10708 |
+
name: i,
|
10709 |
+
prefix: null,
|
10710 |
+
delimiter: null,
|
10711 |
+
optional: false,
|
10712 |
+
repeat: false,
|
10713 |
+
partial: false,
|
10714 |
+
asterisk: false,
|
10715 |
+
pattern: null
|
10716 |
+
})
|
|
|
|
|
|
|
|
|
10717 |
}
|
10718 |
+
}
|
10719 |
|
10720 |
+
return attachKeys(path, keys)
|
10721 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10722 |
|
10723 |
+
/**
|
10724 |
+
* Transform an array into a regexp.
|
10725 |
+
*
|
10726 |
+
* @param {!Array} path
|
10727 |
+
* @param {Array} keys
|
10728 |
+
* @param {!Object} options
|
10729 |
+
* @return {!RegExp}
|
10730 |
+
*/
|
10731 |
+
function arrayToRegexp (path, keys, options) {
|
10732 |
+
var parts = []
|
10733 |
|
10734 |
+
for (var i = 0; i < path.length; i++) {
|
10735 |
+
parts.push(pathToRegexp(path[i], keys, options).source)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10736 |
}
|
10737 |
|
10738 |
+
var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options))
|
|
|
|
|
10739 |
|
10740 |
+
return attachKeys(regexp, keys)
|
10741 |
+
}
|
10742 |
|
10743 |
/**
|
10744 |
+
* Create a path regexp from string input.
|
10745 |
+
*
|
10746 |
+
* @param {string} path
|
10747 |
+
* @param {!Array} keys
|
10748 |
+
* @param {!Object} options
|
10749 |
+
* @return {!RegExp}
|
10750 |
*/
|
10751 |
+
function stringToRegexp (path, keys, options) {
|
10752 |
+
return tokensToRegExp(parse(path, options), keys, options)
|
10753 |
+
}
|
10754 |
|
10755 |
+
/**
|
10756 |
+
* Expose a function for taking tokens and returning a RegExp.
|
10757 |
+
*
|
10758 |
+
* @param {!Array} tokens
|
10759 |
+
* @param {(Array|Object)=} keys
|
10760 |
+
* @param {Object=} options
|
10761 |
+
* @return {!RegExp}
|
10762 |
+
*/
|
10763 |
+
function tokensToRegExp (tokens, keys, options) {
|
10764 |
+
if (!isarray(keys)) {
|
10765 |
+
options = /** @type {!Object} */ (keys || options)
|
10766 |
+
keys = []
|
10767 |
+
}
|
10768 |
|
10769 |
+
options = options || {}
|
|
|
|
|
10770 |
|
10771 |
+
var strict = options.strict
|
10772 |
+
var end = options.end !== false
|
10773 |
+
var route = ''
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10774 |
|
10775 |
+
// Iterate over the tokens and create our regexp string.
|
10776 |
+
for (var i = 0; i < tokens.length; i++) {
|
10777 |
+
var token = tokens[i]
|
10778 |
|
10779 |
+
if (typeof token === 'string') {
|
10780 |
+
route += escapeString(token)
|
10781 |
+
} else {
|
10782 |
+
var prefix = escapeString(token.prefix)
|
10783 |
+
var capture = '(?:' + token.pattern + ')'
|
10784 |
|
10785 |
+
keys.push(token)
|
|
|
10786 |
|
10787 |
+
if (token.repeat) {
|
10788 |
+
capture += '(?:' + prefix + capture + ')*'
|
10789 |
+
}
|
10790 |
|
10791 |
+
if (token.optional) {
|
10792 |
+
if (!token.partial) {
|
10793 |
+
capture = '(?:' + prefix + '(' + capture + '))?'
|
10794 |
+
} else {
|
10795 |
+
capture = prefix + '(' + capture + ')?'
|
10796 |
+
}
|
10797 |
+
} else {
|
10798 |
+
capture = prefix + '(' + capture + ')'
|
10799 |
+
}
|
10800 |
|
10801 |
+
route += capture
|
10802 |
+
}
|
10803 |
+
}
|
10804 |
|
10805 |
+
var delimiter = escapeString(options.delimiter || '/')
|
10806 |
+
var endsWithDelimiter = route.slice(-delimiter.length) === delimiter
|
10807 |
|
10808 |
+
// In non-strict mode we allow a slash at the end of match. If the path to
|
10809 |
+
// match already ends with a slash, we remove it for consistency. The slash
|
10810 |
+
// is valid at the end of a path match, not in the middle. This is important
|
10811 |
+
// in non-ending mode, where "/test/" shouldn't match "/test//route".
|
10812 |
+
if (!strict) {
|
10813 |
+
route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?'
|
10814 |
+
}
|
10815 |
|
10816 |
+
if (end) {
|
10817 |
+
route += '$'
|
10818 |
+
} else {
|
10819 |
+
// In non-ending mode, we need the capturing groups to match as much as
|
10820 |
+
// possible by using a positive lookahead to the end or next path segment.
|
10821 |
+
route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)'
|
10822 |
+
}
|
10823 |
|
10824 |
+
return attachKeys(new RegExp('^' + route, flags(options)), keys)
|
10825 |
+
}
|
10826 |
|
10827 |
+
/**
|
10828 |
+
* Normalize the given path string, returning a regular expression.
|
10829 |
+
*
|
10830 |
+
* An empty array can be passed in for the keys, which will hold the
|
10831 |
+
* placeholder key descriptions. For example, using `/user/:id`, `keys` will
|
10832 |
+
* contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.
|
10833 |
+
*
|
10834 |
+
* @param {(string|RegExp|Array)} path
|
10835 |
+
* @param {(Array|Object)=} keys
|
10836 |
+
* @param {Object=} options
|
10837 |
+
* @return {!RegExp}
|
10838 |
+
*/
|
10839 |
+
function pathToRegexp (path, keys, options) {
|
10840 |
+
if (!isarray(keys)) {
|
10841 |
+
options = /** @type {!Object} */ (keys || options)
|
10842 |
+
keys = []
|
10843 |
+
}
|
10844 |
|
10845 |
+
options = options || {}
|
10846 |
|
10847 |
+
if (path instanceof RegExp) {
|
10848 |
+
return regexpToRegexp(path, /** @type {!Array} */ (keys))
|
10849 |
+
}
|
10850 |
|
10851 |
+
if (isarray(path)) {
|
10852 |
+
return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)
|
10853 |
+
}
|
10854 |
|
10855 |
+
return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)
|
10856 |
+
}
|
10857 |
|
10858 |
|
10859 |
+
/***/ }),
|
10860 |
|
10861 |
+
/***/ 259:
|
10862 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
10863 |
|
10864 |
+
"use strict";
|
10865 |
+
/* WEBPACK VAR INJECTION */(function(global, module) {/* harmony import */ var _ponyfill_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(418);
|
10866 |
+
/* global window */
|
10867 |
|
10868 |
|
10869 |
+
var root;
|
10870 |
|
10871 |
+
if (typeof self !== 'undefined') {
|
10872 |
+
root = self;
|
10873 |
+
} else if (typeof window !== 'undefined') {
|
10874 |
+
root = window;
|
10875 |
+
} else if (typeof global !== 'undefined') {
|
10876 |
+
root = global;
|
10877 |
+
} else if (true) {
|
10878 |
+
root = module;
|
10879 |
+
} else {}
|
10880 |
|
10881 |
+
var result = Object(_ponyfill_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(root);
|
10882 |
+
/* harmony default export */ __webpack_exports__["a"] = (result);
|
10883 |
|
10884 |
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(64), __webpack_require__(442)(module)))
|
10885 |
|
10886 |
+
/***/ }),
|
10887 |
|
10888 |
+
/***/ 26:
|
10889 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
10890 |
|
10891 |
+
"use strict";
|
10892 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ADMIN_URL; });
|
10893 |
+
/* unused harmony export COUNTRIES */
|
10894 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return CURRENCY; });
|
10895 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return LOCALE; });
|
10896 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return ORDER_STATUSES; });
|
10897 |
+
/* unused harmony export SITE_TITLE */
|
10898 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return WC_ASSET_URL; });
|
10899 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return getSetting; });
|
10900 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return setSetting; });
|
10901 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return getAdminLink; });
|
10902 |
+
/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(43);
|
10903 |
+
/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__);
|
10904 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
|
10905 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
|
10906 |
|
10907 |
|
10908 |
/**
|
10909 |
* External dependencies
|
10910 |
*/
|
10911 |
+
// Remove mutable data from settings object to prevent access. Data stores should be used instead.
|
10912 |
|
10913 |
+
var mutableSources = ['wcAdminSettings', 'preloadSettings'];
|
10914 |
+
var settings = (typeof wcSettings === "undefined" ? "undefined" : _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(wcSettings)) === 'object' ? wcSettings : {};
|
10915 |
+
var SOURCE = Object.keys(settings).reduce(function (source, key) {
|
10916 |
+
if (!mutableSources.includes(key)) {
|
10917 |
+
source[key] = settings[key];
|
|
|
|
|
10918 |
}
|
10919 |
|
10920 |
+
return source;
|
10921 |
+
}, {});
|
10922 |
+
var ADMIN_URL = SOURCE.adminUrl;
|
10923 |
+
var COUNTRIES = SOURCE.countries;
|
10924 |
+
var CURRENCY = SOURCE.currency;
|
10925 |
+
var LOCALE = SOURCE.locale;
|
10926 |
+
var ORDER_STATUSES = SOURCE.orderStatuses;
|
10927 |
+
var SITE_TITLE = SOURCE.siteTitle;
|
10928 |
+
var WC_ASSET_URL = SOURCE.wcAssetUrl;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10929 |
/**
|
10930 |
+
* Retrieves a setting value from the setting state.
|
10931 |
+
*
|
10932 |
+
* @export
|
10933 |
+
* @param {string} name The identifier for the setting.
|
10934 |
+
* @param {*} [fallback=false] The value to use as a fallback
|
10935 |
+
* if the setting is not in the
|
10936 |
+
* state.
|
10937 |
+
* @param {Function} [filter=( val ) => val] A callback for filtering the
|
10938 |
+
* value before it's returned.
|
10939 |
+
* Receives both the found value
|
10940 |
+
* (if it exists for the key) and
|
10941 |
+
* the provided fallback arg.
|
10942 |
*
|
10943 |
+
* @return {*} The value present in the settings state for the given
|
10944 |
+
* name.
|
10945 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10946 |
|
10947 |
+
function getSetting(name) {
|
10948 |
+
var fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
10949 |
+
var filter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function (val) {
|
10950 |
+
return val;
|
10951 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
10952 |
|
10953 |
+
if (mutableSources.includes(name)) {
|
10954 |
+
throw new Error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Mutable settings should be accessed via data store.'));
|
10955 |
}
|
10956 |
|
10957 |
+
var value = SOURCE.hasOwnProperty(name) ? SOURCE[name] : fallback;
|
10958 |
+
return filter(value, fallback);
|
10959 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
10960 |
/**
|
10961 |
+
* Sets a value to a property on the settings state.
|
10962 |
*
|
10963 |
+
* NOTE: This feature is to be removed in favour of data stores when a full migration
|
10964 |
+
* is complete.
|
10965 |
+
*
|
10966 |
+
* @deprecated
|
10967 |
+
*
|
10968 |
+
* @export
|
10969 |
+
* @param {string} name The setting property key for the
|
10970 |
+
* setting being mutated.
|
10971 |
+
* @param {*} value The value to set.
|
10972 |
+
* @param {Function} [filter=( val ) => val] Allows for providing a callback
|
10973 |
+
* to sanitize the setting (eg.
|
10974 |
+
* ensure it's a number)
|
|
|
|
|
|
|
|
|
|
|
|
|
10975 |
*/
|
10976 |
|
10977 |
+
function setSetting(name, value) {
|
10978 |
+
var filter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function (val) {
|
10979 |
+
return val;
|
10980 |
+
};
|
10981 |
|
10982 |
+
if (mutableSources.includes(name)) {
|
10983 |
+
throw new Error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Mutable settings should be mutated via data store.'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10984 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10985 |
|
10986 |
+
SOURCE[name] = filter(value);
|
10987 |
+
}
|
|
|
10988 |
/**
|
10989 |
+
* Returns a string with the site's wp-admin URL appended. JS version of `admin_url`.
|
10990 |
*
|
10991 |
+
* @param {string} path Relative path.
|
10992 |
+
* @return {string} Full admin URL.
|
|
|
10993 |
*/
|
10994 |
|
10995 |
+
function getAdminLink(path) {
|
10996 |
+
return (ADMIN_URL || '') + path;
|
10997 |
+
}
|
10998 |
|
10999 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11000 |
|
11001 |
+
/***/ 261:
|
11002 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
11003 |
|
11004 |
+
"use strict";
|
11005 |
+
/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(41);
|
11006 |
+
/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);
|
11007 |
+
/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(40);
|
11008 |
+
/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);
|
11009 |
+
/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(44);
|
11010 |
+
/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__);
|
11011 |
+
/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(29);
|
11012 |
+
/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__);
|
11013 |
+
/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(42);
|
11014 |
+
/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__);
|
11015 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(0);
|
11016 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__);
|
11017 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(3);
|
11018 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__);
|
11019 |
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(1);
|
11020 |
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_7__);
|
11021 |
+
/* harmony import */ var _woocommerce_components__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(63);
|
11022 |
+
/* harmony import */ var _woocommerce_components__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_components__WEBPACK_IMPORTED_MODULE_8__);
|
11023 |
+
/* harmony import */ var _woocommerce_wc_admin_settings__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(26);
|
11024 |
|
11025 |
|
|
|
|
|
|
|
11026 |
|
11027 |
|
|
|
|
|
|
|
11028 |
|
|
|
11029 |
|
|
|
|
|
|
|
11030 |
|
11031 |
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default()(this, result); }; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11032 |
|
11033 |
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
11034 |
|
11035 |
/**
|
11036 |
+
* External dependencies
|
11037 |
*/
|
11038 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11039 |
|
11040 |
|
11041 |
/**
|
11042 |
+
* WooCommerce dependencies
|
11043 |
*/
|
11044 |
|
11045 |
|
11046 |
|
|
|
|
|
|
|
|
|
|
|
|
|
11047 |
/**
|
11048 |
+
* Component to render when there is an error in a report component due to data
|
11049 |
+
* not being loaded or being invalid.
|
11050 |
*/
|
11051 |
|
11052 |
+
var ReportError = /*#__PURE__*/function (_Component) {
|
11053 |
+
_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(ReportError, _Component);
|
11054 |
|
11055 |
+
var _super = _createSuper(ReportError);
|
11056 |
|
11057 |
+
function ReportError() {
|
11058 |
+
_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, ReportError);
|
11059 |
|
11060 |
+
return _super.apply(this, arguments);
|
11061 |
+
}
|
|
|
|
|
11062 |
|
11063 |
+
_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(ReportError, [{
|
11064 |
+
key: "render",
|
11065 |
+
value: function render() {
|
11066 |
+
var _this$props = this.props,
|
11067 |
+
className = _this$props.className,
|
11068 |
+
isError = _this$props.isError,
|
11069 |
+
isEmpty = _this$props.isEmpty;
|
11070 |
+
var title, actionLabel, actionURL, actionCallback;
|
11071 |
+
|
11072 |
+
if (isError) {
|
11073 |
+
title = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__["__"])('There was an error getting your stats. Please try again.', 'woocommerce-admin');
|
11074 |
+
actionLabel = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__["__"])('Reload', 'woocommerce-admin');
|
11075 |
+
|
11076 |
+
actionCallback = function actionCallback() {
|
11077 |
+
// @todo Add tracking for how often an error is displayed, and the reload action is clicked.
|
11078 |
+
window.location.reload();
|
11079 |
+
};
|
11080 |
+
} else if (isEmpty) {
|
11081 |
+
title = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__["__"])('No results could be found for this date range.', 'woocommerce-admin');
|
11082 |
+
actionLabel = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__["__"])('View Orders', 'woocommerce-admin');
|
11083 |
+
actionURL = Object(_woocommerce_wc_admin_settings__WEBPACK_IMPORTED_MODULE_9__[/* getAdminLink */ "f"])('edit.php?post_type=shop_order');
|
11084 |
+
}
|
11085 |
|
11086 |
+
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])(_woocommerce_components__WEBPACK_IMPORTED_MODULE_8__["EmptyContent"], {
|
11087 |
+
className: className,
|
11088 |
+
title: title,
|
11089 |
+
actionLabel: actionLabel,
|
11090 |
+
actionURL: actionURL,
|
11091 |
+
actionCallback: actionCallback
|
11092 |
+
});
|
11093 |
+
}
|
11094 |
+
}]);
|
11095 |
|
11096 |
+
return ReportError;
|
11097 |
+
}(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["Component"]);
|
|
|
|
|
|
|
11098 |
|
11099 |
+
ReportError.propTypes = {
|
11100 |
+
/**
|
11101 |
+
* Additional class name to style the component.
|
11102 |
+
*/
|
11103 |
+
className: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.string,
|
11104 |
|
11105 |
+
/**
|
11106 |
+
* Boolean representing whether there was an error.
|
11107 |
+
*/
|
11108 |
+
isError: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool,
|
|
|
|
|
|
|
11109 |
|
11110 |
+
/**
|
11111 |
+
* Boolean representing whether the issue is that there is no data.
|
11112 |
+
*/
|
11113 |
+
isEmpty: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool
|
11114 |
+
};
|
11115 |
+
ReportError.defaultProps = {
|
11116 |
+
className: ''
|
11117 |
+
};
|
11118 |
+
/* harmony default export */ __webpack_exports__["a"] = (ReportError);
|
11119 |
|
11120 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
11121 |
|
11122 |
+
/***/ 263:
|
11123 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11124 |
|
11125 |
+
"use strict";
|
|
|
|
|
|
|
|
|
|
|
11126 |
|
11127 |
+
// EXPORTS
|
11128 |
+
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ DEFAULT_ACTIONABLE_STATUSES; });
|
11129 |
+
__webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ config; });
|
|
|
|
|
|
|
|
|
|
|
11130 |
|
11131 |
+
// UNUSED EXPORTS: DEFAULT_ORDER_STATUSES, DEFAULT_DATE_RANGE
|
|
|
|
|
11132 |
|
11133 |
+
// EXTERNAL MODULE: external {"this":["wp","element"]}
|
11134 |
+
var external_this_wp_element_ = __webpack_require__(0);
|
11135 |
|
11136 |
+
// EXTERNAL MODULE: external {"this":["wp","i18n"]}
|
11137 |
+
var external_this_wp_i18n_ = __webpack_require__(3);
|
|
|
|
|
|
|
|
|
|
|
|
|
11138 |
|
11139 |
+
// EXTERNAL MODULE: external {"this":["wp","hooks"]}
|
11140 |
+
var external_this_wp_hooks_ = __webpack_require__(48);
|
|
|
|
|
|
|
|
|
|
|
|
|
11141 |
|
11142 |
+
// EXTERNAL MODULE: ./node_modules/interpolate-components/lib/index.js
|
11143 |
+
var lib = __webpack_require__(35);
|
11144 |
+
var lib_default = /*#__PURE__*/__webpack_require__.n(lib);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11145 |
|
11146 |
+
// EXTERNAL MODULE: ./client/settings/index.js
|
11147 |
+
var settings = __webpack_require__(26);
|
11148 |
+
|
11149 |
+
// EXTERNAL MODULE: ./node_modules/qs/lib/index.js
|
11150 |
+
var qs_lib = __webpack_require__(58);
|
11151 |
|
11152 |
+
// EXTERNAL MODULE: ./client/lib/date.js
|
11153 |
+
var date = __webpack_require__(104);
|
11154 |
|
11155 |
+
// EXTERNAL MODULE: external {"this":["wc","components"]}
|
11156 |
+
var external_this_wc_components_ = __webpack_require__(63);
|
11157 |
|
11158 |
+
// EXTERNAL MODULE: external {"this":["wc","data"]}
|
11159 |
+
var external_this_wc_data_ = __webpack_require__(51);
|
11160 |
|
11161 |
+
// CONCATENATED MODULE: ./client/analytics/settings/default-date.js
|
11162 |
|
11163 |
|
11164 |
/**
|
11165 |
* External dependencies
|
11166 |
*/
|
11167 |
|
11168 |
+
/**
|
11169 |
+
* Internal dependencies
|
11170 |
+
*/
|
11171 |
|
11172 |
|
11173 |
/**
|
11174 |
+
* WooCommerce dependencies
|
11175 |
*/
|
11176 |
|
11177 |
|
|
|
|
|
11178 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11179 |
|
11180 |
+
var default_date_DefaultDate = function DefaultDate(_ref) {
|
11181 |
+
var value = _ref.value,
|
11182 |
+
onChange = _ref.onChange;
|
11183 |
|
11184 |
+
var _useSettings = Object(external_this_wc_data_["useSettings"])('wc_admin', ['wcAdminSettings']),
|
11185 |
+
wcAdminSettings = _useSettings.wcAdminSettings;
|
11186 |
|
11187 |
+
var defaultDateRange = wcAdminSettings.woocommerce_default_date_range;
|
11188 |
+
|
11189 |
+
var change = function change(query) {
|
11190 |
+
onChange({
|
11191 |
+
target: {
|
11192 |
+
name: 'woocommerce_default_date_range',
|
11193 |
+
value: Object(qs_lib["stringify"])(query)
|
11194 |
+
}
|
11195 |
});
|
11196 |
};
|
11197 |
|
11198 |
+
var query = Object(qs_lib["parse"])(value.replace(/&/g, '&'));
|
11199 |
+
|
11200 |
+
var _getDateParamsFromQue = Object(date["h" /* getDateParamsFromQuery */])(query, defaultDateRange),
|
11201 |
+
period = _getDateParamsFromQue.period,
|
11202 |
+
compare = _getDateParamsFromQue.compare,
|
11203 |
+
before = _getDateParamsFromQue.before,
|
11204 |
+
after = _getDateParamsFromQue.after;
|
11205 |
+
|
11206 |
+
var _getCurrentDates = Object(date["f" /* getCurrentDates */])(query, defaultDateRange),
|
11207 |
+
primaryDate = _getCurrentDates.primary,
|
11208 |
+
secondaryDate = _getCurrentDates.secondary;
|
11209 |
+
|
11210 |
+
var dateQuery = {
|
11211 |
+
period: period,
|
11212 |
+
compare: compare,
|
11213 |
+
before: before,
|
11214 |
+
after: after,
|
11215 |
+
primaryDate: primaryDate,
|
11216 |
+
secondaryDate: secondaryDate
|
11217 |
+
};
|
11218 |
+
return Object(external_this_wp_element_["createElement"])(external_this_wc_components_["DateRangeFilterPicker"], {
|
11219 |
+
query: query,
|
11220 |
+
onRangeSelect: change,
|
11221 |
+
dateQuery: dateQuery,
|
11222 |
+
isoDateFormat: date["k" /* isoDateFormat */]
|
11223 |
});
|
11224 |
};
|
|
|
|
|
11225 |
|
11226 |
+
/* harmony default export */ var default_date = (default_date_DefaultDate);
|
11227 |
+
// CONCATENATED MODULE: ./client/analytics/settings/config.js
|
11228 |
|
11229 |
|
11230 |
/**
|
11233 |
|
11234 |
|
11235 |
|
11236 |
+
|
11237 |
/**
|
11238 |
* Internal dependencies
|
11239 |
*/
|
11240 |
|
11241 |
|
11242 |
+
var SETTINGS_FILTER = 'woocommerce_admin_analytics_settings';
|
11243 |
+
var DEFAULT_ACTIONABLE_STATUSES = ['processing', 'on-hold'];
|
11244 |
+
var DEFAULT_ORDER_STATUSES = ['completed', 'processing', 'refunded', 'cancelled', 'failed', 'pending', 'on-hold'];
|
11245 |
+
var DEFAULT_DATE_RANGE = 'period=month&compare=previous_year';
|
11246 |
+
var filteredOrderStatuses = Object.keys(settings["d" /* ORDER_STATUSES */]).filter(function (status) {
|
11247 |
+
return status !== 'refunded';
|
11248 |
+
}).map(function (key) {
|
11249 |
+
return {
|
11250 |
+
value: key,
|
11251 |
+
label: settings["d" /* ORDER_STATUSES */][key],
|
11252 |
+
description: Object(external_this_wp_i18n_["sprintf"])(Object(external_this_wp_i18n_["__"])('Exclude the %s status from reports', 'woocommerce-admin'), settings["d" /* ORDER_STATUSES */][key])
|
11253 |
+
};
|
11254 |
+
});
|
11255 |
+
var unregisteredOrderStatuses = Object(settings["g" /* getSetting */])('unregisteredOrderStatuses', {});
|
11256 |
+
var orderStatusOptions = [{
|
11257 |
+
key: 'defaultStatuses',
|
11258 |
+
options: filteredOrderStatuses.filter(function (status) {
|
11259 |
+
return DEFAULT_ORDER_STATUSES.includes(status.value);
|
11260 |
+
})
|
11261 |
+
}, {
|
11262 |
+
key: 'customStatuses',
|
11263 |
+
label: Object(external_this_wp_i18n_["__"])('Custom Statuses', 'woocommerce-admin'),
|
11264 |
+
options: filteredOrderStatuses.filter(function (status) {
|
11265 |
+
return !DEFAULT_ORDER_STATUSES.includes(status.value);
|
11266 |
+
})
|
11267 |
+
}, {
|
11268 |
+
key: 'unregisteredStatuses',
|
11269 |
+
label: Object(external_this_wp_i18n_["__"])('Unregistered Statuses', 'woocommerce-admin'),
|
11270 |
+
options: Object.keys(unregisteredOrderStatuses).map(function (key) {
|
11271 |
return {
|
11272 |
+
value: key,
|
11273 |
+
label: key,
|
11274 |
+
description: Object(external_this_wp_i18n_["sprintf"])(Object(external_this_wp_i18n_["__"])('Exclude the %s status from reports', 'woocommerce-admin'), key)
|
11275 |
};
|
11276 |
+
})
|
11277 |
+
}];
|
11278 |
+
var config = Object(external_this_wp_hooks_["applyFilters"])(SETTINGS_FILTER, {
|
11279 |
+
woocommerce_excluded_report_order_statuses: {
|
11280 |
+
label: Object(external_this_wp_i18n_["__"])('Excluded Statuses:', 'woocommerce-admin'),
|
11281 |
+
inputType: 'checkboxGroup',
|
11282 |
+
options: orderStatusOptions,
|
11283 |
+
helpText: lib_default()({
|
11284 |
+
mixedString: Object(external_this_wp_i18n_["__"])('Orders with these statuses are excluded from the totals in your reports. ' + 'The {{strong}}Refunded{{/strong}} status can not be excluded.', 'woocommerce-admin'),
|
11285 |
+
components: {
|
11286 |
+
strong: Object(external_this_wp_element_["createElement"])("strong", null)
|
11287 |
+
}
|
11288 |
+
}),
|
11289 |
+
defaultValue: ['pending', 'cancelled', 'failed']
|
11290 |
+
},
|
11291 |
+
woocommerce_actionable_order_statuses: {
|
11292 |
+
label: Object(external_this_wp_i18n_["__"])('Actionable Statuses:', 'woocommerce-admin'),
|
11293 |
+
inputType: 'checkboxGroup',
|
11294 |
+
options: orderStatusOptions,
|
11295 |
+
helpText: Object(external_this_wp_i18n_["__"])('Orders with these statuses require action on behalf of the store admin.' + 'These orders will show up in the Orders tab under the activity panel.', 'woocommerce-admin'),
|
11296 |
+
defaultValue: DEFAULT_ACTIONABLE_STATUSES
|
11297 |
+
},
|
11298 |
+
woocommerce_default_date_range: {
|
11299 |
+
name: 'woocommerce_default_date_range',
|
11300 |
+
label: Object(external_this_wp_i18n_["__"])('Default Date Range:', 'woocommerce-admin'),
|
11301 |
+
inputType: 'component',
|
11302 |
+
component: default_date,
|
11303 |
+
helpText: Object(external_this_wp_i18n_["__"])('Select a default date range. When no range is selected, reports will be viewed by ' + 'the default date range.', 'woocommerce-admin'),
|
11304 |
+
defaultValue: DEFAULT_DATE_RANGE
|
11305 |
}
|
11306 |
+
});
|
11307 |
|
11308 |
+
/***/ }),
|
|
|
|
|
11309 |
|
11310 |
+
/***/ 266:
|
11311 |
+
/***/ (function(module, exports) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11312 |
|
11313 |
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
11314 |
+
if (source == null) return {};
|
11315 |
+
var target = {};
|
11316 |
+
var sourceKeys = Object.keys(source);
|
11317 |
+
var key, i;
|
11318 |
+
|
11319 |
+
for (i = 0; i < sourceKeys.length; i++) {
|
11320 |
+
key = sourceKeys[i];
|
11321 |
+
if (excluded.indexOf(key) >= 0) continue;
|
11322 |
+
target[key] = source[key];
|
11323 |
+
}
|
11324 |
|
11325 |
+
return target;
|
11326 |
+
}
|
11327 |
|
11328 |
+
module.exports = _objectWithoutPropertiesLoose;
|
|
|
|
|
11329 |
|
11330 |
+
/***/ }),
|
11331 |
|
11332 |
+
/***/ 267:
|
11333 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
11334 |
|
11335 |
+
"use strict";
|
11336 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getLeaderboard; });
|
11337 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return searchItemsByString; });
|
11338 |
+
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15);
|
11339 |
+
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
|
11340 |
+
/* harmony import */ var lib_date__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(104);
|
11341 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11342 |
|
11343 |
+
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; }
|
|
|
|
|
|
|
|
|
|
|
11344 |
|
11345 |
+
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) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___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; }
|
11346 |
|
11347 |
/**
|
11348 |
* External dependencies
|
11349 |
*/
|
11350 |
|
11351 |
+
/**
|
11352 |
+
* WooCommerce dependencies
|
11353 |
+
*/
|
11354 |
|
11355 |
+
/**
|
11356 |
+
* Returns leaderboard data to render a leaderboard table.
|
11357 |
+
*
|
11358 |
+
* @param {Object} options arguments
|
11359 |
+
* @param {string} options.id Leaderboard ID
|
11360 |
+
* @param {number} options.per_page Per page limit
|
11361 |
+
* @param {Object} options.persisted_query Persisted query passed to endpoint
|
11362 |
+
* @param {Object} options.query Query parameters in the url
|
11363 |
+
* @param {Object} options.select Instance of @wordpress/select
|
11364 |
+
* @param {string} options.defaultDateRange User specified default date range.
|
11365 |
+
* @return {Object} Object containing leaderboard responses.
|
11366 |
+
*/
|
11367 |
|
11368 |
+
function getLeaderboard(options) {
|
11369 |
+
var endpoint = 'leaderboards';
|
11370 |
+
var perPage = options.per_page,
|
11371 |
+
persistedQuery = options.persisted_query,
|
11372 |
+
query = options.query,
|
11373 |
+
select = options.select;
|
11374 |
+
|
11375 |
+
var _select = select('wc-api'),
|
11376 |
+
getItems = _select.getItems,
|
11377 |
+
getItemsError = _select.getItemsError,
|
11378 |
+
isGetItemsRequesting = _select.isGetItemsRequesting;
|
11379 |
+
|
11380 |
+
var response = {
|
11381 |
+
isRequesting: false,
|
11382 |
+
isError: false,
|
11383 |
+
rows: []
|
11384 |
+
};
|
11385 |
+
var datesFromQuery = Object(lib_date__WEBPACK_IMPORTED_MODULE_1__[/* getCurrentDates */ "f"])(query, options.defaultDateRange);
|
11386 |
+
var leaderboardQuery = {
|
11387 |
+
after: Object(lib_date__WEBPACK_IMPORTED_MODULE_1__[/* appendTimestamp */ "a"])(datesFromQuery.primary.after, 'start'),
|
11388 |
+
before: Object(lib_date__WEBPACK_IMPORTED_MODULE_1__[/* appendTimestamp */ "a"])(datesFromQuery.primary.before, 'end'),
|
11389 |
+
per_page: perPage,
|
11390 |
+
persisted_query: JSON.stringify(persistedQuery)
|
11391 |
+
}; // Disable eslint rule requiring `getItems` to be defined below because the next two statements
|
11392 |
+
// depend on `getItems` to have been called.
|
11393 |
+
// eslint-disable-next-line @wordpress/no-unused-vars-before-return
|
11394 |
+
|
11395 |
+
var leaderboards = getItems(endpoint, leaderboardQuery);
|
11396 |
+
|
11397 |
+
if (isGetItemsRequesting(endpoint, leaderboardQuery)) {
|
11398 |
+
return _objectSpread({}, response, {
|
11399 |
+
isRequesting: true
|
11400 |
});
|
11401 |
+
} else if (getItemsError(endpoint, leaderboardQuery)) {
|
11402 |
+
return _objectSpread({}, response, {
|
11403 |
+
isError: true
|
11404 |
+
});
|
11405 |
+
}
|
|
|
11406 |
|
11407 |
+
var leaderboard = leaderboards.get(options.id);
|
11408 |
+
return _objectSpread({}, response, {
|
11409 |
+
rows: leaderboard.rows
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11410 |
});
|
11411 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11412 |
/**
|
11413 |
+
* Returns items based on a search query.
|
11414 |
+
*
|
11415 |
+
* @param {Object} select Instance of @wordpress/select
|
11416 |
+
* @param {string} endpoint Report API Endpoint
|
11417 |
+
* @param {string[]} search Array of search strings.
|
11418 |
+
* @return {Object} Object containing API request information and the matching items.
|
11419 |
*/
|
11420 |
|
11421 |
+
function searchItemsByString(select, endpoint, search) {
|
11422 |
+
var _select2 = select('wc-api'),
|
11423 |
+
getItems = _select2.getItems,
|
11424 |
+
getItemsError = _select2.getItemsError,
|
11425 |
+
isGetItemsRequesting = _select2.isGetItemsRequesting;
|
11426 |
+
|
11427 |
+
var items = {};
|
11428 |
+
var isRequesting = false;
|
11429 |
+
var isError = false;
|
11430 |
+
search.forEach(function (searchWord) {
|
11431 |
+
var query = {
|
11432 |
+
search: searchWord,
|
11433 |
+
per_page: 10
|
11434 |
+
};
|
11435 |
+
var newItems = getItems(endpoint, query);
|
11436 |
+
newItems.forEach(function (item, id) {
|
11437 |
+
items[id] = item;
|
11438 |
+
});
|
11439 |
|
11440 |
+
if (isGetItemsRequesting(endpoint, query)) {
|
11441 |
+
isRequesting = true;
|
11442 |
+
}
|
11443 |
|
11444 |
+
if (getItemsError(endpoint, query)) {
|
11445 |
+
isError = true;
|
11446 |
+
}
|
11447 |
+
});
|
11448 |
+
return {
|
11449 |
+
items: items,
|
11450 |
+
isRequesting: isRequesting,
|
11451 |
+
isError: isError
|
11452 |
+
};
|
11453 |
+
}
|
11454 |
|
11455 |
+
/***/ }),
|
11456 |
|
11457 |
+
/***/ 268:
|
11458 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
11459 |
|
11460 |
+
"use strict";
|
11461 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
11462 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
11463 |
+
/* harmony import */ var _use_media_query__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(99);
|
11464 |
+
/**
|
11465 |
+
* WordPress dependencies
|
11466 |
+
*/
|
11467 |
|
11468 |
+
/**
|
11469 |
+
* Internal dependencies
|
11470 |
+
*/
|
11471 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11472 |
|
11473 |
+
/**
|
11474 |
+
* @typedef {"huge"|"wide"|"large"|"medium"|"small"|"mobile"} WPBreakpoint
|
11475 |
+
*/
|
11476 |
|
11477 |
+
/**
|
11478 |
+
* Hash of breakpoint names with pixel width at which it becomes effective.
|
11479 |
+
*
|
11480 |
+
* @see _breakpoints.scss
|
11481 |
+
*
|
11482 |
+
* @type {Object<WPBreakpoint,number>}
|
11483 |
+
*/
|
11484 |
|
11485 |
+
var BREAKPOINTS = {
|
11486 |
+
huge: 1440,
|
11487 |
+
wide: 1280,
|
11488 |
+
large: 960,
|
11489 |
+
medium: 782,
|
11490 |
+
small: 600,
|
11491 |
+
mobile: 480
|
11492 |
+
};
|
11493 |
/**
|
11494 |
+
* @typedef {">="|"<"} WPViewportOperator
|
11495 |
*/
|
11496 |
|
11497 |
/**
|
11498 |
+
* Object mapping media query operators to the condition to be used.
|
11499 |
+
*
|
11500 |
+
* @type {Object<WPViewportOperator,string>}
|
11501 |
*/
|
11502 |
|
11503 |
+
var CONDITIONS = {
|
11504 |
+
'>=': 'min-width',
|
11505 |
+
'<': 'max-width'
|
11506 |
+
};
|
11507 |
+
/**
|
11508 |
+
* Object mapping media query operators to a function that given a breakpointValue and a width evaluates if the operator matches the values.
|
11509 |
+
*
|
11510 |
+
* @type {Object<WPViewportOperator,Function>}
|
11511 |
+
*/
|
11512 |
|
11513 |
+
var OPERATOR_EVALUATORS = {
|
11514 |
+
'>=': function _(breakpointValue, width) {
|
11515 |
+
return width >= breakpointValue;
|
11516 |
+
},
|
11517 |
+
'<': function _(breakpointValue, width) {
|
11518 |
+
return width < breakpointValue;
|
11519 |
+
}
|
11520 |
+
};
|
11521 |
+
var ViewportMatchWidthContext = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createContext"])(null);
|
11522 |
+
/**
|
11523 |
+
* Returns true if the viewport matches the given query, or false otherwise.
|
11524 |
+
*
|
11525 |
+
* @param {WPBreakpoint} breakpoint Breakpoint size name.
|
11526 |
+
* @param {WPViewportOperator} [operator=">="] Viewport operator.
|
11527 |
+
*
|
11528 |
+
* @example
|
11529 |
+
*
|
11530 |
+
* ```js
|
11531 |
+
* useViewportMatch( 'huge', '<' );
|
11532 |
+
* useViewportMatch( 'medium' );
|
11533 |
+
* ```
|
11534 |
+
*
|
11535 |
+
* @return {boolean} Whether viewport matches query.
|
11536 |
+
*/
|
11537 |
|
11538 |
+
var useViewportMatch = function useViewportMatch(breakpoint) {
|
11539 |
+
var operator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '>=';
|
11540 |
+
var simulatedWidth = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["useContext"])(ViewportMatchWidthContext);
|
11541 |
+
var mediaQuery = !simulatedWidth && "(".concat(CONDITIONS[operator], ": ").concat(BREAKPOINTS[breakpoint], "px)");
|
11542 |
+
var mediaQueryResult = Object(_use_media_query__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(mediaQuery);
|
11543 |
|
11544 |
+
if (simulatedWidth) {
|
11545 |
+
return OPERATOR_EVALUATORS[operator](BREAKPOINTS[breakpoint], simulatedWidth);
|
11546 |
}
|
11547 |
|
11548 |
+
return mediaQueryResult;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11549 |
};
|
|
|
11550 |
|
11551 |
+
useViewportMatch.__experimentalWidthProvider = ViewportMatchWidthContext.Provider;
|
11552 |
+
/* harmony default export */ __webpack_exports__["a"] = (useViewportMatch);
|
11553 |
+
//# sourceMappingURL=index.js.map
|
11554 |
|
11555 |
+
/***/ }),
|
11556 |
|
11557 |
+
/***/ 269:
|
11558 |
+
/***/ (function(module, exports) {
|
11559 |
|
11560 |
+
function _arrayLikeToArray(arr, len) {
|
11561 |
+
if (len == null || len > arr.length) len = arr.length;
|
11562 |
|
11563 |
+
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
11564 |
+
arr2[i] = arr[i];
|
11565 |
+
}
|
11566 |
|
11567 |
+
return arr2;
|
11568 |
+
}
|
11569 |
|
11570 |
+
module.exports = _arrayLikeToArray;
|
|
|
|
|
11571 |
|
11572 |
+
/***/ }),
|
11573 |
|
11574 |
+
/***/ 27:
|
11575 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
11576 |
|
11577 |
+
"use strict";
|
11578 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectSpread; });
|
11579 |
+
/* harmony import */ var _defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
|
11580 |
|
11581 |
+
function _objectSpread(target) {
|
11582 |
+
for (var i = 1; i < arguments.length; i++) {
|
11583 |
+
var source = arguments[i] != null ? Object(arguments[i]) : {};
|
11584 |
+
var ownKeys = Object.keys(source);
|
11585 |
|
11586 |
+
if (typeof Object.getOwnPropertySymbols === 'function') {
|
11587 |
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
|
11588 |
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
11589 |
+
}));
|
11590 |
+
}
|
11591 |
|
11592 |
+
ownKeys.forEach(function (key) {
|
11593 |
+
Object(_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(target, key, source[key]);
|
11594 |
+
});
|
11595 |
+
}
|
11596 |
|
11597 |
+
return target;
|
11598 |
+
}
|
11599 |
|
11600 |
+
/***/ }),
|
11601 |
|
11602 |
+
/***/ 29:
|
11603 |
+
/***/ (function(module, exports) {
|
11604 |
|
11605 |
+
function _getPrototypeOf(o) {
|
11606 |
+
module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
11607 |
+
return o.__proto__ || Object.getPrototypeOf(o);
|
11608 |
+
};
|
11609 |
+
return _getPrototypeOf(o);
|
11610 |
+
}
|
11611 |
|
11612 |
+
module.exports = _getPrototypeOf;
|
11613 |
|
11614 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
|
|
11615 |
|
11616 |
+
/***/ 3:
|
11617 |
+
/***/ (function(module, exports) {
|
|
|
|
|
|
|
11618 |
|
11619 |
+
(function() { module.exports = this["wp"]["i18n"]; }());
|
|
|
|
|
11620 |
|
11621 |
+
/***/ }),
|
|
|
11622 |
|
11623 |
+
/***/ 30:
|
11624 |
+
/***/ (function(module, exports) {
|
|
|
|
|
11625 |
|
11626 |
+
(function() { module.exports = this["wp"]["url"]; }());
|
|
|
|
|
|
|
11627 |
|
11628 |
+
/***/ }),
|
|
|
11629 |
|
11630 |
+
/***/ 32:
|
11631 |
+
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
11632 |
|
11633 |
+
var arrayWithoutHoles = __webpack_require__(443);
|
|
|
|
|
11634 |
|
11635 |
+
var iterableToArray = __webpack_require__(444);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11636 |
|
11637 |
+
var unsupportedIterableToArray = __webpack_require__(425);
|
|
|
11638 |
|
11639 |
+
var nonIterableSpread = __webpack_require__(445);
|
|
|
|
|
|
|
|
|
11640 |
|
11641 |
+
function _toConsumableArray(arr) {
|
11642 |
+
return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
|
11643 |
+
}
|
11644 |
|
11645 |
+
module.exports = _toConsumableArray;
|
|
|
|
|
|
|
|
|
11646 |
|
11647 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11648 |
|
11649 |
+
/***/ 35:
|
11650 |
+
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11651 |
|
11652 |
+
"use strict";
|
|
|
11653 |
|
11654 |
|
11655 |
+
Object.defineProperty(exports, "__esModule", {
|
11656 |
+
value: true
|
11657 |
+
});
|
11658 |
|
11659 |
+
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; /**
|
11660 |
+
* External Dependencies
|
11661 |
+
*/
|
11662 |
|
11663 |
|
11664 |
/**
|
11665 |
+
* Internal Dependencies
|
11666 |
*/
|
11667 |
|
11668 |
|
11669 |
+
var _react = __webpack_require__(14);
|
11670 |
|
11671 |
+
var _react2 = _interopRequireDefault(_react);
|
11672 |
|
11673 |
+
var _reactAddonsCreateFragment = __webpack_require__(142);
|
|
|
|
|
11674 |
|
11675 |
+
var _reactAddonsCreateFragment2 = _interopRequireDefault(_reactAddonsCreateFragment);
|
|
|
|
|
11676 |
|
11677 |
+
var _tokenize = __webpack_require__(145);
|
11678 |
|
11679 |
+
var _tokenize2 = _interopRequireDefault(_tokenize);
|
11680 |
|
11681 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11682 |
|
11683 |
+
var currentMixedString = void 0;
|
11684 |
|
11685 |
+
function getCloseIndex(openIndex, tokens) {
|
11686 |
+
var openToken = tokens[openIndex],
|
11687 |
+
nestLevel = 0,
|
11688 |
+
token,
|
11689 |
+
i;
|
11690 |
+
for (i = openIndex + 1; i < tokens.length; i++) {
|
11691 |
+
token = tokens[i];
|
11692 |
+
if (token.value === openToken.value) {
|
11693 |
+
if (token.type === 'componentOpen') {
|
11694 |
+
nestLevel++;
|
11695 |
+
continue;
|
11696 |
+
}
|
11697 |
+
if (token.type === 'componentClose') {
|
11698 |
+
if (nestLevel === 0) {
|
11699 |
+
return i;
|
11700 |
+
}
|
11701 |
+
nestLevel--;
|
11702 |
+
}
|
11703 |
+
}
|
11704 |
+
}
|
11705 |
+
// if we get this far, there was no matching close token
|
11706 |
+
throw new Error('Missing closing component token `' + openToken.value + '`');
|
11707 |
+
}
|
11708 |
|
11709 |
+
function buildChildren(tokens, components) {
|
11710 |
+
var children = [],
|
11711 |
+
childrenObject = {},
|
11712 |
+
openComponent,
|
11713 |
+
clonedOpenComponent,
|
11714 |
+
openIndex,
|
11715 |
+
closeIndex,
|
11716 |
+
token,
|
11717 |
+
i,
|
11718 |
+
grandChildTokens,
|
11719 |
+
grandChildren,
|
11720 |
+
siblingTokens,
|
11721 |
+
siblings;
|
11722 |
+
|
11723 |
+
for (i = 0; i < tokens.length; i++) {
|
11724 |
+
token = tokens[i];
|
11725 |
+
if (token.type === 'string') {
|
11726 |
+
children.push(token.value);
|
11727 |
+
continue;
|
11728 |
+
}
|
11729 |
+
// component node should at least be set
|
11730 |
+
if (!components.hasOwnProperty(token.value) || typeof components[token.value] === 'undefined') {
|
11731 |
+
throw new Error('Invalid interpolation, missing component node: `' + token.value + '`');
|
11732 |
+
}
|
11733 |
+
// should be either ReactElement or null (both type "object"), all other types deprecated
|
11734 |
+
if (_typeof(components[token.value]) !== 'object') {
|
11735 |
+
throw new Error('Invalid interpolation, component node must be a ReactElement or null: `' + token.value + '`', '\n> ' + currentMixedString);
|
11736 |
+
}
|
11737 |
+
// we should never see a componentClose token in this loop
|
11738 |
+
if (token.type === 'componentClose') {
|
11739 |
+
throw new Error('Missing opening component token: `' + token.value + '`');
|
11740 |
+
}
|
11741 |
+
if (token.type === 'componentOpen') {
|
11742 |
+
openComponent = components[token.value];
|
11743 |
+
openIndex = i;
|
11744 |
+
break;
|
11745 |
+
}
|
11746 |
+
// componentSelfClosing token
|
11747 |
+
children.push(components[token.value]);
|
11748 |
+
continue;
|
11749 |
+
}
|
11750 |
|
11751 |
+
if (openComponent) {
|
11752 |
+
closeIndex = getCloseIndex(openIndex, tokens);
|
11753 |
+
grandChildTokens = tokens.slice(openIndex + 1, closeIndex);
|
11754 |
+
grandChildren = buildChildren(grandChildTokens, components);
|
11755 |
+
clonedOpenComponent = _react2.default.cloneElement(openComponent, {}, grandChildren);
|
11756 |
+
children.push(clonedOpenComponent);
|
11757 |
+
|
11758 |
+
if (closeIndex < tokens.length - 1) {
|
11759 |
+
siblingTokens = tokens.slice(closeIndex + 1);
|
11760 |
+
siblings = buildChildren(siblingTokens, components);
|
11761 |
+
children = children.concat(siblings);
|
11762 |
+
}
|
11763 |
+
}
|
11764 |
|
11765 |
+
if (children.length === 1) {
|
11766 |
+
return children[0];
|
11767 |
+
}
|
11768 |
|
11769 |
+
children.forEach(function (child, index) {
|
11770 |
+
if (child) {
|
11771 |
+
childrenObject['interpolation-child-' + index] = child;
|
11772 |
+
}
|
11773 |
+
});
|
11774 |
|
11775 |
+
return (0, _reactAddonsCreateFragment2.default)(childrenObject);
|
11776 |
+
}
|
11777 |
|
11778 |
+
function interpolate(options) {
|
11779 |
+
var mixedString = options.mixedString,
|
11780 |
+
components = options.components,
|
11781 |
+
throwErrors = options.throwErrors;
|
11782 |
|
11783 |
|
11784 |
+
currentMixedString = mixedString;
|
11785 |
|
11786 |
+
if (!components) {
|
11787 |
+
return mixedString;
|
11788 |
+
}
|
11789 |
|
11790 |
+
if ((typeof components === 'undefined' ? 'undefined' : _typeof(components)) !== 'object') {
|
11791 |
+
if (throwErrors) {
|
11792 |
+
throw new Error('Interpolation Error: unable to process `' + mixedString + '` because components is not an object');
|
11793 |
+
}
|
11794 |
|
11795 |
+
return mixedString;
|
11796 |
+
}
|
11797 |
|
11798 |
+
var tokens = (0, _tokenize2.default)(mixedString);
|
11799 |
|
11800 |
+
try {
|
11801 |
+
return buildChildren(tokens, components);
|
11802 |
+
} catch (error) {
|
11803 |
+
if (throwErrors) {
|
11804 |
+
throw new Error('Interpolation Error: unable to process `' + mixedString + '` because of error `' + error.message + '`');
|
11805 |
+
}
|
11806 |
|
11807 |
+
return mixedString;
|
11808 |
+
}
|
11809 |
+
};
|
11810 |
|
11811 |
+
exports.default = interpolate;
|
11812 |
+
//# sourceMappingURL=index.js.map
|
11813 |
|
11814 |
+
/***/ }),
|
|
|
|
|
11815 |
|
11816 |
+
/***/ 37:
|
11817 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
11818 |
|
11819 |
+
"use strict";
|
11820 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayLikeToArray; });
|
11821 |
+
function _arrayLikeToArray(arr, len) {
|
11822 |
+
if (len == null || len > arr.length) len = arr.length;
|
11823 |
|
11824 |
+
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
11825 |
+
arr2[i] = arr[i];
|
11826 |
+
}
|
11827 |
|
11828 |
+
return arr2;
|
11829 |
+
}
|
11830 |
|
11831 |
+
/***/ }),
|
11832 |
|
11833 |
+
/***/ 4:
|
11834 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
11835 |
|
11836 |
+
"use strict";
|
11837 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _getPrototypeOf; });
|
11838 |
+
function _getPrototypeOf(o) {
|
11839 |
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
11840 |
+
return o.__proto__ || Object.getPrototypeOf(o);
|
11841 |
+
};
|
11842 |
+
return _getPrototypeOf(o);
|
11843 |
+
}
|
11844 |
|
11845 |
+
/***/ }),
|
11846 |
|
11847 |
+
/***/ 40:
|
11848 |
+
/***/ (function(module, exports) {
|
11849 |
|
11850 |
+
function _defineProperties(target, props) {
|
11851 |
+
for (var i = 0; i < props.length; i++) {
|
11852 |
+
var descriptor = props[i];
|
11853 |
+
descriptor.enumerable = descriptor.enumerable || false;
|
11854 |
+
descriptor.configurable = true;
|
11855 |
+
if ("value" in descriptor) descriptor.writable = true;
|
11856 |
+
Object.defineProperty(target, descriptor.key, descriptor);
|
11857 |
+
}
|
11858 |
+
}
|
11859 |
|
11860 |
+
function _createClass(Constructor, protoProps, staticProps) {
|
11861 |
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
11862 |
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
11863 |
+
return Constructor;
|
11864 |
+
}
|
11865 |
|
11866 |
+
module.exports = _createClass;
|
|
|
|
|
11867 |
|
11868 |
+
/***/ }),
|
11869 |
|
11870 |
+
/***/ 41:
|
11871 |
+
/***/ (function(module, exports) {
|
11872 |
|
11873 |
+
function _classCallCheck(instance, Constructor) {
|
11874 |
+
if (!(instance instanceof Constructor)) {
|
11875 |
+
throw new TypeError("Cannot call a class as a function");
|
11876 |
+
}
|
11877 |
+
}
|
11878 |
|
11879 |
+
module.exports = _classCallCheck;
|
11880 |
|
11881 |
+
/***/ }),
|
11882 |
|
11883 |
+
/***/ 412:
|
11884 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11885 |
|
11886 |
+
"use strict";
|
|
|
|
|
11887 |
|
|
|
|
|
11888 |
|
11889 |
+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11890 |
|
11891 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
|
11892 |
|
11893 |
+
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
|
|
|
|
11894 |
|
11895 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11896 |
|
11897 |
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11898 |
|
11899 |
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
|
|
|
11900 |
|
11901 |
+
var hoistNonReactStatic = __webpack_require__(437);
|
11902 |
+
var React = __webpack_require__(14);
|
11903 |
+
var ReactDOM = __webpack_require__(87);
|
11904 |
|
11905 |
+
module.exports = function enhanceWithClickOutside(WrappedComponent) {
|
11906 |
+
var componentName = WrappedComponent.displayName || WrappedComponent.name;
|
|
|
|
|
11907 |
|
11908 |
+
var EnhancedComponent = function (_React$Component) {
|
11909 |
+
_inherits(EnhancedComponent, _React$Component);
|
|
|
11910 |
|
11911 |
+
function EnhancedComponent(props) {
|
11912 |
+
_classCallCheck(this, EnhancedComponent);
|
|
|
11913 |
|
11914 |
+
var _this = _possibleConstructorReturn(this, (EnhancedComponent.__proto__ || Object.getPrototypeOf(EnhancedComponent)).call(this, props));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11915 |
|
11916 |
+
_this.handleClickOutside = _this.handleClickOutside.bind(_this);
|
11917 |
+
return _this;
|
|
|
11918 |
}
|
|
|
11919 |
|
11920 |
+
_createClass(EnhancedComponent, [{
|
11921 |
+
key: 'componentDidMount',
|
11922 |
+
value: function componentDidMount() {
|
11923 |
+
document.addEventListener('click', this.handleClickOutside, true);
|
11924 |
+
}
|
11925 |
+
}, {
|
11926 |
+
key: 'componentWillUnmount',
|
11927 |
+
value: function componentWillUnmount() {
|
11928 |
+
document.removeEventListener('click', this.handleClickOutside, true);
|
11929 |
+
}
|
11930 |
+
}, {
|
11931 |
+
key: 'handleClickOutside',
|
11932 |
+
value: function handleClickOutside(e) {
|
11933 |
+
var domNode = this.__domNode;
|
11934 |
+
if ((!domNode || !domNode.contains(e.target)) && this.__wrappedInstance && typeof this.__wrappedInstance.handleClickOutside === 'function') {
|
11935 |
+
this.__wrappedInstance.handleClickOutside(e);
|
11936 |
+
}
|
11937 |
+
}
|
11938 |
+
}, {
|
11939 |
+
key: 'render',
|
11940 |
+
value: function render() {
|
11941 |
+
var _this2 = this;
|
11942 |
+
|
11943 |
+
var _props = this.props,
|
11944 |
+
wrappedRef = _props.wrappedRef,
|
11945 |
+
rest = _objectWithoutProperties(_props, ['wrappedRef']);
|
11946 |
+
|
11947 |
+
return React.createElement(WrappedComponent, _extends({}, rest, {
|
11948 |
+
ref: function ref(c) {
|
11949 |
+
_this2.__wrappedInstance = c;
|
11950 |
+
_this2.__domNode = ReactDOM.findDOMNode(c);
|
11951 |
+
wrappedRef && wrappedRef(c);
|
11952 |
+
}
|
11953 |
+
}));
|
11954 |
+
}
|
11955 |
+
}]);
|
11956 |
|
11957 |
+
return EnhancedComponent;
|
11958 |
+
}(React.Component);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11959 |
|
11960 |
+
EnhancedComponent.displayName = 'clickOutside(' + componentName + ')';
|
11961 |
|
11962 |
+
return hoistNonReactStatic(EnhancedComponent, WrappedComponent);
|
11963 |
+
};
|
11964 |
|
11965 |
+
/***/ }),
|
11966 |
|
11967 |
+
/***/ 413:
|
11968 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11969 |
|
11970 |
+
"use strict";
|
11971 |
+
var _extends=Object.assign||function(a){for(var c,b=1;b<arguments.length;b++)for(var d in c=arguments[b],c)Object.prototype.hasOwnProperty.call(c,d)&&(a[d]=c[d]);return a};Object.defineProperty(exports,'__esModule',{value:!0});exports.default=function(a){var b=a.size,c=b===void 0?24:b,d=a.onClick,e=a.icon,f=a.className,g=_objectWithoutProperties(a,['size','onClick','icon','className']),j=['gridicon','gridicons-pages',f,!1,!1,!1].filter(Boolean).join(' ');return _react2.default.createElement('svg',_extends({className:j,height:c,width:c,onClick:d},g,{xmlns:'http://www.w3.org/2000/svg',viewBox:'0 0 24 24'}),_react2.default.createElement('g',null,_react2.default.createElement('path',{d:'M16 8H8V6h8v2zm0 2H8v2h8v-2zm4-6v12l-6 6H6c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zm-2 10V4H6v16h6v-4c0-1.105.895-2 2-2h4z'})))};var _react=__webpack_require__(14),_react2=_interopRequireDefault(_react);function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _objectWithoutProperties(a,b){var d={};for(var c in a)0<=b.indexOf(c)||Object.prototype.hasOwnProperty.call(a,c)&&(d[c]=a[c]);return d}module.exports=exports['default'];
|
11972 |
|
11973 |
|
11974 |
+
/***/ }),
|
11975 |
|
11976 |
+
/***/ 414:
|
11977 |
+
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11978 |
|
11979 |
+
"use strict";
|
11980 |
+
var _extends=Object.assign||function(a){for(var c,b=1;b<arguments.length;b++)for(var d in c=arguments[b],c)Object.prototype.hasOwnProperty.call(c,d)&&(a[d]=c[d]);return a};Object.defineProperty(exports,'__esModule',{value:!0});exports.default=function(a){var b=a.size,c=b===void 0?24:b,d=a.onClick,e=a.icon,f=a.className,g=_objectWithoutProperties(a,['size','onClick','icon','className']),j=['gridicon','gridicons-cross-small',f,!1,!1,!1].filter(Boolean).join(' ');return _react2.default.createElement('svg',_extends({className:j,height:c,width:c,onClick:d},g,{xmlns:'http://www.w3.org/2000/svg',viewBox:'0 0 24 24'}),_react2.default.createElement('g',null,_react2.default.createElement('path',{d:'M17.705 7.705l-1.41-1.41L12 10.59 7.705 6.295l-1.41 1.41L10.59 12l-4.295 4.295 1.41 1.41L12 13.41l4.295 4.295 1.41-1.41L13.41 12l4.295-4.295z'})))};var _react=__webpack_require__(14),_react2=_interopRequireDefault(_react);function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _objectWithoutProperties(a,b){var d={};for(var c in a)0<=b.indexOf(c)||Object.prototype.hasOwnProperty.call(a,c)&&(d[c]=a[c]);return d}module.exports=exports['default'];
|
11981 |
|
11982 |
|
11983 |
+
/***/ }),
|
11984 |
|
11985 |
+
/***/ 415:
|
11986 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
11987 |
|
11988 |
+
"use strict";
|
11989 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
11990 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
11991 |
+
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2);
|
11992 |
+
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);
|
11993 |
+
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(10);
|
11994 |
+
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__);
|
11995 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3);
|
11996 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);
|
11997 |
+
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(88);
|
11998 |
|
11999 |
|
12000 |
/**
|
12002 |
*/
|
12003 |
|
12004 |
|
12005 |
+
/**
|
12006 |
+
* WordPress dependencies
|
12007 |
+
*/
|
12008 |
|
12009 |
|
12010 |
|
12013 |
*/
|
12014 |
|
12015 |
|
12016 |
+
var NOTICE_TIMEOUT = 10000;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12017 |
|
12018 |
+
function Snackbar(_ref, ref) {
|
12019 |
+
var className = _ref.className,
|
|
|
12020 |
children = _ref.children,
|
12021 |
+
_ref$actions = _ref.actions,
|
12022 |
+
actions = _ref$actions === void 0 ? [] : _ref$actions,
|
12023 |
_ref$onRemove = _ref.onRemove,
|
12024 |
+
onRemove = _ref$onRemove === void 0 ? lodash__WEBPACK_IMPORTED_MODULE_1__["noop"] : _ref$onRemove;
|
12025 |
+
Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["useEffect"])(function () {
|
12026 |
+
var timeoutHandle = setTimeout(function () {
|
12027 |
+
onRemove();
|
12028 |
+
}, NOTICE_TIMEOUT);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12029 |
return function () {
|
12030 |
+
return clearTimeout(timeoutHandle);
|
|
|
|
|
12031 |
};
|
12032 |
+
}, []);
|
12033 |
+
var classes = classnames__WEBPACK_IMPORTED_MODULE_2___default()(className, 'components-snackbar');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12034 |
|
12035 |
+
if (actions && actions.length > 1) {
|
12036 |
+
// we need to inform developers that snackbar only accepts 1 action
|
12037 |
+
// eslint-disable-next-line no-console
|
12038 |
+
console.warn('Snackbar can only have 1 action, use Notice if your message require many messages'); // return first element only while keeping it inside an array
|
12039 |
|
12040 |
+
actions = [actions[0]];
|
12041 |
+
}
|
12042 |
|
12043 |
+
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", {
|
12044 |
+
ref: ref,
|
12045 |
+
className: classes,
|
12046 |
+
onClick: onRemove,
|
12047 |
+
tabIndex: "0",
|
12048 |
+
role: "button",
|
12049 |
+
onKeyPress: onRemove,
|
12050 |
+
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Dismiss this notice')
|
12051 |
+
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", {
|
12052 |
+
className: "components-snackbar__content"
|
12053 |
+
}, children, actions.map(function (_ref2, index) {
|
12054 |
+
var label = _ref2.label,
|
12055 |
+
_onClick = _ref2.onClick,
|
12056 |
+
url = _ref2.url;
|
12057 |
+
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(___WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"], {
|
12058 |
+
key: index,
|
12059 |
+
href: url,
|
12060 |
+
isTertiary: true,
|
12061 |
+
onClick: function onClick(event) {
|
12062 |
+
event.stopPropagation();
|
12063 |
|
12064 |
+
if (_onClick) {
|
12065 |
+
_onClick(event);
|
12066 |
+
}
|
12067 |
+
},
|
12068 |
+
className: "components-snackbar__action"
|
12069 |
+
}, label);
|
12070 |
+
})));
|
12071 |
+
}
|
12072 |
|
12073 |
+
/* harmony default export */ __webpack_exports__["a"] = (Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(Snackbar));
|
12074 |
+
//# sourceMappingURL=index.js.map
|
|
|
12075 |
|
12076 |
+
/***/ }),
|
|
|
12077 |
|
12078 |
+
/***/ 416:
|
12079 |
+
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12080 |
|
12081 |
+
"use strict";
|
12082 |
+
/* WEBPACK VAR INJECTION */(function(global) {// @flow
|
|
|
|
|
|
|
|
|
12083 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12084 |
|
12085 |
+
var key = '__global_unique_id__';
|
|
|
|
|
|
|
|
|
12086 |
|
12087 |
+
module.exports = function() {
|
12088 |
+
return global[key] = (global[key] || 0) + 1;
|
|
|
|
|
12089 |
};
|
|
|
|
|
12090 |
|
12091 |
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(64)))
|
12092 |
|
12093 |
+
/***/ }),
|
12094 |
|
12095 |
+
/***/ 417:
|
12096 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
12097 |
|
12098 |
+
"use strict";
|
12099 |
+
/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(41);
|
12100 |
+
/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);
|
12101 |
+
/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(40);
|
12102 |
+
/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);
|
12103 |
+
/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(44);
|
12104 |
+
/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__);
|
12105 |
+
/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(29);
|
12106 |
+
/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__);
|
12107 |
+
/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(42);
|
12108 |
+
/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__);
|
12109 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(0);
|
12110 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__);
|
12111 |
+
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(19);
|
12112 |
+
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_6__);
|
12113 |
+
/* harmony import */ var _woocommerce_data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(51);
|
12114 |
+
/* harmony import */ var _woocommerce_data__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_data__WEBPACK_IMPORTED_MODULE_7__);
|
12115 |
+
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(441);
|
12116 |
+
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_8__);
|
12117 |
|
12118 |
|
12119 |
|
12121 |
|
12122 |
|
12123 |
|
12124 |
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default()(this, result); }; }
|
12125 |
|
12126 |
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
12127 |
|
12128 |
/**
|
12129 |
* External dependencies
|
12130 |
*/
|
12131 |
|
12132 |
|
12133 |
+
/**
|
12134 |
+
* WooCommerce dependencies
|
12135 |
+
*/
|
12136 |
|
12137 |
|
12138 |
/**
|
12141 |
|
12142 |
|
12143 |
|
12144 |
+
var Navigation = /*#__PURE__*/function (_Component) {
|
12145 |
+
_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(Navigation, _Component);
|
12146 |
+
|
12147 |
+
var _super = _createSuper(Navigation);
|
12148 |
|
12149 |
+
function Navigation() {
|
12150 |
+
_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, Navigation);
|
12151 |
|
12152 |
+
return _super.apply(this, arguments);
|
12153 |
+
}
|
12154 |
|
12155 |
+
_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(Navigation, [{
|
12156 |
+
key: "renderMenuItem",
|
12157 |
+
value: function renderMenuItem(item) {
|
12158 |
+
var _this = this;
|
12159 |
+
|
12160 |
+
var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
12161 |
+
var slug = item.slug,
|
12162 |
+
title = item.title,
|
12163 |
+
url = item.url;
|
12164 |
+
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])("li", {
|
12165 |
+
key: slug,
|
12166 |
+
className: "woocommerce-navigation__menu-item woocommerce-navigation__menu-item-depth-".concat(depth)
|
12167 |
+
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])("a", {
|
12168 |
+
href: url
|
12169 |
+
}, title), item.children && item.children.length && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])("ul", {
|
12170 |
+
className: "woocommerce-navigation__submenu"
|
12171 |
+
}, item.children.map(function (childItem) {
|
12172 |
+
return _this.renderMenuItem(childItem, depth + 1);
|
12173 |
+
})));
|
12174 |
+
}
|
12175 |
+
}, {
|
12176 |
+
key: "render",
|
12177 |
+
value: function render() {
|
12178 |
+
var _this2 = this;
|
12179 |
|
12180 |
+
var items = this.props.items;
|
12181 |
+
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])("div", {
|
12182 |
+
className: "woocommerce-navigation"
|
12183 |
+
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])("ul", {
|
12184 |
+
className: "woocommerce-navigation__menu"
|
12185 |
+
}, items.map(function (item) {
|
12186 |
+
return _this2.renderMenuItem(item);
|
12187 |
+
})));
|
12188 |
+
}
|
12189 |
+
}]);
|
12190 |
|
12191 |
+
return Navigation;
|
12192 |
+
}(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["Component"]);
|
12193 |
|
12194 |
+
/* harmony default export */ __webpack_exports__["a"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_6__["withSelect"])(function (select) {
|
12195 |
+
var items = select(_woocommerce_data__WEBPACK_IMPORTED_MODULE_7__["SETTINGS_STORE_NAME"]).getSetting('wc_admin', 'wcNavigation');
|
12196 |
+
return {
|
12197 |
+
items: items
|
12198 |
+
};
|
12199 |
+
})(Navigation));
|
12200 |
|
12201 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12202 |
|
12203 |
+
/***/ 418:
|
12204 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
12205 |
|
12206 |
+
"use strict";
|
12207 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return symbolObservablePonyfill; });
|
12208 |
+
function symbolObservablePonyfill(root) {
|
12209 |
+
var result;
|
12210 |
+
var Symbol = root.Symbol;
|
12211 |
+
|
12212 |
+
if (typeof Symbol === 'function') {
|
12213 |
+
if (Symbol.observable) {
|
12214 |
+
result = Symbol.observable;
|
12215 |
+
} else {
|
12216 |
+
result = Symbol('observable');
|
12217 |
+
Symbol.observable = result;
|
12218 |
+
}
|
12219 |
+
} else {
|
12220 |
+
result = '@@observable';
|
12221 |
+
}
|
12222 |
|
12223 |
+
return result;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12224 |
};
|
12225 |
|
|
|
|
|
|
|
|
|
12226 |
|
12227 |
+
/***/ }),
|
12228 |
|
12229 |
+
/***/ 42:
|
12230 |
+
/***/ (function(module, exports, __webpack_require__) {
|
12231 |
|
12232 |
+
var setPrototypeOf = __webpack_require__(209);
|
12233 |
|
12234 |
+
function _inherits(subClass, superClass) {
|
12235 |
+
if (typeof superClass !== "function" && superClass !== null) {
|
12236 |
+
throw new TypeError("Super expression must either be null or a function");
|
12237 |
+
}
|
12238 |
|
12239 |
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
12240 |
+
constructor: {
|
12241 |
+
value: subClass,
|
12242 |
+
writable: true,
|
12243 |
+
configurable: true
|
12244 |
+
}
|
12245 |
+
});
|
12246 |
+
if (superClass) setPrototypeOf(subClass, superClass);
|
12247 |
+
}
|
12248 |
|
12249 |
+
module.exports = _inherits;
|
12250 |
|
12251 |
+
/***/ }),
|
12252 |
|
12253 |
+
/***/ 424:
|
12254 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
12255 |
|
12256 |
+
"use strict";
|
12257 |
|
12258 |
+
// UNUSED EXPORTS: NavigableMenu
|
12259 |
|
12260 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
12261 |
+
var esm_extends = __webpack_require__(11);
|
12262 |
|
12263 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
|
12264 |
+
var objectWithoutProperties = __webpack_require__(16);
|
12265 |
|
12266 |
+
// EXTERNAL MODULE: external {"this":["wp","element"]}
|
12267 |
+
var external_this_wp_element_ = __webpack_require__(0);
|
12268 |
|
12269 |
+
// EXTERNAL MODULE: external "lodash"
|
12270 |
+
var external_lodash_ = __webpack_require__(2);
|
12271 |
|
12272 |
+
// EXTERNAL MODULE: ./node_modules/@wordpress/keycodes/build-module/index.js + 1 modules
|
12273 |
+
var build_module = __webpack_require__(18);
|
12274 |
|
12275 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
|
12276 |
+
var classCallCheck = __webpack_require__(7);
|
12277 |
|
12278 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
|
12279 |
+
var createClass = __webpack_require__(6);
|
12280 |
|
12281 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
|
12282 |
+
var possibleConstructorReturn = __webpack_require__(8);
|
12283 |
|
12284 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
|
12285 |
+
var getPrototypeOf = __webpack_require__(4);
|
12286 |
|
12287 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
|
12288 |
+
var assertThisInitialized = __webpack_require__(5);
|
12289 |
|
12290 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules
|
12291 |
+
var inherits = __webpack_require__(9);
|
12292 |
|
12293 |
+
// EXTERNAL MODULE: ./node_modules/@wordpress/dom/build-module/index.js + 2 modules
|
12294 |
+
var dom_build_module = __webpack_require__(50);
|
12295 |
|
12296 |
+
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/navigable-container/container.js
|
12297 |
|
12298 |
|
12299 |
|
12308 |
* External dependencies
|
12309 |
*/
|
12310 |
|
12311 |
+
/**
|
12312 |
+
* WordPress dependencies
|
12313 |
+
*/
|
12314 |
|
12315 |
|
12316 |
|
12317 |
|
12318 |
+
function cycleValue(value, total, offset) {
|
12319 |
+
var nextValue = value + offset;
|
12320 |
|
12321 |
+
if (nextValue < 0) {
|
12322 |
+
return total + nextValue;
|
12323 |
+
} else if (nextValue >= total) {
|
12324 |
+
return nextValue - total;
|
12325 |
+
}
|
12326 |
|
12327 |
+
return nextValue;
|
12328 |
+
}
|
12329 |
|
12330 |
+
var container_NavigableContainer =
|
12331 |
+
/*#__PURE__*/
|
12332 |
+
function (_Component) {
|
12333 |
+
Object(inherits["a" /* default */])(NavigableContainer, _Component);
|
12334 |
|
12335 |
+
function NavigableContainer() {
|
12336 |
+
var _this;
|
12337 |
|
12338 |
+
Object(classCallCheck["a" /* default */])(this, NavigableContainer);
|
12339 |
|
12340 |
+
_this = Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(NavigableContainer).apply(this, arguments));
|
12341 |
+
_this.onKeyDown = _this.onKeyDown.bind(Object(assertThisInitialized["a" /* default */])(_this));
|
12342 |
+
_this.bindContainer = _this.bindContainer.bind(Object(assertThisInitialized["a" /* default */])(_this));
|
12343 |
+
_this.getFocusableContext = _this.getFocusableContext.bind(Object(assertThisInitialized["a" /* default */])(_this));
|
12344 |
+
_this.getFocusableIndex = _this.getFocusableIndex.bind(Object(assertThisInitialized["a" /* default */])(_this));
|
12345 |
+
return _this;
|
12346 |
+
}
|
12347 |
|
12348 |
+
Object(createClass["a" /* default */])(NavigableContainer, [{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12349 |
key: "componentDidMount",
|
12350 |
value: function componentDidMount() {
|
12351 |
+
// We use DOM event listeners instead of React event listeners
|
12352 |
+
// because we want to catch events from the underlying DOM tree
|
12353 |
+
// The React Tree can be different from the DOM tree when using
|
12354 |
+
// portals. Block Toolbars for instance are rendered in a separate
|
12355 |
+
// React Trees.
|
12356 |
+
this.container.addEventListener('keydown', this.onKeyDown);
|
12357 |
+
this.container.addEventListener('focus', this.onFocus);
|
12358 |
}
|
12359 |
}, {
|
12360 |
+
key: "componentWillUnmount",
|
12361 |
+
value: function componentWillUnmount() {
|
12362 |
+
this.container.removeEventListener('keydown', this.onKeyDown);
|
12363 |
+
this.container.removeEventListener('focus', this.onFocus);
|
12364 |
+
}
|
12365 |
+
}, {
|
12366 |
+
key: "bindContainer",
|
12367 |
+
value: function bindContainer(ref) {
|
12368 |
+
var forwardedRef = this.props.forwardedRef;
|
12369 |
+
this.container = ref;
|
12370 |
+
|
12371 |
+
if (Object(external_lodash_["isFunction"])(forwardedRef)) {
|
12372 |
+
forwardedRef(ref);
|
12373 |
+
} else if (forwardedRef && 'current' in forwardedRef) {
|
12374 |
+
forwardedRef.current = ref;
|
12375 |
+
}
|
12376 |
+
}
|
12377 |
+
}, {
|
12378 |
+
key: "getFocusableContext",
|
12379 |
+
value: function getFocusableContext(target) {
|
12380 |
+
var onlyBrowserTabstops = this.props.onlyBrowserTabstops;
|
12381 |
+
var finder = onlyBrowserTabstops ? dom_build_module["a" /* focus */].tabbable : dom_build_module["a" /* focus */].focusable;
|
12382 |
+
var focusables = finder.find(this.container);
|
12383 |
+
var index = this.getFocusableIndex(focusables, target);
|
12384 |
+
|
12385 |
+
if (index > -1 && target) {
|
12386 |
+
return {
|
12387 |
+
index: index,
|
12388 |
+
target: target,
|
12389 |
+
focusables: focusables
|
12390 |
+
};
|
12391 |
}
|
12392 |
|
12393 |
+
return null;
|
12394 |
+
}
|
12395 |
+
}, {
|
12396 |
+
key: "getFocusableIndex",
|
12397 |
+
value: function getFocusableIndex(focusables, target) {
|
12398 |
+
var directIndex = focusables.indexOf(target);
|
12399 |
+
|
12400 |
+
if (directIndex !== -1) {
|
12401 |
+
return directIndex;
|
12402 |
}
|
12403 |
}
|
12404 |
}, {
|
12405 |
+
key: "onKeyDown",
|
12406 |
+
value: function onKeyDown(event) {
|
12407 |
+
if (this.props.onKeyDown) {
|
12408 |
+
this.props.onKeyDown(event);
|
12409 |
+
}
|
|
|
|
|
|
|
|
|
|
|
12410 |
|
12411 |
+
var getFocusableContext = this.getFocusableContext;
|
12412 |
+
var _this$props = this.props,
|
12413 |
+
_this$props$cycle = _this$props.cycle,
|
12414 |
+
cycle = _this$props$cycle === void 0 ? true : _this$props$cycle,
|
12415 |
+
eventToOffset = _this$props.eventToOffset,
|
12416 |
+
_this$props$onNavigat = _this$props.onNavigate,
|
12417 |
+
onNavigate = _this$props$onNavigat === void 0 ? external_lodash_["noop"] : _this$props$onNavigat,
|
12418 |
+
stopNavigationEvents = _this$props.stopNavigationEvents;
|
12419 |
+
var offset = eventToOffset(event); // eventToOffset returns undefined if the event is not handled by the component
|
12420 |
+
|
12421 |
+
if (offset !== undefined && stopNavigationEvents) {
|
12422 |
+
// Prevents arrow key handlers bound to the document directly interfering
|
12423 |
+
event.stopImmediatePropagation(); // When navigating a collection of items, prevent scroll containers
|
12424 |
+
// from scrolling.
|
12425 |
+
|
12426 |
+
if (event.target.getAttribute('role') === 'menuitem') {
|
12427 |
+
event.preventDefault();
|
12428 |
+
}
|
12429 |
+
}
|
12430 |
|
12431 |
+
if (!offset) {
|
|
|
|
|
12432 |
return;
|
12433 |
}
|
12434 |
|
12435 |
+
var context = getFocusableContext(document.activeElement);
|
12436 |
|
12437 |
+
if (!context) {
|
12438 |
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12439 |
}
|
12440 |
|
12441 |
+
var index = context.index,
|
12442 |
+
focusables = context.focusables;
|
12443 |
+
var nextIndex = cycle ? cycleValue(index, focusables.length, offset) : index + offset;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12444 |
|
12445 |
+
if (nextIndex >= 0 && nextIndex < focusables.length) {
|
12446 |
+
focusables[nextIndex].focus();
|
12447 |
+
onNavigate(nextIndex, focusables[nextIndex]);
|
12448 |
+
}
|
12449 |
}
|
12450 |
}, {
|
12451 |
key: "render",
|
12452 |
value: function render() {
|
12453 |
var _this$props2 = this.props,
|
12454 |
+
children = _this$props2.children,
|
12455 |
+
props = Object(objectWithoutProperties["a" /* default */])(_this$props2, ["children"]);
|
12456 |
|
12457 |
+
return Object(external_this_wp_element_["createElement"])("div", Object(esm_extends["a" /* default */])({
|
12458 |
+
ref: this.bindContainer
|
12459 |
+
}, Object(external_lodash_["omit"])(props, ['stopNavigationEvents', 'eventToOffset', 'onNavigate', 'cycle', 'onlyBrowserTabstops', 'forwardedRef'])), children);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12460 |
}
|
12461 |
}]);
|
12462 |
|
12463 |
+
return NavigableContainer;
|
12464 |
+
}(external_this_wp_element_["Component"]);
|
12465 |
|
12466 |
+
var container_forwardedNavigableContainer = function forwardedNavigableContainer(props, ref) {
|
12467 |
+
return Object(external_this_wp_element_["createElement"])(container_NavigableContainer, Object(esm_extends["a" /* default */])({}, props, {
|
12468 |
+
forwardedRef: ref
|
12469 |
+
}));
|
|
|
|
|
|
|
|
|
|
|
12470 |
};
|
|
|
|
|
|
|
|
|
12471 |
|
12472 |
+
container_forwardedNavigableContainer.displayName = 'NavigableContainer';
|
12473 |
+
/* harmony default export */ var container = (Object(external_this_wp_element_["forwardRef"])(container_forwardedNavigableContainer));
|
12474 |
+
//# sourceMappingURL=container.js.map
|
12475 |
+
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/navigable-container/menu.js
|
12476 |
|
|
|
|
|
|
|
|
|
12477 |
|
|
|
|
|
|
|
|
|
|
|
|
|
12478 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12479 |
|
12480 |
+
/**
|
12481 |
+
* External dependencies
|
12482 |
+
*/
|
12483 |
|
12484 |
+
/**
|
12485 |
+
* WordPress dependencies
|
12486 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
12487 |
|
|
|
12488 |
|
|
|
|
|
|
|
12489 |
|
12490 |
+
/**
|
12491 |
+
* Internal dependencies
|
12492 |
+
*/
|
12493 |
|
|
|
|
|
|
|
|
|
12494 |
|
12495 |
+
function NavigableMenu(_ref, ref) {
|
12496 |
+
var _ref$role = _ref.role,
|
12497 |
+
role = _ref$role === void 0 ? 'menu' : _ref$role,
|
12498 |
+
_ref$orientation = _ref.orientation,
|
12499 |
+
orientation = _ref$orientation === void 0 ? 'vertical' : _ref$orientation,
|
12500 |
+
rest = Object(objectWithoutProperties["a" /* default */])(_ref, ["role", "orientation"]);
|
12501 |
|
12502 |
+
var eventToOffset = function eventToOffset(evt) {
|
12503 |
+
var keyCode = evt.keyCode;
|
12504 |
+
var next = [build_module["b" /* DOWN */]];
|
12505 |
+
var previous = [build_module["i" /* UP */]];
|
12506 |
|
12507 |
+
if (orientation === 'horizontal') {
|
12508 |
+
next = [build_module["f" /* RIGHT */]];
|
12509 |
+
previous = [build_module["e" /* LEFT */]];
|
12510 |
+
}
|
12511 |
+
|
12512 |
+
if (orientation === 'both') {
|
12513 |
+
next = [build_module["f" /* RIGHT */], build_module["b" /* DOWN */]];
|
12514 |
+
previous = [build_module["e" /* LEFT */], build_module["i" /* UP */]];
|
12515 |
+
}
|
12516 |
+
|
12517 |
+
if (Object(external_lodash_["includes"])(next, keyCode)) {
|
12518 |
+
return 1;
|
12519 |
+
} else if (Object(external_lodash_["includes"])(previous, keyCode)) {
|
12520 |
+
return -1;
|
12521 |
+
}
|
12522 |
+
};
|
12523 |
|
12524 |
+
return Object(external_this_wp_element_["createElement"])(container, Object(esm_extends["a" /* default */])({
|
12525 |
+
ref: ref,
|
12526 |
+
stopNavigationEvents: true,
|
12527 |
+
onlyBrowserTabstops: false,
|
12528 |
+
role: role,
|
12529 |
+
"aria-orientation": role === 'presentation' ? null : orientation,
|
12530 |
+
eventToOffset: eventToOffset
|
12531 |
+
}, rest));
|
12532 |
+
}
|
12533 |
+
/* harmony default export */ var menu = __webpack_exports__["a"] = (Object(external_this_wp_element_["forwardRef"])(NavigableMenu));
|
12534 |
+
//# sourceMappingURL=menu.js.map
|
12535 |
|
12536 |
/***/ }),
|
12537 |
+
|
12538 |
+
/***/ 425:
|
12539 |
/***/ (function(module, exports, __webpack_require__) {
|
12540 |
|
12541 |
+
var arrayLikeToArray = __webpack_require__(269);
|
|
|
12542 |
|
12543 |
+
function _unsupportedIterableToArray(o, minLen) {
|
12544 |
+
if (!o) return;
|
12545 |
+
if (typeof o === "string") return arrayLikeToArray(o, minLen);
|
12546 |
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
12547 |
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
12548 |
+
if (n === "Map" || n === "Set") return Array.from(n);
|
12549 |
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
|
12550 |
+
}
|
12551 |
|
12552 |
+
module.exports = _unsupportedIterableToArray;
|
12553 |
|
12554 |
/***/ }),
|
|
|
|
|
|
|
12555 |
|
12556 |
+
/***/ 43:
|
12557 |
+
/***/ (function(module, exports) {
|
12558 |
|
12559 |
+
function _typeof(obj) {
|
12560 |
+
"@babel/helpers - typeof";
|
12561 |
+
|
12562 |
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
12563 |
+
module.exports = _typeof = function _typeof(obj) {
|
12564 |
+
return typeof obj;
|
12565 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12566 |
} else {
|
12567 |
+
module.exports = _typeof = function _typeof(obj) {
|
12568 |
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
12569 |
+
};
|
|
|
|
|
12570 |
}
|
|
|
12571 |
|
12572 |
+
return _typeof(obj);
|
12573 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12574 |
|
12575 |
+
module.exports = _typeof;
|
|
|
|
|
|
|
|
|
|
|
|
|
12576 |
|
12577 |
+
/***/ }),
|
|
|
|
|
12578 |
|
12579 |
+
/***/ 430:
|
12580 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12581 |
|
12582 |
+
"use strict";
|
12583 |
+
__webpack_require__.r(__webpack_exports__);
|
12584 |
+
/* WEBPACK VAR INJECTION */(function(global) {/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
12585 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
12586 |
+
/* harmony import */ var _wordpress_notices__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(706);
|
12587 |
+
/* harmony import */ var _stylesheets_index_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(433);
|
12588 |
+
/* harmony import */ var _stylesheets_index_scss__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_stylesheets_index_scss__WEBPACK_IMPORTED_MODULE_2__);
|
12589 |
+
/* harmony import */ var _layout__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(202);
|
12590 |
+
/* harmony import */ var _navigation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(417);
|
12591 |
+
/* harmony import */ var wc_api_wp_data_store__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(704);
|
12592 |
+
/* harmony import */ var _woocommerce_data__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(51);
|
12593 |
+
/* harmony import */ var _woocommerce_data__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_data__WEBPACK_IMPORTED_MODULE_6__);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12594 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12595 |
|
12596 |
+
/**
|
12597 |
+
* External dependencies
|
12598 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12599 |
|
|
|
|
|
|
|
|
|
12600 |
|
12601 |
+
/**
|
12602 |
+
* Internal dependencies
|
12603 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
12604 |
|
|
|
|
|
|
|
12605 |
|
|
|
|
|
|
|
12606 |
|
|
|
|
|
|
|
12607 |
|
|
|
|
|
|
|
|
|
|
|
12608 |
|
12609 |
+
// Modify webpack pubilcPath at runtime based on location of WordPress Plugin.
|
12610 |
+
// eslint-disable-next-line no-undef,camelcase
|
|
|
|
|
|
|
|
|
|
|
12611 |
|
12612 |
+
__webpack_require__.p = global.wcAdminAssets.path;
|
12613 |
+
var appRoot = document.getElementById('root');
|
12614 |
+
var navigationRoot = document.getElementById('woocommerce-embedded-navigation');
|
12615 |
+
var settingsGroup = 'wc_admin';
|
|
|
|
|
|
|
12616 |
|
12617 |
+
if (navigationRoot) {
|
12618 |
+
var HydratedNavigation = Object(_woocommerce_data__WEBPACK_IMPORTED_MODULE_6__["withSettingsHydration"])(settingsGroup, window.wcSettings)(_navigation__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"]);
|
12619 |
+
Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["render"])(Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(HydratedNavigation, null), navigationRoot); // Collapse the WP Menu.
|
12620 |
|
12621 |
+
var adminMenu = document.getElementById('adminmenumain');
|
12622 |
+
adminMenu.classList.add('folded');
|
12623 |
+
}
|
|
|
12624 |
|
12625 |
+
if (appRoot) {
|
12626 |
+
var HydratedPageLayout = Object(_woocommerce_data__WEBPACK_IMPORTED_MODULE_6__["withSettingsHydration"])(settingsGroup, window.wcSettings)(_layout__WEBPACK_IMPORTED_MODULE_3__[/* PageLayout */ "b"]);
|
12627 |
+
Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["render"])(Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(HydratedPageLayout, null), appRoot);
|
12628 |
+
} else {
|
12629 |
+
var embeddedRoot = document.getElementById('woocommerce-embedded-root');
|
12630 |
+
var HydratedEmbedLayout = Object(_woocommerce_data__WEBPACK_IMPORTED_MODULE_6__["withSettingsHydration"])(settingsGroup, window.wcSettings)(_layout__WEBPACK_IMPORTED_MODULE_3__[/* EmbedLayout */ "a"]); // Render the header.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12631 |
|
12632 |
+
Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["render"])(Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(HydratedEmbedLayout, null), embeddedRoot);
|
12633 |
+
embeddedRoot.classList.remove('is-embed-loading'); // Render notices just above the WP content div.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12634 |
|
12635 |
+
var wpBody = document.getElementById('wpbody-content');
|
12636 |
+
var wrap = wpBody.querySelector('.wrap.woocommerce') || wpBody.querySelector('[class="wrap"]');
|
12637 |
+
var noticeContainer = document.createElement('div');
|
12638 |
+
Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["render"])(Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", {
|
12639 |
+
className: "woocommerce-layout"
|
12640 |
+
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_layout__WEBPACK_IMPORTED_MODULE_3__[/* PrimaryLayout */ "c"], null)), wpBody.insertBefore(noticeContainer, wrap));
|
12641 |
+
}
|
12642 |
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(64)))
|
|
|
|
|
|
|
|
|
|
|
12643 |
|
12644 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12645 |
|
12646 |
+
/***/ 432:
|
12647 |
+
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
|
|
12648 |
|
12649 |
+
/**
|
12650 |
+
* Copyright (c) 2014-present, Facebook, Inc.
|
12651 |
+
*
|
12652 |
+
* This source code is licensed under the MIT license found in the
|
12653 |
+
* LICENSE file in the root directory of this source tree.
|
12654 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12655 |
|
12656 |
+
var runtime = (function (exports) {
|
12657 |
+
"use strict";
|
12658 |
+
|
12659 |
+
var Op = Object.prototype;
|
12660 |
+
var hasOwn = Op.hasOwnProperty;
|
12661 |
+
var undefined; // More compressible than void 0.
|
12662 |
+
var $Symbol = typeof Symbol === "function" ? Symbol : {};
|
12663 |
+
var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
12664 |
+
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
12665 |
+
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
12666 |
+
|
12667 |
+
function wrap(innerFn, outerFn, self, tryLocsList) {
|
12668 |
+
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
|
12669 |
+
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
|
12670 |
+
var generator = Object.create(protoGenerator.prototype);
|
12671 |
+
var context = new Context(tryLocsList || []);
|
12672 |
+
|
12673 |
+
// The ._invoke method unifies the implementations of the .next,
|
12674 |
+
// .throw, and .return methods.
|
12675 |
+
generator._invoke = makeInvokeMethod(innerFn, self, context);
|
12676 |
+
|
12677 |
+
return generator;
|
12678 |
+
}
|
12679 |
+
exports.wrap = wrap;
|
12680 |
+
|
12681 |
+
// Try/catch helper to minimize deoptimizations. Returns a completion
|
12682 |
+
// record like context.tryEntries[i].completion. This interface could
|
12683 |
+
// have been (and was previously) designed to take a closure to be
|
12684 |
+
// invoked without arguments, but in all the cases we care about we
|
12685 |
+
// already have an existing method we want to call, so there's no need
|
12686 |
+
// to create a new function object. We can even get away with assuming
|
12687 |
+
// the method takes exactly one argument, since that happens to be true
|
12688 |
+
// in every case, so we don't have to touch the arguments object. The
|
12689 |
+
// only additional allocation required is the completion record, which
|
12690 |
+
// has a stable shape and so hopefully should be cheap to allocate.
|
12691 |
+
function tryCatch(fn, obj, arg) {
|
12692 |
+
try {
|
12693 |
+
return { type: "normal", arg: fn.call(obj, arg) };
|
12694 |
+
} catch (err) {
|
12695 |
+
return { type: "throw", arg: err };
|
12696 |
+
}
|
12697 |
+
}
|
12698 |
|
12699 |
+
var GenStateSuspendedStart = "suspendedStart";
|
12700 |
+
var GenStateSuspendedYield = "suspendedYield";
|
12701 |
+
var GenStateExecuting = "executing";
|
12702 |
+
var GenStateCompleted = "completed";
|
|
|
12703 |
|
12704 |
+
// Returning this object from the innerFn has the same effect as
|
12705 |
+
// breaking out of the dispatch switch statement.
|
12706 |
+
var ContinueSentinel = {};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12707 |
|
12708 |
+
// Dummy constructor functions that we use as the .constructor and
|
12709 |
+
// .constructor.prototype properties for functions that return Generator
|
12710 |
+
// objects. For full spec compliance, you may wish to configure your
|
12711 |
+
// minifier not to mangle the names of these two functions.
|
12712 |
+
function Generator() {}
|
12713 |
+
function GeneratorFunction() {}
|
12714 |
+
function GeneratorFunctionPrototype() {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12715 |
|
12716 |
+
// This is a polyfill for %IteratorPrototype% for environments that
|
12717 |
+
// don't natively support it.
|
12718 |
+
var IteratorPrototype = {};
|
12719 |
+
IteratorPrototype[iteratorSymbol] = function () {
|
12720 |
+
return this;
|
12721 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12722 |
|
12723 |
+
var getProto = Object.getPrototypeOf;
|
12724 |
+
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
12725 |
+
if (NativeIteratorPrototype &&
|
12726 |
+
NativeIteratorPrototype !== Op &&
|
12727 |
+
hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
|
12728 |
+
// This environment has a native %IteratorPrototype%; use it instead
|
12729 |
+
// of the polyfill.
|
12730 |
+
IteratorPrototype = NativeIteratorPrototype;
|
12731 |
+
}
|
12732 |
+
|
12733 |
+
var Gp = GeneratorFunctionPrototype.prototype =
|
12734 |
+
Generator.prototype = Object.create(IteratorPrototype);
|
12735 |
+
GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
|
12736 |
+
GeneratorFunctionPrototype.constructor = GeneratorFunction;
|
12737 |
+
GeneratorFunctionPrototype[toStringTagSymbol] =
|
12738 |
+
GeneratorFunction.displayName = "GeneratorFunction";
|
12739 |
+
|
12740 |
+
// Helper for defining the .next, .throw, and .return methods of the
|
12741 |
+
// Iterator interface in terms of a single ._invoke method.
|
12742 |
+
function defineIteratorMethods(prototype) {
|
12743 |
+
["next", "throw", "return"].forEach(function(method) {
|
12744 |
+
prototype[method] = function(arg) {
|
12745 |
+
return this._invoke(method, arg);
|
12746 |
+
};
|
12747 |
+
});
|
12748 |
+
}
|
12749 |
|
12750 |
+
exports.isGeneratorFunction = function(genFun) {
|
12751 |
+
var ctor = typeof genFun === "function" && genFun.constructor;
|
12752 |
+
return ctor
|
12753 |
+
? ctor === GeneratorFunction ||
|
12754 |
+
// For the native GeneratorFunction constructor, the best we can
|
12755 |
+
// do is to check its .name property.
|
12756 |
+
(ctor.displayName || ctor.name) === "GeneratorFunction"
|
12757 |
+
: false;
|
12758 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12759 |
|
12760 |
+
exports.mark = function(genFun) {
|
12761 |
+
if (Object.setPrototypeOf) {
|
12762 |
+
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
|
12763 |
+
} else {
|
12764 |
+
genFun.__proto__ = GeneratorFunctionPrototype;
|
12765 |
+
if (!(toStringTagSymbol in genFun)) {
|
12766 |
+
genFun[toStringTagSymbol] = "GeneratorFunction";
|
12767 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12768 |
}
|
12769 |
+
genFun.prototype = Object.create(Gp);
|
12770 |
+
return genFun;
|
12771 |
+
};
|
12772 |
|
12773 |
+
// Within the body of any async function, `await x` is transformed to
|
12774 |
+
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
|
12775 |
+
// `hasOwn.call(value, "__await")` to determine if the yielded value is
|
12776 |
+
// meant to be awaited.
|
12777 |
+
exports.awrap = function(arg) {
|
12778 |
+
return { __await: arg };
|
12779 |
+
};
|
12780 |
|
12781 |
+
function AsyncIterator(generator, PromiseImpl) {
|
12782 |
+
function invoke(method, arg, resolve, reject) {
|
12783 |
+
var record = tryCatch(generator[method], generator, arg);
|
12784 |
+
if (record.type === "throw") {
|
12785 |
+
reject(record.arg);
|
12786 |
+
} else {
|
12787 |
+
var result = record.arg;
|
12788 |
+
var value = result.value;
|
12789 |
+
if (value &&
|
12790 |
+
typeof value === "object" &&
|
12791 |
+
hasOwn.call(value, "__await")) {
|
12792 |
+
return PromiseImpl.resolve(value.__await).then(function(value) {
|
12793 |
+
invoke("next", value, resolve, reject);
|
12794 |
+
}, function(err) {
|
12795 |
+
invoke("throw", err, resolve, reject);
|
12796 |
+
});
|
12797 |
+
}
|
12798 |
+
|
12799 |
+
return PromiseImpl.resolve(value).then(function(unwrapped) {
|
12800 |
+
// When a yielded Promise is resolved, its final value becomes
|
12801 |
+
// the .value of the Promise<{value,done}> result for the
|
12802 |
+
// current iteration.
|
12803 |
+
result.value = unwrapped;
|
12804 |
+
resolve(result);
|
12805 |
+
}, function(error) {
|
12806 |
+
// If a rejected Promise was yielded, throw the rejection back
|
12807 |
+
// into the async generator function so it can be handled there.
|
12808 |
+
return invoke("throw", error, resolve, reject);
|
12809 |
+
});
|
12810 |
+
}
|
12811 |
}
|
12812 |
+
|
12813 |
+
var previousPromise;
|
12814 |
+
|
12815 |
+
function enqueue(method, arg) {
|
12816 |
+
function callInvokeWithMethodAndArg() {
|
12817 |
+
return new PromiseImpl(function(resolve, reject) {
|
12818 |
+
invoke(method, arg, resolve, reject);
|
12819 |
+
});
|
12820 |
+
}
|
12821 |
+
|
12822 |
+
return previousPromise =
|
12823 |
+
// If enqueue has been called before, then we want to wait until
|
12824 |
+
// all previous Promises have been resolved before calling invoke,
|
12825 |
+
// so that results are always delivered in the correct order. If
|
12826 |
+
// enqueue has not been called before, then it is important to
|
12827 |
+
// call invoke immediately, without waiting on a callback to fire,
|
12828 |
+
// so that the async generator function has the opportunity to do
|
12829 |
+
// any necessary setup in a predictable way. This predictability
|
12830 |
+
// is why the Promise constructor synchronously invokes its
|
12831 |
+
// executor callback, and why async functions synchronously
|
12832 |
+
// execute code before the first await. Since we implement simple
|
12833 |
+
// async functions in terms of async generators, it is especially
|
12834 |
+
// important to get this right, even though it requires care.
|
12835 |
+
previousPromise ? previousPromise.then(
|
12836 |
+
callInvokeWithMethodAndArg,
|
12837 |
+
// Avoid propagating failures to Promises returned by later
|
12838 |
+
// invocations of the iterator.
|
12839 |
+
callInvokeWithMethodAndArg
|
12840 |
+
) : callInvokeWithMethodAndArg();
|
12841 |
+
}
|
12842 |
+
|
12843 |
+
// Define the unified helper method that is used to implement .next,
|
12844 |
+
// .throw, and .return (see defineIteratorMethods).
|
12845 |
+
this._invoke = enqueue;
|
12846 |
+
}
|
12847 |
+
|
12848 |
+
defineIteratorMethods(AsyncIterator.prototype);
|
12849 |
+
AsyncIterator.prototype[asyncIteratorSymbol] = function () {
|
12850 |
+
return this;
|
12851 |
};
|
12852 |
+
exports.AsyncIterator = AsyncIterator;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12853 |
|
12854 |
+
// Note that simple async functions are implemented on top of
|
12855 |
+
// AsyncIterator objects; they just return a Promise for the value of
|
12856 |
+
// the final result produced by the iterator.
|
12857 |
+
exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
12858 |
+
if (PromiseImpl === void 0) PromiseImpl = Promise;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12859 |
|
12860 |
+
var iter = new AsyncIterator(
|
12861 |
+
wrap(innerFn, outerFn, self, tryLocsList),
|
12862 |
+
PromiseImpl
|
12863 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12864 |
|
12865 |
+
return exports.isGeneratorFunction(outerFn)
|
12866 |
+
? iter // If outerFn is a generator, return the full iterator.
|
12867 |
+
: iter.next().then(function(result) {
|
12868 |
+
return result.done ? result.value : iter.next();
|
12869 |
+
});
|
12870 |
+
};
|
12871 |
|
12872 |
+
function makeInvokeMethod(innerFn, self, context) {
|
12873 |
+
var state = GenStateSuspendedStart;
|
|
|
12874 |
|
12875 |
+
return function invoke(method, arg) {
|
12876 |
+
if (state === GenStateExecuting) {
|
12877 |
+
throw new Error("Generator is already running");
|
12878 |
+
}
|
12879 |
|
12880 |
+
if (state === GenStateCompleted) {
|
12881 |
+
if (method === "throw") {
|
12882 |
+
throw arg;
|
12883 |
+
}
|
|
|
|
|
|
|
|
|
12884 |
|
12885 |
+
// Be forgiving, per 25.3.3.3.3 of the spec:
|
12886 |
+
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
|
12887 |
+
return doneResult();
|
12888 |
+
}
|
12889 |
|
12890 |
+
context.method = method;
|
12891 |
+
context.arg = arg;
|
|
|
|
|
12892 |
|
12893 |
+
while (true) {
|
12894 |
+
var delegate = context.delegate;
|
12895 |
+
if (delegate) {
|
12896 |
+
var delegateResult = maybeInvokeDelegate(delegate, context);
|
12897 |
+
if (delegateResult) {
|
12898 |
+
if (delegateResult === ContinueSentinel) continue;
|
12899 |
+
return delegateResult;
|
12900 |
+
}
|
12901 |
+
}
|
12902 |
|
12903 |
+
if (context.method === "next") {
|
12904 |
+
// Setting context._sent for legacy support of Babel's
|
12905 |
+
// function.sent implementation.
|
12906 |
+
context.sent = context._sent = context.arg;
|
12907 |
|
12908 |
+
} else if (context.method === "throw") {
|
12909 |
+
if (state === GenStateSuspendedStart) {
|
12910 |
+
state = GenStateCompleted;
|
12911 |
+
throw context.arg;
|
12912 |
+
}
|
12913 |
|
12914 |
+
context.dispatchException(context.arg);
|
|
|
|
|
|
|
12915 |
|
12916 |
+
} else if (context.method === "return") {
|
12917 |
+
context.abrupt("return", context.arg);
|
12918 |
+
}
|
12919 |
|
12920 |
+
state = GenStateExecuting;
|
12921 |
+
|
12922 |
+
var record = tryCatch(innerFn, self, context);
|
12923 |
+
if (record.type === "normal") {
|
12924 |
+
// If an exception is thrown from innerFn, we leave state ===
|
12925 |
+
// GenStateExecuting and loop back for another invocation.
|
12926 |
+
state = context.done
|
12927 |
+
? GenStateCompleted
|
12928 |
+
: GenStateSuspendedYield;
|
12929 |
+
|
12930 |
+
if (record.arg === ContinueSentinel) {
|
12931 |
+
continue;
|
12932 |
+
}
|
12933 |
+
|
12934 |
+
return {
|
12935 |
+
value: record.arg,
|
12936 |
+
done: context.done
|
12937 |
+
};
|
12938 |
+
|
12939 |
+
} else if (record.type === "throw") {
|
12940 |
+
state = GenStateCompleted;
|
12941 |
+
// Dispatch the exception by looping back around to the
|
12942 |
+
// context.dispatchException(context.arg) call above.
|
12943 |
+
context.method = "throw";
|
12944 |
+
context.arg = record.arg;
|
12945 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12946 |
}
|
12947 |
+
};
|
12948 |
+
}
|
|
|
|
|
|
|
|
|
12949 |
|
12950 |
+
// Call delegate.iterator[context.method](context.arg) and handle the
|
12951 |
+
// result, either by returning a { value, done } result from the
|
12952 |
+
// delegate iterator, or by modifying context.method and context.arg,
|
12953 |
+
// setting context.delegate to null, and returning the ContinueSentinel.
|
12954 |
+
function maybeInvokeDelegate(delegate, context) {
|
12955 |
+
var method = delegate.iterator[context.method];
|
12956 |
+
if (method === undefined) {
|
12957 |
+
// A .throw or .return when the delegate iterator has no .throw
|
12958 |
+
// method always terminates the yield* loop.
|
12959 |
+
context.delegate = null;
|
12960 |
+
|
12961 |
+
if (context.method === "throw") {
|
12962 |
+
// Note: ["return"] must be used for ES3 parsing compatibility.
|
12963 |
+
if (delegate.iterator["return"]) {
|
12964 |
+
// If the delegate iterator has a return method, give it a
|
12965 |
+
// chance to clean up.
|
12966 |
+
context.method = "return";
|
12967 |
+
context.arg = undefined;
|
12968 |
+
maybeInvokeDelegate(delegate, context);
|
12969 |
+
|
12970 |
+
if (context.method === "throw") {
|
12971 |
+
// If maybeInvokeDelegate(context) changed context.method from
|
12972 |
+
// "return" to "throw", let that override the TypeError below.
|
12973 |
+
return ContinueSentinel;
|
12974 |
+
}
|
12975 |
+
}
|
|
|
|
|
12976 |
|
12977 |
+
context.method = "throw";
|
12978 |
+
context.arg = new TypeError(
|
12979 |
+
"The iterator does not provide a 'throw' method");
|
12980 |
+
}
|
12981 |
|
12982 |
+
return ContinueSentinel;
|
12983 |
+
}
|
|
|
12984 |
|
12985 |
+
var record = tryCatch(method, delegate.iterator, context.arg);
|
12986 |
|
12987 |
+
if (record.type === "throw") {
|
12988 |
+
context.method = "throw";
|
12989 |
+
context.arg = record.arg;
|
12990 |
+
context.delegate = null;
|
12991 |
+
return ContinueSentinel;
|
12992 |
+
}
|
|
|
|
|
12993 |
|
12994 |
+
var info = record.arg;
|
12995 |
|
12996 |
+
if (! info) {
|
12997 |
+
context.method = "throw";
|
12998 |
+
context.arg = new TypeError("iterator result is not an object");
|
12999 |
+
context.delegate = null;
|
13000 |
+
return ContinueSentinel;
|
13001 |
+
}
|
13002 |
|
13003 |
+
if (info.done) {
|
13004 |
+
// Assign the result of the finished delegate to the temporary
|
13005 |
+
// variable specified by delegate.resultName (see delegateYield).
|
13006 |
+
context[delegate.resultName] = info.value;
|
13007 |
|
13008 |
+
// Resume execution at the desired location (see delegateYield).
|
13009 |
+
context.next = delegate.nextLoc;
|
13010 |
+
|
13011 |
+
// If context.method was "throw" but the delegate handled the
|
13012 |
+
// exception, let the outer generator proceed normally. If
|
13013 |
+
// context.method was "next", forget context.arg since it has been
|
13014 |
+
// "consumed" by the delegate iterator. If context.method was
|
13015 |
+
// "return", allow the original .return call to continue in the
|
13016 |
+
// outer generator.
|
13017 |
+
if (context.method !== "return") {
|
13018 |
+
context.method = "next";
|
13019 |
+
context.arg = undefined;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13020 |
}
|
13021 |
+
|
13022 |
} else {
|
13023 |
+
// Re-yield the result returned by the delegate method.
|
13024 |
+
return info;
|
13025 |
}
|
13026 |
+
|
13027 |
+
// The delegate iterator is finished, so forget it and continue with
|
13028 |
+
// the outer generator.
|
13029 |
+
context.delegate = null;
|
13030 |
+
return ContinueSentinel;
|
13031 |
}
|
|
|
|
|
13032 |
|
13033 |
+
// Define Generator.prototype.{next,throw,return} in terms of the
|
13034 |
+
// unified ._invoke helper method.
|
13035 |
+
defineIteratorMethods(Gp);
|
|
|
|
|
|
|
|
|
|
|
13036 |
|
13037 |
+
Gp[toStringTagSymbol] = "Generator";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13038 |
|
13039 |
+
// A Generator should always return itself as the iterator object when the
|
13040 |
+
// @@iterator function is called on it. Some browsers' implementations of the
|
13041 |
+
// iterator prototype chain incorrectly implement this, causing the Generator
|
13042 |
+
// object to not be returned from this call. This ensures that doesn't happen.
|
13043 |
+
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
13044 |
+
Gp[iteratorSymbol] = function() {
|
13045 |
+
return this;
|
13046 |
+
};
|
13047 |
|
13048 |
+
Gp.toString = function() {
|
13049 |
+
return "[object Generator]";
|
13050 |
+
};
|
13051 |
|
13052 |
+
function pushTryEntry(locs) {
|
13053 |
+
var entry = { tryLoc: locs[0] };
|
13054 |
|
13055 |
+
if (1 in locs) {
|
13056 |
+
entry.catchLoc = locs[1];
|
13057 |
+
}
|
|
|
|
|
13058 |
|
13059 |
+
if (2 in locs) {
|
13060 |
+
entry.finallyLoc = locs[2];
|
13061 |
+
entry.afterLoc = locs[3];
|
|
|
|
|
13062 |
}
|
13063 |
+
|
13064 |
+
this.tryEntries.push(entry);
|
13065 |
}
|
13066 |
|
13067 |
+
function resetTryEntry(entry) {
|
13068 |
+
var record = entry.completion || {};
|
13069 |
+
record.type = "normal";
|
13070 |
+
delete record.arg;
|
13071 |
+
entry.completion = record;
|
13072 |
+
}
|
13073 |
|
13074 |
+
function Context(tryLocsList) {
|
13075 |
+
// The root entry object (effectively a try statement without a catch
|
13076 |
+
// or a finally block) gives us a place to store values thrown from
|
13077 |
+
// locations where there is no enclosing try statement.
|
13078 |
+
this.tryEntries = [{ tryLoc: "root" }];
|
13079 |
+
tryLocsList.forEach(pushTryEntry, this);
|
13080 |
+
this.reset(true);
|
13081 |
}
|
13082 |
|
13083 |
+
exports.keys = function(object) {
|
13084 |
+
var keys = [];
|
13085 |
+
for (var key in object) {
|
13086 |
+
keys.push(key);
|
13087 |
+
}
|
13088 |
+
keys.reverse();
|
13089 |
+
|
13090 |
+
// Rather than returning an object with a next method, we keep
|
13091 |
+
// things simple and return the next function itself.
|
13092 |
+
return function next() {
|
13093 |
+
while (keys.length) {
|
13094 |
+
var key = keys.pop();
|
13095 |
+
if (key in object) {
|
13096 |
+
next.value = key;
|
13097 |
+
next.done = false;
|
13098 |
+
return next;
|
13099 |
+
}
|
13100 |
}
|
|
|
13101 |
|
13102 |
+
// To avoid creating an additional object, we just hang the .value
|
13103 |
+
// and .done properties off the next function object itself. This
|
13104 |
+
// also ensures that the minifier will not anonymize the function.
|
13105 |
+
next.done = true;
|
13106 |
+
return next;
|
13107 |
+
};
|
13108 |
+
};
|
13109 |
|
13110 |
+
function values(iterable) {
|
13111 |
+
if (iterable) {
|
13112 |
+
var iteratorMethod = iterable[iteratorSymbol];
|
13113 |
+
if (iteratorMethod) {
|
13114 |
+
return iteratorMethod.call(iterable);
|
13115 |
+
}
|
13116 |
|
13117 |
+
if (typeof iterable.next === "function") {
|
13118 |
+
return iterable;
|
|
|
|
|
13119 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13120 |
|
13121 |
+
if (!isNaN(iterable.length)) {
|
13122 |
+
var i = -1, next = function next() {
|
13123 |
+
while (++i < iterable.length) {
|
13124 |
+
if (hasOwn.call(iterable, i)) {
|
13125 |
+
next.value = iterable[i];
|
13126 |
+
next.done = false;
|
13127 |
+
return next;
|
13128 |
+
}
|
13129 |
+
}
|
13130 |
+
|
13131 |
+
next.value = undefined;
|
13132 |
+
next.done = true;
|
13133 |
+
|
13134 |
+
return next;
|
13135 |
+
};
|
13136 |
+
|
13137 |
+
return next.next = next;
|
13138 |
}
|
13139 |
}
|
13140 |
|
13141 |
+
// Return an iterator with no values.
|
13142 |
+
return { next: doneResult };
|
13143 |
}
|
13144 |
+
exports.values = values;
|
|
|
13145 |
|
13146 |
+
function doneResult() {
|
13147 |
+
return { value: undefined, done: true };
|
|
|
|
|
|
|
|
|
|
|
13148 |
}
|
|
|
|
|
13149 |
|
13150 |
+
Context.prototype = {
|
13151 |
+
constructor: Context,
|
13152 |
|
13153 |
+
reset: function(skipTempReset) {
|
13154 |
+
this.prev = 0;
|
13155 |
+
this.next = 0;
|
13156 |
+
// Resetting context._sent for legacy support of Babel's
|
13157 |
+
// function.sent implementation.
|
13158 |
+
this.sent = this._sent = undefined;
|
13159 |
+
this.done = false;
|
13160 |
+
this.delegate = null;
|
13161 |
|
13162 |
+
this.method = "next";
|
13163 |
+
this.arg = undefined;
|
13164 |
|
13165 |
+
this.tryEntries.forEach(resetTryEntry);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13166 |
|
13167 |
+
if (!skipTempReset) {
|
13168 |
+
for (var name in this) {
|
13169 |
+
// Not sure about the optimal order of these conditions:
|
13170 |
+
if (name.charAt(0) === "t" &&
|
13171 |
+
hasOwn.call(this, name) &&
|
13172 |
+
!isNaN(+name.slice(1))) {
|
13173 |
+
this[name] = undefined;
|
13174 |
+
}
|
13175 |
+
}
|
13176 |
+
}
|
13177 |
+
},
|
13178 |
|
13179 |
+
stop: function() {
|
13180 |
+
this.done = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13181 |
|
13182 |
+
var rootEntry = this.tryEntries[0];
|
13183 |
+
var rootRecord = rootEntry.completion;
|
13184 |
+
if (rootRecord.type === "throw") {
|
13185 |
+
throw rootRecord.arg;
|
13186 |
+
}
|
13187 |
|
13188 |
+
return this.rval;
|
13189 |
+
},
|
|
|
|
|
|
|
|
|
|
|
|
|
13190 |
|
13191 |
+
dispatchException: function(exception) {
|
13192 |
+
if (this.done) {
|
13193 |
+
throw exception;
|
13194 |
+
}
|
13195 |
|
13196 |
+
var context = this;
|
13197 |
+
function handle(loc, caught) {
|
13198 |
+
record.type = "throw";
|
13199 |
+
record.arg = exception;
|
13200 |
+
context.next = loc;
|
13201 |
+
|
13202 |
+
if (caught) {
|
13203 |
+
// If the dispatched exception was caught by a catch block,
|
13204 |
+
// then let that catch block handle the exception normally.
|
13205 |
+
context.method = "next";
|
13206 |
+
context.arg = undefined;
|
13207 |
+
}
|
13208 |
|
13209 |
+
return !! caught;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13210 |
}
|
|
|
|
|
|
|
13211 |
|
13212 |
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
13213 |
+
var entry = this.tryEntries[i];
|
13214 |
+
var record = entry.completion;
|
|
|
13215 |
|
13216 |
+
if (entry.tryLoc === "root") {
|
13217 |
+
// Exception thrown outside of any try block that could handle
|
13218 |
+
// it, so set the completion value of the entire function to
|
13219 |
+
// throw the exception.
|
13220 |
+
return handle("end");
|
13221 |
+
}
|
13222 |
|
13223 |
+
if (entry.tryLoc <= this.prev) {
|
13224 |
+
var hasCatch = hasOwn.call(entry, "catchLoc");
|
13225 |
+
var hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13226 |
|
13227 |
+
if (hasCatch && hasFinally) {
|
13228 |
+
if (this.prev < entry.catchLoc) {
|
13229 |
+
return handle(entry.catchLoc, true);
|
13230 |
+
} else if (this.prev < entry.finallyLoc) {
|
13231 |
+
return handle(entry.finallyLoc);
|
13232 |
+
}
|
13233 |
+
|
13234 |
+
} else if (hasCatch) {
|
13235 |
+
if (this.prev < entry.catchLoc) {
|
13236 |
+
return handle(entry.catchLoc, true);
|
13237 |
+
}
|
13238 |
+
|
13239 |
+
} else if (hasFinally) {
|
13240 |
+
if (this.prev < entry.finallyLoc) {
|
13241 |
+
return handle(entry.finallyLoc);
|
13242 |
+
}
|
13243 |
|
13244 |
+
} else {
|
13245 |
+
throw new Error("try statement without catch or finally");
|
13246 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13247 |
}
|
13248 |
+
}
|
13249 |
+
},
|
|
|
|
|
|
|
|
|
13250 |
|
13251 |
+
abrupt: function(type, arg) {
|
13252 |
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
13253 |
+
var entry = this.tryEntries[i];
|
13254 |
+
if (entry.tryLoc <= this.prev &&
|
13255 |
+
hasOwn.call(entry, "finallyLoc") &&
|
13256 |
+
this.prev < entry.finallyLoc) {
|
13257 |
+
var finallyEntry = entry;
|
13258 |
+
break;
|
13259 |
+
}
|
13260 |
+
}
|
13261 |
|
13262 |
+
if (finallyEntry &&
|
13263 |
+
(type === "break" ||
|
13264 |
+
type === "continue") &&
|
13265 |
+
finallyEntry.tryLoc <= arg &&
|
13266 |
+
arg <= finallyEntry.finallyLoc) {
|
13267 |
+
// Ignore the finally entry if control is not jumping to a
|
13268 |
+
// location outside the try/catch block.
|
13269 |
+
finallyEntry = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13270 |
}
|
13271 |
+
|
13272 |
+
var record = finallyEntry ? finallyEntry.completion : {};
|
13273 |
+
record.type = type;
|
13274 |
+
record.arg = arg;
|
13275 |
+
|
13276 |
+
if (finallyEntry) {
|
13277 |
+
this.method = "next";
|
13278 |
+
this.next = finallyEntry.finallyLoc;
|
13279 |
+
return ContinueSentinel;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13280 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13281 |
|
13282 |
+
return this.complete(record);
|
13283 |
+
},
|
13284 |
|
13285 |
+
complete: function(record, afterLoc) {
|
13286 |
+
if (record.type === "throw") {
|
13287 |
+
throw record.arg;
|
13288 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13289 |
|
13290 |
+
if (record.type === "break" ||
|
13291 |
+
record.type === "continue") {
|
13292 |
+
this.next = record.arg;
|
13293 |
+
} else if (record.type === "return") {
|
13294 |
+
this.rval = this.arg = record.arg;
|
13295 |
+
this.method = "return";
|
13296 |
+
this.next = "end";
|
13297 |
+
} else if (record.type === "normal" && afterLoc) {
|
13298 |
+
this.next = afterLoc;
|
13299 |
+
}
|
13300 |
|
13301 |
+
return ContinueSentinel;
|
13302 |
+
},
|
|
|
13303 |
|
13304 |
+
finish: function(finallyLoc) {
|
13305 |
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
13306 |
+
var entry = this.tryEntries[i];
|
13307 |
+
if (entry.finallyLoc === finallyLoc) {
|
13308 |
+
this.complete(entry.completion, entry.afterLoc);
|
13309 |
+
resetTryEntry(entry);
|
13310 |
+
return ContinueSentinel;
|
13311 |
+
}
|
13312 |
+
}
|
13313 |
+
},
|
13314 |
+
|
13315 |
+
"catch": function(tryLoc) {
|
13316 |
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
13317 |
+
var entry = this.tryEntries[i];
|
13318 |
+
if (entry.tryLoc === tryLoc) {
|
13319 |
+
var record = entry.completion;
|
13320 |
+
if (record.type === "throw") {
|
13321 |
+
var thrown = record.arg;
|
13322 |
+
resetTryEntry(entry);
|
|
|
13323 |
}
|
13324 |
+
return thrown;
|
13325 |
}
|
13326 |
+
}
|
13327 |
+
|
13328 |
+
// The context.catch method must only be called with a location
|
13329 |
+
// argument that corresponds to a known catch block.
|
13330 |
+
throw new Error("illegal catch attempt");
|
13331 |
+
},
|
13332 |
+
|
13333 |
+
delegateYield: function(iterable, resultName, nextLoc) {
|
13334 |
+
this.delegate = {
|
13335 |
+
iterator: values(iterable),
|
13336 |
+
resultName: resultName,
|
13337 |
+
nextLoc: nextLoc
|
13338 |
+
};
|
13339 |
+
|
13340 |
+
if (this.method === "next") {
|
13341 |
+
// Deliberately forget the last sent value so that we don't
|
13342 |
+
// accidentally pass it on to the delegate.
|
13343 |
+
this.arg = undefined;
|
13344 |
+
}
|
13345 |
+
|
13346 |
+
return ContinueSentinel;
|
13347 |
}
|
13348 |
+
};
|
|
|
13349 |
|
13350 |
+
// Regardless of whether this script is executing as a CommonJS module
|
13351 |
+
// or not, return the runtime object so that we can declare the variable
|
13352 |
+
// regeneratorRuntime in the outer scope, which allows this module to be
|
13353 |
+
// injected easily by `bin/regenerator --include-runtime script.js`.
|
13354 |
+
return exports;
|
13355 |
+
|
13356 |
+
}(
|
13357 |
+
// If this script is executing as a CommonJS module, use module.exports
|
13358 |
+
// as the regeneratorRuntime namespace. Otherwise create a new empty
|
13359 |
+
// object. Either way, the resulting object will be used to initialize
|
13360 |
+
// the regeneratorRuntime variable at the top of this file.
|
13361 |
+
true ? module.exports : undefined
|
13362 |
+
));
|
13363 |
+
|
13364 |
+
try {
|
13365 |
+
regeneratorRuntime = runtime;
|
13366 |
+
} catch (accidentalStrictMode) {
|
13367 |
+
// This module should not be running in strict mode, so the above
|
13368 |
+
// assignment should always work unless something is misconfigured. Just
|
13369 |
+
// in case runtime.js accidentally runs in strict mode, we can escape
|
13370 |
+
// strict mode using a global Function call. This could conceivably fail
|
13371 |
+
// if a Content Security Policy forbids using Function, but in that case
|
13372 |
+
// the proper solution is to fix the accidental strict mode problem. If
|
13373 |
+
// you've misconfigured your bundler to force strict mode and applied a
|
13374 |
+
// CSP to forbid Function, and you're not willing to fix either of those
|
13375 |
+
// problems, please detail your unique predicament in a GitHub issue.
|
13376 |
+
Function("r", "regeneratorRuntime = r")(runtime);
|
13377 |
+
}
|
13378 |
|
13379 |
|
13380 |
/***/ }),
|
13381 |
+
|
13382 |
+
/***/ 433:
|
13383 |
/***/ (function(module, exports, __webpack_require__) {
|
13384 |
|
13385 |
+
// extracted by mini-css-extract-plugin
|
|
|
13386 |
|
13387 |
+
/***/ }),
|
13388 |
+
|
13389 |
+
/***/ 434:
|
13390 |
+
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
13391 |
|
13392 |
+
// extracted by mini-css-extract-plugin
|
13393 |
|
13394 |
/***/ }),
|
|
|
|
|
13395 |
|
13396 |
+
/***/ 435:
|
13397 |
+
/***/ (function(module, exports, __webpack_require__) {
|
13398 |
|
13399 |
+
// extracted by mini-css-extract-plugin
|
|
|
|
|
|
|
13400 |
|
13401 |
+
/***/ }),
|
|
|
13402 |
|
13403 |
+
/***/ 436:
|
13404 |
+
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13405 |
|
13406 |
+
// extracted by mini-css-extract-plugin
|
13407 |
|
13408 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13409 |
|
13410 |
+
/***/ 437:
|
13411 |
+
/***/ (function(module, exports, __webpack_require__) {
|
13412 |
|
13413 |
+
"use strict";
|
13414 |
|
|
|
|
|
|
|
|
|
|
|
13415 |
|
13416 |
+
/**
|
13417 |
+
* Copyright 2015, Yahoo! Inc.
|
13418 |
+
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
|
13419 |
+
*/
|
13420 |
+
var REACT_STATICS = {
|
13421 |
+
childContextTypes: true,
|
13422 |
+
contextTypes: true,
|
13423 |
+
defaultProps: true,
|
13424 |
+
displayName: true,
|
13425 |
+
getDefaultProps: true,
|
13426 |
+
getDerivedStateFromProps: true,
|
13427 |
+
mixins: true,
|
13428 |
+
propTypes: true,
|
13429 |
+
type: true
|
13430 |
+
};
|
13431 |
|
13432 |
+
var KNOWN_STATICS = {
|
13433 |
+
name: true,
|
13434 |
+
length: true,
|
13435 |
+
prototype: true,
|
13436 |
+
caller: true,
|
13437 |
+
callee: true,
|
13438 |
+
arguments: true,
|
13439 |
+
arity: true
|
13440 |
+
};
|
13441 |
|
13442 |
+
var defineProperty = Object.defineProperty;
|
13443 |
+
var getOwnPropertyNames = Object.getOwnPropertyNames;
|
13444 |
+
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
13445 |
+
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
13446 |
+
var getPrototypeOf = Object.getPrototypeOf;
|
13447 |
+
var objectPrototype = getPrototypeOf && getPrototypeOf(Object);
|
13448 |
+
|
13449 |
+
function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
|
13450 |
+
if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components
|
13451 |
+
|
13452 |
+
if (objectPrototype) {
|
13453 |
+
var inheritedComponent = getPrototypeOf(sourceComponent);
|
13454 |
+
if (inheritedComponent && inheritedComponent !== objectPrototype) {
|
13455 |
+
hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
|
13456 |
}
|
13457 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13458 |
|
13459 |
+
var keys = getOwnPropertyNames(sourceComponent);
|
13460 |
+
|
13461 |
+
if (getOwnPropertySymbols) {
|
13462 |
+
keys = keys.concat(getOwnPropertySymbols(sourceComponent));
|
|
|
13463 |
}
|
13464 |
+
|
13465 |
+
for (var i = 0; i < keys.length; ++i) {
|
13466 |
+
var key = keys[i];
|
13467 |
+
if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) {
|
13468 |
+
var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
|
13469 |
+
try { // Avoid failures from read-only properties
|
13470 |
+
defineProperty(targetComponent, key, descriptor);
|
13471 |
+
} catch (e) {}
|
13472 |
+
}
|
13473 |
+
}
|
13474 |
+
|
13475 |
+
return targetComponent;
|
13476 |
}
|
|
|
|
|
|
|
|
|
|
|
13477 |
|
13478 |
+
return targetComponent;
|
|
|
|
|
|
|
13479 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13480 |
|
13481 |
+
module.exports = hoistNonReactStatics;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13482 |
|
|
|
13483 |
|
13484 |
+
/***/ }),
|
|
|
|
|
13485 |
|
13486 |
+
/***/ 438:
|
13487 |
+
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
13488 |
|
13489 |
+
// extracted by mini-css-extract-plugin
|
13490 |
|
13491 |
/***/ }),
|
13492 |
+
|
13493 |
+
/***/ 439:
|
13494 |
/***/ (function(module, exports, __webpack_require__) {
|
13495 |
|
13496 |
+
// extracted by mini-css-extract-plugin
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13497 |
|
13498 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
13499 |
|
13500 |
+
/***/ 44:
|
13501 |
+
/***/ (function(module, exports, __webpack_require__) {
|
13502 |
+
|
13503 |
+
var _typeof = __webpack_require__(43);
|
13504 |
+
|
13505 |
+
var assertThisInitialized = __webpack_require__(59);
|
13506 |
+
|
13507 |
+
function _possibleConstructorReturn(self, call) {
|
13508 |
+
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
13509 |
+
return call;
|
13510 |
+
}
|
13511 |
+
|
13512 |
+
return assertThisInitialized(self);
|
13513 |
+
}
|
13514 |
+
|
13515 |
+
module.exports = _possibleConstructorReturn;
|
13516 |
|
13517 |
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13518 |
|
13519 |
+
/***/ 440:
|
13520 |
+
/***/ (function(module, exports) {
|
13521 |
|
13522 |
+
module.exports = Array.isArray || function (arr) {
|
13523 |
+
return Object.prototype.toString.call(arr) == '[object Array]';
|
13524 |
+
};
|
13525 |
|
|
|
13526 |
|
13527 |
+
/***/ }),
|
13528 |
|
13529 |
+
/***/ 441:
|
13530 |
+
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
13531 |
|
13532 |
+
// extracted by mini-css-extract-plugin
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13533 |
|
13534 |
+
/***/ }),
|
|
|
|
|
13535 |
|
13536 |
+
/***/ 442:
|
13537 |
+
/***/ (function(module, exports) {
|
|
|
13538 |
|
13539 |
+
module.exports = function(originalModule) {
|
13540 |
+
if (!originalModule.webpackPolyfill) {
|
13541 |
+
var module = Object.create(originalModule);
|
13542 |
+
// module.parent = undefined by default
|
13543 |
+
if (!module.children) module.children = [];
|
13544 |
+
Object.defineProperty(module, "loaded", {
|
13545 |
+
enumerable: true,
|
13546 |
+
get: function() {
|
13547 |
+
return module.l;
|
13548 |
+
}
|
13549 |
+
});
|
13550 |
+
Object.defineProperty(module, "id", {
|
13551 |
+
enumerable: true,
|
13552 |
+
get: function() {
|
13553 |
+
return module.i;
|
13554 |
+
}
|
13555 |
+
});
|
13556 |
+
Object.defineProperty(module, "exports", {
|
13557 |
+
enumerable: true
|
13558 |
+
});
|
13559 |
+
module.webpackPolyfill = 1;
|
13560 |
+
}
|
13561 |
+
return module;
|
13562 |
};
|
|
|
|
|
|
|
|
|
13563 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13564 |
|
13565 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13566 |
|
13567 |
+
/***/ 443:
|
13568 |
+
/***/ (function(module, exports, __webpack_require__) {
|
13569 |
|
13570 |
+
var arrayLikeToArray = __webpack_require__(269);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13571 |
|
13572 |
+
function _arrayWithoutHoles(arr) {
|
13573 |
+
if (Array.isArray(arr)) return arrayLikeToArray(arr);
|
13574 |
}
|
13575 |
|
13576 |
+
module.exports = _arrayWithoutHoles;
|
|
|
|
|
|
|
|
|
|
|
|
|
13577 |
|
13578 |
+
/***/ }),
|
13579 |
+
|
13580 |
+
/***/ 444:
|
13581 |
+
/***/ (function(module, exports) {
|
13582 |
+
|
13583 |
+
function _iterableToArray(iter) {
|
13584 |
+
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
|
13585 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13586 |
|
13587 |
+
module.exports = _iterableToArray;
|
13588 |
+
|
13589 |
+
/***/ }),
|
13590 |
+
|
13591 |
+
/***/ 445:
|
13592 |
+
/***/ (function(module, exports) {
|
13593 |
+
|
13594 |
+
function _nonIterableSpread() {
|
13595 |
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
13596 |
}
|
13597 |
|
13598 |
+
module.exports = _nonIterableSpread;
|
|
|
|
|
|
|
|
|
|
|
|
|
13599 |
|
13600 |
+
/***/ }),
|
13601 |
|
13602 |
+
/***/ 46:
|
13603 |
+
/***/ (function(module, exports) {
|
|
|
13604 |
|
13605 |
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
13606 |
+
try {
|
13607 |
+
var info = gen[key](arg);
|
13608 |
+
var value = info.value;
|
13609 |
+
} catch (error) {
|
13610 |
+
reject(error);
|
13611 |
+
return;
|
13612 |
+
}
|
13613 |
|
13614 |
+
if (info.done) {
|
13615 |
+
resolve(value);
|
13616 |
+
} else {
|
13617 |
+
Promise.resolve(value).then(_next, _throw);
|
13618 |
+
}
|
13619 |
+
}
|
13620 |
|
13621 |
+
function _asyncToGenerator(fn) {
|
13622 |
+
return function () {
|
13623 |
+
var self = this,
|
13624 |
+
args = arguments;
|
13625 |
+
return new Promise(function (resolve, reject) {
|
13626 |
+
var gen = fn.apply(self, args);
|
13627 |
|
13628 |
+
function _next(value) {
|
13629 |
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
13630 |
+
}
|
13631 |
|
13632 |
+
function _throw(err) {
|
13633 |
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
13634 |
+
}
|
|
|
13635 |
|
13636 |
+
_next(undefined);
|
13637 |
+
});
|
|
|
|
|
13638 |
};
|
13639 |
+
}
|
13640 |
|
13641 |
+
module.exports = _asyncToGenerator;
|
|
|
|
|
|
|
|
|
|
|
13642 |
|
13643 |
+
/***/ }),
|
|
|
13644 |
|
13645 |
+
/***/ 48:
|
13646 |
+
/***/ (function(module, exports) {
|
|
|
13647 |
|
13648 |
+
(function() { module.exports = this["wp"]["hooks"]; }());
|
|
|
13649 |
|
13650 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
13651 |
|
13652 |
+
/***/ 5:
|
13653 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
13654 |
|
13655 |
+
"use strict";
|
13656 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _assertThisInitialized; });
|
13657 |
+
function _assertThisInitialized(self) {
|
13658 |
+
if (self === void 0) {
|
13659 |
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
13660 |
}
|
13661 |
|
13662 |
+
return self;
|
13663 |
+
}
|
|
|
|
|
|
|
|
|
13664 |
|
13665 |
+
/***/ }),
|
|
|
13666 |
|
13667 |
+
/***/ 50:
|
13668 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
13669 |
|
13670 |
+
"use strict";
|
|
|
13671 |
|
13672 |
+
// EXPORTS
|
13673 |
+
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ build_module_focus; });
|
|
|
|
|
|
|
13674 |
|
13675 |
+
// UNUSED EXPORTS: isHorizontalEdge, isVerticalEdge, getRectangleFromRange, computeCaretRect, placeCaretAtHorizontalEdge, placeCaretAtVerticalEdge, isTextField, documentHasSelection, isEntirelySelected, getScrollContainer, getOffsetParent, replace, remove, insertAfter, unwrap, replaceTag, wrap, __unstableStripHTML
|
|
|
|
|
|
|
|
|
13676 |
|
13677 |
+
// NAMESPACE OBJECT: ./node_modules/@wordpress/dom/build-module/focusable.js
|
13678 |
+
var focusable_namespaceObject = {};
|
13679 |
+
__webpack_require__.r(focusable_namespaceObject);
|
13680 |
+
__webpack_require__.d(focusable_namespaceObject, "find", function() { return find; });
|
13681 |
+
|
13682 |
+
// NAMESPACE OBJECT: ./node_modules/@wordpress/dom/build-module/tabbable.js
|
13683 |
+
var tabbable_namespaceObject = {};
|
13684 |
+
__webpack_require__.r(tabbable_namespaceObject);
|
13685 |
+
__webpack_require__.d(tabbable_namespaceObject, "isTabbableIndex", function() { return isTabbableIndex; });
|
13686 |
+
__webpack_require__.d(tabbable_namespaceObject, "find", function() { return tabbable_find; });
|
13687 |
+
__webpack_require__.d(tabbable_namespaceObject, "findPrevious", function() { return findPrevious; });
|
13688 |
+
__webpack_require__.d(tabbable_namespaceObject, "findNext", function() { return findNext; });
|
13689 |
+
|
13690 |
+
// CONCATENATED MODULE: ./node_modules/@wordpress/dom/build-module/focusable.js
|
13691 |
+
/**
|
13692 |
+
* References:
|
13693 |
+
*
|
13694 |
+
* Focusable:
|
13695 |
+
* - https://www.w3.org/TR/html5/editing.html#focus-management
|
13696 |
+
*
|
13697 |
+
* Sequential focus navigation:
|
13698 |
+
* - https://www.w3.org/TR/html5/editing.html#sequential-focus-navigation-and-the-tabindex-attribute
|
13699 |
+
*
|
13700 |
+
* Disabled elements:
|
13701 |
+
* - https://www.w3.org/TR/html5/disabled-elements.html#disabled-elements
|
13702 |
+
*
|
13703 |
+
* getClientRects algorithm (requiring layout box):
|
13704 |
+
* - https://www.w3.org/TR/cssom-view-1/#extension-to-the-element-interface
|
13705 |
+
*
|
13706 |
+
* AREA elements associated with an IMG:
|
13707 |
+
* - https://w3c.github.io/html/editing.html#data-model
|
13708 |
+
*/
|
13709 |
+
var SELECTOR = ['[tabindex]', 'a[href]', 'button:not([disabled])', 'input:not([type="hidden"]):not([disabled])', 'select:not([disabled])', 'textarea:not([disabled])', 'iframe', 'object', 'embed', 'area[href]', '[contenteditable]:not([contenteditable=false])'].join(',');
|
13710 |
+
/**
|
13711 |
+
* Returns true if the specified element is visible (i.e. neither display: none
|
13712 |
+
* nor visibility: hidden).
|
13713 |
+
*
|
13714 |
+
* @param {Element} element DOM element to test.
|
13715 |
+
*
|
13716 |
+
* @return {boolean} Whether element is visible.
|
13717 |
+
*/
|
13718 |
+
|
13719 |
+
function isVisible(element) {
|
13720 |
+
return element.offsetWidth > 0 || element.offsetHeight > 0 || element.getClientRects().length > 0;
|
13721 |
+
}
|
13722 |
+
/**
|
13723 |
+
* Returns true if the specified area element is a valid focusable element, or
|
13724 |
+
* false otherwise. Area is only focusable if within a map where a named map
|
13725 |
+
* referenced by an image somewhere in the document.
|
13726 |
+
*
|
13727 |
+
* @param {Element} element DOM area element to test.
|
13728 |
+
*
|
13729 |
+
* @return {boolean} Whether area element is valid for focus.
|
13730 |
+
*/
|
13731 |
+
|
13732 |
+
|
13733 |
+
function isValidFocusableArea(element) {
|
13734 |
+
var map = element.closest('map[name]');
|
13735 |
+
|
13736 |
+
if (!map) {
|
13737 |
+
return false;
|
13738 |
}
|
13739 |
|
13740 |
+
var img = document.querySelector('img[usemap="#' + map.name + '"]');
|
13741 |
+
return !!img && isVisible(img);
|
13742 |
+
}
|
13743 |
+
/**
|
13744 |
+
* Returns all focusable elements within a given context.
|
13745 |
+
*
|
13746 |
+
* @param {Element} context Element in which to search.
|
13747 |
+
*
|
13748 |
+
* @return {Element[]} Focusable elements.
|
13749 |
+
*/
|
13750 |
|
13751 |
+
|
13752 |
+
function find(context) {
|
13753 |
+
var elements = context.querySelectorAll(SELECTOR);
|
13754 |
+
return Array.from(elements).filter(function (element) {
|
13755 |
+
if (!isVisible(element)) {
|
13756 |
+
return false;
|
13757 |
}
|
13758 |
|
13759 |
+
var nodeName = element.nodeName;
|
13760 |
|
13761 |
+
if ('AREA' === nodeName) {
|
13762 |
+
return isValidFocusableArea(element);
|
|
|
|
|
13763 |
}
|
13764 |
|
13765 |
+
return true;
|
13766 |
+
});
|
13767 |
+
}
|
13768 |
+
//# sourceMappingURL=focusable.js.map
|
13769 |
+
// EXTERNAL MODULE: external "lodash"
|
13770 |
+
var external_lodash_ = __webpack_require__(2);
|
13771 |
|
13772 |
+
// CONCATENATED MODULE: ./node_modules/@wordpress/dom/build-module/tabbable.js
|
13773 |
+
/**
|
13774 |
+
* External dependencies
|
13775 |
+
*/
|
13776 |
|
13777 |
+
/**
|
13778 |
+
* Internal dependencies
|
13779 |
+
*/
|
13780 |
|
13781 |
+
|
13782 |
+
/**
|
13783 |
+
* Returns the tab index of the given element. In contrast with the tabIndex
|
13784 |
+
* property, this normalizes the default (0) to avoid browser inconsistencies,
|
13785 |
+
* operating under the assumption that this function is only ever called with a
|
13786 |
+
* focusable node.
|
13787 |
+
*
|
13788 |
+
* @see https://bugzilla.mozilla.org/show_bug.cgi?id=1190261
|
13789 |
+
*
|
13790 |
+
* @param {Element} element Element from which to retrieve.
|
13791 |
+
*
|
13792 |
+
* @return {?number} Tab index of element (default 0).
|
13793 |
+
*/
|
13794 |
+
|
13795 |
+
function getTabIndex(element) {
|
13796 |
+
var tabIndex = element.getAttribute('tabindex');
|
13797 |
+
return tabIndex === null ? 0 : parseInt(tabIndex, 10);
|
13798 |
}
|
13799 |
+
/**
|
13800 |
+
* Returns true if the specified element is tabbable, or false otherwise.
|
13801 |
+
*
|
13802 |
+
* @param {Element} element Element to test.
|
13803 |
+
*
|
13804 |
+
* @return {boolean} Whether element is tabbable.
|
13805 |
+
*/
|
13806 |
+
|
13807 |
+
|
13808 |
+
function isTabbableIndex(element) {
|
13809 |
+
return getTabIndex(element) !== -1;
|
13810 |
}
|
13811 |
+
/**
|
13812 |
+
* Returns a stateful reducer function which constructs a filtered array of
|
13813 |
+
* tabbable elements, where at most one radio input is selected for a given
|
13814 |
+
* name, giving priority to checked input, falling back to the first
|
13815 |
+
* encountered.
|
13816 |
+
*
|
13817 |
+
* @return {Function} Radio group collapse reducer.
|
13818 |
+
*/
|
13819 |
+
|
13820 |
+
function createStatefulCollapseRadioGroup() {
|
13821 |
+
var CHOSEN_RADIO_BY_NAME = {};
|
13822 |
+
return function collapseRadioGroup(result, element) {
|
13823 |
+
var nodeName = element.nodeName,
|
13824 |
+
type = element.type,
|
13825 |
+
checked = element.checked,
|
13826 |
+
name = element.name; // For all non-radio tabbables, construct to array by concatenating.
|
13827 |
+
|
13828 |
+
if (nodeName !== 'INPUT' || type !== 'radio' || !name) {
|
13829 |
+
return result.concat(element);
|
13830 |
+
}
|
13831 |
+
|
13832 |
+
var hasChosen = CHOSEN_RADIO_BY_NAME.hasOwnProperty(name); // Omit by skipping concatenation if the radio element is not chosen.
|
13833 |
+
|
13834 |
+
var isChosen = checked || !hasChosen;
|
13835 |
+
|
13836 |
+
if (!isChosen) {
|
13837 |
+
return result;
|
13838 |
+
} // At this point, if there had been a chosen element, the current
|
13839 |
+
// element is checked and should take priority. Retroactively remove
|
13840 |
+
// the element which had previously been considered the chosen one.
|
13841 |
+
|
13842 |
+
|
13843 |
+
if (hasChosen) {
|
13844 |
+
var hadChosenElement = CHOSEN_RADIO_BY_NAME[name];
|
13845 |
+
result = Object(external_lodash_["without"])(result, hadChosenElement);
|
13846 |
+
}
|
13847 |
+
|
13848 |
+
CHOSEN_RADIO_BY_NAME[name] = element;
|
13849 |
+
return result.concat(element);
|
13850 |
+
};
|
13851 |
}
|
13852 |
+
/**
|
13853 |
+
* An array map callback, returning an object with the element value and its
|
13854 |
+
* array index location as properties. This is used to emulate a proper stable
|
13855 |
+
* sort where equal tabIndex should be left in order of their occurrence in the
|
13856 |
+
* document.
|
13857 |
+
*
|
13858 |
+
* @param {Element} element Element.
|
13859 |
+
* @param {number} index Array index of element.
|
13860 |
+
*
|
13861 |
+
* @return {Object} Mapped object with element, index.
|
13862 |
+
*/
|
13863 |
+
|
13864 |
+
|
13865 |
+
function mapElementToObjectTabbable(element, index) {
|
13866 |
+
return {
|
13867 |
+
element: element,
|
13868 |
+
index: index
|
13869 |
+
};
|
13870 |
}
|
13871 |
+
/**
|
13872 |
+
* An array map callback, returning an element of the given mapped object's
|
13873 |
+
* element value.
|
13874 |
+
*
|
13875 |
+
* @param {Object} object Mapped object with index.
|
13876 |
+
*
|
13877 |
+
* @return {Element} Mapped object element.
|
13878 |
+
*/
|
13879 |
+
|
13880 |
+
|
13881 |
+
function mapObjectTabbableToElement(object) {
|
13882 |
+
return object.element;
|
13883 |
}
|
13884 |
+
/**
|
13885 |
+
* A sort comparator function used in comparing two objects of mapped elements.
|
13886 |
+
*
|
13887 |
+
* @see mapElementToObjectTabbable
|
13888 |
+
*
|
13889 |
+
* @param {Object} a First object to compare.
|
13890 |
+
* @param {Object} b Second object to compare.
|
13891 |
+
*
|
13892 |
+
* @return {number} Comparator result.
|
13893 |
+
*/
|
13894 |
+
|
13895 |
+
|
13896 |
+
function compareObjectTabbables(a, b) {
|
13897 |
+
var aTabIndex = getTabIndex(a.element);
|
13898 |
+
var bTabIndex = getTabIndex(b.element);
|
13899 |
+
|
13900 |
+
if (aTabIndex === bTabIndex) {
|
13901 |
+
return a.index - b.index;
|
13902 |
+
}
|
13903 |
+
|
13904 |
+
return aTabIndex - bTabIndex;
|
13905 |
}
|
13906 |
+
/**
|
13907 |
+
* Givin focusable elements, filters out tabbable element.
|
13908 |
+
*
|
13909 |
+
* @param {Array} focusables Focusable elements to filter.
|
13910 |
+
*
|
13911 |
+
* @return {Array} Tabbable elements.
|
13912 |
+
*/
|
13913 |
+
|
13914 |
+
|
13915 |
+
function filterTabbable(focusables) {
|
13916 |
+
return focusables.filter(isTabbableIndex).map(mapElementToObjectTabbable).sort(compareObjectTabbables).map(mapObjectTabbableToElement).reduce(createStatefulCollapseRadioGroup(), []);
|
13917 |
}
|
13918 |
+
|
13919 |
+
function tabbable_find(context) {
|
13920 |
+
return filterTabbable(find(context));
|
13921 |
}
|
13922 |
+
/**
|
13923 |
+
* Given a focusable element, find the preceding tabbable element.
|
13924 |
+
*
|
13925 |
+
* @param {Element} element The focusable element before which to look. Defaults
|
13926 |
+
* to the active element.
|
13927 |
+
*/
|
13928 |
+
|
13929 |
+
function findPrevious() {
|
13930 |
+
var element = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document.activeElement;
|
13931 |
+
var focusables = find(document.body);
|
13932 |
+
var index = focusables.indexOf(element); // Remove all focusables after and including `element`.
|
13933 |
+
|
13934 |
+
focusables.length = index;
|
13935 |
+
return Object(external_lodash_["last"])(filterTabbable(focusables));
|
13936 |
}
|
13937 |
+
/**
|
13938 |
+
* Given a focusable element, find the next tabbable element.
|
13939 |
+
*
|
13940 |
+
* @param {Element} element The focusable element after which to look. Defaults
|
13941 |
+
* to the active element.
|
13942 |
+
*/
|
13943 |
|
13944 |
+
function findNext() {
|
13945 |
+
var element = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document.activeElement;
|
13946 |
+
var focusables = find(document.body);
|
13947 |
+
var index = focusables.indexOf(element); // Remove all focusables before and inside `element`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13948 |
|
13949 |
+
var remaining = focusables.slice(index + 1).filter(function (node) {
|
13950 |
+
return !element.contains(node);
|
13951 |
+
});
|
13952 |
+
return Object(external_lodash_["first"])(filterTabbable(remaining));
|
13953 |
+
}
|
13954 |
+
//# sourceMappingURL=tabbable.js.map
|
13955 |
+
// CONCATENATED MODULE: ./node_modules/@wordpress/dom/build-module/index.js
|
13956 |
/**
|
13957 |
+
* Internal dependencies
|
13958 |
*/
|
13959 |
|
|
|
|
|
|
|
|
|
13960 |
|
13961 |
+
/**
|
13962 |
+
* Object grouping `focusable` and `tabbable` utils
|
13963 |
+
* under the keys with the same name.
|
13964 |
+
*/
|
13965 |
|
13966 |
+
var build_module_focus = {
|
13967 |
+
focusable: focusable_namespaceObject,
|
13968 |
+
tabbable: tabbable_namespaceObject
|
13969 |
+
};
|
|
|
|
|
13970 |
|
13971 |
+
//# sourceMappingURL=index.js.map
|
13972 |
|
13973 |
+
/***/ }),
|
|
|
13974 |
|
13975 |
+
/***/ 51:
|
13976 |
+
/***/ (function(module, exports) {
|
13977 |
|
13978 |
+
(function() { module.exports = this["wc"]["data"]; }());
|
|
|
|
|
13979 |
|
13980 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13981 |
|
13982 |
+
/***/ 52:
|
13983 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
13984 |
|
13985 |
+
"use strict";
|
13986 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _unsupportedIterableToArray; });
|
13987 |
+
/* harmony import */ var _arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(37);
|
13988 |
|
13989 |
+
function _unsupportedIterableToArray(o, minLen) {
|
13990 |
+
if (!o) return;
|
13991 |
+
if (typeof o === "string") return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
|
13992 |
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
13993 |
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
13994 |
+
if (n === "Map" || n === "Set") return Array.from(n);
|
13995 |
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
|
13996 |
+
}
|
13997 |
|
13998 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13999 |
|
14000 |
+
/***/ 53:
|
14001 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
14002 |
|
14003 |
+
"use strict";
|
14004 |
+
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
14005 |
+
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);
|
14006 |
+
/**
|
14007 |
+
* External dependencies
|
14008 |
+
*/
|
14009 |
|
14010 |
+
/**
|
14011 |
+
* Given a function mapping a component to an enhanced component and modifier
|
14012 |
+
* name, returns the enhanced component augmented with a generated displayName.
|
14013 |
+
*
|
14014 |
+
* @param {Function} mapComponentToEnhancedComponent Function mapping component
|
14015 |
+
* to enhanced component.
|
14016 |
+
* @param {string} modifierName Seed name from which to
|
14017 |
+
* generated display name.
|
14018 |
+
*
|
14019 |
+
* @return {WPComponent} Component class with generated display name assigned.
|
14020 |
+
*/
|
14021 |
|
14022 |
+
function createHigherOrderComponent(mapComponentToEnhancedComponent, modifierName) {
|
14023 |
+
return function (OriginalComponent) {
|
14024 |
+
var EnhancedComponent = mapComponentToEnhancedComponent(OriginalComponent);
|
14025 |
+
var _OriginalComponent$di = OriginalComponent.displayName,
|
14026 |
+
displayName = _OriginalComponent$di === void 0 ? OriginalComponent.name || 'Component' : _OriginalComponent$di;
|
14027 |
+
EnhancedComponent.displayName = "".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_0__["upperFirst"])(Object(lodash__WEBPACK_IMPORTED_MODULE_0__["camelCase"])(modifierName)), "(").concat(displayName, ")");
|
14028 |
+
return EnhancedComponent;
|
14029 |
+
};
|
14030 |
+
}
|
14031 |
|
14032 |
+
/* harmony default export */ __webpack_exports__["a"] = (createHigherOrderComponent);
|
14033 |
+
//# sourceMappingURL=index.js.map
|
|
|
14034 |
|
14035 |
+
/***/ }),
|
|
|
14036 |
|
14037 |
+
/***/ 54:
|
14038 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
|
|
14039 |
|
14040 |
+
"use strict";
|
14041 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutPropertiesLoose; });
|
14042 |
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
14043 |
+
if (source == null) return {};
|
14044 |
+
var target = {};
|
14045 |
+
var sourceKeys = Object.keys(source);
|
14046 |
+
var key, i;
|
14047 |
|
14048 |
+
for (i = 0; i < sourceKeys.length; i++) {
|
14049 |
+
key = sourceKeys[i];
|
14050 |
+
if (excluded.indexOf(key) >= 0) continue;
|
14051 |
+
target[key] = source[key];
|
14052 |
+
}
|
14053 |
|
14054 |
+
return target;
|
14055 |
+
}
|
14056 |
|
14057 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
|
|
14058 |
|
14059 |
+
/***/ 55:
|
14060 |
+
/***/ (function(module, exports) {
|
|
|
|
|
|
|
14061 |
|
14062 |
+
function _interopRequireDefault(obj) {
|
14063 |
+
return obj && obj.__esModule ? obj : {
|
14064 |
+
"default": obj
|
14065 |
+
};
|
14066 |
+
}
|
14067 |
|
14068 |
+
module.exports = _interopRequireDefault;
|
|
|
|
|
|
|
|
|
14069 |
|
14070 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14071 |
|
14072 |
+
/***/ 57:
|
14073 |
+
/***/ (function(module, exports) {
|
14074 |
|
14075 |
+
(function() { module.exports = this["wp"]["dataControls"]; }());
|
14076 |
|
14077 |
+
/***/ }),
|
|
|
|
|
|
|
|
|
|
|
|
|
14078 |
|
14079 |
+
/***/ 58:
|
14080 |
+
/***/ (function(module, exports, __webpack_require__) {
|
14081 |
|
14082 |
+
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
14083 |
|
14084 |
|
14085 |
+
var stringify = __webpack_require__(111);
|
14086 |
+
var parse = __webpack_require__(112);
|
14087 |
+
var formats = __webpack_require__(86);
|
14088 |
|
14089 |
+
module.exports = {
|
14090 |
+
formats: formats,
|
14091 |
+
parse: parse,
|
14092 |
+
stringify: stringify
|
14093 |
+
};
|
14094 |
|
|
|
|
|
|
|
14095 |
|
14096 |
+
/***/ }),
|
14097 |
|
14098 |
+
/***/ 59:
|
14099 |
+
/***/ (function(module, exports) {
|
14100 |
|
14101 |
+
function _assertThisInitialized(self) {
|
14102 |
+
if (self === void 0) {
|
14103 |
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
14104 |
+
}
|
14105 |
|
14106 |
+
return self;
|
14107 |
+
}
|
14108 |
|
14109 |
+
module.exports = _assertThisInitialized;
|
|
|
|
|
|
|
|
|
14110 |
|
14111 |
+
/***/ }),
|
14112 |
|
14113 |
+
/***/ 6:
|
14114 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
14115 |
+
|
14116 |
+
"use strict";
|
14117 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _createClass; });
|
14118 |
+
function _defineProperties(target, props) {
|
14119 |
+
for (var i = 0; i < props.length; i++) {
|
14120 |
+
var descriptor = props[i];
|
14121 |
+
descriptor.enumerable = descriptor.enumerable || false;
|
14122 |
+
descriptor.configurable = true;
|
14123 |
+
if ("value" in descriptor) descriptor.writable = true;
|
14124 |
+
Object.defineProperty(target, descriptor.key, descriptor);
|
14125 |
}
|
14126 |
+
}
|
14127 |
|
14128 |
+
function _createClass(Constructor, protoProps, staticProps) {
|
14129 |
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
14130 |
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
14131 |
+
return Constructor;
|
14132 |
+
}
|
14133 |
|
14134 |
+
/***/ }),
|
|
|
14135 |
|
14136 |
+
/***/ 62:
|
14137 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
14138 |
|
14139 |
+
"use strict";
|
14140 |
+
/* unused harmony export Circle */
|
14141 |
+
/* unused harmony export G */
|
14142 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Path; });
|
14143 |
+
/* unused harmony export Polygon */
|
14144 |
+
/* unused harmony export Rect */
|
14145 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return SVG; });
|
14146 |
+
/* harmony import */ var _babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27);
|
14147 |
+
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2);
|
14148 |
+
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);
|
14149 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0);
|
14150 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__);
|
14151 |
|
|
|
|
|
|
|
|
|
14152 |
|
14153 |
+
/**
|
14154 |
+
* External dependencies
|
14155 |
+
*/
|
|
|
|
|
|
|
|
|
14156 |
|
14157 |
+
/**
|
14158 |
+
* WordPress dependencies
|
14159 |
+
*/
|
14160 |
|
|
|
|
|
|
|
|
|
|
|
14161 |
|
14162 |
+
var Circle = function Circle(props) {
|
14163 |
+
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])('circle', props);
|
14164 |
+
};
|
14165 |
+
var G = function G(props) {
|
14166 |
+
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])('g', props);
|
14167 |
+
};
|
14168 |
+
var Path = function Path(props) {
|
14169 |
+
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])('path', props);
|
14170 |
+
};
|
14171 |
+
var Polygon = function Polygon(props) {
|
14172 |
+
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])('polygon', props);
|
14173 |
+
};
|
14174 |
+
var Rect = function Rect(props) {
|
14175 |
+
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])('rect', props);
|
14176 |
+
};
|
14177 |
+
var SVG = function SVG(props) {
|
14178 |
+
var appliedProps = Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, props, {
|
14179 |
+
role: 'img',
|
14180 |
+
'aria-hidden': 'true',
|
14181 |
+
focusable: 'false'
|
14182 |
+
}); // Disable reason: We need to have a way to render HTML tag for web.
|
14183 |
+
// eslint-disable-next-line react/forbid-elements
|
14184 |
|
14185 |
+
|
14186 |
+
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])("svg", Object(lodash__WEBPACK_IMPORTED_MODULE_1__["omit"])(appliedProps, '__unstableActive'));
|
14187 |
+
};
|
14188 |
+
//# sourceMappingURL=index.js.map
|
14189 |
+
|
14190 |
+
/***/ }),
|
14191 |
+
|
14192 |
+
/***/ 63:
|
14193 |
+
/***/ (function(module, exports) {
|
14194 |
+
|
14195 |
+
(function() { module.exports = this["wc"]["components"]; }());
|
14196 |
+
|
14197 |
+
/***/ }),
|
14198 |
+
|
14199 |
+
/***/ 64:
|
14200 |
+
/***/ (function(module, exports) {
|
14201 |
+
|
14202 |
+
var g;
|
14203 |
+
|
14204 |
+
// This works in non-strict mode
|
14205 |
+
g = (function() {
|
14206 |
+
return this;
|
14207 |
+
})();
|
14208 |
+
|
14209 |
+
try {
|
14210 |
+
// This works if eval is allowed (see CSP)
|
14211 |
+
g = g || new Function("return this")();
|
14212 |
+
} catch (e) {
|
14213 |
+
// This works if the window reference is available
|
14214 |
+
if (typeof window === "object") g = window;
|
14215 |
}
|
14216 |
|
14217 |
+
// g can still be undefined, but nothing to do about it...
|
14218 |
+
// We return undefined, instead of nothing here, so it's
|
14219 |
+
// easier to handle this case. if(!global) { ...}
|
14220 |
|
14221 |
+
module.exports = g;
|
|
|
|
|
14222 |
|
|
|
|
|
|
|
14223 |
|
14224 |
+
/***/ }),
|
|
|
14225 |
|
14226 |
+
/***/ 65:
|
14227 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
14228 |
|
14229 |
+
"use strict";
|
14230 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return domReady; });
|
14231 |
+
/**
|
14232 |
+
* @typedef {() => void} Callback
|
14233 |
+
*
|
14234 |
+
* TODO: Remove this typedef and inline `() => void` type.
|
14235 |
+
*
|
14236 |
+
* This typedef is used so that a descriptive type is provided in our
|
14237 |
+
* automatically generated documentation.
|
14238 |
+
*
|
14239 |
+
* An in-line type `() => void` would be preferable, but the generated
|
14240 |
+
* documentation is `null` in that case.
|
14241 |
+
*
|
14242 |
+
* @see https://github.com/WordPress/gutenberg/issues/18045
|
14243 |
+
*/
|
14244 |
|
14245 |
+
/**
|
14246 |
+
* Specify a function to execute when the DOM is fully loaded.
|
14247 |
+
*
|
14248 |
+
* @param {Callback} callback A function to execute after the DOM is ready.
|
14249 |
+
*
|
14250 |
+
* @example
|
14251 |
+
* ```js
|
14252 |
+
* import domReady from '@wordpress/dom-ready';
|
14253 |
+
*
|
14254 |
+
* domReady( function() {
|
14255 |
+
* //do something after DOM loads.
|
14256 |
+
* } );
|
14257 |
+
* ```
|
14258 |
+
*
|
14259 |
+
* @return {void}
|
14260 |
+
*/
|
14261 |
+
function domReady(callback) {
|
14262 |
+
if (document.readyState === 'complete' || // DOMContentLoaded + Images/Styles/etc loaded, so we call directly.
|
14263 |
+
document.readyState === 'interactive' // DOMContentLoaded fires at this point, so we call directly.
|
14264 |
+
) {
|
14265 |
+
return void callback();
|
14266 |
+
} // DOMContentLoaded has not fired yet, delay callback until then.
|
14267 |
+
|
14268 |
+
|
14269 |
+
document.addEventListener('DOMContentLoaded', callback);
|
14270 |
}
|
14271 |
+
//# sourceMappingURL=index.js.map
|
14272 |
|
14273 |
+
/***/ }),
|
|
|
|
|
|
|
14274 |
|
14275 |
+
/***/ 69:
|
14276 |
+
/***/ (function(module, exports) {
|
14277 |
+
|
14278 |
+
(function() { module.exports = this["wp"]["htmlEntities"]; }());
|
14279 |
+
|
14280 |
+
/***/ }),
|
14281 |
+
|
14282 |
+
/***/ 7:
|
14283 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
14284 |
+
|
14285 |
+
"use strict";
|
14286 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _classCallCheck; });
|
14287 |
+
function _classCallCheck(instance, Constructor) {
|
14288 |
+
if (!(instance instanceof Constructor)) {
|
14289 |
+
throw new TypeError("Cannot call a class as a function");
|
14290 |
+
}
|
14291 |
}
|
14292 |
|
14293 |
+
/***/ }),
|
|
|
|
|
|
|
14294 |
|
14295 |
+
/***/ 70:
|
14296 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
14297 |
|
14298 |
+
"use strict";
|
14299 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _asyncToGenerator; });
|
14300 |
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
14301 |
+
try {
|
14302 |
+
var info = gen[key](arg);
|
14303 |
+
var value = info.value;
|
14304 |
+
} catch (error) {
|
14305 |
+
reject(error);
|
14306 |
+
return;
|
14307 |
}
|
14308 |
|
14309 |
+
if (info.done) {
|
14310 |
+
resolve(value);
|
14311 |
+
} else {
|
14312 |
+
Promise.resolve(value).then(_next, _throw);
|
14313 |
+
}
|
14314 |
+
}
|
14315 |
|
14316 |
+
function _asyncToGenerator(fn) {
|
14317 |
+
return function () {
|
14318 |
+
var self = this,
|
14319 |
+
args = arguments;
|
14320 |
+
return new Promise(function (resolve, reject) {
|
14321 |
+
var gen = fn.apply(self, args);
|
14322 |
|
14323 |
+
function _next(value) {
|
14324 |
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
14325 |
+
}
|
14326 |
|
14327 |
+
function _throw(err) {
|
14328 |
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
14329 |
+
}
|
14330 |
+
|
14331 |
+
_next(undefined);
|
14332 |
+
});
|
14333 |
};
|
14334 |
+
}
|
14335 |
|
14336 |
+
/***/ }),
|
|
|
14337 |
|
14338 |
+
/***/ 704:
|
14339 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
14340 |
+
|
14341 |
+
"use strict";
|
14342 |
+
|
14343 |
+
// EXTERNAL MODULE: external {"this":["wp","data"]}
|
14344 |
+
var external_this_wp_data_ = __webpack_require__(19);
|
14345 |
+
|
14346 |
+
// EXTERNAL MODULE: ./node_modules/@fresh-data/framework/es/index.js + 8 modules
|
14347 |
+
var es = __webpack_require__(170);
|
14348 |
+
|
14349 |
+
// EXTERNAL MODULE: ./node_modules/symbol-observable/es/index.js
|
14350 |
+
var symbol_observable_es = __webpack_require__(259);
|
14351 |
+
|
14352 |
+
// CONCATENATED MODULE: ./node_modules/redux/es/redux.js
|
14353 |
+
|
14354 |
+
|
14355 |
+
/**
|
14356 |
+
* These are private action types reserved by Redux.
|
14357 |
+
* For any unknown actions, you must return the current state.
|
14358 |
+
* If the current state is undefined, you must return the initial state.
|
14359 |
+
* Do not reference these action types directly in your code.
|
14360 |
+
*/
|
14361 |
+
var randomString = function randomString() {
|
14362 |
+
return Math.random().toString(36).substring(7).split('').join('.');
|
14363 |
};
|
14364 |
|
14365 |
+
var ActionTypes = {
|
14366 |
+
INIT: "@@redux/INIT" + randomString(),
|
14367 |
+
REPLACE: "@@redux/REPLACE" + randomString(),
|
14368 |
+
PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {
|
14369 |
+
return "@@redux/PROBE_UNKNOWN_ACTION" + randomString();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14370 |
}
|
14371 |
};
|
14372 |
|
14373 |
+
/**
|
14374 |
+
* @param {any} obj The object to inspect.
|
14375 |
+
* @returns {boolean} True if the argument appears to be a plain object.
|
14376 |
*/
|
14377 |
+
function isPlainObject(obj) {
|
14378 |
+
if (typeof obj !== 'object' || obj === null) return false;
|
14379 |
+
var proto = obj;
|
14380 |
|
14381 |
+
while (Object.getPrototypeOf(proto) !== null) {
|
14382 |
+
proto = Object.getPrototypeOf(proto);
|
|
|
14383 |
}
|
14384 |
|
14385 |
+
return Object.getPrototypeOf(obj) === proto;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14386 |
}
|
14387 |
|
14388 |
/**
|
14389 |
+
* Creates a Redux store that holds the state tree.
|
14390 |
+
* The only way to change the data in the store is to call `dispatch()` on it.
|
14391 |
*
|
14392 |
+
* There should only be a single store in your app. To specify how different
|
14393 |
+
* parts of the state tree respond to actions, you may combine several reducers
|
14394 |
+
* into a single reducer function by using `combineReducers`.
|
|
|
|
|
|
|
14395 |
*
|
14396 |
+
* @param {Function} reducer A function that returns the next state tree, given
|
14397 |
+
* the current state tree and the action to handle.
|
|
|
|
|
14398 |
*
|
14399 |
+
* @param {any} [preloadedState] The initial state. You may optionally specify it
|
14400 |
+
* to hydrate the state from the server in universal apps, or to restore a
|
14401 |
+
* previously serialized user session.
|
14402 |
+
* If you use `combineReducers` to produce the root reducer function, this must be
|
14403 |
+
* an object with the same shape as `combineReducers` keys.
|
14404 |
+
*
|
14405 |
+
* @param {Function} [enhancer] The store enhancer. You may optionally specify it
|
14406 |
+
* to enhance the store with third-party capabilities such as middleware,
|
14407 |
+
* time travel, persistence, etc. The only store enhancer that ships with Redux
|
14408 |
+
* is `applyMiddleware()`.
|
14409 |
+
*
|
14410 |
+
* @returns {Store} A Redux store that lets you read the state, dispatch actions
|
14411 |
+
* and subscribe to changes.
|
14412 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14413 |
|
14414 |
+
function createStore(reducer, preloadedState, enhancer) {
|
14415 |
+
var _ref2;
|
|
|
|
|
14416 |
|
14417 |
+
if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') {
|
14418 |
+
throw new Error('It looks like you are passing several store enhancers to ' + 'createStore(). This is not supported. Instead, compose them ' + 'together to a single function.');
|
14419 |
+
}
|
14420 |
|
14421 |
+
if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {
|
14422 |
+
enhancer = preloadedState;
|
14423 |
+
preloadedState = undefined;
|
14424 |
+
}
|
|
|
|
|
|
|
|
|
|
|
14425 |
|
14426 |
+
if (typeof enhancer !== 'undefined') {
|
14427 |
+
if (typeof enhancer !== 'function') {
|
14428 |
+
throw new Error('Expected the enhancer to be a function.');
|
14429 |
+
}
|
14430 |
|
14431 |
+
return enhancer(createStore)(reducer, preloadedState);
|
14432 |
+
}
|
|
|
14433 |
|
14434 |
+
if (typeof reducer !== 'function') {
|
14435 |
+
throw new Error('Expected the reducer to be a function.');
|
|
|
|
|
14436 |
}
|
14437 |
|
14438 |
+
var currentReducer = reducer;
|
14439 |
+
var currentState = preloadedState;
|
14440 |
+
var currentListeners = [];
|
14441 |
+
var nextListeners = currentListeners;
|
14442 |
+
var isDispatching = false;
|
14443 |
+
/**
|
14444 |
+
* This makes a shallow copy of currentListeners so we can use
|
14445 |
+
* nextListeners as a temporary list while dispatching.
|
14446 |
+
*
|
14447 |
+
* This prevents any bugs around consumers calling
|
14448 |
+
* subscribe/unsubscribe in the middle of a dispatch.
|
14449 |
+
*/
|
14450 |
|
14451 |
+
function ensureCanMutateNextListeners() {
|
14452 |
+
if (nextListeners === currentListeners) {
|
14453 |
+
nextListeners = currentListeners.slice();
|
14454 |
}
|
14455 |
+
}
|
14456 |
+
/**
|
14457 |
+
* Reads the state tree managed by the store.
|
14458 |
+
*
|
14459 |
+
* @returns {any} The current state tree of your application.
|
14460 |
+
*/
|
14461 |
|
|
|
|
|
|
|
|
|
14462 |
|
14463 |
+
function getState() {
|
14464 |
+
if (isDispatching) {
|
14465 |
+
throw new Error('You may not call store.getState() while the reducer is executing. ' + 'The reducer has already received the state as an argument. ' + 'Pass it down from the top reducer instead of reading it from the store.');
|
14466 |
+
}
|
14467 |
|
14468 |
+
return currentState;
|
14469 |
+
}
|
14470 |
+
/**
|
14471 |
+
* Adds a change listener. It will be called any time an action is dispatched,
|
14472 |
+
* and some part of the state tree may potentially have changed. You may then
|
14473 |
+
* call `getState()` to read the current state tree inside the callback.
|
14474 |
+
*
|
14475 |
+
* You may call `dispatch()` from a change listener, with the following
|
14476 |
+
* caveats:
|
14477 |
+
*
|
14478 |
+
* 1. The subscriptions are snapshotted just before every `dispatch()` call.
|
14479 |
+
* If you subscribe or unsubscribe while the listeners are being invoked, this
|
14480 |
+
* will not have any effect on the `dispatch()` that is currently in progress.
|
14481 |
+
* However, the next `dispatch()` call, whether nested or not, will use a more
|
14482 |
+
* recent snapshot of the subscription list.
|
14483 |
+
*
|
14484 |
+
* 2. The listener should not expect to see all state changes, as the state
|
14485 |
+
* might have been updated multiple times during a nested `dispatch()` before
|
14486 |
+
* the listener is called. It is, however, guaranteed that all subscribers
|
14487 |
+
* registered before the `dispatch()` started will be called with the latest
|
14488 |
+
* state by the time it exits.
|
14489 |
+
*
|
14490 |
+
* @param {Function} listener A callback to be invoked on every dispatch.
|
14491 |
+
* @returns {Function} A function to remove this change listener.
|
14492 |
+
*/
|
14493 |
|
|
|
|
|
|
|
14494 |
|
14495 |
+
function subscribe(listener) {
|
14496 |
+
if (typeof listener !== 'function') {
|
14497 |
+
throw new Error('Expected the listener to be a function.');
|
14498 |
+
}
|
14499 |
|
14500 |
+
if (isDispatching) {
|
14501 |
+
throw new Error('You may not call store.subscribe() while the reducer is executing. ' + 'If you would like to be notified after the store has been updated, subscribe from a ' + 'component and invoke store.getState() in the callback to access the latest state. ' + 'See https://redux.js.org/api-reference/store#subscribelistener for more details.');
|
14502 |
+
}
|
|
|
14503 |
|
14504 |
+
var isSubscribed = true;
|
14505 |
+
ensureCanMutateNextListeners();
|
14506 |
+
nextListeners.push(listener);
|
14507 |
+
return function unsubscribe() {
|
14508 |
+
if (!isSubscribed) {
|
14509 |
+
return;
|
14510 |
+
}
|
14511 |
|
14512 |
+
if (isDispatching) {
|
14513 |
+
throw new Error('You may not unsubscribe from a store listener while the reducer is executing. ' + 'See https://redux.js.org/api-reference/store#subscribelistener for more details.');
|
14514 |
+
}
|
14515 |
+
|
14516 |
+
isSubscribed = false;
|
14517 |
+
ensureCanMutateNextListeners();
|
14518 |
+
var index = nextListeners.indexOf(listener);
|
14519 |
+
nextListeners.splice(index, 1);
|
14520 |
+
currentListeners = null;
|
14521 |
+
};
|
14522 |
}
|
14523 |
+
/**
|
14524 |
+
* Dispatches an action. It is the only way to trigger a state change.
|
14525 |
+
*
|
14526 |
+
* The `reducer` function, used to create the store, will be called with the
|
14527 |
+
* current state tree and the given `action`. Its return value will
|
14528 |
+
* be considered the **next** state of the tree, and the change listeners
|
14529 |
+
* will be notified.
|
14530 |
+
*
|
14531 |
+
* The base implementation only supports plain object actions. If you want to
|
14532 |
+
* dispatch a Promise, an Observable, a thunk, or something else, you need to
|
14533 |
+
* wrap your store creating function into the corresponding middleware. For
|
14534 |
+
* example, see the documentation for the `redux-thunk` package. Even the
|
14535 |
+
* middleware will eventually dispatch plain object actions using this method.
|
14536 |
+
*
|
14537 |
+
* @param {Object} action A plain object representing “what changed”. It is
|
14538 |
+
* a good idea to keep actions serializable so you can record and replay user
|
14539 |
+
* sessions, or use the time travelling `redux-devtools`. An action must have
|
14540 |
+
* a `type` property which may not be `undefined`. It is a good idea to use
|
14541 |
+
* string constants for action types.
|
14542 |
+
*
|
14543 |
+
* @returns {Object} For convenience, the same action object you dispatched.
|
14544 |
+
*
|
14545 |
+
* Note that, if you use a custom middleware, it may wrap `dispatch()` to
|
14546 |
+
* return something else (for example, a Promise you can await).
|
14547 |
+
*/
|
14548 |
|
|
|
14549 |
|
14550 |
+
function dispatch(action) {
|
14551 |
+
if (!isPlainObject(action)) {
|
14552 |
+
throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');
|
14553 |
+
}
|
14554 |
|
14555 |
+
if (typeof action.type === 'undefined') {
|
14556 |
+
throw new Error('Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?');
|
14557 |
}
|
14558 |
|
14559 |
+
if (isDispatching) {
|
14560 |
+
throw new Error('Reducers may not dispatch actions.');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14561 |
}
|
|
|
14562 |
|
14563 |
+
try {
|
14564 |
+
isDispatching = true;
|
14565 |
+
currentState = currentReducer(currentState, action);
|
14566 |
+
} finally {
|
14567 |
+
isDispatching = false;
|
14568 |
+
}
|
14569 |
|
14570 |
+
var listeners = currentListeners = nextListeners;
|
|
|
|
|
14571 |
|
14572 |
+
for (var i = 0; i < listeners.length; i++) {
|
14573 |
+
var listener = listeners[i];
|
14574 |
+
listener();
|
14575 |
+
}
|
14576 |
|
14577 |
+
return action;
|
14578 |
+
}
|
14579 |
+
/**
|
14580 |
+
* Replaces the reducer currently used by the store to calculate the state.
|
14581 |
+
*
|
14582 |
+
* You might need this if your app implements code splitting and you want to
|
14583 |
+
* load some of the reducers dynamically. You might also need this if you
|
14584 |
+
* implement a hot reloading mechanism for Redux.
|
14585 |
+
*
|
14586 |
+
* @param {Function} nextReducer The reducer for the store to use instead.
|
14587 |
+
* @returns {void}
|
14588 |
+
*/
|
14589 |
|
|
|
|
|
|
|
|
|
|
|
14590 |
|
14591 |
+
function replaceReducer(nextReducer) {
|
14592 |
+
if (typeof nextReducer !== 'function') {
|
14593 |
+
throw new Error('Expected the nextReducer to be a function.');
|
14594 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14595 |
|
14596 |
+
currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT.
|
14597 |
+
// Any reducers that existed in both the new and old rootReducer
|
14598 |
+
// will receive the previous state. This effectively populates
|
14599 |
+
// the new state tree with any relevant data from the old one.
|
14600 |
|
14601 |
+
dispatch({
|
14602 |
+
type: ActionTypes.REPLACE
|
14603 |
+
});
|
14604 |
}
|
14605 |
+
/**
|
14606 |
+
* Interoperability point for observable/reactive libraries.
|
14607 |
+
* @returns {observable} A minimal observable of state changes.
|
14608 |
+
* For more information, see the observable proposal:
|
14609 |
+
* https://github.com/tc39/proposal-observable
|
14610 |
+
*/
|
14611 |
|
14612 |
|
14613 |
+
function observable() {
|
14614 |
+
var _ref;
|
14615 |
|
14616 |
+
var outerSubscribe = subscribe;
|
14617 |
+
return _ref = {
|
14618 |
+
/**
|
14619 |
+
* The minimal observable subscription method.
|
14620 |
+
* @param {Object} observer Any object that can be used as an observer.
|
14621 |
+
* The observer object should have a `next` method.
|
14622 |
+
* @returns {subscription} An object with an `unsubscribe` method that can
|
14623 |
+
* be used to unsubscribe the observable from the store, and prevent further
|
14624 |
+
* emission of values from the observable.
|
14625 |
+
*/
|
14626 |
+
subscribe: function subscribe(observer) {
|
14627 |
+
if (typeof observer !== 'object' || observer === null) {
|
14628 |
+
throw new TypeError('Expected the observer to be an object.');
|
14629 |
+
}
|
14630 |
|
14631 |
+
function observeState() {
|
14632 |
+
if (observer.next) {
|
14633 |
+
observer.next(getState());
|
14634 |
+
}
|
14635 |
+
}
|
14636 |
|
14637 |
+
observeState();
|
14638 |
+
var unsubscribe = outerSubscribe(observeState);
|
14639 |
+
return {
|
14640 |
+
unsubscribe: unsubscribe
|
14641 |
+
};
|
14642 |
+
}
|
14643 |
+
}, _ref[symbol_observable_es["a" /* default */]] = function () {
|
14644 |
+
return this;
|
14645 |
+
}, _ref;
|
14646 |
+
} // When a store is created, an "INIT" action is dispatched so that every
|
14647 |
+
// reducer returns their initial state. This effectively populates
|
14648 |
+
// the initial state tree.
|
14649 |
|
|
|
|
|
14650 |
|
14651 |
+
dispatch({
|
14652 |
+
type: ActionTypes.INIT
|
14653 |
+
});
|
14654 |
+
return _ref2 = {
|
14655 |
+
dispatch: dispatch,
|
14656 |
+
subscribe: subscribe,
|
14657 |
+
getState: getState,
|
14658 |
+
replaceReducer: replaceReducer
|
14659 |
+
}, _ref2[symbol_observable_es["a" /* default */]] = observable, _ref2;
|
14660 |
+
}
|
14661 |
|
14662 |
+
/**
|
14663 |
+
* Prints a warning in the console if it exists.
|
14664 |
+
*
|
14665 |
+
* @param {String} message The warning message.
|
14666 |
+
* @returns {void}
|
14667 |
+
*/
|
14668 |
+
function warning(message) {
|
14669 |
+
/* eslint-disable no-console */
|
14670 |
+
if (typeof console !== 'undefined' && typeof console.error === 'function') {
|
14671 |
+
console.error(message);
|
14672 |
+
}
|
14673 |
+
/* eslint-enable no-console */
|
14674 |
|
14675 |
|
14676 |
+
try {
|
14677 |
+
// This error was thrown as a convenience so that if you enable
|
14678 |
+
// "break on all exceptions" in your console,
|
14679 |
+
// it would pause the execution at this line.
|
14680 |
+
throw new Error(message);
|
14681 |
+
} catch (e) {} // eslint-disable-line no-empty
|
14682 |
|
14683 |
+
}
|
|
|
|
|
|
|
|
|
|
|
14684 |
|
14685 |
+
function getUndefinedStateErrorMessage(key, action) {
|
14686 |
+
var actionType = action && action.type;
|
14687 |
+
var actionDescription = actionType && "action \"" + String(actionType) + "\"" || 'an action';
|
14688 |
+
return "Given " + actionDescription + ", reducer \"" + key + "\" returned undefined. " + "To ignore an action, you must explicitly return the previous state. " + "If you want this reducer to hold no value, you can return null instead of undefined.";
|
14689 |
+
}
|
14690 |
|
14691 |
+
function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
|
14692 |
+
var reducerKeys = Object.keys(reducers);
|
14693 |
+
var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';
|
14694 |
|
14695 |
+
if (reducerKeys.length === 0) {
|
14696 |
+
return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';
|
14697 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14698 |
|
14699 |
+
if (!isPlainObject(inputState)) {
|
14700 |
+
return "The " + argumentName + " has unexpected type of \"" + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + "\". Expected argument to be an object with the following " + ("keys: \"" + reducerKeys.join('", "') + "\"");
|
14701 |
+
}
|
14702 |
|
14703 |
+
var unexpectedKeys = Object.keys(inputState).filter(function (key) {
|
14704 |
+
return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];
|
14705 |
+
});
|
14706 |
+
unexpectedKeys.forEach(function (key) {
|
14707 |
+
unexpectedKeyCache[key] = true;
|
14708 |
+
});
|
14709 |
+
if (action && action.type === ActionTypes.REPLACE) return;
|
14710 |
|
14711 |
+
if (unexpectedKeys.length > 0) {
|
14712 |
+
return "Unexpected " + (unexpectedKeys.length > 1 ? 'keys' : 'key') + " " + ("\"" + unexpectedKeys.join('", "') + "\" found in " + argumentName + ". ") + "Expected to find one of the known reducer keys instead: " + ("\"" + reducerKeys.join('", "') + "\". Unexpected keys will be ignored.");
|
14713 |
+
}
|
14714 |
+
}
|
14715 |
|
14716 |
+
function assertReducerShape(reducers) {
|
14717 |
+
Object.keys(reducers).forEach(function (key) {
|
14718 |
+
var reducer = reducers[key];
|
14719 |
+
var initialState = reducer(undefined, {
|
14720 |
+
type: ActionTypes.INIT
|
14721 |
+
});
|
14722 |
|
14723 |
+
if (typeof initialState === 'undefined') {
|
14724 |
+
throw new Error("Reducer \"" + key + "\" returned undefined during initialization. " + "If the state passed to the reducer is undefined, you must " + "explicitly return the initial state. The initial state may " + "not be undefined. If you don't want to set a value for this reducer, " + "you can use null instead of undefined.");
|
14725 |
+
}
|
14726 |
|
14727 |
+
if (typeof reducer(undefined, {
|
14728 |
+
type: ActionTypes.PROBE_UNKNOWN_ACTION()
|
14729 |
+
}) === 'undefined') {
|
14730 |
+
throw new Error("Reducer \"" + key + "\" returned undefined when probed with a random type. " + ("Don't try to handle " + ActionTypes.INIT + " or other actions in \"redux/*\" ") + "namespace. They are considered private. Instead, you must return the " + "current state for any unknown actions, unless it is undefined, " + "in which case you must return the initial state, regardless of the " + "action type. The initial state may not be undefined, but can be null.");
|
14731 |
+
}
|
14732 |
+
});
|
14733 |
+
}
|
14734 |
+
/**
|
14735 |
+
* Turns an object whose values are different reducer functions, into a single
|
14736 |
+
* reducer function. It will call every child reducer, and gather their results
|
14737 |
+
* into a single state object, whose keys correspond to the keys of the passed
|
14738 |
+
* reducer functions.
|
14739 |
+
*
|
14740 |
+
* @param {Object} reducers An object whose values correspond to different
|
14741 |
+
* reducer functions that need to be combined into one. One handy way to obtain
|
14742 |
+
* it is to use ES6 `import * as reducers` syntax. The reducers may never return
|
14743 |
+
* undefined for any action. Instead, they should return their initial state
|
14744 |
+
* if the state passed to them was undefined, and the current state for any
|
14745 |
+
* unrecognized action.
|
14746 |
+
*
|
14747 |
+
* @returns {Function} A reducer function that invokes every reducer inside the
|
14748 |
+
* passed object, and builds a state object with the same shape.
|
14749 |
+
*/
|
14750 |
|
|
|
14751 |
|
14752 |
+
function combineReducers(reducers) {
|
14753 |
+
var reducerKeys = Object.keys(reducers);
|
14754 |
+
var finalReducers = {};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14755 |
|
14756 |
+
for (var i = 0; i < reducerKeys.length; i++) {
|
14757 |
+
var key = reducerKeys[i];
|
14758 |
|
14759 |
+
if (false) {}
|
|
|
14760 |
|
14761 |
+
if (typeof reducers[key] === 'function') {
|
14762 |
+
finalReducers[key] = reducers[key];
|
14763 |
+
}
|
|
|
|
|
|
|
14764 |
}
|
|
|
|
|
14765 |
|
14766 |
+
var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same
|
14767 |
+
// keys multiple times.
|
|
|
|
|
|
|
14768 |
|
14769 |
+
var unexpectedKeyCache;
|
|
|
14770 |
|
14771 |
+
if (false) {}
|
|
|
14772 |
|
14773 |
+
var shapeAssertionError;
|
|
|
14774 |
|
14775 |
+
try {
|
14776 |
+
assertReducerShape(finalReducers);
|
14777 |
+
} catch (e) {
|
14778 |
+
shapeAssertionError = e;
|
14779 |
+
}
|
14780 |
|
14781 |
+
return function combination(state, action) {
|
14782 |
+
if (state === void 0) {
|
14783 |
+
state = {};
|
14784 |
+
}
|
14785 |
|
14786 |
+
if (shapeAssertionError) {
|
14787 |
+
throw shapeAssertionError;
|
14788 |
+
}
|
14789 |
|
14790 |
+
if (false) { var warningMessage; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14791 |
|
14792 |
+
var hasChanged = false;
|
14793 |
+
var nextState = {};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14794 |
|
14795 |
+
for (var _i = 0; _i < finalReducerKeys.length; _i++) {
|
14796 |
+
var _key = finalReducerKeys[_i];
|
14797 |
+
var reducer = finalReducers[_key];
|
14798 |
+
var previousStateForKey = state[_key];
|
14799 |
+
var nextStateForKey = reducer(previousStateForKey, action);
|
14800 |
|
14801 |
+
if (typeof nextStateForKey === 'undefined') {
|
14802 |
+
var errorMessage = getUndefinedStateErrorMessage(_key, action);
|
14803 |
+
throw new Error(errorMessage);
|
14804 |
+
}
|
|
|
|
|
|
|
|
|
|
|
14805 |
|
14806 |
+
nextState[_key] = nextStateForKey;
|
14807 |
+
hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
|
|
|
|
|
|
|
14808 |
}
|
14809 |
|
14810 |
+
hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;
|
14811 |
+
return hasChanged ? nextState : state;
|
14812 |
};
|
14813 |
+
}
|
14814 |
|
14815 |
+
function bindActionCreator(actionCreator, dispatch) {
|
14816 |
+
return function () {
|
14817 |
+
return dispatch(actionCreator.apply(this, arguments));
|
14818 |
+
};
|
14819 |
+
}
|
14820 |
+
/**
|
14821 |
+
* Turns an object whose values are action creators, into an object with the
|
14822 |
+
* same keys, but with every function wrapped into a `dispatch` call so they
|
14823 |
+
* may be invoked directly. This is just a convenience method, as you can call
|
14824 |
+
* `store.dispatch(MyActionCreators.doSomething())` yourself just fine.
|
14825 |
+
*
|
14826 |
+
* For convenience, you can also pass an action creator as the first argument,
|
14827 |
+
* and get a dispatch wrapped function in return.
|
14828 |
+
*
|
14829 |
+
* @param {Function|Object} actionCreators An object whose values are action
|
14830 |
+
* creator functions. One handy way to obtain it is to use ES6 `import * as`
|
14831 |
+
* syntax. You may also pass a single function.
|
14832 |
+
*
|
14833 |
+
* @param {Function} dispatch The `dispatch` function available on your Redux
|
14834 |
+
* store.
|
14835 |
+
*
|
14836 |
+
* @returns {Function|Object} The object mimicking the original object, but with
|
14837 |
+
* every action creator wrapped into the `dispatch` call. If you passed a
|
14838 |
+
* function as `actionCreators`, the return value will also be a single
|
14839 |
+
* function.
|
14840 |
+
*/
|
14841 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14842 |
|
14843 |
+
function bindActionCreators(actionCreators, dispatch) {
|
14844 |
+
if (typeof actionCreators === 'function') {
|
14845 |
+
return bindActionCreator(actionCreators, dispatch);
|
14846 |
+
}
|
|
|
14847 |
|
14848 |
+
if (typeof actionCreators !== 'object' || actionCreators === null) {
|
14849 |
+
throw new Error("bindActionCreators expected an object or a function, instead received " + (actionCreators === null ? 'null' : typeof actionCreators) + ". " + "Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?");
|
14850 |
+
}
|
14851 |
|
14852 |
+
var boundActionCreators = {};
|
|
|
14853 |
|
14854 |
+
for (var key in actionCreators) {
|
14855 |
+
var actionCreator = actionCreators[key];
|
14856 |
|
14857 |
+
if (typeof actionCreator === 'function') {
|
14858 |
+
boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);
|
14859 |
+
}
|
14860 |
+
}
|
|
|
14861 |
|
14862 |
+
return boundActionCreators;
|
14863 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14864 |
|
14865 |
+
function _defineProperty(obj, key, value) {
|
14866 |
+
if (key in obj) {
|
14867 |
+
Object.defineProperty(obj, key, {
|
14868 |
+
value: value,
|
14869 |
+
enumerable: true,
|
14870 |
+
configurable: true,
|
14871 |
+
writable: true
|
14872 |
+
});
|
14873 |
+
} else {
|
14874 |
+
obj[key] = value;
|
14875 |
+
}
|
14876 |
+
|
14877 |
+
return obj;
|
14878 |
+
}
|
14879 |
+
|
14880 |
+
function ownKeys(object, enumerableOnly) {
|
14881 |
+
var keys = Object.keys(object);
|
14882 |
+
|
14883 |
+
if (Object.getOwnPropertySymbols) {
|
14884 |
+
keys.push.apply(keys, Object.getOwnPropertySymbols(object));
|
14885 |
+
}
|
14886 |
+
|
14887 |
+
if (enumerableOnly) keys = keys.filter(function (sym) {
|
14888 |
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
14889 |
+
});
|
14890 |
+
return keys;
|
14891 |
+
}
|
14892 |
+
|
14893 |
+
function _objectSpread2(target) {
|
14894 |
+
for (var i = 1; i < arguments.length; i++) {
|
14895 |
+
var source = arguments[i] != null ? arguments[i] : {};
|
14896 |
+
|
14897 |
+
if (i % 2) {
|
14898 |
+
ownKeys(source, true).forEach(function (key) {
|
14899 |
+
_defineProperty(target, key, source[key]);
|
14900 |
});
|
14901 |
+
} else if (Object.getOwnPropertyDescriptors) {
|
14902 |
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
14903 |
+
} else {
|
14904 |
+
ownKeys(source).forEach(function (key) {
|
14905 |
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
14906 |
+
});
|
14907 |
+
}
|
14908 |
+
}
|
14909 |
|
14910 |
+
return target;
|
14911 |
+
}
|
14912 |
|
14913 |
+
/**
|
14914 |
+
* Composes single-argument functions from right to left. The rightmost
|
14915 |
+
* function can take multiple arguments as it provides the signature for
|
14916 |
+
* the resulting composite function.
|
14917 |
+
*
|
14918 |
+
* @param {...Function} funcs The functions to compose.
|
14919 |
+
* @returns {Function} A function obtained by composing the argument functions
|
14920 |
+
* from right to left. For example, compose(f, g, h) is identical to doing
|
14921 |
+
* (...args) => f(g(h(...args))).
|
14922 |
+
*/
|
14923 |
+
function compose() {
|
14924 |
+
for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
|
14925 |
+
funcs[_key] = arguments[_key];
|
14926 |
+
}
|
14927 |
|
14928 |
+
if (funcs.length === 0) {
|
14929 |
+
return function (arg) {
|
14930 |
+
return arg;
|
14931 |
+
};
|
14932 |
+
}
|
14933 |
|
14934 |
+
if (funcs.length === 1) {
|
14935 |
+
return funcs[0];
|
14936 |
+
}
|
14937 |
|
14938 |
+
return funcs.reduce(function (a, b) {
|
14939 |
+
return function () {
|
14940 |
+
return a(b.apply(void 0, arguments));
|
14941 |
+
};
|
14942 |
+
});
|
14943 |
+
}
|
|
|
|
|
|
|
14944 |
|
14945 |
+
/**
|
14946 |
+
* Creates a store enhancer that applies middleware to the dispatch method
|
14947 |
+
* of the Redux store. This is handy for a variety of tasks, such as expressing
|
14948 |
+
* asynchronous actions in a concise manner, or logging every action payload.
|
14949 |
+
*
|
14950 |
+
* See `redux-thunk` package as an example of the Redux middleware.
|
14951 |
+
*
|
14952 |
+
* Because middleware is potentially asynchronous, this should be the first
|
14953 |
+
* store enhancer in the composition chain.
|
14954 |
+
*
|
14955 |
+
* Note that each middleware will be given the `dispatch` and `getState` functions
|
14956 |
+
* as named arguments.
|
14957 |
+
*
|
14958 |
+
* @param {...Function} middlewares The middleware chain to be applied.
|
14959 |
+
* @returns {Function} A store enhancer applying the middleware.
|
14960 |
+
*/
|
14961 |
|
14962 |
+
function applyMiddleware() {
|
14963 |
+
for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {
|
14964 |
+
middlewares[_key] = arguments[_key];
|
14965 |
+
}
|
14966 |
+
|
14967 |
+
return function (createStore) {
|
14968 |
+
return function () {
|
14969 |
+
var store = createStore.apply(void 0, arguments);
|
14970 |
+
|
14971 |
+
var _dispatch = function dispatch() {
|
14972 |
+
throw new Error('Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.');
|
14973 |
+
};
|
14974 |
+
|
14975 |
+
var middlewareAPI = {
|
14976 |
+
getState: store.getState,
|
14977 |
+
dispatch: function dispatch() {
|
14978 |
+
return _dispatch.apply(void 0, arguments);
|
14979 |
}
|
14980 |
+
};
|
14981 |
+
var chain = middlewares.map(function (middleware) {
|
14982 |
+
return middleware(middlewareAPI);
|
14983 |
+
});
|
14984 |
+
_dispatch = compose.apply(void 0, chain)(store.dispatch);
|
14985 |
+
return _objectSpread2({}, store, {
|
14986 |
+
dispatch: _dispatch
|
14987 |
+
});
|
14988 |
+
};
|
14989 |
+
};
|
14990 |
+
}
|
14991 |
|
14992 |
+
/*
|
14993 |
+
* This is a dummy function to check if the function name has been altered by minification.
|
14994 |
+
* If the function has been minified and NODE_ENV !== 'production', warn the user.
|
14995 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14996 |
|
14997 |
+
function isCrushed() {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14998 |
|
14999 |
+
if (false) {}
|
|
|
|
|
|
|
|
|
|
|
15000 |
|
|
|
|
|
|
|
15001 |
|
|
|
|
|
|
|
|
|
|
|
15002 |
|
15003 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/defineProperty.js
|
15004 |
+
var defineProperty = __webpack_require__(15);
|
15005 |
+
var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
|
15006 |
+
|
15007 |
+
// CONCATENATED MODULE: ./client/wc-api/wp-data-store/reducer.js
|
15008 |
+
|
15009 |
+
|
15010 |
+
function reducer_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; }
|
15011 |
+
|
15012 |
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { reducer_ownKeys(Object(source), true).forEach(function (key) { defineProperty_default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { reducer_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
15013 |
+
|
15014 |
+
var defaultState = {
|
15015 |
+
resources: {}
|
15016 |
+
};
|
15017 |
+
/**
|
15018 |
+
* Primary reducer for fresh-data apiclient data.
|
15019 |
+
*
|
15020 |
+
* @param {Object} state The base state for fresh-data.
|
15021 |
+
* @param {Object} action Action object to be processed.
|
15022 |
+
* @return {Object} The new state, or the previous state if this action doesn't belong to fresh-data.
|
15023 |
+
*/
|
15024 |
+
|
15025 |
+
function reducer_reducer() {
|
15026 |
+
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultState;
|
15027 |
+
var action = arguments.length > 1 ? arguments[1] : undefined;
|
15028 |
+
|
15029 |
+
switch (action.type) {
|
15030 |
+
case 'FRESH_DATA_REQUESTED':
|
15031 |
+
return reduceRequested(state, action);
|
15032 |
+
|
15033 |
+
case 'FRESH_DATA_RECEIVED':
|
15034 |
+
return reduceReceived(state, action);
|
15035 |
+
|
15036 |
+
default:
|
15037 |
+
return state;
|
15038 |
+
}
|
15039 |
+
}
|
15040 |
+
function reduceRequested(state, action) {
|
15041 |
+
var newResources = action.resourceNames.reduce(function (resources, name) {
|
15042 |
+
resources[name] = {
|
15043 |
+
lastRequested: action.time
|
15044 |
+
};
|
15045 |
+
return resources;
|
15046 |
+
}, {});
|
15047 |
+
return reduceResources(state, newResources);
|
15048 |
+
}
|
15049 |
+
function reduceReceived(state, action) {
|
15050 |
+
var newResources = Object.keys(action.resources).reduce(function (resources, name) {
|
15051 |
+
var resource = _objectSpread({}, action.resources[name]);
|
15052 |
+
|
15053 |
+
if (resource.data) {
|
15054 |
+
resource.lastReceived = action.time;
|
15055 |
}
|
15056 |
|
15057 |
+
if (resource.error) {
|
15058 |
+
resource.lastError = action.time;
|
15059 |
+
}
|
15060 |
|
15061 |
+
resources[name] = resource;
|
15062 |
+
return resources;
|
15063 |
+
}, {});
|
15064 |
+
return reduceResources(state, newResources);
|
15065 |
+
}
|
15066 |
+
function reduceResources(state, newResources) {
|
15067 |
+
var updatedResources = Object.keys(newResources).reduce(function (resources, resourceName) {
|
15068 |
+
var resource = resources[resourceName];
|
15069 |
+
var newResource = newResources[resourceName];
|
15070 |
+
resources[resourceName] = _objectSpread({}, resource, {}, newResource);
|
15071 |
+
return resources;
|
15072 |
+
}, _objectSpread({}, state.resources));
|
15073 |
+
return _objectSpread({}, state, {
|
15074 |
+
resources: updatedResources
|
15075 |
+
});
|
15076 |
+
}
|
15077 |
+
// CONCATENATED MODULE: ./client/wc-api/wp-data-store/create-api-client.js
|
15078 |
+
/**
|
15079 |
+
* External dependencies
|
15080 |
+
*/
|
15081 |
|
|
|
|
|
15082 |
|
15083 |
+
/**
|
15084 |
+
* Internal dependencies
|
|
|
15085 |
*/
|
15086 |
|
|
|
|
|
|
|
|
|
15087 |
|
15088 |
+
|
15089 |
+
function create_api_client_createStore(name) {
|
15090 |
+
var devTools = window.__REDUX_DEVTOOLS_EXTENSION__;
|
15091 |
+
return createStore(reducer_reducer, devTools && devTools({
|
15092 |
+
name: name,
|
15093 |
+
instanceId: name
|
15094 |
+
}));
|
15095 |
+
}
|
15096 |
+
|
15097 |
+
function createDataHandlers(store) {
|
15098 |
+
return {
|
15099 |
+
dataRequested: function dataRequested(resourceNames) {
|
15100 |
+
// This is a temporary fix until it can be resolved upstream in fresh-data.
|
15101 |
+
// See: https://github.com/woocommerce/woocommerce-admin/pull/2387/files#r292355276
|
15102 |
+
if (document.hidden) {
|
15103 |
+
return;
|
15104 |
+
}
|
15105 |
+
|
15106 |
+
store.dispatch({
|
15107 |
+
type: 'FRESH_DATA_REQUESTED',
|
15108 |
+
resourceNames: resourceNames,
|
15109 |
+
time: new Date()
|
15110 |
+
});
|
15111 |
+
},
|
15112 |
+
dataReceived: function dataReceived(resources) {
|
15113 |
+
store.dispatch({
|
15114 |
+
type: 'FRESH_DATA_RECEIVED',
|
15115 |
+
resources: resources,
|
15116 |
+
time: new Date()
|
15117 |
});
|
|
|
15118 |
}
|
15119 |
+
};
|
15120 |
+
}
|
15121 |
|
15122 |
+
function createApiClient(name, apiSpec) {
|
15123 |
+
var store = create_api_client_createStore(name);
|
15124 |
+
var dataHandlers = createDataHandlers(store);
|
15125 |
+
var apiClient = new es["a" /* ApiClient */](apiSpec);
|
15126 |
+
apiClient.setDataHandlers(dataHandlers);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15127 |
|
15128 |
+
var storeChanged = function storeChanged() {
|
15129 |
+
apiClient.setState(store.getState());
|
15130 |
+
};
|
15131 |
|
15132 |
+
store.subscribe(storeChanged);
|
15133 |
+
return apiClient;
|
15134 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15135 |
|
15136 |
+
/* harmony default export */ var create_api_client = (createApiClient);
|
15137 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/toConsumableArray.js
|
15138 |
+
var toConsumableArray = __webpack_require__(32);
|
15139 |
+
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
|
15140 |
|
15141 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js
|
15142 |
+
var asyncToGenerator = __webpack_require__(46);
|
15143 |
+
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
15144 |
|
15145 |
+
// EXTERNAL MODULE: external {"this":["wp","i18n"]}
|
15146 |
+
var external_this_wp_i18n_ = __webpack_require__(3);
|
|
|
|
|
|
|
|
|
|
|
|
|
15147 |
|
15148 |
+
// CONCATENATED MODULE: ./client/wc-api/utils.js
|
15149 |
+
function getResourceName(prefix, identifier) {
|
15150 |
+
var identifierString = JSON.stringify(identifier, Object.keys(identifier).sort());
|
15151 |
+
return "".concat(prefix, ":").concat(identifierString);
|
15152 |
+
}
|
15153 |
+
function getResourcePrefix(resourceName) {
|
15154 |
+
return resourceName.substring(0, resourceName.indexOf(':'));
|
15155 |
+
}
|
15156 |
+
function isResourcePrefix(resourceName, prefix) {
|
15157 |
+
var resourcePrefix = getResourcePrefix(resourceName);
|
15158 |
+
return resourcePrefix === prefix;
|
15159 |
+
}
|
15160 |
+
function getResourceIdentifier(resourceName) {
|
15161 |
+
var identifierString = resourceName.substring(resourceName.indexOf(':') + 1);
|
15162 |
+
return JSON.parse(identifierString);
|
15163 |
+
}
|
15164 |
+
// CONCATENATED MODULE: ./client/wc-api/export/mutations.js
|
15165 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15166 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15167 |
|
15168 |
+
/**
|
15169 |
+
* External dependencies
|
|
|
15170 |
*/
|
15171 |
|
|
|
|
|
15172 |
|
15173 |
+
/**
|
15174 |
+
* Internal dependencies
|
15175 |
+
*/
|
|
|
15176 |
|
|
|
|
|
15177 |
|
|
|
|
|
|
|
|
|
15178 |
|
15179 |
+
var mutations_initiateReportExport = function initiateReportExport(operations) {
|
15180 |
+
return /*#__PURE__*/function () {
|
15181 |
+
var _ref = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime.mark(function _callee(reportType, reportTitle, reportArgs) {
|
15182 |
+
var _dispatch, createNotice, resourceName, result, response;
|
|
|
15183 |
|
15184 |
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
15185 |
+
while (1) {
|
15186 |
+
switch (_context.prev = _context.next) {
|
15187 |
+
case 0:
|
15188 |
+
_dispatch = Object(external_this_wp_data_["dispatch"])('core/notices'), createNotice = _dispatch.createNotice;
|
15189 |
+
resourceName = getResourceName("report-export-".concat(reportType), reportArgs);
|
15190 |
+
_context.next = 4;
|
15191 |
+
return operations.update([resourceName], defineProperty_default()({}, resourceName, reportArgs));
|
|
|
|
|
|
|
|
|
|
|
15192 |
|
15193 |
+
case 4:
|
15194 |
+
result = _context.sent;
|
15195 |
+
response = result[0][resourceName];
|
15196 |
|
15197 |
+
if (response && response.success) {
|
15198 |
+
createNotice('success', Object(external_this_wp_i18n_["sprintf"])(Object(external_this_wp_i18n_["__"])('Your %s Report will be emailed to you.', 'woocommerce-admin'), reportTitle));
|
15199 |
+
}
|
15200 |
+
|
15201 |
+
if (response && response.error) {
|
15202 |
+
createNotice('error', Object(external_this_wp_i18n_["sprintf"])(Object(external_this_wp_i18n_["__"])('There was a problem exporting your %s Report. Please try again.', 'woocommerce-admin'), reportTitle));
|
15203 |
+
}
|
15204 |
+
|
15205 |
+
case 8:
|
15206 |
+
case "end":
|
15207 |
+
return _context.stop();
|
15208 |
}
|
15209 |
+
}
|
15210 |
+
}, _callee);
|
15211 |
+
}));
|
15212 |
+
|
15213 |
+
return function (_x, _x2, _x3) {
|
15214 |
+
return _ref.apply(this, arguments);
|
15215 |
};
|
15216 |
+
}();
|
15217 |
+
};
|
15218 |
|
15219 |
+
/* harmony default export */ var mutations = ({
|
15220 |
+
initiateReportExport: mutations_initiateReportExport
|
15221 |
+
});
|
15222 |
+
// EXTERNAL MODULE: external {"this":["wp","apiFetch"]}
|
15223 |
+
var external_this_wp_apiFetch_ = __webpack_require__(20);
|
15224 |
+
var external_this_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_apiFetch_);
|
15225 |
|
15226 |
+
// EXTERNAL MODULE: ./client/wc-api/constants.js
|
15227 |
+
var constants = __webpack_require__(24);
|
|
|
|
|
|
|
15228 |
|
15229 |
+
// CONCATENATED MODULE: ./client/wc-api/export/operations.js
|
|
|
|
|
|
|
15230 |
|
|
|
|
|
|
|
|
|
15231 |
|
|
|
|
|
|
|
15232 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15233 |
|
15234 |
+
/**
|
15235 |
+
* External dependencies
|
15236 |
+
*/
|
|
|
|
|
|
|
15237 |
|
15238 |
+
/**
|
15239 |
+
* Internal dependencies
|
15240 |
+
*/
|
|
|
|
|
|
|
|
|
15241 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15242 |
|
15243 |
+
|
15244 |
+
|
15245 |
+
function operations_update(resourceNames, data) {
|
15246 |
+
var fetch = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : external_this_wp_apiFetch_default.a;
|
15247 |
+
return toConsumableArray_default()(initiateExport(resourceNames, data, fetch));
|
15248 |
+
}
|
15249 |
+
|
15250 |
+
function initiateExport(resourceNames, data, fetch) {
|
15251 |
+
var filteredNames = resourceNames.filter(function (name) {
|
15252 |
+
return name.startsWith('report-export-');
|
|
|
|
|
15253 |
});
|
15254 |
+
return filteredNames.map( /*#__PURE__*/function () {
|
15255 |
+
var _ref = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime.mark(function _callee(resourceName) {
|
15256 |
+
var prefix, reportType, url, result;
|
15257 |
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
15258 |
+
while (1) {
|
15259 |
+
switch (_context.prev = _context.next) {
|
15260 |
+
case 0:
|
15261 |
+
prefix = getResourcePrefix(resourceName);
|
15262 |
+
reportType = prefix.split('-').pop();
|
15263 |
+
url = constants["c" /* NAMESPACE */] + '/reports/' + reportType + '/export';
|
15264 |
+
_context.prev = 3;
|
15265 |
+
_context.next = 6;
|
15266 |
+
return fetch({
|
15267 |
+
path: url,
|
15268 |
+
method: 'POST',
|
15269 |
+
data: {
|
15270 |
+
report_args: data[resourceName],
|
15271 |
+
email: true
|
15272 |
+
}
|
15273 |
+
});
|
15274 |
|
15275 |
+
case 6:
|
15276 |
+
result = _context.sent;
|
15277 |
+
return _context.abrupt("return", defineProperty_default()({}, resourceName, defineProperty_default()({}, result.status, result.message)));
|
15278 |
+
|
15279 |
+
case 10:
|
15280 |
+
_context.prev = 10;
|
15281 |
+
_context.t0 = _context["catch"](3);
|
15282 |
+
return _context.abrupt("return", defineProperty_default()({}, resourceName, {
|
15283 |
+
error: _context.t0
|
15284 |
+
}));
|
15285 |
|
15286 |
+
case 13:
|
15287 |
+
case "end":
|
15288 |
+
return _context.stop();
|
15289 |
+
}
|
15290 |
+
}
|
15291 |
+
}, _callee, null, [[3, 10]]);
|
15292 |
+
}));
|
15293 |
+
|
15294 |
+
return function (_x) {
|
15295 |
+
return _ref.apply(this, arguments);
|
15296 |
};
|
15297 |
+
}());
|
15298 |
+
}
|
15299 |
|
15300 |
+
/* harmony default export */ var export_operations = ({
|
15301 |
+
update: operations_update
|
15302 |
+
});
|
15303 |
+
// CONCATENATED MODULE: ./client/wc-api/export/index.js
|
15304 |
+
/**
|
15305 |
+
* Internal dependencies
|
15306 |
+
*/
|
15307 |
|
|
|
|