govuk_publishing_components 24.14.1 → 24.16.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0f4046fe3e64f043704bbc8da98b2a38f54c6bb854f05733322b4c32513ab12a
4
- data.tar.gz: 814b350fc60058c20e4ff7dc83cd994e80843e5e1c0a4dcbd76e3dda50a6a41a
3
+ metadata.gz: cc64aa48acc71125216afe25824ed3485ff692ac532767146857f7912d43f093
4
+ data.tar.gz: 55a101e61f5c175f9a8ec9f7aa04dcca8a10dac3ba54bd67fc9a3d08f795b9fd
5
5
  SHA512:
6
- metadata.gz: 5a5283a68af388d240fafd32499c0a076c7d4b284e9eee9b676ab6ef4f67415c249d6b7d77c180fd17cf570cf90e5e0780e4a05b8ff49bf6b80e0103cb4a5437
7
- data.tar.gz: 3d73908921bcea616b99b747facaa2e864fe7d4db8c7d1bf5636d9971b204fac2bd72f52cffe0ce6e54ac09ab4e98ca3206b458c913673328a878eaf9a289d40
6
+ metadata.gz: e146ccf4c14104f6c3cca199a534759710d4b7a9531defe1a2c980688cbafeb6441e24b5150ccb3e685e933b88ccef1cdfdfd195700734738fecd84d4761d1d8
7
+ data.tar.gz: d4699530f876b4d51079ef77a4ad5fa2875e8bedfb9ff04fc3d5e96dcc7ebde09211b623ce76071a45ed13df9ece0dcb0fe59d49e595207ecbab10cb89439c24
@@ -1,5 +1,5 @@
1
1
  <svg width="23" height="23" viewBox="0 0 23 23" fill="none" xmlns="http://www.w3.org/2000/svg">
2
2
  <circle cx="11.5" cy="11.5" r="11.5" fill="#272828"/>
3
- <path fill-rule="evenodd" clip-rule="evenodd" d="M14.9429 11.7949L10.4402 7.29222L11.7327 5.99967L17.528 11.7949L11.7327 17.5902L10.4402 16.2976L14.9429 11.7949Z" fill="#fff500"/>
4
- <path fill-rule="evenodd" clip-rule="evenodd" d="M3.95631 10.881L15.4414 10.881L15.4414 12.709L3.95631 12.709L3.95631 10.881Z" fill="#fff500"/>
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M14.9429 11.7949L10.4402 7.29222L11.7327 5.99967L17.528 11.7949L11.7327 17.5902L10.4402 16.2976L14.9429 11.7949Z" fill="#ffffff"/>
4
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M3.95631 10.881L15.4414 10.881L15.4414 12.709L3.95631 12.709L3.95631 10.881Z" fill="#ffffff"/>
5
5
  </svg>
@@ -198,6 +198,27 @@
198
198
  ['Heading', 'Rules to follow'],
199
199
  ['Heading', 'Good to know'],
200
200
  ['Heading', 'Change your answers']
201
+ ],
202
+ '/guidance/brexit-guidance-for-businesses': [
203
+ ['Percent', 20],
204
+ ['Percent', 40],
205
+ ['Percent', 60],
206
+ ['Percent', 80],
207
+ ['Percent', 100]
208
+ ],
209
+ '/guidance/brexit-guidance-for-individuals-and-families': [
210
+ ['Percent', 20],
211
+ ['Percent', 40],
212
+ ['Percent', 60],
213
+ ['Percent', 80],
214
+ ['Percent', 100]
215
+ ],
216
+ '/guidance/import-and-export-goods-using-preference-agreements': [
217
+ ['Percent', 20],
218
+ ['Percent', 40],
219
+ ['Percent', 60],
220
+ ['Percent', 80],
221
+ ['Percent', 100]
201
222
  ]
202
223
  }
203
224
 
@@ -47,3 +47,23 @@
47
47
  }
48
48
  }
49
49
  }).call(this)
50
+
51
+ ;(function () {
52
+ var $menuToggleButtons = document.querySelectorAll('.govuk-js-header-toggle')
53
+
54
+ for (var j = 0; j < $menuToggleButtons.length; j++) {
55
+ var element = $menuToggleButtons[j]
56
+
57
+ element.addEventListener('click', function (event) {
58
+ var expanded = event.target.getAttribute('aria-expanded')
59
+
60
+ if (window.GOVUK.analytics && window.GOVUK.analytics.trackEvent) {
61
+ if (expanded === 'true') {
62
+ window.GOVUK.analytics.trackEvent('headerClicked', 'menuClosed', { label: 'none' })
63
+ } else {
64
+ window.GOVUK.analytics.trackEvent('headerClicked', 'menuOpened', { label: 'none' })
65
+ }
66
+ }
67
+ })
68
+ }
69
+ })()
@@ -8,827 +8,999 @@
8
8
  */
9
9
 
10
10
 
11
- /* ! Remember to keep the settings at the end of this file when updating LUX.
11
+ /* ! Remember to keep these settings at the end of this file when updating LUX:
12
12
  *
13
- * The settings are:
14
13
  * * `LUX.customerid = 47044334` to let LUX know who this is
15
14
  * * `LUX.beaconMode = "simple"` to fire the beacon as an image, which is now
16
15
  * allowed by the content security policy.
17
16
  * * `LUX.debug = false` turns debugging on and off. Left set to false - and
18
17
  * kept in the file so it's easier to remember that this can be turned on.
18
+ *
19
+ * ! And the sample rate needs to be set inside the main function that's
20
+ * assigned to `LUX`:
21
+
22
+ * * `LUX.samplerate = 1` to set sample rate to 1% of users.
19
23
  */
20
24
 
21
25
  var LUX_t_start = Date.now(),
22
26
  LUX = window.LUX || {};
