@nulogy/components 7.2.1 → 7.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +335 -2155
- package/dist/main.module.js +373 -2199
- package/dist/src/BrandedNavBar/BrandLogoContainer.d.ts +10 -0
- package/dist/src/BrandedNavBar/DesktopMenu.d.ts +3 -3
- package/dist/src/BrandedNavBar/EnvironmentBanner.d.ts +1 -1
- package/dist/src/BrandedNavBar/NavBarBackground.d.ts +8 -0
- package/dist/src/BrandedNavBar/SmallNavBar.d.ts +24 -0
- package/dist/src/BrandedNavBar/index.d.ts +12 -0
- package/dist/src/Button/IconicButton.d.ts +3 -6
- package/dist/src/StyledProps/index.d.ts +2 -2
- package/dist/src/index.d.ts +2 -1
- package/dist/src/utils/index.d.ts +1 -0
- package/dist/src/utils/withMenuState.d.ts +6 -0
- package/package.json +2 -2
package/dist/main.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('styled-components'), require('@babel/runtime/helpers/typeof'), require('@babel/runtime/helpers/classCallCheck'), require('@babel/runtime/helpers/createClass'), require('@babel/runtime/helpers/defineProperty'), require('object-assign'), require('@nulogy/icons'), require('@babel/runtime/helpers/extends'), require('@babel/runtime/helpers/assertThisInitialized'), require('@babel/runtime/helpers/inheritsLoose'), require('prop-types'), require('react-fast-compare'), require('warning'), require('@babel/runtime/helpers/slicedToArray'), require('@babel/runtime/helpers/objectWithoutPropertiesLoose'), require('deep-equal'), require('create-react-context'), require('react-
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'react', 'styled-components', '@babel/runtime/helpers/typeof', '@babel/runtime/helpers/classCallCheck', '@babel/runtime/helpers/createClass', '@babel/runtime/helpers/defineProperty', 'object-assign', '@nulogy/icons', '@babel/runtime/helpers/extends', '@babel/runtime/helpers/assertThisInitialized', '@babel/runtime/helpers/inheritsLoose', 'prop-types', 'react-fast-compare', 'warning', '@babel/runtime/helpers/slicedToArray', '@babel/runtime/helpers/objectWithoutPropertiesLoose', 'deep-equal', 'create-react-context', 'react-
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.NDSComponents = {}, global.React, global.styled, global.typeof, global.classCallCheck, global.createClass, global.defineProperty, global.assign, global.icons, global.extends, global.assertThisInitialized, global.inheritsLoose, global.PropTypes, global.isEqual, global.warning, global.slicedToArray, global.objectWithoutPropertiesLoose, global.deepEqual, global.createReactContext, global.
|
|
5
|
-
}(this, (function (exports, React, styled, _typeof$
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('styled-components'), require('@babel/runtime/helpers/typeof'), require('@babel/runtime/helpers/classCallCheck'), require('@babel/runtime/helpers/createClass'), require('@babel/runtime/helpers/defineProperty'), require('object-assign'), require('@nulogy/icons'), require('@babel/runtime/helpers/extends'), require('@babel/runtime/helpers/assertThisInitialized'), require('@babel/runtime/helpers/inheritsLoose'), require('prop-types'), require('react-fast-compare'), require('warning'), require('@babel/runtime/helpers/slicedToArray'), require('@babel/runtime/helpers/objectWithoutPropertiesLoose'), require('deep-equal'), require('create-react-context'), require('react-resize-detector'), require('react-windowed-select'), require('react-dom'), require('exenv'), require('smoothscroll-polyfill'), require('classnames'), require('@babel/runtime/helpers/toConsumableArray'), require('react-input-autosize'), require('@babel/runtime/helpers/taggedTemplateLiteral')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'react', 'styled-components', '@babel/runtime/helpers/typeof', '@babel/runtime/helpers/classCallCheck', '@babel/runtime/helpers/createClass', '@babel/runtime/helpers/defineProperty', 'object-assign', '@nulogy/icons', '@babel/runtime/helpers/extends', '@babel/runtime/helpers/assertThisInitialized', '@babel/runtime/helpers/inheritsLoose', 'prop-types', 'react-fast-compare', 'warning', '@babel/runtime/helpers/slicedToArray', '@babel/runtime/helpers/objectWithoutPropertiesLoose', 'deep-equal', 'create-react-context', 'react-resize-detector', 'react-windowed-select', 'react-dom', 'exenv', 'smoothscroll-polyfill', 'classnames', '@babel/runtime/helpers/toConsumableArray', 'react-input-autosize', '@babel/runtime/helpers/taggedTemplateLiteral'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.NDSComponents = {}, global.React, global.styled, global.typeof, global.classCallCheck, global.createClass, global.defineProperty, global.assign, global.icons, global.extends, global.assertThisInitialized, global.inheritsLoose, global.PropTypes, global.isEqual, global.warning, global.slicedToArray, global.objectWithoutPropertiesLoose, global.deepEqual, global.createReactContext, global.ReactResizeDetector, global.components, global.reactDom, global.exenv, global.smoothscroll, global.t, null, global.AutosizeInput));
|
|
5
|
+
}(this, (function (exports, React, styled, _typeof$1, _classCallCheck$1, _createClass$1, _defineProperty$1, assign$1, icons, _extends$4, _assertThisInitialized$2, _inheritsLoose$2, PropTypes, isEqual$2, warning$1, _slicedToArray$1, _objectWithoutPropertiesLoose$2, deepEqual, createContext, ReactResizeDetector, WindowedSelect, reactDom, exenv, smoothscroll, t, toConsumableArray, AutosizeInput) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
30
30
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
31
31
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
32
|
-
var _typeof__default = /*#__PURE__*/_interopDefaultLegacy(_typeof$
|
|
33
|
-
var _classCallCheck__default = /*#__PURE__*/_interopDefaultLegacy(_classCallCheck$
|
|
34
|
-
var _createClass__default = /*#__PURE__*/_interopDefaultLegacy(_createClass$
|
|
35
|
-
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty$
|
|
32
|
+
var _typeof__default = /*#__PURE__*/_interopDefaultLegacy(_typeof$1);
|
|
33
|
+
var _classCallCheck__default = /*#__PURE__*/_interopDefaultLegacy(_classCallCheck$1);
|
|
34
|
+
var _createClass__default = /*#__PURE__*/_interopDefaultLegacy(_createClass$1);
|
|
35
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty$1);
|
|
36
36
|
var assign__default = /*#__PURE__*/_interopDefaultLegacy(assign$1);
|
|
37
37
|
var icons__default = /*#__PURE__*/_interopDefaultLegacy(icons);
|
|
38
38
|
var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends$4);
|
|
39
|
-
var _assertThisInitialized__default = /*#__PURE__*/_interopDefaultLegacy(_assertThisInitialized$
|
|
39
|
+
var _assertThisInitialized__default = /*#__PURE__*/_interopDefaultLegacy(_assertThisInitialized$2);
|
|
40
40
|
var _inheritsLoose__default = /*#__PURE__*/_interopDefaultLegacy(_inheritsLoose$2);
|
|
41
41
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
42
42
|
var isEqual__default = /*#__PURE__*/_interopDefaultLegacy(isEqual$2);
|
|
@@ -45,8 +45,9 @@
|
|
|
45
45
|
var _objectWithoutPropertiesLoose__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutPropertiesLoose$2);
|
|
46
46
|
var deepEqual__default = /*#__PURE__*/_interopDefaultLegacy(deepEqual);
|
|
47
47
|
var createContext__default = /*#__PURE__*/_interopDefaultLegacy(createContext);
|
|
48
|
-
var
|
|
48
|
+
var ReactResizeDetector__default = /*#__PURE__*/_interopDefaultLegacy(ReactResizeDetector);
|
|
49
49
|
var WindowedSelect__default = /*#__PURE__*/_interopDefaultLegacy(WindowedSelect);
|
|
50
|
+
var reactDom__default = /*#__PURE__*/_interopDefaultLegacy(reactDom);
|
|
50
51
|
var exenv__default = /*#__PURE__*/_interopDefaultLegacy(exenv);
|
|
51
52
|
var smoothscroll__default = /*#__PURE__*/_interopDefaultLegacy(smoothscroll);
|
|
52
53
|
var t__default = /*#__PURE__*/_interopDefaultLegacy(t);
|
|
@@ -477,23 +478,23 @@
|
|
|
477
478
|
}
|
|
478
479
|
};
|
|
479
480
|
|
|
480
|
-
function _typeof
|
|
481
|
+
function _typeof(obj) {
|
|
481
482
|
"@babel/helpers - typeof";
|
|
482
483
|
|
|
483
484
|
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
484
|
-
_typeof
|
|
485
|
+
_typeof = function _typeof(obj) {
|
|
485
486
|
return typeof obj;
|
|
486
487
|
};
|
|
487
488
|
} else {
|
|
488
|
-
_typeof
|
|
489
|
+
_typeof = function _typeof(obj) {
|
|
489
490
|
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
490
491
|
};
|
|
491
492
|
}
|
|
492
493
|
|
|
493
|
-
return _typeof
|
|
494
|
+
return _typeof(obj);
|
|
494
495
|
}
|
|
495
496
|
|
|
496
|
-
function _defineProperty
|
|
497
|
+
function _defineProperty(obj, key, value) {
|
|
497
498
|
if (key in obj) {
|
|
498
499
|
Object.defineProperty(obj, key, {
|
|
499
500
|
value: value,
|
|
@@ -520,20 +521,20 @@
|
|
|
520
521
|
}
|
|
521
522
|
|
|
522
523
|
ownKeys.forEach(function (key) {
|
|
523
|
-
_defineProperty
|
|
524
|
+
_defineProperty(target, key, source[key]);
|
|
524
525
|
});
|
|
525
526
|
}
|
|
526
527
|
|
|
527
528
|
return target;
|
|
528
529
|
}
|
|
529
530
|
|
|
530
|
-
function _classCallCheck
|
|
531
|
+
function _classCallCheck(instance, Constructor) {
|
|
531
532
|
if (!(instance instanceof Constructor)) {
|
|
532
533
|
throw new TypeError("Cannot call a class as a function");
|
|
533
534
|
}
|
|
534
535
|
}
|
|
535
536
|
|
|
536
|
-
function _defineProperties
|
|
537
|
+
function _defineProperties(target, props) {
|
|
537
538
|
for (var i = 0; i < props.length; i++) {
|
|
538
539
|
var descriptor = props[i];
|
|
539
540
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -543,13 +544,13 @@
|
|
|
543
544
|
}
|
|
544
545
|
}
|
|
545
546
|
|
|
546
|
-
function _createClass
|
|
547
|
-
if (protoProps) _defineProperties
|
|
548
|
-
if (staticProps) _defineProperties
|
|
547
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
548
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
549
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
549
550
|
return Constructor;
|
|
550
551
|
}
|
|
551
552
|
|
|
552
|
-
function _assertThisInitialized$
|
|
553
|
+
function _assertThisInitialized$1(self) {
|
|
553
554
|
if (self === void 0) {
|
|
554
555
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
555
556
|
}
|
|
@@ -557,31 +558,31 @@
|
|
|
557
558
|
return self;
|
|
558
559
|
}
|
|
559
560
|
|
|
560
|
-
function _possibleConstructorReturn
|
|
561
|
+
function _possibleConstructorReturn(self, call) {
|
|
561
562
|
if (call && (_typeof__default['default'](call) === "object" || typeof call === "function")) {
|
|
562
563
|
return call;
|
|
563
564
|
}
|
|
564
565
|
|
|
565
|
-
return _assertThisInitialized$
|
|
566
|
+
return _assertThisInitialized$1(self);
|
|
566
567
|
}
|
|
567
568
|
|
|
568
|
-
function _getPrototypeOf
|
|
569
|
-
_getPrototypeOf
|
|
569
|
+
function _getPrototypeOf(o) {
|
|
570
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
570
571
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
571
572
|
};
|
|
572
|
-
return _getPrototypeOf
|
|
573
|
+
return _getPrototypeOf(o);
|
|
573
574
|
}
|
|
574
575
|
|
|
575
|
-
function _setPrototypeOf$
|
|
576
|
-
_setPrototypeOf$
|
|
576
|
+
function _setPrototypeOf$1(o, p) {
|
|
577
|
+
_setPrototypeOf$1 = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
577
578
|
o.__proto__ = p;
|
|
578
579
|
return o;
|
|
579
580
|
};
|
|
580
581
|
|
|
581
|
-
return _setPrototypeOf$
|
|
582
|
+
return _setPrototypeOf$1(o, p);
|
|
582
583
|
}
|
|
583
584
|
|
|
584
|
-
function _inherits
|
|
585
|
+
function _inherits(subClass, superClass) {
|
|
585
586
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
586
587
|
throw new TypeError("Super expression must either be null or a function");
|
|
587
588
|
}
|
|
@@ -593,7 +594,7 @@
|
|
|
593
594
|
configurable: true
|
|
594
595
|
}
|
|
595
596
|
});
|
|
596
|
-
if (superClass) _setPrototypeOf$
|
|
597
|
+
if (superClass) _setPrototypeOf$1(subClass, superClass);
|
|
597
598
|
}
|
|
598
599
|
|
|
599
600
|
var consoleLogger = {
|
|
@@ -616,12 +617,12 @@
|
|
|
616
617
|
function Logger(concreteLogger) {
|
|
617
618
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
618
619
|
|
|
619
|
-
_classCallCheck
|
|
620
|
+
_classCallCheck(this, Logger);
|
|
620
621
|
|
|
621
622
|
this.init(concreteLogger, options);
|
|
622
623
|
}
|
|
623
624
|
|
|
624
|
-
_createClass
|
|
625
|
+
_createClass(Logger, [{
|
|
625
626
|
key: "init",
|
|
626
627
|
value: function init(concreteLogger) {
|
|
627
628
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -694,12 +695,12 @@
|
|
|
694
695
|
|
|
695
696
|
var EventEmitter = function () {
|
|
696
697
|
function EventEmitter() {
|
|
697
|
-
_classCallCheck
|
|
698
|
+
_classCallCheck(this, EventEmitter);
|
|
698
699
|
|
|
699
700
|
this.observers = {};
|
|
700
701
|
}
|
|
701
702
|
|
|
702
|
-
_createClass
|
|
703
|
+
_createClass(EventEmitter, [{
|
|
703
704
|
key: "on",
|
|
704
705
|
value: function on(events, listener) {
|
|
705
706
|
var _this = this;
|
|
@@ -876,7 +877,7 @@
|
|
|
876
877
|
var isIE10$1 = typeof window !== 'undefined' && window.navigator && window.navigator.userAgent && window.navigator.userAgent.indexOf('MSIE') > -1;
|
|
877
878
|
|
|
878
879
|
var ResourceStore = function (_EventEmitter) {
|
|
879
|
-
_inherits
|
|
880
|
+
_inherits(ResourceStore, _EventEmitter);
|
|
880
881
|
|
|
881
882
|
function ResourceStore(data) {
|
|
882
883
|
var _this;
|
|
@@ -886,12 +887,12 @@
|
|
|
886
887
|
defaultNS: 'translation'
|
|
887
888
|
};
|
|
888
889
|
|
|
889
|
-
_classCallCheck
|
|
890
|
+
_classCallCheck(this, ResourceStore);
|
|
890
891
|
|
|
891
|
-
_this = _possibleConstructorReturn
|
|
892
|
+
_this = _possibleConstructorReturn(this, _getPrototypeOf(ResourceStore).call(this));
|
|
892
893
|
|
|
893
894
|
if (isIE10$1) {
|
|
894
|
-
EventEmitter.call(_assertThisInitialized$
|
|
895
|
+
EventEmitter.call(_assertThisInitialized$1(_this));
|
|
895
896
|
}
|
|
896
897
|
|
|
897
898
|
_this.data = data || {};
|
|
@@ -904,7 +905,7 @@
|
|
|
904
905
|
return _this;
|
|
905
906
|
}
|
|
906
907
|
|
|
907
|
-
_createClass
|
|
908
|
+
_createClass(ResourceStore, [{
|
|
908
909
|
key: "addNamespaces",
|
|
909
910
|
value: function addNamespaces(ns) {
|
|
910
911
|
if (this.options.ns.indexOf(ns) < 0) {
|
|
@@ -1053,22 +1054,22 @@
|
|
|
1053
1054
|
var checkedLoadedFor = {};
|
|
1054
1055
|
|
|
1055
1056
|
var Translator = function (_EventEmitter) {
|
|
1056
|
-
_inherits
|
|
1057
|
+
_inherits(Translator, _EventEmitter);
|
|
1057
1058
|
|
|
1058
1059
|
function Translator(services) {
|
|
1059
1060
|
var _this;
|
|
1060
1061
|
|
|
1061
1062
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1062
1063
|
|
|
1063
|
-
_classCallCheck
|
|
1064
|
+
_classCallCheck(this, Translator);
|
|
1064
1065
|
|
|
1065
|
-
_this = _possibleConstructorReturn
|
|
1066
|
+
_this = _possibleConstructorReturn(this, _getPrototypeOf(Translator).call(this));
|
|
1066
1067
|
|
|
1067
1068
|
if (isIE10$1) {
|
|
1068
|
-
EventEmitter.call(_assertThisInitialized$
|
|
1069
|
+
EventEmitter.call(_assertThisInitialized$1(_this));
|
|
1069
1070
|
}
|
|
1070
1071
|
|
|
1071
|
-
copy(['resourceStore', 'languageUtils', 'pluralResolver', 'interpolator', 'backendConnector', 'i18nFormat', 'utils'], services, _assertThisInitialized$
|
|
1072
|
+
copy(['resourceStore', 'languageUtils', 'pluralResolver', 'interpolator', 'backendConnector', 'i18nFormat', 'utils'], services, _assertThisInitialized$1(_this));
|
|
1072
1073
|
_this.options = options;
|
|
1073
1074
|
|
|
1074
1075
|
if (_this.options.keySeparator === undefined) {
|
|
@@ -1079,7 +1080,7 @@
|
|
|
1079
1080
|
return _this;
|
|
1080
1081
|
}
|
|
1081
1082
|
|
|
1082
|
-
_createClass
|
|
1083
|
+
_createClass(Translator, [{
|
|
1083
1084
|
key: "changeLanguage",
|
|
1084
1085
|
value: function changeLanguage(lng) {
|
|
1085
1086
|
if (lng) this.language = lng;
|
|
@@ -1127,7 +1128,7 @@
|
|
|
1127
1128
|
value: function translate(keys, options, lastKey) {
|
|
1128
1129
|
var _this2 = this;
|
|
1129
1130
|
|
|
1130
|
-
if (_typeof
|
|
1131
|
+
if (_typeof(options) !== 'object' && this.options.overloadTranslationOptionHandler) {
|
|
1131
1132
|
options = this.options.overloadTranslationOptionHandler(arguments);
|
|
1132
1133
|
}
|
|
1133
1134
|
|
|
@@ -1426,7 +1427,7 @@
|
|
|
1426
1427
|
|
|
1427
1428
|
var LanguageUtil = function () {
|
|
1428
1429
|
function LanguageUtil(options) {
|
|
1429
|
-
_classCallCheck
|
|
1430
|
+
_classCallCheck(this, LanguageUtil);
|
|
1430
1431
|
|
|
1431
1432
|
this.options = options;
|
|
1432
1433
|
this.whitelist = this.options.supportedLngs || false;
|
|
@@ -1434,7 +1435,7 @@
|
|
|
1434
1435
|
this.logger = baseLogger.create('languageUtils');
|
|
1435
1436
|
}
|
|
1436
1437
|
|
|
1437
|
-
_createClass
|
|
1438
|
+
_createClass(LanguageUtil, [{
|
|
1438
1439
|
key: "getScriptPartFromCode",
|
|
1439
1440
|
value: function getScriptPartFromCode(code) {
|
|
1440
1441
|
if (!code || code.indexOf('-') < 0) return null;
|
|
@@ -1755,7 +1756,7 @@
|
|
|
1755
1756
|
function PluralResolver(languageUtils) {
|
|
1756
1757
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1757
1758
|
|
|
1758
|
-
_classCallCheck
|
|
1759
|
+
_classCallCheck(this, PluralResolver);
|
|
1759
1760
|
|
|
1760
1761
|
this.languageUtils = languageUtils;
|
|
1761
1762
|
this.options = options;
|
|
@@ -1763,7 +1764,7 @@
|
|
|
1763
1764
|
this.rules = createRules();
|
|
1764
1765
|
}
|
|
1765
1766
|
|
|
1766
|
-
_createClass
|
|
1767
|
+
_createClass(PluralResolver, [{
|
|
1767
1768
|
key: "addRule",
|
|
1768
1769
|
value: function addRule(lng, obj) {
|
|
1769
1770
|
this.rules[lng] = obj;
|
|
@@ -1849,7 +1850,7 @@
|
|
|
1849
1850
|
function Interpolator() {
|
|
1850
1851
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1851
1852
|
|
|
1852
|
-
_classCallCheck
|
|
1853
|
+
_classCallCheck(this, Interpolator);
|
|
1853
1854
|
|
|
1854
1855
|
this.logger = baseLogger.create('interpolator');
|
|
1855
1856
|
this.options = options;
|
|
@@ -1861,7 +1862,7 @@
|
|
|
1861
1862
|
this.init(options);
|
|
1862
1863
|
}
|
|
1863
1864
|
|
|
1864
|
-
_createClass
|
|
1865
|
+
_createClass(Interpolator, [{
|
|
1865
1866
|
key: "init",
|
|
1866
1867
|
value: function init() {
|
|
1867
1868
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -2056,19 +2057,19 @@
|
|
|
2056
2057
|
}
|
|
2057
2058
|
|
|
2058
2059
|
var Connector = function (_EventEmitter) {
|
|
2059
|
-
_inherits
|
|
2060
|
+
_inherits(Connector, _EventEmitter);
|
|
2060
2061
|
|
|
2061
2062
|
function Connector(backend, store, services) {
|
|
2062
2063
|
var _this;
|
|
2063
2064
|
|
|
2064
2065
|
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
2065
2066
|
|
|
2066
|
-
_classCallCheck
|
|
2067
|
+
_classCallCheck(this, Connector);
|
|
2067
2068
|
|
|
2068
|
-
_this = _possibleConstructorReturn
|
|
2069
|
+
_this = _possibleConstructorReturn(this, _getPrototypeOf(Connector).call(this));
|
|
2069
2070
|
|
|
2070
2071
|
if (isIE10$1) {
|
|
2071
|
-
EventEmitter.call(_assertThisInitialized$
|
|
2072
|
+
EventEmitter.call(_assertThisInitialized$1(_this));
|
|
2072
2073
|
}
|
|
2073
2074
|
|
|
2074
2075
|
_this.backend = backend;
|
|
@@ -2087,7 +2088,7 @@
|
|
|
2087
2088
|
return _this;
|
|
2088
2089
|
}
|
|
2089
2090
|
|
|
2090
|
-
_createClass
|
|
2091
|
+
_createClass(Connector, [{
|
|
2091
2092
|
key: "queueLoad",
|
|
2092
2093
|
value: function queueLoad(languages, namespaces, options, callback) {
|
|
2093
2094
|
var _this2 = this;
|
|
@@ -2313,11 +2314,11 @@
|
|
|
2313
2314
|
appendNamespaceToCIMode: false,
|
|
2314
2315
|
overloadTranslationOptionHandler: function handle(args) {
|
|
2315
2316
|
var ret = {};
|
|
2316
|
-
if (_typeof
|
|
2317
|
+
if (_typeof(args[1]) === 'object') ret = args[1];
|
|
2317
2318
|
if (typeof args[1] === 'string') ret.defaultValue = args[1];
|
|
2318
2319
|
if (typeof args[2] === 'string') ret.tDescription = args[2];
|
|
2319
2320
|
|
|
2320
|
-
if (_typeof
|
|
2321
|
+
if (_typeof(args[2]) === 'object' || _typeof(args[3]) === 'object') {
|
|
2321
2322
|
var options = args[3] || args[2];
|
|
2322
2323
|
Object.keys(options).forEach(function (key) {
|
|
2323
2324
|
ret[key] = options[key];
|
|
@@ -2370,7 +2371,7 @@
|
|
|
2370
2371
|
function noop$2() {}
|
|
2371
2372
|
|
|
2372
2373
|
var I18n = function (_EventEmitter) {
|
|
2373
|
-
_inherits
|
|
2374
|
+
_inherits(I18n, _EventEmitter);
|
|
2374
2375
|
|
|
2375
2376
|
function I18n() {
|
|
2376
2377
|
var _this;
|
|
@@ -2378,12 +2379,12 @@
|
|
|
2378
2379
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2379
2380
|
var callback = arguments.length > 1 ? arguments[1] : undefined;
|
|
2380
2381
|
|
|
2381
|
-
_classCallCheck
|
|
2382
|
+
_classCallCheck(this, I18n);
|
|
2382
2383
|
|
|
2383
|
-
_this = _possibleConstructorReturn
|
|
2384
|
+
_this = _possibleConstructorReturn(this, _getPrototypeOf(I18n).call(this));
|
|
2384
2385
|
|
|
2385
2386
|
if (isIE10$1) {
|
|
2386
|
-
EventEmitter.call(_assertThisInitialized$
|
|
2387
|
+
EventEmitter.call(_assertThisInitialized$1(_this));
|
|
2387
2388
|
}
|
|
2388
2389
|
|
|
2389
2390
|
_this.options = transformOptions(options);
|
|
@@ -2397,7 +2398,7 @@
|
|
|
2397
2398
|
if (!_this.options.initImmediate) {
|
|
2398
2399
|
_this.init(options, callback);
|
|
2399
2400
|
|
|
2400
|
-
return _possibleConstructorReturn
|
|
2401
|
+
return _possibleConstructorReturn(_this, _assertThisInitialized$1(_this));
|
|
2401
2402
|
}
|
|
2402
2403
|
|
|
2403
2404
|
setTimeout(function () {
|
|
@@ -2408,7 +2409,7 @@
|
|
|
2408
2409
|
return _this;
|
|
2409
2410
|
}
|
|
2410
2411
|
|
|
2411
|
-
_createClass
|
|
2412
|
+
_createClass(I18n, [{
|
|
2412
2413
|
key: "init",
|
|
2413
2414
|
value: function init() {
|
|
2414
2415
|
var _this2 = this;
|
|
@@ -2705,7 +2706,7 @@
|
|
|
2705
2706
|
var fixedT = function fixedT(key, opts) {
|
|
2706
2707
|
var options;
|
|
2707
2708
|
|
|
2708
|
-
if (_typeof
|
|
2709
|
+
if (_typeof(opts) !== 'object') {
|
|
2709
2710
|
for (var _len3 = arguments.length, rest = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
|
|
2710
2711
|
rest[_key3 - 2] = arguments[_key3];
|
|
2711
2712
|
}
|
|
@@ -3656,8 +3657,8 @@
|
|
|
3656
3657
|
return React.useContext(MotionContext).visualElement;
|
|
3657
3658
|
}
|
|
3658
3659
|
|
|
3659
|
-
var isBrowser$
|
|
3660
|
-
var useIsomorphicLayoutEffect$2 = isBrowser$
|
|
3660
|
+
var isBrowser$5 = typeof window !== "undefined";
|
|
3661
|
+
var useIsomorphicLayoutEffect$2 = isBrowser$5 ? React.useLayoutEffect : React.useEffect;
|
|
3661
3662
|
|
|
3662
3663
|
function useSnapshotOnUnmount(visualElement) {
|
|
3663
3664
|
var syncLayout = React.useContext(SharedLayoutContext);
|
|
@@ -5205,16 +5206,16 @@
|
|
|
5205
5206
|
: listener;
|
|
5206
5207
|
};
|
|
5207
5208
|
|
|
5208
|
-
var isBrowser$
|
|
5209
|
+
var isBrowser$4 = typeof window !== "undefined";
|
|
5209
5210
|
// We check for event support via functions in case they've been mocked by a testing suite.
|
|
5210
5211
|
var supportsPointerEvents = function () {
|
|
5211
|
-
return isBrowser$
|
|
5212
|
+
return isBrowser$4 && window.onpointerdown === null;
|
|
5212
5213
|
};
|
|
5213
5214
|
var supportsTouchEvents = function () {
|
|
5214
|
-
return isBrowser$
|
|
5215
|
+
return isBrowser$4 && window.ontouchstart === null;
|
|
5215
5216
|
};
|
|
5216
5217
|
var supportsMouseEvents = function () {
|
|
5217
|
-
return isBrowser$
|
|
5218
|
+
return isBrowser$4 && window.onmousedown === null;
|
|
5218
5219
|
};
|
|
5219
5220
|
|
|
5220
5221
|
var mouseEventNames = {
|
|
@@ -11908,7 +11909,7 @@
|
|
|
11908
11909
|
textOverflow: true
|
|
11909
11910
|
});
|
|
11910
11911
|
|
|
11911
|
-
var addStyledProps = compose(border, shadow, color, cursor$1, layout, overflow, space, textOverflow, transform, transition, typography, visibility);
|
|
11912
|
+
var addStyledProps = compose(border, shadow, color, cursor$1, layout, overflow, space, textOverflow, transform, transition, typography, visibility, flexbox);
|
|
11912
11913
|
|
|
11913
11914
|
var getAttrs = function getAttrs(inline) {
|
|
11914
11915
|
return inline ? {
|
|
@@ -12950,14 +12951,14 @@
|
|
|
12950
12951
|
function _inheritsLoose$1(subClass, superClass) {
|
|
12951
12952
|
subClass.prototype = Object.create(superClass.prototype);
|
|
12952
12953
|
subClass.prototype.constructor = subClass;
|
|
12953
|
-
_setPrototypeOf$
|
|
12954
|
+
_setPrototypeOf$1(subClass, superClass);
|
|
12954
12955
|
}
|
|
12955
12956
|
|
|
12956
12957
|
function _isNativeFunction(fn) {
|
|
12957
12958
|
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
12958
12959
|
}
|
|
12959
12960
|
|
|
12960
|
-
function _isNativeReflectConstruct$
|
|
12961
|
+
function _isNativeReflectConstruct$6() {
|
|
12961
12962
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
12962
12963
|
if (Reflect.construct.sham) return false;
|
|
12963
12964
|
if (typeof Proxy === "function") return true;
|
|
@@ -12971,7 +12972,7 @@
|
|
|
12971
12972
|
}
|
|
12972
12973
|
|
|
12973
12974
|
function _construct(Parent, args, Class) {
|
|
12974
|
-
if (_isNativeReflectConstruct$
|
|
12975
|
+
if (_isNativeReflectConstruct$6()) {
|
|
12975
12976
|
_construct = Reflect.construct;
|
|
12976
12977
|
} else {
|
|
12977
12978
|
_construct = function _construct(Parent, args, Class) {
|
|
@@ -12979,7 +12980,7 @@
|
|
|
12979
12980
|
a.push.apply(a, args);
|
|
12980
12981
|
var Constructor = Function.bind.apply(Parent, a);
|
|
12981
12982
|
var instance = new Constructor();
|
|
12982
|
-
if (Class) _setPrototypeOf$
|
|
12983
|
+
if (Class) _setPrototypeOf$1(instance, Class.prototype);
|
|
12983
12984
|
return instance;
|
|
12984
12985
|
};
|
|
12985
12986
|
}
|
|
@@ -13004,7 +13005,7 @@
|
|
|
13004
13005
|
}
|
|
13005
13006
|
|
|
13006
13007
|
function Wrapper() {
|
|
13007
|
-
return _construct(Class, arguments, _getPrototypeOf
|
|
13008
|
+
return _construct(Class, arguments, _getPrototypeOf(this).constructor);
|
|
13008
13009
|
}
|
|
13009
13010
|
|
|
13010
13011
|
Wrapper.prototype = Object.create(Class.prototype, {
|
|
@@ -13015,7 +13016,7 @@
|
|
|
13015
13016
|
configurable: true
|
|
13016
13017
|
}
|
|
13017
13018
|
});
|
|
13018
|
-
return _setPrototypeOf$
|
|
13019
|
+
return _setPrototypeOf$1(Wrapper, Class);
|
|
13019
13020
|
};
|
|
13020
13021
|
|
|
13021
13022
|
return _wrapNativeSuper(Class);
|
|
@@ -13149,7 +13150,7 @@
|
|
|
13149
13150
|
_this = _Error.call(this, format$3.apply(void 0, [ERRORS[code]].concat(args))) || this;
|
|
13150
13151
|
}
|
|
13151
13152
|
|
|
13152
|
-
return _assertThisInitialized$
|
|
13153
|
+
return _assertThisInitialized$1(_this);
|
|
13153
13154
|
}
|
|
13154
13155
|
|
|
13155
13156
|
return PolishedError;
|
|
@@ -15566,7 +15567,7 @@
|
|
|
15566
15567
|
}, []);
|
|
15567
15568
|
}
|
|
15568
15569
|
|
|
15569
|
-
function debounce$
|
|
15570
|
+
function debounce$2(fn) {
|
|
15570
15571
|
var pending;
|
|
15571
15572
|
return function () {
|
|
15572
15573
|
if (!pending) {
|
|
@@ -15873,7 +15874,7 @@
|
|
|
15873
15874
|
},
|
|
15874
15875
|
// Async and optimistically optimized update – it will not be executed if
|
|
15875
15876
|
// not necessary (debounced to run at most once-per-tick)
|
|
15876
|
-
update: debounce$
|
|
15877
|
+
update: debounce$2(function () {
|
|
15877
15878
|
return new Promise(function (resolve) {
|
|
15878
15879
|
instance.forceUpdate();
|
|
15879
15880
|
resolve(state);
|
|
@@ -16582,6 +16583,7 @@
|
|
|
16582
16583
|
ml: "x2"
|
|
16583
16584
|
}, /*#__PURE__*/React__default['default'].createElement(Link, {
|
|
16584
16585
|
as: "button",
|
|
16586
|
+
type: "button",
|
|
16585
16587
|
color: "darkGrey",
|
|
16586
16588
|
lineHeight: "0",
|
|
16587
16589
|
hover: "blue",
|
|
@@ -16992,12 +16994,12 @@
|
|
|
16992
16994
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16993
16995
|
* SOFTWARE.
|
|
16994
16996
|
*/
|
|
16995
|
-
var isBrowser$
|
|
16997
|
+
var isBrowser$3 = typeof window !== 'undefined' && typeof document !== 'undefined' && typeof navigator !== 'undefined';
|
|
16996
16998
|
|
|
16997
16999
|
var timeoutDuration = function () {
|
|
16998
17000
|
var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];
|
|
16999
17001
|
for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {
|
|
17000
|
-
if (isBrowser$
|
|
17002
|
+
if (isBrowser$3 && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {
|
|
17001
17003
|
return 1;
|
|
17002
17004
|
}
|
|
17003
17005
|
}
|
|
@@ -17031,7 +17033,7 @@
|
|
|
17031
17033
|
};
|
|
17032
17034
|
}
|
|
17033
17035
|
|
|
17034
|
-
var supportsMicroTasks = isBrowser$
|
|
17036
|
+
var supportsMicroTasks = isBrowser$3 && window.Promise;
|
|
17035
17037
|
|
|
17036
17038
|
/**
|
|
17037
17039
|
* Create a debounced version of a method, that's asynchronously deferred
|
|
@@ -17042,7 +17044,7 @@
|
|
|
17042
17044
|
* @argument {Function} fn
|
|
17043
17045
|
* @returns {Function}
|
|
17044
17046
|
*/
|
|
17045
|
-
var debounce$
|
|
17047
|
+
var debounce$1 = supportsMicroTasks ? microtaskDebounce : taskDebounce;
|
|
17046
17048
|
|
|
17047
17049
|
/**
|
|
17048
17050
|
* Check if the given variable is a function
|
|
@@ -17051,7 +17053,7 @@
|
|
|
17051
17053
|
* @argument {Any} functionToCheck - variable to check
|
|
17052
17054
|
* @returns {Boolean} answer to: is a function?
|
|
17053
17055
|
*/
|
|
17054
|
-
function isFunction
|
|
17056
|
+
function isFunction(functionToCheck) {
|
|
17055
17057
|
var getType = {};
|
|
17056
17058
|
return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
|
|
17057
17059
|
}
|
|
@@ -17133,8 +17135,8 @@
|
|
|
17133
17135
|
return reference && reference.referenceNode ? reference.referenceNode : reference;
|
|
17134
17136
|
}
|
|
17135
17137
|
|
|
17136
|
-
var isIE11 = isBrowser$
|
|
17137
|
-
var isIE10 = isBrowser$
|
|
17138
|
+
var isIE11 = isBrowser$3 && !!(window.MSInputMethodContext && document.documentMode);
|
|
17139
|
+
var isIE10 = isBrowser$3 && /MSIE 10/.test(navigator.userAgent);
|
|
17138
17140
|
|
|
17139
17141
|
/**
|
|
17140
17142
|
* Determines if the browser is Internet Explorer
|
|
@@ -17312,7 +17314,7 @@
|
|
|
17312
17314
|
* @return {number} borders - The borders size of the given axis
|
|
17313
17315
|
*/
|
|
17314
17316
|
|
|
17315
|
-
function getBordersSize
|
|
17317
|
+
function getBordersSize(styles, axis) {
|
|
17316
17318
|
var sideA = axis === 'x' ? 'Left' : 'Top';
|
|
17317
17319
|
var sideB = sideA === 'Left' ? 'Right' : 'Bottom';
|
|
17318
17320
|
|
|
@@ -17451,8 +17453,8 @@
|
|
|
17451
17453
|
// we make this check conditional for performance reasons
|
|
17452
17454
|
if (horizScrollbar || vertScrollbar) {
|
|
17453
17455
|
var styles = getStyleComputedProperty(element);
|
|
17454
|
-
horizScrollbar -= getBordersSize
|
|
17455
|
-
vertScrollbar -= getBordersSize
|
|
17456
|
+
horizScrollbar -= getBordersSize(styles, 'x');
|
|
17457
|
+
vertScrollbar -= getBordersSize(styles, 'y');
|
|
17456
17458
|
|
|
17457
17459
|
result.width -= horizScrollbar;
|
|
17458
17460
|
result.height -= vertScrollbar;
|
|
@@ -17860,7 +17862,7 @@
|
|
|
17860
17862
|
console.warn('`modifier.function` is deprecated, use `modifier.fn`!');
|
|
17861
17863
|
}
|
|
17862
17864
|
var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation
|
|
17863
|
-
if (modifier.enabled && isFunction
|
|
17865
|
+
if (modifier.enabled && isFunction(fn)) {
|
|
17864
17866
|
// Add properties to offsets to make them a complete clientRect object
|
|
17865
17867
|
// we do this before each modifier to make sure the previous one doesn't
|
|
17866
17868
|
// mess with these values
|
|
@@ -18236,7 +18238,7 @@
|
|
|
18236
18238
|
};
|
|
18237
18239
|
}
|
|
18238
18240
|
|
|
18239
|
-
var isFirefox = isBrowser$
|
|
18241
|
+
var isFirefox = isBrowser$3 && /Firefox/i.test(navigator.userAgent);
|
|
18240
18242
|
|
|
18241
18243
|
/**
|
|
18242
18244
|
* @function
|
|
@@ -19449,7 +19451,7 @@
|
|
|
19449
19451
|
};
|
|
19450
19452
|
|
|
19451
19453
|
// make update() debounced, so that it only runs at most once-per-tick
|
|
19452
|
-
this.update = debounce$
|
|
19454
|
+
this.update = debounce$1(this.update.bind(this));
|
|
19453
19455
|
|
|
19454
19456
|
// with {} we create a new object with the options inside it
|
|
19455
19457
|
this.options = _extends$1({}, Popper.Defaults, options);
|
|
@@ -19487,7 +19489,7 @@
|
|
|
19487
19489
|
// they could add new properties to their options configuration
|
|
19488
19490
|
// BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!
|
|
19489
19491
|
this.modifiers.forEach(function (modifierOptions) {
|
|
19490
|
-
if (modifierOptions.enabled && isFunction
|
|
19492
|
+
if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {
|
|
19491
19493
|
modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state);
|
|
19492
19494
|
}
|
|
19493
19495
|
});
|
|
@@ -20775,1841 +20777,6 @@
|
|
|
20775
20777
|
}));
|
|
20776
20778
|
});
|
|
20777
20779
|
|
|
20778
|
-
/**
|
|
20779
|
-
* A collection of shims that provide minimal functionality of the ES6 collections.
|
|
20780
|
-
*
|
|
20781
|
-
* These implementations are not meant to be used outside of the ResizeObserver
|
|
20782
|
-
* modules as they cover only a limited range of use cases.
|
|
20783
|
-
*/
|
|
20784
|
-
/* eslint-disable require-jsdoc, valid-jsdoc */
|
|
20785
|
-
var MapShim = (function () {
|
|
20786
|
-
if (typeof Map !== 'undefined') {
|
|
20787
|
-
return Map;
|
|
20788
|
-
}
|
|
20789
|
-
/**
|
|
20790
|
-
* Returns index in provided array that matches the specified key.
|
|
20791
|
-
*
|
|
20792
|
-
* @param {Array<Array>} arr
|
|
20793
|
-
* @param {*} key
|
|
20794
|
-
* @returns {number}
|
|
20795
|
-
*/
|
|
20796
|
-
function getIndex(arr, key) {
|
|
20797
|
-
var result = -1;
|
|
20798
|
-
arr.some(function (entry, index) {
|
|
20799
|
-
if (entry[0] === key) {
|
|
20800
|
-
result = index;
|
|
20801
|
-
return true;
|
|
20802
|
-
}
|
|
20803
|
-
return false;
|
|
20804
|
-
});
|
|
20805
|
-
return result;
|
|
20806
|
-
}
|
|
20807
|
-
return /** @class */ (function () {
|
|
20808
|
-
function class_1() {
|
|
20809
|
-
this.__entries__ = [];
|
|
20810
|
-
}
|
|
20811
|
-
Object.defineProperty(class_1.prototype, "size", {
|
|
20812
|
-
/**
|
|
20813
|
-
* @returns {boolean}
|
|
20814
|
-
*/
|
|
20815
|
-
get: function () {
|
|
20816
|
-
return this.__entries__.length;
|
|
20817
|
-
},
|
|
20818
|
-
enumerable: true,
|
|
20819
|
-
configurable: true
|
|
20820
|
-
});
|
|
20821
|
-
/**
|
|
20822
|
-
* @param {*} key
|
|
20823
|
-
* @returns {*}
|
|
20824
|
-
*/
|
|
20825
|
-
class_1.prototype.get = function (key) {
|
|
20826
|
-
var index = getIndex(this.__entries__, key);
|
|
20827
|
-
var entry = this.__entries__[index];
|
|
20828
|
-
return entry && entry[1];
|
|
20829
|
-
};
|
|
20830
|
-
/**
|
|
20831
|
-
* @param {*} key
|
|
20832
|
-
* @param {*} value
|
|
20833
|
-
* @returns {void}
|
|
20834
|
-
*/
|
|
20835
|
-
class_1.prototype.set = function (key, value) {
|
|
20836
|
-
var index = getIndex(this.__entries__, key);
|
|
20837
|
-
if (~index) {
|
|
20838
|
-
this.__entries__[index][1] = value;
|
|
20839
|
-
}
|
|
20840
|
-
else {
|
|
20841
|
-
this.__entries__.push([key, value]);
|
|
20842
|
-
}
|
|
20843
|
-
};
|
|
20844
|
-
/**
|
|
20845
|
-
* @param {*} key
|
|
20846
|
-
* @returns {void}
|
|
20847
|
-
*/
|
|
20848
|
-
class_1.prototype.delete = function (key) {
|
|
20849
|
-
var entries = this.__entries__;
|
|
20850
|
-
var index = getIndex(entries, key);
|
|
20851
|
-
if (~index) {
|
|
20852
|
-
entries.splice(index, 1);
|
|
20853
|
-
}
|
|
20854
|
-
};
|
|
20855
|
-
/**
|
|
20856
|
-
* @param {*} key
|
|
20857
|
-
* @returns {void}
|
|
20858
|
-
*/
|
|
20859
|
-
class_1.prototype.has = function (key) {
|
|
20860
|
-
return !!~getIndex(this.__entries__, key);
|
|
20861
|
-
};
|
|
20862
|
-
/**
|
|
20863
|
-
* @returns {void}
|
|
20864
|
-
*/
|
|
20865
|
-
class_1.prototype.clear = function () {
|
|
20866
|
-
this.__entries__.splice(0);
|
|
20867
|
-
};
|
|
20868
|
-
/**
|
|
20869
|
-
* @param {Function} callback
|
|
20870
|
-
* @param {*} [ctx=null]
|
|
20871
|
-
* @returns {void}
|
|
20872
|
-
*/
|
|
20873
|
-
class_1.prototype.forEach = function (callback, ctx) {
|
|
20874
|
-
if (ctx === void 0) { ctx = null; }
|
|
20875
|
-
for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {
|
|
20876
|
-
var entry = _a[_i];
|
|
20877
|
-
callback.call(ctx, entry[1], entry[0]);
|
|
20878
|
-
}
|
|
20879
|
-
};
|
|
20880
|
-
return class_1;
|
|
20881
|
-
}());
|
|
20882
|
-
})();
|
|
20883
|
-
|
|
20884
|
-
/**
|
|
20885
|
-
* Detects whether window and document objects are available in current environment.
|
|
20886
|
-
*/
|
|
20887
|
-
var isBrowser$3 = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;
|
|
20888
|
-
|
|
20889
|
-
// Returns global object of a current environment.
|
|
20890
|
-
var global$1 = (function () {
|
|
20891
|
-
if (typeof global !== 'undefined' && global.Math === Math) {
|
|
20892
|
-
return global;
|
|
20893
|
-
}
|
|
20894
|
-
if (typeof self !== 'undefined' && self.Math === Math) {
|
|
20895
|
-
return self;
|
|
20896
|
-
}
|
|
20897
|
-
if (typeof window !== 'undefined' && window.Math === Math) {
|
|
20898
|
-
return window;
|
|
20899
|
-
}
|
|
20900
|
-
// eslint-disable-next-line no-new-func
|
|
20901
|
-
return Function('return this')();
|
|
20902
|
-
})();
|
|
20903
|
-
|
|
20904
|
-
/**
|
|
20905
|
-
* A shim for the requestAnimationFrame which falls back to the setTimeout if
|
|
20906
|
-
* first one is not supported.
|
|
20907
|
-
*
|
|
20908
|
-
* @returns {number} Requests' identifier.
|
|
20909
|
-
*/
|
|
20910
|
-
var requestAnimationFrame$1 = (function () {
|
|
20911
|
-
if (typeof requestAnimationFrame === 'function') {
|
|
20912
|
-
// It's required to use a bounded function because IE sometimes throws
|
|
20913
|
-
// an "Invalid calling object" error if rAF is invoked without the global
|
|
20914
|
-
// object on the left hand side.
|
|
20915
|
-
return requestAnimationFrame.bind(global$1);
|
|
20916
|
-
}
|
|
20917
|
-
return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };
|
|
20918
|
-
})();
|
|
20919
|
-
|
|
20920
|
-
// Defines minimum timeout before adding a trailing call.
|
|
20921
|
-
var trailingTimeout = 2;
|
|
20922
|
-
/**
|
|
20923
|
-
* Creates a wrapper function which ensures that provided callback will be
|
|
20924
|
-
* invoked only once during the specified delay period.
|
|
20925
|
-
*
|
|
20926
|
-
* @param {Function} callback - Function to be invoked after the delay period.
|
|
20927
|
-
* @param {number} delay - Delay after which to invoke callback.
|
|
20928
|
-
* @returns {Function}
|
|
20929
|
-
*/
|
|
20930
|
-
function throttle$1 (callback, delay) {
|
|
20931
|
-
var leadingCall = false, trailingCall = false, lastCallTime = 0;
|
|
20932
|
-
/**
|
|
20933
|
-
* Invokes the original callback function and schedules new invocation if
|
|
20934
|
-
* the "proxy" was called during current request.
|
|
20935
|
-
*
|
|
20936
|
-
* @returns {void}
|
|
20937
|
-
*/
|
|
20938
|
-
function resolvePending() {
|
|
20939
|
-
if (leadingCall) {
|
|
20940
|
-
leadingCall = false;
|
|
20941
|
-
callback();
|
|
20942
|
-
}
|
|
20943
|
-
if (trailingCall) {
|
|
20944
|
-
proxy();
|
|
20945
|
-
}
|
|
20946
|
-
}
|
|
20947
|
-
/**
|
|
20948
|
-
* Callback invoked after the specified delay. It will further postpone
|
|
20949
|
-
* invocation of the original function delegating it to the
|
|
20950
|
-
* requestAnimationFrame.
|
|
20951
|
-
*
|
|
20952
|
-
* @returns {void}
|
|
20953
|
-
*/
|
|
20954
|
-
function timeoutCallback() {
|
|
20955
|
-
requestAnimationFrame$1(resolvePending);
|
|
20956
|
-
}
|
|
20957
|
-
/**
|
|
20958
|
-
* Schedules invocation of the original function.
|
|
20959
|
-
*
|
|
20960
|
-
* @returns {void}
|
|
20961
|
-
*/
|
|
20962
|
-
function proxy() {
|
|
20963
|
-
var timeStamp = Date.now();
|
|
20964
|
-
if (leadingCall) {
|
|
20965
|
-
// Reject immediately following calls.
|
|
20966
|
-
if (timeStamp - lastCallTime < trailingTimeout) {
|
|
20967
|
-
return;
|
|
20968
|
-
}
|
|
20969
|
-
// Schedule new call to be in invoked when the pending one is resolved.
|
|
20970
|
-
// This is important for "transitions" which never actually start
|
|
20971
|
-
// immediately so there is a chance that we might miss one if change
|
|
20972
|
-
// happens amids the pending invocation.
|
|
20973
|
-
trailingCall = true;
|
|
20974
|
-
}
|
|
20975
|
-
else {
|
|
20976
|
-
leadingCall = true;
|
|
20977
|
-
trailingCall = false;
|
|
20978
|
-
setTimeout(timeoutCallback, delay);
|
|
20979
|
-
}
|
|
20980
|
-
lastCallTime = timeStamp;
|
|
20981
|
-
}
|
|
20982
|
-
return proxy;
|
|
20983
|
-
}
|
|
20984
|
-
|
|
20985
|
-
// Minimum delay before invoking the update of observers.
|
|
20986
|
-
var REFRESH_DELAY = 20;
|
|
20987
|
-
// A list of substrings of CSS properties used to find transition events that
|
|
20988
|
-
// might affect dimensions of observed elements.
|
|
20989
|
-
var transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];
|
|
20990
|
-
// Check if MutationObserver is available.
|
|
20991
|
-
var mutationObserverSupported = typeof MutationObserver !== 'undefined';
|
|
20992
|
-
/**
|
|
20993
|
-
* Singleton controller class which handles updates of ResizeObserver instances.
|
|
20994
|
-
*/
|
|
20995
|
-
var ResizeObserverController = /** @class */ (function () {
|
|
20996
|
-
/**
|
|
20997
|
-
* Creates a new instance of ResizeObserverController.
|
|
20998
|
-
*
|
|
20999
|
-
* @private
|
|
21000
|
-
*/
|
|
21001
|
-
function ResizeObserverController() {
|
|
21002
|
-
/**
|
|
21003
|
-
* Indicates whether DOM listeners have been added.
|
|
21004
|
-
*
|
|
21005
|
-
* @private {boolean}
|
|
21006
|
-
*/
|
|
21007
|
-
this.connected_ = false;
|
|
21008
|
-
/**
|
|
21009
|
-
* Tells that controller has subscribed for Mutation Events.
|
|
21010
|
-
*
|
|
21011
|
-
* @private {boolean}
|
|
21012
|
-
*/
|
|
21013
|
-
this.mutationEventsAdded_ = false;
|
|
21014
|
-
/**
|
|
21015
|
-
* Keeps reference to the instance of MutationObserver.
|
|
21016
|
-
*
|
|
21017
|
-
* @private {MutationObserver}
|
|
21018
|
-
*/
|
|
21019
|
-
this.mutationsObserver_ = null;
|
|
21020
|
-
/**
|
|
21021
|
-
* A list of connected observers.
|
|
21022
|
-
*
|
|
21023
|
-
* @private {Array<ResizeObserverSPI>}
|
|
21024
|
-
*/
|
|
21025
|
-
this.observers_ = [];
|
|
21026
|
-
this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);
|
|
21027
|
-
this.refresh = throttle$1(this.refresh.bind(this), REFRESH_DELAY);
|
|
21028
|
-
}
|
|
21029
|
-
/**
|
|
21030
|
-
* Adds observer to observers list.
|
|
21031
|
-
*
|
|
21032
|
-
* @param {ResizeObserverSPI} observer - Observer to be added.
|
|
21033
|
-
* @returns {void}
|
|
21034
|
-
*/
|
|
21035
|
-
ResizeObserverController.prototype.addObserver = function (observer) {
|
|
21036
|
-
if (!~this.observers_.indexOf(observer)) {
|
|
21037
|
-
this.observers_.push(observer);
|
|
21038
|
-
}
|
|
21039
|
-
// Add listeners if they haven't been added yet.
|
|
21040
|
-
if (!this.connected_) {
|
|
21041
|
-
this.connect_();
|
|
21042
|
-
}
|
|
21043
|
-
};
|
|
21044
|
-
/**
|
|
21045
|
-
* Removes observer from observers list.
|
|
21046
|
-
*
|
|
21047
|
-
* @param {ResizeObserverSPI} observer - Observer to be removed.
|
|
21048
|
-
* @returns {void}
|
|
21049
|
-
*/
|
|
21050
|
-
ResizeObserverController.prototype.removeObserver = function (observer) {
|
|
21051
|
-
var observers = this.observers_;
|
|
21052
|
-
var index = observers.indexOf(observer);
|
|
21053
|
-
// Remove observer if it's present in registry.
|
|
21054
|
-
if (~index) {
|
|
21055
|
-
observers.splice(index, 1);
|
|
21056
|
-
}
|
|
21057
|
-
// Remove listeners if controller has no connected observers.
|
|
21058
|
-
if (!observers.length && this.connected_) {
|
|
21059
|
-
this.disconnect_();
|
|
21060
|
-
}
|
|
21061
|
-
};
|
|
21062
|
-
/**
|
|
21063
|
-
* Invokes the update of observers. It will continue running updates insofar
|
|
21064
|
-
* it detects changes.
|
|
21065
|
-
*
|
|
21066
|
-
* @returns {void}
|
|
21067
|
-
*/
|
|
21068
|
-
ResizeObserverController.prototype.refresh = function () {
|
|
21069
|
-
var changesDetected = this.updateObservers_();
|
|
21070
|
-
// Continue running updates if changes have been detected as there might
|
|
21071
|
-
// be future ones caused by CSS transitions.
|
|
21072
|
-
if (changesDetected) {
|
|
21073
|
-
this.refresh();
|
|
21074
|
-
}
|
|
21075
|
-
};
|
|
21076
|
-
/**
|
|
21077
|
-
* Updates every observer from observers list and notifies them of queued
|
|
21078
|
-
* entries.
|
|
21079
|
-
*
|
|
21080
|
-
* @private
|
|
21081
|
-
* @returns {boolean} Returns "true" if any observer has detected changes in
|
|
21082
|
-
* dimensions of it's elements.
|
|
21083
|
-
*/
|
|
21084
|
-
ResizeObserverController.prototype.updateObservers_ = function () {
|
|
21085
|
-
// Collect observers that have active observations.
|
|
21086
|
-
var activeObservers = this.observers_.filter(function (observer) {
|
|
21087
|
-
return observer.gatherActive(), observer.hasActive();
|
|
21088
|
-
});
|
|
21089
|
-
// Deliver notifications in a separate cycle in order to avoid any
|
|
21090
|
-
// collisions between observers, e.g. when multiple instances of
|
|
21091
|
-
// ResizeObserver are tracking the same element and the callback of one
|
|
21092
|
-
// of them changes content dimensions of the observed target. Sometimes
|
|
21093
|
-
// this may result in notifications being blocked for the rest of observers.
|
|
21094
|
-
activeObservers.forEach(function (observer) { return observer.broadcastActive(); });
|
|
21095
|
-
return activeObservers.length > 0;
|
|
21096
|
-
};
|
|
21097
|
-
/**
|
|
21098
|
-
* Initializes DOM listeners.
|
|
21099
|
-
*
|
|
21100
|
-
* @private
|
|
21101
|
-
* @returns {void}
|
|
21102
|
-
*/
|
|
21103
|
-
ResizeObserverController.prototype.connect_ = function () {
|
|
21104
|
-
// Do nothing if running in a non-browser environment or if listeners
|
|
21105
|
-
// have been already added.
|
|
21106
|
-
if (!isBrowser$3 || this.connected_) {
|
|
21107
|
-
return;
|
|
21108
|
-
}
|
|
21109
|
-
// Subscription to the "Transitionend" event is used as a workaround for
|
|
21110
|
-
// delayed transitions. This way it's possible to capture at least the
|
|
21111
|
-
// final state of an element.
|
|
21112
|
-
document.addEventListener('transitionend', this.onTransitionEnd_);
|
|
21113
|
-
window.addEventListener('resize', this.refresh);
|
|
21114
|
-
if (mutationObserverSupported) {
|
|
21115
|
-
this.mutationsObserver_ = new MutationObserver(this.refresh);
|
|
21116
|
-
this.mutationsObserver_.observe(document, {
|
|
21117
|
-
attributes: true,
|
|
21118
|
-
childList: true,
|
|
21119
|
-
characterData: true,
|
|
21120
|
-
subtree: true
|
|
21121
|
-
});
|
|
21122
|
-
}
|
|
21123
|
-
else {
|
|
21124
|
-
document.addEventListener('DOMSubtreeModified', this.refresh);
|
|
21125
|
-
this.mutationEventsAdded_ = true;
|
|
21126
|
-
}
|
|
21127
|
-
this.connected_ = true;
|
|
21128
|
-
};
|
|
21129
|
-
/**
|
|
21130
|
-
* Removes DOM listeners.
|
|
21131
|
-
*
|
|
21132
|
-
* @private
|
|
21133
|
-
* @returns {void}
|
|
21134
|
-
*/
|
|
21135
|
-
ResizeObserverController.prototype.disconnect_ = function () {
|
|
21136
|
-
// Do nothing if running in a non-browser environment or if listeners
|
|
21137
|
-
// have been already removed.
|
|
21138
|
-
if (!isBrowser$3 || !this.connected_) {
|
|
21139
|
-
return;
|
|
21140
|
-
}
|
|
21141
|
-
document.removeEventListener('transitionend', this.onTransitionEnd_);
|
|
21142
|
-
window.removeEventListener('resize', this.refresh);
|
|
21143
|
-
if (this.mutationsObserver_) {
|
|
21144
|
-
this.mutationsObserver_.disconnect();
|
|
21145
|
-
}
|
|
21146
|
-
if (this.mutationEventsAdded_) {
|
|
21147
|
-
document.removeEventListener('DOMSubtreeModified', this.refresh);
|
|
21148
|
-
}
|
|
21149
|
-
this.mutationsObserver_ = null;
|
|
21150
|
-
this.mutationEventsAdded_ = false;
|
|
21151
|
-
this.connected_ = false;
|
|
21152
|
-
};
|
|
21153
|
-
/**
|
|
21154
|
-
* "Transitionend" event handler.
|
|
21155
|
-
*
|
|
21156
|
-
* @private
|
|
21157
|
-
* @param {TransitionEvent} event
|
|
21158
|
-
* @returns {void}
|
|
21159
|
-
*/
|
|
21160
|
-
ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {
|
|
21161
|
-
var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;
|
|
21162
|
-
// Detect whether transition may affect dimensions of an element.
|
|
21163
|
-
var isReflowProperty = transitionKeys.some(function (key) {
|
|
21164
|
-
return !!~propertyName.indexOf(key);
|
|
21165
|
-
});
|
|
21166
|
-
if (isReflowProperty) {
|
|
21167
|
-
this.refresh();
|
|
21168
|
-
}
|
|
21169
|
-
};
|
|
21170
|
-
/**
|
|
21171
|
-
* Returns instance of the ResizeObserverController.
|
|
21172
|
-
*
|
|
21173
|
-
* @returns {ResizeObserverController}
|
|
21174
|
-
*/
|
|
21175
|
-
ResizeObserverController.getInstance = function () {
|
|
21176
|
-
if (!this.instance_) {
|
|
21177
|
-
this.instance_ = new ResizeObserverController();
|
|
21178
|
-
}
|
|
21179
|
-
return this.instance_;
|
|
21180
|
-
};
|
|
21181
|
-
/**
|
|
21182
|
-
* Holds reference to the controller's instance.
|
|
21183
|
-
*
|
|
21184
|
-
* @private {ResizeObserverController}
|
|
21185
|
-
*/
|
|
21186
|
-
ResizeObserverController.instance_ = null;
|
|
21187
|
-
return ResizeObserverController;
|
|
21188
|
-
}());
|
|
21189
|
-
|
|
21190
|
-
/**
|
|
21191
|
-
* Defines non-writable/enumerable properties of the provided target object.
|
|
21192
|
-
*
|
|
21193
|
-
* @param {Object} target - Object for which to define properties.
|
|
21194
|
-
* @param {Object} props - Properties to be defined.
|
|
21195
|
-
* @returns {Object} Target object.
|
|
21196
|
-
*/
|
|
21197
|
-
var defineConfigurable = (function (target, props) {
|
|
21198
|
-
for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {
|
|
21199
|
-
var key = _a[_i];
|
|
21200
|
-
Object.defineProperty(target, key, {
|
|
21201
|
-
value: props[key],
|
|
21202
|
-
enumerable: false,
|
|
21203
|
-
writable: false,
|
|
21204
|
-
configurable: true
|
|
21205
|
-
});
|
|
21206
|
-
}
|
|
21207
|
-
return target;
|
|
21208
|
-
});
|
|
21209
|
-
|
|
21210
|
-
/**
|
|
21211
|
-
* Returns the global object associated with provided element.
|
|
21212
|
-
*
|
|
21213
|
-
* @param {Object} target
|
|
21214
|
-
* @returns {Object}
|
|
21215
|
-
*/
|
|
21216
|
-
var getWindowOf = (function (target) {
|
|
21217
|
-
// Assume that the element is an instance of Node, which means that it
|
|
21218
|
-
// has the "ownerDocument" property from which we can retrieve a
|
|
21219
|
-
// corresponding global object.
|
|
21220
|
-
var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;
|
|
21221
|
-
// Return the local global object if it's not possible extract one from
|
|
21222
|
-
// provided element.
|
|
21223
|
-
return ownerGlobal || global$1;
|
|
21224
|
-
});
|
|
21225
|
-
|
|
21226
|
-
// Placeholder of an empty content rectangle.
|
|
21227
|
-
var emptyRect = createRectInit(0, 0, 0, 0);
|
|
21228
|
-
/**
|
|
21229
|
-
* Converts provided string to a number.
|
|
21230
|
-
*
|
|
21231
|
-
* @param {number|string} value
|
|
21232
|
-
* @returns {number}
|
|
21233
|
-
*/
|
|
21234
|
-
function toFloat(value) {
|
|
21235
|
-
return parseFloat(value) || 0;
|
|
21236
|
-
}
|
|
21237
|
-
/**
|
|
21238
|
-
* Extracts borders size from provided styles.
|
|
21239
|
-
*
|
|
21240
|
-
* @param {CSSStyleDeclaration} styles
|
|
21241
|
-
* @param {...string} positions - Borders positions (top, right, ...)
|
|
21242
|
-
* @returns {number}
|
|
21243
|
-
*/
|
|
21244
|
-
function getBordersSize(styles) {
|
|
21245
|
-
var positions = [];
|
|
21246
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
21247
|
-
positions[_i - 1] = arguments[_i];
|
|
21248
|
-
}
|
|
21249
|
-
return positions.reduce(function (size, position) {
|
|
21250
|
-
var value = styles['border-' + position + '-width'];
|
|
21251
|
-
return size + toFloat(value);
|
|
21252
|
-
}, 0);
|
|
21253
|
-
}
|
|
21254
|
-
/**
|
|
21255
|
-
* Extracts paddings sizes from provided styles.
|
|
21256
|
-
*
|
|
21257
|
-
* @param {CSSStyleDeclaration} styles
|
|
21258
|
-
* @returns {Object} Paddings box.
|
|
21259
|
-
*/
|
|
21260
|
-
function getPaddings(styles) {
|
|
21261
|
-
var positions = ['top', 'right', 'bottom', 'left'];
|
|
21262
|
-
var paddings = {};
|
|
21263
|
-
for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {
|
|
21264
|
-
var position = positions_1[_i];
|
|
21265
|
-
var value = styles['padding-' + position];
|
|
21266
|
-
paddings[position] = toFloat(value);
|
|
21267
|
-
}
|
|
21268
|
-
return paddings;
|
|
21269
|
-
}
|
|
21270
|
-
/**
|
|
21271
|
-
* Calculates content rectangle of provided SVG element.
|
|
21272
|
-
*
|
|
21273
|
-
* @param {SVGGraphicsElement} target - Element content rectangle of which needs
|
|
21274
|
-
* to be calculated.
|
|
21275
|
-
* @returns {DOMRectInit}
|
|
21276
|
-
*/
|
|
21277
|
-
function getSVGContentRect(target) {
|
|
21278
|
-
var bbox = target.getBBox();
|
|
21279
|
-
return createRectInit(0, 0, bbox.width, bbox.height);
|
|
21280
|
-
}
|
|
21281
|
-
/**
|
|
21282
|
-
* Calculates content rectangle of provided HTMLElement.
|
|
21283
|
-
*
|
|
21284
|
-
* @param {HTMLElement} target - Element for which to calculate the content rectangle.
|
|
21285
|
-
* @returns {DOMRectInit}
|
|
21286
|
-
*/
|
|
21287
|
-
function getHTMLElementContentRect(target) {
|
|
21288
|
-
// Client width & height properties can't be
|
|
21289
|
-
// used exclusively as they provide rounded values.
|
|
21290
|
-
var clientWidth = target.clientWidth, clientHeight = target.clientHeight;
|
|
21291
|
-
// By this condition we can catch all non-replaced inline, hidden and
|
|
21292
|
-
// detached elements. Though elements with width & height properties less
|
|
21293
|
-
// than 0.5 will be discarded as well.
|
|
21294
|
-
//
|
|
21295
|
-
// Without it we would need to implement separate methods for each of
|
|
21296
|
-
// those cases and it's not possible to perform a precise and performance
|
|
21297
|
-
// effective test for hidden elements. E.g. even jQuery's ':visible' filter
|
|
21298
|
-
// gives wrong results for elements with width & height less than 0.5.
|
|
21299
|
-
if (!clientWidth && !clientHeight) {
|
|
21300
|
-
return emptyRect;
|
|
21301
|
-
}
|
|
21302
|
-
var styles = getWindowOf(target).getComputedStyle(target);
|
|
21303
|
-
var paddings = getPaddings(styles);
|
|
21304
|
-
var horizPad = paddings.left + paddings.right;
|
|
21305
|
-
var vertPad = paddings.top + paddings.bottom;
|
|
21306
|
-
// Computed styles of width & height are being used because they are the
|
|
21307
|
-
// only dimensions available to JS that contain non-rounded values. It could
|
|
21308
|
-
// be possible to utilize the getBoundingClientRect if only it's data wasn't
|
|
21309
|
-
// affected by CSS transformations let alone paddings, borders and scroll bars.
|
|
21310
|
-
var width = toFloat(styles.width), height = toFloat(styles.height);
|
|
21311
|
-
// Width & height include paddings and borders when the 'border-box' box
|
|
21312
|
-
// model is applied (except for IE).
|
|
21313
|
-
if (styles.boxSizing === 'border-box') {
|
|
21314
|
-
// Following conditions are required to handle Internet Explorer which
|
|
21315
|
-
// doesn't include paddings and borders to computed CSS dimensions.
|
|
21316
|
-
//
|
|
21317
|
-
// We can say that if CSS dimensions + paddings are equal to the "client"
|
|
21318
|
-
// properties then it's either IE, and thus we don't need to subtract
|
|
21319
|
-
// anything, or an element merely doesn't have paddings/borders styles.
|
|
21320
|
-
if (Math.round(width + horizPad) !== clientWidth) {
|
|
21321
|
-
width -= getBordersSize(styles, 'left', 'right') + horizPad;
|
|
21322
|
-
}
|
|
21323
|
-
if (Math.round(height + vertPad) !== clientHeight) {
|
|
21324
|
-
height -= getBordersSize(styles, 'top', 'bottom') + vertPad;
|
|
21325
|
-
}
|
|
21326
|
-
}
|
|
21327
|
-
// Following steps can't be applied to the document's root element as its
|
|
21328
|
-
// client[Width/Height] properties represent viewport area of the window.
|
|
21329
|
-
// Besides, it's as well not necessary as the <html> itself neither has
|
|
21330
|
-
// rendered scroll bars nor it can be clipped.
|
|
21331
|
-
if (!isDocumentElement$1(target)) {
|
|
21332
|
-
// In some browsers (only in Firefox, actually) CSS width & height
|
|
21333
|
-
// include scroll bars size which can be removed at this step as scroll
|
|
21334
|
-
// bars are the only difference between rounded dimensions + paddings
|
|
21335
|
-
// and "client" properties, though that is not always true in Chrome.
|
|
21336
|
-
var vertScrollbar = Math.round(width + horizPad) - clientWidth;
|
|
21337
|
-
var horizScrollbar = Math.round(height + vertPad) - clientHeight;
|
|
21338
|
-
// Chrome has a rather weird rounding of "client" properties.
|
|
21339
|
-
// E.g. for an element with content width of 314.2px it sometimes gives
|
|
21340
|
-
// the client width of 315px and for the width of 314.7px it may give
|
|
21341
|
-
// 314px. And it doesn't happen all the time. So just ignore this delta
|
|
21342
|
-
// as a non-relevant.
|
|
21343
|
-
if (Math.abs(vertScrollbar) !== 1) {
|
|
21344
|
-
width -= vertScrollbar;
|
|
21345
|
-
}
|
|
21346
|
-
if (Math.abs(horizScrollbar) !== 1) {
|
|
21347
|
-
height -= horizScrollbar;
|
|
21348
|
-
}
|
|
21349
|
-
}
|
|
21350
|
-
return createRectInit(paddings.left, paddings.top, width, height);
|
|
21351
|
-
}
|
|
21352
|
-
/**
|
|
21353
|
-
* Checks whether provided element is an instance of the SVGGraphicsElement.
|
|
21354
|
-
*
|
|
21355
|
-
* @param {Element} target - Element to be checked.
|
|
21356
|
-
* @returns {boolean}
|
|
21357
|
-
*/
|
|
21358
|
-
var isSVGGraphicsElement = (function () {
|
|
21359
|
-
// Some browsers, namely IE and Edge, don't have the SVGGraphicsElement
|
|
21360
|
-
// interface.
|
|
21361
|
-
if (typeof SVGGraphicsElement !== 'undefined') {
|
|
21362
|
-
return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };
|
|
21363
|
-
}
|
|
21364
|
-
// If it's so, then check that element is at least an instance of the
|
|
21365
|
-
// SVGElement and that it has the "getBBox" method.
|
|
21366
|
-
// eslint-disable-next-line no-extra-parens
|
|
21367
|
-
return function (target) { return (target instanceof getWindowOf(target).SVGElement &&
|
|
21368
|
-
typeof target.getBBox === 'function'); };
|
|
21369
|
-
})();
|
|
21370
|
-
/**
|
|
21371
|
-
* Checks whether provided element is a document element (<html>).
|
|
21372
|
-
*
|
|
21373
|
-
* @param {Element} target - Element to be checked.
|
|
21374
|
-
* @returns {boolean}
|
|
21375
|
-
*/
|
|
21376
|
-
function isDocumentElement$1(target) {
|
|
21377
|
-
return target === getWindowOf(target).document.documentElement;
|
|
21378
|
-
}
|
|
21379
|
-
/**
|
|
21380
|
-
* Calculates an appropriate content rectangle for provided html or svg element.
|
|
21381
|
-
*
|
|
21382
|
-
* @param {Element} target - Element content rectangle of which needs to be calculated.
|
|
21383
|
-
* @returns {DOMRectInit}
|
|
21384
|
-
*/
|
|
21385
|
-
function getContentRect(target) {
|
|
21386
|
-
if (!isBrowser$3) {
|
|
21387
|
-
return emptyRect;
|
|
21388
|
-
}
|
|
21389
|
-
if (isSVGGraphicsElement(target)) {
|
|
21390
|
-
return getSVGContentRect(target);
|
|
21391
|
-
}
|
|
21392
|
-
return getHTMLElementContentRect(target);
|
|
21393
|
-
}
|
|
21394
|
-
/**
|
|
21395
|
-
* Creates rectangle with an interface of the DOMRectReadOnly.
|
|
21396
|
-
* Spec: https://drafts.fxtf.org/geometry/#domrectreadonly
|
|
21397
|
-
*
|
|
21398
|
-
* @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.
|
|
21399
|
-
* @returns {DOMRectReadOnly}
|
|
21400
|
-
*/
|
|
21401
|
-
function createReadOnlyRect(_a) {
|
|
21402
|
-
var x = _a.x, y = _a.y, width = _a.width, height = _a.height;
|
|
21403
|
-
// If DOMRectReadOnly is available use it as a prototype for the rectangle.
|
|
21404
|
-
var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;
|
|
21405
|
-
var rect = Object.create(Constr.prototype);
|
|
21406
|
-
// Rectangle's properties are not writable and non-enumerable.
|
|
21407
|
-
defineConfigurable(rect, {
|
|
21408
|
-
x: x, y: y, width: width, height: height,
|
|
21409
|
-
top: y,
|
|
21410
|
-
right: x + width,
|
|
21411
|
-
bottom: height + y,
|
|
21412
|
-
left: x
|
|
21413
|
-
});
|
|
21414
|
-
return rect;
|
|
21415
|
-
}
|
|
21416
|
-
/**
|
|
21417
|
-
* Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.
|
|
21418
|
-
* Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit
|
|
21419
|
-
*
|
|
21420
|
-
* @param {number} x - X coordinate.
|
|
21421
|
-
* @param {number} y - Y coordinate.
|
|
21422
|
-
* @param {number} width - Rectangle's width.
|
|
21423
|
-
* @param {number} height - Rectangle's height.
|
|
21424
|
-
* @returns {DOMRectInit}
|
|
21425
|
-
*/
|
|
21426
|
-
function createRectInit(x, y, width, height) {
|
|
21427
|
-
return { x: x, y: y, width: width, height: height };
|
|
21428
|
-
}
|
|
21429
|
-
|
|
21430
|
-
/**
|
|
21431
|
-
* Class that is responsible for computations of the content rectangle of
|
|
21432
|
-
* provided DOM element and for keeping track of it's changes.
|
|
21433
|
-
*/
|
|
21434
|
-
var ResizeObservation = /** @class */ (function () {
|
|
21435
|
-
/**
|
|
21436
|
-
* Creates an instance of ResizeObservation.
|
|
21437
|
-
*
|
|
21438
|
-
* @param {Element} target - Element to be observed.
|
|
21439
|
-
*/
|
|
21440
|
-
function ResizeObservation(target) {
|
|
21441
|
-
/**
|
|
21442
|
-
* Broadcasted width of content rectangle.
|
|
21443
|
-
*
|
|
21444
|
-
* @type {number}
|
|
21445
|
-
*/
|
|
21446
|
-
this.broadcastWidth = 0;
|
|
21447
|
-
/**
|
|
21448
|
-
* Broadcasted height of content rectangle.
|
|
21449
|
-
*
|
|
21450
|
-
* @type {number}
|
|
21451
|
-
*/
|
|
21452
|
-
this.broadcastHeight = 0;
|
|
21453
|
-
/**
|
|
21454
|
-
* Reference to the last observed content rectangle.
|
|
21455
|
-
*
|
|
21456
|
-
* @private {DOMRectInit}
|
|
21457
|
-
*/
|
|
21458
|
-
this.contentRect_ = createRectInit(0, 0, 0, 0);
|
|
21459
|
-
this.target = target;
|
|
21460
|
-
}
|
|
21461
|
-
/**
|
|
21462
|
-
* Updates content rectangle and tells whether it's width or height properties
|
|
21463
|
-
* have changed since the last broadcast.
|
|
21464
|
-
*
|
|
21465
|
-
* @returns {boolean}
|
|
21466
|
-
*/
|
|
21467
|
-
ResizeObservation.prototype.isActive = function () {
|
|
21468
|
-
var rect = getContentRect(this.target);
|
|
21469
|
-
this.contentRect_ = rect;
|
|
21470
|
-
return (rect.width !== this.broadcastWidth ||
|
|
21471
|
-
rect.height !== this.broadcastHeight);
|
|
21472
|
-
};
|
|
21473
|
-
/**
|
|
21474
|
-
* Updates 'broadcastWidth' and 'broadcastHeight' properties with a data
|
|
21475
|
-
* from the corresponding properties of the last observed content rectangle.
|
|
21476
|
-
*
|
|
21477
|
-
* @returns {DOMRectInit} Last observed content rectangle.
|
|
21478
|
-
*/
|
|
21479
|
-
ResizeObservation.prototype.broadcastRect = function () {
|
|
21480
|
-
var rect = this.contentRect_;
|
|
21481
|
-
this.broadcastWidth = rect.width;
|
|
21482
|
-
this.broadcastHeight = rect.height;
|
|
21483
|
-
return rect;
|
|
21484
|
-
};
|
|
21485
|
-
return ResizeObservation;
|
|
21486
|
-
}());
|
|
21487
|
-
|
|
21488
|
-
var ResizeObserverEntry = /** @class */ (function () {
|
|
21489
|
-
/**
|
|
21490
|
-
* Creates an instance of ResizeObserverEntry.
|
|
21491
|
-
*
|
|
21492
|
-
* @param {Element} target - Element that is being observed.
|
|
21493
|
-
* @param {DOMRectInit} rectInit - Data of the element's content rectangle.
|
|
21494
|
-
*/
|
|
21495
|
-
function ResizeObserverEntry(target, rectInit) {
|
|
21496
|
-
var contentRect = createReadOnlyRect(rectInit);
|
|
21497
|
-
// According to the specification following properties are not writable
|
|
21498
|
-
// and are also not enumerable in the native implementation.
|
|
21499
|
-
//
|
|
21500
|
-
// Property accessors are not being used as they'd require to define a
|
|
21501
|
-
// private WeakMap storage which may cause memory leaks in browsers that
|
|
21502
|
-
// don't support this type of collections.
|
|
21503
|
-
defineConfigurable(this, { target: target, contentRect: contentRect });
|
|
21504
|
-
}
|
|
21505
|
-
return ResizeObserverEntry;
|
|
21506
|
-
}());
|
|
21507
|
-
|
|
21508
|
-
var ResizeObserverSPI = /** @class */ (function () {
|
|
21509
|
-
/**
|
|
21510
|
-
* Creates a new instance of ResizeObserver.
|
|
21511
|
-
*
|
|
21512
|
-
* @param {ResizeObserverCallback} callback - Callback function that is invoked
|
|
21513
|
-
* when one of the observed elements changes it's content dimensions.
|
|
21514
|
-
* @param {ResizeObserverController} controller - Controller instance which
|
|
21515
|
-
* is responsible for the updates of observer.
|
|
21516
|
-
* @param {ResizeObserver} callbackCtx - Reference to the public
|
|
21517
|
-
* ResizeObserver instance which will be passed to callback function.
|
|
21518
|
-
*/
|
|
21519
|
-
function ResizeObserverSPI(callback, controller, callbackCtx) {
|
|
21520
|
-
/**
|
|
21521
|
-
* Collection of resize observations that have detected changes in dimensions
|
|
21522
|
-
* of elements.
|
|
21523
|
-
*
|
|
21524
|
-
* @private {Array<ResizeObservation>}
|
|
21525
|
-
*/
|
|
21526
|
-
this.activeObservations_ = [];
|
|
21527
|
-
/**
|
|
21528
|
-
* Registry of the ResizeObservation instances.
|
|
21529
|
-
*
|
|
21530
|
-
* @private {Map<Element, ResizeObservation>}
|
|
21531
|
-
*/
|
|
21532
|
-
this.observations_ = new MapShim();
|
|
21533
|
-
if (typeof callback !== 'function') {
|
|
21534
|
-
throw new TypeError('The callback provided as parameter 1 is not a function.');
|
|
21535
|
-
}
|
|
21536
|
-
this.callback_ = callback;
|
|
21537
|
-
this.controller_ = controller;
|
|
21538
|
-
this.callbackCtx_ = callbackCtx;
|
|
21539
|
-
}
|
|
21540
|
-
/**
|
|
21541
|
-
* Starts observing provided element.
|
|
21542
|
-
*
|
|
21543
|
-
* @param {Element} target - Element to be observed.
|
|
21544
|
-
* @returns {void}
|
|
21545
|
-
*/
|
|
21546
|
-
ResizeObserverSPI.prototype.observe = function (target) {
|
|
21547
|
-
if (!arguments.length) {
|
|
21548
|
-
throw new TypeError('1 argument required, but only 0 present.');
|
|
21549
|
-
}
|
|
21550
|
-
// Do nothing if current environment doesn't have the Element interface.
|
|
21551
|
-
if (typeof Element === 'undefined' || !(Element instanceof Object)) {
|
|
21552
|
-
return;
|
|
21553
|
-
}
|
|
21554
|
-
if (!(target instanceof getWindowOf(target).Element)) {
|
|
21555
|
-
throw new TypeError('parameter 1 is not of type "Element".');
|
|
21556
|
-
}
|
|
21557
|
-
var observations = this.observations_;
|
|
21558
|
-
// Do nothing if element is already being observed.
|
|
21559
|
-
if (observations.has(target)) {
|
|
21560
|
-
return;
|
|
21561
|
-
}
|
|
21562
|
-
observations.set(target, new ResizeObservation(target));
|
|
21563
|
-
this.controller_.addObserver(this);
|
|
21564
|
-
// Force the update of observations.
|
|
21565
|
-
this.controller_.refresh();
|
|
21566
|
-
};
|
|
21567
|
-
/**
|
|
21568
|
-
* Stops observing provided element.
|
|
21569
|
-
*
|
|
21570
|
-
* @param {Element} target - Element to stop observing.
|
|
21571
|
-
* @returns {void}
|
|
21572
|
-
*/
|
|
21573
|
-
ResizeObserverSPI.prototype.unobserve = function (target) {
|
|
21574
|
-
if (!arguments.length) {
|
|
21575
|
-
throw new TypeError('1 argument required, but only 0 present.');
|
|
21576
|
-
}
|
|
21577
|
-
// Do nothing if current environment doesn't have the Element interface.
|
|
21578
|
-
if (typeof Element === 'undefined' || !(Element instanceof Object)) {
|
|
21579
|
-
return;
|
|
21580
|
-
}
|
|
21581
|
-
if (!(target instanceof getWindowOf(target).Element)) {
|
|
21582
|
-
throw new TypeError('parameter 1 is not of type "Element".');
|
|
21583
|
-
}
|
|
21584
|
-
var observations = this.observations_;
|
|
21585
|
-
// Do nothing if element is not being observed.
|
|
21586
|
-
if (!observations.has(target)) {
|
|
21587
|
-
return;
|
|
21588
|
-
}
|
|
21589
|
-
observations.delete(target);
|
|
21590
|
-
if (!observations.size) {
|
|
21591
|
-
this.controller_.removeObserver(this);
|
|
21592
|
-
}
|
|
21593
|
-
};
|
|
21594
|
-
/**
|
|
21595
|
-
* Stops observing all elements.
|
|
21596
|
-
*
|
|
21597
|
-
* @returns {void}
|
|
21598
|
-
*/
|
|
21599
|
-
ResizeObserverSPI.prototype.disconnect = function () {
|
|
21600
|
-
this.clearActive();
|
|
21601
|
-
this.observations_.clear();
|
|
21602
|
-
this.controller_.removeObserver(this);
|
|
21603
|
-
};
|
|
21604
|
-
/**
|
|
21605
|
-
* Collects observation instances the associated element of which has changed
|
|
21606
|
-
* it's content rectangle.
|
|
21607
|
-
*
|
|
21608
|
-
* @returns {void}
|
|
21609
|
-
*/
|
|
21610
|
-
ResizeObserverSPI.prototype.gatherActive = function () {
|
|
21611
|
-
var _this = this;
|
|
21612
|
-
this.clearActive();
|
|
21613
|
-
this.observations_.forEach(function (observation) {
|
|
21614
|
-
if (observation.isActive()) {
|
|
21615
|
-
_this.activeObservations_.push(observation);
|
|
21616
|
-
}
|
|
21617
|
-
});
|
|
21618
|
-
};
|
|
21619
|
-
/**
|
|
21620
|
-
* Invokes initial callback function with a list of ResizeObserverEntry
|
|
21621
|
-
* instances collected from active resize observations.
|
|
21622
|
-
*
|
|
21623
|
-
* @returns {void}
|
|
21624
|
-
*/
|
|
21625
|
-
ResizeObserverSPI.prototype.broadcastActive = function () {
|
|
21626
|
-
// Do nothing if observer doesn't have active observations.
|
|
21627
|
-
if (!this.hasActive()) {
|
|
21628
|
-
return;
|
|
21629
|
-
}
|
|
21630
|
-
var ctx = this.callbackCtx_;
|
|
21631
|
-
// Create ResizeObserverEntry instance for every active observation.
|
|
21632
|
-
var entries = this.activeObservations_.map(function (observation) {
|
|
21633
|
-
return new ResizeObserverEntry(observation.target, observation.broadcastRect());
|
|
21634
|
-
});
|
|
21635
|
-
this.callback_.call(ctx, entries, ctx);
|
|
21636
|
-
this.clearActive();
|
|
21637
|
-
};
|
|
21638
|
-
/**
|
|
21639
|
-
* Clears the collection of active observations.
|
|
21640
|
-
*
|
|
21641
|
-
* @returns {void}
|
|
21642
|
-
*/
|
|
21643
|
-
ResizeObserverSPI.prototype.clearActive = function () {
|
|
21644
|
-
this.activeObservations_.splice(0);
|
|
21645
|
-
};
|
|
21646
|
-
/**
|
|
21647
|
-
* Tells whether observer has active observations.
|
|
21648
|
-
*
|
|
21649
|
-
* @returns {boolean}
|
|
21650
|
-
*/
|
|
21651
|
-
ResizeObserverSPI.prototype.hasActive = function () {
|
|
21652
|
-
return this.activeObservations_.length > 0;
|
|
21653
|
-
};
|
|
21654
|
-
return ResizeObserverSPI;
|
|
21655
|
-
}());
|
|
21656
|
-
|
|
21657
|
-
// Registry of internal observers. If WeakMap is not available use current shim
|
|
21658
|
-
// for the Map collection as it has all required methods and because WeakMap
|
|
21659
|
-
// can't be fully polyfilled anyway.
|
|
21660
|
-
var observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();
|
|
21661
|
-
/**
|
|
21662
|
-
* ResizeObserver API. Encapsulates the ResizeObserver SPI implementation
|
|
21663
|
-
* exposing only those methods and properties that are defined in the spec.
|
|
21664
|
-
*/
|
|
21665
|
-
var ResizeObserver = /** @class */ (function () {
|
|
21666
|
-
/**
|
|
21667
|
-
* Creates a new instance of ResizeObserver.
|
|
21668
|
-
*
|
|
21669
|
-
* @param {ResizeObserverCallback} callback - Callback that is invoked when
|
|
21670
|
-
* dimensions of the observed elements change.
|
|
21671
|
-
*/
|
|
21672
|
-
function ResizeObserver(callback) {
|
|
21673
|
-
if (!(this instanceof ResizeObserver)) {
|
|
21674
|
-
throw new TypeError('Cannot call a class as a function.');
|
|
21675
|
-
}
|
|
21676
|
-
if (!arguments.length) {
|
|
21677
|
-
throw new TypeError('1 argument required, but only 0 present.');
|
|
21678
|
-
}
|
|
21679
|
-
var controller = ResizeObserverController.getInstance();
|
|
21680
|
-
var observer = new ResizeObserverSPI(callback, controller, this);
|
|
21681
|
-
observers.set(this, observer);
|
|
21682
|
-
}
|
|
21683
|
-
return ResizeObserver;
|
|
21684
|
-
}());
|
|
21685
|
-
// Expose public methods of ResizeObserver.
|
|
21686
|
-
[
|
|
21687
|
-
'observe',
|
|
21688
|
-
'unobserve',
|
|
21689
|
-
'disconnect'
|
|
21690
|
-
].forEach(function (method) {
|
|
21691
|
-
ResizeObserver.prototype[method] = function () {
|
|
21692
|
-
var _a;
|
|
21693
|
-
return (_a = observers.get(this))[method].apply(_a, arguments);
|
|
21694
|
-
};
|
|
21695
|
-
});
|
|
21696
|
-
|
|
21697
|
-
var index = (function () {
|
|
21698
|
-
// Export existing implementation if available.
|
|
21699
|
-
if (typeof global$1.ResizeObserver !== 'undefined') {
|
|
21700
|
-
return global$1.ResizeObserver;
|
|
21701
|
-
}
|
|
21702
|
-
return ResizeObserver;
|
|
21703
|
-
})();
|
|
21704
|
-
|
|
21705
|
-
var rafSchd = function rafSchd(fn) {
|
|
21706
|
-
var lastArgs = [];
|
|
21707
|
-
var frameId = null;
|
|
21708
|
-
|
|
21709
|
-
var wrapperFn = function wrapperFn() {
|
|
21710
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
21711
|
-
args[_key] = arguments[_key];
|
|
21712
|
-
}
|
|
21713
|
-
|
|
21714
|
-
lastArgs = args;
|
|
21715
|
-
|
|
21716
|
-
if (frameId) {
|
|
21717
|
-
return;
|
|
21718
|
-
}
|
|
21719
|
-
|
|
21720
|
-
frameId = requestAnimationFrame(function () {
|
|
21721
|
-
frameId = null;
|
|
21722
|
-
fn.apply(void 0, lastArgs);
|
|
21723
|
-
});
|
|
21724
|
-
};
|
|
21725
|
-
|
|
21726
|
-
wrapperFn.cancel = function () {
|
|
21727
|
-
if (!frameId) {
|
|
21728
|
-
return;
|
|
21729
|
-
}
|
|
21730
|
-
|
|
21731
|
-
cancelAnimationFrame(frameId);
|
|
21732
|
-
frameId = null;
|
|
21733
|
-
};
|
|
21734
|
-
|
|
21735
|
-
return wrapperFn;
|
|
21736
|
-
};
|
|
21737
|
-
|
|
21738
|
-
/**
|
|
21739
|
-
* Checks if `value` is the
|
|
21740
|
-
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
21741
|
-
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
21742
|
-
*
|
|
21743
|
-
* @static
|
|
21744
|
-
* @memberOf _
|
|
21745
|
-
* @since 0.1.0
|
|
21746
|
-
* @category Lang
|
|
21747
|
-
* @param {*} value The value to check.
|
|
21748
|
-
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
21749
|
-
* @example
|
|
21750
|
-
*
|
|
21751
|
-
* _.isObject({});
|
|
21752
|
-
* // => true
|
|
21753
|
-
*
|
|
21754
|
-
* _.isObject([1, 2, 3]);
|
|
21755
|
-
* // => true
|
|
21756
|
-
*
|
|
21757
|
-
* _.isObject(_.noop);
|
|
21758
|
-
* // => true
|
|
21759
|
-
*
|
|
21760
|
-
* _.isObject(null);
|
|
21761
|
-
* // => false
|
|
21762
|
-
*/
|
|
21763
|
-
function isObject(value) {
|
|
21764
|
-
var type = typeof value;
|
|
21765
|
-
return value != null && (type == 'object' || type == 'function');
|
|
21766
|
-
}
|
|
21767
|
-
|
|
21768
|
-
/** Detect free variable `global` from Node.js. */
|
|
21769
|
-
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
|
|
21770
|
-
|
|
21771
|
-
/** Detect free variable `self`. */
|
|
21772
|
-
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
21773
|
-
|
|
21774
|
-
/** Used as a reference to the global object. */
|
|
21775
|
-
var root = freeGlobal || freeSelf || Function('return this')();
|
|
21776
|
-
|
|
21777
|
-
/**
|
|
21778
|
-
* Gets the timestamp of the number of milliseconds that have elapsed since
|
|
21779
|
-
* the Unix epoch (1 January 1970 00:00:00 UTC).
|
|
21780
|
-
*
|
|
21781
|
-
* @static
|
|
21782
|
-
* @memberOf _
|
|
21783
|
-
* @since 2.4.0
|
|
21784
|
-
* @category Date
|
|
21785
|
-
* @returns {number} Returns the timestamp.
|
|
21786
|
-
* @example
|
|
21787
|
-
*
|
|
21788
|
-
* _.defer(function(stamp) {
|
|
21789
|
-
* console.log(_.now() - stamp);
|
|
21790
|
-
* }, _.now());
|
|
21791
|
-
* // => Logs the number of milliseconds it took for the deferred invocation.
|
|
21792
|
-
*/
|
|
21793
|
-
var now = function() {
|
|
21794
|
-
return root.Date.now();
|
|
21795
|
-
};
|
|
21796
|
-
|
|
21797
|
-
/** Used to match a single whitespace character. */
|
|
21798
|
-
var reWhitespace = /\s/;
|
|
21799
|
-
|
|
21800
|
-
/**
|
|
21801
|
-
* Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
|
|
21802
|
-
* character of `string`.
|
|
21803
|
-
*
|
|
21804
|
-
* @private
|
|
21805
|
-
* @param {string} string The string to inspect.
|
|
21806
|
-
* @returns {number} Returns the index of the last non-whitespace character.
|
|
21807
|
-
*/
|
|
21808
|
-
function trimmedEndIndex(string) {
|
|
21809
|
-
var index = string.length;
|
|
21810
|
-
|
|
21811
|
-
while (index-- && reWhitespace.test(string.charAt(index))) {}
|
|
21812
|
-
return index;
|
|
21813
|
-
}
|
|
21814
|
-
|
|
21815
|
-
/** Used to match leading whitespace. */
|
|
21816
|
-
var reTrimStart = /^\s+/;
|
|
21817
|
-
|
|
21818
|
-
/**
|
|
21819
|
-
* The base implementation of `_.trim`.
|
|
21820
|
-
*
|
|
21821
|
-
* @private
|
|
21822
|
-
* @param {string} string The string to trim.
|
|
21823
|
-
* @returns {string} Returns the trimmed string.
|
|
21824
|
-
*/
|
|
21825
|
-
function baseTrim(string) {
|
|
21826
|
-
return string
|
|
21827
|
-
? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
|
|
21828
|
-
: string;
|
|
21829
|
-
}
|
|
21830
|
-
|
|
21831
|
-
/** Built-in value references. */
|
|
21832
|
-
var Symbol$1 = root.Symbol;
|
|
21833
|
-
|
|
21834
|
-
/** Used for built-in method references. */
|
|
21835
|
-
var objectProto$1 = Object.prototype;
|
|
21836
|
-
|
|
21837
|
-
/** Used to check objects for own properties. */
|
|
21838
|
-
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
21839
|
-
|
|
21840
|
-
/**
|
|
21841
|
-
* Used to resolve the
|
|
21842
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
21843
|
-
* of values.
|
|
21844
|
-
*/
|
|
21845
|
-
var nativeObjectToString$1 = objectProto$1.toString;
|
|
21846
|
-
|
|
21847
|
-
/** Built-in value references. */
|
|
21848
|
-
var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : undefined;
|
|
21849
|
-
|
|
21850
|
-
/**
|
|
21851
|
-
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
21852
|
-
*
|
|
21853
|
-
* @private
|
|
21854
|
-
* @param {*} value The value to query.
|
|
21855
|
-
* @returns {string} Returns the raw `toStringTag`.
|
|
21856
|
-
*/
|
|
21857
|
-
function getRawTag(value) {
|
|
21858
|
-
var isOwn = hasOwnProperty$1.call(value, symToStringTag$1),
|
|
21859
|
-
tag = value[symToStringTag$1];
|
|
21860
|
-
|
|
21861
|
-
try {
|
|
21862
|
-
value[symToStringTag$1] = undefined;
|
|
21863
|
-
var unmasked = true;
|
|
21864
|
-
} catch (e) {}
|
|
21865
|
-
|
|
21866
|
-
var result = nativeObjectToString$1.call(value);
|
|
21867
|
-
if (unmasked) {
|
|
21868
|
-
if (isOwn) {
|
|
21869
|
-
value[symToStringTag$1] = tag;
|
|
21870
|
-
} else {
|
|
21871
|
-
delete value[symToStringTag$1];
|
|
21872
|
-
}
|
|
21873
|
-
}
|
|
21874
|
-
return result;
|
|
21875
|
-
}
|
|
21876
|
-
|
|
21877
|
-
/** Used for built-in method references. */
|
|
21878
|
-
var objectProto = Object.prototype;
|
|
21879
|
-
|
|
21880
|
-
/**
|
|
21881
|
-
* Used to resolve the
|
|
21882
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
21883
|
-
* of values.
|
|
21884
|
-
*/
|
|
21885
|
-
var nativeObjectToString = objectProto.toString;
|
|
21886
|
-
|
|
21887
|
-
/**
|
|
21888
|
-
* Converts `value` to a string using `Object.prototype.toString`.
|
|
21889
|
-
*
|
|
21890
|
-
* @private
|
|
21891
|
-
* @param {*} value The value to convert.
|
|
21892
|
-
* @returns {string} Returns the converted string.
|
|
21893
|
-
*/
|
|
21894
|
-
function objectToString(value) {
|
|
21895
|
-
return nativeObjectToString.call(value);
|
|
21896
|
-
}
|
|
21897
|
-
|
|
21898
|
-
/** `Object#toString` result references. */
|
|
21899
|
-
var nullTag = '[object Null]',
|
|
21900
|
-
undefinedTag = '[object Undefined]';
|
|
21901
|
-
|
|
21902
|
-
/** Built-in value references. */
|
|
21903
|
-
var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined;
|
|
21904
|
-
|
|
21905
|
-
/**
|
|
21906
|
-
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
21907
|
-
*
|
|
21908
|
-
* @private
|
|
21909
|
-
* @param {*} value The value to query.
|
|
21910
|
-
* @returns {string} Returns the `toStringTag`.
|
|
21911
|
-
*/
|
|
21912
|
-
function baseGetTag(value) {
|
|
21913
|
-
if (value == null) {
|
|
21914
|
-
return value === undefined ? undefinedTag : nullTag;
|
|
21915
|
-
}
|
|
21916
|
-
return (symToStringTag && symToStringTag in Object(value))
|
|
21917
|
-
? getRawTag(value)
|
|
21918
|
-
: objectToString(value);
|
|
21919
|
-
}
|
|
21920
|
-
|
|
21921
|
-
/**
|
|
21922
|
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
21923
|
-
* and has a `typeof` result of "object".
|
|
21924
|
-
*
|
|
21925
|
-
* @static
|
|
21926
|
-
* @memberOf _
|
|
21927
|
-
* @since 4.0.0
|
|
21928
|
-
* @category Lang
|
|
21929
|
-
* @param {*} value The value to check.
|
|
21930
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
21931
|
-
* @example
|
|
21932
|
-
*
|
|
21933
|
-
* _.isObjectLike({});
|
|
21934
|
-
* // => true
|
|
21935
|
-
*
|
|
21936
|
-
* _.isObjectLike([1, 2, 3]);
|
|
21937
|
-
* // => true
|
|
21938
|
-
*
|
|
21939
|
-
* _.isObjectLike(_.noop);
|
|
21940
|
-
* // => false
|
|
21941
|
-
*
|
|
21942
|
-
* _.isObjectLike(null);
|
|
21943
|
-
* // => false
|
|
21944
|
-
*/
|
|
21945
|
-
function isObjectLike(value) {
|
|
21946
|
-
return value != null && typeof value == 'object';
|
|
21947
|
-
}
|
|
21948
|
-
|
|
21949
|
-
/** `Object#toString` result references. */
|
|
21950
|
-
var symbolTag = '[object Symbol]';
|
|
21951
|
-
|
|
21952
|
-
/**
|
|
21953
|
-
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
21954
|
-
*
|
|
21955
|
-
* @static
|
|
21956
|
-
* @memberOf _
|
|
21957
|
-
* @since 4.0.0
|
|
21958
|
-
* @category Lang
|
|
21959
|
-
* @param {*} value The value to check.
|
|
21960
|
-
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
21961
|
-
* @example
|
|
21962
|
-
*
|
|
21963
|
-
* _.isSymbol(Symbol.iterator);
|
|
21964
|
-
* // => true
|
|
21965
|
-
*
|
|
21966
|
-
* _.isSymbol('abc');
|
|
21967
|
-
* // => false
|
|
21968
|
-
*/
|
|
21969
|
-
function isSymbol(value) {
|
|
21970
|
-
return typeof value == 'symbol' ||
|
|
21971
|
-
(isObjectLike(value) && baseGetTag(value) == symbolTag);
|
|
21972
|
-
}
|
|
21973
|
-
|
|
21974
|
-
/** Used as references for various `Number` constants. */
|
|
21975
|
-
var NAN = 0 / 0;
|
|
21976
|
-
|
|
21977
|
-
/** Used to detect bad signed hexadecimal string values. */
|
|
21978
|
-
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
21979
|
-
|
|
21980
|
-
/** Used to detect binary string values. */
|
|
21981
|
-
var reIsBinary = /^0b[01]+$/i;
|
|
21982
|
-
|
|
21983
|
-
/** Used to detect octal string values. */
|
|
21984
|
-
var reIsOctal = /^0o[0-7]+$/i;
|
|
21985
|
-
|
|
21986
|
-
/** Built-in method references without a dependency on `root`. */
|
|
21987
|
-
var freeParseInt = parseInt;
|
|
21988
|
-
|
|
21989
|
-
/**
|
|
21990
|
-
* Converts `value` to a number.
|
|
21991
|
-
*
|
|
21992
|
-
* @static
|
|
21993
|
-
* @memberOf _
|
|
21994
|
-
* @since 4.0.0
|
|
21995
|
-
* @category Lang
|
|
21996
|
-
* @param {*} value The value to process.
|
|
21997
|
-
* @returns {number} Returns the number.
|
|
21998
|
-
* @example
|
|
21999
|
-
*
|
|
22000
|
-
* _.toNumber(3.2);
|
|
22001
|
-
* // => 3.2
|
|
22002
|
-
*
|
|
22003
|
-
* _.toNumber(Number.MIN_VALUE);
|
|
22004
|
-
* // => 5e-324
|
|
22005
|
-
*
|
|
22006
|
-
* _.toNumber(Infinity);
|
|
22007
|
-
* // => Infinity
|
|
22008
|
-
*
|
|
22009
|
-
* _.toNumber('3.2');
|
|
22010
|
-
* // => 3.2
|
|
22011
|
-
*/
|
|
22012
|
-
function toNumber(value) {
|
|
22013
|
-
if (typeof value == 'number') {
|
|
22014
|
-
return value;
|
|
22015
|
-
}
|
|
22016
|
-
if (isSymbol(value)) {
|
|
22017
|
-
return NAN;
|
|
22018
|
-
}
|
|
22019
|
-
if (isObject(value)) {
|
|
22020
|
-
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
|
|
22021
|
-
value = isObject(other) ? (other + '') : other;
|
|
22022
|
-
}
|
|
22023
|
-
if (typeof value != 'string') {
|
|
22024
|
-
return value === 0 ? value : +value;
|
|
22025
|
-
}
|
|
22026
|
-
value = baseTrim(value);
|
|
22027
|
-
var isBinary = reIsBinary.test(value);
|
|
22028
|
-
return (isBinary || reIsOctal.test(value))
|
|
22029
|
-
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
|
|
22030
|
-
: (reIsBadHex.test(value) ? NAN : +value);
|
|
22031
|
-
}
|
|
22032
|
-
|
|
22033
|
-
/** Error message constants. */
|
|
22034
|
-
var FUNC_ERROR_TEXT$1 = 'Expected a function';
|
|
22035
|
-
|
|
22036
|
-
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
22037
|
-
var nativeMax = Math.max,
|
|
22038
|
-
nativeMin = Math.min;
|
|
22039
|
-
|
|
22040
|
-
/**
|
|
22041
|
-
* Creates a debounced function that delays invoking `func` until after `wait`
|
|
22042
|
-
* milliseconds have elapsed since the last time the debounced function was
|
|
22043
|
-
* invoked. The debounced function comes with a `cancel` method to cancel
|
|
22044
|
-
* delayed `func` invocations and a `flush` method to immediately invoke them.
|
|
22045
|
-
* Provide `options` to indicate whether `func` should be invoked on the
|
|
22046
|
-
* leading and/or trailing edge of the `wait` timeout. The `func` is invoked
|
|
22047
|
-
* with the last arguments provided to the debounced function. Subsequent
|
|
22048
|
-
* calls to the debounced function return the result of the last `func`
|
|
22049
|
-
* invocation.
|
|
22050
|
-
*
|
|
22051
|
-
* **Note:** If `leading` and `trailing` options are `true`, `func` is
|
|
22052
|
-
* invoked on the trailing edge of the timeout only if the debounced function
|
|
22053
|
-
* is invoked more than once during the `wait` timeout.
|
|
22054
|
-
*
|
|
22055
|
-
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
|
|
22056
|
-
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
|
|
22057
|
-
*
|
|
22058
|
-
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
|
|
22059
|
-
* for details over the differences between `_.debounce` and `_.throttle`.
|
|
22060
|
-
*
|
|
22061
|
-
* @static
|
|
22062
|
-
* @memberOf _
|
|
22063
|
-
* @since 0.1.0
|
|
22064
|
-
* @category Function
|
|
22065
|
-
* @param {Function} func The function to debounce.
|
|
22066
|
-
* @param {number} [wait=0] The number of milliseconds to delay.
|
|
22067
|
-
* @param {Object} [options={}] The options object.
|
|
22068
|
-
* @param {boolean} [options.leading=false]
|
|
22069
|
-
* Specify invoking on the leading edge of the timeout.
|
|
22070
|
-
* @param {number} [options.maxWait]
|
|
22071
|
-
* The maximum time `func` is allowed to be delayed before it's invoked.
|
|
22072
|
-
* @param {boolean} [options.trailing=true]
|
|
22073
|
-
* Specify invoking on the trailing edge of the timeout.
|
|
22074
|
-
* @returns {Function} Returns the new debounced function.
|
|
22075
|
-
* @example
|
|
22076
|
-
*
|
|
22077
|
-
* // Avoid costly calculations while the window size is in flux.
|
|
22078
|
-
* jQuery(window).on('resize', _.debounce(calculateLayout, 150));
|
|
22079
|
-
*
|
|
22080
|
-
* // Invoke `sendMail` when clicked, debouncing subsequent calls.
|
|
22081
|
-
* jQuery(element).on('click', _.debounce(sendMail, 300, {
|
|
22082
|
-
* 'leading': true,
|
|
22083
|
-
* 'trailing': false
|
|
22084
|
-
* }));
|
|
22085
|
-
*
|
|
22086
|
-
* // Ensure `batchLog` is invoked once after 1 second of debounced calls.
|
|
22087
|
-
* var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
|
|
22088
|
-
* var source = new EventSource('/stream');
|
|
22089
|
-
* jQuery(source).on('message', debounced);
|
|
22090
|
-
*
|
|
22091
|
-
* // Cancel the trailing debounced invocation.
|
|
22092
|
-
* jQuery(window).on('popstate', debounced.cancel);
|
|
22093
|
-
*/
|
|
22094
|
-
function debounce$1(func, wait, options) {
|
|
22095
|
-
var lastArgs,
|
|
22096
|
-
lastThis,
|
|
22097
|
-
maxWait,
|
|
22098
|
-
result,
|
|
22099
|
-
timerId,
|
|
22100
|
-
lastCallTime,
|
|
22101
|
-
lastInvokeTime = 0,
|
|
22102
|
-
leading = false,
|
|
22103
|
-
maxing = false,
|
|
22104
|
-
trailing = true;
|
|
22105
|
-
|
|
22106
|
-
if (typeof func != 'function') {
|
|
22107
|
-
throw new TypeError(FUNC_ERROR_TEXT$1);
|
|
22108
|
-
}
|
|
22109
|
-
wait = toNumber(wait) || 0;
|
|
22110
|
-
if (isObject(options)) {
|
|
22111
|
-
leading = !!options.leading;
|
|
22112
|
-
maxing = 'maxWait' in options;
|
|
22113
|
-
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
|
|
22114
|
-
trailing = 'trailing' in options ? !!options.trailing : trailing;
|
|
22115
|
-
}
|
|
22116
|
-
|
|
22117
|
-
function invokeFunc(time) {
|
|
22118
|
-
var args = lastArgs,
|
|
22119
|
-
thisArg = lastThis;
|
|
22120
|
-
|
|
22121
|
-
lastArgs = lastThis = undefined;
|
|
22122
|
-
lastInvokeTime = time;
|
|
22123
|
-
result = func.apply(thisArg, args);
|
|
22124
|
-
return result;
|
|
22125
|
-
}
|
|
22126
|
-
|
|
22127
|
-
function leadingEdge(time) {
|
|
22128
|
-
// Reset any `maxWait` timer.
|
|
22129
|
-
lastInvokeTime = time;
|
|
22130
|
-
// Start the timer for the trailing edge.
|
|
22131
|
-
timerId = setTimeout(timerExpired, wait);
|
|
22132
|
-
// Invoke the leading edge.
|
|
22133
|
-
return leading ? invokeFunc(time) : result;
|
|
22134
|
-
}
|
|
22135
|
-
|
|
22136
|
-
function remainingWait(time) {
|
|
22137
|
-
var timeSinceLastCall = time - lastCallTime,
|
|
22138
|
-
timeSinceLastInvoke = time - lastInvokeTime,
|
|
22139
|
-
timeWaiting = wait - timeSinceLastCall;
|
|
22140
|
-
|
|
22141
|
-
return maxing
|
|
22142
|
-
? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
|
|
22143
|
-
: timeWaiting;
|
|
22144
|
-
}
|
|
22145
|
-
|
|
22146
|
-
function shouldInvoke(time) {
|
|
22147
|
-
var timeSinceLastCall = time - lastCallTime,
|
|
22148
|
-
timeSinceLastInvoke = time - lastInvokeTime;
|
|
22149
|
-
|
|
22150
|
-
// Either this is the first call, activity has stopped and we're at the
|
|
22151
|
-
// trailing edge, the system time has gone backwards and we're treating
|
|
22152
|
-
// it as the trailing edge, or we've hit the `maxWait` limit.
|
|
22153
|
-
return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
|
|
22154
|
-
(timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
|
|
22155
|
-
}
|
|
22156
|
-
|
|
22157
|
-
function timerExpired() {
|
|
22158
|
-
var time = now();
|
|
22159
|
-
if (shouldInvoke(time)) {
|
|
22160
|
-
return trailingEdge(time);
|
|
22161
|
-
}
|
|
22162
|
-
// Restart the timer.
|
|
22163
|
-
timerId = setTimeout(timerExpired, remainingWait(time));
|
|
22164
|
-
}
|
|
22165
|
-
|
|
22166
|
-
function trailingEdge(time) {
|
|
22167
|
-
timerId = undefined;
|
|
22168
|
-
|
|
22169
|
-
// Only invoke if we have `lastArgs` which means `func` has been
|
|
22170
|
-
// debounced at least once.
|
|
22171
|
-
if (trailing && lastArgs) {
|
|
22172
|
-
return invokeFunc(time);
|
|
22173
|
-
}
|
|
22174
|
-
lastArgs = lastThis = undefined;
|
|
22175
|
-
return result;
|
|
22176
|
-
}
|
|
22177
|
-
|
|
22178
|
-
function cancel() {
|
|
22179
|
-
if (timerId !== undefined) {
|
|
22180
|
-
clearTimeout(timerId);
|
|
22181
|
-
}
|
|
22182
|
-
lastInvokeTime = 0;
|
|
22183
|
-
lastArgs = lastCallTime = lastThis = timerId = undefined;
|
|
22184
|
-
}
|
|
22185
|
-
|
|
22186
|
-
function flush() {
|
|
22187
|
-
return timerId === undefined ? result : trailingEdge(now());
|
|
22188
|
-
}
|
|
22189
|
-
|
|
22190
|
-
function debounced() {
|
|
22191
|
-
var time = now(),
|
|
22192
|
-
isInvoking = shouldInvoke(time);
|
|
22193
|
-
|
|
22194
|
-
lastArgs = arguments;
|
|
22195
|
-
lastThis = this;
|
|
22196
|
-
lastCallTime = time;
|
|
22197
|
-
|
|
22198
|
-
if (isInvoking) {
|
|
22199
|
-
if (timerId === undefined) {
|
|
22200
|
-
return leadingEdge(lastCallTime);
|
|
22201
|
-
}
|
|
22202
|
-
if (maxing) {
|
|
22203
|
-
// Handle invocations in a tight loop.
|
|
22204
|
-
clearTimeout(timerId);
|
|
22205
|
-
timerId = setTimeout(timerExpired, wait);
|
|
22206
|
-
return invokeFunc(lastCallTime);
|
|
22207
|
-
}
|
|
22208
|
-
}
|
|
22209
|
-
if (timerId === undefined) {
|
|
22210
|
-
timerId = setTimeout(timerExpired, wait);
|
|
22211
|
-
}
|
|
22212
|
-
return result;
|
|
22213
|
-
}
|
|
22214
|
-
debounced.cancel = cancel;
|
|
22215
|
-
debounced.flush = flush;
|
|
22216
|
-
return debounced;
|
|
22217
|
-
}
|
|
22218
|
-
|
|
22219
|
-
/** Error message constants. */
|
|
22220
|
-
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
22221
|
-
|
|
22222
|
-
/**
|
|
22223
|
-
* Creates a throttled function that only invokes `func` at most once per
|
|
22224
|
-
* every `wait` milliseconds. The throttled function comes with a `cancel`
|
|
22225
|
-
* method to cancel delayed `func` invocations and a `flush` method to
|
|
22226
|
-
* immediately invoke them. Provide `options` to indicate whether `func`
|
|
22227
|
-
* should be invoked on the leading and/or trailing edge of the `wait`
|
|
22228
|
-
* timeout. The `func` is invoked with the last arguments provided to the
|
|
22229
|
-
* throttled function. Subsequent calls to the throttled function return the
|
|
22230
|
-
* result of the last `func` invocation.
|
|
22231
|
-
*
|
|
22232
|
-
* **Note:** If `leading` and `trailing` options are `true`, `func` is
|
|
22233
|
-
* invoked on the trailing edge of the timeout only if the throttled function
|
|
22234
|
-
* is invoked more than once during the `wait` timeout.
|
|
22235
|
-
*
|
|
22236
|
-
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
|
|
22237
|
-
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
|
|
22238
|
-
*
|
|
22239
|
-
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
|
|
22240
|
-
* for details over the differences between `_.throttle` and `_.debounce`.
|
|
22241
|
-
*
|
|
22242
|
-
* @static
|
|
22243
|
-
* @memberOf _
|
|
22244
|
-
* @since 0.1.0
|
|
22245
|
-
* @category Function
|
|
22246
|
-
* @param {Function} func The function to throttle.
|
|
22247
|
-
* @param {number} [wait=0] The number of milliseconds to throttle invocations to.
|
|
22248
|
-
* @param {Object} [options={}] The options object.
|
|
22249
|
-
* @param {boolean} [options.leading=true]
|
|
22250
|
-
* Specify invoking on the leading edge of the timeout.
|
|
22251
|
-
* @param {boolean} [options.trailing=true]
|
|
22252
|
-
* Specify invoking on the trailing edge of the timeout.
|
|
22253
|
-
* @returns {Function} Returns the new throttled function.
|
|
22254
|
-
* @example
|
|
22255
|
-
*
|
|
22256
|
-
* // Avoid excessively updating the position while scrolling.
|
|
22257
|
-
* jQuery(window).on('scroll', _.throttle(updatePosition, 100));
|
|
22258
|
-
*
|
|
22259
|
-
* // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
|
|
22260
|
-
* var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
|
|
22261
|
-
* jQuery(element).on('click', throttled);
|
|
22262
|
-
*
|
|
22263
|
-
* // Cancel the trailing throttled invocation.
|
|
22264
|
-
* jQuery(window).on('popstate', throttled.cancel);
|
|
22265
|
-
*/
|
|
22266
|
-
function throttle(func, wait, options) {
|
|
22267
|
-
var leading = true,
|
|
22268
|
-
trailing = true;
|
|
22269
|
-
|
|
22270
|
-
if (typeof func != 'function') {
|
|
22271
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
22272
|
-
}
|
|
22273
|
-
if (isObject(options)) {
|
|
22274
|
-
leading = 'leading' in options ? !!options.leading : leading;
|
|
22275
|
-
trailing = 'trailing' in options ? !!options.trailing : trailing;
|
|
22276
|
-
}
|
|
22277
|
-
return debounce$1(func, wait, {
|
|
22278
|
-
'leading': leading,
|
|
22279
|
-
'maxWait': wait,
|
|
22280
|
-
'trailing': trailing
|
|
22281
|
-
});
|
|
22282
|
-
}
|
|
22283
|
-
|
|
22284
|
-
var listHandle = {
|
|
22285
|
-
debounce: debounce$1,
|
|
22286
|
-
throttle: throttle
|
|
22287
|
-
};
|
|
22288
|
-
var getHandle = function getHandle(type) {
|
|
22289
|
-
return listHandle[type];
|
|
22290
|
-
};
|
|
22291
|
-
var isFunction = function isFunction(fn) {
|
|
22292
|
-
return typeof fn === 'function';
|
|
22293
|
-
};
|
|
22294
|
-
var isSSR = function isSSR() {
|
|
22295
|
-
return typeof window === 'undefined';
|
|
22296
|
-
};
|
|
22297
|
-
var isDOMElement = function isDOMElement(element) {
|
|
22298
|
-
return element instanceof Element || element instanceof HTMLDocument;
|
|
22299
|
-
};
|
|
22300
|
-
|
|
22301
|
-
function _typeof$1(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$1(obj); }
|
|
22302
|
-
|
|
22303
|
-
function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
22304
|
-
|
|
22305
|
-
function _defineProperties$1(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); } }
|
|
22306
|
-
|
|
22307
|
-
function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; }
|
|
22308
|
-
|
|
22309
|
-
function _inherits$1(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$2(subClass, superClass); }
|
|
22310
|
-
|
|
22311
|
-
function _setPrototypeOf$2(o, p) { _setPrototypeOf$2 = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf$2(o, p); }
|
|
22312
|
-
|
|
22313
|
-
function _createSuper$7(Derived) { return function () { var Super = _getPrototypeOf$1(Derived), result; if (_isNativeReflectConstruct$7()) { var NewTarget = _getPrototypeOf$1(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn$1(this, result); }; }
|
|
22314
|
-
|
|
22315
|
-
function _possibleConstructorReturn$1(self, call) { if (call && (_typeof$1(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized$2(self); }
|
|
22316
|
-
|
|
22317
|
-
function _assertThisInitialized$2(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
22318
|
-
|
|
22319
|
-
function _isNativeReflectConstruct$7() { 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; } }
|
|
22320
|
-
|
|
22321
|
-
function _getPrototypeOf$1(o) { _getPrototypeOf$1 = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$1(o); }
|
|
22322
|
-
|
|
22323
|
-
var ChildWrapper = /*#__PURE__*/function (_PureComponent) {
|
|
22324
|
-
_inherits$1(ChildWrapper, _PureComponent);
|
|
22325
|
-
|
|
22326
|
-
var _super = _createSuper$7(ChildWrapper);
|
|
22327
|
-
|
|
22328
|
-
function ChildWrapper() {
|
|
22329
|
-
_classCallCheck$1(this, ChildWrapper);
|
|
22330
|
-
|
|
22331
|
-
return _super.apply(this, arguments);
|
|
22332
|
-
}
|
|
22333
|
-
|
|
22334
|
-
_createClass$1(ChildWrapper, [{
|
|
22335
|
-
key: "render",
|
|
22336
|
-
value: function render() {
|
|
22337
|
-
// eslint-disable-next-line react/prop-types
|
|
22338
|
-
return this.props.children;
|
|
22339
|
-
}
|
|
22340
|
-
}]);
|
|
22341
|
-
|
|
22342
|
-
return ChildWrapper;
|
|
22343
|
-
}(React.PureComponent);
|
|
22344
|
-
|
|
22345
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
22346
|
-
|
|
22347
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
22348
|
-
|
|
22349
|
-
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); } }
|
|
22350
|
-
|
|
22351
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
22352
|
-
|
|
22353
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$1(subClass, superClass); }
|
|
22354
|
-
|
|
22355
|
-
function _setPrototypeOf$1(o, p) { _setPrototypeOf$1 = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf$1(o, p); }
|
|
22356
|
-
|
|
22357
|
-
function _createSuper$6(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct$6()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
22358
|
-
|
|
22359
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized$1(self); }
|
|
22360
|
-
|
|
22361
|
-
function _assertThisInitialized$1(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
22362
|
-
|
|
22363
|
-
function _isNativeReflectConstruct$6() { 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; } }
|
|
22364
|
-
|
|
22365
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
22366
|
-
|
|
22367
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
22368
|
-
|
|
22369
|
-
var ResizeDetector = /*#__PURE__*/function (_PureComponent) {
|
|
22370
|
-
_inherits(ResizeDetector, _PureComponent);
|
|
22371
|
-
|
|
22372
|
-
var _super = _createSuper$6(ResizeDetector);
|
|
22373
|
-
|
|
22374
|
-
function ResizeDetector(props) {
|
|
22375
|
-
var _this;
|
|
22376
|
-
|
|
22377
|
-
_classCallCheck(this, ResizeDetector);
|
|
22378
|
-
|
|
22379
|
-
_this = _super.call(this, props);
|
|
22380
|
-
|
|
22381
|
-
_defineProperty(_assertThisInitialized$1(_this), "cancelHandler", function () {
|
|
22382
|
-
if (_this.resizeHandler && _this.resizeHandler.cancel) {
|
|
22383
|
-
// cancel debounced handler
|
|
22384
|
-
_this.resizeHandler.cancel();
|
|
22385
|
-
|
|
22386
|
-
_this.resizeHandler = null;
|
|
22387
|
-
}
|
|
22388
|
-
});
|
|
22389
|
-
|
|
22390
|
-
_defineProperty(_assertThisInitialized$1(_this), "rafClean", function () {
|
|
22391
|
-
if (_this.raf && _this.raf.cancel) {
|
|
22392
|
-
_this.raf.cancel();
|
|
22393
|
-
|
|
22394
|
-
_this.raf = null;
|
|
22395
|
-
}
|
|
22396
|
-
});
|
|
22397
|
-
|
|
22398
|
-
_defineProperty(_assertThisInitialized$1(_this), "toggleObserver", function (type) {
|
|
22399
|
-
var element = _this.getElement();
|
|
22400
|
-
|
|
22401
|
-
if (!element || !_this.resizeObserver[type]) return;
|
|
22402
|
-
|
|
22403
|
-
_this.resizeObserver[type](element);
|
|
22404
|
-
});
|
|
22405
|
-
|
|
22406
|
-
_defineProperty(_assertThisInitialized$1(_this), "getElement", function () {
|
|
22407
|
-
var _this$props = _this.props,
|
|
22408
|
-
querySelector = _this$props.querySelector,
|
|
22409
|
-
targetDomEl = _this$props.targetDomEl;
|
|
22410
|
-
if (isSSR()) return undefined;
|
|
22411
|
-
if (querySelector) return document.querySelector(querySelector);
|
|
22412
|
-
if (targetDomEl && isDOMElement(targetDomEl)) return targetDomEl; // eslint-disable-next-line react/no-find-dom-node
|
|
22413
|
-
|
|
22414
|
-
var currentElement = _this.element && reactDom.findDOMNode(_this.element);
|
|
22415
|
-
if (!currentElement) return undefined;
|
|
22416
|
-
return currentElement.parentElement;
|
|
22417
|
-
});
|
|
22418
|
-
|
|
22419
|
-
_defineProperty(_assertThisInitialized$1(_this), "createUpdater", function () {
|
|
22420
|
-
_this.rafClean();
|
|
22421
|
-
|
|
22422
|
-
_this.raf = rafSchd(function (_ref) {
|
|
22423
|
-
var width = _ref.width,
|
|
22424
|
-
height = _ref.height;
|
|
22425
|
-
var onResize = _this.props.onResize;
|
|
22426
|
-
|
|
22427
|
-
if (isFunction(onResize)) {
|
|
22428
|
-
onResize(width, height);
|
|
22429
|
-
}
|
|
22430
|
-
|
|
22431
|
-
_this.setState({
|
|
22432
|
-
width: width,
|
|
22433
|
-
height: height
|
|
22434
|
-
});
|
|
22435
|
-
});
|
|
22436
|
-
return _this.raf;
|
|
22437
|
-
});
|
|
22438
|
-
|
|
22439
|
-
_defineProperty(_assertThisInitialized$1(_this), "createResizeHandler", function (entries) {
|
|
22440
|
-
var _this$state = _this.state,
|
|
22441
|
-
widthCurrent = _this$state.width,
|
|
22442
|
-
heightCurrent = _this$state.height;
|
|
22443
|
-
var _this$props2 = _this.props,
|
|
22444
|
-
handleWidth = _this$props2.handleWidth,
|
|
22445
|
-
handleHeight = _this$props2.handleHeight;
|
|
22446
|
-
if (!handleWidth && !handleHeight) return;
|
|
22447
|
-
|
|
22448
|
-
var updater = _this.createUpdater();
|
|
22449
|
-
|
|
22450
|
-
entries.forEach(function (entry) {
|
|
22451
|
-
var _ref2 = entry && entry.contentRect || {},
|
|
22452
|
-
width = _ref2.width,
|
|
22453
|
-
height = _ref2.height;
|
|
22454
|
-
|
|
22455
|
-
var isWidthChanged = handleWidth && widthCurrent !== width;
|
|
22456
|
-
var isHeightChanged = handleHeight && heightCurrent !== height;
|
|
22457
|
-
var isSizeChanged = isWidthChanged || isHeightChanged;
|
|
22458
|
-
var shouldSetSize = !_this.skipOnMount && isSizeChanged && !isSSR();
|
|
22459
|
-
|
|
22460
|
-
if (shouldSetSize) {
|
|
22461
|
-
updater({
|
|
22462
|
-
width: width,
|
|
22463
|
-
height: height
|
|
22464
|
-
});
|
|
22465
|
-
}
|
|
22466
|
-
|
|
22467
|
-
_this.skipOnMount = false;
|
|
22468
|
-
});
|
|
22469
|
-
});
|
|
22470
|
-
|
|
22471
|
-
_defineProperty(_assertThisInitialized$1(_this), "onRef", function (el) {
|
|
22472
|
-
_this.element = el;
|
|
22473
|
-
});
|
|
22474
|
-
|
|
22475
|
-
_defineProperty(_assertThisInitialized$1(_this), "getRenderType", function () {
|
|
22476
|
-
var _this$props3 = _this.props,
|
|
22477
|
-
render = _this$props3.render,
|
|
22478
|
-
children = _this$props3.children;
|
|
22479
|
-
|
|
22480
|
-
if (isFunction(render)) {
|
|
22481
|
-
return 'renderProp';
|
|
22482
|
-
}
|
|
22483
|
-
|
|
22484
|
-
if (isFunction(children)) {
|
|
22485
|
-
return 'childFunction';
|
|
22486
|
-
}
|
|
22487
|
-
|
|
22488
|
-
if (React.isValidElement(children)) {
|
|
22489
|
-
return 'child';
|
|
22490
|
-
}
|
|
22491
|
-
|
|
22492
|
-
if (Array.isArray(children)) {
|
|
22493
|
-
return 'childArray';
|
|
22494
|
-
}
|
|
22495
|
-
|
|
22496
|
-
return 'parent';
|
|
22497
|
-
});
|
|
22498
|
-
|
|
22499
|
-
_defineProperty(_assertThisInitialized$1(_this), "getTargetComponent", function () {
|
|
22500
|
-
var _this$props4 = _this.props,
|
|
22501
|
-
render = _this$props4.render,
|
|
22502
|
-
children = _this$props4.children,
|
|
22503
|
-
nodeType = _this$props4.nodeType;
|
|
22504
|
-
var _this$state2 = _this.state,
|
|
22505
|
-
width = _this$state2.width,
|
|
22506
|
-
height = _this$state2.height;
|
|
22507
|
-
var childProps = {
|
|
22508
|
-
width: width,
|
|
22509
|
-
height: height
|
|
22510
|
-
};
|
|
22511
|
-
|
|
22512
|
-
var renderType = _this.getRenderType();
|
|
22513
|
-
|
|
22514
|
-
switch (renderType) {
|
|
22515
|
-
case 'renderProp':
|
|
22516
|
-
return React.cloneElement(render(childProps), {
|
|
22517
|
-
key: 'resize-detector'
|
|
22518
|
-
});
|
|
22519
|
-
|
|
22520
|
-
case 'childFunction':
|
|
22521
|
-
return React.cloneElement(children(childProps));
|
|
22522
|
-
|
|
22523
|
-
case 'child':
|
|
22524
|
-
return React.cloneElement(children, childProps);
|
|
22525
|
-
|
|
22526
|
-
case 'childArray':
|
|
22527
|
-
return children.map(function (el) {
|
|
22528
|
-
return !!el && React.cloneElement(el, childProps);
|
|
22529
|
-
});
|
|
22530
|
-
|
|
22531
|
-
default:
|
|
22532
|
-
return React.createElement(nodeType);
|
|
22533
|
-
}
|
|
22534
|
-
});
|
|
22535
|
-
|
|
22536
|
-
var skipOnMount = props.skipOnMount,
|
|
22537
|
-
refreshMode = props.refreshMode,
|
|
22538
|
-
refreshRate = props.refreshRate,
|
|
22539
|
-
refreshOptions = props.refreshOptions;
|
|
22540
|
-
_this.state = {
|
|
22541
|
-
width: undefined,
|
|
22542
|
-
height: undefined
|
|
22543
|
-
};
|
|
22544
|
-
_this.skipOnMount = skipOnMount;
|
|
22545
|
-
_this.raf = null;
|
|
22546
|
-
_this.element = null;
|
|
22547
|
-
_this.unmounted = false;
|
|
22548
|
-
var handle = getHandle(refreshMode);
|
|
22549
|
-
_this.resizeHandler = handle ? handle(_this.createResizeHandler, refreshRate, refreshOptions) : _this.createResizeHandler;
|
|
22550
|
-
_this.resizeObserver = new index(_this.resizeHandler);
|
|
22551
|
-
return _this;
|
|
22552
|
-
}
|
|
22553
|
-
|
|
22554
|
-
_createClass(ResizeDetector, [{
|
|
22555
|
-
key: "componentDidMount",
|
|
22556
|
-
value: function componentDidMount() {
|
|
22557
|
-
this.toggleObserver('observe');
|
|
22558
|
-
}
|
|
22559
|
-
}, {
|
|
22560
|
-
key: "componentWillUnmount",
|
|
22561
|
-
value: function componentWillUnmount() {
|
|
22562
|
-
this.toggleObserver('unobserve');
|
|
22563
|
-
this.rafClean();
|
|
22564
|
-
this.cancelHandler();
|
|
22565
|
-
this.unmounted = true;
|
|
22566
|
-
}
|
|
22567
|
-
}, {
|
|
22568
|
-
key: "render",
|
|
22569
|
-
value: function render() {
|
|
22570
|
-
return /*#__PURE__*/React__default['default'].createElement(ChildWrapper, {
|
|
22571
|
-
ref: this.onRef
|
|
22572
|
-
}, this.getTargetComponent());
|
|
22573
|
-
}
|
|
22574
|
-
}]);
|
|
22575
|
-
|
|
22576
|
-
return ResizeDetector;
|
|
22577
|
-
}(React.PureComponent);
|
|
22578
|
-
|
|
22579
|
-
ResizeDetector.propTypes = {
|
|
22580
|
-
handleWidth: PropTypes.bool,
|
|
22581
|
-
handleHeight: PropTypes.bool,
|
|
22582
|
-
skipOnMount: PropTypes.bool,
|
|
22583
|
-
refreshRate: PropTypes.number,
|
|
22584
|
-
refreshMode: PropTypes.string,
|
|
22585
|
-
refreshOptions: PropTypes.shape({
|
|
22586
|
-
leading: PropTypes.bool,
|
|
22587
|
-
trailing: PropTypes.bool
|
|
22588
|
-
}),
|
|
22589
|
-
querySelector: PropTypes.string,
|
|
22590
|
-
targetDomEl: PropTypes.any,
|
|
22591
|
-
// eslint-disable-line react/forbid-prop-types
|
|
22592
|
-
onResize: PropTypes.func,
|
|
22593
|
-
render: PropTypes.func,
|
|
22594
|
-
children: PropTypes.any,
|
|
22595
|
-
// eslint-disable-line react/forbid-prop-types
|
|
22596
|
-
nodeType: PropTypes.node
|
|
22597
|
-
};
|
|
22598
|
-
ResizeDetector.defaultProps = {
|
|
22599
|
-
handleWidth: false,
|
|
22600
|
-
handleHeight: false,
|
|
22601
|
-
skipOnMount: false,
|
|
22602
|
-
refreshRate: 1000,
|
|
22603
|
-
refreshMode: undefined,
|
|
22604
|
-
refreshOptions: undefined,
|
|
22605
|
-
querySelector: null,
|
|
22606
|
-
targetDomEl: null,
|
|
22607
|
-
onResize: null,
|
|
22608
|
-
render: undefined,
|
|
22609
|
-
children: null,
|
|
22610
|
-
nodeType: 'div'
|
|
22611
|
-
};
|
|
22612
|
-
|
|
22613
20780
|
var _excluded = ["name", "onSubmit"];
|
|
22614
20781
|
|
|
22615
20782
|
var BaseNavBarSearch = function BaseNavBarSearch(_ref) {
|
|
@@ -24058,7 +22225,7 @@
|
|
|
24058
22225
|
};
|
|
24059
22226
|
|
|
24060
22227
|
var NavBar$1 = function NavBar(props) {
|
|
24061
|
-
return /*#__PURE__*/React__default['default'].createElement(
|
|
22228
|
+
return /*#__PURE__*/React__default['default'].createElement(ReactResizeDetector__default['default'], {
|
|
24062
22229
|
handleWidth: true
|
|
24063
22230
|
}, /*#__PURE__*/React__default['default'].createElement(SelectNavBarBasedOnWidth$1, Object.assign({}, props)));
|
|
24064
22231
|
};
|
|
@@ -28032,7 +26199,7 @@
|
|
|
28032
26199
|
role: "tablist",
|
|
28033
26200
|
onScroll: handleScroll,
|
|
28034
26201
|
ref: _this3.tabContainerRef
|
|
28035
|
-
}, spaceProps), /*#__PURE__*/React__default['default'].createElement(
|
|
26202
|
+
}, spaceProps), /*#__PURE__*/React__default['default'].createElement(ReactResizeDetector__default['default'], {
|
|
28036
26203
|
handleWidth: true,
|
|
28037
26204
|
onResize: handleResize
|
|
28038
26205
|
}), _this3.getTabs(setFocusedIndex, focusedIndex, handleArrowNavigation));
|
|
@@ -45023,16 +43190,17 @@
|
|
|
45023
43190
|
return getRenderFunction$1(menuItem)(menuItem, themeColorObject, layer);
|
|
45024
43191
|
};
|
|
45025
43192
|
|
|
45026
|
-
var BaseDesktopMenu = function
|
|
43193
|
+
var BaseDesktopMenu = /*#__PURE__*/React__default['default'].forwardRef(function (_a, ref) {
|
|
45027
43194
|
var menuData = _a.menuData,
|
|
45028
43195
|
themeColorObject = _a.themeColorObject,
|
|
45029
43196
|
props = __rest(_a, ["menuData", "themeColorObject"]);
|
|
45030
43197
|
|
|
45031
|
-
return /*#__PURE__*/React__default['default'].createElement(Nav$1, Object.assign({}, props
|
|
43198
|
+
return /*#__PURE__*/React__default['default'].createElement(Nav$1, Object.assign({}, props, {
|
|
43199
|
+
ref: ref
|
|
43200
|
+
}), menuData.map(function (menuItem) {
|
|
45032
43201
|
return renderMenuItem(menuItem, themeColorObject, 0);
|
|
45033
43202
|
}));
|
|
45034
|
-
};
|
|
45035
|
-
|
|
43203
|
+
});
|
|
45036
43204
|
var DesktopMenu = styled__default['default'](BaseDesktopMenu).withConfig({
|
|
45037
43205
|
displayName: "DesktopMenu",
|
|
45038
43206
|
componentId: "sc-8mrjkc-3"
|
|
@@ -45098,6 +43266,83 @@
|
|
|
45098
43266
|
};
|
|
45099
43267
|
|
|
45100
43268
|
var borderStyle$1 = "1px solid #e4e7eb";
|
|
43269
|
+
var NulogyLogoContainer = function NulogyLogoContainer(_ref) {
|
|
43270
|
+
var subText = _ref.subText,
|
|
43271
|
+
height = _ref.height;
|
|
43272
|
+
return /*#__PURE__*/React__default['default'].createElement(Flex, {
|
|
43273
|
+
px: "x1",
|
|
43274
|
+
py: "half",
|
|
43275
|
+
alignItems: "center",
|
|
43276
|
+
// boxShadow="small"
|
|
43277
|
+
justifyContent: "center",
|
|
43278
|
+
flexDirection: subText ? "column" : "row",
|
|
43279
|
+
height: height,
|
|
43280
|
+
borderLeft: borderStyle$1,
|
|
43281
|
+
borderRight: borderStyle$1
|
|
43282
|
+
}, /*#__PURE__*/React__default['default'].createElement(Box, {
|
|
43283
|
+
width: "76px",
|
|
43284
|
+
height: "18px"
|
|
43285
|
+
}, /*#__PURE__*/React__default['default'].createElement(NulogyLogo, null)), subText && /*#__PURE__*/React__default['default'].createElement(Text, {
|
|
43286
|
+
fontSize: "8px",
|
|
43287
|
+
lineHeight: "10px",
|
|
43288
|
+
color: "darkGrey",
|
|
43289
|
+
fontWeight: "medium",
|
|
43290
|
+
textTransform: "uppercase",
|
|
43291
|
+
letterSpacing: ".5px"
|
|
43292
|
+
}, subText));
|
|
43293
|
+
};
|
|
43294
|
+
|
|
43295
|
+
var EnvironmentBanner = function EnvironmentBanner(_ref) {
|
|
43296
|
+
var children = _ref.children;
|
|
43297
|
+
return /*#__PURE__*/React__default['default'].createElement(Box, {
|
|
43298
|
+
bg: "darkBlue",
|
|
43299
|
+
textAlign: "center"
|
|
43300
|
+
}, /*#__PURE__*/React__default['default'].createElement(Text, {
|
|
43301
|
+
fontSize: "10px",
|
|
43302
|
+
letterSpacing: "0.5px",
|
|
43303
|
+
fontWeight: "bold",
|
|
43304
|
+
color: "white",
|
|
43305
|
+
textTransform: "uppercase",
|
|
43306
|
+
py: "2px"
|
|
43307
|
+
}, children));
|
|
43308
|
+
};
|
|
43309
|
+
|
|
43310
|
+
var MAX_LOGO_WIDTH = "184px";
|
|
43311
|
+
var MAX_LOGO_HEIGHT = "36px";
|
|
43312
|
+
|
|
43313
|
+
var BrandLogoContainer = function BrandLogoContainer(_ref) {
|
|
43314
|
+
var logoSrc = _ref.logoSrc,
|
|
43315
|
+
brandingLinkHref = _ref.brandingLinkHref,
|
|
43316
|
+
brandingLinkTo = _ref.brandingLinkTo,
|
|
43317
|
+
brandingLinkComponent = _ref.brandingLinkComponent,
|
|
43318
|
+
subtext = _ref.subtext;
|
|
43319
|
+
return /*#__PURE__*/React__default['default'].createElement(Box, {
|
|
43320
|
+
maxWidth: MAX_LOGO_WIDTH,
|
|
43321
|
+
maxHeight: MAX_LOGO_HEIGHT
|
|
43322
|
+
}, /*#__PURE__*/React__default['default'].createElement(Link, {
|
|
43323
|
+
"aria-label": "Home",
|
|
43324
|
+
href: brandingLinkHref,
|
|
43325
|
+
to: brandingLinkTo,
|
|
43326
|
+
as: brandingLinkComponent,
|
|
43327
|
+
underline: false,
|
|
43328
|
+
style: {
|
|
43329
|
+
display: "block"
|
|
43330
|
+
}
|
|
43331
|
+
}, logoSrc && /*#__PURE__*/React__default['default'].createElement("img", {
|
|
43332
|
+
src: logoSrc,
|
|
43333
|
+
style: {
|
|
43334
|
+
maxWidth: MAX_LOGO_WIDTH,
|
|
43335
|
+
maxHeight: MAX_LOGO_HEIGHT
|
|
43336
|
+
},
|
|
43337
|
+
alt: ""
|
|
43338
|
+
}), !logoSrc && /*#__PURE__*/React__default['default'].createElement(Branding, {
|
|
43339
|
+
size: subtext ? "small" : "medium",
|
|
43340
|
+
logoColor: "blue",
|
|
43341
|
+
subtext: subtext
|
|
43342
|
+
})));
|
|
43343
|
+
};
|
|
43344
|
+
|
|
43345
|
+
var borderStyle = "1px solid #e4e7eb";
|
|
45101
43346
|
var BrandingWrap = styled__default['default'].div.withConfig({
|
|
45102
43347
|
displayName: "MobileMenu__BrandingWrap",
|
|
45103
43348
|
componentId: "sc-18t6zrc-0"
|
|
@@ -45324,7 +43569,7 @@
|
|
|
45324
43569
|
logoColor: themeColorObject && themeColorObject.logoColor
|
|
45325
43570
|
})), /*#__PURE__*/React__default['default'].createElement(Menu$1, null, menuData.primaryMenu && renderTopLayerMenuItems(menuData.primaryMenu, closeMenu, themeColorObject), menuData.secondaryMenu && renderTopLayerMenuItems(menuData.secondaryMenu, closeMenu, themeColorObject)), logoSrc && /*#__PURE__*/React__default['default'].createElement(Flex, {
|
|
45326
43571
|
textAlign: "center",
|
|
45327
|
-
borderTop: borderStyle
|
|
43572
|
+
borderTop: borderStyle,
|
|
45328
43573
|
height: "40px",
|
|
45329
43574
|
alignItems: "center",
|
|
45330
43575
|
justifyContent: "center"
|
|
@@ -45343,163 +43588,28 @@
|
|
|
45343
43588
|
componentId: "sc-18t6zrc-6"
|
|
45344
43589
|
})(display);
|
|
45345
43590
|
|
|
45346
|
-
var borderStyle = "1px solid #e4e7eb";
|
|
45347
|
-
var NulogyLogoContainer = function NulogyLogoContainer(_ref) {
|
|
45348
|
-
var subText = _ref.subText,
|
|
45349
|
-
height = _ref.height;
|
|
45350
|
-
return /*#__PURE__*/React__default['default'].createElement(Flex, {
|
|
45351
|
-
px: "x1",
|
|
45352
|
-
py: "half",
|
|
45353
|
-
alignItems: "center",
|
|
45354
|
-
// boxShadow="small"
|
|
45355
|
-
justifyContent: "center",
|
|
45356
|
-
flexDirection: subText ? "column" : "row",
|
|
45357
|
-
height: height,
|
|
45358
|
-
borderLeft: borderStyle,
|
|
45359
|
-
borderRight: borderStyle
|
|
45360
|
-
}, /*#__PURE__*/React__default['default'].createElement(Box, {
|
|
45361
|
-
width: "76px",
|
|
45362
|
-
height: "18px"
|
|
45363
|
-
}, /*#__PURE__*/React__default['default'].createElement(NulogyLogo, null)), subText && /*#__PURE__*/React__default['default'].createElement(Text, {
|
|
45364
|
-
fontSize: "8px",
|
|
45365
|
-
lineHeight: "10px",
|
|
45366
|
-
color: "darkGrey",
|
|
45367
|
-
fontWeight: "medium",
|
|
45368
|
-
textTransform: "uppercase",
|
|
45369
|
-
letterSpacing: ".5px"
|
|
45370
|
-
}, subText));
|
|
45371
|
-
};
|
|
45372
|
-
|
|
45373
|
-
var EnvironmentBanner = function EnvironmentBanner(_ref) {
|
|
45374
|
-
var children = _ref.children;
|
|
45375
|
-
return /*#__PURE__*/React__default['default'].createElement(Box, {
|
|
45376
|
-
bg: "darkBlue",
|
|
45377
|
-
textAlign: "center"
|
|
45378
|
-
}, /*#__PURE__*/React__default['default'].createElement(Text, {
|
|
45379
|
-
fontSize: "10px",
|
|
45380
|
-
letterSpacing: "0.5px",
|
|
45381
|
-
fontWeight: "bold",
|
|
45382
|
-
color: "white",
|
|
45383
|
-
textTransform: "uppercase",
|
|
45384
|
-
py: "2px"
|
|
45385
|
-
}, children));
|
|
45386
|
-
};
|
|
45387
|
-
|
|
45388
|
-
var MAX_LOGO_WIDTH = "184px";
|
|
45389
|
-
var MAX_LOGO_HEIGHT = "36px";
|
|
45390
|
-
var NAVBAR_HEIGHT = "56px";
|
|
45391
|
-
var themeColorObject = {
|
|
45392
|
-
color: "darkBlue",
|
|
45393
|
-
hoverColor: "blackBlue",
|
|
45394
|
-
background: "white",
|
|
45395
|
-
hoverBackground: "whiteGrey",
|
|
45396
|
-
textColor: "blackBlue",
|
|
45397
|
-
logoColor: "blue"
|
|
45398
|
-
};
|
|
45399
43591
|
var NavBarBackground = styled__default['default'](Flex).withConfig({
|
|
45400
|
-
displayName: "
|
|
45401
|
-
componentId: "
|
|
43592
|
+
displayName: "NavBarBackground",
|
|
43593
|
+
componentId: "sc-1g75y9j-0"
|
|
45402
43594
|
})(function (_ref) {
|
|
45403
|
-
var
|
|
45404
|
-
theme = _ref.theme;
|
|
43595
|
+
var theme = _ref.theme;
|
|
45405
43596
|
return {
|
|
45406
|
-
background: backgroundColor,
|
|
45407
43597
|
padding: "0 " + theme.space.x3,
|
|
45408
43598
|
borderBottom: "1px solid " + theme.colors.lightGrey,
|
|
45409
43599
|
alignItems: "center",
|
|
45410
|
-
height: NAVBAR_HEIGHT,
|
|
45411
43600
|
zIndex: theme.zIndices.navBar,
|
|
45412
43601
|
position: "relative"
|
|
45413
43602
|
};
|
|
45414
|
-
});
|
|
45415
|
-
|
|
45416
|
-
var BrandLogoContainer = function BrandLogoContainer(_ref2) {
|
|
45417
|
-
var logoSrc = _ref2.logoSrc,
|
|
45418
|
-
brandingLinkHref = _ref2.brandingLinkHref,
|
|
45419
|
-
brandingLinkTo = _ref2.brandingLinkTo,
|
|
45420
|
-
brandingLinkComponent = _ref2.brandingLinkComponent,
|
|
45421
|
-
subtext = _ref2.subtext;
|
|
45422
|
-
return /*#__PURE__*/React__default['default'].createElement(Box, {
|
|
45423
|
-
maxWidth: MAX_LOGO_WIDTH,
|
|
45424
|
-
maxHeight: MAX_LOGO_HEIGHT
|
|
45425
|
-
}, /*#__PURE__*/React__default['default'].createElement(Link, {
|
|
45426
|
-
"aria-label": "Home",
|
|
45427
|
-
href: brandingLinkHref,
|
|
45428
|
-
to: brandingLinkTo,
|
|
45429
|
-
as: brandingLinkComponent,
|
|
45430
|
-
underline: false,
|
|
45431
|
-
style: {
|
|
45432
|
-
display: "block"
|
|
45433
|
-
}
|
|
45434
|
-
}, logoSrc && /*#__PURE__*/React__default['default'].createElement("img", {
|
|
45435
|
-
src: logoSrc,
|
|
45436
|
-
style: {
|
|
45437
|
-
maxWidth: MAX_LOGO_WIDTH,
|
|
45438
|
-
maxHeight: MAX_LOGO_HEIGHT
|
|
45439
|
-
},
|
|
45440
|
-
alt: ""
|
|
45441
|
-
}), !logoSrc && /*#__PURE__*/React__default['default'].createElement(Branding, {
|
|
45442
|
-
size: subtext ? "small" : "medium",
|
|
45443
|
-
logoColor: "blue",
|
|
45444
|
-
subtext: subtext
|
|
45445
|
-
})));
|
|
45446
|
-
};
|
|
45447
|
-
|
|
45448
|
-
var MediumNavBar = function MediumNavBar(_a) {
|
|
45449
|
-
var menuData = _a.menuData,
|
|
45450
|
-
subtext = _a.subtext,
|
|
45451
|
-
environment = _a.environment,
|
|
45452
|
-
logoSrc = _a.logoSrc,
|
|
45453
|
-
_a$brandingLinkHref = _a.brandingLinkHref,
|
|
45454
|
-
brandingLinkHref = _a$brandingLinkHref === void 0 ? "/" : _a$brandingLinkHref,
|
|
45455
|
-
brandingLinkTo = _a.brandingLinkTo,
|
|
45456
|
-
brandingLinkComponent = _a.brandingLinkComponent,
|
|
45457
|
-
props = __rest(_a, ["menuData", "subtext", "environment", "logoSrc", "brandingLinkHref", "brandingLinkTo", "brandingLinkComponent"]);
|
|
45458
|
-
|
|
45459
|
-
var _useTranslation = useTranslation(),
|
|
45460
|
-
t = _useTranslation.t;
|
|
45461
|
-
|
|
45462
|
-
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, environment && /*#__PURE__*/React__default['default'].createElement(EnvironmentBanner, null, environment), /*#__PURE__*/React__default['default'].createElement("header", Object.assign({}, props), /*#__PURE__*/React__default['default'].createElement(NavBarBackground, {
|
|
45463
|
-
backgroundColor: "white"
|
|
45464
|
-
}, /*#__PURE__*/React__default['default'].createElement(BrandLogoContainer, {
|
|
45465
|
-
logoSrc: logoSrc,
|
|
45466
|
-
brandingLinkHref: brandingLinkHref,
|
|
45467
|
-
brandingLinkTo: brandingLinkTo,
|
|
45468
|
-
brandingLinkComponent: brandingLinkComponent,
|
|
45469
|
-
subtext: subtext
|
|
45470
|
-
}), /*#__PURE__*/React__default['default'].createElement(Flex, {
|
|
45471
|
-
justifyContent: "space-between",
|
|
45472
|
-
alignContent: "flex-end",
|
|
45473
|
-
flexGrow: 1,
|
|
45474
|
-
ml: "x3",
|
|
45475
|
-
alignItems: "center"
|
|
45476
|
-
}, menuData.primaryMenu && /*#__PURE__*/React__default['default'].createElement(DesktopMenu, {
|
|
45477
|
-
themeColorObject: themeColorObject,
|
|
45478
|
-
"aria-label": t("primary navigation"),
|
|
45479
|
-
menuData: menuData.primaryMenu
|
|
45480
|
-
}), /*#__PURE__*/React__default['default'].createElement(Flex, {
|
|
45481
|
-
justifySelf: "flex-end",
|
|
45482
|
-
alignItems: "center"
|
|
45483
|
-
}, menuData.secondaryMenu && /*#__PURE__*/React__default['default'].createElement(DesktopMenu, {
|
|
45484
|
-
themeColorObject: themeColorObject,
|
|
45485
|
-
"aria-label": t("secondary navigation"),
|
|
45486
|
-
menuData: menuData.secondaryMenu
|
|
45487
|
-
}), logoSrc && /*#__PURE__*/React__default['default'].createElement(Box, {
|
|
45488
|
-
pl: "x3"
|
|
45489
|
-
}, /*#__PURE__*/React__default['default'].createElement(NulogyLogoContainer, {
|
|
45490
|
-
height: NAVBAR_HEIGHT,
|
|
45491
|
-
subText: subtext
|
|
45492
|
-
})))))));
|
|
45493
|
-
};
|
|
43603
|
+
}, addStyledProps);
|
|
45494
43604
|
|
|
45495
43605
|
var MobileMenuTrigger = styled__default['default'].button.withConfig({
|
|
45496
|
-
displayName: "
|
|
45497
|
-
componentId: "
|
|
45498
|
-
})(function (
|
|
45499
|
-
var color =
|
|
45500
|
-
hoverColor =
|
|
45501
|
-
hoverBackground =
|
|
45502
|
-
theme =
|
|
43606
|
+
displayName: "SmallNavBar__MobileMenuTrigger",
|
|
43607
|
+
componentId: "ykabay-0"
|
|
43608
|
+
})(function (_ref) {
|
|
43609
|
+
var color = _ref.color,
|
|
43610
|
+
hoverColor = _ref.hoverColor,
|
|
43611
|
+
hoverBackground = _ref.hoverBackground,
|
|
43612
|
+
theme = _ref.theme;
|
|
45503
43613
|
return {
|
|
45504
43614
|
color: theme.colors[color] || color,
|
|
45505
43615
|
background: "none",
|
|
@@ -45521,11 +43631,11 @@
|
|
|
45521
43631
|
};
|
|
45522
43632
|
});
|
|
45523
43633
|
var SmallHeader = styled__default['default'].header.withConfig({
|
|
45524
|
-
displayName: "
|
|
45525
|
-
componentId: "
|
|
45526
|
-
})(function (
|
|
45527
|
-
var isOpen =
|
|
45528
|
-
theme =
|
|
43634
|
+
displayName: "SmallNavBar__SmallHeader",
|
|
43635
|
+
componentId: "ykabay-1"
|
|
43636
|
+
})(function (_ref2) {
|
|
43637
|
+
var isOpen = _ref2.isOpen,
|
|
43638
|
+
theme = _ref2.theme;
|
|
45529
43639
|
return isOpen ? {
|
|
45530
43640
|
position: "fixed",
|
|
45531
43641
|
width: "100%",
|
|
@@ -45540,15 +43650,11 @@
|
|
|
45540
43650
|
} : null;
|
|
45541
43651
|
});
|
|
45542
43652
|
|
|
45543
|
-
var
|
|
45544
|
-
|
|
45545
|
-
};
|
|
45546
|
-
|
|
45547
|
-
var MenuIcon = function MenuIcon(_ref5) {
|
|
45548
|
-
var isOpen = _ref5.isOpen;
|
|
43653
|
+
var MenuIcon = function MenuIcon(_ref3) {
|
|
43654
|
+
var isOpen = _ref3.isOpen;
|
|
45549
43655
|
|
|
45550
|
-
var
|
|
45551
|
-
t =
|
|
43656
|
+
var _useTranslation = useTranslation(),
|
|
43657
|
+
t = _useTranslation.t;
|
|
45552
43658
|
|
|
45553
43659
|
var icon = isOpen ? "close" : "menu";
|
|
45554
43660
|
var title = isOpen ? t("close menu") : t("open menu");
|
|
@@ -45567,14 +43673,16 @@
|
|
|
45567
43673
|
toggleMenu = _a$menuState.toggleMenu,
|
|
45568
43674
|
closeMenu = _a$menuState.closeMenu,
|
|
45569
43675
|
subtext = _a.subtext,
|
|
45570
|
-
_a$
|
|
45571
|
-
brandingLinkHref = _a$
|
|
43676
|
+
_a$brandingLinkHref = _a.brandingLinkHref,
|
|
43677
|
+
brandingLinkHref = _a$brandingLinkHref === void 0 ? "/" : _a$brandingLinkHref,
|
|
45572
43678
|
brandingLinkTo = _a.brandingLinkTo,
|
|
45573
43679
|
environment = _a.environment,
|
|
45574
43680
|
logoSrc = _a.logoSrc,
|
|
45575
43681
|
_a$breakpointLower = _a.breakpointLower,
|
|
45576
43682
|
breakpointLower = _a$breakpointLower === void 0 ? "small" : _a$breakpointLower,
|
|
45577
|
-
|
|
43683
|
+
themeColorObject = _a.themeColorObject,
|
|
43684
|
+
navBarHeight = _a.navBarHeight,
|
|
43685
|
+
props = __rest(_a, ["menuData", "menuState", "subtext", "brandingLinkHref", "brandingLinkTo", "environment", "logoSrc", "breakpointLower", "themeColorObject", "navBarHeight"]);
|
|
45578
43686
|
|
|
45579
43687
|
var navRef = React__default['default'].useRef(null);
|
|
45580
43688
|
React.useEffect(function () {
|
|
@@ -45591,7 +43699,8 @@
|
|
|
45591
43699
|
isOpen: isOpen,
|
|
45592
43700
|
breakpointLower: breakpoints ? breakpoints[breakpointLower] : breakpointLower
|
|
45593
43701
|
}, props), environment && /*#__PURE__*/React__default['default'].createElement(EnvironmentBanner, null, environment), /*#__PURE__*/React__default['default'].createElement(NavBarBackground, {
|
|
45594
|
-
backgroundColor: "white"
|
|
43702
|
+
backgroundColor: "white",
|
|
43703
|
+
height: navBarHeight
|
|
45595
43704
|
}, /*#__PURE__*/React__default['default'].createElement(BrandLogoContainer, {
|
|
45596
43705
|
logoSrc: logoSrc,
|
|
45597
43706
|
brandingLinkHref: brandingLinkHref,
|
|
@@ -45623,6 +43732,68 @@
|
|
|
45623
43732
|
|
|
45624
43733
|
var SmallNavBar = withMenuState(SmallNavBarNoState);
|
|
45625
43734
|
|
|
43735
|
+
var NAVBAR_HEIGHT = "56px";
|
|
43736
|
+
var themeColorObject = {
|
|
43737
|
+
color: "darkBlue",
|
|
43738
|
+
hoverColor: "blackBlue",
|
|
43739
|
+
background: "white",
|
|
43740
|
+
hoverBackground: "whiteGrey",
|
|
43741
|
+
textColor: "blackBlue",
|
|
43742
|
+
logoColor: "blue"
|
|
43743
|
+
};
|
|
43744
|
+
|
|
43745
|
+
var MediumNavBar = function MediumNavBar(_a) {
|
|
43746
|
+
var menuData = _a.menuData,
|
|
43747
|
+
subtext = _a.subtext,
|
|
43748
|
+
environment = _a.environment,
|
|
43749
|
+
logoSrc = _a.logoSrc,
|
|
43750
|
+
_a$brandingLinkHref = _a.brandingLinkHref,
|
|
43751
|
+
brandingLinkHref = _a$brandingLinkHref === void 0 ? "/" : _a$brandingLinkHref,
|
|
43752
|
+
brandingLinkTo = _a.brandingLinkTo,
|
|
43753
|
+
brandingLinkComponent = _a.brandingLinkComponent,
|
|
43754
|
+
props = __rest(_a, ["menuData", "subtext", "environment", "logoSrc", "brandingLinkHref", "brandingLinkTo", "brandingLinkComponent"]);
|
|
43755
|
+
|
|
43756
|
+
var _useTranslation = useTranslation(),
|
|
43757
|
+
t = _useTranslation.t;
|
|
43758
|
+
|
|
43759
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, environment && /*#__PURE__*/React__default['default'].createElement(EnvironmentBanner, null, environment), /*#__PURE__*/React__default['default'].createElement("header", Object.assign({}, props), /*#__PURE__*/React__default['default'].createElement(NavBarBackground, {
|
|
43760
|
+
backgroundColor: "white",
|
|
43761
|
+
height: NAVBAR_HEIGHT
|
|
43762
|
+
}, /*#__PURE__*/React__default['default'].createElement(BrandLogoContainer, {
|
|
43763
|
+
logoSrc: logoSrc,
|
|
43764
|
+
brandingLinkHref: brandingLinkHref,
|
|
43765
|
+
brandingLinkTo: brandingLinkTo,
|
|
43766
|
+
brandingLinkComponent: brandingLinkComponent,
|
|
43767
|
+
subtext: subtext
|
|
43768
|
+
}), /*#__PURE__*/React__default['default'].createElement(Flex, {
|
|
43769
|
+
justifyContent: "space-between",
|
|
43770
|
+
alignContent: "flex-end",
|
|
43771
|
+
flexGrow: 1,
|
|
43772
|
+
ml: "x3",
|
|
43773
|
+
alignItems: "center"
|
|
43774
|
+
}, menuData.primaryMenu && /*#__PURE__*/React__default['default'].createElement(DesktopMenu, {
|
|
43775
|
+
themeColorObject: themeColorObject,
|
|
43776
|
+
"aria-label": t("primary navigation"),
|
|
43777
|
+
menuData: menuData.primaryMenu
|
|
43778
|
+
}), /*#__PURE__*/React__default['default'].createElement(Flex, {
|
|
43779
|
+
justifySelf: "flex-end",
|
|
43780
|
+
alignItems: "center"
|
|
43781
|
+
}, menuData.secondaryMenu && /*#__PURE__*/React__default['default'].createElement(DesktopMenu, {
|
|
43782
|
+
themeColorObject: themeColorObject,
|
|
43783
|
+
"aria-label": t("secondary navigation"),
|
|
43784
|
+
menuData: menuData.secondaryMenu
|
|
43785
|
+
}), logoSrc && /*#__PURE__*/React__default['default'].createElement(Box, {
|
|
43786
|
+
pl: "x3"
|
|
43787
|
+
}, /*#__PURE__*/React__default['default'].createElement(NulogyLogoContainer, {
|
|
43788
|
+
height: NAVBAR_HEIGHT,
|
|
43789
|
+
subText: subtext
|
|
43790
|
+
})))))));
|
|
43791
|
+
};
|
|
43792
|
+
|
|
43793
|
+
var pixelDigitsFrom = function pixelDigitsFrom(pixelString) {
|
|
43794
|
+
return parseInt(pixelString, 10);
|
|
43795
|
+
};
|
|
43796
|
+
|
|
45626
43797
|
var SelectNavBarBasedOnWidth = function SelectNavBarBasedOnWidth(_a) {
|
|
45627
43798
|
var width = _a.width,
|
|
45628
43799
|
defaultOpen = _a.defaultOpen,
|
|
@@ -45636,7 +43807,9 @@
|
|
|
45636
43807
|
} else {
|
|
45637
43808
|
return /*#__PURE__*/React__default['default'].createElement(SmallNavBar, Object.assign({}, props, {
|
|
45638
43809
|
width: currentWidth,
|
|
45639
|
-
defaultOpen: defaultOpen
|
|
43810
|
+
defaultOpen: defaultOpen,
|
|
43811
|
+
themeColorObject: themeColorObject,
|
|
43812
|
+
navBarHeight: NAVBAR_HEIGHT
|
|
45640
43813
|
}));
|
|
45641
43814
|
}
|
|
45642
43815
|
};
|
|
@@ -45647,10 +43820,10 @@
|
|
|
45647
43820
|
breakpointUpper = _a$breakpointUpper === void 0 ? "medium" : _a$breakpointUpper,
|
|
45648
43821
|
props = __rest(_a, ["environment", "breakpointUpper"]);
|
|
45649
43822
|
|
|
45650
|
-
var
|
|
45651
|
-
breakpoints =
|
|
43823
|
+
var _useTheme = styled.useTheme(),
|
|
43824
|
+
breakpoints = _useTheme.breakpoints;
|
|
45652
43825
|
|
|
45653
|
-
return /*#__PURE__*/React__default['default'].createElement(
|
|
43826
|
+
return /*#__PURE__*/React__default['default'].createElement(ReactResizeDetector__default['default'], {
|
|
45654
43827
|
handleWidth: true
|
|
45655
43828
|
}, /*#__PURE__*/React__default['default'].createElement(SelectNavBarBasedOnWidth, Object.assign({
|
|
45656
43829
|
breakpointUpper: breakpoints[breakpointUpper] || breakpointUpper
|
|
@@ -45661,7 +43834,7 @@
|
|
|
45661
43834
|
|
|
45662
43835
|
var NavBar = styled__default['default'](BaseNavBar).withConfig({
|
|
45663
43836
|
displayName: "NavBar",
|
|
45664
|
-
componentId: "cszq6w-
|
|
43837
|
+
componentId: "cszq6w-0"
|
|
45665
43838
|
})({});
|
|
45666
43839
|
|
|
45667
43840
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
@@ -47685,7 +45858,7 @@
|
|
|
47685
45858
|
|
|
47686
45859
|
var cleanValue = function cleanValue(value) {
|
|
47687
45860
|
if (Array.isArray(value)) return value.filter(Boolean);
|
|
47688
|
-
if (_typeof
|
|
45861
|
+
if (_typeof(value) === 'object' && value !== null) return [value];
|
|
47689
45862
|
return [];
|
|
47690
45863
|
}; // ==============================
|
|
47691
45864
|
// Handle Input Change
|
|
@@ -47834,9 +46007,9 @@
|
|
|
47834
46007
|
|
|
47835
46008
|
function ownKeys$1(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; }
|
|
47836
46009
|
|
|
47837
|
-
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(Object(source), true).forEach(function (key) { _defineProperty
|
|
46010
|
+
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
47838
46011
|
|
|
47839
|
-
function _createSuper$5(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$5(); return function _createSuperInternal() { var Super = _getPrototypeOf
|
|
46012
|
+
function _createSuper$5(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$5(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
47840
46013
|
|
|
47841
46014
|
function _isNativeReflectConstruct$5() { 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; } }
|
|
47842
46015
|
function getMenuPlacement(_ref) {
|
|
@@ -48025,21 +46198,21 @@
|
|
|
48025
46198
|
colors = _ref2$theme.colors;
|
|
48026
46199
|
return _ref3 = {
|
|
48027
46200
|
label: 'menu'
|
|
48028
|
-
}, _defineProperty
|
|
46201
|
+
}, _defineProperty(_ref3, alignToControl(placement), '100%'), _defineProperty(_ref3, "backgroundColor", colors.neutral0), _defineProperty(_ref3, "borderRadius", borderRadius), _defineProperty(_ref3, "boxShadow", '0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)'), _defineProperty(_ref3, "marginBottom", spacing.menuGutter), _defineProperty(_ref3, "marginTop", spacing.menuGutter), _defineProperty(_ref3, "position", 'absolute'), _defineProperty(_ref3, "width", '100%'), _defineProperty(_ref3, "zIndex", 1), _ref3;
|
|
48029
46202
|
};
|
|
48030
46203
|
var PortalPlacementContext = /*#__PURE__*/React.createContext({
|
|
48031
46204
|
getPortalPlacement: null
|
|
48032
46205
|
}); // NOTE: internal only
|
|
48033
46206
|
|
|
48034
46207
|
var MenuPlacer = /*#__PURE__*/function (_Component) {
|
|
48035
|
-
_inherits
|
|
46208
|
+
_inherits(MenuPlacer, _Component);
|
|
48036
46209
|
|
|
48037
46210
|
var _super = _createSuper$5(MenuPlacer);
|
|
48038
46211
|
|
|
48039
46212
|
function MenuPlacer() {
|
|
48040
46213
|
var _this;
|
|
48041
46214
|
|
|
48042
|
-
_classCallCheck
|
|
46215
|
+
_classCallCheck(this, MenuPlacer);
|
|
48043
46216
|
|
|
48044
46217
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
48045
46218
|
args[_key] = arguments[_key];
|
|
@@ -48090,7 +46263,7 @@
|
|
|
48090
46263
|
return _this;
|
|
48091
46264
|
}
|
|
48092
46265
|
|
|
48093
|
-
_createClass
|
|
46266
|
+
_createClass(MenuPlacer, [{
|
|
48094
46267
|
key: "render",
|
|
48095
46268
|
value: function render() {
|
|
48096
46269
|
var children = this.props.children;
|
|
@@ -48220,14 +46393,14 @@
|
|
|
48220
46393
|
};
|
|
48221
46394
|
};
|
|
48222
46395
|
var MenuPortal = /*#__PURE__*/function (_Component2) {
|
|
48223
|
-
_inherits
|
|
46396
|
+
_inherits(MenuPortal, _Component2);
|
|
48224
46397
|
|
|
48225
46398
|
var _super2 = _createSuper$5(MenuPortal);
|
|
48226
46399
|
|
|
48227
46400
|
function MenuPortal() {
|
|
48228
46401
|
var _this2;
|
|
48229
46402
|
|
|
48230
|
-
_classCallCheck
|
|
46403
|
+
_classCallCheck(this, MenuPortal);
|
|
48231
46404
|
|
|
48232
46405
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
48233
46406
|
args[_key2] = arguments[_key2];
|
|
@@ -48252,7 +46425,7 @@
|
|
|
48252
46425
|
return _this2;
|
|
48253
46426
|
}
|
|
48254
46427
|
|
|
48255
|
-
_createClass
|
|
46428
|
+
_createClass(MenuPortal, [{
|
|
48256
46429
|
key: "render",
|
|
48257
46430
|
value: function render() {
|
|
48258
46431
|
var _this$props2 = this.props,
|
|
@@ -48300,7 +46473,7 @@
|
|
|
48300
46473
|
// fast-deep-equal index.js 2.0.1
|
|
48301
46474
|
if (a === b) return true;
|
|
48302
46475
|
|
|
48303
|
-
if (a && b && _typeof
|
|
46476
|
+
if (a && b && _typeof(a) == 'object' && _typeof(b) == 'object') {
|
|
48304
46477
|
var arrA = isArray(a),
|
|
48305
46478
|
arrB = isArray(b),
|
|
48306
46479
|
i,
|
|
@@ -48720,7 +46893,7 @@
|
|
|
48720
46893
|
|
|
48721
46894
|
function ownKeys$1$1(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; }
|
|
48722
46895
|
|
|
48723
|
-
function _objectSpread$1$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1$1(Object(source), true).forEach(function (key) { _defineProperty
|
|
46896
|
+
function _objectSpread$1$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1$1(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
48724
46897
|
var groupCSS = function groupCSS(_ref) {
|
|
48725
46898
|
var spacing = _ref.theme.spacing;
|
|
48726
46899
|
return {
|
|
@@ -48787,7 +46960,7 @@
|
|
|
48787
46960
|
|
|
48788
46961
|
function ownKeys$2$1(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; }
|
|
48789
46962
|
|
|
48790
|
-
function _objectSpread$2$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$2$1(Object(source), true).forEach(function (key) { _defineProperty
|
|
46963
|
+
function _objectSpread$2$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$2$1(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$2$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
48791
46964
|
var inputCSS = function inputCSS(_ref) {
|
|
48792
46965
|
var isDisabled = _ref.isDisabled,
|
|
48793
46966
|
_ref$theme = _ref.theme,
|
|
@@ -48842,7 +47015,7 @@
|
|
|
48842
47015
|
|
|
48843
47016
|
function ownKeys$3(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; }
|
|
48844
47017
|
|
|
48845
|
-
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$3(Object(source), true).forEach(function (key) { _defineProperty
|
|
47018
|
+
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$3(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$3(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
48846
47019
|
var multiValueCSS = function multiValueCSS(_ref) {
|
|
48847
47020
|
var _ref$theme = _ref.theme,
|
|
48848
47021
|
spacing = _ref$theme.spacing,
|
|
@@ -49072,7 +47245,7 @@
|
|
|
49072
47245
|
|
|
49073
47246
|
function ownKeys$4(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; }
|
|
49074
47247
|
|
|
49075
|
-
function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$4(Object(source), true).forEach(function (key) { _defineProperty
|
|
47248
|
+
function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$4(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$4(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
49076
47249
|
var components = {
|
|
49077
47250
|
ClearIndicator: ClearIndicator,
|
|
49078
47251
|
Control: Control,
|
|
@@ -49455,7 +47628,7 @@
|
|
|
49455
47628
|
|
|
49456
47629
|
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; }
|
|
49457
47630
|
|
|
49458
|
-
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
|
|
47631
|
+
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(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; }
|
|
49459
47632
|
|
|
49460
47633
|
var trimString = function trimString(str) {
|
|
49461
47634
|
return str.replace(/^\s+|\s+$/g, '');
|
|
@@ -49550,22 +47723,22 @@
|
|
|
49550
47723
|
}));
|
|
49551
47724
|
}
|
|
49552
47725
|
|
|
49553
|
-
function _createSuper$2(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2(); return function _createSuperInternal() { var Super = _getPrototypeOf
|
|
47726
|
+
function _createSuper$2(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
49554
47727
|
|
|
49555
47728
|
function _isNativeReflectConstruct$2() { 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; } }
|
|
49556
47729
|
|
|
49557
47730
|
var NodeResolver = /*#__PURE__*/function (_Component) {
|
|
49558
|
-
_inherits
|
|
47731
|
+
_inherits(NodeResolver, _Component);
|
|
49559
47732
|
|
|
49560
47733
|
var _super = _createSuper$2(NodeResolver);
|
|
49561
47734
|
|
|
49562
47735
|
function NodeResolver() {
|
|
49563
|
-
_classCallCheck
|
|
47736
|
+
_classCallCheck(this, NodeResolver);
|
|
49564
47737
|
|
|
49565
47738
|
return _super.apply(this, arguments);
|
|
49566
47739
|
}
|
|
49567
47740
|
|
|
49568
|
-
_createClass
|
|
47741
|
+
_createClass(NodeResolver, [{
|
|
49569
47742
|
key: "componentDidMount",
|
|
49570
47743
|
value: function componentDidMount() {
|
|
49571
47744
|
this.props.innerRef(reactDom.findDOMNode(this));
|
|
@@ -49617,21 +47790,21 @@
|
|
|
49617
47790
|
return 'ontouchstart' in window || navigator.maxTouchPoints;
|
|
49618
47791
|
}
|
|
49619
47792
|
|
|
49620
|
-
function _createSuper$1$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1$1(); return function _createSuperInternal() { var Super = _getPrototypeOf
|
|
47793
|
+
function _createSuper$1$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
49621
47794
|
|
|
49622
47795
|
function _isNativeReflectConstruct$1$1() { 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; } }
|
|
49623
47796
|
var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
|
49624
47797
|
var activeScrollLocks = 0;
|
|
49625
47798
|
|
|
49626
47799
|
var ScrollLock = /*#__PURE__*/function (_Component) {
|
|
49627
|
-
_inherits
|
|
47800
|
+
_inherits(ScrollLock, _Component);
|
|
49628
47801
|
|
|
49629
47802
|
var _super = _createSuper$1$1(ScrollLock);
|
|
49630
47803
|
|
|
49631
47804
|
function ScrollLock() {
|
|
49632
47805
|
var _this;
|
|
49633
47806
|
|
|
49634
|
-
_classCallCheck
|
|
47807
|
+
_classCallCheck(this, ScrollLock);
|
|
49635
47808
|
|
|
49636
47809
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
49637
47810
|
args[_key] = arguments[_key];
|
|
@@ -49646,7 +47819,7 @@
|
|
|
49646
47819
|
return _this;
|
|
49647
47820
|
}
|
|
49648
47821
|
|
|
49649
|
-
_createClass
|
|
47822
|
+
_createClass(ScrollLock, [{
|
|
49650
47823
|
key: "componentDidMount",
|
|
49651
47824
|
value: function componentDidMount() {
|
|
49652
47825
|
var _this2 = this;
|
|
@@ -49748,7 +47921,7 @@
|
|
|
49748
47921
|
|
|
49749
47922
|
function _EMOTION_STRINGIFIED_CSS_ERROR__$1() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
49750
47923
|
|
|
49751
|
-
function _createSuper$2$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2$1(); return function _createSuperInternal() { var Super = _getPrototypeOf
|
|
47924
|
+
function _createSuper$2$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
49752
47925
|
|
|
49753
47926
|
function _isNativeReflectConstruct$2$1() { 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; } }
|
|
49754
47927
|
|
|
@@ -49767,14 +47940,14 @@
|
|
|
49767
47940
|
// - createRef() https://reactjs.org/docs/react-api.html#reactcreateref
|
|
49768
47941
|
// - forwardRef() https://reactjs.org/docs/react-api.html#reactforwardref
|
|
49769
47942
|
var ScrollBlock = /*#__PURE__*/function (_PureComponent) {
|
|
49770
|
-
_inherits
|
|
47943
|
+
_inherits(ScrollBlock, _PureComponent);
|
|
49771
47944
|
|
|
49772
47945
|
var _super = _createSuper$2$1(ScrollBlock);
|
|
49773
47946
|
|
|
49774
47947
|
function ScrollBlock() {
|
|
49775
47948
|
var _this;
|
|
49776
47949
|
|
|
49777
|
-
_classCallCheck
|
|
47950
|
+
_classCallCheck(this, ScrollBlock);
|
|
49778
47951
|
|
|
49779
47952
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
49780
47953
|
args[_key] = arguments[_key];
|
|
@@ -49802,7 +47975,7 @@
|
|
|
49802
47975
|
return _this;
|
|
49803
47976
|
}
|
|
49804
47977
|
|
|
49805
|
-
_createClass
|
|
47978
|
+
_createClass(ScrollBlock, [{
|
|
49806
47979
|
key: "render",
|
|
49807
47980
|
value: function render() {
|
|
49808
47981
|
var _this$props = this.props,
|
|
@@ -49838,19 +48011,19 @@
|
|
|
49838
48011
|
return ScrollBlock;
|
|
49839
48012
|
}(React.PureComponent);
|
|
49840
48013
|
|
|
49841
|
-
function _createSuper$3(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$3(); return function _createSuperInternal() { var Super = _getPrototypeOf
|
|
48014
|
+
function _createSuper$3(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$3(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
49842
48015
|
|
|
49843
48016
|
function _isNativeReflectConstruct$3() { 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; } }
|
|
49844
48017
|
|
|
49845
48018
|
var ScrollCaptor = /*#__PURE__*/function (_Component) {
|
|
49846
|
-
_inherits
|
|
48019
|
+
_inherits(ScrollCaptor, _Component);
|
|
49847
48020
|
|
|
49848
48021
|
var _super = _createSuper$3(ScrollCaptor);
|
|
49849
48022
|
|
|
49850
48023
|
function ScrollCaptor() {
|
|
49851
48024
|
var _this;
|
|
49852
48025
|
|
|
49853
|
-
_classCallCheck
|
|
48026
|
+
_classCallCheck(this, ScrollCaptor);
|
|
49854
48027
|
|
|
49855
48028
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
49856
48029
|
args[_key] = arguments[_key];
|
|
@@ -49939,7 +48112,7 @@
|
|
|
49939
48112
|
return _this;
|
|
49940
48113
|
}
|
|
49941
48114
|
|
|
49942
|
-
_createClass
|
|
48115
|
+
_createClass(ScrollCaptor, [{
|
|
49943
48116
|
key: "componentDidMount",
|
|
49944
48117
|
value: function componentDidMount() {
|
|
49945
48118
|
this.startListening(this.scrollTarget);
|
|
@@ -50132,9 +48305,9 @@
|
|
|
50132
48305
|
|
|
50133
48306
|
function ownKeys$2(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; }
|
|
50134
48307
|
|
|
50135
|
-
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$2(Object(source), true).forEach(function (key) { _defineProperty
|
|
48308
|
+
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$2(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
50136
48309
|
|
|
50137
|
-
function _createSuper$4(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$4(); return function _createSuperInternal() { var Super = _getPrototypeOf
|
|
48310
|
+
function _createSuper$4(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$4(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
50138
48311
|
|
|
50139
48312
|
function _isNativeReflectConstruct$4() { 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; } }
|
|
50140
48313
|
var defaultProps$2 = {
|
|
@@ -50185,7 +48358,7 @@
|
|
|
50185
48358
|
var instanceId = 1;
|
|
50186
48359
|
|
|
50187
48360
|
var Select = /*#__PURE__*/function (_Component) {
|
|
50188
|
-
_inherits
|
|
48361
|
+
_inherits(Select, _Component);
|
|
50189
48362
|
|
|
50190
48363
|
var _super = _createSuper$4(Select);
|
|
50191
48364
|
|
|
@@ -50199,7 +48372,7 @@
|
|
|
50199
48372
|
function Select(_props) {
|
|
50200
48373
|
var _this;
|
|
50201
48374
|
|
|
50202
|
-
_classCallCheck
|
|
48375
|
+
_classCallCheck(this, Select);
|
|
50203
48376
|
|
|
50204
48377
|
_this = _super.call(this, _props);
|
|
50205
48378
|
_this.state = {
|
|
@@ -50986,7 +49159,7 @@
|
|
|
50986
49159
|
};
|
|
50987
49160
|
|
|
50988
49161
|
var _value = _props.value;
|
|
50989
|
-
_this.cacheComponents = memoizeOne(_this.cacheComponents, exportedEqual).bind(_assertThisInitialized$
|
|
49162
|
+
_this.cacheComponents = memoizeOne(_this.cacheComponents, exportedEqual).bind(_assertThisInitialized$1(_this));
|
|
50990
49163
|
|
|
50991
49164
|
_this.cacheComponents(_props.components);
|
|
50992
49165
|
|
|
@@ -51006,7 +49179,7 @@
|
|
|
51006
49179
|
lastSelectValue = _ref9[1];
|
|
51007
49180
|
|
|
51008
49181
|
return newSelectValue === lastSelectValue && newProps.inputValue === lastProps.inputValue && newProps.options === lastProps.options;
|
|
51009
|
-
}).bind(_assertThisInitialized$
|
|
49182
|
+
}).bind(_assertThisInitialized$1(_this));
|
|
51010
49183
|
|
|
51011
49184
|
var _menuOptions = _props.menuIsOpen ? _this.buildMenuOptions(_props, _selectValue) : {
|
|
51012
49185
|
render: [],
|
|
@@ -51018,7 +49191,7 @@
|
|
|
51018
49191
|
return _this;
|
|
51019
49192
|
}
|
|
51020
49193
|
|
|
51021
|
-
_createClass
|
|
49194
|
+
_createClass(Select, [{
|
|
51022
49195
|
key: "componentDidMount",
|
|
51023
49196
|
value: function componentDidMount() {
|
|
51024
49197
|
this.startListeningComposition();
|
|
@@ -51987,7 +50160,7 @@
|
|
|
51987
50160
|
|
|
51988
50161
|
Select.defaultProps = defaultProps$2;
|
|
51989
50162
|
|
|
51990
|
-
function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf
|
|
50163
|
+
function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
51991
50164
|
|
|
51992
50165
|
function _isNativeReflectConstruct$1() { 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; } }
|
|
51993
50166
|
var defaultProps$1 = {
|
|
@@ -52000,14 +50173,14 @@
|
|
|
52000
50173
|
var _class, _temp;
|
|
52001
50174
|
|
|
52002
50175
|
return _temp = _class = /*#__PURE__*/function (_Component) {
|
|
52003
|
-
_inherits
|
|
50176
|
+
_inherits(StateManager, _Component);
|
|
52004
50177
|
|
|
52005
50178
|
var _super = _createSuper$1(StateManager);
|
|
52006
50179
|
|
|
52007
50180
|
function StateManager() {
|
|
52008
50181
|
var _this;
|
|
52009
50182
|
|
|
52010
|
-
_classCallCheck
|
|
50183
|
+
_classCallCheck(this, StateManager);
|
|
52011
50184
|
|
|
52012
50185
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
52013
50186
|
args[_key] = arguments[_key];
|
|
@@ -52058,7 +50231,7 @@
|
|
|
52058
50231
|
return _this;
|
|
52059
50232
|
}
|
|
52060
50233
|
|
|
52061
|
-
_createClass
|
|
50234
|
+
_createClass(StateManager, [{
|
|
52062
50235
|
key: "focus",
|
|
52063
50236
|
value: function focus() {
|
|
52064
50237
|
this.select.focus();
|
|
@@ -52118,7 +50291,7 @@
|
|
|
52118
50291
|
}(React.Component), _class.defaultProps = defaultProps$1, _temp;
|
|
52119
50292
|
};
|
|
52120
50293
|
|
|
52121
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf
|
|
50294
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
52122
50295
|
|
|
52123
50296
|
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; } }
|
|
52124
50297
|
var defaultProps = {
|
|
@@ -52131,14 +50304,14 @@
|
|
|
52131
50304
|
var _class, _temp;
|
|
52132
50305
|
|
|
52133
50306
|
return _temp = _class = /*#__PURE__*/function (_Component) {
|
|
52134
|
-
_inherits
|
|
50307
|
+
_inherits(Async, _Component);
|
|
52135
50308
|
|
|
52136
50309
|
var _super = _createSuper(Async);
|
|
52137
50310
|
|
|
52138
50311
|
function Async(props) {
|
|
52139
50312
|
var _this;
|
|
52140
50313
|
|
|
52141
|
-
_classCallCheck
|
|
50314
|
+
_classCallCheck(this, Async);
|
|
52142
50315
|
|
|
52143
50316
|
_this = _super.call(this);
|
|
52144
50317
|
_this.select = void 0;
|
|
@@ -52216,7 +50389,7 @@
|
|
|
52216
50389
|
return _this;
|
|
52217
50390
|
}
|
|
52218
50391
|
|
|
52219
|
-
_createClass
|
|
50392
|
+
_createClass(Async, [{
|
|
52220
50393
|
key: "componentDidMount",
|
|
52221
50394
|
value: function componentDidMount() {
|
|
52222
50395
|
var _this2 = this;
|
|
@@ -52637,6 +50810,7 @@
|
|
|
52637
50810
|
}, title)), !hideCloseButton && /*#__PURE__*/React__default['default'].createElement(Box, {
|
|
52638
50811
|
marginLeft: "x2"
|
|
52639
50812
|
}, /*#__PURE__*/React__default['default'].createElement(IconicButton, {
|
|
50813
|
+
type: "button",
|
|
52640
50814
|
ref: closeButton,
|
|
52641
50815
|
icon: "close",
|
|
52642
50816
|
onClick: onClose,
|
|
@@ -52763,6 +50937,7 @@
|
|
|
52763
50937
|
exports.ApplicationFrame = ApplicationFrame;
|
|
52764
50938
|
exports.AsyncSelect = AsyncSelect;
|
|
52765
50939
|
exports.Box = Box;
|
|
50940
|
+
exports.BrandLogoContainer = BrandLogoContainer;
|
|
52766
50941
|
exports.BrandedNavBar = NavBar;
|
|
52767
50942
|
exports.Branding = Branding;
|
|
52768
50943
|
exports.Breadcrumbs = Breadcrumbs;
|
|
@@ -52776,12 +50951,14 @@
|
|
|
52776
50951
|
exports.DangerButton = DangerButton;
|
|
52777
50952
|
exports.DatePicker = DatePicker;
|
|
52778
50953
|
exports.DateRange = DateRange;
|
|
50954
|
+
exports.DesktopMenu = DesktopMenu;
|
|
52779
50955
|
exports.Divider = Divider;
|
|
52780
50956
|
exports.DropdownButton = DropdownButton;
|
|
52781
50957
|
exports.DropdownItem = DropdownItem;
|
|
52782
50958
|
exports.DropdownLink = DropdownLink;
|
|
52783
50959
|
exports.DropdownMenu = DropdownMenu;
|
|
52784
50960
|
exports.DropdownText = DropdownText;
|
|
50961
|
+
exports.EnvironmentBanner = EnvironmentBanner;
|
|
52785
50962
|
exports.Field = Field;
|
|
52786
50963
|
exports.FieldLabel = FieldLabel;
|
|
52787
50964
|
exports.Fieldset = Fieldset;
|
|
@@ -52802,9 +50979,11 @@
|
|
|
52802
50979
|
exports.List = List;
|
|
52803
50980
|
exports.ListItem = ListItem;
|
|
52804
50981
|
exports.LoadingAnimation = LoadingAnimation;
|
|
50982
|
+
exports.MenuTrigger = MenuTrigger;
|
|
52805
50983
|
exports.Modal = Modal;
|
|
52806
50984
|
exports.NDSProvider = NDSProvider;
|
|
52807
50985
|
exports.NavBar = NavBar$1;
|
|
50986
|
+
exports.NavBarBackground = NavBarBackground;
|
|
52808
50987
|
exports.Overlay = Overlay;
|
|
52809
50988
|
exports.Page = Page;
|
|
52810
50989
|
exports.Pagination = Pagination;
|
|
@@ -52824,6 +51003,7 @@
|
|
|
52824
51003
|
exports.SelectMultiValue = SelectMultiValue;
|
|
52825
51004
|
exports.SelectOption = SelectOption;
|
|
52826
51005
|
exports.Sidebar = Sidebar;
|
|
51006
|
+
exports.SmallNavBar = SmallNavBar;
|
|
52827
51007
|
exports.SortingTable = SortingTable;
|
|
52828
51008
|
exports.StatusIndicator = StatusIndicator;
|
|
52829
51009
|
exports.Switch = Switch;
|