@atlaskit/react-ufo 4.15.15 → 4.15.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/assets/index.js +1 -1
  3. package/dist/cjs/config/index.js +12 -12
  4. package/dist/cjs/create-payload/utils/add-performance-measures.js +1 -1
  5. package/dist/cjs/create-payload/utils/get-navigation-metrics.js +1 -1
  6. package/dist/cjs/create-payload/utils/get-visibility-state-from-performance.js +1 -1
  7. package/dist/cjs/feature-flags-accessed/common/utils/index.js +2 -2
  8. package/dist/cjs/interaction-metrics/index.js +11 -11
  9. package/dist/cjs/machine-utilisation/index.js +2 -2
  10. package/dist/cjs/resource-timing/common/utils/config.js +1 -1
  11. package/dist/cjs/vc/index.js +3 -1
  12. package/dist/cjs/vc/vc-observer/getViewport.js +2 -2
  13. package/dist/cjs/vc/vc-observer/observers/index.js +2 -2
  14. package/dist/cjs/vc/vc-observer/observers/ssr-placeholders/index.js +2 -2
  15. package/dist/cjs/vc/vc-observer-new/get-element-name.js +1 -1
  16. package/dist/cjs/vc/vc-observer-new/get-unique-element-name.js +1 -1
  17. package/dist/cjs/vc/vc-observer-new/index.js +97 -19
  18. package/dist/cjs/vc/vc-observer-new/metric-calculator/{vcnext → fy26_04}/index.js +8 -14
  19. package/dist/cjs/vc/vc-observer-new/metric-calculator/utils/get-viewport-height.js +1 -1
  20. package/dist/cjs/vc/vc-observer-new/metric-calculator/utils/get-viewport-width.js +1 -1
  21. package/dist/cjs/vc/vc-observer-new/viewport-observer/index.js +60 -237
  22. package/dist/cjs/vc/vc-observer-new/viewport-observer/intersection-observer/index.js +28 -31
  23. package/dist/cjs/vc/vc-observer-new/viewport-observer/utils/is-element-visible.js +1 -1
  24. package/dist/es2019/assets/index.js +1 -1
  25. package/dist/es2019/config/index.js +11 -11
  26. package/dist/es2019/create-payload/utils/add-performance-measures.js +1 -1
  27. package/dist/es2019/create-payload/utils/get-battery-info.js +1 -1
  28. package/dist/es2019/create-payload/utils/get-navigation-metrics.js +1 -1
  29. package/dist/es2019/create-payload/utils/get-visibility-state-from-performance.js +1 -1
  30. package/dist/es2019/feature-flags-accessed/common/utils/index.js +2 -2
  31. package/dist/es2019/interaction-metrics/index.js +11 -11
  32. package/dist/es2019/machine-utilisation/index.js +1 -1
  33. package/dist/es2019/resource-timing/common/utils/config.js +1 -1
  34. package/dist/es2019/vc/index.js +3 -1
  35. package/dist/es2019/vc/vc-observer/getViewport.js +2 -2
  36. package/dist/es2019/vc/vc-observer/observers/index.js +2 -2
  37. package/dist/es2019/vc/vc-observer/observers/ssr-placeholders/index.js +2 -2
  38. package/dist/es2019/vc/vc-observer-new/get-element-name.js +1 -1
  39. package/dist/es2019/vc/vc-observer-new/get-unique-element-name.js +1 -1
  40. package/dist/es2019/vc/vc-observer-new/index.js +85 -38
  41. package/dist/es2019/vc/vc-observer-new/metric-calculator/{vcnext → fy26_04}/index.js +3 -10
  42. package/dist/es2019/vc/vc-observer-new/metric-calculator/utils/get-viewport-height.js +1 -1
  43. package/dist/es2019/vc/vc-observer-new/metric-calculator/utils/get-viewport-width.js +1 -1
  44. package/dist/es2019/vc/vc-observer-new/viewport-observer/index.js +17 -131
  45. package/dist/es2019/vc/vc-observer-new/viewport-observer/intersection-observer/index.js +19 -22
  46. package/dist/es2019/vc/vc-observer-new/viewport-observer/utils/is-element-visible.js +1 -1
  47. package/dist/esm/assets/index.js +1 -1
  48. package/dist/esm/config/index.js +12 -12
  49. package/dist/esm/create-payload/utils/add-performance-measures.js +1 -1
  50. package/dist/esm/create-payload/utils/get-navigation-metrics.js +1 -1
  51. package/dist/esm/create-payload/utils/get-visibility-state-from-performance.js +1 -1
  52. package/dist/esm/feature-flags-accessed/common/utils/index.js +2 -2
  53. package/dist/esm/interaction-metrics/index.js +11 -11
  54. package/dist/esm/machine-utilisation/index.js +2 -2
  55. package/dist/esm/resource-timing/common/utils/config.js +1 -1
  56. package/dist/esm/vc/index.js +3 -1
  57. package/dist/esm/vc/vc-observer/getViewport.js +2 -2
  58. package/dist/esm/vc/vc-observer/observers/index.js +2 -2
  59. package/dist/esm/vc/vc-observer/observers/ssr-placeholders/index.js +2 -2
  60. package/dist/esm/vc/vc-observer-new/get-element-name.js +1 -1
  61. package/dist/esm/vc/vc-observer-new/get-unique-element-name.js +1 -1
  62. package/dist/esm/vc/vc-observer-new/index.js +95 -17
  63. package/dist/esm/vc/vc-observer-new/metric-calculator/{vcnext → fy26_04}/index.js +9 -16
  64. package/dist/esm/vc/vc-observer-new/metric-calculator/utils/get-viewport-height.js +1 -1
  65. package/dist/esm/vc/vc-observer-new/metric-calculator/utils/get-viewport-width.js +1 -1
  66. package/dist/esm/vc/vc-observer-new/viewport-observer/index.js +60 -237
  67. package/dist/esm/vc/vc-observer-new/viewport-observer/intersection-observer/index.js +28 -31
  68. package/dist/esm/vc/vc-observer-new/viewport-observer/utils/is-element-visible.js +1 -1
  69. package/dist/types/config/index.d.ts +1 -1
  70. package/dist/{types-ts4.5/vc/vc-observer-new/metric-calculator/vcnext → types/vc/vc-observer-new/metric-calculator/fy26_04}/index.d.ts +1 -1
  71. package/dist/types-ts4.5/config/index.d.ts +1 -1
  72. package/dist/{types/vc/vc-observer-new/metric-calculator/vcnext → types-ts4.5/vc/vc-observer-new/metric-calculator/fy26_04}/index.d.ts +1 -1
  73. package/package.json +4 -4
