@mjhls/mjh-framework 1.0.720-navigation-scroll-fix-v1 → 1.0.720-navigation-scroll-fix-v3

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.
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
3
+ require('./_commonjsHelpers-06173234.js');
4
4
  require('./_to-object-329a650b.js');
5
5
  require('./es6.string.iterator-cc0bbaa4.js');
6
6
  require('./_library-dd23b178.js');
@@ -9,420 +9,9 @@ require('./core.get-iterator-method-f62321d4.js');
9
9
  require('./web.dom.iterable-a0e279c1.js');
10
10
  var asyncToGenerator = require('./asyncToGenerator-533d476a.js');
11
11
  require('./_set-species-f92c67c5.js');
12
- var index$5 = require('./index-bd6c9f56.js');
12
+ var nookies = require('nookies');
13
13
  var getQuery = require('./getQuery.js');
14
14
 
15
- var defaultParseOptions = {
16
- decodeValues: true,
17
- map: false,
18
- silent: false,
19
- };
20
-
21
- function isNonEmptyString(str) {
22
- return typeof str === "string" && !!str.trim();
23
- }
24
-
25
- function parseString(setCookieValue, options) {
26
- var parts = setCookieValue.split(";").filter(isNonEmptyString);
27
- var nameValue = parts.shift().split("=");
28
- var name = nameValue.shift();
29
- var value = nameValue.join("="); // everything after the first =, joined by a "=" if there was more than one part
30
-
31
- options = options
32
- ? Object.assign({}, defaultParseOptions, options)
33
- : defaultParseOptions;
34
-
35
- try {
36
- value = options.decodeValues ? decodeURIComponent(value) : value; // decode cookie value
37
- } catch (e) {
38
- console.error(
39
- `set-cookie-parser encountered an error while decoding a cookie with value '${value}'. Set options.decodeValues to false to disable this feature.`,
40
- e
41
- );
42
- }
43
-
44
- var cookie = {
45
- name: name, // grab everything before the first =
46
- value: value,
47
- };
48
-
49
- parts.forEach(function (part) {
50
- var sides = part.split("=");
51
- var key = sides.shift().trimLeft().toLowerCase();
52
- var value = sides.join("=");
53
- if (key === "expires") {
54
- cookie.expires = new Date(value);
55
- } else if (key === "max-age") {
56
- cookie.maxAge = parseInt(value, 10);
57
- } else if (key === "secure") {
58
- cookie.secure = true;
59
- } else if (key === "httponly") {
60
- cookie.httpOnly = true;
61
- } else if (key === "samesite") {
62
- cookie.sameSite = value;
63
- } else {
64
- cookie[key] = value;
65
- }
66
- });
67
-
68
- return cookie;
69
- }
70
-
71
- function parse(input, options) {
72
- options = options
73
- ? Object.assign({}, defaultParseOptions, options)
74
- : defaultParseOptions;
75
-
76
- if (!input) {
77
- if (!options.map) {
78
- return [];
79
- } else {
80
- return {};
81
- }
82
- }
83
-
84
- if (input.headers && input.headers["set-cookie"]) {
85
- // fast-path for node.js (which automatically normalizes header names to lower-case
86
- input = input.headers["set-cookie"];
87
- } else if (input.headers) {
88
- // slow-path for other environments - see #25
89
- var sch =
90
- input.headers[
91
- Object.keys(input.headers).find(function (key) {
92
- return key.toLowerCase() === "set-cookie";
93
- })
94
- ];
95
- // warn if called on a request-like object with a cookie header rather than a set-cookie header - see #34, 36
96
- if (!sch && input.headers.cookie && !options.silent) {
97
- console.warn(
98
- "Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."
99
- );
100
- }
101
- input = sch;
102
- }
103
- if (!Array.isArray(input)) {
104
- input = [input];
105
- }
106
-
107
- options = options
108
- ? Object.assign({}, defaultParseOptions, options)
109
- : defaultParseOptions;
110
-
111
- if (!options.map) {
112
- return input.filter(isNonEmptyString).map(function (str) {
113
- return parseString(str, options);
114
- });
115
- } else {
116
- var cookies = {};
117
- return input.filter(isNonEmptyString).reduce(function (cookies, str) {
118
- var cookie = parseString(str, options);
119
- cookies[cookie.name] = cookie;
120
- return cookies;
121
- }, cookies);
122
- }
123
- }
124
-
125
- /*
126
- Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas
127
- that are within a single set-cookie field-value, such as in the Expires portion.
128
-
129
- This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2
130
- Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128
131
- React Native's fetch does this for *every* header, including set-cookie.
132
-
133
- Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25
134
- Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation
135
- */
136
- function splitCookiesString(cookiesString) {
137
- if (Array.isArray(cookiesString)) {
138
- return cookiesString;
139
- }
140
- if (typeof cookiesString !== "string") {
141
- return [];
142
- }
143
-
144
- var cookiesStrings = [];
145
- var pos = 0;
146
- var start;
147
- var ch;
148
- var lastComma;
149
- var nextStart;
150
- var cookiesSeparatorFound;
151
-
152
- function skipWhitespace() {
153
- while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) {
154
- pos += 1;
155
- }
156
- return pos < cookiesString.length;
157
- }
158
-
159
- function notSpecialChar() {
160
- ch = cookiesString.charAt(pos);
161
-
162
- return ch !== "=" && ch !== ";" && ch !== ",";
163
- }
164
-
165
- while (pos < cookiesString.length) {
166
- start = pos;
167
- cookiesSeparatorFound = false;
168
-
169
- while (skipWhitespace()) {
170
- ch = cookiesString.charAt(pos);
171
- if (ch === ",") {
172
- // ',' is a cookie separator if we have later first '=', not ';' or ','
173
- lastComma = pos;
174
- pos += 1;
175
-
176
- skipWhitespace();
177
- nextStart = pos;
178
-
179
- while (pos < cookiesString.length && notSpecialChar()) {
180
- pos += 1;
181
- }
182
-
183
- // currently special character
184
- if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") {
185
- // we found cookies separator
186
- cookiesSeparatorFound = true;
187
- // pos is inside the next cookie, so back up and return it.
188
- pos = nextStart;
189
- cookiesStrings.push(cookiesString.substring(start, lastComma));
190
- start = pos;
191
- } else {
192
- // in param ',' or param separator ';',
193
- // we continue from that comma
194
- pos = lastComma + 1;
195
- }
196
- } else {
197
- pos += 1;
198
- }
199
- }
200
-
201
- if (!cookiesSeparatorFound || pos >= cookiesString.length) {
202
- cookiesStrings.push(cookiesString.substring(start, cookiesString.length));
203
- }
204
- }
205
-
206
- return cookiesStrings;
207
- }
208
-
209
- var setCookie = parse;
210
- var parse_1 = parse;
211
- var parseString_1 = parseString;
212
- var splitCookiesString_1 = splitCookiesString;
213
- setCookie.parse = parse_1;
214
- setCookie.parseString = parseString_1;
215
- setCookie.splitCookiesString = splitCookiesString_1;
216
-
217
- var utils = _commonjsHelpers.createCommonjsModule(function (module, exports) {
218
- var __assign = (_commonjsHelpers.commonjsGlobal && _commonjsHelpers.commonjsGlobal.__assign) || function () {
219
- __assign = Object.assign || function(t) {
220
- for (var s, i = 1, n = arguments.length; i < n; i++) {
221
- s = arguments[i];
222
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
223
- t[p] = s[p];
224
- }
225
- return t;
226
- };
227
- return __assign.apply(this, arguments);
228
- };
229
- Object.defineProperty(exports, "__esModule", { value: true });
230
- exports.areCookiesEqual = exports.hasSameProperties = exports.createCookie = exports.isBrowser = void 0;
231
- /**
232
- * Tells whether we are in a browser or server.
233
- */
234
- function isBrowser() {
235
- return typeof window !== 'undefined';
236
- }
237
- exports.isBrowser = isBrowser;
238
- /**
239
- * Create an instance of the Cookie interface
240
- */
241
- function createCookie(name, value, options) {
242
- var sameSite = options.sameSite;
243
- if (sameSite === true) {
244
- sameSite = 'strict';
245
- }
246
- if (sameSite === undefined || sameSite === false) {
247
- sameSite = 'lax';
248
- }
249
- var cookieToSet = __assign(__assign({}, options), { sameSite: sameSite });
250
- delete cookieToSet.encode;
251
- return __assign({ name: name, value: value }, cookieToSet);
252
- }
253
- exports.createCookie = createCookie;
254
- /**
255
- * Tells whether given objects have the same properties.
256
- */
257
- function hasSameProperties(a, b) {
258
- var aProps = Object.getOwnPropertyNames(a);
259
- var bProps = Object.getOwnPropertyNames(b);
260
- if (aProps.length !== bProps.length) {
261
- return false;
262
- }
263
- for (var i = 0; i < aProps.length; i++) {
264
- var propName = aProps[i];
265
- if (a[propName] !== b[propName]) {
266
- return false;
267
- }
268
- }
269
- return true;
270
- }
271
- exports.hasSameProperties = hasSameProperties;
272
- /**
273
- * Compare the cookie and return true if the cookies have equivalent
274
- * options and the cookies would be overwritten in the browser storage.
275
- *
276
- * @param a first Cookie for comparison
277
- * @param b second Cookie for comparison
278
- */
279
- function areCookiesEqual(a, b) {
280
- var sameSiteSame = a.sameSite === b.sameSite;
281
- if (typeof a.sameSite === 'string' && typeof b.sameSite === 'string') {
282
- sameSiteSame = a.sameSite.toLowerCase() === b.sameSite.toLowerCase();
283
- }
284
- return (hasSameProperties(__assign(__assign({}, a), { sameSite: undefined }), __assign(__assign({}, b), { sameSite: undefined })) && sameSiteSame);
285
- }
286
- exports.areCookiesEqual = areCookiesEqual;
287
- /* Functions */
288
-
289
- });
290
-
291
- _commonjsHelpers.unwrapExports(utils);
292
- var utils_1 = utils.areCookiesEqual;
293
- var utils_2 = utils.hasSameProperties;
294
- var utils_3 = utils.createCookie;
295
- var utils_4 = utils.isBrowser;
296
-
297
- var dist = _commonjsHelpers.createCommonjsModule(function (module, exports) {
298
- var __assign = (_commonjsHelpers.commonjsGlobal && _commonjsHelpers.commonjsGlobal.__assign) || function () {
299
- __assign = Object.assign || function(t) {
300
- for (var s, i = 1, n = arguments.length; i < n; i++) {
301
- s = arguments[i];
302
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
303
- t[p] = s[p];
304
- }
305
- return t;
306
- };
307
- return __assign.apply(this, arguments);
308
- };
309
- Object.defineProperty(exports, "__esModule", { value: true });
310
- exports.destroyCookie = exports.setCookie = exports.parseCookies = void 0;
311
-
312
-
313
-
314
- /**
315
- * Parses cookies.
316
- *
317
- * @param ctx NextJS page or API context, express context, null or undefined.
318
- * @param options Options that we pass down to `cookie` library.
319
- */
320
- function parseCookies(ctx, options) {
321
- var _a, _b;
322
- if ((_b = (_a = ctx === null || ctx === void 0 ? void 0 : ctx.req) === null || _a === void 0 ? void 0 : _a.headers) === null || _b === void 0 ? void 0 : _b.cookie) {
323
- return index$5.cookie.parse(ctx.req.headers.cookie, options);
324
- }
325
- if (utils.isBrowser()) {
326
- return index$5.cookie.parse(document.cookie, options);
327
- }
328
- return {};
329
- }
330
- exports.parseCookies = parseCookies;
331
- /**
332
- * Sets a cookie.
333
- *
334
- * @param ctx NextJS page or API context, express context, null or undefined.
335
- * @param name The name of your cookie.
336
- * @param value The value of your cookie.
337
- * @param options Options that we pass down to `cookie` library.
338
- */
339
- function setCookie$1(ctx, name, value, options) {
340
- var _a, _b;
341
- if (options === void 0) { options = {}; }
342
- // SSR
343
- if (((_a = ctx === null || ctx === void 0 ? void 0 : ctx.res) === null || _a === void 0 ? void 0 : _a.getHeader) && ctx.res.setHeader) {
344
- // Check if response has finished and warn about it.
345
- if ((_b = ctx === null || ctx === void 0 ? void 0 : ctx.res) === null || _b === void 0 ? void 0 : _b.finished) {
346
- console.warn("Not setting \"" + name + "\" cookie. Response has finished.");
347
- console.warn("You should set cookie before res.send()");
348
- return {};
349
- }
350
- /**
351
- * Load existing cookies from the header and parse them.
352
- */
353
- var cookies = ctx.res.getHeader('Set-Cookie') || [];
354
- if (typeof cookies === 'string')
355
- cookies = [cookies];
356
- if (typeof cookies === 'number')
357
- cookies = [];
358
- /**
359
- * Parse cookies but ignore values - we've already encoded
360
- * them in the previous call.
361
- */
362
- var parsedCookies = setCookie.parse(cookies, {
363
- decodeValues: false,
364
- });
365
- /**
366
- * We create the new cookie and make sure that none of
367
- * the existing cookies match it.
368
- */
369
- var newCookie_1 = utils.createCookie(name, value, options);
370
- var cookiesToSet_1 = [];
371
- parsedCookies.forEach(function (parsedCookie) {
372
- if (!utils.areCookiesEqual(parsedCookie, newCookie_1)) {
373
- /**
374
- * We serialize the cookie back to the original format
375
- * if it isn't the same as the new one.
376
- */
377
- var serializedCookie = index$5.cookie.serialize(parsedCookie.name, parsedCookie.value, __assign({
378
- // we prevent reencoding by default, but you might override it
379
- encode: function (val) { return val; } }, parsedCookie));
380
- cookiesToSet_1.push(serializedCookie);
381
- }
382
- });
383
- cookiesToSet_1.push(index$5.cookie.serialize(name, value, options));
384
- // Update the header.
385
- ctx.res.setHeader('Set-Cookie', cookiesToSet_1);
386
- }
387
- // Browser
388
- if (utils.isBrowser()) {
389
- if (options && options.httpOnly) {
390
- throw new Error('Can not set a httpOnly cookie in the browser.');
391
- }
392
- document.cookie = index$5.cookie.serialize(name, value, options);
393
- }
394
- return {};
395
- }
396
- exports.setCookie = setCookie$1;
397
- /**
398
- * Destroys a cookie with a particular name.
399
- *
400
- * @param ctx NextJS page or API context, express context, null or undefined.
401
- * @param name Cookie name.
402
- * @param options Options that we pass down to `cookie` library.
403
- */
404
- function destroyCookie(ctx, name, options) {
405
- /**
406
- * We forward the request destroy to setCookie function
407
- * as it is the same function with modified maxAge value.
408
- */
409
- return setCookie$1(ctx, name, '', __assign(__assign({}, (options || {})), { maxAge: -1 }));
410
- }
411
- exports.destroyCookie = destroyCookie;
412
- /* Utility Exports */
413
- exports.default = {
414
- set: setCookie$1,
415
- get: parseCookies,
416
- destroy: destroyCookie,
417
- };
418
-
419
- });
420
-
421
- _commonjsHelpers.unwrapExports(dist);
422
- var dist_1 = dist.destroyCookie;
423
- var dist_2 = dist.setCookie;
424
- var dist_3 = dist.parseCookies;
425
-
426
15
  var _this = undefined;
