@quintype/arrow 3.15.1-perf.1 → 3.15.1-perf.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/atoms/Author/index.js +48 -2128
- package/atoms/Author/styles.arrow.css +1 -1
- package/atoms/AuthorWithTime/index.js +116 -2556
- package/atoms/AuthorWithTime/styles.arrow.css +1 -1
- package/atoms/CollectionName/index.js +48 -2127
- package/atoms/CollectionName/styles.arrow.css +1 -1
- package/atoms/ExtendedLoadMore/{index-6f8c780e.js → index-0f809dd9.js} +73 -62
- package/atoms/ExtendedLoadMore/index-142f015c.js +476 -0
- package/atoms/ExtendedLoadMore/{index-2d713010.js → index-37a9ccff.js} +63 -47
- package/atoms/ExtendedLoadMore/{index-8345922c.js → index-446679c8.js} +67 -51
- package/atoms/ExtendedLoadMore/{index-6daa674c.js → index-44f97338.js} +86 -68
- package/atoms/ExtendedLoadMore/{index-c8f346d0.js → index-57dd4870.js} +80 -64
- package/atoms/ExtendedLoadMore/{index-7eb05b3d.js → index-66dd4dbd.js} +70 -54
- package/atoms/ExtendedLoadMore/{index-6cb56d1a.js → index-8462c597.js} +93 -80
- package/atoms/ExtendedLoadMore/{index-aa8b8ab8.js → index-93cb06d1.js} +252 -226
- package/atoms/ExtendedLoadMore/index-afd44863.js +95 -0
- package/atoms/ExtendedLoadMore/{index-5a7900ba.js → index-b5754c5d.js} +67 -53
- package/atoms/ExtendedLoadMore/{index-4191a84c.js → index-bbaf526e.js} +78 -62
- package/atoms/ExtendedLoadMore/{index-99af722e.js → index-cfb262ef.js} +65 -48
- package/atoms/ExtendedLoadMore/index.js +20 -5
- package/atoms/ExtendedLoadMore/styles.arrow.css +1 -1
- package/atoms/Headline/index.js +95 -2175
- package/atoms/Headline/styles.arrow.css +1 -1
- package/atoms/HeroImage/index.js +91 -2230
- package/atoms/HeroImage/styles.arrow.css +1 -1
- package/atoms/LoadmoreButton/index.js +40 -2133
- package/atoms/LoadmoreButton/styles.arrow.css +1 -1
- package/atoms/ScrollSnap/index.js +89 -2241
- package/atoms/ScrollSnap/styles.arrow.css +1 -1
- package/atoms/SectionTag/index.js +40 -2120
- package/atoms/SectionTag/styles.arrow.css +1 -1
- package/atoms/Subheadline/index.js +35 -2115
- package/atoms/Subheadline/styles.arrow.css +1 -1
- package/atoms/TimeStamp/index.js +43 -2483
- package/atoms/TimeStamp/styles.arrow.css +1 -1
- package/molecules/KeyEvents/index.js +95 -2606
- package/molecules/KeyEvents/styles.arrow.css +1 -1
- package/molecules/PageIntroductionCard/index.js +59 -2487
- package/molecules/PageIntroductionCard/styles.arrow.css +1 -1
- package/molecules/SocialShareTemplate/index.js +213 -2800
- package/molecules/SocialShareTemplate/styles.arrow.css +1 -1
- package/molecules/StoryCard/index.js +308 -2816
- package/molecules/StoryCard/styles.arrow.css +1 -1
- package/molecules/StoryElementCard/index.js +611 -3352
- package/molecules/StoryElementCard/styles.arrow.css +1 -1
- package/molecules/StorycardContent/index.js +218 -2658
- package/molecules/StorycardContent/styles.arrow.css +1 -1
- package/package.json +1 -1
- package/rows/AlternateCollectionFilter/index.js +438 -2993
- package/rows/AlternateCollectionFilter/styles.arrow.css +1 -1
- package/rows/AsideCollection/index.js +432 -2987
- package/rows/AsideCollection/styles.arrow.css +1 -1
- package/rows/AstrologyCollection/index.js +411 -2966
- package/rows/AstrologyCollection/styles.arrow.css +1 -1
- package/rows/AuthorIntroductionCard/index.js +183 -2890
- package/rows/AuthorIntroductionCard/styles.arrow.css +1 -1
- package/rows/AuthorsList/index.js +217 -2936
- package/rows/AuthorsList/styles.arrow.css +1 -1
- package/rows/CollectionFilter/index.js +453 -3008
- package/rows/CollectionFilter/styles.arrow.css +1 -1
- package/rows/ElevenStories/index.js +439 -2959
- package/rows/ElevenStories/styles.arrow.css +1 -1
- package/rows/FourColFiveStories/index.js +374 -2872
- package/rows/FourColFiveStories/styles.arrow.css +1 -1
- package/rows/FourColGrid/index.js +426 -2927
- package/rows/FourColGrid/styles.arrow.css +1 -1
- package/rows/FourColPortraitStories/index.js +430 -2931
- package/rows/FourColPortraitStories/styles.arrow.css +1 -1
- package/rows/FourColSixteenStories/index.js +368 -2894
- package/rows/FourColSixteenStories/styles.arrow.css +1 -1
- package/rows/FourColTwelveStories/index.js +387 -2900
- package/rows/FourColTwelveStories/styles.arrow.css +1 -1
- package/rows/FourStorySlider/index.js +443 -2963
- package/rows/FourStorySlider/styles.arrow.css +1 -1
- package/rows/FourStorySliderPortrait/index.js +444 -2964
- package/rows/FourStorySliderPortrait/styles.arrow.css +1 -1
- package/rows/FourTabbedBigStorySlider/index.js +403 -2923
- package/rows/FourTabbedBigStorySlider/styles.arrow.css +1 -1
- package/rows/FullScreenSlider/index.js +422 -2942
- package/rows/FullScreenSlider/styles.arrow.css +1 -1
- package/rows/HalfScreenSlider/index.js +390 -2910
- package/rows/HalfScreenSlider/styles.arrow.css +1 -1
- package/rows/ListComponent/index.js +398 -2918
- package/rows/ListComponent/styles.arrow.css +1 -1
- package/rows/Listicles/index.js +189 -2375
- package/rows/Listicles/styles.arrow.css +1 -1
- package/rows/MagazineEditions/index.js +128 -2580
- package/rows/MagazineEditions/styles.arrow.css +1 -1
- package/rows/MagazineHeaderCard/index.js +125 -2577
- package/rows/MagazineHeaderCard/styles.arrow.css +1 -1
- package/rows/MagazineWidget/index.js +408 -2928
- package/rows/MagazineWidget/styles.arrow.css +1 -1
- package/rows/OneColStoryList/index.js +439 -2940
- package/rows/OneColStoryList/styles.arrow.css +1 -1
- package/rows/OpinionCollection/index.js +308 -2800
- package/rows/OpinionCollection/styles.arrow.css +1 -1
- package/rows/SixColSixStories/index.js +405 -2906
- package/rows/SixColSixStories/styles.arrow.css +1 -1
- package/rows/StoryCollection/index.js +432 -2987
- package/rows/StoryCollection/styles.arrow.css +1 -1
- package/rows/TagIntroductionCard/index.js +35 -1833
- package/rows/TagIntroductionCard/styles.arrow.css +1 -1
- package/rows/ThreeColFlexStories/index.js +421 -2922
- package/rows/ThreeColFlexStories/styles.arrow.css +1 -1
- package/rows/ThreeColFourteenStories/index.js +358 -2871
- package/rows/ThreeColFourteenStories/styles.arrow.css +1 -1
- package/rows/ThreeColGrid/index.js +428 -2929
- package/rows/ThreeColGrid/styles.arrow.css +1 -1
- package/rows/ThreeColSevenStory/index.js +406 -2926
- package/rows/ThreeColSevenStory/styles.arrow.css +1 -1
- package/rows/ThreeColSixStories/index.js +400 -2920
- package/rows/ThreeColSixStories/styles.arrow.css +1 -1
- package/rows/ThreeColTwelveStories/index.js +383 -2909
- package/rows/ThreeColTwelveStories/styles.arrow.css +1 -1
- package/rows/TwoColFourStories/index.js +395 -2915
- package/rows/TwoColFourStories/styles.arrow.css +1 -1
- package/rows/TwoColFourStoryHighlight/index.js +398 -2924
- package/rows/TwoColFourStoryHighlight/styles.arrow.css +1 -1
- package/rows/TwoColSevenStories/index.js +400 -2920
- package/rows/TwoColSevenStories/styles.arrow.css +1 -1
- package/rows/TwoColSixStories/index.js +398 -2924
- package/rows/TwoColSixStories/styles.arrow.css +1 -1
- package/rows/TwoColTenStoriesSidebar/index.js +418 -2938
- package/rows/TwoColTenStoriesSidebar/styles.arrow.css +1 -1
- package/rows/TwoColThreeStories/index.js +392 -2912
- package/rows/TwoColThreeStories/styles.arrow.css +1 -1
- package/story-elements/AlsoRead/index.js +92 -2229
- package/story-elements/AlsoRead/styles.arrow.css +1 -1
- package/story-elements/Attachment/index.js +53 -1899
- package/story-elements/Attachment/styles.arrow.css +1 -1
- package/story-elements/BigFact/index.js +49 -1895
- package/story-elements/BigFact/styles.arrow.css +1 -1
- package/story-elements/BlockQuote/index.js +79 -2206
- package/story-elements/BlockQuote/styles.arrow.css +1 -1
- package/story-elements/Blurb/index.js +52 -1957
- package/story-elements/Blurb/styles.arrow.css +1 -1
- package/story-elements/Image/index.js +147 -2329
- package/story-elements/Image/styles.arrow.css +1 -1
- package/story-elements/ImageGallery/index.js +135 -2317
- package/story-elements/ImageGallery/styles.arrow.css +1 -1
- package/story-elements/ImageSlideshow/index.js +173 -2355
- package/story-elements/ImageSlideshow/styles.arrow.css +1 -1
- package/story-elements/QuestionAnswer/index.js +79 -2207
- package/story-elements/QuestionAnswer/styles.arrow.css +1 -1
- package/story-elements/Quote/index.js +52 -1898
- package/story-elements/Quote/styles.arrow.css +1 -1
- package/story-elements/Reference/index.js +53 -1899
- package/story-elements/Reference/styles.arrow.css +1 -1
- package/story-elements/StoryElement/index.js +34 -1738
- package/story-elements/Summary/index.js +56 -1902
- package/story-elements/Summary/styles.arrow.css +1 -1
- package/story-elements/Text/index.js +48 -2176
- package/story-elements/Text/styles.arrow.css +1 -1
- package/story-elements/Video/index.js +35 -1739
- package/story-elements/Video/styles.arrow.css +1 -1
- package/story-templates/ListicleStoryTemplate/index.js +1182 -4038
- package/story-templates/ListicleStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/LiveBlogStoryTemplate/index.js +1377 -4233
- package/story-templates/LiveBlogStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/PhotoStoryTemplate/index.js +1162 -4018
- package/story-templates/PhotoStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/TextStoryTemplate/index.js +1277 -4133
- package/story-templates/TextStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/VideoStoryTemplate/index.js +1231 -4087
- package/story-templates/VideoStoryTemplate/styles.arrow.css +1 -1
- package/atoms/ExtendedLoadMore/index-e39b3ca8.js +0 -3023
- package/atoms/ExtendedLoadMore/index-f6e578e3.js +0 -86
|
@@ -1,2493 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
handleMissingStyleName: 'throw'
|
|
31
|
-
};
|
|
32
|
-
var _default = optionsDefaults;
|
|
33
|
-
exports["default"] = _default;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
var getClassName = createCommonjsModule(function (module, exports) {
|
|
39
|
-
|
|
40
|
-
Object.defineProperty(exports, "__esModule", {
|
|
41
|
-
value: true
|
|
42
|
-
});
|
|
43
|
-
exports["default"] = void 0;
|
|
44
|
-
|
|
45
|
-
var _optionsDefaults = _interopRequireDefault(optionsDefaults_1);
|
|
46
|
-
|
|
47
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
48
|
-
|
|
49
|
-
var isNamespacedStyleName = function isNamespacedStyleName(styleName) {
|
|
50
|
-
return styleName.indexOf('.') !== -1;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
var handleError = function handleError(message, handleMissingStyleName) {
|
|
54
|
-
if (handleMissingStyleName === 'throw') {
|
|
55
|
-
throw new Error(message);
|
|
56
|
-
} else if (handleMissingStyleName === 'warn') {
|
|
57
|
-
// eslint-disable-next-line no-console
|
|
58
|
-
console.warn(message);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
return null;
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
var getClassNameForNamespacedStyleName = function getClassNameForNamespacedStyleName(styleName, styleModuleImportMap, handleMissingStyleNameOption) {
|
|
65
|
-
// Note:
|
|
66
|
-
// Do not use the desctructing syntax with Babel.
|
|
67
|
-
// Desctructing adds _slicedToArray helper.
|
|
68
|
-
var styleNameParts = styleName.split('.');
|
|
69
|
-
var importName = styleNameParts[0];
|
|
70
|
-
var moduleName = styleNameParts[1];
|
|
71
|
-
var handleMissingStyleName = handleMissingStyleNameOption || _optionsDefaults["default"].handleMissingStyleName;
|
|
72
|
-
|
|
73
|
-
if (!moduleName) {
|
|
74
|
-
return handleError('Invalid style name: ' + styleName, handleMissingStyleName);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
if (!styleModuleImportMap[importName]) {
|
|
78
|
-
return handleError('CSS module import does not exist: ' + importName, handleMissingStyleName);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
if (!styleModuleImportMap[importName][moduleName]) {
|
|
82
|
-
return handleError('CSS module does not exist: ' + moduleName, handleMissingStyleName);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
return styleModuleImportMap[importName][moduleName];
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
var getClassNameFromMultipleImports = function getClassNameFromMultipleImports(styleName, styleModuleImportMap, handleMissingStyleNameOption) {
|
|
89
|
-
var handleMissingStyleName = handleMissingStyleNameOption || _optionsDefaults["default"].handleMissingStyleName;
|
|
90
|
-
var importKeysWithMatches = Object.keys(styleModuleImportMap).map(function (importKey) {
|
|
91
|
-
return styleModuleImportMap[importKey][styleName] && importKey;
|
|
92
|
-
}).filter(function (importKey) {
|
|
93
|
-
return importKey;
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
if (importKeysWithMatches.length > 1) {
|
|
97
|
-
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');
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
if (importKeysWithMatches.length === 0) {
|
|
101
|
-
return handleError('Could not resolve the styleName \'' + styleName + '\'.', handleMissingStyleName);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
return styleModuleImportMap[importKeysWithMatches[0]][styleName];
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
var _default = function _default(styleNameValue, styleModuleImportMap, options) {
|
|
108
|
-
var styleModuleImportMapKeys = Object.keys(styleModuleImportMap);
|
|
109
|
-
|
|
110
|
-
var _ref = options || {},
|
|
111
|
-
_ref$handleMissingSty = _ref.handleMissingStyleName,
|
|
112
|
-
handleMissingStyleName = _ref$handleMissingSty === void 0 ? _optionsDefaults["default"].handleMissingStyleName : _ref$handleMissingSty,
|
|
113
|
-
_ref$autoResolveMulti = _ref.autoResolveMultipleImports,
|
|
114
|
-
autoResolveMultipleImports = _ref$autoResolveMulti === void 0 ? _optionsDefaults["default"].autoResolveMultipleImports : _ref$autoResolveMulti;
|
|
115
|
-
|
|
116
|
-
if (!styleNameValue) {
|
|
117
|
-
return '';
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
return styleNameValue.split(' ').filter(function (styleName) {
|
|
121
|
-
return styleName;
|
|
122
|
-
}).map(function (styleName) {
|
|
123
|
-
if (isNamespacedStyleName(styleName)) {
|
|
124
|
-
return getClassNameForNamespacedStyleName(styleName, styleModuleImportMap, handleMissingStyleName);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
if (styleModuleImportMapKeys.length === 0) {
|
|
128
|
-
throw new Error('Cannot use styleName attribute for style name \'' + styleName + '\' without importing at least one stylesheet.');
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
if (styleModuleImportMapKeys.length > 1) {
|
|
132
|
-
if (!autoResolveMultipleImports) {
|
|
133
|
-
throw new Error('Cannot use anonymous style name \'' + styleName + '\' with more than one stylesheet import without setting \'autoResolveMultipleImports\' to true.');
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
return getClassNameFromMultipleImports(styleName, styleModuleImportMap, handleMissingStyleName);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
var styleModuleMap = styleModuleImportMap[styleModuleImportMapKeys[0]];
|
|
140
|
-
|
|
141
|
-
if (!styleModuleMap[styleName]) {
|
|
142
|
-
return handleError('Could not resolve the styleName \'' + styleName + '\'.', handleMissingStyleName);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
return styleModuleMap[styleName];
|
|
146
|
-
}).filter(function (className) {
|
|
147
|
-
// Remove any styles which could not be found (if handleMissingStyleName === 'ignore')
|
|
148
|
-
return className;
|
|
149
|
-
}).join(' ');
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
exports["default"] = _default;
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
});
|
|
156
|
-
|
|
157
|
-
var _getClassName = /*@__PURE__*/getDefaultExportFromCjs(getClassName);
|
|
158
|
-
|
|
159
|
-
var StateContext = /*#__PURE__*/createContext(); // eslint-disable-next-line react/display-name
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _getClassName = require('babel-plugin-react-css-modules/dist/browser/getClassName');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var PropTypes = require('prop-types');
|
|
8
|
+
var components = require('@quintype/components');
|
|
9
|
+
require('@babel/runtime/helpers/asyncToGenerator');
|
|
10
|
+
var _typeof = require('@babel/runtime/helpers/typeof');
|
|
11
|
+
require('@babel/runtime/regenerator');
|
|
12
|
+
var lodash = require('lodash');
|
|
13
|
+
var Timeago = require('react-timeago');
|
|
14
|
+
var dateFnsTz = require('date-fns-tz');
|
|
15
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
16
|
+
var reactRedux = require('react-redux');
|
|
17
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
18
|
+
|
|
19
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
20
|
+
|
|
21
|
+
var _getClassName__default = /*#__PURE__*/_interopDefaultLegacy(_getClassName);
|
|
22
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
23
|
+
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
24
|
+
var _typeof__default = /*#__PURE__*/_interopDefaultLegacy(_typeof);
|
|
25
|
+
var Timeago__default = /*#__PURE__*/_interopDefaultLegacy(Timeago);
|
|
26
|
+
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
|
|
27
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
28
|
+
|
|
29
|
+
var StateContext = /*#__PURE__*/React.createContext(); // eslint-disable-next-line react/display-name
|
|
160
30
|
|
|
161
31
|
var StateProvider = function StateProvider(RowComponent) {
|
|
162
32
|
return function (props) {
|
|
163
33
|
return (
|
|
164
34
|
/*#__PURE__*/
|
|
165
35
|
// eslint-disable-next-line react/prop-types
|
|
166
|
-
|
|
36
|
+
React__default["default"].createElement(StateContext.Provider, {
|
|
167
37
|
value: props.config
|
|
168
|
-
}, /*#__PURE__*/
|
|
38
|
+
}, /*#__PURE__*/React__default["default"].createElement(RowComponent, props))
|
|
169
39
|
);
|
|
170
40
|
};
|
|
171
41
|
};
|
|
172
42
|
var useStateValue = function useStateValue() {
|
|
173
|
-
return useContext(StateContext);
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
function _typeof(obj) {
|
|
177
|
-
"@babel/helpers - typeof";
|
|
178
|
-
|
|
179
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
180
|
-
return typeof obj;
|
|
181
|
-
} : function (obj) {
|
|
182
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
183
|
-
}, _typeof(obj);
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
/**
|
|
187
|
-
* Copyright (c) 2014-present, Facebook, Inc.
|
|
188
|
-
*
|
|
189
|
-
* This source code is licensed under the MIT license found in the
|
|
190
|
-
* LICENSE file in the root directory of this source tree.
|
|
191
|
-
*/
|
|
192
|
-
|
|
193
|
-
createCommonjsModule(function (module) {
|
|
194
|
-
var runtime = (function (exports) {
|
|
195
|
-
|
|
196
|
-
var Op = Object.prototype;
|
|
197
|
-
var hasOwn = Op.hasOwnProperty;
|
|
198
|
-
var undefined$1; // More compressible than void 0.
|
|
199
|
-
var $Symbol = typeof Symbol === "function" ? Symbol : {};
|
|
200
|
-
var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
|
201
|
-
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
|
202
|
-
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
203
|
-
|
|
204
|
-
function define(obj, key, value) {
|
|
205
|
-
Object.defineProperty(obj, key, {
|
|
206
|
-
value: value,
|
|
207
|
-
enumerable: true,
|
|
208
|
-
configurable: true,
|
|
209
|
-
writable: true
|
|
210
|
-
});
|
|
211
|
-
return obj[key];
|
|
212
|
-
}
|
|
213
|
-
try {
|
|
214
|
-
// IE 8 has a broken Object.defineProperty that only works on DOM objects.
|
|
215
|
-
define({}, "");
|
|
216
|
-
} catch (err) {
|
|
217
|
-
define = function(obj, key, value) {
|
|
218
|
-
return obj[key] = value;
|
|
219
|
-
};
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
223
|
-
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
|
|
224
|
-
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
|
|
225
|
-
var generator = Object.create(protoGenerator.prototype);
|
|
226
|
-
var context = new Context(tryLocsList || []);
|
|
227
|
-
|
|
228
|
-
// The ._invoke method unifies the implementations of the .next,
|
|
229
|
-
// .throw, and .return methods.
|
|
230
|
-
generator._invoke = makeInvokeMethod(innerFn, self, context);
|
|
231
|
-
|
|
232
|
-
return generator;
|
|
233
|
-
}
|
|
234
|
-
exports.wrap = wrap;
|
|
235
|
-
|
|
236
|
-
// Try/catch helper to minimize deoptimizations. Returns a completion
|
|
237
|
-
// record like context.tryEntries[i].completion. This interface could
|
|
238
|
-
// have been (and was previously) designed to take a closure to be
|
|
239
|
-
// invoked without arguments, but in all the cases we care about we
|
|
240
|
-
// already have an existing method we want to call, so there's no need
|
|
241
|
-
// to create a new function object. We can even get away with assuming
|
|
242
|
-
// the method takes exactly one argument, since that happens to be true
|
|
243
|
-
// in every case, so we don't have to touch the arguments object. The
|
|
244
|
-
// only additional allocation required is the completion record, which
|
|
245
|
-
// has a stable shape and so hopefully should be cheap to allocate.
|
|
246
|
-
function tryCatch(fn, obj, arg) {
|
|
247
|
-
try {
|
|
248
|
-
return { type: "normal", arg: fn.call(obj, arg) };
|
|
249
|
-
} catch (err) {
|
|
250
|
-
return { type: "throw", arg: err };
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
var GenStateSuspendedStart = "suspendedStart";
|
|
255
|
-
var GenStateSuspendedYield = "suspendedYield";
|
|
256
|
-
var GenStateExecuting = "executing";
|
|
257
|
-
var GenStateCompleted = "completed";
|
|
258
|
-
|
|
259
|
-
// Returning this object from the innerFn has the same effect as
|
|
260
|
-
// breaking out of the dispatch switch statement.
|
|
261
|
-
var ContinueSentinel = {};
|
|
262
|
-
|
|
263
|
-
// Dummy constructor functions that we use as the .constructor and
|
|
264
|
-
// .constructor.prototype properties for functions that return Generator
|
|
265
|
-
// objects. For full spec compliance, you may wish to configure your
|
|
266
|
-
// minifier not to mangle the names of these two functions.
|
|
267
|
-
function Generator() {}
|
|
268
|
-
function GeneratorFunction() {}
|
|
269
|
-
function GeneratorFunctionPrototype() {}
|
|
270
|
-
|
|
271
|
-
// This is a polyfill for %IteratorPrototype% for environments that
|
|
272
|
-
// don't natively support it.
|
|
273
|
-
var IteratorPrototype = {};
|
|
274
|
-
define(IteratorPrototype, iteratorSymbol, function () {
|
|
275
|
-
return this;
|
|
276
|
-
});
|
|
277
|
-
|
|
278
|
-
var getProto = Object.getPrototypeOf;
|
|
279
|
-
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
280
|
-
if (NativeIteratorPrototype &&
|
|
281
|
-
NativeIteratorPrototype !== Op &&
|
|
282
|
-
hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
|
|
283
|
-
// This environment has a native %IteratorPrototype%; use it instead
|
|
284
|
-
// of the polyfill.
|
|
285
|
-
IteratorPrototype = NativeIteratorPrototype;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
var Gp = GeneratorFunctionPrototype.prototype =
|
|
289
|
-
Generator.prototype = Object.create(IteratorPrototype);
|
|
290
|
-
GeneratorFunction.prototype = GeneratorFunctionPrototype;
|
|
291
|
-
define(Gp, "constructor", GeneratorFunctionPrototype);
|
|
292
|
-
define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
|
|
293
|
-
GeneratorFunction.displayName = define(
|
|
294
|
-
GeneratorFunctionPrototype,
|
|
295
|
-
toStringTagSymbol,
|
|
296
|
-
"GeneratorFunction"
|
|
297
|
-
);
|
|
298
|
-
|
|
299
|
-
// Helper for defining the .next, .throw, and .return methods of the
|
|
300
|
-
// Iterator interface in terms of a single ._invoke method.
|
|
301
|
-
function defineIteratorMethods(prototype) {
|
|
302
|
-
["next", "throw", "return"].forEach(function(method) {
|
|
303
|
-
define(prototype, method, function(arg) {
|
|
304
|
-
return this._invoke(method, arg);
|
|
305
|
-
});
|
|
306
|
-
});
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
exports.isGeneratorFunction = function(genFun) {
|
|
310
|
-
var ctor = typeof genFun === "function" && genFun.constructor;
|
|
311
|
-
return ctor
|
|
312
|
-
? ctor === GeneratorFunction ||
|
|
313
|
-
// For the native GeneratorFunction constructor, the best we can
|
|
314
|
-
// do is to check its .name property.
|
|
315
|
-
(ctor.displayName || ctor.name) === "GeneratorFunction"
|
|
316
|
-
: false;
|
|
317
|
-
};
|
|
318
|
-
|
|
319
|
-
exports.mark = function(genFun) {
|
|
320
|
-
if (Object.setPrototypeOf) {
|
|
321
|
-
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
|
|
322
|
-
} else {
|
|
323
|
-
genFun.__proto__ = GeneratorFunctionPrototype;
|
|
324
|
-
define(genFun, toStringTagSymbol, "GeneratorFunction");
|
|
325
|
-
}
|
|
326
|
-
genFun.prototype = Object.create(Gp);
|
|
327
|
-
return genFun;
|
|
328
|
-
};
|
|
329
|
-
|
|
330
|
-
// Within the body of any async function, `await x` is transformed to
|
|
331
|
-
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
|
|
332
|
-
// `hasOwn.call(value, "__await")` to determine if the yielded value is
|
|
333
|
-
// meant to be awaited.
|
|
334
|
-
exports.awrap = function(arg) {
|
|
335
|
-
return { __await: arg };
|
|
336
|
-
};
|
|
337
|
-
|
|
338
|
-
function AsyncIterator(generator, PromiseImpl) {
|
|
339
|
-
function invoke(method, arg, resolve, reject) {
|
|
340
|
-
var record = tryCatch(generator[method], generator, arg);
|
|
341
|
-
if (record.type === "throw") {
|
|
342
|
-
reject(record.arg);
|
|
343
|
-
} else {
|
|
344
|
-
var result = record.arg;
|
|
345
|
-
var value = result.value;
|
|
346
|
-
if (value &&
|
|
347
|
-
typeof value === "object" &&
|
|
348
|
-
hasOwn.call(value, "__await")) {
|
|
349
|
-
return PromiseImpl.resolve(value.__await).then(function(value) {
|
|
350
|
-
invoke("next", value, resolve, reject);
|
|
351
|
-
}, function(err) {
|
|
352
|
-
invoke("throw", err, resolve, reject);
|
|
353
|
-
});
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
return PromiseImpl.resolve(value).then(function(unwrapped) {
|
|
357
|
-
// When a yielded Promise is resolved, its final value becomes
|
|
358
|
-
// the .value of the Promise<{value,done}> result for the
|
|
359
|
-
// current iteration.
|
|
360
|
-
result.value = unwrapped;
|
|
361
|
-
resolve(result);
|
|
362
|
-
}, function(error) {
|
|
363
|
-
// If a rejected Promise was yielded, throw the rejection back
|
|
364
|
-
// into the async generator function so it can be handled there.
|
|
365
|
-
return invoke("throw", error, resolve, reject);
|
|
366
|
-
});
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
var previousPromise;
|
|
371
|
-
|
|
372
|
-
function enqueue(method, arg) {
|
|
373
|
-
function callInvokeWithMethodAndArg() {
|
|
374
|
-
return new PromiseImpl(function(resolve, reject) {
|
|
375
|
-
invoke(method, arg, resolve, reject);
|
|
376
|
-
});
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
return previousPromise =
|
|
380
|
-
// If enqueue has been called before, then we want to wait until
|
|
381
|
-
// all previous Promises have been resolved before calling invoke,
|
|
382
|
-
// so that results are always delivered in the correct order. If
|
|
383
|
-
// enqueue has not been called before, then it is important to
|
|
384
|
-
// call invoke immediately, without waiting on a callback to fire,
|
|
385
|
-
// so that the async generator function has the opportunity to do
|
|
386
|
-
// any necessary setup in a predictable way. This predictability
|
|
387
|
-
// is why the Promise constructor synchronously invokes its
|
|
388
|
-
// executor callback, and why async functions synchronously
|
|
389
|
-
// execute code before the first await. Since we implement simple
|
|
390
|
-
// async functions in terms of async generators, it is especially
|
|
391
|
-
// important to get this right, even though it requires care.
|
|
392
|
-
previousPromise ? previousPromise.then(
|
|
393
|
-
callInvokeWithMethodAndArg,
|
|
394
|
-
// Avoid propagating failures to Promises returned by later
|
|
395
|
-
// invocations of the iterator.
|
|
396
|
-
callInvokeWithMethodAndArg
|
|
397
|
-
) : callInvokeWithMethodAndArg();
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
// Define the unified helper method that is used to implement .next,
|
|
401
|
-
// .throw, and .return (see defineIteratorMethods).
|
|
402
|
-
this._invoke = enqueue;
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
defineIteratorMethods(AsyncIterator.prototype);
|
|
406
|
-
define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
407
|
-
return this;
|
|
408
|
-
});
|
|
409
|
-
exports.AsyncIterator = AsyncIterator;
|
|
410
|
-
|
|
411
|
-
// Note that simple async functions are implemented on top of
|
|
412
|
-
// AsyncIterator objects; they just return a Promise for the value of
|
|
413
|
-
// the final result produced by the iterator.
|
|
414
|
-
exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
415
|
-
if (PromiseImpl === void 0) PromiseImpl = Promise;
|
|
416
|
-
|
|
417
|
-
var iter = new AsyncIterator(
|
|
418
|
-
wrap(innerFn, outerFn, self, tryLocsList),
|
|
419
|
-
PromiseImpl
|
|
420
|
-
);
|
|
421
|
-
|
|
422
|
-
return exports.isGeneratorFunction(outerFn)
|
|
423
|
-
? iter // If outerFn is a generator, return the full iterator.
|
|
424
|
-
: iter.next().then(function(result) {
|
|
425
|
-
return result.done ? result.value : iter.next();
|
|
426
|
-
});
|
|
427
|
-
};
|
|
428
|
-
|
|
429
|
-
function makeInvokeMethod(innerFn, self, context) {
|
|
430
|
-
var state = GenStateSuspendedStart;
|
|
431
|
-
|
|
432
|
-
return function invoke(method, arg) {
|
|
433
|
-
if (state === GenStateExecuting) {
|
|
434
|
-
throw new Error("Generator is already running");
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
if (state === GenStateCompleted) {
|
|
438
|
-
if (method === "throw") {
|
|
439
|
-
throw arg;
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
// Be forgiving, per 25.3.3.3.3 of the spec:
|
|
443
|
-
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
|
|
444
|
-
return doneResult();
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
context.method = method;
|
|
448
|
-
context.arg = arg;
|
|
449
|
-
|
|
450
|
-
while (true) {
|
|
451
|
-
var delegate = context.delegate;
|
|
452
|
-
if (delegate) {
|
|
453
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
454
|
-
if (delegateResult) {
|
|
455
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
456
|
-
return delegateResult;
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
if (context.method === "next") {
|
|
461
|
-
// Setting context._sent for legacy support of Babel's
|
|
462
|
-
// function.sent implementation.
|
|
463
|
-
context.sent = context._sent = context.arg;
|
|
464
|
-
|
|
465
|
-
} else if (context.method === "throw") {
|
|
466
|
-
if (state === GenStateSuspendedStart) {
|
|
467
|
-
state = GenStateCompleted;
|
|
468
|
-
throw context.arg;
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
context.dispatchException(context.arg);
|
|
472
|
-
|
|
473
|
-
} else if (context.method === "return") {
|
|
474
|
-
context.abrupt("return", context.arg);
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
state = GenStateExecuting;
|
|
478
|
-
|
|
479
|
-
var record = tryCatch(innerFn, self, context);
|
|
480
|
-
if (record.type === "normal") {
|
|
481
|
-
// If an exception is thrown from innerFn, we leave state ===
|
|
482
|
-
// GenStateExecuting and loop back for another invocation.
|
|
483
|
-
state = context.done
|
|
484
|
-
? GenStateCompleted
|
|
485
|
-
: GenStateSuspendedYield;
|
|
486
|
-
|
|
487
|
-
if (record.arg === ContinueSentinel) {
|
|
488
|
-
continue;
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
return {
|
|
492
|
-
value: record.arg,
|
|
493
|
-
done: context.done
|
|
494
|
-
};
|
|
495
|
-
|
|
496
|
-
} else if (record.type === "throw") {
|
|
497
|
-
state = GenStateCompleted;
|
|
498
|
-
// Dispatch the exception by looping back around to the
|
|
499
|
-
// context.dispatchException(context.arg) call above.
|
|
500
|
-
context.method = "throw";
|
|
501
|
-
context.arg = record.arg;
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
};
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
// Call delegate.iterator[context.method](context.arg) and handle the
|
|
508
|
-
// result, either by returning a { value, done } result from the
|
|
509
|
-
// delegate iterator, or by modifying context.method and context.arg,
|
|
510
|
-
// setting context.delegate to null, and returning the ContinueSentinel.
|
|
511
|
-
function maybeInvokeDelegate(delegate, context) {
|
|
512
|
-
var method = delegate.iterator[context.method];
|
|
513
|
-
if (method === undefined$1) {
|
|
514
|
-
// A .throw or .return when the delegate iterator has no .throw
|
|
515
|
-
// method always terminates the yield* loop.
|
|
516
|
-
context.delegate = null;
|
|
517
|
-
|
|
518
|
-
if (context.method === "throw") {
|
|
519
|
-
// Note: ["return"] must be used for ES3 parsing compatibility.
|
|
520
|
-
if (delegate.iterator["return"]) {
|
|
521
|
-
// If the delegate iterator has a return method, give it a
|
|
522
|
-
// chance to clean up.
|
|
523
|
-
context.method = "return";
|
|
524
|
-
context.arg = undefined$1;
|
|
525
|
-
maybeInvokeDelegate(delegate, context);
|
|
526
|
-
|
|
527
|
-
if (context.method === "throw") {
|
|
528
|
-
// If maybeInvokeDelegate(context) changed context.method from
|
|
529
|
-
// "return" to "throw", let that override the TypeError below.
|
|
530
|
-
return ContinueSentinel;
|
|
531
|
-
}
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
context.method = "throw";
|
|
535
|
-
context.arg = new TypeError(
|
|
536
|
-
"The iterator does not provide a 'throw' method");
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
return ContinueSentinel;
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
543
|
-
|
|
544
|
-
if (record.type === "throw") {
|
|
545
|
-
context.method = "throw";
|
|
546
|
-
context.arg = record.arg;
|
|
547
|
-
context.delegate = null;
|
|
548
|
-
return ContinueSentinel;
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
var info = record.arg;
|
|
552
|
-
|
|
553
|
-
if (! info) {
|
|
554
|
-
context.method = "throw";
|
|
555
|
-
context.arg = new TypeError("iterator result is not an object");
|
|
556
|
-
context.delegate = null;
|
|
557
|
-
return ContinueSentinel;
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
if (info.done) {
|
|
561
|
-
// Assign the result of the finished delegate to the temporary
|
|
562
|
-
// variable specified by delegate.resultName (see delegateYield).
|
|
563
|
-
context[delegate.resultName] = info.value;
|
|
564
|
-
|
|
565
|
-
// Resume execution at the desired location (see delegateYield).
|
|
566
|
-
context.next = delegate.nextLoc;
|
|
567
|
-
|
|
568
|
-
// If context.method was "throw" but the delegate handled the
|
|
569
|
-
// exception, let the outer generator proceed normally. If
|
|
570
|
-
// context.method was "next", forget context.arg since it has been
|
|
571
|
-
// "consumed" by the delegate iterator. If context.method was
|
|
572
|
-
// "return", allow the original .return call to continue in the
|
|
573
|
-
// outer generator.
|
|
574
|
-
if (context.method !== "return") {
|
|
575
|
-
context.method = "next";
|
|
576
|
-
context.arg = undefined$1;
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
} else {
|
|
580
|
-
// Re-yield the result returned by the delegate method.
|
|
581
|
-
return info;
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
// The delegate iterator is finished, so forget it and continue with
|
|
585
|
-
// the outer generator.
|
|
586
|
-
context.delegate = null;
|
|
587
|
-
return ContinueSentinel;
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
// Define Generator.prototype.{next,throw,return} in terms of the
|
|
591
|
-
// unified ._invoke helper method.
|
|
592
|
-
defineIteratorMethods(Gp);
|
|
593
|
-
|
|
594
|
-
define(Gp, toStringTagSymbol, "Generator");
|
|
595
|
-
|
|
596
|
-
// A Generator should always return itself as the iterator object when the
|
|
597
|
-
// @@iterator function is called on it. Some browsers' implementations of the
|
|
598
|
-
// iterator prototype chain incorrectly implement this, causing the Generator
|
|
599
|
-
// object to not be returned from this call. This ensures that doesn't happen.
|
|
600
|
-
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
|
601
|
-
define(Gp, iteratorSymbol, function() {
|
|
602
|
-
return this;
|
|
603
|
-
});
|
|
604
|
-
|
|
605
|
-
define(Gp, "toString", function() {
|
|
606
|
-
return "[object Generator]";
|
|
607
|
-
});
|
|
608
|
-
|
|
609
|
-
function pushTryEntry(locs) {
|
|
610
|
-
var entry = { tryLoc: locs[0] };
|
|
611
|
-
|
|
612
|
-
if (1 in locs) {
|
|
613
|
-
entry.catchLoc = locs[1];
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
if (2 in locs) {
|
|
617
|
-
entry.finallyLoc = locs[2];
|
|
618
|
-
entry.afterLoc = locs[3];
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
this.tryEntries.push(entry);
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
function resetTryEntry(entry) {
|
|
625
|
-
var record = entry.completion || {};
|
|
626
|
-
record.type = "normal";
|
|
627
|
-
delete record.arg;
|
|
628
|
-
entry.completion = record;
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
function Context(tryLocsList) {
|
|
632
|
-
// The root entry object (effectively a try statement without a catch
|
|
633
|
-
// or a finally block) gives us a place to store values thrown from
|
|
634
|
-
// locations where there is no enclosing try statement.
|
|
635
|
-
this.tryEntries = [{ tryLoc: "root" }];
|
|
636
|
-
tryLocsList.forEach(pushTryEntry, this);
|
|
637
|
-
this.reset(true);
|
|
638
|
-
}
|
|
639
|
-
|
|
640
|
-
exports.keys = function(object) {
|
|
641
|
-
var keys = [];
|
|
642
|
-
for (var key in object) {
|
|
643
|
-
keys.push(key);
|
|
644
|
-
}
|
|
645
|
-
keys.reverse();
|
|
646
|
-
|
|
647
|
-
// Rather than returning an object with a next method, we keep
|
|
648
|
-
// things simple and return the next function itself.
|
|
649
|
-
return function next() {
|
|
650
|
-
while (keys.length) {
|
|
651
|
-
var key = keys.pop();
|
|
652
|
-
if (key in object) {
|
|
653
|
-
next.value = key;
|
|
654
|
-
next.done = false;
|
|
655
|
-
return next;
|
|
656
|
-
}
|
|
657
|
-
}
|
|
658
|
-
|
|
659
|
-
// To avoid creating an additional object, we just hang the .value
|
|
660
|
-
// and .done properties off the next function object itself. This
|
|
661
|
-
// also ensures that the minifier will not anonymize the function.
|
|
662
|
-
next.done = true;
|
|
663
|
-
return next;
|
|
664
|
-
};
|
|
665
|
-
};
|
|
666
|
-
|
|
667
|
-
function values(iterable) {
|
|
668
|
-
if (iterable) {
|
|
669
|
-
var iteratorMethod = iterable[iteratorSymbol];
|
|
670
|
-
if (iteratorMethod) {
|
|
671
|
-
return iteratorMethod.call(iterable);
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
if (typeof iterable.next === "function") {
|
|
675
|
-
return iterable;
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
if (!isNaN(iterable.length)) {
|
|
679
|
-
var i = -1, next = function next() {
|
|
680
|
-
while (++i < iterable.length) {
|
|
681
|
-
if (hasOwn.call(iterable, i)) {
|
|
682
|
-
next.value = iterable[i];
|
|
683
|
-
next.done = false;
|
|
684
|
-
return next;
|
|
685
|
-
}
|
|
686
|
-
}
|
|
687
|
-
|
|
688
|
-
next.value = undefined$1;
|
|
689
|
-
next.done = true;
|
|
690
|
-
|
|
691
|
-
return next;
|
|
692
|
-
};
|
|
693
|
-
|
|
694
|
-
return next.next = next;
|
|
695
|
-
}
|
|
696
|
-
}
|
|
697
|
-
|
|
698
|
-
// Return an iterator with no values.
|
|
699
|
-
return { next: doneResult };
|
|
700
|
-
}
|
|
701
|
-
exports.values = values;
|
|
702
|
-
|
|
703
|
-
function doneResult() {
|
|
704
|
-
return { value: undefined$1, done: true };
|
|
705
|
-
}
|
|
706
|
-
|
|
707
|
-
Context.prototype = {
|
|
708
|
-
constructor: Context,
|
|
709
|
-
|
|
710
|
-
reset: function(skipTempReset) {
|
|
711
|
-
this.prev = 0;
|
|
712
|
-
this.next = 0;
|
|
713
|
-
// Resetting context._sent for legacy support of Babel's
|
|
714
|
-
// function.sent implementation.
|
|
715
|
-
this.sent = this._sent = undefined$1;
|
|
716
|
-
this.done = false;
|
|
717
|
-
this.delegate = null;
|
|
718
|
-
|
|
719
|
-
this.method = "next";
|
|
720
|
-
this.arg = undefined$1;
|
|
721
|
-
|
|
722
|
-
this.tryEntries.forEach(resetTryEntry);
|
|
723
|
-
|
|
724
|
-
if (!skipTempReset) {
|
|
725
|
-
for (var name in this) {
|
|
726
|
-
// Not sure about the optimal order of these conditions:
|
|
727
|
-
if (name.charAt(0) === "t" &&
|
|
728
|
-
hasOwn.call(this, name) &&
|
|
729
|
-
!isNaN(+name.slice(1))) {
|
|
730
|
-
this[name] = undefined$1;
|
|
731
|
-
}
|
|
732
|
-
}
|
|
733
|
-
}
|
|
734
|
-
},
|
|
735
|
-
|
|
736
|
-
stop: function() {
|
|
737
|
-
this.done = true;
|
|
738
|
-
|
|
739
|
-
var rootEntry = this.tryEntries[0];
|
|
740
|
-
var rootRecord = rootEntry.completion;
|
|
741
|
-
if (rootRecord.type === "throw") {
|
|
742
|
-
throw rootRecord.arg;
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
return this.rval;
|
|
746
|
-
},
|
|
747
|
-
|
|
748
|
-
dispatchException: function(exception) {
|
|
749
|
-
if (this.done) {
|
|
750
|
-
throw exception;
|
|
751
|
-
}
|
|
752
|
-
|
|
753
|
-
var context = this;
|
|
754
|
-
function handle(loc, caught) {
|
|
755
|
-
record.type = "throw";
|
|
756
|
-
record.arg = exception;
|
|
757
|
-
context.next = loc;
|
|
758
|
-
|
|
759
|
-
if (caught) {
|
|
760
|
-
// If the dispatched exception was caught by a catch block,
|
|
761
|
-
// then let that catch block handle the exception normally.
|
|
762
|
-
context.method = "next";
|
|
763
|
-
context.arg = undefined$1;
|
|
764
|
-
}
|
|
765
|
-
|
|
766
|
-
return !! caught;
|
|
767
|
-
}
|
|
768
|
-
|
|
769
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
770
|
-
var entry = this.tryEntries[i];
|
|
771
|
-
var record = entry.completion;
|
|
772
|
-
|
|
773
|
-
if (entry.tryLoc === "root") {
|
|
774
|
-
// Exception thrown outside of any try block that could handle
|
|
775
|
-
// it, so set the completion value of the entire function to
|
|
776
|
-
// throw the exception.
|
|
777
|
-
return handle("end");
|
|
778
|
-
}
|
|
779
|
-
|
|
780
|
-
if (entry.tryLoc <= this.prev) {
|
|
781
|
-
var hasCatch = hasOwn.call(entry, "catchLoc");
|
|
782
|
-
var hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
783
|
-
|
|
784
|
-
if (hasCatch && hasFinally) {
|
|
785
|
-
if (this.prev < entry.catchLoc) {
|
|
786
|
-
return handle(entry.catchLoc, true);
|
|
787
|
-
} else if (this.prev < entry.finallyLoc) {
|
|
788
|
-
return handle(entry.finallyLoc);
|
|
789
|
-
}
|
|
790
|
-
|
|
791
|
-
} else if (hasCatch) {
|
|
792
|
-
if (this.prev < entry.catchLoc) {
|
|
793
|
-
return handle(entry.catchLoc, true);
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
} else if (hasFinally) {
|
|
797
|
-
if (this.prev < entry.finallyLoc) {
|
|
798
|
-
return handle(entry.finallyLoc);
|
|
799
|
-
}
|
|
800
|
-
|
|
801
|
-
} else {
|
|
802
|
-
throw new Error("try statement without catch or finally");
|
|
803
|
-
}
|
|
804
|
-
}
|
|
805
|
-
}
|
|
806
|
-
},
|
|
807
|
-
|
|
808
|
-
abrupt: function(type, arg) {
|
|
809
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
810
|
-
var entry = this.tryEntries[i];
|
|
811
|
-
if (entry.tryLoc <= this.prev &&
|
|
812
|
-
hasOwn.call(entry, "finallyLoc") &&
|
|
813
|
-
this.prev < entry.finallyLoc) {
|
|
814
|
-
var finallyEntry = entry;
|
|
815
|
-
break;
|
|
816
|
-
}
|
|
817
|
-
}
|
|
818
|
-
|
|
819
|
-
if (finallyEntry &&
|
|
820
|
-
(type === "break" ||
|
|
821
|
-
type === "continue") &&
|
|
822
|
-
finallyEntry.tryLoc <= arg &&
|
|
823
|
-
arg <= finallyEntry.finallyLoc) {
|
|
824
|
-
// Ignore the finally entry if control is not jumping to a
|
|
825
|
-
// location outside the try/catch block.
|
|
826
|
-
finallyEntry = null;
|
|
827
|
-
}
|
|
828
|
-
|
|
829
|
-
var record = finallyEntry ? finallyEntry.completion : {};
|
|
830
|
-
record.type = type;
|
|
831
|
-
record.arg = arg;
|
|
832
|
-
|
|
833
|
-
if (finallyEntry) {
|
|
834
|
-
this.method = "next";
|
|
835
|
-
this.next = finallyEntry.finallyLoc;
|
|
836
|
-
return ContinueSentinel;
|
|
837
|
-
}
|
|
838
|
-
|
|
839
|
-
return this.complete(record);
|
|
840
|
-
},
|
|
841
|
-
|
|
842
|
-
complete: function(record, afterLoc) {
|
|
843
|
-
if (record.type === "throw") {
|
|
844
|
-
throw record.arg;
|
|
845
|
-
}
|
|
846
|
-
|
|
847
|
-
if (record.type === "break" ||
|
|
848
|
-
record.type === "continue") {
|
|
849
|
-
this.next = record.arg;
|
|
850
|
-
} else if (record.type === "return") {
|
|
851
|
-
this.rval = this.arg = record.arg;
|
|
852
|
-
this.method = "return";
|
|
853
|
-
this.next = "end";
|
|
854
|
-
} else if (record.type === "normal" && afterLoc) {
|
|
855
|
-
this.next = afterLoc;
|
|
856
|
-
}
|
|
857
|
-
|
|
858
|
-
return ContinueSentinel;
|
|
859
|
-
},
|
|
860
|
-
|
|
861
|
-
finish: function(finallyLoc) {
|
|
862
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
863
|
-
var entry = this.tryEntries[i];
|
|
864
|
-
if (entry.finallyLoc === finallyLoc) {
|
|
865
|
-
this.complete(entry.completion, entry.afterLoc);
|
|
866
|
-
resetTryEntry(entry);
|
|
867
|
-
return ContinueSentinel;
|
|
868
|
-
}
|
|
869
|
-
}
|
|
870
|
-
},
|
|
871
|
-
|
|
872
|
-
"catch": function(tryLoc) {
|
|
873
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
874
|
-
var entry = this.tryEntries[i];
|
|
875
|
-
if (entry.tryLoc === tryLoc) {
|
|
876
|
-
var record = entry.completion;
|
|
877
|
-
if (record.type === "throw") {
|
|
878
|
-
var thrown = record.arg;
|
|
879
|
-
resetTryEntry(entry);
|
|
880
|
-
}
|
|
881
|
-
return thrown;
|
|
882
|
-
}
|
|
883
|
-
}
|
|
884
|
-
|
|
885
|
-
// The context.catch method must only be called with a location
|
|
886
|
-
// argument that corresponds to a known catch block.
|
|
887
|
-
throw new Error("illegal catch attempt");
|
|
888
|
-
},
|
|
889
|
-
|
|
890
|
-
delegateYield: function(iterable, resultName, nextLoc) {
|
|
891
|
-
this.delegate = {
|
|
892
|
-
iterator: values(iterable),
|
|
893
|
-
resultName: resultName,
|
|
894
|
-
nextLoc: nextLoc
|
|
895
|
-
};
|
|
896
|
-
|
|
897
|
-
if (this.method === "next") {
|
|
898
|
-
// Deliberately forget the last sent value so that we don't
|
|
899
|
-
// accidentally pass it on to the delegate.
|
|
900
|
-
this.arg = undefined$1;
|
|
901
|
-
}
|
|
902
|
-
|
|
903
|
-
return ContinueSentinel;
|
|
904
|
-
}
|
|
905
|
-
};
|
|
906
|
-
|
|
907
|
-
// Regardless of whether this script is executing as a CommonJS module
|
|
908
|
-
// or not, return the runtime object so that we can declare the variable
|
|
909
|
-
// regeneratorRuntime in the outer scope, which allows this module to be
|
|
910
|
-
// injected easily by `bin/regenerator --include-runtime script.js`.
|
|
911
|
-
return exports;
|
|
912
|
-
|
|
913
|
-
}(
|
|
914
|
-
// If this script is executing as a CommonJS module, use module.exports
|
|
915
|
-
// as the regeneratorRuntime namespace. Otherwise create a new empty
|
|
916
|
-
// object. Either way, the resulting object will be used to initialize
|
|
917
|
-
// the regeneratorRuntime variable at the top of this file.
|
|
918
|
-
module.exports
|
|
919
|
-
));
|
|
920
|
-
|
|
921
|
-
try {
|
|
922
|
-
regeneratorRuntime = runtime;
|
|
923
|
-
} catch (accidentalStrictMode) {
|
|
924
|
-
// This module should not be running in strict mode, so the above
|
|
925
|
-
// assignment should always work unless something is misconfigured. Just
|
|
926
|
-
// in case runtime.js accidentally runs in strict mode, in modern engines
|
|
927
|
-
// we can explicitly access globalThis. In older engines we can escape
|
|
928
|
-
// strict mode using a global Function call. This could conceivably fail
|
|
929
|
-
// if a Content Security Policy forbids using Function, but in that case
|
|
930
|
-
// the proper solution is to fix the accidental strict mode problem. If
|
|
931
|
-
// you've misconfigured your bundler to force strict mode and applied a
|
|
932
|
-
// CSP to forbid Function, and you're not willing to fix either of those
|
|
933
|
-
// problems, please detail your unique predicament in a GitHub issue.
|
|
934
|
-
if (typeof globalThis === "object") {
|
|
935
|
-
globalThis.regeneratorRuntime = runtime;
|
|
936
|
-
} else {
|
|
937
|
-
Function("r", "regeneratorRuntime = r")(runtime);
|
|
938
|
-
}
|
|
939
|
-
}
|
|
940
|
-
});
|
|
941
|
-
|
|
942
|
-
/**
|
|
943
|
-
* Checks if `value` is classified as an `Array` object.
|
|
944
|
-
*
|
|
945
|
-
* @static
|
|
946
|
-
* @memberOf _
|
|
947
|
-
* @since 0.1.0
|
|
948
|
-
* @category Lang
|
|
949
|
-
* @param {*} value The value to check.
|
|
950
|
-
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
951
|
-
* @example
|
|
952
|
-
*
|
|
953
|
-
* _.isArray([1, 2, 3]);
|
|
954
|
-
* // => true
|
|
955
|
-
*
|
|
956
|
-
* _.isArray(document.body.children);
|
|
957
|
-
* // => false
|
|
958
|
-
*
|
|
959
|
-
* _.isArray('abc');
|
|
960
|
-
* // => false
|
|
961
|
-
*
|
|
962
|
-
* _.isArray(_.noop);
|
|
963
|
-
* // => false
|
|
964
|
-
*/
|
|
965
|
-
var isArray = Array.isArray;
|
|
966
|
-
|
|
967
|
-
var isArray_1 = isArray;
|
|
968
|
-
|
|
969
|
-
/** Detect free variable `global` from Node.js. */
|
|
970
|
-
|
|
971
|
-
var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
972
|
-
|
|
973
|
-
var _freeGlobal = freeGlobal;
|
|
974
|
-
|
|
975
|
-
/** Detect free variable `self`. */
|
|
976
|
-
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
977
|
-
|
|
978
|
-
/** Used as a reference to the global object. */
|
|
979
|
-
var root = _freeGlobal || freeSelf || Function('return this')();
|
|
980
|
-
|
|
981
|
-
var _root = root;
|
|
982
|
-
|
|
983
|
-
/** Built-in value references. */
|
|
984
|
-
var Symbol$1 = _root.Symbol;
|
|
985
|
-
|
|
986
|
-
var _Symbol = Symbol$1;
|
|
987
|
-
|
|
988
|
-
/** Used for built-in method references. */
|
|
989
|
-
var objectProto$4 = Object.prototype;
|
|
990
|
-
|
|
991
|
-
/** Used to check objects for own properties. */
|
|
992
|
-
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
|
|
993
|
-
|
|
994
|
-
/**
|
|
995
|
-
* Used to resolve the
|
|
996
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
997
|
-
* of values.
|
|
998
|
-
*/
|
|
999
|
-
var nativeObjectToString$1 = objectProto$4.toString;
|
|
1000
|
-
|
|
1001
|
-
/** Built-in value references. */
|
|
1002
|
-
var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
|
|
1003
|
-
|
|
1004
|
-
/**
|
|
1005
|
-
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
1006
|
-
*
|
|
1007
|
-
* @private
|
|
1008
|
-
* @param {*} value The value to query.
|
|
1009
|
-
* @returns {string} Returns the raw `toStringTag`.
|
|
1010
|
-
*/
|
|
1011
|
-
function getRawTag(value) {
|
|
1012
|
-
var isOwn = hasOwnProperty$3.call(value, symToStringTag$1),
|
|
1013
|
-
tag = value[symToStringTag$1];
|
|
1014
|
-
|
|
1015
|
-
try {
|
|
1016
|
-
value[symToStringTag$1] = undefined;
|
|
1017
|
-
var unmasked = true;
|
|
1018
|
-
} catch (e) {}
|
|
1019
|
-
|
|
1020
|
-
var result = nativeObjectToString$1.call(value);
|
|
1021
|
-
if (unmasked) {
|
|
1022
|
-
if (isOwn) {
|
|
1023
|
-
value[symToStringTag$1] = tag;
|
|
1024
|
-
} else {
|
|
1025
|
-
delete value[symToStringTag$1];
|
|
1026
|
-
}
|
|
1027
|
-
}
|
|
1028
|
-
return result;
|
|
1029
|
-
}
|
|
1030
|
-
|
|
1031
|
-
var _getRawTag = getRawTag;
|
|
1032
|
-
|
|
1033
|
-
/** Used for built-in method references. */
|
|
1034
|
-
var objectProto$3 = Object.prototype;
|
|
1035
|
-
|
|
1036
|
-
/**
|
|
1037
|
-
* Used to resolve the
|
|
1038
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
1039
|
-
* of values.
|
|
1040
|
-
*/
|
|
1041
|
-
var nativeObjectToString = objectProto$3.toString;
|
|
1042
|
-
|
|
1043
|
-
/**
|
|
1044
|
-
* Converts `value` to a string using `Object.prototype.toString`.
|
|
1045
|
-
*
|
|
1046
|
-
* @private
|
|
1047
|
-
* @param {*} value The value to convert.
|
|
1048
|
-
* @returns {string} Returns the converted string.
|
|
1049
|
-
*/
|
|
1050
|
-
function objectToString(value) {
|
|
1051
|
-
return nativeObjectToString.call(value);
|
|
1052
|
-
}
|
|
1053
|
-
|
|
1054
|
-
var _objectToString = objectToString;
|
|
1055
|
-
|
|
1056
|
-
/** `Object#toString` result references. */
|
|
1057
|
-
var nullTag = '[object Null]',
|
|
1058
|
-
undefinedTag = '[object Undefined]';
|
|
1059
|
-
|
|
1060
|
-
/** Built-in value references. */
|
|
1061
|
-
var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
|
|
1062
|
-
|
|
1063
|
-
/**
|
|
1064
|
-
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
1065
|
-
*
|
|
1066
|
-
* @private
|
|
1067
|
-
* @param {*} value The value to query.
|
|
1068
|
-
* @returns {string} Returns the `toStringTag`.
|
|
1069
|
-
*/
|
|
1070
|
-
function baseGetTag(value) {
|
|
1071
|
-
if (value == null) {
|
|
1072
|
-
return value === undefined ? undefinedTag : nullTag;
|
|
1073
|
-
}
|
|
1074
|
-
return (symToStringTag && symToStringTag in Object(value))
|
|
1075
|
-
? _getRawTag(value)
|
|
1076
|
-
: _objectToString(value);
|
|
1077
|
-
}
|
|
1078
|
-
|
|
1079
|
-
var _baseGetTag = baseGetTag;
|
|
1080
|
-
|
|
1081
|
-
/**
|
|
1082
|
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
1083
|
-
* and has a `typeof` result of "object".
|
|
1084
|
-
*
|
|
1085
|
-
* @static
|
|
1086
|
-
* @memberOf _
|
|
1087
|
-
* @since 4.0.0
|
|
1088
|
-
* @category Lang
|
|
1089
|
-
* @param {*} value The value to check.
|
|
1090
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
1091
|
-
* @example
|
|
1092
|
-
*
|
|
1093
|
-
* _.isObjectLike({});
|
|
1094
|
-
* // => true
|
|
1095
|
-
*
|
|
1096
|
-
* _.isObjectLike([1, 2, 3]);
|
|
1097
|
-
* // => true
|
|
1098
|
-
*
|
|
1099
|
-
* _.isObjectLike(_.noop);
|
|
1100
|
-
* // => false
|
|
1101
|
-
*
|
|
1102
|
-
* _.isObjectLike(null);
|
|
1103
|
-
* // => false
|
|
1104
|
-
*/
|
|
1105
|
-
function isObjectLike(value) {
|
|
1106
|
-
return value != null && typeof value == 'object';
|
|
1107
|
-
}
|
|
1108
|
-
|
|
1109
|
-
var isObjectLike_1 = isObjectLike;
|
|
1110
|
-
|
|
1111
|
-
/** `Object#toString` result references. */
|
|
1112
|
-
var symbolTag = '[object Symbol]';
|
|
1113
|
-
|
|
1114
|
-
/**
|
|
1115
|
-
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
1116
|
-
*
|
|
1117
|
-
* @static
|
|
1118
|
-
* @memberOf _
|
|
1119
|
-
* @since 4.0.0
|
|
1120
|
-
* @category Lang
|
|
1121
|
-
* @param {*} value The value to check.
|
|
1122
|
-
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
1123
|
-
* @example
|
|
1124
|
-
*
|
|
1125
|
-
* _.isSymbol(Symbol.iterator);
|
|
1126
|
-
* // => true
|
|
1127
|
-
*
|
|
1128
|
-
* _.isSymbol('abc');
|
|
1129
|
-
* // => false
|
|
1130
|
-
*/
|
|
1131
|
-
function isSymbol(value) {
|
|
1132
|
-
return typeof value == 'symbol' ||
|
|
1133
|
-
(isObjectLike_1(value) && _baseGetTag(value) == symbolTag);
|
|
1134
|
-
}
|
|
1135
|
-
|
|
1136
|
-
var isSymbol_1 = isSymbol;
|
|
1137
|
-
|
|
1138
|
-
/** Used to match property names within property paths. */
|
|
1139
|
-
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
|
1140
|
-
reIsPlainProp = /^\w*$/;
|
|
1141
|
-
|
|
1142
|
-
/**
|
|
1143
|
-
* Checks if `value` is a property name and not a property path.
|
|
1144
|
-
*
|
|
1145
|
-
* @private
|
|
1146
|
-
* @param {*} value The value to check.
|
|
1147
|
-
* @param {Object} [object] The object to query keys on.
|
|
1148
|
-
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
|
1149
|
-
*/
|
|
1150
|
-
function isKey(value, object) {
|
|
1151
|
-
if (isArray_1(value)) {
|
|
1152
|
-
return false;
|
|
1153
|
-
}
|
|
1154
|
-
var type = typeof value;
|
|
1155
|
-
if (type == 'number' || type == 'symbol' || type == 'boolean' ||
|
|
1156
|
-
value == null || isSymbol_1(value)) {
|
|
1157
|
-
return true;
|
|
1158
|
-
}
|
|
1159
|
-
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
|
|
1160
|
-
(object != null && value in Object(object));
|
|
1161
|
-
}
|
|
1162
|
-
|
|
1163
|
-
var _isKey = isKey;
|
|
1164
|
-
|
|
1165
|
-
/**
|
|
1166
|
-
* Checks if `value` is the
|
|
1167
|
-
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
1168
|
-
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
1169
|
-
*
|
|
1170
|
-
* @static
|
|
1171
|
-
* @memberOf _
|
|
1172
|
-
* @since 0.1.0
|
|
1173
|
-
* @category Lang
|
|
1174
|
-
* @param {*} value The value to check.
|
|
1175
|
-
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
1176
|
-
* @example
|
|
1177
|
-
*
|
|
1178
|
-
* _.isObject({});
|
|
1179
|
-
* // => true
|
|
1180
|
-
*
|
|
1181
|
-
* _.isObject([1, 2, 3]);
|
|
1182
|
-
* // => true
|
|
1183
|
-
*
|
|
1184
|
-
* _.isObject(_.noop);
|
|
1185
|
-
* // => true
|
|
1186
|
-
*
|
|
1187
|
-
* _.isObject(null);
|
|
1188
|
-
* // => false
|
|
1189
|
-
*/
|
|
1190
|
-
function isObject(value) {
|
|
1191
|
-
var type = typeof value;
|
|
1192
|
-
return value != null && (type == 'object' || type == 'function');
|
|
1193
|
-
}
|
|
1194
|
-
|
|
1195
|
-
var isObject_1 = isObject;
|
|
1196
|
-
|
|
1197
|
-
/** `Object#toString` result references. */
|
|
1198
|
-
var asyncTag = '[object AsyncFunction]',
|
|
1199
|
-
funcTag = '[object Function]',
|
|
1200
|
-
genTag = '[object GeneratorFunction]',
|
|
1201
|
-
proxyTag = '[object Proxy]';
|
|
1202
|
-
|
|
1203
|
-
/**
|
|
1204
|
-
* Checks if `value` is classified as a `Function` object.
|
|
1205
|
-
*
|
|
1206
|
-
* @static
|
|
1207
|
-
* @memberOf _
|
|
1208
|
-
* @since 0.1.0
|
|
1209
|
-
* @category Lang
|
|
1210
|
-
* @param {*} value The value to check.
|
|
1211
|
-
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
|
1212
|
-
* @example
|
|
1213
|
-
*
|
|
1214
|
-
* _.isFunction(_);
|
|
1215
|
-
* // => true
|
|
1216
|
-
*
|
|
1217
|
-
* _.isFunction(/abc/);
|
|
1218
|
-
* // => false
|
|
1219
|
-
*/
|
|
1220
|
-
function isFunction(value) {
|
|
1221
|
-
if (!isObject_1(value)) {
|
|
1222
|
-
return false;
|
|
1223
|
-
}
|
|
1224
|
-
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
1225
|
-
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
|
1226
|
-
var tag = _baseGetTag(value);
|
|
1227
|
-
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
1228
|
-
}
|
|
1229
|
-
|
|
1230
|
-
var isFunction_1 = isFunction;
|
|
1231
|
-
|
|
1232
|
-
/** Used to detect overreaching core-js shims. */
|
|
1233
|
-
var coreJsData = _root['__core-js_shared__'];
|
|
1234
|
-
|
|
1235
|
-
var _coreJsData = coreJsData;
|
|
1236
|
-
|
|
1237
|
-
/** Used to detect methods masquerading as native. */
|
|
1238
|
-
var maskSrcKey = (function() {
|
|
1239
|
-
var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');
|
|
1240
|
-
return uid ? ('Symbol(src)_1.' + uid) : '';
|
|
1241
|
-
}());
|
|
1242
|
-
|
|
1243
|
-
/**
|
|
1244
|
-
* Checks if `func` has its source masked.
|
|
1245
|
-
*
|
|
1246
|
-
* @private
|
|
1247
|
-
* @param {Function} func The function to check.
|
|
1248
|
-
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
|
1249
|
-
*/
|
|
1250
|
-
function isMasked(func) {
|
|
1251
|
-
return !!maskSrcKey && (maskSrcKey in func);
|
|
1252
|
-
}
|
|
1253
|
-
|
|
1254
|
-
var _isMasked = isMasked;
|
|
1255
|
-
|
|
1256
|
-
/** Used for built-in method references. */
|
|
1257
|
-
var funcProto$1 = Function.prototype;
|
|
1258
|
-
|
|
1259
|
-
/** Used to resolve the decompiled source of functions. */
|
|
1260
|
-
var funcToString$1 = funcProto$1.toString;
|
|
1261
|
-
|
|
1262
|
-
/**
|
|
1263
|
-
* Converts `func` to its source code.
|
|
1264
|
-
*
|
|
1265
|
-
* @private
|
|
1266
|
-
* @param {Function} func The function to convert.
|
|
1267
|
-
* @returns {string} Returns the source code.
|
|
1268
|
-
*/
|
|
1269
|
-
function toSource(func) {
|
|
1270
|
-
if (func != null) {
|
|
1271
|
-
try {
|
|
1272
|
-
return funcToString$1.call(func);
|
|
1273
|
-
} catch (e) {}
|
|
1274
|
-
try {
|
|
1275
|
-
return (func + '');
|
|
1276
|
-
} catch (e) {}
|
|
1277
|
-
}
|
|
1278
|
-
return '';
|
|
1279
|
-
}
|
|
1280
|
-
|
|
1281
|
-
var _toSource = toSource;
|
|
1282
|
-
|
|
1283
|
-
/**
|
|
1284
|
-
* Used to match `RegExp`
|
|
1285
|
-
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
1286
|
-
*/
|
|
1287
|
-
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
1288
|
-
|
|
1289
|
-
/** Used to detect host constructors (Safari). */
|
|
1290
|
-
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
1291
|
-
|
|
1292
|
-
/** Used for built-in method references. */
|
|
1293
|
-
var funcProto = Function.prototype,
|
|
1294
|
-
objectProto$2 = Object.prototype;
|
|
1295
|
-
|
|
1296
|
-
/** Used to resolve the decompiled source of functions. */
|
|
1297
|
-
var funcToString = funcProto.toString;
|
|
1298
|
-
|
|
1299
|
-
/** Used to check objects for own properties. */
|
|
1300
|
-
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
|
1301
|
-
|
|
1302
|
-
/** Used to detect if a method is native. */
|
|
1303
|
-
var reIsNative = RegExp('^' +
|
|
1304
|
-
funcToString.call(hasOwnProperty$2).replace(reRegExpChar, '\\$&')
|
|
1305
|
-
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
|
1306
|
-
);
|
|
1307
|
-
|
|
1308
|
-
/**
|
|
1309
|
-
* The base implementation of `_.isNative` without bad shim checks.
|
|
1310
|
-
*
|
|
1311
|
-
* @private
|
|
1312
|
-
* @param {*} value The value to check.
|
|
1313
|
-
* @returns {boolean} Returns `true` if `value` is a native function,
|
|
1314
|
-
* else `false`.
|
|
1315
|
-
*/
|
|
1316
|
-
function baseIsNative(value) {
|
|
1317
|
-
if (!isObject_1(value) || _isMasked(value)) {
|
|
1318
|
-
return false;
|
|
1319
|
-
}
|
|
1320
|
-
var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;
|
|
1321
|
-
return pattern.test(_toSource(value));
|
|
1322
|
-
}
|
|
1323
|
-
|
|
1324
|
-
var _baseIsNative = baseIsNative;
|
|
1325
|
-
|
|
1326
|
-
/**
|
|
1327
|
-
* Gets the value at `key` of `object`.
|
|
1328
|
-
*
|
|
1329
|
-
* @private
|
|
1330
|
-
* @param {Object} [object] The object to query.
|
|
1331
|
-
* @param {string} key The key of the property to get.
|
|
1332
|
-
* @returns {*} Returns the property value.
|
|
1333
|
-
*/
|
|
1334
|
-
function getValue(object, key) {
|
|
1335
|
-
return object == null ? undefined : object[key];
|
|
1336
|
-
}
|
|
1337
|
-
|
|
1338
|
-
var _getValue = getValue;
|
|
1339
|
-
|
|
1340
|
-
/**
|
|
1341
|
-
* Gets the native function at `key` of `object`.
|
|
1342
|
-
*
|
|
1343
|
-
* @private
|
|
1344
|
-
* @param {Object} object The object to query.
|
|
1345
|
-
* @param {string} key The key of the method to get.
|
|
1346
|
-
* @returns {*} Returns the function if it's native, else `undefined`.
|
|
1347
|
-
*/
|
|
1348
|
-
function getNative(object, key) {
|
|
1349
|
-
var value = _getValue(object, key);
|
|
1350
|
-
return _baseIsNative(value) ? value : undefined;
|
|
1351
|
-
}
|
|
1352
|
-
|
|
1353
|
-
var _getNative = getNative;
|
|
1354
|
-
|
|
1355
|
-
/* Built-in method references that are verified to be native. */
|
|
1356
|
-
var nativeCreate = _getNative(Object, 'create');
|
|
1357
|
-
|
|
1358
|
-
var _nativeCreate = nativeCreate;
|
|
1359
|
-
|
|
1360
|
-
/**
|
|
1361
|
-
* Removes all key-value entries from the hash.
|
|
1362
|
-
*
|
|
1363
|
-
* @private
|
|
1364
|
-
* @name clear
|
|
1365
|
-
* @memberOf Hash
|
|
1366
|
-
*/
|
|
1367
|
-
function hashClear() {
|
|
1368
|
-
this.__data__ = _nativeCreate ? _nativeCreate(null) : {};
|
|
1369
|
-
this.size = 0;
|
|
1370
|
-
}
|
|
1371
|
-
|
|
1372
|
-
var _hashClear = hashClear;
|
|
1373
|
-
|
|
1374
|
-
/**
|
|
1375
|
-
* Removes `key` and its value from the hash.
|
|
1376
|
-
*
|
|
1377
|
-
* @private
|
|
1378
|
-
* @name delete
|
|
1379
|
-
* @memberOf Hash
|
|
1380
|
-
* @param {Object} hash The hash to modify.
|
|
1381
|
-
* @param {string} key The key of the value to remove.
|
|
1382
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1383
|
-
*/
|
|
1384
|
-
function hashDelete(key) {
|
|
1385
|
-
var result = this.has(key) && delete this.__data__[key];
|
|
1386
|
-
this.size -= result ? 1 : 0;
|
|
1387
|
-
return result;
|
|
1388
|
-
}
|
|
1389
|
-
|
|
1390
|
-
var _hashDelete = hashDelete;
|
|
1391
|
-
|
|
1392
|
-
/** Used to stand-in for `undefined` hash values. */
|
|
1393
|
-
var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
|
|
1394
|
-
|
|
1395
|
-
/** Used for built-in method references. */
|
|
1396
|
-
var objectProto$1 = Object.prototype;
|
|
1397
|
-
|
|
1398
|
-
/** Used to check objects for own properties. */
|
|
1399
|
-
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
1400
|
-
|
|
1401
|
-
/**
|
|
1402
|
-
* Gets the hash value for `key`.
|
|
1403
|
-
*
|
|
1404
|
-
* @private
|
|
1405
|
-
* @name get
|
|
1406
|
-
* @memberOf Hash
|
|
1407
|
-
* @param {string} key The key of the value to get.
|
|
1408
|
-
* @returns {*} Returns the entry value.
|
|
1409
|
-
*/
|
|
1410
|
-
function hashGet(key) {
|
|
1411
|
-
var data = this.__data__;
|
|
1412
|
-
if (_nativeCreate) {
|
|
1413
|
-
var result = data[key];
|
|
1414
|
-
return result === HASH_UNDEFINED$1 ? undefined : result;
|
|
1415
|
-
}
|
|
1416
|
-
return hasOwnProperty$1.call(data, key) ? data[key] : undefined;
|
|
1417
|
-
}
|
|
1418
|
-
|
|
1419
|
-
var _hashGet = hashGet;
|
|
1420
|
-
|
|
1421
|
-
/** Used for built-in method references. */
|
|
1422
|
-
var objectProto = Object.prototype;
|
|
1423
|
-
|
|
1424
|
-
/** Used to check objects for own properties. */
|
|
1425
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
1426
|
-
|
|
1427
|
-
/**
|
|
1428
|
-
* Checks if a hash value for `key` exists.
|
|
1429
|
-
*
|
|
1430
|
-
* @private
|
|
1431
|
-
* @name has
|
|
1432
|
-
* @memberOf Hash
|
|
1433
|
-
* @param {string} key The key of the entry to check.
|
|
1434
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1435
|
-
*/
|
|
1436
|
-
function hashHas(key) {
|
|
1437
|
-
var data = this.__data__;
|
|
1438
|
-
return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
|
|
1439
|
-
}
|
|
1440
|
-
|
|
1441
|
-
var _hashHas = hashHas;
|
|
1442
|
-
|
|
1443
|
-
/** Used to stand-in for `undefined` hash values. */
|
|
1444
|
-
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
1445
|
-
|
|
1446
|
-
/**
|
|
1447
|
-
* Sets the hash `key` to `value`.
|
|
1448
|
-
*
|
|
1449
|
-
* @private
|
|
1450
|
-
* @name set
|
|
1451
|
-
* @memberOf Hash
|
|
1452
|
-
* @param {string} key The key of the value to set.
|
|
1453
|
-
* @param {*} value The value to set.
|
|
1454
|
-
* @returns {Object} Returns the hash instance.
|
|
1455
|
-
*/
|
|
1456
|
-
function hashSet(key, value) {
|
|
1457
|
-
var data = this.__data__;
|
|
1458
|
-
this.size += this.has(key) ? 0 : 1;
|
|
1459
|
-
data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
|
1460
|
-
return this;
|
|
1461
|
-
}
|
|
1462
|
-
|
|
1463
|
-
var _hashSet = hashSet;
|
|
1464
|
-
|
|
1465
|
-
/**
|
|
1466
|
-
* Creates a hash object.
|
|
1467
|
-
*
|
|
1468
|
-
* @private
|
|
1469
|
-
* @constructor
|
|
1470
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
1471
|
-
*/
|
|
1472
|
-
function Hash(entries) {
|
|
1473
|
-
var index = -1,
|
|
1474
|
-
length = entries == null ? 0 : entries.length;
|
|
1475
|
-
|
|
1476
|
-
this.clear();
|
|
1477
|
-
while (++index < length) {
|
|
1478
|
-
var entry = entries[index];
|
|
1479
|
-
this.set(entry[0], entry[1]);
|
|
1480
|
-
}
|
|
1481
|
-
}
|
|
1482
|
-
|
|
1483
|
-
// Add methods to `Hash`.
|
|
1484
|
-
Hash.prototype.clear = _hashClear;
|
|
1485
|
-
Hash.prototype['delete'] = _hashDelete;
|
|
1486
|
-
Hash.prototype.get = _hashGet;
|
|
1487
|
-
Hash.prototype.has = _hashHas;
|
|
1488
|
-
Hash.prototype.set = _hashSet;
|
|
1489
|
-
|
|
1490
|
-
var _Hash = Hash;
|
|
1491
|
-
|
|
1492
|
-
/**
|
|
1493
|
-
* Removes all key-value entries from the list cache.
|
|
1494
|
-
*
|
|
1495
|
-
* @private
|
|
1496
|
-
* @name clear
|
|
1497
|
-
* @memberOf ListCache
|
|
1498
|
-
*/
|
|
1499
|
-
function listCacheClear() {
|
|
1500
|
-
this.__data__ = [];
|
|
1501
|
-
this.size = 0;
|
|
1502
|
-
}
|
|
1503
|
-
|
|
1504
|
-
var _listCacheClear = listCacheClear;
|
|
1505
|
-
|
|
1506
|
-
/**
|
|
1507
|
-
* Performs a
|
|
1508
|
-
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
1509
|
-
* comparison between two values to determine if they are equivalent.
|
|
1510
|
-
*
|
|
1511
|
-
* @static
|
|
1512
|
-
* @memberOf _
|
|
1513
|
-
* @since 4.0.0
|
|
1514
|
-
* @category Lang
|
|
1515
|
-
* @param {*} value The value to compare.
|
|
1516
|
-
* @param {*} other The other value to compare.
|
|
1517
|
-
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
1518
|
-
* @example
|
|
1519
|
-
*
|
|
1520
|
-
* var object = { 'a': 1 };
|
|
1521
|
-
* var other = { 'a': 1 };
|
|
1522
|
-
*
|
|
1523
|
-
* _.eq(object, object);
|
|
1524
|
-
* // => true
|
|
1525
|
-
*
|
|
1526
|
-
* _.eq(object, other);
|
|
1527
|
-
* // => false
|
|
1528
|
-
*
|
|
1529
|
-
* _.eq('a', 'a');
|
|
1530
|
-
* // => true
|
|
1531
|
-
*
|
|
1532
|
-
* _.eq('a', Object('a'));
|
|
1533
|
-
* // => false
|
|
1534
|
-
*
|
|
1535
|
-
* _.eq(NaN, NaN);
|
|
1536
|
-
* // => true
|
|
1537
|
-
*/
|
|
1538
|
-
function eq(value, other) {
|
|
1539
|
-
return value === other || (value !== value && other !== other);
|
|
1540
|
-
}
|
|
1541
|
-
|
|
1542
|
-
var eq_1 = eq;
|
|
1543
|
-
|
|
1544
|
-
/**
|
|
1545
|
-
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
|
1546
|
-
*
|
|
1547
|
-
* @private
|
|
1548
|
-
* @param {Array} array The array to inspect.
|
|
1549
|
-
* @param {*} key The key to search for.
|
|
1550
|
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
1551
|
-
*/
|
|
1552
|
-
function assocIndexOf(array, key) {
|
|
1553
|
-
var length = array.length;
|
|
1554
|
-
while (length--) {
|
|
1555
|
-
if (eq_1(array[length][0], key)) {
|
|
1556
|
-
return length;
|
|
1557
|
-
}
|
|
1558
|
-
}
|
|
1559
|
-
return -1;
|
|
1560
|
-
}
|
|
1561
|
-
|
|
1562
|
-
var _assocIndexOf = assocIndexOf;
|
|
1563
|
-
|
|
1564
|
-
/** Used for built-in method references. */
|
|
1565
|
-
var arrayProto = Array.prototype;
|
|
1566
|
-
|
|
1567
|
-
/** Built-in value references. */
|
|
1568
|
-
var splice = arrayProto.splice;
|
|
1569
|
-
|
|
1570
|
-
/**
|
|
1571
|
-
* Removes `key` and its value from the list cache.
|
|
1572
|
-
*
|
|
1573
|
-
* @private
|
|
1574
|
-
* @name delete
|
|
1575
|
-
* @memberOf ListCache
|
|
1576
|
-
* @param {string} key The key of the value to remove.
|
|
1577
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1578
|
-
*/
|
|
1579
|
-
function listCacheDelete(key) {
|
|
1580
|
-
var data = this.__data__,
|
|
1581
|
-
index = _assocIndexOf(data, key);
|
|
1582
|
-
|
|
1583
|
-
if (index < 0) {
|
|
1584
|
-
return false;
|
|
1585
|
-
}
|
|
1586
|
-
var lastIndex = data.length - 1;
|
|
1587
|
-
if (index == lastIndex) {
|
|
1588
|
-
data.pop();
|
|
1589
|
-
} else {
|
|
1590
|
-
splice.call(data, index, 1);
|
|
1591
|
-
}
|
|
1592
|
-
--this.size;
|
|
1593
|
-
return true;
|
|
1594
|
-
}
|
|
1595
|
-
|
|
1596
|
-
var _listCacheDelete = listCacheDelete;
|
|
1597
|
-
|
|
1598
|
-
/**
|
|
1599
|
-
* Gets the list cache value for `key`.
|
|
1600
|
-
*
|
|
1601
|
-
* @private
|
|
1602
|
-
* @name get
|
|
1603
|
-
* @memberOf ListCache
|
|
1604
|
-
* @param {string} key The key of the value to get.
|
|
1605
|
-
* @returns {*} Returns the entry value.
|
|
1606
|
-
*/
|
|
1607
|
-
function listCacheGet(key) {
|
|
1608
|
-
var data = this.__data__,
|
|
1609
|
-
index = _assocIndexOf(data, key);
|
|
1610
|
-
|
|
1611
|
-
return index < 0 ? undefined : data[index][1];
|
|
1612
|
-
}
|
|
1613
|
-
|
|
1614
|
-
var _listCacheGet = listCacheGet;
|
|
1615
|
-
|
|
1616
|
-
/**
|
|
1617
|
-
* Checks if a list cache value for `key` exists.
|
|
1618
|
-
*
|
|
1619
|
-
* @private
|
|
1620
|
-
* @name has
|
|
1621
|
-
* @memberOf ListCache
|
|
1622
|
-
* @param {string} key The key of the entry to check.
|
|
1623
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1624
|
-
*/
|
|
1625
|
-
function listCacheHas(key) {
|
|
1626
|
-
return _assocIndexOf(this.__data__, key) > -1;
|
|
1627
|
-
}
|
|
1628
|
-
|
|
1629
|
-
var _listCacheHas = listCacheHas;
|
|
1630
|
-
|
|
1631
|
-
/**
|
|
1632
|
-
* Sets the list cache `key` to `value`.
|
|
1633
|
-
*
|
|
1634
|
-
* @private
|
|
1635
|
-
* @name set
|
|
1636
|
-
* @memberOf ListCache
|
|
1637
|
-
* @param {string} key The key of the value to set.
|
|
1638
|
-
* @param {*} value The value to set.
|
|
1639
|
-
* @returns {Object} Returns the list cache instance.
|
|
1640
|
-
*/
|
|
1641
|
-
function listCacheSet(key, value) {
|
|
1642
|
-
var data = this.__data__,
|
|
1643
|
-
index = _assocIndexOf(data, key);
|
|
1644
|
-
|
|
1645
|
-
if (index < 0) {
|
|
1646
|
-
++this.size;
|
|
1647
|
-
data.push([key, value]);
|
|
1648
|
-
} else {
|
|
1649
|
-
data[index][1] = value;
|
|
1650
|
-
}
|
|
1651
|
-
return this;
|
|
1652
|
-
}
|
|
1653
|
-
|
|
1654
|
-
var _listCacheSet = listCacheSet;
|
|
1655
|
-
|
|
1656
|
-
/**
|
|
1657
|
-
* Creates an list cache object.
|
|
1658
|
-
*
|
|
1659
|
-
* @private
|
|
1660
|
-
* @constructor
|
|
1661
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
1662
|
-
*/
|
|
1663
|
-
function ListCache(entries) {
|
|
1664
|
-
var index = -1,
|
|
1665
|
-
length = entries == null ? 0 : entries.length;
|
|
1666
|
-
|
|
1667
|
-
this.clear();
|
|
1668
|
-
while (++index < length) {
|
|
1669
|
-
var entry = entries[index];
|
|
1670
|
-
this.set(entry[0], entry[1]);
|
|
1671
|
-
}
|
|
1672
|
-
}
|
|
1673
|
-
|
|
1674
|
-
// Add methods to `ListCache`.
|
|
1675
|
-
ListCache.prototype.clear = _listCacheClear;
|
|
1676
|
-
ListCache.prototype['delete'] = _listCacheDelete;
|
|
1677
|
-
ListCache.prototype.get = _listCacheGet;
|
|
1678
|
-
ListCache.prototype.has = _listCacheHas;
|
|
1679
|
-
ListCache.prototype.set = _listCacheSet;
|
|
1680
|
-
|
|
1681
|
-
var _ListCache = ListCache;
|
|
1682
|
-
|
|
1683
|
-
/* Built-in method references that are verified to be native. */
|
|
1684
|
-
var Map = _getNative(_root, 'Map');
|
|
1685
|
-
|
|
1686
|
-
var _Map = Map;
|
|
1687
|
-
|
|
1688
|
-
/**
|
|
1689
|
-
* Removes all key-value entries from the map.
|
|
1690
|
-
*
|
|
1691
|
-
* @private
|
|
1692
|
-
* @name clear
|
|
1693
|
-
* @memberOf MapCache
|
|
1694
|
-
*/
|
|
1695
|
-
function mapCacheClear() {
|
|
1696
|
-
this.size = 0;
|
|
1697
|
-
this.__data__ = {
|
|
1698
|
-
'hash': new _Hash,
|
|
1699
|
-
'map': new (_Map || _ListCache),
|
|
1700
|
-
'string': new _Hash
|
|
1701
|
-
};
|
|
1702
|
-
}
|
|
1703
|
-
|
|
1704
|
-
var _mapCacheClear = mapCacheClear;
|
|
1705
|
-
|
|
1706
|
-
/**
|
|
1707
|
-
* Checks if `value` is suitable for use as unique object key.
|
|
1708
|
-
*
|
|
1709
|
-
* @private
|
|
1710
|
-
* @param {*} value The value to check.
|
|
1711
|
-
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
|
1712
|
-
*/
|
|
1713
|
-
function isKeyable(value) {
|
|
1714
|
-
var type = typeof value;
|
|
1715
|
-
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
|
1716
|
-
? (value !== '__proto__')
|
|
1717
|
-
: (value === null);
|
|
1718
|
-
}
|
|
1719
|
-
|
|
1720
|
-
var _isKeyable = isKeyable;
|
|
1721
|
-
|
|
1722
|
-
/**
|
|
1723
|
-
* Gets the data for `map`.
|
|
1724
|
-
*
|
|
1725
|
-
* @private
|
|
1726
|
-
* @param {Object} map The map to query.
|
|
1727
|
-
* @param {string} key The reference key.
|
|
1728
|
-
* @returns {*} Returns the map data.
|
|
1729
|
-
*/
|
|
1730
|
-
function getMapData(map, key) {
|
|
1731
|
-
var data = map.__data__;
|
|
1732
|
-
return _isKeyable(key)
|
|
1733
|
-
? data[typeof key == 'string' ? 'string' : 'hash']
|
|
1734
|
-
: data.map;
|
|
1735
|
-
}
|
|
1736
|
-
|
|
1737
|
-
var _getMapData = getMapData;
|
|
1738
|
-
|
|
1739
|
-
/**
|
|
1740
|
-
* Removes `key` and its value from the map.
|
|
1741
|
-
*
|
|
1742
|
-
* @private
|
|
1743
|
-
* @name delete
|
|
1744
|
-
* @memberOf MapCache
|
|
1745
|
-
* @param {string} key The key of the value to remove.
|
|
1746
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1747
|
-
*/
|
|
1748
|
-
function mapCacheDelete(key) {
|
|
1749
|
-
var result = _getMapData(this, key)['delete'](key);
|
|
1750
|
-
this.size -= result ? 1 : 0;
|
|
1751
|
-
return result;
|
|
1752
|
-
}
|
|
1753
|
-
|
|
1754
|
-
var _mapCacheDelete = mapCacheDelete;
|
|
1755
|
-
|
|
1756
|
-
/**
|
|
1757
|
-
* Gets the map value for `key`.
|
|
1758
|
-
*
|
|
1759
|
-
* @private
|
|
1760
|
-
* @name get
|
|
1761
|
-
* @memberOf MapCache
|
|
1762
|
-
* @param {string} key The key of the value to get.
|
|
1763
|
-
* @returns {*} Returns the entry value.
|
|
1764
|
-
*/
|
|
1765
|
-
function mapCacheGet(key) {
|
|
1766
|
-
return _getMapData(this, key).get(key);
|
|
1767
|
-
}
|
|
1768
|
-
|
|
1769
|
-
var _mapCacheGet = mapCacheGet;
|
|
1770
|
-
|
|
1771
|
-
/**
|
|
1772
|
-
* Checks if a map value for `key` exists.
|
|
1773
|
-
*
|
|
1774
|
-
* @private
|
|
1775
|
-
* @name has
|
|
1776
|
-
* @memberOf MapCache
|
|
1777
|
-
* @param {string} key The key of the entry to check.
|
|
1778
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1779
|
-
*/
|
|
1780
|
-
function mapCacheHas(key) {
|
|
1781
|
-
return _getMapData(this, key).has(key);
|
|
1782
|
-
}
|
|
1783
|
-
|
|
1784
|
-
var _mapCacheHas = mapCacheHas;
|
|
1785
|
-
|
|
1786
|
-
/**
|
|
1787
|
-
* Sets the map `key` to `value`.
|
|
1788
|
-
*
|
|
1789
|
-
* @private
|
|
1790
|
-
* @name set
|
|
1791
|
-
* @memberOf MapCache
|
|
1792
|
-
* @param {string} key The key of the value to set.
|
|
1793
|
-
* @param {*} value The value to set.
|
|
1794
|
-
* @returns {Object} Returns the map cache instance.
|
|
1795
|
-
*/
|
|
1796
|
-
function mapCacheSet(key, value) {
|
|
1797
|
-
var data = _getMapData(this, key),
|
|
1798
|
-
size = data.size;
|
|
1799
|
-
|
|
1800
|
-
data.set(key, value);
|
|
1801
|
-
this.size += data.size == size ? 0 : 1;
|
|
1802
|
-
return this;
|
|
1803
|
-
}
|
|
1804
|
-
|
|
1805
|
-
var _mapCacheSet = mapCacheSet;
|
|
1806
|
-
|
|
1807
|
-
/**
|
|
1808
|
-
* Creates a map cache object to store key-value pairs.
|
|
1809
|
-
*
|
|
1810
|
-
* @private
|
|
1811
|
-
* @constructor
|
|
1812
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
1813
|
-
*/
|
|
1814
|
-
function MapCache(entries) {
|
|
1815
|
-
var index = -1,
|
|
1816
|
-
length = entries == null ? 0 : entries.length;
|
|
1817
|
-
|
|
1818
|
-
this.clear();
|
|
1819
|
-
while (++index < length) {
|
|
1820
|
-
var entry = entries[index];
|
|
1821
|
-
this.set(entry[0], entry[1]);
|
|
1822
|
-
}
|
|
1823
|
-
}
|
|
1824
|
-
|
|
1825
|
-
// Add methods to `MapCache`.
|
|
1826
|
-
MapCache.prototype.clear = _mapCacheClear;
|
|
1827
|
-
MapCache.prototype['delete'] = _mapCacheDelete;
|
|
1828
|
-
MapCache.prototype.get = _mapCacheGet;
|
|
1829
|
-
MapCache.prototype.has = _mapCacheHas;
|
|
1830
|
-
MapCache.prototype.set = _mapCacheSet;
|
|
1831
|
-
|
|
1832
|
-
var _MapCache = MapCache;
|
|
1833
|
-
|
|
1834
|
-
/** Error message constants. */
|
|
1835
|
-
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
1836
|
-
|
|
1837
|
-
/**
|
|
1838
|
-
* Creates a function that memoizes the result of `func`. If `resolver` is
|
|
1839
|
-
* provided, it determines the cache key for storing the result based on the
|
|
1840
|
-
* arguments provided to the memoized function. By default, the first argument
|
|
1841
|
-
* provided to the memoized function is used as the map cache key. The `func`
|
|
1842
|
-
* is invoked with the `this` binding of the memoized function.
|
|
1843
|
-
*
|
|
1844
|
-
* **Note:** The cache is exposed as the `cache` property on the memoized
|
|
1845
|
-
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
|
1846
|
-
* constructor with one whose instances implement the
|
|
1847
|
-
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
|
1848
|
-
* method interface of `clear`, `delete`, `get`, `has`, and `set`.
|
|
1849
|
-
*
|
|
1850
|
-
* @static
|
|
1851
|
-
* @memberOf _
|
|
1852
|
-
* @since 0.1.0
|
|
1853
|
-
* @category Function
|
|
1854
|
-
* @param {Function} func The function to have its output memoized.
|
|
1855
|
-
* @param {Function} [resolver] The function to resolve the cache key.
|
|
1856
|
-
* @returns {Function} Returns the new memoized function.
|
|
1857
|
-
* @example
|
|
1858
|
-
*
|
|
1859
|
-
* var object = { 'a': 1, 'b': 2 };
|
|
1860
|
-
* var other = { 'c': 3, 'd': 4 };
|
|
1861
|
-
*
|
|
1862
|
-
* var values = _.memoize(_.values);
|
|
1863
|
-
* values(object);
|
|
1864
|
-
* // => [1, 2]
|
|
1865
|
-
*
|
|
1866
|
-
* values(other);
|
|
1867
|
-
* // => [3, 4]
|
|
1868
|
-
*
|
|
1869
|
-
* object.a = 2;
|
|
1870
|
-
* values(object);
|
|
1871
|
-
* // => [1, 2]
|
|
1872
|
-
*
|
|
1873
|
-
* // Modify the result cache.
|
|
1874
|
-
* values.cache.set(object, ['a', 'b']);
|
|
1875
|
-
* values(object);
|
|
1876
|
-
* // => ['a', 'b']
|
|
1877
|
-
*
|
|
1878
|
-
* // Replace `_.memoize.Cache`.
|
|
1879
|
-
* _.memoize.Cache = WeakMap;
|
|
1880
|
-
*/
|
|
1881
|
-
function memoize(func, resolver) {
|
|
1882
|
-
if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
|
|
1883
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
1884
|
-
}
|
|
1885
|
-
var memoized = function() {
|
|
1886
|
-
var args = arguments,
|
|
1887
|
-
key = resolver ? resolver.apply(this, args) : args[0],
|
|
1888
|
-
cache = memoized.cache;
|
|
1889
|
-
|
|
1890
|
-
if (cache.has(key)) {
|
|
1891
|
-
return cache.get(key);
|
|
1892
|
-
}
|
|
1893
|
-
var result = func.apply(this, args);
|
|
1894
|
-
memoized.cache = cache.set(key, result) || cache;
|
|
1895
|
-
return result;
|
|
1896
|
-
};
|
|
1897
|
-
memoized.cache = new (memoize.Cache || _MapCache);
|
|
1898
|
-
return memoized;
|
|
1899
|
-
}
|
|
1900
|
-
|
|
1901
|
-
// Expose `MapCache`.
|
|
1902
|
-
memoize.Cache = _MapCache;
|
|
1903
|
-
|
|
1904
|
-
var memoize_1 = memoize;
|
|
1905
|
-
|
|
1906
|
-
/** Used as the maximum memoize cache size. */
|
|
1907
|
-
var MAX_MEMOIZE_SIZE = 500;
|
|
1908
|
-
|
|
1909
|
-
/**
|
|
1910
|
-
* A specialized version of `_.memoize` which clears the memoized function's
|
|
1911
|
-
* cache when it exceeds `MAX_MEMOIZE_SIZE`.
|
|
1912
|
-
*
|
|
1913
|
-
* @private
|
|
1914
|
-
* @param {Function} func The function to have its output memoized.
|
|
1915
|
-
* @returns {Function} Returns the new memoized function.
|
|
1916
|
-
*/
|
|
1917
|
-
function memoizeCapped(func) {
|
|
1918
|
-
var result = memoize_1(func, function(key) {
|
|
1919
|
-
if (cache.size === MAX_MEMOIZE_SIZE) {
|
|
1920
|
-
cache.clear();
|
|
1921
|
-
}
|
|
1922
|
-
return key;
|
|
1923
|
-
});
|
|
1924
|
-
|
|
1925
|
-
var cache = result.cache;
|
|
1926
|
-
return result;
|
|
1927
|
-
}
|
|
1928
|
-
|
|
1929
|
-
var _memoizeCapped = memoizeCapped;
|
|
1930
|
-
|
|
1931
|
-
/** Used to match property names within property paths. */
|
|
1932
|
-
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
1933
|
-
|
|
1934
|
-
/** Used to match backslashes in property paths. */
|
|
1935
|
-
var reEscapeChar = /\\(\\)?/g;
|
|
1936
|
-
|
|
1937
|
-
/**
|
|
1938
|
-
* Converts `string` to a property path array.
|
|
1939
|
-
*
|
|
1940
|
-
* @private
|
|
1941
|
-
* @param {string} string The string to convert.
|
|
1942
|
-
* @returns {Array} Returns the property path array.
|
|
1943
|
-
*/
|
|
1944
|
-
var stringToPath = _memoizeCapped(function(string) {
|
|
1945
|
-
var result = [];
|
|
1946
|
-
if (string.charCodeAt(0) === 46 /* . */) {
|
|
1947
|
-
result.push('');
|
|
1948
|
-
}
|
|
1949
|
-
string.replace(rePropName, function(match, number, quote, subString) {
|
|
1950
|
-
result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
|
|
1951
|
-
});
|
|
1952
|
-
return result;
|
|
1953
|
-
});
|
|
1954
|
-
|
|
1955
|
-
var _stringToPath = stringToPath;
|
|
1956
|
-
|
|
1957
|
-
/**
|
|
1958
|
-
* A specialized version of `_.map` for arrays without support for iteratee
|
|
1959
|
-
* shorthands.
|
|
1960
|
-
*
|
|
1961
|
-
* @private
|
|
1962
|
-
* @param {Array} [array] The array to iterate over.
|
|
1963
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
1964
|
-
* @returns {Array} Returns the new mapped array.
|
|
1965
|
-
*/
|
|
1966
|
-
function arrayMap(array, iteratee) {
|
|
1967
|
-
var index = -1,
|
|
1968
|
-
length = array == null ? 0 : array.length,
|
|
1969
|
-
result = Array(length);
|
|
1970
|
-
|
|
1971
|
-
while (++index < length) {
|
|
1972
|
-
result[index] = iteratee(array[index], index, array);
|
|
1973
|
-
}
|
|
1974
|
-
return result;
|
|
1975
|
-
}
|
|
1976
|
-
|
|
1977
|
-
var _arrayMap = arrayMap;
|
|
1978
|
-
|
|
1979
|
-
/** Used as references for various `Number` constants. */
|
|
1980
|
-
var INFINITY$1 = 1 / 0;
|
|
1981
|
-
|
|
1982
|
-
/** Used to convert symbols to primitives and strings. */
|
|
1983
|
-
var symbolProto = _Symbol ? _Symbol.prototype : undefined,
|
|
1984
|
-
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|
1985
|
-
|
|
1986
|
-
/**
|
|
1987
|
-
* The base implementation of `_.toString` which doesn't convert nullish
|
|
1988
|
-
* values to empty strings.
|
|
1989
|
-
*
|
|
1990
|
-
* @private
|
|
1991
|
-
* @param {*} value The value to process.
|
|
1992
|
-
* @returns {string} Returns the string.
|
|
1993
|
-
*/
|
|
1994
|
-
function baseToString(value) {
|
|
1995
|
-
// Exit early for strings to avoid a performance hit in some environments.
|
|
1996
|
-
if (typeof value == 'string') {
|
|
1997
|
-
return value;
|
|
1998
|
-
}
|
|
1999
|
-
if (isArray_1(value)) {
|
|
2000
|
-
// Recursively convert values (susceptible to call stack limits).
|
|
2001
|
-
return _arrayMap(value, baseToString) + '';
|
|
2002
|
-
}
|
|
2003
|
-
if (isSymbol_1(value)) {
|
|
2004
|
-
return symbolToString ? symbolToString.call(value) : '';
|
|
2005
|
-
}
|
|
2006
|
-
var result = (value + '');
|
|
2007
|
-
return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
|
|
2008
|
-
}
|
|
2009
|
-
|
|
2010
|
-
var _baseToString = baseToString;
|
|
2011
|
-
|
|
2012
|
-
/**
|
|
2013
|
-
* Converts `value` to a string. An empty string is returned for `null`
|
|
2014
|
-
* and `undefined` values. The sign of `-0` is preserved.
|
|
2015
|
-
*
|
|
2016
|
-
* @static
|
|
2017
|
-
* @memberOf _
|
|
2018
|
-
* @since 4.0.0
|
|
2019
|
-
* @category Lang
|
|
2020
|
-
* @param {*} value The value to convert.
|
|
2021
|
-
* @returns {string} Returns the converted string.
|
|
2022
|
-
* @example
|
|
2023
|
-
*
|
|
2024
|
-
* _.toString(null);
|
|
2025
|
-
* // => ''
|
|
2026
|
-
*
|
|
2027
|
-
* _.toString(-0);
|
|
2028
|
-
* // => '-0'
|
|
2029
|
-
*
|
|
2030
|
-
* _.toString([1, 2, 3]);
|
|
2031
|
-
* // => '1,2,3'
|
|
2032
|
-
*/
|
|
2033
|
-
function toString(value) {
|
|
2034
|
-
return value == null ? '' : _baseToString(value);
|
|
2035
|
-
}
|
|
2036
|
-
|
|
2037
|
-
var toString_1 = toString;
|
|
2038
|
-
|
|
2039
|
-
/**
|
|
2040
|
-
* Casts `value` to a path array if it's not one.
|
|
2041
|
-
*
|
|
2042
|
-
* @private
|
|
2043
|
-
* @param {*} value The value to inspect.
|
|
2044
|
-
* @param {Object} [object] The object to query keys on.
|
|
2045
|
-
* @returns {Array} Returns the cast property path array.
|
|
2046
|
-
*/
|
|
2047
|
-
function castPath(value, object) {
|
|
2048
|
-
if (isArray_1(value)) {
|
|
2049
|
-
return value;
|
|
2050
|
-
}
|
|
2051
|
-
return _isKey(value, object) ? [value] : _stringToPath(toString_1(value));
|
|
2052
|
-
}
|
|
2053
|
-
|
|
2054
|
-
var _castPath = castPath;
|
|
2055
|
-
|
|
2056
|
-
/** Used as references for various `Number` constants. */
|
|
2057
|
-
var INFINITY = 1 / 0;
|
|
2058
|
-
|
|
2059
|
-
/**
|
|
2060
|
-
* Converts `value` to a string key if it's not a string or symbol.
|
|
2061
|
-
*
|
|
2062
|
-
* @private
|
|
2063
|
-
* @param {*} value The value to inspect.
|
|
2064
|
-
* @returns {string|symbol} Returns the key.
|
|
2065
|
-
*/
|
|
2066
|
-
function toKey(value) {
|
|
2067
|
-
if (typeof value == 'string' || isSymbol_1(value)) {
|
|
2068
|
-
return value;
|
|
2069
|
-
}
|
|
2070
|
-
var result = (value + '');
|
|
2071
|
-
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
|
2072
|
-
}
|
|
2073
|
-
|
|
2074
|
-
var _toKey = toKey;
|
|
2075
|
-
|
|
2076
|
-
/**
|
|
2077
|
-
* The base implementation of `_.get` without support for default values.
|
|
2078
|
-
*
|
|
2079
|
-
* @private
|
|
2080
|
-
* @param {Object} object The object to query.
|
|
2081
|
-
* @param {Array|string} path The path of the property to get.
|
|
2082
|
-
* @returns {*} Returns the resolved value.
|
|
2083
|
-
*/
|
|
2084
|
-
function baseGet(object, path) {
|
|
2085
|
-
path = _castPath(path, object);
|
|
2086
|
-
|
|
2087
|
-
var index = 0,
|
|
2088
|
-
length = path.length;
|
|
2089
|
-
|
|
2090
|
-
while (object != null && index < length) {
|
|
2091
|
-
object = object[_toKey(path[index++])];
|
|
2092
|
-
}
|
|
2093
|
-
return (index && index == length) ? object : undefined;
|
|
2094
|
-
}
|
|
2095
|
-
|
|
2096
|
-
var _baseGet = baseGet;
|
|
2097
|
-
|
|
2098
|
-
/**
|
|
2099
|
-
* Gets the value at `path` of `object`. If the resolved value is
|
|
2100
|
-
* `undefined`, the `defaultValue` is returned in its place.
|
|
2101
|
-
*
|
|
2102
|
-
* @static
|
|
2103
|
-
* @memberOf _
|
|
2104
|
-
* @since 3.7.0
|
|
2105
|
-
* @category Object
|
|
2106
|
-
* @param {Object} object The object to query.
|
|
2107
|
-
* @param {Array|string} path The path of the property to get.
|
|
2108
|
-
* @param {*} [defaultValue] The value returned for `undefined` resolved values.
|
|
2109
|
-
* @returns {*} Returns the resolved value.
|
|
2110
|
-
* @example
|
|
2111
|
-
*
|
|
2112
|
-
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
|
|
2113
|
-
*
|
|
2114
|
-
* _.get(object, 'a[0].b.c');
|
|
2115
|
-
* // => 3
|
|
2116
|
-
*
|
|
2117
|
-
* _.get(object, ['a', '0', 'b', 'c']);
|
|
2118
|
-
* // => 3
|
|
2119
|
-
*
|
|
2120
|
-
* _.get(object, 'a.b.c', 'default');
|
|
2121
|
-
* // => 'default'
|
|
2122
|
-
*/
|
|
2123
|
-
function get(object, path, defaultValue) {
|
|
2124
|
-
var result = object == null ? undefined : _baseGet(object, path);
|
|
2125
|
-
return result === undefined ? defaultValue : result;
|
|
2126
|
-
}
|
|
2127
|
-
|
|
2128
|
-
var get_1 = get;
|
|
2129
|
-
|
|
2130
|
-
/**
|
|
2131
|
-
* A specialized version of `_.reduce` for arrays without support for
|
|
2132
|
-
* iteratee shorthands.
|
|
2133
|
-
*
|
|
2134
|
-
* @private
|
|
2135
|
-
* @param {Array} [array] The array to iterate over.
|
|
2136
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
2137
|
-
* @param {*} [accumulator] The initial value.
|
|
2138
|
-
* @param {boolean} [initAccum] Specify using the first element of `array` as
|
|
2139
|
-
* the initial value.
|
|
2140
|
-
* @returns {*} Returns the accumulated value.
|
|
2141
|
-
*/
|
|
2142
|
-
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
|
2143
|
-
var index = -1,
|
|
2144
|
-
length = array == null ? 0 : array.length;
|
|
2145
|
-
|
|
2146
|
-
if (initAccum && length) {
|
|
2147
|
-
accumulator = array[++index];
|
|
2148
|
-
}
|
|
2149
|
-
while (++index < length) {
|
|
2150
|
-
accumulator = iteratee(accumulator, array[index], index, array);
|
|
2151
|
-
}
|
|
2152
|
-
return accumulator;
|
|
2153
|
-
}
|
|
2154
|
-
|
|
2155
|
-
var _arrayReduce = arrayReduce;
|
|
2156
|
-
|
|
2157
|
-
/**
|
|
2158
|
-
* The base implementation of `_.propertyOf` without support for deep paths.
|
|
2159
|
-
*
|
|
2160
|
-
* @private
|
|
2161
|
-
* @param {Object} object The object to query.
|
|
2162
|
-
* @returns {Function} Returns the new accessor function.
|
|
2163
|
-
*/
|
|
2164
|
-
function basePropertyOf(object) {
|
|
2165
|
-
return function(key) {
|
|
2166
|
-
return object == null ? undefined : object[key];
|
|
2167
|
-
};
|
|
2168
|
-
}
|
|
2169
|
-
|
|
2170
|
-
var _basePropertyOf = basePropertyOf;
|
|
2171
|
-
|
|
2172
|
-
/** Used to map Latin Unicode letters to basic Latin letters. */
|
|
2173
|
-
var deburredLetters = {
|
|
2174
|
-
// Latin-1 Supplement block.
|
|
2175
|
-
'\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
|
|
2176
|
-
'\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
|
|
2177
|
-
'\xc7': 'C', '\xe7': 'c',
|
|
2178
|
-
'\xd0': 'D', '\xf0': 'd',
|
|
2179
|
-
'\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
|
|
2180
|
-
'\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
|
|
2181
|
-
'\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
|
|
2182
|
-
'\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
|
|
2183
|
-
'\xd1': 'N', '\xf1': 'n',
|
|
2184
|
-
'\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
|
|
2185
|
-
'\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
|
|
2186
|
-
'\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
|
|
2187
|
-
'\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
|
|
2188
|
-
'\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
|
|
2189
|
-
'\xc6': 'Ae', '\xe6': 'ae',
|
|
2190
|
-
'\xde': 'Th', '\xfe': 'th',
|
|
2191
|
-
'\xdf': 'ss',
|
|
2192
|
-
// Latin Extended-A block.
|
|
2193
|
-
'\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
|
|
2194
|
-
'\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
|
|
2195
|
-
'\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
|
|
2196
|
-
'\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
|
|
2197
|
-
'\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
|
|
2198
|
-
'\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
|
|
2199
|
-
'\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
|
|
2200
|
-
'\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
|
|
2201
|
-
'\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
|
|
2202
|
-
'\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
|
|
2203
|
-
'\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
|
|
2204
|
-
'\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
|
|
2205
|
-
'\u0134': 'J', '\u0135': 'j',
|
|
2206
|
-
'\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
|
|
2207
|
-
'\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
|
|
2208
|
-
'\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
|
|
2209
|
-
'\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
|
|
2210
|
-
'\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
|
|
2211
|
-
'\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
|
|
2212
|
-
'\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
|
|
2213
|
-
'\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
|
|
2214
|
-
'\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
|
|
2215
|
-
'\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
|
|
2216
|
-
'\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
|
|
2217
|
-
'\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
|
|
2218
|
-
'\u0163': 't', '\u0165': 't', '\u0167': 't',
|
|
2219
|
-
'\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
|
|
2220
|
-
'\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
|
|
2221
|
-
'\u0174': 'W', '\u0175': 'w',
|
|
2222
|
-
'\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
|
|
2223
|
-
'\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
|
|
2224
|
-
'\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
|
|
2225
|
-
'\u0132': 'IJ', '\u0133': 'ij',
|
|
2226
|
-
'\u0152': 'Oe', '\u0153': 'oe',
|
|
2227
|
-
'\u0149': "'n", '\u017f': 's'
|
|
43
|
+
return React.useContext(StateContext);
|
|
2228
44
|
};
|
|
2229
45
|
|
|
2230
|
-
/**
|
|
2231
|
-
* Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
|
|
2232
|
-
* letters to basic Latin letters.
|
|
2233
|
-
*
|
|
2234
|
-
* @private
|
|
2235
|
-
* @param {string} letter The matched letter to deburr.
|
|
2236
|
-
* @returns {string} Returns the deburred letter.
|
|
2237
|
-
*/
|
|
2238
|
-
var deburrLetter = _basePropertyOf(deburredLetters);
|
|
2239
|
-
|
|
2240
|
-
var _deburrLetter = deburrLetter;
|
|
2241
|
-
|
|
2242
|
-
/** Used to match Latin Unicode letters (excluding mathematical operators). */
|
|
2243
|
-
var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
|
|
2244
|
-
|
|
2245
|
-
/** Used to compose unicode character classes. */
|
|
2246
|
-
var rsComboMarksRange$1 = '\\u0300-\\u036f',
|
|
2247
|
-
reComboHalfMarksRange$1 = '\\ufe20-\\ufe2f',
|
|
2248
|
-
rsComboSymbolsRange$1 = '\\u20d0-\\u20ff',
|
|
2249
|
-
rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1;
|
|
2250
|
-
|
|
2251
|
-
/** Used to compose unicode capture groups. */
|
|
2252
|
-
var rsCombo$1 = '[' + rsComboRange$1 + ']';
|
|
2253
|
-
|
|
2254
|
-
/**
|
|
2255
|
-
* Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
|
|
2256
|
-
* [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
|
|
2257
|
-
*/
|
|
2258
|
-
var reComboMark = RegExp(rsCombo$1, 'g');
|
|
2259
|
-
|
|
2260
|
-
/**
|
|
2261
|
-
* Deburrs `string` by converting
|
|
2262
|
-
* [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
|
|
2263
|
-
* and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
|
|
2264
|
-
* letters to basic Latin letters and removing
|
|
2265
|
-
* [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
|
|
2266
|
-
*
|
|
2267
|
-
* @static
|
|
2268
|
-
* @memberOf _
|
|
2269
|
-
* @since 3.0.0
|
|
2270
|
-
* @category String
|
|
2271
|
-
* @param {string} [string=''] The string to deburr.
|
|
2272
|
-
* @returns {string} Returns the deburred string.
|
|
2273
|
-
* @example
|
|
2274
|
-
*
|
|
2275
|
-
* _.deburr('déjà vu');
|
|
2276
|
-
* // => 'deja vu'
|
|
2277
|
-
*/
|
|
2278
|
-
function deburr(string) {
|
|
2279
|
-
string = toString_1(string);
|
|
2280
|
-
return string && string.replace(reLatin, _deburrLetter).replace(reComboMark, '');
|
|
2281
|
-
}
|
|
2282
|
-
|
|
2283
|
-
var deburr_1 = deburr;
|
|
2284
|
-
|
|
2285
|
-
/** Used to match words composed of alphanumeric characters. */
|
|
2286
|
-
var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
|
|
2287
|
-
|
|
2288
|
-
/**
|
|
2289
|
-
* Splits an ASCII `string` into an array of its words.
|
|
2290
|
-
*
|
|
2291
|
-
* @private
|
|
2292
|
-
* @param {string} The string to inspect.
|
|
2293
|
-
* @returns {Array} Returns the words of `string`.
|
|
2294
|
-
*/
|
|
2295
|
-
function asciiWords(string) {
|
|
2296
|
-
return string.match(reAsciiWord) || [];
|
|
2297
|
-
}
|
|
2298
|
-
|
|
2299
|
-
var _asciiWords = asciiWords;
|
|
2300
|
-
|
|
2301
|
-
/** Used to detect strings that need a more robust regexp to match words. */
|
|
2302
|
-
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 ]/;
|
|
2303
|
-
|
|
2304
|
-
/**
|
|
2305
|
-
* Checks if `string` contains a word composed of Unicode symbols.
|
|
2306
|
-
*
|
|
2307
|
-
* @private
|
|
2308
|
-
* @param {string} string The string to inspect.
|
|
2309
|
-
* @returns {boolean} Returns `true` if a word is found, else `false`.
|
|
2310
|
-
*/
|
|
2311
|
-
function hasUnicodeWord(string) {
|
|
2312
|
-
return reHasUnicodeWord.test(string);
|
|
2313
|
-
}
|
|
2314
|
-
|
|
2315
|
-
var _hasUnicodeWord = hasUnicodeWord;
|
|
2316
|
-
|
|
2317
|
-
/** Used to compose unicode character classes. */
|
|
2318
|
-
var rsAstralRange = '\\ud800-\\udfff',
|
|
2319
|
-
rsComboMarksRange = '\\u0300-\\u036f',
|
|
2320
|
-
reComboHalfMarksRange = '\\ufe20-\\ufe2f',
|
|
2321
|
-
rsComboSymbolsRange = '\\u20d0-\\u20ff',
|
|
2322
|
-
rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
|
|
2323
|
-
rsDingbatRange = '\\u2700-\\u27bf',
|
|
2324
|
-
rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
|
|
2325
|
-
rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
|
|
2326
|
-
rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
|
|
2327
|
-
rsPunctuationRange = '\\u2000-\\u206f',
|
|
2328
|
-
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',
|
|
2329
|
-
rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
|
|
2330
|
-
rsVarRange = '\\ufe0e\\ufe0f',
|
|
2331
|
-
rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
|
|
2332
|
-
|
|
2333
|
-
/** Used to compose unicode capture groups. */
|
|
2334
|
-
var rsApos$1 = "['\u2019]",
|
|
2335
|
-
rsBreak = '[' + rsBreakRange + ']',
|
|
2336
|
-
rsCombo = '[' + rsComboRange + ']',
|
|
2337
|
-
rsDigits = '\\d+',
|
|
2338
|
-
rsDingbat = '[' + rsDingbatRange + ']',
|
|
2339
|
-
rsLower = '[' + rsLowerRange + ']',
|
|
2340
|
-
rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
|
|
2341
|
-
rsFitz = '\\ud83c[\\udffb-\\udfff]',
|
|
2342
|
-
rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
|
|
2343
|
-
rsNonAstral = '[^' + rsAstralRange + ']',
|
|
2344
|
-
rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
|
|
2345
|
-
rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
|
|
2346
|
-
rsUpper = '[' + rsUpperRange + ']',
|
|
2347
|
-
rsZWJ = '\\u200d';
|
|
2348
|
-
|
|
2349
|
-
/** Used to compose unicode regexes. */
|
|
2350
|
-
var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
|
|
2351
|
-
rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
|
|
2352
|
-
rsOptContrLower = '(?:' + rsApos$1 + '(?:d|ll|m|re|s|t|ve))?',
|
|
2353
|
-
rsOptContrUpper = '(?:' + rsApos$1 + '(?:D|LL|M|RE|S|T|VE))?',
|
|
2354
|
-
reOptMod = rsModifier + '?',
|
|
2355
|
-
rsOptVar = '[' + rsVarRange + ']?',
|
|
2356
|
-
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
|
|
2357
|
-
rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
|
|
2358
|
-
rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
|
|
2359
|
-
rsSeq = rsOptVar + reOptMod + rsOptJoin,
|
|
2360
|
-
rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq;
|
|
2361
|
-
|
|
2362
|
-
/** Used to match complex or compound words. */
|
|
2363
|
-
var reUnicodeWord = RegExp([
|
|
2364
|
-
rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
|
|
2365
|
-
rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
|
|
2366
|
-
rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
|
|
2367
|
-
rsUpper + '+' + rsOptContrUpper,
|
|
2368
|
-
rsOrdUpper,
|
|
2369
|
-
rsOrdLower,
|
|
2370
|
-
rsDigits,
|
|
2371
|
-
rsEmoji
|
|
2372
|
-
].join('|'), 'g');
|
|
2373
|
-
|
|
2374
|
-
/**
|
|
2375
|
-
* Splits a Unicode `string` into an array of its words.
|
|
2376
|
-
*
|
|
2377
|
-
* @private
|
|
2378
|
-
* @param {string} The string to inspect.
|
|
2379
|
-
* @returns {Array} Returns the words of `string`.
|
|
2380
|
-
*/
|
|
2381
|
-
function unicodeWords(string) {
|
|
2382
|
-
return string.match(reUnicodeWord) || [];
|
|
2383
|
-
}
|
|
2384
|
-
|
|
2385
|
-
var _unicodeWords = unicodeWords;
|
|
2386
|
-
|
|
2387
|
-
/**
|
|
2388
|
-
* Splits `string` into an array of its words.
|
|
2389
|
-
*
|
|
2390
|
-
* @static
|
|
2391
|
-
* @memberOf _
|
|
2392
|
-
* @since 3.0.0
|
|
2393
|
-
* @category String
|
|
2394
|
-
* @param {string} [string=''] The string to inspect.
|
|
2395
|
-
* @param {RegExp|string} [pattern] The pattern to match words.
|
|
2396
|
-
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
2397
|
-
* @returns {Array} Returns the words of `string`.
|
|
2398
|
-
* @example
|
|
2399
|
-
*
|
|
2400
|
-
* _.words('fred, barney, & pebbles');
|
|
2401
|
-
* // => ['fred', 'barney', 'pebbles']
|
|
2402
|
-
*
|
|
2403
|
-
* _.words('fred, barney, & pebbles', /[^, ]+/g);
|
|
2404
|
-
* // => ['fred', 'barney', '&', 'pebbles']
|
|
2405
|
-
*/
|
|
2406
|
-
function words(string, pattern, guard) {
|
|
2407
|
-
string = toString_1(string);
|
|
2408
|
-
pattern = guard ? undefined : pattern;
|
|
2409
|
-
|
|
2410
|
-
if (pattern === undefined) {
|
|
2411
|
-
return _hasUnicodeWord(string) ? _unicodeWords(string) : _asciiWords(string);
|
|
2412
|
-
}
|
|
2413
|
-
return string.match(pattern) || [];
|
|
2414
|
-
}
|
|
2415
|
-
|
|
2416
|
-
var words_1 = words;
|
|
2417
|
-
|
|
2418
|
-
/** Used to compose unicode capture groups. */
|
|
2419
|
-
var rsApos = "['\u2019]";
|
|
2420
|
-
|
|
2421
|
-
/** Used to match apostrophes. */
|
|
2422
|
-
var reApos = RegExp(rsApos, 'g');
|
|
2423
|
-
|
|
2424
|
-
/**
|
|
2425
|
-
* Creates a function like `_.camelCase`.
|
|
2426
|
-
*
|
|
2427
|
-
* @private
|
|
2428
|
-
* @param {Function} callback The function to combine each word.
|
|
2429
|
-
* @returns {Function} Returns the new compounder function.
|
|
2430
|
-
*/
|
|
2431
|
-
function createCompounder(callback) {
|
|
2432
|
-
return function(string) {
|
|
2433
|
-
return _arrayReduce(words_1(deburr_1(string).replace(reApos, '')), callback, '');
|
|
2434
|
-
};
|
|
2435
|
-
}
|
|
2436
|
-
|
|
2437
|
-
var _createCompounder = createCompounder;
|
|
2438
|
-
|
|
2439
|
-
/**
|
|
2440
|
-
* Converts `string`, as space separated words, to upper case.
|
|
2441
|
-
*
|
|
2442
|
-
* @static
|
|
2443
|
-
* @memberOf _
|
|
2444
|
-
* @since 4.0.0
|
|
2445
|
-
* @category String
|
|
2446
|
-
* @param {string} [string=''] The string to convert.
|
|
2447
|
-
* @returns {string} Returns the upper cased string.
|
|
2448
|
-
* @example
|
|
2449
|
-
*
|
|
2450
|
-
* _.upperCase('--foo-bar');
|
|
2451
|
-
* // => 'FOO BAR'
|
|
2452
|
-
*
|
|
2453
|
-
* _.upperCase('fooBar');
|
|
2454
|
-
* // => 'FOO BAR'
|
|
2455
|
-
*
|
|
2456
|
-
* _.upperCase('__foo_bar__');
|
|
2457
|
-
* // => 'FOO BAR'
|
|
2458
|
-
*/
|
|
2459
|
-
var upperCase = _createCompounder(function(result, word, index) {
|
|
2460
|
-
return result + (index ? ' ' : '') + word.toUpperCase();
|
|
2461
|
-
});
|
|
2462
|
-
|
|
2463
|
-
var upperCase_1 = upperCase;
|
|
2464
|
-
|
|
2465
|
-
/**
|
|
2466
|
-
* Converts `string`, as space separated words, to lower case.
|
|
2467
|
-
*
|
|
2468
|
-
* @static
|
|
2469
|
-
* @memberOf _
|
|
2470
|
-
* @since 4.0.0
|
|
2471
|
-
* @category String
|
|
2472
|
-
* @param {string} [string=''] The string to convert.
|
|
2473
|
-
* @returns {string} Returns the lower cased string.
|
|
2474
|
-
* @example
|
|
2475
|
-
*
|
|
2476
|
-
* _.lowerCase('--Foo-Bar--');
|
|
2477
|
-
* // => 'foo bar'
|
|
2478
|
-
*
|
|
2479
|
-
* _.lowerCase('fooBar');
|
|
2480
|
-
* // => 'foo bar'
|
|
2481
|
-
*
|
|
2482
|
-
* _.lowerCase('__FOO_BAR__');
|
|
2483
|
-
* // => 'foo bar'
|
|
2484
|
-
*/
|
|
2485
|
-
var lowerCase = _createCompounder(function(result, word, index) {
|
|
2486
|
-
return result + (index ? ' ' : '') + word.toLowerCase();
|
|
2487
|
-
});
|
|
2488
|
-
|
|
2489
|
-
var lowerCase_1 = lowerCase;
|
|
2490
|
-
|
|
2491
46
|
function truncate() {
|
|
2492
47
|
var string = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
|
|
2493
48
|
var limit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 60;
|
|
@@ -2514,7 +69,7 @@ var timestampToFormat = function timestampToFormat(value, unit, suffix, timestam
|
|
|
2514
69
|
var localizedMonth = month;
|
|
2515
70
|
|
|
2516
71
|
if (isUpperCase) {
|
|
2517
|
-
localizedMonth =
|
|
72
|
+
localizedMonth = lodash.upperCase(month);
|
|
2518
73
|
}
|
|
2519
74
|
|
|
2520
75
|
var year = dateTime.getFullYear();
|
|
@@ -2527,7 +82,7 @@ var timestampToFormat = function timestampToFormat(value, unit, suffix, timestam
|
|
|
2527
82
|
var timetoShow;
|
|
2528
83
|
|
|
2529
84
|
if (localizedMonths) {
|
|
2530
|
-
localizedMonth =
|
|
85
|
+
localizedMonth = lodash.get(localizedMonths, [lodash.lowerCase(month)]) || month;
|
|
2531
86
|
}
|
|
2532
87
|
|
|
2533
88
|
if (localizedMeridiem) {
|
|
@@ -2557,17 +112,17 @@ function formatter(value, unit, suffix, date, config) {
|
|
|
2557
112
|
var showDateForUnits = ["day", "week", "month", "year"]; // suffix here refers to ago
|
|
2558
113
|
// unit here refers to seconds, minute, minutes,...
|
|
2559
114
|
|
|
2560
|
-
var localizedSuffix =
|
|
115
|
+
var localizedSuffix = lodash.get(config, ["localizedPublishTime", suffix]) || suffix;
|
|
2561
116
|
var localizedUnitOfTime;
|
|
2562
117
|
|
|
2563
118
|
if (unit === "hour" && value > 23 || showDateForUnits.indexOf(unit) !== -1) {
|
|
2564
119
|
return timestampToFormat(value, unit, suffix, date, config);
|
|
2565
120
|
} else if (value > 1) {
|
|
2566
|
-
localizedUnitOfTime =
|
|
121
|
+
localizedUnitOfTime = lodash.get(config, ["localizedPublishTime", "".concat(unit, "s")]) || "".concat(unit, "s");
|
|
2567
122
|
return "".concat(value, " ").concat(localizedUnitOfTime, " ").concat(localizedSuffix);
|
|
2568
123
|
}
|
|
2569
124
|
|
|
2570
|
-
localizedUnitOfTime =
|
|
125
|
+
localizedUnitOfTime = lodash.get(config, ["localizedPublishTime", unit]) || unit;
|
|
2571
126
|
return "".concat(value, " ").concat(localizedUnitOfTime, " ").concat(localizedSuffix, " ");
|
|
2572
127
|
}
|
|
2573
128
|
|
|
@@ -2620,10 +175,10 @@ var clientWidths = {
|
|
|
2620
175
|
tablet: 1024
|
|
2621
176
|
};
|
|
2622
177
|
var clientWidth = function clientWidth(device) {
|
|
2623
|
-
var foundDeviceWidth =
|
|
178
|
+
var foundDeviceWidth = lodash.get(clientWidths, device);
|
|
2624
179
|
|
|
2625
180
|
if (foundDeviceWidth) {
|
|
2626
|
-
return
|
|
181
|
+
return lodash.get(global, "document.documentElement.clientWidth") <= foundDeviceWidth;
|
|
2627
182
|
}
|
|
2628
183
|
|
|
2629
184
|
return false;
|
|
@@ -2665,7 +220,7 @@ var getSlug = function getSlug(collection) {
|
|
|
2665
220
|
var isSection = collection.template === "section";
|
|
2666
221
|
|
|
2667
222
|
if (isSection) {
|
|
2668
|
-
var sectionId =
|
|
223
|
+
var sectionId = lodash.get(collection, ["metadata", "section", "0", "id"], "");
|
|
2669
224
|
var sections = config.sections;
|
|
2670
225
|
var section = sections && sections.find(function (section) {
|
|
2671
226
|
return section.id === sectionId;
|
|
@@ -2681,25 +236,25 @@ function isExternalStory() {
|
|
|
2681
236
|
storyTemplate = _story$storyTemplate === void 0 ? "" : _story$storyTemplate,
|
|
2682
237
|
_story$metadata = story.metadata,
|
|
2683
238
|
metadata = _story$metadata === void 0 ? {} : _story$metadata;
|
|
2684
|
-
return storyTemplate === "news-elsewhere" ?
|
|
239
|
+
return storyTemplate === "news-elsewhere" ? lodash.get(metadata, ["reference-url"], "") : "";
|
|
2685
240
|
} // Adds target='_blank' attribute to anchor tags if not present
|
|
2686
241
|
var isEmpty = function isEmpty(value) {
|
|
2687
242
|
return value == null || // From standard.js: Always use === - but value == null is allowed to check null || undefined
|
|
2688
|
-
|
|
243
|
+
_typeof__default["default"](value) === "object" && Object.entries(value).length === 0 && value.constructor === Object || typeof value === "string" && value.trim().length === 0;
|
|
2689
244
|
};
|
|
2690
|
-
|
|
2691
|
-
"sketches-host":
|
|
2692
|
-
"cdn-name":
|
|
2693
|
-
"cdn-image":
|
|
245
|
+
PropTypes__default["default"].shape({
|
|
246
|
+
"sketches-host": PropTypes__default["default"].string,
|
|
247
|
+
"cdn-name": PropTypes__default["default"].string,
|
|
248
|
+
"cdn-image": PropTypes__default["default"].string
|
|
2694
249
|
});
|
|
2695
|
-
|
|
2696
|
-
headline:
|
|
2697
|
-
"last-published-at":
|
|
2698
|
-
subheadline:
|
|
250
|
+
PropTypes__default["default"].shape({
|
|
251
|
+
headline: PropTypes__default["default"].string,
|
|
252
|
+
"last-published-at": PropTypes__default["default"].number,
|
|
253
|
+
subheadline: PropTypes__default["default"].string
|
|
2699
254
|
});
|
|
2700
255
|
var getStoryUrl = function getStoryUrl(story) {
|
|
2701
256
|
var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
2702
|
-
return
|
|
257
|
+
return lodash.get(story, ["story-template"]) === "news-elsewhere" ? lodash.get(story, ["metadata", "reference-url"], "") : story.url || defaultValue;
|
|
2703
258
|
};
|
|
2704
259
|
var navigateTo = function navigateTo(dispatch) {
|
|
2705
260
|
var url = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
@@ -2739,17 +294,17 @@ var getTimeStamp = function getTimeStamp(date, _formatter) {
|
|
|
2739
294
|
var timezone = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
|
|
2740
295
|
|
|
2741
296
|
if (timezone && template === "story") {
|
|
2742
|
-
var zonedTime = timezone && utcToZonedTime(date, timezone);
|
|
2743
|
-
var formatZonedTime = zonedTime && format(zonedTime, "yyyy-MM-dd'T'HH:mm:ssXXX", {
|
|
297
|
+
var zonedTime = timezone && dateFnsTz.utcToZonedTime(date, timezone);
|
|
298
|
+
var formatZonedTime = zonedTime && dateFnsTz.format(zonedTime, "yyyy-MM-dd'T'HH:mm:ssXXX", {
|
|
2744
299
|
timeZone: timezone
|
|
2745
300
|
});
|
|
2746
301
|
var timeStamp = timestampToFormat("", "", "", date, config);
|
|
2747
|
-
return /*#__PURE__*/
|
|
302
|
+
return /*#__PURE__*/React__default["default"].createElement("time", {
|
|
2748
303
|
dateTime: formatZonedTime
|
|
2749
304
|
}, timeStamp);
|
|
2750
305
|
}
|
|
2751
306
|
|
|
2752
|
-
return /*#__PURE__*/
|
|
307
|
+
return /*#__PURE__*/React__default["default"].createElement(Timeago__default["default"], {
|
|
2753
308
|
date: date,
|
|
2754
309
|
formatter: function formatter(value, unit, suffix, date) {
|
|
2755
310
|
return _formatter(value, unit, suffix, date, config);
|
|
@@ -2757,67 +312,6 @@ var getTimeStamp = function getTimeStamp(date, _formatter) {
|
|
|
2757
312
|
});
|
|
2758
313
|
};
|
|
2759
314
|
|
|
2760
|
-
function _arrayWithHoles(arr) {
|
|
2761
|
-
if (Array.isArray(arr)) return arr;
|
|
2762
|
-
}
|
|
2763
|
-
|
|
2764
|
-
function _iterableToArrayLimit(arr, i) {
|
|
2765
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
2766
|
-
|
|
2767
|
-
if (_i == null) return;
|
|
2768
|
-
var _arr = [];
|
|
2769
|
-
var _n = true;
|
|
2770
|
-
var _d = false;
|
|
2771
|
-
|
|
2772
|
-
var _s, _e;
|
|
2773
|
-
|
|
2774
|
-
try {
|
|
2775
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
2776
|
-
_arr.push(_s.value);
|
|
2777
|
-
|
|
2778
|
-
if (i && _arr.length === i) break;
|
|
2779
|
-
}
|
|
2780
|
-
} catch (err) {
|
|
2781
|
-
_d = true;
|
|
2782
|
-
_e = err;
|
|
2783
|
-
} finally {
|
|
2784
|
-
try {
|
|
2785
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
2786
|
-
} finally {
|
|
2787
|
-
if (_d) throw _e;
|
|
2788
|
-
}
|
|
2789
|
-
}
|
|
2790
|
-
|
|
2791
|
-
return _arr;
|
|
2792
|
-
}
|
|
2793
|
-
|
|
2794
|
-
function _arrayLikeToArray(arr, len) {
|
|
2795
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
2796
|
-
|
|
2797
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
2798
|
-
arr2[i] = arr[i];
|
|
2799
|
-
}
|
|
2800
|
-
|
|
2801
|
-
return arr2;
|
|
2802
|
-
}
|
|
2803
|
-
|
|
2804
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
2805
|
-
if (!o) return;
|
|
2806
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
2807
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
2808
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
2809
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
2810
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
2811
|
-
}
|
|
2812
|
-
|
|
2813
|
-
function _nonIterableRest() {
|
|
2814
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
2815
|
-
}
|
|
2816
|
-
|
|
2817
|
-
function _slicedToArray(arr, i) {
|
|
2818
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
2819
|
-
}
|
|
2820
|
-
|
|
2821
315
|
var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
|
|
2822
316
|
var _ref$width = _ref.width,
|
|
2823
317
|
width = _ref$width === void 0 ? 40 : _ref$width,
|
|
@@ -2825,27 +319,27 @@ var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
|
|
|
2825
319
|
height = _ref$height === void 0 ? 30 : _ref$height,
|
|
2826
320
|
_ref$iconColor = _ref.iconColor,
|
|
2827
321
|
iconColor = _ref$iconColor === void 0 ? "#99B0CB" : _ref$iconColor;
|
|
2828
|
-
return /*#__PURE__*/
|
|
322
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2829
323
|
width: width,
|
|
2830
324
|
height: height,
|
|
2831
325
|
viewBox: "0 0 102 76",
|
|
2832
326
|
version: "1.1"
|
|
2833
|
-
}, /*#__PURE__*/
|
|
327
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2834
328
|
id: "demo-home-copy",
|
|
2835
329
|
stroke: "none",
|
|
2836
330
|
strokeWidth: "1",
|
|
2837
331
|
fill: "none",
|
|
2838
332
|
fillRule: "evenodd",
|
|
2839
333
|
transform: "translate(-377.000000, -314.000000)"
|
|
2840
|
-
}, /*#__PURE__*/
|
|
334
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2841
335
|
id: "Group-13",
|
|
2842
336
|
transform: "translate(377.000000, 314.000000)"
|
|
2843
|
-
}, /*#__PURE__*/
|
|
337
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2844
338
|
d: "M43.2,49.7 L62.2,19.2 L87.2,59.4 L17,59.4 L32.8,39.4 L43.2,49.7 Z M29.9,28.6 C25.8683213,28.6 22.6,25.3316787 22.6,21.3 C22.6,17.2683213 25.8683213,14 29.9,14 C33.9316787,14 37.2,17.2683213 37.2,21.3 C37.2,25.3316787 33.9316787,28.6 29.9,28.6 Z",
|
|
2845
339
|
id: "Combined-Shape",
|
|
2846
340
|
fill: iconColor,
|
|
2847
341
|
fillRule: "nonzero"
|
|
2848
|
-
}), /*#__PURE__*/
|
|
342
|
+
}), /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
2849
343
|
id: "Rectangle-19",
|
|
2850
344
|
stroke: iconColor,
|
|
2851
345
|
strokeWidth: "3",
|
|
@@ -2857,24 +351,24 @@ var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
|
|
|
2857
351
|
}))));
|
|
2858
352
|
};
|
|
2859
353
|
ImageFallbackIcon.propTypes = {
|
|
2860
|
-
width:
|
|
2861
|
-
height:
|
|
2862
|
-
iconColor:
|
|
354
|
+
width: PropTypes__default["default"].object,
|
|
355
|
+
height: PropTypes__default["default"].object,
|
|
356
|
+
iconColor: PropTypes__default["default"].object
|
|
2863
357
|
};
|
|
2864
358
|
|
|
2865
359
|
var imageFallback = function imageFallback() {
|
|
2866
|
-
return /*#__PURE__*/
|
|
360
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2867
361
|
className: "arr--fallback-image fallback-m_image__1GYCJ fallback-m_image-position__3KddP"
|
|
2868
|
-
}, /*#__PURE__*/
|
|
362
|
+
}, /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
2869
363
|
className: "arr--fallback-svg fallback-m_fallback-svg__tK9fL"
|
|
2870
|
-
}, /*#__PURE__*/
|
|
364
|
+
}, /*#__PURE__*/React__default["default"].createElement(ImageFallbackIcon, null)));
|
|
2871
365
|
};
|
|
2872
366
|
|
|
2873
367
|
var FallbackImage = function FallbackImage(_ref) {
|
|
2874
368
|
var slug = _ref.slug;
|
|
2875
369
|
|
|
2876
370
|
if (slug) {
|
|
2877
|
-
return /*#__PURE__*/
|
|
371
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
2878
372
|
href: slug,
|
|
2879
373
|
"aria-label": "image-fallback"
|
|
2880
374
|
}, imageFallback());
|
|
@@ -2883,23 +377,23 @@ var FallbackImage = function FallbackImage(_ref) {
|
|
|
2883
377
|
}
|
|
2884
378
|
};
|
|
2885
379
|
FallbackImage.propTypes = {
|
|
2886
|
-
slug:
|
|
380
|
+
slug: PropTypes__default["default"].string
|
|
2887
381
|
};
|
|
2888
382
|
|
|
2889
383
|
var HyperLinkIcon = function HyperLinkIcon() {
|
|
2890
|
-
return /*#__PURE__*/
|
|
384
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2891
385
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2892
386
|
width: "36",
|
|
2893
387
|
height: "28"
|
|
2894
|
-
}, /*#__PURE__*/
|
|
388
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2895
389
|
fill: "none",
|
|
2896
390
|
fillRule: "evenodd"
|
|
2897
|
-
}, /*#__PURE__*/
|
|
391
|
+
}, /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
2898
392
|
width: "36",
|
|
2899
393
|
height: "28",
|
|
2900
394
|
fill: "#3D6FCF",
|
|
2901
395
|
rx: "4"
|
|
2902
|
-
}), /*#__PURE__*/
|
|
396
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2903
397
|
stroke: "#FFF",
|
|
2904
398
|
strokeLinecap: "round",
|
|
2905
399
|
strokeLinejoin: "round",
|
|
@@ -2912,16 +406,16 @@ var HyperLink = function HyperLink(_ref) {
|
|
|
2912
406
|
var _ref$hyperLink = _ref.hyperLink,
|
|
2913
407
|
hyperLink = _ref$hyperLink === void 0 ? "" : _ref$hyperLink;
|
|
2914
408
|
if (!hyperLink) return null;
|
|
2915
|
-
return /*#__PURE__*/
|
|
409
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
2916
410
|
href: hyperLink,
|
|
2917
411
|
"aria-label": "hyperlink-button",
|
|
2918
412
|
className: "arr--hyperlink-button hyperlink-m_hyperlink-button__1CqWx",
|
|
2919
413
|
target: "_blank",
|
|
2920
414
|
rel: "noopener noreferrer"
|
|
2921
|
-
}, /*#__PURE__*/
|
|
415
|
+
}, /*#__PURE__*/React__default["default"].createElement(HyperLinkIcon, null));
|
|
2922
416
|
};
|
|
2923
417
|
HyperLink.propTypes = {
|
|
2924
|
-
hyperLink:
|
|
418
|
+
hyperLink: PropTypes__default["default"].string
|
|
2925
419
|
};
|
|
2926
420
|
|
|
2927
421
|
var _styleModuleImportMap$f = {
|
|
@@ -2957,8 +451,8 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
2957
451
|
StoryTemplateIcon = _config$StoryTemplate === void 0 ? function () {
|
|
2958
452
|
return null;
|
|
2959
453
|
} : _config$StoryTemplate;
|
|
2960
|
-
var showImagePlaceholder = useSelector(function (state) {
|
|
2961
|
-
return
|
|
454
|
+
var showImagePlaceholder = reactRedux.useSelector(function (state) {
|
|
455
|
+
return lodash.get(state, ["qt", "config", "showPlaceholder"]);
|
|
2962
456
|
});
|
|
2963
457
|
var getPlaceholderStyleName = showImagePlaceholder ? "placeholder" : "";
|
|
2964
458
|
var fullBleed = FullBleed ? "" : "with-padding";
|
|
@@ -2967,7 +461,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
2967
461
|
var heroImageMobClasses = isHorizontalMobile ? "right-padding-mob" : "";
|
|
2968
462
|
|
|
2969
463
|
var getPadding = function getPadding(aspectRatio) {
|
|
2970
|
-
var _aspectRatio =
|
|
464
|
+
var _aspectRatio = _slicedToArray__default["default"](aspectRatio, 2),
|
|
2971
465
|
height = _aspectRatio[0],
|
|
2972
466
|
width = _aspectRatio[1];
|
|
2973
467
|
|
|
@@ -2979,7 +473,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
2979
473
|
return 0;
|
|
2980
474
|
};
|
|
2981
475
|
|
|
2982
|
-
var _aspectRatio2 =
|
|
476
|
+
var _aspectRatio2 = _slicedToArray__default["default"](aspectRatio, 2),
|
|
2983
477
|
mobileAspectRatio = _aspectRatio2[0],
|
|
2984
478
|
_aspectRatio2$ = _aspectRatio2[1],
|
|
2985
479
|
desktopAspectRatio = _aspectRatio2$ === void 0 ? mobileAspectRatio : _aspectRatio2$;
|
|
@@ -2987,43 +481,43 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
2987
481
|
var isMobile = clientWidth("mobile");
|
|
2988
482
|
var imageAspectRatio = isMobile ? mobileAspectRatio : desktopAspectRatio;
|
|
2989
483
|
var imagePadding = isMobile ? getPadding(mobileAspectRatio) : getPadding(desktopAspectRatio);
|
|
2990
|
-
var slug =
|
|
2991
|
-
var hyperLink =
|
|
484
|
+
var slug = lodash.get(story, ["hero-image-s3-key"]) || lodash.get(story, ["alternative", "home", "default", "hero-image", "hero-image-s3-key"]);
|
|
485
|
+
var hyperLink = lodash.get(story, ["hero-image-hyperlink"], "");
|
|
2992
486
|
|
|
2993
487
|
var fallbackImage = function fallbackImage() {
|
|
2994
488
|
if (!slug) {
|
|
2995
489
|
if (fallbackImageUrl && !isStoryPageImage) {
|
|
2996
|
-
return /*#__PURE__*/
|
|
490
|
+
return /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
2997
491
|
style: {
|
|
2998
492
|
paddingTop: imagePadding + "%"
|
|
2999
493
|
},
|
|
3000
|
-
className: "arr--responsive-hero-image " +
|
|
3001
|
-
}, /*#__PURE__*/
|
|
494
|
+
className: "arr--responsive-hero-image " + _getClassName__default["default"]("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$f)
|
|
495
|
+
}, /*#__PURE__*/React__default["default"].createElement("img", {
|
|
3002
496
|
className: "qt-image",
|
|
3003
497
|
"data-src": "".concat(fallbackImageUrl),
|
|
3004
498
|
alt: "image-fallback"
|
|
3005
499
|
}));
|
|
3006
500
|
}
|
|
3007
501
|
|
|
3008
|
-
return /*#__PURE__*/
|
|
502
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, defaultFallback ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3009
503
|
"data-test-id": "arr--fallback-hero-image",
|
|
3010
504
|
style: {
|
|
3011
505
|
paddingTop: imagePadding + "%"
|
|
3012
506
|
},
|
|
3013
|
-
className: "arr--fallback-hero-image " +
|
|
3014
|
-
}, /*#__PURE__*/
|
|
507
|
+
className: "arr--fallback-hero-image " + _getClassName__default["default"]("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$f)
|
|
508
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
|
|
3015
509
|
storyTemplate: story["story-template"]
|
|
3016
|
-
}), /*#__PURE__*/
|
|
510
|
+
}), /*#__PURE__*/React__default["default"].createElement(FallbackImage, null)) : null);
|
|
3017
511
|
}
|
|
3018
512
|
|
|
3019
|
-
return /*#__PURE__*/
|
|
513
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
3020
514
|
style: {
|
|
3021
515
|
paddingTop: imagePadding + "%"
|
|
3022
516
|
},
|
|
3023
|
-
className: "arr--responsive-hero-image " +
|
|
3024
|
-
}, /*#__PURE__*/
|
|
517
|
+
className: "arr--responsive-hero-image " + _getClassName__default["default"]("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$f)
|
|
518
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
|
|
3025
519
|
storyTemplate: story["story-template"]
|
|
3026
|
-
}), /*#__PURE__*/
|
|
520
|
+
}), /*#__PURE__*/React__default["default"].createElement(components.ResponsiveHeroImage, {
|
|
3027
521
|
story: story,
|
|
3028
522
|
aspectRatio: imageAspectRatio,
|
|
3029
523
|
defaultWidth: defaultWidth,
|
|
@@ -3032,48 +526,48 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3032
526
|
auto: ["format", "compress"],
|
|
3033
527
|
fit: "max"
|
|
3034
528
|
}
|
|
3035
|
-
})), isStoryPageImage && hyperLink && /*#__PURE__*/
|
|
529
|
+
})), isStoryPageImage && hyperLink && /*#__PURE__*/React__default["default"].createElement(HyperLink, {
|
|
3036
530
|
hyperLink: hyperLink
|
|
3037
531
|
}));
|
|
3038
532
|
};
|
|
3039
533
|
|
|
3040
|
-
return story && (isStoryPageImage ? /*#__PURE__*/
|
|
534
|
+
return story && (isStoryPageImage ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3041
535
|
"data-test-id": "arr--hero-image",
|
|
3042
|
-
className: "arr--hero-image " +
|
|
3043
|
-
}, fallbackImage()) : /*#__PURE__*/
|
|
536
|
+
className: "arr--hero-image " + _getClassName__default["default"]("".concat(heroImageClass, " ").concat(fullBleed, " ").concat(heroImageMobClasses), _styleModuleImportMap$f)
|
|
537
|
+
}, fallbackImage()) : /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3044
538
|
"data-test-id": "arr--hero-image",
|
|
3045
539
|
href: getStoryUrl(story, "/".concat(story.slug)),
|
|
3046
540
|
externalLink: isExternalStory(story),
|
|
3047
541
|
"aria-label": "fallback-hero-image",
|
|
3048
|
-
className: "arr--hero-image " +
|
|
542
|
+
className: "arr--hero-image " + _getClassName__default["default"]("".concat(heroImageClass, " ").concat(fullBleed, " ").concat(heroImageMobClasses), _styleModuleImportMap$f)
|
|
3049
543
|
}, fallbackImage()));
|
|
3050
544
|
};
|
|
3051
545
|
HeroImage.propTypes = {
|
|
3052
546
|
/** The Story Object from the API response */
|
|
3053
|
-
story:
|
|
547
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3054
548
|
|
|
3055
549
|
/** Removes the Hero Image padding for the image to bleed over the margin */
|
|
3056
|
-
FullBleed:
|
|
550
|
+
FullBleed: PropTypes__default["default"].bool,
|
|
3057
551
|
|
|
3058
552
|
/** The default width for the image, in case the browser does not support srcset */
|
|
3059
|
-
defaultWidth:
|
|
553
|
+
defaultWidth: PropTypes__default["default"].number,
|
|
3060
554
|
|
|
3061
555
|
/** The list of available widths */
|
|
3062
|
-
widths:
|
|
556
|
+
widths: PropTypes__default["default"].array,
|
|
3063
557
|
// fatch the correct hero image
|
|
3064
|
-
aspectRatio:
|
|
558
|
+
aspectRatio: PropTypes__default["default"].array,
|
|
3065
559
|
// Hints for the browser to choose the best size
|
|
3066
560
|
|
|
3067
561
|
/** This prop is responsible for adding padding-right of the image and remove padding bottom of the image */
|
|
3068
|
-
isHorizontal:
|
|
562
|
+
isHorizontal: PropTypes__default["default"].bool,
|
|
3069
563
|
|
|
3070
564
|
/** This prop is responsible for adding padding-bottom in desktop and padding-right in mobile */
|
|
3071
|
-
isHorizontalMobile:
|
|
565
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
3072
566
|
// this prop is responsive for rendering fallback image on story page
|
|
3073
|
-
defaultFallback:
|
|
3074
|
-
isHorizontalWithImageLast:
|
|
3075
|
-
isStoryPageImage:
|
|
3076
|
-
config:
|
|
567
|
+
defaultFallback: PropTypes__default["default"].bool,
|
|
568
|
+
isHorizontalWithImageLast: PropTypes__default["default"].bool,
|
|
569
|
+
isStoryPageImage: PropTypes__default["default"].bool,
|
|
570
|
+
config: PropTypes__default["default"].object
|
|
3077
571
|
};
|
|
3078
572
|
HeroImage.defaultProps = {
|
|
3079
573
|
FullBleed: true,
|
|
@@ -3113,7 +607,7 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
3113
607
|
_ref$navigate = _ref.navigate,
|
|
3114
608
|
navigate = _ref$navigate === void 0 ? true : _ref$navigate;
|
|
3115
609
|
var collectionTitle = useStateValue() || {};
|
|
3116
|
-
var showRowTitle =
|
|
610
|
+
var showRowTitle = lodash.get(collectionTitle, ["showRowTitle"], true);
|
|
3117
611
|
var supportedTemplates = ["borderLeft", "borderBottom", "crossLine", "borderBottomFull"];
|
|
3118
612
|
var templateStyle = supportedTemplates.includes(collectionNameTemplate) ? " collection-".concat(collectionNameTemplate) : "";
|
|
3119
613
|
var slug = navigate && collection && getSlug(collection, config) || "";
|
|
@@ -3124,7 +618,7 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
3124
618
|
var borderBottomFullStyle = templateStyle.includes("collection-borderBottomFull") ? "4px solid ".concat(CollectionNameBorderColor) : "";
|
|
3125
619
|
|
|
3126
620
|
var borderBottomStyle = function borderBottomStyle() {
|
|
3127
|
-
return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/
|
|
621
|
+
return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3128
622
|
className: "collection-name-m_border-bottom__1MnlV",
|
|
3129
623
|
style: {
|
|
3130
624
|
borderBottom: "4px solid ".concat(CollectionNameBorderColor)
|
|
@@ -3184,40 +678,40 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
3184
678
|
}
|
|
3185
679
|
};
|
|
3186
680
|
|
|
3187
|
-
return /*#__PURE__*/
|
|
681
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, showRowTitle && collectionName && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3188
682
|
style: {
|
|
3189
683
|
borderBottom: borderBottomFullStyle
|
|
3190
684
|
},
|
|
3191
685
|
"data-test-id": "collection-name",
|
|
3192
|
-
className: ("arr--collection-name arrow-component ".concat(templateStyle) ? "arr--collection-name arrow-component ".concat(templateStyle) + " " : "") +
|
|
3193
|
-
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/
|
|
686
|
+
className: ("arr--collection-name arrow-component ".concat(templateStyle) ? "arr--collection-name arrow-component ".concat(templateStyle) + " " : "") + _getClassName__default["default"]("collection ".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$e)
|
|
687
|
+
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3194
688
|
className: "arr-collection-name-border-left collection-name-m_border-left__3_pYw",
|
|
3195
689
|
style: {
|
|
3196
690
|
color: CollectionNameBorderColor,
|
|
3197
691
|
fontSize: getBorderHeight()
|
|
3198
692
|
}
|
|
3199
|
-
}), slug && !slug.includes(undefined) ? /*#__PURE__*/
|
|
693
|
+
}), slug && !slug.includes(undefined) ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3200
694
|
href: slug,
|
|
3201
695
|
"aria-label": "collection-name"
|
|
3202
|
-
}, /*#__PURE__*/
|
|
696
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName), borderBottomStyle()));
|
|
3203
697
|
};
|
|
3204
698
|
CollectionNameBase.propTypes = {
|
|
3205
699
|
/** Collection name border color */
|
|
3206
|
-
collectionNameBorderColor: PropTypes
|
|
700
|
+
collectionNameBorderColor: PropTypes.PropTypes.string,
|
|
3207
701
|
|
|
3208
702
|
/** The Collection Object from the API response */
|
|
3209
|
-
collection: PropTypes
|
|
703
|
+
collection: PropTypes.PropTypes.object,
|
|
3210
704
|
|
|
3211
705
|
/** The publisher config from the API response */
|
|
3212
|
-
config: PropTypes
|
|
706
|
+
config: PropTypes.PropTypes.object,
|
|
3213
707
|
|
|
3214
708
|
/** The style template for the component */
|
|
3215
|
-
collectionNameTemplate: PropTypes
|
|
709
|
+
collectionNameTemplate: PropTypes.PropTypes.oneOf(["", "borderLeft", "borderBottom", "crossLine", "borderBottomFull"]),
|
|
3216
710
|
|
|
3217
711
|
/** Header tags ranging h1-h6, where h[headerLevel] */
|
|
3218
|
-
headerLevel: PropTypes
|
|
3219
|
-
customCollectionName: PropTypes
|
|
3220
|
-
navigate: PropTypes
|
|
712
|
+
headerLevel: PropTypes.PropTypes.string,
|
|
713
|
+
customCollectionName: PropTypes.PropTypes.string,
|
|
714
|
+
navigate: PropTypes.PropTypes.bool
|
|
3221
715
|
};
|
|
3222
716
|
CollectionNameBase.defaultProps = {
|
|
3223
717
|
collectionNameTemplate: "",
|
|
@@ -3226,11 +720,11 @@ CollectionNameBase.defaultProps = {
|
|
|
3226
720
|
|
|
3227
721
|
function mapStateToProps$1(state) {
|
|
3228
722
|
return {
|
|
3229
|
-
config:
|
|
723
|
+
config: lodash.get(state, ["qt", "config"], {})
|
|
3230
724
|
};
|
|
3231
725
|
}
|
|
3232
726
|
|
|
3233
|
-
var CollectionName = connect(mapStateToProps$1)(CollectionNameBase);
|
|
727
|
+
var CollectionName = reactRedux.connect(mapStateToProps$1)(CollectionNameBase);
|
|
3234
728
|
|
|
3235
729
|
var CrownIcon = function CrownIcon(_ref) {
|
|
3236
730
|
var height = _ref.height,
|
|
@@ -3238,7 +732,7 @@ var CrownIcon = function CrownIcon(_ref) {
|
|
|
3238
732
|
_ref$color = _ref.color,
|
|
3239
733
|
color = _ref$color === void 0 ? "#D8D8D8" : _ref$color,
|
|
3240
734
|
positionTop = _ref.positionTop;
|
|
3241
|
-
return /*#__PURE__*/
|
|
735
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3242
736
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3243
737
|
width: width,
|
|
3244
738
|
height: height,
|
|
@@ -3247,28 +741,28 @@ var CrownIcon = function CrownIcon(_ref) {
|
|
|
3247
741
|
position: "relative",
|
|
3248
742
|
top: positionTop
|
|
3249
743
|
}
|
|
3250
|
-
}, /*#__PURE__*/
|
|
744
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3251
745
|
fill: "none",
|
|
3252
746
|
fillRule: "evenodd",
|
|
3253
747
|
stroke: "none",
|
|
3254
748
|
strokeWidth: "1"
|
|
3255
|
-
}, /*#__PURE__*/
|
|
749
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3256
750
|
transform: "translate(8 8)"
|
|
3257
|
-
}, /*#__PURE__*/
|
|
751
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3258
752
|
d: "M0 0H24V24H0z"
|
|
3259
|
-
}), /*#__PURE__*/
|
|
753
|
+
}), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3260
754
|
fill: color,
|
|
3261
755
|
fillRule: "nonzero",
|
|
3262
756
|
transform: "translate(0 2)"
|
|
3263
|
-
}, /*#__PURE__*/
|
|
757
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3264
758
|
d: "M21.043 19.553c0-.743-.601-1.344-1.344-1.344h-15.4a1.343 1.343 0 100 2.688h15.4c.743 0 1.344-.603 1.344-1.344zM1.598 8.673c.022 0 .042 0 .064-.003l2.131 7.713h16.411l2.132-7.713c.022 0 .041.003.063.003a1.599 1.599 0 10-1.52-1.108L17.025 9.82 12.882 2.95a1.599 1.599 0 10-1.765 0L6.976 9.82 3.121 7.565a1.599 1.599 0 10-1.523 1.107z"
|
|
3265
759
|
}))))));
|
|
3266
760
|
};
|
|
3267
761
|
CrownIcon.propTypes = {
|
|
3268
|
-
height:
|
|
3269
|
-
width:
|
|
3270
|
-
color:
|
|
3271
|
-
positionTop:
|
|
762
|
+
height: PropTypes__default["default"].string,
|
|
763
|
+
width: PropTypes__default["default"].string,
|
|
764
|
+
color: PropTypes__default["default"].string,
|
|
765
|
+
positionTop: PropTypes__default["default"].string
|
|
3272
766
|
};
|
|
3273
767
|
|
|
3274
768
|
var KeyIcon = function KeyIcon(_ref) {
|
|
@@ -3277,7 +771,7 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
3277
771
|
_ref$color = _ref.color,
|
|
3278
772
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
3279
773
|
positionTop = _ref.positionTop;
|
|
3280
|
-
return /*#__PURE__*/
|
|
774
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3281
775
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3282
776
|
width: width,
|
|
3283
777
|
height: height,
|
|
@@ -3286,16 +780,16 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
3286
780
|
position: "relative",
|
|
3287
781
|
top: positionTop
|
|
3288
782
|
}
|
|
3289
|
-
}, /*#__PURE__*/
|
|
783
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3290
784
|
fill: "none",
|
|
3291
785
|
fillRule: "evenodd",
|
|
3292
786
|
stroke: "none",
|
|
3293
787
|
strokeWidth: "1"
|
|
3294
|
-
}, /*#__PURE__*/
|
|
788
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3295
789
|
transform: "translate(8 8)"
|
|
3296
|
-
}, /*#__PURE__*/
|
|
790
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3297
791
|
d: "M0 0H24V24H0z"
|
|
3298
|
-
}), /*#__PURE__*/
|
|
792
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3299
793
|
fill: color,
|
|
3300
794
|
fillRule: "nonzero",
|
|
3301
795
|
d: "M12.71 4.364A6.54 6.54 0 000 6.545a6.54 6.54 0 0012.71 2.182h4.745v4.364h4.363V8.727H24V4.364H12.71zM6.544 8.727a2.181 2.181 0 110-4.362 2.181 2.181 0 010 4.362z",
|
|
@@ -3303,10 +797,10 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
3303
797
|
})))));
|
|
3304
798
|
};
|
|
3305
799
|
KeyIcon.propTypes = {
|
|
3306
|
-
height:
|
|
3307
|
-
width:
|
|
3308
|
-
color:
|
|
3309
|
-
positionTop:
|
|
800
|
+
height: PropTypes__default["default"].string,
|
|
801
|
+
width: PropTypes__default["default"].string,
|
|
802
|
+
color: PropTypes__default["default"].string,
|
|
803
|
+
positionTop: PropTypes__default["default"].string
|
|
3310
804
|
};
|
|
3311
805
|
|
|
3312
806
|
var LockIcon = function LockIcon(_ref) {
|
|
@@ -3315,7 +809,7 @@ var LockIcon = function LockIcon(_ref) {
|
|
|
3315
809
|
_ref$color = _ref.color,
|
|
3316
810
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
3317
811
|
positionTop = _ref.positionTop;
|
|
3318
|
-
return /*#__PURE__*/
|
|
812
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3319
813
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3320
814
|
width: width,
|
|
3321
815
|
height: height,
|
|
@@ -3324,28 +818,28 @@ var LockIcon = function LockIcon(_ref) {
|
|
|
3324
818
|
position: "relative",
|
|
3325
819
|
top: positionTop
|
|
3326
820
|
}
|
|
3327
|
-
}, /*#__PURE__*/
|
|
821
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3328
822
|
fill: "none",
|
|
3329
823
|
fillRule: "evenodd",
|
|
3330
824
|
stroke: "none",
|
|
3331
825
|
strokeWidth: "1"
|
|
3332
|
-
}, /*#__PURE__*/
|
|
826
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3333
827
|
transform: "translate(8 8)"
|
|
3334
|
-
}, /*#__PURE__*/
|
|
828
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3335
829
|
d: "M0 0H24V24H0z"
|
|
3336
|
-
}), /*#__PURE__*/
|
|
830
|
+
}), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3337
831
|
fill: color,
|
|
3338
832
|
fillRule: "nonzero",
|
|
3339
833
|
transform: "translate(3)"
|
|
3340
|
-
}, /*#__PURE__*/
|
|
834
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3341
835
|
d: "M15.692 9h-.747V6c0-3.31-2.681-6-5.978-6C5.67 0 2.989 2.69 2.989 6v3h-.747A2.249 2.249 0 000 11.25v10.5A2.249 2.249 0 002.242 24h13.45a2.249 2.249 0 002.242-2.25v-10.5A2.249 2.249 0 0015.692 9zM4.982 6c0-2.206 1.787-4 3.985-4s3.985 1.794 3.985 4v3h-7.97V6z"
|
|
3342
836
|
}))))));
|
|
3343
837
|
};
|
|
3344
838
|
LockIcon.propTypes = {
|
|
3345
|
-
height:
|
|
3346
|
-
width:
|
|
3347
|
-
color:
|
|
3348
|
-
positionTop:
|
|
839
|
+
height: PropTypes__default["default"].string,
|
|
840
|
+
width: PropTypes__default["default"].string,
|
|
841
|
+
color: PropTypes__default["default"].string,
|
|
842
|
+
positionTop: PropTypes__default["default"].string
|
|
3349
843
|
};
|
|
3350
844
|
|
|
3351
845
|
var StarIcon = function StarIcon(_ref) {
|
|
@@ -3355,7 +849,7 @@ var StarIcon = function StarIcon(_ref) {
|
|
|
3355
849
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
3356
850
|
_ref$positionTop = _ref.positionTop,
|
|
3357
851
|
positionTop = _ref$positionTop === void 0 ? "" : _ref$positionTop;
|
|
3358
|
-
return /*#__PURE__*/
|
|
852
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3359
853
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3360
854
|
width: width,
|
|
3361
855
|
height: height,
|
|
@@ -3364,21 +858,21 @@ var StarIcon = function StarIcon(_ref) {
|
|
|
3364
858
|
position: "relative",
|
|
3365
859
|
top: positionTop
|
|
3366
860
|
}
|
|
3367
|
-
}, /*#__PURE__*/
|
|
861
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3368
862
|
fill: "none",
|
|
3369
863
|
fillRule: "evenodd",
|
|
3370
864
|
stroke: "none",
|
|
3371
865
|
strokeWidth: "1"
|
|
3372
|
-
}, /*#__PURE__*/
|
|
866
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3373
867
|
fill: color,
|
|
3374
868
|
d: "M20 26L12.946577 29.7082039 14.2936609 21.854102 8.5873218 16.2917961 16.4732885 15.145898 20 8 23.5267115 15.145898 31.4126782 16.2917961 25.7063391 21.854102 27.053423 29.7082039z"
|
|
3375
869
|
}))));
|
|
3376
870
|
};
|
|
3377
871
|
StarIcon.propTypes = {
|
|
3378
|
-
height:
|
|
3379
|
-
width:
|
|
3380
|
-
color:
|
|
3381
|
-
positionTop:
|
|
872
|
+
height: PropTypes__default["default"].string,
|
|
873
|
+
width: PropTypes__default["default"].string,
|
|
874
|
+
color: PropTypes__default["default"].string,
|
|
875
|
+
positionTop: PropTypes__default["default"].string
|
|
3382
876
|
};
|
|
3383
877
|
|
|
3384
878
|
var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
@@ -3390,7 +884,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3390
884
|
|
|
3391
885
|
switch (iconType) {
|
|
3392
886
|
case "crown":
|
|
3393
|
-
return /*#__PURE__*/
|
|
887
|
+
return /*#__PURE__*/React__default["default"].createElement(CrownIcon, {
|
|
3394
888
|
width: width,
|
|
3395
889
|
height: height,
|
|
3396
890
|
color: color,
|
|
@@ -3398,7 +892,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3398
892
|
});
|
|
3399
893
|
|
|
3400
894
|
case "lock":
|
|
3401
|
-
return /*#__PURE__*/
|
|
895
|
+
return /*#__PURE__*/React__default["default"].createElement(LockIcon, {
|
|
3402
896
|
width: width,
|
|
3403
897
|
height: height,
|
|
3404
898
|
color: color,
|
|
@@ -3406,7 +900,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3406
900
|
});
|
|
3407
901
|
|
|
3408
902
|
case "key":
|
|
3409
|
-
return /*#__PURE__*/
|
|
903
|
+
return /*#__PURE__*/React__default["default"].createElement(KeyIcon, {
|
|
3410
904
|
width: width,
|
|
3411
905
|
height: height,
|
|
3412
906
|
color: color,
|
|
@@ -3414,7 +908,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3414
908
|
});
|
|
3415
909
|
|
|
3416
910
|
default:
|
|
3417
|
-
return /*#__PURE__*/
|
|
911
|
+
return /*#__PURE__*/React__default["default"].createElement(StarIcon, {
|
|
3418
912
|
width: width,
|
|
3419
913
|
height: height,
|
|
3420
914
|
color: color,
|
|
@@ -3423,21 +917,21 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3423
917
|
}
|
|
3424
918
|
};
|
|
3425
919
|
PremiumStoryIcon.propTypes = {
|
|
3426
|
-
width:
|
|
3427
|
-
height:
|
|
3428
|
-
color:
|
|
3429
|
-
iconType:
|
|
3430
|
-
positionTop:
|
|
920
|
+
width: PropTypes__default["default"].string,
|
|
921
|
+
height: PropTypes__default["default"].string,
|
|
922
|
+
color: PropTypes__default["default"].string,
|
|
923
|
+
iconType: PropTypes__default["default"].string,
|
|
924
|
+
positionTop: PropTypes__default["default"].string
|
|
3431
925
|
};
|
|
3432
926
|
|
|
3433
927
|
function LiveIcon() {
|
|
3434
|
-
return /*#__PURE__*/
|
|
928
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3435
929
|
className: "live-icon",
|
|
3436
930
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3437
931
|
width: "25",
|
|
3438
932
|
height: "24",
|
|
3439
933
|
viewBox: "0 0 25 24"
|
|
3440
|
-
}, /*#__PURE__*/
|
|
934
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3441
935
|
fill: "#ff5858",
|
|
3442
936
|
d: "M12 18a6 6 0 110-12 6 6 0 010 12zm0 2.5a8.5 8.5 0 110-17 8.5 8.5 0 010 17zm0-1a7.5 7.5 0 100-15 7.5 7.5 0 000 15z"
|
|
3443
937
|
}));
|
|
@@ -3466,8 +960,8 @@ var Headline = function Headline(_ref) {
|
|
|
3466
960
|
enablePremiumStoryIcon = _premiumStoryIconConf3 === void 0 ? false : _premiumStoryIconConf3,
|
|
3467
961
|
_premiumStoryIconConf4 = premiumStoryIconConfig.showLiveIcon,
|
|
3468
962
|
showLiveIcon = _premiumStoryIconConf4 === void 0 ? false : _premiumStoryIconConf4;
|
|
3469
|
-
var alternateHeadline =
|
|
3470
|
-
var premiumStory = enablePremiumStoryIcon &&
|
|
963
|
+
var alternateHeadline = lodash.get(story, ["alternative", "home", "default", "headline"]);
|
|
964
|
+
var premiumStory = enablePremiumStoryIcon && lodash.get(story, ["access"]) === "subscription";
|
|
3471
965
|
var headline = alternateHeadline || story.headline;
|
|
3472
966
|
var HeaderTag = "h" + headerLevel;
|
|
3473
967
|
|
|
@@ -3493,38 +987,38 @@ var Headline = function Headline(_ref) {
|
|
|
3493
987
|
var textColor = getTextColor(configData.theme);
|
|
3494
988
|
var wrapperClass = premiumStory ? "wrapper" : "";
|
|
3495
989
|
var iconSize = "24px";
|
|
3496
|
-
var enableLiveIcon = showLiveIcon && story["story-template"] === "live-blog" && !
|
|
3497
|
-
return /*#__PURE__*/
|
|
990
|
+
var enableLiveIcon = showLiveIcon && story["story-template"] === "live-blog" && !lodash.get(story, ["metadata", "is-closed"], false);
|
|
991
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3498
992
|
"data-test-id": "headline",
|
|
3499
|
-
className: "arrow-component arr--headline " +
|
|
3500
|
-
}, premiumStory && /*#__PURE__*/
|
|
993
|
+
className: "arrow-component arr--headline " + _getClassName__default["default"](wrapperClass, _styleModuleImportMap$d)
|
|
994
|
+
}, premiumStory && /*#__PURE__*/React__default["default"].createElement(PremiumStoryIcon, {
|
|
3501
995
|
width: iconSize,
|
|
3502
996
|
height: iconSize,
|
|
3503
997
|
color: iconColor,
|
|
3504
998
|
iconType: iconStyle,
|
|
3505
999
|
positionTop: positionHeadline()
|
|
3506
|
-
}), isLink ? /*#__PURE__*/
|
|
1000
|
+
}), isLink ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3507
1001
|
href: getStoryUrl(story, "/".concat(story.slug)),
|
|
3508
1002
|
externalLink: isExternalStory(story),
|
|
3509
1003
|
"aria-label": "headline"
|
|
3510
|
-
}, /*#__PURE__*/
|
|
3511
|
-
className:
|
|
3512
|
-
}, enableLiveIcon && /*#__PURE__*/
|
|
3513
|
-
className:
|
|
3514
|
-
}, enableLiveIcon && /*#__PURE__*/
|
|
1004
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
1005
|
+
className: _getClassName__default["default"]("headline ".concat(textColor), _styleModuleImportMap$d)
|
|
1006
|
+
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
1007
|
+
className: _getClassName__default["default"]("headline ".concat(textColor), _styleModuleImportMap$d)
|
|
1008
|
+
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline));
|
|
3515
1009
|
};
|
|
3516
1010
|
Headline.propTypes = {
|
|
3517
1011
|
/** The Story Object from the API response */
|
|
3518
|
-
story:
|
|
1012
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3519
1013
|
|
|
3520
1014
|
/** Header tags ranging h1-h6, where h[headerLevel] */
|
|
3521
|
-
headerLevel:
|
|
3522
|
-
premiumStoryIconConfig:
|
|
3523
|
-
iconColor:
|
|
3524
|
-
iconType:
|
|
3525
|
-
enablePremiumStoryIcon:
|
|
1015
|
+
headerLevel: PropTypes__default["default"].string,
|
|
1016
|
+
premiumStoryIconConfig: PropTypes__default["default"].shape({
|
|
1017
|
+
iconColor: PropTypes__default["default"].string,
|
|
1018
|
+
iconType: PropTypes__default["default"].string,
|
|
1019
|
+
enablePremiumStoryIcon: PropTypes__default["default"].bool
|
|
3526
1020
|
}),
|
|
3527
|
-
isLink:
|
|
1021
|
+
isLink: PropTypes__default["default"].bool
|
|
3528
1022
|
};
|
|
3529
1023
|
Headline.defaultProps = {
|
|
3530
1024
|
headerLevel: "6",
|
|
@@ -3551,9 +1045,9 @@ var SectionTag = function SectionTag(_ref) {
|
|
|
3551
1045
|
borderColor = _ref$borderColor === void 0 ? "" : _ref$borderColor,
|
|
3552
1046
|
isLightTheme = _ref.isLightTheme;
|
|
3553
1047
|
var config = useStateValue() || {};
|
|
3554
|
-
var isSection =
|
|
3555
|
-
var templateFromRowContext =
|
|
3556
|
-
var section =
|
|
1048
|
+
var isSection = lodash.get(config, ["showSection"], true);
|
|
1049
|
+
var templateFromRowContext = lodash.get(config, ["sectionTagTemplate"]);
|
|
1050
|
+
var section = lodash.get(story, ["sections", 0], "");
|
|
3557
1051
|
var supportedTemplates = ["borderBottomSml", "borderLeft", "solid"];
|
|
3558
1052
|
var getUrl = section ? section["section-url"] : "/";
|
|
3559
1053
|
var colorToApplyContrast = template === "solid" || templateFromRowContext === "solid" ? borderColor : config.theme;
|
|
@@ -3566,22 +1060,22 @@ var SectionTag = function SectionTag(_ref) {
|
|
|
3566
1060
|
}
|
|
3567
1061
|
|
|
3568
1062
|
if (!isSection) return null;
|
|
3569
|
-
return /*#__PURE__*/
|
|
1063
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3570
1064
|
href: getUrl,
|
|
3571
1065
|
className: "arrow-component arr--section-name",
|
|
3572
1066
|
"aria-label": "section-name"
|
|
3573
|
-
}, /*#__PURE__*/
|
|
1067
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3574
1068
|
"data-test-id": "sectionTag",
|
|
3575
1069
|
style: {
|
|
3576
1070
|
backgroundColor: templateStyle.includes("section-solid") ? sectionTagBorderColor : ""
|
|
3577
1071
|
},
|
|
3578
|
-
className: "section-tag arrow-component " +
|
|
3579
|
-
}, templateStyle.includes("section-borderLeft") && /*#__PURE__*/
|
|
1072
|
+
className: "section-tag arrow-component " + _getClassName__default["default"]("".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$c)
|
|
1073
|
+
}, templateStyle.includes("section-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3580
1074
|
className: "section-m_border-left__2oUyp",
|
|
3581
1075
|
style: {
|
|
3582
1076
|
color: sectionTagBorderColor
|
|
3583
1077
|
}
|
|
3584
|
-
}), section["display-name"] || section["name"], /*#__PURE__*/
|
|
1078
|
+
}), section["display-name"] || section["name"], /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3585
1079
|
className: "section-m_border-bottom__3cRoD",
|
|
3586
1080
|
style: {
|
|
3587
1081
|
backgroundColor: "".concat(template === "solid" ? "" : sectionTagBorderColor)
|
|
@@ -3590,13 +1084,13 @@ var SectionTag = function SectionTag(_ref) {
|
|
|
3590
1084
|
};
|
|
3591
1085
|
SectionTag.propTypes = {
|
|
3592
1086
|
/** The Story Object from the API response */
|
|
3593
|
-
story:
|
|
1087
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3594
1088
|
|
|
3595
1089
|
/** The style template for section tag */
|
|
3596
|
-
template:
|
|
3597
|
-
borderColor:
|
|
3598
|
-
solidBorderColor:
|
|
3599
|
-
isLightTheme:
|
|
1090
|
+
template: PropTypes__default["default"].oneOf(["", "borderBottomSml", "borderLeft", "solid"]),
|
|
1091
|
+
borderColor: PropTypes__default["default"].string,
|
|
1092
|
+
solidBorderColor: PropTypes__default["default"].string,
|
|
1093
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
3600
1094
|
};
|
|
3601
1095
|
SectionTag.defaultProps = {
|
|
3602
1096
|
template: "",
|
|
@@ -3618,22 +1112,22 @@ var TimeStamp = function TimeStamp(_ref) {
|
|
|
3618
1112
|
_ref$config = _ref.config,
|
|
3619
1113
|
config = _ref$config === void 0 ? {} : _ref$config;
|
|
3620
1114
|
var configState = useStateValue() || {};
|
|
3621
|
-
var isTime =
|
|
1115
|
+
var isTime = lodash.get(config, ["showTime"], lodash.get(configState, ["showTime"], true));
|
|
3622
1116
|
var time = story["last-published-at"] || story["first-published-at"];
|
|
3623
1117
|
var isBottomClasses = isBottom ? "bottom-fix" : "";
|
|
3624
1118
|
var textColor = getTextColor(configState.theme);
|
|
3625
|
-
return /*#__PURE__*/
|
|
1119
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isTime && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3626
1120
|
"data-test-id": "publish-time",
|
|
3627
|
-
className: "time arr--publish-time " +
|
|
3628
|
-
}, /*#__PURE__*/
|
|
1121
|
+
className: "time arr--publish-time " + _getClassName__default["default"]("time ".concat(textColor, " ").concat(isBottomClasses), _styleModuleImportMap$b)
|
|
1122
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3629
1123
|
className: "timestamp-m_time-wrapper__3O2lM"
|
|
3630
1124
|
}, getTimeStamp(time, formatter, config))));
|
|
3631
1125
|
};
|
|
3632
1126
|
TimeStamp.propTypes = {
|
|
3633
1127
|
/** The Story Object from the API response */
|
|
3634
|
-
story:
|
|
3635
|
-
isBottom:
|
|
3636
|
-
config:
|
|
1128
|
+
story: PropTypes__default["default"].object,
|
|
1129
|
+
isBottom: PropTypes__default["default"].bool,
|
|
1130
|
+
config: PropTypes__default["default"].object
|
|
3637
1131
|
};
|
|
3638
1132
|
|
|
3639
1133
|
var _styleModuleImportMap$a = {
|
|
@@ -3659,9 +1153,9 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3659
1153
|
_ref$config = _ref.config,
|
|
3660
1154
|
config = _ref$config === void 0 ? {} : _ref$config;
|
|
3661
1155
|
var configData = useStateValue() || {};
|
|
3662
|
-
var isAuthor =
|
|
1156
|
+
var isAuthor = lodash.get(configData, ["showAuthor"], true);
|
|
3663
1157
|
|
|
3664
|
-
var _get =
|
|
1158
|
+
var _get = lodash.get(story, ["authors", "0"], ""),
|
|
3665
1159
|
avatarUrl = _get["avatar-url"],
|
|
3666
1160
|
avatarS3Key = _get["avatar-s3-key"],
|
|
3667
1161
|
authorName = _get.name,
|
|
@@ -3669,17 +1163,17 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3669
1163
|
|
|
3670
1164
|
var isBottomClasses = isBottom ? "bottom-fix" : "";
|
|
3671
1165
|
var textColor = getTextColor(configData.theme);
|
|
3672
|
-
var mountAt =
|
|
1166
|
+
var mountAt = lodash.get(config, ["mountAt"], "");
|
|
3673
1167
|
|
|
3674
1168
|
var authorImage = function authorImage(dir) {
|
|
3675
1169
|
if (!avatarUrl && !avatarS3Key) {
|
|
3676
1170
|
return null;
|
|
3677
1171
|
}
|
|
3678
1172
|
|
|
3679
|
-
return /*#__PURE__*/
|
|
1173
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3680
1174
|
"data-test-id": "author-image",
|
|
3681
|
-
className:
|
|
3682
|
-
}, /*#__PURE__*/
|
|
1175
|
+
className: _getClassName__default["default"]("author-image ".concat(dir, "-image"), _styleModuleImportMap$a)
|
|
1176
|
+
}, /*#__PURE__*/React__default["default"].createElement("figure", null, avatarS3Key ? /*#__PURE__*/React__default["default"].createElement(components.ResponsiveImage, {
|
|
3683
1177
|
slug: avatarS3Key,
|
|
3684
1178
|
"aspect-ratio": [1, 1],
|
|
3685
1179
|
defaultWidth: 400,
|
|
@@ -3687,49 +1181,49 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3687
1181
|
auto: ["format", "compress"]
|
|
3688
1182
|
},
|
|
3689
1183
|
alt: authorName
|
|
3690
|
-
}) : /*#__PURE__*/
|
|
1184
|
+
}) : /*#__PURE__*/React__default["default"].createElement("img", {
|
|
3691
1185
|
src: avatarUrl
|
|
3692
1186
|
})));
|
|
3693
1187
|
};
|
|
3694
1188
|
|
|
3695
1189
|
var isPrefix = function isPrefix(dir) {
|
|
3696
1190
|
if (prefix) {
|
|
3697
|
-
return /*#__PURE__*/
|
|
3698
|
-
className: "arr-author-prefix " +
|
|
1191
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1192
|
+
className: "arr-author-prefix " + _getClassName__default["default"]("prefix ".concat(textColor), _styleModuleImportMap$a)
|
|
3699
1193
|
}, prefix);
|
|
3700
1194
|
}
|
|
3701
1195
|
|
|
3702
1196
|
return !hideAuthorImage && authorImage(dir);
|
|
3703
1197
|
};
|
|
3704
1198
|
|
|
3705
|
-
return /*#__PURE__*/
|
|
1199
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3706
1200
|
href: "".concat(mountAt, "/author/") + slug,
|
|
3707
1201
|
"aria-label": "author-name",
|
|
3708
|
-
className: "author-name arr-author-name arrow-component " +
|
|
3709
|
-
}, isPrefix("ltr"), /*#__PURE__*/
|
|
1202
|
+
className: "author-name arr-author-name arrow-component " + _getClassName__default["default"]("author ".concat(isBottomClasses), _styleModuleImportMap$a)
|
|
1203
|
+
}, isPrefix("ltr"), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3710
1204
|
"data-test-id": "author-name",
|
|
3711
|
-
className: "author-name " +
|
|
1205
|
+
className: "author-name " + _getClassName__default["default"]("author-name ".concat(textColor), _styleModuleImportMap$a)
|
|
3712
1206
|
}, authorName || story["author-name"]), !prefix && isPrefix("rtl")));
|
|
3713
1207
|
};
|
|
3714
1208
|
|
|
3715
1209
|
function mapStateToProps(state) {
|
|
3716
1210
|
return {
|
|
3717
|
-
config:
|
|
1211
|
+
config: lodash.get(state, ["qt", "config"], {})
|
|
3718
1212
|
};
|
|
3719
1213
|
}
|
|
3720
1214
|
|
|
3721
|
-
var Author = connect(mapStateToProps)(AuthorBase);
|
|
1215
|
+
var Author = reactRedux.connect(mapStateToProps)(AuthorBase);
|
|
3722
1216
|
AuthorBase.propTypes = {
|
|
3723
1217
|
/** The Story Object from the API response */
|
|
3724
|
-
story:
|
|
1218
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3725
1219
|
|
|
3726
1220
|
/** Hide Author Avatar Image */
|
|
3727
|
-
hideAuthorImage:
|
|
1221
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
3728
1222
|
// fix Author bottom of the storyCard
|
|
3729
|
-
isBottom:
|
|
1223
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3730
1224
|
// fix prefix before the author name
|
|
3731
|
-
prefix:
|
|
3732
|
-
config:
|
|
1225
|
+
prefix: PropTypes__default["default"].string,
|
|
1226
|
+
config: PropTypes__default["default"].object
|
|
3733
1227
|
};
|
|
3734
1228
|
AuthorBase.defaultProps = {
|
|
3735
1229
|
hideAuthorImage: false,
|
|
@@ -3750,14 +1244,14 @@ var Dot = function Dot(_ref) {
|
|
|
3750
1244
|
height = _ref$height === void 0 ? "3px" : _ref$height,
|
|
3751
1245
|
_ref$color = _ref.color,
|
|
3752
1246
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
3753
|
-
return /*#__PURE__*/
|
|
3754
|
-
className:
|
|
3755
|
-
}, /*#__PURE__*/
|
|
1247
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1248
|
+
className: _getClassName__default["default"](color, _styleModuleImportMap$9)
|
|
1249
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3756
1250
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3757
1251
|
width: width,
|
|
3758
1252
|
height: height,
|
|
3759
1253
|
viewBox: "0 0 3 3"
|
|
3760
|
-
}, /*#__PURE__*/
|
|
1254
|
+
}, /*#__PURE__*/React__default["default"].createElement("circle", {
|
|
3761
1255
|
cx: "87",
|
|
3762
1256
|
cy: "9",
|
|
3763
1257
|
r: "1",
|
|
@@ -3768,9 +1262,9 @@ var Dot = function Dot(_ref) {
|
|
|
3768
1262
|
};
|
|
3769
1263
|
Dot.propTypes = {
|
|
3770
1264
|
/** height , width and color of the dot icon */
|
|
3771
|
-
color:
|
|
3772
|
-
width:
|
|
3773
|
-
height:
|
|
1265
|
+
color: PropTypes__default["default"].string,
|
|
1266
|
+
width: PropTypes__default["default"].string,
|
|
1267
|
+
height: PropTypes__default["default"].string
|
|
3774
1268
|
};
|
|
3775
1269
|
|
|
3776
1270
|
var _styleModuleImportMap$8 = {
|
|
@@ -3786,22 +1280,22 @@ var Divider = function Divider(_ref) {
|
|
|
3786
1280
|
height = _ref$height === void 0 ? "10" : _ref$height,
|
|
3787
1281
|
_ref$color = _ref.color,
|
|
3788
1282
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
3789
|
-
return /*#__PURE__*/
|
|
3790
|
-
className:
|
|
3791
|
-
}, /*#__PURE__*/
|
|
1283
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1284
|
+
className: _getClassName__default["default"](color, _styleModuleImportMap$8)
|
|
1285
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3792
1286
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3793
1287
|
width: width,
|
|
3794
1288
|
height: height
|
|
3795
|
-
}, /*#__PURE__*/
|
|
1289
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3796
1290
|
fill: "inherit",
|
|
3797
1291
|
d: "M0 0h1v10H0z"
|
|
3798
1292
|
})));
|
|
3799
1293
|
};
|
|
3800
1294
|
Divider.propTypes = {
|
|
3801
1295
|
/** height , width and color of the dot icon */
|
|
3802
|
-
color:
|
|
3803
|
-
width:
|
|
3804
|
-
height:
|
|
1296
|
+
color: PropTypes__default["default"].string,
|
|
1297
|
+
width: PropTypes__default["default"].string,
|
|
1298
|
+
height: PropTypes__default["default"].string
|
|
3805
1299
|
};
|
|
3806
1300
|
|
|
3807
1301
|
var _styleModuleImportMap$7 = {
|
|
@@ -3819,28 +1313,28 @@ var ReadTime = function ReadTime(_ref) {
|
|
|
3819
1313
|
_ref$isLightTheme = _ref.isLightTheme,
|
|
3820
1314
|
isLightTheme = _ref$isLightTheme === void 0 ? false : _ref$isLightTheme;
|
|
3821
1315
|
var config = useStateValue() || {};
|
|
3822
|
-
var showReadTime =
|
|
3823
|
-
var readTime =
|
|
1316
|
+
var showReadTime = lodash.get(config, ["showReadTime"]) || lodash.get(opts, ["showReadTime"], true);
|
|
1317
|
+
var readTime = lodash.get(story, ["read-time"], 0);
|
|
3824
1318
|
var textColor = isLightTheme ? "light" : getTextColor(config.theme);
|
|
3825
1319
|
if (!showReadTime || !readTime) return null;
|
|
3826
|
-
var timeToRead =
|
|
3827
|
-
return /*#__PURE__*/
|
|
1320
|
+
var timeToRead = lodash.get(opts, ["localizedTimeToRead"]) || "min read";
|
|
1321
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3828
1322
|
"data-test-id": "read-time",
|
|
3829
|
-
className: "arrow-component arr--read-time " +
|
|
3830
|
-
}, /*#__PURE__*/
|
|
1323
|
+
className: "arrow-component arr--read-time " + _getClassName__default["default"]("read-time-wrapper ".concat(textColor), _styleModuleImportMap$7)
|
|
1324
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3831
1325
|
className: "read-time-indicator read-time-m_dot-indicator__3Sqh2"
|
|
3832
|
-
}, /*#__PURE__*/
|
|
1326
|
+
}, /*#__PURE__*/React__default["default"].createElement(Dot, {
|
|
3833
1327
|
color: textColor
|
|
3834
|
-
})), /*#__PURE__*/
|
|
1328
|
+
})), /*#__PURE__*/React__default["default"].createElement("span", null, readTime, " ", timeToRead)));
|
|
3835
1329
|
};
|
|
3836
1330
|
ReadTime.propTypes = {
|
|
3837
|
-
story:
|
|
3838
|
-
"read-time":
|
|
1331
|
+
story: PropTypes__default["default"].shape({
|
|
1332
|
+
"read-time": PropTypes__default["default"].number
|
|
3839
1333
|
}),
|
|
3840
|
-
opts:
|
|
3841
|
-
showReadTime:
|
|
1334
|
+
opts: PropTypes__default["default"].shape({
|
|
1335
|
+
showReadTime: PropTypes__default["default"].bool
|
|
3842
1336
|
}),
|
|
3843
|
-
isLightTheme:
|
|
1337
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
3844
1338
|
};
|
|
3845
1339
|
|
|
3846
1340
|
var _styleModuleImportMap$6 = {
|
|
@@ -3862,42 +1356,42 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3862
1356
|
config = _ref$config === void 0 ? {} : _ref$config,
|
|
3863
1357
|
isLightTheme = _ref.isLightTheme;
|
|
3864
1358
|
var configState = useStateValue() || {};
|
|
3865
|
-
var isAuthor =
|
|
3866
|
-
var isTime =
|
|
3867
|
-
var isReadTime =
|
|
1359
|
+
var isAuthor = lodash.get(config, ["showAuthor"], lodash.get(configState, ["showAuthor"], true));
|
|
1360
|
+
var isTime = lodash.get(config, ["showTime"], lodash.get(configState, ["showTime"], true));
|
|
1361
|
+
var isReadTime = lodash.get(configState, ["showReadTime"], true);
|
|
3868
1362
|
var isBottomClasses = isBottom ? "bottom-fix" : "";
|
|
3869
1363
|
var seperatorStyle = separator === "dot" ? "dot" : "dash";
|
|
3870
1364
|
var textColor = isLightTheme ? "light" : getTextColor(configState.theme);
|
|
3871
1365
|
|
|
3872
1366
|
var getSeparator = function getSeparator() {
|
|
3873
1367
|
if (separator === "divider") {
|
|
3874
|
-
return /*#__PURE__*/
|
|
1368
|
+
return /*#__PURE__*/React__default["default"].createElement(Divider, {
|
|
3875
1369
|
color: textColor
|
|
3876
1370
|
});
|
|
3877
1371
|
}
|
|
3878
1372
|
|
|
3879
|
-
return /*#__PURE__*/
|
|
1373
|
+
return /*#__PURE__*/React__default["default"].createElement(Dot, {
|
|
3880
1374
|
color: textColor
|
|
3881
1375
|
});
|
|
3882
1376
|
};
|
|
3883
1377
|
|
|
3884
1378
|
var getTimeStamp = function getTimeStamp() {
|
|
3885
1379
|
if (!isTime) return null;
|
|
3886
|
-
return /*#__PURE__*/
|
|
3887
|
-
className: "arr-separator " +
|
|
3888
|
-
}, getSeparator()), /*#__PURE__*/
|
|
1380
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
1381
|
+
className: "arr-separator " + _getClassName__default["default"]("".concat(seperatorStyle), _styleModuleImportMap$6)
|
|
1382
|
+
}, getSeparator()), /*#__PURE__*/React__default["default"].createElement(TimeStamp, {
|
|
3889
1383
|
story: story,
|
|
3890
1384
|
config: config
|
|
3891
|
-
}), isReadTime && /*#__PURE__*/
|
|
1385
|
+
}), isReadTime && /*#__PURE__*/React__default["default"].createElement(ReadTime, {
|
|
3892
1386
|
story: story,
|
|
3893
1387
|
opts: config,
|
|
3894
1388
|
isLightTheme: isLightTheme
|
|
3895
1389
|
}));
|
|
3896
1390
|
};
|
|
3897
1391
|
|
|
3898
|
-
return /*#__PURE__*/
|
|
3899
|
-
className: "arr--author-time " +
|
|
3900
|
-
}, isAuthor ? /*#__PURE__*/
|
|
1392
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1393
|
+
className: "arr--author-time " + _getClassName__default["default"]("author-time-wrapper ".concat(isBottomClasses), _styleModuleImportMap$6)
|
|
1394
|
+
}, isAuthor ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Author, {
|
|
3901
1395
|
story: story,
|
|
3902
1396
|
isBottom: true,
|
|
3903
1397
|
hideAuthorImage: hideAuthorImage,
|
|
@@ -3905,19 +1399,19 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3905
1399
|
}), getTimeStamp()) : getTimeStamp());
|
|
3906
1400
|
};
|
|
3907
1401
|
AuthorWithTime.propTypes = {
|
|
3908
|
-
story:
|
|
1402
|
+
story: PropTypes__default["default"].object,
|
|
3909
1403
|
|
|
3910
1404
|
/** Style of separator between the Author & Timestamp */
|
|
3911
|
-
separator:
|
|
1405
|
+
separator: PropTypes__default["default"].oneOf(["dot", "divider"]),
|
|
3912
1406
|
|
|
3913
1407
|
/** hide the author image */
|
|
3914
|
-
hideAuthorImage:
|
|
1408
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
3915
1409
|
// fix author and time at the end
|
|
3916
|
-
isBottom:
|
|
1410
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3917
1411
|
// fix prefix before the author name
|
|
3918
|
-
prefix:
|
|
3919
|
-
config:
|
|
3920
|
-
isLightTheme:
|
|
1412
|
+
prefix: PropTypes__default["default"].string,
|
|
1413
|
+
config: PropTypes__default["default"].object,
|
|
1414
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
3921
1415
|
};
|
|
3922
1416
|
AuthorWithTime.defaultProps = {
|
|
3923
1417
|
separator: "dot",
|
|
@@ -3948,14 +1442,14 @@ var StorycardContent = function StorycardContent(_ref) {
|
|
|
3948
1442
|
var SectionTagborderColor = rgbToHex(borderColor);
|
|
3949
1443
|
var borderTemplate = borderOptions.includes(border) ? "border-".concat(border) : "";
|
|
3950
1444
|
var horizontalCard = isHorizontalMobile ? "horizontal-content-wrapper" : "";
|
|
3951
|
-
return /*#__PURE__*/
|
|
1445
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3952
1446
|
"data-test-id": "story-card-content",
|
|
3953
1447
|
style: {
|
|
3954
1448
|
backgroundColor: theme,
|
|
3955
1449
|
color: textColor
|
|
3956
1450
|
},
|
|
3957
|
-
className: "arr--content-wrapper " +
|
|
3958
|
-
}, children || /*#__PURE__*/
|
|
1451
|
+
className: "arr--content-wrapper " + _getClassName__default["default"]("wrapper ".concat(borderTemplate, " ").concat(horizontalCard), _styleModuleImportMap$5)
|
|
1452
|
+
}, children || /*#__PURE__*/React__default["default"].createElement(DefaultStoryCardContent, {
|
|
3959
1453
|
story: story,
|
|
3960
1454
|
headerLevel: headerLevel,
|
|
3961
1455
|
isHorizontalMobile: isHorizontalMobile,
|
|
@@ -3973,37 +1467,37 @@ var DefaultStoryCardContent = function DefaultStoryCardContent(_ref2) {
|
|
|
3973
1467
|
var SectionTagborderColor = rgbToHex(borderColor);
|
|
3974
1468
|
var _config$localizationC = config.localizationConfig,
|
|
3975
1469
|
localizationConfig = _config$localizationC === void 0 ? {} : _config$localizationC;
|
|
3976
|
-
return /*#__PURE__*/
|
|
1470
|
+
return /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement(SectionTag, {
|
|
3977
1471
|
story: story,
|
|
3978
1472
|
borderColor: SectionTagborderColor
|
|
3979
|
-
}), /*#__PURE__*/
|
|
1473
|
+
}), /*#__PURE__*/React__default["default"].createElement(Headline, {
|
|
3980
1474
|
story: story,
|
|
3981
1475
|
headerLevel: headerLevel,
|
|
3982
1476
|
premiumStoryIconConfig: config
|
|
3983
|
-
}), /*#__PURE__*/
|
|
1477
|
+
}), /*#__PURE__*/React__default["default"].createElement(AuthorWithTime, {
|
|
3984
1478
|
config: localizationConfig,
|
|
3985
1479
|
story: story
|
|
3986
1480
|
}));
|
|
3987
1481
|
};
|
|
3988
1482
|
|
|
3989
1483
|
DefaultStoryCardContent.propTypes = {
|
|
3990
|
-
story:
|
|
3991
|
-
border:
|
|
3992
|
-
theme:
|
|
3993
|
-
isHorizontalMobile:
|
|
3994
|
-
headerLevel:
|
|
3995
|
-
borderColor:
|
|
3996
|
-
config:
|
|
1484
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
1485
|
+
border: PropTypes__default["default"].string,
|
|
1486
|
+
theme: PropTypes__default["default"].string,
|
|
1487
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
1488
|
+
headerLevel: PropTypes__default["default"].string,
|
|
1489
|
+
borderColor: PropTypes__default["default"].string,
|
|
1490
|
+
config: PropTypes__default["default"].object
|
|
3997
1491
|
};
|
|
3998
1492
|
StorycardContent.propTypes = {
|
|
3999
|
-
story:
|
|
4000
|
-
children:
|
|
4001
|
-
theme:
|
|
4002
|
-
border:
|
|
4003
|
-
isHorizontalMobile:
|
|
4004
|
-
headerLevel:
|
|
4005
|
-
borderColor:
|
|
4006
|
-
config:
|
|
1493
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
1494
|
+
children: PropTypes__default["default"].node,
|
|
1495
|
+
theme: PropTypes__default["default"].string,
|
|
1496
|
+
border: PropTypes__default["default"].string,
|
|
1497
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
1498
|
+
headerLevel: PropTypes__default["default"].string,
|
|
1499
|
+
borderColor: PropTypes__default["default"].string,
|
|
1500
|
+
config: PropTypes__default["default"].object
|
|
4007
1501
|
};
|
|
4008
1502
|
|
|
4009
1503
|
var _styleModuleImportMap$4 = {
|
|
@@ -4023,28 +1517,28 @@ var Subheadline = function Subheadline(_ref) {
|
|
|
4023
1517
|
forceShowAtom = _ref.forceShowAtom,
|
|
4024
1518
|
showFullContent = _ref.showFullContent;
|
|
4025
1519
|
var config = useStateValue() || {};
|
|
4026
|
-
var subheadline = forceShowAtom ||
|
|
1520
|
+
var subheadline = forceShowAtom || lodash.get(config, ["showSubheadline"], true);
|
|
4027
1521
|
if (!subheadline) return null;
|
|
4028
1522
|
var textColor = getTextColor(config.theme);
|
|
4029
|
-
return /*#__PURE__*/
|
|
1523
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4030
1524
|
style: {
|
|
4031
1525
|
WebkitLineClamp: lineClamp
|
|
4032
1526
|
},
|
|
4033
1527
|
"data-test-id": "subheadline",
|
|
4034
|
-
className: ("p-alt arr--sub-headline arrow-component ".concat(clazzName) ? "p-alt arr--sub-headline arrow-component ".concat(clazzName) + " " : "") +
|
|
1528
|
+
className: ("p-alt arr--sub-headline arrow-component ".concat(clazzName) ? "p-alt arr--sub-headline arrow-component ".concat(clazzName) + " " : "") + _getClassName__default["default"]("subheadline ".concat(textColor), _styleModuleImportMap$4)
|
|
4035
1529
|
}, showFullContent || typeof lineClamp === "number" ? story.subheadline : truncate(story.subheadline, truncateChars, true));
|
|
4036
1530
|
};
|
|
4037
1531
|
Subheadline.propTypes = {
|
|
4038
1532
|
/** The Story Object from the API response */
|
|
4039
|
-
story:
|
|
1533
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4040
1534
|
// Restricts the number of lines for subheadline.
|
|
4041
|
-
lineClamp:
|
|
1535
|
+
lineClamp: PropTypes__default["default"].number,
|
|
4042
1536
|
|
|
4043
1537
|
/** Number of characters to truncate the subheadline */
|
|
4044
|
-
truncateChars:
|
|
4045
|
-
clazzName:
|
|
4046
|
-
forceShowAtom:
|
|
4047
|
-
showFullContent:
|
|
1538
|
+
truncateChars: PropTypes__default["default"].number,
|
|
1539
|
+
clazzName: PropTypes__default["default"].string,
|
|
1540
|
+
forceShowAtom: PropTypes__default["default"].bool,
|
|
1541
|
+
showFullContent: PropTypes__default["default"].bool
|
|
4048
1542
|
};
|
|
4049
1543
|
Subheadline.defaultProps = {
|
|
4050
1544
|
forceShowAtom: false,
|
|
@@ -4093,7 +1587,7 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
4093
1587
|
prefix = _ref.prefix,
|
|
4094
1588
|
config = _ref.config,
|
|
4095
1589
|
isHorizontalWithImageLast = _ref.isHorizontalWithImageLast;
|
|
4096
|
-
if (!story || isEmpty(story)) return /*#__PURE__*/
|
|
1590
|
+
if (!story || isEmpty(story)) return /*#__PURE__*/React__default["default"].createElement("div", null);
|
|
4097
1591
|
var borderOptions = ["default", "full", "bottom", "boxShadow"];
|
|
4098
1592
|
var borderTemplate = borderOptions.includes(border) ? "border-".concat(border) : ""; // TODO optimize conditions
|
|
4099
1593
|
|
|
@@ -4103,7 +1597,7 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
4103
1597
|
var bgImgContentOverlapClass = bgImgContentOverlap ? "content-overlap" : "";
|
|
4104
1598
|
var textColor = getTextColor(theme);
|
|
4105
1599
|
var horizontalMobileClasses = isHorizontalMobile ? "horizontal-mob" : "";
|
|
4106
|
-
var defaultStorycard = /*#__PURE__*/
|
|
1600
|
+
var defaultStorycard = /*#__PURE__*/React__default["default"].createElement(DefaultStoryCard, {
|
|
4107
1601
|
story: story,
|
|
4108
1602
|
aspectRatio: aspectRatio,
|
|
4109
1603
|
border: border,
|
|
@@ -4117,13 +1611,13 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
4117
1611
|
config: config,
|
|
4118
1612
|
isHorizontalWithImageLast: isHorizontalWithImageLast
|
|
4119
1613
|
});
|
|
4120
|
-
return /*#__PURE__*/
|
|
1614
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4121
1615
|
"data-test-id": "story-card",
|
|
4122
1616
|
style: {
|
|
4123
1617
|
backgroundColor: theme,
|
|
4124
1618
|
color: textColor
|
|
4125
1619
|
},
|
|
4126
|
-
className: "arr--story-card " +
|
|
1620
|
+
className: "arr--story-card " + _getClassName__default["default"]("card ".concat(horizontalCardStyle, " ").concat(borderTemplate, " ").concat(textColor, " ").concat(bgImageClasses, " ").concat(bgImgContentOverlapClass, " ").concat(horizontalMobileClasses), _styleModuleImportMap$3)
|
|
4127
1621
|
}, children || defaultStorycard);
|
|
4128
1622
|
};
|
|
4129
1623
|
|
|
@@ -4146,91 +1640,91 @@ var DefaultStoryCard = function DefaultStoryCard(_ref2) {
|
|
|
4146
1640
|
var SectionTagborderColor = rgbToHex(borderColor);
|
|
4147
1641
|
var _config$localizationC = config.localizationConfig,
|
|
4148
1642
|
localizationConfig = _config$localizationC === void 0 ? {} : _config$localizationC;
|
|
4149
|
-
return /*#__PURE__*/
|
|
1643
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isHorizontal ? /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4150
1644
|
config: config,
|
|
4151
1645
|
story: story,
|
|
4152
1646
|
isHorizontal: true,
|
|
4153
1647
|
isHorizontalMobile: isHorizontalMobile,
|
|
4154
1648
|
aspectRatio: aspectRatio
|
|
4155
|
-
}) : isHorizontalWithImageLast ? /*#__PURE__*/
|
|
1649
|
+
}) : isHorizontalWithImageLast ? /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4156
1650
|
config: config,
|
|
4157
1651
|
story: story,
|
|
4158
1652
|
isHorizontalWithImageLast: true,
|
|
4159
1653
|
isHorizontalMobile: isHorizontalMobile,
|
|
4160
1654
|
aspectRatio: aspectRatio
|
|
4161
|
-
}) : /*#__PURE__*/
|
|
1655
|
+
}) : /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4162
1656
|
story: story,
|
|
4163
1657
|
config: config,
|
|
4164
1658
|
isHorizontalMobile: isHorizontalMobile,
|
|
4165
1659
|
aspectRatio: aspectRatio
|
|
4166
|
-
}), /*#__PURE__*/
|
|
4167
|
-
className: "arr--story-content " +
|
|
4168
|
-
}, /*#__PURE__*/
|
|
1660
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1661
|
+
className: "arr--story-content " + _getClassName__default["default"]("content ".concat(alignment), _styleModuleImportMap$3)
|
|
1662
|
+
}, /*#__PURE__*/React__default["default"].createElement(SectionTag, {
|
|
4169
1663
|
story: story,
|
|
4170
1664
|
borderColor: SectionTagborderColor
|
|
4171
|
-
}), /*#__PURE__*/
|
|
1665
|
+
}), /*#__PURE__*/React__default["default"].createElement(Headline, {
|
|
4172
1666
|
story: story,
|
|
4173
1667
|
headerLevel: headerLevel,
|
|
4174
1668
|
premiumStoryIconConfig: config
|
|
4175
|
-
}), /*#__PURE__*/
|
|
1669
|
+
}), /*#__PURE__*/React__default["default"].createElement(AuthorWithTime, {
|
|
4176
1670
|
config: localizationConfig,
|
|
4177
1671
|
story: story,
|
|
4178
1672
|
isBottom: true,
|
|
4179
1673
|
prefix: prefix,
|
|
4180
1674
|
hideAuthorImage: hideAuthorImage
|
|
4181
|
-
}), /*#__PURE__*/
|
|
1675
|
+
}), /*#__PURE__*/React__default["default"].createElement(Subheadline, {
|
|
4182
1676
|
story: story
|
|
4183
1677
|
})));
|
|
4184
1678
|
};
|
|
4185
1679
|
|
|
4186
1680
|
DefaultStoryCard.propTypes = {
|
|
4187
|
-
story:
|
|
4188
|
-
border:
|
|
4189
|
-
isBottom:
|
|
4190
|
-
isHorizontal:
|
|
4191
|
-
aspectRatio:
|
|
4192
|
-
isHorizontalMobile:
|
|
4193
|
-
centerAlign:
|
|
4194
|
-
headerLevel:
|
|
4195
|
-
borderColor:
|
|
4196
|
-
hideAuthorImage:
|
|
4197
|
-
prefix:
|
|
4198
|
-
config:
|
|
4199
|
-
isHorizontalWithImageLast:
|
|
1681
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
1682
|
+
border: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string]),
|
|
1683
|
+
isBottom: PropTypes__default["default"].bool,
|
|
1684
|
+
isHorizontal: PropTypes__default["default"].bool,
|
|
1685
|
+
aspectRatio: PropTypes__default["default"].oneOfType([PropTypes__default["default"].array]),
|
|
1686
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
1687
|
+
centerAlign: PropTypes__default["default"].bool,
|
|
1688
|
+
headerLevel: PropTypes__default["default"].string,
|
|
1689
|
+
borderColor: PropTypes__default["default"].string,
|
|
1690
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
1691
|
+
prefix: PropTypes__default["default"].string,
|
|
1692
|
+
config: PropTypes__default["default"].object,
|
|
1693
|
+
isHorizontalWithImageLast: PropTypes__default["default"].bool
|
|
4200
1694
|
};
|
|
4201
1695
|
StoryCard.propTypes = {
|
|
4202
1696
|
/** The Story Object from the API response */
|
|
4203
|
-
story:
|
|
4204
|
-
children:
|
|
1697
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
1698
|
+
children: PropTypes__default["default"].node,
|
|
4205
1699
|
|
|
4206
1700
|
/** Flip the Story Card to Horizonal mode */
|
|
4207
|
-
isHorizontal:
|
|
1701
|
+
isHorizontal: PropTypes__default["default"].bool,
|
|
4208
1702
|
|
|
4209
1703
|
/** Add border to the Story Card */
|
|
4210
|
-
border:
|
|
1704
|
+
border: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string]),
|
|
4211
1705
|
// story card with background image
|
|
4212
|
-
useImageAsBackground:
|
|
1706
|
+
useImageAsBackground: PropTypes__default["default"].bool,
|
|
4213
1707
|
// story card content overlap with image
|
|
4214
|
-
bgImgContentOverlap:
|
|
1708
|
+
bgImgContentOverlap: PropTypes__default["default"].bool,
|
|
4215
1709
|
|
|
4216
1710
|
/** add aspect ratio for hero image */
|
|
4217
|
-
aspectRatio:
|
|
1711
|
+
aspectRatio: PropTypes__default["default"].oneOfType([PropTypes__default["default"].array]),
|
|
4218
1712
|
|
|
4219
1713
|
/** add theme(dark /light/custom color) for storycard */
|
|
4220
|
-
theme:
|
|
1714
|
+
theme: PropTypes__default["default"].string,
|
|
4221
1715
|
|
|
4222
1716
|
/** flip the story card mobile design horizontal */
|
|
4223
|
-
isHorizontalMobile:
|
|
1717
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
4224
1718
|
// make content center align in desktop and left align in mobile
|
|
4225
|
-
centerAlign:
|
|
4226
|
-
headerLevel:
|
|
4227
|
-
borderColor:
|
|
1719
|
+
centerAlign: PropTypes__default["default"].bool,
|
|
1720
|
+
headerLevel: PropTypes__default["default"].string,
|
|
1721
|
+
borderColor: PropTypes__default["default"].string,
|
|
4228
1722
|
// handle author image through storycard
|
|
4229
|
-
hideAuthorImage:
|
|
1723
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
4230
1724
|
// handle author prefix through storycard
|
|
4231
|
-
prefix:
|
|
4232
|
-
config:
|
|
4233
|
-
isHorizontalWithImageLast:
|
|
1725
|
+
prefix: PropTypes__default["default"].string,
|
|
1726
|
+
config: PropTypes__default["default"].object,
|
|
1727
|
+
isHorizontalWithImageLast: PropTypes__default["default"].bool
|
|
4234
1728
|
};
|
|
4235
1729
|
StoryCard.defaultProps = {
|
|
4236
1730
|
isHorizontal: false,
|
|
@@ -4254,14 +1748,14 @@ var BulletPoint = function BulletPoint(_ref) {
|
|
|
4254
1748
|
bulletValue = _ref$bulletValue === void 0 ? "" : _ref$bulletValue;
|
|
4255
1749
|
var configData = useStateValue() || {};
|
|
4256
1750
|
var textColor = getTextColor(configData.theme);
|
|
4257
|
-
return /*#__PURE__*/
|
|
1751
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4258
1752
|
className: "arrow-component arr--bullet-point"
|
|
4259
|
-
}, /*#__PURE__*/
|
|
4260
|
-
className:
|
|
1753
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
1754
|
+
className: _getClassName__default["default"]("bullet ".concat(textColor), _styleModuleImportMap$2)
|
|
4261
1755
|
}, bulletValue));
|
|
4262
1756
|
};
|
|
4263
1757
|
BulletPoint.propTypes = {
|
|
4264
|
-
bulletValue:
|
|
1758
|
+
bulletValue: PropTypes__default["default"].string
|
|
4265
1759
|
};
|
|
4266
1760
|
|
|
4267
1761
|
var StoryCardWithBulletPoint = function StoryCardWithBulletPoint(_ref) {
|
|
@@ -4272,49 +1766,34 @@ var StoryCardWithBulletPoint = function StoryCardWithBulletPoint(_ref) {
|
|
|
4272
1766
|
theme = _config$theme === void 0 ? "" : _config$theme,
|
|
4273
1767
|
_config$localizationC = config.localizationConfig,
|
|
4274
1768
|
localizationConfig = _config$localizationC === void 0 ? {} : _config$localizationC;
|
|
4275
|
-
return /*#__PURE__*/
|
|
1769
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4276
1770
|
className: "story-card-with-bullet-point-m_card-with-bullet-wrapper__qTviw"
|
|
4277
|
-
}, /*#__PURE__*/
|
|
1771
|
+
}, /*#__PURE__*/React__default["default"].createElement(BulletPoint, {
|
|
4278
1772
|
bulletValue: bulletValue
|
|
4279
|
-
}), /*#__PURE__*/
|
|
1773
|
+
}), /*#__PURE__*/React__default["default"].createElement(StoryCard, {
|
|
4280
1774
|
story: story,
|
|
4281
1775
|
bgImgContentOverlap: true,
|
|
4282
1776
|
config: config,
|
|
4283
1777
|
theme: theme
|
|
4284
|
-
}, /*#__PURE__*/
|
|
1778
|
+
}, /*#__PURE__*/React__default["default"].createElement(StorycardContent, null, /*#__PURE__*/React__default["default"].createElement(Headline, {
|
|
4285
1779
|
story: story,
|
|
4286
1780
|
headerLevel: "6",
|
|
4287
1781
|
premiumStoryIconConfig: config
|
|
4288
|
-
}), /*#__PURE__*/
|
|
1782
|
+
}), /*#__PURE__*/React__default["default"].createElement(AuthorWithTime, {
|
|
4289
1783
|
config: localizationConfig,
|
|
4290
1784
|
story: story,
|
|
4291
1785
|
prefix: "By"
|
|
4292
1786
|
}))));
|
|
4293
1787
|
};
|
|
4294
1788
|
StoryCardWithBulletPoint.propTypes = {
|
|
4295
|
-
story:
|
|
4296
|
-
config:
|
|
4297
|
-
theme:
|
|
4298
|
-
localizationConfig:
|
|
1789
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
1790
|
+
config: PropTypes__default["default"].shape({
|
|
1791
|
+
theme: PropTypes__default["default"].string,
|
|
1792
|
+
localizationConfig: PropTypes__default["default"].object
|
|
4299
1793
|
}),
|
|
4300
|
-
bulletValue:
|
|
1794
|
+
bulletValue: PropTypes__default["default"].string
|
|
4301
1795
|
};
|
|
4302
1796
|
|
|
4303
|
-
function _defineProperty(obj, key, value) {
|
|
4304
|
-
if (key in obj) {
|
|
4305
|
-
Object.defineProperty(obj, key, {
|
|
4306
|
-
value: value,
|
|
4307
|
-
enumerable: true,
|
|
4308
|
-
configurable: true,
|
|
4309
|
-
writable: true
|
|
4310
|
-
});
|
|
4311
|
-
} else {
|
|
4312
|
-
obj[key] = value;
|
|
4313
|
-
}
|
|
4314
|
-
|
|
4315
|
-
return obj;
|
|
4316
|
-
}
|
|
4317
|
-
|
|
4318
1797
|
var _styleModuleImportMap$1 = {
|
|
4319
1798
|
"./load-more.m.css": {
|
|
4320
1799
|
"button": "load-more-m_button__1mmf1",
|
|
@@ -4326,7 +1805,7 @@ var _styleModuleImportMap$1 = {
|
|
|
4326
1805
|
|
|
4327
1806
|
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; }
|
|
4328
1807
|
|
|
4329
|
-
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) {
|
|
1808
|
+
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; }
|
|
4330
1809
|
var LoadmoreButton = function LoadmoreButton(_ref) {
|
|
4331
1810
|
var _ref$config = _ref.config,
|
|
4332
1811
|
config = _ref$config === void 0 ? {} : _ref$config,
|
|
@@ -4347,26 +1826,26 @@ var LoadmoreButton = function LoadmoreButton(_ref) {
|
|
|
4347
1826
|
if (!showButton) return null;
|
|
4348
1827
|
var textColor = getTextColor(theme);
|
|
4349
1828
|
var slug = customUrlPath ? "/".concat(customUrlPath) : generateNavigateSlug(collection, _objectSpread(_objectSpread({}, qtConfig), config));
|
|
4350
|
-
return template === "SubsequentLoadCount" ? /*#__PURE__*/
|
|
1829
|
+
return template === "SubsequentLoadCount" ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4351
1830
|
onClick: onClick,
|
|
4352
1831
|
"data-test-id": "load-more",
|
|
4353
|
-
className: "arr--button " +
|
|
4354
|
-
}, buttonText) : /*#__PURE__*/
|
|
1832
|
+
className: "arr--button " + _getClassName__default["default"]("button ".concat(textColor, " default"), _styleModuleImportMap$1)
|
|
1833
|
+
}, buttonText) : /*#__PURE__*/React__default["default"].createElement(components.LinkBase, {
|
|
4355
1834
|
href: slug,
|
|
4356
1835
|
navigateTo: navigate,
|
|
4357
1836
|
"data-test-id": "load-more",
|
|
4358
1837
|
"aria-label": "load-more"
|
|
4359
|
-
}, /*#__PURE__*/
|
|
4360
|
-
className: "arr--button " +
|
|
1838
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1839
|
+
className: "arr--button " + _getClassName__default["default"]("button ".concat(textColor, " default"), _styleModuleImportMap$1)
|
|
4361
1840
|
}, buttonText));
|
|
4362
1841
|
};
|
|
4363
1842
|
LoadmoreButton.propTypes = {
|
|
4364
|
-
collection:
|
|
4365
|
-
template:
|
|
4366
|
-
config:
|
|
4367
|
-
onClick:
|
|
4368
|
-
navigate:
|
|
4369
|
-
qtConfig:
|
|
1843
|
+
collection: PropTypes__default["default"].object,
|
|
1844
|
+
template: PropTypes__default["default"].string,
|
|
1845
|
+
config: PropTypes__default["default"].object,
|
|
1846
|
+
onClick: PropTypes__default["default"].func,
|
|
1847
|
+
navigate: PropTypes__default["default"].func,
|
|
1848
|
+
qtConfig: PropTypes__default["default"].object
|
|
4370
1849
|
};
|
|
4371
1850
|
|
|
4372
1851
|
var _styleModuleImportMap = {
|
|
@@ -4387,13 +1866,13 @@ var TwoColTenStoriesSidebarBase = function TwoColTenStoriesSidebarBase(_ref) {
|
|
|
4387
1866
|
var collection = _ref.collection,
|
|
4388
1867
|
_ref$config = _ref.config,
|
|
4389
1868
|
config = _ref$config === void 0 ? {} : _ref$config;
|
|
4390
|
-
var childCollections =
|
|
1869
|
+
var childCollections = lodash.get(collection, ["items"], []).filter(function (collections) {
|
|
4391
1870
|
return collections.type === "collection";
|
|
4392
1871
|
});
|
|
4393
1872
|
if (childCollections.length < 2) return null; // if number of collection is less than 2 return null
|
|
4394
1873
|
|
|
4395
|
-
var firstCollectionStories = collectionToStories(childCollections[0]);
|
|
4396
|
-
var sidebarCollectionStories = collectionToStories(childCollections[1]);
|
|
1874
|
+
var firstCollectionStories = components.collectionToStories(childCollections[0]);
|
|
1875
|
+
var sidebarCollectionStories = components.collectionToStories(childCollections[1]);
|
|
4397
1876
|
if (!firstCollectionStories.length && !sidebarCollectionStories.length) return null;
|
|
4398
1877
|
var _config$border = config.border,
|
|
4399
1878
|
border = _config$border === void 0 ? "" : _config$border,
|
|
@@ -4408,13 +1887,13 @@ var TwoColTenStoriesSidebarBase = function TwoColTenStoriesSidebarBase(_ref) {
|
|
|
4408
1887
|
_config$collectionNam2 = config.collectionNameTemplate,
|
|
4409
1888
|
collectionNameTemplate = _config$collectionNam2 === void 0 ? "" : _config$collectionNam2;
|
|
4410
1889
|
var textColor = getTextColor(theme);
|
|
4411
|
-
var dispatch = useDispatch();
|
|
4412
|
-
var qtConfig = useSelector(function (state) {
|
|
4413
|
-
return
|
|
1890
|
+
var dispatch = reactRedux.useDispatch();
|
|
1891
|
+
var qtConfig = reactRedux.useSelector(function (state) {
|
|
1892
|
+
return lodash.get(state, ["qt", "config"], {});
|
|
4414
1893
|
});
|
|
4415
1894
|
var firstCardBorderStyle = border === "bottom" ? "first-card-border-box" : "";
|
|
4416
1895
|
|
|
4417
|
-
var _get =
|
|
1896
|
+
var _get = lodash.get(slotConfig, [0], {}),
|
|
4418
1897
|
_get$type = _get.type,
|
|
4419
1898
|
type = _get$type === void 0 ? "story" : _get$type,
|
|
4420
1899
|
component = _get.component;
|
|
@@ -4422,47 +1901,47 @@ var TwoColTenStoriesSidebarBase = function TwoColTenStoriesSidebarBase(_ref) {
|
|
|
4422
1901
|
var isAdWidgetEnabled = type === "ad" || type === "widget";
|
|
4423
1902
|
var adWidgetSlot = isAdWidgetEnabled ? getSlot(type, component) : null;
|
|
4424
1903
|
var storyCounter = 0;
|
|
4425
|
-
return /*#__PURE__*/
|
|
1904
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4426
1905
|
className: "full-width-with-padding arrow-component two-col-ten-stories-sidebar-m_component-wrapper__2R--T",
|
|
4427
1906
|
"data-test-id": "two-col-ten-stories-sidebar",
|
|
4428
1907
|
style: {
|
|
4429
1908
|
backgroundColor: theme,
|
|
4430
1909
|
color: textColor
|
|
4431
1910
|
}
|
|
4432
|
-
}, /*#__PURE__*/
|
|
1911
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4433
1912
|
className: "two-col-ten-stories-sidebar-m_collection-wrapper__3U_EX"
|
|
4434
|
-
}, /*#__PURE__*/
|
|
1913
|
+
}, /*#__PURE__*/React__default["default"].createElement(CollectionName, {
|
|
4435
1914
|
collection: childCollections[0],
|
|
4436
1915
|
collectionNameTemplate: collectionNameTemplate,
|
|
4437
1916
|
collectionNameBorderColor: collectionNameBorderColor,
|
|
4438
1917
|
headerLevel: "2"
|
|
4439
|
-
}), /*#__PURE__*/
|
|
1918
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4440
1919
|
className: "two-col-ten-stories-sidebar-m_story-cards__3bhIo"
|
|
4441
|
-
}, /*#__PURE__*/
|
|
1920
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4442
1921
|
className: "two-col-ten-stories-sidebar-m_first-card__3HJ3k"
|
|
4443
|
-
}, /*#__PURE__*/
|
|
1922
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryCard, {
|
|
4444
1923
|
story: firstCollectionStories[0],
|
|
4445
1924
|
theme: theme,
|
|
4446
1925
|
headerLevel: "3",
|
|
4447
1926
|
bgImgContentOverlap: true,
|
|
4448
1927
|
aspectRatio: [[16, 9], [16, 9]],
|
|
4449
1928
|
config: config
|
|
4450
|
-
}, /*#__PURE__*/
|
|
1929
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4451
1930
|
story: firstCollectionStories[0],
|
|
4452
1931
|
aspectRatio: [[16, 9], [16, 9]]
|
|
4453
|
-
}), /*#__PURE__*/
|
|
1932
|
+
}), /*#__PURE__*/React__default["default"].createElement(StorycardContent, {
|
|
4454
1933
|
story: firstCollectionStories[0],
|
|
4455
1934
|
headerLevel: "3",
|
|
4456
1935
|
theme: theme,
|
|
4457
1936
|
isHorizontal: true,
|
|
4458
1937
|
borderColor: borderColor,
|
|
4459
1938
|
config: config,
|
|
4460
|
-
className:
|
|
1939
|
+
className: _getClassName__default["default"](firstCardBorderStyle, _styleModuleImportMap)
|
|
4461
1940
|
}))), firstCollectionStories.slice(1, 5).map(function (story, index) {
|
|
4462
|
-
return /*#__PURE__*/
|
|
1941
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4463
1942
|
className: "two-col-ten-stories-sidebar-m_card__kR47U",
|
|
4464
1943
|
key: index
|
|
4465
|
-
}, /*#__PURE__*/
|
|
1944
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryCard, {
|
|
4466
1945
|
story: story,
|
|
4467
1946
|
theme: theme,
|
|
4468
1947
|
headerLevel: "4",
|
|
@@ -4470,18 +1949,18 @@ var TwoColTenStoriesSidebarBase = function TwoColTenStoriesSidebarBase(_ref) {
|
|
|
4470
1949
|
border: border,
|
|
4471
1950
|
aspectRatio: [[16, 9], [16, 9]],
|
|
4472
1951
|
config: config
|
|
4473
|
-
}, /*#__PURE__*/
|
|
1952
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4474
1953
|
story: story,
|
|
4475
1954
|
isHorizontal: true,
|
|
4476
1955
|
aspectRatio: [[16, 9], [16, 9]]
|
|
4477
|
-
}), /*#__PURE__*/
|
|
1956
|
+
}), /*#__PURE__*/React__default["default"].createElement(StorycardContent, {
|
|
4478
1957
|
theme: theme,
|
|
4479
1958
|
story: story,
|
|
4480
1959
|
isHorizontal: true,
|
|
4481
1960
|
borderColor: borderColor,
|
|
4482
1961
|
config: config
|
|
4483
1962
|
})));
|
|
4484
|
-
})), /*#__PURE__*/
|
|
1963
|
+
})), /*#__PURE__*/React__default["default"].createElement(LoadmoreButton, {
|
|
4485
1964
|
template: "NavigateToPage",
|
|
4486
1965
|
collection: childCollections[0],
|
|
4487
1966
|
config: config,
|
|
@@ -4489,40 +1968,40 @@ var TwoColTenStoriesSidebarBase = function TwoColTenStoriesSidebarBase(_ref) {
|
|
|
4489
1968
|
return navigateTo(dispatch, generateNavigateSlug(childCollections[0], qtConfig));
|
|
4490
1969
|
},
|
|
4491
1970
|
qtConfig: qtConfig
|
|
4492
|
-
})), /*#__PURE__*/
|
|
1971
|
+
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4493
1972
|
className: "two-col-ten-stories-sidebar-m_sidebar-collection-wrapper__1gOyr"
|
|
4494
|
-
}, /*#__PURE__*/
|
|
1973
|
+
}, /*#__PURE__*/React__default["default"].createElement(CollectionName, {
|
|
4495
1974
|
collection: childCollections[1],
|
|
4496
1975
|
collectionNameTemplate: collectionNameTemplate,
|
|
4497
1976
|
collectionNameBorderColor: collectionNameBorderColor,
|
|
4498
1977
|
headerLevel: "2"
|
|
4499
|
-
}), /*#__PURE__*/
|
|
1978
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4500
1979
|
className: "two-col-ten-stories-sidebar-m_sidebar-cards-container__32zii"
|
|
4501
|
-
}, /*#__PURE__*/
|
|
4502
|
-
return /*#__PURE__*/
|
|
1980
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", null, sidebarCollectionStories.slice(0, 4).map(function (story) {
|
|
1981
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4503
1982
|
className: "two-col-ten-stories-sidebar-m_card__kR47U",
|
|
4504
1983
|
key: story.id
|
|
4505
|
-
}, /*#__PURE__*/
|
|
1984
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryCardWithBulletPoint, {
|
|
4506
1985
|
story: story,
|
|
4507
1986
|
bulletValue: "".concat(++storyCounter),
|
|
4508
1987
|
config: config
|
|
4509
1988
|
}));
|
|
4510
|
-
})), /*#__PURE__*/
|
|
1989
|
+
})), /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4511
1990
|
className: "two-col-ten-stories-sidebar-m_card__kR47U"
|
|
4512
|
-
}, /*#__PURE__*/
|
|
1991
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryCardWithBulletPoint, {
|
|
4513
1992
|
story: sidebarCollectionStories[4],
|
|
4514
1993
|
bulletValue: "".concat(++storyCounter),
|
|
4515
1994
|
config: config
|
|
4516
|
-
})), adWidgetSlot ? /*#__PURE__*/
|
|
4517
|
-
return /*#__PURE__*/
|
|
1995
|
+
})), adWidgetSlot ? /*#__PURE__*/React__default["default"].createElement("div", null, adWidgetSlot) : sidebarCollectionStories.slice(5, 8).map(function (story) {
|
|
1996
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4518
1997
|
className: "two-col-ten-stories-sidebar-m_card__kR47U",
|
|
4519
1998
|
key: story.id
|
|
4520
|
-
}, /*#__PURE__*/
|
|
1999
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryCardWithBulletPoint, {
|
|
4521
2000
|
story: story,
|
|
4522
2001
|
bulletValue: "".concat(++storyCounter),
|
|
4523
2002
|
config: config
|
|
4524
2003
|
}));
|
|
4525
|
-
}))), /*#__PURE__*/
|
|
2004
|
+
}))), /*#__PURE__*/React__default["default"].createElement(LoadmoreButton, {
|
|
4526
2005
|
template: "NavigateToPage",
|
|
4527
2006
|
collection: childCollections[1],
|
|
4528
2007
|
config: config,
|
|
@@ -4533,17 +2012,18 @@ var TwoColTenStoriesSidebarBase = function TwoColTenStoriesSidebarBase(_ref) {
|
|
|
4533
2012
|
})));
|
|
4534
2013
|
};
|
|
4535
2014
|
TwoColTenStoriesSidebarBase.propTypes = {
|
|
4536
|
-
collection:
|
|
4537
|
-
config:
|
|
4538
|
-
theme:
|
|
4539
|
-
showBorder:
|
|
4540
|
-
collectionNameTemplate:
|
|
4541
|
-
slotConfig:
|
|
4542
|
-
collectionNameBorderColor:
|
|
4543
|
-
borderColor:
|
|
4544
|
-
localizationConfig:
|
|
2015
|
+
collection: PropTypes__default["default"].object.isRequired,
|
|
2016
|
+
config: PropTypes__default["default"].shape({
|
|
2017
|
+
theme: PropTypes__default["default"].string,
|
|
2018
|
+
showBorder: PropTypes__default["default"].bool,
|
|
2019
|
+
collectionNameTemplate: PropTypes__default["default"].string,
|
|
2020
|
+
slotConfig: PropTypes__default["default"].array,
|
|
2021
|
+
collectionNameBorderColor: PropTypes__default["default"].string,
|
|
2022
|
+
borderColor: PropTypes__default["default"].string,
|
|
2023
|
+
localizationConfig: PropTypes__default["default"].object
|
|
4545
2024
|
})
|
|
4546
2025
|
};
|
|
4547
2026
|
var TwoColTenStoriesSidebar = StateProvider(TwoColTenStoriesSidebarBase);
|
|
4548
2027
|
|
|
4549
|
-
|
|
2028
|
+
exports.TwoColTenStoriesSidebar = TwoColTenStoriesSidebar;
|
|
2029
|
+
exports.TwoColTenStoriesSidebarBase = TwoColTenStoriesSidebarBase;
|