@@ -10,7 +10,7 @@ export function isElementVisible(element) {
10
10
  opacityProperty: true
11
11
  });
12
12
  return visible;
13
- } catch (e) {
13
+ } catch {
14
14
  // there is no support for checkVisibility
15
15
  return true;
16
16
  }
@@ -93,7 +93,7 @@ export var CHRReporter = /*#__PURE__*/function () {
93
93
  preloaded: CHRSummary.makePayload(this.preloaded)
94
94
  };
95
95
  return CHRData;
96
- } catch (error) {
96
+ } catch (_unused) {
97
97
  return null;
98
98
  }
99
99
  }
@@ -141,7 +141,7 @@ export function getInteractionRate(name, interactionKind) {
141
141
  }
142
142
  }
143
143
  return 0;
144
- } catch (e) {
144
+ } catch (_unused2) {
145
145
  // Fallback
146
146
  return 0;
147
147
  }
@@ -163,7 +163,7 @@ export function getExperimentalInteractionRate(name, interactionType) {
163
163
  return experimentalInteractionMetrics.kind[interactionType];
164
164
  }
165
165
  return 0;
166
- } catch (e) {
166
+ } catch (_unused3) {
167
167
  return 0;
168
168
  }
169
169
  }
@@ -190,7 +190,7 @@ export function getCapabilityRate(capability) {
190
190
  }
191
191
  }
192
192
  return 0;
193
- } catch (_unused2) {
193
+ } catch (_unused4) {
194
194
  return 0;
195
195
  }
196
196
  }
@@ -213,7 +213,7 @@ function getConfigRate(name, interactionType, configName) {
213
213
  return gotConfig.kind[interactionType];
214
214
  }
215
215
  return 0;
216
- } catch (e) {
216
+ } catch (_unused5) {
217
217
  return 0;
218
218
  }
219
219
  }
@@ -236,7 +236,7 @@ export function getTypingPerformanceTracingMethod() {
236
236
  } else {
237
237
  return defaultMethod;
238
238
  }
