@depict-ai/ui 4.8.25 → 4.8.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/ES10/index.cjs CHANGED
@@ -115,7 +115,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
115
115
  $parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
116
116
  $parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
117
117
  /*! Depict.ai search and product listing SDK */
118
- const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.8.25";
118
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.8.27";
119
119
  function $3e17e871e9d0911d$export$d9f36cf74e24d595(media_query) {
120
120
  const signal = $52FdA$solidjs.createSignal(false);
121
121
  $52FdA$solidjs.onCleanup($52FdA$depictaiutilishared.javascript_media_query(media_query, _ref => {
@@ -7652,11 +7652,12 @@ function $4692443b324db9ee$export$566cd7e46bad5c2d(callback) {
7652
7652
  * Calls the provided callback function if the browser ran for checkDuration ms without three frame dip below 20 FPS.
7653
7653
  */
7654
7654
  function $4692443b324db9ee$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips) {
7655
- const start = performance.now();
7655
+ var _globalThis$performan, _globalThis$performan2, _globalThis$performan3, _globalThis$performan4;
7656
7656
  const maxDips = 3;
7657
7657
  const noDipsBelow = 20;
7658
7658
  const fpsOverTime = [];
7659
7659
  let dipsLeft = maxDips;
7660
+ let start = performance.now();
7660
7661
  let cleanedUp = false;
7661
7662
  let lastTime;
7662
7663
  const check = () => requestAnimationFrame($52FdA$depictaiutilishared.catchify(time => {
@@ -7671,11 +7672,25 @@ function $4692443b324db9ee$var$checkForFrameDipsUntil(checkDuration, runWhenNoDi
7671
7672
  }
7672
7673
  lastTime = time;
7673
7674
  if (time <= start + checkDuration) check();else {
7675
+ if (fpsOverTime.length < checkDuration / 1000 * noDipsBelow) {
7676
+ $52FdA$depictaiutilishared.dlog("Not enough FPS data to determine if we should short-circuit requestIdleCallback, rIC seems legit. FPS:", fpsOverTime);
7677
+ return;
7678
+ }
7674
7679
  $52FdA$depictaiutilishared.dlog("Short-circuiting requestIdleCallback (probably bugged) due to only ", maxDips - dipsLeft, " dips below ", noDipsBelow, " FPS for ", checkDuration, "ms. FPS:", fpsOverTime);
7675
7680
  runWhenNoDips();
7676
7681
  }
7677
7682
  }));
7678
- check();
7683
+ // If page hasn't loaded yet, wait for it to load before starting the check
7684
+ // This is because the first few frames until the load event are usually slower
7685
+ const page_hasnt_loaded =
7686
+ // @ts-ignore
7687
+ (globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$performan = globalThis.performance) === null || _globalThis$performan === void 0 ? void 0 : (_globalThis$performan2 = _globalThis$performan.getEntriesByType) === null || _globalThis$performan2 === void 0 ? void 0 : (_globalThis$performan3 = _globalThis$performan2.call(_globalThis$performan, "navigation")) === null || _globalThis$performan3 === void 0 ? void 0 : (_globalThis$performan4 = _globalThis$performan3.every) === null || _globalThis$performan4 === void 0 ? void 0 : _globalThis$performan4.call(_globalThis$performan3, e => e === null || e === void 0 ? void 0 : e.loadEventEnd)) === false;
7688
+ if (page_hasnt_loaded) addEventListener("load", () => {
7689
+ start = performance.now();
7690
+ check();
7691
+ }, {
7692
+ once: true
7693
+ });else check();
7679
7694
  return () => cleanedUp = true;
7680
7695
  }
7681
7696
  const $858fdcf73148519f$var$onIdleFunctionsSymbol = /*@__PURE__*/Symbol("onIdleFunctions");
package/ES10/index.d.ts CHANGED
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
11
11
  import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
12
12
  import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
13
13
  import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
14
- export const version = "4.8.25";
14
+ export const version = "4.8.27";
15
15
  /**
16
16
  * Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
17
17
  */
package/ES10/index.js CHANGED
@@ -10,7 +10,7 @@ import $8tj43$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpe
10
10
  /*! Depict.ai search and product listing SDK */
11
11
  import { register_es_version } from "../multi_import_deduplicator.mjs";
12
12
  register_es_version("ui", "ES10");
13
- const $8db9a15135765c11$export$83d89fbfd8236492 = "4.8.25";
13
+ const $8db9a15135765c11$export$83d89fbfd8236492 = "4.8.27";
14
14
  function $00a5b94f0c11efbb$export$d9f36cf74e24d595(media_query) {
15
15
  const signal = $8tj43$createSignal(false);
16
16
  $8tj43$onCleanup($8tj43$javascript_media_query(media_query, _ref => {
@@ -7547,11 +7547,12 @@ function $29b3cf99ce390e3b$export$566cd7e46bad5c2d(callback) {
7547
7547
  * Calls the provided callback function if the browser ran for checkDuration ms without three frame dip below 20 FPS.
7548
7548
  */
7549
7549
  function $29b3cf99ce390e3b$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips) {
7550
- const start = performance.now();
7550
+ var _globalThis$performan, _globalThis$performan2, _globalThis$performan3, _globalThis$performan4;
7551
7551
  const maxDips = 3;
7552
7552
  const noDipsBelow = 20;
7553
7553
  const fpsOverTime = [];
7554
7554
  let dipsLeft = maxDips;
7555
+ let start = performance.now();
7555
7556
  let cleanedUp = false;
7556
7557
  let lastTime;
7557
7558
  const check = () => requestAnimationFrame($8tj43$catchify1(time => {
@@ -7566,11 +7567,25 @@ function $29b3cf99ce390e3b$var$checkForFrameDipsUntil(checkDuration, runWhenNoDi
7566
7567
  }
7567
7568
  lastTime = time;
7568
7569
  if (time <= start + checkDuration) check();else {
7570
+ if (fpsOverTime.length < checkDuration / 1000 * noDipsBelow) {
7571
+ $8tj43$dlog("Not enough FPS data to determine if we should short-circuit requestIdleCallback, rIC seems legit. FPS:", fpsOverTime);
7572
+ return;
7573
+ }
7569
7574
  $8tj43$dlog("Short-circuiting requestIdleCallback (probably bugged) due to only ", maxDips - dipsLeft, " dips below ", noDipsBelow, " FPS for ", checkDuration, "ms. FPS:", fpsOverTime);
7570
7575
  runWhenNoDips();
7571
7576
  }
7572
7577
  }));
7573
- check();
7578
+ // If page hasn't loaded yet, wait for it to load before starting the check
7579
+ // This is because the first few frames until the load event are usually slower
7580
+ const page_hasnt_loaded =
7581
+ // @ts-ignore
7582
+ (globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$performan = globalThis.performance) === null || _globalThis$performan === void 0 ? void 0 : (_globalThis$performan2 = _globalThis$performan.getEntriesByType) === null || _globalThis$performan2 === void 0 ? void 0 : (_globalThis$performan3 = _globalThis$performan2.call(_globalThis$performan, "navigation")) === null || _globalThis$performan3 === void 0 ? void 0 : (_globalThis$performan4 = _globalThis$performan3.every) === null || _globalThis$performan4 === void 0 ? void 0 : _globalThis$performan4.call(_globalThis$performan3, e => e === null || e === void 0 ? void 0 : e.loadEventEnd)) === false;
7583
+ if (page_hasnt_loaded) addEventListener("load", () => {
7584
+ start = performance.now();
7585
+ check();
7586
+ }, {
7587
+ once: true
7588
+ });else check();
7574
7589
  return () => cleanedUp = true;
7575
7590
  }
7576
7591
  const $56047603f9d212b6$var$onIdleFunctionsSymbol = /*@__PURE__*/Symbol("onIdleFunctions");
package/latest/index.cjs CHANGED
@@ -109,7 +109,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $1f4925833f07df29$export$5b7
109
109
  $parcel$export(module.exports, "QuickLinks", () => $1f4925833f07df29$export$de035477d6fef996);
110
110
  $parcel$export(module.exports, "CategoryPage", () => $14f289047713d67a$export$e2bf8ce7779e827e);
111
111
  /*! Depict.ai search and product listing SDK */
112
- const $b757f75811f3261f$export$83d89fbfd8236492 = "4.8.25";
112
+ const $b757f75811f3261f$export$83d89fbfd8236492 = "4.8.27";
113
113
  function $b54e6192d0caa293$export$d9f36cf74e24d595(media_query) {
114
114
  const signal = $gVhhF$solidjs.createSignal(false);
115
115
  $gVhhF$solidjs.onCleanup($gVhhF$depictaiutilishared.javascript_media_query(media_query, ({
@@ -7236,11 +7236,11 @@ function $7ea61486b66872b6$export$566cd7e46bad5c2d(callback) {
7236
7236
  * Calls the provided callback function if the browser ran for checkDuration ms without three frame dip below 20 FPS.
7237
7237
  */
7238
7238
  function $7ea61486b66872b6$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips) {
7239
- const start = performance.now();
7240
7239
  const maxDips = 3;
7241
7240
  const noDipsBelow = 20;
7242
7241
  const fpsOverTime = [];
7243
7242
  let dipsLeft = maxDips;
7243
+ let start = performance.now();
7244
7244
  let cleanedUp = false;
7245
7245
  let lastTime;
7246
7246
  const check = () => requestAnimationFrame($gVhhF$depictaiutilishared.catchify(time => {
@@ -7255,11 +7255,25 @@ function $7ea61486b66872b6$var$checkForFrameDipsUntil(checkDuration, runWhenNoDi
7255
7255
  }
7256
7256
  lastTime = time;
7257
7257
  if (time <= start + checkDuration) check();else {
7258
+ if (fpsOverTime.length < checkDuration / 1000 * noDipsBelow) {
7259
+ $gVhhF$depictaiutilishared.dlog("Not enough FPS data to determine if we should short-circuit requestIdleCallback, rIC seems legit. FPS:", fpsOverTime);
7260
+ return;
7261
+ }
7258
7262
  $gVhhF$depictaiutilishared.dlog("Short-circuiting requestIdleCallback (probably bugged) due to only ", maxDips - dipsLeft, " dips below ", noDipsBelow, " FPS for ", checkDuration, "ms. FPS:", fpsOverTime);
7259
7263
  runWhenNoDips();
7260
7264
  }
7261
7265
  }));
7262
- check();
7266
+ // If page hasn't loaded yet, wait for it to load before starting the check
7267
+ // This is because the first few frames until the load event are usually slower
7268
+ const page_hasnt_loaded =
7269
+ // @ts-ignore
7270
+ globalThis?.performance?.getEntriesByType?.("navigation")?.every?.(e => e?.loadEventEnd) === false;
7271
+ if (page_hasnt_loaded) addEventListener("load", () => {
7272
+ start = performance.now();
7273
+ check();
7274
+ }, {
7275
+ once: true
7276
+ });else check();
7263
7277
  return () => cleanedUp = true;
7264
7278
  }
7265
7279
  const $19950faaac026e09$var$onIdleFunctionsSymbol = /*@__PURE__*/Symbol("onIdleFunctions");
package/latest/index.d.ts CHANGED
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
11
11
  import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
12
12
  import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
13
13
  import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
14
- export const version = "4.8.25";
14
+ export const version = "4.8.27";
15
15
  /**
16
16
  * Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
17
17
  */
package/latest/index.js CHANGED
@@ -7,7 +7,7 @@ import { createStore as $9HbP8$createStore, reconcile as $9HbP8$reconcile } from
7
7
  /*! Depict.ai search and product listing SDK */
8
8
  import { register_es_version } from "../multi_import_deduplicator.mjs";
9
9
  register_es_version("ui", "latest");
10
- const $ec291e0010116877$export$83d89fbfd8236492 = "4.8.25";
10
+ const $ec291e0010116877$export$83d89fbfd8236492 = "4.8.27";
11
11
  function $dc9262ef6f786812$export$d9f36cf74e24d595(media_query) {
12
12
  const signal = $9HbP8$createSignal(false);
13
13
  $9HbP8$onCleanup($9HbP8$javascript_media_query(media_query, ({
@@ -7134,11 +7134,11 @@ function $f71681eb5d5aae0a$export$566cd7e46bad5c2d(callback) {
7134
7134
  * Calls the provided callback function if the browser ran for checkDuration ms without three frame dip below 20 FPS.
7135
7135
  */
7136
7136
  function $f71681eb5d5aae0a$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips) {
7137
- const start = performance.now();
7138
7137
  const maxDips = 3;
7139
7138
  const noDipsBelow = 20;
7140
7139
  const fpsOverTime = [];
7141
7140
  let dipsLeft = maxDips;
7141
+ let start = performance.now();
7142
7142
  let cleanedUp = false;
7143
7143
  let lastTime;
7144
7144
  const check = () => requestAnimationFrame($9HbP8$catchify1(time => {
@@ -7153,11 +7153,25 @@ function $f71681eb5d5aae0a$var$checkForFrameDipsUntil(checkDuration, runWhenNoDi
7153
7153
  }
7154
7154
  lastTime = time;
7155
7155
  if (time <= start + checkDuration) check();else {
7156
+ if (fpsOverTime.length < checkDuration / 1000 * noDipsBelow) {
7157
+ $9HbP8$dlog("Not enough FPS data to determine if we should short-circuit requestIdleCallback, rIC seems legit. FPS:", fpsOverTime);
7158
+ return;
7159
+ }
7156
7160
  $9HbP8$dlog("Short-circuiting requestIdleCallback (probably bugged) due to only ", maxDips - dipsLeft, " dips below ", noDipsBelow, " FPS for ", checkDuration, "ms. FPS:", fpsOverTime);
7157
7161
  runWhenNoDips();
7158
7162
  }
7159
7163
  }));
7160
- check();
7164
+ // If page hasn't loaded yet, wait for it to load before starting the check
7165
+ // This is because the first few frames until the load event are usually slower
7166
+ const page_hasnt_loaded =
7167
+ // @ts-ignore
7168
+ globalThis?.performance?.getEntriesByType?.("navigation")?.every?.(e => e?.loadEventEnd) === false;
7169
+ if (page_hasnt_loaded) addEventListener("load", () => {
7170
+ start = performance.now();
7171
+ check();
7172
+ }, {
7173
+ once: true
7174
+ });else check();
7161
7175
  return () => cleanedUp = true;
7162
7176
  }
7163
7177
  const $e8ffe11ed01df0fe$var$onIdleFunctionsSymbol = /*@__PURE__*/Symbol("onIdleFunctions");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depict-ai/ui",
3
- "version": "4.8.25",
3
+ "version": "4.8.27",
4
4
  "description": "Base package containing the actual UI of Depict UI along with translations, with a not-simplified API. We recommend using @depict-ai/js-ui or @depict-ai/react-ui instead.",
5
5
  "packageManager": "yarn@3.2.2",
6
6
  "sass": "styles.scss",
@@ -115,7 +115,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
115
115
  $parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
116
116
  $parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
117
117
  /*! Depict.ai search and product listing SDK */
118
- const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.8.25";
118
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.8.27";
119
119
  function $3e17e871e9d0911d$export$d9f36cf74e24d595(media_query) {
120
120
  const signal = $3hooq$solidjs.createSignal(false);
121
121
  $3hooq$solidjs.onCleanup($3hooq$depictaiutilishared.javascript_media_query(media_query, _ref => {
@@ -6237,11 +6237,12 @@ function $4692443b324db9ee$export$566cd7e46bad5c2d(callback) {
6237
6237
  * Calls the provided callback function if the browser ran for checkDuration ms without three frame dip below 20 FPS.
6238
6238
  */
6239
6239
  function $4692443b324db9ee$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips) {
6240
- const start = performance.now();
6240
+ var _globalThis$performan, _globalThis$performan2, _globalThis$performan3, _globalThis$performan4;
6241
6241
  const maxDips = 3;
6242
6242
  const noDipsBelow = 20;
6243
6243
  const fpsOverTime = [];
6244
6244
  let dipsLeft = maxDips;
6245
+ let start = performance.now();
6245
6246
  let cleanedUp = false;
6246
6247
  let lastTime;
6247
6248
  const check = () => requestAnimationFrame($3hooq$depictaiutilishared.catchify(time => {
@@ -6256,11 +6257,25 @@ function $4692443b324db9ee$var$checkForFrameDipsUntil(checkDuration, runWhenNoDi
6256
6257
  }
6257
6258
  lastTime = time;
6258
6259
  if (time <= start + checkDuration) check();else {
6260
+ if (fpsOverTime.length < checkDuration / 1000 * noDipsBelow) {
6261
+ $3hooq$depictaiutilishared.dlog("Not enough FPS data to determine if we should short-circuit requestIdleCallback, rIC seems legit. FPS:", fpsOverTime);
6262
+ return;
6263
+ }
6259
6264
  $3hooq$depictaiutilishared.dlog("Short-circuiting requestIdleCallback (probably bugged) due to only ", maxDips - dipsLeft, " dips below ", noDipsBelow, " FPS for ", checkDuration, "ms. FPS:", fpsOverTime);
6260
6265
  runWhenNoDips();
6261
6266
  }
6262
6267
  }));
6263
- check();
6268
+ // If page hasn't loaded yet, wait for it to load before starting the check
6269
+ // This is because the first few frames until the load event are usually slower
6270
+ const page_hasnt_loaded =
6271
+ // @ts-ignore
6272
+ (globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$performan = globalThis.performance) === null || _globalThis$performan === void 0 ? void 0 : (_globalThis$performan2 = _globalThis$performan.getEntriesByType) === null || _globalThis$performan2 === void 0 ? void 0 : (_globalThis$performan3 = _globalThis$performan2.call(_globalThis$performan, "navigation")) === null || _globalThis$performan3 === void 0 ? void 0 : (_globalThis$performan4 = _globalThis$performan3.every) === null || _globalThis$performan4 === void 0 ? void 0 : _globalThis$performan4.call(_globalThis$performan3, e => e === null || e === void 0 ? void 0 : e.loadEventEnd)) === false;
6273
+ if (page_hasnt_loaded) addEventListener("load", () => {
6274
+ start = performance.now();
6275
+ check();
6276
+ }, {
6277
+ once: true
6278
+ });else check();
6264
6279
  return () => cleanedUp = true;
6265
6280
  }
6266
6281
  const $858fdcf73148519f$var$onIdleFunctionsSymbol = /*@__PURE__*/Symbol("onIdleFunctions");
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
11
11
  import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
12
12
  import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
13
13
  import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
14
- export const version = "4.8.25";
14
+ export const version = "4.8.27";
15
15
  /**
16
16
  * Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
17
17
  */
@@ -10,7 +10,7 @@ import $b8hua$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpe
10
10
  /*! Depict.ai search and product listing SDK */
11
11
  import { register_es_version } from "../../multi_import_deduplicator.mjs";
12
12
  register_es_version("ui", "ES10");
13
- const $8db9a15135765c11$export$83d89fbfd8236492 = "4.8.25";
13
+ const $8db9a15135765c11$export$83d89fbfd8236492 = "4.8.27";
14
14
  function $00a5b94f0c11efbb$export$d9f36cf74e24d595(media_query) {
15
15
  const signal = $b8hua$createSignal(false);
16
16
  $b8hua$onCleanup($b8hua$javascript_media_query(media_query, _ref => {
@@ -6132,11 +6132,12 @@ function $29b3cf99ce390e3b$export$566cd7e46bad5c2d(callback) {
6132
6132
  * Calls the provided callback function if the browser ran for checkDuration ms without three frame dip below 20 FPS.
6133
6133
  */
6134
6134
  function $29b3cf99ce390e3b$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips) {
6135
- const start = performance.now();
6135
+ var _globalThis$performan, _globalThis$performan2, _globalThis$performan3, _globalThis$performan4;
6136
6136
  const maxDips = 3;
6137
6137
  const noDipsBelow = 20;
6138
6138
  const fpsOverTime = [];
6139
6139
  let dipsLeft = maxDips;
6140
+ let start = performance.now();
6140
6141
  let cleanedUp = false;
6141
6142
  let lastTime;
6142
6143
  const check = () => requestAnimationFrame($b8hua$catchify1(time => {
@@ -6151,11 +6152,25 @@ function $29b3cf99ce390e3b$var$checkForFrameDipsUntil(checkDuration, runWhenNoDi
6151
6152
  }
6152
6153
  lastTime = time;
6153
6154
  if (time <= start + checkDuration) check();else {
6155
+ if (fpsOverTime.length < checkDuration / 1000 * noDipsBelow) {
6156
+ $b8hua$dlog("Not enough FPS data to determine if we should short-circuit requestIdleCallback, rIC seems legit. FPS:", fpsOverTime);
6157
+ return;
6158
+ }
6154
6159
  $b8hua$dlog("Short-circuiting requestIdleCallback (probably bugged) due to only ", maxDips - dipsLeft, " dips below ", noDipsBelow, " FPS for ", checkDuration, "ms. FPS:", fpsOverTime);
6155
6160
  runWhenNoDips();
6156
6161
  }
6157
6162
  }));
6158
- check();
6163
+ // If page hasn't loaded yet, wait for it to load before starting the check
6164
+ // This is because the first few frames until the load event are usually slower
6165
+ const page_hasnt_loaded =
6166
+ // @ts-ignore
6167
+ (globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$performan = globalThis.performance) === null || _globalThis$performan === void 0 ? void 0 : (_globalThis$performan2 = _globalThis$performan.getEntriesByType) === null || _globalThis$performan2 === void 0 ? void 0 : (_globalThis$performan3 = _globalThis$performan2.call(_globalThis$performan, "navigation")) === null || _globalThis$performan3 === void 0 ? void 0 : (_globalThis$performan4 = _globalThis$performan3.every) === null || _globalThis$performan4 === void 0 ? void 0 : _globalThis$performan4.call(_globalThis$performan3, e => e === null || e === void 0 ? void 0 : e.loadEventEnd)) === false;
6168
+ if (page_hasnt_loaded) addEventListener("load", () => {
6169
+ start = performance.now();
6170
+ check();
6171
+ }, {
6172
+ once: true
6173
+ });else check();
6159
6174
  return () => cleanedUp = true;
6160
6175
  }
6161
6176
  const $56047603f9d212b6$var$onIdleFunctionsSymbol = /*@__PURE__*/Symbol("onIdleFunctions");
@@ -109,7 +109,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $1f4925833f07df29$export$5b7
109
109
  $parcel$export(module.exports, "QuickLinks", () => $1f4925833f07df29$export$de035477d6fef996);
110
110
  $parcel$export(module.exports, "CategoryPage", () => $14f289047713d67a$export$e2bf8ce7779e827e);
111
111
  /*! Depict.ai search and product listing SDK */
112
- const $b757f75811f3261f$export$83d89fbfd8236492 = "4.8.25";
112
+ const $b757f75811f3261f$export$83d89fbfd8236492 = "4.8.27";
113
113
  function $b54e6192d0caa293$export$d9f36cf74e24d595(media_query) {
114
114
  const signal = $5vyXB$solidjs.createSignal(false);
115
115
  $5vyXB$solidjs.onCleanup($5vyXB$depictaiutilishared.javascript_media_query(media_query, ({
@@ -5874,11 +5874,11 @@ function $7ea61486b66872b6$export$566cd7e46bad5c2d(callback) {
5874
5874
  * Calls the provided callback function if the browser ran for checkDuration ms without three frame dip below 20 FPS.
5875
5875
  */
5876
5876
  function $7ea61486b66872b6$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips) {
5877
- const start = performance.now();
5878
5877
  const maxDips = 3;
5879
5878
  const noDipsBelow = 20;
5880
5879
  const fpsOverTime = [];
5881
5880
  let dipsLeft = maxDips;
5881
+ let start = performance.now();
5882
5882
  let cleanedUp = false;
5883
5883
  let lastTime;
5884
5884
  const check = () => requestAnimationFrame($5vyXB$depictaiutilishared.catchify(time => {
@@ -5893,11 +5893,25 @@ function $7ea61486b66872b6$var$checkForFrameDipsUntil(checkDuration, runWhenNoDi
5893
5893
  }
5894
5894
  lastTime = time;
5895
5895
  if (time <= start + checkDuration) check();else {
5896
+ if (fpsOverTime.length < checkDuration / 1000 * noDipsBelow) {
5897
+ $5vyXB$depictaiutilishared.dlog("Not enough FPS data to determine if we should short-circuit requestIdleCallback, rIC seems legit. FPS:", fpsOverTime);
5898
+ return;
5899
+ }
5896
5900
  $5vyXB$depictaiutilishared.dlog("Short-circuiting requestIdleCallback (probably bugged) due to only ", maxDips - dipsLeft, " dips below ", noDipsBelow, " FPS for ", checkDuration, "ms. FPS:", fpsOverTime);
5897
5901
  runWhenNoDips();
5898
5902
  }
5899
5903
  }));
5900
- check();
5904
+ // If page hasn't loaded yet, wait for it to load before starting the check
5905
+ // This is because the first few frames until the load event are usually slower
5906
+ const page_hasnt_loaded =
5907
+ // @ts-ignore
5908
+ globalThis?.performance?.getEntriesByType?.("navigation")?.every?.(e => e?.loadEventEnd) === false;
5909
+ if (page_hasnt_loaded) addEventListener("load", () => {
5910
+ start = performance.now();
5911
+ check();
5912
+ }, {
5913
+ once: true
5914
+ });else check();
5901
5915
  return () => cleanedUp = true;
5902
5916
  }
5903
5917
  const $19950faaac026e09$var$onIdleFunctionsSymbol = /*@__PURE__*/Symbol("onIdleFunctions");
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
11
11
  import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
12
12
  import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
13
13
  import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
14
- export const version = "4.8.25";
14
+ export const version = "4.8.27";
15
15
  /**
16
16
  * Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
17
17
  */
@@ -7,7 +7,7 @@ import { createStore as $i7OB2$createStore, reconcile as $i7OB2$reconcile } from
7
7
  /*! Depict.ai search and product listing SDK */
8
8
  import { register_es_version } from "../../multi_import_deduplicator.mjs";
9
9
  register_es_version("ui", "latest");
10
- const $ec291e0010116877$export$83d89fbfd8236492 = "4.8.25";
10
+ const $ec291e0010116877$export$83d89fbfd8236492 = "4.8.27";
11
11
  function $dc9262ef6f786812$export$d9f36cf74e24d595(media_query) {
12
12
  const signal = $i7OB2$createSignal(false);
13
13
  $i7OB2$onCleanup($i7OB2$javascript_media_query(media_query, ({
@@ -5772,11 +5772,11 @@ function $f71681eb5d5aae0a$export$566cd7e46bad5c2d(callback) {
5772
5772
  * Calls the provided callback function if the browser ran for checkDuration ms without three frame dip below 20 FPS.
5773
5773
  */
5774
5774
  function $f71681eb5d5aae0a$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips) {
5775
- const start = performance.now();
5776
5775
  const maxDips = 3;
5777
5776
  const noDipsBelow = 20;
5778
5777
  const fpsOverTime = [];
5779
5778
  let dipsLeft = maxDips;
5779
+ let start = performance.now();
5780
5780
  let cleanedUp = false;
5781
5781
  let lastTime;
5782
5782
  const check = () => requestAnimationFrame($i7OB2$catchify1(time => {
@@ -5791,11 +5791,25 @@ function $f71681eb5d5aae0a$var$checkForFrameDipsUntil(checkDuration, runWhenNoDi
5791
5791
  }
5792
5792
  lastTime = time;
5793
5793
  if (time <= start + checkDuration) check();else {
5794
+ if (fpsOverTime.length < checkDuration / 1000 * noDipsBelow) {
5795
+ $i7OB2$dlog("Not enough FPS data to determine if we should short-circuit requestIdleCallback, rIC seems legit. FPS:", fpsOverTime);
5796
+ return;
5797
+ }
5794
5798
  $i7OB2$dlog("Short-circuiting requestIdleCallback (probably bugged) due to only ", maxDips - dipsLeft, " dips below ", noDipsBelow, " FPS for ", checkDuration, "ms. FPS:", fpsOverTime);
5795
5799
  runWhenNoDips();
5796
5800
  }
5797
5801
  }));
5798
- check();
5802
+ // If page hasn't loaded yet, wait for it to load before starting the check
5803
+ // This is because the first few frames until the load event are usually slower
5804
+ const page_hasnt_loaded =
5805
+ // @ts-ignore
5806
+ globalThis?.performance?.getEntriesByType?.("navigation")?.every?.(e => e?.loadEventEnd) === false;
5807
+ if (page_hasnt_loaded) addEventListener("load", () => {
5808
+ start = performance.now();
5809
+ check();
5810
+ }, {
5811
+ once: true
5812
+ });else check();
5799
5813
  return () => cleanedUp = true;
5800
5814
  }
5801
5815
  const $e8ffe11ed01df0fe$var$onIdleFunctionsSymbol = /*@__PURE__*/Symbol("onIdleFunctions");