@depict-ai/utilishared 2.0.6 → 2.0.8

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
@@ -274,7 +274,7 @@ $parcel$export(module.exports, "version", () => $ce0ab19b284b64fa$export$83d89fb
274
274
  $parcel$export(module.exports, "add_to_version_info", () => $045fb30107c9eecc$export$2cefb7e61fcbae00);
275
275
  $parcel$export(module.exports, "sync_el_content_with_accessor", () => $84d13ab567309a50$export$c3f56a35e076f139);
276
276
  $parcel$export(module.exports, "use_href_accessor", () => $59b7011b96010a8e$export$e35115e6d0715f77);
277
- const $ce0ab19b284b64fa$export$83d89fbfd8236492 = "2.0.6";
277
+ const $ce0ab19b284b64fa$export$83d89fbfd8236492 = "2.0.8";
278
278
  const $9e9538f4aff6f83c$export$55fe61489d2c7417 = /*@__PURE__*/((_globalThis$document, _globalThis$document$, _globalThis$document$2, _globalThis$localStor, _globalThis$localStor2) => process.env.STRIP_DEBUG === "true" ? false : process.env.DEBUG === "true" || process.env.NODE_ENV === "development" || process.env.BUILD_TARGET !== "node" && ((globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : (_globalThis$document$ = _globalThis$document.currentScript) === null || _globalThis$document$ === void 0 ? void 0 : (_globalThis$document$2 = _globalThis$document$.dataset) === null || _globalThis$document$2 === void 0 ? void 0 : _globalThis$document$2.debug) === "true" || (globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$localStor = globalThis.localStorage) === null || _globalThis$localStor === void 0 ? void 0 : (_globalThis$localStor2 = _globalThis$localStor.getItem) === null || _globalThis$localStor2 === void 0 ? void 0 : _globalThis$localStor2.call(_globalThis$localStor, "debug")) === "true"))();
279
279
  const $7f95f77417d06249$var$browser_prefix_styling = "color: #fff;";
280
280
  let $7f95f77417d06249$var$browser_prefix = "[Depict]";