239
- } catch (e) {
239
+ } catch (_unused6) {
240
240
  return defaultMethod;
241
241
  }
242
242
  }
@@ -254,7 +254,7 @@ export function getAwaitBM3TTIList() {
254
254
  } else {
255
255
  return [];
256
256
  }
257
- } catch (e) {
257
+ } catch (_unused7) {
258
258
  return [];
259
259
  }
260
260
  }
@@ -274,7 +274,7 @@ export function getUfoNameOverrides() {
274
274
  return ufoNameOverrides;
275
275
  }
276
276
  return undefined;
277
- } catch (e) {
277
+ } catch (_unused8) {
278
278
  return undefined;
279
279
  }
280
280
  }
@@ -286,7 +286,7 @@ export function getMinorInteractions() {
286
286
  var _config8 = config,
287
287
  minorInteractions = _config8.minorInteractions;
288
288
  return minorInteractions;
289
- } catch (e) {
289
+ } catch (_unused9) {
290
290
  return undefined;
291
291
  }
292
292
  }
@@ -300,7 +300,7 @@ export function getDoNotAbortActivePressInteraction() {
300
300
  var _config9 = config,
301
301
  doNotAbortActivePressInteraction = _config9.doNotAbortActivePressInteraction;
302
302
  return doNotAbortActivePressInteraction;
303
- } catch (e) {
303
+ } catch (_unused0) {
304
304
  return undefined;
305
305
  }
306
306
  }
@@ -314,7 +314,7 @@ export function getDoNotAbortActivePressInteractionOnTransition() {
314
314
  var _config0 = config,
315
315
  doNotAbortActivePressInteractionOnTransition = _config0.doNotAbortActivePressInteractionOnTransition;
316
316
  return doNotAbortActivePressInteractionOnTransition;
317
- } catch (e) {
317
+ } catch (_unused1) {
318
318
  return undefined;
319
319
  }
320
320
  }
@@ -328,7 +328,7 @@ export function getFinishInteractionOnTransition() {
328
328
  var _config1 = config,
329
329
  finishInteractionOnTransition = _config1.finishInteractionOnTransition;
330
330
  return finishInteractionOnTransition;
331
- } catch (e) {
331
+ } catch (_unused10) {
332
332
  return undefined;
333
333
  }
334
334
  }
@@ -348,7 +348,7 @@ export function getInteractionTimeout(ufoName) {
348
348
  } else {
349
349
  return CLEANUP_TIMEOUT;
350
350
  }
351
- } catch (e) {
351
+ } catch (_unused11) {
352
352
  return CLEANUP_TIMEOUT;
353
353
  }
354
354
  }
@@ -52,5 +52,5 @@ export var addPerformanceMeasures = function addPerformanceMeasures(start, measu
52
52
  });
53
53
  });
54
54
  });
55
- } catch (error) {}
55
+ } catch (_unused) {}
56
56
  };
@@ -41,7 +41,7 @@ export default function getNavigationMetrics(type) {
41
41
  // * loadEventEnd
42
42
  // * loadEventStart
43
43
  };
44
- } catch (error) {
44
+ } catch (_unused) {
45
45
  // Return null if there's any error accessing navigation timing
46
46
  return null;
47
47
  }
@@ -24,7 +24,7 @@ export function getVisibilityStateFromPerformance(stop) {
24
24
  }
25
25
  return acc;
26
26
  }, null);
27
- } catch (e) {
27
+ } catch (_unused) {
28
28
  return null;
29
29
  }
30
30
  }
@@ -5,7 +5,7 @@ function startsAsObject(value) {
5
5
  if (value.charAt(0) === '{') {
6
6
  return true;
7
7
  }
8
- } catch (e) {
8
+ } catch (_unused) {
9
9
  return false;
10
10
  }
11
11
  return false;
@@ -17,7 +17,7 @@ function isString(input) {
17
17
  var result;
18
18
  try {
19
19
  result = typeof input === 'string' || input instanceof String;
20
- } catch (err) {
20
+ } catch (_unused2) {
21
21
  // swallow any errors
22
22
  result = false;
23
23
  }
@@ -206,7 +206,7 @@ export function addCustomTiming(interactionId, labelStack, data) {
206
206
  }
207
207
  }
208
208
  });
209
- } catch (e) {
209
+ } catch (_unused) {
210
210
  // do nothing
211
211
  }
