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