@@ -3454,11 +3454,15 @@ async function $8f0b9bb45dd059c3$export$bcd70d5ed1cf6313(url, options) {
3454
3454
  let result = false;
3455
3455
  while (max_retries && !has_succeeded) try {
3456
3456
  const response = await fetch(url, options);
3457
- if (!response || !response.ok || response.status !== 200) {
3458
- if (response.status === 422) {
3459
- $3b52ccc10510b32a$export$b3bbfd758f11cfa9($8f0b9bb45dd059c3$var$send_sentry_422)(response, (options === null || options === void 0 ? void 0 : options.body) || {}, stack);
3457
+ const {
3458
+ status: status,
3459
+ ok: ok
3460
+ } = response;
3461
+ if (!response || !ok || status !== 200) {
3462
+ if (status >= 400 && status < 500) {
3463
+ $3b52ccc10510b32a$export$b3bbfd758f11cfa9($8f0b9bb45dd059c3$var$send_sentry_4xx)(response, (options === null || options === void 0 ? void 0 : options.body) || {}, stack);
3460
3464
  has_succeeded = true;
3461
- } else if (response.status === 404) has_succeeded = true;
3465
+ } else if (status === 404) has_succeeded = true;
3462
3466
  $7f95f77417d06249$export$de56f1198d121036("Response not ok", response);
3463
3467
  } else has_succeeded = true;
3464
3468
  result = response;
@@ -3473,8 +3477,8 @@ async function $8f0b9bb45dd059c3$export$bcd70d5ed1cf6313(url, options) {
3473
3477
  }
3474
3478
  return result;
3475
3479
  }
3476
- async function $8f0b9bb45dd059c3$var$send_sentry_422(response, body, stack) {
3477
- const msg = "Validation error: got 422 from API";
3480
+ async function $8f0b9bb45dd059c3$var$send_sentry_4xx(response, body, stack) {
3481
+ const msg = "Validation error: got 4XX from API";
3478
3482
  const text = await response.clone().text();
3479
3483
  $7f95f77417d06249$export$de56f1198d121036(msg, "body", body, "response", response, "text", text, "stack", stack);
3480
3484
  (0, $902c0e005afb7319$export$af2e17a20c2ea3c5).withScope(function (scope) {
package/ES10/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { JSX, Accessor } from "solid-js";
2
- export const version = "2.0.6";
2
+ export const version = "2.0.7";
3
3
  export const is_debug: boolean;
4
4
  /**
5
5
  * Sets the prefix of dlog, dwarn, and derror messages in the browser console. Defaults to `[Depict]`.
package/ES10/index.js CHANGED
@@ -16,7 +16,7 @@ function $parcel$export(e, n, v, s) {
16
16
  function $parcel$interopDefault(a) {
17
17
  return a && a.__esModule ? a.default : a;
18
18
  }
19
- const $b9e07ce3c67aa344$export$83d89fbfd8236492 = "2.0.6";
19
+ const $b9e07ce3c67aa344$export$83d89fbfd8236492 = "2.0.8";
20
20
  const $a5a2bdb4ae93374b$export$55fe61489d2c7417 = /*@__PURE__*/((_globalThis$document, _globalThis$document$, _globalThis$document$2, _globalThis$localStor, _globalThis$localStor2) => process.env.STRIP_DEBUG === "true" ? false : process.env.DEBUG === "true" || process.env.NODE_ENV === "development" || process.env.BUILD_TARGET !== "node" && ((globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : (_globalThis$document$ = _globalThis$document.currentScript) === null || _globalThis$document$ === void 0 ? void 0 : (_globalThis$document$2 = _globalThis$document$.dataset) === null || _globalThis$document$2 === void 0 ? void 0 : _globalThis$document$2.debug) === "true" || (globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$localStor = globalThis.localStorage) === null || _globalThis$localStor === void 0 ? void 0 : (_globalThis$localStor2 = _globalThis$localStor.getItem) === null || _globalThis$localStor2 === void 0 ? void 0 : _globalThis$localStor2.call(_globalThis$localStor, "debug")) === "true"))();
21
21
  const $241f2f02cc612a49$var$browser_prefix_styling = "color: #fff;";
22
22
  let $241f2f02cc612a49$var$browser_prefix = "[Depict]";
@@ -3196,11 +3196,15 @@ async function $c95f8181bad32e8d$export$bcd70d5ed1cf6313(url, options) {
3196
3196
  let result = false;
3197
3197
  while (max_retries && !has_succeeded) try {
3198
3198
  const response = await fetch(url, options);
3199
- if (!response || !response.ok || response.status !== 200) {
3200
- if (response.status === 422) {
3201
- $5e1f45affc1d7def$export$b3bbfd758f11cfa9($c95f8181bad32e8d$var$send_sentry_422)(response, (options === null || options === void 0 ? void 0 : options.body) || {}, stack);
3199
+ const {
3200
+ status: status,
3201
+ ok: ok
3202
+ } = response;
3203
+ if (!response || !ok || status !== 200) {
3204
+ if (status >= 400 && status < 500) {
3205
+ $5e1f45affc1d7def$export$b3bbfd758f11cfa9($c95f8181bad32e8d$var$send_sentry_4xx)(response, (options === null || options === void 0 ? void 0 : options.body) || {}, stack);
3202
3206
  has_succeeded = true;
3203
- } else if (response.status === 404) has_succeeded = true;
3207
+ } else if (status === 404) has_succeeded = true;
3204
3208
  $241f2f02cc612a49$export$de56f1198d121036("Response not ok", response);
3205
3209
  } else has_succeeded = true;
3206
3210
  result = response;
@@ -3215,8 +3219,8 @@ async function $c95f8181bad32e8d$export$bcd70d5ed1cf6313(url, options) {
3215
3219
  }
3216
3220
  return result;
3217
3221
  }
3218
- async function $c95f8181bad32e8d$var$send_sentry_422(response, body, stack) {
3219
- const msg = "Validation error: got 422 from API";
3222
+ async function $c95f8181bad32e8d$var$send_sentry_4xx(response, body, stack) {
3223
+ const msg = "Validation error: got 4XX from API";
3220
3224
  const text = await response.clone().text();
3221
3225
  $241f2f02cc612a49$export$de56f1198d121036(msg, "body", body, "response", response, "text", text, "stack", stack);
3222
3226
  (0, $17bb552dedcd526c$export$af2e17a20c2ea3c5).withScope(function (scope) {
package/latest/index.cjs CHANGED
@@ -271,7 +271,7 @@ $parcel$export(module.exports, "version", () => $815f67c61b4c0a42$export$83d89fb
271
271
  $parcel$export(module.exports, "add_to_version_info", () => $e4a18bf12ad092d9$export$2cefb7e61fcbae00);
272
272
  $parcel$export(module.exports, "sync_el_content_with_accessor", () => $35303d72263038db$export$c3f56a35e076f139);
273
273
  $parcel$export(module.exports, "use_href_accessor", () => $da35c7e27be2a442$export$e35115e6d0715f77);
274
- const $815f67c61b4c0a42$export$83d89fbfd8236492 = "2.0.6";
274
+ const $815f67c61b4c0a42$export$83d89fbfd8236492 = "2.0.8";
275
275
  const $7b5e577a60b81e60$export$55fe61489d2c7417 = /*@__PURE__*/(() => process.env.STRIP_DEBUG === "true" ? false : process.env.DEBUG === "true" || process.env.NODE_ENV === "development" || process.env.BUILD_TARGET !== "node" && (globalThis?.document?.currentScript?.dataset?.debug === "true" || globalThis?.localStorage?.getItem?.("debug") === "true"))();
276
276
  const $e6c6e7929ea385ae$var$browser_prefix_styling = "color: #fff;";
277
277
  let $e6c6e7929ea385ae$var$browser_prefix = "[Depict]";
@@ -3125,11 +3125,15 @@ async function $d2fc3fb450961938$export$bcd70d5ed1cf6313(url, options, max_retri
3125
3125
  let result = false;
3126
3126
  while (max_retries && !has_succeeded) try {
3127
3127
  const response = await fetch(url, options);
3128
- if (!response || !response.ok || response.status !== 200) {
3129
- if (response.status === 422) {
3130
- $268cbd9e4ade92db$export$b3bbfd758f11cfa9($d2fc3fb450961938$var$send_sentry_422)(response, options?.body || {}, stack);
3128
+ const {
3129
+ status: status,
3130
+ ok: ok
3131
+ } = response;
3132
+ if (!response || !ok || status !== 200) {
3133
+ if (status >= 400 && status < 500) {
3134
+ $268cbd9e4ade92db$export$b3bbfd758f11cfa9($d2fc3fb450961938$var$send_sentry_4xx)(response, options?.body || {}, stack);
3131
3135
  has_succeeded = true;
3132
- } else if (response.status === 404) has_succeeded = true;
3136
+ } else if (status === 404) has_succeeded = true;
3133
3137
  $e6c6e7929ea385ae$export$de56f1198d121036("Response not ok", response);
3134
3138
  } else has_succeeded = true;
3135
3139
  result = response;
@@ -3144,8 +3148,8 @@ async function $d2fc3fb450961938$export$bcd70d5ed1cf6313(url, options, max_retri
3144
3148
  }
3145
3149
  return result;
3146
3150
  }
3147
- async function $d2fc3fb450961938$var$send_sentry_422(response, body, stack) {
3148
- const msg = `Validation error: got 422 from API`;
3151
+ async function $d2fc3fb450961938$var$send_sentry_4xx(response, body, stack) {
3152
+ const msg = `Validation error: got 4XX from API`;
3149
3153
  const text = await response.clone().text();
3150
3154
  $e6c6e7929ea385ae$export$de56f1198d121036(msg, "body", body, "response", response, "text", text, "stack", stack);
3151
3155
  (0, $61a34358bf0d3d8b$export$af2e17a20c2ea3c5).withScope(function (scope) {
package/latest/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { JSX, Accessor } from "solid-js";
2
- export const version = "2.0.6";
2
+ export const version = "2.0.7";
3
3
  export const is_debug: boolean;
4
4
  /**
5
5
  * Sets the prefix of dlog, dwarn, and derror messages in the browser console. Defaults to `[Depict]`.
package/latest/index.js CHANGED
@@ -13,7 +13,7 @@ function $parcel$export(e, n, v, s) {
13
13
  function $parcel$interopDefault(a) {
14
14
  return a && a.__esModule ? a.default : a;
15
15
  }
16
- const $0766c85d387a9765$export$83d89fbfd8236492 = "2.0.6";
16
+ const $0766c85d387a9765$export$83d89fbfd8236492 = "2.0.8";
17
17
  const $571bce04eb920cd8$export$55fe61489d2c7417 = /*@__PURE__*/(() => process.env.STRIP_DEBUG === "true" ? false : process.env.DEBUG === "true" || process.env.NODE_ENV === "development" || process.env.BUILD_TARGET !== "node" && (globalThis?.document?.currentScript?.dataset?.debug === "true" || globalThis?.localStorage?.getItem?.("debug") === "true"))();
18
18
  const $649f456f663da9fc$var$browser_prefix_styling = "color: #fff;";
19
19
  let $649f456f663da9fc$var$browser_prefix = "[Depict]";
@@ -2867,11 +2867,15 @@ async function $2d1ffbfaa1c2d9e3$export$bcd70d5ed1cf6313(url, options, max_retri
2867
2867
  let result = false;
2868
2868
  while (max_retries && !has_succeeded) try {
2869
2869
  const response = await fetch(url, options);
2870
- if (!response || !response.ok || response.status !== 200) {
2871
- if (response.status === 422) {
2872
- $b04e44fad5ea42c7$export$b3bbfd758f11cfa9($2d1ffbfaa1c2d9e3$var$send_sentry_422)(response, options?.body || {}, stack);
2870
+ const {
2871
+ status: status,
2872
+ ok: ok
2873
+ } = response;
2874
+ if (!response || !ok || status !== 200) {
2875
+ if (status >= 400 && status < 500) {
2876
+ $b04e44fad5ea42c7$export$b3bbfd758f11cfa9($2d1ffbfaa1c2d9e3$var$send_sentry_4xx)(response, options?.body || {}, stack);
2873
2877
  has_succeeded = true;
2874
- } else if (response.status === 404) has_succeeded = true;
2878
+ } else if (status === 404) has_succeeded = true;
2875
2879
  $649f456f663da9fc$export$de56f1198d121036("Response not ok", response);
2876
2880
  } else has_succeeded = true;
2877
2881
  result = response;
@@ -2886,8 +2890,8 @@ async function $2d1ffbfaa1c2d9e3$export$bcd70d5ed1cf6313(url, options, max_retri
2886
2890
  }
2887
2891
  return result;
2888
2892
  }
2889
- async function $2d1ffbfaa1c2d9e3$var$send_sentry_422(response, body, stack) {
2890
- const msg = `Validation error: got 422 from API`;
2893
+ async function $2d1ffbfaa1c2d9e3$var$send_sentry_4xx(response, body, stack) {
2894
+ const msg = `Validation error: got 4XX from API`;
2891
2895
  const text = await response.clone().text();
2892
2896
  $649f456f663da9fc$export$de56f1198d121036(msg, "body", body, "response", response, "text", text, "stack", stack);
2893
2897
  (0, $eba382943196079c$export$af2e17a20c2ea3c5).withScope(function (scope) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depict-ai/utilishared",
3
- "version": "2.0.6",
3
+ "version": "2.0.8",
4
4
  "packageManager": "yarn@3.2.2",
5
5
  "source": "src/index.ts",
6
6
  "types": "ES10/index.d.ts",
@@ -139,7 +139,7 @@
139
139
  ],
140
140
  "devDependencies": {
141
141
  "@babel/core": "latest",
142
- "@depict-ai/types": "^5.0.2",
142
+ "@depict-ai/types": "^5.0.3",
143
143
  "@parcel/resolver-default": "^2.10.3",
144
144
  "@sentry/cli": "^2.21.2",
145
145
  "@sentry/types": "^7.75.1",
@@ -274,7 +274,7 @@ $parcel$export(module.exports, "version", () => $ce0ab19b284b64fa$export$83d89fb
274
274
  $parcel$export(module.exports, "add_to_version_info", () => $045fb30107c9eecc$export$2cefb7e61fcbae00);
275
275
  $parcel$export(module.exports, "sync_el_content_with_accessor", () => $84d13ab567309a50$export$c3f56a35e076f139);
276
276
  $parcel$export(module.exports, "use_href_accessor", () => $59b7011b96010a8e$export$e35115e6d0715f77);
277
- const $ce0ab19b284b64fa$export$83d89fbfd8236492 = "2.0.6";
277
+ const $ce0ab19b284b64fa$export$83d89fbfd8236492 = "2.0.8";
278
278
  const $9e9538f4aff6f83c$export$55fe61489d2c7417 = /*@__PURE__*/((_globalThis$document, _globalThis$document$, _globalThis$document$2, _globalThis$localStor, _globalThis$localStor2) => process.env.STRIP_DEBUG === "true" ? false : process.env.DEBUG === "true" || process.env.NODE_ENV === "development" || process.env.BUILD_TARGET !== "node" && ((globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : (_globalThis$document$ = _globalThis$document.currentScript) === null || _globalThis$document$ === void 0 ? void 0 : (_globalThis$document$2 = _globalThis$document$.dataset) === null || _globalThis$document$2 === void 0 ? void 0 : _globalThis$document$2.debug) === "true" || (globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$localStor = globalThis.localStorage) === null || _globalThis$localStor === void 0 ? void 0 : (_globalThis$localStor2 = _globalThis$localStor.getItem) === null || _globalThis$localStor2 === void 0 ? void 0 : _globalThis$localStor2.call(_globalThis$localStor, "debug")) === "true"))();
279
279
  const $7f95f77417d06249$var$browser_prefix_styling = "color: #fff;";
280
280
  let $7f95f77417d06249$var$browser_prefix = "[Depict]";
@@ -3454,11 +3454,15 @@ async function $8f0b9bb45dd059c3$export$bcd70d5ed1cf6313(url, options) {
3454
3454
  let result = false;
3455
3455
  while (max_retries && !has_succeeded) try {
3456
3456
  const response = await fetch(url, options);
3457
- if (!response || !response.ok || response.status !== 200) {
3458
- if (response.status === 422) {
3459
- $3b52ccc10510b32a$export$b3bbfd758f11cfa9($8f0b9bb45dd059c3$var$send_sentry_422)(response, (options === null || options === void 0 ? void 0 : options.body) || {}, stack);
3457
+ const {
3458
+ status: status,
3459
+ ok: ok
3460
+ } = response;
3461
+ if (!response || !ok || status !== 200) {
3462
+ if (status >= 400 && status < 500) {
3463
+ $3b52ccc10510b32a$export$b3bbfd758f11cfa9($8f0b9bb45dd059c3$var$send_sentry_4xx)(response, (options === null || options === void 0 ? void 0 : options.body) || {}, stack);
3460
3464
  has_succeeded = true;
3461
- } else if (response.status === 404) has_succeeded = true;
3465
+ } else if (status === 404) has_succeeded = true;
3462
3466
  $7f95f77417d06249$export$de56f1198d121036("Response not ok", response);
3463
3467
  } else has_succeeded = true;
3464
3468
  result = response;
@@ -3473,8 +3477,8 @@ async function $8f0b9bb45dd059c3$export$bcd70d5ed1cf6313(url, options) {
3473
3477
  }
3474
3478
  return result;
3475
3479
  }
3476
- async function $8f0b9bb45dd059c3$var$send_sentry_422(response, body, stack) {
3477
- const msg = "Validation error: got 422 from API";
3480
+ async function $8f0b9bb45dd059c3$var$send_sentry_4xx(response, body, stack) {
3481
+ const msg = "Validation error: got 4XX from API";
3478
3482
  const text = await response.clone().text();
3479
3483
  $7f95f77417d06249$export$de56f1198d121036(msg, "body", body, "response", response, "text", text, "stack", stack);
3480
3484
  (0, $902c0e005afb7319$export$af2e17a20c2ea3c5).withScope(function (scope) {
@@ -1,5 +1,5 @@
1
1
  import { JSX, Accessor } from "solid-js";
2
- export const version = "2.0.6";
2
+ export const version = "2.0.7";
3
3
  export const is_debug: boolean;
4
4
  /**
5
5
  * Sets the prefix of dlog, dwarn, and derror messages in the browser console. Defaults to `[Depict]`.
@@ -16,7 +16,7 @@ function $parcel$export(e, n, v, s) {
16
16
  function $parcel$interopDefault(a) {
17
17
  return a && a.__esModule ? a.default : a;
18
18
  }
19
- const $b9e07ce3c67aa344$export$83d89fbfd8236492 = "2.0.6";
19
+ const $b9e07ce3c67aa344$export$83d89fbfd8236492 = "2.0.8";
20
20
  const $a5a2bdb4ae93374b$export$55fe61489d2c7417 = /*@__PURE__*/((_globalThis$document, _globalThis$document$, _globalThis$document$2, _globalThis$localStor, _globalThis$localStor2) => process.env.STRIP_DEBUG === "true" ? false : process.env.DEBUG === "true" || process.env.NODE_ENV === "development" || process.env.BUILD_TARGET !== "node" && ((globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : (_globalThis$document$ = _globalThis$document.currentScript) === null || _globalThis$document$ === void 0 ? void 0 : (_globalThis$document$2 = _globalThis$document$.dataset) === null || _globalThis$document$2 === void 0 ? void 0 : _globalThis$document$2.debug) === "true" || (globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$localStor = globalThis.localStorage) === null || _globalThis$localStor === void 0 ? void 0 : (_globalThis$localStor2 = _globalThis$localStor.getItem) === null || _globalThis$localStor2 === void 0 ? void 0 : _globalThis$localStor2.call(_globalThis$localStor, "debug")) === "true"))();
21
21
  const $241f2f02cc612a49$var$browser_prefix_styling = "color: #fff;";
22
22
  let $241f2f02cc612a49$var$browser_prefix = "[Depict]";
@@ -3196,11 +3196,15 @@ async function $c95f8181bad32e8d$export$bcd70d5ed1cf6313(url, options) {
3196
3196
  let result = false;
3197
3197
  while (max_retries && !has_succeeded) try {
3198
3198
  const response = await fetch(url, options);
3199
- if (!response || !response.ok || response.status !== 200) {
3200
- if (response.status === 422) {
3201
- $5e1f45affc1d7def$export$b3bbfd758f11cfa9($c95f8181bad32e8d$var$send_sentry_422)(response, (options === null || options === void 0 ? void 0 : options.body) || {}, stack);
3199
+ const {
3200
+ status: status,
3201
+ ok: ok
3202
+ } = response;
3203
+ if (!response || !ok || status !== 200) {
3204
+ if (status >= 400 && status < 500) {
3205
+ $5e1f45affc1d7def$export$b3bbfd758f11cfa9($c95f8181bad32e8d$var$send_sentry_4xx)(response, (options === null || options === void 0 ? void 0 : options.body) || {}, stack);
3202
3206
  has_succeeded = true;
3203
- } else if (response.status === 404) has_succeeded = true;
3207
+ } else if (status === 404) has_succeeded = true;
3204
3208
  $241f2f02cc612a49$export$de56f1198d121036("Response not ok", response);
3205
3209
  } else has_succeeded = true;
3206
3210
  result = response;
@@ -3215,8 +3219,8 @@ async function $c95f8181bad32e8d$export$bcd70d5ed1cf6313(url, options) {
3215
3219
  }
3216
3220
  return result;
3217
3221
  }
3218
- async function $c95f8181bad32e8d$var$send_sentry_422(response, body, stack) {
3219
- const msg = "Validation error: got 422 from API";
3222
+ async function $c95f8181bad32e8d$var$send_sentry_4xx(response, body, stack) {
3223
+ const msg = "Validation error: got 4XX from API";
3220
3224
  const text = await response.clone().text();
3221
3225
  $241f2f02cc612a49$export$de56f1198d121036(msg, "body", body, "response", response, "text", text, "stack", stack);
3222
3226
  (0, $17bb552dedcd526c$export$af2e17a20c2ea3c5).withScope(function (scope) {
@@ -271,7 +271,7 @@ $parcel$export(module.exports, "version", () => $815f67c61b4c0a42$export$83d89fb
271
271
  $parcel$export(module.exports, "add_to_version_info", () => $e4a18bf12ad092d9$export$2cefb7e61fcbae00);
272
272
  $parcel$export(module.exports, "sync_el_content_with_accessor", () => $35303d72263038db$export$c3f56a35e076f139);
273
273
  $parcel$export(module.exports, "use_href_accessor", () => $da35c7e27be2a442$export$e35115e6d0715f77);
274
- const $815f67c61b4c0a42$export$83d89fbfd8236492 = "2.0.6";
274
+ const $815f67c61b4c0a42$export$83d89fbfd8236492 = "2.0.8";
275
275
  const $7b5e577a60b81e60$export$55fe61489d2c7417 = /*@__PURE__*/(() => process.env.STRIP_DEBUG === "true" ? false : process.env.DEBUG === "true" || process.env.NODE_ENV === "development" || process.env.BUILD_TARGET !== "node" && (globalThis?.document?.currentScript?.dataset?.debug === "true" || globalThis?.localStorage?.getItem?.("debug") === "true"))();
276
276
  const $e6c6e7929ea385ae$var$browser_prefix_styling = "color: #fff;";
277
277
  let $e6c6e7929ea385ae$var$browser_prefix = "[Depict]";
@@ -3125,11 +3125,15 @@ async function $d2fc3fb450961938$export$bcd70d5ed1cf6313(url, options, max_retri
3125
3125
  let result = false;
3126
3126
  while (max_retries && !has_succeeded) try {
3127
3127
  const response = await fetch(url, options);
3128
- if (!response || !response.ok || response.status !== 200) {
3129
- if (response.status === 422) {
3130
- $268cbd9e4ade92db$export$b3bbfd758f11cfa9($d2fc3fb450961938$var$send_sentry_422)(response, options?.body || {}, stack);
3128
+ const {
3129
+ status: status,
3130
+ ok: ok
3131
+ } = response;
3132
+ if (!response || !ok || status !== 200) {
3133
+ if (status >= 400 && status < 500) {
3134
+ $268cbd9e4ade92db$export$b3bbfd758f11cfa9($d2fc3fb450961938$var$send_sentry_4xx)(response, options?.body || {}, stack);
3131
3135
  has_succeeded = true;
3132
- } else if (response.status === 404) has_succeeded = true;
3136
+ } else if (status === 404) has_succeeded = true;
3133
3137
  $e6c6e7929ea385ae$export$de56f1198d121036("Response not ok", response);
3134
3138
  } else has_succeeded = true;
3135
3139
  result = response;
@@ -3144,8 +3148,8 @@ async function $d2fc3fb450961938$export$bcd70d5ed1cf6313(url, options, max_retri
3144
3148
  }
3145
3149
  return result;
3146
3150
  }
3147
- async function $d2fc3fb450961938$var$send_sentry_422(response, body, stack) {
3148
- const msg = `Validation error: got 422 from API`;
3151
+ async function $d2fc3fb450961938$var$send_sentry_4xx(response, body, stack) {
3152
+ const msg = `Validation error: got 4XX from API`;
3149
3153
  const text = await response.clone().text();
3150
3154
  $e6c6e7929ea385ae$export$de56f1198d121036(msg, "body", body, "response", response, "text", text, "stack", stack);
3151
3155
  (0, $61a34358bf0d3d8b$export$af2e17a20c2ea3c5).withScope(function (scope) {
@@ -1,5 +1,5 @@
1
1
  import { JSX, Accessor } from "solid-js";
2
- export const version = "2.0.6";
2
+ export const version = "2.0.7";
3
3
  export const is_debug: boolean;
4
4
  /**
5
5
  * Sets the prefix of dlog, dwarn, and derror messages in the browser console. Defaults to `[Depict]`.
@@ -13,7 +13,7 @@ function $parcel$export(e, n, v, s) {
13
13
  function $parcel$interopDefault(a) {
14
14
  return a && a.__esModule ? a.default : a;
15
15
  }
16
- const $0766c85d387a9765$export$83d89fbfd8236492 = "2.0.6";
16
+ const $0766c85d387a9765$export$83d89fbfd8236492 = "2.0.8";
17
17
  const $571bce04eb920cd8$export$55fe61489d2c7417 = /*@__PURE__*/(() => process.env.STRIP_DEBUG === "true" ? false : process.env.DEBUG === "true" || process.env.NODE_ENV === "development" || process.env.BUILD_TARGET !== "node" && (globalThis?.document?.currentScript?.dataset?.debug === "true" || globalThis?.localStorage?.getItem?.("debug") === "true"))();
18
18
  const $649f456f663da9fc$var$browser_prefix_styling = "color: #fff;";
19
19
  let $649f456f663da9fc$var$browser_prefix = "[Depict]";
@@ -2867,11 +2867,15 @@ async function $2d1ffbfaa1c2d9e3$export$bcd70d5ed1cf6313(url, options, max_retri
2867
2867
  let result = false;
2868
2868
  while (max_retries && !has_succeeded) try {
2869
2869
  const response = await fetch(url, options);
2870
- if (!response || !response.ok || response.status !== 200) {
2871
- if (response.status === 422) {
2872
- $b04e44fad5ea42c7$export$b3bbfd758f11cfa9($2d1ffbfaa1c2d9e3$var$send_sentry_422)(response, options?.body || {}, stack);
2870
+ const {
2871
+ status: status,
2872
+ ok: ok
2873
+ } = response;
2874
+ if (!response || !ok || status !== 200) {
2875
+ if (status >= 400 && status < 500) {
2876
+ $b04e44fad5ea42c7$export$b3bbfd758f11cfa9($2d1ffbfaa1c2d9e3$var$send_sentry_4xx)(response, options?.body || {}, stack);
2873
2877
  has_succeeded = true;
2874
- } else if (response.status === 404) has_succeeded = true;
2878
+ } else if (status === 404) has_succeeded = true;
2875
2879
  $649f456f663da9fc$export$de56f1198d121036("Response not ok", response);
2876
2880
  } else has_succeeded = true;
2877
2881
  result = response;
@@ -2886,8 +2890,8 @@ async function $2d1ffbfaa1c2d9e3$export$bcd70d5ed1cf6313(url, options, max_retri
2886
2890
  }
2887
2891
  return result;
2888
2892
  }
2889
- async function $2d1ffbfaa1c2d9e3$var$send_sentry_422(response, body, stack) {
2890
- const msg = `Validation error: got 422 from API`;
2893
+ async function $2d1ffbfaa1c2d9e3$var$send_sentry_4xx(response, body, stack) {
2894
+ const msg = `Validation error: got 4XX from API`;
2891
2895
  const text = await response.clone().text();
2892
2896
  $649f456f663da9fc$export$de56f1198d121036(msg, "body", body, "response", response, "text", text, "stack", stack);
2893
2897
  (0, $eba382943196079c$export$af2e17a20c2ea3c5).withScope(function (scope) {