212
212
  }
@@ -288,7 +288,7 @@ export function addSpan(interactionId, type, name, labelStack, start) {
288
288
  }
289
289
  }
290
290
  });
291
- } catch (e) {
291
+ } catch (_unused2) {
292
292
  // do nothing
293
293
  }
294
294
  }
@@ -320,7 +320,7 @@ export function addSpanToAll(type, name, labelStack, start) {
320
320
  }
321
321
  }
322
322
  });
323
- } catch (e) {
323
+ } catch (_unused3) {
324
324
  // do nothing
325
325
  }
326
326
  }
@@ -414,7 +414,7 @@ export function addHold(interactionId, labelStack, name, experimental) {
414
414
  }
415
415
  }
416
416
  });
417
- } catch (e) {
417
+ } catch (_unused4) {
418
418
  // do nothing
419
419
  }
420
420
  }
@@ -607,7 +607,7 @@ export function addProfilerTimings(interactionId, labelStack, type, actualDurati
607
607
  }
608
608
  }
609
609
  });
610
- } catch (e) {
610
+ } catch (_unused5) {
611
611
  // do nothing
612
612
  }
613
613
  }
@@ -662,7 +662,7 @@ function finishInteraction(id, data) {
662
662
  }
663
663
  }
664
664
  });
665
- } catch (e) {
665
+ } catch (_unused6) {
666
666
  // do nothing
667
667
  }
668
668
  if (data.featureFlags) {
@@ -756,7 +756,7 @@ function finishInteraction(id, data) {
756
756
  } finally {
757
757
  _iterator3.f();
758
758
  }
759
- } catch (e) {
759
+ } catch (_unused7) {
760
760
  // do nothing
761
761
  }
762
762
  }
@@ -765,7 +765,7 @@ function finishInteraction(id, data) {
765
765
  window.dispatchEvent(new CustomEvent('UFO_FINISH_INTERACTION', {
766
766
  detail: data
767
767
  }));
768
- } catch (error) {
768
+ } catch (_unused8) {
769
769
  // do nothing
770
770
  }
771
771
  }
@@ -1167,7 +1167,7 @@ export function addApdexToAll(apdex) {
1167
1167
  }
1168
1168
  }
1169
1169
  });
1170
- } catch (e) {
1170
+ } catch (_unused9) {
1171
1171
  // do nothing
1172
1172
  }
1173
1173
  if (interaction.type === 'page_load' || interaction.type === 'transition') {
@@ -1201,7 +1201,7 @@ export function addApdex(interactionId, apdexInfo) {
1201
1201
  }
1202
1202
  }
1203
1203
  });
1204
- } catch (e) {
1204
+ } catch (_unused0) {
1205
1205
  // do nothing
1206
1206
  }
1207
1207
  if (interaction.type === 'page_load' || interaction.type === 'transition') {
@@ -1279,7 +1279,7 @@ export function addRedirect(interactionId, fromUfoName, nextUfoName, nextRouteNa
1279
1279
  }
1280
1280
  }
1281
1281
  });
1282
- } catch (e) {
1282
+ } catch (_unused1) {
1283
1283
  // do nothing
1284
1284
  }
1285
1285
  }
@@ -106,7 +106,7 @@ export function initialisePressureObserver() {
106
106
  // This prevents unhandled promise rejections from being reported to Sentry
107
107
  });
108
108
  }
109
- } catch (err) {
109
+ } catch (_unused3) {
110
110
  /* do nothing, this is a best efforts metric */
111
111
  }
112
112
  }
@@ -129,7 +129,7 @@ export function initialiseMemoryObserver() {
129
129
  }
130
130
  }, 100);
131
131
  }
132
- } catch (_unused3) {
132
+ } catch (_unused4) {
133
133
  /* do nothing, this is a best efforts metric */
134
134
  }
135
135
  }
@@ -32,7 +32,7 @@ function handleQueryParams(urlString) {
32
32
  _iterator.f();
33
33
  }
34
34
  return url.toString();
35
- } catch (e) {
35
+ } catch (_unused) {
36
36
  return urlString;
37
37
  }
38
38
  }
@@ -7,6 +7,7 @@ var _process;
7
7
  import _regeneratorRuntime from "@babel/runtime/regenerator";
8
8
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
9
9
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
10
+ import { fg } from '@atlaskit/platform-feature-flags';
10
11
  import { isVCRevisionEnabled } from '../config';
