@quintype/arrow 3.15.1-perf.1 → 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.
Files changed (167) hide show
  1. package/atoms/Author/index.js +48 -2128
  2. package/atoms/Author/styles.arrow.css +1 -1
  3. package/atoms/AuthorWithTime/index.js +116 -2556
  4. package/atoms/AuthorWithTime/styles.arrow.css +1 -1
  5. package/atoms/CollectionName/index.js +48 -2127
  6. package/atoms/CollectionName/styles.arrow.css +1 -1
  7. package/atoms/ExtendedLoadMore/{index-6f8c780e.js → index-0f809dd9.js} +73 -62
  8. package/atoms/ExtendedLoadMore/index-142f015c.js +476 -0
  9. package/atoms/ExtendedLoadMore/{index-2d713010.js → index-37a9ccff.js} +63 -47
  10. package/atoms/ExtendedLoadMore/{index-8345922c.js → index-446679c8.js} +67 -51
  11. package/atoms/ExtendedLoadMore/{index-6daa674c.js → index-44f97338.js} +86 -68
  12. package/atoms/ExtendedLoadMore/{index-c8f346d0.js → index-57dd4870.js} +80 -64
  13. package/atoms/ExtendedLoadMore/{index-7eb05b3d.js → index-66dd4dbd.js} +70 -54
  14. package/atoms/ExtendedLoadMore/{index-6cb56d1a.js → index-8462c597.js} +93 -80
  15. package/atoms/ExtendedLoadMore/{index-aa8b8ab8.js → index-93cb06d1.js} +252 -226
  16. package/atoms/ExtendedLoadMore/index-afd44863.js +95 -0
  17. package/atoms/ExtendedLoadMore/{index-5a7900ba.js → index-b5754c5d.js} +67 -53
  18. package/atoms/ExtendedLoadMore/{index-4191a84c.js → index-bbaf526e.js} +78 -62
  19. package/atoms/ExtendedLoadMore/{index-99af722e.js → index-cfb262ef.js} +65 -48
  20. package/atoms/ExtendedLoadMore/index.js +20 -5
  21. package/atoms/ExtendedLoadMore/styles.arrow.css +1 -1
  22. package/atoms/Headline/index.js +95 -2175
  23. package/atoms/Headline/styles.arrow.css +1 -1
  24. package/atoms/HeroImage/index.js +91 -2230
  25. package/atoms/HeroImage/styles.arrow.css +1 -1
  26. package/atoms/LoadmoreButton/index.js +40 -2133
  27. package/atoms/LoadmoreButton/styles.arrow.css +1 -1
  28. package/atoms/ScrollSnap/index.js +89 -2241
  29. package/atoms/ScrollSnap/styles.arrow.css +1 -1
  30. package/atoms/SectionTag/index.js +40 -2120
  31. package/atoms/SectionTag/styles.arrow.css +1 -1
  32. package/atoms/Subheadline/index.js +35 -2115
  33. package/atoms/Subheadline/styles.arrow.css +1 -1
  34. package/atoms/TimeStamp/index.js +43 -2483
  35. package/atoms/TimeStamp/styles.arrow.css +1 -1
  36. package/molecules/KeyEvents/index.js +95 -2606
  37. package/molecules/KeyEvents/styles.arrow.css +1 -1
  38. package/molecules/PageIntroductionCard/index.js +59 -2487
  39. package/molecules/PageIntroductionCard/styles.arrow.css +1 -1
  40. package/molecules/SocialShareTemplate/index.js +213 -2800
  41. package/molecules/SocialShareTemplate/styles.arrow.css +1 -1
  42. package/molecules/StoryCard/index.js +308 -2816
  43. package/molecules/StoryCard/styles.arrow.css +1 -1
  44. package/molecules/StoryElementCard/index.js +611 -3352
  45. package/molecules/StoryElementCard/styles.arrow.css +1 -1
  46. package/molecules/StorycardContent/index.js +218 -2658
  47. package/molecules/StorycardContent/styles.arrow.css +1 -1
  48. package/package.json +1 -1
  49. package/rows/AlternateCollectionFilter/index.js +438 -2993
  50. package/rows/AlternateCollectionFilter/styles.arrow.css +1 -1
  51. package/rows/AsideCollection/index.js +432 -2987
  52. package/rows/AsideCollection/styles.arrow.css +1 -1
  53. package/rows/AstrologyCollection/index.js +411 -2966
  54. package/rows/AstrologyCollection/styles.arrow.css +1 -1
  55. package/rows/AuthorIntroductionCard/index.js +183 -2890
  56. package/rows/AuthorIntroductionCard/styles.arrow.css +1 -1
  57. package/rows/AuthorsList/index.js +217 -2936
  58. package/rows/AuthorsList/styles.arrow.css +1 -1
  59. package/rows/CollectionFilter/index.js +453 -3008
  60. package/rows/CollectionFilter/styles.arrow.css +1 -1
  61. package/rows/ElevenStories/index.js +439 -2959
  62. package/rows/ElevenStories/styles.arrow.css +1 -1
  63. package/rows/FourColFiveStories/index.js +374 -2872
  64. package/rows/FourColFiveStories/styles.arrow.css +1 -1
  65. package/rows/FourColGrid/index.js +426 -2927
  66. package/rows/FourColGrid/styles.arrow.css +1 -1
  67. package/rows/FourColPortraitStories/index.js +430 -2931
  68. package/rows/FourColPortraitStories/styles.arrow.css +1 -1
  69. package/rows/FourColSixteenStories/index.js +368 -2894
  70. package/rows/FourColSixteenStories/styles.arrow.css +1 -1
  71. package/rows/FourColTwelveStories/index.js +387 -2900
  72. package/rows/FourColTwelveStories/styles.arrow.css +1 -1
  73. package/rows/FourStorySlider/index.js +443 -2963
  74. package/rows/FourStorySlider/styles.arrow.css +1 -1
  75. package/rows/FourStorySliderPortrait/index.js +444 -2964
  76. package/rows/FourStorySliderPortrait/styles.arrow.css +1 -1
  77. package/rows/FourTabbedBigStorySlider/index.js +403 -2923
  78. package/rows/FourTabbedBigStorySlider/styles.arrow.css +1 -1
  79. package/rows/FullScreenSlider/index.js +422 -2942
  80. package/rows/FullScreenSlider/styles.arrow.css +1 -1
  81. package/rows/HalfScreenSlider/index.js +390 -2910
  82. package/rows/HalfScreenSlider/styles.arrow.css +1 -1
  83. package/rows/ListComponent/index.js +398 -2918
  84. package/rows/ListComponent/styles.arrow.css +1 -1
  85. package/rows/Listicles/index.js +189 -2375
  86. package/rows/Listicles/styles.arrow.css +1 -1
  87. package/rows/MagazineEditions/index.js +128 -2580
  88. package/rows/MagazineEditions/styles.arrow.css +1 -1
  89. package/rows/MagazineHeaderCard/index.js +125 -2577
  90. package/rows/MagazineHeaderCard/styles.arrow.css +1 -1
  91. package/rows/MagazineWidget/index.js +408 -2928
  92. package/rows/MagazineWidget/styles.arrow.css +1 -1
  93. package/rows/OneColStoryList/index.js +439 -2940
  94. package/rows/OneColStoryList/styles.arrow.css +1 -1
  95. package/rows/OpinionCollection/index.js +308 -2800
  96. package/rows/OpinionCollection/styles.arrow.css +1 -1
  97. package/rows/SixColSixStories/index.js +405 -2906
  98. package/rows/SixColSixStories/styles.arrow.css +1 -1
  99. package/rows/StoryCollection/index.js +432 -2987
  100. package/rows/StoryCollection/styles.arrow.css +1 -1
  101. package/rows/TagIntroductionCard/index.js +35 -1833
  102. package/rows/TagIntroductionCard/styles.arrow.css +1 -1
  103. package/rows/ThreeColFlexStories/index.js +421 -2922
  104. package/rows/ThreeColFlexStories/styles.arrow.css +1 -1
  105. package/rows/ThreeColFourteenStories/index.js +358 -2871
  106. package/rows/ThreeColFourteenStories/styles.arrow.css +1 -1
  107. package/rows/ThreeColGrid/index.js +428 -2929
  108. package/rows/ThreeColGrid/styles.arrow.css +1 -1
  109. package/rows/ThreeColSevenStory/index.js +406 -2926
  110. package/rows/ThreeColSevenStory/styles.arrow.css +1 -1
  111. package/rows/ThreeColSixStories/index.js +400 -2920
  112. package/rows/ThreeColSixStories/styles.arrow.css +1 -1
  113. package/rows/ThreeColTwelveStories/index.js +383 -2909
  114. package/rows/ThreeColTwelveStories/styles.arrow.css +1 -1
  115. package/rows/TwoColFourStories/index.js +395 -2915
  116. package/rows/TwoColFourStories/styles.arrow.css +1 -1
  117. package/rows/TwoColFourStoryHighlight/index.js +398 -2924
  118. package/rows/TwoColFourStoryHighlight/styles.arrow.css +1 -1
  119. package/rows/TwoColSevenStories/index.js +400 -2920
  120. package/rows/TwoColSevenStories/styles.arrow.css +1 -1
  121. package/rows/TwoColSixStories/index.js +398 -2924
  122. package/rows/TwoColSixStories/styles.arrow.css +1 -1
  123. package/rows/TwoColTenStoriesSidebar/index.js +418 -2938
  124. package/rows/TwoColTenStoriesSidebar/styles.arrow.css +1 -1
  125. package/rows/TwoColThreeStories/index.js +392 -2912
  126. package/rows/TwoColThreeStories/styles.arrow.css +1 -1
  127. package/story-elements/AlsoRead/index.js +92 -2229
  128. package/story-elements/AlsoRead/styles.arrow.css +1 -1
  129. package/story-elements/Attachment/index.js +53 -1899
  130. package/story-elements/Attachment/styles.arrow.css +1 -1
  131. package/story-elements/BigFact/index.js +49 -1895
  132. package/story-elements/BigFact/styles.arrow.css +1 -1
  133. package/story-elements/BlockQuote/index.js +79 -2206
  134. package/story-elements/BlockQuote/styles.arrow.css +1 -1
  135. package/story-elements/Blurb/index.js +52 -1957
  136. package/story-elements/Blurb/styles.arrow.css +1 -1
  137. package/story-elements/Image/index.js +147 -2329
  138. package/story-elements/Image/styles.arrow.css +1 -1
  139. package/story-elements/ImageGallery/index.js +135 -2317
  140. package/story-elements/ImageGallery/styles.arrow.css +1 -1
  141. package/story-elements/ImageSlideshow/index.js +173 -2355
  142. package/story-elements/ImageSlideshow/styles.arrow.css +1 -1
  143. package/story-elements/QuestionAnswer/index.js +79 -2207
  144. package/story-elements/QuestionAnswer/styles.arrow.css +1 -1
  145. package/story-elements/Quote/index.js +52 -1898
  146. package/story-elements/Quote/styles.arrow.css +1 -1
  147. package/story-elements/Reference/index.js +53 -1899
  148. package/story-elements/Reference/styles.arrow.css +1 -1
  149. package/story-elements/StoryElement/index.js +34 -1738
  150. package/story-elements/Summary/index.js +56 -1902
  151. package/story-elements/Summary/styles.arrow.css +1 -1
  152. package/story-elements/Text/index.js +48 -2176
  153. package/story-elements/Text/styles.arrow.css +1 -1
  154. package/story-elements/Video/index.js +35 -1739
  155. package/story-elements/Video/styles.arrow.css +1 -1
  156. package/story-templates/ListicleStoryTemplate/index.js +1182 -4038
  157. package/story-templates/ListicleStoryTemplate/styles.arrow.css +1 -1
  158. package/story-templates/LiveBlogStoryTemplate/index.js +1377 -4233
  159. package/story-templates/LiveBlogStoryTemplate/styles.arrow.css +1 -1
  160. package/story-templates/PhotoStoryTemplate/index.js +1162 -4018
  161. package/story-templates/PhotoStoryTemplate/styles.arrow.css +1 -1
  162. package/story-templates/TextStoryTemplate/index.js +1277 -4133
  163. package/story-templates/TextStoryTemplate/styles.arrow.css +1 -1
  164. package/story-templates/VideoStoryTemplate/index.js +1231 -4087
  165. package/story-templates/VideoStoryTemplate/styles.arrow.css +1 -1
  166. package/atoms/ExtendedLoadMore/index-e39b3ca8.js +0 -3023
  167. package/atoms/ExtendedLoadMore/index-f6e578e3.js +0 -86
