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