11
12
  import { VCObserverNOOP } from './no-op-vc-observer';
12
13
  import { VCObserver } from './vc-observer';
@@ -25,7 +26,8 @@ export var VCObserverWrapper = /*#__PURE__*/function () {
25
26
  this.ssrPlaceholderHandler = new SSRPlaceholderHandlers({
26
27
  enablePageLayoutPlaceholder: (_opts$ssrEnablePageLa = opts.ssrEnablePageLayoutPlaceholder) !== null && _opts$ssrEnablePageLa !== void 0 ? _opts$ssrEnablePageLa : false
27
28
  });
28
- if (isVCRevisionEnabled('fy25.03') || isVCRevisionEnabled('next')) {
29
+ var ttvcV4RevisionName = fg('platform_ufo_vcnext_to_fy26_04_revision_update') ? 'fy26.04' : 'next';
30
+ if (isVCRevisionEnabled('fy25.03') || isVCRevisionEnabled(ttvcV4RevisionName)) {
29
31
  var _opts$ssrEnablePageLa2;
30
32
  this.newVCObserver = new VCObserverNew({
31
33
  selectorConfig: opts.selectorConfig,
@@ -3,7 +3,7 @@ export function getViewportWidth() {
3
3
  var documentWidth;
4
4
  try {
5
5
  documentWidth = document.documentElement.clientWidth || 0;
6
- } catch (e) {
6
+ } catch (_unused) {
7
7
  documentWidth = 0;
8
8
  }
9
9
  return Math.max(documentWidth, window.innerWidth || 0);
@@ -13,7 +13,7 @@ export function getViewportHeight() {
13
13
  var documentHeight;
14
14
  try {
15
15
  documentHeight = document.documentElement.clientHeight || 0;
16
- } catch (e) {
16
+ } catch (_unused2) {
17
17
  documentHeight = 0;
18
18
  }
19
19
  return Math.max(documentHeight, window.innerHeight || 0);
@@ -251,7 +251,7 @@ export var Observers = /*#__PURE__*/function () {
251
251
  idString = [tagName, attrs || classList].join('');
252
252
  }
253
253
  return idString;
254
- } catch (e) {
254
+ } catch (_unused) {
255
255
  return 'error';
256
256
  }
257
257
  }
@@ -288,7 +288,7 @@ export var Observers = /*#__PURE__*/function () {
288
288
  var elementName;
289
289
  try {
290
290
  elementName = _this3.getElementName(target);
291
- } catch (e) {
291
+ } catch (_unused2) {
292
292
  elementName = 'error';
293
293
  }
294
294
  callback(data.mutation.timestamp || performance.now(), ir, elementName, target, data.type, data.ignoreReason, data.attributeName, data.oldValue, data.newValue);
@@ -101,7 +101,7 @@ export var SSRPlaceholderHandlers = /*#__PURE__*/function () {
101
101
  try {
102
102
  // Collect initial placeholders using SSR dimensions
103
103
  this.collectPlaceholdersInternal();
104
- } catch (e) {} finally {
104
+ } catch (_unused) {} finally {
105
105
  delete window.__SSR_PLACEHOLDERS_DIMENSIONS__;
106
106
  }
107
107
  }
@@ -168,7 +168,7 @@ export var SSRPlaceholderHandlers = /*#__PURE__*/function () {
168
168
  try {
169
169
  // Collect placeholders using SSR dimensions or fallback to live dimensions
170
170
  this.collectPlaceholdersInternal();
171
- } catch (e) {
171
+ } catch (_unused2) {
172
172
  // Silently fail if there are any issues
173
173
  } finally {
174
174
  delete window.__SSR_PLACEHOLDERS_DIMENSIONS__;
@@ -38,7 +38,7 @@ function getElementName(selectorConfig, element) {
38
38
  }
39
39
  try {
40
40
  return encodeURIComponent(s);
41
- } catch (e) {
41
+ } catch (_unused) {
42
42
  return 'malformed_value';
43
43
  }
44
44
  };
@@ -10,7 +10,7 @@ function isValidSelector(selector) {
10
10
  try {
11
11
  document.querySelector(selector);
12
12
  return true;
13
- } catch (err) {
13
+ } catch (_unused) {
14
14
  return false;
15
15
  }
16
16
  }
@@ -6,14 +6,15 @@ import _createClass from "@babel/runtime/helpers/createClass";
6
6
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
7
7
  import _regeneratorRuntime from "@babel/runtime/regenerator";
8
8
  import { fg } from '@atlaskit/platform-feature-flags';
9
+ import { isVCRevisionEnabled } from '../../config';
9
10
  import { getActiveInteraction } from '../../interaction-metrics';
10
11
  import { SSRPlaceholderHandlers } from '../vc-observer/observers/ssr-placeholders';
11
12
  import EntriesTimeline from './entries-timeline';
12
13
  import _getElementName from './get-element-name';
13
14
  import VCCalculator_FY25_03 from './metric-calculator/fy25_03';
15
+ import VCCalculator_FY26_04 from './metric-calculator/fy26_04';
14
16
  import getViewportHeight from './metric-calculator/utils/get-viewport-height';
15
17
  import getViewportWidth from './metric-calculator/utils/get-viewport-width';
16
- import VCNextCalculator from './metric-calculator/vcnext';
17
18
  import RawDataHandler from './raw-data-handler';
18
19
  import ViewportObserver from './viewport-observer';
19
20
  import WindowEventObserver from './window-event-observer';
@@ -241,7 +242,7 @@ var VCObserverNew = /*#__PURE__*/function () {
241
242
  key: "getVCResult",
242
243
  value: function () {
243
244
  var _getVCResult = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(param) {
244
- var start, stop, interactionId, interactionType, interactionAbortReason, isPageVisible, include3p, includeSSRRatio, excludeSmartAnswersInSearch, includeRawData, results, feVCCalculationStartTime, calculator_fy25_03, orderedEntries, fy25_03, calculator_next, vcNext, feVCCalculationEndTime, rawVCCalculationStartTime, rawHandler, raw;
245
+ var start, stop, interactionId, interactionType, interactionAbortReason, isPageVisible, include3p, includeSSRRatio, excludeSmartAnswersInSearch, includeRawData, results, feVCCalculationStartTime, calculator_fy25_03, orderedEntries, fy25_03, calculator_fy26_04, fy26_04, vcNext, _fy25_, calculator_next, _vcNext, feVCCalculationEndTime, rawVCCalculationStartTime, rawHandler, raw;
245
246
  return _regeneratorRuntime.wrap(function _callee$(_context) {
246
247
  while (1) switch (_context.prev = _context.next) {
247
248
  case 0:
@@ -257,7 +258,15 @@ var VCObserverNew = /*#__PURE__*/function () {
257
258
  start: start,
258
259
  stop: stop
259
260
  });
260
- _context.next = 9;
261
+ if (!fg('platform_ufo_vcnext_to_fy26_04_revision_update')) {
262
+ _context.next = 30;
263
+ break;
264
+ }
265
+ if (!isVCRevisionEnabled('fy25.03')) {
266
+ _context.next = 14;
267
+ break;
268
+ }
269
+ _context.next = 11;
261
270
  return calculator_fy25_03.calculate({
262
271
  orderedEntries: orderedEntries,
263
272
  startTime: start,
@@ -271,8 +280,14 @@ var VCObserverNew = /*#__PURE__*/function () {
271
280
  isPageVisible: isPageVisible,
272
281
  interactionAbortReason: interactionAbortReason
273
282
  });
274
- case 9:
275
- fy25_03 = _context.sent;
283
+ case 11:
284
+ _context.t0 = _context.sent;
285
+ _context.next = 15;
286
+ break;
287
+ case 14:
288
+ _context.t0 = null;
289
+ case 15:
290
+ fy25_03 = _context.t0;
276
291
  if (fy25_03) {
277
292
  results.push(fy25_03);
278
293
  }
@@ -282,10 +297,71 @@ var VCObserverNew = /*#__PURE__*/function () {
282
297
  if (param.ssr && !param.includeSSRInV3 && fg('platform_ufo_auto_add_ssr_entry_in_ttvc_v4')) {
283
298
  this.addSSR(param.ssr);
284
299
  }
300
+ calculator_fy26_04 = new VCCalculator_FY26_04();
301
+ if (!(isVCRevisionEnabled('fy26.04') || isVCRevisionEnabled('next'))) {
302
+ _context.next = 25;
303
+ break;
304
+ }
305
+ _context.next = 22;
306
+ return calculator_fy26_04.calculate({
307
+ orderedEntries: orderedEntries,
308
+ startTime: start,
309
+ stopTime: stop,
310
+ interactionId: interactionId,
311
+ interactionType: interactionType,
312
+ isPostInteraction: this.isPostInteraction,
313
+ include3p: include3p,
314
+ includeSSRRatio: includeSSRRatio,
315
+ isPageVisible: isPageVisible,
316
+ interactionAbortReason: interactionAbortReason
317
+ });
318
+ case 22:
319
+ _context.t1 = _context.sent;
320
+ _context.next = 26;
321
+ break;
322
+ case 25:
323
+ _context.t1 = null;
324
+ case 26:
325
+ fy26_04 = _context.t1;
326
+ if (fy26_04) {
327
+ vcNext = {
328
+ revision: 'next',
329
+ 'metric:vc90': fy26_04['metric:vc90'],
330
+ clean: fy26_04['clean']
331
+ };
332
+ results.push(fy26_04);
333
+ results.push(vcNext);
334
+ }
335
+ _context.next = 40;
336
+ break;
337
+ case 30:
338
+ _context.next = 32;
339
+ return calculator_fy25_03.calculate({
340
+ orderedEntries: orderedEntries,
341
+ startTime: start,
342
+ stopTime: stop,
343
+ interactionId: interactionId,
344
+ interactionType: interactionType,
345
+ isPostInteraction: this.isPostInteraction,
346
+ include3p: include3p,
347
+ excludeSmartAnswersInSearch: excludeSmartAnswersInSearch,
348
+ includeSSRRatio: includeSSRRatio,
349
+ isPageVisible: isPageVisible,
350
+ interactionAbortReason: interactionAbortReason
351
+ });
352
+ case 32:
353
+ _fy25_ = _context.sent;
354
+ if (_fy25_) {
355
+ results.push(_fy25_);
356
+ }
285
357
 
286
- // TODO on cleanup: put behind `enabledVCRevisions` config
287
- calculator_next = new VCNextCalculator();
288
- _context.next = 15;
358
+ // From TTVC v4 onwards, ensuring that SSR entry is always auto-added, whenever it is configured.
359
+ // From the next major version release (where TTVC v4 becomes the default TTVC version), the config for `includeSSRInV3` will be deprecated
360
+ if (param.ssr && !param.includeSSRInV3 && fg('platform_ufo_auto_add_ssr_entry_in_ttvc_v4')) {
361
+ this.addSSR(param.ssr);
362
+ }
363
+ calculator_next = new VCCalculator_FY26_04();
364
+ _context.next = 38;
289
365
  return calculator_next.calculate({
290
366
  orderedEntries: orderedEntries,
291
367
  startTime: start,
@@ -298,35 +374,37 @@ var VCObserverNew = /*#__PURE__*/function () {
298
374
  isPageVisible: isPageVisible,
299
375
  interactionAbortReason: interactionAbortReason
300
376
  });
301
- case 15:
302
- vcNext = _context.sent;
303
- if (vcNext) {
304
- results.push(vcNext);
377
+ case 38:
378
+ _vcNext = _context.sent;
379
+ if (_vcNext) {
380
+ _vcNext.revision = 'next';
381
+ results.push(_vcNext);
305
382
  }
383
+ case 40:
306
384
  feVCCalculationEndTime = performance.now();
307
385
  if (!(includeRawData && fg('platform_ufo_enable_vc_raw_data'))) {
308
- _context.next = 25;
386
+ _context.next = 48;
309
387
  break;
310
388
  }
311
389
  rawVCCalculationStartTime = performance.now();
312
390
  rawHandler = new RawDataHandler();
313
- _context.next = 23;
391
+ _context.next = 46;
314
392
  return rawHandler.getRawData({
315
393
  entries: orderedEntries,
316
394
  startTime: start,
317
395
  stopTime: stop,
318
396
  isPageVisible: isPageVisible
319
397
  });
320
- case 23:
398
+ case 46:
321
399
  raw = _context.sent;
322
400
  if (raw) {
323
401
  raw.rawVCTime = Number((performance.now() - rawVCCalculationStartTime).toFixed(2));
324
402
  raw.feVCTime = Number((feVCCalculationEndTime - feVCCalculationStartTime).toFixed(2));
325
403
  results.push(raw);
326
404
  }
327
- case 25:
405
+ case 48:
328
406
  return _context.abrupt("return", results);
329
- case 26:
407
+ case 49:
330
408
  case "end":
331
409
  return _context.stop();
332
410
  }
@@ -10,17 +10,12 @@ function _superPropGet(t, o, e, r) { var p = _get(_getPrototypeOf(1 & r ? t.prot
10
10
  import { fg } from '@atlaskit/platform-feature-flags';
11
11
  import VCCalculator_FY25_03 from '../fy25_03';
12
12
  import { KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS, NON_VISUAL_ARIA_ATTRIBUTES, THIRD_PARTY_BROWSER_EXTENSION_ATTRIBUTES } from '../utils/constants';
13
-
14
- // NOTE: `next` to be renamed `fy26.04` once stable
15
- var REVISION_NO = 'next';
16
13
  var getConsideredEntryTypes = function getConsideredEntryTypes() {
17
14
  var consideredEntryTypes = ['mutation:display-contents-children-element'];
18
15
  if (fg('platform_ufo_remove_ssr_placeholder_in_ttvc_v4')) {
19
16
  consideredEntryTypes.push('mutation:ssr-placeholder');
20
17
  }
21
- if (fg('platform_ufo_detect_zero_dimension_rectangles')) {
22
- consideredEntryTypes.push('mutation:display-contents-children-attribute');
23
- }
18
+ consideredEntryTypes.push('mutation:display-contents-children-attribute');
24
19
  return consideredEntryTypes;
25
20
  };
26
21
  var getExcludedEntryTypes = function getExcludedEntryTypes() {
@@ -30,18 +25,16 @@ var getExcludedEntryTypes = function getExcludedEntryTypes() {
30
25
  }
31
26
  return excludedEntryTypes;
32
27
  };
33
-
34
- // NOTE: `VCNext` to be renamed `FY26_04` once stable
35
- var VCNextCalculator = /*#__PURE__*/function (_VCCalculator_FY25_) {
36
- function VCNextCalculator() {
37
- _classCallCheck(this, VCNextCalculator);
38
- return _callSuper(this, VCNextCalculator, [REVISION_NO]);
28
+ var VCCalculator_FY26_04 = /*#__PURE__*/function (_VCCalculator_FY25_) {
29
+ function VCCalculator_FY26_04() {
30
+ _classCallCheck(this, VCCalculator_FY26_04);
31
+ return _callSuper(this, VCCalculator_FY26_04, ['fy26.04']);
39
32
  }
40
- _inherits(VCNextCalculator, _VCCalculator_FY25_);
41
- return _createClass(VCNextCalculator, [{
33
+ _inherits(VCCalculator_FY26_04, _VCCalculator_FY25_);
34
+ return _createClass(VCCalculator_FY26_04, [{
42
35
  key: "isEntryIncluded",
43
36
  value: function isEntryIncluded(entry, include3p) {
44
- var isEntryIncludedInV3 = _superPropGet(VCNextCalculator, "isEntryIncluded", this, 3)([entry, include3p]);
37
+ var isEntryIncludedInV3 = _superPropGet(VCCalculator_FY26_04, "isEntryIncluded", this, 3)([entry, include3p]);
45
38
  if (isEntryIncludedInV3 && !getExcludedEntryTypes().includes(entry.data.type)) {
46
39
  return true;
47
40
  }
@@ -57,4 +50,4 @@ var VCNextCalculator = /*#__PURE__*/function (_VCCalculator_FY25_) {
57
50
  }
58
51
  }]);
59
52
  }(VCCalculator_FY25_03);
60
- export { VCNextCalculator as default };
53
+ export { VCCalculator_FY26_04 as default };
@@ -3,7 +3,7 @@ function getViewportHeight() {
3
3
  var documentHeight;
4
4
  try {
5
5
  documentHeight = document.documentElement.clientHeight || 0;
6
- } catch (e) {
6
+ } catch (_unused) {
7
7
  documentHeight = 0;
8
8
  }
9
9
  return Math.max(documentHeight, window.innerHeight || 0);
@@ -3,7 +3,7 @@ function getViewportWidth() {
3
3
  var documentWidth;
4
4
  try {
5
5
  documentWidth = document.documentElement.clientWidth || 0;
6
- } catch (e) {
6
+ } catch (_unused) {
7
7
  documentWidth = 0;
8
8
  }
9
9
  return Math.max(documentWidth, window.innerWidth || 0);