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