427
16
 
428
17
  var getRelatedArticle = function () {
@@ -499,13 +88,13 @@ var getRelatedArticle = function () {
499
88
 
500
89
 
501
90
  if (ctx && url) {
502
- cookies = dist_3(ctx);
91
+ cookies = nookies.parseCookies(ctx);
503
92
  prevSlugs = cookies['prevSlugs'];
504
93
 
505
94
  if (!!prevSlugs) {
506
- dist_2(ctx, 'prevSlugs', prevSlugs + ',"' + url + '"', {});
95
+ nookies.setCookie(ctx, 'prevSlugs', prevSlugs + ',"' + url + '"', {});
507
96
  filters = '&& !(url.current in [' + prevSlugs + '])';
508
- } else dist_2(ctx, 'prevSlugs', '"' + url + '"', {});
97
+ } else nookies.setCookie(ctx, 'prevSlugs', '"' + url + '"', {});
509
98
  }
510
99
 
511
100
  query = getQuery('related', filters, '', articleCount).replace('&& taxonomyMapping[]._ref in $taxonomy', '');
package/dist/cjs/index.js CHANGED
@@ -165,9 +165,9 @@ var ConferenceArticleCard = require('./ConferenceArticleCard.js');
165
165
  var KMTracker = require('./KMTracker.js');
166
166
  var getSeriesDetail = require('./getSeriesDetail.js');
167
167
  var SetCookie = require('./SetCookie.js');
168
- require('./index-bd6c9f56.js');
169
- var getRelatedArticle = require('./getRelatedArticle.js');
168
+ require('nookies');
170
169
  var getQuery = require('./getQuery.js');
170
+ var getRelatedArticle = require('./getRelatedArticle.js');
171
171
  var Auth = require('./Auth.js');
172
172
  require('swr');
173
173
  require('passport-local');
@@ -265,8 +265,8 @@ exports.ConferenceArticleCard = ConferenceArticleCard;
265
265
  exports.KMTracker = KMTracker;
266
266
  exports.getSeriesDetail = getSeriesDetail;
267
267
  exports.SetCookie = SetCookie;
268
- exports.getRelatedArticle = getRelatedArticle;
269
268
  exports.getQuery = getQuery;
269
+ exports.getRelatedArticle = getRelatedArticle;
270
270
  exports.Auth = Auth.default;
271
271
  exports.getTargeting = getTargeting.getTargeting;
272
272
  exports.View = View;
package/dist/esm/Auth.js CHANGED
@@ -15,7 +15,6 @@ import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-502
15
15
  import './_set-species-3f8319f5.js';
16
16
  import { Col, Form, Button, Spinner } from 'react-bootstrap';
17
17
  import { u as util } from './util-7700fc59.js';
18
- import { s as serialize_1, p as parse_1 } from './index-db3bb315.js';
19
18
  import useSWR from 'swr';
20
19
  import Local from 'passport-local';
21
20
  import mysql from 'mysql';
@@ -1203,6 +1202,207 @@ var SignupForm$1 = function SignupForm(props) {
1203
1202
  );
1204
1203
  };
