@quintype/arrow 3.15.1-perf.3 → 3.15.1-perf.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. package/atoms/Author/index.js +14 -2103
  2. package/atoms/Author/styles.arrow.css +1 -1
  3. package/atoms/AuthorWithTime/index.js +32 -2482
  4. package/atoms/AuthorWithTime/styles.arrow.css +1 -1
  5. package/atoms/CollectionName/index.js +12 -2101
  6. package/atoms/CollectionName/styles.arrow.css +1 -1
  7. package/atoms/ExtendedLoadMore/{index-b22f1843.js → index-0f809dd9.js} +10 -7
  8. package/atoms/ExtendedLoadMore/index-142f015c.js +476 -0
  9. package/atoms/ExtendedLoadMore/{index-bc129cb8.js → index-37a9ccff.js} +18 -10
  10. package/atoms/ExtendedLoadMore/{index-6e083738.js → index-446679c8.js} +20 -12
  11. package/atoms/ExtendedLoadMore/{index-9e0d32b7.js → index-44f97338.js} +19 -9
  12. package/atoms/ExtendedLoadMore/{index-b5936059.js → index-57dd4870.js} +15 -7
  13. package/atoms/ExtendedLoadMore/{index-fee73a14.js → index-66dd4dbd.js} +15 -7
  14. package/atoms/ExtendedLoadMore/{index-5c8eda4a.js → index-8462c597.js} +21 -16
  15. package/atoms/ExtendedLoadMore/{index-3c4ac692.js → index-93cb06d1.js} +42 -51
  16. package/atoms/ExtendedLoadMore/{index-4ddfe28d.js → index-afd44863.js} +6 -4
  17. package/atoms/ExtendedLoadMore/{index-3976fac4.js → index-b5754c5d.js} +20 -14
  18. package/atoms/ExtendedLoadMore/{index-a5c95f84.js → index-bbaf526e.js} +16 -8
  19. package/atoms/ExtendedLoadMore/{index-6ecceae4.js → index-cfb262ef.js} +18 -9
  20. package/atoms/ExtendedLoadMore/index.js +8 -1
  21. package/atoms/ExtendedLoadMore/styles.arrow.css +1 -1
  22. package/atoms/Headline/index.js +14 -2103
  23. package/atoms/Headline/styles.arrow.css +1 -1
  24. package/atoms/HeroImage/index.js +22 -2170
  25. package/atoms/HeroImage/styles.arrow.css +1 -1
  26. package/atoms/LoadmoreButton/index.js +12 -2114
  27. package/atoms/LoadmoreButton/styles.arrow.css +1 -1
  28. package/atoms/ScrollSnap/index.js +17 -2178
  29. package/atoms/ScrollSnap/styles.arrow.css +1 -1
  30. package/atoms/SectionTag/index.js +10 -2099
  31. package/atoms/SectionTag/styles.arrow.css +1 -1
  32. package/atoms/Subheadline/index.js +8 -2097
  33. package/atoms/Subheadline/styles.arrow.css +1 -1
  34. package/atoms/TimeStamp/index.js +13 -2463
  35. package/atoms/TimeStamp/styles.arrow.css +1 -1
  36. package/molecules/KeyEvents/index.js +23 -2545
  37. package/molecules/KeyEvents/styles.arrow.css +1 -1
  38. package/molecules/PageIntroductionCard/index.js +17 -2454
  39. package/molecules/PageIntroductionCard/styles.arrow.css +1 -1
  40. package/molecules/SocialShareTemplate/index.js +144 -2740
  41. package/molecules/SocialShareTemplate/styles.arrow.css +1 -1
  42. package/molecules/StoryCard/index.js +64 -2582
  43. package/molecules/StoryCard/styles.arrow.css +1 -1
  44. package/molecules/StoryElementCard/index.js +123 -2893
  45. package/molecules/StoryElementCard/styles.arrow.css +1 -1
  46. package/molecules/StorycardContent/index.js +45 -2495
  47. package/molecules/StorycardContent/styles.arrow.css +1 -1
  48. package/package.json +1 -1
  49. package/rows/AlternateCollectionFilter/index.js +92 -2659
  50. package/rows/AlternateCollectionFilter/styles.arrow.css +1 -1
  51. package/rows/AsideCollection/index.js +92 -2659
  52. package/rows/AsideCollection/styles.arrow.css +1 -1
  53. package/rows/AstrologyCollection/index.js +89 -2656
  54. package/rows/AstrologyCollection/styles.arrow.css +1 -1
  55. package/rows/AuthorIntroductionCard/index.js +27 -2743
  56. package/rows/AuthorIntroductionCard/styles.arrow.css +1 -1
  57. package/rows/AuthorsList/index.js +34 -2763
  58. package/rows/AuthorsList/styles.arrow.css +1 -1
  59. package/rows/CollectionFilter/index.js +91 -2658
  60. package/rows/CollectionFilter/styles.arrow.css +1 -1
  61. package/rows/ElevenStories/index.js +81 -2612
  62. package/rows/ElevenStories/styles.arrow.css +1 -1
  63. package/rows/FourColFiveStories/index.js +75 -2603
  64. package/rows/FourColFiveStories/styles.arrow.css +1 -1
  65. package/rows/FourColGrid/index.js +92 -2623
  66. package/rows/FourColGrid/styles.arrow.css +1 -1
  67. package/rows/FourColPortraitStories/index.js +91 -2622
  68. package/rows/FourColPortraitStories/styles.arrow.css +1 -1
  69. package/rows/FourColSixteenStories/index.js +80 -2617
  70. package/rows/FourColSixteenStories/styles.arrow.css +1 -1
  71. package/rows/FourColTwelveStories/index.js +72 -2596
  72. package/rows/FourColTwelveStories/styles.arrow.css +1 -1
  73. package/rows/FourStorySlider/index.js +84 -2615
  74. package/rows/FourStorySlider/styles.arrow.css +1 -1
  75. package/rows/FourStorySliderPortrait/index.js +84 -2615
  76. package/rows/FourStorySliderPortrait/styles.arrow.css +1 -1
  77. package/rows/FourTabbedBigStorySlider/index.js +80 -2611
  78. package/rows/FourTabbedBigStorySlider/styles.arrow.css +1 -1
  79. package/rows/FullScreenSlider/index.js +85 -2616
  80. package/rows/FullScreenSlider/styles.arrow.css +1 -1
  81. package/rows/HalfScreenSlider/index.js +81 -2612
  82. package/rows/HalfScreenSlider/styles.arrow.css +1 -1
  83. package/rows/ListComponent/index.js +75 -2606
  84. package/rows/ListComponent/styles.arrow.css +1 -1
  85. package/rows/Listicles/index.js +38 -2235
  86. package/rows/Listicles/styles.arrow.css +1 -1
  87. package/rows/MagazineEditions/index.js +24 -2487
  88. package/rows/MagazineEditions/styles.arrow.css +1 -1
  89. package/rows/MagazineHeaderCard/index.js +26 -2489
  90. package/rows/MagazineHeaderCard/styles.arrow.css +1 -1
  91. package/rows/MagazineWidget/index.js +81 -2612
  92. package/rows/MagazineWidget/styles.arrow.css +1 -1
  93. package/rows/OneColStoryList/index.js +92 -2623
  94. package/rows/OneColStoryList/styles.arrow.css +1 -1
  95. package/rows/OpinionCollection/index.js +61 -2583
  96. package/rows/OpinionCollection/styles.arrow.css +1 -1
  97. package/rows/SixColSixStories/index.js +91 -2622
  98. package/rows/SixColSixStories/styles.arrow.css +1 -1
  99. package/rows/StoryCollection/index.js +92 -2659
  100. package/rows/StoryCollection/styles.arrow.css +1 -1
  101. package/rows/TagIntroductionCard/index.js +9 -1816
  102. package/rows/TagIntroductionCard/styles.arrow.css +1 -1
  103. package/rows/ThreeColFlexStories/index.js +91 -2622
  104. package/rows/ThreeColFlexStories/styles.arrow.css +1 -1
  105. package/rows/ThreeColFourteenStories/index.js +72 -2596
  106. package/rows/ThreeColFourteenStories/styles.arrow.css +1 -1
  107. package/rows/ThreeColGrid/index.js +94 -2625
  108. package/rows/ThreeColGrid/styles.arrow.css +1 -1
  109. package/rows/ThreeColSevenStory/index.js +84 -2615
  110. package/rows/ThreeColSevenStory/styles.arrow.css +1 -1
  111. package/rows/ThreeColSixStories/index.js +76 -2607
  112. package/rows/ThreeColSixStories/styles.arrow.css +1 -1
  113. package/rows/ThreeColTwelveStories/index.js +80 -2617
  114. package/rows/ThreeColTwelveStories/styles.arrow.css +1 -1
  115. package/rows/TwoColFourStories/index.js +78 -2609
  116. package/rows/TwoColFourStories/styles.arrow.css +1 -1
  117. package/rows/TwoColFourStoryHighlight/index.js +80 -2617
  118. package/rows/TwoColFourStoryHighlight/styles.arrow.css +1 -1
  119. package/rows/TwoColSevenStories/index.js +77 -2608
  120. package/rows/TwoColSevenStories/styles.arrow.css +1 -1
  121. package/rows/TwoColSixStories/index.js +82 -2619
  122. package/rows/TwoColSixStories/styles.arrow.css +1 -1
  123. package/rows/TwoColTenStoriesSidebar/index.js +79 -2610
  124. package/rows/TwoColTenStoriesSidebar/styles.arrow.css +1 -1
  125. package/rows/TwoColThreeStories/index.js +75 -2606
  126. package/rows/TwoColThreeStories/styles.arrow.css +1 -1
  127. package/story-elements/AlsoRead/index.js +24 -2170
  128. package/story-elements/AlsoRead/styles.arrow.css +1 -1
  129. package/story-elements/Attachment/index.js +15 -1870
  130. package/story-elements/Attachment/styles.arrow.css +1 -1
  131. package/story-elements/BigFact/index.js +16 -1871
  132. package/story-elements/BigFact/styles.arrow.css +1 -1
  133. package/story-elements/BlockQuote/index.js +20 -2157
  134. package/story-elements/BlockQuote/styles.arrow.css +1 -1
  135. package/story-elements/Blurb/index.js +18 -1932
  136. package/story-elements/Blurb/styles.arrow.css +1 -1
  137. package/story-elements/Image/index.js +42 -2251
  138. package/story-elements/Image/styles.arrow.css +1 -1
  139. package/story-elements/ImageGallery/index.js +45 -2254
  140. package/story-elements/ImageGallery/styles.arrow.css +1 -1
  141. package/story-elements/ImageSlideshow/index.js +48 -2257
  142. package/story-elements/ImageSlideshow/styles.arrow.css +1 -1
  143. package/story-elements/QuestionAnswer/index.js +26 -2163
  144. package/story-elements/QuestionAnswer/styles.arrow.css +1 -1
  145. package/story-elements/Quote/index.js +17 -1872
  146. package/story-elements/Quote/styles.arrow.css +1 -1
  147. package/story-elements/Reference/index.js +15 -1870
  148. package/story-elements/Reference/styles.arrow.css +1 -1
  149. package/story-elements/StoryElement/index.js +12 -1725
  150. package/story-elements/Summary/index.js +18 -1873
  151. package/story-elements/Summary/styles.arrow.css +1 -1
  152. package/story-elements/Text/index.js +16 -2153
  153. package/story-elements/Text/styles.arrow.css +1 -1
  154. package/story-elements/Video/index.js +12 -1725
  155. package/story-elements/Video/styles.arrow.css +1 -1
  156. package/story-templates/ListicleStoryTemplate/index.js +282 -3167
  157. package/story-templates/ListicleStoryTemplate/styles.arrow.css +1 -1
  158. package/story-templates/LiveBlogStoryTemplate/index.js +504 -3389
  159. package/story-templates/LiveBlogStoryTemplate/styles.arrow.css +1 -1
  160. package/story-templates/PhotoStoryTemplate/index.js +287 -3172
  161. package/story-templates/PhotoStoryTemplate/styles.arrow.css +1 -1
  162. package/story-templates/TextStoryTemplate/index.js +416 -3301
  163. package/story-templates/TextStoryTemplate/styles.arrow.css +1 -1
  164. package/story-templates/VideoStoryTemplate/index.js +382 -3267
  165. package/story-templates/VideoStoryTemplate/styles.arrow.css +1 -1
  166. package/atoms/ExtendedLoadMore/index-e7cde739.js +0 -3051
