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