1205
1204
 
1205
+ /*!
1206
+ * cookie
1207
+ * Copyright(c) 2012-2014 Roman Shtylman
1208
+ * Copyright(c) 2015 Douglas Christopher Wilson
1209
+ * MIT Licensed
1210
+ */
1211
+
1212
+ /**
1213
+ * Module exports.
1214
+ * @public
1215
+ */
1216
+
1217
+ var parse_1 = parse;
1218
+ var serialize_1 = serialize;
1219
+
1220
+ /**
1221
+ * Module variables.
1222
+ * @private
1223
+ */
1224
+
1225
+ var decode = decodeURIComponent;
1226
+ var encode = encodeURIComponent;
1227
+ var pairSplitRegExp = /; */;
1228
+
1229
+ /**
1230
+ * RegExp to match field-content in RFC 7230 sec 3.2
1231
+ *
1232
+ * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
1233
+ * field-vchar = VCHAR / obs-text
1234
+ * obs-text = %x80-FF
1235
+ */
1236
+
1237
+ var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
1238
+
1239
+ /**
1240
+ * Parse a cookie header.
1241
+ *
1242
+ * Parse the given cookie header string into an object
1243
+ * The object has the various cookies as keys(names) => values
1244
+ *
1245
+ * @param {string} str
1246
+ * @param {object} [options]
1247
+ * @return {object}
1248
+ * @public
1249
+ */
1250
+
1251
+ function parse(str, options) {
1252
+ if (typeof str !== 'string') {
1253
+ throw new TypeError('argument str must be a string');
1254
+ }
1255
+
1256
+ var obj = {};
1257
+ var opt = options || {};
1258
+ var pairs = str.split(pairSplitRegExp);
1259
+ var dec = opt.decode || decode;
1260
+
1261
+ for (var i = 0; i < pairs.length; i++) {
1262
+ var pair = pairs[i];
1263
+ var eq_idx = pair.indexOf('=');
1264
+
1265
+ // skip things that don't look like key=value
1266
+ if (eq_idx < 0) {
1267
+ continue;
1268
+ }
1269
+
1270
+ var key = pair.substr(0, eq_idx).trim();
1271
+ var val = pair.substr(++eq_idx, pair.length).trim();
1272
+
1273
+ // quoted values
1274
+ if ('"' == val[0]) {
1275
+ val = val.slice(1, -1);
1276
+ }
1277
+
1278
+ // only assign once
1279
+ if (undefined == obj[key]) {
1280
+ obj[key] = tryDecode(val, dec);
1281
+ }
1282
+ }
1283
+
1284
+ return obj;
1285
+ }
1286
+
1287
+ /**
1288
+ * Serialize data into a cookie header.
1289
+ *
1290
+ * Serialize the a name value pair into a cookie string suitable for
1291
+ * http headers. An optional options object specified cookie parameters.
1292
+ *
1293
+ * serialize('foo', 'bar', { httpOnly: true })
1294
+ * => "foo=bar; httpOnly"
1295
+ *
1296
+ * @param {string} name
1297
+ * @param {string} val
1298
+ * @param {object} [options]
1299
+ * @return {string}
1300
+ * @public
1301
+ */
1302
+
1303
+ function serialize(name, val, options) {
1304
+ var opt = options || {};
1305
+ var enc = opt.encode || encode;
1306
+
1307
+ if (typeof enc !== 'function') {
1308
+ throw new TypeError('option encode is invalid');
1309
+ }
1310
+
1311
+ if (!fieldContentRegExp.test(name)) {
1312
+ throw new TypeError('argument name is invalid');
1313
+ }
1314
+
1315
+ var value = enc(val);
1316
+
1317
+ if (value && !fieldContentRegExp.test(value)) {
1318
+ throw new TypeError('argument val is invalid');
1319
+ }
1320
+
1321
+ var str = name + '=' + value;
1322
+
1323
+ if (null != opt.maxAge) {
1324
+ var maxAge = opt.maxAge - 0;
1325
+
1326
+ if (isNaN(maxAge) || !isFinite(maxAge)) {
1327
+ throw new TypeError('option maxAge is invalid')
1328
+ }
1329
+
1330
+ str += '; Max-Age=' + Math.floor(maxAge);
1331
+ }
1332
+
1333
+ if (opt.domain) {
1334
+ if (!fieldContentRegExp.test(opt.domain)) {
1335
+ throw new TypeError('option domain is invalid');
1336
+ }
1337
+
1338
+ str += '; Domain=' + opt.domain;
1339
+ }
1340
+
1341
+ if (opt.path) {
1342
+ if (!fieldContentRegExp.test(opt.path)) {
1343
+ throw new TypeError('option path is invalid');
1344
+ }
1345
+
1346
+ str += '; Path=' + opt.path;
1347
+ }
1348
+
1349
+ if (opt.expires) {
1350
+ if (typeof opt.expires.toUTCString !== 'function') {
1351
+ throw new TypeError('option expires is invalid');
1352
+ }
1353
+
1354
+ str += '; Expires=' + opt.expires.toUTCString();
1355
+ }
1356
+
1357
+ if (opt.httpOnly) {
1358
+ str += '; HttpOnly';
1359
+ }
1360
+
1361
+ if (opt.secure) {
1362
+ str += '; Secure';
1363
+ }
1364
+
1365
+ if (opt.sameSite) {
1366
+ var sameSite = typeof opt.sameSite === 'string'
1367
+ ? opt.sameSite.toLowerCase() : opt.sameSite;
1368
+
1369
+ switch (sameSite) {
1370
+ case true:
1371
+ str += '; SameSite=Strict';
1372
+ break;
1373
+ case 'lax':
1374
+ str += '; SameSite=Lax';
1375
+ break;
1376
+ case 'strict':
1377
+ str += '; SameSite=Strict';
1378
+ break;
1379
+ case 'none':
1380
+ str += '; SameSite=None';
1381
+ break;
1382
+ default:
1383
+ throw new TypeError('option sameSite is invalid');
1384
+ }
1385
+ }
1386
+
1387
+ return str;
1388
+ }
1389
+
1390
+ /**
1391
+ * Try decoding a string using a decoding function.
1392
+ *
1393
+ * @param {string} str
1394
+ * @param {function} decode
1395
+ * @private
1396
+ */
1397
+
1398
+ function tryDecode(str, decode) {
1399
+ try {
1400
+ return decode(str);
1401
+ } catch (e) {
1402
+ return str;
1403
+ }
1404
+ }
1405
+
1206
1406
  var TOKEN_NAME = 'token';