@@ -1,2175 +1,36 @@
1
- import { Link, ResponsiveHeroImage } from '@quintype/components';
2
- import PropTypes from 'prop-types';
3
- import React, { useContext, createContext } from 'react';
4
- import { useSelector } from 'react-redux';
5
- import 'react-timeago';
6
- import 'date-fns-tz';
7
-
8
- function _arrayWithHoles(arr) {
9
- if (Array.isArray(arr)) return arr;
10
- }
11
-
12
- function _iterableToArrayLimit(arr, i) {
13
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
14
-
15
- if (_i == null) return;
16
- var _arr = [];
17
- var _n = true;
18
- var _d = false;
19
-
20
- var _s, _e;
21
-
22
- try {
23
- for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
24
- _arr.push(_s.value);
25
-
26
- if (i && _arr.length === i) break;
27
- }
28
- } catch (err) {
29
- _d = true;
30
- _e = err;
31
- } finally {
32
- try {
33
- if (!_n && _i["return"] != null) _i["return"]();
34
- } finally {
35
- if (_d) throw _e;
36
- }
37
- }
38
-
39
- return _arr;
40
- }
41
-
42
- function _arrayLikeToArray(arr, len) {
43
- if (len == null || len > arr.length) len = arr.length;
44
-
45
- for (var i = 0, arr2 = new Array(len); i < len; i++) {
46
- arr2[i] = arr[i];
47
- }
48
-
49
- return arr2;
50
- }
51
-
52
- function _unsupportedIterableToArray(o, minLen) {
53
- if (!o) return;
54
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
55
- var n = Object.prototype.toString.call(o).slice(8, -1);
56
- if (n === "Object" && o.constructor) n = o.constructor.name;
57
- if (n === "Map" || n === "Set") return Array.from(o);
58
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
59
- }
60
-
61
- function _nonIterableRest() {
62
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
63
- }
64
-
65
- function _slicedToArray(arr, i) {
66
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
67
- }
68
-
69
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
70
-
71
- function getDefaultExportFromCjs (x) {
72
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
73
- }
74
-
75
- function createCommonjsModule(fn) {
76
- var module = { exports: {} };
77
- return fn(module, module.exports), module.exports;
78
- }
79
-
80
- var optionsDefaults_1 = createCommonjsModule(function (module, exports) {
81
-
82
- Object.defineProperty(exports, "__esModule", {
83
- value: true
84
- });
85
- exports["default"] = void 0;
86
- var optionsDefaults = {
87
- attributeNames: {
88
- styleName: 'className'
89
- },
90
- generateScopedName: '[path]___[name]__[local]___[hash:base64:5]',
91
- handleMissingStyleName: 'throw'
92
- };
93
- var _default = optionsDefaults;
94
- exports["default"] = _default;
95
-
96
-
97
- });
98
-
99
- var getClassName = createCommonjsModule(function (module, exports) {
100
-
101
- Object.defineProperty(exports, "__esModule", {
102
- value: true
103
- });
104
- exports["default"] = void 0;
105
-
106
- var _optionsDefaults = _interopRequireDefault(optionsDefaults_1);
107
-
108
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
109
-
110
- var isNamespacedStyleName = function isNamespacedStyleName(styleName) {
111
- return styleName.indexOf('.') !== -1;
112
- };
113
-
114
- var handleError = function handleError(message, handleMissingStyleName) {
115
- if (handleMissingStyleName === 'throw') {
116
- throw new Error(message);
117
- } else if (handleMissingStyleName === 'warn') {
118
- // eslint-disable-next-line no-console
119
- console.warn(message);
120
- }
121
-
122
- return null;
123
- };
124
-
125
- var getClassNameForNamespacedStyleName = function getClassNameForNamespacedStyleName(styleName, styleModuleImportMap, handleMissingStyleNameOption) {
126
- // Note:
127
- // Do not use the desctructing syntax with Babel.
128
- // Desctructing adds _slicedToArray helper.
129
- var styleNameParts = styleName.split('.');
130
- var importName = styleNameParts[0];
131
- var moduleName = styleNameParts[1];
132
- var handleMissingStyleName = handleMissingStyleNameOption || _optionsDefaults["default"].handleMissingStyleName;
133
-
134
- if (!moduleName) {
135
- return handleError('Invalid style name: ' + styleName, handleMissingStyleName);
136
- }
137
-
138
- if (!styleModuleImportMap[importName]) {
139
- return handleError('CSS module import does not exist: ' + importName, handleMissingStyleName);
140
- }
141
-
142
- if (!styleModuleImportMap[importName][moduleName]) {
143
- return handleError('CSS module does not exist: ' + moduleName, handleMissingStyleName);
144
- }
145
-
146
- return styleModuleImportMap[importName][moduleName];
147
- };
148
-
149
- var getClassNameFromMultipleImports = function getClassNameFromMultipleImports(styleName, styleModuleImportMap, handleMissingStyleNameOption) {
150
- var handleMissingStyleName = handleMissingStyleNameOption || _optionsDefaults["default"].handleMissingStyleName;
151
- var importKeysWithMatches = Object.keys(styleModuleImportMap).map(function (importKey) {
152
- return styleModuleImportMap[importKey][styleName] && importKey;
153
- }).filter(function (importKey) {
154
- return importKey;
155
- });
156
-
157
- if (importKeysWithMatches.length > 1) {
158
- 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');
159
- }
160
-
161
- if (importKeysWithMatches.length === 0) {
162
- return handleError('Could not resolve the styleName \'' + styleName + '\'.', handleMissingStyleName);
163
- }
164
-
165
- return styleModuleImportMap[importKeysWithMatches[0]][styleName];
166
- };
167
-
168
- var _default = function _default(styleNameValue, styleModuleImportMap, options) {
169
- var styleModuleImportMapKeys = Object.keys(styleModuleImportMap);
170
-
171
- var _ref = options || {},
172
- _ref$handleMissingSty = _ref.handleMissingStyleName,
173
- handleMissingStyleName = _ref$handleMissingSty === void 0 ? _optionsDefaults["default"].handleMissingStyleName : _ref$handleMissingSty,
174
- _ref$autoResolveMulti = _ref.autoResolveMultipleImports,
175
- autoResolveMultipleImports = _ref$autoResolveMulti === void 0 ? _optionsDefaults["default"].autoResolveMultipleImports : _ref$autoResolveMulti;
176
-
177
- if (!styleNameValue) {
178
- return '';
179
- }
180
-
181
- return styleNameValue.split(' ').filter(function (styleName) {
182
- return styleName;
183
- }).map(function (styleName) {
184
- if (isNamespacedStyleName(styleName)) {
185
- return getClassNameForNamespacedStyleName(styleName, styleModuleImportMap, handleMissingStyleName);
186
- }
187
-
188
- if (styleModuleImportMapKeys.length === 0) {
189
- throw new Error('Cannot use styleName attribute for style name \'' + styleName + '\' without importing at least one stylesheet.');
190
- }
191
-
192
- if (styleModuleImportMapKeys.length > 1) {
193
- if (!autoResolveMultipleImports) {
194
- throw new Error('Cannot use anonymous style name \'' + styleName + '\' with more than one stylesheet import without setting \'autoResolveMultipleImports\' to true.');
195
- }
196
-
197
- return getClassNameFromMultipleImports(styleName, styleModuleImportMap, handleMissingStyleName);
198
- }
199
-
200
- var styleModuleMap = styleModuleImportMap[styleModuleImportMapKeys[0]];
201
-
202
- if (!styleModuleMap[styleName]) {
203
- return handleError('Could not resolve the styleName \'' + styleName + '\'.', handleMissingStyleName);
204
- }
205
-
206
- return styleModuleMap[styleName];
207
- }).filter(function (className) {
208
- // Remove any styles which could not be found (if handleMissingStyleName === 'ignore')
209
- return className;
210
- }).join(' ');
211
- };
212
-
213
- exports["default"] = _default;
214
-
215
-
216
- });
217
-
218
- var _getClassName = /*@__PURE__*/getDefaultExportFromCjs(getClassName);
219
-
220
- /**
221
- * Checks if `value` is classified as an `Array` object.
222
- *
223
- * @static
224
- * @memberOf _
225
- * @since 0.1.0
226
- * @category Lang
227
- * @param {*} value The value to check.
228
- * @returns {boolean} Returns `true` if `value` is an array, else `false`.
229
- * @example
230
- *
231
- * _.isArray([1, 2, 3]);
232
- * // => true
233
- *
234
- * _.isArray(document.body.children);
235
- * // => false
236
- *
237
- * _.isArray('abc');
238
- * // => false
239
- *
240
- * _.isArray(_.noop);
241
- * // => false
242
- */
243
- var isArray = Array.isArray;
244
-
245
- var isArray_1 = isArray;
246
-
247
- /** Detect free variable `global` from Node.js. */
248
-
249
- var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
250
-
251
- var _freeGlobal = freeGlobal;
252
-
253
- /** Detect free variable `self`. */
254
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
255
-
256
- /** Used as a reference to the global object. */
257
- var root = _freeGlobal || freeSelf || Function('return this')();
258
-
259
- var _root = root;
260
-
261
- /** Built-in value references. */
262
- var Symbol$1 = _root.Symbol;
263
-
264
- var _Symbol = Symbol$1;
265
-
266
- /** Used for built-in method references. */
267
- var objectProto$4 = Object.prototype;
268
-
269
- /** Used to check objects for own properties. */
270
- var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
271
-
272
- /**
273
- * Used to resolve the
274
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
275
- * of values.
276
- */
277
- var nativeObjectToString$1 = objectProto$4.toString;
278
-
279
- /** Built-in value references. */
280
- var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
281
-
282
- /**
283
- * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
284
- *
285
- * @private
286
- * @param {*} value The value to query.
287
- * @returns {string} Returns the raw `toStringTag`.
288
- */
289
- function getRawTag(value) {
290
- var isOwn = hasOwnProperty$3.call(value, symToStringTag$1),
291
- tag = value[symToStringTag$1];
292
-
293
- try {
294
- value[symToStringTag$1] = undefined;
295
- var unmasked = true;
296
- } catch (e) {}
297
-
298
- var result = nativeObjectToString$1.call(value);
299
- if (unmasked) {
300
- if (isOwn) {
301
- value[symToStringTag$1] = tag;
302
- } else {
303
- delete value[symToStringTag$1];
304
- }
305
- }
306
- return result;
307
- }
308
-
309
- var _getRawTag = getRawTag;
310
-
311
- /** Used for built-in method references. */
312
- var objectProto$3 = Object.prototype;
313
-
314
- /**
315
- * Used to resolve the
316
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
317
- * of values.
318
- */
319
- var nativeObjectToString = objectProto$3.toString;
320
-
321
- /**
322
- * Converts `value` to a string using `Object.prototype.toString`.
323
- *
324
- * @private
325
- * @param {*} value The value to convert.
326
- * @returns {string} Returns the converted string.
327
- */
328
- function objectToString(value) {
329
- return nativeObjectToString.call(value);
330
- }
331
-
332
- var _objectToString = objectToString;
333
-
334
- /** `Object#toString` result references. */
335
- var nullTag = '[object Null]',
336
- undefinedTag = '[object Undefined]';
337
-
338
- /** Built-in value references. */
339
- var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
340
-
341
- /**
342
- * The base implementation of `getTag` without fallbacks for buggy environments.
343
- *
344
- * @private
345
- * @param {*} value The value to query.
346
- * @returns {string} Returns the `toStringTag`.
347
- */
348
- function baseGetTag(value) {
349
- if (value == null) {
350
- return value === undefined ? undefinedTag : nullTag;
351
- }
352
- return (symToStringTag && symToStringTag in Object(value))
353
- ? _getRawTag(value)
354
- : _objectToString(value);
355
- }
356
-
357
- var _baseGetTag = baseGetTag;
358
-
359
- /**
360
- * Checks if `value` is object-like. A value is object-like if it's not `null`
361
- * and has a `typeof` result of "object".
362
- *
363
- * @static
364
- * @memberOf _
365
- * @since 4.0.0
366
- * @category Lang
367
- * @param {*} value The value to check.
368
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
369
- * @example
370
- *
371
- * _.isObjectLike({});
372
- * // => true
373
- *
374
- * _.isObjectLike([1, 2, 3]);
375
- * // => true
376
- *
377
- * _.isObjectLike(_.noop);
378
- * // => false
379
- *
380
- * _.isObjectLike(null);
381
- * // => false
382
- */
383
- function isObjectLike(value) {
384
- return value != null && typeof value == 'object';
385
- }
386
-
387
- var isObjectLike_1 = isObjectLike;
388
-
389
- /** `Object#toString` result references. */
390
- var symbolTag = '[object Symbol]';
391
-
392
- /**
393
- * Checks if `value` is classified as a `Symbol` primitive or object.
394
- *
395
- * @static
396
- * @memberOf _
397
- * @since 4.0.0
398
- * @category Lang
399
- * @param {*} value The value to check.
400
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
401
- * @example
402
- *
403
- * _.isSymbol(Symbol.iterator);
404
- * // => true
405
- *
406
- * _.isSymbol('abc');
407
- * // => false
408
- */
409
- function isSymbol(value) {
410
- return typeof value == 'symbol' ||
411
- (isObjectLike_1(value) && _baseGetTag(value) == symbolTag);
412
- }
413
-
414
- var isSymbol_1 = isSymbol;
415
-
416
- /** Used to match property names within property paths. */
417
- var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
418
- reIsPlainProp = /^\w*$/;
419
-
420
- /**
421
- * Checks if `value` is a property name and not a property path.
422
- *
423
- * @private
424
- * @param {*} value The value to check.
425
- * @param {Object} [object] The object to query keys on.
426
- * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
427
- */
428
- function isKey(value, object) {
429
- if (isArray_1(value)) {
430
- return false;
431
- }
432
- var type = typeof value;
433
- if (type == 'number' || type == 'symbol' || type == 'boolean' ||
434
- value == null || isSymbol_1(value)) {
435
- return true;
436
- }
437
- return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
438
- (object != null && value in Object(object));
439
- }
440
-
441
- var _isKey = isKey;
442
-
443
- /**
444
- * Checks if `value` is the
445
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
446
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
447
- *
448
- * @static
449
- * @memberOf _
450
- * @since 0.1.0
451
- * @category Lang
452
- * @param {*} value The value to check.
453
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
454
- * @example
455
- *
456
- * _.isObject({});
457
- * // => true
458
- *
459
- * _.isObject([1, 2, 3]);
460
- * // => true
461
- *
462
- * _.isObject(_.noop);
463
- * // => true
464
- *
465
- * _.isObject(null);
466
- * // => false
467
- */
468
- function isObject(value) {
469
- var type = typeof value;
470
- return value != null && (type == 'object' || type == 'function');
471
- }
472
-
473
- var isObject_1 = isObject;
474
-
475
- /** `Object#toString` result references. */
476
- var asyncTag = '[object AsyncFunction]',
477
- funcTag = '[object Function]',
478
- genTag = '[object GeneratorFunction]',
479
- proxyTag = '[object Proxy]';
480
-
481
- /**
482
- * Checks if `value` is classified as a `Function` object.
483
- *
484
- * @static
485
- * @memberOf _
486
- * @since 0.1.0
487
- * @category Lang
488
- * @param {*} value The value to check.
489
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
490
- * @example
491
- *
492
- * _.isFunction(_);
493
- * // => true
494
- *
495
- * _.isFunction(/abc/);
496
- * // => false
497
- */
498
- function isFunction(value) {
499
- if (!isObject_1(value)) {
500
- return false;
501
- }
502
- // The use of `Object#toString` avoids issues with the `typeof` operator
503
- // in Safari 9 which returns 'object' for typed arrays and other constructors.
504
- var tag = _baseGetTag(value);
505
- return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
506
- }
507
-
508
- var isFunction_1 = isFunction;
509
-
510
- /** Used to detect overreaching core-js shims. */
511
- var coreJsData = _root['__core-js_shared__'];
512
-
513
- var _coreJsData = coreJsData;
514
-
515
- /** Used to detect methods masquerading as native. */
516
- var maskSrcKey = (function() {
517
- var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');
518
- return uid ? ('Symbol(src)_1.' + uid) : '';
519
- }());
520
-
521
- /**
522
- * Checks if `func` has its source masked.
523
- *
524
- * @private
525
- * @param {Function} func The function to check.
526
- * @returns {boolean} Returns `true` if `func` is masked, else `false`.
527
- */
528
- function isMasked(func) {
529
- return !!maskSrcKey && (maskSrcKey in func);
530
- }
531
-
532
- var _isMasked = isMasked;
533
-
534
- /** Used for built-in method references. */
535
- var funcProto$1 = Function.prototype;
536
-
537
- /** Used to resolve the decompiled source of functions. */
538
- var funcToString$1 = funcProto$1.toString;
539
-
540
- /**
541
- * Converts `func` to its source code.
542
- *
543
- * @private
544
- * @param {Function} func The function to convert.
545
- * @returns {string} Returns the source code.
546
- */
547
- function toSource(func) {
548
- if (func != null) {
549
- try {
550
- return funcToString$1.call(func);
551
- } catch (e) {}
552
- try {
553
- return (func + '');
554
- } catch (e) {}
555
- }
556
- return '';
557
- }
558
-
559
- var _toSource = toSource;
560
-
561
- /**
562
- * Used to match `RegExp`
563
- * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
564
- */
565
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
566
-
567
- /** Used to detect host constructors (Safari). */
568
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
569
-
570
- /** Used for built-in method references. */
571
- var funcProto = Function.prototype,
572
- objectProto$2 = Object.prototype;
573
-
574
- /** Used to resolve the decompiled source of functions. */
575
- var funcToString = funcProto.toString;
576
-
577
- /** Used to check objects for own properties. */
578
- var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
579
-
580
- /** Used to detect if a method is native. */
581
- var reIsNative = RegExp('^' +
582
- funcToString.call(hasOwnProperty$2).replace(reRegExpChar, '\\$&')
583
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
584
- );
585
-
586
- /**
587
- * The base implementation of `_.isNative` without bad shim checks.
588
- *
589
- * @private
590
- * @param {*} value The value to check.
591
- * @returns {boolean} Returns `true` if `value` is a native function,
592
- * else `false`.
593
- */
594
- function baseIsNative(value) {
595
- if (!isObject_1(value) || _isMasked(value)) {
596
- return false;
597
- }
598
- var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;
599
- return pattern.test(_toSource(value));
600
- }
601
-
602
- var _baseIsNative = baseIsNative;
603
-
604
- /**
605
- * Gets the value at `key` of `object`.
606
- *
607
- * @private
608
- * @param {Object} [object] The object to query.
609
- * @param {string} key The key of the property to get.
610
- * @returns {*} Returns the property value.
611
- */
612
- function getValue(object, key) {
613
- return object == null ? undefined : object[key];
614
- }
615
-
616
- var _getValue = getValue;
617
-
618
- /**
619
- * Gets the native function at `key` of `object`.
620
- *
621
- * @private
622
- * @param {Object} object The object to query.
623
- * @param {string} key The key of the method to get.
624
- * @returns {*} Returns the function if it's native, else `undefined`.
625
- */
626
- function getNative(object, key) {
627
- var value = _getValue(object, key);
628
- return _baseIsNative(value) ? value : undefined;
629
- }
630
-
631
- var _getNative = getNative;
632
-
633
- /* Built-in method references that are verified to be native. */
634
- var nativeCreate = _getNative(Object, 'create');
635
-
636
- var _nativeCreate = nativeCreate;
637
-
638
- /**
639
- * Removes all key-value entries from the hash.
640
- *
641
- * @private
642
- * @name clear
643
- * @memberOf Hash
644
- */
645
- function hashClear() {
646
- this.__data__ = _nativeCreate ? _nativeCreate(null) : {};
647
- this.size = 0;
648
- }
649
-
650
- var _hashClear = hashClear;
651
-
652
- /**
653
- * Removes `key` and its value from the hash.
654
- *
655
- * @private
656
- * @name delete
657
- * @memberOf Hash
658
- * @param {Object} hash The hash to modify.
659
- * @param {string} key The key of the value to remove.
660
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
661
- */
662
- function hashDelete(key) {
663
- var result = this.has(key) && delete this.__data__[key];
664
- this.size -= result ? 1 : 0;
665
- return result;
666
- }
667
-
668
- var _hashDelete = hashDelete;
669
-
670
- /** Used to stand-in for `undefined` hash values. */
671
- var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
672
-
673
- /** Used for built-in method references. */
674
- var objectProto$1 = Object.prototype;
675
-
676
- /** Used to check objects for own properties. */
677
- var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
678
-
679
- /**
680
- * Gets the hash value for `key`.
681
- *
682
- * @private
683
- * @name get
684
- * @memberOf Hash
685
- * @param {string} key The key of the value to get.
686
- * @returns {*} Returns the entry value.
687
- */
688
- function hashGet(key) {
689
- var data = this.__data__;
690
- if (_nativeCreate) {
691
- var result = data[key];
692
- return result === HASH_UNDEFINED$1 ? undefined : result;
693
- }
694
- return hasOwnProperty$1.call(data, key) ? data[key] : undefined;
695
- }
696
-
697
- var _hashGet = hashGet;
698
-
699
- /** Used for built-in method references. */
700
- var objectProto = Object.prototype;
701
-
702
- /** Used to check objects for own properties. */
703
- var hasOwnProperty = objectProto.hasOwnProperty;
704
-
705
- /**
706
- * Checks if a hash value for `key` exists.
707
- *
708
- * @private
709
- * @name has
710
- * @memberOf Hash
711
- * @param {string} key The key of the entry to check.
712
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
713
- */
714
- function hashHas(key) {
715
- var data = this.__data__;
716
- return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
717
- }
718
-
719
- var _hashHas = hashHas;
720
-
721
- /** Used to stand-in for `undefined` hash values. */
722
- var HASH_UNDEFINED = '__lodash_hash_undefined__';
723
-
724
- /**
725
- * Sets the hash `key` to `value`.
726
- *
727
- * @private
728
- * @name set
729
- * @memberOf Hash
730
- * @param {string} key The key of the value to set.
731
- * @param {*} value The value to set.
732
- * @returns {Object} Returns the hash instance.
733
- */
734
- function hashSet(key, value) {
735
- var data = this.__data__;
736
- this.size += this.has(key) ? 0 : 1;
737
- data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
738
- return this;
739
- }
740
-
741
- var _hashSet = hashSet;
742
-
743
- /**
744
- * Creates a hash object.
745
- *
746
- * @private
747
- * @constructor
748
- * @param {Array} [entries] The key-value pairs to cache.
749
- */
750
- function Hash(entries) {
751
- var index = -1,
752
- length = entries == null ? 0 : entries.length;
753
-
754
- this.clear();
755
- while (++index < length) {
756
- var entry = entries[index];
757
- this.set(entry[0], entry[1]);
758
- }
759
- }
760
-
761
- // Add methods to `Hash`.
762
- Hash.prototype.clear = _hashClear;
763
- Hash.prototype['delete'] = _hashDelete;
764
- Hash.prototype.get = _hashGet;
765
- Hash.prototype.has = _hashHas;
766
- Hash.prototype.set = _hashSet;
767
-
768
- var _Hash = Hash;
769
-
770
- /**
771
- * Removes all key-value entries from the list cache.
772
- *
773
- * @private
774
- * @name clear
775
- * @memberOf ListCache
776
- */
777
- function listCacheClear() {
778
- this.__data__ = [];
779
- this.size = 0;
780
- }
781
-
782
- var _listCacheClear = listCacheClear;
783
-
784
- /**
785
- * Performs a
786
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
787
- * comparison between two values to determine if they are equivalent.
788
- *
789
- * @static
790
- * @memberOf _
791
- * @since 4.0.0
792
- * @category Lang
793
- * @param {*} value The value to compare.
794
- * @param {*} other The other value to compare.
795
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
796
- * @example
797
- *
798
- * var object = { 'a': 1 };
799
- * var other = { 'a': 1 };
800
- *
801
- * _.eq(object, object);
802
- * // => true
803
- *
804
- * _.eq(object, other);
805
- * // => false
806
- *
807
- * _.eq('a', 'a');
808
- * // => true
809
- *
810
- * _.eq('a', Object('a'));
811
- * // => false
812
- *
813
- * _.eq(NaN, NaN);
814
- * // => true
815
- */
816
- function eq(value, other) {
817
- return value === other || (value !== value && other !== other);
818
- }
819
-
820
- var eq_1 = eq;
821
-
822
- /**
823
- * Gets the index at which the `key` is found in `array` of key-value pairs.
824
- *
825
- * @private
826
- * @param {Array} array The array to inspect.
827
- * @param {*} key The key to search for.
828
- * @returns {number} Returns the index of the matched value, else `-1`.
829
- */
830
- function assocIndexOf(array, key) {
831
- var length = array.length;
832
- while (length--) {
833
- if (eq_1(array[length][0], key)) {
834
- return length;
835
- }
836
- }
837
- return -1;
838
- }
839
-
840
- var _assocIndexOf = assocIndexOf;
841
-
842
- /** Used for built-in method references. */
843
- var arrayProto = Array.prototype;
844
-
845
- /** Built-in value references. */
846
- var splice = arrayProto.splice;
847
-
848
- /**
849
- * Removes `key` and its value from the list cache.
850
- *
851
- * @private
852
- * @name delete
853
- * @memberOf ListCache
854
- * @param {string} key The key of the value to remove.
855
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
856
- */
857
- function listCacheDelete(key) {
858
- var data = this.__data__,
859
- index = _assocIndexOf(data, key);
860
-
861
- if (index < 0) {
862
- return false;
863
- }
864
- var lastIndex = data.length - 1;
865
- if (index == lastIndex) {
866
- data.pop();
867
- } else {
868
- splice.call(data, index, 1);
869
- }
870
- --this.size;
871
- return true;
872
- }
873
-
874
- var _listCacheDelete = listCacheDelete;
875
-
876
- /**
877
- * Gets the list cache value for `key`.
878
- *
879
- * @private
880
- * @name get
881
- * @memberOf ListCache
882
- * @param {string} key The key of the value to get.
883
- * @returns {*} Returns the entry value.
884
- */
885
- function listCacheGet(key) {
886
- var data = this.__data__,
887
- index = _assocIndexOf(data, key);
888
-
889
- return index < 0 ? undefined : data[index][1];
890
- }
891
-
892
- var _listCacheGet = listCacheGet;
893
-
894
- /**
895
- * Checks if a list cache value for `key` exists.
896
- *
897
- * @private
898
- * @name has
899
- * @memberOf ListCache
900
- * @param {string} key The key of the entry to check.
901
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
902
- */
903
- function listCacheHas(key) {
904
- return _assocIndexOf(this.__data__, key) > -1;
905
- }
906
-
907
- var _listCacheHas = listCacheHas;
908
-
909
- /**
910
- * Sets the list cache `key` to `value`.
911
- *
912
- * @private
913
- * @name set
914
- * @memberOf ListCache
915
- * @param {string} key The key of the value to set.
916
- * @param {*} value The value to set.
917
- * @returns {Object} Returns the list cache instance.
918
- */
919
- function listCacheSet(key, value) {
920
- var data = this.__data__,
921
- index = _assocIndexOf(data, key);
922
-
923
- if (index < 0) {
924
- ++this.size;
925
- data.push([key, value]);
926
- } else {
927
- data[index][1] = value;
928
- }
929
- return this;
930
- }
931
-
932
- var _listCacheSet = listCacheSet;
933
-
934
- /**
935
- * Creates an list cache object.
936
- *
937
- * @private
938
- * @constructor
939
- * @param {Array} [entries] The key-value pairs to cache.
940
- */
941
- function ListCache(entries) {
942
- var index = -1,
943
- length = entries == null ? 0 : entries.length;
944
-
945
- this.clear();
946
- while (++index < length) {
947
- var entry = entries[index];
948
- this.set(entry[0], entry[1]);
949
- }
950
- }
951
-
952
- // Add methods to `ListCache`.
953
- ListCache.prototype.clear = _listCacheClear;
954
- ListCache.prototype['delete'] = _listCacheDelete;
955
- ListCache.prototype.get = _listCacheGet;
956
- ListCache.prototype.has = _listCacheHas;
957
- ListCache.prototype.set = _listCacheSet;
958
-
959
- var _ListCache = ListCache;
960
-
961
- /* Built-in method references that are verified to be native. */
962
- var Map = _getNative(_root, 'Map');
963
-
964
- var _Map = Map;
965
-
966
- /**
967
- * Removes all key-value entries from the map.
968
- *
969
- * @private
970
- * @name clear
971
- * @memberOf MapCache
972
- */
973
- function mapCacheClear() {
974
- this.size = 0;
975
- this.__data__ = {
976
- 'hash': new _Hash,
977
- 'map': new (_Map || _ListCache),
978
- 'string': new _Hash
979
- };
980
- }
981
-
982
- var _mapCacheClear = mapCacheClear;
983
-
984
- /**
985
- * Checks if `value` is suitable for use as unique object key.
986
- *
987
- * @private
988
- * @param {*} value The value to check.
989
- * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
990
- */
991
- function isKeyable(value) {
992
- var type = typeof value;
993
- return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
994
- ? (value !== '__proto__')
995
- : (value === null);
996
- }
997
-
998
- var _isKeyable = isKeyable;
999
-
1000
- /**
1001
- * Gets the data for `map`.
1002
- *
1003
- * @private
1004
- * @param {Object} map The map to query.
1005
- * @param {string} key The reference key.
1006
- * @returns {*} Returns the map data.
1007
- */
1008
- function getMapData(map, key) {
1009
- var data = map.__data__;
1010
- return _isKeyable(key)
1011
- ? data[typeof key == 'string' ? 'string' : 'hash']
1012
- : data.map;
1013
- }
1014
-
1015
- var _getMapData = getMapData;
1016
-
1017
- /**
1018
- * Removes `key` and its value from the map.
1019
- *
1020
- * @private
1021
- * @name delete
1022
- * @memberOf MapCache
1023
- * @param {string} key The key of the value to remove.
1024
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1025
- */
1026
- function mapCacheDelete(key) {
1027
- var result = _getMapData(this, key)['delete'](key);
1028
- this.size -= result ? 1 : 0;
1029
- return result;
1030
- }
1031
-
1032
- var _mapCacheDelete = mapCacheDelete;
1033
-
1034
- /**
1035
- * Gets the map value for `key`.
1036
- *
1037
- * @private
1038
- * @name get
1039
- * @memberOf MapCache
1040
- * @param {string} key The key of the value to get.
1041
- * @returns {*} Returns the entry value.
1042
- */
1043
- function mapCacheGet(key) {
1044
- return _getMapData(this, key).get(key);
1045
- }
1046
-
1047
- var _mapCacheGet = mapCacheGet;
1048
-
1049
- /**
1050
- * Checks if a map value for `key` exists.
1051
- *
1052
- * @private
1053
- * @name has
1054
- * @memberOf MapCache
1055
- * @param {string} key The key of the entry to check.
1056
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1057
- */
1058
- function mapCacheHas(key) {
1059
- return _getMapData(this, key).has(key);
1060
- }
1061
-
1062
- var _mapCacheHas = mapCacheHas;
1063
-
1064
- /**
1065
- * Sets the map `key` to `value`.
1066
- *
1067
- * @private
1068
- * @name set
1069
- * @memberOf MapCache
1070
- * @param {string} key The key of the value to set.
1071
- * @param {*} value The value to set.
1072
- * @returns {Object} Returns the map cache instance.
1073
- */
1074
- function mapCacheSet(key, value) {
1075
- var data = _getMapData(this, key),
1076
- size = data.size;
1077
-
1078
- data.set(key, value);
1079
- this.size += data.size == size ? 0 : 1;
1080
- return this;
1081
- }
1082
-
1083
- var _mapCacheSet = mapCacheSet;
1084
-
1085
- /**
1086
- * Creates a map cache object to store key-value pairs.
1087
- *
1088
- * @private
1089
- * @constructor
1090
- * @param {Array} [entries] The key-value pairs to cache.
1091
- */
1092
- function MapCache(entries) {
1093
- var index = -1,
1094
- length = entries == null ? 0 : entries.length;
1095
-
1096
- this.clear();
1097
- while (++index < length) {
1098
- var entry = entries[index];
1099
- this.set(entry[0], entry[1]);
1100
- }
1101
- }
1102
-
1103
- // Add methods to `MapCache`.
1104
- MapCache.prototype.clear = _mapCacheClear;
1105
- MapCache.prototype['delete'] = _mapCacheDelete;
1106
- MapCache.prototype.get = _mapCacheGet;
1107
- MapCache.prototype.has = _mapCacheHas;
1108
- MapCache.prototype.set = _mapCacheSet;
1109
-
1110
- var _MapCache = MapCache;
1111
-
1112
- /** Error message constants. */
1113
- var FUNC_ERROR_TEXT = 'Expected a function';
1114
-
1115
- /**
1116
- * Creates a function that memoizes the result of `func`. If `resolver` is
1117
- * provided, it determines the cache key for storing the result based on the
1118
- * arguments provided to the memoized function. By default, the first argument
1119
- * provided to the memoized function is used as the map cache key. The `func`
1120
- * is invoked with the `this` binding of the memoized function.
1121
- *
1122
- * **Note:** The cache is exposed as the `cache` property on the memoized
1123
- * function. Its creation may be customized by replacing the `_.memoize.Cache`
1124
- * constructor with one whose instances implement the
1125
- * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
1126
- * method interface of `clear`, `delete`, `get`, `has`, and `set`.
1127
- *
1128
- * @static
1129
- * @memberOf _
1130
- * @since 0.1.0
1131
- * @category Function
1132
- * @param {Function} func The function to have its output memoized.
1133
- * @param {Function} [resolver] The function to resolve the cache key.
1134
- * @returns {Function} Returns the new memoized function.
1135
- * @example
1136
- *
1137
- * var object = { 'a': 1, 'b': 2 };
1138
- * var other = { 'c': 3, 'd': 4 };
1139
- *
1140
- * var values = _.memoize(_.values);
1141
- * values(object);
1142
- * // => [1, 2]
1143
- *
1144
- * values(other);
1145
- * // => [3, 4]
1146
- *
1147
- * object.a = 2;
1148
- * values(object);
1149
- * // => [1, 2]
1150
- *
1151
- * // Modify the result cache.
1152
- * values.cache.set(object, ['a', 'b']);
1153
- * values(object);
1154
- * // => ['a', 'b']
1155
- *
1156
- * // Replace `_.memoize.Cache`.
1157
- * _.memoize.Cache = WeakMap;
1158
- */
1159
- function memoize(func, resolver) {
1160
- if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
1161
- throw new TypeError(FUNC_ERROR_TEXT);
1162
- }
1163
- var memoized = function() {
1164
- var args = arguments,
1165
- key = resolver ? resolver.apply(this, args) : args[0],
1166
- cache = memoized.cache;
1167
-
1168
- if (cache.has(key)) {
1169
- return cache.get(key);
1170
- }
1171
- var result = func.apply(this, args);
1172
- memoized.cache = cache.set(key, result) || cache;
1173
- return result;
1174
- };
1175
- memoized.cache = new (memoize.Cache || _MapCache);
1176
- return memoized;
1177
- }
1178
-
1179
- // Expose `MapCache`.
1180
- memoize.Cache = _MapCache;
1181
-
1182
- var memoize_1 = memoize;
1183
-
1184
- /** Used as the maximum memoize cache size. */
1185
- var MAX_MEMOIZE_SIZE = 500;
1186
-
1187
- /**
1188
- * A specialized version of `_.memoize` which clears the memoized function's
1189
- * cache when it exceeds `MAX_MEMOIZE_SIZE`.
1190
- *
1191
- * @private
1192
- * @param {Function} func The function to have its output memoized.
1193
- * @returns {Function} Returns the new memoized function.
1194
- */
1195
- function memoizeCapped(func) {
1196
- var result = memoize_1(func, function(key) {
1197
- if (cache.size === MAX_MEMOIZE_SIZE) {
1198
- cache.clear();
1199
- }
1200
- return key;
1201
- });
1202
-
1203
- var cache = result.cache;
1204
- return result;
1205
- }
1206
-
1207
- var _memoizeCapped = memoizeCapped;
1208
-
1209
- /** Used to match property names within property paths. */
1210
- var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
1211
-
1212
- /** Used to match backslashes in property paths. */
1213
- var reEscapeChar = /\\(\\)?/g;
1214
-
1215
- /**
1216
- * Converts `string` to a property path array.
1217
- *
1218
- * @private
1219
- * @param {string} string The string to convert.
1220
- * @returns {Array} Returns the property path array.
1221
- */
1222
- var stringToPath = _memoizeCapped(function(string) {
1223
- var result = [];
1224
- if (string.charCodeAt(0) === 46 /* . */) {
1225
- result.push('');
1226
- }
1227
- string.replace(rePropName, function(match, number, quote, subString) {
1228
- result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
1229
- });
1230
- return result;
1231
- });
1232
-
1233
- var _stringToPath = stringToPath;
1234
-
1235
- /**
1236
- * A specialized version of `_.map` for arrays without support for iteratee
1237
- * shorthands.
1238
- *
1239
- * @private
1240
- * @param {Array} [array] The array to iterate over.
1241
- * @param {Function} iteratee The function invoked per iteration.
1242
- * @returns {Array} Returns the new mapped array.
1243
- */
1244
- function arrayMap(array, iteratee) {
1245
- var index = -1,
1246
- length = array == null ? 0 : array.length,
1247
- result = Array(length);
1248
-
1249
- while (++index < length) {
1250
- result[index] = iteratee(array[index], index, array);
1251
- }
1252
- return result;
1253
- }
1254
-
1255
- var _arrayMap = arrayMap;
1256
-
1257
- /** Used as references for various `Number` constants. */
1258
- var INFINITY$1 = 1 / 0;
1259
-
1260
- /** Used to convert symbols to primitives and strings. */
1261
- var symbolProto = _Symbol ? _Symbol.prototype : undefined,
1262
- symbolToString = symbolProto ? symbolProto.toString : undefined;
1263
-
1264
- /**
1265
- * The base implementation of `_.toString` which doesn't convert nullish
1266
- * values to empty strings.
1267
- *
1268
- * @private
1269
- * @param {*} value The value to process.
1270
- * @returns {string} Returns the string.
1271
- */
1272
- function baseToString(value) {
1273
- // Exit early for strings to avoid a performance hit in some environments.
1274
- if (typeof value == 'string') {
1275
- return value;
1276
- }
1277
- if (isArray_1(value)) {
1278
- // Recursively convert values (susceptible to call stack limits).
1279
- return _arrayMap(value, baseToString) + '';
1280
- }
1281
- if (isSymbol_1(value)) {
1282
- return symbolToString ? symbolToString.call(value) : '';
1283
- }
1284
- var result = (value + '');
1285
- return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
1286
- }
1287
-
1288
- var _baseToString = baseToString;
1289
-
1290
- /**
1291
- * Converts `value` to a string. An empty string is returned for `null`
1292
- * and `undefined` values. The sign of `-0` is preserved.
1293
- *
1294
- * @static
1295
- * @memberOf _
1296
- * @since 4.0.0
1297
- * @category Lang
1298
- * @param {*} value The value to convert.
1299
- * @returns {string} Returns the converted string.
1300
- * @example
1301
- *
1302
- * _.toString(null);
1303
- * // => ''
1304
- *
1305
- * _.toString(-0);
1306
- * // => '-0'
1307
- *
1308
- * _.toString([1, 2, 3]);
1309
- * // => '1,2,3'
1310
- */
1311
- function toString(value) {
1312
- return value == null ? '' : _baseToString(value);
1313
- }
1314
-
1315
- var toString_1 = toString;
1316
-
1317
- /**
1318
- * Casts `value` to a path array if it's not one.
1319
- *
1320
- * @private
1321
- * @param {*} value The value to inspect.
1322
- * @param {Object} [object] The object to query keys on.
1323
- * @returns {Array} Returns the cast property path array.
1324
- */
1325
- function castPath(value, object) {
1326
- if (isArray_1(value)) {
1327
- return value;
1328
- }
1329
- return _isKey(value, object) ? [value] : _stringToPath(toString_1(value));
1330
- }
1331
-
1332
- var _castPath = castPath;
1333
-
1334
- /** Used as references for various `Number` constants. */
1335
- var INFINITY = 1 / 0;
1336
-
1337
- /**
1338
- * Converts `value` to a string key if it's not a string or symbol.
1339
- *
1340
- * @private
1341
- * @param {*} value The value to inspect.
1342
- * @returns {string|symbol} Returns the key.
1343
- */
1344
- function toKey(value) {
1345
- if (typeof value == 'string' || isSymbol_1(value)) {
1346
- return value;
1347
- }
1348
- var result = (value + '');
1349
- return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
1350
- }
1351
-
1352
- var _toKey = toKey;
1353
-
1354
- /**
1355
- * The base implementation of `_.get` without support for default values.
1356
- *
1357
- * @private
1358
- * @param {Object} object The object to query.
1359
- * @param {Array|string} path The path of the property to get.
1360
- * @returns {*} Returns the resolved value.
1361
- */
1362
- function baseGet(object, path) {
1363
- path = _castPath(path, object);
1364
-
1365
- var index = 0,
1366
- length = path.length;
1367
-
1368
- while (object != null && index < length) {
1369
- object = object[_toKey(path[index++])];
1370
- }
1371
- return (index && index == length) ? object : undefined;
1372
- }
1373
-
1374
- var _baseGet = baseGet;
1375
-
1376
- /**
1377
- * Gets the value at `path` of `object`. If the resolved value is
1378
- * `undefined`, the `defaultValue` is returned in its place.
1379
- *
1380
- * @static
1381
- * @memberOf _
1382
- * @since 3.7.0
1383
- * @category Object
1384
- * @param {Object} object The object to query.
1385
- * @param {Array|string} path The path of the property to get.
1386
- * @param {*} [defaultValue] The value returned for `undefined` resolved values.
1387
- * @returns {*} Returns the resolved value.
1388
- * @example
1389
- *
1390
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
1391
- *
1392
- * _.get(object, 'a[0].b.c');
1393
- * // => 3
1394
- *
1395
- * _.get(object, ['a', '0', 'b', 'c']);
1396
- * // => 3
1397
- *
1398
- * _.get(object, 'a.b.c', 'default');
1399
- * // => 'default'
1400
- */
1401
- function get(object, path, defaultValue) {
1402
- var result = object == null ? undefined : _baseGet(object, path);
1403
- return result === undefined ? defaultValue : result;
1404
- }
1405
-
1406
- var get_1 = get;
1407
-
1408
- /**
1409
- * Copyright (c) 2014-present, Facebook, Inc.
1410
- *
1411
- * This source code is licensed under the MIT license found in the
1412
- * LICENSE file in the root directory of this source tree.
1413
- */
1414
-
1415
- createCommonjsModule(function (module) {
1416
- var runtime = (function (exports) {
1417
-
1418
- var Op = Object.prototype;
1419
- var hasOwn = Op.hasOwnProperty;
1420
- var undefined$1; // More compressible than void 0.
1421
- var $Symbol = typeof Symbol === "function" ? Symbol : {};
1422
- var iteratorSymbol = $Symbol.iterator || "@@iterator";
1423
- var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
1424
- var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
1425
-
1426
- function define(obj, key, value) {
1427
- Object.defineProperty(obj, key, {
1428
- value: value,
1429
- enumerable: true,
1430
- configurable: true,
1431
- writable: true
1432
- });
1433
- return obj[key];
1434
- }
1435
- try {
1436
- // IE 8 has a broken Object.defineProperty that only works on DOM objects.
1437
- define({}, "");
1438
- } catch (err) {
1439
- define = function(obj, key, value) {
1440
- return obj[key] = value;
1441
- };
1442
- }
1443
-
1444
- function wrap(innerFn, outerFn, self, tryLocsList) {
1445
- // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
1446
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
1447
- var generator = Object.create(protoGenerator.prototype);
1448
- var context = new Context(tryLocsList || []);
1449
-
1450
- // The ._invoke method unifies the implementations of the .next,
1451
- // .throw, and .return methods.
1452
- generator._invoke = makeInvokeMethod(innerFn, self, context);
1453
-
1454
- return generator;
1455
- }
1456
- exports.wrap = wrap;
1457
-
1458
- // Try/catch helper to minimize deoptimizations. Returns a completion
1459
- // record like context.tryEntries[i].completion. This interface could
1460
- // have been (and was previously) designed to take a closure to be
1461
- // invoked without arguments, but in all the cases we care about we
1462
- // already have an existing method we want to call, so there's no need
1463
- // to create a new function object. We can even get away with assuming
1464
- // the method takes exactly one argument, since that happens to be true
1465
- // in every case, so we don't have to touch the arguments object. The
1466
- // only additional allocation required is the completion record, which
1467
- // has a stable shape and so hopefully should be cheap to allocate.
1468
- function tryCatch(fn, obj, arg) {
1469
- try {
1470
- return { type: "normal", arg: fn.call(obj, arg) };
1471
- } catch (err) {
1472
- return { type: "throw", arg: err };
1473
- }
1474
- }
1475
-
1476
- var GenStateSuspendedStart = "suspendedStart";
1477
- var GenStateSuspendedYield = "suspendedYield";
1478
- var GenStateExecuting = "executing";
1479
- var GenStateCompleted = "completed";
1480
-
1481
- // Returning this object from the innerFn has the same effect as
1482
- // breaking out of the dispatch switch statement.
1483
- var ContinueSentinel = {};
1484
-
1485
- // Dummy constructor functions that we use as the .constructor and
1486
- // .constructor.prototype properties for functions that return Generator
1487
- // objects. For full spec compliance, you may wish to configure your
1488
- // minifier not to mangle the names of these two functions.
1489
- function Generator() {}
1490
- function GeneratorFunction() {}
1491
- function GeneratorFunctionPrototype() {}
1492
-
1493
- // This is a polyfill for %IteratorPrototype% for environments that
1494
- // don't natively support it.
1495
- var IteratorPrototype = {};
1496
- define(IteratorPrototype, iteratorSymbol, function () {
1497
- return this;
1498
- });
1499
-
1500
- var getProto = Object.getPrototypeOf;
1501
- var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
1502
- if (NativeIteratorPrototype &&
1503
- NativeIteratorPrototype !== Op &&
1504
- hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
1505
- // This environment has a native %IteratorPrototype%; use it instead
1506
- // of the polyfill.
1507
- IteratorPrototype = NativeIteratorPrototype;
1508
- }
1509
-
1510
- var Gp = GeneratorFunctionPrototype.prototype =
1511
- Generator.prototype = Object.create(IteratorPrototype);
1512
- GeneratorFunction.prototype = GeneratorFunctionPrototype;
1513
- define(Gp, "constructor", GeneratorFunctionPrototype);
1514
- define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
1515
- GeneratorFunction.displayName = define(
1516
- GeneratorFunctionPrototype,
1517
- toStringTagSymbol,
1518
- "GeneratorFunction"
1519
- );
1520
-
1521
- // Helper for defining the .next, .throw, and .return methods of the
1522
- // Iterator interface in terms of a single ._invoke method.
1523
- function defineIteratorMethods(prototype) {
1524
- ["next", "throw", "return"].forEach(function(method) {
1525
- define(prototype, method, function(arg) {
1526
- return this._invoke(method, arg);
1527
- });
1528
- });
1529
- }
1530
-
1531
- exports.isGeneratorFunction = function(genFun) {
1532
- var ctor = typeof genFun === "function" && genFun.constructor;
1533
- return ctor
1534
- ? ctor === GeneratorFunction ||
1535
- // For the native GeneratorFunction constructor, the best we can
1536
- // do is to check its .name property.
1537
- (ctor.displayName || ctor.name) === "GeneratorFunction"
1538
- : false;
1539
- };
1540
-
1541
- exports.mark = function(genFun) {
1542
- if (Object.setPrototypeOf) {
1543
- Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
1544
- } else {
1545
- genFun.__proto__ = GeneratorFunctionPrototype;
1546
- define(genFun, toStringTagSymbol, "GeneratorFunction");
1547
- }
1548
- genFun.prototype = Object.create(Gp);
1549
- return genFun;
1550
- };
1551
-
1552
- // Within the body of any async function, `await x` is transformed to
1553
- // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
1554
- // `hasOwn.call(value, "__await")` to determine if the yielded value is
1555
- // meant to be awaited.
1556
- exports.awrap = function(arg) {
1557
- return { __await: arg };
1558
- };
1559
-
1560
- function AsyncIterator(generator, PromiseImpl) {
1561
- function invoke(method, arg, resolve, reject) {
1562
- var record = tryCatch(generator[method], generator, arg);
1563
- if (record.type === "throw") {
1564
- reject(record.arg);
1565
- } else {
1566
- var result = record.arg;
1567
- var value = result.value;
1568
- if (value &&
1569
- typeof value === "object" &&
1570
- hasOwn.call(value, "__await")) {
1571
- return PromiseImpl.resolve(value.__await).then(function(value) {
1572
- invoke("next", value, resolve, reject);
1573
- }, function(err) {
1574
- invoke("throw", err, resolve, reject);
1575
- });
1576
- }
1577
-
1578
- return PromiseImpl.resolve(value).then(function(unwrapped) {
1579
- // When a yielded Promise is resolved, its final value becomes
1580
- // the .value of the Promise<{value,done}> result for the
1581
- // current iteration.
1582
- result.value = unwrapped;
1583
- resolve(result);
1584
- }, function(error) {
1585
- // If a rejected Promise was yielded, throw the rejection back
1586
- // into the async generator function so it can be handled there.
1587
- return invoke("throw", error, resolve, reject);
1588
- });
1589
- }
1590
- }
1591
-
1592
- var previousPromise;
1593
-
1594
- function enqueue(method, arg) {
1595
- function callInvokeWithMethodAndArg() {
1596
- return new PromiseImpl(function(resolve, reject) {
1597
- invoke(method, arg, resolve, reject);
1598
- });
1599
- }
1600
-
1601
- return previousPromise =
1602
- // If enqueue has been called before, then we want to wait until
1603
- // all previous Promises have been resolved before calling invoke,
1604
- // so that results are always delivered in the correct order. If
1605
- // enqueue has not been called before, then it is important to
1606
- // call invoke immediately, without waiting on a callback to fire,
1607
- // so that the async generator function has the opportunity to do
1608
- // any necessary setup in a predictable way. This predictability
1609
- // is why the Promise constructor synchronously invokes its
1610
- // executor callback, and why async functions synchronously
1611
- // execute code before the first await. Since we implement simple
1612
- // async functions in terms of async generators, it is especially
1613
- // important to get this right, even though it requires care.
1614
- previousPromise ? previousPromise.then(
1615
- callInvokeWithMethodAndArg,
1616
- // Avoid propagating failures to Promises returned by later
1617
- // invocations of the iterator.
1618
- callInvokeWithMethodAndArg
1619
- ) : callInvokeWithMethodAndArg();
1620
- }
1621
-
1622
- // Define the unified helper method that is used to implement .next,
1623
- // .throw, and .return (see defineIteratorMethods).
1624
- this._invoke = enqueue;
1625
- }
1626
-
1627
- defineIteratorMethods(AsyncIterator.prototype);
1628
- define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
1629
- return this;
1630
- });
1631
- exports.AsyncIterator = AsyncIterator;
1632
-
1633
- // Note that simple async functions are implemented on top of
1634
- // AsyncIterator objects; they just return a Promise for the value of
1635
- // the final result produced by the iterator.
1636
- exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
1637
- if (PromiseImpl === void 0) PromiseImpl = Promise;
1638
-
1639
- var iter = new AsyncIterator(
1640
- wrap(innerFn, outerFn, self, tryLocsList),
1641
- PromiseImpl
1642
- );
1643
-
1644
- return exports.isGeneratorFunction(outerFn)
1645
- ? iter // If outerFn is a generator, return the full iterator.
1646
- : iter.next().then(function(result) {
1647
- return result.done ? result.value : iter.next();
1648
- });
1649
- };
1650
-
1651
- function makeInvokeMethod(innerFn, self, context) {
1652
- var state = GenStateSuspendedStart;
1653
-
1654
- return function invoke(method, arg) {
1655
- if (state === GenStateExecuting) {
1656
- throw new Error("Generator is already running");
1657
- }
1658
-
1659
- if (state === GenStateCompleted) {
1660
- if (method === "throw") {
1661
- throw arg;
1662
- }
1663
-
1664
- // Be forgiving, per 25.3.3.3.3 of the spec:
1665
- // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
1666
- return doneResult();
1667
- }
1668
-
1669
- context.method = method;
1670
- context.arg = arg;
1671
-
1672
- while (true) {
1673
- var delegate = context.delegate;
1674
- if (delegate) {
1675
- var delegateResult = maybeInvokeDelegate(delegate, context);
1676
- if (delegateResult) {
1677
- if (delegateResult === ContinueSentinel) continue;
1678
- return delegateResult;
1679
- }
1680
- }
1681
-
1682
- if (context.method === "next") {
1683
- // Setting context._sent for legacy support of Babel's
1684
- // function.sent implementation.
1685
- context.sent = context._sent = context.arg;
1686
-
1687
- } else if (context.method === "throw") {
1688
- if (state === GenStateSuspendedStart) {
1689
- state = GenStateCompleted;
1690
- throw context.arg;
1691
- }
1692
-
1693
- context.dispatchException(context.arg);
1694
-
1695
- } else if (context.method === "return") {
1696
- context.abrupt("return", context.arg);
1697
- }
1698
-
1699
- state = GenStateExecuting;
1700
-
1701
- var record = tryCatch(innerFn, self, context);
1702
- if (record.type === "normal") {
1703
- // If an exception is thrown from innerFn, we leave state ===
1704
- // GenStateExecuting and loop back for another invocation.
1705
- state = context.done
1706
- ? GenStateCompleted
1707
- : GenStateSuspendedYield;
1708
-
1709
- if (record.arg === ContinueSentinel) {
1710
- continue;
1711
- }
1712
-
1713
- return {
1714
- value: record.arg,
1715
- done: context.done
1716
- };
1717
-
1718
- } else if (record.type === "throw") {
1719
- state = GenStateCompleted;
1720
- // Dispatch the exception by looping back around to the
1721
- // context.dispatchException(context.arg) call above.
1722
- context.method = "throw";
1723
- context.arg = record.arg;
1724
- }
1725
- }
1726
- };
1727
- }
1728
-
1729
- // Call delegate.iterator[context.method](context.arg) and handle the
1730
- // result, either by returning a { value, done } result from the
1731
- // delegate iterator, or by modifying context.method and context.arg,
1732
- // setting context.delegate to null, and returning the ContinueSentinel.
1733
- function maybeInvokeDelegate(delegate, context) {
1734
- var method = delegate.iterator[context.method];
1735
- if (method === undefined$1) {
1736
- // A .throw or .return when the delegate iterator has no .throw
1737
- // method always terminates the yield* loop.
1738
- context.delegate = null;
1739
-
1740
- if (context.method === "throw") {
1741
- // Note: ["return"] must be used for ES3 parsing compatibility.
1742
- if (delegate.iterator["return"]) {
1743
- // If the delegate iterator has a return method, give it a
1744
- // chance to clean up.
1745
- context.method = "return";
1746
- context.arg = undefined$1;
1747
- maybeInvokeDelegate(delegate, context);
1748
-
1749
- if (context.method === "throw") {
1750
- // If maybeInvokeDelegate(context) changed context.method from
1751
- // "return" to "throw", let that override the TypeError below.
1752
- return ContinueSentinel;
1753
- }
1754
- }
1755
-
1756
- context.method = "throw";
1757
- context.arg = new TypeError(
1758
- "The iterator does not provide a 'throw' method");
1759
- }
1760
-
1761
- return ContinueSentinel;
1762
- }
1763
-
1764
- var record = tryCatch(method, delegate.iterator, context.arg);
1765
-
1766
- if (record.type === "throw") {
1767
- context.method = "throw";
1768
- context.arg = record.arg;
1769
- context.delegate = null;
1770
- return ContinueSentinel;
1771
- }
1772
-
1773
- var info = record.arg;
1774
-
1775
- if (! info) {
1776
- context.method = "throw";
1777
- context.arg = new TypeError("iterator result is not an object");
1778
- context.delegate = null;
1779
- return ContinueSentinel;
1780
- }
1781
-
1782
- if (info.done) {
1783
- // Assign the result of the finished delegate to the temporary
1784
- // variable specified by delegate.resultName (see delegateYield).
1785
- context[delegate.resultName] = info.value;
1786
-
1787
- // Resume execution at the desired location (see delegateYield).
1788
- context.next = delegate.nextLoc;
1789
-
1790
- // If context.method was "throw" but the delegate handled the
1791
- // exception, let the outer generator proceed normally. If
1792
- // context.method was "next", forget context.arg since it has been
1793
- // "consumed" by the delegate iterator. If context.method was
1794
- // "return", allow the original .return call to continue in the
1795
- // outer generator.
1796
- if (context.method !== "return") {
1797
- context.method = "next";
1798
- context.arg = undefined$1;
1799
- }
1800
-
1801
- } else {
1802
- // Re-yield the result returned by the delegate method.
1803
- return info;
1804
- }
1805
-
1806
- // The delegate iterator is finished, so forget it and continue with
1807
- // the outer generator.
1808
- context.delegate = null;
1809
- return ContinueSentinel;
1810
- }
1811
-
1812
- // Define Generator.prototype.{next,throw,return} in terms of the
1813
- // unified ._invoke helper method.
1814
- defineIteratorMethods(Gp);
1815
-
1816
- define(Gp, toStringTagSymbol, "Generator");
1817
-
1818
- // A Generator should always return itself as the iterator object when the
1819
- // @@iterator function is called on it. Some browsers' implementations of the
1820
- // iterator prototype chain incorrectly implement this, causing the Generator
1821
- // object to not be returned from this call. This ensures that doesn't happen.
1822
- // See https://github.com/facebook/regenerator/issues/274 for more details.
1823
- define(Gp, iteratorSymbol, function() {
1824
- return this;
1825
- });
1826
-
1827
- define(Gp, "toString", function() {
1828
- return "[object Generator]";
1829
- });
1830
-
1831
- function pushTryEntry(locs) {
1832
- var entry = { tryLoc: locs[0] };
1833
-
1834
- if (1 in locs) {
1835
- entry.catchLoc = locs[1];
1836
- }
1837
-
1838
- if (2 in locs) {
1839
- entry.finallyLoc = locs[2];
1840
- entry.afterLoc = locs[3];
1841
- }
1842
-
1843
- this.tryEntries.push(entry);
1844
- }
1845
-
1846
- function resetTryEntry(entry) {
1847
- var record = entry.completion || {};
1848
- record.type = "normal";
1849
- delete record.arg;
1850
- entry.completion = record;
1851
- }
1852
-
1853
- function Context(tryLocsList) {
1854
- // The root entry object (effectively a try statement without a catch
1855
- // or a finally block) gives us a place to store values thrown from
1856
- // locations where there is no enclosing try statement.
1857
- this.tryEntries = [{ tryLoc: "root" }];
1858
- tryLocsList.forEach(pushTryEntry, this);
1859
- this.reset(true);
1860
- }
1861
-
1862
- exports.keys = function(object) {
1863
- var keys = [];
1864
- for (var key in object) {
1865
- keys.push(key);
1866
- }
1867
- keys.reverse();
1868
-
1869
- // Rather than returning an object with a next method, we keep
1870
- // things simple and return the next function itself.
1871
- return function next() {
1872
- while (keys.length) {
1873
- var key = keys.pop();
1874
- if (key in object) {
1875
- next.value = key;
1876
- next.done = false;
1877
- return next;
1878
- }
1879
- }
1880
-
1881
- // To avoid creating an additional object, we just hang the .value
1882
- // and .done properties off the next function object itself. This
1883
- // also ensures that the minifier will not anonymize the function.
1884
- next.done = true;
1885
- return next;
1886
- };
1887
- };
1888
-
1889
- function values(iterable) {
1890
- if (iterable) {
1891
- var iteratorMethod = iterable[iteratorSymbol];
1892
- if (iteratorMethod) {
1893
- return iteratorMethod.call(iterable);
1894
- }
1895
-
1896
- if (typeof iterable.next === "function") {
1897
- return iterable;
1898
- }
1899
-
1900
- if (!isNaN(iterable.length)) {
1901
- var i = -1, next = function next() {
1902
- while (++i < iterable.length) {
1903
- if (hasOwn.call(iterable, i)) {
1904
- next.value = iterable[i];
1905
- next.done = false;
1906
- return next;
1907
- }
1908
- }
1909
-
1910
- next.value = undefined$1;
1911
- next.done = true;
1912
-
1913
- return next;
1914
- };
1915
-
1916
- return next.next = next;
1917
- }
1918
- }
1919
-
1920
- // Return an iterator with no values.
1921
- return { next: doneResult };
1922
- }
1923
- exports.values = values;
1924
-
1925
- function doneResult() {
1926
- return { value: undefined$1, done: true };
1927
- }
1928
-
1929
- Context.prototype = {
1930
- constructor: Context,
1931
-
1932
- reset: function(skipTempReset) {
1933
- this.prev = 0;
1934
- this.next = 0;
1935
- // Resetting context._sent for legacy support of Babel's
1936
- // function.sent implementation.
1937
- this.sent = this._sent = undefined$1;
1938
- this.done = false;
1939
- this.delegate = null;
1940
-
1941
- this.method = "next";
1942
- this.arg = undefined$1;
1943
-
1944
- this.tryEntries.forEach(resetTryEntry);
1945
-
1946
- if (!skipTempReset) {
1947
- for (var name in this) {
1948
- // Not sure about the optimal order of these conditions:
1949
- if (name.charAt(0) === "t" &&
1950
- hasOwn.call(this, name) &&
1951
- !isNaN(+name.slice(1))) {
1952
- this[name] = undefined$1;
1953
- }
1954
- }
1955
- }
1956
- },
1957
-
1958
- stop: function() {
1959
- this.done = true;
1960
-
1961
- var rootEntry = this.tryEntries[0];
1962
- var rootRecord = rootEntry.completion;
1963
- if (rootRecord.type === "throw") {
1964
- throw rootRecord.arg;
1965
- }
1966
-
1967
- return this.rval;
1968
- },
1969
-
1970
- dispatchException: function(exception) {
1971
- if (this.done) {
1972
- throw exception;
1973
- }
1974
-
1975
- var context = this;
1976
- function handle(loc, caught) {
1977
- record.type = "throw";
1978
- record.arg = exception;
1979
- context.next = loc;
1980
-
1981
- if (caught) {
1982
- // If the dispatched exception was caught by a catch block,
1983
- // then let that catch block handle the exception normally.
1984
- context.method = "next";
1985
- context.arg = undefined$1;
1986
- }
1987
-
1988
- return !! caught;
1989
- }
1990
-
1991
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
1992
- var entry = this.tryEntries[i];
1993
- var record = entry.completion;
1994
-
1995
- if (entry.tryLoc === "root") {
1996
- // Exception thrown outside of any try block that could handle
1997
- // it, so set the completion value of the entire function to
1998
- // throw the exception.
1999
- return handle("end");
2000
- }
2001
-
2002
- if (entry.tryLoc <= this.prev) {
2003
- var hasCatch = hasOwn.call(entry, "catchLoc");
2004
- var hasFinally = hasOwn.call(entry, "finallyLoc");
2005
-
2006
- if (hasCatch && hasFinally) {
2007
- if (this.prev < entry.catchLoc) {
2008
- return handle(entry.catchLoc, true);
2009
- } else if (this.prev < entry.finallyLoc) {
2010
- return handle(entry.finallyLoc);
2011
- }
2012
-
2013
- } else if (hasCatch) {
2014
- if (this.prev < entry.catchLoc) {
2015
- return handle(entry.catchLoc, true);
2016
- }
2017
-
2018
- } else if (hasFinally) {
2019
- if (this.prev < entry.finallyLoc) {
2020
- return handle(entry.finallyLoc);
2021
- }
2022
-
2023
- } else {
2024
- throw new Error("try statement without catch or finally");
2025
- }
2026
- }
2027
- }
2028
- },
2029
-
2030
- abrupt: function(type, arg) {
2031
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
2032
- var entry = this.tryEntries[i];
2033
- if (entry.tryLoc <= this.prev &&
2034
- hasOwn.call(entry, "finallyLoc") &&
2035
- this.prev < entry.finallyLoc) {
2036
- var finallyEntry = entry;
2037
- break;
2038
- }
2039
- }
2040
-
2041
- if (finallyEntry &&
2042
- (type === "break" ||
2043
- type === "continue") &&
2044
- finallyEntry.tryLoc <= arg &&
2045
- arg <= finallyEntry.finallyLoc) {
2046
- // Ignore the finally entry if control is not jumping to a
2047
- // location outside the try/catch block.
2048
- finallyEntry = null;
2049
- }
2050
-
2051
- var record = finallyEntry ? finallyEntry.completion : {};
2052
- record.type = type;
2053
- record.arg = arg;
2054
-
2055
- if (finallyEntry) {
2056
- this.method = "next";
2057
- this.next = finallyEntry.finallyLoc;
2058
- return ContinueSentinel;
2059
- }
2060
-
2061
- return this.complete(record);
2062
- },
2063
-
2064
- complete: function(record, afterLoc) {
2065
- if (record.type === "throw") {
2066
- throw record.arg;
2067
- }
2068
-
2069
- if (record.type === "break" ||
2070
- record.type === "continue") {
2071
- this.next = record.arg;
2072
- } else if (record.type === "return") {
2073
- this.rval = this.arg = record.arg;
2074
- this.method = "return";
2075
- this.next = "end";
2076
- } else if (record.type === "normal" && afterLoc) {
2077
- this.next = afterLoc;
2078
- }
2079
-
2080
- return ContinueSentinel;
2081
- },
2082
-
2083
- finish: function(finallyLoc) {
2084
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
2085
- var entry = this.tryEntries[i];
2086
- if (entry.finallyLoc === finallyLoc) {
2087
- this.complete(entry.completion, entry.afterLoc);
2088
- resetTryEntry(entry);
2089
- return ContinueSentinel;
2090
- }
2091
- }
2092
- },
2093
-
2094
- "catch": function(tryLoc) {
2095
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
2096
- var entry = this.tryEntries[i];
2097
- if (entry.tryLoc === tryLoc) {
2098
- var record = entry.completion;
2099
- if (record.type === "throw") {
2100
- var thrown = record.arg;
2101
- resetTryEntry(entry);
2102
- }
2103
- return thrown;
2104
- }
2105
- }
2106
-
2107
- // The context.catch method must only be called with a location
2108
- // argument that corresponds to a known catch block.
2109
- throw new Error("illegal catch attempt");
2110
- },
2111
-
2112
- delegateYield: function(iterable, resultName, nextLoc) {
2113
- this.delegate = {
2114
- iterator: values(iterable),
2115
- resultName: resultName,
2116
- nextLoc: nextLoc
2117
- };
2118
-
2119
- if (this.method === "next") {
2120
- // Deliberately forget the last sent value so that we don't
2121
- // accidentally pass it on to the delegate.
2122
- this.arg = undefined$1;
2123
- }
2124
-
2125
- return ContinueSentinel;
2126
- }
2127
- };
2128
-
2129
- // Regardless of whether this script is executing as a CommonJS module
2130
- // or not, return the runtime object so that we can declare the variable
2131
- // regeneratorRuntime in the outer scope, which allows this module to be
2132
- // injected easily by `bin/regenerator --include-runtime script.js`.
2133
- return exports;
2134
-
2135
- }(
2136
- // If this script is executing as a CommonJS module, use module.exports
2137
- // as the regeneratorRuntime namespace. Otherwise create a new empty
2138
- // object. Either way, the resulting object will be used to initialize
2139
- // the regeneratorRuntime variable at the top of this file.
2140
- module.exports
2141
- ));
2142
-
2143
- try {
2144
- regeneratorRuntime = runtime;
2145
- } catch (accidentalStrictMode) {
2146
- // This module should not be running in strict mode, so the above
2147
- // assignment should always work unless something is misconfigured. Just
2148
- // in case runtime.js accidentally runs in strict mode, in modern engines
2149
- // we can explicitly access globalThis. In older engines we can escape
2150
- // strict mode using a global Function call. This could conceivably fail
2151
- // if a Content Security Policy forbids using Function, but in that case
2152
- // the proper solution is to fix the accidental strict mode problem. If
2153
- // you've misconfigured your bundler to force strict mode and applied a
2154
- // CSP to forbid Function, and you're not willing to fix either of those
2155
- // problems, please detail your unique predicament in a GitHub issue.
2156
- if (typeof globalThis === "object") {
2157
- globalThis.regeneratorRuntime = runtime;
2158
- } else {
2159
- Function("r", "regeneratorRuntime = r")(runtime);
2160
- }
2161
- }
2162
- });
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
6
+ var _getClassName = require('babel-plugin-react-css-modules/dist/browser/getClassName');
7
+ var components = require('@quintype/components');
8
+ var lodash = require('lodash');
9
+ var PropTypes = require('prop-types');
10
+ var React = require('react');
11
+ var reactRedux = require('react-redux');
12
+ require('@babel/runtime/helpers/asyncToGenerator');
13
+ require('@babel/runtime/helpers/typeof');
14
+ require('@babel/runtime/regenerator');
15
+ require('react-timeago');
16
+ require('date-fns-tz');
17
+
18
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
19
+
20
+ var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
21
+ var _getClassName__default = /*#__PURE__*/_interopDefaultLegacy(_getClassName);
22
+ var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
23
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
2163
24
 
