@mjhls/mjh-framework 1.0.646 → 1.0.648
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/README.md +1 -1
- package/dist/cjs/AD.js +1 -1
- package/dist/cjs/AD300x250.js +2 -2
- package/dist/cjs/AD300x250x600.js +2 -2
- package/dist/cjs/AD728x90.js +2 -2
- package/dist/cjs/ADFloatingFooter.js +2 -2
- package/dist/cjs/ADGutter.js +2 -2
- package/dist/cjs/ADSkyscraper.js +2 -2
- package/dist/cjs/ADSponsoredResources.js +2 -2
- package/dist/cjs/ADWebcast.js +2 -2
- package/dist/cjs/ADWelcome.js +2 -2
- package/dist/cjs/AdSlot.js +2 -2
- package/dist/cjs/ArticleSeriesListing.js +2 -2
- package/dist/cjs/CMEDeck.js +2 -2
- package/dist/cjs/Column2.js +2 -3
- package/dist/cjs/Column3.js +3 -4
- package/dist/cjs/DeckContent.js +3 -3
- package/dist/cjs/DeckQueue.js +3 -4
- package/dist/cjs/{Dfp-ffaf5981.js → Dfp-b2bc3b97.js} +2 -2
- package/dist/cjs/ExternalResources.js +3 -3
- package/dist/cjs/GridContent.js +5 -6
- package/dist/cjs/IssueLanding.js +4 -4
- package/dist/cjs/LeftNav.js +2 -2
- package/dist/cjs/MasterDeck.js +4 -4
- package/dist/cjs/PartnerDetailListing.js +5 -5
- package/dist/cjs/QueueDeckExpanded.js +4 -4
- package/dist/cjs/SideFooter.js +2 -3
- package/dist/cjs/TemplateNormal.js +3 -4
- package/dist/cjs/VideoSeriesListing.js +2 -2
- package/dist/cjs/View.js +33 -26
- package/dist/cjs/{debounce-32e57002.js → debounce-eb287781.js} +1 -2
- package/dist/cjs/{get-5dfcdc33.js → get-68c52cb1.js} +90 -7
- package/dist/cjs/getQuery.js +2 -2
- package/dist/cjs/getSerializers.js +3 -3
- package/dist/cjs/{getTargeting-87eb9994.js → getTargeting-fee8c429.js} +32 -1
- package/dist/cjs/getTargeting.js +1 -1
- package/dist/cjs/index.js +9 -12
- package/dist/cjs/{isSymbol-488934a7.js → isSymbol-04666465.js} +0 -2
- package/dist/esm/AD.js +1 -1
- package/dist/esm/AD300x250.js +2 -2
- package/dist/esm/AD300x250x600.js +2 -2
- package/dist/esm/AD728x90.js +2 -2
- package/dist/esm/ADFloatingFooter.js +2 -2
- package/dist/esm/ADGutter.js +2 -2
- package/dist/esm/ADSkyscraper.js +2 -2
- package/dist/esm/ADSponsoredResources.js +2 -2
- package/dist/esm/ADWebcast.js +2 -2
- package/dist/esm/ADWelcome.js +2 -2
- package/dist/esm/AdSlot.js +2 -2
- package/dist/esm/ArticleSeriesListing.js +2 -2
- package/dist/esm/CMEDeck.js +2 -2
- package/dist/esm/Column2.js +2 -3
- package/dist/esm/Column3.js +3 -4
- package/dist/esm/DeckContent.js +3 -3
- package/dist/esm/DeckQueue.js +3 -4
- package/dist/esm/{Dfp-4f966af0.js → Dfp-43d61e01.js} +2 -2
- package/dist/esm/ExternalResources.js +3 -3
- package/dist/esm/GridContent.js +5 -6
- package/dist/esm/IssueLanding.js +4 -4
- package/dist/esm/LeftNav.js +2 -2
- package/dist/esm/MasterDeck.js +4 -4
- package/dist/esm/PartnerDetailListing.js +5 -5
- package/dist/esm/QueueDeckExpanded.js +4 -4
- package/dist/esm/SideFooter.js +2 -3
- package/dist/esm/TemplateNormal.js +3 -4
- package/dist/esm/VideoSeriesListing.js +2 -2
- package/dist/esm/View.js +30 -23
- package/dist/esm/{debounce-a0d9abca.js → debounce-1a993acf.js} +2 -2
- package/dist/esm/{get-58d2f7cc.js → get-5ee14cda.js} +85 -2
- package/dist/esm/getQuery.js +2 -2
- package/dist/esm/getSerializers.js +3 -3
- package/dist/esm/{getTargeting-3cc3f97d.js → getTargeting-11d623e4.js} +32 -1
- package/dist/esm/getTargeting.js +1 -1
- package/dist/esm/index.js +8 -10
- package/dist/esm/{isSymbol-47f5ff3b.js → isSymbol-807e927e.js} +1 -1
- package/package.json +1 -1
- package/dist/cjs/ArticleQueue.js +0 -1689
- package/dist/cjs/_arrayMap-3b4a0f75.js +0 -91
- package/dist/esm/ArticleQueue.js +0 -1684
- package/dist/esm/_arrayMap-818441dd.js +0 -87
- /package/dist/cjs/{ADInfeed-350decaa.js → ADInfeed-eaa6c661.js} +0 -0
- /package/dist/cjs/{ADlgInfeed-7d61609b.js → ADlgInfeed-f25eb4f7.js} +0 -0
- /package/dist/cjs/{index-1620daac.js → index-4f22007d.js} +0 -0
- /package/dist/esm/{ADInfeed-fd7a62b1.js → ADInfeed-3c4773f8.js} +0 -0
- /package/dist/esm/{ADlgInfeed-79c771d6.js → ADlgInfeed-5a52301f.js} +0 -0
- /package/dist/esm/{index-fe4d6d6e.js → index-4b48a31f.js} +0 -0
package/dist/esm/ArticleQueue.js
DELETED
|
@@ -1,1684 +0,0 @@
|
|
|
1
|
-
import { c as createCommonjsModule } from './_commonjsHelpers-0c4b6f40.js';
|
|
2
|
-
import './_to-object-b01e8612.js';
|
|
3
|
-
import './es6.string.iterator-c199c9ba.js';
|
|
4
|
-
import './_library-528f1934.js';
|
|
5
|
-
import './_iter-detect-0e105618.js';
|
|
6
|
-
import { _ as _toConsumableArray } from './toConsumableArray-e7f3f5a6.js';
|
|
7
|
-
import './core.get-iterator-method-e41daf74.js';
|
|
8
|
-
import './_object-pie-33c40e79.js';
|
|
9
|
-
import { _ as _extends, a as _Object$assign } from './extends-229166d5.js';
|
|
10
|
-
import './_object-sap-4793c75a.js';
|
|
11
|
-
import './inherits-9ddef7b3.js';
|
|
12
|
-
import './define-property-99e9c0ad.js';
|
|
13
|
-
import './web.dom.iterable-03c5ba1c.js';
|
|
14
|
-
import { _ as _typeof } from './typeof-fea75829.js';
|
|
15
|
-
import './_is-array-ced12663.js';
|
|
16
|
-
import React__default, { useState, useEffect } from 'react';
|
|
17
|
-
import { l as lib_3 } from './index-93ec3c59.js';
|
|
18
|
-
import 'prop-types';
|
|
19
|
-
import 'react-bootstrap/Row';
|
|
20
|
-
import 'react-bootstrap/Col';
|
|
21
|
-
import { m as moment } from './moment-12415288.js';
|
|
22
|
-
import 'next/router';
|
|
23
|
-
import { i as isObjectLike_1, _ as _baseGetTag, a as _root, b as _freeGlobal } from './isSymbol-47f5ff3b.js';
|
|
24
|
-
import { t as toNumber_1 } from './debounce-a0d9abca.js';
|
|
25
|
-
import { I as InfiniteScroll } from './index.es-938a3a58.js';
|
|
26
|
-
import 'react-dom';
|
|
27
|
-
import { i as imageUrlBuilder } from './index-51a80699.js';
|
|
28
|
-
import './index-5f9f807a.js';
|
|
29
|
-
import { m as main_39 } from './main-0465b2a0.js';
|
|
30
|
-
import './entities-7cc3bf45.js';
|
|
31
|
-
import { _ as _JSON$stringify } from './stringify-feadff37.js';
|
|
32
|
-
import { _ as _slicedToArray, a as _getIterator } from './slicedToArray-5fb01661.js';
|
|
33
|
-
import './asyncToGenerator-271a52f3.js';
|
|
34
|
-
import './_set-species-41cbf140.js';
|
|
35
|
-
import './beam-c4d8f8f6.js';
|
|
36
|
-
import DFPAdSlot from './AdSlot.js';
|
|
37
|
-
import { i as isFunction_1, a as isArray_1, _ as _arrayMap } from './_arrayMap-818441dd.js';
|
|
38
|
-
import { B as BlockContent } from './BlockContent-a614acdf.js';
|
|
39
|
-
import './smoothscroll-4b699764.js';
|
|
40
|
-
import './GroupDeck.js';
|
|
41
|
-
import 'react-bootstrap';
|
|
42
|
-
import 'react-bootstrap/Button';
|
|
43
|
-
import { I as InscreenSensor, g as getSerializers } from './index-fe4d6d6e.js';
|
|
44
|
-
import './util-7700fc59.js';
|
|
45
|
-
import './brightcove-react-player-loader.es-83f53e4e.js';
|
|
46
|
-
import 'react-bootstrap/Pagination';
|
|
47
|
-
import Head from 'next/head';
|
|
48
|
-
import 'react-share';
|
|
49
|
-
import SocialShare from './SocialShare.js';
|
|
50
|
-
import { _ as _Object$keys } from './keys-941eccc4.js';
|
|
51
|
-
import Dropdown from 'react-bootstrap/Dropdown';
|
|
52
|
-
import getKeywords from './getKeywords.js';
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* The base implementation of `_.findIndex` and `_.findLastIndex` without
|
|
56
|
-
* support for iteratee shorthands.
|
|
57
|
-
*
|
|
58
|
-
* @private
|
|
59
|
-
* @param {Array} array The array to inspect.
|
|
60
|
-
* @param {Function} predicate The function invoked per iteration.
|
|
61
|
-
* @param {number} fromIndex The index to search from.
|
|
62
|
-
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
63
|
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
64
|
-
*/
|
|
65
|
-
function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
|
66
|
-
var length = array.length,
|
|
67
|
-
index = fromIndex + (fromRight ? 1 : -1);
|
|
68
|
-
|
|
69
|
-
while ((fromRight ? index-- : ++index < length)) {
|
|
70
|
-
if (predicate(array[index], index, array)) {
|
|
71
|
-
return index;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
return -1;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
var _baseFindIndex = baseFindIndex;
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* The base implementation of `_.isNaN` without support for number objects.
|
|
81
|
-
*
|
|
82
|
-
* @private
|
|
83
|
-
* @param {*} value The value to check.
|
|
84
|
-
* @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
|
|
85
|
-
*/
|
|
86
|
-
function baseIsNaN(value) {
|
|
87
|
-
return value !== value;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
var _baseIsNaN = baseIsNaN;
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* A specialized version of `_.indexOf` which performs strict equality
|
|
94
|
-
* comparisons of values, i.e. `===`.
|
|
95
|
-
*
|
|
96
|
-
* @private
|
|
97
|
-
* @param {Array} array The array to inspect.
|
|
98
|
-
* @param {*} value The value to search for.
|
|
99
|
-
* @param {number} fromIndex The index to search from.
|
|
100
|
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
101
|
-
*/
|
|
102
|
-
function strictIndexOf(array, value, fromIndex) {
|
|
103
|
-
var index = fromIndex - 1,
|
|
104
|
-
length = array.length;
|
|
105
|
-
|
|
106
|
-
while (++index < length) {
|
|
107
|
-
if (array[index] === value) {
|
|
108
|
-
return index;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
return -1;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
var _strictIndexOf = strictIndexOf;
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* The base implementation of `_.indexOf` without `fromIndex` bounds checks.
|
|
118
|
-
*
|
|
119
|
-
* @private
|
|
120
|
-
* @param {Array} array The array to inspect.
|
|
121
|
-
* @param {*} value The value to search for.
|
|
122
|
-
* @param {number} fromIndex The index to search from.
|
|
123
|
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
124
|
-
*/
|
|
125
|
-
function baseIndexOf(array, value, fromIndex) {
|
|
126
|
-
return value === value
|
|
127
|
-
? _strictIndexOf(array, value, fromIndex)
|
|
128
|
-
: _baseFindIndex(array, _baseIsNaN, fromIndex);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
var _baseIndexOf = baseIndexOf;
|
|
132
|
-
|
|
133
|
-
/** Used as references for various `Number` constants. */
|
|
134
|
-
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* Checks if `value` is a valid array-like length.
|
|
138
|
-
*
|
|
139
|
-
* **Note:** This method is loosely based on
|
|
140
|
-
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
|
141
|
-
*
|
|
142
|
-
* @static
|
|
143
|
-
* @memberOf _
|
|
144
|
-
* @since 4.0.0
|
|
145
|
-
* @category Lang
|
|
146
|
-
* @param {*} value The value to check.
|
|
147
|
-
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
|
148
|
-
* @example
|
|
149
|
-
*
|
|
150
|
-
* _.isLength(3);
|
|
151
|
-
* // => true
|
|
152
|
-
*
|
|
153
|
-
* _.isLength(Number.MIN_VALUE);
|
|
154
|
-
* // => false
|
|
155
|
-
*
|
|
156
|
-
* _.isLength(Infinity);
|
|
157
|
-
* // => false
|
|
158
|
-
*
|
|
159
|
-
* _.isLength('3');
|
|
160
|
-
* // => false
|
|
161
|
-
*/
|
|
162
|
-
function isLength(value) {
|
|
163
|
-
return typeof value == 'number' &&
|
|
164
|
-
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
var isLength_1 = isLength;
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* Checks if `value` is array-like. A value is considered array-like if it's
|
|
171
|
-
* not a function and has a `value.length` that's an integer greater than or
|
|
172
|
-
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
|
|
173
|
-
*
|
|
174
|
-
* @static
|
|
175
|
-
* @memberOf _
|
|
176
|
-
* @since 4.0.0
|
|
177
|
-
* @category Lang
|
|
178
|
-
* @param {*} value The value to check.
|
|
179
|
-
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
|
180
|
-
* @example
|
|
181
|
-
*
|
|
182
|
-
* _.isArrayLike([1, 2, 3]);
|
|
183
|
-
* // => true
|
|
184
|
-
*
|
|
185
|
-
* _.isArrayLike(document.body.children);
|
|
186
|
-
* // => true
|
|
187
|
-
*
|
|
188
|
-
* _.isArrayLike('abc');
|
|
189
|
-
* // => true
|
|
190
|
-
*
|
|
191
|
-
* _.isArrayLike(_.noop);
|
|
192
|
-
* // => false
|
|
193
|
-
*/
|
|
194
|
-
function isArrayLike(value) {
|
|
195
|
-
return value != null && isLength_1(value.length) && !isFunction_1(value);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
var isArrayLike_1 = isArrayLike;
|
|
199
|
-
|
|
200
|
-
/** `Object#toString` result references. */
|
|
201
|
-
var stringTag = '[object String]';
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* Checks if `value` is classified as a `String` primitive or object.
|
|
205
|
-
*
|
|
206
|
-
* @static
|
|
207
|
-
* @since 0.1.0
|
|
208
|
-
* @memberOf _
|
|
209
|
-
* @category Lang
|
|
210
|
-
* @param {*} value The value to check.
|
|
211
|
-
* @returns {boolean} Returns `true` if `value` is a string, else `false`.
|
|
212
|
-
* @example
|
|
213
|
-
*
|
|
214
|
-
* _.isString('abc');
|
|
215
|
-
* // => true
|
|
216
|
-
*
|
|
217
|
-
* _.isString(1);
|
|
218
|
-
* // => false
|
|
219
|
-
*/
|
|
220
|
-
function isString(value) {
|
|
221
|
-
return typeof value == 'string' ||
|
|
222
|
-
(!isArray_1(value) && isObjectLike_1(value) && _baseGetTag(value) == stringTag);
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
var isString_1 = isString;
|
|
226
|
-
|
|
227
|
-
/** Used as references for various `Number` constants. */
|
|
228
|
-
var INFINITY = 1 / 0,
|
|
229
|
-
MAX_INTEGER = 1.7976931348623157e+308;
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* Converts `value` to a finite number.
|
|
233
|
-
*
|
|
234
|
-
* @static
|
|
235
|
-
* @memberOf _
|
|
236
|
-
* @since 4.12.0
|
|
237
|
-
* @category Lang
|
|
238
|
-
* @param {*} value The value to convert.
|
|
239
|
-
* @returns {number} Returns the converted number.
|
|
240
|
-
* @example
|
|
241
|
-
*
|
|
242
|
-
* _.toFinite(3.2);
|
|
243
|
-
* // => 3.2
|
|
244
|
-
*
|
|
245
|
-
* _.toFinite(Number.MIN_VALUE);
|
|
246
|
-
* // => 5e-324
|
|
247
|
-
*
|
|
248
|
-
* _.toFinite(Infinity);
|
|
249
|
-
* // => 1.7976931348623157e+308
|
|
250
|
-
*
|
|
251
|
-
* _.toFinite('3.2');
|
|
252
|
-
* // => 3.2
|
|
253
|
-
*/
|
|
254
|
-
function toFinite(value) {
|
|
255
|
-
if (!value) {
|
|
256
|
-
return value === 0 ? value : 0;
|
|
257
|
-
}
|
|
258
|
-
value = toNumber_1(value);
|
|
259
|
-
if (value === INFINITY || value === -INFINITY) {
|
|
260
|
-
var sign = (value < 0 ? -1 : 1);
|
|
261
|
-
return sign * MAX_INTEGER;
|
|
262
|
-
}
|
|
263
|
-
return value === value ? value : 0;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
var toFinite_1 = toFinite;
|
|
267
|
-
|
|
268
|
-
/**
|
|
269
|
-
* Converts `value` to an integer.
|
|
270
|
-
*
|
|
271
|
-
* **Note:** This method is loosely based on
|
|
272
|
-
* [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
|
|
273
|
-
*
|
|
274
|
-
* @static
|
|
275
|
-
* @memberOf _
|
|
276
|
-
* @since 4.0.0
|
|
277
|
-
* @category Lang
|
|
278
|
-
* @param {*} value The value to convert.
|
|
279
|
-
* @returns {number} Returns the converted integer.
|
|
280
|
-
* @example
|
|
281
|
-
*
|
|
282
|
-
* _.toInteger(3.2);
|
|
283
|
-
* // => 3
|
|
284
|
-
*
|
|
285
|
-
* _.toInteger(Number.MIN_VALUE);
|
|
286
|
-
* // => 0
|
|
287
|
-
*
|
|
288
|
-
* _.toInteger(Infinity);
|
|
289
|
-
* // => 1.7976931348623157e+308
|
|
290
|
-
*
|
|
291
|
-
* _.toInteger('3.2');
|
|
292
|
-
* // => 3
|
|
293
|
-
*/
|
|
294
|
-
function toInteger(value) {
|
|
295
|
-
var result = toFinite_1(value),
|
|
296
|
-
remainder = result % 1;
|
|
297
|
-
|
|
298
|
-
return result === result ? (remainder ? result - remainder : result) : 0;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
var toInteger_1 = toInteger;
|
|
302
|
-
|
|
303
|
-
/**
|
|
304
|
-
* The base implementation of `_.values` and `_.valuesIn` which creates an
|
|
305
|
-
* array of `object` property values corresponding to the property names
|
|
306
|
-
* of `props`.
|
|
307
|
-
*
|
|
308
|
-
* @private
|
|
309
|
-
* @param {Object} object The object to query.
|
|
310
|
-
* @param {Array} props The property names to get values for.
|
|
311
|
-
* @returns {Object} Returns the array of property values.
|
|
312
|
-
*/
|
|
313
|
-
function baseValues(object, props) {
|
|
314
|
-
return _arrayMap(props, function(key) {
|
|
315
|
-
return object[key];
|
|
316
|
-
});
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
var _baseValues = baseValues;
|
|
320
|
-
|
|
321
|
-
/**
|
|
322
|
-
* The base implementation of `_.times` without support for iteratee shorthands
|
|
323
|
-
* or max array length checks.
|
|
324
|
-
*
|
|
325
|
-
* @private
|
|
326
|
-
* @param {number} n The number of times to invoke `iteratee`.
|
|
327
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
328
|
-
* @returns {Array} Returns the array of results.
|
|
329
|
-
*/
|
|
330
|
-
function baseTimes(n, iteratee) {
|
|
331
|
-
var index = -1,
|
|
332
|
-
result = Array(n);
|
|
333
|
-
|
|
334
|
-
while (++index < n) {
|
|
335
|
-
result[index] = iteratee(index);
|
|
336
|
-
}
|
|
337
|
-
return result;
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
var _baseTimes = baseTimes;
|
|
341
|
-
|
|
342
|
-
/** `Object#toString` result references. */
|
|
343
|
-
var argsTag = '[object Arguments]';
|
|
344
|
-
|
|
345
|
-
/**
|
|
346
|
-
* The base implementation of `_.isArguments`.
|
|
347
|
-
*
|
|
348
|
-
* @private
|
|
349
|
-
* @param {*} value The value to check.
|
|
350
|
-
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
351
|
-
*/
|
|
352
|
-
function baseIsArguments(value) {
|
|
353
|
-
return isObjectLike_1(value) && _baseGetTag(value) == argsTag;
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
var _baseIsArguments = baseIsArguments;
|
|
357
|
-
|
|
358
|
-
/** Used for built-in method references. */
|
|
359
|
-
var objectProto = Object.prototype;
|
|
360
|
-
|
|
361
|
-
/** Used to check objects for own properties. */
|
|
362
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
363
|
-
|
|
364
|
-
/** Built-in value references. */
|
|
365
|
-
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
|
366
|
-
|
|
367
|
-
/**
|
|
368
|
-
* Checks if `value` is likely an `arguments` object.
|
|
369
|
-
*
|
|
370
|
-
* @static
|
|
371
|
-
* @memberOf _
|
|
372
|
-
* @since 0.1.0
|
|
373
|
-
* @category Lang
|
|
374
|
-
* @param {*} value The value to check.
|
|
375
|
-
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
376
|
-
* else `false`.
|
|
377
|
-
* @example
|
|
378
|
-
*
|
|
379
|
-
* _.isArguments(function() { return arguments; }());
|
|
380
|
-
* // => true
|
|
381
|
-
*
|
|
382
|
-
* _.isArguments([1, 2, 3]);
|
|
383
|
-
* // => false
|
|
384
|
-
*/
|
|
385
|
-
var isArguments = _baseIsArguments(function() { return arguments; }()) ? _baseIsArguments : function(value) {
|
|
386
|
-
return isObjectLike_1(value) && hasOwnProperty.call(value, 'callee') &&
|
|
387
|
-
!propertyIsEnumerable.call(value, 'callee');
|
|
388
|
-
};
|
|
389
|
-
|
|
390
|
-
var isArguments_1 = isArguments;
|
|
391
|
-
|
|
392
|
-
/**
|
|
393
|
-
* This method returns `false`.
|
|
394
|
-
*
|
|
395
|
-
* @static
|
|
396
|
-
* @memberOf _
|
|
397
|
-
* @since 4.13.0
|
|
398
|
-
* @category Util
|
|
399
|
-
* @returns {boolean} Returns `false`.
|
|
400
|
-
* @example
|
|
401
|
-
*
|
|
402
|
-
* _.times(2, _.stubFalse);
|
|
403
|
-
* // => [false, false]
|
|
404
|
-
*/
|
|
405
|
-
function stubFalse() {
|
|
406
|
-
return false;
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
var stubFalse_1 = stubFalse;
|
|
410
|
-
|
|
411
|
-
var isBuffer_1 = createCommonjsModule(function (module, exports) {
|
|
412
|
-
/** Detect free variable `exports`. */
|
|
413
|
-
var freeExports = exports && !exports.nodeType && exports;
|
|
414
|
-
|
|
415
|
-
/** Detect free variable `module`. */
|
|
416
|
-
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
|
417
|
-
|
|
418
|
-
/** Detect the popular CommonJS extension `module.exports`. */
|
|
419
|
-
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
420
|
-
|
|
421
|
-
/** Built-in value references. */
|
|
422
|
-
var Buffer = moduleExports ? _root.Buffer : undefined;
|
|
423
|
-
|
|
424
|
-
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
425
|
-
var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
|
|
426
|
-
|
|
427
|
-
/**
|
|
428
|
-
* Checks if `value` is a buffer.
|
|
429
|
-
*
|
|
430
|
-
* @static
|
|
431
|
-
* @memberOf _
|
|
432
|
-
* @since 4.3.0
|
|
433
|
-
* @category Lang
|
|
434
|
-
* @param {*} value The value to check.
|
|
435
|
-
* @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
|
|
436
|
-
* @example
|
|
437
|
-
*
|
|
438
|
-
* _.isBuffer(new Buffer(2));
|
|
439
|
-
* // => true
|
|
440
|
-
*
|
|
441
|
-
* _.isBuffer(new Uint8Array(2));
|
|
442
|
-
* // => false
|
|
443
|
-
*/
|
|
444
|
-
var isBuffer = nativeIsBuffer || stubFalse_1;
|
|
445
|
-
|
|
446
|
-
module.exports = isBuffer;
|
|
447
|
-
});
|
|
448
|
-
|
|
449
|
-
/** Used as references for various `Number` constants. */
|
|
450
|
-
var MAX_SAFE_INTEGER$1 = 9007199254740991;
|
|
451
|
-
|
|
452
|
-
/** Used to detect unsigned integer values. */
|
|
453
|
-
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
454
|
-
|
|
455
|
-
/**
|
|
456
|
-
* Checks if `value` is a valid array-like index.
|
|
457
|
-
*
|
|
458
|
-
* @private
|
|
459
|
-
* @param {*} value The value to check.
|
|
460
|
-
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
|
461
|
-
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
|
462
|
-
*/
|
|
463
|
-
function isIndex(value, length) {
|
|
464
|
-
var type = typeof value;
|
|
465
|
-
length = length == null ? MAX_SAFE_INTEGER$1 : length;
|
|
466
|
-
|
|
467
|
-
return !!length &&
|
|
468
|
-
(type == 'number' ||
|
|
469
|
-
(type != 'symbol' && reIsUint.test(value))) &&
|
|
470
|
-
(value > -1 && value % 1 == 0 && value < length);
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
var _isIndex = isIndex;
|
|
474
|
-
|
|
475
|
-
/** `Object#toString` result references. */
|
|
476
|
-
var argsTag$1 = '[object Arguments]',
|
|
477
|
-
arrayTag = '[object Array]',
|
|
478
|
-
boolTag = '[object Boolean]',
|
|
479
|
-
dateTag = '[object Date]',
|
|
480
|
-
errorTag = '[object Error]',
|
|
481
|
-
funcTag = '[object Function]',
|
|
482
|
-
mapTag = '[object Map]',
|
|
483
|
-
numberTag = '[object Number]',
|
|
484
|
-
objectTag = '[object Object]',
|
|
485
|
-
regexpTag = '[object RegExp]',
|
|
486
|
-
setTag = '[object Set]',
|
|
487
|
-
stringTag$1 = '[object String]',
|
|
488
|
-
weakMapTag = '[object WeakMap]';
|
|
489
|
-
|
|
490
|
-
var arrayBufferTag = '[object ArrayBuffer]',
|
|
491
|
-
dataViewTag = '[object DataView]',
|
|
492
|
-
float32Tag = '[object Float32Array]',
|
|
493
|
-
float64Tag = '[object Float64Array]',
|
|
494
|
-
int8Tag = '[object Int8Array]',
|
|
495
|
-
int16Tag = '[object Int16Array]',
|
|
496
|
-
int32Tag = '[object Int32Array]',
|
|
497
|
-
uint8Tag = '[object Uint8Array]',
|
|
498
|
-
uint8ClampedTag = '[object Uint8ClampedArray]',
|
|
499
|
-
uint16Tag = '[object Uint16Array]',
|
|
500
|
-
uint32Tag = '[object Uint32Array]';
|
|
501
|
-
|
|
502
|
-
/** Used to identify `toStringTag` values of typed arrays. */
|
|
503
|
-
var typedArrayTags = {};
|
|
504
|
-
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
|
|
505
|
-
typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
|
|
506
|
-
typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
|
|
507
|
-
typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
|
|
508
|
-
typedArrayTags[uint32Tag] = true;
|
|
509
|
-
typedArrayTags[argsTag$1] = typedArrayTags[arrayTag] =
|
|
510
|
-
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
|
|
511
|
-
typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
|
|
512
|
-
typedArrayTags[errorTag] = typedArrayTags[funcTag] =
|
|
513
|
-
typedArrayTags[mapTag] = typedArrayTags[numberTag] =
|
|
514
|
-
typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
|
|
515
|
-
typedArrayTags[setTag] = typedArrayTags[stringTag$1] =
|
|
516
|
-
typedArrayTags[weakMapTag] = false;
|
|
517
|
-
|
|
518
|
-
/**
|
|
519
|
-
* The base implementation of `_.isTypedArray` without Node.js optimizations.
|
|
520
|
-
*
|
|
521
|
-
* @private
|
|
522
|
-
* @param {*} value The value to check.
|
|
523
|
-
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
|
524
|
-
*/
|
|
525
|
-
function baseIsTypedArray(value) {
|
|
526
|
-
return isObjectLike_1(value) &&
|
|
527
|
-
isLength_1(value.length) && !!typedArrayTags[_baseGetTag(value)];
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
var _baseIsTypedArray = baseIsTypedArray;
|
|
531
|
-
|
|
532
|
-
/**
|
|
533
|
-
* The base implementation of `_.unary` without support for storing metadata.
|
|
534
|
-
*
|
|
535
|
-
* @private
|
|
536
|
-
* @param {Function} func The function to cap arguments for.
|
|
537
|
-
* @returns {Function} Returns the new capped function.
|
|
538
|
-
*/
|
|
539
|
-
function baseUnary(func) {
|
|
540
|
-
return function(value) {
|
|
541
|
-
return func(value);
|
|
542
|
-
};
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
var _baseUnary = baseUnary;
|
|
546
|
-
|
|
547
|
-
var _nodeUtil = createCommonjsModule(function (module, exports) {
|
|
548
|
-
/** Detect free variable `exports`. */
|
|
549
|
-
var freeExports = exports && !exports.nodeType && exports;
|
|
550
|
-
|
|
551
|
-
/** Detect free variable `module`. */
|
|
552
|
-
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
|
553
|
-
|
|
554
|
-
/** Detect the popular CommonJS extension `module.exports`. */
|
|
555
|
-
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
556
|
-
|
|
557
|
-
/** Detect free variable `process` from Node.js. */
|
|
558
|
-
var freeProcess = moduleExports && _freeGlobal.process;
|
|
559
|
-
|
|
560
|
-
/** Used to access faster Node.js helpers. */
|
|
561
|
-
var nodeUtil = (function() {
|
|
562
|
-
try {
|
|
563
|
-
// Use `util.types` for Node.js 10+.
|
|
564
|
-
var types = freeModule && freeModule.require && freeModule.require('util').types;
|
|
565
|
-
|
|
566
|
-
if (types) {
|
|
567
|
-
return types;
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
// Legacy `process.binding('util')` for Node.js < 10.
|
|
571
|
-
return freeProcess && freeProcess.binding && freeProcess.binding('util');
|
|
572
|
-
} catch (e) {}
|
|
573
|
-
}());
|
|
574
|
-
|
|
575
|
-
module.exports = nodeUtil;
|
|
576
|
-
});
|
|
577
|
-
|
|
578
|
-
/* Node.js helper references. */
|
|
579
|
-
var nodeIsTypedArray = _nodeUtil && _nodeUtil.isTypedArray;
|
|
580
|
-
|
|
581
|
-
/**
|
|
582
|
-
* Checks if `value` is classified as a typed array.
|
|
583
|
-
*
|
|
584
|
-
* @static
|
|
585
|
-
* @memberOf _
|
|
586
|
-
* @since 3.0.0
|
|
587
|
-
* @category Lang
|
|
588
|
-
* @param {*} value The value to check.
|
|
589
|
-
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
|
590
|
-
* @example
|
|
591
|
-
*
|
|
592
|
-
* _.isTypedArray(new Uint8Array);
|
|
593
|
-
* // => true
|
|
594
|
-
*
|
|
595
|
-
* _.isTypedArray([]);
|
|
596
|
-
* // => false
|
|
597
|
-
*/
|
|
598
|
-
var isTypedArray = nodeIsTypedArray ? _baseUnary(nodeIsTypedArray) : _baseIsTypedArray;
|
|
599
|
-
|
|
600
|
-
var isTypedArray_1 = isTypedArray;
|
|
601
|
-
|
|
602
|
-
/** Used for built-in method references. */
|
|
603
|
-
var objectProto$1 = Object.prototype;
|
|
604
|
-
|
|
605
|
-
/** Used to check objects for own properties. */
|
|
606
|
-
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
607
|
-
|
|
608
|
-
/**
|
|
609
|
-
* Creates an array of the enumerable property names of the array-like `value`.
|
|
610
|
-
*
|
|
611
|
-
* @private
|
|
612
|
-
* @param {*} value The value to query.
|
|
613
|
-
* @param {boolean} inherited Specify returning inherited property names.
|
|
614
|
-
* @returns {Array} Returns the array of property names.
|
|
615
|
-
*/
|
|
616
|
-
function arrayLikeKeys(value, inherited) {
|
|
617
|
-
var isArr = isArray_1(value),
|
|
618
|
-
isArg = !isArr && isArguments_1(value),
|
|
619
|
-
isBuff = !isArr && !isArg && isBuffer_1(value),
|
|
620
|
-
isType = !isArr && !isArg && !isBuff && isTypedArray_1(value),
|
|
621
|
-
skipIndexes = isArr || isArg || isBuff || isType,
|
|
622
|
-
result = skipIndexes ? _baseTimes(value.length, String) : [],
|
|
623
|
-
length = result.length;
|
|
624
|
-
|
|
625
|
-
for (var key in value) {
|
|
626
|
-
if ((inherited || hasOwnProperty$1.call(value, key)) &&
|
|
627
|
-
!(skipIndexes && (
|
|
628
|
-
// Safari 9 has enumerable `arguments.length` in strict mode.
|
|
629
|
-
key == 'length' ||
|
|
630
|
-
// Node.js 0.10 has enumerable non-index properties on buffers.
|
|
631
|
-
(isBuff && (key == 'offset' || key == 'parent')) ||
|
|
632
|
-
// PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
633
|
-
(isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
|
|
634
|
-
// Skip index properties.
|
|
635
|
-
_isIndex(key, length)
|
|
636
|
-
))) {
|
|
637
|
-
result.push(key);
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
return result;
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
var _arrayLikeKeys = arrayLikeKeys;
|
|
644
|
-
|
|
645
|
-
/** Used for built-in method references. */
|
|
646
|
-
var objectProto$2 = Object.prototype;
|
|
647
|
-
|
|
648
|
-
/**
|
|
649
|
-
* Checks if `value` is likely a prototype object.
|
|
650
|
-
*
|
|
651
|
-
* @private
|
|
652
|
-
* @param {*} value The value to check.
|
|
653
|
-
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
|
|
654
|
-
*/
|
|
655
|
-
function isPrototype(value) {
|
|
656
|
-
var Ctor = value && value.constructor,
|
|
657
|
-
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$2;
|
|
658
|
-
|
|
659
|
-
return value === proto;
|
|
660
|
-
}
|
|
661
|
-
|
|
662
|
-
var _isPrototype = isPrototype;
|
|
663
|
-
|
|
664
|
-
/**
|
|
665
|
-
* Creates a unary function that invokes `func` with its argument transformed.
|
|
666
|
-
*
|
|
667
|
-
* @private
|
|
668
|
-
* @param {Function} func The function to wrap.
|
|
669
|
-
* @param {Function} transform The argument transform.
|
|
670
|
-
* @returns {Function} Returns the new function.
|
|
671
|
-
*/
|
|
672
|
-
function overArg(func, transform) {
|
|
673
|
-
return function(arg) {
|
|
674
|
-
return func(transform(arg));
|
|
675
|
-
};
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
var _overArg = overArg;
|
|
679
|
-
|
|
680
|
-
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
681
|
-
var nativeKeys = _overArg(Object.keys, Object);
|
|
682
|
-
|
|
683
|
-
var _nativeKeys = nativeKeys;
|
|
684
|
-
|
|
685
|
-
/** Used for built-in method references. */
|
|
686
|
-
var objectProto$3 = Object.prototype;
|
|
687
|
-
|
|
688
|
-
/** Used to check objects for own properties. */
|
|
689
|
-
var hasOwnProperty$2 = objectProto$3.hasOwnProperty;
|
|
690
|
-
|
|
691
|
-
/**
|
|
692
|
-
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
|
693
|
-
*
|
|
694
|
-
* @private
|
|
695
|
-
* @param {Object} object The object to query.
|
|
696
|
-
* @returns {Array} Returns the array of property names.
|
|
697
|
-
*/
|
|
698
|
-
function baseKeys(object) {
|
|
699
|
-
if (!_isPrototype(object)) {
|
|
700
|
-
return _nativeKeys(object);
|
|
701
|
-
}
|
|
702
|
-
var result = [];
|
|
703
|
-
for (var key in Object(object)) {
|
|
704
|
-
if (hasOwnProperty$2.call(object, key) && key != 'constructor') {
|
|
705
|
-
result.push(key);
|
|
706
|
-
}
|
|
707
|
-
}
|
|
708
|
-
return result;
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
var _baseKeys = baseKeys;
|
|
712
|
-
|
|
713
|
-
/**
|
|
714
|
-
* Creates an array of the own enumerable property names of `object`.
|
|
715
|
-
*
|
|
716
|
-
* **Note:** Non-object values are coerced to objects. See the
|
|
717
|
-
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
|
718
|
-
* for more details.
|
|
719
|
-
*
|
|
720
|
-
* @static
|
|
721
|
-
* @since 0.1.0
|
|
722
|
-
* @memberOf _
|
|
723
|
-
* @category Object
|
|
724
|
-
* @param {Object} object The object to query.
|
|
725
|
-
* @returns {Array} Returns the array of property names.
|
|
726
|
-
* @example
|
|
727
|
-
*
|
|
728
|
-
* function Foo() {
|
|
729
|
-
* this.a = 1;
|
|
730
|
-
* this.b = 2;
|
|
731
|
-
* }
|
|
732
|
-
*
|
|
733
|
-
* Foo.prototype.c = 3;
|
|
734
|
-
*
|
|
735
|
-
* _.keys(new Foo);
|
|
736
|
-
* // => ['a', 'b'] (iteration order is not guaranteed)
|
|
737
|
-
*
|
|
738
|
-
* _.keys('hi');
|
|
739
|
-
* // => ['0', '1']
|
|
740
|
-
*/
|
|
741
|
-
function keys(object) {
|
|
742
|
-
return isArrayLike_1(object) ? _arrayLikeKeys(object) : _baseKeys(object);
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
var keys_1 = keys;
|
|
746
|
-
|
|
747
|
-
/**
|
|
748
|
-
* Creates an array of the own enumerable string keyed property values of `object`.
|
|
749
|
-
*
|
|
750
|
-
* **Note:** Non-object values are coerced to objects.
|
|
751
|
-
*
|
|
752
|
-
* @static
|
|
753
|
-
* @since 0.1.0
|
|
754
|
-
* @memberOf _
|
|
755
|
-
* @category Object
|
|
756
|
-
* @param {Object} object The object to query.
|
|
757
|
-
* @returns {Array} Returns the array of property values.
|
|
758
|
-
* @example
|
|
759
|
-
*
|
|
760
|
-
* function Foo() {
|
|
761
|
-
* this.a = 1;
|
|
762
|
-
* this.b = 2;
|
|
763
|
-
* }
|
|
764
|
-
*
|
|
765
|
-
* Foo.prototype.c = 3;
|
|
766
|
-
*
|
|
767
|
-
* _.values(new Foo);
|
|
768
|
-
* // => [1, 2] (iteration order is not guaranteed)
|
|
769
|
-
*
|
|
770
|
-
* _.values('hi');
|
|
771
|
-
* // => ['h', 'i']
|
|
772
|
-
*/
|
|
773
|
-
function values(object) {
|
|
774
|
-
return object == null ? [] : _baseValues(object, keys_1(object));
|
|
775
|
-
}
|
|
776
|
-
|
|
777
|
-
var values_1 = values;
|
|
778
|
-
|
|
779
|
-
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
780
|
-
var nativeMax = Math.max;
|
|
781
|
-
|
|
782
|
-
/**
|
|
783
|
-
* Checks if `value` is in `collection`. If `collection` is a string, it's
|
|
784
|
-
* checked for a substring of `value`, otherwise
|
|
785
|
-
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
786
|
-
* is used for equality comparisons. If `fromIndex` is negative, it's used as
|
|
787
|
-
* the offset from the end of `collection`.
|
|
788
|
-
*
|
|
789
|
-
* @static
|
|
790
|
-
* @memberOf _
|
|
791
|
-
* @since 0.1.0
|
|
792
|
-
* @category Collection
|
|
793
|
-
* @param {Array|Object|string} collection The collection to inspect.
|
|
794
|
-
* @param {*} value The value to search for.
|
|
795
|
-
* @param {number} [fromIndex=0] The index to search from.
|
|
796
|
-
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
|
|
797
|
-
* @returns {boolean} Returns `true` if `value` is found, else `false`.
|
|
798
|
-
* @example
|
|
799
|
-
*
|
|
800
|
-
* _.includes([1, 2, 3], 1);
|
|
801
|
-
* // => true
|
|
802
|
-
*
|
|
803
|
-
* _.includes([1, 2, 3], 1, 2);
|
|
804
|
-
* // => false
|
|
805
|
-
*
|
|
806
|
-
* _.includes({ 'a': 1, 'b': 2 }, 1);
|
|
807
|
-
* // => true
|
|
808
|
-
*
|
|
809
|
-
* _.includes('abcd', 'bc');
|
|
810
|
-
* // => true
|
|
811
|
-
*/
|
|
812
|
-
function includes(collection, value, fromIndex, guard) {
|
|
813
|
-
collection = isArrayLike_1(collection) ? collection : values_1(collection);
|
|
814
|
-
fromIndex = (fromIndex && !guard) ? toInteger_1(fromIndex) : 0;
|
|
815
|
-
|
|
816
|
-
var length = collection.length;
|
|
817
|
-
if (fromIndex < 0) {
|
|
818
|
-
fromIndex = nativeMax(length + fromIndex, 0);
|
|
819
|
-
}
|
|
820
|
-
return isString_1(collection)
|
|
821
|
-
? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
|
|
822
|
-
: (!!length && _baseIndexOf(collection, value, fromIndex) > -1);
|
|
823
|
-
}
|
|
824
|
-
|
|
825
|
-
var includes_1 = includes;
|
|
826
|
-
|
|
827
|
-
var renderAuthor = function renderAuthor(authorName, authorURL, index, length) {
|
|
828
|
-
var defaultUrl = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'authors';
|
|
829
|
-
|
|
830
|
-
if (authorName && authorURL) {
|
|
831
|
-
return React__default.createElement(
|
|
832
|
-
'span',
|
|
833
|
-
null,
|
|
834
|
-
React__default.createElement(
|
|
835
|
-
'a',
|
|
836
|
-
{ href: '/' + defaultUrl + '/' + authorURL.current, key: index },
|
|
837
|
-
authorName
|
|
838
|
-
),
|
|
839
|
-
length !== index + 1 && ', '
|
|
840
|
-
);
|
|
841
|
-
} else if (authorName) {
|
|
842
|
-
return React__default.createElement(
|
|
843
|
-
'span',
|
|
844
|
-
{ key: index },
|
|
845
|
-
authorName,
|
|
846
|
-
length !== index + 1 && ', '
|
|
847
|
-
);
|
|
848
|
-
}
|
|
849
|
-
};
|
|
850
|
-
|
|
851
|
-
var get_content_placement_url = function get_content_placement_url(cp) {
|
|
852
|
-
var cp_url = '';
|
|
853
|
-
if (cp.ancestor && typeof cp.ancestor === 'string') {
|
|
854
|
-
cp_url += (cp_url === '' ? '' : '/') + cp.ancestor;
|
|
855
|
-
}
|
|
856
|
-
|
|
857
|
-
if (!cp.ancestor && cp.parent && typeof cp.parent === 'string') {
|
|
858
|
-
cp_url += (cp_url === '' ? '' : '/') + cp.parent;
|
|
859
|
-
}
|
|
860
|
-
|
|
861
|
-
cp_url += (cp_url === '' ? '' : '/') + cp.path;
|
|
862
|
-
return cp_url;
|
|
863
|
-
};
|
|
864
|
-
|
|
865
|
-
var getArticleSummary = function getArticleSummary(article) {
|
|
866
|
-
if (article.summary && article.summary.length > 0) {
|
|
867
|
-
return article.summary;
|
|
868
|
-
} else {
|
|
869
|
-
return false;
|
|
870
|
-
}
|
|
871
|
-
};
|
|
872
|
-
|
|
873
|
-
var Article = function Article(props) {
|
|
874
|
-
var client = props.client,
|
|
875
|
-
pageview = props.pageview,
|
|
876
|
-
videoAccountIDs = props.videoAccountIDs,
|
|
877
|
-
drupalLeadSettings = props.drupalLeadSettings,
|
|
878
|
-
currentPage = props.currentPage,
|
|
879
|
-
_props$article = props.article,
|
|
880
|
-
articleId = _props$article._id,
|
|
881
|
-
title = _props$article.title,
|
|
882
|
-
passwordLock = _props$article.passwordLock,
|
|
883
|
-
authorDetails = _props$article.authorDetails,
|
|
884
|
-
pageNumber = _props$article.pageNumber,
|
|
885
|
-
published = _props$article.published,
|
|
886
|
-
_props$article$showPu = _props$article.showPublished,
|
|
887
|
-
showPublished = _props$article$showPu === undefined ? true : _props$article$showPu,
|
|
888
|
-
articleBody = _props$article.body,
|
|
889
|
-
thumbnail = _props$article.thumbnail,
|
|
890
|
-
content_placement = _props$article.content_placement,
|
|
891
|
-
_props$article$url = _props$article.url;
|
|
892
|
-
_props$article$url = _props$article$url === undefined ? {
|
|
893
|
-
current: ''
|
|
894
|
-
} : _props$article$url;
|
|
895
|
-
var url = _props$article$url.current,
|
|
896
|
-
issue = _props$article.issue,
|
|
897
|
-
source = _props$article.source,
|
|
898
|
-
internalTag = _props$article.internalTag,
|
|
899
|
-
seoTag = _props$article.seoTag,
|
|
900
|
-
sponsoredTag = _props$article.sponsoredTag,
|
|
901
|
-
userDefinedTag = _props$article.userDefinedTag,
|
|
902
|
-
regionalPages = props.regionalPages,
|
|
903
|
-
nationalPage = props.nationalPage,
|
|
904
|
-
ISIContent = props.ISIContent,
|
|
905
|
-
onChangeArticle = props.onChangeArticle,
|
|
906
|
-
shareOptions = props.shareOptions,
|
|
907
|
-
cpModificationRequired = props.cpModificationRequired,
|
|
908
|
-
authorPrefix = props.authorPrefix,
|
|
909
|
-
_props$lgContextAd = props.lgContextAd,
|
|
910
|
-
lgContextAd = _props$lgContextAd === undefined ? false : _props$lgContextAd,
|
|
911
|
-
queueData = props.queueData;
|
|
912
|
-
|
|
913
|
-
var _useState = useState(null),
|
|
914
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
915
|
-
contextualADFlag = _useState2[0],
|
|
916
|
-
setContextualADFlag = _useState2[1];
|
|
917
|
-
// Setting new Flag 'visibleFlag' to know when the article is visible so that new contextual ad can be appended into DOM.
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
var _useState3 = useState(false),
|
|
921
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
922
|
-
visibleFlag = _useState4[0],
|
|
923
|
-
setVisibleFlag = _useState4[1];
|
|
924
|
-
|
|
925
|
-
var summary = getArticleSummary(props.article);
|
|
926
|
-
|
|
927
|
-
var urlFor = function urlFor(source) {
|
|
928
|
-
return imageUrlBuilder(client).image(source);
|
|
929
|
-
};
|
|
930
|
-
|
|
931
|
-
var isCutomPage = function isCutomPage(article) {
|
|
932
|
-
var url = article.url.current;
|
|
933
|
-
|
|
934
|
-
if (regionalPages || nationalPage) {
|
|
935
|
-
return regionalPages.includes(url) || nationalPage === url;
|
|
936
|
-
} else {
|
|
937
|
-
return false;
|
|
938
|
-
}
|
|
939
|
-
};
|
|
940
|
-
|
|
941
|
-
var renderIsiContent = function renderIsiContent(article) {
|
|
942
|
-
var url = article.url.current;
|
|
943
|
-
|
|
944
|
-
if (regionalPages && regionalPages.includes(url)) {
|
|
945
|
-
return React__default.createElement(ISIContent, null);
|
|
946
|
-
} else if (nationalPage === url) {
|
|
947
|
-
return React__default.createElement(ISIContent, { national: true });
|
|
948
|
-
}
|
|
949
|
-
return null;
|
|
950
|
-
};
|
|
951
|
-
|
|
952
|
-
var renderRelevantTopicsDropdown = function renderRelevantTopicsDropdown() {
|
|
953
|
-
if (content_placement && content_placement.length > 0) {
|
|
954
|
-
return React__default.createElement(
|
|
955
|
-
Dropdown,
|
|
956
|
-
{ style: { marginBottom: '1rem' } },
|
|
957
|
-
React__default.createElement(
|
|
958
|
-
Dropdown.Toggle,
|
|
959
|
-
{ variant: 'primary', id: 'partner-dropdown' },
|
|
960
|
-
'Relevant Topics'
|
|
961
|
-
),
|
|
962
|
-
React__default.createElement(
|
|
963
|
-
Dropdown.Menu,
|
|
964
|
-
null,
|
|
965
|
-
content_placement.length > 0 ? content_placement.map(function (cp, index) {
|
|
966
|
-
var cp_url = cpModificationRequired ? get_content_placement_url(cp) : cp.path;
|
|
967
|
-
var href = '/' + cp_url;
|
|
968
|
-
return React__default.createElement(
|
|
969
|
-
Dropdown.Item,
|
|
970
|
-
{ key: index, href: href },
|
|
971
|
-
cp.name
|
|
972
|
-
);
|
|
973
|
-
}) : null
|
|
974
|
-
)
|
|
975
|
-
);
|
|
976
|
-
}
|
|
977
|
-
return null;
|
|
978
|
-
};
|
|
979
|
-
|
|
980
|
-
var renderBlockContent = function renderBlockContent(payload) {
|
|
981
|
-
var _payload = payload,
|
|
982
|
-
body = _payload.body;
|
|
983
|
-
|
|
984
|
-
var findIndex = function findIndex(arr) {
|
|
985
|
-
var indexes = [];
|
|
986
|
-
if ((typeof arr === 'undefined' ? 'undefined' : _typeof(arr)) === 'object') {
|
|
987
|
-
var _iteratorNormalCompletion = true;
|
|
988
|
-
var _didIteratorError = false;
|
|
989
|
-
var _iteratorError = undefined;
|
|
990
|
-
|
|
991
|
-
try {
|
|
992
|
-
for (var _iterator = _getIterator(arr), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
993
|
-
var ele = _step.value;
|
|
994
|
-
|
|
995
|
-
if (ele['_type'] === 'block' && ele.children.some(function (child) {
|
|
996
|
-
return child.text.trim().length > 0;
|
|
997
|
-
}) && ele['listItem'] !== 'bullet' &&
|
|
998
|
-
// To skip li tags when setting contextual native ads
|
|
999
|
-
ele['listItem'] !== 'number' && ele['style'] === 'normal' || ele['_type'] === 'figure') {
|
|
1000
|
-
indexes.push(arr.indexOf(ele));
|
|
1001
|
-
}
|
|
1002
|
-
}
|
|
1003
|
-
} catch (err) {
|
|
1004
|
-
_didIteratorError = true;
|
|
1005
|
-
_iteratorError = err;
|
|
1006
|
-
} finally {
|
|
1007
|
-
try {
|
|
1008
|
-
if (!_iteratorNormalCompletion && _iterator.return) {
|
|
1009
|
-
_iterator.return();
|
|
1010
|
-
}
|
|
1011
|
-
} finally {
|
|
1012
|
-
if (_didIteratorError) {
|
|
1013
|
-
throw _iteratorError;
|
|
1014
|
-
}
|
|
1015
|
-
}
|
|
1016
|
-
}
|
|
1017
|
-
}
|
|
1018
|
-
return indexes;
|
|
1019
|
-
};
|
|
1020
|
-
var indexes = findIndex(body);
|
|
1021
|
-
if (indexes.length >= 2 && body.length > 3 && payload.contextualAD && payload.contextualVideoAD) {
|
|
1022
|
-
payload = _extends({}, payload, {
|
|
1023
|
-
contextualAD: _extends({}, payload.contextualAD, {
|
|
1024
|
-
slotId: (payload.contextualAD.slotId || 'contextual_ad') + '-' + payload._id
|
|
1025
|
-
}),
|
|
1026
|
-
contextualVideoAD: _extends({}, payload.contextualVideoAD, {
|
|
1027
|
-
slotId: (payload.contextualVideoAD.slotId || 'in-context_video') + '-' + payload._id
|
|
1028
|
-
})
|
|
1029
|
-
});
|
|
1030
|
-
var selectedIndex = indexes[1] + 1;
|
|
1031
|
-
|
|
1032
|
-
var checkIsAdFound = function checkIsAdFound(isFound) {
|
|
1033
|
-
if (!isFound) {
|
|
1034
|
-
var parent = document.getElementById('contextual-native-ad-' + payload._id);
|
|
1035
|
-
parent.style.height = '0%';
|
|
1036
|
-
parent.style.width = '0%';
|
|
1037
|
-
parent.style.display = 'none';
|
|
1038
|
-
setContextualADFlag(false);
|
|
1039
|
-
} else {
|
|
1040
|
-
setContextualADFlag(true);
|
|
1041
|
-
}
|
|
1042
|
-
};
|
|
1043
|
-
|
|
1044
|
-
var checkIsVideoAdFound = function checkIsVideoAdFound(isFound) {
|
|
1045
|
-
if (!isFound) {
|
|
1046
|
-
var parent = document.getElementById('contextual-video-ad-' + payload._id);
|
|
1047
|
-
parent.style.height = '0%';
|
|
1048
|
-
parent.style.width = '0%';
|
|
1049
|
-
parent.style.display = 'none';
|
|
1050
|
-
setContextualADFlag(false);
|
|
1051
|
-
} else {
|
|
1052
|
-
setContextualADFlag(true);
|
|
1053
|
-
}
|
|
1054
|
-
};
|
|
1055
|
-
|
|
1056
|
-
return React__default.createElement(
|
|
1057
|
-
React__default.Fragment,
|
|
1058
|
-
null,
|
|
1059
|
-
React__default.createElement(BlockContent, _extends({
|
|
1060
|
-
serializers: getSerializers(client, pageview, videoAccountIDs, function () {}, true, drupalLeadSettings, currentPage, false, contextualADFlag, articleId),
|
|
1061
|
-
blocks: [].concat(_toConsumableArray(body.slice(0, selectedIndex))),
|
|
1062
|
-
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
1063
|
-
}, client.config())),
|
|
1064
|
-
React__default.createElement('span', { className: 'clearfix' }),
|
|
1065
|
-
React__default.createElement(
|
|
1066
|
-
'div',
|
|
1067
|
-
{ id: 'contextual-native-ad-' + payload._id, className: 'contextual-native-ad' },
|
|
1068
|
-
React__default.createElement(DFPAdSlot, _extends({}, payload.contextualAD, { refreshFlag: false, checkIsAdFound: checkIsAdFound }))
|
|
1069
|
-
),
|
|
1070
|
-
React__default.createElement('span', { className: 'clearfix' }),
|
|
1071
|
-
React__default.createElement(
|
|
1072
|
-
'div',
|
|
1073
|
-
{ id: 'contextual-video-ad-' + payload._id, className: 'contextual-video-ad' },
|
|
1074
|
-
React__default.createElement(DFPAdSlot, _extends({}, payload.contextualVideoAD, { refreshFlag: false, checkIsAdFound: checkIsVideoAdFound }))
|
|
1075
|
-
),
|
|
1076
|
-
React__default.createElement(BlockContent, _extends({
|
|
1077
|
-
serializers: getSerializers(client, pageview, videoAccountIDs, function () {}, true, drupalLeadSettings, currentPage, false, undefined, articleId),
|
|
1078
|
-
blocks: [].concat(_toConsumableArray(body.slice(selectedIndex))),
|
|
1079
|
-
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
1080
|
-
}, client.config()))
|
|
1081
|
-
);
|
|
1082
|
-
} else if (indexes.length >= 2 && body.length > 3 && payload.contextualAD && !payload.contextualVideoAD) {
|
|
1083
|
-
payload = _extends({}, payload, {
|
|
1084
|
-
contextualAD: _extends({}, payload.contextualAD, {
|
|
1085
|
-
slotId: (payload.contextualAD.slotId || 'contextual_ad') + '-' + payload._id,
|
|
1086
|
-
className: 'ADFluid',
|
|
1087
|
-
// Fetching new contextual targeting based on the current active article.
|
|
1088
|
-
targeting: props.getTargeting(props.article, 'native-ad'),
|
|
1089
|
-
// Adding new ad size for large contextual ad for desktop screen width >= 1400
|
|
1090
|
-
sizes: lgContextAd ? [[728, 90], 'fluid', [300, 100]] : ['fluid', [300, 100]],
|
|
1091
|
-
sizeMapping: lgContextAd ? [{
|
|
1092
|
-
viewport: [1400, 0],
|
|
1093
|
-
sizes: [[728, 90], 'fluid', [300, 100]]
|
|
1094
|
-
}, { viewport: [0, 0], sizes: ['fluid', [300, 100]] }] : ['fluid', [300, 100]]
|
|
1095
|
-
})
|
|
1096
|
-
});
|
|
1097
|
-
var _selectedIndex = indexes[1] + 1;
|
|
1098
|
-
var _checkIsAdFound = function _checkIsAdFound(isFound, adData) {
|
|
1099
|
-
if (!isFound) {
|
|
1100
|
-
var parent = document.getElementById('contextual-native-ad-' + payload._id);
|
|
1101
|
-
parent.style.height = '0%';
|
|
1102
|
-
parent.style.width = '0%';
|
|
1103
|
-
parent.style.display = 'none';
|
|
1104
|
-
setContextualADFlag(false);
|
|
1105
|
-
} else {
|
|
1106
|
-
var _parent = document.getElementById('contextual-native-ad-' + payload._id);
|
|
1107
|
-
if (adData && adData.event && adData.event.size && _parent) {
|
|
1108
|
-
// Adding fix for fluid contextual ad to avoid from collapsing when size is [0,0]
|
|
1109
|
-
var fluidSizes = [[0, 0]];
|
|
1110
|
-
var checkAdSize = function checkAdSize(size) {
|
|
1111
|
-
return _JSON$stringify(size) === _JSON$stringify(adData.event.size);
|
|
1112
|
-
};
|
|
1113
|
-
if (!fluidSizes.some(checkAdSize)) {
|
|
1114
|
-
_parent.style.width = adData.event.size[0] + 'px';
|
|
1115
|
-
_parent.style.height = adData.event.size[1] + 'px';
|
|
1116
|
-
}
|
|
1117
|
-
_parent.style.margin = 'auto';
|
|
1118
|
-
// Adding margin below to create a seperation from text.
|
|
1119
|
-
_parent.style.marginBottom = '15px';
|
|
1120
|
-
}
|
|
1121
|
-
if (body[0]._type === 'figure' || body[1]._type === 'figure' || body[2]._type === 'figure' || body[3]._type === 'figure') {
|
|
1122
|
-
setContextualADFlag(true);
|
|
1123
|
-
}
|
|
1124
|
-
}
|
|
1125
|
-
};
|
|
1126
|
-
|
|
1127
|
-
return React__default.createElement(
|
|
1128
|
-
React__default.Fragment,
|
|
1129
|
-
null,
|
|
1130
|
-
React__default.createElement(BlockContent, _extends({
|
|
1131
|
-
serializers: getSerializers(client, pageview, videoAccountIDs, function () {}, true, drupalLeadSettings, currentPage, false, undefined, articleId),
|
|
1132
|
-
blocks: [].concat(_toConsumableArray(body.slice(0, _selectedIndex))),
|
|
1133
|
-
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
1134
|
-
}, client.config())),
|
|
1135
|
-
contextualADFlag && React__default.createElement('span', { className: 'clearfix' }),
|
|
1136
|
-
(visibleFlag || queueData && queueData.length === 1) && React__default.createElement(
|
|
1137
|
-
'div',
|
|
1138
|
-
{ id: 'contextual-native-ad-' + payload._id, className: 'contextual-native-ad' },
|
|
1139
|
-
React__default.createElement(DFPAdSlot, _extends({}, payload.contextualAD, { refreshFlag: false, checkIsAdFound: _checkIsAdFound }))
|
|
1140
|
-
),
|
|
1141
|
-
contextualADFlag && React__default.createElement('span', { className: 'clearfix' }),
|
|
1142
|
-
React__default.createElement(BlockContent, _extends({
|
|
1143
|
-
serializers: getSerializers(client, pageview, videoAccountIDs, function () {}, true, drupalLeadSettings, currentPage, false, undefined, articleId),
|
|
1144
|
-
blocks: [].concat(_toConsumableArray(body.slice(_selectedIndex))),
|
|
1145
|
-
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
1146
|
-
}, client.config()))
|
|
1147
|
-
);
|
|
1148
|
-
} else if (indexes.length >= 2 && body.length > 3 && payload.contextualVideoAD && !payload.contextualAD) {
|
|
1149
|
-
payload = _extends({}, payload, {
|
|
1150
|
-
contextualVideoAD: _extends({}, payload.contextualVideoAD, {
|
|
1151
|
-
slotId: (payload.contextualVideoAD.slotId || 'in-context_video') + '-' + payload._id
|
|
1152
|
-
})
|
|
1153
|
-
});
|
|
1154
|
-
var _selectedIndex2 = indexes[1] + 1;
|
|
1155
|
-
|
|
1156
|
-
var _checkIsAdFound2 = function _checkIsAdFound2(isFound) {
|
|
1157
|
-
if (!isFound) {
|
|
1158
|
-
var parent = document.getElementById('contextual-video-ad-' + payload._id);
|
|
1159
|
-
parent.style.height = '0%';
|
|
1160
|
-
parent.style.width = '0%';
|
|
1161
|
-
parent.style.display = 'none';
|
|
1162
|
-
setContextualADFlag(false);
|
|
1163
|
-
} else {
|
|
1164
|
-
if (body && body[1] && body[1]._type === 'figure') {
|
|
1165
|
-
setContextualADFlag(true);
|
|
1166
|
-
}
|
|
1167
|
-
}
|
|
1168
|
-
};
|
|
1169
|
-
|
|
1170
|
-
return React__default.createElement(
|
|
1171
|
-
React__default.Fragment,
|
|
1172
|
-
null,
|
|
1173
|
-
React__default.createElement(BlockContent, _extends({
|
|
1174
|
-
serializers: getSerializers(client, pageview, videoAccountIDs, function () {}, true, drupalLeadSettings, currentPage, false, contextualADFlag, articleId),
|
|
1175
|
-
blocks: [].concat(_toConsumableArray(body.slice(0, _selectedIndex2))),
|
|
1176
|
-
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
1177
|
-
}, client.config())),
|
|
1178
|
-
React__default.createElement('span', { className: 'clearfix' }),
|
|
1179
|
-
React__default.createElement(
|
|
1180
|
-
'div',
|
|
1181
|
-
{ id: 'contextual-video-ad-' + payload._id, className: 'contextual-video-ad' },
|
|
1182
|
-
React__default.createElement(DFPAdSlot, _extends({}, payload.contextualVideoAD, { refreshFlag: false, checkIsAdFound: _checkIsAdFound2 }))
|
|
1183
|
-
),
|
|
1184
|
-
React__default.createElement(BlockContent, _extends({
|
|
1185
|
-
serializers: getSerializers(client, pageview, videoAccountIDs, function () {}, true, drupalLeadSettings, currentPage, false, undefined, articleId),
|
|
1186
|
-
blocks: [].concat(_toConsumableArray(body.slice(_selectedIndex2))),
|
|
1187
|
-
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
1188
|
-
}, client.config()))
|
|
1189
|
-
);
|
|
1190
|
-
} else {
|
|
1191
|
-
return React__default.createElement(BlockContent, _extends({
|
|
1192
|
-
serializers: getSerializers(client, pageview, videoAccountIDs, function () {}, true, drupalLeadSettings, currentPage, false, undefined, articleId),
|
|
1193
|
-
blocks: articleBody,
|
|
1194
|
-
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
1195
|
-
}, client.config()));
|
|
1196
|
-
}
|
|
1197
|
-
};
|
|
1198
|
-
|
|
1199
|
-
var shareVia = shareOptions.shareVia,
|
|
1200
|
-
shareSubject = shareOptions.shareSubject,
|
|
1201
|
-
twitterSiteName = shareOptions.twitterSiteName,
|
|
1202
|
-
shareImageDefault = shareOptions.shareImageDefault,
|
|
1203
|
-
shareBaseUrl = shareOptions.shareBaseUrl,
|
|
1204
|
-
shareSiteTitle = shareOptions.shareSiteTitle;
|
|
1205
|
-
|
|
1206
|
-
var shareUrl = shareBaseUrl + props.article.url.current;
|
|
1207
|
-
var shareTitle = title;
|
|
1208
|
-
var shareSummary = summary;
|
|
1209
|
-
var shareImage = thumbnail && thumbnail.asset ? urlFor(thumbnail.asset).url() : shareImageDefault;
|
|
1210
|
-
var siteName = props.website.title;
|
|
1211
|
-
var shareKeywords = getKeywords(props.article).join(',');
|
|
1212
|
-
|
|
1213
|
-
var meta = {
|
|
1214
|
-
shareTitle: shareTitle,
|
|
1215
|
-
shareSiteName: props.cache.siteSettingCache.name,
|
|
1216
|
-
shareSummary: shareSummary,
|
|
1217
|
-
shareUrl: shareUrl,
|
|
1218
|
-
shareImage: shareImage,
|
|
1219
|
-
shareVia: props.Settings.title,
|
|
1220
|
-
shareKeywords: shareKeywords
|
|
1221
|
-
};
|
|
1222
|
-
return React__default.createElement(
|
|
1223
|
-
React__default.Fragment,
|
|
1224
|
-
null,
|
|
1225
|
-
React__default.createElement(
|
|
1226
|
-
InscreenSensor,
|
|
1227
|
-
{
|
|
1228
|
-
offSetTop: 120,
|
|
1229
|
-
className: 'inscreen-wrapper',
|
|
1230
|
-
id: 'article-' + title,
|
|
1231
|
-
onChange: function onChange(visible) {
|
|
1232
|
-
if (visible === 'top' || visible === 'bottom' || visible === 'small-top') {
|
|
1233
|
-
onChangeArticle(url, visible, meta);
|
|
1234
|
-
// Setting 'visibleFlag' to know that the article is visible.
|
|
1235
|
-
setVisibleFlag(true);
|
|
1236
|
-
}
|
|
1237
|
-
} },
|
|
1238
|
-
React__default.createElement(
|
|
1239
|
-
'div',
|
|
1240
|
-
null,
|
|
1241
|
-
queueData && queueData.length === 1 && React__default.createElement(
|
|
1242
|
-
Head,
|
|
1243
|
-
null,
|
|
1244
|
-
React__default.createElement(
|
|
1245
|
-
'title',
|
|
1246
|
-
{ key: 'title' },
|
|
1247
|
-
'' + shareTitle
|
|
1248
|
-
),
|
|
1249
|
-
React__default.createElement('meta', { name: 'description', key: 'description', content: shareSummary }),
|
|
1250
|
-
React__default.createElement('meta', { name: 'keywords', key: 'keywords', content: shareKeywords }),
|
|
1251
|
-
passwordLock && React__default.createElement('meta', { name: 'robots', content: 'noindex, nofollow' }),
|
|
1252
|
-
React__default.createElement('meta', { property: 'og:url', content: shareUrl, key: 'og:url' }),
|
|
1253
|
-
React__default.createElement('meta', { property: 'og:title', content: shareTitle, key: 'og:title' }),
|
|
1254
|
-
React__default.createElement('meta', { property: 'og:image', content: shareImage, key: 'og:image' }),
|
|
1255
|
-
React__default.createElement('meta', { property: 'og:site_name', content: props.Settings.title, key: 'og:site_name' }),
|
|
1256
|
-
React__default.createElement('meta', { property: 'og:description', content: shareSummary, key: 'og:description' }),
|
|
1257
|
-
React__default.createElement('meta', { name: 'twitter:card', content: 'summary', key: 'twitter:card' }),
|
|
1258
|
-
React__default.createElement('meta', { name: 'twitter:title', content: shareTitle, key: 'twitter:title' }),
|
|
1259
|
-
React__default.createElement('meta', { name: 'twitter:image', content: shareImage, key: 'twitter:image' }),
|
|
1260
|
-
React__default.createElement('meta', { name: 'twitter:site', content: '@' + props.Settings.title, key: 'twitter:site' }),
|
|
1261
|
-
React__default.createElement('meta', { name: 'twitter:description', content: shareSummary, key: 'twitter:description' }),
|
|
1262
|
-
React__default.createElement('link', { rel: 'canonical', href: shareUrl, key: 'canonical' })
|
|
1263
|
-
),
|
|
1264
|
-
React__default.createElement(
|
|
1265
|
-
'h1',
|
|
1266
|
-
{ className: 'page-title' },
|
|
1267
|
-
title
|
|
1268
|
-
),
|
|
1269
|
-
React__default.createElement(
|
|
1270
|
-
'div',
|
|
1271
|
-
{ className: 'video-detail', style: { marginBottom: isCutomPage(props.article) ? '150px' : 0 } },
|
|
1272
|
-
showPublished && React__default.createElement(
|
|
1273
|
-
'div',
|
|
1274
|
-
null,
|
|
1275
|
-
moment(published).format('LL')
|
|
1276
|
-
)
|
|
1277
|
-
/* Show Published date */
|
|
1278
|
-
,
|
|
1279
|
-
React__default.createElement(
|
|
1280
|
-
'div',
|
|
1281
|
-
{ className: 'mb-3' },
|
|
1282
|
-
authorDetails && authorDetails.map(function (authorDetail, index) {
|
|
1283
|
-
return React__default.createElement(
|
|
1284
|
-
'span',
|
|
1285
|
-
{ key: index },
|
|
1286
|
-
renderAuthor(authorDetail.displayName, authorDetail.url, index, authorDetails.length, authorPrefix)
|
|
1287
|
-
);
|
|
1288
|
-
}),
|
|
1289
|
-
props.article.source && React__default.createElement(
|
|
1290
|
-
'div',
|
|
1291
|
-
{ className: 'sanityDisplayLabel' },
|
|
1292
|
-
props.article.source
|
|
1293
|
-
),
|
|
1294
|
-
issue && React__default.createElement(
|
|
1295
|
-
'div',
|
|
1296
|
-
{ className: 'volume-issue' },
|
|
1297
|
-
issue.volume && React__default.createElement(
|
|
1298
|
-
'span',
|
|
1299
|
-
null,
|
|
1300
|
-
'Volume ' + issue.volume,
|
|
1301
|
-
','
|
|
1302
|
-
),
|
|
1303
|
-
issue.issueNumber && React__default.createElement(
|
|
1304
|
-
'span',
|
|
1305
|
-
null,
|
|
1306
|
-
' Issue ' + issue.issueNumber
|
|
1307
|
-
)
|
|
1308
|
-
),
|
|
1309
|
-
pageNumber && React__default.createElement(
|
|
1310
|
-
'div',
|
|
1311
|
-
{ className: 'article-pageNumber' },
|
|
1312
|
-
'Page Number: ' + pageNumber
|
|
1313
|
-
)
|
|
1314
|
-
),
|
|
1315
|
-
React__default.createElement(
|
|
1316
|
-
'p',
|
|
1317
|
-
null,
|
|
1318
|
-
React__default.createElement(SocialShare, {
|
|
1319
|
-
shareUrl: shareUrl,
|
|
1320
|
-
shareTitle: shareTitle,
|
|
1321
|
-
shareVia: shareVia,
|
|
1322
|
-
shareSummary: shareSummary,
|
|
1323
|
-
shareSubject: shareSubject,
|
|
1324
|
-
shareImage: shareImage,
|
|
1325
|
-
size: 32,
|
|
1326
|
-
siteName: siteName,
|
|
1327
|
-
twitterSiteName: twitterSiteName,
|
|
1328
|
-
disableMeta: true
|
|
1329
|
-
})
|
|
1330
|
-
),
|
|
1331
|
-
renderRelevantTopicsDropdown(),
|
|
1332
|
-
summary && React__default.createElement(
|
|
1333
|
-
'p',
|
|
1334
|
-
null,
|
|
1335
|
-
React__default.createElement(
|
|
1336
|
-
'em',
|
|
1337
|
-
null,
|
|
1338
|
-
summary
|
|
1339
|
-
)
|
|
1340
|
-
),
|
|
1341
|
-
main_39 && props.article.Ads.map(function (ad, index) {
|
|
1342
|
-
if (index === 0) {
|
|
1343
|
-
return React__default.createElement(
|
|
1344
|
-
'div',
|
|
1345
|
-
{ key: index, id: 'addid-' + index, style: { display: 'flex', flex: '1 0 auto', marginTop: '-1rem', marginBottom: '1rem' } },
|
|
1346
|
-
ad.component
|
|
1347
|
-
);
|
|
1348
|
-
}
|
|
1349
|
-
}),
|
|
1350
|
-
React__default.createElement(
|
|
1351
|
-
'div',
|
|
1352
|
-
{ className: 'block-content mt-3' },
|
|
1353
|
-
renderBlockContent(props.article),
|
|
1354
|
-
issue && issue.url && React__default.createElement(
|
|
1355
|
-
'a',
|
|
1356
|
-
{ rel: 'noopener', href: issue.url, target: '_blank', title: 'Download issue' },
|
|
1357
|
-
React__default.createElement('img', { style: { margin: '1rem', maxHeight: '40px', maxWidth: '40px' }, src: '/download.png', alt: 'download issue' }),
|
|
1358
|
-
'Download Issue : ',
|
|
1359
|
-
issue.name
|
|
1360
|
-
)
|
|
1361
|
-
)
|
|
1362
|
-
),
|
|
1363
|
-
renderIsiContent(props.article)
|
|
1364
|
-
)
|
|
1365
|
-
),
|
|
1366
|
-
main_39 && props.article.Ads.map(function (ad, index) {
|
|
1367
|
-
if (index > 0) {
|
|
1368
|
-
return React__default.createElement(
|
|
1369
|
-
'div',
|
|
1370
|
-
{ key: index, id: 'addid-' + index, style: { display: 'flex', flex: '1 0 auto' } },
|
|
1371
|
-
ad.component
|
|
1372
|
-
);
|
|
1373
|
-
}
|
|
1374
|
-
}),
|
|
1375
|
-
React__default.createElement('div', { className: 'clearfix', style: { minHeight: '1px' } }),
|
|
1376
|
-
React__default.createElement('hr', { className: 'article-seperater' }),
|
|
1377
|
-
React__default.createElement(
|
|
1378
|
-
'noscript',
|
|
1379
|
-
null,
|
|
1380
|
-
props.article.relatedArticle && props.article.relatedArticle.url && props.article.relatedArticle.url.current && React__default.createElement(
|
|
1381
|
-
'div',
|
|
1382
|
-
{ style: { textAlign: 'center' } },
|
|
1383
|
-
React__default.createElement(
|
|
1384
|
-
'a',
|
|
1385
|
-
{ href: '/view/' + props.article.relatedArticle.url.current },
|
|
1386
|
-
'Related Article >>>'
|
|
1387
|
-
)
|
|
1388
|
-
)
|
|
1389
|
-
),
|
|
1390
|
-
React__default.createElement(
|
|
1391
|
-
'style',
|
|
1392
|
-
{ jsx: 'true' },
|
|
1393
|
-
'\n .sanityDisplayLabel {\n margin: 0.5rem 0;\n border: 2px solid #484848;\n width: fit-content;\n width: -moz-fit-content;\n padding: 5px;\n color: #484848;\n border-radius: 2px;\n }\n @media only screen and (max-width: 767px) {\n .sanityDisplayLabel {\n max-width: 100%;\n }\n }\n '
|
|
1394
|
-
)
|
|
1395
|
-
);
|
|
1396
|
-
};
|
|
1397
|
-
|
|
1398
|
-
var ArticleQueue = function ArticleQueue(props) {
|
|
1399
|
-
var _props$prevUrl = props.prevUrl,
|
|
1400
|
-
prevUrl = _props$prevUrl === undefined ? '/' : _props$prevUrl,
|
|
1401
|
-
Ads = props.Ads,
|
|
1402
|
-
_props$maxListLength = props.maxListLength,
|
|
1403
|
-
maxListLength = _props$maxListLength === undefined ? 10 : _props$maxListLength,
|
|
1404
|
-
_props$sponsoredTaxon = props.sponsoredTaxonomies,
|
|
1405
|
-
sponsoredTaxonomies = _props$sponsoredTaxon === undefined ? [] : _props$sponsoredTaxon,
|
|
1406
|
-
_props$cpModification = props.cpModificationRequired,
|
|
1407
|
-
cpModificationRequired = _props$cpModification === undefined ? false : _props$cpModification,
|
|
1408
|
-
_props$authorPrefix = props.authorPrefix,
|
|
1409
|
-
authorPrefix = _props$authorPrefix === undefined ? 'authors' : _props$authorPrefix;
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
var getTargeting = function getTargeting(article, position) {
|
|
1413
|
-
var _article$internalTag = article.internalTag,
|
|
1414
|
-
internalTag = _article$internalTag === undefined ? [] : _article$internalTag,
|
|
1415
|
-
_article$userDefinedT = article.userDefinedTag,
|
|
1416
|
-
userDefinedTag = _article$userDefinedT === undefined ? [] : _article$userDefinedT,
|
|
1417
|
-
_article$SponsorshipT = article.SponsorshipTag,
|
|
1418
|
-
SponsorshipTag = _article$SponsorshipT === undefined ? [] : _article$SponsorshipT,
|
|
1419
|
-
_article$seoTag = article.seoTag,
|
|
1420
|
-
seoTag = _article$seoTag === undefined ? [] : _article$seoTag,
|
|
1421
|
-
_article$url = article.url;
|
|
1422
|
-
_article$url = _article$url === undefined ? {
|
|
1423
|
-
current: ''
|
|
1424
|
-
} : _article$url;
|
|
1425
|
-
var url = _article$url.current,
|
|
1426
|
-
_article$documentGrou = article.documentGroup;
|
|
1427
|
-
_article$documentGrou = _article$documentGrou === undefined ? {
|
|
1428
|
-
path: ''
|
|
1429
|
-
} : _article$documentGrou;
|
|
1430
|
-
var document_group = _article$documentGrou.path,
|
|
1431
|
-
content_placement = article.content_placement;
|
|
1432
|
-
|
|
1433
|
-
var context = url;
|
|
1434
|
-
var localHistory = props.historyCookie ? JSON.parse(props.historyCookie) : [];
|
|
1435
|
-
if (!context && localHistory) {
|
|
1436
|
-
context = localHistory[localHistory.length - 1];
|
|
1437
|
-
}
|
|
1438
|
-
context = context && context.split('?')[0];
|
|
1439
|
-
context = context && context.split('&')[0];
|
|
1440
|
-
var content_placement_urls = [];
|
|
1441
|
-
if (content_placement && prevUrl && prevUrl.length) {
|
|
1442
|
-
content_placement.forEach(function (item) {
|
|
1443
|
-
var path = item.path;
|
|
1444
|
-
if (cpModificationRequired) {
|
|
1445
|
-
path = get_content_placement_url(item);
|
|
1446
|
-
}
|
|
1447
|
-
|
|
1448
|
-
if (includes_1(prevUrl, path)) {
|
|
1449
|
-
content_placement_urls.push(path);
|
|
1450
|
-
}
|
|
1451
|
-
});
|
|
1452
|
-
}
|
|
1453
|
-
|
|
1454
|
-
if (content_placement) {
|
|
1455
|
-
if (content_placement_urls.length === 0) {
|
|
1456
|
-
content_placement_urls = content_placement.map(function (item) {
|
|
1457
|
-
return cpModificationRequired ? get_content_placement_url(item) : item.path;
|
|
1458
|
-
});
|
|
1459
|
-
}
|
|
1460
|
-
} else {
|
|
1461
|
-
content_placement_urls = ['/'];
|
|
1462
|
-
}
|
|
1463
|
-
var articleKeywords = [].concat(_toConsumableArray(internalTag), _toConsumableArray(userDefinedTag), _toConsumableArray(SponsorshipTag), _toConsumableArray(seoTag));
|
|
1464
|
-
var targeting = {
|
|
1465
|
-
tags: articleKeywords,
|
|
1466
|
-
document_group: [document_group],
|
|
1467
|
-
document_url: [url],
|
|
1468
|
-
content_placement: content_placement_urls
|
|
1469
|
-
};
|
|
1470
|
-
|
|
1471
|
-
if (article.issue && article.issue.path) {
|
|
1472
|
-
targeting.issue_url = [article.issue.path];
|
|
1473
|
-
if (article.issue.publication && article.issue.publication.path) {
|
|
1474
|
-
targeting.publication_url = [article.issue.publication.path];
|
|
1475
|
-
}
|
|
1476
|
-
}
|
|
1477
|
-
|
|
1478
|
-
if (props.cache.hyperTargeting) {
|
|
1479
|
-
targeting = _extends({}, targeting, { campaign_id: props.cache.hyperTargeting });
|
|
1480
|
-
}
|
|
1481
|
-
|
|
1482
|
-
if (position && position.length) {
|
|
1483
|
-
targeting['pos'] = position;
|
|
1484
|
-
}
|
|
1485
|
-
return targeting;
|
|
1486
|
-
};
|
|
1487
|
-
|
|
1488
|
-
var firstArticle = function firstArticle() {
|
|
1489
|
-
var article = _Object$assign({}, props.article);
|
|
1490
|
-
var targeting = getTargeting(props.article);
|
|
1491
|
-
article.Ads = Ads.getRightItems(targeting);
|
|
1492
|
-
return article;
|
|
1493
|
-
};
|
|
1494
|
-
|
|
1495
|
-
var _useState5 = useState([firstArticle()]),
|
|
1496
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
1497
|
-
queueData = _useState6[0],
|
|
1498
|
-
setQueueData = _useState6[1];
|
|
1499
|
-
|
|
1500
|
-
var refreshAD = function refreshAD(path) {
|
|
1501
|
-
var activeArticle = queueData.find(function (item) {
|
|
1502
|
-
return item.url.current === path;
|
|
1503
|
-
});
|
|
1504
|
-
var targeting = getTargeting(activeArticle);
|
|
1505
|
-
|
|
1506
|
-
if (!main_39) {
|
|
1507
|
-
lib_3.getGoogletag().then(function (googletag) {
|
|
1508
|
-
if (window.googletag && googletag.pubadsReady) {
|
|
1509
|
-
var slots = googletag.pubads().getSlots();
|
|
1510
|
-
slots.forEach(function (slot) {
|
|
1511
|
-
var pos = slot.getTargeting('pos');
|
|
1512
|
-
slot.clearTargeting();
|
|
1513
|
-
_Object$keys(targeting).forEach(function (key) {
|
|
1514
|
-
slot.setTargeting(key, targeting[key]);
|
|
1515
|
-
});
|
|
1516
|
-
slot.setTargeting('pos', pos);
|
|
1517
|
-
});
|
|
1518
|
-
lib_3.refresh();
|
|
1519
|
-
}
|
|
1520
|
-
});
|
|
1521
|
-
}
|
|
1522
|
-
//Refresh leaderboard ad on mobile
|
|
1523
|
-
if (main_39) {
|
|
1524
|
-
var leaderboardSlotId = '';
|
|
1525
|
-
lib_3.getGoogletag().then(function (googletag) {
|
|
1526
|
-
if (window.googletag && googletag.pubadsReady) {
|
|
1527
|
-
var slots = googletag.pubads().getSlots();
|
|
1528
|
-
slots.forEach(function (slot) {
|
|
1529
|
-
var pos = slot.getTargeting('pos');
|
|
1530
|
-
if (pos == 'top-mobile') {
|
|
1531
|
-
//gets the slotId of the leaderboard ad to refresh
|
|
1532
|
-
leaderboardSlotId = slot.getSlotId().getDomId();
|
|
1533
|
-
slot.clearTargeting();
|
|
1534
|
-
_Object$keys(targeting).forEach(function (key) {
|
|
1535
|
-
slot.setTargeting(key, targeting[key]);
|
|
1536
|
-
});
|
|
1537
|
-
slot.setTargeting('pos', pos);
|
|
1538
|
-
}
|
|
1539
|
-
});
|
|
1540
|
-
lib_3.refresh(leaderboardSlotId);
|
|
1541
|
-
}
|
|
1542
|
-
});
|
|
1543
|
-
}
|
|
1544
|
-
};
|
|
1545
|
-
|
|
1546
|
-
var checkSponseredArticle = function checkSponseredArticle(article) {
|
|
1547
|
-
var _article$taxonomyMapp = article.taxonomyMapping,
|
|
1548
|
-
taxonomyMapping = _article$taxonomyMapp === undefined ? [] : _article$taxonomyMapp;
|
|
1549
|
-
|
|
1550
|
-
if (props.checkSponsered) {
|
|
1551
|
-
return taxonomyMapping.some(function (item) {
|
|
1552
|
-
return includes_1(sponsoredTaxonomies, item._ref);
|
|
1553
|
-
});
|
|
1554
|
-
} else {
|
|
1555
|
-
return false;
|
|
1556
|
-
}
|
|
1557
|
-
};
|
|
1558
|
-
|
|
1559
|
-
var preVscroll = 0;
|
|
1560
|
-
var isScrollDown = true;
|
|
1561
|
-
|
|
1562
|
-
var scrollDirectionDetect = function scrollDirectionDetect(e) {
|
|
1563
|
-
var window = e.currentTarget;
|
|
1564
|
-
|
|
1565
|
-
if (preVscroll > window.scrollY) {
|
|
1566
|
-
isScrollDown = false;
|
|
1567
|
-
} else if (preVscroll < window.scrollY) {
|
|
1568
|
-
isScrollDown = true;
|
|
1569
|
-
}
|
|
1570
|
-
preVscroll = window.scrollY;
|
|
1571
|
-
};
|
|
1572
|
-
|
|
1573
|
-
useEffect(function () {
|
|
1574
|
-
window.addEventListener('scroll', scrollDirectionDetect);
|
|
1575
|
-
return function () {
|
|
1576
|
-
return window.removeEventListener('scroll', scrollDirectionDetect);
|
|
1577
|
-
};
|
|
1578
|
-
});
|
|
1579
|
-
|
|
1580
|
-
var hasVerticalScroll = function hasVerticalScroll() {
|
|
1581
|
-
if (window.innerHeight) {
|
|
1582
|
-
return document.body.offsetHeight > window.innerHeight;
|
|
1583
|
-
} else {
|
|
1584
|
-
return document.documentElement.scrollHeight > document.documentElement.offsetHeight || document.body.scrollHeight > document.body.offsetHeight;
|
|
1585
|
-
}
|
|
1586
|
-
};
|
|
1587
|
-
|
|
1588
|
-
useEffect(function () {
|
|
1589
|
-
// Fetching related article after component mounted if vertical scroll not found
|
|
1590
|
-
if (!hasVerticalScroll()) {
|
|
1591
|
-
loadmore();
|
|
1592
|
-
}
|
|
1593
|
-
}, [queueData.length]);
|
|
1594
|
-
|
|
1595
|
-
var loadmore = function loadmore() {
|
|
1596
|
-
var query = props.relatedArticleQuery;
|
|
1597
|
-
var params = props.params;
|
|
1598
|
-
if (queueData && queueData.length < maxListLength) {
|
|
1599
|
-
params.index = queueData.length - 1;
|
|
1600
|
-
props.client.fetch(query, params).then(function (article) {
|
|
1601
|
-
if (article && article._id) {
|
|
1602
|
-
var targeting = getTargeting(article);
|
|
1603
|
-
article.Ads = Ads.getRightItems(targeting);
|
|
1604
|
-
setQueueData([].concat(_toConsumableArray(queueData), [article]));
|
|
1605
|
-
}
|
|
1606
|
-
});
|
|
1607
|
-
}
|
|
1608
|
-
};
|
|
1609
|
-
|
|
1610
|
-
var changeMeta = function changeMeta(meta) {
|
|
1611
|
-
document.title = meta.shareTitle;
|
|
1612
|
-
document.querySelector('meta[name="description"]').setAttribute('content', meta.shareSummary);
|
|
1613
|
-
document.querySelector('meta[name="keywords"]').setAttribute('content', meta.shareKeywords);
|
|
1614
|
-
document.querySelector('meta[property="og:url"]').setAttribute('content', meta.shareUrl);
|
|
1615
|
-
document.querySelector('meta[property="og:title"]').setAttribute('content', meta.shareTitle);
|
|
1616
|
-
document.querySelector('meta[property="og:site_name"]').setAttribute('content', meta.shareVia);
|
|
1617
|
-
document.querySelector('meta[property="og:description"]').setAttribute('content', meta.shareSummary);
|
|
1618
|
-
document.querySelector('meta[name="twitter:title"]').setAttribute('content', meta.shareTitle);
|
|
1619
|
-
document.querySelector('meta[name="twitter:image"]').setAttribute('content', meta.shareImage);
|
|
1620
|
-
document.querySelector('meta[name="twitter:site"]').setAttribute('content', meta.shareVia);
|
|
1621
|
-
document.querySelector('meta[name="twitter:description"]').setAttribute('content', meta.shareSummary);
|
|
1622
|
-
document.querySelector('link[rel="canonical"]').setAttribute('href', meta.shareUrl);
|
|
1623
|
-
};
|
|
1624
|
-
|
|
1625
|
-
var onChangeArticle = function onChangeArticle(path, visibility, meta) {
|
|
1626
|
-
var currentPath = window && window.location && window.location.pathname ? window.location.pathname.replace('/view/', '') : '';
|
|
1627
|
-
var newPath = '/view/' + path;
|
|
1628
|
-
|
|
1629
|
-
// Change URL and do other changes
|
|
1630
|
-
var doChanges = function doChanges() {
|
|
1631
|
-
window.history.pushState({ page: path }, meta.shareTitle, newPath);
|
|
1632
|
-
changeMeta(meta);
|
|
1633
|
-
if (props.setCustomDimensions) {
|
|
1634
|
-
var activeArticle = queueData.find(function (item) {
|
|
1635
|
-
return item.url.current === path;
|
|
1636
|
-
});
|
|
1637
|
-
props.setCustomDimensions(activeArticle, '200', prevUrl);
|
|
1638
|
-
}
|
|
1639
|
-
if (props.pageview) props.pageview(newPath);
|
|
1640
|
-
refreshAD(path);
|
|
1641
|
-
};
|
|
1642
|
-
|
|
1643
|
-
if (currentPath !== path) {
|
|
1644
|
-
if (isScrollDown) {
|
|
1645
|
-
if (visibility === 'top') {
|
|
1646
|
-
doChanges();
|
|
1647
|
-
}
|
|
1648
|
-
} else {
|
|
1649
|
-
if (visibility === 'bottom') {
|
|
1650
|
-
doChanges();
|
|
1651
|
-
}
|
|
1652
|
-
}
|
|
1653
|
-
if (visibility === 'small-top') {
|
|
1654
|
-
doChanges();
|
|
1655
|
-
}
|
|
1656
|
-
}
|
|
1657
|
-
};
|
|
1658
|
-
|
|
1659
|
-
return React__default.createElement(
|
|
1660
|
-
InfiniteScroll,
|
|
1661
|
-
{ dataLength: queueData.length, next: loadmore, scrollThreshold: '60%', hasMore: true, style: { overflow: 'hidden' } },
|
|
1662
|
-
queueData.map(function (article, index) {
|
|
1663
|
-
if (!checkSponseredArticle(article) && Ads.getVideoContextualAD) {
|
|
1664
|
-
article.contextualVideoAD = Ads.getVideoContextualAD(getTargeting(article, 'in-context_video'));
|
|
1665
|
-
}
|
|
1666
|
-
if (!checkSponseredArticle(article) && Ads.getNativeContextualAD) {
|
|
1667
|
-
article.contextualAD = Ads.getNativeContextualAD(getTargeting(article, 'native-ad'));
|
|
1668
|
-
}
|
|
1669
|
-
return React__default.createElement(Article, _extends({
|
|
1670
|
-
key: index
|
|
1671
|
-
}, props, {
|
|
1672
|
-
onChangeArticle: onChangeArticle,
|
|
1673
|
-
authorPrfix: authorPrefix,
|
|
1674
|
-
article: article,
|
|
1675
|
-
cpModificationRequired: cpModificationRequired,
|
|
1676
|
-
queueData: queueData
|
|
1677
|
-
// Passing 'getTargeting' so that contextual AD can fetch target based on current active article.
|
|
1678
|
-
, getTargeting: getTargeting
|
|
1679
|
-
}));
|
|
1680
|
-
})
|
|
1681
|
-
);
|
|
1682
|
-
};
|
|
1683
|
-
|
|
1684
|
-
export default ArticleQueue;
|