1207
1407
  var MAX_AGE = 60 * 60 * 8; // 8 hours
1208
1408
 
@@ -175,6 +175,7 @@ var HamMagazine = function HamMagazine(props) {
175
175
  setIsSticky(true);
176
176
  navLinks.style.margin = 'auto';
177
177
  } else {
178
+ console.log('setIsSticky:::::::::', navRef.current.style, topNavRef.current.style);
178
179
  if (navRef.current && navRef.current.style) {
179
180
  topNavRef.current.style.paddingBottom = '0';
180
181
  navRef.current.style.position = 'relative';
package/dist/esm/View.js CHANGED
@@ -58,9 +58,9 @@ import { _ as _Object$keys } from './keys-8eda7a5c.js';
58
58
  import 'react-bootstrap/Dropdown';
59
59
  import { b as FaMinus, c as FaPlus } from './index.esm-cf08bf18.js';
60
60
  import getSeriesDetail from './getSeriesDetail.js';
61
- import './index-db3bb315.js';
62
- import getRelatedArticle from './getRelatedArticle.js';
61
+ import 'nookies';
63
62
  import getQuery from './getQuery.js';
63
+ import getRelatedArticle from './getRelatedArticle.js';
64
64
  import { g as getTargeting, a as getContentPlacementUrl } from './getTargeting-7211f12c.js';
65
65
  import getKeywords from './getKeywords.js';
66
66
  import urlFor from './urlFor.js';