@@ -2,79 +2,35 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var _extends = require('@babel/runtime/helpers/extends');
6
+ var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
5
7
  var React = require('react');
6
8
  var components = require('@quintype/components');
7
9
  var PropTypes = require('prop-types');
10
+ require('@babel/runtime/helpers/asyncToGenerator');
11
+ require('@babel/runtime/helpers/typeof');
12
+ require('@babel/runtime/regenerator');
13
+ require('lodash');
8
14
  require('react-timeago');
9
15
  require('date-fns-tz');
10
16
 
11
17
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
12
18
 
19
+ var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
20
+ var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
13
21
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
14
22
  var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
15
23
 
16
- function _extends() {
17
- _extends = Object.assign || function (target) {
18
- for (var i = 1; i < arguments.length; i++) {
19
- var source = arguments[i];
20
-
21
- for (var key in source) {
22
- if (Object.prototype.hasOwnProperty.call(source, key)) {
23
- target[key] = source[key];
24
- }
25
- }
26
- }
27
-
28
- return target;
29
- };
30
-
31
- return _extends.apply(this, arguments);
32
- }
33
-
34
- function _objectWithoutPropertiesLoose(source, excluded) {
35
- if (source == null) return {};
36
- var target = {};
37
- var sourceKeys = Object.keys(source);
38
- var key, i;
39
-
40
- for (i = 0; i < sourceKeys.length; i++) {
41
- key = sourceKeys[i];
42
- if (excluded.indexOf(key) >= 0) continue;
43
- target[key] = source[key];
44
- }
45
-
46
- return target;
47
- }
48
-
49
- function _objectWithoutProperties(source, excluded) {
50
- if (source == null) return {};
51
- var target = _objectWithoutPropertiesLoose(source, excluded);
52
- var key, i;
53
-
54
- if (Object.getOwnPropertySymbols) {
55
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
56
-
57
- for (i = 0; i < sourceSymbolKeys.length; i++) {
58
- key = sourceSymbolKeys[i];
59
- if (excluded.indexOf(key) >= 0) continue;
60
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
61
- target[key] = source[key];
62
- }
63
- }
64
-
65
- return target;
66
- }
67
-
68
24
  var _excluded$1 = ["element", "render"];