23
- LUX = function() {
24
- var gaLog = [];
25
- dlog("lux.js evaluation start.");
26
- var version = "214",
27
- _errorUrl = "https://lux.speedcurve.com/error/",
28
- nErrors = 0,
29
- maxErrors = 5;
30
-
31
- function errorHandler(e) {
32
- nErrors++, e && void 0 !== e.filename && void 0 !== e.message && (-1 !== e.filename.indexOf("/lux.js?") || -1 !== e.message.indexOf("LUX") || nErrors <= maxErrors && "function" == typeof _sample && _sample()) && ((new Image).src = _errorUrl + "?v=" + version + "&id=" + getCustomerId() + "&fn=" + encodeURIComponent(e.filename) + "&ln=" + e.lineno + "&cn=" + e.colno + "&msg=" + encodeURIComponent(e.message) + "&l=" + encodeURIComponent(_getPageLabel()) + (connectionType() ? "&ct=" + connectionType() : ""))
33
- }
34
- window.addEventListener("error", errorHandler);
35
- var gaPerfEntries = "object" == typeof window.LUX_al ? window.LUX_al.slice() : [];
27
+ LUX = (function () {
28
+ // -------------------------------------------------------------------------
29
+ // Settings
30
+ // -------------------------------------------------------------------------
31
+ // Set the sample rate to 1% to avoid all events being sent.
32
+ LUX.samplerate = 1
33
+ // -------------------------------------------------------------------------
34
+ /// End
35
+ // -------------------------------------------------------------------------
36
+
37
+ var e = [];
38
+ pe("lux.js evaluation start.");
39
+ var t = "216",
40
+ n = 0;
41
+ function r(e) {
42
+ n++,
43
+ e &&
44
+ void 0 !== e.filename &&
45
+ void 0 !== e.message &&
46
+ (-1 !== e.filename.indexOf("/lux.js?") ||
47
+ -1 !== e.message.indexOf("LUX") ||
48
+ (n <= 5 && W())) &&
49
+ (new Image().src =
50
+ "https://lux.speedcurve.com/error/?v=216&id=" +
51
+ J() +
52
+ "&fn=" +
53
+ encodeURIComponent(e.filename) +
54
+ "&ln=" +
55
+ e.lineno +
56
+ "&cn=" +
57
+ e.colno +
58
+ "&msg=" +
59
+ encodeURIComponent(e.message) +
60
+ "&l=" +
61
+ encodeURIComponent(ge()) +
62
+ (V() ? "&ct=" + V() : ""));
63
+ }
64
+ window.addEventListener("error", r);
65
+ var i = ("object" == typeof window.LUX_al ? window.LUX_al : []).slice();
36
66
  if ("function" == typeof PerformanceObserver) {
37
- var perfObserver = new PerformanceObserver((function(e) {
38
- e.getEntries().forEach((function(e) {
39
- gaPerfEntries.push(e)
40
- }))
67
+ var a = new PerformanceObserver(function (e) {
68
+ e.getEntries().forEach(function (e) {
69
+ ("longtask" === e.entryType && -1 !== i.indexOf(e)) || i.push(e);
70
+ });
71
+ });
72
+ try {
73
+ "function" == typeof PerformanceLongTaskTiming &&
74
+ a.observe({ type: "longtask", buffered: !0 }),
75
+ "function" == typeof LargestContentfulPaint &&
76
+ a.observe({ type: "largest-contentful-paint", buffered: !0 }),
77
+ "function" == typeof PerformanceElementTiming &&
78
+ a.observe({ type: "element", buffered: !0 }),
79
+ "function" == typeof PerformancePaintTiming && a.observe({ type: "paint", buffered: !0 }),
80
+ "function" == typeof LayoutShift && a.observe({ type: "layout-shift", buffered: !0 });
81
+ } catch (e) {
82
+ pe("Long Tasks error.");
83
+ }
84
+ } else pe("Long Tasks not supported.");
85
+ var o,
86
+ s = 0,
87
+ u = void 0 !== LUX.gaMarks ? LUX.gaMarks : [],
88
+ c = void 0 !== LUX.gaMeasures ? LUX.gaMeasures : [],
89
+ d = {},
90
+ f = {},
91
+ m = 0,
92
+ l = 0,
93
+ v = 0,
94
+ g = 0,
95
+ p = 1,
96
+ h = "LUX_start",
97
+ y = "LUX_end",
98
+ E = me(),
99
+ T = le(E),
100
+ L = window.performance,
101
+ b = 2e3,
102
+ w = void 0 !== LUX.beaconMode ? LUX.beaconMode : "autoupdate",
103
+ U = void 0 !== LUX.beaconUrl ? LUX.beaconUrl : "https://lux.speedcurve.com/lux/",
104
+ X = void 0 !== LUX.samplerate ? LUX.samplerate : 100;
105
+ pe(
106
+ "Sample rate = " +
107
+ X +
108
+ "%. " +
109
+ (W()
110
+ ? "This session IS being sampled."
111
+ : "This session is NOT being sampled. The data will NOT show up in your LUX dashboards. Call LUX.forceSample() and try again.")
112
+ );
113
+ var S,
114
+ k = void 0 === LUX.auto || LUX.auto,
115
+ M = LUX.ns ? LUX.ns : Date.now ? Date.now() : +new Date(),
116
+ B = 0;
117
+ L && L.timing && L.timing.navigationStart
118
+ ? ((M = L.timing.navigationStart), (B = LUX.ns ? LUX.ns - M : 0))
119
+ : (pe("Nav Timing is not supported."), (s |= 2));
120
+ var N = ["click", "mousedown", "keydown", "touchstart", "pointerdown"],
121
+ x = { passive: !0, capture: !0 };
122
+ function C(e) {
123
+ S ||
124
+ ((S = Math.round(e)),
125
+ N.forEach(function (e) {
126
+ removeEventListener(e, I, x);
41
127
  }));
42
- try {
43
- "function" == typeof PerformanceLongTaskTiming && perfObserver.observe({
44
- type: "longtask"
45
- }), "function" == typeof LargestContentfulPaint && perfObserver.observe({
46
- type: "largest-contentful-paint",
47
- buffered: !0
48
- }), "function" == typeof PerformanceElementTiming && perfObserver.observe({
49
- type: "element",
50
- buffered: !0
51
- }), "function" == typeof PerformancePaintTiming && perfObserver.observe({
52
- type: "paint",
53
- buffered: !0
54
- }), "function" == typeof LayoutShift && perfObserver.observe({
55
- type: "layout-shift",
56
- buffered: !0
57
- })
58
- } catch (e) {
59
- dlog("Long Tasks error.")
60
- }
61
- } else dlog("Long Tasks not supported.");
62
- var gFlags = 0,
63
- gFlag_InitCalled = 1,
64
- gFlag_NoNavTiming = 2,
65
- gFlag_NoUserTiming = 4,
66
- gFlag_NotVisible = 8,
67
- gaMarks = void 0 !== LUX.gaMarks ? LUX.gaMarks : [],
68
- gaMeasures = void 0 !== LUX.gaMeasures ? LUX.gaMeasures : [],
69
- ghIx = {},
70
- ghData = {},
71
- gbLuxSent = 0,
72
- gbNavSent = 0,
73
- gbIxSent = 0,
74
- gbUpdated = 0,
75
- gbFirstPV = 1,
76
- gStartMark = "LUX_start",
77
- gEndMark = "LUX_end",
78
- gSessionTimeout = 1800,
79
- gSyncId = createSyncId(),
80
- gUid = refreshUniqueId(gSyncId),
81
- gCustomerDataTimeout, perf = window.performance,
82
- gMaxQuerystring = 2e3,
83
- _beaconUrl = void 0 !== LUX.beaconUrl ? LUX.beaconUrl : "https://lux.speedcurve.com/lux/",
84
- _samplerate = void 0 !== LUX.samplerate ? LUX.samplerate : 100;
85
- dlog("Sample rate = " + _samplerate + "%. " + (_sample() ? "This session IS being sampled." : "This session is NOT being sampled. The data will NOT show up in your LUX dashboards. Call LUX.forceSample() and try again."));
86
- var _auto = void 0 === LUX.auto || LUX.auto,
87
- _navigationStart = LUX.ns ? LUX.ns : Date.now ? Date.now() : +new Date,
88
- gLuxSnippetStart = 0,
89
- gFirstInputDelay;
90
- perf && perf.timing && perf.timing.navigationStart ? (_navigationStart = perf.timing.navigationStart, gLuxSnippetStart = LUX.ns ? LUX.ns - _navigationStart : 0) : (dlog("Nav Timing is not supported."), gFlags |= gFlag_NoNavTiming);
91
- var gaEventTypes = ["click", "mousedown", "keydown", "touchstart", "pointerdown"],
92
- ghListenerOptions = {
93
- passive: !0,
94
- capture: !0
95
- };
96
-
97
- function recordDelay(e) {
98
- gFirstInputDelay || (gFirstInputDelay = Math.round(e), gaEventTypes.forEach((function(e) {
99
- removeEventListener(e, onInput, ghListenerOptions)
100
- })))
101
- }
102
-
103
- function onPointerDown(e, t) {
104
- function n() {
105
- recordDelay(e, t), a()
106
- }
107
-
108
- function r() {
109
- a()
110
- }
111
-
112
- function a() {
113
- window.removeEventListener("pointerup", n, ghListenerOptions), window.removeEventListener("pointercancel", r, ghListenerOptions)
114
- }
115
- window.addEventListener("pointerup", n, ghListenerOptions), window.addEventListener("pointercancel", r, ghListenerOptions)
116
- }
117
-
118
- function onInput(e) {
119
- var t = !1;
120
- try {
121
- t = e.cancelable
122
- } catch (e) {
123
- return void dlog("Permission error accessing input event.")
124
- }
125
- if (t) {
126
- var n = _now(!0),
127
- r = e.timeStamp;
128
- if (r > 152e7 && (n = Number(new Date)), r > n) return;
129
- var a = n - r;
130
- "pointerdown" == e.type ? onPointerDown(a, e) : recordDelay(a, e)
131
- }
132
- }
133
-
134
- function _now(e) {
135
- var t = (Date.now ? Date.now() : +new Date) - _navigationStart,
136
- n = _getMark(gStartMark);
137
- return n && !e ? t - n.startTime : perf && perf.now ? perf.now() : t
138
- }
139
-
140
- function _mark(e) {
141
- if (dlog("Enter LUX.mark(), name = " + e), perf) {
142
- if (perf.mark) return perf.mark(e);
143
- if (perf.webkitMark) return perf.webkitMark(e)
144
- }
145
- gFlags |= gFlag_NoUserTiming, gaMarks.push({
146
- name: e,
147
- entryType: "mark",
148
- startTime: _now(),
149
- duration: 0
150
- })
151
- }
152
-
153
- function _measure(e, t, n) {
154
- if (dlog("Enter LUX.measure(), name = " + e), void 0 === t && _getMark(gStartMark) && (t = gStartMark), perf) {
155
- if (perf.measure) return t ? n ? perf.measure(e, t, n) : perf.measure(e, t) : perf.measure(e);
156
- if (perf.webkitMeasure) return perf.webkitMeasure(e, t, n)
157
- }
158
- var r = 0,
159
- a = _now();
160
- if (t) {
161
- var i = _getMark(t);
162
- if (i) r = i.startTime;
163
- else {
164
- if (!(perf && perf.timing && perf.timing[t])) return;
165
- r = perf.timing[t] - perf.timing.navigationStart
166
- }
167
- }
168
- if (n) {
169
- var o = _getMark(n);
170
- if (o) a = o.startTime;
171
- else {
172
- if (!(perf && perf.timing && perf.timing[n])) return;
173
- a = perf.timing[n] - perf.timing.navigationStart
174
- }
175
- }
176
- gaMeasures.push({
177
- name: e,
178
- entryType: "measure",
179
- startTime: r,
180
- duration: a - r
181
- })
182
- }
183
-
184
- function _getMark(e) {
185
- return _getM(e, _getMarks())
186
128
  }
187
-
188
- function _getM(e, t) {
129
+ function I(e) {
130
+ var t = !1;
131
+ try {
132
+ t = e.cancelable;
133
+ } catch (e) {
134
+ return void pe("Permission error accessing input event.");
135
+ }
136
+ if (t) {
137
+ var n = D(!0),
138
+ r = e.timeStamp;
139
+ if ((r > 152e7 && (n = Number(new Date())), r > n)) return;
140
+ var i = n - r;
141
+ "pointerdown" == e.type
142
+ ? (function (e, t) {
143
+ function n() {
144
+ C(e), i();
145
+ }
146
+ function r() {
147
+ i();
148
+ }
149
+ function i() {
150
+ window.removeEventListener("pointerup", n, x),
151
+ window.removeEventListener("pointercancel", r, x);
152
+ }
153
+ window.addEventListener("pointerup", n, x),
154
+ window.addEventListener("pointercancel", r, x);
155
+ })(i)
156
+ : C(i);
157
+ }
158
+ }
159
+ function D(e) {
160
+ var t = (Date.now ? Date.now() : +new Date()) - M,
161
+ n = _(h);
162
+ return n && !e ? t - n.startTime : L && L.now ? L.now() : t;
163
+ }
164
+ function j(e) {
165
+ if ((pe("Enter LUX.mark(), name = " + e), L)) {
166
+ if (L.mark) return L.mark(e);
167
+ if (L.webkitMark) return L.webkitMark(e);
168
+ }
169
+ (s |= 4), u.push({ name: e, entryType: "mark", startTime: D(), duration: 0 });
170
+ }
171
+ function _(e) {
172
+ return (function (e, t) {
189
173
  if (t)
190
- for (var n = t.length - 1; n >= 0; n--) {
191
- var r = t[n];
192
- if (e === r.name) return r
193
- }
194
- }
195
-
196
- function _getMarks() {
197
- if (perf) {
198
- if (perf.getEntriesByType) return perf.getEntriesByType("mark");
199
- if (perf.webkitGetEntriesByType) return perf.webkitGetEntriesByType("mark")
200
- }
201
- return gaMarks
202
- }
203
-
204
- function _getMeasures() {
205
- if (perf) {
206
- if (perf.getEntriesByType) return perf.getEntriesByType("measure");
207
- if (perf.webkitGetEntriesByType) return perf.webkitGetEntriesByType("measure")
208
- }
209
- return gaMeasures
210
- }
211
-
212
- function userTimingValues() {
213
- var e = {},
214
- t = _getMark(gStartMark),
215
- n = _getMarks();
216
- n && n.forEach((function(n) {
174
+ for (var n = t.length - 1; n >= 0; n--) {
175
+ var r = t[n];
176
+ if (e === r.name) return r;
177
+ }
178
+ return;
179
+ })(e, P());
180
+ }
181
+ function P() {
182
+ if (L) {
183
+ if (L.getEntriesByType) return L.getEntriesByType("mark");
184
+ if (L.webkitGetEntriesByType) return L.webkitGetEntriesByType("mark");
185
+ }
186
+ return u;
187
+ }
188
+ function O() {
189
+ var e = {},
190
+ t = _(h),
191
+ n = P();
192
+ n &&
193
+ n.forEach(function (n) {
194
+ var r = n.name,
195
+ i = r !== h && t ? t.startTime : 0,
196
+ a = Math.round(n.startTime - i);
197
+ a < 0 || (void 0 === e[r] ? (e[r] = a) : (e[r] = Math.max(a, e[r])));
198
+ });
199
+ var r = (function () {
200
+ if (L) {
201
+ if (L.getEntriesByType) return L.getEntriesByType("measure");
202
+ if (L.webkitGetEntriesByType) return L.webkitGetEntriesByType("measure");
203
+ }
204
+ return c;
205
+ })();
206
+ r &&
207
+ r.forEach(function (n) {
208
+ if (!(t && n.startTime < t.startTime)) {
217
209
  var r = n.name,
218
- a = r !== gStartMark && t ? t.startTime : 0,
219
- i = Math.round(n.startTime - a);
220
- i < 0 || (void 0 === e[r] ? e[r] = i : e[r] = Math.max(i, e[r]))
221
- }));
222
- var r = _getMeasures();
223
- r && r.forEach((function(n) {
224
- if (!(t && n.startTime < t.startTime)) {
225
- var r = n.name,
226
- a = Math.round(n.duration);
227
- void 0 === e[r] ? e[r] = a : e[r] = Math.max(a, e[r])
228
- }
229
- }));
230
- var a = [];
231
- return Object.keys(e).forEach((function(t) {
232
- a.push(t + "|" + e[t])
233
- })), a.join(",")
234
- }
235
-
236
- function elementTimingValues() {
237
- var e = [];
238
- if (gaPerfEntries.length)
239
- for (var t = 0; t < gaPerfEntries.length; t++) {
240
- var n = gaPerfEntries[t];
241
- "element" === n.entryType && n.identifier && n.startTime && e.push(n.identifier + "|" + Math.round(n.startTime))
242
- }
243
- return e.join(",")
244
- }
245
-
246
- function cpuTimes() {
247
- if ("function" != typeof PerformanceLongTaskTiming) return "";
248
- var e = "",
249
- t = {},
250
- n = {};
251
- if (gaPerfEntries.length)
252
- for (var r = _getMark(gStartMark), a = r ? r.startTime : 0, i = r ? _getMark(gEndMark).startTime : perf.timing.loadEventEnd - perf.timing.navigationStart, o = 0; o < gaPerfEntries.length; o++) {
253
- var s = gaPerfEntries[o];
254
- if ("longtask" === s.entryType) {
255
- var d = Math.round(s.duration);
256
- if (s.startTime < a) d -= a - s.startTime;
257
- else if (s.startTime >= i) continue;
258
- var g = s.attribution[0].name;
259
- t[g] || (t[g] = 0, n[g] = ""), t[g] += d, n[g] += "," + Math.round(s.startTime) + "|" + d
260
- }
261
- }
262
- var u = void 0 !== t.script ? "script" : "unknown";
263
- void 0 === t[u] && (t[u] = 0, n[u] = "");
264
- var c = cpuStats(n[u]),
265
- l = ",n|" + c.count + ",d|" + c.median + ",x|" + c.max + (0 === c.fci ? "" : ",i|" + c.fci);
266
- return e += "s|" + t[u] + l + n[u]
267
- }
268
-
269
- function cpuStats(e) {
270
- for (var t = 0, n = getFcp(), r = 0 === n, a = [], i = e.split(","), o = 0; o < i.length; o++) {
271
- var s = i[o].split("|");
210
+ i = Math.round(n.duration);
211
+ void 0 === e[r] ? (e[r] = i) : (e[r] = Math.max(i, e[r]));
212
+ }
213
+ });
214
+ var i = [];
215
+ return (
216
+ Object.keys(e).forEach(function (t) {
217
+ i.push(t + "|" + e[t]);
218
+ }),
219
+ i.join(",")
220
+ );
221
+ }
222
+ function H() {
223
+ if ("function" != typeof PerformanceLongTaskTiming) return "";
224
+ var e = "",
225
+ t = {},
226
+ n = {};
227
+ if (i.length)
228
+ for (
229
+ var r = _(h),
230
+ a = r ? r.startTime : 0,
231
+ o = r ? _(y).startTime : L.timing.loadEventEnd - L.timing.navigationStart,
232
+ s = 0;
233
+ s < i.length;
234
+ s++
235
+ ) {
236
+ var u = i[s];
237
+ if ("longtask" === u.entryType) {
238
+ var c = Math.round(u.duration);
239
+ if (u.startTime < a) c -= a - u.startTime;
240
+ else if (u.startTime >= o) continue;
241
+ var d = u.attribution[0].name;
242
+ t[d] || ((t[d] = 0), (n[d] = "")),
243
+ (t[d] += c),
244
+ (n[d] += "," + Math.round(u.startTime) + "|" + c);
245
+ }
246
+ }
247
+ var f = void 0 !== t.script ? "script" : "unknown";
248
+ void 0 === t[f] && ((t[f] = 0), (n[f] = ""));
249
+ var m = (function (e) {
250
+ for (var t = 0, n = A(), r = 0 === n, i = [], a = e.split(","), o = 0; o < a.length; o++) {
251
+ var s = a[o].split("|");
272
252
  if (2 === s.length) {
273
- var d = parseInt(s[0]),
274
- g = parseInt(s[1]);
275
- a.push(g), t = g > t ? g : t, !r && d > n && (d - n > 5e3 ? r = !0 : n = d + g)
276
- }
277
- }
278
- return {
279
- count: a.length,
280
- median: arrayMedian(a),
281
- max: t,
282
- fci: n
283
- }
284
- }
285
-
286
- function calculateDCLS() {
287
- if ("function" != typeof LayoutShift) return !1;
288
- for (var e = 0, t = 0; t < gaPerfEntries.length; t++) {
289
- var n = gaPerfEntries[t];
290
- "layout-shift" !== n.entryType || n.hadRecentInput || (e += n.value)
291
- }
292
- return e.toFixed(6)
293
- }
294
-
295
- function arrayMedian(e) {
296
- if (0 === e.length) return 0;
297
- var t = Math.floor(e.length / 2);
298
- return e.sort((function(e, t) {
299
- return e - t
300
- })), e.length % 2 ? e[t] : Math.round((e[t - 1] + e[t]) / 2)
301
- }
302
-
303
- function selfLoading() {
304
- var e = "";
305
- if (perf && perf.getEntriesByName) {
306
- var t = getScriptElement("/js/lux.js");
307
- if (t) {
308
- var n = perf.getEntriesByName(t.src);
309
- if (n && n.length) {
310
- var r = n[0],
311
- a = Math.round(r.domainLookupEnd - r.domainLookupStart),
312
- i = Math.round(r.connectEnd - r.connectStart),
313
- o = Math.round(r.responseStart - r.requestStart),
314
- s = Math.round(r.responseEnd - r.responseStart),
315
- d = a + i + o + s,
316
- g = LUX_t_end - LUX_t_start,
317
- u = r.encodedBodySize ? r.encodedBodySize : 0;
318
- e = "d" + a + "t" + i + "f" + o + "c" + s + "n" + d + "e" + g + "r" + _samplerate + (u ? "x" + u : "") + (gLuxSnippetStart ? "l" + gLuxSnippetStart : "") + "s" + (LUX_t_start - _navigationStart)
319
- }
320
- }
321
- }
322
- return e
323
- }
324
-
325
- function _clearIx() {
326
- ghIx = {}
327
- }
328
-
329
- function ixValues() {
330
- var e = [];
331
- for (var t in ghIx) e.push(t + "|" + ghIx[t]);
332
- return e.join(",")
333
- }
334
-
335
- function _addData(e, t) {
336
- dlog("Enter LUX.addData(), name = " + e + ", value = " + t);
337
- var n = typeof t;
338
- "string" !== typeof e || "string" !== n && "number" !== n && "boolean" !== n || (ghData[e] = t), gbLuxSent && (gCustomerDataTimeout && clearTimeout(gCustomerDataTimeout), gCustomerDataTimeout = setTimeout(_sendCustomerData, 100))
339
- }
340
-
341
- function _sample() {
342
- if (void 0 === gUid || void 0 === _samplerate) return !1;
343
- var e = ("" + gUid).substr(-2);
344
- return parseInt(e) < _samplerate
345
- }
346
-
347
- function customerDataValues() {
348
- var e = [];
349
- for (var t in ghData) {
350
- var n = "" + ghData[t];
351
- t = t.replace(/,/g, "").replace(/\|/g, ""), n = n.replace(/,/g, "").replace(/\|/g, ""), e.push(t + "|" + n)
352
- }
353
- return encodeURIComponent(e.join(","))
354
- }
355
-
356
- function _init() {
357
- dlog("Enter LUX.init()."), _clearIx(), _removeIxHandlers(), _addIxHandlers(), gbNavSent = 0, gbLuxSent = 0, gbIxSent = 0, gbFirstPV = 0, gSyncId = createSyncId(), gUid = refreshUniqueId(gSyncId), gaPerfEntries.splice(0), gFlags = 0, gFlags |= gFlag_InitCalled, _mark(gStartMark)
358
- }
359
-
360
- function blockingScripts() {
361
- var e = lastViewportElement();
362
- if (!e) return syncScripts();
363
- for (var t = document.getElementsByTagName("script"), n = 0, r = 0, a = t.length; r < a; r++) {
364
- var i = t[r];
365
- !i.src || i.async || i.defer || 0 == (4 & i.compareDocumentPosition(e)) || n++
366
- }
367
- return n
368
- }
369
-
370
- function blockingStylesheets() {
371
- for (var e = 0, t = document.getElementsByTagName("link"), n = 0, r = t.length; n < r; n++) {
372
- var a = t[n];
373
- a.href && "stylesheet" === a.rel && 0 !== a.href.indexOf("data:") && (a.onloadcssdefined || "print" === a.media || "style" === a.as || "function" == typeof a.onload && "all" === a.media || e++)
374
- }
375
- return e
376
- }
377
-
378
- function syncScripts() {
379
- for (var e = document.getElementsByTagName("script"), t = 0, n = 0, r = e.length; n < r; n++) {
380
- var a = e[n];
381
- !a.src || a.async || a.defer || t++
382
- }
383
- return t
384
- }
385
-
386
- function numScripts() {
387
- for (var e = document.getElementsByTagName("script"), t = 0, n = 0, r = e.length; n < r; n++) {
388
- e[n].src && t++
389
- }
390
- return t
391
- }
392
-
393
- function numStylesheets() {
394
- for (var e = document.getElementsByTagName("link"), t = 0, n = 0, r = e.length; n < r; n++) {
395
- var a = e[n];
396
- a.href && "stylesheet" == a.rel && t++
397
- }
398
- return t
399
- }
400
-
401
- function inlineTagSize(e) {
402
- for (var t = document.getElementsByTagName(e), n = 0, r = 0, a = t.length; r < a; r++) {
403
- var i = t[r];
404
- try {
405
- n += i.innerHTML.length
406
- } catch (i) {
407
- return dlog("Error accessing inline element innerHTML."), -1
253
+ var u = parseInt(s[0]),
254
+ c = parseInt(s[1]);
255
+ i.push(c), (t = c > t ? c : t), !r && u > n && (u - n > 5e3 ? (r = !0) : (n = u + c));
408
256
  }
409
- }
410
- return n
411
- }
412
-
413
- function getNavTiming() {
414
- var e = "",
415
- t = _navigationStart;
416
- if (_getMark(gStartMark) && _getMark(gEndMark)) {
417
- var n = Math.round(_getMark(gStartMark).startTime);
418
- e = (t += n) + "fs0ls" + (s = Math.round(_getMark(gEndMark).startTime) - n) + "le" + s
419
- } else if (perf && perf.timing) {
420
- var r = perf.timing,
421
- a = getStartRender(),
422
- i = getFcp(),
423
- o = getLcp();
424
- e = t + (r.redirectStart ? "rs" + (r.redirectStart - t) : "") + (r.redirectEnd ? "re" + (r.redirectEnd - t) : "") + (r.fetchStart ? "fs" + (r.fetchStart - t) : "") + (r.domainLookupStart ? "ds" + (r.domainLookupStart - t) : "") + (r.domainLookupEnd ? "de" + (r.domainLookupEnd - t) : "") + (r.connectStart ? "cs" + (r.connectStart - t) : "") + (r.secureConnectionStart ? "sc" + (r.secureConnectionStart - t) : "") + (r.connectEnd ? "ce" + (r.connectEnd - t) : "") + (r.requestStart ? "qs" + (r.requestStart - t) : "") + (r.responseStart ? "bs" + (r.responseStart - t) : "") + (r.responseEnd ? "be" + (r.responseEnd - t) : "") + (r.domLoading ? "ol" + (r.domLoading - t) : "") + (r.domInteractive ? "oi" + (r.domInteractive - t) : "") + (r.domContentLoadedEventStart ? "os" + (r.domContentLoadedEventStart - t) : "") + (r.domContentLoadedEventEnd ? "oe" + (r.domContentLoadedEventEnd - t) : "") + (r.domComplete ? "oc" + (r.domComplete - t) : "") + (r.loadEventStart ? "ls" + (r.loadEventStart - t) : "") + (r.loadEventEnd ? "le" + (r.loadEventEnd - t) : "") + (a ? "sr" + a : "") + (i ? "fc" + i : "") + (o ? "lc" + o : "")
425
- } else if (_getMark(gEndMark)) {
426
- var s;
427
- e = t + "fs0ls" + (s = Math.round(_getMark(gEndMark).startTime)) + "le" + s
428
- }
429
- return e
430
- }
431
-
432
- function getFcp() {
433
- if (perf && perf.getEntriesByType && perf.getEntriesByType("paint"))
434
- for (var e = perf.getEntriesByType("paint"), t = 0; t < e.length; t++) {
435
- var n = e[t];
436
- if ("first-contentful-paint" === n.name) return Math.round(n.startTime)
437
- }
438
- return 0
439
- }
440
-
441
- function getLcp() {
442
- if (gaPerfEntries.length)
443
- for (var e = gaPerfEntries.length - 1; e >= 0; e--) {
444
- var t = gaPerfEntries[e];
445
- if ("largest-contentful-paint" === t.entryType) return Math.round(t.startTime)
446
- }
447
- return 0
448
- }
449
-
450
- function getStartRender() {
451
- if (perf && perf.timing) {
452
- var e, t = perf.timing,
257
+ }
258
+ var d = i.length,
259
+ f = (function (e) {
260
+ if (0 === e.length) return 0;
261
+ var t = Math.floor(e.length / 2);
262
+ return (
263
+ e.sort(function (e, t) {
264
+ return e - t;
265
+ }),
266
+ e.length % 2 ? e[t] : Math.round((e[t - 1] + e[t]) / 2)
267
+ );
268
+ })(i);
269
+ return { count: d, median: f, max: t, fci: n };
270
+ })(n[f]),
271
+ l = ",n|" + m.count + ",d|" + m.median + ",x|" + m.max + (0 === m.fci ? "" : ",i|" + m.fci);
272
+ return (e += "s|" + t[f] + l + n[f]);
273
+ }
274
+ function R() {
275
+ var e = [];
276
+ for (var t in d) e.push(t + "|" + d[t]);
277
+ return e.join(",");
278
+ }
279
+ function W() {
280
+ if (void 0 === T || void 0 === X) return !1;
281
+ var e = ("" + T).substr(-2);
282
+ return parseInt(e) < X;
283
+ }
284
+ function F() {
285
+ var e = [];
286
+ for (var t in f) {
287
+ var n = "" + f[t];
288
+ (t = t.replace(/,/g, "").replace(/\|/g, "")),
289
+ (n = n.replace(/,/g, "").replace(/\|/g, "")),
290
+ e.push(t + "|" + n);
291
+ }
292
+ return encodeURIComponent(e.join(","));
293
+ }
294
+ function G() {
295
+ var e = Z();
296
+ if (!e)
297
+ return (function () {
298
+ for (
299
+ var e = document.getElementsByTagName("script"), t = 0, n = 0, r = e.length;
300
+ n < r;
301
+ n++
302
+ ) {
303
+ var i = e[n];
304
+ !i.src || i.async || i.defer || t++;
305
+ }
306
+ return t;
307
+ })();
308
+ for (var t = document.getElementsByTagName("script"), n = 0, r = 0, i = t.length; r < i; r++) {
309
+ var a = t[r];
310
+ !a.src || a.async || a.defer || 0 == (4 & a.compareDocumentPosition(e)) || n++;
311
+ }
312
+ return n;
313
+ }
314
+ function q(e) {
315
+ for (var t = document.getElementsByTagName(e), n = 0, r = 0, i = t.length; r < i; r++) {
316
+ var a = t[r];
317
+ try {
318
+ n += a.innerHTML.length;
319
+ } catch (a) {
320
+ return pe("Error accessing inline element innerHTML."), -1;
321
+ }
322
+ }
323
+ return n;
324
+ }
325
+ function z() {
326
+ var e = "",
327
+ t = M;
328
+ if (_(h) && _(y)) {
329
+ var n = Math.round(_(h).startTime);
330
+ e = (t += n) + "fs0ls" + (u = Math.round(_(y).startTime) - n) + "le" + u;
331
+ } else if (L && L.timing) {
332
+ var r = L.timing,
333
+ a = (function () {
334
+ if (L && L.timing) {
335
+ var e,
336
+ t = L.timing,
453
337
  n = t.navigationStart;
454
- if (n) {
455
- if (perf && perf.getEntriesByType && perf.getEntriesByType("paint") && perf.getEntriesByType("paint").length)
456
- for (var r = perf.getEntriesByType("paint"), a = 0; a < r.length; a++) {
457
- var i = r[a];
458
- if ("first-paint" === i.name) {
459
- e = Math.round(i.startTime);
460
- break
461
- }
462
- } else if (window.chrome && "function" == typeof window.chrome.loadTimes) {
463
- var o = window.chrome.loadTimes();
464
- o && (e = Math.round(1e3 * o.firstPaintTime - n))
465
- } else t.msFirstPaint && (e = Math.round(t.msFirstPaint - n));
466
- if (e > 0) return e
338
+ if (n) {
339
+ if (
340
+ L &&
341
+ L.getEntriesByType &&
342
+ L.getEntriesByType("paint") &&
343
+ L.getEntriesByType("paint").length
344
+ )
345
+ for (var r = L.getEntriesByType("paint"), i = 0; i < r.length; i++) {
346
+ var a = r[i];
347
+ if ("first-paint" === a.name) {
348
+ e = Math.round(a.startTime);
349
+ break;
350
+ }
351
+ }
352
+ else if (window.chrome && "function" == typeof window.chrome.loadTimes) {
353
+ var o = window.chrome.loadTimes();
354
+ o && (e = Math.round(1e3 * o.firstPaintTime - n));
355
+ } else t.msFirstPaint && (e = Math.round(t.msFirstPaint - n));
356
+ if (e > 0) return e;
357
+ }
467
358
  }
468
- }
469
- return dlog("Paint Timing not supported."), null
470
- }
471
-
472
- function getCustomerId() {
473
- if (void 0 !== LUX.customerid) return LUX.customerid;
474
- var e = getScriptElement("/js/lux.js");
475
- return e ? (LUX.customerid = getQuerystringParam(e.src, "id"), LUX.customerid) : ""
476
- }
477
-
478
- function getScriptElement(e) {
479
- for (var t = document.getElementsByTagName("script"), n = 0, r = t.length; n < r; n++) {
480
- var a = t[n];
481
- if (a.src && -1 !== a.src.indexOf(e)) return a
482
- }
483
- return null
484
- }
485
-
486
- function getQuerystringParam(e, t) {
487
- for (var n = e.split("?")[1].split("&"), r = 0, a = n.length; r < a; r++) {
488
- var i = n[r].split("=");
489
- if (t === i[0]) return i[1]
490
- }
491
- }
492
-
493
- function avgDomDepth() {
494
- for (var e = document.getElementsByTagName("*"), t = e.length, n = 0; t--;) n += numParents(e[t]);
495
- return Math.round(n / e.length)
496
- }
497
-
498
- function numParents(e) {
499
- var t = 0;
500
- if (e.parentNode)
501
- for (; e = e.parentNode;) t++;
502
- return t
503
- }
504
-
505
- function docHeight(e) {
506
- var t = e.body,
507
- n = e.documentElement;
508
- return Math.max(t ? t.scrollHeight : 0, t ? t.offsetHeight : 0, n ? n.clientHeight : 0, n ? n.scrollHeight : 0, n ? n.offsetHeight : 0)
509
- }
510
-
511
- function docWidth(e) {
512
- var t = e.body,
513
- n = e.documentElement;
514
- return Math.max(t ? t.scrollWidth : 0, t ? t.offsetWidth : 0, n ? n.clientWidth : 0, n ? n.scrollWidth : 0, n ? n.offsetWidth : 0)
515
- }
516
-
517
- function docSize() {
518
- if (perf && perf.getEntriesByType) {
519
- var e = performance.getEntriesByType("navigation");
520
- if (e && e.length > 0 && e[0].encodedBodySize) return e[0].encodedBodySize
521
- }
522
- return 0
523
- }
524
-
525
- function navigationType() {
526
- return perf && perf.navigation && void 0 !== perf.navigation.type ? perf.navigation.type : ""
527
- }
528
-
529
- function connectionType() {
530
- var e = navigator.connection,
531
- t = "";
532
- return e && e.effectiveType && (t = "slow-2g" === (t = e.effectiveType) ? "Slow 2G" : "2g" === t || "3g" === t || "4g" === t || "5g" === t ? t.toUpperCase() : t.charAt(0).toUpperCase() + t.slice(1)), t
533
- }
534
-
535
- function imagesATF() {
536
- var e = document.getElementsByTagName("img"),
537
- t = [];
538
- if (e)
539
- for (var n = 0, r = e.length; n < r; n++) {
540
- var a = e[n];
541
- inViewport(a) && t.push(a)
359
+ return pe("Paint Timing not supported."), null;
360
+ })(),
361
+ o = A(),
362
+ s = (function () {
363
+ if (i.length)
364
+ for (var e = i.length - 1; e >= 0; e--) {
365
+ var t = i[e];
366
+ if ("largest-contentful-paint" === t.entryType) return Math.round(t.startTime);
367
+ }
368
+ return 0;
369
+ })();
370
+ e =
371
+ t +
372
+ (r.redirectStart ? "rs" + (r.redirectStart - t) : "") +
373
+ (r.redirectEnd ? "re" + (r.redirectEnd - t) : "") +
374
+ (r.fetchStart ? "fs" + (r.fetchStart - t) : "") +
375
+ (r.domainLookupStart ? "ds" + (r.domainLookupStart - t) : "") +
376
+ (r.domainLookupEnd ? "de" + (r.domainLookupEnd - t) : "") +
377
+ (r.connectStart ? "cs" + (r.connectStart - t) : "") +
378
+ (r.secureConnectionStart ? "sc" + (r.secureConnectionStart - t) : "") +
379
+ (r.connectEnd ? "ce" + (r.connectEnd - t) : "") +
380
+ (r.requestStart ? "qs" + (r.requestStart - t) : "") +
381
+ (r.responseStart ? "bs" + (r.responseStart - t) : "") +
382
+ (r.responseEnd ? "be" + (r.responseEnd - t) : "") +
383
+ (r.domLoading ? "ol" + (r.domLoading - t) : "") +
384
+ (r.domInteractive ? "oi" + (r.domInteractive - t) : "") +
385
+ (r.domContentLoadedEventStart ? "os" + (r.domContentLoadedEventStart - t) : "") +
386
+ (r.domContentLoadedEventEnd ? "oe" + (r.domContentLoadedEventEnd - t) : "") +
387
+ (r.domComplete ? "oc" + (r.domComplete - t) : "") +
388
+ (r.loadEventStart ? "ls" + (r.loadEventStart - t) : "") +
389
+ (r.loadEventEnd ? "le" + (r.loadEventEnd - t) : "") +
390
+ (a ? "sr" + a : "") +
391
+ (o ? "fc" + o : "") +
392
+ (s ? "lc" + s : "");
393
+ } else if (_(y)) {
394
+ var u;
395
+ e = t + "fs0ls" + (u = Math.round(_(y).startTime)) + "le" + u;
396
+ }
397
+ return e;
398
+ }
399
+ function A() {
400
+ if (L && L.getEntriesByType && L.getEntriesByType("paint"))
401
+ for (var e = L.getEntriesByType("paint"), t = 0; t < e.length; t++) {
402
+ var n = e[t];
403
+ if ("first-contentful-paint" === n.name) return Math.round(n.startTime);
404
+ }
405
+ return 0;
406
+ }
407
+ function J() {
408
+ if (void 0 !== LUX.customerid) return LUX.customerid;
409
+ var e = Y("/js/lux.js");
410
+ return e
411
+ ? ((LUX.customerid = (function (e, t) {
412
+ for (var n = e.split("?")[1].split("&"), r = 0, i = n.length; r < i; r++) {
413
+ var a = n[r].split("=");
414
+ if (t === a[0]) return a[1];
542
415
  }
543
- return t
544
- }
545
-
546
- function lastViewportElement(e) {
547
- var t;
548
- if (e || (e = document.body), e) {
549
- var n = e.children;
550
- if (n)
551
- for (var r = 0, a = n.length; r < a; r++) {
552
- var i = n[r];
553
- inViewport(i) && (t = i)
554
- }
555
- }
556
- return t ? lastViewportElement(t) : e
557
- }
558
-
559
- function inViewport(e) {
560
- var t = document.documentElement.clientHeight,
561
- n = document.documentElement.clientWidth,
562
- r = findPos(e);
563
- return r[0] >= 0 && r[1] >= 0 && r[0] < n && r[1] < t && e.offsetWidth > 0 && e.offsetHeight > 0
564
- }
565
-
566
- function findPos(e) {
567
- for (var t = 0, n = 0; e;) t += e.offsetLeft, n += e.offsetTop, e = e.offsetParent;
568
- return [t, n]
569
- }
570
-
571
- function _sendLux() {
572
- dlog("Enter LUX.send().");
573
- var e = getCustomerId();
574
- if (e && gSyncId && validDomain() && _sample() && !gbLuxSent) {
575
- _mark(gEndMark);
576
- var t = userTimingValues(),
577
- n = elementTimingValues(),
578
- r = customerDataValues(),
579
- a = "";
580
- gbIxSent || (a = ixValues());
581
- var i = cpuTimes(),
582
- o = calculateDCLS(),
583
- s = selfLoading();
584
- document.visibilityState && "visible" !== document.visibilityState && (gFlags |= gFlag_NotVisible);
585
- var d = _beaconUrl + "?v=" + version + "&id=" + e + "&sid=" + gSyncId + "&uid=" + gUid + (r ? "&CD=" + r : "") + "&l=" + encodeURIComponent(_getPageLabel()),
586
- g = inlineTagSize("script"),
587
- u = inlineTagSize("style"),
588
- c = (gbNavSent ? "" : "&NT=" + getNavTiming()) + (gbFirstPV ? "&LJS=" + s : "") + "&PS=ns" + numScripts() + "bs" + blockingScripts() + (g > -1 ? "is" + g : "") + "ss" + numStylesheets() + "bc" + blockingStylesheets() + (u > -1 ? "ic" + u : "") + "ia" + imagesATF().length + "it" + document.getElementsByTagName("img").length + "dd" + avgDomDepth() + "nd" + document.getElementsByTagName("*").length + "vh" + document.documentElement.clientHeight + "vw" + document.documentElement.clientWidth + "dh" + docHeight(document) + "dw" + docWidth(document) + (docSize() ? "ds" + docSize() : "") + (connectionType() ? "ct" + connectionType() + "_" : "") + "er" + nErrors + "nt" + navigationType() + (navigator.deviceMemory ? "dm" + Math.round(navigator.deviceMemory) : "") + (a ? "&IX=" + a : "") + (gFirstInputDelay ? "&FID=" + gFirstInputDelay : "") + (i ? "&CPU=" + i : "") + (gFlags ? "&fl=" + gFlags : "") + (n ? "&ET=" + n : "") + "&HN=" + encodeURIComponent(document.location.hostname) + (!1 !== o ? "&CLS=" + o : ""),
589
- l = "";
590
- if (t) {
591
- var f = d.length + c.length;
592
- if (f + t.length <= gMaxQuerystring) c += "&UT=" + t;
593
- else {
594
- var m = gMaxQuerystring - f,
595
- p = t.lastIndexOf(",", m);
596
- c += "&UT=" + t.substring(0, p), l = t.substring(p + 1)
597
- }
416
+ return;
417
+ })(e.src, "id")),
418
+ LUX.customerid)
419
+ : "";
420
+ }
421
+ function Y(e) {
422
+ for (var t = document.getElementsByTagName("script"), n = 0, r = t.length; n < r; n++) {
423
+ var i = t[n];
424
+ if (i.src && -1 !== i.src.indexOf(e)) return i;
425
+ }
426
+ return null;
427
+ }
428
+ function K(e) {
429
+ var t = 0;
430
+ if (e.parentNode) for (; (e = e.parentNode); ) t++;
431
+ return t;
432
+ }
433
+ function Q() {
434
+ if (L && L.getEntriesByType) {
435
+ var e = performance.getEntriesByType("navigation");
436
+ if (e && e.length > 0 && e[0].encodedBodySize) return e[0].encodedBodySize;
437
+ }
438
+ return 0;
439
+ }
440
+ function V() {
441
+ var e = navigator.connection,
442
+ t = "";
443
+ return (
444
+ e &&
445
+ e.effectiveType &&
446
+ (t =
447
+ "slow-2g" === (t = e.effectiveType)
448
+ ? "Slow 2G"
449
+ : "2g" === t || "3g" === t || "4g" === t || "5g" === t
450
+ ? t.toUpperCase()
451
+ : t.charAt(0).toUpperCase() + t.slice(1)),
452
+ t
453
+ );
454
+ }
455
+ function Z(e) {
456
+ var t;
457
+ if ((e || (e = document.body), e)) {
458
+ var n = e.children;
459
+ if (n)
460
+ for (var r = 0, i = n.length; r < i; r++) {
461
+ var a = n[r];
462
+ $(a) && (t = a);
463
+ }
464
+ }
465
+ return t ? Z(t) : e;
466
+ }
467
+ function $(e) {
468
+ var t = document.documentElement.clientHeight,
469
+ n = document.documentElement.clientWidth,
470
+ r = (function (e) {
471
+ var t = 0,
472
+ n = 0;
473
+ for (; e; ) (t += e.offsetLeft), (n += e.offsetTop), (e = e.offsetParent);
474
+ return [t, n];
475
+ })(e);
476
+ return (
477
+ r[0] >= 0 && r[1] >= 0 && r[0] < n && r[1] < t && e.offsetWidth > 0 && e.offsetHeight > 0
478
+ );
479
+ }
480
+ function ee() {
481
+ pe("Enter LUX.send().");
482
+ var e = J();
483
+ if (e && E && W() && !m) {
484
+ j(y);
485
+ var t = O(),
486
+ r = (function () {
487
+ var e = [];
488
+ if (i.length)
489
+ for (var t = 0; t < i.length; t++) {
490
+ var n = i[t];
491
+ "element" === n.entryType &&
492
+ n.identifier &&
493
+ n.startTime &&
494
+ e.push(n.identifier + "|" + Math.round(n.startTime));
495
+ }
496
+ return e.join(",");
497
+ })(),
498
+ a = F(),
499
+ o = "";
500
+ v || (o = R());
501
+ var u = H(),
502
+ c = (function () {
503
+ if ("function" != typeof LayoutShift) return !1;
504
+ for (var e = 0, t = 0; t < i.length; t++) {
505
+ var n = i[t];
506
+ "layout-shift" !== n.entryType || n.hadRecentInput || (e += n.value);
598
507
  }
599
- var v = d + c;
600
- dlog("Sending main LUX beacon: " + v), _sendBeacon(v), gbLuxSent = 1, gbNavSent = 1, gbIxSent = a ? 1 : 0;
601
- for (var h = gMaxQuerystring - d.length; l;) {
602
- var y = "";
603
- if (l.length <= h) y = l, l = "";
604
- else {
605
- var _ = l.lastIndexOf(",", h); - 1 === _ && (_ = l.indexOf(",")), -1 === _ ? (y = l, l = "") : (y = l.substring(0, _), l = l.substring(_ + 1))
508
+ return e.toFixed(6);
509
+ })(),
510
+ d = (function () {
511
+ var e = "";
512
+ if (L && L.getEntriesByName) {
513
+ var t = Y("/js/lux.js");
514
+ if (t) {
515
+ var n = L.getEntriesByName(t.src);
516
+ if (n && n.length) {
517
+ var r = n[0],
518
+ i = Math.round(r.domainLookupEnd - r.domainLookupStart),
519
+ a = Math.round(r.connectEnd - r.connectStart),
520
+ o = Math.round(r.responseStart - r.requestStart),
521
+ s = Math.round(r.responseEnd - r.responseStart),
522
+ u = i + a + o + s,
523
+ c = LUX_t_end - LUX_t_start,
524
+ d = r.encodedBodySize ? r.encodedBodySize : 0;
525
+ e =
526
+ "d" +
527
+ i +
528
+ "t" +
529
+ a +
530
+ "f" +
531
+ o +
532
+ "c" +
533
+ s +
534
+ "n" +
535
+ u +
536
+ "e" +
537
+ c +
538
+ "r" +
539
+ X +
540
+ (d ? "x" + d : "") +
541
+ (B ? "l" + B : "") +
542
+ "s" +
543
+ (LUX_t_start - M);
606
544
  }
607
- var L = d + "&UT=" + y;
608
- dlog("Sending extra User Timing beacon: " + L), _sendBeacon(L)
609
- }
610
- }
611
- }
612
-
613
- function _sendIx() {
614
- var e = getCustomerId();
615
- if (e && gSyncId && validDomain() && _sample() && !gbIxSent && gbLuxSent) {
616
- var t = ixValues();
617
- if (t) {
618
- var n = customerDataValues(),
619
- r = "?v=" + version + "&id=" + e + "&sid=" + gSyncId + "&uid=" + gUid + (n ? "&CD=" + n : "") + "&l=" + encodeURIComponent(_getPageLabel()) + "&IX=" + t + (gFirstInputDelay ? "&FID=" + gFirstInputDelay : "") + "&HN=" + encodeURIComponent(document.location.hostname),
620
- a = _beaconUrl + r;
621
- dlog("Sending Interaction Metrics beacon: " + a), _sendBeacon(a), gbIxSent = 1
622
- }
623
- }
624
- }
625
-
626
- function _sendCustomerData() {
627
- var e = getCustomerId();
628
- if (e && gSyncId && validDomain() && _sample() && gbLuxSent) {
629
- var t = customerDataValues();
630
- if (t) {
631
- var n = "?v=" + version + "&id=" + e + "&sid=" + gSyncId + "&uid=" + gUid + "&CD=" + t + "&l=" + encodeURIComponent(_getPageLabel()) + "&HN=" + encodeURIComponent(document.location.hostname),
632
- r = _beaconUrl + n;
633
- dlog("Sending late Customer Data beacon: " + r), _sendBeacon(r)
634
- }
635
- }
636
- }
637
-
638
- function _sendBeacon(e) {
639
- if ("simple" !== LUX.beaconMode) return _sendBeaconAutoUpdate(e);
640
- (new Image).src = e
641
- }
642
-
643
- function _sendBeaconAutoUpdate(e) {
644
- var t = document.createElement("script");
645
- t.async = !0, t.src = e;
646
- var n = document.getElementsByTagName("script");
647
- n.length ? n[0].parentNode.insertBefore(t, n[0]) : ((n = document.getElementsByTagName("head")).length || (n = document.getElementsByTagName("body")).length) && n[0].appendChild(t)
648
- }
649
-
650
- function interactionAttributionForElement(e) {
651
- if (e.id) return e.id;
652
- for (var t, n = e; n.parentNode && n.parentNode.tagName;) {
653
- if ((n = n.parentNode).hasAttribute("data-sctrack")) return n.getAttribute("data-sctrack");
654
- n.id && !t && (t = n.id)
655
- }
656
- var r = "INPUT" === e.tagName && "submit" === e.type,
657
- a = "BUTTON" === e.tagName,
658
- i = "A" === e.tagName;
659
- return r && e.value ? e.value : (a || i) && e.innerText ? e.innerText : t || ""
660
- }
661
-
662
- function _scrollHandler() {
663
- void 0 === ghIx.s && (ghIx.s = Math.round(_now()))
664
- }
665
-
666
- function _keyHandler(e) {
667
- if (_removeIxHandlers(), void 0 === ghIx.k) {
668
- if (ghIx.k = Math.round(_now()), e && e.target) {
669
- var t = interactionAttributionForElement(e.target);
670
- t && (ghIx.ki = t)
545
+ }
671
546
  }
672
- _sendIx()
673
- }
674
- }
675
-
676
- function _clickHandler(e) {
677
- if (_removeIxHandlers(), void 0 === ghIx.c) {
678
- ghIx.c = Math.round(_now());
679
- var t = null;
680
- try {
681
- e && e.target && (t = e.target)
682
- } catch (e) {
683
- dlog("Error accessing event target."), t = null
684
- }
685
- if (t) {
686
- e.clientX && (ghIx.cx = e.clientX, ghIx.cy = e.clientY);
687
- var n = interactionAttributionForElement(e.target);
688
- n && (ghIx.ci = n)
689
- }
690
- _sendIx()
691
- }
692
- }
693
-
694
- function _doUpdate(e, t) {
695
- if (e && version < e && document.body && !gbUpdated) {
696
- dlog("Updating cached version of lux.js from " + version + " to " + e + "."), gbUpdated = 1;
697
- var n = getScriptElement("/js/lux.js");
698
- if (n)
699
- if ("function" == typeof fetch) fetch(n.src, {
700
- cache: "reload"
701
- });
702
- else {
703
- var r = document.createElement("iframe");
704
- r.style.display = "none", r.id = "LUX_update_iframe", r.src = "//cdn.speedcurve.com/luxupdate.php?src=" + encodeURIComponent(n.src) + (t ? "&tw=" + t : ""), document.body.appendChild(r)
547
+ return e;
548
+ })();
549
+ document.visibilityState && "visible" !== document.visibilityState && (s |= 8);
550
+ var f,
551
+ g,
552
+ h,
553
+ w =
554
+ U +
555
+ "?v=" +
556
+ "216&id=" +
557
+ e +
558
+ "&sid=" +
559
+ E +
560
+ "&uid=" +
561
+ T +
562
+ (a ? "&CD=" + a : "") +
563
+ "&l=" +
564
+ encodeURIComponent(ge()),
565
+ k = q("script"),
566
+ N = q("style"),
567
+ x =
568
+ (l ? "" : "&NT=" + z()) +
569
+ (p ? "&LJS=" + d : "") +
570
+ "&PS=ns" +
571
+ (function () {
572
+ for (
573
+ var e = document.getElementsByTagName("script"), t = 0, n = 0, r = e.length;
574
+ n < r;
575
+ n++
576
+ )
577
+ e[n].src && t++;
578
+ return t;
579
+ })() +
580
+ "bs" +
581
+ G() +
582
+ (k > -1 ? "is" + k : "") +
583
+ "ss" +
584
+ (function () {
585
+ for (
586
+ var e = document.getElementsByTagName("link"), t = 0, n = 0, r = e.length;
587
+ n < r;
588
+ n++
589
+ ) {
590
+ var i = e[n];
591
+ i.href && "stylesheet" == i.rel && t++;
592
+ }
593
+ return t;
594
+ })() +
595
+ "bc" +
596
+ (function () {
597
+ for (
598
+ var e = 0, t = document.getElementsByTagName("link"), n = 0, r = t.length;
599
+ n < r;
600
+ n++
601
+ ) {
602
+ var i = t[n];
603
+ i.href &&
604
+ "stylesheet" === i.rel &&
605
+ 0 !== i.href.indexOf("data:") &&
606
+ (i.onloadcssdefined ||
607
+ "print" === i.media ||
608
+ "style" === i.as ||
609
+ ("function" == typeof i.onload && "all" === i.media) ||
610
+ e++);
611
+ }
612
+ return e;
613
+ })() +
614
+ (N > -1 ? "ic" + N : "") +
615
+ "ia" +
616
+ (function () {
617
+ var e = document.getElementsByTagName("img"),
618
+ t = [];
619
+ if (e)
620
+ for (var n = 0, r = e.length; n < r; n++) {
621
+ var i = e[n];
622
+ $(i) && t.push(i);
705
623
  }
706
- }
707
- }
708
-
709
- function addListener(e, t) {
710
- window.addEventListener ? window.addEventListener(e, t, !1) : window.attachEvent && window.attachEvent("on" + e, t)
711
- }
712
-
713
- function removeListener(e, t) {
714
- window.removeEventListener ? window.removeEventListener(e, t, !1) : window.detachEvent && window.detachEvent("on" + e, t)
715
- }
716
-
717
- function _addIxHandlers() {
718
- addListener("scroll", _scrollHandler), addListener("keypress", _keyHandler), addListener("mousedown", _clickHandler)
719
- }
720
-
721
- function _removeIxHandlers() {
722
- removeListener("scroll", _scrollHandler), removeListener("keypress", _keyHandler), removeListener("mousedown", _clickHandler)
723
- }
724
-
725
- function createSyncId(e) {
726
- return e ? Number(new Date) + "00000" : Number(new Date) + "" + _padLeft(parseInt(1e5 * Math.random()), "00000")
727
- }
728
-
729
- function refreshUniqueId(e) {
730
- var t = _getCookie("lux_uid");
731
- if (!t || t.length < 11) t = e;
732
- else {
733
- var n = parseInt(t.substring(0, 10));
734
- Number(new Date) / 1e3 - n > 86400 && (t = e)
735
- }
736
- return setUniqueId(t), t
737
- }
738
-
739
- function setUniqueId(e) {
740
- return _setCookie("lux_uid", e, gSessionTimeout), e
741
- }
742
-
743
- function _getUniqueId() {
744
- return gUid
745
- }
746
-
747
- function _getPageLabel() {
748
- if (void 0 !== LUX.label) return LUX.label;
749
- if (void 0 !== LUX.jspagelabel) {
750
- try {
751
- var label = eval(LUX.jspagelabel)
752
- } catch (e) {
753
- console.log("Error evaluating customer settings LUX page label:", e)
754
- }
755
- if (label) return label
756
- }
757
- return document.title
758
- }
759
-
760
- function validDomain() {
761
- return !0
762
- }
763
-
764
- function _getCookie(e) {
624
+ return t;
625
+ })().length +
626
+ "it" +
627
+ document.getElementsByTagName("img").length +
628
+ "dd" +
629
+ (function () {
630
+ for (var e = document.getElementsByTagName("*"), t = e.length, n = 0; t--; )
631
+ n += K(e[t]);
632
+ return Math.round(n / e.length);
633
+ })() +
634
+ "nd" +
635
+ document.getElementsByTagName("*").length +
636
+ "vh" +
637
+ document.documentElement.clientHeight +
638
+ "vw" +
639
+ document.documentElement.clientWidth +
640
+ "dh" +
641
+ ((f = document),
642
+ (g = f.body),
643
+ (h = f.documentElement),
644
+ Math.max(
645
+ g ? g.scrollHeight : 0,
646
+ g ? g.offsetHeight : 0,
647
+ h ? h.clientHeight : 0,
648
+ h ? h.scrollHeight : 0,
649
+ h ? h.offsetHeight : 0
650
+ ) + "dw") +
651
+ (function (e) {
652
+ var t = e.body,
653
+ n = e.documentElement;
654
+ return Math.max(
655
+ t ? t.scrollWidth : 0,
656
+ t ? t.offsetWidth : 0,
657
+ n ? n.clientWidth : 0,
658
+ n ? n.scrollWidth : 0,
659
+ n ? n.offsetWidth : 0
660
+ );
661
+ })(document) +
662
+ (Q() ? "ds" + Q() : "") +
663
+ (V() ? "ct" + V() + "_" : "") +
664
+ "er" +
665
+ n +
666
+ "nt" +
667
+ (L && L.navigation && void 0 !== L.navigation.type ? L.navigation.type : "") +
668
+ (navigator.deviceMemory ? "dm" + Math.round(navigator.deviceMemory) : "") +
669
+ (o ? "&IX=" + o : "") +
670
+ (S ? "&FID=" + S : "") +
671
+ (u ? "&CPU=" + u : "") +
672
+ (s ? "&fl=" + s : "") +
673
+ (r ? "&ET=" + r : "") +
674
+ "&HN=" +
675
+ encodeURIComponent(document.location.hostname) +
676
+ (!1 !== c ? "&CLS=" + c : ""),
677
+ C = "";
678
+ if (t) {
679
+ var I = w.length + x.length;
680
+ if (I + t.length <= b) x += "&UT=" + t;
681
+ else {
682
+ var D = b - I,
683
+ _ = t.lastIndexOf(",", D);
684
+ (x += "&UT=" + t.substring(0, _)), (C = t.substring(_ + 1));
685
+ }
686
+ }
687
+ var P = w + x;
688
+ pe("Sending main LUX beacon: " + P), re(P), (m = 1), (l = 1), (v = o ? 1 : 0);
689
+ for (var A = b - w.length; C; ) {
690
+ var Z = "";
691
+ if (C.length <= A) (Z = C), (C = "");
692
+ else {
693
+ var ee = C.lastIndexOf(",", A);
694
+ -1 === ee && (ee = C.indexOf(",")),
695
+ -1 === ee ? ((Z = C), (C = "")) : ((Z = C.substring(0, ee)), (C = C.substring(ee + 1)));
696
+ }
697
+ var te = w + "&UT=" + Z;
698
+ pe("Sending extra User Timing beacon: " + te), re(te);
699
+ }
700
+ }
701
+ }
702
+ function te() {
703
+ var e = J();
704
+ if (e && E && W() && !v && m) {
705
+ var t = R();
706
+ if (t) {
707
+ var n = F(),
708
+ r =
709
+ "?v=216&id=" +
710
+ e +
711
+ "&sid=" +
712
+ E +
713
+ "&uid=" +
714
+ T +
715
+ (n ? "&CD=" + n : "") +
716
+ "&l=" +
717
+ encodeURIComponent(ge()) +
718
+ "&IX=" +
719
+ t +
720
+ (S ? "&FID=" + S : "") +
721
+ "&HN=" +
722
+ encodeURIComponent(document.location.hostname),
723
+ i = U + r;
724
+ pe("Sending Interaction Metrics beacon: " + i), re(i), (v = 1);
725
+ }
726
+ }
727
+ }
728
+ function ne() {
729
+ var e = J();
730
+ if (e && E && W() && m) {
731
+ var t = F();
732
+ if (t) {
733
+ var n =
734
+ "?v=216&id=" +
735
+ e +
736
+ "&sid=" +
737
+ E +
738
+ "&uid=" +
739
+ T +
740
+ "&CD=" +
741
+ t +
742
+ "&l=" +
743
+ encodeURIComponent(ge()) +
744
+ "&HN=" +
745
+ encodeURIComponent(document.location.hostname),
746
+ r = U + n;
747
+ pe("Sending late Customer Data beacon: " + r), re(r);
748
+ }
749
+ }
750
+ }
751
+ function re(e) {
752
+ if ("simple" !== LUX.beaconMode)
753
+ return (function (e) {
754
+ var t = document.createElement("script");
755
+ (t.async = !0), (t.src = e);
756
+ var n = document.getElementsByTagName("script");
757
+ n.length
758
+ ? n[0].parentNode.insertBefore(t, n[0])
759
+ : ((n = document.getElementsByTagName("head")).length ||
760
+ (n = document.getElementsByTagName("body")).length) &&
761
+ n[0].appendChild(t);
762
+ })(e);
763
+ new Image().src = e;
764
+ }
765
+ function ie(e) {
766
+ if (e.id) return e.id;
767
+ for (var t, n = e; n.parentNode && n.parentNode.tagName; ) {
768
+ if ((n = n.parentNode).hasAttribute("data-sctrack")) return n.getAttribute("data-sctrack");
769
+ n.id && !t && (t = n.id);
770
+ }
771
+ var r = "INPUT" === e.tagName && "submit" === e.type,
772
+ i = "BUTTON" === e.tagName,
773
+ a = "A" === e.tagName;
774
+ return r && e.value ? e.value : (i || a) && e.innerText ? e.innerText : t || "";
775
+ }
776
+ function ae() {
777
+ void 0 === d.s && (d.s = Math.round(D()));
778
+ }
779
+ function oe(e) {
780
+ if ((fe(), void 0 === d.k)) {
781
+ if (((d.k = Math.round(D())), e && e.target)) {
782
+ var t = ie(e.target);
783
+ t && (d.ki = t);
784
+ }
785
+ te();
786
+ }
787
+ }
788
+ function se(e) {
789
+ if ((fe(), void 0 === d.c)) {
790
+ d.c = Math.round(D());
791
+ var t = null;
765
792
  try {
766
- for (var t = document.cookie.split(";"), n = 0; n < t.length; n++) {
767
- var r = t[n].split("=");
768
- if (e === r[0].trim()) return unescape(r[1])
769
- }
793
+ e && e.target && (t = e.target);
770
794
  } catch (e) {
771
- dlog("Error accessing document.cookie.")
795
+ pe("Error accessing event target."), (t = null);
772
796
  }
773
- }
774
-
775
- function _setCookie(e, t, n) {
797
+ if (t) {
798
+ e.clientX && ((d.cx = e.clientX), (d.cy = e.clientY));
799
+ var n = ie(e.target);
800
+ n && (d.ci = n);
801
+ }
802
+ te();
803
+ }
804
+ }
805
+ function ue(e, t) {
806
+ window.addEventListener
807
+ ? window.addEventListener(e, t, !1)
808
+ : window.attachEvent && window.attachEvent("on" + e, t);
809
+ }
810
+ function ce(e, t) {
811
+ window.removeEventListener
812
+ ? window.removeEventListener(e, t, !1)
813
+ : window.detachEvent && window.detachEvent("on" + e, t);
814
+ }
815
+ function de() {
816
+ ue("scroll", ae), ue("keypress", oe), ue("mousedown", se);
817
+ }
818
+ function fe() {
819
+ ce("scroll", ae), ce("keypress", oe), ce("mousedown", se);
820
+ }
821
+ function me(e) {
822
+ var t, n;
823
+ return e
824
+ ? Number(new Date()) + "00000"
825
+ : Number(new Date()) +
826
+ "" +
827
+ ((t = parseInt(1e5 * Math.random())), ((n = "00000") + t).slice(-n.length));
828
+ }
829
+ function le(e) {
830
+ var t = (function (e) {
776
831
  try {
777
- document.cookie = e + "=" + escape(t) + (n ? "; max-age=" + n : "") + "; path=/; SameSite=Lax"
832
+ for (var t = document.cookie.split(";"), n = 0; n < t.length; n++) {
833
+ var r = t[n].split("=");
834
+ if (e === r[0].trim()) return unescape(r[1]);
835
+ }
778
836
  } catch (e) {
779
- dlog("Error setting document.cookie.")
837
+ pe("Error accessing document.cookie.");
838
+ }
839
+ return;
840
+ })("lux_uid");
841
+ if (!t || t.length < 11) t = e;
842
+ else {
843
+ var n = parseInt(t.substring(0, 10));
844
+ Number(new Date()) / 1e3 - n > 86400 && (t = e);
845
+ }
846
+ return ve(t), t;
847
+ }
848
+ function ve(e) {
849
+ return (
850
+ (function (e, t, n) {
851
+ try {
852
+ document.cookie =
853
+ e + "=" + escape(t) + (n ? "; max-age=" + n : "") + "; path=/; SameSite=Lax";
854
+ } catch (e) {
855
+ pe("Error setting document.cookie.");
856
+ }
857
+ })("lux_uid", e, 1800),
858
+ e
859
+ );
860
+ }
861
+ function ge() {
862
+ if (void 0 !== LUX.label) return LUX.label;
863
+ if (void 0 !== LUX.jspagelabel) {
864
+ var e = Function('"use strict"; return ' + LUX.jspagelabel);
865
+ try {
866
+ var t = e();
867
+ if (t) return t;
868
+ } catch (e) {
869
+ console.log("Error evaluating customer settings LUX page label:", e);
870
+ }
871
+ }
872
+ return document.title;
873
+ }
874
+ function pe(t) {
875
+ e.push(t), LUX.debug && console.log("LUX: " + t);
876
+ }
877
+ N.forEach(function (e) {
878
+ window.addEventListener(e, I, x);
879
+ }),
880
+ k &&
881
+ ("complete" == document.readyState
882
+ ? ee()
883
+ : ue("load", function () {
884
+ setTimeout(ee, 200);
885
+ }),
886
+ ue("beforeunload", ee),
887
+ ue("unload", ee),
888
+ ue("beforeunload", te),
889
+ ue("unload", te)),
890
+ de();
891
+ var he = {
892
+ mark: j,
893
+ measure: function (e, t, n) {
894
+ if ((pe("Enter LUX.measure(), name = " + e), void 0 === t && _(h) && (t = h), L)) {
895
+ if (L.measure) return t ? (n ? L.measure(e, t, n) : L.measure(e, t)) : L.measure(e);
896
+ if (L.webkitMeasure) return L.webkitMeasure(e, t, n);
780
897
  }
781
- }
782
-
783
- function _padLeft(e, t) {
784
- return (t + e).slice(-t.length)
785
- }
786
-
787
- function dlog(e) {
788
- gaLog.push(e), LUX.debug && console.log("LUX: " + e)
789
- }
790
- gaEventTypes.forEach((function(e) {
791
- window.addEventListener(e, onInput, ghListenerOptions)
792
- })), _auto && ("complete" == document.readyState ? _sendLux() : addListener("load", (function() {
793
- setTimeout(_sendLux, 200)
794
- })), addListener("beforeunload", _sendLux), addListener("unload", _sendLux), addListener("beforeunload", _sendIx), addListener("unload", _sendIx)), _addIxHandlers();
795
- var _LUX = {
796
- mark: _mark,
797
- measure: _measure,
798
- init: _init,
799
- send: _sendLux,
800
- addData: _addData,
801
- getSessionId: _getUniqueId,
802
- getDebug: function() {
803
- return gaLog
804
- },
805
- forceSample: function() {
806
- setUniqueId(createSyncId(!0)), console.log("Sampling has been turned on for this session.")
807
- },
808
- doUpdate: _doUpdate,
809
- cmd: function(e) {
810
- var t = e.shift();
811
- "function" == typeof _LUX[t] && _LUX[t].apply(_LUX, e)
812
- },
813
- beaconUrl: _beaconUrl,
814
- samplerate: _samplerate,
815
- auto: _auto,
816
- label: void 0 !== LUX.label ? LUX.label : void 0,
817
- jspagelabel: void 0 !== LUX.jspagelabel ? LUX.jspagelabel : void 0,
818
- version: version,
819
- ae: [],
820
- al: [],
821
- debug: !!LUX.debug
822
- };
823
- return LUX.ac && LUX.ac.length && LUX.ac.forEach((function(e) {
898
+ var r = 0,
899
+ i = D();
900
+ if (t) {
901
+ var a = _(t);
902
+ if (a) r = a.startTime;
903
+ else {
904
+ if (!(L && L.timing && L.timing[t])) return;
905
+ r = L.timing[t] - L.timing.navigationStart;
906
+ }
907
+ }
908
+ if (n) {
909
+ var o = _(n);
910
+ if (o) i = o.startTime;
911
+ else {
912
+ if (!(L && L.timing && L.timing[n])) return;
913
+ i = L.timing[n] - L.timing.navigationStart;
914
+ }
915
+ }
916
+ c.push({ name: e, entryType: "measure", startTime: r, duration: i - r });
917
+ },
918
+ init: function () {
919
+ pe("Enter LUX.init()."),
920
+ (d = {}),
921
+ fe(),
922
+ de(),
923
+ (l = 0),
924
+ (m = 0),
925
+ (v = 0),
926
+ (p = 0),
927
+ (E = me()),
928
+ (T = le(E)),
929
+ i.splice(0),
930
+ (s = 0),
931
+ (s |= 1),
932
+ j(h);
933
+ },
934
+ send: ee,
935
+ addData: function (e, t) {
936
+ pe("Enter LUX.addData(), name = " + e + ", value = " + t);
937
+ var n = typeof t;
938
+ "string" !== typeof e || ("string" !== n && "number" !== n && "boolean" !== n) || (f[e] = t),
939
+ m && (o && clearTimeout(o), (o = setTimeout(ne, 100)));
940
+ },
941
+ getSessionId: function () {
942
+ return T;
943
+ },
944
+ getDebug: function () {
945
+ return e;
946
+ },
947
+ forceSample: function () {
948
+ ve(me(!0)), console.log("Sampling has been turned on for this session.");
949
+ },
950
+ doUpdate: function (e, n) {
951
+ if (e && t < e && document.body && !g) {
952
+ pe("Updating cached version of lux.js from 216 to " + e + "."), (g = 1);
953
+ var r = Y("/js/lux.js");
954
+ if (r)
955
+ if ("function" == typeof fetch) fetch(r.src, { cache: "reload" });
956
+ else {
957
+ var i = document.createElement("iframe");
958
+ (i.style.display = "none"),
959
+ (i.id = "LUX_update_iframe"),
960
+ (i.src =
961
+ "//cdn.speedcurve.com/luxupdate.php?src=" +
962
+ encodeURIComponent(r.src) +
963
+ (n ? "&tw=" + n : "")),
964
+ document.body.appendChild(i);
965
+ }
966
+ }
967
+ },
968
+ cmd: function (e) {
824
969
  var t = e.shift();
825
- "function" == typeof _LUX[t] && _LUX[t].apply(_LUX, e)
826
- })), void 0 !== window.LUX_ae && window.LUX_ae.forEach((function(e) {
827
- errorHandler(e)
828
- })), dlog("lux.js evaluation end."), _LUX
829
- }();
830
- var LUX_t_end = Date.now();
831
-
970
+ "function" == typeof he[t] && he[t].apply(he, e);
971
+ },
972
+ beaconMode: w,
973
+ beaconUrl: U,
974
+ samplerate: X,
975
+ auto: k,
976
+ label: void 0 !== LUX.label ? LUX.label : void 0,
977
+ jspagelabel: void 0 !== LUX.jspagelabel ? LUX.jspagelabel : void 0,
978
+ version: t,
979
+ ae: [],
980
+ al: [],
981
+ debug: !!LUX.debug,
982
+ };
983
+ return (
984
+ LUX.ac &&
985
+ LUX.ac.length &&
986
+ LUX.ac.forEach(function (e) {
987
+ var t = e.shift();
988
+ "function" == typeof he[t] && he[t].apply(he, e);
989
+ }),
990
+ void 0 !== window.LUX_ae &&
991
+ window.LUX_ae.forEach(function (e) {
992
+ r(e);
993
+ }),
994
+ pe("lux.js evaluation end."),
995
+ he
996
+ );
997
+ })();
998
+ var LUX_t_end = Date.now();
999
+
1000
+ // -----------------------------------------------------------------------------
1001
+ // More settings
1002
+ // -----------------------------------------------------------------------------
1003
+ //
832
1004
  // This ID usually appended to the end of the lux.js as a query string when
833
1005
  // using the SpeedCurve hosted version - but we have to include it here as this
834
1006
  // is self hosted.
@@ -842,3 +1014,10 @@ LUX.beaconMode = "simple";
842
1014
  // `LUX.getDebug()` in the browser's console will show the history of what's
843
1015
  // happened.
844
1016
  LUX.debug = false;
1017
+
1018
+ // Forces sampling - useful for when used with `debug = true`
1019
+ // LUX.forceSample()
1020
+
1021
+ // -----------------------------------------------------------------------------
1022
+ // End of more settings
1023
+ // -----------------------------------------------------------------------------