@quintype/arrow 3.15.1-perf.3 → 3.15.1-perf.4
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/atoms/Author/index.js +14 -2103
- package/atoms/Author/styles.arrow.css +1 -1
- package/atoms/AuthorWithTime/index.js +32 -2482
- package/atoms/AuthorWithTime/styles.arrow.css +1 -1
- package/atoms/CollectionName/index.js +12 -2101
- package/atoms/CollectionName/styles.arrow.css +1 -1
- package/atoms/ExtendedLoadMore/{index-b22f1843.js → index-0f809dd9.js} +10 -7
- package/atoms/ExtendedLoadMore/index-142f015c.js +476 -0
- package/atoms/ExtendedLoadMore/{index-bc129cb8.js → index-37a9ccff.js} +18 -10
- package/atoms/ExtendedLoadMore/{index-6e083738.js → index-446679c8.js} +20 -12
- package/atoms/ExtendedLoadMore/{index-9e0d32b7.js → index-44f97338.js} +19 -9
- package/atoms/ExtendedLoadMore/{index-b5936059.js → index-57dd4870.js} +15 -7
- package/atoms/ExtendedLoadMore/{index-fee73a14.js → index-66dd4dbd.js} +15 -7
- package/atoms/ExtendedLoadMore/{index-5c8eda4a.js → index-8462c597.js} +21 -16
- package/atoms/ExtendedLoadMore/{index-3c4ac692.js → index-93cb06d1.js} +42 -51
- package/atoms/ExtendedLoadMore/{index-4ddfe28d.js → index-afd44863.js} +6 -4
- package/atoms/ExtendedLoadMore/{index-3976fac4.js → index-b5754c5d.js} +20 -14
- package/atoms/ExtendedLoadMore/{index-a5c95f84.js → index-bbaf526e.js} +16 -8
- package/atoms/ExtendedLoadMore/{index-6ecceae4.js → index-cfb262ef.js} +18 -9
- package/atoms/ExtendedLoadMore/index.js +8 -1
- package/atoms/ExtendedLoadMore/styles.arrow.css +1 -1
- package/atoms/Headline/index.js +14 -2103
- package/atoms/Headline/styles.arrow.css +1 -1
- package/atoms/HeroImage/index.js +22 -2170
- package/atoms/HeroImage/styles.arrow.css +1 -1
- package/atoms/LoadmoreButton/index.js +12 -2114
- package/atoms/LoadmoreButton/styles.arrow.css +1 -1
- package/atoms/ScrollSnap/index.js +17 -2178
- package/atoms/ScrollSnap/styles.arrow.css +1 -1
- package/atoms/SectionTag/index.js +10 -2099
- package/atoms/SectionTag/styles.arrow.css +1 -1
- package/atoms/Subheadline/index.js +8 -2097
- package/atoms/Subheadline/styles.arrow.css +1 -1
- package/atoms/TimeStamp/index.js +13 -2463
- package/atoms/TimeStamp/styles.arrow.css +1 -1
- package/molecules/KeyEvents/index.js +23 -2545
- package/molecules/KeyEvents/styles.arrow.css +1 -1
- package/molecules/PageIntroductionCard/index.js +17 -2454
- package/molecules/PageIntroductionCard/styles.arrow.css +1 -1
- package/molecules/SocialShareTemplate/index.js +144 -2740
- package/molecules/SocialShareTemplate/styles.arrow.css +1 -1
- package/molecules/StoryCard/index.js +64 -2582
- package/molecules/StoryCard/styles.arrow.css +1 -1
- package/molecules/StoryElementCard/index.js +123 -2893
- package/molecules/StoryElementCard/styles.arrow.css +1 -1
- package/molecules/StorycardContent/index.js +45 -2495
- package/molecules/StorycardContent/styles.arrow.css +1 -1
- package/package.json +1 -1
- package/rows/AlternateCollectionFilter/index.js +92 -2659
- package/rows/AlternateCollectionFilter/styles.arrow.css +1 -1
- package/rows/AsideCollection/index.js +92 -2659
- package/rows/AsideCollection/styles.arrow.css +1 -1
- package/rows/AstrologyCollection/index.js +89 -2656
- package/rows/AstrologyCollection/styles.arrow.css +1 -1
- package/rows/AuthorIntroductionCard/index.js +27 -2743
- package/rows/AuthorIntroductionCard/styles.arrow.css +1 -1
- package/rows/AuthorsList/index.js +34 -2763
- package/rows/AuthorsList/styles.arrow.css +1 -1
- package/rows/CollectionFilter/index.js +91 -2658
- package/rows/CollectionFilter/styles.arrow.css +1 -1
- package/rows/ElevenStories/index.js +81 -2612
- package/rows/ElevenStories/styles.arrow.css +1 -1
- package/rows/FourColFiveStories/index.js +75 -2603
- package/rows/FourColFiveStories/styles.arrow.css +1 -1
- package/rows/FourColGrid/index.js +92 -2623
- package/rows/FourColGrid/styles.arrow.css +1 -1
- package/rows/FourColPortraitStories/index.js +91 -2622
- package/rows/FourColPortraitStories/styles.arrow.css +1 -1
- package/rows/FourColSixteenStories/index.js +80 -2617
- package/rows/FourColSixteenStories/styles.arrow.css +1 -1
- package/rows/FourColTwelveStories/index.js +72 -2596
- package/rows/FourColTwelveStories/styles.arrow.css +1 -1
- package/rows/FourStorySlider/index.js +84 -2615
- package/rows/FourStorySlider/styles.arrow.css +1 -1
- package/rows/FourStorySliderPortrait/index.js +84 -2615
- package/rows/FourStorySliderPortrait/styles.arrow.css +1 -1
- package/rows/FourTabbedBigStorySlider/index.js +80 -2611
- package/rows/FourTabbedBigStorySlider/styles.arrow.css +1 -1
- package/rows/FullScreenSlider/index.js +85 -2616
- package/rows/FullScreenSlider/styles.arrow.css +1 -1
- package/rows/HalfScreenSlider/index.js +81 -2612
- package/rows/HalfScreenSlider/styles.arrow.css +1 -1
- package/rows/ListComponent/index.js +75 -2606
- package/rows/ListComponent/styles.arrow.css +1 -1
- package/rows/Listicles/index.js +38 -2235
- package/rows/Listicles/styles.arrow.css +1 -1
- package/rows/MagazineEditions/index.js +24 -2487
- package/rows/MagazineEditions/styles.arrow.css +1 -1
- package/rows/MagazineHeaderCard/index.js +26 -2489
- package/rows/MagazineHeaderCard/styles.arrow.css +1 -1
- package/rows/MagazineWidget/index.js +81 -2612
- package/rows/MagazineWidget/styles.arrow.css +1 -1
- package/rows/OneColStoryList/index.js +92 -2623
- package/rows/OneColStoryList/styles.arrow.css +1 -1
- package/rows/OpinionCollection/index.js +61 -2583
- package/rows/OpinionCollection/styles.arrow.css +1 -1
- package/rows/SixColSixStories/index.js +91 -2622
- package/rows/SixColSixStories/styles.arrow.css +1 -1
- package/rows/StoryCollection/index.js +92 -2659
- package/rows/StoryCollection/styles.arrow.css +1 -1
- package/rows/TagIntroductionCard/index.js +9 -1816
- package/rows/TagIntroductionCard/styles.arrow.css +1 -1
- package/rows/ThreeColFlexStories/index.js +91 -2622
- package/rows/ThreeColFlexStories/styles.arrow.css +1 -1
- package/rows/ThreeColFourteenStories/index.js +72 -2596
- package/rows/ThreeColFourteenStories/styles.arrow.css +1 -1
- package/rows/ThreeColGrid/index.js +94 -2625
- package/rows/ThreeColGrid/styles.arrow.css +1 -1
- package/rows/ThreeColSevenStory/index.js +84 -2615
- package/rows/ThreeColSevenStory/styles.arrow.css +1 -1
- package/rows/ThreeColSixStories/index.js +76 -2607
- package/rows/ThreeColSixStories/styles.arrow.css +1 -1
- package/rows/ThreeColTwelveStories/index.js +80 -2617
- package/rows/ThreeColTwelveStories/styles.arrow.css +1 -1
- package/rows/TwoColFourStories/index.js +78 -2609
- package/rows/TwoColFourStories/styles.arrow.css +1 -1
- package/rows/TwoColFourStoryHighlight/index.js +80 -2617
- package/rows/TwoColFourStoryHighlight/styles.arrow.css +1 -1
- package/rows/TwoColSevenStories/index.js +77 -2608
- package/rows/TwoColSevenStories/styles.arrow.css +1 -1
- package/rows/TwoColSixStories/index.js +82 -2619
- package/rows/TwoColSixStories/styles.arrow.css +1 -1
- package/rows/TwoColTenStoriesSidebar/index.js +79 -2610
- package/rows/TwoColTenStoriesSidebar/styles.arrow.css +1 -1
- package/rows/TwoColThreeStories/index.js +75 -2606
- package/rows/TwoColThreeStories/styles.arrow.css +1 -1
- package/story-elements/AlsoRead/index.js +24 -2170
- package/story-elements/AlsoRead/styles.arrow.css +1 -1
- package/story-elements/Attachment/index.js +15 -1870
- package/story-elements/Attachment/styles.arrow.css +1 -1
- package/story-elements/BigFact/index.js +16 -1871
- package/story-elements/BigFact/styles.arrow.css +1 -1
- package/story-elements/BlockQuote/index.js +20 -2157
- package/story-elements/BlockQuote/styles.arrow.css +1 -1
- package/story-elements/Blurb/index.js +18 -1932
- package/story-elements/Blurb/styles.arrow.css +1 -1
- package/story-elements/Image/index.js +42 -2251
- package/story-elements/Image/styles.arrow.css +1 -1
- package/story-elements/ImageGallery/index.js +45 -2254
- package/story-elements/ImageGallery/styles.arrow.css +1 -1
- package/story-elements/ImageSlideshow/index.js +48 -2257
- package/story-elements/ImageSlideshow/styles.arrow.css +1 -1
- package/story-elements/QuestionAnswer/index.js +26 -2163
- package/story-elements/QuestionAnswer/styles.arrow.css +1 -1
- package/story-elements/Quote/index.js +17 -1872
- package/story-elements/Quote/styles.arrow.css +1 -1
- package/story-elements/Reference/index.js +15 -1870
- package/story-elements/Reference/styles.arrow.css +1 -1
- package/story-elements/StoryElement/index.js +12 -1725
- package/story-elements/Summary/index.js +18 -1873
- package/story-elements/Summary/styles.arrow.css +1 -1
- package/story-elements/Text/index.js +16 -2153
- package/story-elements/Text/styles.arrow.css +1 -1
- package/story-elements/Video/index.js +12 -1725
- package/story-elements/Video/styles.arrow.css +1 -1
- package/story-templates/ListicleStoryTemplate/index.js +282 -3167
- package/story-templates/ListicleStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/LiveBlogStoryTemplate/index.js +504 -3389
- package/story-templates/LiveBlogStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/PhotoStoryTemplate/index.js +287 -3172
- package/story-templates/PhotoStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/TextStoryTemplate/index.js +416 -3301
- package/story-templates/TextStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/VideoStoryTemplate/index.js +382 -3267
- package/story-templates/VideoStoryTemplate/styles.arrow.css +1 -1
- package/atoms/ExtendedLoadMore/index-e7cde739.js +0 -3051
|
@@ -4,1355 +4,27 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var PropTypes = require('prop-types');
|
|
7
|
+
var lodash = require('lodash');
|
|
7
8
|
var components = require('@quintype/components');
|
|
9
|
+
var _getClassName = require('babel-plugin-react-css-modules/dist/browser/getClassName');
|
|
8
10
|
var reactRedux = require('react-redux');
|
|
11
|
+
require('@babel/runtime/helpers/asyncToGenerator');
|
|
12
|
+
var _typeof = require('@babel/runtime/helpers/typeof');
|
|
13
|
+
require('@babel/runtime/regenerator');
|
|
9
14
|
var Timeago = require('react-timeago');
|
|
10
15
|
var dateFnsTz = require('date-fns-tz');
|
|
16
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
17
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
11
18
|
|
|
12
19
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
20
|
|
|
14
21
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
15
22
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
23
|
+
var _getClassName__default = /*#__PURE__*/_interopDefaultLegacy(_getClassName);
|
|
24
|
+
var _typeof__default = /*#__PURE__*/_interopDefaultLegacy(_typeof);
|
|
16
25
|
var Timeago__default = /*#__PURE__*/_interopDefaultLegacy(Timeago);
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
* Checks if `value` is classified as an `Array` object.
|
|
20
|
-
*
|
|
21
|
-
* @static
|
|
22
|
-
* @memberOf _
|
|
23
|
-
* @since 0.1.0
|
|
24
|
-
* @category Lang
|
|
25
|
-
* @param {*} value The value to check.
|
|
26
|
-
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
27
|
-
* @example
|
|
28
|
-
*
|
|
29
|
-
* _.isArray([1, 2, 3]);
|
|
30
|
-
* // => true
|
|
31
|
-
*
|
|
32
|
-
* _.isArray(document.body.children);
|
|
33
|
-
* // => false
|
|
34
|
-
*
|
|
35
|
-
* _.isArray('abc');
|
|
36
|
-
* // => false
|
|
37
|
-
*
|
|
38
|
-
* _.isArray(_.noop);
|
|
39
|
-
* // => false
|
|
40
|
-
*/
|
|
41
|
-
var isArray = Array.isArray;
|
|
42
|
-
|
|
43
|
-
var isArray_1 = isArray;
|
|
44
|
-
|
|
45
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
46
|
-
|
|
47
|
-
function getDefaultExportFromCjs (x) {
|
|
48
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function createCommonjsModule(fn) {
|
|
52
|
-
var module = { exports: {} };
|
|
53
|
-
return fn(module, module.exports), module.exports;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/** Detect free variable `global` from Node.js. */
|
|
57
|
-
|
|
58
|
-
var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
59
|
-
|
|
60
|
-
var _freeGlobal = freeGlobal;
|
|
61
|
-
|
|
62
|
-
/** Detect free variable `self`. */
|
|
63
|
-
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
64
|
-
|
|
65
|
-
/** Used as a reference to the global object. */
|
|
66
|
-
var root = _freeGlobal || freeSelf || Function('return this')();
|
|
67
|
-
|
|
68
|
-
var _root = root;
|
|
69
|
-
|
|
70
|
-
/** Built-in value references. */
|
|
71
|
-
var Symbol$1 = _root.Symbol;
|
|
72
|
-
|
|
73
|
-
var _Symbol = Symbol$1;
|
|
74
|
-
|
|
75
|
-
/** Used for built-in method references. */
|
|
76
|
-
var objectProto$4 = Object.prototype;
|
|
77
|
-
|
|
78
|
-
/** Used to check objects for own properties. */
|
|
79
|
-
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Used to resolve the
|
|
83
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
84
|
-
* of values.
|
|
85
|
-
*/
|
|
86
|
-
var nativeObjectToString$1 = objectProto$4.toString;
|
|
87
|
-
|
|
88
|
-
/** Built-in value references. */
|
|
89
|
-
var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
93
|
-
*
|
|
94
|
-
* @private
|
|
95
|
-
* @param {*} value The value to query.
|
|
96
|
-
* @returns {string} Returns the raw `toStringTag`.
|
|
97
|
-
*/
|
|
98
|
-
function getRawTag(value) {
|
|
99
|
-
var isOwn = hasOwnProperty$3.call(value, symToStringTag$1),
|
|
100
|
-
tag = value[symToStringTag$1];
|
|
101
|
-
|
|
102
|
-
try {
|
|
103
|
-
value[symToStringTag$1] = undefined;
|
|
104
|
-
var unmasked = true;
|
|
105
|
-
} catch (e) {}
|
|
106
|
-
|
|
107
|
-
var result = nativeObjectToString$1.call(value);
|
|
108
|
-
if (unmasked) {
|
|
109
|
-
if (isOwn) {
|
|
110
|
-
value[symToStringTag$1] = tag;
|
|
111
|
-
} else {
|
|
112
|
-
delete value[symToStringTag$1];
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
return result;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
var _getRawTag = getRawTag;
|
|
119
|
-
|
|
120
|
-
/** Used for built-in method references. */
|
|
121
|
-
var objectProto$3 = Object.prototype;
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* Used to resolve the
|
|
125
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
126
|
-
* of values.
|
|
127
|
-
*/
|
|
128
|
-
var nativeObjectToString = objectProto$3.toString;
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* Converts `value` to a string using `Object.prototype.toString`.
|
|
132
|
-
*
|
|
133
|
-
* @private
|
|
134
|
-
* @param {*} value The value to convert.
|
|
135
|
-
* @returns {string} Returns the converted string.
|
|
136
|
-
*/
|
|
137
|
-
function objectToString(value) {
|
|
138
|
-
return nativeObjectToString.call(value);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
var _objectToString = objectToString;
|
|
142
|
-
|
|
143
|
-
/** `Object#toString` result references. */
|
|
144
|
-
var nullTag = '[object Null]',
|
|
145
|
-
undefinedTag = '[object Undefined]';
|
|
146
|
-
|
|
147
|
-
/** Built-in value references. */
|
|
148
|
-
var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
152
|
-
*
|
|
153
|
-
* @private
|
|
154
|
-
* @param {*} value The value to query.
|
|
155
|
-
* @returns {string} Returns the `toStringTag`.
|
|
156
|
-
*/
|
|
157
|
-
function baseGetTag(value) {
|
|
158
|
-
if (value == null) {
|
|
159
|
-
return value === undefined ? undefinedTag : nullTag;
|
|
160
|
-
}
|
|
161
|
-
return (symToStringTag && symToStringTag in Object(value))
|
|
162
|
-
? _getRawTag(value)
|
|
163
|
-
: _objectToString(value);
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
var _baseGetTag = baseGetTag;
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
170
|
-
* and has a `typeof` result of "object".
|
|
171
|
-
*
|
|
172
|
-
* @static
|
|
173
|
-
* @memberOf _
|
|
174
|
-
* @since 4.0.0
|
|
175
|
-
* @category Lang
|
|
176
|
-
* @param {*} value The value to check.
|
|
177
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
178
|
-
* @example
|
|
179
|
-
*
|
|
180
|
-
* _.isObjectLike({});
|
|
181
|
-
* // => true
|
|
182
|
-
*
|
|
183
|
-
* _.isObjectLike([1, 2, 3]);
|
|
184
|
-
* // => true
|
|
185
|
-
*
|
|
186
|
-
* _.isObjectLike(_.noop);
|
|
187
|
-
* // => false
|
|
188
|
-
*
|
|
189
|
-
* _.isObjectLike(null);
|
|
190
|
-
* // => false
|
|
191
|
-
*/
|
|
192
|
-
function isObjectLike(value) {
|
|
193
|
-
return value != null && typeof value == 'object';
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
var isObjectLike_1 = isObjectLike;
|
|
197
|
-
|
|
198
|
-
/** `Object#toString` result references. */
|
|
199
|
-
var symbolTag = '[object Symbol]';
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
203
|
-
*
|
|
204
|
-
* @static
|
|
205
|
-
* @memberOf _
|
|
206
|
-
* @since 4.0.0
|
|
207
|
-
* @category Lang
|
|
208
|
-
* @param {*} value The value to check.
|
|
209
|
-
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
210
|
-
* @example
|
|
211
|
-
*
|
|
212
|
-
* _.isSymbol(Symbol.iterator);
|
|
213
|
-
* // => true
|
|
214
|
-
*
|
|
215
|
-
* _.isSymbol('abc');
|
|
216
|
-
* // => false
|
|
217
|
-
*/
|
|
218
|
-
function isSymbol(value) {
|
|
219
|
-
return typeof value == 'symbol' ||
|
|
220
|
-
(isObjectLike_1(value) && _baseGetTag(value) == symbolTag);
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
var isSymbol_1 = isSymbol;
|
|
224
|
-
|
|
225
|
-
/** Used to match property names within property paths. */
|
|
226
|
-
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
|
227
|
-
reIsPlainProp = /^\w*$/;
|
|
228
|
-
|
|
229
|
-
/**
|
|
230
|
-
* Checks if `value` is a property name and not a property path.
|
|
231
|
-
*
|
|
232
|
-
* @private
|
|
233
|
-
* @param {*} value The value to check.
|
|
234
|
-
* @param {Object} [object] The object to query keys on.
|
|
235
|
-
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
|
236
|
-
*/
|
|
237
|
-
function isKey(value, object) {
|
|
238
|
-
if (isArray_1(value)) {
|
|
239
|
-
return false;
|
|
240
|
-
}
|
|
241
|
-
var type = typeof value;
|
|
242
|
-
if (type == 'number' || type == 'symbol' || type == 'boolean' ||
|
|
243
|
-
value == null || isSymbol_1(value)) {
|
|
244
|
-
return true;
|
|
245
|
-
}
|
|
246
|
-
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
|
|
247
|
-
(object != null && value in Object(object));
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
var _isKey = isKey;
|
|
251
|
-
|
|
252
|
-
/**
|
|
253
|
-
* Checks if `value` is the
|
|
254
|
-
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
255
|
-
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
256
|
-
*
|
|
257
|
-
* @static
|
|
258
|
-
* @memberOf _
|
|
259
|
-
* @since 0.1.0
|
|
260
|
-
* @category Lang
|
|
261
|
-
* @param {*} value The value to check.
|
|
262
|
-
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
263
|
-
* @example
|
|
264
|
-
*
|
|
265
|
-
* _.isObject({});
|
|
266
|
-
* // => true
|
|
267
|
-
*
|
|
268
|
-
* _.isObject([1, 2, 3]);
|
|
269
|
-
* // => true
|
|
270
|
-
*
|
|
271
|
-
* _.isObject(_.noop);
|
|
272
|
-
* // => true
|
|
273
|
-
*
|
|
274
|
-
* _.isObject(null);
|
|
275
|
-
* // => false
|
|
276
|
-
*/
|
|
277
|
-
function isObject(value) {
|
|
278
|
-
var type = typeof value;
|
|
279
|
-
return value != null && (type == 'object' || type == 'function');
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
var isObject_1 = isObject;
|
|
283
|
-
|
|
284
|
-
/** `Object#toString` result references. */
|
|
285
|
-
var asyncTag = '[object AsyncFunction]',
|
|
286
|
-
funcTag = '[object Function]',
|
|
287
|
-
genTag = '[object GeneratorFunction]',
|
|
288
|
-
proxyTag = '[object Proxy]';
|
|
289
|
-
|
|
290
|
-
/**
|
|
291
|
-
* Checks if `value` is classified as a `Function` object.
|
|
292
|
-
*
|
|
293
|
-
* @static
|
|
294
|
-
* @memberOf _
|
|
295
|
-
* @since 0.1.0
|
|
296
|
-
* @category Lang
|
|
297
|
-
* @param {*} value The value to check.
|
|
298
|
-
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
|
299
|
-
* @example
|
|
300
|
-
*
|
|
301
|
-
* _.isFunction(_);
|
|
302
|
-
* // => true
|
|
303
|
-
*
|
|
304
|
-
* _.isFunction(/abc/);
|
|
305
|
-
* // => false
|
|
306
|
-
*/
|
|
307
|
-
function isFunction(value) {
|
|
308
|
-
if (!isObject_1(value)) {
|
|
309
|
-
return false;
|
|
310
|
-
}
|
|
311
|
-
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
312
|
-
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
|
313
|
-
var tag = _baseGetTag(value);
|
|
314
|
-
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
var isFunction_1 = isFunction;
|
|
318
|
-
|
|
319
|
-
/** Used to detect overreaching core-js shims. */
|
|
320
|
-
var coreJsData = _root['__core-js_shared__'];
|
|
321
|
-
|
|
322
|
-
var _coreJsData = coreJsData;
|
|
323
|
-
|
|
324
|
-
/** Used to detect methods masquerading as native. */
|
|
325
|
-
var maskSrcKey = (function() {
|
|
326
|
-
var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');
|
|
327
|
-
return uid ? ('Symbol(src)_1.' + uid) : '';
|
|
328
|
-
}());
|
|
329
|
-
|
|
330
|
-
/**
|
|
331
|
-
* Checks if `func` has its source masked.
|
|
332
|
-
*
|
|
333
|
-
* @private
|
|
334
|
-
* @param {Function} func The function to check.
|
|
335
|
-
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
|
336
|
-
*/
|
|
337
|
-
function isMasked(func) {
|
|
338
|
-
return !!maskSrcKey && (maskSrcKey in func);
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
var _isMasked = isMasked;
|
|
342
|
-
|
|
343
|
-
/** Used for built-in method references. */
|
|
344
|
-
var funcProto$1 = Function.prototype;
|
|
345
|
-
|
|
346
|
-
/** Used to resolve the decompiled source of functions. */
|
|
347
|
-
var funcToString$1 = funcProto$1.toString;
|
|
348
|
-
|
|
349
|
-
/**
|
|
350
|
-
* Converts `func` to its source code.
|
|
351
|
-
*
|
|
352
|
-
* @private
|
|
353
|
-
* @param {Function} func The function to convert.
|
|
354
|
-
* @returns {string} Returns the source code.
|
|
355
|
-
*/
|
|
356
|
-
function toSource(func) {
|
|
357
|
-
if (func != null) {
|
|
358
|
-
try {
|
|
359
|
-
return funcToString$1.call(func);
|
|
360
|
-
} catch (e) {}
|
|
361
|
-
try {
|
|
362
|
-
return (func + '');
|
|
363
|
-
} catch (e) {}
|
|
364
|
-
}
|
|
365
|
-
return '';
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
var _toSource = toSource;
|
|
369
|
-
|
|
370
|
-
/**
|
|
371
|
-
* Used to match `RegExp`
|
|
372
|
-
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
373
|
-
*/
|
|
374
|
-
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
375
|
-
|
|
376
|
-
/** Used to detect host constructors (Safari). */
|
|
377
|
-
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
378
|
-
|
|
379
|
-
/** Used for built-in method references. */
|
|
380
|
-
var funcProto = Function.prototype,
|
|
381
|
-
objectProto$2 = Object.prototype;
|
|
382
|
-
|
|
383
|
-
/** Used to resolve the decompiled source of functions. */
|
|
384
|
-
var funcToString = funcProto.toString;
|
|
385
|
-
|
|
386
|
-
/** Used to check objects for own properties. */
|
|
387
|
-
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
|
388
|
-
|
|
389
|
-
/** Used to detect if a method is native. */
|
|
390
|
-
var reIsNative = RegExp('^' +
|
|
391
|
-
funcToString.call(hasOwnProperty$2).replace(reRegExpChar, '\\$&')
|
|
392
|
-
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
|
393
|
-
);
|
|
394
|
-
|
|
395
|
-
/**
|
|
396
|
-
* The base implementation of `_.isNative` without bad shim checks.
|
|
397
|
-
*
|
|
398
|
-
* @private
|
|
399
|
-
* @param {*} value The value to check.
|
|
400
|
-
* @returns {boolean} Returns `true` if `value` is a native function,
|
|
401
|
-
* else `false`.
|
|
402
|
-
*/
|
|
403
|
-
function baseIsNative(value) {
|
|
404
|
-
if (!isObject_1(value) || _isMasked(value)) {
|
|
405
|
-
return false;
|
|
406
|
-
}
|
|
407
|
-
var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;
|
|
408
|
-
return pattern.test(_toSource(value));
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
var _baseIsNative = baseIsNative;
|
|
412
|
-
|
|
413
|
-
/**
|
|
414
|
-
* Gets the value at `key` of `object`.
|
|
415
|
-
*
|
|
416
|
-
* @private
|
|
417
|
-
* @param {Object} [object] The object to query.
|
|
418
|
-
* @param {string} key The key of the property to get.
|
|
419
|
-
* @returns {*} Returns the property value.
|
|
420
|
-
*/
|
|
421
|
-
function getValue(object, key) {
|
|
422
|
-
return object == null ? undefined : object[key];
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
var _getValue = getValue;
|
|
426
|
-
|
|
427
|
-
/**
|
|
428
|
-
* Gets the native function at `key` of `object`.
|
|
429
|
-
*
|
|
430
|
-
* @private
|
|
431
|
-
* @param {Object} object The object to query.
|
|
432
|
-
* @param {string} key The key of the method to get.
|
|
433
|
-
* @returns {*} Returns the function if it's native, else `undefined`.
|
|
434
|
-
*/
|
|
435
|
-
function getNative(object, key) {
|
|
436
|
-
var value = _getValue(object, key);
|
|
437
|
-
return _baseIsNative(value) ? value : undefined;
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
var _getNative = getNative;
|
|
441
|
-
|
|
442
|
-
/* Built-in method references that are verified to be native. */
|
|
443
|
-
var nativeCreate = _getNative(Object, 'create');
|
|
444
|
-
|
|
445
|
-
var _nativeCreate = nativeCreate;
|
|
446
|
-
|
|
447
|
-
/**
|
|
448
|
-
* Removes all key-value entries from the hash.
|
|
449
|
-
*
|
|
450
|
-
* @private
|
|
451
|
-
* @name clear
|
|
452
|
-
* @memberOf Hash
|
|
453
|
-
*/
|
|
454
|
-
function hashClear() {
|
|
455
|
-
this.__data__ = _nativeCreate ? _nativeCreate(null) : {};
|
|
456
|
-
this.size = 0;
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
var _hashClear = hashClear;
|
|
460
|
-
|
|
461
|
-
/**
|
|
462
|
-
* Removes `key` and its value from the hash.
|
|
463
|
-
*
|
|
464
|
-
* @private
|
|
465
|
-
* @name delete
|
|
466
|
-
* @memberOf Hash
|
|
467
|
-
* @param {Object} hash The hash to modify.
|
|
468
|
-
* @param {string} key The key of the value to remove.
|
|
469
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
470
|
-
*/
|
|
471
|
-
function hashDelete(key) {
|
|
472
|
-
var result = this.has(key) && delete this.__data__[key];
|
|
473
|
-
this.size -= result ? 1 : 0;
|
|
474
|
-
return result;
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
var _hashDelete = hashDelete;
|
|
478
|
-
|
|
479
|
-
/** Used to stand-in for `undefined` hash values. */
|
|
480
|
-
var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
|
|
481
|
-
|
|
482
|
-
/** Used for built-in method references. */
|
|
483
|
-
var objectProto$1 = Object.prototype;
|
|
484
|
-
|
|
485
|
-
/** Used to check objects for own properties. */
|
|
486
|
-
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
487
|
-
|
|
488
|
-
/**
|
|
489
|
-
* Gets the hash value for `key`.
|
|
490
|
-
*
|
|
491
|
-
* @private
|
|
492
|
-
* @name get
|
|
493
|
-
* @memberOf Hash
|
|
494
|
-
* @param {string} key The key of the value to get.
|
|
495
|
-
* @returns {*} Returns the entry value.
|
|
496
|
-
*/
|
|
497
|
-
function hashGet(key) {
|
|
498
|
-
var data = this.__data__;
|
|
499
|
-
if (_nativeCreate) {
|
|
500
|
-
var result = data[key];
|
|
501
|
-
return result === HASH_UNDEFINED$1 ? undefined : result;
|
|
502
|
-
}
|
|
503
|
-
return hasOwnProperty$1.call(data, key) ? data[key] : undefined;
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
var _hashGet = hashGet;
|
|
507
|
-
|
|
508
|
-
/** Used for built-in method references. */
|
|
509
|
-
var objectProto = Object.prototype;
|
|
510
|
-
|
|
511
|
-
/** Used to check objects for own properties. */
|
|
512
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
513
|
-
|
|
514
|
-
/**
|
|
515
|
-
* Checks if a hash value for `key` exists.
|
|
516
|
-
*
|
|
517
|
-
* @private
|
|
518
|
-
* @name has
|
|
519
|
-
* @memberOf Hash
|
|
520
|
-
* @param {string} key The key of the entry to check.
|
|
521
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
522
|
-
*/
|
|
523
|
-
function hashHas(key) {
|
|
524
|
-
var data = this.__data__;
|
|
525
|
-
return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
var _hashHas = hashHas;
|
|
529
|
-
|
|
530
|
-
/** Used to stand-in for `undefined` hash values. */
|
|
531
|
-
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
532
|
-
|
|
533
|
-
/**
|
|
534
|
-
* Sets the hash `key` to `value`.
|
|
535
|
-
*
|
|
536
|
-
* @private
|
|
537
|
-
* @name set
|
|
538
|
-
* @memberOf Hash
|
|
539
|
-
* @param {string} key The key of the value to set.
|
|
540
|
-
* @param {*} value The value to set.
|
|
541
|
-
* @returns {Object} Returns the hash instance.
|
|
542
|
-
*/
|
|
543
|
-
function hashSet(key, value) {
|
|
544
|
-
var data = this.__data__;
|
|
545
|
-
this.size += this.has(key) ? 0 : 1;
|
|
546
|
-
data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
|
547
|
-
return this;
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
var _hashSet = hashSet;
|
|
551
|
-
|
|
552
|
-
/**
|
|
553
|
-
* Creates a hash object.
|
|
554
|
-
*
|
|
555
|
-
* @private
|
|
556
|
-
* @constructor
|
|
557
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
558
|
-
*/
|
|
559
|
-
function Hash(entries) {
|
|
560
|
-
var index = -1,
|
|
561
|
-
length = entries == null ? 0 : entries.length;
|
|
562
|
-
|
|
563
|
-
this.clear();
|
|
564
|
-
while (++index < length) {
|
|
565
|
-
var entry = entries[index];
|
|
566
|
-
this.set(entry[0], entry[1]);
|
|
567
|
-
}
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
// Add methods to `Hash`.
|
|
571
|
-
Hash.prototype.clear = _hashClear;
|
|
572
|
-
Hash.prototype['delete'] = _hashDelete;
|
|
573
|
-
Hash.prototype.get = _hashGet;
|
|
574
|
-
Hash.prototype.has = _hashHas;
|
|
575
|
-
Hash.prototype.set = _hashSet;
|
|
576
|
-
|
|
577
|
-
var _Hash = Hash;
|
|
578
|
-
|
|
579
|
-
/**
|
|
580
|
-
* Removes all key-value entries from the list cache.
|
|
581
|
-
*
|
|
582
|
-
* @private
|
|
583
|
-
* @name clear
|
|
584
|
-
* @memberOf ListCache
|
|
585
|
-
*/
|
|
586
|
-
function listCacheClear() {
|
|
587
|
-
this.__data__ = [];
|
|
588
|
-
this.size = 0;
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
var _listCacheClear = listCacheClear;
|
|
592
|
-
|
|
593
|
-
/**
|
|
594
|
-
* Performs a
|
|
595
|
-
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
596
|
-
* comparison between two values to determine if they are equivalent.
|
|
597
|
-
*
|
|
598
|
-
* @static
|
|
599
|
-
* @memberOf _
|
|
600
|
-
* @since 4.0.0
|
|
601
|
-
* @category Lang
|
|
602
|
-
* @param {*} value The value to compare.
|
|
603
|
-
* @param {*} other The other value to compare.
|
|
604
|
-
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
605
|
-
* @example
|
|
606
|
-
*
|
|
607
|
-
* var object = { 'a': 1 };
|
|
608
|
-
* var other = { 'a': 1 };
|
|
609
|
-
*
|
|
610
|
-
* _.eq(object, object);
|
|
611
|
-
* // => true
|
|
612
|
-
*
|
|
613
|
-
* _.eq(object, other);
|
|
614
|
-
* // => false
|
|
615
|
-
*
|
|
616
|
-
* _.eq('a', 'a');
|
|
617
|
-
* // => true
|
|
618
|
-
*
|
|
619
|
-
* _.eq('a', Object('a'));
|
|
620
|
-
* // => false
|
|
621
|
-
*
|
|
622
|
-
* _.eq(NaN, NaN);
|
|
623
|
-
* // => true
|
|
624
|
-
*/
|
|
625
|
-
function eq(value, other) {
|
|
626
|
-
return value === other || (value !== value && other !== other);
|
|
627
|
-
}
|
|
628
|
-
|
|
629
|
-
var eq_1 = eq;
|
|
630
|
-
|
|
631
|
-
/**
|
|
632
|
-
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
|
633
|
-
*
|
|
634
|
-
* @private
|
|
635
|
-
* @param {Array} array The array to inspect.
|
|
636
|
-
* @param {*} key The key to search for.
|
|
637
|
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
638
|
-
*/
|
|
639
|
-
function assocIndexOf(array, key) {
|
|
640
|
-
var length = array.length;
|
|
641
|
-
while (length--) {
|
|
642
|
-
if (eq_1(array[length][0], key)) {
|
|
643
|
-
return length;
|
|
644
|
-
}
|
|
645
|
-
}
|
|
646
|
-
return -1;
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
var _assocIndexOf = assocIndexOf;
|
|
650
|
-
|
|
651
|
-
/** Used for built-in method references. */
|
|
652
|
-
var arrayProto = Array.prototype;
|
|
653
|
-
|
|
654
|
-
/** Built-in value references. */
|
|
655
|
-
var splice = arrayProto.splice;
|
|
656
|
-
|
|
657
|
-
/**
|
|
658
|
-
* Removes `key` and its value from the list cache.
|
|
659
|
-
*
|
|
660
|
-
* @private
|
|
661
|
-
* @name delete
|
|
662
|
-
* @memberOf ListCache
|
|
663
|
-
* @param {string} key The key of the value to remove.
|
|
664
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
665
|
-
*/
|
|
666
|
-
function listCacheDelete(key) {
|
|
667
|
-
var data = this.__data__,
|
|
668
|
-
index = _assocIndexOf(data, key);
|
|
669
|
-
|
|
670
|
-
if (index < 0) {
|
|
671
|
-
return false;
|
|
672
|
-
}
|
|
673
|
-
var lastIndex = data.length - 1;
|
|
674
|
-
if (index == lastIndex) {
|
|
675
|
-
data.pop();
|
|
676
|
-
} else {
|
|
677
|
-
splice.call(data, index, 1);
|
|
678
|
-
}
|
|
679
|
-
--this.size;
|
|
680
|
-
return true;
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
var _listCacheDelete = listCacheDelete;
|
|
684
|
-
|
|
685
|
-
/**
|
|
686
|
-
* Gets the list cache value for `key`.
|
|
687
|
-
*
|
|
688
|
-
* @private
|
|
689
|
-
* @name get
|
|
690
|
-
* @memberOf ListCache
|
|
691
|
-
* @param {string} key The key of the value to get.
|
|
692
|
-
* @returns {*} Returns the entry value.
|
|
693
|
-
*/
|
|
694
|
-
function listCacheGet(key) {
|
|
695
|
-
var data = this.__data__,
|
|
696
|
-
index = _assocIndexOf(data, key);
|
|
697
|
-
|
|
698
|
-
return index < 0 ? undefined : data[index][1];
|
|
699
|
-
}
|
|
700
|
-
|
|
701
|
-
var _listCacheGet = listCacheGet;
|
|
702
|
-
|
|
703
|
-
/**
|
|
704
|
-
* Checks if a list cache value for `key` exists.
|
|
705
|
-
*
|
|
706
|
-
* @private
|
|
707
|
-
* @name has
|
|
708
|
-
* @memberOf ListCache
|
|
709
|
-
* @param {string} key The key of the entry to check.
|
|
710
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
711
|
-
*/
|
|
712
|
-
function listCacheHas(key) {
|
|
713
|
-
return _assocIndexOf(this.__data__, key) > -1;
|
|
714
|
-
}
|
|
715
|
-
|
|
716
|
-
var _listCacheHas = listCacheHas;
|
|
717
|
-
|
|
718
|
-
/**
|
|
719
|
-
* Sets the list cache `key` to `value`.
|
|
720
|
-
*
|
|
721
|
-
* @private
|
|
722
|
-
* @name set
|
|
723
|
-
* @memberOf ListCache
|
|
724
|
-
* @param {string} key The key of the value to set.
|
|
725
|
-
* @param {*} value The value to set.
|
|
726
|
-
* @returns {Object} Returns the list cache instance.
|
|
727
|
-
*/
|
|
728
|
-
function listCacheSet(key, value) {
|
|
729
|
-
var data = this.__data__,
|
|
730
|
-
index = _assocIndexOf(data, key);
|
|
731
|
-
|
|
732
|
-
if (index < 0) {
|
|
733
|
-
++this.size;
|
|
734
|
-
data.push([key, value]);
|
|
735
|
-
} else {
|
|
736
|
-
data[index][1] = value;
|
|
737
|
-
}
|
|
738
|
-
return this;
|
|
739
|
-
}
|
|
740
|
-
|
|
741
|
-
var _listCacheSet = listCacheSet;
|
|
742
|
-
|
|
743
|
-
/**
|
|
744
|
-
* Creates an list cache object.
|
|
745
|
-
*
|
|
746
|
-
* @private
|
|
747
|
-
* @constructor
|
|
748
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
749
|
-
*/
|
|
750
|
-
function ListCache(entries) {
|
|
751
|
-
var index = -1,
|
|
752
|
-
length = entries == null ? 0 : entries.length;
|
|
753
|
-
|
|
754
|
-
this.clear();
|
|
755
|
-
while (++index < length) {
|
|
756
|
-
var entry = entries[index];
|
|
757
|
-
this.set(entry[0], entry[1]);
|
|
758
|
-
}
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
// Add methods to `ListCache`.
|
|
762
|
-
ListCache.prototype.clear = _listCacheClear;
|
|
763
|
-
ListCache.prototype['delete'] = _listCacheDelete;
|
|
764
|
-
ListCache.prototype.get = _listCacheGet;
|
|
765
|
-
ListCache.prototype.has = _listCacheHas;
|
|
766
|
-
ListCache.prototype.set = _listCacheSet;
|
|
767
|
-
|
|
768
|
-
var _ListCache = ListCache;
|
|
769
|
-
|
|
770
|
-
/* Built-in method references that are verified to be native. */
|
|
771
|
-
var Map = _getNative(_root, 'Map');
|
|
772
|
-
|
|
773
|
-
var _Map = Map;
|
|
774
|
-
|
|
775
|
-
/**
|
|
776
|
-
* Removes all key-value entries from the map.
|
|
777
|
-
*
|
|
778
|
-
* @private
|
|
779
|
-
* @name clear
|
|
780
|
-
* @memberOf MapCache
|
|
781
|
-
*/
|
|
782
|
-
function mapCacheClear() {
|
|
783
|
-
this.size = 0;
|
|
784
|
-
this.__data__ = {
|
|
785
|
-
'hash': new _Hash,
|
|
786
|
-
'map': new (_Map || _ListCache),
|
|
787
|
-
'string': new _Hash
|
|
788
|
-
};
|
|
789
|
-
}
|
|
790
|
-
|
|
791
|
-
var _mapCacheClear = mapCacheClear;
|
|
792
|
-
|
|
793
|
-
/**
|
|
794
|
-
* Checks if `value` is suitable for use as unique object key.
|
|
795
|
-
*
|
|
796
|
-
* @private
|
|
797
|
-
* @param {*} value The value to check.
|
|
798
|
-
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
|
799
|
-
*/
|
|
800
|
-
function isKeyable(value) {
|
|
801
|
-
var type = typeof value;
|
|
802
|
-
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
|
803
|
-
? (value !== '__proto__')
|
|
804
|
-
: (value === null);
|
|
805
|
-
}
|
|
806
|
-
|
|
807
|
-
var _isKeyable = isKeyable;
|
|
808
|
-
|
|
809
|
-
/**
|
|
810
|
-
* Gets the data for `map`.
|
|
811
|
-
*
|
|
812
|
-
* @private
|
|
813
|
-
* @param {Object} map The map to query.
|
|
814
|
-
* @param {string} key The reference key.
|
|
815
|
-
* @returns {*} Returns the map data.
|
|
816
|
-
*/
|
|
817
|
-
function getMapData(map, key) {
|
|
818
|
-
var data = map.__data__;
|
|
819
|
-
return _isKeyable(key)
|
|
820
|
-
? data[typeof key == 'string' ? 'string' : 'hash']
|
|
821
|
-
: data.map;
|
|
822
|
-
}
|
|
823
|
-
|
|
824
|
-
var _getMapData = getMapData;
|
|
825
|
-
|
|
826
|
-
/**
|
|
827
|
-
* Removes `key` and its value from the map.
|
|
828
|
-
*
|
|
829
|
-
* @private
|
|
830
|
-
* @name delete
|
|
831
|
-
* @memberOf MapCache
|
|
832
|
-
* @param {string} key The key of the value to remove.
|
|
833
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
834
|
-
*/
|
|
835
|
-
function mapCacheDelete(key) {
|
|
836
|
-
var result = _getMapData(this, key)['delete'](key);
|
|
837
|
-
this.size -= result ? 1 : 0;
|
|
838
|
-
return result;
|
|
839
|
-
}
|
|
840
|
-
|
|
841
|
-
var _mapCacheDelete = mapCacheDelete;
|
|
842
|
-
|
|
843
|
-
/**
|
|
844
|
-
* Gets the map value for `key`.
|
|
845
|
-
*
|
|
846
|
-
* @private
|
|
847
|
-
* @name get
|
|
848
|
-
* @memberOf MapCache
|
|
849
|
-
* @param {string} key The key of the value to get.
|
|
850
|
-
* @returns {*} Returns the entry value.
|
|
851
|
-
*/
|
|
852
|
-
function mapCacheGet(key) {
|
|
853
|
-
return _getMapData(this, key).get(key);
|
|
854
|
-
}
|
|
855
|
-
|
|
856
|
-
var _mapCacheGet = mapCacheGet;
|
|
857
|
-
|
|
858
|
-
/**
|
|
859
|
-
* Checks if a map value for `key` exists.
|
|
860
|
-
*
|
|
861
|
-
* @private
|
|
862
|
-
* @name has
|
|
863
|
-
* @memberOf MapCache
|
|
864
|
-
* @param {string} key The key of the entry to check.
|
|
865
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
866
|
-
*/
|
|
867
|
-
function mapCacheHas(key) {
|
|
868
|
-
return _getMapData(this, key).has(key);
|
|
869
|
-
}
|
|
870
|
-
|
|
871
|
-
var _mapCacheHas = mapCacheHas;
|
|
872
|
-
|
|
873
|
-
/**
|
|
874
|
-
* Sets the map `key` to `value`.
|
|
875
|
-
*
|
|
876
|
-
* @private
|
|
877
|
-
* @name set
|
|
878
|
-
* @memberOf MapCache
|
|
879
|
-
* @param {string} key The key of the value to set.
|
|
880
|
-
* @param {*} value The value to set.
|
|
881
|
-
* @returns {Object} Returns the map cache instance.
|
|
882
|
-
*/
|
|
883
|
-
function mapCacheSet(key, value) {
|
|
884
|
-
var data = _getMapData(this, key),
|
|
885
|
-
size = data.size;
|
|
886
|
-
|
|
887
|
-
data.set(key, value);
|
|
888
|
-
this.size += data.size == size ? 0 : 1;
|
|
889
|
-
return this;
|
|
890
|
-
}
|
|
891
|
-
|
|
892
|
-
var _mapCacheSet = mapCacheSet;
|
|
893
|
-
|
|
894
|
-
/**
|
|
895
|
-
* Creates a map cache object to store key-value pairs.
|
|
896
|
-
*
|
|
897
|
-
* @private
|
|
898
|
-
* @constructor
|
|
899
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
900
|
-
*/
|
|
901
|
-
function MapCache(entries) {
|
|
902
|
-
var index = -1,
|
|
903
|
-
length = entries == null ? 0 : entries.length;
|
|
904
|
-
|
|
905
|
-
this.clear();
|
|
906
|
-
while (++index < length) {
|
|
907
|
-
var entry = entries[index];
|
|
908
|
-
this.set(entry[0], entry[1]);
|
|
909
|
-
}
|
|
910
|
-
}
|
|
911
|
-
|
|
912
|
-
// Add methods to `MapCache`.
|
|
913
|
-
MapCache.prototype.clear = _mapCacheClear;
|
|
914
|
-
MapCache.prototype['delete'] = _mapCacheDelete;
|
|
915
|
-
MapCache.prototype.get = _mapCacheGet;
|
|
916
|
-
MapCache.prototype.has = _mapCacheHas;
|
|
917
|
-
MapCache.prototype.set = _mapCacheSet;
|
|
918
|
-
|
|
919
|
-
var _MapCache = MapCache;
|
|
920
|
-
|
|
921
|
-
/** Error message constants. */
|
|
922
|
-
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
923
|
-
|
|
924
|
-
/**
|
|
925
|
-
* Creates a function that memoizes the result of `func`. If `resolver` is
|
|
926
|
-
* provided, it determines the cache key for storing the result based on the
|
|
927
|
-
* arguments provided to the memoized function. By default, the first argument
|
|
928
|
-
* provided to the memoized function is used as the map cache key. The `func`
|
|
929
|
-
* is invoked with the `this` binding of the memoized function.
|
|
930
|
-
*
|
|
931
|
-
* **Note:** The cache is exposed as the `cache` property on the memoized
|
|
932
|
-
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
|
933
|
-
* constructor with one whose instances implement the
|
|
934
|
-
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
|
935
|
-
* method interface of `clear`, `delete`, `get`, `has`, and `set`.
|
|
936
|
-
*
|
|
937
|
-
* @static
|
|
938
|
-
* @memberOf _
|
|
939
|
-
* @since 0.1.0
|
|
940
|
-
* @category Function
|
|
941
|
-
* @param {Function} func The function to have its output memoized.
|
|
942
|
-
* @param {Function} [resolver] The function to resolve the cache key.
|
|
943
|
-
* @returns {Function} Returns the new memoized function.
|
|
944
|
-
* @example
|
|
945
|
-
*
|
|
946
|
-
* var object = { 'a': 1, 'b': 2 };
|
|
947
|
-
* var other = { 'c': 3, 'd': 4 };
|
|
948
|
-
*
|
|
949
|
-
* var values = _.memoize(_.values);
|
|
950
|
-
* values(object);
|
|
951
|
-
* // => [1, 2]
|
|
952
|
-
*
|
|
953
|
-
* values(other);
|
|
954
|
-
* // => [3, 4]
|
|
955
|
-
*
|
|
956
|
-
* object.a = 2;
|
|
957
|
-
* values(object);
|
|
958
|
-
* // => [1, 2]
|
|
959
|
-
*
|
|
960
|
-
* // Modify the result cache.
|
|
961
|
-
* values.cache.set(object, ['a', 'b']);
|
|
962
|
-
* values(object);
|
|
963
|
-
* // => ['a', 'b']
|
|
964
|
-
*
|
|
965
|
-
* // Replace `_.memoize.Cache`.
|
|
966
|
-
* _.memoize.Cache = WeakMap;
|
|
967
|
-
*/
|
|
968
|
-
function memoize(func, resolver) {
|
|
969
|
-
if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
|
|
970
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
971
|
-
}
|
|
972
|
-
var memoized = function() {
|
|
973
|
-
var args = arguments,
|
|
974
|
-
key = resolver ? resolver.apply(this, args) : args[0],
|
|
975
|
-
cache = memoized.cache;
|
|
976
|
-
|
|
977
|
-
if (cache.has(key)) {
|
|
978
|
-
return cache.get(key);
|
|
979
|
-
}
|
|
980
|
-
var result = func.apply(this, args);
|
|
981
|
-
memoized.cache = cache.set(key, result) || cache;
|
|
982
|
-
return result;
|
|
983
|
-
};
|
|
984
|
-
memoized.cache = new (memoize.Cache || _MapCache);
|
|
985
|
-
return memoized;
|
|
986
|
-
}
|
|
987
|
-
|
|
988
|
-
// Expose `MapCache`.
|
|
989
|
-
memoize.Cache = _MapCache;
|
|
990
|
-
|
|
991
|
-
var memoize_1 = memoize;
|
|
992
|
-
|
|
993
|
-
/** Used as the maximum memoize cache size. */
|
|
994
|
-
var MAX_MEMOIZE_SIZE = 500;
|
|
995
|
-
|
|
996
|
-
/**
|
|
997
|
-
* A specialized version of `_.memoize` which clears the memoized function's
|
|
998
|
-
* cache when it exceeds `MAX_MEMOIZE_SIZE`.
|
|
999
|
-
*
|
|
1000
|
-
* @private
|
|
1001
|
-
* @param {Function} func The function to have its output memoized.
|
|
1002
|
-
* @returns {Function} Returns the new memoized function.
|
|
1003
|
-
*/
|
|
1004
|
-
function memoizeCapped(func) {
|
|
1005
|
-
var result = memoize_1(func, function(key) {
|
|
1006
|
-
if (cache.size === MAX_MEMOIZE_SIZE) {
|
|
1007
|
-
cache.clear();
|
|
1008
|
-
}
|
|
1009
|
-
return key;
|
|
1010
|
-
});
|
|
1011
|
-
|
|
1012
|
-
var cache = result.cache;
|
|
1013
|
-
return result;
|
|
1014
|
-
}
|
|
1015
|
-
|
|
1016
|
-
var _memoizeCapped = memoizeCapped;
|
|
1017
|
-
|
|
1018
|
-
/** Used to match property names within property paths. */
|
|
1019
|
-
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
1020
|
-
|
|
1021
|
-
/** Used to match backslashes in property paths. */
|
|
1022
|
-
var reEscapeChar = /\\(\\)?/g;
|
|
1023
|
-
|
|
1024
|
-
/**
|
|
1025
|
-
* Converts `string` to a property path array.
|
|
1026
|
-
*
|
|
1027
|
-
* @private
|
|
1028
|
-
* @param {string} string The string to convert.
|
|
1029
|
-
* @returns {Array} Returns the property path array.
|
|
1030
|
-
*/
|
|
1031
|
-
var stringToPath = _memoizeCapped(function(string) {
|
|
1032
|
-
var result = [];
|
|
1033
|
-
if (string.charCodeAt(0) === 46 /* . */) {
|
|
1034
|
-
result.push('');
|
|
1035
|
-
}
|
|
1036
|
-
string.replace(rePropName, function(match, number, quote, subString) {
|
|
1037
|
-
result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
|
|
1038
|
-
});
|
|
1039
|
-
return result;
|
|
1040
|
-
});
|
|
1041
|
-
|
|
1042
|
-
var _stringToPath = stringToPath;
|
|
1043
|
-
|
|
1044
|
-
/**
|
|
1045
|
-
* A specialized version of `_.map` for arrays without support for iteratee
|
|
1046
|
-
* shorthands.
|
|
1047
|
-
*
|
|
1048
|
-
* @private
|
|
1049
|
-
* @param {Array} [array] The array to iterate over.
|
|
1050
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
1051
|
-
* @returns {Array} Returns the new mapped array.
|
|
1052
|
-
*/
|
|
1053
|
-
function arrayMap(array, iteratee) {
|
|
1054
|
-
var index = -1,
|
|
1055
|
-
length = array == null ? 0 : array.length,
|
|
1056
|
-
result = Array(length);
|
|
1057
|
-
|
|
1058
|
-
while (++index < length) {
|
|
1059
|
-
result[index] = iteratee(array[index], index, array);
|
|
1060
|
-
}
|
|
1061
|
-
return result;
|
|
1062
|
-
}
|
|
1063
|
-
|
|
1064
|
-
var _arrayMap = arrayMap;
|
|
1065
|
-
|
|
1066
|
-
/** Used as references for various `Number` constants. */
|
|
1067
|
-
var INFINITY$1 = 1 / 0;
|
|
1068
|
-
|
|
1069
|
-
/** Used to convert symbols to primitives and strings. */
|
|
1070
|
-
var symbolProto = _Symbol ? _Symbol.prototype : undefined,
|
|
1071
|
-
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|
1072
|
-
|
|
1073
|
-
/**
|
|
1074
|
-
* The base implementation of `_.toString` which doesn't convert nullish
|
|
1075
|
-
* values to empty strings.
|
|
1076
|
-
*
|
|
1077
|
-
* @private
|
|
1078
|
-
* @param {*} value The value to process.
|
|
1079
|
-
* @returns {string} Returns the string.
|
|
1080
|
-
*/
|
|
1081
|
-
function baseToString(value) {
|
|
1082
|
-
// Exit early for strings to avoid a performance hit in some environments.
|
|
1083
|
-
if (typeof value == 'string') {
|
|
1084
|
-
return value;
|
|
1085
|
-
}
|
|
1086
|
-
if (isArray_1(value)) {
|
|
1087
|
-
// Recursively convert values (susceptible to call stack limits).
|
|
1088
|
-
return _arrayMap(value, baseToString) + '';
|
|
1089
|
-
}
|
|
1090
|
-
if (isSymbol_1(value)) {
|
|
1091
|
-
return symbolToString ? symbolToString.call(value) : '';
|
|
1092
|
-
}
|
|
1093
|
-
var result = (value + '');
|
|
1094
|
-
return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
|
|
1095
|
-
}
|
|
1096
|
-
|
|
1097
|
-
var _baseToString = baseToString;
|
|
1098
|
-
|
|
1099
|
-
/**
|
|
1100
|
-
* Converts `value` to a string. An empty string is returned for `null`
|
|
1101
|
-
* and `undefined` values. The sign of `-0` is preserved.
|
|
1102
|
-
*
|
|
1103
|
-
* @static
|
|
1104
|
-
* @memberOf _
|
|
1105
|
-
* @since 4.0.0
|
|
1106
|
-
* @category Lang
|
|
1107
|
-
* @param {*} value The value to convert.
|
|
1108
|
-
* @returns {string} Returns the converted string.
|
|
1109
|
-
* @example
|
|
1110
|
-
*
|
|
1111
|
-
* _.toString(null);
|
|
1112
|
-
* // => ''
|
|
1113
|
-
*
|
|
1114
|
-
* _.toString(-0);
|
|
1115
|
-
* // => '-0'
|
|
1116
|
-
*
|
|
1117
|
-
* _.toString([1, 2, 3]);
|
|
1118
|
-
* // => '1,2,3'
|
|
1119
|
-
*/
|
|
1120
|
-
function toString(value) {
|
|
1121
|
-
return value == null ? '' : _baseToString(value);
|
|
1122
|
-
}
|
|
1123
|
-
|
|
1124
|
-
var toString_1 = toString;
|
|
1125
|
-
|
|
1126
|
-
/**
|
|
1127
|
-
* Casts `value` to a path array if it's not one.
|
|
1128
|
-
*
|
|
1129
|
-
* @private
|
|
1130
|
-
* @param {*} value The value to inspect.
|
|
1131
|
-
* @param {Object} [object] The object to query keys on.
|
|
1132
|
-
* @returns {Array} Returns the cast property path array.
|
|
1133
|
-
*/
|
|
1134
|
-
function castPath(value, object) {
|
|
1135
|
-
if (isArray_1(value)) {
|
|
1136
|
-
return value;
|
|
1137
|
-
}
|
|
1138
|
-
return _isKey(value, object) ? [value] : _stringToPath(toString_1(value));
|
|
1139
|
-
}
|
|
1140
|
-
|
|
1141
|
-
var _castPath = castPath;
|
|
1142
|
-
|
|
1143
|
-
/** Used as references for various `Number` constants. */
|
|
1144
|
-
var INFINITY = 1 / 0;
|
|
1145
|
-
|
|
1146
|
-
/**
|
|
1147
|
-
* Converts `value` to a string key if it's not a string or symbol.
|
|
1148
|
-
*
|
|
1149
|
-
* @private
|
|
1150
|
-
* @param {*} value The value to inspect.
|
|
1151
|
-
* @returns {string|symbol} Returns the key.
|
|
1152
|
-
*/
|
|
1153
|
-
function toKey(value) {
|
|
1154
|
-
if (typeof value == 'string' || isSymbol_1(value)) {
|
|
1155
|
-
return value;
|
|
1156
|
-
}
|
|
1157
|
-
var result = (value + '');
|
|
1158
|
-
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
|
1159
|
-
}
|
|
1160
|
-
|
|
1161
|
-
var _toKey = toKey;
|
|
1162
|
-
|
|
1163
|
-
/**
|
|
1164
|
-
* The base implementation of `_.get` without support for default values.
|
|
1165
|
-
*
|
|
1166
|
-
* @private
|
|
1167
|
-
* @param {Object} object The object to query.
|
|
1168
|
-
* @param {Array|string} path The path of the property to get.
|
|
1169
|
-
* @returns {*} Returns the resolved value.
|
|
1170
|
-
*/
|
|
1171
|
-
function baseGet(object, path) {
|
|
1172
|
-
path = _castPath(path, object);
|
|
1173
|
-
|
|
1174
|
-
var index = 0,
|
|
1175
|
-
length = path.length;
|
|
1176
|
-
|
|
1177
|
-
while (object != null && index < length) {
|
|
1178
|
-
object = object[_toKey(path[index++])];
|
|
1179
|
-
}
|
|
1180
|
-
return (index && index == length) ? object : undefined;
|
|
1181
|
-
}
|
|
1182
|
-
|
|
1183
|
-
var _baseGet = baseGet;
|
|
1184
|
-
|
|
1185
|
-
/**
|
|
1186
|
-
* Gets the value at `path` of `object`. If the resolved value is
|
|
1187
|
-
* `undefined`, the `defaultValue` is returned in its place.
|
|
1188
|
-
*
|
|
1189
|
-
* @static
|
|
1190
|
-
* @memberOf _
|
|
1191
|
-
* @since 3.7.0
|
|
1192
|
-
* @category Object
|
|
1193
|
-
* @param {Object} object The object to query.
|
|
1194
|
-
* @param {Array|string} path The path of the property to get.
|
|
1195
|
-
* @param {*} [defaultValue] The value returned for `undefined` resolved values.
|
|
1196
|
-
* @returns {*} Returns the resolved value.
|
|
1197
|
-
* @example
|
|
1198
|
-
*
|
|
1199
|
-
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
|
|
1200
|
-
*
|
|
1201
|
-
* _.get(object, 'a[0].b.c');
|
|
1202
|
-
* // => 3
|
|
1203
|
-
*
|
|
1204
|
-
* _.get(object, ['a', '0', 'b', 'c']);
|
|
1205
|
-
* // => 3
|
|
1206
|
-
*
|
|
1207
|
-
* _.get(object, 'a.b.c', 'default');
|
|
1208
|
-
* // => 'default'
|
|
1209
|
-
*/
|
|
1210
|
-
function get(object, path, defaultValue) {
|
|
1211
|
-
var result = object == null ? undefined : _baseGet(object, path);
|
|
1212
|
-
return result === undefined ? defaultValue : result;
|
|
1213
|
-
}
|
|
1214
|
-
|
|
1215
|
-
var get_1 = get;
|
|
1216
|
-
|
|
1217
|
-
var optionsDefaults_1 = createCommonjsModule(function (module, exports) {
|
|
1218
|
-
|
|
1219
|
-
Object.defineProperty(exports, "__esModule", {
|
|
1220
|
-
value: true
|
|
1221
|
-
});
|
|
1222
|
-
exports["default"] = void 0;
|
|
1223
|
-
var optionsDefaults = {
|
|
1224
|
-
attributeNames: {
|
|
1225
|
-
styleName: 'className'
|
|
1226
|
-
},
|
|
1227
|
-
generateScopedName: '[path]___[name]__[local]___[hash:base64:5]',
|
|
1228
|
-
handleMissingStyleName: 'throw'
|
|
1229
|
-
};
|
|
1230
|
-
var _default = optionsDefaults;
|
|
1231
|
-
exports["default"] = _default;
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
});
|
|
1235
|
-
|
|
1236
|
-
var getClassName = createCommonjsModule(function (module, exports) {
|
|
1237
|
-
|
|
1238
|
-
Object.defineProperty(exports, "__esModule", {
|
|
1239
|
-
value: true
|
|
1240
|
-
});
|
|
1241
|
-
exports["default"] = void 0;
|
|
1242
|
-
|
|
1243
|
-
var _optionsDefaults = _interopRequireDefault(optionsDefaults_1);
|
|
1244
|
-
|
|
1245
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
1246
|
-
|
|
1247
|
-
var isNamespacedStyleName = function isNamespacedStyleName(styleName) {
|
|
1248
|
-
return styleName.indexOf('.') !== -1;
|
|
1249
|
-
};
|
|
1250
|
-
|
|
1251
|
-
var handleError = function handleError(message, handleMissingStyleName) {
|
|
1252
|
-
if (handleMissingStyleName === 'throw') {
|
|
1253
|
-
throw new Error(message);
|
|
1254
|
-
} else if (handleMissingStyleName === 'warn') {
|
|
1255
|
-
// eslint-disable-next-line no-console
|
|
1256
|
-
console.warn(message);
|
|
1257
|
-
}
|
|
1258
|
-
|
|
1259
|
-
return null;
|
|
1260
|
-
};
|
|
1261
|
-
|
|
1262
|
-
var getClassNameForNamespacedStyleName = function getClassNameForNamespacedStyleName(styleName, styleModuleImportMap, handleMissingStyleNameOption) {
|
|
1263
|
-
// Note:
|
|
1264
|
-
// Do not use the desctructing syntax with Babel.
|
|
1265
|
-
// Desctructing adds _slicedToArray helper.
|
|
1266
|
-
var styleNameParts = styleName.split('.');
|
|
1267
|
-
var importName = styleNameParts[0];
|
|
1268
|
-
var moduleName = styleNameParts[1];
|
|
1269
|
-
var handleMissingStyleName = handleMissingStyleNameOption || _optionsDefaults["default"].handleMissingStyleName;
|
|
1270
|
-
|
|
1271
|
-
if (!moduleName) {
|
|
1272
|
-
return handleError('Invalid style name: ' + styleName, handleMissingStyleName);
|
|
1273
|
-
}
|
|
1274
|
-
|
|
1275
|
-
if (!styleModuleImportMap[importName]) {
|
|
1276
|
-
return handleError('CSS module import does not exist: ' + importName, handleMissingStyleName);
|
|
1277
|
-
}
|
|
1278
|
-
|
|
1279
|
-
if (!styleModuleImportMap[importName][moduleName]) {
|
|
1280
|
-
return handleError('CSS module does not exist: ' + moduleName, handleMissingStyleName);
|
|
1281
|
-
}
|
|
1282
|
-
|
|
1283
|
-
return styleModuleImportMap[importName][moduleName];
|
|
1284
|
-
};
|
|
1285
|
-
|
|
1286
|
-
var getClassNameFromMultipleImports = function getClassNameFromMultipleImports(styleName, styleModuleImportMap, handleMissingStyleNameOption) {
|
|
1287
|
-
var handleMissingStyleName = handleMissingStyleNameOption || _optionsDefaults["default"].handleMissingStyleName;
|
|
1288
|
-
var importKeysWithMatches = Object.keys(styleModuleImportMap).map(function (importKey) {
|
|
1289
|
-
return styleModuleImportMap[importKey][styleName] && importKey;
|
|
1290
|
-
}).filter(function (importKey) {
|
|
1291
|
-
return importKey;
|
|
1292
|
-
});
|
|
1293
|
-
|
|
1294
|
-
if (importKeysWithMatches.length > 1) {
|
|
1295
|
-
throw new Error('Cannot resolve styleName "' + styleName + '" because it is present in multiple imports:' + '\n\n\t' + importKeysWithMatches.join('\n\t') + '\n\nYou can resolve this by using a named import, e.g:' + '\n\n\timport foo from "' + importKeysWithMatches[0] + '";' + '\n\t<div styleName="foo.' + styleName + '" />' + '\n\n');
|
|
1296
|
-
}
|
|
1297
|
-
|
|
1298
|
-
if (importKeysWithMatches.length === 0) {
|
|
1299
|
-
return handleError('Could not resolve the styleName \'' + styleName + '\'.', handleMissingStyleName);
|
|
1300
|
-
}
|
|
1301
|
-
|
|
1302
|
-
return styleModuleImportMap[importKeysWithMatches[0]][styleName];
|
|
1303
|
-
};
|
|
1304
|
-
|
|
1305
|
-
var _default = function _default(styleNameValue, styleModuleImportMap, options) {
|
|
1306
|
-
var styleModuleImportMapKeys = Object.keys(styleModuleImportMap);
|
|
1307
|
-
|
|
1308
|
-
var _ref = options || {},
|
|
1309
|
-
_ref$handleMissingSty = _ref.handleMissingStyleName,
|
|
1310
|
-
handleMissingStyleName = _ref$handleMissingSty === void 0 ? _optionsDefaults["default"].handleMissingStyleName : _ref$handleMissingSty,
|
|
1311
|
-
_ref$autoResolveMulti = _ref.autoResolveMultipleImports,
|
|
1312
|
-
autoResolveMultipleImports = _ref$autoResolveMulti === void 0 ? _optionsDefaults["default"].autoResolveMultipleImports : _ref$autoResolveMulti;
|
|
1313
|
-
|
|
1314
|
-
if (!styleNameValue) {
|
|
1315
|
-
return '';
|
|
1316
|
-
}
|
|
1317
|
-
|
|
1318
|
-
return styleNameValue.split(' ').filter(function (styleName) {
|
|
1319
|
-
return styleName;
|
|
1320
|
-
}).map(function (styleName) {
|
|
1321
|
-
if (isNamespacedStyleName(styleName)) {
|
|
1322
|
-
return getClassNameForNamespacedStyleName(styleName, styleModuleImportMap, handleMissingStyleName);
|
|
1323
|
-
}
|
|
1324
|
-
|
|
1325
|
-
if (styleModuleImportMapKeys.length === 0) {
|
|
1326
|
-
throw new Error('Cannot use styleName attribute for style name \'' + styleName + '\' without importing at least one stylesheet.');
|
|
1327
|
-
}
|
|
1328
|
-
|
|
1329
|
-
if (styleModuleImportMapKeys.length > 1) {
|
|
1330
|
-
if (!autoResolveMultipleImports) {
|
|
1331
|
-
throw new Error('Cannot use anonymous style name \'' + styleName + '\' with more than one stylesheet import without setting \'autoResolveMultipleImports\' to true.');
|
|
1332
|
-
}
|
|
1333
|
-
|
|
1334
|
-
return getClassNameFromMultipleImports(styleName, styleModuleImportMap, handleMissingStyleName);
|
|
1335
|
-
}
|
|
1336
|
-
|
|
1337
|
-
var styleModuleMap = styleModuleImportMap[styleModuleImportMapKeys[0]];
|
|
1338
|
-
|
|
1339
|
-
if (!styleModuleMap[styleName]) {
|
|
1340
|
-
return handleError('Could not resolve the styleName \'' + styleName + '\'.', handleMissingStyleName);
|
|
1341
|
-
}
|
|
1342
|
-
|
|
1343
|
-
return styleModuleMap[styleName];
|
|
1344
|
-
}).filter(function (className) {
|
|
1345
|
-
// Remove any styles which could not be found (if handleMissingStyleName === 'ignore')
|
|
1346
|
-
return className;
|
|
1347
|
-
}).join(' ');
|
|
1348
|
-
};
|
|
1349
|
-
|
|
1350
|
-
exports["default"] = _default;
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
});
|
|
1354
|
-
|
|
1355
|
-
var _getClassName = /*@__PURE__*/getDefaultExportFromCjs(getClassName);
|
|
26
|
+
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
|
|
27
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
1356
28
|
|
|
1357
29
|
var StateContext = /*#__PURE__*/React.createContext(); // eslint-disable-next-line react/display-name
|
|
1358
30
|
|
|
@@ -1371,1133 +43,6 @@ var useStateValue = function useStateValue() {
|
|
|
1371
43
|
return React.useContext(StateContext);
|
|
1372
44
|
};
|
|
1373
45
|
|
|
1374
|
-
function _typeof(obj) {
|
|
1375
|
-
"@babel/helpers - typeof";
|
|
1376
|
-
|
|
1377
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
1378
|
-
return typeof obj;
|
|
1379
|
-
} : function (obj) {
|
|
1380
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
1381
|
-
}, _typeof(obj);
|
|
1382
|
-
}
|
|
1383
|
-
|
|
1384
|
-
/**
|
|
1385
|
-
* Copyright (c) 2014-present, Facebook, Inc.
|
|
1386
|
-
*
|
|
1387
|
-
* This source code is licensed under the MIT license found in the
|
|
1388
|
-
* LICENSE file in the root directory of this source tree.
|
|
1389
|
-
*/
|
|
1390
|
-
|
|
1391
|
-
createCommonjsModule(function (module) {
|
|
1392
|
-
var runtime = (function (exports) {
|
|
1393
|
-
|
|
1394
|
-
var Op = Object.prototype;
|
|
1395
|
-
var hasOwn = Op.hasOwnProperty;
|
|
1396
|
-
var undefined$1; // More compressible than void 0.
|
|
1397
|
-
var $Symbol = typeof Symbol === "function" ? Symbol : {};
|
|
1398
|
-
var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
|
1399
|
-
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
|
1400
|
-
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
1401
|
-
|
|
1402
|
-
function define(obj, key, value) {
|
|
1403
|
-
Object.defineProperty(obj, key, {
|
|
1404
|
-
value: value,
|
|
1405
|
-
enumerable: true,
|
|
1406
|
-
configurable: true,
|
|
1407
|
-
writable: true
|
|
1408
|
-
});
|
|
1409
|
-
return obj[key];
|
|
1410
|
-
}
|
|
1411
|
-
try {
|
|
1412
|
-
// IE 8 has a broken Object.defineProperty that only works on DOM objects.
|
|
1413
|
-
define({}, "");
|
|
1414
|
-
} catch (err) {
|
|
1415
|
-
define = function(obj, key, value) {
|
|
1416
|
-
return obj[key] = value;
|
|
1417
|
-
};
|
|
1418
|
-
}
|
|
1419
|
-
|
|
1420
|
-
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
1421
|
-
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
|
|
1422
|
-
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
|
|
1423
|
-
var generator = Object.create(protoGenerator.prototype);
|
|
1424
|
-
var context = new Context(tryLocsList || []);
|
|
1425
|
-
|
|
1426
|
-
// The ._invoke method unifies the implementations of the .next,
|
|
1427
|
-
// .throw, and .return methods.
|
|
1428
|
-
generator._invoke = makeInvokeMethod(innerFn, self, context);
|
|
1429
|
-
|
|
1430
|
-
return generator;
|
|
1431
|
-
}
|
|
1432
|
-
exports.wrap = wrap;
|
|
1433
|
-
|
|
1434
|
-
// Try/catch helper to minimize deoptimizations. Returns a completion
|
|
1435
|
-
// record like context.tryEntries[i].completion. This interface could
|
|
1436
|
-
// have been (and was previously) designed to take a closure to be
|
|
1437
|
-
// invoked without arguments, but in all the cases we care about we
|
|
1438
|
-
// already have an existing method we want to call, so there's no need
|
|
1439
|
-
// to create a new function object. We can even get away with assuming
|
|
1440
|
-
// the method takes exactly one argument, since that happens to be true
|
|
1441
|
-
// in every case, so we don't have to touch the arguments object. The
|
|
1442
|
-
// only additional allocation required is the completion record, which
|
|
1443
|
-
// has a stable shape and so hopefully should be cheap to allocate.
|
|
1444
|
-
function tryCatch(fn, obj, arg) {
|
|
1445
|
-
try {
|
|
1446
|
-
return { type: "normal", arg: fn.call(obj, arg) };
|
|
1447
|
-
} catch (err) {
|
|
1448
|
-
return { type: "throw", arg: err };
|
|
1449
|
-
}
|
|
1450
|
-
}
|
|
1451
|
-
|
|
1452
|
-
var GenStateSuspendedStart = "suspendedStart";
|
|
1453
|
-
var GenStateSuspendedYield = "suspendedYield";
|
|
1454
|
-
var GenStateExecuting = "executing";
|
|
1455
|
-
var GenStateCompleted = "completed";
|
|
1456
|
-
|
|
1457
|
-
// Returning this object from the innerFn has the same effect as
|
|
1458
|
-
// breaking out of the dispatch switch statement.
|
|
1459
|
-
var ContinueSentinel = {};
|
|
1460
|
-
|
|
1461
|
-
// Dummy constructor functions that we use as the .constructor and
|
|
1462
|
-
// .constructor.prototype properties for functions that return Generator
|
|
1463
|
-
// objects. For full spec compliance, you may wish to configure your
|
|
1464
|
-
// minifier not to mangle the names of these two functions.
|
|
1465
|
-
function Generator() {}
|
|
1466
|
-
function GeneratorFunction() {}
|
|
1467
|
-
function GeneratorFunctionPrototype() {}
|
|
1468
|
-
|
|
1469
|
-
// This is a polyfill for %IteratorPrototype% for environments that
|
|
1470
|
-
// don't natively support it.
|
|
1471
|
-
var IteratorPrototype = {};
|
|
1472
|
-
define(IteratorPrototype, iteratorSymbol, function () {
|
|
1473
|
-
return this;
|
|
1474
|
-
});
|
|
1475
|
-
|
|
1476
|
-
var getProto = Object.getPrototypeOf;
|
|
1477
|
-
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
1478
|
-
if (NativeIteratorPrototype &&
|
|
1479
|
-
NativeIteratorPrototype !== Op &&
|
|
1480
|
-
hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
|
|
1481
|
-
// This environment has a native %IteratorPrototype%; use it instead
|
|
1482
|
-
// of the polyfill.
|
|
1483
|
-
IteratorPrototype = NativeIteratorPrototype;
|
|
1484
|
-
}
|
|
1485
|
-
|
|
1486
|
-
var Gp = GeneratorFunctionPrototype.prototype =
|
|
1487
|
-
Generator.prototype = Object.create(IteratorPrototype);
|
|
1488
|
-
GeneratorFunction.prototype = GeneratorFunctionPrototype;
|
|
1489
|
-
define(Gp, "constructor", GeneratorFunctionPrototype);
|
|
1490
|
-
define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
|
|
1491
|
-
GeneratorFunction.displayName = define(
|
|
1492
|
-
GeneratorFunctionPrototype,
|
|
1493
|
-
toStringTagSymbol,
|
|
1494
|
-
"GeneratorFunction"
|
|
1495
|
-
);
|
|
1496
|
-
|
|
1497
|
-
// Helper for defining the .next, .throw, and .return methods of the
|
|
1498
|
-
// Iterator interface in terms of a single ._invoke method.
|
|
1499
|
-
function defineIteratorMethods(prototype) {
|
|
1500
|
-
["next", "throw", "return"].forEach(function(method) {
|
|
1501
|
-
define(prototype, method, function(arg) {
|
|
1502
|
-
return this._invoke(method, arg);
|
|
1503
|
-
});
|
|
1504
|
-
});
|
|
1505
|
-
}
|
|
1506
|
-
|
|
1507
|
-
exports.isGeneratorFunction = function(genFun) {
|
|
1508
|
-
var ctor = typeof genFun === "function" && genFun.constructor;
|
|
1509
|
-
return ctor
|
|
1510
|
-
? ctor === GeneratorFunction ||
|
|
1511
|
-
// For the native GeneratorFunction constructor, the best we can
|
|
1512
|
-
// do is to check its .name property.
|
|
1513
|
-
(ctor.displayName || ctor.name) === "GeneratorFunction"
|
|
1514
|
-
: false;
|
|
1515
|
-
};
|
|
1516
|
-
|
|
1517
|
-
exports.mark = function(genFun) {
|
|
1518
|
-
if (Object.setPrototypeOf) {
|
|
1519
|
-
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
|
|
1520
|
-
} else {
|
|
1521
|
-
genFun.__proto__ = GeneratorFunctionPrototype;
|
|
1522
|
-
define(genFun, toStringTagSymbol, "GeneratorFunction");
|
|
1523
|
-
}
|
|
1524
|
-
genFun.prototype = Object.create(Gp);
|
|
1525
|
-
return genFun;
|
|
1526
|
-
};
|
|
1527
|
-
|
|
1528
|
-
// Within the body of any async function, `await x` is transformed to
|
|
1529
|
-
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
|
|
1530
|
-
// `hasOwn.call(value, "__await")` to determine if the yielded value is
|
|
1531
|
-
// meant to be awaited.
|
|
1532
|
-
exports.awrap = function(arg) {
|
|
1533
|
-
return { __await: arg };
|
|
1534
|
-
};
|
|
1535
|
-
|
|
1536
|
-
function AsyncIterator(generator, PromiseImpl) {
|
|
1537
|
-
function invoke(method, arg, resolve, reject) {
|
|
1538
|
-
var record = tryCatch(generator[method], generator, arg);
|
|
1539
|
-
if (record.type === "throw") {
|
|
1540
|
-
reject(record.arg);
|
|
1541
|
-
} else {
|
|
1542
|
-
var result = record.arg;
|
|
1543
|
-
var value = result.value;
|
|
1544
|
-
if (value &&
|
|
1545
|
-
typeof value === "object" &&
|
|
1546
|
-
hasOwn.call(value, "__await")) {
|
|
1547
|
-
return PromiseImpl.resolve(value.__await).then(function(value) {
|
|
1548
|
-
invoke("next", value, resolve, reject);
|
|
1549
|
-
}, function(err) {
|
|
1550
|
-
invoke("throw", err, resolve, reject);
|
|
1551
|
-
});
|
|
1552
|
-
}
|
|
1553
|
-
|
|
1554
|
-
return PromiseImpl.resolve(value).then(function(unwrapped) {
|
|
1555
|
-
// When a yielded Promise is resolved, its final value becomes
|
|
1556
|
-
// the .value of the Promise<{value,done}> result for the
|
|
1557
|
-
// current iteration.
|
|
1558
|
-
result.value = unwrapped;
|
|
1559
|
-
resolve(result);
|
|
1560
|
-
}, function(error) {
|
|
1561
|
-
// If a rejected Promise was yielded, throw the rejection back
|
|
1562
|
-
// into the async generator function so it can be handled there.
|
|
1563
|
-
return invoke("throw", error, resolve, reject);
|
|
1564
|
-
});
|
|
1565
|
-
}
|
|
1566
|
-
}
|
|
1567
|
-
|
|
1568
|
-
var previousPromise;
|
|
1569
|
-
|
|
1570
|
-
function enqueue(method, arg) {
|
|
1571
|
-
function callInvokeWithMethodAndArg() {
|
|
1572
|
-
return new PromiseImpl(function(resolve, reject) {
|
|
1573
|
-
invoke(method, arg, resolve, reject);
|
|
1574
|
-
});
|
|
1575
|
-
}
|
|
1576
|
-
|
|
1577
|
-
return previousPromise =
|
|
1578
|
-
// If enqueue has been called before, then we want to wait until
|
|
1579
|
-
// all previous Promises have been resolved before calling invoke,
|
|
1580
|
-
// so that results are always delivered in the correct order. If
|
|
1581
|
-
// enqueue has not been called before, then it is important to
|
|
1582
|
-
// call invoke immediately, without waiting on a callback to fire,
|
|
1583
|
-
// so that the async generator function has the opportunity to do
|
|
1584
|
-
// any necessary setup in a predictable way. This predictability
|
|
1585
|
-
// is why the Promise constructor synchronously invokes its
|
|
1586
|
-
// executor callback, and why async functions synchronously
|
|
1587
|
-
// execute code before the first await. Since we implement simple
|
|
1588
|
-
// async functions in terms of async generators, it is especially
|
|
1589
|
-
// important to get this right, even though it requires care.
|
|
1590
|
-
previousPromise ? previousPromise.then(
|
|
1591
|
-
callInvokeWithMethodAndArg,
|
|
1592
|
-
// Avoid propagating failures to Promises returned by later
|
|
1593
|
-
// invocations of the iterator.
|
|
1594
|
-
callInvokeWithMethodAndArg
|
|
1595
|
-
) : callInvokeWithMethodAndArg();
|
|
1596
|
-
}
|
|
1597
|
-
|
|
1598
|
-
// Define the unified helper method that is used to implement .next,
|
|
1599
|
-
// .throw, and .return (see defineIteratorMethods).
|
|
1600
|
-
this._invoke = enqueue;
|
|
1601
|
-
}
|
|
1602
|
-
|
|
1603
|
-
defineIteratorMethods(AsyncIterator.prototype);
|
|
1604
|
-
define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
1605
|
-
return this;
|
|
1606
|
-
});
|
|
1607
|
-
exports.AsyncIterator = AsyncIterator;
|
|
1608
|
-
|
|
1609
|
-
// Note that simple async functions are implemented on top of
|
|
1610
|
-
// AsyncIterator objects; they just return a Promise for the value of
|
|
1611
|
-
// the final result produced by the iterator.
|
|
1612
|
-
exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
1613
|
-
if (PromiseImpl === void 0) PromiseImpl = Promise;
|
|
1614
|
-
|
|
1615
|
-
var iter = new AsyncIterator(
|
|
1616
|
-
wrap(innerFn, outerFn, self, tryLocsList),
|
|
1617
|
-
PromiseImpl
|
|
1618
|
-
);
|
|
1619
|
-
|
|
1620
|
-
return exports.isGeneratorFunction(outerFn)
|
|
1621
|
-
? iter // If outerFn is a generator, return the full iterator.
|
|
1622
|
-
: iter.next().then(function(result) {
|
|
1623
|
-
return result.done ? result.value : iter.next();
|
|
1624
|
-
});
|
|
1625
|
-
};
|
|
1626
|
-
|
|
1627
|
-
function makeInvokeMethod(innerFn, self, context) {
|
|
1628
|
-
var state = GenStateSuspendedStart;
|
|
1629
|
-
|
|
1630
|
-
return function invoke(method, arg) {
|
|
1631
|
-
if (state === GenStateExecuting) {
|
|
1632
|
-
throw new Error("Generator is already running");
|
|
1633
|
-
}
|
|
1634
|
-
|
|
1635
|
-
if (state === GenStateCompleted) {
|
|
1636
|
-
if (method === "throw") {
|
|
1637
|
-
throw arg;
|
|
1638
|
-
}
|
|
1639
|
-
|
|
1640
|
-
// Be forgiving, per 25.3.3.3.3 of the spec:
|
|
1641
|
-
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
|
|
1642
|
-
return doneResult();
|
|
1643
|
-
}
|
|
1644
|
-
|
|
1645
|
-
context.method = method;
|
|
1646
|
-
context.arg = arg;
|
|
1647
|
-
|
|
1648
|
-
while (true) {
|
|
1649
|
-
var delegate = context.delegate;
|
|
1650
|
-
if (delegate) {
|
|
1651
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
1652
|
-
if (delegateResult) {
|
|
1653
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
1654
|
-
return delegateResult;
|
|
1655
|
-
}
|
|
1656
|
-
}
|
|
1657
|
-
|
|
1658
|
-
if (context.method === "next") {
|
|
1659
|
-
// Setting context._sent for legacy support of Babel's
|
|
1660
|
-
// function.sent implementation.
|
|
1661
|
-
context.sent = context._sent = context.arg;
|
|
1662
|
-
|
|
1663
|
-
} else if (context.method === "throw") {
|
|
1664
|
-
if (state === GenStateSuspendedStart) {
|
|
1665
|
-
state = GenStateCompleted;
|
|
1666
|
-
throw context.arg;
|
|
1667
|
-
}
|
|
1668
|
-
|
|
1669
|
-
context.dispatchException(context.arg);
|
|
1670
|
-
|
|
1671
|
-
} else if (context.method === "return") {
|
|
1672
|
-
context.abrupt("return", context.arg);
|
|
1673
|
-
}
|
|
1674
|
-
|
|
1675
|
-
state = GenStateExecuting;
|
|
1676
|
-
|
|
1677
|
-
var record = tryCatch(innerFn, self, context);
|
|
1678
|
-
if (record.type === "normal") {
|
|
1679
|
-
// If an exception is thrown from innerFn, we leave state ===
|
|
1680
|
-
// GenStateExecuting and loop back for another invocation.
|
|
1681
|
-
state = context.done
|
|
1682
|
-
? GenStateCompleted
|
|
1683
|
-
: GenStateSuspendedYield;
|
|
1684
|
-
|
|
1685
|
-
if (record.arg === ContinueSentinel) {
|
|
1686
|
-
continue;
|
|
1687
|
-
}
|
|
1688
|
-
|
|
1689
|
-
return {
|
|
1690
|
-
value: record.arg,
|
|
1691
|
-
done: context.done
|
|
1692
|
-
};
|
|
1693
|
-
|
|
1694
|
-
} else if (record.type === "throw") {
|
|
1695
|
-
state = GenStateCompleted;
|
|
1696
|
-
// Dispatch the exception by looping back around to the
|
|
1697
|
-
// context.dispatchException(context.arg) call above.
|
|
1698
|
-
context.method = "throw";
|
|
1699
|
-
context.arg = record.arg;
|
|
1700
|
-
}
|
|
1701
|
-
}
|
|
1702
|
-
};
|
|
1703
|
-
}
|
|
1704
|
-
|
|
1705
|
-
// Call delegate.iterator[context.method](context.arg) and handle the
|
|
1706
|
-
// result, either by returning a { value, done } result from the
|
|
1707
|
-
// delegate iterator, or by modifying context.method and context.arg,
|
|
1708
|
-
// setting context.delegate to null, and returning the ContinueSentinel.
|
|
1709
|
-
function maybeInvokeDelegate(delegate, context) {
|
|
1710
|
-
var method = delegate.iterator[context.method];
|
|
1711
|
-
if (method === undefined$1) {
|
|
1712
|
-
// A .throw or .return when the delegate iterator has no .throw
|
|
1713
|
-
// method always terminates the yield* loop.
|
|
1714
|
-
context.delegate = null;
|
|
1715
|
-
|
|
1716
|
-
if (context.method === "throw") {
|
|
1717
|
-
// Note: ["return"] must be used for ES3 parsing compatibility.
|
|
1718
|
-
if (delegate.iterator["return"]) {
|
|
1719
|
-
// If the delegate iterator has a return method, give it a
|
|
1720
|
-
// chance to clean up.
|
|
1721
|
-
context.method = "return";
|
|
1722
|
-
context.arg = undefined$1;
|
|
1723
|
-
maybeInvokeDelegate(delegate, context);
|
|
1724
|
-
|
|
1725
|
-
if (context.method === "throw") {
|
|
1726
|
-
// If maybeInvokeDelegate(context) changed context.method from
|
|
1727
|
-
// "return" to "throw", let that override the TypeError below.
|
|
1728
|
-
return ContinueSentinel;
|
|
1729
|
-
}
|
|
1730
|
-
}
|
|
1731
|
-
|
|
1732
|
-
context.method = "throw";
|
|
1733
|
-
context.arg = new TypeError(
|
|
1734
|
-
"The iterator does not provide a 'throw' method");
|
|
1735
|
-
}
|
|
1736
|
-
|
|
1737
|
-
return ContinueSentinel;
|
|
1738
|
-
}
|
|
1739
|
-
|
|
1740
|
-
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
1741
|
-
|
|
1742
|
-
if (record.type === "throw") {
|
|
1743
|
-
context.method = "throw";
|
|
1744
|
-
context.arg = record.arg;
|
|
1745
|
-
context.delegate = null;
|
|
1746
|
-
return ContinueSentinel;
|
|
1747
|
-
}
|
|
1748
|
-
|
|
1749
|
-
var info = record.arg;
|
|
1750
|
-
|
|
1751
|
-
if (! info) {
|
|
1752
|
-
context.method = "throw";
|
|
1753
|
-
context.arg = new TypeError("iterator result is not an object");
|
|
1754
|
-
context.delegate = null;
|
|
1755
|
-
return ContinueSentinel;
|
|
1756
|
-
}
|
|
1757
|
-
|
|
1758
|
-
if (info.done) {
|
|
1759
|
-
// Assign the result of the finished delegate to the temporary
|
|
1760
|
-
// variable specified by delegate.resultName (see delegateYield).
|
|
1761
|
-
context[delegate.resultName] = info.value;
|
|
1762
|
-
|
|
1763
|
-
// Resume execution at the desired location (see delegateYield).
|
|
1764
|
-
context.next = delegate.nextLoc;
|
|
1765
|
-
|
|
1766
|
-
// If context.method was "throw" but the delegate handled the
|
|
1767
|
-
// exception, let the outer generator proceed normally. If
|
|
1768
|
-
// context.method was "next", forget context.arg since it has been
|
|
1769
|
-
// "consumed" by the delegate iterator. If context.method was
|
|
1770
|
-
// "return", allow the original .return call to continue in the
|
|
1771
|
-
// outer generator.
|
|
1772
|
-
if (context.method !== "return") {
|
|
1773
|
-
context.method = "next";
|
|
1774
|
-
context.arg = undefined$1;
|
|
1775
|
-
}
|
|
1776
|
-
|
|
1777
|
-
} else {
|
|
1778
|
-
// Re-yield the result returned by the delegate method.
|
|
1779
|
-
return info;
|
|
1780
|
-
}
|
|
1781
|
-
|
|
1782
|
-
// The delegate iterator is finished, so forget it and continue with
|
|
1783
|
-
// the outer generator.
|
|
1784
|
-
context.delegate = null;
|
|
1785
|
-
return ContinueSentinel;
|
|
1786
|
-
}
|
|
1787
|
-
|
|
1788
|
-
// Define Generator.prototype.{next,throw,return} in terms of the
|
|
1789
|
-
// unified ._invoke helper method.
|
|
1790
|
-
defineIteratorMethods(Gp);
|
|
1791
|
-
|
|
1792
|
-
define(Gp, toStringTagSymbol, "Generator");
|
|
1793
|
-
|
|
1794
|
-
// A Generator should always return itself as the iterator object when the
|
|
1795
|
-
// @@iterator function is called on it. Some browsers' implementations of the
|
|
1796
|
-
// iterator prototype chain incorrectly implement this, causing the Generator
|
|
1797
|
-
// object to not be returned from this call. This ensures that doesn't happen.
|
|
1798
|
-
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
|
1799
|
-
define(Gp, iteratorSymbol, function() {
|
|
1800
|
-
return this;
|
|
1801
|
-
});
|
|
1802
|
-
|
|
1803
|
-
define(Gp, "toString", function() {
|
|
1804
|
-
return "[object Generator]";
|
|
1805
|
-
});
|
|
1806
|
-
|
|
1807
|
-
function pushTryEntry(locs) {
|
|
1808
|
-
var entry = { tryLoc: locs[0] };
|
|
1809
|
-
|
|
1810
|
-
if (1 in locs) {
|
|
1811
|
-
entry.catchLoc = locs[1];
|
|
1812
|
-
}
|
|
1813
|
-
|
|
1814
|
-
if (2 in locs) {
|
|
1815
|
-
entry.finallyLoc = locs[2];
|
|
1816
|
-
entry.afterLoc = locs[3];
|
|
1817
|
-
}
|
|
1818
|
-
|
|
1819
|
-
this.tryEntries.push(entry);
|
|
1820
|
-
}
|
|
1821
|
-
|
|
1822
|
-
function resetTryEntry(entry) {
|
|
1823
|
-
var record = entry.completion || {};
|
|
1824
|
-
record.type = "normal";
|
|
1825
|
-
delete record.arg;
|
|
1826
|
-
entry.completion = record;
|
|
1827
|
-
}
|
|
1828
|
-
|
|
1829
|
-
function Context(tryLocsList) {
|
|
1830
|
-
// The root entry object (effectively a try statement without a catch
|
|
1831
|
-
// or a finally block) gives us a place to store values thrown from
|
|
1832
|
-
// locations where there is no enclosing try statement.
|
|
1833
|
-
this.tryEntries = [{ tryLoc: "root" }];
|
|
1834
|
-
tryLocsList.forEach(pushTryEntry, this);
|
|
1835
|
-
this.reset(true);
|
|
1836
|
-
}
|
|
1837
|
-
|
|
1838
|
-
exports.keys = function(object) {
|
|
1839
|
-
var keys = [];
|
|
1840
|
-
for (var key in object) {
|
|
1841
|
-
keys.push(key);
|
|
1842
|
-
}
|
|
1843
|
-
keys.reverse();
|
|
1844
|
-
|
|
1845
|
-
// Rather than returning an object with a next method, we keep
|
|
1846
|
-
// things simple and return the next function itself.
|
|
1847
|
-
return function next() {
|
|
1848
|
-
while (keys.length) {
|
|
1849
|
-
var key = keys.pop();
|
|
1850
|
-
if (key in object) {
|
|
1851
|
-
next.value = key;
|
|
1852
|
-
next.done = false;
|
|
1853
|
-
return next;
|
|
1854
|
-
}
|
|
1855
|
-
}
|
|
1856
|
-
|
|
1857
|
-
// To avoid creating an additional object, we just hang the .value
|
|
1858
|
-
// and .done properties off the next function object itself. This
|
|
1859
|
-
// also ensures that the minifier will not anonymize the function.
|
|
1860
|
-
next.done = true;
|
|
1861
|
-
return next;
|
|
1862
|
-
};
|
|
1863
|
-
};
|
|
1864
|
-
|
|
1865
|
-
function values(iterable) {
|
|
1866
|
-
if (iterable) {
|
|
1867
|
-
var iteratorMethod = iterable[iteratorSymbol];
|
|
1868
|
-
if (iteratorMethod) {
|
|
1869
|
-
return iteratorMethod.call(iterable);
|
|
1870
|
-
}
|
|
1871
|
-
|
|
1872
|
-
if (typeof iterable.next === "function") {
|
|
1873
|
-
return iterable;
|
|
1874
|
-
}
|
|
1875
|
-
|
|
1876
|
-
if (!isNaN(iterable.length)) {
|
|
1877
|
-
var i = -1, next = function next() {
|
|
1878
|
-
while (++i < iterable.length) {
|
|
1879
|
-
if (hasOwn.call(iterable, i)) {
|
|
1880
|
-
next.value = iterable[i];
|
|
1881
|
-
next.done = false;
|
|
1882
|
-
return next;
|
|
1883
|
-
}
|
|
1884
|
-
}
|
|
1885
|
-
|
|
1886
|
-
next.value = undefined$1;
|
|
1887
|
-
next.done = true;
|
|
1888
|
-
|
|
1889
|
-
return next;
|
|
1890
|
-
};
|
|
1891
|
-
|
|
1892
|
-
return next.next = next;
|
|
1893
|
-
}
|
|
1894
|
-
}
|
|
1895
|
-
|
|
1896
|
-
// Return an iterator with no values.
|
|
1897
|
-
return { next: doneResult };
|
|
1898
|
-
}
|
|
1899
|
-
exports.values = values;
|
|
1900
|
-
|
|
1901
|
-
function doneResult() {
|
|
1902
|
-
return { value: undefined$1, done: true };
|
|
1903
|
-
}
|
|
1904
|
-
|
|
1905
|
-
Context.prototype = {
|
|
1906
|
-
constructor: Context,
|
|
1907
|
-
|
|
1908
|
-
reset: function(skipTempReset) {
|
|
1909
|
-
this.prev = 0;
|
|
1910
|
-
this.next = 0;
|
|
1911
|
-
// Resetting context._sent for legacy support of Babel's
|
|
1912
|
-
// function.sent implementation.
|
|
1913
|
-
this.sent = this._sent = undefined$1;
|
|
1914
|
-
this.done = false;
|
|
1915
|
-
this.delegate = null;
|
|
1916
|
-
|
|
1917
|
-
this.method = "next";
|
|
1918
|
-
this.arg = undefined$1;
|
|
1919
|
-
|
|
1920
|
-
this.tryEntries.forEach(resetTryEntry);
|
|
1921
|
-
|
|
1922
|
-
if (!skipTempReset) {
|
|
1923
|
-
for (var name in this) {
|
|
1924
|
-
// Not sure about the optimal order of these conditions:
|
|
1925
|
-
if (name.charAt(0) === "t" &&
|
|
1926
|
-
hasOwn.call(this, name) &&
|
|
1927
|
-
!isNaN(+name.slice(1))) {
|
|
1928
|
-
this[name] = undefined$1;
|
|
1929
|
-
}
|
|
1930
|
-
}
|
|
1931
|
-
}
|
|
1932
|
-
},
|
|
1933
|
-
|
|
1934
|
-
stop: function() {
|
|
1935
|
-
this.done = true;
|
|
1936
|
-
|
|
1937
|
-
var rootEntry = this.tryEntries[0];
|
|
1938
|
-
var rootRecord = rootEntry.completion;
|
|
1939
|
-
if (rootRecord.type === "throw") {
|
|
1940
|
-
throw rootRecord.arg;
|
|
1941
|
-
}
|
|
1942
|
-
|
|
1943
|
-
return this.rval;
|
|
1944
|
-
},
|
|
1945
|
-
|
|
1946
|
-
dispatchException: function(exception) {
|
|
1947
|
-
if (this.done) {
|
|
1948
|
-
throw exception;
|
|
1949
|
-
}
|
|
1950
|
-
|
|
1951
|
-
var context = this;
|
|
1952
|
-
function handle(loc, caught) {
|
|
1953
|
-
record.type = "throw";
|
|
1954
|
-
record.arg = exception;
|
|
1955
|
-
context.next = loc;
|
|
1956
|
-
|
|
1957
|
-
if (caught) {
|
|
1958
|
-
// If the dispatched exception was caught by a catch block,
|
|
1959
|
-
// then let that catch block handle the exception normally.
|
|
1960
|
-
context.method = "next";
|
|
1961
|
-
context.arg = undefined$1;
|
|
1962
|
-
}
|
|
1963
|
-
|
|
1964
|
-
return !! caught;
|
|
1965
|
-
}
|
|
1966
|
-
|
|
1967
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
1968
|
-
var entry = this.tryEntries[i];
|
|
1969
|
-
var record = entry.completion;
|
|
1970
|
-
|
|
1971
|
-
if (entry.tryLoc === "root") {
|
|
1972
|
-
// Exception thrown outside of any try block that could handle
|
|
1973
|
-
// it, so set the completion value of the entire function to
|
|
1974
|
-
// throw the exception.
|
|
1975
|
-
return handle("end");
|
|
1976
|
-
}
|
|
1977
|
-
|
|
1978
|
-
if (entry.tryLoc <= this.prev) {
|
|
1979
|
-
var hasCatch = hasOwn.call(entry, "catchLoc");
|
|
1980
|
-
var hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
1981
|
-
|
|
1982
|
-
if (hasCatch && hasFinally) {
|
|
1983
|
-
if (this.prev < entry.catchLoc) {
|
|
1984
|
-
return handle(entry.catchLoc, true);
|
|
1985
|
-
} else if (this.prev < entry.finallyLoc) {
|
|
1986
|
-
return handle(entry.finallyLoc);
|
|
1987
|
-
}
|
|
1988
|
-
|
|
1989
|
-
} else if (hasCatch) {
|
|
1990
|
-
if (this.prev < entry.catchLoc) {
|
|
1991
|
-
return handle(entry.catchLoc, true);
|
|
1992
|
-
}
|
|
1993
|
-
|
|
1994
|
-
} else if (hasFinally) {
|
|
1995
|
-
if (this.prev < entry.finallyLoc) {
|
|
1996
|
-
return handle(entry.finallyLoc);
|
|
1997
|
-
}
|
|
1998
|
-
|
|
1999
|
-
} else {
|
|
2000
|
-
throw new Error("try statement without catch or finally");
|
|
2001
|
-
}
|
|
2002
|
-
}
|
|
2003
|
-
}
|
|
2004
|
-
},
|
|
2005
|
-
|
|
2006
|
-
abrupt: function(type, arg) {
|
|
2007
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
2008
|
-
var entry = this.tryEntries[i];
|
|
2009
|
-
if (entry.tryLoc <= this.prev &&
|
|
2010
|
-
hasOwn.call(entry, "finallyLoc") &&
|
|
2011
|
-
this.prev < entry.finallyLoc) {
|
|
2012
|
-
var finallyEntry = entry;
|
|
2013
|
-
break;
|
|
2014
|
-
}
|
|
2015
|
-
}
|
|
2016
|
-
|
|
2017
|
-
if (finallyEntry &&
|
|
2018
|
-
(type === "break" ||
|
|
2019
|
-
type === "continue") &&
|
|
2020
|
-
finallyEntry.tryLoc <= arg &&
|
|
2021
|
-
arg <= finallyEntry.finallyLoc) {
|
|
2022
|
-
// Ignore the finally entry if control is not jumping to a
|
|
2023
|
-
// location outside the try/catch block.
|
|
2024
|
-
finallyEntry = null;
|
|
2025
|
-
}
|
|
2026
|
-
|
|
2027
|
-
var record = finallyEntry ? finallyEntry.completion : {};
|
|
2028
|
-
record.type = type;
|
|
2029
|
-
record.arg = arg;
|
|
2030
|
-
|
|
2031
|
-
if (finallyEntry) {
|
|
2032
|
-
this.method = "next";
|
|
2033
|
-
this.next = finallyEntry.finallyLoc;
|
|
2034
|
-
return ContinueSentinel;
|
|
2035
|
-
}
|
|
2036
|
-
|
|
2037
|
-
return this.complete(record);
|
|
2038
|
-
},
|
|
2039
|
-
|
|
2040
|
-
complete: function(record, afterLoc) {
|
|
2041
|
-
if (record.type === "throw") {
|
|
2042
|
-
throw record.arg;
|
|
2043
|
-
}
|
|
2044
|
-
|
|
2045
|
-
if (record.type === "break" ||
|
|
2046
|
-
record.type === "continue") {
|
|
2047
|
-
this.next = record.arg;
|
|
2048
|
-
} else if (record.type === "return") {
|
|
2049
|
-
this.rval = this.arg = record.arg;
|
|
2050
|
-
this.method = "return";
|
|
2051
|
-
this.next = "end";
|
|
2052
|
-
} else if (record.type === "normal" && afterLoc) {
|
|
2053
|
-
this.next = afterLoc;
|
|
2054
|
-
}
|
|
2055
|
-
|
|
2056
|
-
return ContinueSentinel;
|
|
2057
|
-
},
|
|
2058
|
-
|
|
2059
|
-
finish: function(finallyLoc) {
|
|
2060
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
2061
|
-
var entry = this.tryEntries[i];
|
|
2062
|
-
if (entry.finallyLoc === finallyLoc) {
|
|
2063
|
-
this.complete(entry.completion, entry.afterLoc);
|
|
2064
|
-
resetTryEntry(entry);
|
|
2065
|
-
return ContinueSentinel;
|
|
2066
|
-
}
|
|
2067
|
-
}
|
|
2068
|
-
},
|
|
2069
|
-
|
|
2070
|
-
"catch": function(tryLoc) {
|
|
2071
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
2072
|
-
var entry = this.tryEntries[i];
|
|
2073
|
-
if (entry.tryLoc === tryLoc) {
|
|
2074
|
-
var record = entry.completion;
|
|
2075
|
-
if (record.type === "throw") {
|
|
2076
|
-
var thrown = record.arg;
|
|
2077
|
-
resetTryEntry(entry);
|
|
2078
|
-
}
|
|
2079
|
-
return thrown;
|
|
2080
|
-
}
|
|
2081
|
-
}
|
|
2082
|
-
|
|
2083
|
-
// The context.catch method must only be called with a location
|
|
2084
|
-
// argument that corresponds to a known catch block.
|
|
2085
|
-
throw new Error("illegal catch attempt");
|
|
2086
|
-
},
|
|
2087
|
-
|
|
2088
|
-
delegateYield: function(iterable, resultName, nextLoc) {
|
|
2089
|
-
this.delegate = {
|
|
2090
|
-
iterator: values(iterable),
|
|
2091
|
-
resultName: resultName,
|
|
2092
|
-
nextLoc: nextLoc
|
|
2093
|
-
};
|
|
2094
|
-
|
|
2095
|
-
if (this.method === "next") {
|
|
2096
|
-
// Deliberately forget the last sent value so that we don't
|
|
2097
|
-
// accidentally pass it on to the delegate.
|
|
2098
|
-
this.arg = undefined$1;
|
|
2099
|
-
}
|
|
2100
|
-
|
|
2101
|
-
return ContinueSentinel;
|
|
2102
|
-
}
|
|
2103
|
-
};
|
|
2104
|
-
|
|
2105
|
-
// Regardless of whether this script is executing as a CommonJS module
|
|
2106
|
-
// or not, return the runtime object so that we can declare the variable
|
|
2107
|
-
// regeneratorRuntime in the outer scope, which allows this module to be
|
|
2108
|
-
// injected easily by `bin/regenerator --include-runtime script.js`.
|
|
2109
|
-
return exports;
|
|
2110
|
-
|
|
2111
|
-
}(
|
|
2112
|
-
// If this script is executing as a CommonJS module, use module.exports
|
|
2113
|
-
// as the regeneratorRuntime namespace. Otherwise create a new empty
|
|
2114
|
-
// object. Either way, the resulting object will be used to initialize
|
|
2115
|
-
// the regeneratorRuntime variable at the top of this file.
|
|
2116
|
-
module.exports
|
|
2117
|
-
));
|
|
2118
|
-
|
|
2119
|
-
try {
|
|
2120
|
-
regeneratorRuntime = runtime;
|
|
2121
|
-
} catch (accidentalStrictMode) {
|
|
2122
|
-
// This module should not be running in strict mode, so the above
|
|
2123
|
-
// assignment should always work unless something is misconfigured. Just
|
|
2124
|
-
// in case runtime.js accidentally runs in strict mode, in modern engines
|
|
2125
|
-
// we can explicitly access globalThis. In older engines we can escape
|
|
2126
|
-
// strict mode using a global Function call. This could conceivably fail
|
|
2127
|
-
// if a Content Security Policy forbids using Function, but in that case
|
|
2128
|
-
// the proper solution is to fix the accidental strict mode problem. If
|
|
2129
|
-
// you've misconfigured your bundler to force strict mode and applied a
|
|
2130
|
-
// CSP to forbid Function, and you're not willing to fix either of those
|
|
2131
|
-
// problems, please detail your unique predicament in a GitHub issue.
|
|
2132
|
-
if (typeof globalThis === "object") {
|
|
2133
|
-
globalThis.regeneratorRuntime = runtime;
|
|
2134
|
-
} else {
|
|
2135
|
-
Function("r", "regeneratorRuntime = r")(runtime);
|
|
2136
|
-
}
|
|
2137
|
-
}
|
|
2138
|
-
});
|
|
2139
|
-
|
|
2140
|
-
/**
|
|
2141
|
-
* A specialized version of `_.reduce` for arrays without support for
|
|
2142
|
-
* iteratee shorthands.
|
|
2143
|
-
*
|
|
2144
|
-
* @private
|
|
2145
|
-
* @param {Array} [array] The array to iterate over.
|
|
2146
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
2147
|
-
* @param {*} [accumulator] The initial value.
|
|
2148
|
-
* @param {boolean} [initAccum] Specify using the first element of `array` as
|
|
2149
|
-
* the initial value.
|
|
2150
|
-
* @returns {*} Returns the accumulated value.
|
|
2151
|
-
*/
|
|
2152
|
-
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
|
2153
|
-
var index = -1,
|
|
2154
|
-
length = array == null ? 0 : array.length;
|
|
2155
|
-
|
|
2156
|
-
if (initAccum && length) {
|
|
2157
|
-
accumulator = array[++index];
|
|
2158
|
-
}
|
|
2159
|
-
while (++index < length) {
|
|
2160
|
-
accumulator = iteratee(accumulator, array[index], index, array);
|
|
2161
|
-
}
|
|
2162
|
-
return accumulator;
|
|
2163
|
-
}
|
|
2164
|
-
|
|
2165
|
-
var _arrayReduce = arrayReduce;
|
|
2166
|
-
|
|
2167
|
-
/**
|
|
2168
|
-
* The base implementation of `_.propertyOf` without support for deep paths.
|
|
2169
|
-
*
|
|
2170
|
-
* @private
|
|
2171
|
-
* @param {Object} object The object to query.
|
|
2172
|
-
* @returns {Function} Returns the new accessor function.
|
|
2173
|
-
*/
|
|
2174
|
-
function basePropertyOf(object) {
|
|
2175
|
-
return function(key) {
|
|
2176
|
-
return object == null ? undefined : object[key];
|
|
2177
|
-
};
|
|
2178
|
-
}
|
|
2179
|
-
|
|
2180
|
-
var _basePropertyOf = basePropertyOf;
|
|
2181
|
-
|
|
2182
|
-
/** Used to map Latin Unicode letters to basic Latin letters. */
|
|
2183
|
-
var deburredLetters = {
|
|
2184
|
-
// Latin-1 Supplement block.
|
|
2185
|
-
'\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
|
|
2186
|
-
'\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
|
|
2187
|
-
'\xc7': 'C', '\xe7': 'c',
|
|
2188
|
-
'\xd0': 'D', '\xf0': 'd',
|
|
2189
|
-
'\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
|
|
2190
|
-
'\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
|
|
2191
|
-
'\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
|
|
2192
|
-
'\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
|
|
2193
|
-
'\xd1': 'N', '\xf1': 'n',
|
|
2194
|
-
'\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
|
|
2195
|
-
'\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
|
|
2196
|
-
'\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
|
|
2197
|
-
'\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
|
|
2198
|
-
'\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
|
|
2199
|
-
'\xc6': 'Ae', '\xe6': 'ae',
|
|
2200
|
-
'\xde': 'Th', '\xfe': 'th',
|
|
2201
|
-
'\xdf': 'ss',
|
|
2202
|
-
// Latin Extended-A block.
|
|
2203
|
-
'\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
|
|
2204
|
-
'\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
|
|
2205
|
-
'\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
|
|
2206
|
-
'\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
|
|
2207
|
-
'\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
|
|
2208
|
-
'\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
|
|
2209
|
-
'\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
|
|
2210
|
-
'\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
|
|
2211
|
-
'\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
|
|
2212
|
-
'\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
|
|
2213
|
-
'\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
|
|
2214
|
-
'\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
|
|
2215
|
-
'\u0134': 'J', '\u0135': 'j',
|
|
2216
|
-
'\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
|
|
2217
|
-
'\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
|
|
2218
|
-
'\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
|
|
2219
|
-
'\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
|
|
2220
|
-
'\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
|
|
2221
|
-
'\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
|
|
2222
|
-
'\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
|
|
2223
|
-
'\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
|
|
2224
|
-
'\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
|
|
2225
|
-
'\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
|
|
2226
|
-
'\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
|
|
2227
|
-
'\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
|
|
2228
|
-
'\u0163': 't', '\u0165': 't', '\u0167': 't',
|
|
2229
|
-
'\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
|
|
2230
|
-
'\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
|
|
2231
|
-
'\u0174': 'W', '\u0175': 'w',
|
|
2232
|
-
'\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
|
|
2233
|
-
'\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
|
|
2234
|
-
'\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
|
|
2235
|
-
'\u0132': 'IJ', '\u0133': 'ij',
|
|
2236
|
-
'\u0152': 'Oe', '\u0153': 'oe',
|
|
2237
|
-
'\u0149': "'n", '\u017f': 's'
|
|
2238
|
-
};
|
|
2239
|
-
|
|
2240
|
-
/**
|
|
2241
|
-
* Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
|
|
2242
|
-
* letters to basic Latin letters.
|
|
2243
|
-
*
|
|
2244
|
-
* @private
|
|
2245
|
-
* @param {string} letter The matched letter to deburr.
|
|
2246
|
-
* @returns {string} Returns the deburred letter.
|
|
2247
|
-
*/
|
|
2248
|
-
var deburrLetter = _basePropertyOf(deburredLetters);
|
|
2249
|
-
|
|
2250
|
-
var _deburrLetter = deburrLetter;
|
|
2251
|
-
|
|
2252
|
-
/** Used to match Latin Unicode letters (excluding mathematical operators). */
|
|
2253
|
-
var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
|
|
2254
|
-
|
|
2255
|
-
/** Used to compose unicode character classes. */
|
|
2256
|
-
var rsComboMarksRange$1 = '\\u0300-\\u036f',
|
|
2257
|
-
reComboHalfMarksRange$1 = '\\ufe20-\\ufe2f',
|
|
2258
|
-
rsComboSymbolsRange$1 = '\\u20d0-\\u20ff',
|
|
2259
|
-
rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1;
|
|
2260
|
-
|
|
2261
|
-
/** Used to compose unicode capture groups. */
|
|
2262
|
-
var rsCombo$1 = '[' + rsComboRange$1 + ']';
|
|
2263
|
-
|
|
2264
|
-
/**
|
|
2265
|
-
* Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
|
|
2266
|
-
* [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
|
|
2267
|
-
*/
|
|
2268
|
-
var reComboMark = RegExp(rsCombo$1, 'g');
|
|
2269
|
-
|
|
2270
|
-
/**
|
|
2271
|
-
* Deburrs `string` by converting
|
|
2272
|
-
* [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
|
|
2273
|
-
* and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
|
|
2274
|
-
* letters to basic Latin letters and removing
|
|
2275
|
-
* [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
|
|
2276
|
-
*
|
|
2277
|
-
* @static
|
|
2278
|
-
* @memberOf _
|
|
2279
|
-
* @since 3.0.0
|
|
2280
|
-
* @category String
|
|
2281
|
-
* @param {string} [string=''] The string to deburr.
|
|
2282
|
-
* @returns {string} Returns the deburred string.
|
|
2283
|
-
* @example
|
|
2284
|
-
*
|
|
2285
|
-
* _.deburr('déjà vu');
|
|
2286
|
-
* // => 'deja vu'
|
|
2287
|
-
*/
|
|
2288
|
-
function deburr(string) {
|
|
2289
|
-
string = toString_1(string);
|
|
2290
|
-
return string && string.replace(reLatin, _deburrLetter).replace(reComboMark, '');
|
|
2291
|
-
}
|
|
2292
|
-
|
|
2293
|
-
var deburr_1 = deburr;
|
|
2294
|
-
|
|
2295
|
-
/** Used to match words composed of alphanumeric characters. */
|
|
2296
|
-
var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
|
|
2297
|
-
|
|
2298
|
-
/**
|
|
2299
|
-
* Splits an ASCII `string` into an array of its words.
|
|
2300
|
-
*
|
|
2301
|
-
* @private
|
|
2302
|
-
* @param {string} The string to inspect.
|
|
2303
|
-
* @returns {Array} Returns the words of `string`.
|
|
2304
|
-
*/
|
|
2305
|
-
function asciiWords(string) {
|
|
2306
|
-
return string.match(reAsciiWord) || [];
|
|
2307
|
-
}
|
|
2308
|
-
|
|
2309
|
-
var _asciiWords = asciiWords;
|
|
2310
|
-
|
|
2311
|
-
/** Used to detect strings that need a more robust regexp to match words. */
|
|
2312
|
-
var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
|
|
2313
|
-
|
|
2314
|
-
/**
|
|
2315
|
-
* Checks if `string` contains a word composed of Unicode symbols.
|
|
2316
|
-
*
|
|
2317
|
-
* @private
|
|
2318
|
-
* @param {string} string The string to inspect.
|
|
2319
|
-
* @returns {boolean} Returns `true` if a word is found, else `false`.
|
|
2320
|
-
*/
|
|
2321
|
-
function hasUnicodeWord(string) {
|
|
2322
|
-
return reHasUnicodeWord.test(string);
|
|
2323
|
-
}
|
|
2324
|
-
|
|
2325
|
-
var _hasUnicodeWord = hasUnicodeWord;
|
|
2326
|
-
|
|
2327
|
-
/** Used to compose unicode character classes. */
|
|
2328
|
-
var rsAstralRange = '\\ud800-\\udfff',
|
|
2329
|
-
rsComboMarksRange = '\\u0300-\\u036f',
|
|
2330
|
-
reComboHalfMarksRange = '\\ufe20-\\ufe2f',
|
|
2331
|
-
rsComboSymbolsRange = '\\u20d0-\\u20ff',
|
|
2332
|
-
rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
|
|
2333
|
-
rsDingbatRange = '\\u2700-\\u27bf',
|
|
2334
|
-
rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
|
|
2335
|
-
rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
|
|
2336
|
-
rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
|
|
2337
|
-
rsPunctuationRange = '\\u2000-\\u206f',
|
|
2338
|
-
rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
|
|
2339
|
-
rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
|
|
2340
|
-
rsVarRange = '\\ufe0e\\ufe0f',
|
|
2341
|
-
rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
|
|
2342
|
-
|
|
2343
|
-
/** Used to compose unicode capture groups. */
|
|
2344
|
-
var rsApos$1 = "['\u2019]",
|
|
2345
|
-
rsBreak = '[' + rsBreakRange + ']',
|
|
2346
|
-
rsCombo = '[' + rsComboRange + ']',
|
|
2347
|
-
rsDigits = '\\d+',
|
|
2348
|
-
rsDingbat = '[' + rsDingbatRange + ']',
|
|
2349
|
-
rsLower = '[' + rsLowerRange + ']',
|
|
2350
|
-
rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
|
|
2351
|
-
rsFitz = '\\ud83c[\\udffb-\\udfff]',
|
|
2352
|
-
rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
|
|
2353
|
-
rsNonAstral = '[^' + rsAstralRange + ']',
|
|
2354
|
-
rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
|
|
2355
|
-
rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
|
|
2356
|
-
rsUpper = '[' + rsUpperRange + ']',
|
|
2357
|
-
rsZWJ = '\\u200d';
|
|
2358
|
-
|
|
2359
|
-
/** Used to compose unicode regexes. */
|
|
2360
|
-
var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
|
|
2361
|
-
rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
|
|
2362
|
-
rsOptContrLower = '(?:' + rsApos$1 + '(?:d|ll|m|re|s|t|ve))?',
|
|
2363
|
-
rsOptContrUpper = '(?:' + rsApos$1 + '(?:D|LL|M|RE|S|T|VE))?',
|
|
2364
|
-
reOptMod = rsModifier + '?',
|
|
2365
|
-
rsOptVar = '[' + rsVarRange + ']?',
|
|
2366
|
-
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
|
|
2367
|
-
rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
|
|
2368
|
-
rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
|
|
2369
|
-
rsSeq = rsOptVar + reOptMod + rsOptJoin,
|
|
2370
|
-
rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq;
|
|
2371
|
-
|
|
2372
|
-
/** Used to match complex or compound words. */
|
|
2373
|
-
var reUnicodeWord = RegExp([
|
|
2374
|
-
rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
|
|
2375
|
-
rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
|
|
2376
|
-
rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
|
|
2377
|
-
rsUpper + '+' + rsOptContrUpper,
|
|
2378
|
-
rsOrdUpper,
|
|
2379
|
-
rsOrdLower,
|
|
2380
|
-
rsDigits,
|
|
2381
|
-
rsEmoji
|
|
2382
|
-
].join('|'), 'g');
|
|
2383
|
-
|
|
2384
|
-
/**
|
|
2385
|
-
* Splits a Unicode `string` into an array of its words.
|
|
2386
|
-
*
|
|
2387
|
-
* @private
|
|
2388
|
-
* @param {string} The string to inspect.
|
|
2389
|
-
* @returns {Array} Returns the words of `string`.
|
|
2390
|
-
*/
|
|
2391
|
-
function unicodeWords(string) {
|
|
2392
|
-
return string.match(reUnicodeWord) || [];
|
|
2393
|
-
}
|
|
2394
|
-
|
|
2395
|
-
var _unicodeWords = unicodeWords;
|
|
2396
|
-
|
|
2397
|
-
/**
|
|
2398
|
-
* Splits `string` into an array of its words.
|
|
2399
|
-
*
|
|
2400
|
-
* @static
|
|
2401
|
-
* @memberOf _
|
|
2402
|
-
* @since 3.0.0
|
|
2403
|
-
* @category String
|
|
2404
|
-
* @param {string} [string=''] The string to inspect.
|
|
2405
|
-
* @param {RegExp|string} [pattern] The pattern to match words.
|
|
2406
|
-
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
2407
|
-
* @returns {Array} Returns the words of `string`.
|
|
2408
|
-
* @example
|
|
2409
|
-
*
|
|
2410
|
-
* _.words('fred, barney, & pebbles');
|
|
2411
|
-
* // => ['fred', 'barney', 'pebbles']
|
|
2412
|
-
*
|
|
2413
|
-
* _.words('fred, barney, & pebbles', /[^, ]+/g);
|
|
2414
|
-
* // => ['fred', 'barney', '&', 'pebbles']
|
|
2415
|
-
*/
|
|
2416
|
-
function words(string, pattern, guard) {
|
|
2417
|
-
string = toString_1(string);
|
|
2418
|
-
pattern = guard ? undefined : pattern;
|
|
2419
|
-
|
|
2420
|
-
if (pattern === undefined) {
|
|
2421
|
-
return _hasUnicodeWord(string) ? _unicodeWords(string) : _asciiWords(string);
|
|
2422
|
-
}
|
|
2423
|
-
return string.match(pattern) || [];
|
|
2424
|
-
}
|
|
2425
|
-
|
|
2426
|
-
var words_1 = words;
|
|
2427
|
-
|
|
2428
|
-
/** Used to compose unicode capture groups. */
|
|
2429
|
-
var rsApos = "['\u2019]";
|
|
2430
|
-
|
|
2431
|
-
/** Used to match apostrophes. */
|
|
2432
|
-
var reApos = RegExp(rsApos, 'g');
|
|
2433
|
-
|
|
2434
|
-
/**
|
|
2435
|
-
* Creates a function like `_.camelCase`.
|
|
2436
|
-
*
|
|
2437
|
-
* @private
|
|
2438
|
-
* @param {Function} callback The function to combine each word.
|
|
2439
|
-
* @returns {Function} Returns the new compounder function.
|
|
2440
|
-
*/
|
|
2441
|
-
function createCompounder(callback) {
|
|
2442
|
-
return function(string) {
|
|
2443
|
-
return _arrayReduce(words_1(deburr_1(string).replace(reApos, '')), callback, '');
|
|
2444
|
-
};
|
|
2445
|
-
}
|
|
2446
|
-
|
|
2447
|
-
var _createCompounder = createCompounder;
|
|
2448
|
-
|
|
2449
|
-
/**
|
|
2450
|
-
* Converts `string`, as space separated words, to upper case.
|
|
2451
|
-
*
|
|
2452
|
-
* @static
|
|
2453
|
-
* @memberOf _
|
|
2454
|
-
* @since 4.0.0
|
|
2455
|
-
* @category String
|
|
2456
|
-
* @param {string} [string=''] The string to convert.
|
|
2457
|
-
* @returns {string} Returns the upper cased string.
|
|
2458
|
-
* @example
|
|
2459
|
-
*
|
|
2460
|
-
* _.upperCase('--foo-bar');
|
|
2461
|
-
* // => 'FOO BAR'
|
|
2462
|
-
*
|
|
2463
|
-
* _.upperCase('fooBar');
|
|
2464
|
-
* // => 'FOO BAR'
|
|
2465
|
-
*
|
|
2466
|
-
* _.upperCase('__foo_bar__');
|
|
2467
|
-
* // => 'FOO BAR'
|
|
2468
|
-
*/
|
|
2469
|
-
var upperCase = _createCompounder(function(result, word, index) {
|
|
2470
|
-
return result + (index ? ' ' : '') + word.toUpperCase();
|
|
2471
|
-
});
|
|
2472
|
-
|
|
2473
|
-
var upperCase_1 = upperCase;
|
|
2474
|
-
|
|
2475
|
-
/**
|
|
2476
|
-
* Converts `string`, as space separated words, to lower case.
|
|
2477
|
-
*
|
|
2478
|
-
* @static
|
|
2479
|
-
* @memberOf _
|
|
2480
|
-
* @since 4.0.0
|
|
2481
|
-
* @category String
|
|
2482
|
-
* @param {string} [string=''] The string to convert.
|
|
2483
|
-
* @returns {string} Returns the lower cased string.
|
|
2484
|
-
* @example
|
|
2485
|
-
*
|
|
2486
|
-
* _.lowerCase('--Foo-Bar--');
|
|
2487
|
-
* // => 'foo bar'
|
|
2488
|
-
*
|
|
2489
|
-
* _.lowerCase('fooBar');
|
|
2490
|
-
* // => 'foo bar'
|
|
2491
|
-
*
|
|
2492
|
-
* _.lowerCase('__FOO_BAR__');
|
|
2493
|
-
* // => 'foo bar'
|
|
2494
|
-
*/
|
|
2495
|
-
var lowerCase = _createCompounder(function(result, word, index) {
|
|
2496
|
-
return result + (index ? ' ' : '') + word.toLowerCase();
|
|
2497
|
-
});
|
|
2498
|
-
|
|
2499
|
-
var lowerCase_1 = lowerCase;
|
|
2500
|
-
|
|
2501
46
|
function truncate() {
|
|
2502
47
|
var string = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
|
|
2503
48
|
var limit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 60;
|
|
@@ -2524,7 +69,7 @@ var timestampToFormat = function timestampToFormat(value, unit, suffix, timestam
|
|
|
2524
69
|
var localizedMonth = month;
|
|
2525
70
|
|
|
2526
71
|
if (isUpperCase) {
|
|
2527
|
-
localizedMonth =
|
|
72
|
+
localizedMonth = lodash.upperCase(month);
|
|
2528
73
|
}
|
|
2529
74
|
|
|
2530
75
|
var year = dateTime.getFullYear();
|
|
@@ -2537,7 +82,7 @@ var timestampToFormat = function timestampToFormat(value, unit, suffix, timestam
|
|
|
2537
82
|
var timetoShow;
|
|
2538
83
|
|
|
2539
84
|
if (localizedMonths) {
|
|
2540
|
-
localizedMonth =
|
|
85
|
+
localizedMonth = lodash.get(localizedMonths, [lodash.lowerCase(month)]) || month;
|
|
2541
86
|
}
|
|
2542
87
|
|
|
2543
88
|
if (localizedMeridiem) {
|
|
@@ -2567,17 +112,17 @@ function formatter(value, unit, suffix, date, config) {
|
|
|
2567
112
|
var showDateForUnits = ["day", "week", "month", "year"]; // suffix here refers to ago
|
|
2568
113
|
// unit here refers to seconds, minute, minutes,...
|
|
2569
114
|
|
|
2570
|
-
var localizedSuffix =
|
|
115
|
+
var localizedSuffix = lodash.get(config, ["localizedPublishTime", suffix]) || suffix;
|
|
2571
116
|
var localizedUnitOfTime;
|
|
2572
117
|
|
|
2573
118
|
if (unit === "hour" && value > 23 || showDateForUnits.indexOf(unit) !== -1) {
|
|
2574
119
|
return timestampToFormat(value, unit, suffix, date, config);
|
|
2575
120
|
} else if (value > 1) {
|
|
2576
|
-
localizedUnitOfTime =
|
|
121
|
+
localizedUnitOfTime = lodash.get(config, ["localizedPublishTime", "".concat(unit, "s")]) || "".concat(unit, "s");
|
|
2577
122
|
return "".concat(value, " ").concat(localizedUnitOfTime, " ").concat(localizedSuffix);
|
|
2578
123
|
}
|
|
2579
124
|
|
|
2580
|
-
localizedUnitOfTime =
|
|
125
|
+
localizedUnitOfTime = lodash.get(config, ["localizedPublishTime", unit]) || unit;
|
|
2581
126
|
return "".concat(value, " ").concat(localizedUnitOfTime, " ").concat(localizedSuffix, " ");
|
|
2582
127
|
}
|
|
2583
128
|
|
|
@@ -2630,10 +175,10 @@ var clientWidths = {
|
|
|
2630
175
|
tablet: 1024
|
|
2631
176
|
};
|
|
2632
177
|
var clientWidth = function clientWidth(device) {
|
|
2633
|
-
var foundDeviceWidth =
|
|
178
|
+
var foundDeviceWidth = lodash.get(clientWidths, device);
|
|
2634
179
|
|
|
2635
180
|
if (foundDeviceWidth) {
|
|
2636
|
-
return
|
|
181
|
+
return lodash.get(global, "document.documentElement.clientWidth") <= foundDeviceWidth;
|
|
2637
182
|
}
|
|
2638
183
|
|
|
2639
184
|
return false;
|
|
@@ -2675,7 +220,7 @@ var getSlug = function getSlug(collection) {
|
|
|
2675
220
|
var isSection = collection.template === "section";
|
|
2676
221
|
|
|
2677
222
|
if (isSection) {
|
|
2678
|
-
var sectionId =
|
|
223
|
+
var sectionId = lodash.get(collection, ["metadata", "section", "0", "id"], "");
|
|
2679
224
|
var sections = config.sections;
|
|
2680
225
|
var section = sections && sections.find(function (section) {
|
|
2681
226
|
return section.id === sectionId;
|
|
@@ -2691,11 +236,11 @@ function isExternalStory() {
|
|
|
2691
236
|
storyTemplate = _story$storyTemplate === void 0 ? "" : _story$storyTemplate,
|
|
2692
237
|
_story$metadata = story.metadata,
|
|
2693
238
|
metadata = _story$metadata === void 0 ? {} : _story$metadata;
|
|
2694
|
-
return storyTemplate === "news-elsewhere" ?
|
|
239
|
+
return storyTemplate === "news-elsewhere" ? lodash.get(metadata, ["reference-url"], "") : "";
|
|
2695
240
|
} // Adds target='_blank' attribute to anchor tags if not present
|
|
2696
241
|
var isEmpty = function isEmpty(value) {
|
|
2697
242
|
return value == null || // From standard.js: Always use === - but value == null is allowed to check null || undefined
|
|
2698
|
-
|
|
243
|
+
_typeof__default["default"](value) === "object" && Object.entries(value).length === 0 && value.constructor === Object || typeof value === "string" && value.trim().length === 0;
|
|
2699
244
|
};
|
|
2700
245
|
PropTypes__default["default"].shape({
|
|
2701
246
|
"sketches-host": PropTypes__default["default"].string,
|
|
@@ -2709,7 +254,7 @@ PropTypes__default["default"].shape({
|
|
|
2709
254
|
});
|
|
2710
255
|
var getStoryUrl = function getStoryUrl(story) {
|
|
2711
256
|
var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
2712
|
-
return
|
|
257
|
+
return lodash.get(story, ["story-template"]) === "news-elsewhere" ? lodash.get(story, ["metadata", "reference-url"], "") : story.url || defaultValue;
|
|
2713
258
|
};
|
|
2714
259
|
var navigateTo = function navigateTo(dispatch) {
|
|
2715
260
|
var url = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
@@ -2792,7 +337,7 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
2792
337
|
_ref$navigate = _ref.navigate,
|
|
2793
338
|
navigate = _ref$navigate === void 0 ? true : _ref$navigate;
|
|
2794
339
|
var collectionTitle = useStateValue() || {};
|
|
2795
|
-
var showRowTitle =
|
|
340
|
+
var showRowTitle = lodash.get(collectionTitle, ["showRowTitle"], true);
|
|
2796
341
|
var supportedTemplates = ["borderLeft", "borderBottom", "crossLine", "borderBottomFull"];
|
|
2797
342
|
var templateStyle = supportedTemplates.includes(collectionNameTemplate) ? " collection-".concat(collectionNameTemplate) : "";
|
|
2798
343
|
var slug = navigate && collection && getSlug(collection, config) || "";
|
|
@@ -2868,7 +413,7 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
2868
413
|
borderBottom: borderBottomFullStyle
|
|
2869
414
|
},
|
|
2870
415
|
"data-test-id": "collection-name",
|
|
2871
|
-
className: ("arr--collection-name arrow-component ".concat(templateStyle) ? "arr--collection-name arrow-component ".concat(templateStyle) + " " : "") +
|
|
416
|
+
className: ("arr--collection-name arrow-component ".concat(templateStyle) ? "arr--collection-name arrow-component ".concat(templateStyle) + " " : "") + _getClassName__default["default"]("collection ".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$d)
|
|
2872
417
|
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2873
418
|
className: "arr-collection-name-border-left collection-name-m_border-left__3_pYw",
|
|
2874
419
|
style: {
|
|
@@ -2905,73 +450,12 @@ CollectionNameBase.defaultProps = {
|
|
|
2905
450
|
|
|
2906
451
|
function mapStateToProps$1(state) {
|
|
2907
452
|
return {
|
|
2908
|
-
config:
|
|
453
|
+
config: lodash.get(state, ["qt", "config"], {})
|
|
2909
454
|
};
|
|
2910
455
|
}
|
|
2911
456
|
|
|
2912
457
|
var CollectionName = reactRedux.connect(mapStateToProps$1)(CollectionNameBase);
|
|
2913
458
|
|
|
2914
|
-
function _arrayWithHoles(arr) {
|
|
2915
|
-
if (Array.isArray(arr)) return arr;
|
|
2916
|
-
}
|
|
2917
|
-
|
|
2918
|
-
function _iterableToArrayLimit(arr, i) {
|
|
2919
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
2920
|
-
|
|
2921
|
-
if (_i == null) return;
|
|
2922
|
-
var _arr = [];
|
|
2923
|
-
var _n = true;
|
|
2924
|
-
var _d = false;
|
|
2925
|
-
|
|
2926
|
-
var _s, _e;
|
|
2927
|
-
|
|
2928
|
-
try {
|
|
2929
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
2930
|
-
_arr.push(_s.value);
|
|
2931
|
-
|
|
2932
|
-
if (i && _arr.length === i) break;
|
|
2933
|
-
}
|
|
2934
|
-
} catch (err) {
|
|
2935
|
-
_d = true;
|
|
2936
|
-
_e = err;
|
|
2937
|
-
} finally {
|
|
2938
|
-
try {
|
|
2939
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
2940
|
-
} finally {
|
|
2941
|
-
if (_d) throw _e;
|
|
2942
|
-
}
|
|
2943
|
-
}
|
|
2944
|
-
|
|
2945
|
-
return _arr;
|
|
2946
|
-
}
|
|
2947
|
-
|
|
2948
|
-
function _arrayLikeToArray(arr, len) {
|
|
2949
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
2950
|
-
|
|
2951
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
2952
|
-
arr2[i] = arr[i];
|
|
2953
|
-
}
|
|
2954
|
-
|
|
2955
|
-
return arr2;
|
|
2956
|
-
}
|
|
2957
|
-
|
|
2958
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
2959
|
-
if (!o) return;
|
|
2960
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
2961
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
2962
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
2963
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
2964
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
2965
|
-
}
|
|
2966
|
-
|
|
2967
|
-
function _nonIterableRest() {
|
|
2968
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
2969
|
-
}
|
|
2970
|
-
|
|
2971
|
-
function _slicedToArray(arr, i) {
|
|
2972
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
2973
|
-
}
|
|
2974
|
-
|
|
2975
459
|
var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
|
|
2976
460
|
var _ref$width = _ref.width,
|
|
2977
461
|
width = _ref$width === void 0 ? 40 : _ref$width,
|
|
@@ -3112,7 +596,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3112
596
|
return null;
|
|
3113
597
|
} : _config$StoryTemplate;
|
|
3114
598
|
var showImagePlaceholder = reactRedux.useSelector(function (state) {
|
|
3115
|
-
return
|
|
599
|
+
return lodash.get(state, ["qt", "config", "showPlaceholder"]);
|
|
3116
600
|
});
|
|
3117
601
|
var getPlaceholderStyleName = showImagePlaceholder ? "placeholder" : "";
|
|
3118
602
|
var fullBleed = FullBleed ? "" : "with-padding";
|
|
@@ -3121,7 +605,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3121
605
|
var heroImageMobClasses = isHorizontalMobile ? "right-padding-mob" : "";
|
|
3122
606
|
|
|
3123
607
|
var getPadding = function getPadding(aspectRatio) {
|
|
3124
|
-
var _aspectRatio =
|
|
608
|
+
var _aspectRatio = _slicedToArray__default["default"](aspectRatio, 2),
|
|
3125
609
|
height = _aspectRatio[0],
|
|
3126
610
|
width = _aspectRatio[1];
|
|
3127
611
|
|
|
@@ -3133,7 +617,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3133
617
|
return 0;
|
|
3134
618
|
};
|
|
3135
619
|
|
|
3136
|
-
var _aspectRatio2 =
|
|
620
|
+
var _aspectRatio2 = _slicedToArray__default["default"](aspectRatio, 2),
|
|
3137
621
|
mobileAspectRatio = _aspectRatio2[0],
|
|
3138
622
|
_aspectRatio2$ = _aspectRatio2[1],
|
|
3139
623
|
desktopAspectRatio = _aspectRatio2$ === void 0 ? mobileAspectRatio : _aspectRatio2$;
|
|
@@ -3141,8 +625,8 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3141
625
|
var isMobile = clientWidth("mobile");
|
|
3142
626
|
var imageAspectRatio = isMobile ? mobileAspectRatio : desktopAspectRatio;
|
|
3143
627
|
var imagePadding = isMobile ? getPadding(mobileAspectRatio) : getPadding(desktopAspectRatio);
|
|
3144
|
-
var slug =
|
|
3145
|
-
var hyperLink =
|
|
628
|
+
var slug = lodash.get(story, ["hero-image-s3-key"]) || lodash.get(story, ["alternative", "home", "default", "hero-image", "hero-image-s3-key"]);
|
|
629
|
+
var hyperLink = lodash.get(story, ["hero-image-hyperlink"], "");
|
|
3146
630
|
|
|
3147
631
|
var fallbackImage = function fallbackImage() {
|
|
3148
632
|
if (!slug) {
|
|
@@ -3151,7 +635,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3151
635
|
style: {
|
|
3152
636
|
paddingTop: imagePadding + "%"
|
|
3153
637
|
},
|
|
3154
|
-
className: "arr--responsive-hero-image " +
|
|
638
|
+
className: "arr--responsive-hero-image " + _getClassName__default["default"]("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$c)
|
|
3155
639
|
}, /*#__PURE__*/React__default["default"].createElement("img", {
|
|
3156
640
|
className: "qt-image",
|
|
3157
641
|
"data-src": "".concat(fallbackImageUrl),
|
|
@@ -3164,7 +648,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3164
648
|
style: {
|
|
3165
649
|
paddingTop: imagePadding + "%"
|
|
3166
650
|
},
|
|
3167
|
-
className: "arr--fallback-hero-image " +
|
|
651
|
+
className: "arr--fallback-hero-image " + _getClassName__default["default"]("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$c)
|
|
3168
652
|
}, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
|
|
3169
653
|
storyTemplate: story["story-template"]
|
|
3170
654
|
}), /*#__PURE__*/React__default["default"].createElement(FallbackImage, null)) : null);
|
|
@@ -3174,7 +658,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3174
658
|
style: {
|
|
3175
659
|
paddingTop: imagePadding + "%"
|
|
3176
660
|
},
|
|
3177
|
-
className: "arr--responsive-hero-image " +
|
|
661
|
+
className: "arr--responsive-hero-image " + _getClassName__default["default"]("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$c)
|
|
3178
662
|
}, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
|
|
3179
663
|
storyTemplate: story["story-template"]
|
|
3180
664
|
}), /*#__PURE__*/React__default["default"].createElement(components.ResponsiveHeroImage, {
|
|
@@ -3193,13 +677,13 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3193
677
|
|
|
3194
678
|
return story && (isStoryPageImage ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3195
679
|
"data-test-id": "arr--hero-image",
|
|
3196
|
-
className: "arr--hero-image " +
|
|
680
|
+
className: "arr--hero-image " + _getClassName__default["default"]("".concat(heroImageClass, " ").concat(fullBleed, " ").concat(heroImageMobClasses), _styleModuleImportMap$c)
|
|
3197
681
|
}, fallbackImage()) : /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3198
682
|
"data-test-id": "arr--hero-image",
|
|
3199
683
|
href: getStoryUrl(story, "/".concat(story.slug)),
|
|
3200
684
|
externalLink: isExternalStory(story),
|
|
3201
685
|
"aria-label": "fallback-hero-image",
|
|
3202
|
-
className: "arr--hero-image " +
|
|
686
|
+
className: "arr--hero-image " + _getClassName__default["default"]("".concat(heroImageClass, " ").concat(fullBleed, " ").concat(heroImageMobClasses), _styleModuleImportMap$c)
|
|
3203
687
|
}, fallbackImage()));
|
|
3204
688
|
};
|
|
3205
689
|
HeroImage.propTypes = {
|
|
@@ -3476,8 +960,8 @@ var Headline = function Headline(_ref) {
|
|
|
3476
960
|
enablePremiumStoryIcon = _premiumStoryIconConf3 === void 0 ? false : _premiumStoryIconConf3,
|
|
3477
961
|
_premiumStoryIconConf4 = premiumStoryIconConfig.showLiveIcon,
|
|
3478
962
|
showLiveIcon = _premiumStoryIconConf4 === void 0 ? false : _premiumStoryIconConf4;
|
|
3479
|
-
var alternateHeadline =
|
|
3480
|
-
var premiumStory = enablePremiumStoryIcon &&
|
|
963
|
+
var alternateHeadline = lodash.get(story, ["alternative", "home", "default", "headline"]);
|
|
964
|
+
var premiumStory = enablePremiumStoryIcon && lodash.get(story, ["access"]) === "subscription";
|
|
3481
965
|
var headline = alternateHeadline || story.headline;
|
|
3482
966
|
var HeaderTag = "h" + headerLevel;
|
|
3483
967
|
|
|
@@ -3503,10 +987,10 @@ var Headline = function Headline(_ref) {
|
|
|
3503
987
|
var textColor = getTextColor(configData.theme);
|
|
3504
988
|
var wrapperClass = premiumStory ? "wrapper" : "";
|
|
3505
989
|
var iconSize = "24px";
|
|
3506
|
-
var enableLiveIcon = showLiveIcon && story["story-template"] === "live-blog" && !
|
|
990
|
+
var enableLiveIcon = showLiveIcon && story["story-template"] === "live-blog" && !lodash.get(story, ["metadata", "is-closed"], false);
|
|
3507
991
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3508
992
|
"data-test-id": "headline",
|
|
3509
|
-
className: "arrow-component arr--headline " +
|
|
993
|
+
className: "arrow-component arr--headline " + _getClassName__default["default"](wrapperClass, _styleModuleImportMap$b)
|
|
3510
994
|
}, premiumStory && /*#__PURE__*/React__default["default"].createElement(PremiumStoryIcon, {
|
|
3511
995
|
width: iconSize,
|
|
3512
996
|
height: iconSize,
|
|
@@ -3518,9 +1002,9 @@ var Headline = function Headline(_ref) {
|
|
|
3518
1002
|
externalLink: isExternalStory(story),
|
|
3519
1003
|
"aria-label": "headline"
|
|
3520
1004
|
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
3521
|
-
className:
|
|
1005
|
+
className: _getClassName__default["default"]("headline ".concat(textColor), _styleModuleImportMap$b)
|
|
3522
1006
|
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
3523
|
-
className:
|
|
1007
|
+
className: _getClassName__default["default"]("headline ".concat(textColor), _styleModuleImportMap$b)
|
|
3524
1008
|
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline));
|
|
3525
1009
|
};
|
|
3526
1010
|
Headline.propTypes = {
|
|
@@ -3561,9 +1045,9 @@ var SectionTag = function SectionTag(_ref) {
|
|
|
3561
1045
|
borderColor = _ref$borderColor === void 0 ? "" : _ref$borderColor,
|
|
3562
1046
|
isLightTheme = _ref.isLightTheme;
|
|
3563
1047
|
var config = useStateValue() || {};
|
|
3564
|
-
var isSection =
|
|
3565
|
-
var templateFromRowContext =
|
|
3566
|
-
var section =
|
|
1048
|
+
var isSection = lodash.get(config, ["showSection"], true);
|
|
1049
|
+
var templateFromRowContext = lodash.get(config, ["sectionTagTemplate"]);
|
|
1050
|
+
var section = lodash.get(story, ["sections", 0], "");
|
|
3567
1051
|
var supportedTemplates = ["borderBottomSml", "borderLeft", "solid"];
|
|
3568
1052
|
var getUrl = section ? section["section-url"] : "/";
|
|
3569
1053
|
var colorToApplyContrast = template === "solid" || templateFromRowContext === "solid" ? borderColor : config.theme;
|
|
@@ -3585,7 +1069,7 @@ var SectionTag = function SectionTag(_ref) {
|
|
|
3585
1069
|
style: {
|
|
3586
1070
|
backgroundColor: templateStyle.includes("section-solid") ? sectionTagBorderColor : ""
|
|
3587
1071
|
},
|
|
3588
|
-
className: "section-tag arrow-component " +
|
|
1072
|
+
className: "section-tag arrow-component " + _getClassName__default["default"]("".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$a)
|
|
3589
1073
|
}, templateStyle.includes("section-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3590
1074
|
className: "section-m_border-left__2oUyp",
|
|
3591
1075
|
style: {
|
|
@@ -3628,13 +1112,13 @@ var TimeStamp = function TimeStamp(_ref) {
|
|
|
3628
1112
|
_ref$config = _ref.config,
|
|
3629
1113
|
config = _ref$config === void 0 ? {} : _ref$config;
|
|
3630
1114
|
var configState = useStateValue() || {};
|
|
3631
|
-
var isTime =
|
|
1115
|
+
var isTime = lodash.get(config, ["showTime"], lodash.get(configState, ["showTime"], true));
|
|
3632
1116
|
var time = story["last-published-at"] || story["first-published-at"];
|
|
3633
1117
|
var isBottomClasses = isBottom ? "bottom-fix" : "";
|
|
3634
1118
|
var textColor = getTextColor(configState.theme);
|
|
3635
1119
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isTime && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3636
1120
|
"data-test-id": "publish-time",
|
|
3637
|
-
className: "time arr--publish-time " +
|
|
1121
|
+
className: "time arr--publish-time " + _getClassName__default["default"]("time ".concat(textColor, " ").concat(isBottomClasses), _styleModuleImportMap$9)
|
|
3638
1122
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3639
1123
|
className: "timestamp-m_time-wrapper__3O2lM"
|
|
3640
1124
|
}, getTimeStamp(time, formatter, config))));
|
|
@@ -3669,9 +1153,9 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3669
1153
|
_ref$config = _ref.config,
|
|
3670
1154
|
config = _ref$config === void 0 ? {} : _ref$config;
|
|
3671
1155
|
var configData = useStateValue() || {};
|
|
3672
|
-
var isAuthor =
|
|
1156
|
+
var isAuthor = lodash.get(configData, ["showAuthor"], true);
|
|
3673
1157
|
|
|
3674
|
-
var _get =
|
|
1158
|
+
var _get = lodash.get(story, ["authors", "0"], ""),
|
|
3675
1159
|
avatarUrl = _get["avatar-url"],
|
|
3676
1160
|
avatarS3Key = _get["avatar-s3-key"],
|
|
3677
1161
|
authorName = _get.name,
|
|
@@ -3679,7 +1163,7 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3679
1163
|
|
|
3680
1164
|
var isBottomClasses = isBottom ? "bottom-fix" : "";
|
|
3681
1165
|
var textColor = getTextColor(configData.theme);
|
|
3682
|
-
var mountAt =
|
|
1166
|
+
var mountAt = lodash.get(config, ["mountAt"], "");
|
|
3683
1167
|
|
|
3684
1168
|
var authorImage = function authorImage(dir) {
|
|
3685
1169
|
if (!avatarUrl && !avatarS3Key) {
|
|
@@ -3688,7 +1172,7 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3688
1172
|
|
|
3689
1173
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3690
1174
|
"data-test-id": "author-image",
|
|
3691
|
-
className:
|
|
1175
|
+
className: _getClassName__default["default"]("author-image ".concat(dir, "-image"), _styleModuleImportMap$8)
|
|
3692
1176
|
}, /*#__PURE__*/React__default["default"].createElement("figure", null, avatarS3Key ? /*#__PURE__*/React__default["default"].createElement(components.ResponsiveImage, {
|
|
3693
1177
|
slug: avatarS3Key,
|
|
3694
1178
|
"aspect-ratio": [1, 1],
|
|
@@ -3705,7 +1189,7 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3705
1189
|
var isPrefix = function isPrefix(dir) {
|
|
3706
1190
|
if (prefix) {
|
|
3707
1191
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3708
|
-
className: "arr-author-prefix " +
|
|
1192
|
+
className: "arr-author-prefix " + _getClassName__default["default"]("prefix ".concat(textColor), _styleModuleImportMap$8)
|
|
3709
1193
|
}, prefix);
|
|
3710
1194
|
}
|
|
3711
1195
|
|
|
@@ -3715,16 +1199,16 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3715
1199
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3716
1200
|
href: "".concat(mountAt, "/author/") + slug,
|
|
3717
1201
|
"aria-label": "author-name",
|
|
3718
|
-
className: "author-name arr-author-name arrow-component " +
|
|
1202
|
+
className: "author-name arr-author-name arrow-component " + _getClassName__default["default"]("author ".concat(isBottomClasses), _styleModuleImportMap$8)
|
|
3719
1203
|
}, isPrefix("ltr"), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3720
1204
|
"data-test-id": "author-name",
|
|
3721
|
-
className: "author-name " +
|
|
1205
|
+
className: "author-name " + _getClassName__default["default"]("author-name ".concat(textColor), _styleModuleImportMap$8)
|
|
3722
1206
|
}, authorName || story["author-name"]), !prefix && isPrefix("rtl")));
|
|
3723
1207
|
};
|
|
3724
1208
|
|
|
3725
1209
|
function mapStateToProps(state) {
|
|
3726
1210
|
return {
|
|
3727
|
-
config:
|
|
1211
|
+
config: lodash.get(state, ["qt", "config"], {})
|
|
3728
1212
|
};
|
|
3729
1213
|
}
|
|
3730
1214
|
|
|
@@ -3761,7 +1245,7 @@ var Dot = function Dot(_ref) {
|
|
|
3761
1245
|
_ref$color = _ref.color,
|
|
3762
1246
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
3763
1247
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3764
|
-
className:
|
|
1248
|
+
className: _getClassName__default["default"](color, _styleModuleImportMap$7)
|
|
3765
1249
|
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3766
1250
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3767
1251
|
width: width,
|
|
@@ -3797,7 +1281,7 @@ var Divider = function Divider(_ref) {
|
|
|
3797
1281
|
_ref$color = _ref.color,
|
|
3798
1282
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
3799
1283
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3800
|
-
className:
|
|
1284
|
+
className: _getClassName__default["default"](color, _styleModuleImportMap$6)
|
|
3801
1285
|
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3802
1286
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3803
1287
|
width: width,
|
|
@@ -3829,14 +1313,14 @@ var ReadTime = function ReadTime(_ref) {
|
|
|
3829
1313
|
_ref$isLightTheme = _ref.isLightTheme,
|
|
3830
1314
|
isLightTheme = _ref$isLightTheme === void 0 ? false : _ref$isLightTheme;
|
|
3831
1315
|
var config = useStateValue() || {};
|
|
3832
|
-
var showReadTime =
|
|
3833
|
-
var readTime =
|
|
1316
|
+
var showReadTime = lodash.get(config, ["showReadTime"]) || lodash.get(opts, ["showReadTime"], true);
|
|
1317
|
+
var readTime = lodash.get(story, ["read-time"], 0);
|
|
3834
1318
|
var textColor = isLightTheme ? "light" : getTextColor(config.theme);
|
|
3835
1319
|
if (!showReadTime || !readTime) return null;
|
|
3836
|
-
var timeToRead =
|
|
1320
|
+
var timeToRead = lodash.get(opts, ["localizedTimeToRead"]) || "min read";
|
|
3837
1321
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3838
1322
|
"data-test-id": "read-time",
|
|
3839
|
-
className: "arrow-component arr--read-time " +
|
|
1323
|
+
className: "arrow-component arr--read-time " + _getClassName__default["default"]("read-time-wrapper ".concat(textColor), _styleModuleImportMap$5)
|
|
3840
1324
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3841
1325
|
className: "read-time-indicator read-time-m_dot-indicator__3Sqh2"
|
|
3842
1326
|
}, /*#__PURE__*/React__default["default"].createElement(Dot, {
|
|
@@ -3872,9 +1356,9 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3872
1356
|
config = _ref$config === void 0 ? {} : _ref$config,
|
|
3873
1357
|
isLightTheme = _ref.isLightTheme;
|
|
3874
1358
|
var configState = useStateValue() || {};
|
|
3875
|
-
var isAuthor =
|
|
3876
|
-
var isTime =
|
|
3877
|
-
var isReadTime =
|
|
1359
|
+
var isAuthor = lodash.get(config, ["showAuthor"], lodash.get(configState, ["showAuthor"], true));
|
|
1360
|
+
var isTime = lodash.get(config, ["showTime"], lodash.get(configState, ["showTime"], true));
|
|
1361
|
+
var isReadTime = lodash.get(configState, ["showReadTime"], true);
|
|
3878
1362
|
var isBottomClasses = isBottom ? "bottom-fix" : "";
|
|
3879
1363
|
var seperatorStyle = separator === "dot" ? "dot" : "dash";
|
|
3880
1364
|
var textColor = isLightTheme ? "light" : getTextColor(configState.theme);
|
|
@@ -3894,7 +1378,7 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3894
1378
|
var getTimeStamp = function getTimeStamp() {
|
|
3895
1379
|
if (!isTime) return null;
|
|
3896
1380
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3897
|
-
className: "arr-separator " +
|
|
1381
|
+
className: "arr-separator " + _getClassName__default["default"]("".concat(seperatorStyle), _styleModuleImportMap$4)
|
|
3898
1382
|
}, getSeparator()), /*#__PURE__*/React__default["default"].createElement(TimeStamp, {
|
|
3899
1383
|
story: story,
|
|
3900
1384
|
config: config
|
|
@@ -3906,7 +1390,7 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3906
1390
|
};
|
|
3907
1391
|
|
|
3908
1392
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3909
|
-
className: "arr--author-time " +
|
|
1393
|
+
className: "arr--author-time " + _getClassName__default["default"]("author-time-wrapper ".concat(isBottomClasses), _styleModuleImportMap$4)
|
|
3910
1394
|
}, isAuthor ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Author, {
|
|
3911
1395
|
story: story,
|
|
3912
1396
|
isBottom: true,
|
|
@@ -3964,7 +1448,7 @@ var StorycardContent = function StorycardContent(_ref) {
|
|
|
3964
1448
|
backgroundColor: theme,
|
|
3965
1449
|
color: textColor
|
|
3966
1450
|
},
|
|
3967
|
-
className: "arr--content-wrapper " +
|
|
1451
|
+
className: "arr--content-wrapper " + _getClassName__default["default"]("wrapper ".concat(borderTemplate, " ").concat(horizontalCard), _styleModuleImportMap$3)
|
|
3968
1452
|
}, children || /*#__PURE__*/React__default["default"].createElement(DefaultStoryCardContent, {
|
|
3969
1453
|
story: story,
|
|
3970
1454
|
headerLevel: headerLevel,
|
|
@@ -4033,7 +1517,7 @@ var Subheadline = function Subheadline(_ref) {
|
|
|
4033
1517
|
forceShowAtom = _ref.forceShowAtom,
|
|
4034
1518
|
showFullContent = _ref.showFullContent;
|
|
4035
1519
|
var config = useStateValue() || {};
|
|
4036
|
-
var subheadline = forceShowAtom ||
|
|
1520
|
+
var subheadline = forceShowAtom || lodash.get(config, ["showSubheadline"], true);
|
|
4037
1521
|
if (!subheadline) return null;
|
|
4038
1522
|
var textColor = getTextColor(config.theme);
|
|
4039
1523
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -4041,7 +1525,7 @@ var Subheadline = function Subheadline(_ref) {
|
|
|
4041
1525
|
WebkitLineClamp: lineClamp
|
|
4042
1526
|
},
|
|
4043
1527
|
"data-test-id": "subheadline",
|
|
4044
|
-
className: ("p-alt arr--sub-headline arrow-component ".concat(clazzName) ? "p-alt arr--sub-headline arrow-component ".concat(clazzName) + " " : "") +
|
|
1528
|
+
className: ("p-alt arr--sub-headline arrow-component ".concat(clazzName) ? "p-alt arr--sub-headline arrow-component ".concat(clazzName) + " " : "") + _getClassName__default["default"]("subheadline ".concat(textColor), _styleModuleImportMap$2)
|
|
4045
1529
|
}, showFullContent || typeof lineClamp === "number" ? story.subheadline : truncate(story.subheadline, truncateChars, true));
|
|
4046
1530
|
};
|
|
4047
1531
|
Subheadline.propTypes = {
|
|
@@ -4133,7 +1617,7 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
4133
1617
|
backgroundColor: theme,
|
|
4134
1618
|
color: textColor
|
|
4135
1619
|
},
|
|
4136
|
-
className: "arr--story-card " +
|
|
1620
|
+
className: "arr--story-card " + _getClassName__default["default"]("card ".concat(horizontalCardStyle, " ").concat(borderTemplate, " ").concat(textColor, " ").concat(bgImageClasses, " ").concat(bgImgContentOverlapClass, " ").concat(horizontalMobileClasses), _styleModuleImportMap$1)
|
|
4137
1621
|
}, children || defaultStorycard);
|
|
4138
1622
|
};
|
|
4139
1623
|
|
|
@@ -4174,7 +1658,7 @@ var DefaultStoryCard = function DefaultStoryCard(_ref2) {
|
|
|
4174
1658
|
isHorizontalMobile: isHorizontalMobile,
|
|
4175
1659
|
aspectRatio: aspectRatio
|
|
4176
1660
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4177
|
-
className: "arr--story-content " +
|
|
1661
|
+
className: "arr--story-content " + _getClassName__default["default"]("content ".concat(alignment), _styleModuleImportMap$1)
|
|
4178
1662
|
}, /*#__PURE__*/React__default["default"].createElement(SectionTag, {
|
|
4179
1663
|
story: story,
|
|
4180
1664
|
borderColor: SectionTagborderColor
|
|
@@ -4252,21 +1736,6 @@ StoryCard.defaultProps = {
|
|
|
4252
1736
|
isHorizontalWithImageLast: false
|
|
4253
1737
|
};
|
|
4254
1738
|
|
|
4255
|
-
function _defineProperty(obj, key, value) {
|
|
4256
|
-
if (key in obj) {
|
|
4257
|
-
Object.defineProperty(obj, key, {
|
|
4258
|
-
value: value,
|
|
4259
|
-
enumerable: true,
|
|
4260
|
-
configurable: true,
|
|
4261
|
-
writable: true
|
|
4262
|
-
});
|
|
4263
|
-
} else {
|
|
4264
|
-
obj[key] = value;
|
|
4265
|
-
}
|
|
4266
|
-
|
|
4267
|
-
return obj;
|
|
4268
|
-
}
|
|
4269
|
-
|
|
4270
1739
|
var _styleModuleImportMap = {
|
|
4271
1740
|
"./load-more.m.css": {
|
|
4272
1741
|
"button": "load-more-m_button__1mmf1",
|
|
@@ -4278,7 +1747,7 @@ var _styleModuleImportMap = {
|
|
|
4278
1747
|
|
|
4279
1748
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4280
1749
|
|
|
4281
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
1750
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4282
1751
|
var LoadmoreButton = function LoadmoreButton(_ref) {
|
|
4283
1752
|
var _ref$config = _ref.config,
|
|
4284
1753
|
config = _ref$config === void 0 ? {} : _ref$config,
|
|
@@ -4302,14 +1771,14 @@ var LoadmoreButton = function LoadmoreButton(_ref) {
|
|
|
4302
1771
|
return template === "SubsequentLoadCount" ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4303
1772
|
onClick: onClick,
|
|
4304
1773
|
"data-test-id": "load-more",
|
|
4305
|
-
className: "arr--button " +
|
|
1774
|
+
className: "arr--button " + _getClassName__default["default"]("button ".concat(textColor, " default"), _styleModuleImportMap)
|
|
4306
1775
|
}, buttonText) : /*#__PURE__*/React__default["default"].createElement(components.LinkBase, {
|
|
4307
1776
|
href: slug,
|
|
4308
1777
|
navigateTo: navigate,
|
|
4309
1778
|
"data-test-id": "load-more",
|
|
4310
1779
|
"aria-label": "load-more"
|
|
4311
1780
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4312
|
-
className: "arr--button " +
|
|
1781
|
+
className: "arr--button " + _getClassName__default["default"]("button ".concat(textColor, " default"), _styleModuleImportMap)
|
|
4313
1782
|
}, buttonText));
|
|
4314
1783
|
};
|
|
4315
1784
|
LoadmoreButton.propTypes = {
|
|
@@ -4344,7 +1813,7 @@ var ThreeColSixStoriesBase = function ThreeColSixStoriesBase(_ref) {
|
|
|
4344
1813
|
_config$footerButton = config.footerButton,
|
|
4345
1814
|
footerButton = _config$footerButton === void 0 ? "" : _config$footerButton;
|
|
4346
1815
|
|
|
4347
|
-
var _get =
|
|
1816
|
+
var _get = lodash.get(slotConfig, [0], {}),
|
|
4348
1817
|
_get$type = _get.type,
|
|
4349
1818
|
type = _get$type === void 0 ? "story" : _get$type,
|
|
4350
1819
|
component = _get.component;
|
|
@@ -4361,7 +1830,7 @@ var ThreeColSixStoriesBase = function ThreeColSixStoriesBase(_ref) {
|
|
|
4361
1830
|
var items = type !== "story" ? itemsArray : components.collectionToStories(collection);
|
|
4362
1831
|
var dispatch = reactRedux.useDispatch();
|
|
4363
1832
|
var qtConfig = reactRedux.useSelector(function (state) {
|
|
4364
|
-
return
|
|
1833
|
+
return lodash.get(state, ["qt", "config"], {});
|
|
4365
1834
|
});
|
|
4366
1835
|
var url = generateNavigateSlug(collection, qtConfig);
|
|
4367
1836
|
|