69
25
  var withElementWrapper = function withElementWrapper(StoryElement) {
70
26
  return function (props) {
71
27
  var element = props.element,
72
28
  render = props.render,
73
- restProps = _objectWithoutProperties(props, _excluded$1);
29
+ restProps = _objectWithoutProperties__default["default"](props, _excluded$1);
74
30
 
75
31
  if (!element) return null;
76
32
  if (render && typeof render === "function") return render(props);
77
- return /*#__PURE__*/React__default["default"].createElement(StoryElement, _extends({}, restProps, {
33
+ return /*#__PURE__*/React__default["default"].createElement(StoryElement, _extends__default["default"]({}, restProps, {
78
34
  element: element
79
35
  }));
80
36
  };
@@ -83,1675 +39,6 @@ withElementWrapper.propTypes = {
83
39
  StoryElement: PropTypes__default["default"].element
84
40
  };
85
41
 
86
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
87
-
88
- function createCommonjsModule(fn) {
89
- var module = { exports: {} };
90
- return fn(module, module.exports), module.exports;
91
- }
92
-
93
- /**
94
- * Copyright (c) 2014-present, Facebook, Inc.
95
- *
96
- * This source code is licensed under the MIT license found in the
97
- * LICENSE file in the root directory of this source tree.
98
- */
99
-
100
- createCommonjsModule(function (module) {
101
- var runtime = (function (exports) {
102
-
103
- var Op = Object.prototype;
104
- var hasOwn = Op.hasOwnProperty;
105
- var undefined$1; // More compressible than void 0.
106
- var $Symbol = typeof Symbol === "function" ? Symbol : {};
107
- var iteratorSymbol = $Symbol.iterator || "@@iterator";
108
- var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
109
- var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
110
-
111
- function define(obj, key, value) {
112
- Object.defineProperty(obj, key, {
113
- value: value,
114
- enumerable: true,
115
- configurable: true,
116
- writable: true
117
- });
118
- return obj[key];
119
- }
120
- try {
121
- // IE 8 has a broken Object.defineProperty that only works on DOM objects.
122
- define({}, "");
123
- } catch (err) {
124
- define = function(obj, key, value) {
125
- return obj[key] = value;
126
- };
127
- }
128
-
129
- function wrap(innerFn, outerFn, self, tryLocsList) {
130
- // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
131
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
132
- var generator = Object.create(protoGenerator.prototype);
133
- var context = new Context(tryLocsList || []);
134
-
135
- // The ._invoke method unifies the implementations of the .next,
136
- // .throw, and .return methods.
137
- generator._invoke = makeInvokeMethod(innerFn, self, context);
138
-
139
- return generator;
140
- }
141
- exports.wrap = wrap;
142
-
143
- // Try/catch helper to minimize deoptimizations. Returns a completion
144
- // record like context.tryEntries[i].completion. This interface could
145
- // have been (and was previously) designed to take a closure to be
146
- // invoked without arguments, but in all the cases we care about we
147
- // already have an existing method we want to call, so there's no need
148
- // to create a new function object. We can even get away with assuming
149
- // the method takes exactly one argument, since that happens to be true
150
- // in every case, so we don't have to touch the arguments object. The
151
- // only additional allocation required is the completion record, which
152
- // has a stable shape and so hopefully should be cheap to allocate.
153
- function tryCatch(fn, obj, arg) {
154
- try {
155
- return { type: "normal", arg: fn.call(obj, arg) };
156
- } catch (err) {
157
- return { type: "throw", arg: err };
158
- }
159
- }
160
-
161
- var GenStateSuspendedStart = "suspendedStart";
162
- var GenStateSuspendedYield = "suspendedYield";
163
- var GenStateExecuting = "executing";
164
- var GenStateCompleted = "completed";
165
-
166
- // Returning this object from the innerFn has the same effect as
167
- // breaking out of the dispatch switch statement.
168
- var ContinueSentinel = {};
169
-
170
- // Dummy constructor functions that we use as the .constructor and
171
- // .constructor.prototype properties for functions that return Generator
172
- // objects. For full spec compliance, you may wish to configure your
173
- // minifier not to mangle the names of these two functions.
174
- function Generator() {}
175
- function GeneratorFunction() {}
176
- function GeneratorFunctionPrototype() {}
177
-
178
- // This is a polyfill for %IteratorPrototype% for environments that
179
- // don't natively support it.
180
- var IteratorPrototype = {};
181
- define(IteratorPrototype, iteratorSymbol, function () {
182
- return this;
183
- });
184
-
185
- var getProto = Object.getPrototypeOf;
186
- var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
187
- if (NativeIteratorPrototype &&
188
- NativeIteratorPrototype !== Op &&
189
- hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
190
- // This environment has a native %IteratorPrototype%; use it instead
191
- // of the polyfill.
192
- IteratorPrototype = NativeIteratorPrototype;
193
- }
194
-
195
- var Gp = GeneratorFunctionPrototype.prototype =
196
- Generator.prototype = Object.create(IteratorPrototype);
197
- GeneratorFunction.prototype = GeneratorFunctionPrototype;
198
- define(Gp, "constructor", GeneratorFunctionPrototype);
199
- define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
200
- GeneratorFunction.displayName = define(
201
- GeneratorFunctionPrototype,
202
- toStringTagSymbol,
203
- "GeneratorFunction"
204
- );
205
-
206
- // Helper for defining the .next, .throw, and .return methods of the
207
- // Iterator interface in terms of a single ._invoke method.
208
- function defineIteratorMethods(prototype) {
209
- ["next", "throw", "return"].forEach(function(method) {
210
- define(prototype, method, function(arg) {
211
- return this._invoke(method, arg);
212
- });
213
- });
214
- }
215
-
216
- exports.isGeneratorFunction = function(genFun) {
217
- var ctor = typeof genFun === "function" && genFun.constructor;
218
- return ctor
219
- ? ctor === GeneratorFunction ||
220
- // For the native GeneratorFunction constructor, the best we can
221
- // do is to check its .name property.
222
- (ctor.displayName || ctor.name) === "GeneratorFunction"
223
- : false;
224
- };
225
-
226
- exports.mark = function(genFun) {
227
- if (Object.setPrototypeOf) {
228
- Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
229
- } else {
230
- genFun.__proto__ = GeneratorFunctionPrototype;
231
- define(genFun, toStringTagSymbol, "GeneratorFunction");
232
- }
233
- genFun.prototype = Object.create(Gp);
234
- return genFun;
235
- };
236
-
237
- // Within the body of any async function, `await x` is transformed to
238
- // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
239
- // `hasOwn.call(value, "__await")` to determine if the yielded value is
240
- // meant to be awaited.
241
- exports.awrap = function(arg) {
242
- return { __await: arg };
243
- };
244
-
245
- function AsyncIterator(generator, PromiseImpl) {
246
- function invoke(method, arg, resolve, reject) {
247
- var record = tryCatch(generator[method], generator, arg);
248
- if (record.type === "throw") {
249
- reject(record.arg);
250
- } else {
251
- var result = record.arg;
252
- var value = result.value;
253
- if (value &&
254
- typeof value === "object" &&
255
- hasOwn.call(value, "__await")) {
256
- return PromiseImpl.resolve(value.__await).then(function(value) {
257
- invoke("next", value, resolve, reject);
258
- }, function(err) {
259
- invoke("throw", err, resolve, reject);
260
- });
261
- }
262
-
263
- return PromiseImpl.resolve(value).then(function(unwrapped) {
264
- // When a yielded Promise is resolved, its final value becomes
265
- // the .value of the Promise<{value,done}> result for the
266
- // current iteration.
267
- result.value = unwrapped;
268
- resolve(result);
269
- }, function(error) {
270
- // If a rejected Promise was yielded, throw the rejection back
271
- // into the async generator function so it can be handled there.
272
- return invoke("throw", error, resolve, reject);
273
- });
274
- }
275
- }
276
-
277
- var previousPromise;
278
-
279
- function enqueue(method, arg) {
280
- function callInvokeWithMethodAndArg() {
281
- return new PromiseImpl(function(resolve, reject) {
282
- invoke(method, arg, resolve, reject);
283
- });
284
- }
285
-
286
- return previousPromise =
287
- // If enqueue has been called before, then we want to wait until
288
- // all previous Promises have been resolved before calling invoke,
289
- // so that results are always delivered in the correct order. If
290
- // enqueue has not been called before, then it is important to
291
- // call invoke immediately, without waiting on a callback to fire,
292
- // so that the async generator function has the opportunity to do
293
- // any necessary setup in a predictable way. This predictability
294
- // is why the Promise constructor synchronously invokes its
295
- // executor callback, and why async functions synchronously
296
- // execute code before the first await. Since we implement simple
297
- // async functions in terms of async generators, it is especially
298
- // important to get this right, even though it requires care.
299
- previousPromise ? previousPromise.then(
300
- callInvokeWithMethodAndArg,
301
- // Avoid propagating failures to Promises returned by later
302
- // invocations of the iterator.
303
- callInvokeWithMethodAndArg
304
- ) : callInvokeWithMethodAndArg();
305
- }
306
-
307
- // Define the unified helper method that is used to implement .next,
308
- // .throw, and .return (see defineIteratorMethods).
309
- this._invoke = enqueue;
310
- }
311
-
312
- defineIteratorMethods(AsyncIterator.prototype);
313
- define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
314
- return this;
315
- });
316
- exports.AsyncIterator = AsyncIterator;
317
-
318
- // Note that simple async functions are implemented on top of
319
- // AsyncIterator objects; they just return a Promise for the value of
320
- // the final result produced by the iterator.
321
- exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
322
- if (PromiseImpl === void 0) PromiseImpl = Promise;
323
-
324
- var iter = new AsyncIterator(
325
- wrap(innerFn, outerFn, self, tryLocsList),
326
- PromiseImpl
327
- );
328
-
329
- return exports.isGeneratorFunction(outerFn)
330
- ? iter // If outerFn is a generator, return the full iterator.
331
- : iter.next().then(function(result) {
332
- return result.done ? result.value : iter.next();
333
- });
334
- };
335
-
336
- function makeInvokeMethod(innerFn, self, context) {
337
- var state = GenStateSuspendedStart;
338
-
339
- return function invoke(method, arg) {
340
- if (state === GenStateExecuting) {
341
- throw new Error("Generator is already running");
342
- }
343
-
344
- if (state === GenStateCompleted) {
345
- if (method === "throw") {
346
- throw arg;
347
- }
348
-
349
- // Be forgiving, per 25.3.3.3.3 of the spec:
350
- // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
351
- return doneResult();
352
- }
353
-
354
- context.method = method;
355
- context.arg = arg;
356
-
357
- while (true) {
358
- var delegate = context.delegate;
359
- if (delegate) {
360
- var delegateResult = maybeInvokeDelegate(delegate, context);
361
- if (delegateResult) {
362
- if (delegateResult === ContinueSentinel) continue;
363
- return delegateResult;
364
- }
365
- }
366
-
367
- if (context.method === "next") {
368
- // Setting context._sent for legacy support of Babel's
369
- // function.sent implementation.
370
- context.sent = context._sent = context.arg;
371
-
372
- } else if (context.method === "throw") {
373
- if (state === GenStateSuspendedStart) {
374
- state = GenStateCompleted;
375
- throw context.arg;
376
- }
377
-
378
- context.dispatchException(context.arg);
379
-
380
- } else if (context.method === "return") {
381
- context.abrupt("return", context.arg);
382
- }
383
-
384
- state = GenStateExecuting;
385
-
386
- var record = tryCatch(innerFn, self, context);
387
- if (record.type === "normal") {
388
- // If an exception is thrown from innerFn, we leave state ===
389
- // GenStateExecuting and loop back for another invocation.
390
- state = context.done
391
- ? GenStateCompleted
392
- : GenStateSuspendedYield;
393
-
394
- if (record.arg === ContinueSentinel) {
395
- continue;
396
- }
397
-
398
- return {
399
- value: record.arg,
400
- done: context.done
401
- };
402
-
403
- } else if (record.type === "throw") {
404
- state = GenStateCompleted;
405
- // Dispatch the exception by looping back around to the
406
- // context.dispatchException(context.arg) call above.
407
- context.method = "throw";
408
- context.arg = record.arg;
409
- }
410
- }
411
- };
412
- }
413
-
414
- // Call delegate.iterator[context.method](context.arg) and handle the
415
- // result, either by returning a { value, done } result from the
416
- // delegate iterator, or by modifying context.method and context.arg,
417
- // setting context.delegate to null, and returning the ContinueSentinel.
418
- function maybeInvokeDelegate(delegate, context) {
419
- var method = delegate.iterator[context.method];
420
- if (method === undefined$1) {
421
- // A .throw or .return when the delegate iterator has no .throw
422
- // method always terminates the yield* loop.
423
- context.delegate = null;
424
-
425
- if (context.method === "throw") {
426
- // Note: ["return"] must be used for ES3 parsing compatibility.
427
- if (delegate.iterator["return"]) {
428
- // If the delegate iterator has a return method, give it a
429
- // chance to clean up.
430
- context.method = "return";
431
- context.arg = undefined$1;
432
- maybeInvokeDelegate(delegate, context);
433
-
434
- if (context.method === "throw") {
435
- // If maybeInvokeDelegate(context) changed context.method from
436
- // "return" to "throw", let that override the TypeError below.
437
- return ContinueSentinel;
438
- }
439
- }
440
-
441
- context.method = "throw";
442
- context.arg = new TypeError(
443
- "The iterator does not provide a 'throw' method");
444
- }
445
-
446
- return ContinueSentinel;
447
- }
448
-
449
- var record = tryCatch(method, delegate.iterator, context.arg);
450
-
451
- if (record.type === "throw") {
452
- context.method = "throw";
453
- context.arg = record.arg;
454
- context.delegate = null;
455
- return ContinueSentinel;
456
- }
457
-
458
- var info = record.arg;
459
-
460
- if (! info) {
461
- context.method = "throw";
462
- context.arg = new TypeError("iterator result is not an object");
463
- context.delegate = null;
464
- return ContinueSentinel;
465
- }
466
-
467
- if (info.done) {
468
- // Assign the result of the finished delegate to the temporary
469
- // variable specified by delegate.resultName (see delegateYield).
470
- context[delegate.resultName] = info.value;
471
-
472
- // Resume execution at the desired location (see delegateYield).
473
- context.next = delegate.nextLoc;
474
-
475
- // If context.method was "throw" but the delegate handled the
476
- // exception, let the outer generator proceed normally. If
477
- // context.method was "next", forget context.arg since it has been
478
- // "consumed" by the delegate iterator. If context.method was
479
- // "return", allow the original .return call to continue in the
480
- // outer generator.
481
- if (context.method !== "return") {
482
- context.method = "next";
483
- context.arg = undefined$1;
484
- }
485
-
486
- } else {
487
- // Re-yield the result returned by the delegate method.
488
- return info;
489
- }
490
-
491
- // The delegate iterator is finished, so forget it and continue with
492
- // the outer generator.
493
- context.delegate = null;
494
- return ContinueSentinel;
495
- }
496
-
497
- // Define Generator.prototype.{next,throw,return} in terms of the
498
- // unified ._invoke helper method.
499
- defineIteratorMethods(Gp);
500
-
501
- define(Gp, toStringTagSymbol, "Generator");
502
-
503
- // A Generator should always return itself as the iterator object when the
504
- // @@iterator function is called on it. Some browsers' implementations of the
505
- // iterator prototype chain incorrectly implement this, causing the Generator
506
- // object to not be returned from this call. This ensures that doesn't happen.
507
- // See https://github.com/facebook/regenerator/issues/274 for more details.
508
- define(Gp, iteratorSymbol, function() {
509
- return this;
510
- });
511
-
512
- define(Gp, "toString", function() {
513
- return "[object Generator]";
514
- });
515
-
516
- function pushTryEntry(locs) {
517
- var entry = { tryLoc: locs[0] };
518
-
519
- if (1 in locs) {
520
- entry.catchLoc = locs[1];
521
- }
522
-
523
- if (2 in locs) {
524
- entry.finallyLoc = locs[2];
525
- entry.afterLoc = locs[3];
526
- }
527
-
528
- this.tryEntries.push(entry);
529
- }
530
-
531
- function resetTryEntry(entry) {
532
- var record = entry.completion || {};
533
- record.type = "normal";
534
- delete record.arg;
535
- entry.completion = record;
536
- }
537
-
538
- function Context(tryLocsList) {
539
- // The root entry object (effectively a try statement without a catch
540
- // or a finally block) gives us a place to store values thrown from
541
- // locations where there is no enclosing try statement.
542
- this.tryEntries = [{ tryLoc: "root" }];
543
- tryLocsList.forEach(pushTryEntry, this);
544
- this.reset(true);
545
- }
546
-
547
- exports.keys = function(object) {
548
- var keys = [];
549
- for (var key in object) {
550
- keys.push(key);
551
- }
552
- keys.reverse();
553
-
554
- // Rather than returning an object with a next method, we keep
555
- // things simple and return the next function itself.
556
- return function next() {
557
- while (keys.length) {
558
- var key = keys.pop();
559
- if (key in object) {
560
- next.value = key;
561
- next.done = false;
562
- return next;
563
- }
564
- }
565
-
566
- // To avoid creating an additional object, we just hang the .value
567
- // and .done properties off the next function object itself. This
568
- // also ensures that the minifier will not anonymize the function.
569
- next.done = true;
570
- return next;
571
- };
572
- };
573
-
574
- function values(iterable) {
575
- if (iterable) {
576
- var iteratorMethod = iterable[iteratorSymbol];
577
- if (iteratorMethod) {
578
- return iteratorMethod.call(iterable);
579
- }
580
-
581
- if (typeof iterable.next === "function") {
582
- return iterable;
583
- }
584
-
585
- if (!isNaN(iterable.length)) {
586
- var i = -1, next = function next() {
587
- while (++i < iterable.length) {
588
- if (hasOwn.call(iterable, i)) {
589
- next.value = iterable[i];
590
- next.done = false;
591
- return next;
592
- }
593
- }
594
-
595
- next.value = undefined$1;
596
- next.done = true;
597
-
598
- return next;
599
- };
600
-
601
- return next.next = next;
602
- }
603
- }
604
-
605
- // Return an iterator with no values.
606
- return { next: doneResult };
607
- }
608
- exports.values = values;
609
-
610
- function doneResult() {
611
- return { value: undefined$1, done: true };
612
- }
613
-
614
- Context.prototype = {
615
- constructor: Context,
616
-
617
- reset: function(skipTempReset) {
618
- this.prev = 0;
619
- this.next = 0;
620
- // Resetting context._sent for legacy support of Babel's
621
- // function.sent implementation.
622
- this.sent = this._sent = undefined$1;
623
- this.done = false;
624
- this.delegate = null;
625
-
626
- this.method = "next";
627
- this.arg = undefined$1;
628
-
629
- this.tryEntries.forEach(resetTryEntry);
630
-
631
- if (!skipTempReset) {
632
- for (var name in this) {
633
- // Not sure about the optimal order of these conditions:
634
- if (name.charAt(0) === "t" &&
635
- hasOwn.call(this, name) &&
636
- !isNaN(+name.slice(1))) {
637
- this[name] = undefined$1;
638
- }
639
- }
640
- }
641
- },
642
-
643
- stop: function() {
644
- this.done = true;
645
-
646
- var rootEntry = this.tryEntries[0];
647
- var rootRecord = rootEntry.completion;
648
- if (rootRecord.type === "throw") {
649
- throw rootRecord.arg;
650
- }
651
-
652
- return this.rval;
653
- },
654
-
655
- dispatchException: function(exception) {
656
- if (this.done) {
657
- throw exception;
658
- }
659
-
660
- var context = this;
661
- function handle(loc, caught) {
662
- record.type = "throw";
663
- record.arg = exception;
664
- context.next = loc;
665
-
666
- if (caught) {
667
- // If the dispatched exception was caught by a catch block,
668
- // then let that catch block handle the exception normally.
669
- context.method = "next";
670
- context.arg = undefined$1;
671
- }
672
-
673
- return !! caught;
674
- }
675
-
676
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
677
- var entry = this.tryEntries[i];
678
- var record = entry.completion;
679
-
680
- if (entry.tryLoc === "root") {
681
- // Exception thrown outside of any try block that could handle
682
- // it, so set the completion value of the entire function to
683
- // throw the exception.
684
- return handle("end");
685
- }
686
-
687
- if (entry.tryLoc <= this.prev) {
688
- var hasCatch = hasOwn.call(entry, "catchLoc");
689
- var hasFinally = hasOwn.call(entry, "finallyLoc");
690
-
691
- if (hasCatch && hasFinally) {
692
- if (this.prev < entry.catchLoc) {
693
- return handle(entry.catchLoc, true);
694
- } else if (this.prev < entry.finallyLoc) {
695
- return handle(entry.finallyLoc);
696
- }
697
-
698
- } else if (hasCatch) {
699
- if (this.prev < entry.catchLoc) {
700
- return handle(entry.catchLoc, true);
701
- }
702
-
703
- } else if (hasFinally) {
704
- if (this.prev < entry.finallyLoc) {
705
- return handle(entry.finallyLoc);
706
- }
707
-
708
- } else {
709
- throw new Error("try statement without catch or finally");
710
- }
711
- }
712
- }
713
- },
714
-
715
- abrupt: function(type, arg) {
716
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
717
- var entry = this.tryEntries[i];
718
- if (entry.tryLoc <= this.prev &&
719
- hasOwn.call(entry, "finallyLoc") &&
720
- this.prev < entry.finallyLoc) {
721
- var finallyEntry = entry;
722
- break;
723
- }
724
- }
725
-
726
- if (finallyEntry &&
727
- (type === "break" ||
728
- type === "continue") &&
729
- finallyEntry.tryLoc <= arg &&
730
- arg <= finallyEntry.finallyLoc) {
731
- // Ignore the finally entry if control is not jumping to a
732
- // location outside the try/catch block.
733
- finallyEntry = null;
734
- }
735
-
736
- var record = finallyEntry ? finallyEntry.completion : {};
737
- record.type = type;
738
- record.arg = arg;
739
-
740
- if (finallyEntry) {
741
- this.method = "next";
742
- this.next = finallyEntry.finallyLoc;
743
- return ContinueSentinel;
744
- }
745
-
746
- return this.complete(record);
747
- },
748
-
749
- complete: function(record, afterLoc) {
750
- if (record.type === "throw") {
751
- throw record.arg;
752
- }
753
-
754
- if (record.type === "break" ||
755
- record.type === "continue") {
756
- this.next = record.arg;
757
- } else if (record.type === "return") {
758
- this.rval = this.arg = record.arg;
759
- this.method = "return";
760
- this.next = "end";
761
- } else if (record.type === "normal" && afterLoc) {
762
- this.next = afterLoc;
763
- }
764
-
765
- return ContinueSentinel;
766
- },
767
-
768
- finish: function(finallyLoc) {
769
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
770
- var entry = this.tryEntries[i];
771
- if (entry.finallyLoc === finallyLoc) {
772
- this.complete(entry.completion, entry.afterLoc);
773
- resetTryEntry(entry);
774
- return ContinueSentinel;
775
- }
776
- }
777
- },
778
-
779
- "catch": function(tryLoc) {
780
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
781
- var entry = this.tryEntries[i];
782
- if (entry.tryLoc === tryLoc) {
783
- var record = entry.completion;
784
- if (record.type === "throw") {
785
- var thrown = record.arg;
786
- resetTryEntry(entry);
787
- }
788
- return thrown;
789
- }
790
- }
791
-
792
- // The context.catch method must only be called with a location
793
- // argument that corresponds to a known catch block.
794
- throw new Error("illegal catch attempt");
795
- },
796
-
797
- delegateYield: function(iterable, resultName, nextLoc) {
798
- this.delegate = {
799
- iterator: values(iterable),
800
- resultName: resultName,
801
- nextLoc: nextLoc
802
- };
803
-
804
- if (this.method === "next") {
805
- // Deliberately forget the last sent value so that we don't
806
- // accidentally pass it on to the delegate.
807
- this.arg = undefined$1;
808
- }
809
-
810
- return ContinueSentinel;
811
- }
812
- };
813
-
814
- // Regardless of whether this script is executing as a CommonJS module
815
- // or not, return the runtime object so that we can declare the variable
816
- // regeneratorRuntime in the outer scope, which allows this module to be
817
- // injected easily by `bin/regenerator --include-runtime script.js`.
818
- return exports;
819
-
820
- }(
821
- // If this script is executing as a CommonJS module, use module.exports
822
- // as the regeneratorRuntime namespace. Otherwise create a new empty
823
- // object. Either way, the resulting object will be used to initialize
824
- // the regeneratorRuntime variable at the top of this file.
825
- module.exports
826
- ));
827
-
828
- try {
829
- regeneratorRuntime = runtime;
830
- } catch (accidentalStrictMode) {
831
- // This module should not be running in strict mode, so the above
832
- // assignment should always work unless something is misconfigured. Just
833
- // in case runtime.js accidentally runs in strict mode, in modern engines
834
- // we can explicitly access globalThis. In older engines we can escape
835
- // strict mode using a global Function call. This could conceivably fail
836
- // if a Content Security Policy forbids using Function, but in that case
837
- // the proper solution is to fix the accidental strict mode problem. If
838
- // you've misconfigured your bundler to force strict mode and applied a
839
- // CSP to forbid Function, and you're not willing to fix either of those
840
- // problems, please detail your unique predicament in a GitHub issue.
841
- if (typeof globalThis === "object") {
842
- globalThis.regeneratorRuntime = runtime;
843
- } else {
844
- Function("r", "regeneratorRuntime = r")(runtime);
845
- }
846
- }
847
- });
848
-
849
- /** Detect free variable `global` from Node.js. */
850
-
851
- var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
852
-
853
- var _freeGlobal = freeGlobal;
854
-
855
- /** Detect free variable `self`. */
856
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
857
-
858
- /** Used as a reference to the global object. */
859
- var root = _freeGlobal || freeSelf || Function('return this')();
860
-
861
- var _root = root;
862
-
863
- /** Built-in value references. */
864
- var Symbol$1 = _root.Symbol;
865
-
866
- var _Symbol = Symbol$1;
867
-
868
- /** Used for built-in method references. */
869
- var objectProto$4 = Object.prototype;
870
-
871
- /** Used to check objects for own properties. */
872
- var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
873
-
874
- /**
875
- * Used to resolve the
876
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
877
- * of values.
878
- */
879
- var nativeObjectToString$1 = objectProto$4.toString;
880
-
881
- /** Built-in value references. */
882
- var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
883
-
884
- /**
885
- * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
886
- *
887
- * @private
888
- * @param {*} value The value to query.
889
- * @returns {string} Returns the raw `toStringTag`.
890
- */
891
- function getRawTag(value) {
892
- var isOwn = hasOwnProperty$3.call(value, symToStringTag$1),
893
- tag = value[symToStringTag$1];
894
-
895
- try {
896
- value[symToStringTag$1] = undefined;
897
- var unmasked = true;
898
- } catch (e) {}
899
-
900
- var result = nativeObjectToString$1.call(value);
901
- if (unmasked) {
902
- if (isOwn) {
903
- value[symToStringTag$1] = tag;
904
- } else {
905
- delete value[symToStringTag$1];
906
- }
907
- }
908
- return result;
909
- }
910
-
911
- var _getRawTag = getRawTag;
912
-
913
- /** Used for built-in method references. */
914
- var objectProto$3 = Object.prototype;
915
-
916
- /**
917
- * Used to resolve the
918
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
919
- * of values.
920
- */
921
- var nativeObjectToString = objectProto$3.toString;
922
-
923
- /**
924
- * Converts `value` to a string using `Object.prototype.toString`.
925
- *
926
- * @private
927
- * @param {*} value The value to convert.
928
- * @returns {string} Returns the converted string.
929
- */
930
- function objectToString(value) {
931
- return nativeObjectToString.call(value);
932
- }
933
-
934
- var _objectToString = objectToString;
935
-
936
- /** `Object#toString` result references. */
937
- var nullTag = '[object Null]',
938
- undefinedTag = '[object Undefined]';
939
-
940
- /** Built-in value references. */
941
- var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
942
-
943
- /**
944
- * The base implementation of `getTag` without fallbacks for buggy environments.
945
- *
946
- * @private
947
- * @param {*} value The value to query.
948
- * @returns {string} Returns the `toStringTag`.
949
- */
950
- function baseGetTag(value) {
951
- if (value == null) {
952
- return value === undefined ? undefinedTag : nullTag;
953
- }
954
- return (symToStringTag && symToStringTag in Object(value))
955
- ? _getRawTag(value)
956
- : _objectToString(value);
957
- }
958
-
959
- var _baseGetTag = baseGetTag;
960
-
961
- /**
962
- * Checks if `value` is the
963
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
964
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
965
- *
966
- * @static
967
- * @memberOf _
968
- * @since 0.1.0
969
- * @category Lang
970
- * @param {*} value The value to check.
971
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
972
- * @example
973
- *
974
- * _.isObject({});
975
- * // => true
976
- *
977
- * _.isObject([1, 2, 3]);
978
- * // => true
979
- *
980
- * _.isObject(_.noop);
981
- * // => true
982
- *
983
- * _.isObject(null);
984
- * // => false
985
- */
986
- function isObject(value) {
987
- var type = typeof value;
988
- return value != null && (type == 'object' || type == 'function');
989
- }
990
-
991
- var isObject_1 = isObject;
992
-
993
- /** `Object#toString` result references. */
994
- var asyncTag = '[object AsyncFunction]',
995
- funcTag = '[object Function]',
996
- genTag = '[object GeneratorFunction]',
997
- proxyTag = '[object Proxy]';
998
-
999
- /**
1000
- * Checks if `value` is classified as a `Function` object.
1001
- *
1002
- * @static
1003
- * @memberOf _
1004
- * @since 0.1.0
1005
- * @category Lang
1006
- * @param {*} value The value to check.
1007
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
1008
- * @example
1009
- *
1010
- * _.isFunction(_);
1011
- * // => true
1012
- *
1013
- * _.isFunction(/abc/);
1014
- * // => false
1015
- */
1016
- function isFunction(value) {
1017
- if (!isObject_1(value)) {
1018
- return false;
1019
- }
1020
- // The use of `Object#toString` avoids issues with the `typeof` operator
1021
- // in Safari 9 which returns 'object' for typed arrays and other constructors.
1022
- var tag = _baseGetTag(value);
1023
- return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
1024
- }
1025
-
1026
- var isFunction_1 = isFunction;
1027
-
1028
- /** Used to detect overreaching core-js shims. */
1029
- var coreJsData = _root['__core-js_shared__'];
1030
-
1031
- var _coreJsData = coreJsData;
1032
-
1033
- /** Used to detect methods masquerading as native. */
1034
- var maskSrcKey = (function() {
1035
- var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');
1036
- return uid ? ('Symbol(src)_1.' + uid) : '';
1037
- }());
1038
-
1039
- /**
1040
- * Checks if `func` has its source masked.
1041
- *
1042
- * @private
1043
- * @param {Function} func The function to check.
1044
- * @returns {boolean} Returns `true` if `func` is masked, else `false`.
1045
- */
1046
- function isMasked(func) {
1047
- return !!maskSrcKey && (maskSrcKey in func);
1048
- }
1049
-
1050
- var _isMasked = isMasked;
1051
-
1052
- /** Used for built-in method references. */
1053
- var funcProto$1 = Function.prototype;
1054
-
1055
- /** Used to resolve the decompiled source of functions. */
1056
- var funcToString$1 = funcProto$1.toString;
1057
-
1058
- /**
1059
- * Converts `func` to its source code.
1060
- *
1061
- * @private
1062
- * @param {Function} func The function to convert.
1063
- * @returns {string} Returns the source code.
1064
- */
1065
- function toSource(func) {
1066
- if (func != null) {
1067
- try {
1068
- return funcToString$1.call(func);
1069
- } catch (e) {}
1070
- try {
1071
- return (func + '');
1072
- } catch (e) {}
1073
- }
1074
- return '';
1075
- }
1076
-
1077
- var _toSource = toSource;
1078
-
1079
- /**
1080
- * Used to match `RegExp`
1081
- * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
1082
- */
1083
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
1084
-
1085
- /** Used to detect host constructors (Safari). */
1086
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
1087
-
1088
- /** Used for built-in method references. */
1089
- var funcProto = Function.prototype,
1090
- objectProto$2 = Object.prototype;
1091
-
1092
- /** Used to resolve the decompiled source of functions. */
1093
- var funcToString = funcProto.toString;
1094
-
1095
- /** Used to check objects for own properties. */
1096
- var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
1097
-
1098
- /** Used to detect if a method is native. */
1099
- var reIsNative = RegExp('^' +
1100
- funcToString.call(hasOwnProperty$2).replace(reRegExpChar, '\\$&')
1101
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
1102
- );
1103
-
1104
- /**
1105
- * The base implementation of `_.isNative` without bad shim checks.
1106
- *
1107
- * @private
1108
- * @param {*} value The value to check.
1109
- * @returns {boolean} Returns `true` if `value` is a native function,
1110
- * else `false`.
1111
- */
1112
- function baseIsNative(value) {
1113
- if (!isObject_1(value) || _isMasked(value)) {
1114
- return false;
1115
- }
1116
- var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;
1117
- return pattern.test(_toSource(value));
1118
- }
1119
-
1120
- var _baseIsNative = baseIsNative;
1121
-
1122
- /**
1123
- * Gets the value at `key` of `object`.
1124
- *
1125
- * @private
1126
- * @param {Object} [object] The object to query.
1127
- * @param {string} key The key of the property to get.
1128
- * @returns {*} Returns the property value.
1129
- */
1130
- function getValue(object, key) {
1131
- return object == null ? undefined : object[key];
1132
- }
1133
-
1134
- var _getValue = getValue;
1135
-
1136
- /**
1137
- * Gets the native function at `key` of `object`.
1138
- *
1139
- * @private
1140
- * @param {Object} object The object to query.
1141
- * @param {string} key The key of the method to get.
1142
- * @returns {*} Returns the function if it's native, else `undefined`.
1143
- */
1144
- function getNative(object, key) {
1145
- var value = _getValue(object, key);
1146
- return _baseIsNative(value) ? value : undefined;
1147
- }
1148
-
1149
- var _getNative = getNative;
1150
-
1151
- /* Built-in method references that are verified to be native. */
1152
- var nativeCreate = _getNative(Object, 'create');
1153
-
1154
- var _nativeCreate = nativeCreate;
1155
-
1156
- /**
1157
- * Removes all key-value entries from the hash.
1158
- *
1159
- * @private
1160
- * @name clear
1161
- * @memberOf Hash
1162
- */
1163
- function hashClear() {
1164
- this.__data__ = _nativeCreate ? _nativeCreate(null) : {};
1165
- this.size = 0;
1166
- }
1167
-
1168
- var _hashClear = hashClear;
1169
-
1170
- /**
1171
- * Removes `key` and its value from the hash.
1172
- *
1173
- * @private
1174
- * @name delete
1175
- * @memberOf Hash
1176
- * @param {Object} hash The hash to modify.
1177
- * @param {string} key The key of the value to remove.
1178
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1179
- */
1180
- function hashDelete(key) {
1181
- var result = this.has(key) && delete this.__data__[key];
1182
- this.size -= result ? 1 : 0;
1183
- return result;
1184
- }
1185
-
1186
- var _hashDelete = hashDelete;
1187
-
1188
- /** Used to stand-in for `undefined` hash values. */
1189
- var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
1190
-
1191
- /** Used for built-in method references. */
1192
- var objectProto$1 = Object.prototype;
1193
-
1194
- /** Used to check objects for own properties. */
1195
- var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
1196
-
1197
- /**
1198
- * Gets the hash value for `key`.
1199
- *
1200
- * @private
1201
- * @name get
1202
- * @memberOf Hash
1203
- * @param {string} key The key of the value to get.
1204
- * @returns {*} Returns the entry value.
1205
- */
1206
- function hashGet(key) {
1207
- var data = this.__data__;
1208
- if (_nativeCreate) {
1209
- var result = data[key];
1210
- return result === HASH_UNDEFINED$1 ? undefined : result;
1211
- }
1212
- return hasOwnProperty$1.call(data, key) ? data[key] : undefined;
1213
- }
1214
-
1215
- var _hashGet = hashGet;
1216
-
1217
- /** Used for built-in method references. */
1218
- var objectProto = Object.prototype;
1219
-
1220
- /** Used to check objects for own properties. */
1221
- var hasOwnProperty = objectProto.hasOwnProperty;
1222
-
1223
- /**
1224
- * Checks if a hash value for `key` exists.
1225
- *
1226
- * @private
1227
- * @name has
1228
- * @memberOf Hash
1229
- * @param {string} key The key of the entry to check.
1230
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1231
- */
1232
- function hashHas(key) {
1233
- var data = this.__data__;
1234
- return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
1235
- }
1236
-
1237
- var _hashHas = hashHas;
1238
-
1239
- /** Used to stand-in for `undefined` hash values. */
1240
- var HASH_UNDEFINED = '__lodash_hash_undefined__';
1241
-
1242
- /**
1243
- * Sets the hash `key` to `value`.
1244
- *
1245
- * @private
1246
- * @name set
1247
- * @memberOf Hash
1248
- * @param {string} key The key of the value to set.
1249
- * @param {*} value The value to set.
1250
- * @returns {Object} Returns the hash instance.
1251
- */
1252
- function hashSet(key, value) {
1253
- var data = this.__data__;
1254
- this.size += this.has(key) ? 0 : 1;
1255
- data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
1256
- return this;
1257
- }
1258
-
1259
- var _hashSet = hashSet;
1260
-
1261
- /**
1262
- * Creates a hash object.
1263
- *
1264
- * @private
1265
- * @constructor
1266
- * @param {Array} [entries] The key-value pairs to cache.
1267
- */
1268
- function Hash(entries) {
1269
- var index = -1,
1270
- length = entries == null ? 0 : entries.length;
1271
-
1272
- this.clear();
1273
- while (++index < length) {
1274
- var entry = entries[index];
1275
- this.set(entry[0], entry[1]);
1276
- }
1277
- }
1278
-
1279
- // Add methods to `Hash`.
1280
- Hash.prototype.clear = _hashClear;
1281
- Hash.prototype['delete'] = _hashDelete;
1282
- Hash.prototype.get = _hashGet;
1283
- Hash.prototype.has = _hashHas;
1284
- Hash.prototype.set = _hashSet;
1285
-
1286
- var _Hash = Hash;
1287
-
1288
- /**
1289
- * Removes all key-value entries from the list cache.
1290
- *
1291
- * @private
1292
- * @name clear
1293
- * @memberOf ListCache
1294
- */
1295
- function listCacheClear() {
1296
- this.__data__ = [];
1297
- this.size = 0;
1298
- }
1299
-
1300
- var _listCacheClear = listCacheClear;
1301
-
1302
- /**
1303
- * Performs a
1304
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
1305
- * comparison between two values to determine if they are equivalent.
1306
- *
1307
- * @static
1308
- * @memberOf _
1309
- * @since 4.0.0
1310
- * @category Lang
1311
- * @param {*} value The value to compare.
1312
- * @param {*} other The other value to compare.
1313
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
1314
- * @example
1315
- *
1316
- * var object = { 'a': 1 };
1317
- * var other = { 'a': 1 };
1318
- *
1319
- * _.eq(object, object);
1320
- * // => true
1321
- *
1322
- * _.eq(object, other);
1323
- * // => false
1324
- *
1325
- * _.eq('a', 'a');
1326
- * // => true
1327
- *
1328
- * _.eq('a', Object('a'));
1329
- * // => false
1330
- *
1331
- * _.eq(NaN, NaN);
1332
- * // => true
1333
- */
1334
- function eq(value, other) {
1335
- return value === other || (value !== value && other !== other);
1336
- }
1337
-
1338
- var eq_1 = eq;
1339
-
1340
- /**
1341
- * Gets the index at which the `key` is found in `array` of key-value pairs.
1342
- *
1343
- * @private
1344
- * @param {Array} array The array to inspect.
1345
- * @param {*} key The key to search for.
1346
- * @returns {number} Returns the index of the matched value, else `-1`.
1347
- */
1348
- function assocIndexOf(array, key) {
1349
- var length = array.length;
1350
- while (length--) {
1351
- if (eq_1(array[length][0], key)) {
1352
- return length;
1353
- }
1354
- }
1355
- return -1;
1356
- }
1357
-
1358
- var _assocIndexOf = assocIndexOf;
1359
-
1360
- /** Used for built-in method references. */
1361
- var arrayProto = Array.prototype;
1362
-
1363
- /** Built-in value references. */
1364
- var splice = arrayProto.splice;
1365
-
1366
- /**
1367
- * Removes `key` and its value from the list cache.
1368
- *
1369
- * @private
1370
- * @name delete
1371
- * @memberOf ListCache
1372
- * @param {string} key The key of the value to remove.
1373
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1374
- */
1375
- function listCacheDelete(key) {
1376
- var data = this.__data__,
1377
- index = _assocIndexOf(data, key);
1378
-
1379
- if (index < 0) {
1380
- return false;
1381
- }
1382
- var lastIndex = data.length - 1;
1383
- if (index == lastIndex) {
1384
- data.pop();
1385
- } else {
1386
- splice.call(data, index, 1);
1387
- }
1388
- --this.size;
1389
- return true;
1390
- }
1391
-
1392
- var _listCacheDelete = listCacheDelete;
1393
-
1394
- /**
1395
- * Gets the list cache value for `key`.
1396
- *
1397
- * @private
1398
- * @name get
1399
- * @memberOf ListCache
1400
- * @param {string} key The key of the value to get.
1401
- * @returns {*} Returns the entry value.
1402
- */
1403
- function listCacheGet(key) {
1404
- var data = this.__data__,
1405
- index = _assocIndexOf(data, key);
1406
-
1407
- return index < 0 ? undefined : data[index][1];
1408
- }
1409
-
1410
- var _listCacheGet = listCacheGet;
1411
-
1412
- /**
1413
- * Checks if a list cache value for `key` exists.
1414
- *
1415
- * @private
1416
- * @name has
1417
- * @memberOf ListCache
1418
- * @param {string} key The key of the entry to check.
1419
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1420
- */
1421
- function listCacheHas(key) {
1422
- return _assocIndexOf(this.__data__, key) > -1;
1423
- }
1424
-
1425
- var _listCacheHas = listCacheHas;
1426
-
1427
- /**
1428
- * Sets the list cache `key` to `value`.
1429
- *
1430
- * @private
1431
- * @name set
1432
- * @memberOf ListCache
1433
- * @param {string} key The key of the value to set.
1434
- * @param {*} value The value to set.
1435
- * @returns {Object} Returns the list cache instance.
1436
- */
1437
- function listCacheSet(key, value) {
1438
- var data = this.__data__,
1439
- index = _assocIndexOf(data, key);
1440
-
1441
- if (index < 0) {
1442
- ++this.size;
1443
- data.push([key, value]);
1444
- } else {
1445
- data[index][1] = value;
1446
- }
1447
- return this;
1448
- }
1449
-
1450
- var _listCacheSet = listCacheSet;
1451
-
1452
- /**
1453
- * Creates an list cache object.
1454
- *
1455
- * @private
1456
- * @constructor
1457
- * @param {Array} [entries] The key-value pairs to cache.
1458
- */
1459
- function ListCache(entries) {
1460
- var index = -1,
1461
- length = entries == null ? 0 : entries.length;
1462
-
1463
- this.clear();
1464
- while (++index < length) {
1465
- var entry = entries[index];
1466
- this.set(entry[0], entry[1]);
1467
- }
1468
- }
1469
-
1470
- // Add methods to `ListCache`.
1471
- ListCache.prototype.clear = _listCacheClear;
1472
- ListCache.prototype['delete'] = _listCacheDelete;
1473
- ListCache.prototype.get = _listCacheGet;
1474
- ListCache.prototype.has = _listCacheHas;
1475
- ListCache.prototype.set = _listCacheSet;
1476
-
1477
- var _ListCache = ListCache;
1478
-
1479
- /* Built-in method references that are verified to be native. */
1480
- var Map = _getNative(_root, 'Map');
1481
-
1482
- var _Map = Map;
1483
-
1484
- /**
1485
- * Removes all key-value entries from the map.
1486
- *
1487
- * @private
1488
- * @name clear
1489
- * @memberOf MapCache
1490
- */
1491
- function mapCacheClear() {
1492
- this.size = 0;
1493
- this.__data__ = {
1494
- 'hash': new _Hash,
1495
- 'map': new (_Map || _ListCache),
1496
- 'string': new _Hash
1497
- };
1498
- }
1499
-
1500
- var _mapCacheClear = mapCacheClear;
1501
-
1502
- /**
1503
- * Checks if `value` is suitable for use as unique object key.
1504
- *
1505
- * @private
1506
- * @param {*} value The value to check.
1507
- * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
1508
- */
1509
- function isKeyable(value) {
1510
- var type = typeof value;
1511
- return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
1512
- ? (value !== '__proto__')
1513
- : (value === null);
1514
- }
1515
-
1516
- var _isKeyable = isKeyable;
1517
-
1518
- /**
1519
- * Gets the data for `map`.
1520
- *
1521
- * @private
1522
- * @param {Object} map The map to query.
1523
- * @param {string} key The reference key.
1524
- * @returns {*} Returns the map data.
1525
- */
1526
- function getMapData(map, key) {
1527
- var data = map.__data__;
1528
- return _isKeyable(key)
1529
- ? data[typeof key == 'string' ? 'string' : 'hash']
1530
- : data.map;
1531
- }
1532
-
1533
- var _getMapData = getMapData;
1534
-
1535
- /**
1536
- * Removes `key` and its value from the map.
1537
- *
1538
- * @private
1539
- * @name delete
1540
- * @memberOf MapCache
1541
- * @param {string} key The key of the value to remove.
1542
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1543
- */
1544
- function mapCacheDelete(key) {
1545
- var result = _getMapData(this, key)['delete'](key);
1546
- this.size -= result ? 1 : 0;
1547
- return result;
1548
- }
1549
-
1550
- var _mapCacheDelete = mapCacheDelete;
1551
-
1552
- /**
1553
- * Gets the map value for `key`.
1554
- *
1555
- * @private
1556
- * @name get
1557
- * @memberOf MapCache
1558
- * @param {string} key The key of the value to get.
1559
- * @returns {*} Returns the entry value.
1560
- */
1561
- function mapCacheGet(key) {
1562
- return _getMapData(this, key).get(key);
1563
- }
1564
-
1565
- var _mapCacheGet = mapCacheGet;
1566
-
1567
- /**
1568
- * Checks if a map value for `key` exists.
1569
- *
1570
- * @private
1571
- * @name has
1572
- * @memberOf MapCache
1573
- * @param {string} key The key of the entry to check.
1574
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1575
- */
1576
- function mapCacheHas(key) {
1577
- return _getMapData(this, key).has(key);
1578
- }
1579
-
1580
- var _mapCacheHas = mapCacheHas;
1581
-
1582
- /**
1583
- * Sets the map `key` to `value`.
1584
- *
1585
- * @private
1586
- * @name set
1587
- * @memberOf MapCache
1588
- * @param {string} key The key of the value to set.
1589
- * @param {*} value The value to set.
1590
- * @returns {Object} Returns the map cache instance.
1591
- */
1592
- function mapCacheSet(key, value) {
1593
- var data = _getMapData(this, key),
1594
- size = data.size;
1595
-
1596
- data.set(key, value);
1597
- this.size += data.size == size ? 0 : 1;
1598
- return this;
1599
- }
1600
-
1601
- var _mapCacheSet = mapCacheSet;
1602
-
1603
- /**
1604
- * Creates a map cache object to store key-value pairs.
1605
- *
1606
- * @private
1607
- * @constructor
1608
- * @param {Array} [entries] The key-value pairs to cache.
1609
- */
1610
- function MapCache(entries) {
1611
- var index = -1,
1612
- length = entries == null ? 0 : entries.length;
1613
-
1614
- this.clear();
1615
- while (++index < length) {
1616
- var entry = entries[index];
1617
- this.set(entry[0], entry[1]);
1618
- }
1619
- }
1620
-
1621
- // Add methods to `MapCache`.
1622
- MapCache.prototype.clear = _mapCacheClear;
1623
- MapCache.prototype['delete'] = _mapCacheDelete;
1624
- MapCache.prototype.get = _mapCacheGet;
1625
- MapCache.prototype.has = _mapCacheHas;
1626
- MapCache.prototype.set = _mapCacheSet;
1627
-
1628
- var _MapCache = MapCache;
1629
-
1630
- /** Error message constants. */
1631
- var FUNC_ERROR_TEXT = 'Expected a function';
1632
-
1633
- /**
1634
- * Creates a function that memoizes the result of `func`. If `resolver` is
1635
- * provided, it determines the cache key for storing the result based on the
1636
- * arguments provided to the memoized function. By default, the first argument
1637
- * provided to the memoized function is used as the map cache key. The `func`
1638
- * is invoked with the `this` binding of the memoized function.
1639
- *
1640
- * **Note:** The cache is exposed as the `cache` property on the memoized
1641
- * function. Its creation may be customized by replacing the `_.memoize.Cache`
1642
- * constructor with one whose instances implement the
1643
- * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
1644
- * method interface of `clear`, `delete`, `get`, `has`, and `set`.
1645
- *
1646
- * @static
1647
- * @memberOf _
1648
- * @since 0.1.0
1649
- * @category Function
1650
- * @param {Function} func The function to have its output memoized.
1651
- * @param {Function} [resolver] The function to resolve the cache key.
1652
- * @returns {Function} Returns the new memoized function.
1653
- * @example
1654
- *
1655
- * var object = { 'a': 1, 'b': 2 };
1656
- * var other = { 'c': 3, 'd': 4 };
1657
- *
1658
- * var values = _.memoize(_.values);
1659
- * values(object);
1660
- * // => [1, 2]
1661
- *
1662
- * values(other);
1663
- * // => [3, 4]
1664
- *
1665
- * object.a = 2;
1666
- * values(object);
1667
- * // => [1, 2]
1668
- *
1669
- * // Modify the result cache.
1670
- * values.cache.set(object, ['a', 'b']);
1671
- * values(object);
1672
- * // => ['a', 'b']
1673
- *
1674
- * // Replace `_.memoize.Cache`.
1675
- * _.memoize.Cache = WeakMap;
1676
- */
1677
- function memoize(func, resolver) {
1678
- if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
1679
- throw new TypeError(FUNC_ERROR_TEXT);
1680
- }
1681
- var memoized = function() {
1682
- var args = arguments,
1683
- key = resolver ? resolver.apply(this, args) : args[0],
1684
- cache = memoized.cache;
1685
-
1686
- if (cache.has(key)) {
1687
- return cache.get(key);
1688
- }
1689
- var result = func.apply(this, args);
1690
- memoized.cache = cache.set(key, result) || cache;
1691
- return result;
1692
- };
1693
- memoized.cache = new (memoize.Cache || _MapCache);
1694
- return memoized;
1695
- }
1696
-
1697
- // Expose `MapCache`.
1698
- memoize.Cache = _MapCache;
1699
-
1700
- var memoize_1 = memoize;
1701
-
1702
- /** Used as the maximum memoize cache size. */
1703
- var MAX_MEMOIZE_SIZE = 500;
1704
-
1705
- /**
1706
- * A specialized version of `_.memoize` which clears the memoized function's
1707
- * cache when it exceeds `MAX_MEMOIZE_SIZE`.
1708
- *
1709
- * @private
1710
- * @param {Function} func The function to have its output memoized.
1711
- * @returns {Function} Returns the new memoized function.
1712
- */
1713
- function memoizeCapped(func) {
1714
- var result = memoize_1(func, function(key) {
1715
- if (cache.size === MAX_MEMOIZE_SIZE) {
1716
- cache.clear();
1717
- }
1718
- return key;
1719
- });
1720
-
1721
- var cache = result.cache;
1722
- return result;
1723
- }
1724
-
1725
- var _memoizeCapped = memoizeCapped;
1726
-
1727
- /** Used to match property names within property paths. */
1728
- var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
1729
-
1730
- /** Used to match backslashes in property paths. */
1731
- var reEscapeChar = /\\(\\)?/g;
1732
-
1733
- /**
1734
- * Converts `string` to a property path array.
1735
- *
1736
- * @private
1737
- * @param {string} string The string to convert.
1738
- * @returns {Array} Returns the property path array.
1739
- */
1740
- _memoizeCapped(function(string) {
1741
- var result = [];
1742
- if (string.charCodeAt(0) === 46 /* . */) {
1743
- result.push('');
1744
- }
1745
- string.replace(rePropName, function(match, number, quote, subString) {
1746
- result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
1747
- });
1748
- return result;
1749
- });
1750
-
1751
- /** Used to convert symbols to primitives and strings. */
1752
- var symbolProto = _Symbol ? _Symbol.prototype : undefined;
1753
- symbolProto ? symbolProto.toString : undefined;
1754
-
1755
42
  var shapeConfig = PropTypes__default["default"].shape({
1756
43
  "sketches-host": PropTypes__default["default"].string,
1757
44
  "cdn-name": PropTypes__default["default"].string,
@@ -1771,9 +58,9 @@ var Videobase = function Videobase(_ref) {
1771
58
  _ref.config;
1772
59
  var _ref$loadIframeOnClic = _ref.loadIframeOnClick,
1773
60
  loadIframeOnClick = _ref$loadIframeOnClic === void 0 ? false : _ref$loadIframeOnClic,
1774
- restProps = _objectWithoutProperties(_ref, _excluded);
61
+ restProps = _objectWithoutProperties__default["default"](_ref, _excluded);
1775
62
 
1776
- return /*#__PURE__*/React__default["default"].createElement("div", _extends({
63
+ return /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({
1777
64
  className: "video-m_container__MYuWI" + (" " + (restProps ? restProps.className || "" : ""))
1778
65
  }, restProps, {
1779
66
  "data-test-id": "video"