2164
25
  var clientWidths = {
2165
26
  mobile: 767,
2166
27
  tablet: 1024
2167
28
  };
2168
29
  var clientWidth = function clientWidth(device) {
2169
- var foundDeviceWidth = get_1(clientWidths, device);
30
+ var foundDeviceWidth = lodash.get(clientWidths, device);
2170
31
 
2171
32
  if (foundDeviceWidth) {
2172
- return get_1(global, "document.documentElement.clientWidth") <= foundDeviceWidth;
33
+ return lodash.get(global, "document.documentElement.clientWidth") <= foundDeviceWidth;
2173
34
  }
2174
35
 
2175
36
  return false;
@@ -2180,26 +41,26 @@ function isExternalStory() {
2180
41
  storyTemplate = _story$storyTemplate === void 0 ? "" : _story$storyTemplate,
2181
42
  _story$metadata = story.metadata,
2182
43
  metadata = _story$metadata === void 0 ? {} : _story$metadata;
2183
- return storyTemplate === "news-elsewhere" ? get_1(metadata, ["reference-url"], "") : "";
44
+ return storyTemplate === "news-elsewhere" ? lodash.get(metadata, ["reference-url"], "") : "";
2184
45
  } // Adds target='_blank' attribute to anchor tags if not present
2185
- PropTypes.shape({
2186
- "sketches-host": PropTypes.string,
2187
- "cdn-name": PropTypes.string,
2188
- "cdn-image": PropTypes.string
46
+ PropTypes__default["default"].shape({
47
+ "sketches-host": PropTypes__default["default"].string,
48
+ "cdn-name": PropTypes__default["default"].string,
49
+ "cdn-image": PropTypes__default["default"].string
2189
50
  });
2190
- PropTypes.shape({
2191
- headline: PropTypes.string,
2192
- "last-published-at": PropTypes.number,
2193
- subheadline: PropTypes.string
51
+ PropTypes__default["default"].shape({
52
+ headline: PropTypes__default["default"].string,
53
+ "last-published-at": PropTypes__default["default"].number,
54
+ subheadline: PropTypes__default["default"].string
2194
55
  });
2195
56
  var getStoryUrl = function getStoryUrl(story) {
2196
57
  var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
2197
- return get_1(story, ["story-template"]) === "news-elsewhere" ? get_1(story, ["metadata", "reference-url"], "") : story.url || defaultValue;
58
+ return lodash.get(story, ["story-template"]) === "news-elsewhere" ? lodash.get(story, ["metadata", "reference-url"], "") : story.url || defaultValue;
2198
59
  };
2199
60
 
2200
- var StateContext = /*#__PURE__*/createContext(); // eslint-disable-next-line react/display-name
61
+ var StateContext = /*#__PURE__*/React.createContext(); // eslint-disable-next-line react/display-name
2201
62
  var useStateValue = function useStateValue() {
2202
- return useContext(StateContext);
63
+ return React.useContext(StateContext);
2203
64
  };
2204
65
 
2205
66
  var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
@@ -2209,27 +70,27 @@ var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
2209
70
  height = _ref$height === void 0 ? 30 : _ref$height,
2210
71
  _ref$iconColor = _ref.iconColor,
2211
72
  iconColor = _ref$iconColor === void 0 ? "#99B0CB" : _ref$iconColor;
2212
- return /*#__PURE__*/React.createElement("svg", {
73
+ return /*#__PURE__*/React__default["default"].createElement("svg", {
2213
74
  width: width,
2214
75
  height: height,
2215
76
  viewBox: "0 0 102 76",
2216
77
  version: "1.1"
2217
- }, /*#__PURE__*/React.createElement("g", {
78
+ }, /*#__PURE__*/React__default["default"].createElement("g", {
2218
79
  id: "demo-home-copy",
2219
80
  stroke: "none",
2220
81
  strokeWidth: "1",
2221
82
  fill: "none",
2222
83
  fillRule: "evenodd",
2223
84
  transform: "translate(-377.000000, -314.000000)"
2224
- }, /*#__PURE__*/React.createElement("g", {
85
+ }, /*#__PURE__*/React__default["default"].createElement("g", {
2225
86
  id: "Group-13",
2226
87
  transform: "translate(377.000000, 314.000000)"
2227
- }, /*#__PURE__*/React.createElement("path", {
88
+ }, /*#__PURE__*/React__default["default"].createElement("path", {
2228
89
  d: "M43.2,49.7 L62.2,19.2 L87.2,59.4 L17,59.4 L32.8,39.4 L43.2,49.7 Z M29.9,28.6 C25.8683213,28.6 22.6,25.3316787 22.6,21.3 C22.6,17.2683213 25.8683213,14 29.9,14 C33.9316787,14 37.2,17.2683213 37.2,21.3 C37.2,25.3316787 33.9316787,28.6 29.9,28.6 Z",
2229
90
  id: "Combined-Shape",
2230
91
  fill: iconColor,
2231
92
  fillRule: "nonzero"
2232
- }), /*#__PURE__*/React.createElement("rect", {
93
+ }), /*#__PURE__*/React__default["default"].createElement("rect", {
2233
94
  id: "Rectangle-19",
2234
95
  stroke: iconColor,
2235
96
  strokeWidth: "3",
@@ -2241,24 +102,24 @@ var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
2241
102
  }))));
2242
103
  };
2243
104
  ImageFallbackIcon.propTypes = {
2244
- width: PropTypes.object,
2245
- height: PropTypes.object,
2246
- iconColor: PropTypes.object
105
+ width: PropTypes__default["default"].object,
106
+ height: PropTypes__default["default"].object,
107
+ iconColor: PropTypes__default["default"].object
2247
108
  };
2248
109
 
2249
110
  var imageFallback = function imageFallback() {
2250
- return /*#__PURE__*/React.createElement("div", {
111
+ return /*#__PURE__*/React__default["default"].createElement("div", {
2251
112
  className: "arr--fallback-image fallback-m_image__1GYCJ fallback-m_image-position__3KddP"
2252
- }, /*#__PURE__*/React.createElement("figure", {
113
+ }, /*#__PURE__*/React__default["default"].createElement("figure", {
2253
114
  className: "arr--fallback-svg fallback-m_fallback-svg__tK9fL"
2254
- }, /*#__PURE__*/React.createElement(ImageFallbackIcon, null)));
115
+ }, /*#__PURE__*/React__default["default"].createElement(ImageFallbackIcon, null)));
2255
116
  };
2256
117
 
2257
118
  var FallbackImage = function FallbackImage(_ref) {
2258
119
  var slug = _ref.slug;
2259
120
 
2260
121
  if (slug) {
2261
- return /*#__PURE__*/React.createElement(Link, {
122
+ return /*#__PURE__*/React__default["default"].createElement(components.Link, {
2262
123
  href: slug,
2263
124
  "aria-label": "image-fallback"
2264
125
  }, imageFallback());
@@ -2267,23 +128,23 @@ var FallbackImage = function FallbackImage(_ref) {
2267
128
  }
2268
129
  };
2269
130
  FallbackImage.propTypes = {
2270
- slug: PropTypes.string
131
+ slug: PropTypes__default["default"].string
2271
132
  };
2272
133
 
2273
134
  var HyperLinkIcon = function HyperLinkIcon() {
2274
- return /*#__PURE__*/React.createElement("svg", {
135
+ return /*#__PURE__*/React__default["default"].createElement("svg", {
2275
136
  xmlns: "http://www.w3.org/2000/svg",
2276
137
  width: "36",
2277
138
  height: "28"
2278
- }, /*#__PURE__*/React.createElement("g", {
139
+ }, /*#__PURE__*/React__default["default"].createElement("g", {
2279
140
  fill: "none",
2280
141
  fillRule: "evenodd"
2281
- }, /*#__PURE__*/React.createElement("rect", {
142
+ }, /*#__PURE__*/React__default["default"].createElement("rect", {
2282
143
  width: "36",
2283
144
  height: "28",
2284
145
  fill: "#3D6FCF",
2285
146
  rx: "4"
2286
- }), /*#__PURE__*/React.createElement("path", {
147
+ }), /*#__PURE__*/React__default["default"].createElement("path", {
2287
148
  stroke: "#FFF",
2288
149
  strokeLinecap: "round",
2289
150
  strokeLinejoin: "round",
@@ -2296,16 +157,16 @@ var HyperLink = function HyperLink(_ref) {
2296
157
  var _ref$hyperLink = _ref.hyperLink,
2297
158
  hyperLink = _ref$hyperLink === void 0 ? "" : _ref$hyperLink;
2298
159
  if (!hyperLink) return null;
2299
- return /*#__PURE__*/React.createElement(Link, {
160
+ return /*#__PURE__*/React__default["default"].createElement(components.Link, {
2300
161
  href: hyperLink,
2301
162
  "aria-label": "hyperlink-button",
2302
163
  className: "arr--hyperlink-button hyperlink-m_hyperlink-button__1CqWx",
2303
164
  target: "_blank",
2304
165
  rel: "noopener noreferrer"
2305
- }, /*#__PURE__*/React.createElement(HyperLinkIcon, null));
166
+ }, /*#__PURE__*/React__default["default"].createElement(HyperLinkIcon, null));
2306
167
  };
2307
168
  HyperLink.propTypes = {
2308
- hyperLink: PropTypes.string
169
+ hyperLink: PropTypes__default["default"].string
2309
170
  };
2310
171
 
2311
172
  var _styleModuleImportMap = {
@@ -2341,8 +202,8 @@ var HeroImage = function HeroImage(_ref) {
2341
202
  StoryTemplateIcon = _config$StoryTemplate === void 0 ? function () {
2342
203
  return null;
2343
204
  } : _config$StoryTemplate;
2344
- var showImagePlaceholder = useSelector(function (state) {
2345
- return get_1(state, ["qt", "config", "showPlaceholder"]);
205
+ var showImagePlaceholder = reactRedux.useSelector(function (state) {
206
+ return lodash.get(state, ["qt", "config", "showPlaceholder"]);
2346
207
  });
2347
208
  var getPlaceholderStyleName = showImagePlaceholder ? "placeholder" : "";
2348
209
  var fullBleed = FullBleed ? "" : "with-padding";
@@ -2351,7 +212,7 @@ var HeroImage = function HeroImage(_ref) {
2351
212
  var heroImageMobClasses = isHorizontalMobile ? "right-padding-mob" : "";
2352
213
 
2353
214
  var getPadding = function getPadding(aspectRatio) {
2354
- var _aspectRatio = _slicedToArray(aspectRatio, 2),
215
+ var _aspectRatio = _slicedToArray__default["default"](aspectRatio, 2),
2355
216
  height = _aspectRatio[0],
2356
217
  width = _aspectRatio[1];
2357
218
 
@@ -2363,7 +224,7 @@ var HeroImage = function HeroImage(_ref) {
2363
224
  return 0;
2364
225
  };
2365
226
 
2366
- var _aspectRatio2 = _slicedToArray(aspectRatio, 2),
227
+ var _aspectRatio2 = _slicedToArray__default["default"](aspectRatio, 2),
2367
228
  mobileAspectRatio = _aspectRatio2[0],
2368
229
  _aspectRatio2$ = _aspectRatio2[1],
2369
230
  desktopAspectRatio = _aspectRatio2$ === void 0 ? mobileAspectRatio : _aspectRatio2$;
@@ -2371,43 +232,43 @@ var HeroImage = function HeroImage(_ref) {
2371
232
  var isMobile = clientWidth("mobile");
2372
233
  var imageAspectRatio = isMobile ? mobileAspectRatio : desktopAspectRatio;
2373
234
  var imagePadding = isMobile ? getPadding(mobileAspectRatio) : getPadding(desktopAspectRatio);
2374
- var slug = get_1(story, ["hero-image-s3-key"]) || get_1(story, ["alternative", "home", "default", "hero-image", "hero-image-s3-key"]);
2375
- var hyperLink = get_1(story, ["hero-image-hyperlink"], "");
235
+ var slug = lodash.get(story, ["hero-image-s3-key"]) || lodash.get(story, ["alternative", "home", "default", "hero-image", "hero-image-s3-key"]);
236
+ var hyperLink = lodash.get(story, ["hero-image-hyperlink"], "");
2376
237
 
2377
238
  var fallbackImage = function fallbackImage() {
2378
239
  if (!slug) {
2379
240
  if (fallbackImageUrl && !isStoryPageImage) {
2380
- return /*#__PURE__*/React.createElement("figure", {
241
+ return /*#__PURE__*/React__default["default"].createElement("figure", {
2381
242
  style: {
2382
243
  paddingTop: imagePadding + "%"
2383
244
  },
2384
- className: "arr--responsive-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap)
2385
- }, /*#__PURE__*/React.createElement("img", {
245
+ className: "arr--responsive-hero-image " + _getClassName__default["default"]("image ".concat(getPlaceholderStyleName), _styleModuleImportMap)
246
+ }, /*#__PURE__*/React__default["default"].createElement("img", {
2386
247
  className: "qt-image",
2387
248
  "data-src": "".concat(fallbackImageUrl),
2388
249
  alt: "image-fallback"
2389
250
  }));
2390
251
  }
2391
252
 
2392
- return /*#__PURE__*/React.createElement(React.Fragment, null, defaultFallback ? /*#__PURE__*/React.createElement("div", {
253
+ return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, defaultFallback ? /*#__PURE__*/React__default["default"].createElement("div", {
2393
254
  "data-test-id": "arr--fallback-hero-image",
2394
255
  style: {
2395
256
  paddingTop: imagePadding + "%"
2396
257
  },
2397
- className: "arr--fallback-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap)
2398
- }, /*#__PURE__*/React.createElement(StoryTemplateIcon, {
258
+ className: "arr--fallback-hero-image " + _getClassName__default["default"]("image ".concat(getPlaceholderStyleName), _styleModuleImportMap)
259
+ }, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
2399
260
  storyTemplate: story["story-template"]
2400
- }), /*#__PURE__*/React.createElement(FallbackImage, null)) : null);
261
+ }), /*#__PURE__*/React__default["default"].createElement(FallbackImage, null)) : null);
2401
262
  }
2402
263
 
2403
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("figure", {
264
+ return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("figure", {
2404
265
  style: {
2405
266
  paddingTop: imagePadding + "%"
2406
267
  },
2407
- className: "arr--responsive-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap)
2408
- }, /*#__PURE__*/React.createElement(StoryTemplateIcon, {
268
+ className: "arr--responsive-hero-image " + _getClassName__default["default"]("image ".concat(getPlaceholderStyleName), _styleModuleImportMap)
269
+ }, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
2409
270
  storyTemplate: story["story-template"]
2410
- }), /*#__PURE__*/React.createElement(ResponsiveHeroImage, {
271
+ }), /*#__PURE__*/React__default["default"].createElement(components.ResponsiveHeroImage, {
2411
272
  story: story,
2412
273
  aspectRatio: imageAspectRatio,
2413
274
  defaultWidth: defaultWidth,
@@ -2416,48 +277,48 @@ var HeroImage = function HeroImage(_ref) {
2416
277
  auto: ["format", "compress"],
2417
278
  fit: "max"
2418
279
  }
2419
- })), isStoryPageImage && hyperLink && /*#__PURE__*/React.createElement(HyperLink, {
280
+ })), isStoryPageImage && hyperLink && /*#__PURE__*/React__default["default"].createElement(HyperLink, {
2420
281
  hyperLink: hyperLink
2421
282
  }));
2422
283
  };
2423
284
 
2424
- return story && (isStoryPageImage ? /*#__PURE__*/React.createElement("div", {
285
+ return story && (isStoryPageImage ? /*#__PURE__*/React__default["default"].createElement("div", {
2425
286
  "data-test-id": "arr--hero-image",
2426
- className: "arr--hero-image " + _getClassName("".concat(heroImageClass, " ").concat(fullBleed, " ").concat(heroImageMobClasses), _styleModuleImportMap)
2427
- }, fallbackImage()) : /*#__PURE__*/React.createElement(Link, {
287
+ className: "arr--hero-image " + _getClassName__default["default"]("".concat(heroImageClass, " ").concat(fullBleed, " ").concat(heroImageMobClasses), _styleModuleImportMap)
288
+ }, fallbackImage()) : /*#__PURE__*/React__default["default"].createElement(components.Link, {
2428
289
  "data-test-id": "arr--hero-image",
2429
290
  href: getStoryUrl(story, "/".concat(story.slug)),
2430
291
  externalLink: isExternalStory(story),
2431
292
  "aria-label": "fallback-hero-image",
2432
- className: "arr--hero-image " + _getClassName("".concat(heroImageClass, " ").concat(fullBleed, " ").concat(heroImageMobClasses), _styleModuleImportMap)
293
+ className: "arr--hero-image " + _getClassName__default["default"]("".concat(heroImageClass, " ").concat(fullBleed, " ").concat(heroImageMobClasses), _styleModuleImportMap)
2433
294
  }, fallbackImage()));
2434
295
  };
2435
296
  HeroImage.propTypes = {
2436
297
  /** The Story Object from the API response */
2437
- story: PropTypes.object.isRequired,
298
+ story: PropTypes__default["default"].object.isRequired,
2438
299
 
2439
300
  /** Removes the Hero Image padding for the image to bleed over the margin */
2440
- FullBleed: PropTypes.bool,
301
+ FullBleed: PropTypes__default["default"].bool,
2441
302
 
2442
303
  /** The default width for the image, in case the browser does not support srcset */
2443
- defaultWidth: PropTypes.number,
304
+ defaultWidth: PropTypes__default["default"].number,
2444
305
 
2445
306
  /** The list of available widths */
2446
- widths: PropTypes.array,
307
+ widths: PropTypes__default["default"].array,
2447
308
  // fatch the correct hero image
2448
- aspectRatio: PropTypes.array,
309
+ aspectRatio: PropTypes__default["default"].array,
2449
310
  // Hints for the browser to choose the best size
2450
311
 
2451
312
  /** This prop is responsible for adding padding-right of the image and remove padding bottom of the image */
2452
- isHorizontal: PropTypes.bool,
313
+ isHorizontal: PropTypes__default["default"].bool,
2453
314
 
2454
315
  /** This prop is responsible for adding padding-bottom in desktop and padding-right in mobile */
2455
- isHorizontalMobile: PropTypes.bool,
316
+ isHorizontalMobile: PropTypes__default["default"].bool,
2456
317
  // this prop is responsive for rendering fallback image on story page
2457
- defaultFallback: PropTypes.bool,
2458
- isHorizontalWithImageLast: PropTypes.bool,
2459
- isStoryPageImage: PropTypes.bool,
2460
- config: PropTypes.object
318
+ defaultFallback: PropTypes__default["default"].bool,
319
+ isHorizontalWithImageLast: PropTypes__default["default"].bool,
320
+ isStoryPageImage: PropTypes__default["default"].bool,
321
+ config: PropTypes__default["default"].object
2461
322
  };
2462
323
  HeroImage.defaultProps = {
2463
324
  FullBleed: true,
@@ -2472,4 +333,4 @@ HeroImage.defaultProps = {
2472
333
  config: {}
2473
334
  };
2474
335
 
2475
- export { HeroImage };
336
+ exports.HeroImage = HeroImage;