@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.
- package/atoms/Author/index.js +14 -2103
- package/atoms/Author/styles.arrow.css +1 -1
- package/atoms/AuthorWithTime/index.js +32 -2482
- package/atoms/AuthorWithTime/styles.arrow.css +1 -1
- package/atoms/CollectionName/index.js +12 -2101
- package/atoms/CollectionName/styles.arrow.css +1 -1
- package/atoms/ExtendedLoadMore/{index-b22f1843.js → index-0f809dd9.js} +10 -7
- package/atoms/ExtendedLoadMore/index-142f015c.js +476 -0
- package/atoms/ExtendedLoadMore/{index-bc129cb8.js → index-37a9ccff.js} +18 -10
- package/atoms/ExtendedLoadMore/{index-6e083738.js → index-446679c8.js} +20 -12
- package/atoms/ExtendedLoadMore/{index-9e0d32b7.js → index-44f97338.js} +19 -9
- package/atoms/ExtendedLoadMore/{index-b5936059.js → index-57dd4870.js} +15 -7
- package/atoms/ExtendedLoadMore/{index-fee73a14.js → index-66dd4dbd.js} +15 -7
- package/atoms/ExtendedLoadMore/{index-5c8eda4a.js → index-8462c597.js} +21 -16
- package/atoms/ExtendedLoadMore/{index-3c4ac692.js → index-93cb06d1.js} +42 -51
- package/atoms/ExtendedLoadMore/{index-4ddfe28d.js → index-afd44863.js} +6 -4
- package/atoms/ExtendedLoadMore/{index-3976fac4.js → index-b5754c5d.js} +20 -14
- package/atoms/ExtendedLoadMore/{index-a5c95f84.js → index-bbaf526e.js} +16 -8
- package/atoms/ExtendedLoadMore/{index-6ecceae4.js → index-cfb262ef.js} +18 -9
- package/atoms/ExtendedLoadMore/index.js +8 -1
- package/atoms/ExtendedLoadMore/styles.arrow.css +1 -1
- package/atoms/Headline/index.js +14 -2103
- package/atoms/Headline/styles.arrow.css +1 -1
- package/atoms/HeroImage/index.js +22 -2170
- package/atoms/HeroImage/styles.arrow.css +1 -1
- package/atoms/LoadmoreButton/index.js +12 -2114
- package/atoms/LoadmoreButton/styles.arrow.css +1 -1
- package/atoms/ScrollSnap/index.js +17 -2178
- package/atoms/ScrollSnap/styles.arrow.css +1 -1
- package/atoms/SectionTag/index.js +10 -2099
- package/atoms/SectionTag/styles.arrow.css +1 -1
- package/atoms/Subheadline/index.js +8 -2097
- package/atoms/Subheadline/styles.arrow.css +1 -1
- package/atoms/TimeStamp/index.js +13 -2463
- package/atoms/TimeStamp/styles.arrow.css +1 -1
- package/molecules/KeyEvents/index.js +23 -2545
- package/molecules/KeyEvents/styles.arrow.css +1 -1
- package/molecules/PageIntroductionCard/index.js +17 -2454
- package/molecules/PageIntroductionCard/styles.arrow.css +1 -1
- package/molecules/SocialShareTemplate/index.js +144 -2740
- package/molecules/SocialShareTemplate/styles.arrow.css +1 -1
- package/molecules/StoryCard/index.js +64 -2582
- package/molecules/StoryCard/styles.arrow.css +1 -1
- package/molecules/StoryElementCard/index.js +123 -2893
- package/molecules/StoryElementCard/styles.arrow.css +1 -1
- package/molecules/StorycardContent/index.js +45 -2495
- package/molecules/StorycardContent/styles.arrow.css +1 -1
- package/package.json +1 -1
- package/rows/AlternateCollectionFilter/index.js +92 -2659
- package/rows/AlternateCollectionFilter/styles.arrow.css +1 -1
- package/rows/AsideCollection/index.js +92 -2659
- package/rows/AsideCollection/styles.arrow.css +1 -1
- package/rows/AstrologyCollection/index.js +89 -2656
- package/rows/AstrologyCollection/styles.arrow.css +1 -1
- package/rows/AuthorIntroductionCard/index.js +27 -2743
- package/rows/AuthorIntroductionCard/styles.arrow.css +1 -1
- package/rows/AuthorsList/index.js +34 -2763
- package/rows/AuthorsList/styles.arrow.css +1 -1
- package/rows/CollectionFilter/index.js +91 -2658
- package/rows/CollectionFilter/styles.arrow.css +1 -1
- package/rows/ElevenStories/index.js +81 -2612
- package/rows/ElevenStories/styles.arrow.css +1 -1
- package/rows/FourColFiveStories/index.js +75 -2603
- package/rows/FourColFiveStories/styles.arrow.css +1 -1
- package/rows/FourColGrid/index.js +92 -2623
- package/rows/FourColGrid/styles.arrow.css +1 -1
- package/rows/FourColPortraitStories/index.js +91 -2622
- package/rows/FourColPortraitStories/styles.arrow.css +1 -1
- package/rows/FourColSixteenStories/index.js +80 -2617
- package/rows/FourColSixteenStories/styles.arrow.css +1 -1
- package/rows/FourColTwelveStories/index.js +72 -2596
- package/rows/FourColTwelveStories/styles.arrow.css +1 -1
- package/rows/FourStorySlider/index.js +84 -2615
- package/rows/FourStorySlider/styles.arrow.css +1 -1
- package/rows/FourStorySliderPortrait/index.js +84 -2615
- package/rows/FourStorySliderPortrait/styles.arrow.css +1 -1
- package/rows/FourTabbedBigStorySlider/index.js +80 -2611
- package/rows/FourTabbedBigStorySlider/styles.arrow.css +1 -1
- package/rows/FullScreenSlider/index.js +85 -2616
- package/rows/FullScreenSlider/styles.arrow.css +1 -1
- package/rows/HalfScreenSlider/index.js +81 -2612
- package/rows/HalfScreenSlider/styles.arrow.css +1 -1
- package/rows/ListComponent/index.js +75 -2606
- package/rows/ListComponent/styles.arrow.css +1 -1
- package/rows/Listicles/index.js +38 -2235
- package/rows/Listicles/styles.arrow.css +1 -1
- package/rows/MagazineEditions/index.js +24 -2487
- package/rows/MagazineEditions/styles.arrow.css +1 -1
- package/rows/MagazineHeaderCard/index.js +26 -2489
- package/rows/MagazineHeaderCard/styles.arrow.css +1 -1
- package/rows/MagazineWidget/index.js +81 -2612
- package/rows/MagazineWidget/styles.arrow.css +1 -1
- package/rows/OneColStoryList/index.js +92 -2623
- package/rows/OneColStoryList/styles.arrow.css +1 -1
- package/rows/OpinionCollection/index.js +61 -2583
- package/rows/OpinionCollection/styles.arrow.css +1 -1
- package/rows/SixColSixStories/index.js +91 -2622
- package/rows/SixColSixStories/styles.arrow.css +1 -1
- package/rows/StoryCollection/index.js +92 -2659
- package/rows/StoryCollection/styles.arrow.css +1 -1
- package/rows/TagIntroductionCard/index.js +9 -1816
- package/rows/TagIntroductionCard/styles.arrow.css +1 -1
- package/rows/ThreeColFlexStories/index.js +91 -2622
- package/rows/ThreeColFlexStories/styles.arrow.css +1 -1
- package/rows/ThreeColFourteenStories/index.js +72 -2596
- package/rows/ThreeColFourteenStories/styles.arrow.css +1 -1
- package/rows/ThreeColGrid/index.js +94 -2625
- package/rows/ThreeColGrid/styles.arrow.css +1 -1
- package/rows/ThreeColSevenStory/index.js +84 -2615
- package/rows/ThreeColSevenStory/styles.arrow.css +1 -1
- package/rows/ThreeColSixStories/index.js +76 -2607
- package/rows/ThreeColSixStories/styles.arrow.css +1 -1
- package/rows/ThreeColTwelveStories/index.js +80 -2617
- package/rows/ThreeColTwelveStories/styles.arrow.css +1 -1
- package/rows/TwoColFourStories/index.js +78 -2609
- package/rows/TwoColFourStories/styles.arrow.css +1 -1
- package/rows/TwoColFourStoryHighlight/index.js +80 -2617
- package/rows/TwoColFourStoryHighlight/styles.arrow.css +1 -1
- package/rows/TwoColSevenStories/index.js +77 -2608
- package/rows/TwoColSevenStories/styles.arrow.css +1 -1
- package/rows/TwoColSixStories/index.js +82 -2619
- package/rows/TwoColSixStories/styles.arrow.css +1 -1
- package/rows/TwoColTenStoriesSidebar/index.js +79 -2610
- package/rows/TwoColTenStoriesSidebar/styles.arrow.css +1 -1
- package/rows/TwoColThreeStories/index.js +75 -2606
- package/rows/TwoColThreeStories/styles.arrow.css +1 -1
- package/story-elements/AlsoRead/index.js +24 -2170
- package/story-elements/AlsoRead/styles.arrow.css +1 -1
- package/story-elements/Attachment/index.js +15 -1870
- package/story-elements/Attachment/styles.arrow.css +1 -1
- package/story-elements/BigFact/index.js +16 -1871
- package/story-elements/BigFact/styles.arrow.css +1 -1
- package/story-elements/BlockQuote/index.js +20 -2157
- package/story-elements/BlockQuote/styles.arrow.css +1 -1
- package/story-elements/Blurb/index.js +18 -1932
- package/story-elements/Blurb/styles.arrow.css +1 -1
- package/story-elements/Image/index.js +42 -2251
- package/story-elements/Image/styles.arrow.css +1 -1
- package/story-elements/ImageGallery/index.js +45 -2254
- package/story-elements/ImageGallery/styles.arrow.css +1 -1
- package/story-elements/ImageSlideshow/index.js +48 -2257
- package/story-elements/ImageSlideshow/styles.arrow.css +1 -1
- package/story-elements/QuestionAnswer/index.js +26 -2163
- package/story-elements/QuestionAnswer/styles.arrow.css +1 -1
- package/story-elements/Quote/index.js +17 -1872
- package/story-elements/Quote/styles.arrow.css +1 -1
- package/story-elements/Reference/index.js +15 -1870
- package/story-elements/Reference/styles.arrow.css +1 -1
- package/story-elements/StoryElement/index.js +12 -1725
- package/story-elements/Summary/index.js +18 -1873
- package/story-elements/Summary/styles.arrow.css +1 -1
- package/story-elements/Text/index.js +16 -2153
- package/story-elements/Text/styles.arrow.css +1 -1
- package/story-elements/Video/index.js +12 -1725
- package/story-elements/Video/styles.arrow.css +1 -1
- package/story-templates/ListicleStoryTemplate/index.js +282 -3167
- package/story-templates/ListicleStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/LiveBlogStoryTemplate/index.js +504 -3389
- package/story-templates/LiveBlogStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/PhotoStoryTemplate/index.js +287 -3172
- package/story-templates/PhotoStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/TextStoryTemplate/index.js +416 -3301
- package/story-templates/TextStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/VideoStoryTemplate/index.js +382 -3267
- package/story-templates/VideoStoryTemplate/styles.arrow.css +1 -1
- package/atoms/ExtendedLoadMore/index-e7cde739.js +0 -3051
|
@@ -2,11 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _extends = require('@babel/runtime/helpers/extends');
|
|
6
|
+
var _getClassName = require('babel-plugin-react-css-modules/dist/browser/getClassName');
|
|
5
7
|
var React = require('react');
|
|
8
|
+
var lodash = require('lodash');
|
|
9
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
6
10
|
var PropTypes = require('prop-types');
|
|
11
|
+
require('@babel/runtime/helpers/asyncToGenerator');
|
|
12
|
+
var _typeof = require('@babel/runtime/helpers/typeof');
|
|
13
|
+
require('@babel/runtime/regenerator');
|
|
7
14
|
require('react-timeago');
|
|
8
15
|
require('date-fns-tz');
|
|
16
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
9
17
|
var components = require('@quintype/components');
|
|
18
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
10
19
|
var reactRedux = require('react-redux');
|
|
11
20
|
|
|
12
21
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -29,1410 +38,25 @@ function _interopNamespace(e) {
|
|
|
29
38
|
return Object.freeze(n);
|
|
30
39
|
}
|
|
31
40
|
|
|
41
|
+
var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
|
|
42
|
+
var _getClassName__default = /*#__PURE__*/_interopDefaultLegacy(_getClassName);
|
|
32
43
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
44
|
+
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
33
45
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
38
|
-
var source = arguments[i];
|
|
39
|
-
|
|
40
|
-
for (var key in source) {
|
|
41
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
42
|
-
target[key] = source[key];
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return target;
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
return _extends.apply(this, arguments);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
54
|
-
|
|
55
|
-
function getDefaultExportFromCjs (x) {
|
|
56
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
function createCommonjsModule(fn) {
|
|
60
|
-
var module = { exports: {} };
|
|
61
|
-
return fn(module, module.exports), module.exports;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
var optionsDefaults_1 = createCommonjsModule(function (module, exports) {
|
|
65
|
-
|
|
66
|
-
Object.defineProperty(exports, "__esModule", {
|
|
67
|
-
value: true
|
|
68
|
-
});
|
|
69
|
-
exports["default"] = void 0;
|
|
70
|
-
var optionsDefaults = {
|
|
71
|
-
attributeNames: {
|
|
72
|
-
styleName: 'className'
|
|
73
|
-
},
|
|
74
|
-
generateScopedName: '[path]___[name]__[local]___[hash:base64:5]',
|
|
75
|
-
handleMissingStyleName: 'throw'
|
|
76
|
-
};
|
|
77
|
-
var _default = optionsDefaults;
|
|
78
|
-
exports["default"] = _default;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
var getClassName = createCommonjsModule(function (module, exports) {
|
|
84
|
-
|
|
85
|
-
Object.defineProperty(exports, "__esModule", {
|
|
86
|
-
value: true
|
|
87
|
-
});
|
|
88
|
-
exports["default"] = void 0;
|
|
89
|
-
|
|
90
|
-
var _optionsDefaults = _interopRequireDefault(optionsDefaults_1);
|
|
91
|
-
|
|
92
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
93
|
-
|
|
94
|
-
var isNamespacedStyleName = function isNamespacedStyleName(styleName) {
|
|
95
|
-
return styleName.indexOf('.') !== -1;
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
var handleError = function handleError(message, handleMissingStyleName) {
|
|
99
|
-
if (handleMissingStyleName === 'throw') {
|
|
100
|
-
throw new Error(message);
|
|
101
|
-
} else if (handleMissingStyleName === 'warn') {
|
|
102
|
-
// eslint-disable-next-line no-console
|
|
103
|
-
console.warn(message);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
return null;
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
var getClassNameForNamespacedStyleName = function getClassNameForNamespacedStyleName(styleName, styleModuleImportMap, handleMissingStyleNameOption) {
|
|
110
|
-
// Note:
|
|
111
|
-
// Do not use the desctructing syntax with Babel.
|
|
112
|
-
// Desctructing adds _slicedToArray helper.
|
|
113
|
-
var styleNameParts = styleName.split('.');
|
|
114
|
-
var importName = styleNameParts[0];
|
|
115
|
-
var moduleName = styleNameParts[1];
|
|
116
|
-
var handleMissingStyleName = handleMissingStyleNameOption || _optionsDefaults["default"].handleMissingStyleName;
|
|
117
|
-
|
|
118
|
-
if (!moduleName) {
|
|
119
|
-
return handleError('Invalid style name: ' + styleName, handleMissingStyleName);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
if (!styleModuleImportMap[importName]) {
|
|
123
|
-
return handleError('CSS module import does not exist: ' + importName, handleMissingStyleName);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
if (!styleModuleImportMap[importName][moduleName]) {
|
|
127
|
-
return handleError('CSS module does not exist: ' + moduleName, handleMissingStyleName);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
return styleModuleImportMap[importName][moduleName];
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
var getClassNameFromMultipleImports = function getClassNameFromMultipleImports(styleName, styleModuleImportMap, handleMissingStyleNameOption) {
|
|
134
|
-
var handleMissingStyleName = handleMissingStyleNameOption || _optionsDefaults["default"].handleMissingStyleName;
|
|
135
|
-
var importKeysWithMatches = Object.keys(styleModuleImportMap).map(function (importKey) {
|
|
136
|
-
return styleModuleImportMap[importKey][styleName] && importKey;
|
|
137
|
-
}).filter(function (importKey) {
|
|
138
|
-
return importKey;
|
|
139
|
-
});
|
|
140
|
-
|
|
141
|
-
if (importKeysWithMatches.length > 1) {
|
|
142
|
-
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');
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
if (importKeysWithMatches.length === 0) {
|
|
146
|
-
return handleError('Could not resolve the styleName \'' + styleName + '\'.', handleMissingStyleName);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
return styleModuleImportMap[importKeysWithMatches[0]][styleName];
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
var _default = function _default(styleNameValue, styleModuleImportMap, options) {
|
|
153
|
-
var styleModuleImportMapKeys = Object.keys(styleModuleImportMap);
|
|
154
|
-
|
|
155
|
-
var _ref = options || {},
|
|
156
|
-
_ref$handleMissingSty = _ref.handleMissingStyleName,
|
|
157
|
-
handleMissingStyleName = _ref$handleMissingSty === void 0 ? _optionsDefaults["default"].handleMissingStyleName : _ref$handleMissingSty,
|
|
158
|
-
_ref$autoResolveMulti = _ref.autoResolveMultipleImports,
|
|
159
|
-
autoResolveMultipleImports = _ref$autoResolveMulti === void 0 ? _optionsDefaults["default"].autoResolveMultipleImports : _ref$autoResolveMulti;
|
|
160
|
-
|
|
161
|
-
if (!styleNameValue) {
|
|
162
|
-
return '';
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
return styleNameValue.split(' ').filter(function (styleName) {
|
|
166
|
-
return styleName;
|
|
167
|
-
}).map(function (styleName) {
|
|
168
|
-
if (isNamespacedStyleName(styleName)) {
|
|
169
|
-
return getClassNameForNamespacedStyleName(styleName, styleModuleImportMap, handleMissingStyleName);
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
if (styleModuleImportMapKeys.length === 0) {
|
|
173
|
-
throw new Error('Cannot use styleName attribute for style name \'' + styleName + '\' without importing at least one stylesheet.');
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
if (styleModuleImportMapKeys.length > 1) {
|
|
177
|
-
if (!autoResolveMultipleImports) {
|
|
178
|
-
throw new Error('Cannot use anonymous style name \'' + styleName + '\' with more than one stylesheet import without setting \'autoResolveMultipleImports\' to true.');
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
return getClassNameFromMultipleImports(styleName, styleModuleImportMap, handleMissingStyleName);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
var styleModuleMap = styleModuleImportMap[styleModuleImportMapKeys[0]];
|
|
185
|
-
|
|
186
|
-
if (!styleModuleMap[styleName]) {
|
|
187
|
-
return handleError('Could not resolve the styleName \'' + styleName + '\'.', handleMissingStyleName);
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
return styleModuleMap[styleName];
|
|
191
|
-
}).filter(function (className) {
|
|
192
|
-
// Remove any styles which could not be found (if handleMissingStyleName === 'ignore')
|
|
193
|
-
return className;
|
|
194
|
-
}).join(' ');
|
|
195
|
-
};
|
|
196
|
-
|
|
197
|
-
exports["default"] = _default;
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
});
|
|
201
|
-
|
|
202
|
-
var _getClassName = /*@__PURE__*/getDefaultExportFromCjs(getClassName);
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* Checks if `value` is classified as an `Array` object.
|
|
206
|
-
*
|
|
207
|
-
* @static
|
|
208
|
-
* @memberOf _
|
|
209
|
-
* @since 0.1.0
|
|
210
|
-
* @category Lang
|
|
211
|
-
* @param {*} value The value to check.
|
|
212
|
-
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
213
|
-
* @example
|
|
214
|
-
*
|
|
215
|
-
* _.isArray([1, 2, 3]);
|
|
216
|
-
* // => true
|
|
217
|
-
*
|
|
218
|
-
* _.isArray(document.body.children);
|
|
219
|
-
* // => false
|
|
220
|
-
*
|
|
221
|
-
* _.isArray('abc');
|
|
222
|
-
* // => false
|
|
223
|
-
*
|
|
224
|
-
* _.isArray(_.noop);
|
|
225
|
-
* // => false
|
|
226
|
-
*/
|
|
227
|
-
var isArray = Array.isArray;
|
|
228
|
-
|
|
229
|
-
var isArray_1 = isArray;
|
|
230
|
-
|
|
231
|
-
/** Detect free variable `global` from Node.js. */
|
|
232
|
-
|
|
233
|
-
var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
234
|
-
|
|
235
|
-
var _freeGlobal = freeGlobal;
|
|
236
|
-
|
|
237
|
-
/** Detect free variable `self`. */
|
|
238
|
-
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
239
|
-
|
|
240
|
-
/** Used as a reference to the global object. */
|
|
241
|
-
var root = _freeGlobal || freeSelf || Function('return this')();
|
|
242
|
-
|
|
243
|
-
var _root = root;
|
|
244
|
-
|
|
245
|
-
/** Built-in value references. */
|
|
246
|
-
var Symbol$1 = _root.Symbol;
|
|
247
|
-
|
|
248
|
-
var _Symbol = Symbol$1;
|
|
249
|
-
|
|
250
|
-
/** Used for built-in method references. */
|
|
251
|
-
var objectProto$4 = Object.prototype;
|
|
252
|
-
|
|
253
|
-
/** Used to check objects for own properties. */
|
|
254
|
-
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* Used to resolve the
|
|
258
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
259
|
-
* of values.
|
|
260
|
-
*/
|
|
261
|
-
var nativeObjectToString$1 = objectProto$4.toString;
|
|
262
|
-
|
|
263
|
-
/** Built-in value references. */
|
|
264
|
-
var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
|
|
265
|
-
|
|
266
|
-
/**
|
|
267
|
-
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
268
|
-
*
|
|
269
|
-
* @private
|
|
270
|
-
* @param {*} value The value to query.
|
|
271
|
-
* @returns {string} Returns the raw `toStringTag`.
|
|
272
|
-
*/
|
|
273
|
-
function getRawTag(value) {
|
|
274
|
-
var isOwn = hasOwnProperty$3.call(value, symToStringTag$1),
|
|
275
|
-
tag = value[symToStringTag$1];
|
|
276
|
-
|
|
277
|
-
try {
|
|
278
|
-
value[symToStringTag$1] = undefined;
|
|
279
|
-
var unmasked = true;
|
|
280
|
-
} catch (e) {}
|
|
281
|
-
|
|
282
|
-
var result = nativeObjectToString$1.call(value);
|
|
283
|
-
if (unmasked) {
|
|
284
|
-
if (isOwn) {
|
|
285
|
-
value[symToStringTag$1] = tag;
|
|
286
|
-
} else {
|
|
287
|
-
delete value[symToStringTag$1];
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
return result;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
var _getRawTag = getRawTag;
|
|
294
|
-
|
|
295
|
-
/** Used for built-in method references. */
|
|
296
|
-
var objectProto$3 = Object.prototype;
|
|
297
|
-
|
|
298
|
-
/**
|
|
299
|
-
* Used to resolve the
|
|
300
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
301
|
-
* of values.
|
|
302
|
-
*/
|
|
303
|
-
var nativeObjectToString = objectProto$3.toString;
|
|
304
|
-
|
|
305
|
-
/**
|
|
306
|
-
* Converts `value` to a string using `Object.prototype.toString`.
|
|
307
|
-
*
|
|
308
|
-
* @private
|
|
309
|
-
* @param {*} value The value to convert.
|
|
310
|
-
* @returns {string} Returns the converted string.
|
|
311
|
-
*/
|
|
312
|
-
function objectToString(value) {
|
|
313
|
-
return nativeObjectToString.call(value);
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
var _objectToString = objectToString;
|
|
317
|
-
|
|
318
|
-
/** `Object#toString` result references. */
|
|
319
|
-
var nullTag = '[object Null]',
|
|
320
|
-
undefinedTag = '[object Undefined]';
|
|
321
|
-
|
|
322
|
-
/** Built-in value references. */
|
|
323
|
-
var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
|
|
324
|
-
|
|
325
|
-
/**
|
|
326
|
-
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
327
|
-
*
|
|
328
|
-
* @private
|
|
329
|
-
* @param {*} value The value to query.
|
|
330
|
-
* @returns {string} Returns the `toStringTag`.
|
|
331
|
-
*/
|
|
332
|
-
function baseGetTag(value) {
|
|
333
|
-
if (value == null) {
|
|
334
|
-
return value === undefined ? undefinedTag : nullTag;
|
|
335
|
-
}
|
|
336
|
-
return (symToStringTag && symToStringTag in Object(value))
|
|
337
|
-
? _getRawTag(value)
|
|
338
|
-
: _objectToString(value);
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
var _baseGetTag = baseGetTag;
|
|
342
|
-
|
|
343
|
-
/**
|
|
344
|
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
345
|
-
* and has a `typeof` result of "object".
|
|
346
|
-
*
|
|
347
|
-
* @static
|
|
348
|
-
* @memberOf _
|
|
349
|
-
* @since 4.0.0
|
|
350
|
-
* @category Lang
|
|
351
|
-
* @param {*} value The value to check.
|
|
352
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
353
|
-
* @example
|
|
354
|
-
*
|
|
355
|
-
* _.isObjectLike({});
|
|
356
|
-
* // => true
|
|
357
|
-
*
|
|
358
|
-
* _.isObjectLike([1, 2, 3]);
|
|
359
|
-
* // => true
|
|
360
|
-
*
|
|
361
|
-
* _.isObjectLike(_.noop);
|
|
362
|
-
* // => false
|
|
363
|
-
*
|
|
364
|
-
* _.isObjectLike(null);
|
|
365
|
-
* // => false
|
|
366
|
-
*/
|
|
367
|
-
function isObjectLike(value) {
|
|
368
|
-
return value != null && typeof value == 'object';
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
var isObjectLike_1 = isObjectLike;
|
|
372
|
-
|
|
373
|
-
/** `Object#toString` result references. */
|
|
374
|
-
var symbolTag = '[object Symbol]';
|
|
375
|
-
|
|
376
|
-
/**
|
|
377
|
-
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
378
|
-
*
|
|
379
|
-
* @static
|
|
380
|
-
* @memberOf _
|
|
381
|
-
* @since 4.0.0
|
|
382
|
-
* @category Lang
|
|
383
|
-
* @param {*} value The value to check.
|
|
384
|
-
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
385
|
-
* @example
|
|
386
|
-
*
|
|
387
|
-
* _.isSymbol(Symbol.iterator);
|
|
388
|
-
* // => true
|
|
389
|
-
*
|
|
390
|
-
* _.isSymbol('abc');
|
|
391
|
-
* // => false
|
|
392
|
-
*/
|
|
393
|
-
function isSymbol(value) {
|
|
394
|
-
return typeof value == 'symbol' ||
|
|
395
|
-
(isObjectLike_1(value) && _baseGetTag(value) == symbolTag);
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
var isSymbol_1 = isSymbol;
|
|
399
|
-
|
|
400
|
-
/** Used to match property names within property paths. */
|
|
401
|
-
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
|
402
|
-
reIsPlainProp = /^\w*$/;
|
|
403
|
-
|
|
404
|
-
/**
|
|
405
|
-
* Checks if `value` is a property name and not a property path.
|
|
406
|
-
*
|
|
407
|
-
* @private
|
|
408
|
-
* @param {*} value The value to check.
|
|
409
|
-
* @param {Object} [object] The object to query keys on.
|
|
410
|
-
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
|
411
|
-
*/
|
|
412
|
-
function isKey(value, object) {
|
|
413
|
-
if (isArray_1(value)) {
|
|
414
|
-
return false;
|
|
415
|
-
}
|
|
416
|
-
var type = typeof value;
|
|
417
|
-
if (type == 'number' || type == 'symbol' || type == 'boolean' ||
|
|
418
|
-
value == null || isSymbol_1(value)) {
|
|
419
|
-
return true;
|
|
420
|
-
}
|
|
421
|
-
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
|
|
422
|
-
(object != null && value in Object(object));
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
var _isKey = isKey;
|
|
426
|
-
|
|
427
|
-
/**
|
|
428
|
-
* Checks if `value` is the
|
|
429
|
-
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
430
|
-
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
431
|
-
*
|
|
432
|
-
* @static
|
|
433
|
-
* @memberOf _
|
|
434
|
-
* @since 0.1.0
|
|
435
|
-
* @category Lang
|
|
436
|
-
* @param {*} value The value to check.
|
|
437
|
-
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
438
|
-
* @example
|
|
439
|
-
*
|
|
440
|
-
* _.isObject({});
|
|
441
|
-
* // => true
|
|
442
|
-
*
|
|
443
|
-
* _.isObject([1, 2, 3]);
|
|
444
|
-
* // => true
|
|
445
|
-
*
|
|
446
|
-
* _.isObject(_.noop);
|
|
447
|
-
* // => true
|
|
448
|
-
*
|
|
449
|
-
* _.isObject(null);
|
|
450
|
-
* // => false
|
|
451
|
-
*/
|
|
452
|
-
function isObject(value) {
|
|
453
|
-
var type = typeof value;
|
|
454
|
-
return value != null && (type == 'object' || type == 'function');
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
var isObject_1 = isObject;
|
|
458
|
-
|
|
459
|
-
/** `Object#toString` result references. */
|
|
460
|
-
var asyncTag = '[object AsyncFunction]',
|
|
461
|
-
funcTag = '[object Function]',
|
|
462
|
-
genTag = '[object GeneratorFunction]',
|
|
463
|
-
proxyTag = '[object Proxy]';
|
|
464
|
-
|
|
465
|
-
/**
|
|
466
|
-
* Checks if `value` is classified as a `Function` object.
|
|
467
|
-
*
|
|
468
|
-
* @static
|
|
469
|
-
* @memberOf _
|
|
470
|
-
* @since 0.1.0
|
|
471
|
-
* @category Lang
|
|
472
|
-
* @param {*} value The value to check.
|
|
473
|
-
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
|
474
|
-
* @example
|
|
475
|
-
*
|
|
476
|
-
* _.isFunction(_);
|
|
477
|
-
* // => true
|
|
478
|
-
*
|
|
479
|
-
* _.isFunction(/abc/);
|
|
480
|
-
* // => false
|
|
481
|
-
*/
|
|
482
|
-
function isFunction(value) {
|
|
483
|
-
if (!isObject_1(value)) {
|
|
484
|
-
return false;
|
|
485
|
-
}
|
|
486
|
-
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
487
|
-
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
|
488
|
-
var tag = _baseGetTag(value);
|
|
489
|
-
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
var isFunction_1 = isFunction;
|
|
493
|
-
|
|
494
|
-
/** Used to detect overreaching core-js shims. */
|
|
495
|
-
var coreJsData = _root['__core-js_shared__'];
|
|
496
|
-
|
|
497
|
-
var _coreJsData = coreJsData;
|
|
498
|
-
|
|
499
|
-
/** Used to detect methods masquerading as native. */
|
|
500
|
-
var maskSrcKey = (function() {
|
|
501
|
-
var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');
|
|
502
|
-
return uid ? ('Symbol(src)_1.' + uid) : '';
|
|
503
|
-
}());
|
|
504
|
-
|
|
505
|
-
/**
|
|
506
|
-
* Checks if `func` has its source masked.
|
|
507
|
-
*
|
|
508
|
-
* @private
|
|
509
|
-
* @param {Function} func The function to check.
|
|
510
|
-
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
|
511
|
-
*/
|
|
512
|
-
function isMasked(func) {
|
|
513
|
-
return !!maskSrcKey && (maskSrcKey in func);
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
var _isMasked = isMasked;
|
|
517
|
-
|
|
518
|
-
/** Used for built-in method references. */
|
|
519
|
-
var funcProto$1 = Function.prototype;
|
|
520
|
-
|
|
521
|
-
/** Used to resolve the decompiled source of functions. */
|
|
522
|
-
var funcToString$1 = funcProto$1.toString;
|
|
523
|
-
|
|
524
|
-
/**
|
|
525
|
-
* Converts `func` to its source code.
|
|
526
|
-
*
|
|
527
|
-
* @private
|
|
528
|
-
* @param {Function} func The function to convert.
|
|
529
|
-
* @returns {string} Returns the source code.
|
|
530
|
-
*/
|
|
531
|
-
function toSource(func) {
|
|
532
|
-
if (func != null) {
|
|
533
|
-
try {
|
|
534
|
-
return funcToString$1.call(func);
|
|
535
|
-
} catch (e) {}
|
|
536
|
-
try {
|
|
537
|
-
return (func + '');
|
|
538
|
-
} catch (e) {}
|
|
539
|
-
}
|
|
540
|
-
return '';
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
var _toSource = toSource;
|
|
544
|
-
|
|
545
|
-
/**
|
|
546
|
-
* Used to match `RegExp`
|
|
547
|
-
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
548
|
-
*/
|
|
549
|
-
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
550
|
-
|
|
551
|
-
/** Used to detect host constructors (Safari). */
|
|
552
|
-
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
553
|
-
|
|
554
|
-
/** Used for built-in method references. */
|
|
555
|
-
var funcProto = Function.prototype,
|
|
556
|
-
objectProto$2 = Object.prototype;
|
|
557
|
-
|
|
558
|
-
/** Used to resolve the decompiled source of functions. */
|
|
559
|
-
var funcToString = funcProto.toString;
|
|
560
|
-
|
|
561
|
-
/** Used to check objects for own properties. */
|
|
562
|
-
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
|
563
|
-
|
|
564
|
-
/** Used to detect if a method is native. */
|
|
565
|
-
var reIsNative = RegExp('^' +
|
|
566
|
-
funcToString.call(hasOwnProperty$2).replace(reRegExpChar, '\\$&')
|
|
567
|
-
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
|
568
|
-
);
|
|
569
|
-
|
|
570
|
-
/**
|
|
571
|
-
* The base implementation of `_.isNative` without bad shim checks.
|
|
572
|
-
*
|
|
573
|
-
* @private
|
|
574
|
-
* @param {*} value The value to check.
|
|
575
|
-
* @returns {boolean} Returns `true` if `value` is a native function,
|
|
576
|
-
* else `false`.
|
|
577
|
-
*/
|
|
578
|
-
function baseIsNative(value) {
|
|
579
|
-
if (!isObject_1(value) || _isMasked(value)) {
|
|
580
|
-
return false;
|
|
581
|
-
}
|
|
582
|
-
var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;
|
|
583
|
-
return pattern.test(_toSource(value));
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
var _baseIsNative = baseIsNative;
|
|
587
|
-
|
|
588
|
-
/**
|
|
589
|
-
* Gets the value at `key` of `object`.
|
|
590
|
-
*
|
|
591
|
-
* @private
|
|
592
|
-
* @param {Object} [object] The object to query.
|
|
593
|
-
* @param {string} key The key of the property to get.
|
|
594
|
-
* @returns {*} Returns the property value.
|
|
595
|
-
*/
|
|
596
|
-
function getValue(object, key) {
|
|
597
|
-
return object == null ? undefined : object[key];
|
|
598
|
-
}
|
|
599
|
-
|
|
600
|
-
var _getValue = getValue;
|
|
601
|
-
|
|
602
|
-
/**
|
|
603
|
-
* Gets the native function at `key` of `object`.
|
|
604
|
-
*
|
|
605
|
-
* @private
|
|
606
|
-
* @param {Object} object The object to query.
|
|
607
|
-
* @param {string} key The key of the method to get.
|
|
608
|
-
* @returns {*} Returns the function if it's native, else `undefined`.
|
|
609
|
-
*/
|
|
610
|
-
function getNative(object, key) {
|
|
611
|
-
var value = _getValue(object, key);
|
|
612
|
-
return _baseIsNative(value) ? value : undefined;
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
var _getNative = getNative;
|
|
616
|
-
|
|
617
|
-
/* Built-in method references that are verified to be native. */
|
|
618
|
-
var nativeCreate = _getNative(Object, 'create');
|
|
619
|
-
|
|
620
|
-
var _nativeCreate = nativeCreate;
|
|
621
|
-
|
|
622
|
-
/**
|
|
623
|
-
* Removes all key-value entries from the hash.
|
|
624
|
-
*
|
|
625
|
-
* @private
|
|
626
|
-
* @name clear
|
|
627
|
-
* @memberOf Hash
|
|
628
|
-
*/
|
|
629
|
-
function hashClear() {
|
|
630
|
-
this.__data__ = _nativeCreate ? _nativeCreate(null) : {};
|
|
631
|
-
this.size = 0;
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
var _hashClear = hashClear;
|
|
635
|
-
|
|
636
|
-
/**
|
|
637
|
-
* Removes `key` and its value from the hash.
|
|
638
|
-
*
|
|
639
|
-
* @private
|
|
640
|
-
* @name delete
|
|
641
|
-
* @memberOf Hash
|
|
642
|
-
* @param {Object} hash The hash to modify.
|
|
643
|
-
* @param {string} key The key of the value to remove.
|
|
644
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
645
|
-
*/
|
|
646
|
-
function hashDelete(key) {
|
|
647
|
-
var result = this.has(key) && delete this.__data__[key];
|
|
648
|
-
this.size -= result ? 1 : 0;
|
|
649
|
-
return result;
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
var _hashDelete = hashDelete;
|
|
653
|
-
|
|
654
|
-
/** Used to stand-in for `undefined` hash values. */
|
|
655
|
-
var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
|
|
656
|
-
|
|
657
|
-
/** Used for built-in method references. */
|
|
658
|
-
var objectProto$1 = Object.prototype;
|
|
659
|
-
|
|
660
|
-
/** Used to check objects for own properties. */
|
|
661
|
-
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
662
|
-
|
|
663
|
-
/**
|
|
664
|
-
* Gets the hash value for `key`.
|
|
665
|
-
*
|
|
666
|
-
* @private
|
|
667
|
-
* @name get
|
|
668
|
-
* @memberOf Hash
|
|
669
|
-
* @param {string} key The key of the value to get.
|
|
670
|
-
* @returns {*} Returns the entry value.
|
|
671
|
-
*/
|
|
672
|
-
function hashGet(key) {
|
|
673
|
-
var data = this.__data__;
|
|
674
|
-
if (_nativeCreate) {
|
|
675
|
-
var result = data[key];
|
|
676
|
-
return result === HASH_UNDEFINED$1 ? undefined : result;
|
|
677
|
-
}
|
|
678
|
-
return hasOwnProperty$1.call(data, key) ? data[key] : undefined;
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
var _hashGet = hashGet;
|
|
682
|
-
|
|
683
|
-
/** Used for built-in method references. */
|
|
684
|
-
var objectProto = Object.prototype;
|
|
685
|
-
|
|
686
|
-
/** Used to check objects for own properties. */
|
|
687
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
688
|
-
|
|
689
|
-
/**
|
|
690
|
-
* Checks if a hash value for `key` exists.
|
|
691
|
-
*
|
|
692
|
-
* @private
|
|
693
|
-
* @name has
|
|
694
|
-
* @memberOf Hash
|
|
695
|
-
* @param {string} key The key of the entry to check.
|
|
696
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
697
|
-
*/
|
|
698
|
-
function hashHas(key) {
|
|
699
|
-
var data = this.__data__;
|
|
700
|
-
return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
|
|
701
|
-
}
|
|
702
|
-
|
|
703
|
-
var _hashHas = hashHas;
|
|
704
|
-
|
|
705
|
-
/** Used to stand-in for `undefined` hash values. */
|
|
706
|
-
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
707
|
-
|
|
708
|
-
/**
|
|
709
|
-
* Sets the hash `key` to `value`.
|
|
710
|
-
*
|
|
711
|
-
* @private
|
|
712
|
-
* @name set
|
|
713
|
-
* @memberOf Hash
|
|
714
|
-
* @param {string} key The key of the value to set.
|
|
715
|
-
* @param {*} value The value to set.
|
|
716
|
-
* @returns {Object} Returns the hash instance.
|
|
717
|
-
*/
|
|
718
|
-
function hashSet(key, value) {
|
|
719
|
-
var data = this.__data__;
|
|
720
|
-
this.size += this.has(key) ? 0 : 1;
|
|
721
|
-
data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
|
722
|
-
return this;
|
|
723
|
-
}
|
|
724
|
-
|
|
725
|
-
var _hashSet = hashSet;
|
|
726
|
-
|
|
727
|
-
/**
|
|
728
|
-
* Creates a hash object.
|
|
729
|
-
*
|
|
730
|
-
* @private
|
|
731
|
-
* @constructor
|
|
732
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
733
|
-
*/
|
|
734
|
-
function Hash(entries) {
|
|
735
|
-
var index = -1,
|
|
736
|
-
length = entries == null ? 0 : entries.length;
|
|
737
|
-
|
|
738
|
-
this.clear();
|
|
739
|
-
while (++index < length) {
|
|
740
|
-
var entry = entries[index];
|
|
741
|
-
this.set(entry[0], entry[1]);
|
|
742
|
-
}
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
// Add methods to `Hash`.
|
|
746
|
-
Hash.prototype.clear = _hashClear;
|
|
747
|
-
Hash.prototype['delete'] = _hashDelete;
|
|
748
|
-
Hash.prototype.get = _hashGet;
|
|
749
|
-
Hash.prototype.has = _hashHas;
|
|
750
|
-
Hash.prototype.set = _hashSet;
|
|
751
|
-
|
|
752
|
-
var _Hash = Hash;
|
|
753
|
-
|
|
754
|
-
/**
|
|
755
|
-
* Removes all key-value entries from the list cache.
|
|
756
|
-
*
|
|
757
|
-
* @private
|
|
758
|
-
* @name clear
|
|
759
|
-
* @memberOf ListCache
|
|
760
|
-
*/
|
|
761
|
-
function listCacheClear() {
|
|
762
|
-
this.__data__ = [];
|
|
763
|
-
this.size = 0;
|
|
764
|
-
}
|
|
765
|
-
|
|
766
|
-
var _listCacheClear = listCacheClear;
|
|
767
|
-
|
|
768
|
-
/**
|
|
769
|
-
* Performs a
|
|
770
|
-
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
771
|
-
* comparison between two values to determine if they are equivalent.
|
|
772
|
-
*
|
|
773
|
-
* @static
|
|
774
|
-
* @memberOf _
|
|
775
|
-
* @since 4.0.0
|
|
776
|
-
* @category Lang
|
|
777
|
-
* @param {*} value The value to compare.
|
|
778
|
-
* @param {*} other The other value to compare.
|
|
779
|
-
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
780
|
-
* @example
|
|
781
|
-
*
|
|
782
|
-
* var object = { 'a': 1 };
|
|
783
|
-
* var other = { 'a': 1 };
|
|
784
|
-
*
|
|
785
|
-
* _.eq(object, object);
|
|
786
|
-
* // => true
|
|
787
|
-
*
|
|
788
|
-
* _.eq(object, other);
|
|
789
|
-
* // => false
|
|
790
|
-
*
|
|
791
|
-
* _.eq('a', 'a');
|
|
792
|
-
* // => true
|
|
793
|
-
*
|
|
794
|
-
* _.eq('a', Object('a'));
|
|
795
|
-
* // => false
|
|
796
|
-
*
|
|
797
|
-
* _.eq(NaN, NaN);
|
|
798
|
-
* // => true
|
|
799
|
-
*/
|
|
800
|
-
function eq(value, other) {
|
|
801
|
-
return value === other || (value !== value && other !== other);
|
|
802
|
-
}
|
|
803
|
-
|
|
804
|
-
var eq_1 = eq;
|
|
805
|
-
|
|
806
|
-
/**
|
|
807
|
-
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
|
808
|
-
*
|
|
809
|
-
* @private
|
|
810
|
-
* @param {Array} array The array to inspect.
|
|
811
|
-
* @param {*} key The key to search for.
|
|
812
|
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
813
|
-
*/
|
|
814
|
-
function assocIndexOf(array, key) {
|
|
815
|
-
var length = array.length;
|
|
816
|
-
while (length--) {
|
|
817
|
-
if (eq_1(array[length][0], key)) {
|
|
818
|
-
return length;
|
|
819
|
-
}
|
|
820
|
-
}
|
|
821
|
-
return -1;
|
|
822
|
-
}
|
|
823
|
-
|
|
824
|
-
var _assocIndexOf = assocIndexOf;
|
|
825
|
-
|
|
826
|
-
/** Used for built-in method references. */
|
|
827
|
-
var arrayProto = Array.prototype;
|
|
828
|
-
|
|
829
|
-
/** Built-in value references. */
|
|
830
|
-
var splice = arrayProto.splice;
|
|
831
|
-
|
|
832
|
-
/**
|
|
833
|
-
* Removes `key` and its value from the list cache.
|
|
834
|
-
*
|
|
835
|
-
* @private
|
|
836
|
-
* @name delete
|
|
837
|
-
* @memberOf ListCache
|
|
838
|
-
* @param {string} key The key of the value to remove.
|
|
839
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
840
|
-
*/
|
|
841
|
-
function listCacheDelete(key) {
|
|
842
|
-
var data = this.__data__,
|
|
843
|
-
index = _assocIndexOf(data, key);
|
|
844
|
-
|
|
845
|
-
if (index < 0) {
|
|
846
|
-
return false;
|
|
847
|
-
}
|
|
848
|
-
var lastIndex = data.length - 1;
|
|
849
|
-
if (index == lastIndex) {
|
|
850
|
-
data.pop();
|
|
851
|
-
} else {
|
|
852
|
-
splice.call(data, index, 1);
|
|
853
|
-
}
|
|
854
|
-
--this.size;
|
|
855
|
-
return true;
|
|
856
|
-
}
|
|
857
|
-
|
|
858
|
-
var _listCacheDelete = listCacheDelete;
|
|
859
|
-
|
|
860
|
-
/**
|
|
861
|
-
* Gets the list cache value for `key`.
|
|
862
|
-
*
|
|
863
|
-
* @private
|
|
864
|
-
* @name get
|
|
865
|
-
* @memberOf ListCache
|
|
866
|
-
* @param {string} key The key of the value to get.
|
|
867
|
-
* @returns {*} Returns the entry value.
|
|
868
|
-
*/
|
|
869
|
-
function listCacheGet(key) {
|
|
870
|
-
var data = this.__data__,
|
|
871
|
-
index = _assocIndexOf(data, key);
|
|
872
|
-
|
|
873
|
-
return index < 0 ? undefined : data[index][1];
|
|
874
|
-
}
|
|
875
|
-
|
|
876
|
-
var _listCacheGet = listCacheGet;
|
|
877
|
-
|
|
878
|
-
/**
|
|
879
|
-
* Checks if a list cache value for `key` exists.
|
|
880
|
-
*
|
|
881
|
-
* @private
|
|
882
|
-
* @name has
|
|
883
|
-
* @memberOf ListCache
|
|
884
|
-
* @param {string} key The key of the entry to check.
|
|
885
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
886
|
-
*/
|
|
887
|
-
function listCacheHas(key) {
|
|
888
|
-
return _assocIndexOf(this.__data__, key) > -1;
|
|
889
|
-
}
|
|
890
|
-
|
|
891
|
-
var _listCacheHas = listCacheHas;
|
|
892
|
-
|
|
893
|
-
/**
|
|
894
|
-
* Sets the list cache `key` to `value`.
|
|
895
|
-
*
|
|
896
|
-
* @private
|
|
897
|
-
* @name set
|
|
898
|
-
* @memberOf ListCache
|
|
899
|
-
* @param {string} key The key of the value to set.
|
|
900
|
-
* @param {*} value The value to set.
|
|
901
|
-
* @returns {Object} Returns the list cache instance.
|
|
902
|
-
*/
|
|
903
|
-
function listCacheSet(key, value) {
|
|
904
|
-
var data = this.__data__,
|
|
905
|
-
index = _assocIndexOf(data, key);
|
|
906
|
-
|
|
907
|
-
if (index < 0) {
|
|
908
|
-
++this.size;
|
|
909
|
-
data.push([key, value]);
|
|
910
|
-
} else {
|
|
911
|
-
data[index][1] = value;
|
|
912
|
-
}
|
|
913
|
-
return this;
|
|
914
|
-
}
|
|
915
|
-
|
|
916
|
-
var _listCacheSet = listCacheSet;
|
|
917
|
-
|
|
918
|
-
/**
|
|
919
|
-
* Creates an list cache object.
|
|
920
|
-
*
|
|
921
|
-
* @private
|
|
922
|
-
* @constructor
|
|
923
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
924
|
-
*/
|
|
925
|
-
function ListCache(entries) {
|
|
926
|
-
var index = -1,
|
|
927
|
-
length = entries == null ? 0 : entries.length;
|
|
928
|
-
|
|
929
|
-
this.clear();
|
|
930
|
-
while (++index < length) {
|
|
931
|
-
var entry = entries[index];
|
|
932
|
-
this.set(entry[0], entry[1]);
|
|
933
|
-
}
|
|
934
|
-
}
|
|
935
|
-
|
|
936
|
-
// Add methods to `ListCache`.
|
|
937
|
-
ListCache.prototype.clear = _listCacheClear;
|
|
938
|
-
ListCache.prototype['delete'] = _listCacheDelete;
|
|
939
|
-
ListCache.prototype.get = _listCacheGet;
|
|
940
|
-
ListCache.prototype.has = _listCacheHas;
|
|
941
|
-
ListCache.prototype.set = _listCacheSet;
|
|
942
|
-
|
|
943
|
-
var _ListCache = ListCache;
|
|
944
|
-
|
|
945
|
-
/* Built-in method references that are verified to be native. */
|
|
946
|
-
var Map = _getNative(_root, 'Map');
|
|
947
|
-
|
|
948
|
-
var _Map = Map;
|
|
949
|
-
|
|
950
|
-
/**
|
|
951
|
-
* Removes all key-value entries from the map.
|
|
952
|
-
*
|
|
953
|
-
* @private
|
|
954
|
-
* @name clear
|
|
955
|
-
* @memberOf MapCache
|
|
956
|
-
*/
|
|
957
|
-
function mapCacheClear() {
|
|
958
|
-
this.size = 0;
|
|
959
|
-
this.__data__ = {
|
|
960
|
-
'hash': new _Hash,
|
|
961
|
-
'map': new (_Map || _ListCache),
|
|
962
|
-
'string': new _Hash
|
|
963
|
-
};
|
|
964
|
-
}
|
|
965
|
-
|
|
966
|
-
var _mapCacheClear = mapCacheClear;
|
|
967
|
-
|
|
968
|
-
/**
|
|
969
|
-
* Checks if `value` is suitable for use as unique object key.
|
|
970
|
-
*
|
|
971
|
-
* @private
|
|
972
|
-
* @param {*} value The value to check.
|
|
973
|
-
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
|
974
|
-
*/
|
|
975
|
-
function isKeyable(value) {
|
|
976
|
-
var type = typeof value;
|
|
977
|
-
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
|
978
|
-
? (value !== '__proto__')
|
|
979
|
-
: (value === null);
|
|
980
|
-
}
|
|
981
|
-
|
|
982
|
-
var _isKeyable = isKeyable;
|
|
983
|
-
|
|
984
|
-
/**
|
|
985
|
-
* Gets the data for `map`.
|
|
986
|
-
*
|
|
987
|
-
* @private
|
|
988
|
-
* @param {Object} map The map to query.
|
|
989
|
-
* @param {string} key The reference key.
|
|
990
|
-
* @returns {*} Returns the map data.
|
|
991
|
-
*/
|
|
992
|
-
function getMapData(map, key) {
|
|
993
|
-
var data = map.__data__;
|
|
994
|
-
return _isKeyable(key)
|
|
995
|
-
? data[typeof key == 'string' ? 'string' : 'hash']
|
|
996
|
-
: data.map;
|
|
997
|
-
}
|
|
998
|
-
|
|
999
|
-
var _getMapData = getMapData;
|
|
1000
|
-
|
|
1001
|
-
/**
|
|
1002
|
-
* Removes `key` and its value from the map.
|
|
1003
|
-
*
|
|
1004
|
-
* @private
|
|
1005
|
-
* @name delete
|
|
1006
|
-
* @memberOf MapCache
|
|
1007
|
-
* @param {string} key The key of the value to remove.
|
|
1008
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1009
|
-
*/
|
|
1010
|
-
function mapCacheDelete(key) {
|
|
1011
|
-
var result = _getMapData(this, key)['delete'](key);
|
|
1012
|
-
this.size -= result ? 1 : 0;
|
|
1013
|
-
return result;
|
|
1014
|
-
}
|
|
1015
|
-
|
|
1016
|
-
var _mapCacheDelete = mapCacheDelete;
|
|
1017
|
-
|
|
1018
|
-
/**
|
|
1019
|
-
* Gets the map value for `key`.
|
|
1020
|
-
*
|
|
1021
|
-
* @private
|
|
1022
|
-
* @name get
|
|
1023
|
-
* @memberOf MapCache
|
|
1024
|
-
* @param {string} key The key of the value to get.
|
|
1025
|
-
* @returns {*} Returns the entry value.
|
|
1026
|
-
*/
|
|
1027
|
-
function mapCacheGet(key) {
|
|
1028
|
-
return _getMapData(this, key).get(key);
|
|
1029
|
-
}
|
|
1030
|
-
|
|
1031
|
-
var _mapCacheGet = mapCacheGet;
|
|
1032
|
-
|
|
1033
|
-
/**
|
|
1034
|
-
* Checks if a map value for `key` exists.
|
|
1035
|
-
*
|
|
1036
|
-
* @private
|
|
1037
|
-
* @name has
|
|
1038
|
-
* @memberOf MapCache
|
|
1039
|
-
* @param {string} key The key of the entry to check.
|
|
1040
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1041
|
-
*/
|
|
1042
|
-
function mapCacheHas(key) {
|
|
1043
|
-
return _getMapData(this, key).has(key);
|
|
1044
|
-
}
|
|
1045
|
-
|
|
1046
|
-
var _mapCacheHas = mapCacheHas;
|
|
1047
|
-
|
|
1048
|
-
/**
|
|
1049
|
-
* Sets the map `key` to `value`.
|
|
1050
|
-
*
|
|
1051
|
-
* @private
|
|
1052
|
-
* @name set
|
|
1053
|
-
* @memberOf MapCache
|
|
1054
|
-
* @param {string} key The key of the value to set.
|
|
1055
|
-
* @param {*} value The value to set.
|
|
1056
|
-
* @returns {Object} Returns the map cache instance.
|
|
1057
|
-
*/
|
|
1058
|
-
function mapCacheSet(key, value) {
|
|
1059
|
-
var data = _getMapData(this, key),
|
|
1060
|
-
size = data.size;
|
|
1061
|
-
|
|
1062
|
-
data.set(key, value);
|
|
1063
|
-
this.size += data.size == size ? 0 : 1;
|
|
1064
|
-
return this;
|
|
1065
|
-
}
|
|
1066
|
-
|
|
1067
|
-
var _mapCacheSet = mapCacheSet;
|
|
1068
|
-
|
|
1069
|
-
/**
|
|
1070
|
-
* Creates a map cache object to store key-value pairs.
|
|
1071
|
-
*
|
|
1072
|
-
* @private
|
|
1073
|
-
* @constructor
|
|
1074
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
1075
|
-
*/
|
|
1076
|
-
function MapCache(entries) {
|
|
1077
|
-
var index = -1,
|
|
1078
|
-
length = entries == null ? 0 : entries.length;
|
|
1079
|
-
|
|
1080
|
-
this.clear();
|
|
1081
|
-
while (++index < length) {
|
|
1082
|
-
var entry = entries[index];
|
|
1083
|
-
this.set(entry[0], entry[1]);
|
|
1084
|
-
}
|
|
1085
|
-
}
|
|
1086
|
-
|
|
1087
|
-
// Add methods to `MapCache`.
|
|
1088
|
-
MapCache.prototype.clear = _mapCacheClear;
|
|
1089
|
-
MapCache.prototype['delete'] = _mapCacheDelete;
|
|
1090
|
-
MapCache.prototype.get = _mapCacheGet;
|
|
1091
|
-
MapCache.prototype.has = _mapCacheHas;
|
|
1092
|
-
MapCache.prototype.set = _mapCacheSet;
|
|
1093
|
-
|
|
1094
|
-
var _MapCache = MapCache;
|
|
1095
|
-
|
|
1096
|
-
/** Error message constants. */
|
|
1097
|
-
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
1098
|
-
|
|
1099
|
-
/**
|
|
1100
|
-
* Creates a function that memoizes the result of `func`. If `resolver` is
|
|
1101
|
-
* provided, it determines the cache key for storing the result based on the
|
|
1102
|
-
* arguments provided to the memoized function. By default, the first argument
|
|
1103
|
-
* provided to the memoized function is used as the map cache key. The `func`
|
|
1104
|
-
* is invoked with the `this` binding of the memoized function.
|
|
1105
|
-
*
|
|
1106
|
-
* **Note:** The cache is exposed as the `cache` property on the memoized
|
|
1107
|
-
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
|
1108
|
-
* constructor with one whose instances implement the
|
|
1109
|
-
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
|
1110
|
-
* method interface of `clear`, `delete`, `get`, `has`, and `set`.
|
|
1111
|
-
*
|
|
1112
|
-
* @static
|
|
1113
|
-
* @memberOf _
|
|
1114
|
-
* @since 0.1.0
|
|
1115
|
-
* @category Function
|
|
1116
|
-
* @param {Function} func The function to have its output memoized.
|
|
1117
|
-
* @param {Function} [resolver] The function to resolve the cache key.
|
|
1118
|
-
* @returns {Function} Returns the new memoized function.
|
|
1119
|
-
* @example
|
|
1120
|
-
*
|
|
1121
|
-
* var object = { 'a': 1, 'b': 2 };
|
|
1122
|
-
* var other = { 'c': 3, 'd': 4 };
|
|
1123
|
-
*
|
|
1124
|
-
* var values = _.memoize(_.values);
|
|
1125
|
-
* values(object);
|
|
1126
|
-
* // => [1, 2]
|
|
1127
|
-
*
|
|
1128
|
-
* values(other);
|
|
1129
|
-
* // => [3, 4]
|
|
1130
|
-
*
|
|
1131
|
-
* object.a = 2;
|
|
1132
|
-
* values(object);
|
|
1133
|
-
* // => [1, 2]
|
|
1134
|
-
*
|
|
1135
|
-
* // Modify the result cache.
|
|
1136
|
-
* values.cache.set(object, ['a', 'b']);
|
|
1137
|
-
* values(object);
|
|
1138
|
-
* // => ['a', 'b']
|
|
1139
|
-
*
|
|
1140
|
-
* // Replace `_.memoize.Cache`.
|
|
1141
|
-
* _.memoize.Cache = WeakMap;
|
|
1142
|
-
*/
|
|
1143
|
-
function memoize(func, resolver) {
|
|
1144
|
-
if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
|
|
1145
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
1146
|
-
}
|
|
1147
|
-
var memoized = function() {
|
|
1148
|
-
var args = arguments,
|
|
1149
|
-
key = resolver ? resolver.apply(this, args) : args[0],
|
|
1150
|
-
cache = memoized.cache;
|
|
1151
|
-
|
|
1152
|
-
if (cache.has(key)) {
|
|
1153
|
-
return cache.get(key);
|
|
1154
|
-
}
|
|
1155
|
-
var result = func.apply(this, args);
|
|
1156
|
-
memoized.cache = cache.set(key, result) || cache;
|
|
1157
|
-
return result;
|
|
1158
|
-
};
|
|
1159
|
-
memoized.cache = new (memoize.Cache || _MapCache);
|
|
1160
|
-
return memoized;
|
|
1161
|
-
}
|
|
1162
|
-
|
|
1163
|
-
// Expose `MapCache`.
|
|
1164
|
-
memoize.Cache = _MapCache;
|
|
1165
|
-
|
|
1166
|
-
var memoize_1 = memoize;
|
|
1167
|
-
|
|
1168
|
-
/** Used as the maximum memoize cache size. */
|
|
1169
|
-
var MAX_MEMOIZE_SIZE = 500;
|
|
1170
|
-
|
|
1171
|
-
/**
|
|
1172
|
-
* A specialized version of `_.memoize` which clears the memoized function's
|
|
1173
|
-
* cache when it exceeds `MAX_MEMOIZE_SIZE`.
|
|
1174
|
-
*
|
|
1175
|
-
* @private
|
|
1176
|
-
* @param {Function} func The function to have its output memoized.
|
|
1177
|
-
* @returns {Function} Returns the new memoized function.
|
|
1178
|
-
*/
|
|
1179
|
-
function memoizeCapped(func) {
|
|
1180
|
-
var result = memoize_1(func, function(key) {
|
|
1181
|
-
if (cache.size === MAX_MEMOIZE_SIZE) {
|
|
1182
|
-
cache.clear();
|
|
1183
|
-
}
|
|
1184
|
-
return key;
|
|
1185
|
-
});
|
|
1186
|
-
|
|
1187
|
-
var cache = result.cache;
|
|
1188
|
-
return result;
|
|
1189
|
-
}
|
|
1190
|
-
|
|
1191
|
-
var _memoizeCapped = memoizeCapped;
|
|
1192
|
-
|
|
1193
|
-
/** Used to match property names within property paths. */
|
|
1194
|
-
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
1195
|
-
|
|
1196
|
-
/** Used to match backslashes in property paths. */
|
|
1197
|
-
var reEscapeChar = /\\(\\)?/g;
|
|
1198
|
-
|
|
1199
|
-
/**
|
|
1200
|
-
* Converts `string` to a property path array.
|
|
1201
|
-
*
|
|
1202
|
-
* @private
|
|
1203
|
-
* @param {string} string The string to convert.
|
|
1204
|
-
* @returns {Array} Returns the property path array.
|
|
1205
|
-
*/
|
|
1206
|
-
var stringToPath = _memoizeCapped(function(string) {
|
|
1207
|
-
var result = [];
|
|
1208
|
-
if (string.charCodeAt(0) === 46 /* . */) {
|
|
1209
|
-
result.push('');
|
|
1210
|
-
}
|
|
1211
|
-
string.replace(rePropName, function(match, number, quote, subString) {
|
|
1212
|
-
result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
|
|
1213
|
-
});
|
|
1214
|
-
return result;
|
|
1215
|
-
});
|
|
1216
|
-
|
|
1217
|
-
var _stringToPath = stringToPath;
|
|
1218
|
-
|
|
1219
|
-
/**
|
|
1220
|
-
* A specialized version of `_.map` for arrays without support for iteratee
|
|
1221
|
-
* shorthands.
|
|
1222
|
-
*
|
|
1223
|
-
* @private
|
|
1224
|
-
* @param {Array} [array] The array to iterate over.
|
|
1225
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
1226
|
-
* @returns {Array} Returns the new mapped array.
|
|
1227
|
-
*/
|
|
1228
|
-
function arrayMap(array, iteratee) {
|
|
1229
|
-
var index = -1,
|
|
1230
|
-
length = array == null ? 0 : array.length,
|
|
1231
|
-
result = Array(length);
|
|
1232
|
-
|
|
1233
|
-
while (++index < length) {
|
|
1234
|
-
result[index] = iteratee(array[index], index, array);
|
|
1235
|
-
}
|
|
1236
|
-
return result;
|
|
1237
|
-
}
|
|
1238
|
-
|
|
1239
|
-
var _arrayMap = arrayMap;
|
|
1240
|
-
|
|
1241
|
-
/** Used as references for various `Number` constants. */
|
|
1242
|
-
var INFINITY$1 = 1 / 0;
|
|
1243
|
-
|
|
1244
|
-
/** Used to convert symbols to primitives and strings. */
|
|
1245
|
-
var symbolProto = _Symbol ? _Symbol.prototype : undefined,
|
|
1246
|
-
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|
1247
|
-
|
|
1248
|
-
/**
|
|
1249
|
-
* The base implementation of `_.toString` which doesn't convert nullish
|
|
1250
|
-
* values to empty strings.
|
|
1251
|
-
*
|
|
1252
|
-
* @private
|
|
1253
|
-
* @param {*} value The value to process.
|
|
1254
|
-
* @returns {string} Returns the string.
|
|
1255
|
-
*/
|
|
1256
|
-
function baseToString(value) {
|
|
1257
|
-
// Exit early for strings to avoid a performance hit in some environments.
|
|
1258
|
-
if (typeof value == 'string') {
|
|
1259
|
-
return value;
|
|
1260
|
-
}
|
|
1261
|
-
if (isArray_1(value)) {
|
|
1262
|
-
// Recursively convert values (susceptible to call stack limits).
|
|
1263
|
-
return _arrayMap(value, baseToString) + '';
|
|
1264
|
-
}
|
|
1265
|
-
if (isSymbol_1(value)) {
|
|
1266
|
-
return symbolToString ? symbolToString.call(value) : '';
|
|
1267
|
-
}
|
|
1268
|
-
var result = (value + '');
|
|
1269
|
-
return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
|
|
1270
|
-
}
|
|
1271
|
-
|
|
1272
|
-
var _baseToString = baseToString;
|
|
1273
|
-
|
|
1274
|
-
/**
|
|
1275
|
-
* Converts `value` to a string. An empty string is returned for `null`
|
|
1276
|
-
* and `undefined` values. The sign of `-0` is preserved.
|
|
1277
|
-
*
|
|
1278
|
-
* @static
|
|
1279
|
-
* @memberOf _
|
|
1280
|
-
* @since 4.0.0
|
|
1281
|
-
* @category Lang
|
|
1282
|
-
* @param {*} value The value to convert.
|
|
1283
|
-
* @returns {string} Returns the converted string.
|
|
1284
|
-
* @example
|
|
1285
|
-
*
|
|
1286
|
-
* _.toString(null);
|
|
1287
|
-
* // => ''
|
|
1288
|
-
*
|
|
1289
|
-
* _.toString(-0);
|
|
1290
|
-
* // => '-0'
|
|
1291
|
-
*
|
|
1292
|
-
* _.toString([1, 2, 3]);
|
|
1293
|
-
* // => '1,2,3'
|
|
1294
|
-
*/
|
|
1295
|
-
function toString(value) {
|
|
1296
|
-
return value == null ? '' : _baseToString(value);
|
|
1297
|
-
}
|
|
1298
|
-
|
|
1299
|
-
var toString_1 = toString;
|
|
1300
|
-
|
|
1301
|
-
/**
|
|
1302
|
-
* Casts `value` to a path array if it's not one.
|
|
1303
|
-
*
|
|
1304
|
-
* @private
|
|
1305
|
-
* @param {*} value The value to inspect.
|
|
1306
|
-
* @param {Object} [object] The object to query keys on.
|
|
1307
|
-
* @returns {Array} Returns the cast property path array.
|
|
1308
|
-
*/
|
|
1309
|
-
function castPath(value, object) {
|
|
1310
|
-
if (isArray_1(value)) {
|
|
1311
|
-
return value;
|
|
1312
|
-
}
|
|
1313
|
-
return _isKey(value, object) ? [value] : _stringToPath(toString_1(value));
|
|
1314
|
-
}
|
|
1315
|
-
|
|
1316
|
-
var _castPath = castPath;
|
|
1317
|
-
|
|
1318
|
-
/** Used as references for various `Number` constants. */
|
|
1319
|
-
var INFINITY = 1 / 0;
|
|
1320
|
-
|
|
1321
|
-
/**
|
|
1322
|
-
* Converts `value` to a string key if it's not a string or symbol.
|
|
1323
|
-
*
|
|
1324
|
-
* @private
|
|
1325
|
-
* @param {*} value The value to inspect.
|
|
1326
|
-
* @returns {string|symbol} Returns the key.
|
|
1327
|
-
*/
|
|
1328
|
-
function toKey(value) {
|
|
1329
|
-
if (typeof value == 'string' || isSymbol_1(value)) {
|
|
1330
|
-
return value;
|
|
1331
|
-
}
|
|
1332
|
-
var result = (value + '');
|
|
1333
|
-
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
|
1334
|
-
}
|
|
1335
|
-
|
|
1336
|
-
var _toKey = toKey;
|
|
1337
|
-
|
|
1338
|
-
/**
|
|
1339
|
-
* The base implementation of `_.get` without support for default values.
|
|
1340
|
-
*
|
|
1341
|
-
* @private
|
|
1342
|
-
* @param {Object} object The object to query.
|
|
1343
|
-
* @param {Array|string} path The path of the property to get.
|
|
1344
|
-
* @returns {*} Returns the resolved value.
|
|
1345
|
-
*/
|
|
1346
|
-
function baseGet(object, path) {
|
|
1347
|
-
path = _castPath(path, object);
|
|
1348
|
-
|
|
1349
|
-
var index = 0,
|
|
1350
|
-
length = path.length;
|
|
1351
|
-
|
|
1352
|
-
while (object != null && index < length) {
|
|
1353
|
-
object = object[_toKey(path[index++])];
|
|
1354
|
-
}
|
|
1355
|
-
return (index && index == length) ? object : undefined;
|
|
1356
|
-
}
|
|
1357
|
-
|
|
1358
|
-
var _baseGet = baseGet;
|
|
1359
|
-
|
|
1360
|
-
/**
|
|
1361
|
-
* Gets the value at `path` of `object`. If the resolved value is
|
|
1362
|
-
* `undefined`, the `defaultValue` is returned in its place.
|
|
1363
|
-
*
|
|
1364
|
-
* @static
|
|
1365
|
-
* @memberOf _
|
|
1366
|
-
* @since 3.7.0
|
|
1367
|
-
* @category Object
|
|
1368
|
-
* @param {Object} object The object to query.
|
|
1369
|
-
* @param {Array|string} path The path of the property to get.
|
|
1370
|
-
* @param {*} [defaultValue] The value returned for `undefined` resolved values.
|
|
1371
|
-
* @returns {*} Returns the resolved value.
|
|
1372
|
-
* @example
|
|
1373
|
-
*
|
|
1374
|
-
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
|
|
1375
|
-
*
|
|
1376
|
-
* _.get(object, 'a[0].b.c');
|
|
1377
|
-
* // => 3
|
|
1378
|
-
*
|
|
1379
|
-
* _.get(object, ['a', '0', 'b', 'c']);
|
|
1380
|
-
* // => 3
|
|
1381
|
-
*
|
|
1382
|
-
* _.get(object, 'a.b.c', 'default');
|
|
1383
|
-
* // => 'default'
|
|
1384
|
-
*/
|
|
1385
|
-
function get(object, path, defaultValue) {
|
|
1386
|
-
var result = object == null ? undefined : _baseGet(object, path);
|
|
1387
|
-
return result === undefined ? defaultValue : result;
|
|
1388
|
-
}
|
|
1389
|
-
|
|
1390
|
-
var get_1 = get;
|
|
1391
|
-
|
|
1392
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
1393
|
-
if (source == null) return {};
|
|
1394
|
-
var target = {};
|
|
1395
|
-
var sourceKeys = Object.keys(source);
|
|
1396
|
-
var key, i;
|
|
1397
|
-
|
|
1398
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
1399
|
-
key = sourceKeys[i];
|
|
1400
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
1401
|
-
target[key] = source[key];
|
|
1402
|
-
}
|
|
1403
|
-
|
|
1404
|
-
return target;
|
|
1405
|
-
}
|
|
1406
|
-
|
|
1407
|
-
function _objectWithoutProperties(source, excluded) {
|
|
1408
|
-
if (source == null) return {};
|
|
1409
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
1410
|
-
var key, i;
|
|
1411
|
-
|
|
1412
|
-
if (Object.getOwnPropertySymbols) {
|
|
1413
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
1414
|
-
|
|
1415
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
1416
|
-
key = sourceSymbolKeys[i];
|
|
1417
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
1418
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
1419
|
-
target[key] = source[key];
|
|
1420
|
-
}
|
|
1421
|
-
}
|
|
1422
|
-
|
|
1423
|
-
return target;
|
|
1424
|
-
}
|
|
46
|
+
var _typeof__default = /*#__PURE__*/_interopDefaultLegacy(_typeof);
|
|
47
|
+
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
|
|
48
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
1425
49
|
|
|
1426
50
|
var _excluded$e = ["element", "render"];
|
|
1427
51
|
var withElementWrapper = function withElementWrapper(StoryElement) {
|
|
1428
52
|
return function (props) {
|
|
1429
53
|
var element = props.element,
|
|
1430
54
|
render = props.render,
|
|
1431
|
-
restProps =
|
|
55
|
+
restProps = _objectWithoutProperties__default["default"](props, _excluded$e);
|
|
1432
56
|
|
|
1433
57
|
if (!element) return null;
|
|
1434
58
|
if (render && typeof render === "function") return render(props);
|
|
1435
|
-
return /*#__PURE__*/React__default["default"].createElement(StoryElement,
|
|
59
|
+
return /*#__PURE__*/React__default["default"].createElement(StoryElement, _extends__default["default"]({}, restProps, {
|
|
1436
60
|
element: element
|
|
1437
61
|
}));
|
|
1438
62
|
};
|
|
@@ -1441,1081 +65,6 @@ withElementWrapper.propTypes = {
|
|
|
1441
65
|
StoryElement: PropTypes__default["default"].element
|
|
1442
66
|
};
|
|
1443
67
|
|
|
1444
|
-
function _typeof(obj) {
|
|
1445
|
-
"@babel/helpers - typeof";
|
|
1446
|
-
|
|
1447
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
1448
|
-
return typeof obj;
|
|
1449
|
-
} : function (obj) {
|
|
1450
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
1451
|
-
}, _typeof(obj);
|
|
1452
|
-
}
|
|
1453
|
-
|
|
1454
|
-
/**
|
|
1455
|
-
* Copyright (c) 2014-present, Facebook, Inc.
|
|
1456
|
-
*
|
|
1457
|
-
* This source code is licensed under the MIT license found in the
|
|
1458
|
-
* LICENSE file in the root directory of this source tree.
|
|
1459
|
-
*/
|
|
1460
|
-
|
|
1461
|
-
createCommonjsModule(function (module) {
|
|
1462
|
-
var runtime = (function (exports) {
|
|
1463
|
-
|
|
1464
|
-
var Op = Object.prototype;
|
|
1465
|
-
var hasOwn = Op.hasOwnProperty;
|
|
1466
|
-
var undefined$1; // More compressible than void 0.
|
|
1467
|
-
var $Symbol = typeof Symbol === "function" ? Symbol : {};
|
|
1468
|
-
var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
|
1469
|
-
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
|
1470
|
-
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
1471
|
-
|
|
1472
|
-
function define(obj, key, value) {
|
|
1473
|
-
Object.defineProperty(obj, key, {
|
|
1474
|
-
value: value,
|
|
1475
|
-
enumerable: true,
|
|
1476
|
-
configurable: true,
|
|
1477
|
-
writable: true
|
|
1478
|
-
});
|
|
1479
|
-
return obj[key];
|
|
1480
|
-
}
|
|
1481
|
-
try {
|
|
1482
|
-
// IE 8 has a broken Object.defineProperty that only works on DOM objects.
|
|
1483
|
-
define({}, "");
|
|
1484
|
-
} catch (err) {
|
|
1485
|
-
define = function(obj, key, value) {
|
|
1486
|
-
return obj[key] = value;
|
|
1487
|
-
};
|
|
1488
|
-
}
|
|
1489
|
-
|
|
1490
|
-
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
1491
|
-
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
|
|
1492
|
-
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
|
|
1493
|
-
var generator = Object.create(protoGenerator.prototype);
|
|
1494
|
-
var context = new Context(tryLocsList || []);
|
|
1495
|
-
|
|
1496
|
-
// The ._invoke method unifies the implementations of the .next,
|
|
1497
|
-
// .throw, and .return methods.
|
|
1498
|
-
generator._invoke = makeInvokeMethod(innerFn, self, context);
|
|
1499
|
-
|
|
1500
|
-
return generator;
|
|
1501
|
-
}
|
|
1502
|
-
exports.wrap = wrap;
|
|
1503
|
-
|
|
1504
|
-
// Try/catch helper to minimize deoptimizations. Returns a completion
|
|
1505
|
-
// record like context.tryEntries[i].completion. This interface could
|
|
1506
|
-
// have been (and was previously) designed to take a closure to be
|
|
1507
|
-
// invoked without arguments, but in all the cases we care about we
|
|
1508
|
-
// already have an existing method we want to call, so there's no need
|
|
1509
|
-
// to create a new function object. We can even get away with assuming
|
|
1510
|
-
// the method takes exactly one argument, since that happens to be true
|
|
1511
|
-
// in every case, so we don't have to touch the arguments object. The
|
|
1512
|
-
// only additional allocation required is the completion record, which
|
|
1513
|
-
// has a stable shape and so hopefully should be cheap to allocate.
|
|
1514
|
-
function tryCatch(fn, obj, arg) {
|
|
1515
|
-
try {
|
|
1516
|
-
return { type: "normal", arg: fn.call(obj, arg) };
|
|
1517
|
-
} catch (err) {
|
|
1518
|
-
return { type: "throw", arg: err };
|
|
1519
|
-
}
|
|
1520
|
-
}
|
|
1521
|
-
|
|
1522
|
-
var GenStateSuspendedStart = "suspendedStart";
|
|
1523
|
-
var GenStateSuspendedYield = "suspendedYield";
|
|
1524
|
-
var GenStateExecuting = "executing";
|
|
1525
|
-
var GenStateCompleted = "completed";
|
|
1526
|
-
|
|
1527
|
-
// Returning this object from the innerFn has the same effect as
|
|
1528
|
-
// breaking out of the dispatch switch statement.
|
|
1529
|
-
var ContinueSentinel = {};
|
|
1530
|
-
|
|
1531
|
-
// Dummy constructor functions that we use as the .constructor and
|
|
1532
|
-
// .constructor.prototype properties for functions that return Generator
|
|
1533
|
-
// objects. For full spec compliance, you may wish to configure your
|
|
1534
|
-
// minifier not to mangle the names of these two functions.
|
|
1535
|
-
function Generator() {}
|
|
1536
|
-
function GeneratorFunction() {}
|
|
1537
|
-
function GeneratorFunctionPrototype() {}
|
|
1538
|
-
|
|
1539
|
-
// This is a polyfill for %IteratorPrototype% for environments that
|
|
1540
|
-
// don't natively support it.
|
|
1541
|
-
var IteratorPrototype = {};
|
|
1542
|
-
define(IteratorPrototype, iteratorSymbol, function () {
|
|
1543
|
-
return this;
|
|
1544
|
-
});
|
|
1545
|
-
|
|
1546
|
-
var getProto = Object.getPrototypeOf;
|
|
1547
|
-
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
1548
|
-
if (NativeIteratorPrototype &&
|
|
1549
|
-
NativeIteratorPrototype !== Op &&
|
|
1550
|
-
hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
|
|
1551
|
-
// This environment has a native %IteratorPrototype%; use it instead
|
|
1552
|
-
// of the polyfill.
|
|
1553
|
-
IteratorPrototype = NativeIteratorPrototype;
|
|
1554
|
-
}
|
|
1555
|
-
|
|
1556
|
-
var Gp = GeneratorFunctionPrototype.prototype =
|
|
1557
|
-
Generator.prototype = Object.create(IteratorPrototype);
|
|
1558
|
-
GeneratorFunction.prototype = GeneratorFunctionPrototype;
|
|
1559
|
-
define(Gp, "constructor", GeneratorFunctionPrototype);
|
|
1560
|
-
define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
|
|
1561
|
-
GeneratorFunction.displayName = define(
|
|
1562
|
-
GeneratorFunctionPrototype,
|
|
1563
|
-
toStringTagSymbol,
|
|
1564
|
-
"GeneratorFunction"
|
|
1565
|
-
);
|
|
1566
|
-
|
|
1567
|
-
// Helper for defining the .next, .throw, and .return methods of the
|
|
1568
|
-
// Iterator interface in terms of a single ._invoke method.
|
|
1569
|
-
function defineIteratorMethods(prototype) {
|
|
1570
|
-
["next", "throw", "return"].forEach(function(method) {
|
|
1571
|
-
define(prototype, method, function(arg) {
|
|
1572
|
-
return this._invoke(method, arg);
|
|
1573
|
-
});
|
|
1574
|
-
});
|
|
1575
|
-
}
|
|
1576
|
-
|
|
1577
|
-
exports.isGeneratorFunction = function(genFun) {
|
|
1578
|
-
var ctor = typeof genFun === "function" && genFun.constructor;
|
|
1579
|
-
return ctor
|
|
1580
|
-
? ctor === GeneratorFunction ||
|
|
1581
|
-
// For the native GeneratorFunction constructor, the best we can
|
|
1582
|
-
// do is to check its .name property.
|
|
1583
|
-
(ctor.displayName || ctor.name) === "GeneratorFunction"
|
|
1584
|
-
: false;
|
|
1585
|
-
};
|
|
1586
|
-
|
|
1587
|
-
exports.mark = function(genFun) {
|
|
1588
|
-
if (Object.setPrototypeOf) {
|
|
1589
|
-
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
|
|
1590
|
-
} else {
|
|
1591
|
-
genFun.__proto__ = GeneratorFunctionPrototype;
|
|
1592
|
-
define(genFun, toStringTagSymbol, "GeneratorFunction");
|
|
1593
|
-
}
|
|
1594
|
-
genFun.prototype = Object.create(Gp);
|
|
1595
|
-
return genFun;
|
|
1596
|
-
};
|
|
1597
|
-
|
|
1598
|
-
// Within the body of any async function, `await x` is transformed to
|
|
1599
|
-
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
|
|
1600
|
-
// `hasOwn.call(value, "__await")` to determine if the yielded value is
|
|
1601
|
-
// meant to be awaited.
|
|
1602
|
-
exports.awrap = function(arg) {
|
|
1603
|
-
return { __await: arg };
|
|
1604
|
-
};
|
|
1605
|
-
|
|
1606
|
-
function AsyncIterator(generator, PromiseImpl) {
|
|
1607
|
-
function invoke(method, arg, resolve, reject) {
|
|
1608
|
-
var record = tryCatch(generator[method], generator, arg);
|
|
1609
|
-
if (record.type === "throw") {
|
|
1610
|
-
reject(record.arg);
|
|
1611
|
-
} else {
|
|
1612
|
-
var result = record.arg;
|
|
1613
|
-
var value = result.value;
|
|
1614
|
-
if (value &&
|
|
1615
|
-
typeof value === "object" &&
|
|
1616
|
-
hasOwn.call(value, "__await")) {
|
|
1617
|
-
return PromiseImpl.resolve(value.__await).then(function(value) {
|
|
1618
|
-
invoke("next", value, resolve, reject);
|
|
1619
|
-
}, function(err) {
|
|
1620
|
-
invoke("throw", err, resolve, reject);
|
|
1621
|
-
});
|
|
1622
|
-
}
|
|
1623
|
-
|
|
1624
|
-
return PromiseImpl.resolve(value).then(function(unwrapped) {
|
|
1625
|
-
// When a yielded Promise is resolved, its final value becomes
|
|
1626
|
-
// the .value of the Promise<{value,done}> result for the
|
|
1627
|
-
// current iteration.
|
|
1628
|
-
result.value = unwrapped;
|
|
1629
|
-
resolve(result);
|
|
1630
|
-
}, function(error) {
|
|
1631
|
-
// If a rejected Promise was yielded, throw the rejection back
|
|
1632
|
-
// into the async generator function so it can be handled there.
|
|
1633
|
-
return invoke("throw", error, resolve, reject);
|
|
1634
|
-
});
|
|
1635
|
-
}
|
|
1636
|
-
}
|
|
1637
|
-
|
|
1638
|
-
var previousPromise;
|
|
1639
|
-
|
|
1640
|
-
function enqueue(method, arg) {
|
|
1641
|
-
function callInvokeWithMethodAndArg() {
|
|
1642
|
-
return new PromiseImpl(function(resolve, reject) {
|
|
1643
|
-
invoke(method, arg, resolve, reject);
|
|
1644
|
-
});
|
|
1645
|
-
}
|
|
1646
|
-
|
|
1647
|
-
return previousPromise =
|
|
1648
|
-
// If enqueue has been called before, then we want to wait until
|
|
1649
|
-
// all previous Promises have been resolved before calling invoke,
|
|
1650
|
-
// so that results are always delivered in the correct order. If
|
|
1651
|
-
// enqueue has not been called before, then it is important to
|
|
1652
|
-
// call invoke immediately, without waiting on a callback to fire,
|
|
1653
|
-
// so that the async generator function has the opportunity to do
|
|
1654
|
-
// any necessary setup in a predictable way. This predictability
|
|
1655
|
-
// is why the Promise constructor synchronously invokes its
|
|
1656
|
-
// executor callback, and why async functions synchronously
|
|
1657
|
-
// execute code before the first await. Since we implement simple
|
|
1658
|
-
// async functions in terms of async generators, it is especially
|
|
1659
|
-
// important to get this right, even though it requires care.
|
|
1660
|
-
previousPromise ? previousPromise.then(
|
|
1661
|
-
callInvokeWithMethodAndArg,
|
|
1662
|
-
// Avoid propagating failures to Promises returned by later
|
|
1663
|
-
// invocations of the iterator.
|
|
1664
|
-
callInvokeWithMethodAndArg
|
|
1665
|
-
) : callInvokeWithMethodAndArg();
|
|
1666
|
-
}
|
|
1667
|
-
|
|
1668
|
-
// Define the unified helper method that is used to implement .next,
|
|
1669
|
-
// .throw, and .return (see defineIteratorMethods).
|
|
1670
|
-
this._invoke = enqueue;
|
|
1671
|
-
}
|
|
1672
|
-
|
|
1673
|
-
defineIteratorMethods(AsyncIterator.prototype);
|
|
1674
|
-
define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
1675
|
-
return this;
|
|
1676
|
-
});
|
|
1677
|
-
exports.AsyncIterator = AsyncIterator;
|
|
1678
|
-
|
|
1679
|
-
// Note that simple async functions are implemented on top of
|
|
1680
|
-
// AsyncIterator objects; they just return a Promise for the value of
|
|
1681
|
-
// the final result produced by the iterator.
|
|
1682
|
-
exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
1683
|
-
if (PromiseImpl === void 0) PromiseImpl = Promise;
|
|
1684
|
-
|
|
1685
|
-
var iter = new AsyncIterator(
|
|
1686
|
-
wrap(innerFn, outerFn, self, tryLocsList),
|
|
1687
|
-
PromiseImpl
|
|
1688
|
-
);
|
|
1689
|
-
|
|
1690
|
-
return exports.isGeneratorFunction(outerFn)
|
|
1691
|
-
? iter // If outerFn is a generator, return the full iterator.
|
|
1692
|
-
: iter.next().then(function(result) {
|
|
1693
|
-
return result.done ? result.value : iter.next();
|
|
1694
|
-
});
|
|
1695
|
-
};
|
|
1696
|
-
|
|
1697
|
-
function makeInvokeMethod(innerFn, self, context) {
|
|
1698
|
-
var state = GenStateSuspendedStart;
|
|
1699
|
-
|
|
1700
|
-
return function invoke(method, arg) {
|
|
1701
|
-
if (state === GenStateExecuting) {
|
|
1702
|
-
throw new Error("Generator is already running");
|
|
1703
|
-
}
|
|
1704
|
-
|
|
1705
|
-
if (state === GenStateCompleted) {
|
|
1706
|
-
if (method === "throw") {
|
|
1707
|
-
throw arg;
|
|
1708
|
-
}
|
|
1709
|
-
|
|
1710
|
-
// Be forgiving, per 25.3.3.3.3 of the spec:
|
|
1711
|
-
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
|
|
1712
|
-
return doneResult();
|
|
1713
|
-
}
|
|
1714
|
-
|
|
1715
|
-
context.method = method;
|
|
1716
|
-
context.arg = arg;
|
|
1717
|
-
|
|
1718
|
-
while (true) {
|
|
1719
|
-
var delegate = context.delegate;
|
|
1720
|
-
if (delegate) {
|
|
1721
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
1722
|
-
if (delegateResult) {
|
|
1723
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
1724
|
-
return delegateResult;
|
|
1725
|
-
}
|
|
1726
|
-
}
|
|
1727
|
-
|
|
1728
|
-
if (context.method === "next") {
|
|
1729
|
-
// Setting context._sent for legacy support of Babel's
|
|
1730
|
-
// function.sent implementation.
|
|
1731
|
-
context.sent = context._sent = context.arg;
|
|
1732
|
-
|
|
1733
|
-
} else if (context.method === "throw") {
|
|
1734
|
-
if (state === GenStateSuspendedStart) {
|
|
1735
|
-
state = GenStateCompleted;
|
|
1736
|
-
throw context.arg;
|
|
1737
|
-
}
|
|
1738
|
-
|
|
1739
|
-
context.dispatchException(context.arg);
|
|
1740
|
-
|
|
1741
|
-
} else if (context.method === "return") {
|
|
1742
|
-
context.abrupt("return", context.arg);
|
|
1743
|
-
}
|
|
1744
|
-
|
|
1745
|
-
state = GenStateExecuting;
|
|
1746
|
-
|
|
1747
|
-
var record = tryCatch(innerFn, self, context);
|
|
1748
|
-
if (record.type === "normal") {
|
|
1749
|
-
// If an exception is thrown from innerFn, we leave state ===
|
|
1750
|
-
// GenStateExecuting and loop back for another invocation.
|
|
1751
|
-
state = context.done
|
|
1752
|
-
? GenStateCompleted
|
|
1753
|
-
: GenStateSuspendedYield;
|
|
1754
|
-
|
|
1755
|
-
if (record.arg === ContinueSentinel) {
|
|
1756
|
-
continue;
|
|
1757
|
-
}
|
|
1758
|
-
|
|
1759
|
-
return {
|
|
1760
|
-
value: record.arg,
|
|
1761
|
-
done: context.done
|
|
1762
|
-
};
|
|
1763
|
-
|
|
1764
|
-
} else if (record.type === "throw") {
|
|
1765
|
-
state = GenStateCompleted;
|
|
1766
|
-
// Dispatch the exception by looping back around to the
|
|
1767
|
-
// context.dispatchException(context.arg) call above.
|
|
1768
|
-
context.method = "throw";
|
|
1769
|
-
context.arg = record.arg;
|
|
1770
|
-
}
|
|
1771
|
-
}
|
|
1772
|
-
};
|
|
1773
|
-
}
|
|
1774
|
-
|
|
1775
|
-
// Call delegate.iterator[context.method](context.arg) and handle the
|
|
1776
|
-
// result, either by returning a { value, done } result from the
|
|
1777
|
-
// delegate iterator, or by modifying context.method and context.arg,
|
|
1778
|
-
// setting context.delegate to null, and returning the ContinueSentinel.
|
|
1779
|
-
function maybeInvokeDelegate(delegate, context) {
|
|
1780
|
-
var method = delegate.iterator[context.method];
|
|
1781
|
-
if (method === undefined$1) {
|
|
1782
|
-
// A .throw or .return when the delegate iterator has no .throw
|
|
1783
|
-
// method always terminates the yield* loop.
|
|
1784
|
-
context.delegate = null;
|
|
1785
|
-
|
|
1786
|
-
if (context.method === "throw") {
|
|
1787
|
-
// Note: ["return"] must be used for ES3 parsing compatibility.
|
|
1788
|
-
if (delegate.iterator["return"]) {
|
|
1789
|
-
// If the delegate iterator has a return method, give it a
|
|
1790
|
-
// chance to clean up.
|
|
1791
|
-
context.method = "return";
|
|
1792
|
-
context.arg = undefined$1;
|
|
1793
|
-
maybeInvokeDelegate(delegate, context);
|
|
1794
|
-
|
|
1795
|
-
if (context.method === "throw") {
|
|
1796
|
-
// If maybeInvokeDelegate(context) changed context.method from
|
|
1797
|
-
// "return" to "throw", let that override the TypeError below.
|
|
1798
|
-
return ContinueSentinel;
|
|
1799
|
-
}
|
|
1800
|
-
}
|
|
1801
|
-
|
|
1802
|
-
context.method = "throw";
|
|
1803
|
-
context.arg = new TypeError(
|
|
1804
|
-
"The iterator does not provide a 'throw' method");
|
|
1805
|
-
}
|
|
1806
|
-
|
|
1807
|
-
return ContinueSentinel;
|
|
1808
|
-
}
|
|
1809
|
-
|
|
1810
|
-
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
1811
|
-
|
|
1812
|
-
if (record.type === "throw") {
|
|
1813
|
-
context.method = "throw";
|
|
1814
|
-
context.arg = record.arg;
|
|
1815
|
-
context.delegate = null;
|
|
1816
|
-
return ContinueSentinel;
|
|
1817
|
-
}
|
|
1818
|
-
|
|
1819
|
-
var info = record.arg;
|
|
1820
|
-
|
|
1821
|
-
if (! info) {
|
|
1822
|
-
context.method = "throw";
|
|
1823
|
-
context.arg = new TypeError("iterator result is not an object");
|
|
1824
|
-
context.delegate = null;
|
|
1825
|
-
return ContinueSentinel;
|
|
1826
|
-
}
|
|
1827
|
-
|
|
1828
|
-
if (info.done) {
|
|
1829
|
-
// Assign the result of the finished delegate to the temporary
|
|
1830
|
-
// variable specified by delegate.resultName (see delegateYield).
|
|
1831
|
-
context[delegate.resultName] = info.value;
|
|
1832
|
-
|
|
1833
|
-
// Resume execution at the desired location (see delegateYield).
|
|
1834
|
-
context.next = delegate.nextLoc;
|
|
1835
|
-
|
|
1836
|
-
// If context.method was "throw" but the delegate handled the
|
|
1837
|
-
// exception, let the outer generator proceed normally. If
|
|
1838
|
-
// context.method was "next", forget context.arg since it has been
|
|
1839
|
-
// "consumed" by the delegate iterator. If context.method was
|
|
1840
|
-
// "return", allow the original .return call to continue in the
|
|
1841
|
-
// outer generator.
|
|
1842
|
-
if (context.method !== "return") {
|
|
1843
|
-
context.method = "next";
|
|
1844
|
-
context.arg = undefined$1;
|
|
1845
|
-
}
|
|
1846
|
-
|
|
1847
|
-
} else {
|
|
1848
|
-
// Re-yield the result returned by the delegate method.
|
|
1849
|
-
return info;
|
|
1850
|
-
}
|
|
1851
|
-
|
|
1852
|
-
// The delegate iterator is finished, so forget it and continue with
|
|
1853
|
-
// the outer generator.
|
|
1854
|
-
context.delegate = null;
|
|
1855
|
-
return ContinueSentinel;
|
|
1856
|
-
}
|
|
1857
|
-
|
|
1858
|
-
// Define Generator.prototype.{next,throw,return} in terms of the
|
|
1859
|
-
// unified ._invoke helper method.
|
|
1860
|
-
defineIteratorMethods(Gp);
|
|
1861
|
-
|
|
1862
|
-
define(Gp, toStringTagSymbol, "Generator");
|
|
1863
|
-
|
|
1864
|
-
// A Generator should always return itself as the iterator object when the
|
|
1865
|
-
// @@iterator function is called on it. Some browsers' implementations of the
|
|
1866
|
-
// iterator prototype chain incorrectly implement this, causing the Generator
|
|
1867
|
-
// object to not be returned from this call. This ensures that doesn't happen.
|
|
1868
|
-
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
|
1869
|
-
define(Gp, iteratorSymbol, function() {
|
|
1870
|
-
return this;
|
|
1871
|
-
});
|
|
1872
|
-
|
|
1873
|
-
define(Gp, "toString", function() {
|
|
1874
|
-
return "[object Generator]";
|
|
1875
|
-
});
|
|
1876
|
-
|
|
1877
|
-
function pushTryEntry(locs) {
|
|
1878
|
-
var entry = { tryLoc: locs[0] };
|
|
1879
|
-
|
|
1880
|
-
if (1 in locs) {
|
|
1881
|
-
entry.catchLoc = locs[1];
|
|
1882
|
-
}
|
|
1883
|
-
|
|
1884
|
-
if (2 in locs) {
|
|
1885
|
-
entry.finallyLoc = locs[2];
|
|
1886
|
-
entry.afterLoc = locs[3];
|
|
1887
|
-
}
|
|
1888
|
-
|
|
1889
|
-
this.tryEntries.push(entry);
|
|
1890
|
-
}
|
|
1891
|
-
|
|
1892
|
-
function resetTryEntry(entry) {
|
|
1893
|
-
var record = entry.completion || {};
|
|
1894
|
-
record.type = "normal";
|
|
1895
|
-
delete record.arg;
|
|
1896
|
-
entry.completion = record;
|
|
1897
|
-
}
|
|
1898
|
-
|
|
1899
|
-
function Context(tryLocsList) {
|
|
1900
|
-
// The root entry object (effectively a try statement without a catch
|
|
1901
|
-
// or a finally block) gives us a place to store values thrown from
|
|
1902
|
-
// locations where there is no enclosing try statement.
|
|
1903
|
-
this.tryEntries = [{ tryLoc: "root" }];
|
|
1904
|
-
tryLocsList.forEach(pushTryEntry, this);
|
|
1905
|
-
this.reset(true);
|
|
1906
|
-
}
|
|
1907
|
-
|
|
1908
|
-
exports.keys = function(object) {
|
|
1909
|
-
var keys = [];
|
|
1910
|
-
for (var key in object) {
|
|
1911
|
-
keys.push(key);
|
|
1912
|
-
}
|
|
1913
|
-
keys.reverse();
|
|
1914
|
-
|
|
1915
|
-
// Rather than returning an object with a next method, we keep
|
|
1916
|
-
// things simple and return the next function itself.
|
|
1917
|
-
return function next() {
|
|
1918
|
-
while (keys.length) {
|
|
1919
|
-
var key = keys.pop();
|
|
1920
|
-
if (key in object) {
|
|
1921
|
-
next.value = key;
|
|
1922
|
-
next.done = false;
|
|
1923
|
-
return next;
|
|
1924
|
-
}
|
|
1925
|
-
}
|
|
1926
|
-
|
|
1927
|
-
// To avoid creating an additional object, we just hang the .value
|
|
1928
|
-
// and .done properties off the next function object itself. This
|
|
1929
|
-
// also ensures that the minifier will not anonymize the function.
|
|
1930
|
-
next.done = true;
|
|
1931
|
-
return next;
|
|
1932
|
-
};
|
|
1933
|
-
};
|
|
1934
|
-
|
|
1935
|
-
function values(iterable) {
|
|
1936
|
-
if (iterable) {
|
|
1937
|
-
var iteratorMethod = iterable[iteratorSymbol];
|
|
1938
|
-
if (iteratorMethod) {
|
|
1939
|
-
return iteratorMethod.call(iterable);
|
|
1940
|
-
}
|
|
1941
|
-
|
|
1942
|
-
if (typeof iterable.next === "function") {
|
|
1943
|
-
return iterable;
|
|
1944
|
-
}
|
|
1945
|
-
|
|
1946
|
-
if (!isNaN(iterable.length)) {
|
|
1947
|
-
var i = -1, next = function next() {
|
|
1948
|
-
while (++i < iterable.length) {
|
|
1949
|
-
if (hasOwn.call(iterable, i)) {
|
|
1950
|
-
next.value = iterable[i];
|
|
1951
|
-
next.done = false;
|
|
1952
|
-
return next;
|
|
1953
|
-
}
|
|
1954
|
-
}
|
|
1955
|
-
|
|
1956
|
-
next.value = undefined$1;
|
|
1957
|
-
next.done = true;
|
|
1958
|
-
|
|
1959
|
-
return next;
|
|
1960
|
-
};
|
|
1961
|
-
|
|
1962
|
-
return next.next = next;
|
|
1963
|
-
}
|
|
1964
|
-
}
|
|
1965
|
-
|
|
1966
|
-
// Return an iterator with no values.
|
|
1967
|
-
return { next: doneResult };
|
|
1968
|
-
}
|
|
1969
|
-
exports.values = values;
|
|
1970
|
-
|
|
1971
|
-
function doneResult() {
|
|
1972
|
-
return { value: undefined$1, done: true };
|
|
1973
|
-
}
|
|
1974
|
-
|
|
1975
|
-
Context.prototype = {
|
|
1976
|
-
constructor: Context,
|
|
1977
|
-
|
|
1978
|
-
reset: function(skipTempReset) {
|
|
1979
|
-
this.prev = 0;
|
|
1980
|
-
this.next = 0;
|
|
1981
|
-
// Resetting context._sent for legacy support of Babel's
|
|
1982
|
-
// function.sent implementation.
|
|
1983
|
-
this.sent = this._sent = undefined$1;
|
|
1984
|
-
this.done = false;
|
|
1985
|
-
this.delegate = null;
|
|
1986
|
-
|
|
1987
|
-
this.method = "next";
|
|
1988
|
-
this.arg = undefined$1;
|
|
1989
|
-
|
|
1990
|
-
this.tryEntries.forEach(resetTryEntry);
|
|
1991
|
-
|
|
1992
|
-
if (!skipTempReset) {
|
|
1993
|
-
for (var name in this) {
|
|
1994
|
-
// Not sure about the optimal order of these conditions:
|
|
1995
|
-
if (name.charAt(0) === "t" &&
|
|
1996
|
-
hasOwn.call(this, name) &&
|
|
1997
|
-
!isNaN(+name.slice(1))) {
|
|
1998
|
-
this[name] = undefined$1;
|
|
1999
|
-
}
|
|
2000
|
-
}
|
|
2001
|
-
}
|
|
2002
|
-
},
|
|
2003
|
-
|
|
2004
|
-
stop: function() {
|
|
2005
|
-
this.done = true;
|
|
2006
|
-
|
|
2007
|
-
var rootEntry = this.tryEntries[0];
|
|
2008
|
-
var rootRecord = rootEntry.completion;
|
|
2009
|
-
if (rootRecord.type === "throw") {
|
|
2010
|
-
throw rootRecord.arg;
|
|
2011
|
-
}
|
|
2012
|
-
|
|
2013
|
-
return this.rval;
|
|
2014
|
-
},
|
|
2015
|
-
|
|
2016
|
-
dispatchException: function(exception) {
|
|
2017
|
-
if (this.done) {
|
|
2018
|
-
throw exception;
|
|
2019
|
-
}
|
|
2020
|
-
|
|
2021
|
-
var context = this;
|
|
2022
|
-
function handle(loc, caught) {
|
|
2023
|
-
record.type = "throw";
|
|
2024
|
-
record.arg = exception;
|
|
2025
|
-
context.next = loc;
|
|
2026
|
-
|
|
2027
|
-
if (caught) {
|
|
2028
|
-
// If the dispatched exception was caught by a catch block,
|
|
2029
|
-
// then let that catch block handle the exception normally.
|
|
2030
|
-
context.method = "next";
|
|
2031
|
-
context.arg = undefined$1;
|
|
2032
|
-
}
|
|
2033
|
-
|
|
2034
|
-
return !! caught;
|
|
2035
|
-
}
|
|
2036
|
-
|
|
2037
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
2038
|
-
var entry = this.tryEntries[i];
|
|
2039
|
-
var record = entry.completion;
|
|
2040
|
-
|
|
2041
|
-
if (entry.tryLoc === "root") {
|
|
2042
|
-
// Exception thrown outside of any try block that could handle
|
|
2043
|
-
// it, so set the completion value of the entire function to
|
|
2044
|
-
// throw the exception.
|
|
2045
|
-
return handle("end");
|
|
2046
|
-
}
|
|
2047
|
-
|
|
2048
|
-
if (entry.tryLoc <= this.prev) {
|
|
2049
|
-
var hasCatch = hasOwn.call(entry, "catchLoc");
|
|
2050
|
-
var hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
2051
|
-
|
|
2052
|
-
if (hasCatch && hasFinally) {
|
|
2053
|
-
if (this.prev < entry.catchLoc) {
|
|
2054
|
-
return handle(entry.catchLoc, true);
|
|
2055
|
-
} else if (this.prev < entry.finallyLoc) {
|
|
2056
|
-
return handle(entry.finallyLoc);
|
|
2057
|
-
}
|
|
2058
|
-
|
|
2059
|
-
} else if (hasCatch) {
|
|
2060
|
-
if (this.prev < entry.catchLoc) {
|
|
2061
|
-
return handle(entry.catchLoc, true);
|
|
2062
|
-
}
|
|
2063
|
-
|
|
2064
|
-
} else if (hasFinally) {
|
|
2065
|
-
if (this.prev < entry.finallyLoc) {
|
|
2066
|
-
return handle(entry.finallyLoc);
|
|
2067
|
-
}
|
|
2068
|
-
|
|
2069
|
-
} else {
|
|
2070
|
-
throw new Error("try statement without catch or finally");
|
|
2071
|
-
}
|
|
2072
|
-
}
|
|
2073
|
-
}
|
|
2074
|
-
},
|
|
2075
|
-
|
|
2076
|
-
abrupt: function(type, arg) {
|
|
2077
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
2078
|
-
var entry = this.tryEntries[i];
|
|
2079
|
-
if (entry.tryLoc <= this.prev &&
|
|
2080
|
-
hasOwn.call(entry, "finallyLoc") &&
|
|
2081
|
-
this.prev < entry.finallyLoc) {
|
|
2082
|
-
var finallyEntry = entry;
|
|
2083
|
-
break;
|
|
2084
|
-
}
|
|
2085
|
-
}
|
|
2086
|
-
|
|
2087
|
-
if (finallyEntry &&
|
|
2088
|
-
(type === "break" ||
|
|
2089
|
-
type === "continue") &&
|
|
2090
|
-
finallyEntry.tryLoc <= arg &&
|
|
2091
|
-
arg <= finallyEntry.finallyLoc) {
|
|
2092
|
-
// Ignore the finally entry if control is not jumping to a
|
|
2093
|
-
// location outside the try/catch block.
|
|
2094
|
-
finallyEntry = null;
|
|
2095
|
-
}
|
|
2096
|
-
|
|
2097
|
-
var record = finallyEntry ? finallyEntry.completion : {};
|
|
2098
|
-
record.type = type;
|
|
2099
|
-
record.arg = arg;
|
|
2100
|
-
|
|
2101
|
-
if (finallyEntry) {
|
|
2102
|
-
this.method = "next";
|
|
2103
|
-
this.next = finallyEntry.finallyLoc;
|
|
2104
|
-
return ContinueSentinel;
|
|
2105
|
-
}
|
|
2106
|
-
|
|
2107
|
-
return this.complete(record);
|
|
2108
|
-
},
|
|
2109
|
-
|
|
2110
|
-
complete: function(record, afterLoc) {
|
|
2111
|
-
if (record.type === "throw") {
|
|
2112
|
-
throw record.arg;
|
|
2113
|
-
}
|
|
2114
|
-
|
|
2115
|
-
if (record.type === "break" ||
|
|
2116
|
-
record.type === "continue") {
|
|
2117
|
-
this.next = record.arg;
|
|
2118
|
-
} else if (record.type === "return") {
|
|
2119
|
-
this.rval = this.arg = record.arg;
|
|
2120
|
-
this.method = "return";
|
|
2121
|
-
this.next = "end";
|
|
2122
|
-
} else if (record.type === "normal" && afterLoc) {
|
|
2123
|
-
this.next = afterLoc;
|
|
2124
|
-
}
|
|
2125
|
-
|
|
2126
|
-
return ContinueSentinel;
|
|
2127
|
-
},
|
|
2128
|
-
|
|
2129
|
-
finish: function(finallyLoc) {
|
|
2130
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
2131
|
-
var entry = this.tryEntries[i];
|
|
2132
|
-
if (entry.finallyLoc === finallyLoc) {
|
|
2133
|
-
this.complete(entry.completion, entry.afterLoc);
|
|
2134
|
-
resetTryEntry(entry);
|
|
2135
|
-
return ContinueSentinel;
|
|
2136
|
-
}
|
|
2137
|
-
}
|
|
2138
|
-
},
|
|
2139
|
-
|
|
2140
|
-
"catch": function(tryLoc) {
|
|
2141
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
2142
|
-
var entry = this.tryEntries[i];
|
|
2143
|
-
if (entry.tryLoc === tryLoc) {
|
|
2144
|
-
var record = entry.completion;
|
|
2145
|
-
if (record.type === "throw") {
|
|
2146
|
-
var thrown = record.arg;
|
|
2147
|
-
resetTryEntry(entry);
|
|
2148
|
-
}
|
|
2149
|
-
return thrown;
|
|
2150
|
-
}
|
|
2151
|
-
}
|
|
2152
|
-
|
|
2153
|
-
// The context.catch method must only be called with a location
|
|
2154
|
-
// argument that corresponds to a known catch block.
|
|
2155
|
-
throw new Error("illegal catch attempt");
|
|
2156
|
-
},
|
|
2157
|
-
|
|
2158
|
-
delegateYield: function(iterable, resultName, nextLoc) {
|
|
2159
|
-
this.delegate = {
|
|
2160
|
-
iterator: values(iterable),
|
|
2161
|
-
resultName: resultName,
|
|
2162
|
-
nextLoc: nextLoc
|
|
2163
|
-
};
|
|
2164
|
-
|
|
2165
|
-
if (this.method === "next") {
|
|
2166
|
-
// Deliberately forget the last sent value so that we don't
|
|
2167
|
-
// accidentally pass it on to the delegate.
|
|
2168
|
-
this.arg = undefined$1;
|
|
2169
|
-
}
|
|
2170
|
-
|
|
2171
|
-
return ContinueSentinel;
|
|
2172
|
-
}
|
|
2173
|
-
};
|
|
2174
|
-
|
|
2175
|
-
// Regardless of whether this script is executing as a CommonJS module
|
|
2176
|
-
// or not, return the runtime object so that we can declare the variable
|
|
2177
|
-
// regeneratorRuntime in the outer scope, which allows this module to be
|
|
2178
|
-
// injected easily by `bin/regenerator --include-runtime script.js`.
|
|
2179
|
-
return exports;
|
|
2180
|
-
|
|
2181
|
-
}(
|
|
2182
|
-
// If this script is executing as a CommonJS module, use module.exports
|
|
2183
|
-
// as the regeneratorRuntime namespace. Otherwise create a new empty
|
|
2184
|
-
// object. Either way, the resulting object will be used to initialize
|
|
2185
|
-
// the regeneratorRuntime variable at the top of this file.
|
|
2186
|
-
module.exports
|
|
2187
|
-
));
|
|
2188
|
-
|
|
2189
|
-
try {
|
|
2190
|
-
regeneratorRuntime = runtime;
|
|
2191
|
-
} catch (accidentalStrictMode) {
|
|
2192
|
-
// This module should not be running in strict mode, so the above
|
|
2193
|
-
// assignment should always work unless something is misconfigured. Just
|
|
2194
|
-
// in case runtime.js accidentally runs in strict mode, in modern engines
|
|
2195
|
-
// we can explicitly access globalThis. In older engines we can escape
|
|
2196
|
-
// strict mode using a global Function call. This could conceivably fail
|
|
2197
|
-
// if a Content Security Policy forbids using Function, but in that case
|
|
2198
|
-
// the proper solution is to fix the accidental strict mode problem. If
|
|
2199
|
-
// you've misconfigured your bundler to force strict mode and applied a
|
|
2200
|
-
// CSP to forbid Function, and you're not willing to fix either of those
|
|
2201
|
-
// problems, please detail your unique predicament in a GitHub issue.
|
|
2202
|
-
if (typeof globalThis === "object") {
|
|
2203
|
-
globalThis.regeneratorRuntime = runtime;
|
|
2204
|
-
} else {
|
|
2205
|
-
Function("r", "regeneratorRuntime = r")(runtime);
|
|
2206
|
-
}
|
|
2207
|
-
}
|
|
2208
|
-
});
|
|
2209
|
-
|
|
2210
|
-
/**
|
|
2211
|
-
* A specialized version of `_.reduce` for arrays without support for
|
|
2212
|
-
* iteratee shorthands.
|
|
2213
|
-
*
|
|
2214
|
-
* @private
|
|
2215
|
-
* @param {Array} [array] The array to iterate over.
|
|
2216
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
2217
|
-
* @param {*} [accumulator] The initial value.
|
|
2218
|
-
* @param {boolean} [initAccum] Specify using the first element of `array` as
|
|
2219
|
-
* the initial value.
|
|
2220
|
-
* @returns {*} Returns the accumulated value.
|
|
2221
|
-
*/
|
|
2222
|
-
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
|
2223
|
-
var index = -1,
|
|
2224
|
-
length = array == null ? 0 : array.length;
|
|
2225
|
-
|
|
2226
|
-
if (initAccum && length) {
|
|
2227
|
-
accumulator = array[++index];
|
|
2228
|
-
}
|
|
2229
|
-
while (++index < length) {
|
|
2230
|
-
accumulator = iteratee(accumulator, array[index], index, array);
|
|
2231
|
-
}
|
|
2232
|
-
return accumulator;
|
|
2233
|
-
}
|
|
2234
|
-
|
|
2235
|
-
var _arrayReduce = arrayReduce;
|
|
2236
|
-
|
|
2237
|
-
/**
|
|
2238
|
-
* The base implementation of `_.propertyOf` without support for deep paths.
|
|
2239
|
-
*
|
|
2240
|
-
* @private
|
|
2241
|
-
* @param {Object} object The object to query.
|
|
2242
|
-
* @returns {Function} Returns the new accessor function.
|
|
2243
|
-
*/
|
|
2244
|
-
function basePropertyOf(object) {
|
|
2245
|
-
return function(key) {
|
|
2246
|
-
return object == null ? undefined : object[key];
|
|
2247
|
-
};
|
|
2248
|
-
}
|
|
2249
|
-
|
|
2250
|
-
var _basePropertyOf = basePropertyOf;
|
|
2251
|
-
|
|
2252
|
-
/** Used to map Latin Unicode letters to basic Latin letters. */
|
|
2253
|
-
var deburredLetters = {
|
|
2254
|
-
// Latin-1 Supplement block.
|
|
2255
|
-
'\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
|
|
2256
|
-
'\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
|
|
2257
|
-
'\xc7': 'C', '\xe7': 'c',
|
|
2258
|
-
'\xd0': 'D', '\xf0': 'd',
|
|
2259
|
-
'\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
|
|
2260
|
-
'\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
|
|
2261
|
-
'\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
|
|
2262
|
-
'\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
|
|
2263
|
-
'\xd1': 'N', '\xf1': 'n',
|
|
2264
|
-
'\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
|
|
2265
|
-
'\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
|
|
2266
|
-
'\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
|
|
2267
|
-
'\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
|
|
2268
|
-
'\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
|
|
2269
|
-
'\xc6': 'Ae', '\xe6': 'ae',
|
|
2270
|
-
'\xde': 'Th', '\xfe': 'th',
|
|
2271
|
-
'\xdf': 'ss',
|
|
2272
|
-
// Latin Extended-A block.
|
|
2273
|
-
'\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
|
|
2274
|
-
'\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
|
|
2275
|
-
'\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
|
|
2276
|
-
'\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
|
|
2277
|
-
'\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
|
|
2278
|
-
'\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
|
|
2279
|
-
'\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
|
|
2280
|
-
'\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
|
|
2281
|
-
'\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
|
|
2282
|
-
'\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
|
|
2283
|
-
'\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
|
|
2284
|
-
'\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
|
|
2285
|
-
'\u0134': 'J', '\u0135': 'j',
|
|
2286
|
-
'\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
|
|
2287
|
-
'\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
|
|
2288
|
-
'\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
|
|
2289
|
-
'\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
|
|
2290
|
-
'\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
|
|
2291
|
-
'\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
|
|
2292
|
-
'\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
|
|
2293
|
-
'\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
|
|
2294
|
-
'\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
|
|
2295
|
-
'\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
|
|
2296
|
-
'\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
|
|
2297
|
-
'\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
|
|
2298
|
-
'\u0163': 't', '\u0165': 't', '\u0167': 't',
|
|
2299
|
-
'\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
|
|
2300
|
-
'\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
|
|
2301
|
-
'\u0174': 'W', '\u0175': 'w',
|
|
2302
|
-
'\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
|
|
2303
|
-
'\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
|
|
2304
|
-
'\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
|
|
2305
|
-
'\u0132': 'IJ', '\u0133': 'ij',
|
|
2306
|
-
'\u0152': 'Oe', '\u0153': 'oe',
|
|
2307
|
-
'\u0149': "'n", '\u017f': 's'
|
|
2308
|
-
};
|
|
2309
|
-
|
|
2310
|
-
/**
|
|
2311
|
-
* Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
|
|
2312
|
-
* letters to basic Latin letters.
|
|
2313
|
-
*
|
|
2314
|
-
* @private
|
|
2315
|
-
* @param {string} letter The matched letter to deburr.
|
|
2316
|
-
* @returns {string} Returns the deburred letter.
|
|
2317
|
-
*/
|
|
2318
|
-
var deburrLetter = _basePropertyOf(deburredLetters);
|
|
2319
|
-
|
|
2320
|
-
var _deburrLetter = deburrLetter;
|
|
2321
|
-
|
|
2322
|
-
/** Used to match Latin Unicode letters (excluding mathematical operators). */
|
|
2323
|
-
var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
|
|
2324
|
-
|
|
2325
|
-
/** Used to compose unicode character classes. */
|
|
2326
|
-
var rsComboMarksRange$3 = '\\u0300-\\u036f',
|
|
2327
|
-
reComboHalfMarksRange$3 = '\\ufe20-\\ufe2f',
|
|
2328
|
-
rsComboSymbolsRange$3 = '\\u20d0-\\u20ff',
|
|
2329
|
-
rsComboRange$3 = rsComboMarksRange$3 + reComboHalfMarksRange$3 + rsComboSymbolsRange$3;
|
|
2330
|
-
|
|
2331
|
-
/** Used to compose unicode capture groups. */
|
|
2332
|
-
var rsCombo$2 = '[' + rsComboRange$3 + ']';
|
|
2333
|
-
|
|
2334
|
-
/**
|
|
2335
|
-
* Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
|
|
2336
|
-
* [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
|
|
2337
|
-
*/
|
|
2338
|
-
var reComboMark = RegExp(rsCombo$2, 'g');
|
|
2339
|
-
|
|
2340
|
-
/**
|
|
2341
|
-
* Deburrs `string` by converting
|
|
2342
|
-
* [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
|
|
2343
|
-
* and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
|
|
2344
|
-
* letters to basic Latin letters and removing
|
|
2345
|
-
* [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
|
|
2346
|
-
*
|
|
2347
|
-
* @static
|
|
2348
|
-
* @memberOf _
|
|
2349
|
-
* @since 3.0.0
|
|
2350
|
-
* @category String
|
|
2351
|
-
* @param {string} [string=''] The string to deburr.
|
|
2352
|
-
* @returns {string} Returns the deburred string.
|
|
2353
|
-
* @example
|
|
2354
|
-
*
|
|
2355
|
-
* _.deburr('déjà vu');
|
|
2356
|
-
* // => 'deja vu'
|
|
2357
|
-
*/
|
|
2358
|
-
function deburr(string) {
|
|
2359
|
-
string = toString_1(string);
|
|
2360
|
-
return string && string.replace(reLatin, _deburrLetter).replace(reComboMark, '');
|
|
2361
|
-
}
|
|
2362
|
-
|
|
2363
|
-
var deburr_1 = deburr;
|
|
2364
|
-
|
|
2365
|
-
/** Used to match words composed of alphanumeric characters. */
|
|
2366
|
-
var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
|
|
2367
|
-
|
|
2368
|
-
/**
|
|
2369
|
-
* Splits an ASCII `string` into an array of its words.
|
|
2370
|
-
*
|
|
2371
|
-
* @private
|
|
2372
|
-
* @param {string} The string to inspect.
|
|
2373
|
-
* @returns {Array} Returns the words of `string`.
|
|
2374
|
-
*/
|
|
2375
|
-
function asciiWords(string) {
|
|
2376
|
-
return string.match(reAsciiWord) || [];
|
|
2377
|
-
}
|
|
2378
|
-
|
|
2379
|
-
var _asciiWords = asciiWords;
|
|
2380
|
-
|
|
2381
|
-
/** Used to detect strings that need a more robust regexp to match words. */
|
|
2382
|
-
var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
|
|
2383
|
-
|
|
2384
|
-
/**
|
|
2385
|
-
* Checks if `string` contains a word composed of Unicode symbols.
|
|
2386
|
-
*
|
|
2387
|
-
* @private
|
|
2388
|
-
* @param {string} string The string to inspect.
|
|
2389
|
-
* @returns {boolean} Returns `true` if a word is found, else `false`.
|
|
2390
|
-
*/
|
|
2391
|
-
function hasUnicodeWord(string) {
|
|
2392
|
-
return reHasUnicodeWord.test(string);
|
|
2393
|
-
}
|
|
2394
|
-
|
|
2395
|
-
var _hasUnicodeWord = hasUnicodeWord;
|
|
2396
|
-
|
|
2397
|
-
/** Used to compose unicode character classes. */
|
|
2398
|
-
var rsAstralRange$2 = '\\ud800-\\udfff',
|
|
2399
|
-
rsComboMarksRange$2 = '\\u0300-\\u036f',
|
|
2400
|
-
reComboHalfMarksRange$2 = '\\ufe20-\\ufe2f',
|
|
2401
|
-
rsComboSymbolsRange$2 = '\\u20d0-\\u20ff',
|
|
2402
|
-
rsComboRange$2 = rsComboMarksRange$2 + reComboHalfMarksRange$2 + rsComboSymbolsRange$2,
|
|
2403
|
-
rsDingbatRange = '\\u2700-\\u27bf',
|
|
2404
|
-
rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
|
|
2405
|
-
rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
|
|
2406
|
-
rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
|
|
2407
|
-
rsPunctuationRange = '\\u2000-\\u206f',
|
|
2408
|
-
rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
|
|
2409
|
-
rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
|
|
2410
|
-
rsVarRange$2 = '\\ufe0e\\ufe0f',
|
|
2411
|
-
rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
|
|
2412
|
-
|
|
2413
|
-
/** Used to compose unicode capture groups. */
|
|
2414
|
-
var rsApos$1 = "['\u2019]",
|
|
2415
|
-
rsBreak = '[' + rsBreakRange + ']',
|
|
2416
|
-
rsCombo$1 = '[' + rsComboRange$2 + ']',
|
|
2417
|
-
rsDigits = '\\d+',
|
|
2418
|
-
rsDingbat = '[' + rsDingbatRange + ']',
|
|
2419
|
-
rsLower = '[' + rsLowerRange + ']',
|
|
2420
|
-
rsMisc = '[^' + rsAstralRange$2 + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
|
|
2421
|
-
rsFitz$1 = '\\ud83c[\\udffb-\\udfff]',
|
|
2422
|
-
rsModifier$1 = '(?:' + rsCombo$1 + '|' + rsFitz$1 + ')',
|
|
2423
|
-
rsNonAstral$1 = '[^' + rsAstralRange$2 + ']',
|
|
2424
|
-
rsRegional$1 = '(?:\\ud83c[\\udde6-\\uddff]){2}',
|
|
2425
|
-
rsSurrPair$1 = '[\\ud800-\\udbff][\\udc00-\\udfff]',
|
|
2426
|
-
rsUpper = '[' + rsUpperRange + ']',
|
|
2427
|
-
rsZWJ$2 = '\\u200d';
|
|
2428
|
-
|
|
2429
|
-
/** Used to compose unicode regexes. */
|
|
2430
|
-
var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
|
|
2431
|
-
rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
|
|
2432
|
-
rsOptContrLower = '(?:' + rsApos$1 + '(?:d|ll|m|re|s|t|ve))?',
|
|
2433
|
-
rsOptContrUpper = '(?:' + rsApos$1 + '(?:D|LL|M|RE|S|T|VE))?',
|
|
2434
|
-
reOptMod$1 = rsModifier$1 + '?',
|
|
2435
|
-
rsOptVar$1 = '[' + rsVarRange$2 + ']?',
|
|
2436
|
-
rsOptJoin$1 = '(?:' + rsZWJ$2 + '(?:' + [rsNonAstral$1, rsRegional$1, rsSurrPair$1].join('|') + ')' + rsOptVar$1 + reOptMod$1 + ')*',
|
|
2437
|
-
rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
|
|
2438
|
-
rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
|
|
2439
|
-
rsSeq$1 = rsOptVar$1 + reOptMod$1 + rsOptJoin$1,
|
|
2440
|
-
rsEmoji = '(?:' + [rsDingbat, rsRegional$1, rsSurrPair$1].join('|') + ')' + rsSeq$1;
|
|
2441
|
-
|
|
2442
|
-
/** Used to match complex or compound words. */
|
|
2443
|
-
var reUnicodeWord = RegExp([
|
|
2444
|
-
rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
|
|
2445
|
-
rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
|
|
2446
|
-
rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
|
|
2447
|
-
rsUpper + '+' + rsOptContrUpper,
|
|
2448
|
-
rsOrdUpper,
|
|
2449
|
-
rsOrdLower,
|
|
2450
|
-
rsDigits,
|
|
2451
|
-
rsEmoji
|
|
2452
|
-
].join('|'), 'g');
|
|
2453
|
-
|
|
2454
|
-
/**
|
|
2455
|
-
* Splits a Unicode `string` into an array of its words.
|
|
2456
|
-
*
|
|
2457
|
-
* @private
|
|
2458
|
-
* @param {string} The string to inspect.
|
|
2459
|
-
* @returns {Array} Returns the words of `string`.
|
|
2460
|
-
*/
|
|
2461
|
-
function unicodeWords(string) {
|
|
2462
|
-
return string.match(reUnicodeWord) || [];
|
|
2463
|
-
}
|
|
2464
|
-
|
|
2465
|
-
var _unicodeWords = unicodeWords;
|
|
2466
|
-
|
|
2467
|
-
/**
|
|
2468
|
-
* Splits `string` into an array of its words.
|
|
2469
|
-
*
|
|
2470
|
-
* @static
|
|
2471
|
-
* @memberOf _
|
|
2472
|
-
* @since 3.0.0
|
|
2473
|
-
* @category String
|
|
2474
|
-
* @param {string} [string=''] The string to inspect.
|
|
2475
|
-
* @param {RegExp|string} [pattern] The pattern to match words.
|
|
2476
|
-
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
2477
|
-
* @returns {Array} Returns the words of `string`.
|
|
2478
|
-
* @example
|
|
2479
|
-
*
|
|
2480
|
-
* _.words('fred, barney, & pebbles');
|
|
2481
|
-
* // => ['fred', 'barney', 'pebbles']
|
|
2482
|
-
*
|
|
2483
|
-
* _.words('fred, barney, & pebbles', /[^, ]+/g);
|
|
2484
|
-
* // => ['fred', 'barney', '&', 'pebbles']
|
|
2485
|
-
*/
|
|
2486
|
-
function words(string, pattern, guard) {
|
|
2487
|
-
string = toString_1(string);
|
|
2488
|
-
pattern = guard ? undefined : pattern;
|
|
2489
|
-
|
|
2490
|
-
if (pattern === undefined) {
|
|
2491
|
-
return _hasUnicodeWord(string) ? _unicodeWords(string) : _asciiWords(string);
|
|
2492
|
-
}
|
|
2493
|
-
return string.match(pattern) || [];
|
|
2494
|
-
}
|
|
2495
|
-
|
|
2496
|
-
var words_1 = words;
|
|
2497
|
-
|
|
2498
|
-
/** Used to compose unicode capture groups. */
|
|
2499
|
-
var rsApos = "['\u2019]";
|
|
2500
|
-
|
|
2501
|
-
/** Used to match apostrophes. */
|
|
2502
|
-
var reApos = RegExp(rsApos, 'g');
|
|
2503
|
-
|
|
2504
|
-
/**
|
|
2505
|
-
* Creates a function like `_.camelCase`.
|
|
2506
|
-
*
|
|
2507
|
-
* @private
|
|
2508
|
-
* @param {Function} callback The function to combine each word.
|
|
2509
|
-
* @returns {Function} Returns the new compounder function.
|
|
2510
|
-
*/
|
|
2511
|
-
function createCompounder(callback) {
|
|
2512
|
-
return function(string) {
|
|
2513
|
-
return _arrayReduce(words_1(deburr_1(string).replace(reApos, '')), callback, '');
|
|
2514
|
-
};
|
|
2515
|
-
}
|
|
2516
|
-
|
|
2517
|
-
var _createCompounder = createCompounder;
|
|
2518
|
-
|
|
2519
68
|
var hexToRGB = function hexToRGB(hex) {
|
|
2520
69
|
var r = parseInt(hex.slice(1, 3), 16);
|
|
2521
70
|
var g = parseInt(hex.slice(3, 5), 16);
|
|
@@ -2544,10 +93,10 @@ var clientWidths = {
|
|
|
2544
93
|
tablet: 1024
|
|
2545
94
|
};
|
|
2546
95
|
var clientWidth = function clientWidth(device) {
|
|
2547
|
-
var foundDeviceWidth =
|
|
96
|
+
var foundDeviceWidth = lodash.get(clientWidths, device);
|
|
2548
97
|
|
|
2549
98
|
if (foundDeviceWidth) {
|
|
2550
|
-
return
|
|
99
|
+
return lodash.get(global, "document.documentElement.clientWidth") <= foundDeviceWidth;
|
|
2551
100
|
}
|
|
2552
101
|
|
|
2553
102
|
return false;
|
|
@@ -2574,7 +123,7 @@ var updateContentLinks = function updateContentLinks(content) {
|
|
|
2574
123
|
};
|
|
2575
124
|
var isEmpty = function isEmpty(value) {
|
|
2576
125
|
return value == null || // From standard.js: Always use === - but value == null is allowed to check null || undefined
|
|
2577
|
-
|
|
126
|
+
_typeof__default["default"](value) === "object" && Object.entries(value).length === 0 && value.constructor === Object || typeof value === "string" && value.trim().length === 0;
|
|
2578
127
|
};
|
|
2579
128
|
var shapeConfig = PropTypes__default["default"].shape({
|
|
2580
129
|
"sketches-host": PropTypes__default["default"].string,
|
|
@@ -2627,7 +176,7 @@ var TextBase = function TextBase(_ref) {
|
|
|
2627
176
|
css = _ref$css === void 0 ? {} : _ref$css;
|
|
2628
177
|
_ref.story;
|
|
2629
178
|
_ref.config;
|
|
2630
|
-
var restProps =
|
|
179
|
+
var restProps = _objectWithoutProperties__default["default"](_ref, _excluded$d);
|
|
2631
180
|
|
|
2632
181
|
var content = element.text;
|
|
2633
182
|
if (!content) return null;
|
|
@@ -2637,9 +186,9 @@ var TextBase = function TextBase(_ref) {
|
|
|
2637
186
|
var _opts$isExternalLink = opts.isExternalLink,
|
|
2638
187
|
isExternalLink = _opts$isExternalLink === void 0 ? true : _opts$isExternalLink;
|
|
2639
188
|
var text = isExternalLink && updateContentLinks(content) || content;
|
|
2640
|
-
var isPromotionalMessage =
|
|
189
|
+
var isPromotionalMessage = lodash.get(element, ["metadata", "promotional-message"], false);
|
|
2641
190
|
var updatedStyle = isPromotionalMessage ? "promotionalMessage" : "textElement";
|
|
2642
|
-
return /*#__PURE__*/React__default["default"].createElement("div",
|
|
191
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({
|
|
2643
192
|
style: !isPromotionalMessage ? {
|
|
2644
193
|
color: textColor
|
|
2645
194
|
} : {},
|
|
@@ -2649,7 +198,7 @@ var TextBase = function TextBase(_ref) {
|
|
|
2649
198
|
},
|
|
2650
199
|
id: "text-element"
|
|
2651
200
|
}, restProps, {
|
|
2652
|
-
className: "arrow-component arr--text-element " +
|
|
201
|
+
className: "arrow-component arr--text-element " + _getClassName__default["default"]("".concat(updatedStyle, " ").concat(textInvertColor), _styleModuleImportMap$g) + (" " + (restProps ? restProps.className || "" : ""))
|
|
2653
202
|
}));
|
|
2654
203
|
};
|
|
2655
204
|
|
|
@@ -2669,67 +218,6 @@ TextBase.propTypes = {
|
|
|
2669
218
|
};
|
|
2670
219
|
var Text = withElementWrapper(TextBase);
|
|
2671
220
|
|
|
2672
|
-
function _arrayWithHoles(arr) {
|
|
2673
|
-
if (Array.isArray(arr)) return arr;
|
|
2674
|
-
}
|
|
2675
|
-
|
|
2676
|
-
function _iterableToArrayLimit(arr, i) {
|
|
2677
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
2678
|
-
|
|
2679
|
-
if (_i == null) return;
|
|
2680
|
-
var _arr = [];
|
|
2681
|
-
var _n = true;
|
|
2682
|
-
var _d = false;
|
|
2683
|
-
|
|
2684
|
-
var _s, _e;
|
|
2685
|
-
|
|
2686
|
-
try {
|
|
2687
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
2688
|
-
_arr.push(_s.value);
|
|
2689
|
-
|
|
2690
|
-
if (i && _arr.length === i) break;
|
|
2691
|
-
}
|
|
2692
|
-
} catch (err) {
|
|
2693
|
-
_d = true;
|
|
2694
|
-
_e = err;
|
|
2695
|
-
} finally {
|
|
2696
|
-
try {
|
|
2697
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
2698
|
-
} finally {
|
|
2699
|
-
if (_d) throw _e;
|
|
2700
|
-
}
|
|
2701
|
-
}
|
|
2702
|
-
|
|
2703
|
-
return _arr;
|
|
2704
|
-
}
|
|
2705
|
-
|
|
2706
|
-
function _arrayLikeToArray(arr, len) {
|
|
2707
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
2708
|
-
|
|
2709
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
2710
|
-
arr2[i] = arr[i];
|
|
2711
|
-
}
|
|
2712
|
-
|
|
2713
|
-
return arr2;
|
|
2714
|
-
}
|
|
2715
|
-
|
|
2716
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
2717
|
-
if (!o) return;
|
|
2718
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
2719
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
2720
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
2721
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
2722
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
2723
|
-
}
|
|
2724
|
-
|
|
2725
|
-
function _nonIterableRest() {
|
|
2726
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
2727
|
-
}
|
|
2728
|
-
|
|
2729
|
-
function _slicedToArray(arr, i) {
|
|
2730
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
2731
|
-
}
|
|
2732
|
-
|
|
2733
221
|
var _excluded$c = ["element", "template", "opts", "css", "story", "config", "render"];
|
|
2734
222
|
var _styleModuleImportMap$f = {
|
|
2735
223
|
"./blurb.m.css": {
|
|
@@ -2754,7 +242,7 @@ var BlurbBase = function BlurbBase(_ref) {
|
|
|
2754
242
|
_ref.story;
|
|
2755
243
|
_ref.config;
|
|
2756
244
|
_ref.render;
|
|
2757
|
-
var restProps =
|
|
245
|
+
var restProps = _objectWithoutProperties__default["default"](_ref, _excluded$c);
|
|
2758
246
|
|
|
2759
247
|
var content = element.text;
|
|
2760
248
|
var borderColor = css.borderColor;
|
|
@@ -2765,7 +253,7 @@ var BlurbBase = function BlurbBase(_ref) {
|
|
|
2765
253
|
};
|
|
2766
254
|
|
|
2767
255
|
var _useState = React.useState(initBorderDirection),
|
|
2768
|
-
_useState2 =
|
|
256
|
+
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
2769
257
|
borderDirection = _useState2[0],
|
|
2770
258
|
setBorderDirection = _useState2[1];
|
|
2771
259
|
|
|
@@ -2787,14 +275,14 @@ var BlurbBase = function BlurbBase(_ref) {
|
|
|
2787
275
|
var templateStyle = template ? "blurb-".concat(template) : "blurb";
|
|
2788
276
|
var configData = useStateValue() || {};
|
|
2789
277
|
var textInvertColor = getTextColor(configData.theme);
|
|
2790
|
-
return /*#__PURE__*/React__default["default"].createElement("div",
|
|
278
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({
|
|
2791
279
|
"data-test-id": "blurb",
|
|
2792
280
|
style: borderColor && borderDirection,
|
|
2793
281
|
dangerouslySetInnerHTML: {
|
|
2794
282
|
__html: text
|
|
2795
283
|
}
|
|
2796
284
|
}, restProps, {
|
|
2797
|
-
className: "arrow-component arr-custom-style arr--blurb-element " +
|
|
285
|
+
className: "arrow-component arr-custom-style arr--blurb-element " + _getClassName__default["default"]("".concat(templateStyle, " ").concat(textInvertColor), _styleModuleImportMap$f) + (" " + (restProps ? restProps.className || "" : ""))
|
|
2798
286
|
}));
|
|
2799
287
|
};
|
|
2800
288
|
|
|
@@ -2843,7 +331,7 @@ var SummaryBase = function SummaryBase(_ref) {
|
|
|
2843
331
|
_ref.story;
|
|
2844
332
|
_ref.config;
|
|
2845
333
|
_ref.render;
|
|
2846
|
-
var restProps =
|
|
334
|
+
var restProps = _objectWithoutProperties__default["default"](_ref, _excluded$b);
|
|
2847
335
|
|
|
2848
336
|
var configData = useStateValue() || {};
|
|
2849
337
|
var textInvertColor = getTextColor(configData.theme);
|
|
@@ -2864,23 +352,23 @@ var SummaryBase = function SummaryBase(_ref) {
|
|
|
2864
352
|
var updateHeaderColor = renderTemplate ? "".concat(headerBgColor) : "";
|
|
2865
353
|
var textColor = renderTemplate ? getTextColor(headerBgColor) : "";
|
|
2866
354
|
var updateContentColor = template === "header" ? "" : textInvertColor;
|
|
2867
|
-
return /*#__PURE__*/React__default["default"].createElement("div",
|
|
355
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({
|
|
2868
356
|
"data-test-id": "summary"
|
|
2869
357
|
}, restProps, {
|
|
2870
|
-
className: "arrow-component arr--summary-element arr-custom-style " +
|
|
358
|
+
className: "arrow-component arr--summary-element arr-custom-style " + _getClassName__default["default"](templateStyle, _styleModuleImportMap$e) + (" " + (restProps ? restProps.className || "" : ""))
|
|
2871
359
|
}), !hideHeadline && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2872
360
|
"data-test-id": "summary-headline",
|
|
2873
|
-
className:
|
|
361
|
+
className: _getClassName__default["default"]("heading-wrapper ".concat(textInvertColor), _styleModuleImportMap$e)
|
|
2874
362
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2875
363
|
style: {
|
|
2876
364
|
backgroundColor: updateHeaderColor
|
|
2877
365
|
},
|
|
2878
|
-
className:
|
|
366
|
+
className: _getClassName__default["default"]("headline ".concat(textColor, " ").concat(textInvertColor), _styleModuleImportMap$e)
|
|
2879
367
|
}, headline)), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2880
368
|
dangerouslySetInnerHTML: {
|
|
2881
369
|
__html: text
|
|
2882
370
|
},
|
|
2883
|
-
className:
|
|
371
|
+
className: _getClassName__default["default"]("content ".concat(contentBorder, " ").concat(updateContentColor, " ").concat(textInvertColor), _styleModuleImportMap$e)
|
|
2884
372
|
}));
|
|
2885
373
|
};
|
|
2886
374
|
|
|
@@ -3031,9 +519,9 @@ var BlockQuoteBase = function BlockQuoteBase(_ref) {
|
|
|
3031
519
|
_ref.story;
|
|
3032
520
|
_ref.config;
|
|
3033
521
|
_ref.render;
|
|
3034
|
-
var restProps =
|
|
522
|
+
var restProps = _objectWithoutProperties__default["default"](_ref, _excluded$a);
|
|
3035
523
|
|
|
3036
|
-
var _get =
|
|
524
|
+
var _get = lodash.get(element, ["metadata"]),
|
|
3037
525
|
content = _get.content,
|
|
3038
526
|
attribution = _get.attribution;
|
|
3039
527
|
|
|
@@ -3065,11 +553,11 @@ var BlockQuoteBase = function BlockQuoteBase(_ref) {
|
|
|
3065
553
|
}, SelectionOfIcon(iconType, template, blockQuoteColor, textColor));
|
|
3066
554
|
};
|
|
3067
555
|
|
|
3068
|
-
return /*#__PURE__*/React__default["default"].createElement("div",
|
|
556
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({
|
|
3069
557
|
"data-test-id": "blockquote",
|
|
3070
558
|
style: theme
|
|
3071
559
|
}, restProps, {
|
|
3072
|
-
className: "arrow-component arr--block-quote " +
|
|
560
|
+
className: "arrow-component arr--block-quote " + _getClassName__default["default"]("".concat(templateStyle, " ").concat(textColor), _styleModuleImportMap$d) + (" " + (restProps ? restProps.className || "" : ""))
|
|
3073
561
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3074
562
|
className: "block-quote-m_quote-wrapper__83bEy"
|
|
3075
563
|
}, updateStructure(), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -3081,12 +569,12 @@ var BlockQuoteBase = function BlockQuoteBase(_ref) {
|
|
|
3081
569
|
dangerouslySetInnerHTML: {
|
|
3082
570
|
__html: content
|
|
3083
571
|
},
|
|
3084
|
-
className:
|
|
572
|
+
className: _getClassName__default["default"]("content ".concat(textInvertColor), _styleModuleImportMap$d)
|
|
3085
573
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3086
574
|
dangerouslySetInnerHTML: {
|
|
3087
575
|
__html: attribution
|
|
3088
576
|
},
|
|
3089
|
-
className:
|
|
577
|
+
className: _getClassName__default["default"]("attribution ".concat(textInvertColor), _styleModuleImportMap$d)
|
|
3090
578
|
}))));
|
|
3091
579
|
};
|
|
3092
580
|
BlockQuoteBase.propTypes = {
|
|
@@ -3121,22 +609,22 @@ var BigFactBase = function BigFactBase(_ref) {
|
|
|
3121
609
|
var element = _ref.element;
|
|
3122
610
|
_ref.story;
|
|
3123
611
|
_ref.config;
|
|
3124
|
-
var restProps =
|
|
612
|
+
var restProps = _objectWithoutProperties__default["default"](_ref, _excluded$9);
|
|
3125
613
|
|
|
3126
614
|
var configData = useStateValue() || {};
|
|
3127
615
|
var textInvertColor = getTextColor(configData.theme);
|
|
3128
616
|
var _element$metadata = element.metadata,
|
|
3129
617
|
content = _element$metadata.content,
|
|
3130
618
|
attribution = _element$metadata.attribution;
|
|
3131
|
-
return /*#__PURE__*/React__default["default"].createElement("div",
|
|
619
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({
|
|
3132
620
|
"data-test-id": "bigfact"
|
|
3133
621
|
}, restProps, {
|
|
3134
|
-
className: "arrow-component arr--bigfact-element " +
|
|
622
|
+
className: "arrow-component arr--bigfact-element " + _getClassName__default["default"]("bigfact-element ".concat(textInvertColor), _styleModuleImportMap$c) + (" " + (restProps ? restProps.className || "" : ""))
|
|
3135
623
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3136
624
|
className: "big-fact-m_content__1u2Ul"
|
|
3137
625
|
}, content), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3138
626
|
"data-test-id": "attribution",
|
|
3139
|
-
className:
|
|
627
|
+
className: _getClassName__default["default"]("attribution ".concat(textInvertColor), _styleModuleImportMap$c)
|
|
3140
628
|
}, attribution));
|
|
3141
629
|
};
|
|
3142
630
|
|
|
@@ -3290,14 +778,14 @@ var AlsoReadBase = function AlsoReadBase(_ref2) {
|
|
|
3290
778
|
css = _ref2$css === void 0 ? {} : _ref2$css;
|
|
3291
779
|
_ref2.config;
|
|
3292
780
|
_ref2.render;
|
|
3293
|
-
var restProps =
|
|
781
|
+
var restProps = _objectWithoutProperties__default["default"](_ref2, _excluded$8);
|
|
3294
782
|
|
|
3295
783
|
var content = element.text;
|
|
3296
784
|
if (!content) return null;
|
|
3297
|
-
var linkedStories =
|
|
3298
|
-
var linkedStoryId =
|
|
3299
|
-
var linkedStorySlug =
|
|
3300
|
-
var linkedImage =
|
|
785
|
+
var linkedStories = lodash.get(story, ["linked-stories"], {});
|
|
786
|
+
var linkedStoryId = lodash.get(element, ["metadata", "linked-story-id"]);
|
|
787
|
+
var linkedStorySlug = lodash.get(linkedStories, [linkedStoryId, "url"]);
|
|
788
|
+
var linkedImage = lodash.get(linkedStories, [linkedStoryId, "hero-image-s3-key"], "");
|
|
3301
789
|
var storyUrl = linkedStorySlug && linkedStorySlug;
|
|
3302
790
|
var configData = useStateValue() || {};
|
|
3303
791
|
var textInvertColor = getTextColor(configData.theme);
|
|
@@ -3308,14 +796,14 @@ var AlsoReadBase = function AlsoReadBase(_ref2) {
|
|
|
3308
796
|
var isDefault = template === "" || template === "default";
|
|
3309
797
|
var isRightAlign = template === "imageRightAlign";
|
|
3310
798
|
var templateStyle = template ? "alsoread-".concat(template) : "alsoread-default";
|
|
3311
|
-
return /*#__PURE__*/React__default["default"].createElement(components.Link,
|
|
799
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, _extends__default["default"]({
|
|
3312
800
|
"data-test-id": "also-read",
|
|
3313
801
|
href: storyUrl,
|
|
3314
802
|
"aria-label": "also-read"
|
|
3315
803
|
}, restProps, {
|
|
3316
|
-
className: "arrow-component arr--also-read-element " +
|
|
804
|
+
className: "arrow-component arr--also-read-element " + _getClassName__default["default"](templateStyle, _styleModuleImportMap$b) + (" " + (restProps ? restProps.className || "" : ""))
|
|
3317
805
|
}), !isDefault && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3318
|
-
className:
|
|
806
|
+
className: _getClassName__default["default"]("default-text ".concat(textInvertColor), _styleModuleImportMap$b)
|
|
3319
807
|
}, displayTitle), isDefault && /*#__PURE__*/React__default["default"].createElement(DisplayImage, {
|
|
3320
808
|
story: story,
|
|
3321
809
|
linkedImage: linkedImage,
|
|
@@ -3364,21 +852,6 @@ AlsoReadBase.propTypes = {
|
|
|
3364
852
|
};
|
|
3365
853
|
var AlsoRead = withElementWrapper(AlsoReadBase);
|
|
3366
854
|
|
|
3367
|
-
function _defineProperty(obj, key, value) {
|
|
3368
|
-
if (key in obj) {
|
|
3369
|
-
Object.defineProperty(obj, key, {
|
|
3370
|
-
value: value,
|
|
3371
|
-
enumerable: true,
|
|
3372
|
-
configurable: true,
|
|
3373
|
-
writable: true
|
|
3374
|
-
});
|
|
3375
|
-
} else {
|
|
3376
|
-
obj[key] = value;
|
|
3377
|
-
}
|
|
3378
|
-
|
|
3379
|
-
return obj;
|
|
3380
|
-
}
|
|
3381
|
-
|
|
3382
855
|
var Loading = function Loading(_ref) {
|
|
3383
856
|
_ref.width;
|
|
3384
857
|
_ref.height;
|
|
@@ -3554,7 +1027,7 @@ HyperLink.propTypes = {
|
|
|
3554
1027
|
|
|
3555
1028
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3556
1029
|
|
|
3557
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
1030
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3558
1031
|
var Lightbox = /*#__PURE__*/React.lazy(function () {
|
|
3559
1032
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-image-lightbox')); });
|
|
3560
1033
|
});
|
|
@@ -3566,27 +1039,27 @@ var FullScreenImages = function FullScreenImages(_ref) {
|
|
|
3566
1039
|
element = _ref$element === void 0 ? {} : _ref$element,
|
|
3567
1040
|
props = _ref.props;
|
|
3568
1041
|
var cdnImage = reactRedux.useSelector(function (state) {
|
|
3569
|
-
return
|
|
1042
|
+
return lodash.get(state, ["qt", "config", "cdn-image"]);
|
|
3570
1043
|
});
|
|
3571
1044
|
|
|
3572
1045
|
var _useState = React.useState(0),
|
|
3573
|
-
_useState2 =
|
|
1046
|
+
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
3574
1047
|
photoIndex = _useState2[0],
|
|
3575
1048
|
handleImage = _useState2[1];
|
|
3576
1049
|
|
|
3577
1050
|
var _useState3 = React.useState(false),
|
|
3578
|
-
_useState4 =
|
|
1051
|
+
_useState4 = _slicedToArray__default["default"](_useState3, 2),
|
|
3579
1052
|
isOpen = _useState4[0],
|
|
3580
1053
|
handleOpen = _useState4[1];
|
|
3581
1054
|
|
|
3582
|
-
var deviceWidth =
|
|
3583
|
-
var hyperlinks =
|
|
1055
|
+
var deviceWidth = lodash.get(global, ["innerWidth"], 0);
|
|
1056
|
+
var hyperlinks = lodash.get(element, ["story-elements"], []).map(function (image) {
|
|
3584
1057
|
return image.hyperlink;
|
|
3585
1058
|
});
|
|
3586
1059
|
var imageUrlList = [];
|
|
3587
1060
|
|
|
3588
1061
|
if (!imageSlug) {
|
|
3589
|
-
imageUrlList =
|
|
1062
|
+
imageUrlList = lodash.get(element, ["story-elements"], []).map(function (image) {
|
|
3590
1063
|
return "//".concat(cdnImage, "/").concat(image["image-s3-key"], "?w=").concat(deviceWidth);
|
|
3591
1064
|
});
|
|
3592
1065
|
}
|
|
@@ -3644,9 +1117,9 @@ var FullScreenImages = function FullScreenImages(_ref) {
|
|
|
3644
1117
|
return /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement(Loading, null));
|
|
3645
1118
|
};
|
|
3646
1119
|
|
|
3647
|
-
return /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement(template, _objectSpread(
|
|
1120
|
+
return /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement(template, _objectSpread(_defineProperty__default["default"]({}, onClickKey, onClickHandler), props)), isOpen ? /*#__PURE__*/React__default["default"].createElement(React.Suspense, {
|
|
3648
1121
|
fallback: /*#__PURE__*/React__default["default"].createElement(LoadingScreen, null)
|
|
3649
|
-
}, /*#__PURE__*/React__default["default"].createElement(Lightbox,
|
|
1122
|
+
}, /*#__PURE__*/React__default["default"].createElement(Lightbox, _extends__default["default"]({
|
|
3650
1123
|
wrapperClassName: "arr--image-lightbox",
|
|
3651
1124
|
onCloseRequest: onClose
|
|
3652
1125
|
}, lightboxProps))) : null);
|
|
@@ -3696,7 +1169,7 @@ var CaptionAttribution = function CaptionAttribution(_ref) {
|
|
|
3696
1169
|
var updateStyle = caption ? "wrapper" : "";
|
|
3697
1170
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3698
1171
|
"data-test-id": "caption",
|
|
3699
|
-
className: "arr--caption-attribution " +
|
|
1172
|
+
className: "arr--caption-attribution " + _getClassName__default["default"]("caption ".concat(textColor), _styleModuleImportMap$a)
|
|
3700
1173
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3701
1174
|
dangerouslySetInnerHTML: {
|
|
3702
1175
|
__html: caption
|
|
@@ -3706,7 +1179,7 @@ var CaptionAttribution = function CaptionAttribution(_ref) {
|
|
|
3706
1179
|
dangerouslySetInnerHTML: {
|
|
3707
1180
|
__html: attribution
|
|
3708
1181
|
},
|
|
3709
|
-
className:
|
|
1182
|
+
className: _getClassName__default["default"]("attribution ".concat(textColor, " ").concat(updateStyle), _styleModuleImportMap$a)
|
|
3710
1183
|
}));
|
|
3711
1184
|
};
|
|
3712
1185
|
CaptionAttribution.propTypes = {
|
|
@@ -3731,7 +1204,7 @@ var ImageBase = function ImageBase(_ref) {
|
|
|
3731
1204
|
_ref.config;
|
|
3732
1205
|
var _ref$caption = _ref.caption,
|
|
3733
1206
|
caption = _ref$caption === void 0 ? true : _ref$caption,
|
|
3734
|
-
restProps =
|
|
1207
|
+
restProps = _objectWithoutProperties__default["default"](_ref, _excluded$7);
|
|
3735
1208
|
|
|
3736
1209
|
if (!element) return null;
|
|
3737
1210
|
var configData = useStateValue() || {};
|
|
@@ -3763,7 +1236,7 @@ var ImageBase = function ImageBase(_ref) {
|
|
|
3763
1236
|
ImageTemplate.propTypes = {
|
|
3764
1237
|
onClick: PropTypes__default["default"].func
|
|
3765
1238
|
};
|
|
3766
|
-
return /*#__PURE__*/React__default["default"].createElement("div",
|
|
1239
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({
|
|
3767
1240
|
className: "arrow-component arr--image-element"
|
|
3768
1241
|
}, restProps, {
|
|
3769
1242
|
"data-test-id": "image-element"
|
|
@@ -3817,12 +1290,12 @@ var _styleModuleImportMap$9 = {
|
|
|
3817
1290
|
var supportedTemplates = function supportedTemplates(type, element) {
|
|
3818
1291
|
switch (type) {
|
|
3819
1292
|
case "q-and-a":
|
|
3820
|
-
var _get =
|
|
1293
|
+
var _get = lodash.get(element, ["metadata"]),
|
|
3821
1294
|
qaQuestion = _get.question,
|
|
3822
1295
|
qaAnswer = _get.answer;
|
|
3823
1296
|
|
|
3824
|
-
var qaQuestionAttribution =
|
|
3825
|
-
var qaAnswerAttribution =
|
|
1297
|
+
var qaQuestionAttribution = lodash.get(element, ["metadata", "interviewer", "avatar-url"]);
|
|
1298
|
+
var qaAnswerAttribution = lodash.get(element, ["metadata", "interviewee", "avatar-url"]);
|
|
3826
1299
|
return {
|
|
3827
1300
|
question: qaQuestion,
|
|
3828
1301
|
answer: qaAnswer,
|
|
@@ -3831,16 +1304,16 @@ var supportedTemplates = function supportedTemplates(type, element) {
|
|
|
3831
1304
|
};
|
|
3832
1305
|
|
|
3833
1306
|
case "question":
|
|
3834
|
-
var qQuestion =
|
|
3835
|
-
var qAttribution =
|
|
1307
|
+
var qQuestion = lodash.get(element, ["text"]);
|
|
1308
|
+
var qAttribution = lodash.get(element, ["metadata", "interviewer", "avatar-url"]);
|
|
3836
1309
|
return {
|
|
3837
1310
|
question: qQuestion,
|
|
3838
1311
|
questionAttribution: qAttribution
|
|
3839
1312
|
};
|
|
3840
1313
|
|
|
3841
1314
|
case "answer":
|
|
3842
|
-
var aAnswer =
|
|
3843
|
-
var aAttribution =
|
|
1315
|
+
var aAnswer = lodash.get(element, ["text"]);
|
|
1316
|
+
var aAttribution = lodash.get(element, ["metadata", "interviewee", "avatar-url"]);
|
|
3844
1317
|
return {
|
|
3845
1318
|
answer: aAnswer,
|
|
3846
1319
|
answerAttribution: aAttribution
|
|
@@ -3858,7 +1331,7 @@ var QuestionAnswerBase = function QuestionAnswerBase(_ref) {
|
|
|
3858
1331
|
var _ref$opts = _ref.opts,
|
|
3859
1332
|
opts = _ref$opts === void 0 ? {} : _ref$opts;
|
|
3860
1333
|
_ref.render;
|
|
3861
|
-
var restProps =
|
|
1334
|
+
var restProps = _objectWithoutProperties__default["default"](_ref, _excluded$6);
|
|
3862
1335
|
|
|
3863
1336
|
var configData = useStateValue() || {};
|
|
3864
1337
|
var textInvertColor = getTextColor(configData.theme);
|
|
@@ -3893,7 +1366,7 @@ var QuestionAnswerBase = function QuestionAnswerBase(_ref) {
|
|
|
3893
1366
|
style: {
|
|
3894
1367
|
backgroundColor: iconColor
|
|
3895
1368
|
},
|
|
3896
|
-
className:
|
|
1369
|
+
className: _getClassName__default["default"]("".concat(iconType, " ").concat(theme), _styleModuleImportMap$9)
|
|
3897
1370
|
}, "Q"); // EMPTY SPAN FOR EXTRA SPACE
|
|
3898
1371
|
|
|
3899
1372
|
var supportAnswerElement = isAuthorImageTemplate ? answerAttribution && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -3908,12 +1381,12 @@ var QuestionAnswerBase = function QuestionAnswerBase(_ref) {
|
|
|
3908
1381
|
style: {
|
|
3909
1382
|
backgroundColor: iconColor
|
|
3910
1383
|
},
|
|
3911
|
-
className:
|
|
1384
|
+
className: _getClassName__default["default"]("".concat(iconType, " ").concat(theme), _styleModuleImportMap$9)
|
|
3912
1385
|
}, "A");
|
|
3913
|
-
return /*#__PURE__*/React__default["default"].createElement("div",
|
|
1386
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({
|
|
3914
1387
|
"data-test-id": "question-answer"
|
|
3915
1388
|
}, restProps, {
|
|
3916
|
-
className: "arrow-component arr-custom-style arr--qa-element " +
|
|
1389
|
+
className: "arrow-component arr-custom-style arr--qa-element " + _getClassName__default["default"](templateStyle, _styleModuleImportMap$9) + (" " + (restProps ? restProps.className || "" : ""))
|
|
3917
1390
|
}), type !== "answer" && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3918
1391
|
className: "question-answer-m_q-element__1ZA5d",
|
|
3919
1392
|
"data-test-id": "question"
|
|
@@ -3921,7 +1394,7 @@ var QuestionAnswerBase = function QuestionAnswerBase(_ref) {
|
|
|
3921
1394
|
dangerouslySetInnerHTML: {
|
|
3922
1395
|
__html: questionData
|
|
3923
1396
|
},
|
|
3924
|
-
className:
|
|
1397
|
+
className: _getClassName__default["default"]("content ".concat(textInvertColor), _styleModuleImportMap$9)
|
|
3925
1398
|
})), type !== "question" && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3926
1399
|
className: "question-answer-m_a-element__BTxfl",
|
|
3927
1400
|
"data-test-id": "answer"
|
|
@@ -3929,7 +1402,7 @@ var QuestionAnswerBase = function QuestionAnswerBase(_ref) {
|
|
|
3929
1402
|
dangerouslySetInnerHTML: {
|
|
3930
1403
|
__html: answerData
|
|
3931
1404
|
},
|
|
3932
|
-
className:
|
|
1405
|
+
className: _getClassName__default["default"]("content ".concat(textInvertColor), _styleModuleImportMap$9)
|
|
3933
1406
|
})));
|
|
3934
1407
|
};
|
|
3935
1408
|
|
|
@@ -3980,7 +1453,7 @@ var ImageGalleryBase = function ImageGalleryBase(_ref) {
|
|
|
3980
1453
|
_ref.opts;
|
|
3981
1454
|
_ref.story;
|
|
3982
1455
|
_ref.config;
|
|
3983
|
-
var restProps =
|
|
1456
|
+
var restProps = _objectWithoutProperties__default["default"](_ref, _excluded$5);
|
|
3984
1457
|
|
|
3985
1458
|
if (!element) return null;
|
|
3986
1459
|
var isMobile = clientWidth("mobile");
|
|
@@ -4000,14 +1473,14 @@ var ImageGalleryBase = function ImageGalleryBase(_ref) {
|
|
|
4000
1473
|
var images = renderImage.map(function (image, index) {
|
|
4001
1474
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4002
1475
|
key: index,
|
|
4003
|
-
className:
|
|
1476
|
+
className: _getClassName__default["default"](hyperlinkClass(image["hyperlink"]), _styleModuleImportMap$8)
|
|
4004
1477
|
}, /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
4005
1478
|
key: index,
|
|
4006
1479
|
"data-text-id": "image-".concat(index),
|
|
4007
1480
|
onClick: function onClick() {
|
|
4008
1481
|
return onClickHandler && onClickHandler(index);
|
|
4009
1482
|
},
|
|
4010
|
-
className:
|
|
1483
|
+
className: _getClassName__default["default"]("image ".concat(classes), _styleModuleImportMap$8)
|
|
4011
1484
|
}, /*#__PURE__*/React__default["default"].createElement(components.ResponsiveImage, {
|
|
4012
1485
|
slug: image["image-s3-key"],
|
|
4013
1486
|
metadata: image["image-metadata"],
|
|
@@ -4021,7 +1494,7 @@ var ImageGalleryBase = function ImageGalleryBase(_ref) {
|
|
|
4021
1494
|
hyperLink: image["hyperlink"]
|
|
4022
1495
|
}));
|
|
4023
1496
|
});
|
|
4024
|
-
return /*#__PURE__*/React__default["default"].createElement("div",
|
|
1497
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({
|
|
4025
1498
|
className: " arrow-component arr--image-element image-gallery-m_image-gallery__1Q7if" + (" " + (restProps ? restProps.className || "" : ""))
|
|
4026
1499
|
}, restProps, {
|
|
4027
1500
|
"data-test-id": "image-gallery"
|
|
@@ -4056,9 +1529,9 @@ var StoryElementBase = function StoryElementBase(_ref) {
|
|
|
4056
1529
|
var element = _ref.element;
|
|
4057
1530
|
_ref.story;
|
|
4058
1531
|
_ref.config;
|
|
4059
|
-
var restProps =
|
|
1532
|
+
var restProps = _objectWithoutProperties__default["default"](_ref, _excluded$4);
|
|
4060
1533
|
|
|
4061
|
-
return /*#__PURE__*/React__default["default"].createElement("div",
|
|
1534
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({}, restProps, {
|
|
4062
1535
|
"data-test-id": "story-elements"
|
|
4063
1536
|
}), /*#__PURE__*/React__default["default"].createElement(components.StoryElement, {
|
|
4064
1537
|
element: element
|
|
@@ -4080,9 +1553,9 @@ var Videobase = function Videobase(_ref) {
|
|
|
4080
1553
|
_ref.config;
|
|
4081
1554
|
var _ref$loadIframeOnClic = _ref.loadIframeOnClick,
|
|
4082
1555
|
loadIframeOnClick = _ref$loadIframeOnClic === void 0 ? false : _ref$loadIframeOnClic,
|
|
4083
|
-
restProps =
|
|
1556
|
+
restProps = _objectWithoutProperties__default["default"](_ref, _excluded$3);
|
|
4084
1557
|
|
|
4085
|
-
return /*#__PURE__*/React__default["default"].createElement("div",
|
|
1558
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({
|
|
4086
1559
|
className: "video-m_container__MYuWI" + (" " + (restProps ? restProps.className || "" : ""))
|
|
4087
1560
|
}, restProps, {
|
|
4088
1561
|
"data-test-id": "video"
|
|
@@ -4126,7 +1599,7 @@ var QuoteBase = function QuoteBase(_ref) {
|
|
|
4126
1599
|
_ref.story;
|
|
4127
1600
|
_ref.config;
|
|
4128
1601
|
_ref.render;
|
|
4129
|
-
var restProps =
|
|
1602
|
+
var restProps = _objectWithoutProperties__default["default"](_ref, _excluded$2);
|
|
4130
1603
|
|
|
4131
1604
|
var configData = useStateValue() || {};
|
|
4132
1605
|
var textInvertColor = getTextColor(configData.theme);
|
|
@@ -4137,10 +1610,10 @@ var QuoteBase = function QuoteBase(_ref) {
|
|
|
4137
1610
|
var borderColor = css.borderColor;
|
|
4138
1611
|
var updateBorderColor = template === "borderLeft" && "4px solid ".concat(borderColor);
|
|
4139
1612
|
var templateStyle = template ? "quote-".concat(template) : "quote";
|
|
4140
|
-
return /*#__PURE__*/React__default["default"].createElement("div",
|
|
1613
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({
|
|
4141
1614
|
"data-test-id": "quote"
|
|
4142
1615
|
}, restProps, {
|
|
4143
|
-
className: "arrow-component arr--quote-element " +
|
|
1616
|
+
className: "arrow-component arr--quote-element " + _getClassName__default["default"](templateStyle, _styleModuleImportMap$7) + (" " + (restProps ? restProps.className || "" : ""))
|
|
4144
1617
|
}), template === "borderTopSmall" && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4145
1618
|
className: "quote-m_line__3gtoE",
|
|
4146
1619
|
style: borderColor && {
|
|
@@ -4153,10 +1626,10 @@ var QuoteBase = function QuoteBase(_ref) {
|
|
|
4153
1626
|
dangerouslySetInnerHTML: {
|
|
4154
1627
|
__html: content
|
|
4155
1628
|
},
|
|
4156
|
-
className:
|
|
1629
|
+
className: _getClassName__default["default"]("text ".concat(textInvertColor), _styleModuleImportMap$7)
|
|
4157
1630
|
}), /*#__PURE__*/React__default["default"].createElement("p", {
|
|
4158
1631
|
"data-test-id": "quote-attribution",
|
|
4159
|
-
className:
|
|
1632
|
+
className: _getClassName__default["default"]("attribution ".concat(textInvertColor), _styleModuleImportMap$7)
|
|
4160
1633
|
}, attribution));
|
|
4161
1634
|
};
|
|
4162
1635
|
|
|
@@ -4196,7 +1669,7 @@ var ReferenceBase = function ReferenceBase(_ref) {
|
|
|
4196
1669
|
_ref.config;
|
|
4197
1670
|
var _ref$opts = _ref.opts,
|
|
4198
1671
|
opts = _ref$opts === void 0 ? {} : _ref$opts,
|
|
4199
|
-
restProps =
|
|
1672
|
+
restProps = _objectWithoutProperties__default["default"](_ref, _excluded$1);
|
|
4200
1673
|
|
|
4201
1674
|
if (!element) return null;
|
|
4202
1675
|
var configData = useStateValue() || {};
|
|
@@ -4207,7 +1680,7 @@ var ReferenceBase = function ReferenceBase(_ref) {
|
|
|
4207
1680
|
var _opts$showHeadline = opts.showHeadline,
|
|
4208
1681
|
showHeadline = _opts$showHeadline === void 0 ? true : _opts$showHeadline,
|
|
4209
1682
|
headlineText = opts.headlineText;
|
|
4210
|
-
return /*#__PURE__*/React__default["default"].createElement("div",
|
|
1683
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({
|
|
4211
1684
|
className: "arrow-component arr--reference-element"
|
|
4212
1685
|
}, restProps), eleArr && eleArr.map(function (metadata, index) {
|
|
4213
1686
|
var _metadata$name = metadata.name,
|
|
@@ -4217,7 +1690,7 @@ var ReferenceBase = function ReferenceBase(_ref) {
|
|
|
4217
1690
|
url = metadata.url;
|
|
4218
1691
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4219
1692
|
key: index,
|
|
4220
|
-
className:
|
|
1693
|
+
className: _getClassName__default["default"]("wrapper ".concat(textInvertColor), _styleModuleImportMap$6)
|
|
4221
1694
|
}, /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
4222
1695
|
href: url,
|
|
4223
1696
|
"aria-label": "reference-headline"
|
|
@@ -4269,7 +1742,7 @@ var AttachmentBase = function AttachmentBase(_ref) {
|
|
|
4269
1742
|
var _ref$element = _ref.element,
|
|
4270
1743
|
element = _ref$element === void 0 ? {} : _ref$element;
|
|
4271
1744
|
_ref.render;
|
|
4272
|
-
var restProps =
|
|
1745
|
+
var restProps = _objectWithoutProperties__default["default"](_ref, _excluded);
|
|
4273
1746
|
|
|
4274
1747
|
var fileName = element["file-name"],
|
|
4275
1748
|
url = element.url,
|
|
@@ -4283,10 +1756,10 @@ var AttachmentBase = function AttachmentBase(_ref) {
|
|
|
4283
1756
|
var textColor = getTextColor(configData.theme);
|
|
4284
1757
|
var defaultName = isPdf ? "Attached PDF" : "Attached DOC";
|
|
4285
1758
|
var defaultFileName = fileName || defaultName;
|
|
4286
|
-
return /*#__PURE__*/React__default["default"].createElement("div",
|
|
1759
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({
|
|
4287
1760
|
"data-test-id": "attachment"
|
|
4288
1761
|
}, restProps, {
|
|
4289
|
-
className: "arrow-component arr--attachment-element " +
|
|
1762
|
+
className: "arrow-component arr--attachment-element " + _getClassName__default["default"](textColor, _styleModuleImportMap$5) + (" " + (restProps ? restProps.className || "" : ""))
|
|
4290
1763
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4291
1764
|
className: "attachment-m_headline__kP7Hs"
|
|
4292
1765
|
}, "Attachment"), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -4558,7 +2031,7 @@ var SocialSharePopup = function SocialSharePopup(_ref) {
|
|
|
4558
2031
|
};
|
|
4559
2032
|
var popupItemsList = socialShareData(options);
|
|
4560
2033
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4561
|
-
className:
|
|
2034
|
+
className: _getClassName__default["default"]("share-popup-wrapper ".concat(textColor), _styleModuleImportMap$4)
|
|
4562
2035
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4563
2036
|
className: "social-share-popup-m_share-popup__QRt3l social-share-popup-m_share-popup-wrapper__GEJqD"
|
|
4564
2037
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -4611,249 +2084,6 @@ ShareIcon.propTypes = {
|
|
|
4611
2084
|
color: PropTypes__default["default"].string
|
|
4612
2085
|
};
|
|
4613
2086
|
|
|
4614
|
-
/**
|
|
4615
|
-
* The base implementation of `_.slice` without an iteratee call guard.
|
|
4616
|
-
*
|
|
4617
|
-
* @private
|
|
4618
|
-
* @param {Array} array The array to slice.
|
|
4619
|
-
* @param {number} [start=0] The start position.
|
|
4620
|
-
* @param {number} [end=array.length] The end position.
|
|
4621
|
-
* @returns {Array} Returns the slice of `array`.
|
|
4622
|
-
*/
|
|
4623
|
-
function baseSlice(array, start, end) {
|
|
4624
|
-
var index = -1,
|
|
4625
|
-
length = array.length;
|
|
4626
|
-
|
|
4627
|
-
if (start < 0) {
|
|
4628
|
-
start = -start > length ? 0 : (length + start);
|
|
4629
|
-
}
|
|
4630
|
-
end = end > length ? length : end;
|
|
4631
|
-
if (end < 0) {
|
|
4632
|
-
end += length;
|
|
4633
|
-
}
|
|
4634
|
-
length = start > end ? 0 : ((end - start) >>> 0);
|
|
4635
|
-
start >>>= 0;
|
|
4636
|
-
|
|
4637
|
-
var result = Array(length);
|
|
4638
|
-
while (++index < length) {
|
|
4639
|
-
result[index] = array[index + start];
|
|
4640
|
-
}
|
|
4641
|
-
return result;
|
|
4642
|
-
}
|
|
4643
|
-
|
|
4644
|
-
var _baseSlice = baseSlice;
|
|
4645
|
-
|
|
4646
|
-
/**
|
|
4647
|
-
* Casts `array` to a slice if it's needed.
|
|
4648
|
-
*
|
|
4649
|
-
* @private
|
|
4650
|
-
* @param {Array} array The array to inspect.
|
|
4651
|
-
* @param {number} start The start position.
|
|
4652
|
-
* @param {number} [end=array.length] The end position.
|
|
4653
|
-
* @returns {Array} Returns the cast slice.
|
|
4654
|
-
*/
|
|
4655
|
-
function castSlice(array, start, end) {
|
|
4656
|
-
var length = array.length;
|
|
4657
|
-
end = end === undefined ? length : end;
|
|
4658
|
-
return (!start && end >= length) ? array : _baseSlice(array, start, end);
|
|
4659
|
-
}
|
|
4660
|
-
|
|
4661
|
-
var _castSlice = castSlice;
|
|
4662
|
-
|
|
4663
|
-
/** Used to compose unicode character classes. */
|
|
4664
|
-
var rsAstralRange$1 = '\\ud800-\\udfff',
|
|
4665
|
-
rsComboMarksRange$1 = '\\u0300-\\u036f',
|
|
4666
|
-
reComboHalfMarksRange$1 = '\\ufe20-\\ufe2f',
|
|
4667
|
-
rsComboSymbolsRange$1 = '\\u20d0-\\u20ff',
|
|
4668
|
-
rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1,
|
|
4669
|
-
rsVarRange$1 = '\\ufe0e\\ufe0f';
|
|
4670
|
-
|
|
4671
|
-
/** Used to compose unicode capture groups. */
|
|
4672
|
-
var rsZWJ$1 = '\\u200d';
|
|
4673
|
-
|
|
4674
|
-
/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
|
|
4675
|
-
var reHasUnicode = RegExp('[' + rsZWJ$1 + rsAstralRange$1 + rsComboRange$1 + rsVarRange$1 + ']');
|
|
4676
|
-
|
|
4677
|
-
/**
|
|
4678
|
-
* Checks if `string` contains Unicode symbols.
|
|
4679
|
-
*
|
|
4680
|
-
* @private
|
|
4681
|
-
* @param {string} string The string to inspect.
|
|
4682
|
-
* @returns {boolean} Returns `true` if a symbol is found, else `false`.
|
|
4683
|
-
*/
|
|
4684
|
-
function hasUnicode(string) {
|
|
4685
|
-
return reHasUnicode.test(string);
|
|
4686
|
-
}
|
|
4687
|
-
|
|
4688
|
-
var _hasUnicode = hasUnicode;
|
|
4689
|
-
|
|
4690
|
-
/**
|
|
4691
|
-
* Converts an ASCII `string` to an array.
|
|
4692
|
-
*
|
|
4693
|
-
* @private
|
|
4694
|
-
* @param {string} string The string to convert.
|
|
4695
|
-
* @returns {Array} Returns the converted array.
|
|
4696
|
-
*/
|
|
4697
|
-
function asciiToArray(string) {
|
|
4698
|
-
return string.split('');
|
|
4699
|
-
}
|
|
4700
|
-
|
|
4701
|
-
var _asciiToArray = asciiToArray;
|
|
4702
|
-
|
|
4703
|
-
/** Used to compose unicode character classes. */
|
|
4704
|
-
var rsAstralRange = '\\ud800-\\udfff',
|
|
4705
|
-
rsComboMarksRange = '\\u0300-\\u036f',
|
|
4706
|
-
reComboHalfMarksRange = '\\ufe20-\\ufe2f',
|
|
4707
|
-
rsComboSymbolsRange = '\\u20d0-\\u20ff',
|
|
4708
|
-
rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
|
|
4709
|
-
rsVarRange = '\\ufe0e\\ufe0f';
|
|
4710
|
-
|
|
4711
|
-
/** Used to compose unicode capture groups. */
|
|
4712
|
-
var rsAstral = '[' + rsAstralRange + ']',
|
|
4713
|
-
rsCombo = '[' + rsComboRange + ']',
|
|
4714
|
-
rsFitz = '\\ud83c[\\udffb-\\udfff]',
|
|
4715
|
-
rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
|
|
4716
|
-
rsNonAstral = '[^' + rsAstralRange + ']',
|
|
4717
|
-
rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
|
|
4718
|
-
rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
|
|
4719
|
-
rsZWJ = '\\u200d';
|
|
4720
|
-
|
|
4721
|
-
/** Used to compose unicode regexes. */
|
|
4722
|
-
var reOptMod = rsModifier + '?',
|
|
4723
|
-
rsOptVar = '[' + rsVarRange + ']?',
|
|
4724
|
-
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
|
|
4725
|
-
rsSeq = rsOptVar + reOptMod + rsOptJoin,
|
|
4726
|
-
rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
|
|
4727
|
-
|
|
4728
|
-
/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
|
|
4729
|
-
var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
|
|
4730
|
-
|
|
4731
|
-
/**
|
|
4732
|
-
* Converts a Unicode `string` to an array.
|
|
4733
|
-
*
|
|
4734
|
-
* @private
|
|
4735
|
-
* @param {string} string The string to convert.
|
|
4736
|
-
* @returns {Array} Returns the converted array.
|
|
4737
|
-
*/
|
|
4738
|
-
function unicodeToArray(string) {
|
|
4739
|
-
return string.match(reUnicode) || [];
|
|
4740
|
-
}
|
|
4741
|
-
|
|
4742
|
-
var _unicodeToArray = unicodeToArray;
|
|
4743
|
-
|
|
4744
|
-
/**
|
|
4745
|
-
* Converts `string` to an array.
|
|
4746
|
-
*
|
|
4747
|
-
* @private
|
|
4748
|
-
* @param {string} string The string to convert.
|
|
4749
|
-
* @returns {Array} Returns the converted array.
|
|
4750
|
-
*/
|
|
4751
|
-
function stringToArray(string) {
|
|
4752
|
-
return _hasUnicode(string)
|
|
4753
|
-
? _unicodeToArray(string)
|
|
4754
|
-
: _asciiToArray(string);
|
|
4755
|
-
}
|
|
4756
|
-
|
|
4757
|
-
var _stringToArray = stringToArray;
|
|
4758
|
-
|
|
4759
|
-
/**
|
|
4760
|
-
* Creates a function like `_.lowerFirst`.
|
|
4761
|
-
*
|
|
4762
|
-
* @private
|
|
4763
|
-
* @param {string} methodName The name of the `String` case method to use.
|
|
4764
|
-
* @returns {Function} Returns the new case function.
|
|
4765
|
-
*/
|
|
4766
|
-
function createCaseFirst(methodName) {
|
|
4767
|
-
return function(string) {
|
|
4768
|
-
string = toString_1(string);
|
|
4769
|
-
|
|
4770
|
-
var strSymbols = _hasUnicode(string)
|
|
4771
|
-
? _stringToArray(string)
|
|
4772
|
-
: undefined;
|
|
4773
|
-
|
|
4774
|
-
var chr = strSymbols
|
|
4775
|
-
? strSymbols[0]
|
|
4776
|
-
: string.charAt(0);
|
|
4777
|
-
|
|
4778
|
-
var trailing = strSymbols
|
|
4779
|
-
? _castSlice(strSymbols, 1).join('')
|
|
4780
|
-
: string.slice(1);
|
|
4781
|
-
|
|
4782
|
-
return chr[methodName]() + trailing;
|
|
4783
|
-
};
|
|
4784
|
-
}
|
|
4785
|
-
|
|
4786
|
-
var _createCaseFirst = createCaseFirst;
|
|
4787
|
-
|
|
4788
|
-
/**
|
|
4789
|
-
* Converts the first character of `string` to upper case.
|
|
4790
|
-
*
|
|
4791
|
-
* @static
|
|
4792
|
-
* @memberOf _
|
|
4793
|
-
* @since 4.0.0
|
|
4794
|
-
* @category String
|
|
4795
|
-
* @param {string} [string=''] The string to convert.
|
|
4796
|
-
* @returns {string} Returns the converted string.
|
|
4797
|
-
* @example
|
|
4798
|
-
*
|
|
4799
|
-
* _.upperFirst('fred');
|
|
4800
|
-
* // => 'Fred'
|
|
4801
|
-
*
|
|
4802
|
-
* _.upperFirst('FRED');
|
|
4803
|
-
* // => 'FRED'
|
|
4804
|
-
*/
|
|
4805
|
-
var upperFirst = _createCaseFirst('toUpperCase');
|
|
4806
|
-
|
|
4807
|
-
var upperFirst_1 = upperFirst;
|
|
4808
|
-
|
|
4809
|
-
/**
|
|
4810
|
-
* Converts the first character of `string` to upper case and the remaining
|
|
4811
|
-
* to lower case.
|
|
4812
|
-
*
|
|
4813
|
-
* @static
|
|
4814
|
-
* @memberOf _
|
|
4815
|
-
* @since 3.0.0
|
|
4816
|
-
* @category String
|
|
4817
|
-
* @param {string} [string=''] The string to capitalize.
|
|
4818
|
-
* @returns {string} Returns the capitalized string.
|
|
4819
|
-
* @example
|
|
4820
|
-
*
|
|
4821
|
-
* _.capitalize('FRED');
|
|
4822
|
-
* // => 'Fred'
|
|
4823
|
-
*/
|
|
4824
|
-
function capitalize(string) {
|
|
4825
|
-
return upperFirst_1(toString_1(string).toLowerCase());
|
|
4826
|
-
}
|
|
4827
|
-
|
|
4828
|
-
var capitalize_1 = capitalize;
|
|
4829
|
-
|
|
4830
|
-
/**
|
|
4831
|
-
* Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
|
|
4832
|
-
*
|
|
4833
|
-
* @static
|
|
4834
|
-
* @memberOf _
|
|
4835
|
-
* @since 3.0.0
|
|
4836
|
-
* @category String
|
|
4837
|
-
* @param {string} [string=''] The string to convert.
|
|
4838
|
-
* @returns {string} Returns the camel cased string.
|
|
4839
|
-
* @example
|
|
4840
|
-
*
|
|
4841
|
-
* _.camelCase('Foo Bar');
|
|
4842
|
-
* // => 'fooBar'
|
|
4843
|
-
*
|
|
4844
|
-
* _.camelCase('--foo-bar--');
|
|
4845
|
-
* // => 'fooBar'
|
|
4846
|
-
*
|
|
4847
|
-
* _.camelCase('__FOO_BAR__');
|
|
4848
|
-
* // => 'fooBar'
|
|
4849
|
-
*/
|
|
4850
|
-
var camelCase = _createCompounder(function(result, word, index) {
|
|
4851
|
-
word = word.toLowerCase();
|
|
4852
|
-
return result + (index ? capitalize_1(word) : word);
|
|
4853
|
-
});
|
|
4854
|
-
|
|
4855
|
-
var camelCase_1 = camelCase;
|
|
4856
|
-
|
|
4857
2087
|
var _styleModuleImportMap$3 = {
|
|
4858
2088
|
"./social-share-template.m.css": {
|
|
4859
2089
|
"desktop-view": "social-share-template-m_desktop-view__3TmkO",
|
|
@@ -4935,7 +2165,7 @@ var SocialShareTemplate = function SocialShareTemplate(props) {
|
|
|
4935
2165
|
var iconsList = socialShareData(options);
|
|
4936
2166
|
|
|
4937
2167
|
var _useState = React.useState(open),
|
|
4938
|
-
_useState2 =
|
|
2168
|
+
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
4939
2169
|
isOpen = _useState2[0],
|
|
4940
2170
|
setIsOpen = _useState2[1];
|
|
4941
2171
|
|
|
@@ -4961,12 +2191,12 @@ var SocialShareTemplate = function SocialShareTemplate(props) {
|
|
|
4961
2191
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4962
2192
|
className: "social-share-template-m_tablet-view__kATzi"
|
|
4963
2193
|
}, !isOpen && /*#__PURE__*/React__default["default"].createElement("ul", {
|
|
4964
|
-
className:
|
|
2194
|
+
className: _getClassName__default["default"]("wrapper ".concat(isOpen ? "open" : ""), _styleModuleImportMap$3)
|
|
4965
2195
|
}, shareIcon()), isOpen && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4966
2196
|
className: "social-share-template-m_overlay__1nBp-",
|
|
4967
2197
|
onClick: clickHandler
|
|
4968
2198
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4969
|
-
className: "arr--popup " +
|
|
2199
|
+
className: "arr--popup " + _getClassName__default["default"]("popup-wrapper ".concat(isOpen ? "popup-open" : ""), _styleModuleImportMap$3)
|
|
4970
2200
|
}, /*#__PURE__*/React__default["default"].createElement(SocialSharePopup, {
|
|
4971
2201
|
fbUrl: fbUrl,
|
|
4972
2202
|
twitterUrl: twitterUrl,
|
|
@@ -4983,14 +2213,14 @@ var SocialShareTemplate = function SocialShareTemplate(props) {
|
|
|
4983
2213
|
var popupStyle = !isOpen && vertical ? "tablet-view-popup" : "";
|
|
4984
2214
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4985
2215
|
"data-test-id": verticalShare,
|
|
4986
|
-
className: "arr--share " +
|
|
2216
|
+
className: "arr--share " + _getClassName__default["default"]("".concat(iconShade, " ").concat(verticalShare, " ").concat(popupStyle), _styleModuleImportMap$3)
|
|
4987
2217
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4988
2218
|
className: "social-share-template-m_desktop-view__3TmkO"
|
|
4989
2219
|
}, /*#__PURE__*/React__default["default"].createElement("ul", {
|
|
4990
|
-
"data-test-id":
|
|
4991
|
-
className: "desktop-share-wrapper " +
|
|
2220
|
+
"data-test-id": lodash.camelCase(iconType),
|
|
2221
|
+
className: "desktop-share-wrapper " + _getClassName__default["default"]("wrapper ".concat(isOpen ? "open" : ""), _styleModuleImportMap$3)
|
|
4992
2222
|
}, shareIcon(), iconsList.map(function (iconData, index) {
|
|
4993
|
-
return /*#__PURE__*/React__default["default"].createElement(ShareItem,
|
|
2223
|
+
return /*#__PURE__*/React__default["default"].createElement(ShareItem, _extends__default["default"]({}, iconData, {
|
|
4994
2224
|
key: iconData.name,
|
|
4995
2225
|
dataTestId: "card-share-".concat(index)
|
|
4996
2226
|
}));
|
|
@@ -5090,12 +2320,12 @@ var SliderArrow = function SliderArrow(_ref) {
|
|
|
5090
2320
|
var getRightArrowClassName = languageDirection === "rtl" ? "right-arrow-rtl" : "right-arrow-ltr";
|
|
5091
2321
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, selectedIndex !== 0 ? /*#__PURE__*/React__default["default"].createElement("button", {
|
|
5092
2322
|
onClick: previousClick,
|
|
5093
|
-
className: ("left-arrow ".concat(getLeftArrowClassName) ? "left-arrow ".concat(getLeftArrowClassName) + " " : "") +
|
|
2323
|
+
className: ("left-arrow ".concat(getLeftArrowClassName) ? "left-arrow ".concat(getLeftArrowClassName) + " " : "") + _getClassName__default["default"]("arrow left-arrow-".concat(textColor, " ").concat(getLeftArrowClassName), _styleModuleImportMap$2)
|
|
5094
2324
|
}, /*#__PURE__*/React__default["default"].createElement(LeftArrow, {
|
|
5095
2325
|
color: textColor === "dark" ? "#fff" : "#333"
|
|
5096
2326
|
})) : null, selectedIndex < noOfItems - 1 && rightArrowView() ? /*#__PURE__*/React__default["default"].createElement("button", {
|
|
5097
2327
|
onClick: nextClick,
|
|
5098
|
-
className: ("right-arrow ".concat(getRightArrowClassName) ? "right-arrow ".concat(getRightArrowClassName) + " " : "") +
|
|
2328
|
+
className: ("right-arrow ".concat(getRightArrowClassName) ? "right-arrow ".concat(getRightArrowClassName) + " " : "") + _getClassName__default["default"]("arrow right-arrow-".concat(textColor, " ").concat(getRightArrowClassName), _styleModuleImportMap$2)
|
|
5099
2329
|
}, /*#__PURE__*/React__default["default"].createElement(RightArrow, {
|
|
5100
2330
|
color: textColor === "dark" ? "#fff" : "#333"
|
|
5101
2331
|
})) : null);
|
|
@@ -5146,7 +2376,7 @@ var SliderIndicator = function SliderIndicator(_ref) {
|
|
|
5146
2376
|
}
|
|
5147
2377
|
}, /*#__PURE__*/React__default["default"].createElement("button", {
|
|
5148
2378
|
"aria-pressed": selectedIndex === index ? "true" : "false",
|
|
5149
|
-
className: ("indicator-button indicator-".concat(indicatorType) ? "indicator-button indicator-".concat(indicatorType) + " " : "") +
|
|
2379
|
+
className: ("indicator-button indicator-".concat(indicatorType) ? "indicator-button indicator-".concat(indicatorType) + " " : "") + _getClassName__default["default"]("indicator-button indicator-".concat(indicatorType, " indicator-").concat(indicatorType, "-").concat(textColor), _styleModuleImportMap$1)
|
|
5150
2380
|
}));
|
|
5151
2381
|
}));
|
|
5152
2382
|
};
|
|
@@ -5161,7 +2391,7 @@ SliderIndicator.propTypes = {
|
|
|
5161
2391
|
var smoothScroll = function smoothScroll(node, topOrLeft, horizontal) {
|
|
5162
2392
|
var _node$scrollTo;
|
|
5163
2393
|
|
|
5164
|
-
node.scrollTo((_node$scrollTo = {},
|
|
2394
|
+
node.scrollTo((_node$scrollTo = {}, _defineProperty__default["default"](_node$scrollTo, horizontal ? "left" : "top", topOrLeft), _defineProperty__default["default"](_node$scrollTo, "behavior", "smooth"), _node$scrollTo));
|
|
5165
2395
|
};
|
|
5166
2396
|
|
|
5167
2397
|
var updateItemSelection = function updateItemSelection(index, languageDirection, scroller, noOfItems) {
|
|
@@ -5191,17 +2421,17 @@ var ScrollSnap = function ScrollSnap(_ref) {
|
|
|
5191
2421
|
slideIndicator = _ref.slideIndicator;
|
|
5192
2422
|
|
|
5193
2423
|
var _useState = React.useState(0),
|
|
5194
|
-
_useState2 =
|
|
2424
|
+
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
5195
2425
|
selectedIndex = _useState2[0],
|
|
5196
2426
|
setSelectedIndex = _useState2[1];
|
|
5197
2427
|
|
|
5198
2428
|
var _useState3 = React.useState(false),
|
|
5199
|
-
_useState4 =
|
|
2429
|
+
_useState4 = _slicedToArray__default["default"](_useState3, 2),
|
|
5200
2430
|
autoScroll = _useState4[0],
|
|
5201
2431
|
setAutoScroll = _useState4[1];
|
|
5202
2432
|
|
|
5203
2433
|
var languageDirection = reactRedux.useSelector(function (state) {
|
|
5204
|
-
return
|
|
2434
|
+
return lodash.get(state, ["qt", "config", "language", "direction"], "ltr");
|
|
5205
2435
|
});
|
|
5206
2436
|
var noOfItems = children ? children.length : 0;
|
|
5207
2437
|
var scroller = React.useRef(null);
|
|
@@ -5358,7 +2588,7 @@ var ImageSlideshowBase = function ImageSlideshowBase(props) {
|
|
|
5358
2588
|
|
|
5359
2589
|
var ImageSlideshowTemplate = function ImageSlideshowTemplate(_ref) {
|
|
5360
2590
|
var onClickHandler = _ref.onClickHandler;
|
|
5361
|
-
var storyElements =
|
|
2591
|
+
var storyElements = lodash.get(props, ["element", "story-elements"], []);
|
|
5362
2592
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5363
2593
|
className: "arr--image-slideshow-element image-slideshow-m_slideshow__3jRFX",
|
|
5364
2594
|
"data-test-id": "image-slideshow"
|
|
@@ -5434,11 +2664,11 @@ var getElement = function getElement(story, element) {
|
|
|
5434
2664
|
elementType = element.metadata["type"];
|
|
5435
2665
|
}
|
|
5436
2666
|
|
|
5437
|
-
var storyElementId =
|
|
2667
|
+
var storyElementId = lodash.get(element, ["id"]);
|
|
5438
2668
|
|
|
5439
2669
|
switch (elementType) {
|
|
5440
2670
|
case "ad":
|
|
5441
|
-
return /*#__PURE__*/React__default["default"].createElement(AdComponent,
|
|
2671
|
+
return /*#__PURE__*/React__default["default"].createElement(AdComponent, _extends__default["default"]({}, element, {
|
|
5442
2672
|
id: "ad-".concat(index, "_").concat(cardId)
|
|
5443
2673
|
}));
|
|
5444
2674
|
|
|
@@ -5731,7 +2961,7 @@ var MainImageWrapper = function MainImageWrapper(_ref) {
|
|
|
5731
2961
|
template: SocialShareTemplate,
|
|
5732
2962
|
title: story.headline,
|
|
5733
2963
|
theme: config.theme,
|
|
5734
|
-
fullUrl: encodeURI("".concat(
|
|
2964
|
+
fullUrl: encodeURI("".concat(lodash.get(story, ["url"], ""), "?cardId=").concat(lodash.get(card, ["id"], -1)))
|
|
5735
2965
|
}))));
|
|
5736
2966
|
};
|
|
5737
2967
|
|
|
@@ -5759,7 +2989,7 @@ var StoryElementCard = function StoryElementCard(_ref2) {
|
|
|
5759
2989
|
var shouldRunFBMobileVideoFix = true;
|
|
5760
2990
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5761
2991
|
className: "arr--story-page-card-wrapper"
|
|
5762
|
-
},
|
|
2992
|
+
}, lodash.get(card, ["story-elements"], []).map(function (element, index) {
|
|
5763
2993
|
if (element.id === heroVideoElementId) return false;
|
|
5764
2994
|
|
|
5765
2995
|
if (element.subtype && element.subtype === "facebook-post" && shouldRunFBMobileVideoFix) {
|
|
@@ -5768,10 +2998,10 @@ var StoryElementCard = function StoryElementCard(_ref2) {
|
|
|
5768
2998
|
}
|
|
5769
2999
|
|
|
5770
3000
|
var tableStyle = element && element.subtype === "table" ? "table" : "";
|
|
5771
|
-
var cardId =
|
|
3001
|
+
var cardId = lodash.get(card, ["id"], "");
|
|
5772
3002
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5773
3003
|
key: element.id,
|
|
5774
|
-
className: "arr--element-container " +
|
|
3004
|
+
className: "arr--element-container " + _getClassName__default["default"]("element-container ".concat(isLiveBlog, " ").concat(tableStyle, " ").concat(textColor), _styleModuleImportMap)
|
|
5775
3005
|
}, getElement(story, element, config, adComponent, widgetComp, index, cardId));
|
|
5776
3006
|
}));
|
|
5777
3007
|
};
|
|
@@ -5795,8 +3025,8 @@ var PhotoStoryElement = function PhotoStoryElement(_ref3) {
|
|
|
5795
3025
|
var shouldRunFBMobileVideoFix = true;
|
|
5796
3026
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5797
3027
|
className: "story-element-card-m_story-card__H2VYl"
|
|
5798
|
-
},
|
|
5799
|
-
var cardId =
|
|
3028
|
+
}, lodash.get(card, ["story-elements"], []).map(function (element, index) {
|
|
3029
|
+
var cardId = lodash.get(card, ["id"], "");
|
|
5800
3030
|
|
|
5801
3031
|
if (element.type === "image") {
|
|
5802
3032
|
return /*#__PURE__*/React__default["default"].createElement(MainImageWrapper, {
|
|
@@ -5835,7 +3065,7 @@ var SlotAfterStory = function SlotAfterStory(_ref4) {
|
|
|
5835
3065
|
|
|
5836
3066
|
switch (element.type) {
|
|
5837
3067
|
case "ad":
|
|
5838
|
-
return /*#__PURE__*/React__default["default"].createElement(AdComponent,
|
|
3068
|
+
return /*#__PURE__*/React__default["default"].createElement(AdComponent, _extends__default["default"]({}, element, {
|
|
5839
3069
|
id: "ad-after-story-".concat(id)
|
|
5840
3070
|
}));
|
|
5841
3071
|
|