Newer
Older
247001
247002
247003
247004
247005
247006
247007
247008
247009
247010
247011
247012
247013
247014
247015
247016
247017
247018
247019
247020
247021
247022
247023
247024
247025
247026
247027
247028
247029
247030
247031
247032
247033
247034
247035
247036
247037
247038
247039
247040
247041
247042
247043
247044
247045
247046
247047
247048
247049
247050
247051
247052
247053
247054
247055
247056
247057
247058
247059
247060
247061
247062
247063
247064
247065
247066
247067
247068
247069
247070
247071
247072
247073
247074
247075
247076
247077
247078
247079
247080
247081
247082
247083
247084
247085
247086
247087
247088
247089
247090
247091
247092
247093
247094
247095
247096
247097
247098
247099
247100
247101
247102
247103
247104
247105
247106
247107
247108
247109
247110
247111
247112
247113
247114
247115
247116
247117
247118
247119
247120
247121
247122
247123
247124
247125
247126
247127
247128
247129
247130
247131
247132
247133
247134
247135
247136
247137
247138
247139
247140
247141
247142
247143
247144
247145
247146
247147
247148
247149
247150
247151
247152
247153
247154
247155
247156
247157
247158
247159
247160
247161
247162
247163
247164
247165
247166
247167
247168
247169
247170
247171
247172
247173
247174
247175
247176
247177
247178
247179
247180
247181
247182
247183
247184
247185
247186
247187
247188
247189
247190
247191
247192
247193
247194
247195
247196
247197
247198
247199
247200
247201
247202
247203
247204
247205
247206
247207
247208
247209
247210
247211
247212
247213
247214
247215
247216
247217
247218
247219
247220
247221
247222
247223
247224
247225
247226
247227
247228
247229
247230
247231
247232
247233
247234
247235
247236
247237
247238
247239
247240
247241
247242
247243
247244
247245
247246
247247
247248
247249
247250
247251
247252
247253
247254
247255
247256
247257
247258
247259
247260
247261
247262
247263
247264
247265
247266
247267
247268
247269
247270
247271
247272
247273
247274
247275
247276
247277
247278
247279
247280
247281
247282
247283
247284
247285
247286
247287
247288
247289
247290
247291
247292
247293
247294
247295
247296
247297
247298
247299
247300
247301
247302
247303
247304
247305
247306
247307
247308
247309
247310
247311
247312
247313
247314
247315
247316
247317
247318
247319
247320
247321
247322
247323
247324
247325
247326
247327
247328
247329
247330
247331
247332
247333
247334
247335
247336
247337
247338
247339
247340
247341
247342
247343
247344
247345
247346
247347
247348
247349
247350
247351
247352
247353
247354
247355
247356
247357
247358
247359
247360
247361
247362
247363
247364
247365
247366
247367
247368
247369
247370
247371
247372
247373
247374
247375
247376
247377
247378
247379
247380
247381
247382
247383
247384
247385
247386
247387
247388
247389
247390
247391
247392
247393
247394
247395
247396
247397
247398
247399
247400
247401
247402
247403
247404
247405
247406
247407
247408
247409
247410
247411
247412
247413
247414
247415
247416
247417
247418
247419
247420
247421
247422
247423
247424
247425
247426
247427
247428
247429
247430
247431
247432
247433
247434
247435
247436
247437
247438
247439
247440
247441
247442
247443
247444
247445
247446
247447
247448
247449
247450
247451
247452
247453
247454
247455
247456
247457
247458
247459
247460
247461
247462
247463
247464
247465
247466
247467
247468
247469
247470
247471
247472
247473
247474
247475
247476
247477
247478
247479
247480
247481
247482
247483
247484
247485
247486
247487
247488
247489
247490
247491
247492
247493
247494
247495
247496
247497
247498
247499
247500
247501
247502
247503
247504
247505
247506
247507
247508
247509
247510
247511
247512
247513
247514
247515
247516
247517
247518
247519
247520
247521
247522
247523
247524
247525
247526
247527
247528
247529
247530
247531
247532
247533
247534
247535
247536
247537
247538
247539
247540
247541
247542
247543
247544
247545
247546
247547
247548
247549
247550
247551
247552
247553
247554
247555
247556
247557
247558
247559
247560
247561
247562
247563
247564
247565
247566
247567
247568
247569
247570
247571
247572
247573
247574
247575
247576
247577
247578
247579
247580
247581
247582
247583
247584
247585
247586
247587
247588
247589
247590
247591
247592
247593
247594
247595
247596
247597
247598
247599
247600
247601
247602
247603
247604
247605
247606
247607
247608
247609
247610
247611
247612
247613
247614
247615
247616
247617
247618
247619
247620
247621
247622
247623
247624
247625
247626
247627
247628
247629
247630
247631
247632
247633
247634
247635
247636
247637
247638
247639
247640
247641
247642
247643
247644
247645
247646
247647
247648
247649
247650
247651
247652
247653
247654
247655
247656
247657
247658
247659
247660
247661
247662
247663
247664
247665
247666
/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const initMetric = (name, value) => {
const navEntry = (0,_getNavigationEntry_js__WEBPACK_IMPORTED_MODULE_0__.getNavigationEntry)();
let navigationType = 'navigate';
if (navEntry) {
if (_types_js__WEBPACK_IMPORTED_MODULE_1__.WINDOW.document.prerendering || (0,_getActivationStart_js__WEBPACK_IMPORTED_MODULE_2__.getActivationStart)() > 0) {
navigationType = 'prerender';
} else {
navigationType = navEntry.type.replace(/_/g, '-') ;
}
}
return {
name,
value: typeof value === 'undefined' ? -1 : value,
rating: 'good', // Will be updated if the value changes.
delta: 0,
entries: [],
id: (0,_generateUniqueID_js__WEBPACK_IMPORTED_MODULE_3__.generateUniqueID)(),
navigationType,
};
};
//# sourceMappingURL=initMetric.js.map
/***/ }),
/* 1719 */
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "getNavigationEntry": () => (/* binding */ getNavigationEntry)
/* harmony export */ });
/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1713);
/*
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const getNavigationEntryFromPerformanceTiming = () => {
// eslint-disable-next-line deprecation/deprecation
const timing = _types_js__WEBPACK_IMPORTED_MODULE_0__.WINDOW.performance.timing;
// eslint-disable-next-line deprecation/deprecation
const type = _types_js__WEBPACK_IMPORTED_MODULE_0__.WINDOW.performance.navigation.type;
const navigationEntry = {
entryType: 'navigation',
startTime: 0,
type: type == 2 ? 'back_forward' : type === 1 ? 'reload' : 'navigate',
};
for (const key in timing) {
if (key !== 'navigationStart' && key !== 'toJSON') {
navigationEntry[key] = Math.max((timing[key ] ) - timing.navigationStart, 0);
}
}
return navigationEntry ;
};
const getNavigationEntry = () => {
if (_types_js__WEBPACK_IMPORTED_MODULE_0__.WINDOW.__WEB_VITALS_POLYFILL__) {
return (
_types_js__WEBPACK_IMPORTED_MODULE_0__.WINDOW.performance &&
((performance.getEntriesByType && performance.getEntriesByType('navigation')[0]) ||
getNavigationEntryFromPerformanceTiming())
);
} else {
return _types_js__WEBPACK_IMPORTED_MODULE_0__.WINDOW.performance && performance.getEntriesByType && performance.getEntriesByType('navigation')[0];
}
};
//# sourceMappingURL=getNavigationEntry.js.map
/***/ }),
/* 1720 */
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "getActivationStart": () => (/* binding */ getActivationStart)
/* harmony export */ });
/* harmony import */ var _getNavigationEntry_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1719);
/*
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const getActivationStart = () => {
const navEntry = (0,_getNavigationEntry_js__WEBPACK_IMPORTED_MODULE_0__.getNavigationEntry)();
return (navEntry && navEntry.activationStart) || 0;
};
//# sourceMappingURL=getActivationStart.js.map
/***/ }),
/* 1721 */
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "generateUniqueID": () => (/* binding */ generateUniqueID)
/* harmony export */ });
/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Performantly generate a unique, 30-char string by combining a version
* number, the current timestamp with a 13-digit number integer.
* @return {string}
*/
const generateUniqueID = () => {
return `v3-${Date.now()}-${Math.floor(Math.random() * (9e12 - 1)) + 1e12}`;
};
//# sourceMappingURL=generateUniqueID.js.map
/***/ }),
/* 1722 */
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "bindReporter": () => (/* binding */ bindReporter)
/* harmony export */ });
const bindReporter = (
callback,
metric,
reportAllChanges,
) => {
let prevValue;
let delta;
return (forceReport) => {
if (metric.value >= 0) {
if (forceReport || reportAllChanges) {
delta = metric.value - (prevValue || 0);
// Report the metric if there's a non-zero delta or if no previous
// value exists (which can happen in the case of the document becoming
// hidden when the metric value is 0).
// See: https://github.com/GoogleChrome/web-vitals/issues/14
if (delta || prevValue === undefined) {
prevValue = metric.value;
metric.delta = delta;
callback(metric);
}
}
}
};
};
//# sourceMappingURL=bindReporter.js.map
/***/ }),
/* 1723 */
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "onHidden": () => (/* binding */ onHidden)
/* harmony export */ });
/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1713);
/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const onHidden = (cb, once) => {
const onHiddenOrPageHide = (event) => {
if (event.type === 'pagehide' || _types_js__WEBPACK_IMPORTED_MODULE_0__.WINDOW.document.visibilityState === 'hidden') {
cb(event);
if (once) {
removeEventListener('visibilitychange', onHiddenOrPageHide, true);
removeEventListener('pagehide', onHiddenOrPageHide, true);
}
}
};
addEventListener('visibilitychange', onHiddenOrPageHide, true);
// Some browsers have buggy implementations of visibilitychange,
// so we use pagehide in addition, just to be safe.
addEventListener('pagehide', onHiddenOrPageHide, true);
};
//# sourceMappingURL=onHidden.js.map
/***/ }),
/* 1724 */
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "onLCP": () => (/* binding */ onLCP)
/* harmony export */ });
/* harmony import */ var _lib_bindReporter_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1722);
/* harmony import */ var _lib_getActivationStart_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1720);
/* harmony import */ var _lib_getVisibilityWatcher_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1725);
/* harmony import */ var _lib_initMetric_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1718);
/* harmony import */ var _lib_observe_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1716);
/* harmony import */ var _lib_onHidden_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1723);
/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const reportedMetricIDs = {};
/**
* Calculates the [LCP](https://web.dev/lcp/) value for the current page and
* calls the `callback` function once the value is ready (along with the
* relevant `largest-contentful-paint` performance entry used to determine the
* value). The reported value is a `DOMHighResTimeStamp`.
*
* If the `reportAllChanges` configuration option is set to `true`, the
* `callback` function will be called any time a new `largest-contentful-paint`
* performance entry is dispatched, or once the final value of the metric has
* been determined.
*/
const onLCP = (onReport, opts = {}) => {
const visibilityWatcher = (0,_lib_getVisibilityWatcher_js__WEBPACK_IMPORTED_MODULE_0__.getVisibilityWatcher)();
const metric = (0,_lib_initMetric_js__WEBPACK_IMPORTED_MODULE_1__.initMetric)('LCP');
let report;
const handleEntries = (entries) => {
const lastEntry = entries[entries.length - 1] ;
if (lastEntry) {
// The startTime attribute returns the value of the renderTime if it is
// not 0, and the value of the loadTime otherwise. The activationStart
// reference is used because LCP should be relative to page activation
// rather than navigation start if the page was prerendered.
const value = Math.max(lastEntry.startTime - (0,_lib_getActivationStart_js__WEBPACK_IMPORTED_MODULE_2__.getActivationStart)(), 0);
// Only report if the page wasn't hidden prior to LCP.
if (value < visibilityWatcher.firstHiddenTime) {
metric.value = value;
metric.entries = [lastEntry];
report();
}
}
};
const po = (0,_lib_observe_js__WEBPACK_IMPORTED_MODULE_3__.observe)('largest-contentful-paint', handleEntries);
if (po) {
report = (0,_lib_bindReporter_js__WEBPACK_IMPORTED_MODULE_4__.bindReporter)(onReport, metric, opts.reportAllChanges);
const stopListening = () => {
if (!reportedMetricIDs[metric.id]) {
handleEntries(po.takeRecords() );
po.disconnect();
reportedMetricIDs[metric.id] = true;
report(true);
}
};
// Stop listening after input. Note: while scrolling is an input that
// stop LCP observation, it's unreliable since it can be programmatically
// generated. See: https://github.com/GoogleChrome/web-vitals/issues/75
['keydown', 'click'].forEach(type => {
addEventListener(type, stopListening, { once: true, capture: true });
});
(0,_lib_onHidden_js__WEBPACK_IMPORTED_MODULE_5__.onHidden)(stopListening, true);
}
};
//# sourceMappingURL=getLCP.js.map
/***/ }),
/* 1725 */
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "getVisibilityWatcher": () => (/* binding */ getVisibilityWatcher)
/* harmony export */ });
/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1713);
/* harmony import */ var _onHidden_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1723);
/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
let firstHiddenTime = -1;
const initHiddenTime = () => {
// If the document is hidden and not prerendering, assume it was always
// hidden and the page was loaded in the background.
return _types_js__WEBPACK_IMPORTED_MODULE_0__.WINDOW.document.visibilityState === 'hidden' && !_types_js__WEBPACK_IMPORTED_MODULE_0__.WINDOW.document.prerendering ? 0 : Infinity;
};
const trackChanges = () => {
// Update the time if/when the document becomes hidden.
(0,_onHidden_js__WEBPACK_IMPORTED_MODULE_1__.onHidden)(({ timeStamp }) => {
firstHiddenTime = timeStamp;
}, true);
};
const getVisibilityWatcher = (
) => {
if (firstHiddenTime < 0) {
// If the document is hidden when this code runs, assume it was hidden
// since navigation start. This isn't a perfect heuristic, but it's the
// best we can do until an API is available to support querying past
// visibilityState.
firstHiddenTime = initHiddenTime();
trackChanges();
}
return {
get firstHiddenTime() {
return firstHiddenTime;
},
};
};
//# sourceMappingURL=getVisibilityWatcher.js.map
/***/ }),
/* 1726 */
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "onFID": () => (/* binding */ onFID)
/* harmony export */ });
/* harmony import */ var _lib_bindReporter_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1722);
/* harmony import */ var _lib_getVisibilityWatcher_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1725);
/* harmony import */ var _lib_initMetric_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1718);
/* harmony import */ var _lib_observe_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1716);
/* harmony import */ var _lib_onHidden_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1723);
/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Calculates the [FID](https://web.dev/fid/) value for the current page and
* calls the `callback` function once the value is ready, along with the
* relevant `first-input` performance entry used to determine the value. The
* reported value is a `DOMHighResTimeStamp`.
*
* _**Important:** since FID is only reported after the user interacts with the
* page, it's possible that it will not be reported for some page loads._
*/
const onFID = (onReport, opts = {}) => {
const visibilityWatcher = (0,_lib_getVisibilityWatcher_js__WEBPACK_IMPORTED_MODULE_0__.getVisibilityWatcher)();
const metric = (0,_lib_initMetric_js__WEBPACK_IMPORTED_MODULE_1__.initMetric)('FID');
// eslint-disable-next-line prefer-const
let report;
const handleEntry = (entry) => {
// Only report if the page wasn't hidden prior to the first input.
if (entry.startTime < visibilityWatcher.firstHiddenTime) {
metric.value = entry.processingStart - entry.startTime;
metric.entries.push(entry);
report(true);
}
};
const handleEntries = (entries) => {
(entries ).forEach(handleEntry);
};
const po = (0,_lib_observe_js__WEBPACK_IMPORTED_MODULE_2__.observe)('first-input', handleEntries);
report = (0,_lib_bindReporter_js__WEBPACK_IMPORTED_MODULE_3__.bindReporter)(onReport, metric, opts.reportAllChanges);
if (po) {
(0,_lib_onHidden_js__WEBPACK_IMPORTED_MODULE_4__.onHidden)(() => {
handleEntries(po.takeRecords() );
po.disconnect();
}, true);
}
};
//# sourceMappingURL=getFID.js.map
/***/ }),
/* 1727 */
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "_startChild": () => (/* binding */ _startChild),
/* harmony export */ "isMeasurementValue": () => (/* binding */ isMeasurementValue)
/* harmony export */ });
/**
* Checks if a given value is a valid measurement value.
*/
function isMeasurementValue(value) {
return typeof value === 'number' && isFinite(value);
}
/**
* Helper function to start child on transactions. This function will make sure that the transaction will
* use the start timestamp of the created child span if it is earlier than the transactions actual
* start timestamp.
*/
function _startChild(transaction, { startTimestamp, ...ctx }) {
if (startTimestamp && transaction.startTimestamp > startTimestamp) {
transaction.startTimestamp = startTimestamp;
}
return transaction.startChild({
startTimestamp,
...ctx,
});
}
//# sourceMappingURL=utils.js.map
/***/ }),
/* 1728 */
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "registerBackgroundTabDetection": () => (/* binding */ registerBackgroundTabDetection)
/* harmony export */ });
/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1615);
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1695);
/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1713);
/**
* Add a listener that cancels and finishes a transaction when the global
* document is hidden.
*/
function registerBackgroundTabDetection() {
if (_types_js__WEBPACK_IMPORTED_MODULE_0__.WINDOW && _types_js__WEBPACK_IMPORTED_MODULE_0__.WINDOW.document) {
_types_js__WEBPACK_IMPORTED_MODULE_0__.WINDOW.document.addEventListener('visibilitychange', () => {
const activeTransaction = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.getActiveTransaction)() ;
if (_types_js__WEBPACK_IMPORTED_MODULE_0__.WINDOW.document.hidden && activeTransaction) {
const statusType = 'cancelled';
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&
_sentry_utils__WEBPACK_IMPORTED_MODULE_2__.logger.log(
`[Tracing] Transaction: ${statusType} -> since tab moved to the background, op: ${activeTransaction.op}`,
);
// We should not set status if it is already set, this prevent important statuses like
// error or data loss from being overwritten on transaction.
if (!activeTransaction.status) {
activeTransaction.setStatus(statusType);
}
activeTransaction.setTag('visibilitychange', 'document.hidden');
activeTransaction.finish();
}
});
} else {
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&
_sentry_utils__WEBPACK_IMPORTED_MODULE_2__.logger.warn('[Tracing] Could not set up background tab detection due to lack of global document');
}
}
//# sourceMappingURL=backgroundtab.js.map
/***/ }),
/* 1729 */
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "SpanStatus": () => (/* binding */ SpanStatus)
/* harmony export */ });
/** The status of an Span.
*
* @deprecated Use string literals - if you require type casting, cast to SpanStatusType type
*/
// eslint-disable-next-line import/export
var SpanStatus; (function (SpanStatus) {
/** The operation completed successfully. */
const Ok = 'ok'; SpanStatus["Ok"] = Ok;
/** Deadline expired before operation could complete. */
const DeadlineExceeded = 'deadline_exceeded'; SpanStatus["DeadlineExceeded"] = DeadlineExceeded;
/** 401 Unauthorized (actually does mean unauthenticated according to RFC 7235) */
const Unauthenticated = 'unauthenticated'; SpanStatus["Unauthenticated"] = Unauthenticated;
/** 403 Forbidden */
const PermissionDenied = 'permission_denied'; SpanStatus["PermissionDenied"] = PermissionDenied;
/** 404 Not Found. Some requested entity (file or directory) was not found. */
const NotFound = 'not_found'; SpanStatus["NotFound"] = NotFound;
/** 429 Too Many Requests */
const ResourceExhausted = 'resource_exhausted'; SpanStatus["ResourceExhausted"] = ResourceExhausted;
/** Client specified an invalid argument. 4xx. */
const InvalidArgument = 'invalid_argument'; SpanStatus["InvalidArgument"] = InvalidArgument;
/** 501 Not Implemented */
const Unimplemented = 'unimplemented'; SpanStatus["Unimplemented"] = Unimplemented;
/** 503 Service Unavailable */
const Unavailable = 'unavailable'; SpanStatus["Unavailable"] = Unavailable;
/** Other/generic 5xx. */
const InternalError = 'internal_error'; SpanStatus["InternalError"] = InternalError;
/** Unknown. Any non-standard HTTP status code. */
const UnknownError = 'unknown_error'; SpanStatus["UnknownError"] = UnknownError;
/** The operation was cancelled (typically by the user). */
const Cancelled = 'cancelled'; SpanStatus["Cancelled"] = Cancelled;
/** Already exists (409) */
const AlreadyExists = 'already_exists'; SpanStatus["AlreadyExists"] = AlreadyExists;
/** Operation was rejected because the system is not in a state required for the operation's */
const FailedPrecondition = 'failed_precondition'; SpanStatus["FailedPrecondition"] = FailedPrecondition;
/** The operation was aborted, typically due to a concurrency issue. */
const Aborted = 'aborted'; SpanStatus["Aborted"] = Aborted;
/** Operation was attempted past the valid range. */
const OutOfRange = 'out_of_range'; SpanStatus["OutOfRange"] = OutOfRange;
/** Unrecoverable data loss or corruption */
const DataLoss = 'data_loss'; SpanStatus["DataLoss"] = DataLoss;
})(SpanStatus || (SpanStatus = {}));
//# sourceMappingURL=spanstatus.js.map
/***/ }),
/* 1730 */
/***/ ((module) => {
"use strict";
module.exports = JSON.parse('{"name":"enedissgegrandlyon","version":"1.2.2","description":"","repository":{"type":"https","url":"https://forge.grandlyon.com/web-et-numerique/llle_project/enedis-sge-konnector"},"keywords":[],"main":"./src/index.js","author":"Cozy Cloud","license":"AGPL-3.0","eslintConfig":{"extends":["cozy-app"]},"eslintIgnore":["build","data"],"husky":{"hooks":{"pre-commit":"yarn lint"}},"jest":{"setupFiles":["./setupTests.js"]},"scripts":{"build":"webpack","clean":"rm -rf ./data","cozyPublish":"cozy-app-publish --token $REGISTRY_TOKEN --build-commit $(git rev-parse ${DEPLOY_BRANCH:-build})","deploy":"git-directory-deploy --directory build/ --branch ${DEPLOY_BRANCH:-build}","deploy-dev":"git-directory-deploy --directory build/ --branch ${DEPLOY_BRANCH:-build-dev}","dev":"cozy-konnector-dev","lint":"eslint --fix .","onDeleteAccount:standalone":"cozy-konnector-standalone src/onDeleteAccount.js","onDeleteAccount":"cozy-konnector-dev src/onDeleteAccount.js","pretest":"npm run clean","release":"standard-version --no-verify","standalone":"cozy-konnector-standalone","start":"node ./src/index.js","test:cov":"jest --coverage","test":"jest","travisDeployKey":"./bin/generate_travis_deploy_key"},"dependencies":{"@sentry/node":"^7.23.0","@sentry/tracing":"^7.23.0","axios":"^0.27.2","cozy-konnector-libs":"4.55.0","easy-soap-request":"^4.7.0","jest":"^28.1.3","moment":"^2.29.3","moment-timezone":"^0.5.34","xml2js":"^0.4.23"},"devDependencies":{"cozy-jobs-cli":"1.19.1","cozy-konnector-build":"1.3.4","eslint-config-cozy-app":"1.3.3","eslint-plugin-prettier":"^4.0.0","git-directory-deploy":"1.5.1","jest-junit":"^14.0.0","standard-version":"^9.5.0"}}');
247668
247669
247670
247671
247672
247673
247674
247675
247676
247677
247678
247679
247680
247681
247682
247683
247684
247685
247686
247687
247688
247689
247690
247691
247692
247693
247694
247695
247696
247697
247698
247699
247700
247701
247702
247703
247704
247705
247706
247707
247708
247709
247710
247711
247712
247713
247714
247715
247716
247717
247718
247719
247720
247721
247722
247723
247724
247725
247726
247727
247728
247729
247730
247731
247732
247733
247734
247735
247736
247737
247738
/***/ })
/******/ ]);
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ id: moduleId,
/******/ loaded: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = __webpack_module_cache__;
/******/
/************************************************************************/
/******/ /* webpack/runtime/compat get default export */
/******/ (() => {
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = (module) => {
/******/ var getter = module && module.__esModule ?
/******/ () => (module['default']) :
/******/ () => (module);
/******/ __webpack_require__.d(getter, { a: getter });
/******/ return getter;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/harmony module decorator */
/******/ (() => {
/******/ __webpack_require__.hmd = (module) => {
/******/ module = Object.create(module);
/******/ if (!module.children) module.children = [];
/******/ Object.defineProperty(module, 'exports', {
/******/ enumerable: true,
/******/ set: () => {
/******/ throw new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);
/******/ }
/******/ });
/******/ return module;
247739
247740
247741
247742
247743
247744
247745
247746
247747
247748
247749
247750
247751
247752
247753
247754
247755
247756
247757
247758
247759
247760
247761
247762
247763
247764
247765
247766
247767
247768
247769
247770
247771
247772
247773
247774
247775
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/node module decorator */
/******/ (() => {
/******/ __webpack_require__.nmd = (module) => {
/******/ module.paths = [];
/******/ if (!module.children) module.children = [];
/******/ return module;
/******/ };
/******/ })();
/******/
/************************************************************************/
/******/
/******/ // module cache are used so entry inlining is disabled
/******/ // startup
/******/ // Load entry module and return exports
/******/ var __webpack_exports__ = __webpack_require__(__webpack_require__.s = 0);
/******/
/******/ })()
;