@depict-ai/utilishared 1.0.33 → 1.0.35
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 +23 -17
- package/ES10/index.d.ts +1 -1
- package/ES10/index.js +23 -17
- package/latest/index.cjs +23 -17
- package/latest/index.d.ts +1 -1
- package/latest/index.js +23 -17
- package/package.json +1 -1
package/ES10/index.cjs
CHANGED
|
@@ -275,7 +275,7 @@ $parcel$export(module.exports, "hex_to_rgb", () => $b5388c1e3ff41e88$export$ca30
|
|
|
275
275
|
$parcel$export(module.exports, "version", () => $ce0ab19b284b64fa$export$83d89fbfd8236492);
|
|
276
276
|
$parcel$export(module.exports, "add_to_version_info", () => $045fb30107c9eecc$export$2cefb7e61fcbae00);
|
|
277
277
|
$parcel$export(module.exports, "edit_current_page_meta_tags", () => $0126fdc29a9f7f2d$export$ef73ea4f975745ba);
|
|
278
|
-
const $ce0ab19b284b64fa$export$83d89fbfd8236492 = "1.0.
|
|
278
|
+
const $ce0ab19b284b64fa$export$83d89fbfd8236492 = "1.0.35";
|
|
279
279
|
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"))();
|
|
280
280
|
const $7f95f77417d06249$var$browser_prefix_styling = "color: #fff;";
|
|
281
281
|
let $7f95f77417d06249$var$browser_prefix = "[Depict]";
|
|
@@ -2273,6 +2273,9 @@ function $8b27923e1d1e6b99$export$cfef5d5c9ac09253(price) {
|
|
|
2273
2273
|
}
|
|
2274
2274
|
}
|
|
2275
2275
|
if (places_after_comma == "auto") places_after_comma = price % 1 ? 2 : 0;
|
|
2276
|
+
// Generalized rounding for any value of places_after_comma.
|
|
2277
|
+
const multiplier = Math.pow(10, places_after_comma);
|
|
2278
|
+
price = Math.round(price * multiplier) / multiplier;
|
|
2276
2279
|
const fixed = places_after_comma < 0 ? price.toString().split(".") : price.toFixed(places_after_comma).split("."),
|
|
2277
2280
|
[...chars] = fixed[0],
|
|
2278
2281
|
reversed = chars.reverse();
|
|
@@ -4861,7 +4864,10 @@ function $08a94efe56c2b35f$var$_create_element_structure2() {
|
|
|
4861
4864
|
subtree: true
|
|
4862
4865
|
});
|
|
4863
4866
|
for (const kid of element.children) this.observer.observe(kid);
|
|
4864
|
-
(0, $03c157d68c9fcbac$export$b6ae1bc530f4c149).wait_for_listener("removed", element).then(
|
|
4867
|
+
(0, $03c157d68c9fcbac$export$b6ae1bc530f4c149).wait_for_listener("removed", element).then(el => {
|
|
4868
|
+
if (document.documentElement.contains(el)) return; // Don't accidentally disconnect if we already got re-inserted
|
|
4869
|
+
cache_mo.disconnect();
|
|
4870
|
+
});
|
|
4865
4871
|
});
|
|
4866
4872
|
}
|
|
4867
4873
|
}
|
|
@@ -5404,8 +5410,8 @@ $ebe64dbcfb106f16$export$2e2bcd8739ae039 = async options => {
|
|
|
5404
5410
|
};
|
|
5405
5411
|
|
|
5406
5412
|
// @ts-ignore
|
|
5407
|
-
var $
|
|
5408
|
-
$
|
|
5413
|
+
var $ecd63cbf537aeb75$exports = {};
|
|
5414
|
+
$ecd63cbf537aeb75$exports = ".depict .rec_outer.noautospacing {\n width: 6cm;\n max-width: 46vw;\n margin-left: 1%;\n margin-right: 1%;\n}\n\n.depict .rec_outer.noautospacing:nth-child(1) {\n margin-left: 0;\n}\n\n.depict .rec_outer.noautospacing:nth-last-child(1) {\n margin-right: 0;\n}\n\n.depict-slider .slider_snap {\n scroll-snap-type: x mandatory;\n}\n\n.depict-slider {\n width: 100%;\n position: relative;\n}\n\n.depict-slider .sliding::-webkit-scrollbar {\n display: none;\n}\n\n.depict-slider .sliding {\n scroll-behavior: smooth;\n -ms-overflow-style: none;\n scrollbar-width: none;\n flex-flow: row;\n margin-top: -1%;\n margin-bottom: -2%;\n padding-top: 1%;\n padding-bottom: 2%;\n display: flex;\n overflow-x: scroll;\n}\n\n.depict-slider .sliding > * {\n box-sizing: border-box;\n flex: none;\n}\n\n.depict-slider button.right {\n right: 0;\n}\n\n.depict-slider button.left, .depict-slider button.right {\n z-index: 2;\n touch-action: manipulation;\n width: 1cm;\n height: 1cm;\n cursor: pointer;\n background: #fff;\n border: none;\n padding: .5%;\n transition-duration: .2s;\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n}\n\n.depict-slider button.left.hidden, .depict-slider button.right.hidden {\n opacity: 0;\n cursor: default;\n}\n\n.depict-slider button.left {\n left: 0;\n transform: translateY(-50%)rotate(180deg);\n}\n\n.depict-slider button.left img, .depict-slider button.right img {\n width: 100%;\n height: 100%;\n}\n\n.depict-slider .rec_outer {\n margin-top: 0 !important;\n}\n\n";
|
|
5409
5415
|
const $3f49f9b73bfc2a38$var$default_image_src = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjYsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAxNiAxNiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTYgMTY7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxwb2x5Z29uIHBvaW50cz0iOSwyLjYgOC4zLDMuNCAxMi40LDcuNSAxLjYsNy41IDEuNiw4LjUgMTIuNCw4LjUgOC4zLDEyLjYgOSwxMy40IDE0LjQsOCAiLz4NCjwvc3ZnPg0K";
|
|
5410
5416
|
class $3f49f9b73bfc2a38$export$4d41c6499d53639c extends (0, $817cb0cb4b98187e$export$68babfc5be0de5da) {
|
|
5411
5417
|
constructor(static_options, override_lazyfier_options) {
|
|
@@ -5437,7 +5443,7 @@ class $3f49f9b73bfc2a38$export$4d41c6499d53639c extends (0, $817cb0cb4b98187e$ex
|
|
|
5437
5443
|
function $3f49f9b73bfc2a38$export$f1b8b9fd75ddcab1(slider) {
|
|
5438
5444
|
const style_elem = document.createElement("style");
|
|
5439
5445
|
style_elem.type = "text/css";
|
|
5440
|
-
style_elem.append((0, /*@__PURE__*/$parcel$interopDefault($
|
|
5446
|
+
style_elem.append((0, /*@__PURE__*/$parcel$interopDefault($ecd63cbf537aeb75$exports)));
|
|
5441
5447
|
slider.container.appendChild(style_elem);
|
|
5442
5448
|
}
|
|
5443
5449
|
async function $bbf8331c74194de9$export$cd12721587f4f16d(t, rendering_options, options_for_us, slider_options, override_lazyfier_options) {
|
|
@@ -6064,8 +6070,8 @@ async function $79e67f88d50f1879$export$b0a773486c1c2312(t, recommendation_rende
|
|
|
6064
6070
|
}
|
|
6065
6071
|
|
|
6066
6072
|
// @ts-ignore
|
|
6067
|
-
var $
|
|
6068
|
-
$
|
|
6073
|
+
var $260179121984179c$exports = {};
|
|
6074
|
+
$260179121984179c$exports = ".depict-slider {\n width: 100%;\n position: relative;\n}\n\n.depict-slider .sliding {\n scroll-behavior: smooth;\n -ms-overflow-style: none;\n scrollbar-width: none;\n flex-flow: row;\n display: flex;\n overflow-x: scroll;\n}\n\n.depict-slider .sliding::-webkit-scrollbar {\n display: none;\n}\n\n.depict-slider .sliding > * {\n box-sizing: border-box;\n flex: none;\n}\n\n";
|
|
6069
6075
|
let $87dd73b8c244f3d2$var$slider_styling_was_inserted = false;
|
|
6070
6076
|
async function $87dd73b8c244f3d2$export$82cfdc85a4d15688(t, recommendation_renderer_options, _ref) {
|
|
6071
6077
|
let {
|
|
@@ -6089,7 +6095,7 @@ async function $87dd73b8c244f3d2$export$82cfdc85a4d15688(t, recommendation_rende
|
|
|
6089
6095
|
if (!elements) return rendering_result;
|
|
6090
6096
|
if (!$87dd73b8c244f3d2$var$slider_styling_was_inserted) {
|
|
6091
6097
|
$87dd73b8c244f3d2$var$slider_styling_was_inserted = true;
|
|
6092
|
-
(0, $e45474c7d6e21cfa$export$59ba1eb2c083f0cd)((0, /*@__PURE__*/$parcel$interopDefault($
|
|
6098
|
+
(0, $e45474c7d6e21cfa$export$59ba1eb2c083f0cd)((0, /*@__PURE__*/$parcel$interopDefault($260179121984179c$exports)));
|
|
6093
6099
|
}
|
|
6094
6100
|
insertion_point.replaceWith(slider.container);
|
|
6095
6101
|
slider.insert_here.append(...elements);
|
|
@@ -8218,8 +8224,8 @@ async function $468dbae10b24d59f$export$c068ad5361be7646(_ref) {
|
|
|
8218
8224
|
on_close_(exit_oos_iterator);
|
|
8219
8225
|
}));
|
|
8220
8226
|
}
|
|
8221
|
-
var $
|
|
8222
|
-
$
|
|
8227
|
+
var $8b5f3bb1185264e0$exports = {};
|
|
8228
|
+
$8b5f3bb1185264e0$exports = ".depict-placeholder {\n will-change: mask, -webkit-mask;\n mask-position-x: 125%;\n mask-position-y: center;\n background: #ddd;\n animation: 1.5s linear infinite depict-placeholder;\n display: inline-block;\n position: relative;\n overflow: hidden;\n -webkit-mask: linear-gradient(-60deg, #000 30%, #0005, #000 70%) 125% / 300% 100%;\n -webkit-mask-image: ;\n mask-image: ;\n -webkit-mask-size: ;\n mask-size: ;\n}\n\n@keyframes depict-placeholder {\n 0% {\n mask-position-x: 125%;\n -webkit-mask-position-x: 125%;\n }\n\n 10% {\n mask-position-x: 125%;\n -webkit-mask-position-x: 125%;\n }\n\n 90% {\n mask-position-x: -25%;\n -webkit-mask-position-x: -25%;\n }\n\n 100% {\n mask-position-x: -25%;\n -webkit-mask-position-x: -25%;\n }\n}\n\n";
|
|
8223
8229
|
let $ba9b4cd7e24de87e$var$inserted = false;
|
|
8224
8230
|
const $ba9b4cd7e24de87e$export$84712d0562a614b8 = _ref => {
|
|
8225
8231
|
let {
|
|
@@ -8231,7 +8237,7 @@ const $ba9b4cd7e24de87e$export$84712d0562a614b8 = _ref => {
|
|
|
8231
8237
|
} = _ref;
|
|
8232
8238
|
if (!$ba9b4cd7e24de87e$var$inserted) {
|
|
8233
8239
|
// Insert styling on first import
|
|
8234
|
-
(0, $e45474c7d6e21cfa$export$59ba1eb2c083f0cd)((0, /*@__PURE__*/$parcel$interopDefault($
|
|
8240
|
+
(0, $e45474c7d6e21cfa$export$59ba1eb2c083f0cd)((0, /*@__PURE__*/$parcel$interopDefault($8b5f3bb1185264e0$exports)));
|
|
8235
8241
|
$ba9b4cd7e24de87e$var$inserted = true;
|
|
8236
8242
|
}
|
|
8237
8243
|
return (
|
|
@@ -8470,8 +8476,8 @@ const $151f8676c5d42e80$export$237455ad7e59d4e5 = function () {
|
|
|
8470
8476
|
collapse: collapse
|
|
8471
8477
|
};
|
|
8472
8478
|
};
|
|
8473
|
-
var $
|
|
8474
|
-
$
|
|
8479
|
+
var $69f5592a9d3b3d0b$exports = {};
|
|
8480
|
+
$69f5592a9d3b3d0b$exports = ".depict-img-cont {\n width: 100%;\n height: 100%;\n position: absolute;\n}\n\n.depict-img-filler {\n width: 100%;\n height: auto;\n display: inline-block;\n}\n\n.depict-img-comp {\n width: auto;\n height: auto;\n max-width: 100%;\n max-height: 100%;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n\n.depict-img-mod {\n width: 100%;\n height: 100%;\n object-fit: contain;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n\n";
|
|
8475
8481
|
const $b42b9f62e8b6cb2d$export$3d13beba9b52c947 = "https://img.depict.ai/ResizeImage" + (process.env.TENANT ? "/" + process.env.TENANT : "");
|
|
8476
8482
|
const $b42b9f62e8b6cb2d$export$a98fc8a2c818d3d8 = /*@__PURE__*/(() => typeof navigator === "undefined" ? false : /^((?!chrome|android).)*safari/i.test(navigator.userAgent))(); // https://stackoverflow.com/a/23522755
|
|
8477
8483
|
function $b42b9f62e8b6cb2d$export$f39a7d0667e924a(what_to_watch) {
|
|
@@ -8634,7 +8640,7 @@ const $dfce76a4aeb41067$export$788756b42446dc2d = _ref => {
|
|
|
8634
8640
|
} = _ref;
|
|
8635
8641
|
if (!$dfce76a4aeb41067$var$inserted) {
|
|
8636
8642
|
// Insert styling on first import
|
|
8637
|
-
(0, $e45474c7d6e21cfa$export$59ba1eb2c083f0cd)((0, /*@__PURE__*/$parcel$interopDefault($
|
|
8643
|
+
(0, $e45474c7d6e21cfa$export$59ba1eb2c083f0cd)((0, /*@__PURE__*/$parcel$interopDefault($69f5592a9d3b3d0b$exports)));
|
|
8638
8644
|
$dfce76a4aeb41067$var$inserted = true;
|
|
8639
8645
|
}
|
|
8640
8646
|
const img = process.env.BUILD_TARGET === "modern" || process.env.BUILD_TARGET === "dev" ? $dfce76a4aeb41067$var$Image(options) : $dfce76a4aeb41067$var$CompatibleImage(options);
|
|
@@ -8721,8 +8727,8 @@ function $dfce76a4aeb41067$var$srcset_comp_from_map_or_new(rendering_options) {
|
|
|
8721
8727
|
}
|
|
8722
8728
|
return sourceset_component;
|
|
8723
8729
|
}
|
|
8724
|
-
var $
|
|
8725
|
-
$
|
|
8730
|
+
var $5ab0a60ded6a2bd2$exports = {};
|
|
8731
|
+
$5ab0a60ded6a2bd2$exports = ".depict .images-container {\n position: relative;\n}\n\n.depict .second-image-container {\n width: 100%;\n opacity: 0;\n position: absolute;\n top: 0;\n}\n\n.depict .hovering .main-image-container {\n opacity: 0;\n}\n\n.depict .hovering .second-image-container {\n opacity: 1;\n}\n\n";
|
|
8726
8732
|
|
|
8727
8733
|
// Saving bytez
|
|
8728
8734
|
// Maybe? @Daniel
|
|
@@ -8856,7 +8862,7 @@ const $8928a1027461fba4$export$2369f6fc1c911576 = _ref => {
|
|
|
8856
8862
|
...options
|
|
8857
8863
|
} = _ref;
|
|
8858
8864
|
if (!$8928a1027461fba4$var$styling_inserted) {
|
|
8859
|
-
(0, $e45474c7d6e21cfa$export$59ba1eb2c083f0cd)((0, /*@__PURE__*/$parcel$interopDefault($
|
|
8865
|
+
(0, $e45474c7d6e21cfa$export$59ba1eb2c083f0cd)((0, /*@__PURE__*/$parcel$interopDefault($5ab0a60ded6a2bd2$exports)));
|
|
8860
8866
|
$8928a1027461fba4$var$styling_inserted = true;
|
|
8861
8867
|
}
|
|
8862
8868
|
const main_image = (0, $dfce76a4aeb41067$export$788756b42446dc2d)({
|
package/ES10/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference path="../jsx.d.ts" />
|
|
2
2
|
import { EUnavailabilityType } from "@depict-ai/types/api/TrackV2Request";
|
|
3
3
|
import { Accessor } from "solid-js";
|
|
4
|
-
export const version = "1.0.
|
|
4
|
+
export const version = "1.0.35";
|
|
5
5
|
export const is_debug: boolean;
|
|
6
6
|
/**
|
|
7
7
|
* Sets the prefix of dlog, dwarn, and derror messages in the browser console. Defaults to `[Depict]`.
|
package/ES10/index.js
CHANGED
|
@@ -15,7 +15,7 @@ function $parcel$export(e, n, v, s) {
|
|
|
15
15
|
function $parcel$interopDefault(a) {
|
|
16
16
|
return a && a.__esModule ? a.default : a;
|
|
17
17
|
}
|
|
18
|
-
const $b9e07ce3c67aa344$export$83d89fbfd8236492 = "1.0.
|
|
18
|
+
const $b9e07ce3c67aa344$export$83d89fbfd8236492 = "1.0.35";
|
|
19
19
|
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"))();
|
|
20
20
|
const $241f2f02cc612a49$var$browser_prefix_styling = "color: #fff;";
|
|
21
21
|
let $241f2f02cc612a49$var$browser_prefix = "[Depict]";
|
|
@@ -2013,6 +2013,9 @@ function $652300c6621d5500$export$cfef5d5c9ac09253(price) {
|
|
|
2013
2013
|
}
|
|
2014
2014
|
}
|
|
2015
2015
|
if (places_after_comma == "auto") places_after_comma = price % 1 ? 2 : 0;
|
|
2016
|
+
// Generalized rounding for any value of places_after_comma.
|
|
2017
|
+
const multiplier = Math.pow(10, places_after_comma);
|
|
2018
|
+
price = Math.round(price * multiplier) / multiplier;
|
|
2016
2019
|
const fixed = places_after_comma < 0 ? price.toString().split(".") : price.toFixed(places_after_comma).split("."),
|
|
2017
2020
|
[...chars] = fixed[0],
|
|
2018
2021
|
reversed = chars.reverse();
|
|
@@ -4601,7 +4604,10 @@ function $be288a83d9eabf2a$var$_create_element_structure2() {
|
|
|
4601
4604
|
subtree: true
|
|
4602
4605
|
});
|
|
4603
4606
|
for (const kid of element.children) this.observer.observe(kid);
|
|
4604
|
-
(0, $90fa633a9564f115$export$b6ae1bc530f4c149).wait_for_listener("removed", element).then(
|
|
4607
|
+
(0, $90fa633a9564f115$export$b6ae1bc530f4c149).wait_for_listener("removed", element).then(el => {
|
|
4608
|
+
if (document.documentElement.contains(el)) return; // Don't accidentally disconnect if we already got re-inserted
|
|
4609
|
+
cache_mo.disconnect();
|
|
4610
|
+
});
|
|
4605
4611
|
});
|
|
4606
4612
|
}
|
|
4607
4613
|
}
|
|
@@ -5144,8 +5150,8 @@ $48b0f027b215b8ad$export$2e2bcd8739ae039 = async options => {
|
|
|
5144
5150
|
};
|
|
5145
5151
|
|
|
5146
5152
|
// @ts-ignore
|
|
5147
|
-
var $
|
|
5148
|
-
$
|
|
5153
|
+
var $9c3f55fbde559b71$exports = {};
|
|
5154
|
+
$9c3f55fbde559b71$exports = ".depict .rec_outer.noautospacing {\n width: 6cm;\n max-width: 46vw;\n margin-left: 1%;\n margin-right: 1%;\n}\n\n.depict .rec_outer.noautospacing:nth-child(1) {\n margin-left: 0;\n}\n\n.depict .rec_outer.noautospacing:nth-last-child(1) {\n margin-right: 0;\n}\n\n.depict-slider .slider_snap {\n scroll-snap-type: x mandatory;\n}\n\n.depict-slider {\n width: 100%;\n position: relative;\n}\n\n.depict-slider .sliding::-webkit-scrollbar {\n display: none;\n}\n\n.depict-slider .sliding {\n scroll-behavior: smooth;\n -ms-overflow-style: none;\n scrollbar-width: none;\n flex-flow: row;\n margin-top: -1%;\n margin-bottom: -2%;\n padding-top: 1%;\n padding-bottom: 2%;\n display: flex;\n overflow-x: scroll;\n}\n\n.depict-slider .sliding > * {\n box-sizing: border-box;\n flex: none;\n}\n\n.depict-slider button.right {\n right: 0;\n}\n\n.depict-slider button.left, .depict-slider button.right {\n z-index: 2;\n touch-action: manipulation;\n width: 1cm;\n height: 1cm;\n cursor: pointer;\n background: #fff;\n border: none;\n padding: .5%;\n transition-duration: .2s;\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n}\n\n.depict-slider button.left.hidden, .depict-slider button.right.hidden {\n opacity: 0;\n cursor: default;\n}\n\n.depict-slider button.left {\n left: 0;\n transform: translateY(-50%)rotate(180deg);\n}\n\n.depict-slider button.left img, .depict-slider button.right img {\n width: 100%;\n height: 100%;\n}\n\n.depict-slider .rec_outer {\n margin-top: 0 !important;\n}\n\n";
|
|
5149
5155
|
const $0342f59060b8a196$var$default_image_src = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjYsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAxNiAxNiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTYgMTY7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxwb2x5Z29uIHBvaW50cz0iOSwyLjYgOC4zLDMuNCAxMi40LDcuNSAxLjYsNy41IDEuNiw4LjUgMTIuNCw4LjUgOC4zLDEyLjYgOSwxMy40IDE0LjQsOCAiLz4NCjwvc3ZnPg0K";
|
|
5150
5156
|
class $0342f59060b8a196$export$4d41c6499d53639c extends (0, $f340c415f2e1d03a$export$68babfc5be0de5da) {
|
|
5151
5157
|
constructor(static_options, override_lazyfier_options) {
|
|
@@ -5177,7 +5183,7 @@ class $0342f59060b8a196$export$4d41c6499d53639c extends (0, $f340c415f2e1d03a$ex
|
|
|
5177
5183
|
function $0342f59060b8a196$export$f1b8b9fd75ddcab1(slider) {
|
|
5178
5184
|
const style_elem = document.createElement("style");
|
|
5179
5185
|
style_elem.type = "text/css";
|
|
5180
|
-
style_elem.append((0, /*@__PURE__*/$parcel$interopDefault($
|
|
5186
|
+
style_elem.append((0, /*@__PURE__*/$parcel$interopDefault($9c3f55fbde559b71$exports)));
|
|
5181
5187
|
slider.container.appendChild(style_elem);
|
|
5182
5188
|
}
|
|
5183
5189
|
async function $b7b39b38d6e695e9$export$cd12721587f4f16d(t, rendering_options, options_for_us, slider_options, override_lazyfier_options) {
|
|
@@ -5804,8 +5810,8 @@ async function $297a08bac2d81fab$export$b0a773486c1c2312(t, recommendation_rende
|
|
|
5804
5810
|
}
|
|
5805
5811
|
|
|
5806
5812
|
// @ts-ignore
|
|
5807
|
-
var $
|
|
5808
|
-
$
|
|
5813
|
+
var $9f7f2b36a558e2bd$exports = {};
|
|
5814
|
+
$9f7f2b36a558e2bd$exports = ".depict-slider {\n width: 100%;\n position: relative;\n}\n\n.depict-slider .sliding {\n scroll-behavior: smooth;\n -ms-overflow-style: none;\n scrollbar-width: none;\n flex-flow: row;\n display: flex;\n overflow-x: scroll;\n}\n\n.depict-slider .sliding::-webkit-scrollbar {\n display: none;\n}\n\n.depict-slider .sliding > * {\n box-sizing: border-box;\n flex: none;\n}\n\n";
|
|
5809
5815
|
let $d89e3aaeb9270095$var$slider_styling_was_inserted = false;
|
|
5810
5816
|
async function $d89e3aaeb9270095$export$82cfdc85a4d15688(t, recommendation_renderer_options, _ref) {
|
|
5811
5817
|
let {
|
|
@@ -5829,7 +5835,7 @@ async function $d89e3aaeb9270095$export$82cfdc85a4d15688(t, recommendation_rende
|
|
|
5829
5835
|
if (!elements) return rendering_result;
|
|
5830
5836
|
if (!$d89e3aaeb9270095$var$slider_styling_was_inserted) {
|
|
5831
5837
|
$d89e3aaeb9270095$var$slider_styling_was_inserted = true;
|
|
5832
|
-
(0, $1013f2e568f87406$export$59ba1eb2c083f0cd)((0, /*@__PURE__*/$parcel$interopDefault($
|
|
5838
|
+
(0, $1013f2e568f87406$export$59ba1eb2c083f0cd)((0, /*@__PURE__*/$parcel$interopDefault($9f7f2b36a558e2bd$exports)));
|
|
5833
5839
|
}
|
|
5834
5840
|
insertion_point.replaceWith(slider.container);
|
|
5835
5841
|
slider.insert_here.append(...elements);
|
|
@@ -7958,8 +7964,8 @@ async function $24f3fd73864991c0$export$c068ad5361be7646(_ref) {
|
|
|
7958
7964
|
on_close_(exit_oos_iterator);
|
|
7959
7965
|
}));
|
|
7960
7966
|
}
|
|
7961
|
-
var $
|
|
7962
|
-
$
|
|
7967
|
+
var $4ef779af61421f56$exports = {};
|
|
7968
|
+
$4ef779af61421f56$exports = ".depict-placeholder {\n will-change: mask, -webkit-mask;\n mask-position-x: 125%;\n mask-position-y: center;\n background: #ddd;\n animation: 1.5s linear infinite depict-placeholder;\n display: inline-block;\n position: relative;\n overflow: hidden;\n -webkit-mask: linear-gradient(-60deg, #000 30%, #0005, #000 70%) 125% / 300% 100%;\n -webkit-mask-image: ;\n mask-image: ;\n -webkit-mask-size: ;\n mask-size: ;\n}\n\n@keyframes depict-placeholder {\n 0% {\n mask-position-x: 125%;\n -webkit-mask-position-x: 125%;\n }\n\n 10% {\n mask-position-x: 125%;\n -webkit-mask-position-x: 125%;\n }\n\n 90% {\n mask-position-x: -25%;\n -webkit-mask-position-x: -25%;\n }\n\n 100% {\n mask-position-x: -25%;\n -webkit-mask-position-x: -25%;\n }\n}\n\n";
|
|
7963
7969
|
let $adc0bb548fdb574f$var$inserted = false;
|
|
7964
7970
|
const $adc0bb548fdb574f$export$84712d0562a614b8 = _ref => {
|
|
7965
7971
|
let {
|
|
@@ -7971,7 +7977,7 @@ const $adc0bb548fdb574f$export$84712d0562a614b8 = _ref => {
|
|
|
7971
7977
|
} = _ref;
|
|
7972
7978
|
if (!$adc0bb548fdb574f$var$inserted) {
|
|
7973
7979
|
// Insert styling on first import
|
|
7974
|
-
(0, $1013f2e568f87406$export$59ba1eb2c083f0cd)((0, /*@__PURE__*/$parcel$interopDefault($
|
|
7980
|
+
(0, $1013f2e568f87406$export$59ba1eb2c083f0cd)((0, /*@__PURE__*/$parcel$interopDefault($4ef779af61421f56$exports)));
|
|
7975
7981
|
$adc0bb548fdb574f$var$inserted = true;
|
|
7976
7982
|
}
|
|
7977
7983
|
return (
|
|
@@ -8210,8 +8216,8 @@ const $0f55c2bc0a7b363b$export$237455ad7e59d4e5 = function () {
|
|
|
8210
8216
|
collapse: collapse
|
|
8211
8217
|
};
|
|
8212
8218
|
};
|
|
8213
|
-
var $
|
|
8214
|
-
$
|
|
8219
|
+
var $bb22ceba3718f8e9$exports = {};
|
|
8220
|
+
$bb22ceba3718f8e9$exports = ".depict-img-cont {\n width: 100%;\n height: 100%;\n position: absolute;\n}\n\n.depict-img-filler {\n width: 100%;\n height: auto;\n display: inline-block;\n}\n\n.depict-img-comp {\n width: auto;\n height: auto;\n max-width: 100%;\n max-height: 100%;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n\n.depict-img-mod {\n width: 100%;\n height: 100%;\n object-fit: contain;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n\n";
|
|
8215
8221
|
const $9ef5ce4804a3b61b$export$3d13beba9b52c947 = "https://img.depict.ai/ResizeImage" + (process.env.TENANT ? "/" + process.env.TENANT : "");
|
|
8216
8222
|
const $9ef5ce4804a3b61b$export$a98fc8a2c818d3d8 = /*@__PURE__*/(() => typeof navigator === "undefined" ? false : /^((?!chrome|android).)*safari/i.test(navigator.userAgent))(); // https://stackoverflow.com/a/23522755
|
|
8217
8223
|
function $9ef5ce4804a3b61b$export$f39a7d0667e924a(what_to_watch) {
|
|
@@ -8374,7 +8380,7 @@ const $c987460cedc0d7ec$export$788756b42446dc2d = _ref => {
|
|
|
8374
8380
|
} = _ref;
|
|
8375
8381
|
if (!$c987460cedc0d7ec$var$inserted) {
|
|
8376
8382
|
// Insert styling on first import
|
|
8377
|
-
(0, $1013f2e568f87406$export$59ba1eb2c083f0cd)((0, /*@__PURE__*/$parcel$interopDefault($
|
|
8383
|
+
(0, $1013f2e568f87406$export$59ba1eb2c083f0cd)((0, /*@__PURE__*/$parcel$interopDefault($bb22ceba3718f8e9$exports)));
|
|
8378
8384
|
$c987460cedc0d7ec$var$inserted = true;
|
|
8379
8385
|
}
|
|
8380
8386
|
const img = process.env.BUILD_TARGET === "modern" || process.env.BUILD_TARGET === "dev" ? $c987460cedc0d7ec$var$Image(options) : $c987460cedc0d7ec$var$CompatibleImage(options);
|
|
@@ -8461,8 +8467,8 @@ function $c987460cedc0d7ec$var$srcset_comp_from_map_or_new(rendering_options) {
|
|
|
8461
8467
|
}
|
|
8462
8468
|
return sourceset_component;
|
|
8463
8469
|
}
|
|
8464
|
-
var $
|
|
8465
|
-
$
|
|
8470
|
+
var $9dac835b40ad5f94$exports = {};
|
|
8471
|
+
$9dac835b40ad5f94$exports = ".depict .images-container {\n position: relative;\n}\n\n.depict .second-image-container {\n width: 100%;\n opacity: 0;\n position: absolute;\n top: 0;\n}\n\n.depict .hovering .main-image-container {\n opacity: 0;\n}\n\n.depict .hovering .second-image-container {\n opacity: 1;\n}\n\n";
|
|
8466
8472
|
|
|
8467
8473
|
// Saving bytez
|
|
8468
8474
|
// Maybe? @Daniel
|
|
@@ -8596,7 +8602,7 @@ const $73f0a7e385687d5d$export$2369f6fc1c911576 = _ref => {
|
|
|
8596
8602
|
...options
|
|
8597
8603
|
} = _ref;
|
|
8598
8604
|
if (!$73f0a7e385687d5d$var$styling_inserted) {
|
|
8599
|
-
(0, $1013f2e568f87406$export$59ba1eb2c083f0cd)((0, /*@__PURE__*/$parcel$interopDefault($
|
|
8605
|
+
(0, $1013f2e568f87406$export$59ba1eb2c083f0cd)((0, /*@__PURE__*/$parcel$interopDefault($9dac835b40ad5f94$exports)));
|
|
8600
8606
|
$73f0a7e385687d5d$var$styling_inserted = true;
|
|
8601
8607
|
}
|
|
8602
8608
|
const main_image = (0, $c987460cedc0d7ec$export$788756b42446dc2d)({
|
package/latest/index.cjs
CHANGED
|
@@ -272,7 +272,7 @@ $parcel$export(module.exports, "hex_to_rgb", () => $d73746ee466f09ca$export$ca30
|
|
|
272
272
|
$parcel$export(module.exports, "version", () => $815f67c61b4c0a42$export$83d89fbfd8236492);
|
|
273
273
|
$parcel$export(module.exports, "add_to_version_info", () => $e4a18bf12ad092d9$export$2cefb7e61fcbae00);
|
|
274
274
|
$parcel$export(module.exports, "edit_current_page_meta_tags", () => $8838e3e61b748a8b$export$ef73ea4f975745ba);
|
|
275
|
-
const $815f67c61b4c0a42$export$83d89fbfd8236492 = "1.0.
|
|
275
|
+
const $815f67c61b4c0a42$export$83d89fbfd8236492 = "1.0.35";
|
|
276
276
|
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"))();
|
|
277
277
|
const $e6c6e7929ea385ae$var$browser_prefix_styling = "color: #fff;";
|
|
278
278
|
let $e6c6e7929ea385ae$var$browser_prefix = "[Depict]";
|
|
@@ -2012,6 +2012,9 @@ function $bf7f12fe044e41b2$export$cfef5d5c9ac09253(price, places_after_comma = 2
|
|
|
2012
2012
|
}
|
|
2013
2013
|
}
|
|
2014
2014
|
if (places_after_comma == "auto") places_after_comma = price % 1 ? 2 : 0;
|
|
2015
|
+
// Generalized rounding for any value of places_after_comma.
|
|
2016
|
+
const multiplier = Math.pow(10, places_after_comma);
|
|
2017
|
+
price = Math.round(price * multiplier) / multiplier;
|
|
2015
2018
|
const fixed = places_after_comma < 0 ? price.toString().split(".") : price.toFixed(places_after_comma).split("."),
|
|
2016
2019
|
[...chars] = fixed[0],
|
|
2017
2020
|
reversed = chars.reverse();
|
|
@@ -4354,7 +4357,10 @@ class $1683d0164abd7c1d$export$692b27c28639e5b9 {
|
|
|
4354
4357
|
subtree: true
|
|
4355
4358
|
});
|
|
4356
4359
|
for (const kid of element.children) this.observer.observe(kid);
|
|
4357
|
-
(0, $2a1cbc63a04d4a2d$export$b6ae1bc530f4c149).wait_for_listener("removed", element).then(
|
|
4360
|
+
(0, $2a1cbc63a04d4a2d$export$b6ae1bc530f4c149).wait_for_listener("removed", element).then(el => {
|
|
4361
|
+
if (document.documentElement.contains(el)) return; // Don't accidentally disconnect if we already got re-inserted
|
|
4362
|
+
cache_mo.disconnect();
|
|
4363
|
+
});
|
|
4358
4364
|
});
|
|
4359
4365
|
}
|
|
4360
4366
|
}
|
|
@@ -4921,8 +4927,8 @@ $52d3be7ce5146924$export$2e2bcd8739ae039 = async options => {
|
|
|
4921
4927
|
};
|
|
4922
4928
|
|
|
4923
4929
|
// @ts-ignore
|
|
4924
|
-
var $
|
|
4925
|
-
$
|
|
4930
|
+
var $0bdfc1d6f84716d9$exports = {};
|
|
4931
|
+
$0bdfc1d6f84716d9$exports = ".depict .rec_outer.noautospacing {\n width: 6cm;\n max-width: 46vw;\n margin-left: 1%;\n margin-right: 1%;\n}\n\n.depict .rec_outer.noautospacing:nth-child(1) {\n margin-left: 0;\n}\n\n.depict .rec_outer.noautospacing:nth-last-child(1) {\n margin-right: 0;\n}\n\n.depict-slider .slider_snap {\n scroll-snap-type: x mandatory;\n}\n\n.depict-slider {\n width: 100%;\n position: relative;\n}\n\n.depict-slider .sliding::-webkit-scrollbar {\n display: none;\n}\n\n.depict-slider .sliding {\n scroll-behavior: smooth;\n -ms-overflow-style: none;\n scrollbar-width: none;\n flex-flow: row;\n margin-top: -1%;\n margin-bottom: -2%;\n padding-top: 1%;\n padding-bottom: 2%;\n display: flex;\n overflow-x: scroll;\n}\n\n.depict-slider .sliding > * {\n box-sizing: border-box;\n flex: none;\n}\n\n.depict-slider button.right {\n right: 0;\n}\n\n.depict-slider button.left, .depict-slider button.right {\n z-index: 2;\n touch-action: manipulation;\n width: 1cm;\n height: 1cm;\n cursor: pointer;\n background: #fff;\n border: none;\n padding: .5%;\n transition-duration: .2s;\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n}\n\n.depict-slider button.left.hidden, .depict-slider button.right.hidden {\n opacity: 0;\n cursor: default;\n}\n\n.depict-slider button.left {\n left: 0;\n transform: translateY(-50%)rotate(180deg);\n}\n\n.depict-slider button.left img, .depict-slider button.right img {\n width: 100%;\n height: 100%;\n}\n\n.depict-slider .rec_outer {\n margin-top: 0 !important;\n}\n\n";
|
|
4926
4932
|
const $e090b20cef3f0516$var$default_image_src = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjYsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAxNiAxNiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTYgMTY7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxwb2x5Z29uIHBvaW50cz0iOSwyLjYgOC4zLDMuNCAxMi40LDcuNSAxLjYsNy41IDEuNiw4LjUgMTIuNCw4LjUgOC4zLDEyLjYgOSwxMy40IDE0LjQsOCAiLz4NCjwvc3ZnPg0K";
|
|
4927
4933
|
class $e090b20cef3f0516$export$4d41c6499d53639c extends (0, $a69a5236b5814082$export$68babfc5be0de5da) {
|
|
4928
4934
|
constructor(static_options, override_lazyfier_options) {
|
|
@@ -4953,7 +4959,7 @@ class $e090b20cef3f0516$export$4d41c6499d53639c extends (0, $a69a5236b5814082$ex
|
|
|
4953
4959
|
function $e090b20cef3f0516$export$f1b8b9fd75ddcab1(slider) {
|
|
4954
4960
|
const style_elem = document.createElement("style");
|
|
4955
4961
|
style_elem.type = "text/css";
|
|
4956
|
-
style_elem.append((0, /*@__PURE__*/$parcel$interopDefault($
|
|
4962
|
+
style_elem.append((0, /*@__PURE__*/$parcel$interopDefault($0bdfc1d6f84716d9$exports)));
|
|
4957
4963
|
slider.container.appendChild(style_elem);
|
|
4958
4964
|
}
|
|
4959
4965
|
async function $7af744346f17bf99$export$cd12721587f4f16d(t, rendering_options, options_for_us, slider_options, override_lazyfier_options) {
|
|
@@ -5563,8 +5569,8 @@ async function $a7315720bf2a1638$export$b0a773486c1c2312(t, recommendation_rende
|
|
|
5563
5569
|
}
|
|
5564
5570
|
|
|
5565
5571
|
// @ts-ignore
|
|
5566
|
-
var $
|
|
5567
|
-
$
|
|
5572
|
+
var $6f9658642611ab01$exports = {};
|
|
5573
|
+
$6f9658642611ab01$exports = ".depict-slider {\n width: 100%;\n position: relative;\n}\n\n.depict-slider .sliding {\n scroll-behavior: smooth;\n -ms-overflow-style: none;\n scrollbar-width: none;\n flex-flow: row;\n display: flex;\n overflow-x: scroll;\n}\n\n.depict-slider .sliding::-webkit-scrollbar {\n display: none;\n}\n\n.depict-slider .sliding > * {\n box-sizing: border-box;\n flex: none;\n}\n\n";
|
|
5568
5574
|
let $79804e8d76404ae4$var$slider_styling_was_inserted = false;
|
|
5569
5575
|
async function $79804e8d76404ae4$export$82cfdc85a4d15688(t, recommendation_renderer_options, {
|
|
5570
5576
|
container_elements: container_elements,
|
|
@@ -5587,7 +5593,7 @@ async function $79804e8d76404ae4$export$82cfdc85a4d15688(t, recommendation_rende
|
|
|
5587
5593
|
if (!elements) return rendering_result;
|
|
5588
5594
|
if (!$79804e8d76404ae4$var$slider_styling_was_inserted) {
|
|
5589
5595
|
$79804e8d76404ae4$var$slider_styling_was_inserted = true;
|
|
5590
|
-
(0, $e4bebbfa0f0b1454$export$59ba1eb2c083f0cd)((0, /*@__PURE__*/$parcel$interopDefault($
|
|
5596
|
+
(0, $e4bebbfa0f0b1454$export$59ba1eb2c083f0cd)((0, /*@__PURE__*/$parcel$interopDefault($6f9658642611ab01$exports)));
|
|
5591
5597
|
}
|
|
5592
5598
|
insertion_point.replaceWith(slider.container);
|
|
5593
5599
|
slider.insert_here.append(...elements);
|
|
@@ -7632,8 +7638,8 @@ async function $bd0fccdac6624b01$export$c068ad5361be7646({
|
|
|
7632
7638
|
on_close_(exit_oos_iterator);
|
|
7633
7639
|
}));
|
|
7634
7640
|
}
|
|
7635
|
-
var $
|
|
7636
|
-
$
|
|
7641
|
+
var $05427557ffc98539$exports = {};
|
|
7642
|
+
$05427557ffc98539$exports = ".depict-placeholder {\n will-change: mask, -webkit-mask;\n mask-position-x: 125%;\n mask-position-y: center;\n background: #ddd;\n animation: 1.5s linear infinite depict-placeholder;\n display: inline-block;\n position: relative;\n overflow: hidden;\n -webkit-mask: linear-gradient(-60deg, #000 30%, #0005, #000 70%) 125% / 300% 100%;\n -webkit-mask-image: ;\n mask-image: ;\n -webkit-mask-size: ;\n mask-size: ;\n}\n\n@keyframes depict-placeholder {\n 0% {\n mask-position-x: 125%;\n -webkit-mask-position-x: 125%;\n }\n\n 10% {\n mask-position-x: 125%;\n -webkit-mask-position-x: 125%;\n }\n\n 90% {\n mask-position-x: -25%;\n -webkit-mask-position-x: -25%;\n }\n\n 100% {\n mask-position-x: -25%;\n -webkit-mask-position-x: -25%;\n }\n}\n\n";
|
|
7637
7643
|
let $e587cb3b31b82f43$var$inserted = false;
|
|
7638
7644
|
const $e587cb3b31b82f43$export$84712d0562a614b8 = ({
|
|
7639
7645
|
width: width,
|
|
@@ -7644,7 +7650,7 @@ const $e587cb3b31b82f43$export$84712d0562a614b8 = ({
|
|
|
7644
7650
|
}) => {
|
|
7645
7651
|
if (!$e587cb3b31b82f43$var$inserted) {
|
|
7646
7652
|
// Insert styling on first import
|
|
7647
|
-
(0, $e4bebbfa0f0b1454$export$59ba1eb2c083f0cd)((0, /*@__PURE__*/$parcel$interopDefault($
|
|
7653
|
+
(0, $e4bebbfa0f0b1454$export$59ba1eb2c083f0cd)((0, /*@__PURE__*/$parcel$interopDefault($05427557ffc98539$exports)));
|
|
7648
7654
|
$e587cb3b31b82f43$var$inserted = true;
|
|
7649
7655
|
}
|
|
7650
7656
|
return (
|
|
@@ -7866,8 +7872,8 @@ const $b25f388f0fe2f1b3$export$237455ad7e59d4e5 = ({
|
|
|
7866
7872
|
collapse: collapse
|
|
7867
7873
|
};
|
|
7868
7874
|
};
|
|
7869
|
-
var $
|
|
7870
|
-
$
|
|
7875
|
+
var $278195e5c6164616$exports = {};
|
|
7876
|
+
$278195e5c6164616$exports = ".depict-img-cont {\n width: 100%;\n height: 100%;\n position: absolute;\n}\n\n.depict-img-filler {\n width: 100%;\n height: auto;\n display: inline-block;\n}\n\n.depict-img-comp {\n width: auto;\n height: auto;\n max-width: 100%;\n max-height: 100%;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n\n.depict-img-mod {\n width: 100%;\n height: 100%;\n object-fit: contain;\n position: absolute;\n inset: 0;\n}\n\n";
|
|
7871
7877
|
const $ff973b2032639b5f$export$3d13beba9b52c947 = "https://img.depict.ai/ResizeImage" + (process.env.TENANT ? "/" + process.env.TENANT : "");
|
|
7872
7878
|
const $ff973b2032639b5f$export$a98fc8a2c818d3d8 = /*@__PURE__*/(() => typeof navigator === "undefined" ? false : /^((?!chrome|android).)*safari/i.test(navigator.userAgent))(); // https://stackoverflow.com/a/23522755
|
|
7873
7879
|
function $ff973b2032639b5f$export$f39a7d0667e924a(what_to_watch, sizes_communicator = (0, $9a42a570de51ea3d$export$e806c6c1615a59ae)(), resolution_factor = 1) {
|
|
@@ -8023,7 +8029,7 @@ const $a312bccd722ac9e4$export$788756b42446dc2d = ({
|
|
|
8023
8029
|
}) => {
|
|
8024
8030
|
if (!$a312bccd722ac9e4$var$inserted) {
|
|
8025
8031
|
// Insert styling on first import
|
|
8026
|
-
(0, $e4bebbfa0f0b1454$export$59ba1eb2c083f0cd)((0, /*@__PURE__*/$parcel$interopDefault($
|
|
8032
|
+
(0, $e4bebbfa0f0b1454$export$59ba1eb2c083f0cd)((0, /*@__PURE__*/$parcel$interopDefault($278195e5c6164616$exports)));
|
|
8027
8033
|
$a312bccd722ac9e4$var$inserted = true;
|
|
8028
8034
|
}
|
|
8029
8035
|
const img = process.env.BUILD_TARGET === "modern" || process.env.BUILD_TARGET === "dev" ? $a312bccd722ac9e4$var$Image(options) : $a312bccd722ac9e4$var$CompatibleImage(options);
|
|
@@ -8103,8 +8109,8 @@ function $a312bccd722ac9e4$var$srcset_comp_from_map_or_new(rendering_options, sr
|
|
|
8103
8109
|
}
|
|
8104
8110
|
return sourceset_component;
|
|
8105
8111
|
}
|
|
8106
|
-
var $
|
|
8107
|
-
$
|
|
8112
|
+
var $63f2002626a07875$exports = {};
|
|
8113
|
+
$63f2002626a07875$exports = ".depict .images-container {\n position: relative;\n}\n\n.depict .second-image-container {\n width: 100%;\n opacity: 0;\n position: absolute;\n top: 0;\n}\n\n.depict .hovering .main-image-container {\n opacity: 0;\n}\n\n.depict .hovering .second-image-container {\n opacity: 1;\n}\n\n";
|
|
8108
8114
|
|
|
8109
8115
|
// Saving bytez
|
|
8110
8116
|
// Maybe? @Daniel
|
|
@@ -8232,7 +8238,7 @@ const $a656daa2fa8c279a$export$2369f6fc1c911576 = ({
|
|
|
8232
8238
|
...options
|
|
8233
8239
|
}) => {
|
|
8234
8240
|
if (!$a656daa2fa8c279a$var$styling_inserted) {
|
|
8235
|
-
(0, $e4bebbfa0f0b1454$export$59ba1eb2c083f0cd)((0, /*@__PURE__*/$parcel$interopDefault($
|
|
8241
|
+
(0, $e4bebbfa0f0b1454$export$59ba1eb2c083f0cd)((0, /*@__PURE__*/$parcel$interopDefault($63f2002626a07875$exports)));
|
|
8236
8242
|
$a656daa2fa8c279a$var$styling_inserted = true;
|
|
8237
8243
|
}
|
|
8238
8244
|
const main_image = (0, $a312bccd722ac9e4$export$788756b42446dc2d)({
|
package/latest/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference path="../jsx.d.ts" />
|
|
2
2
|
import { EUnavailabilityType } from "@depict-ai/types/api/TrackV2Request";
|
|
3
3
|
import { Accessor } from "solid-js";
|
|
4
|
-
export const version = "1.0.
|
|
4
|
+
export const version = "1.0.35";
|
|
5
5
|
export const is_debug: boolean;
|
|
6
6
|
/**
|
|
7
7
|
* Sets the prefix of dlog, dwarn, and derror messages in the browser console. Defaults to `[Depict]`.
|
package/latest/index.js
CHANGED
|
@@ -12,7 +12,7 @@ function $parcel$export(e, n, v, s) {
|
|
|
12
12
|
function $parcel$interopDefault(a) {
|
|
13
13
|
return a && a.__esModule ? a.default : a;
|
|
14
14
|
}
|
|
15
|
-
const $0766c85d387a9765$export$83d89fbfd8236492 = "1.0.
|
|
15
|
+
const $0766c85d387a9765$export$83d89fbfd8236492 = "1.0.35";
|
|
16
16
|
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"))();
|
|
17
17
|
const $649f456f663da9fc$var$browser_prefix_styling = "color: #fff;";
|
|
18
18
|
let $649f456f663da9fc$var$browser_prefix = "[Depict]";
|
|
@@ -1752,6 +1752,9 @@ function $0bdb8dbcf1bc7f34$export$cfef5d5c9ac09253(price, places_after_comma = 2
|
|
|
1752
1752
|
}
|
|
1753
1753
|
}
|
|
1754
1754
|
if (places_after_comma == "auto") places_after_comma = price % 1 ? 2 : 0;
|
|
1755
|
+
// Generalized rounding for any value of places_after_comma.
|
|
1756
|
+
const multiplier = Math.pow(10, places_after_comma);
|
|
1757
|
+
price = Math.round(price * multiplier) / multiplier;
|
|
1755
1758
|
const fixed = places_after_comma < 0 ? price.toString().split(".") : price.toFixed(places_after_comma).split("."),
|
|
1756
1759
|
[...chars] = fixed[0],
|
|
1757
1760
|
reversed = chars.reverse();
|
|
@@ -4094,7 +4097,10 @@ class $ef9394fafebd5eab$export$692b27c28639e5b9 {
|
|
|
4094
4097
|
subtree: true
|
|
4095
4098
|
});
|
|
4096
4099
|
for (const kid of element.children) this.observer.observe(kid);
|
|
4097
|
-
(0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).wait_for_listener("removed", element).then(
|
|
4100
|
+
(0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).wait_for_listener("removed", element).then(el => {
|
|
4101
|
+
if (document.documentElement.contains(el)) return; // Don't accidentally disconnect if we already got re-inserted
|
|
4102
|
+
cache_mo.disconnect();
|
|
4103
|
+
});
|
|
4098
4104
|
});
|
|
4099
4105
|
}
|
|
4100
4106
|
}
|
|
@@ -4661,8 +4667,8 @@ $51bbc74e39f5e5c6$export$2e2bcd8739ae039 = async options => {
|
|
|
4661
4667
|
};
|
|
4662
4668
|
|
|
4663
4669
|
// @ts-ignore
|
|
4664
|
-
var $
|
|
4665
|
-
$
|
|
4670
|
+
var $ac367c225b9acf18$exports = {};
|
|
4671
|
+
$ac367c225b9acf18$exports = ".depict .rec_outer.noautospacing {\n width: 6cm;\n max-width: 46vw;\n margin-left: 1%;\n margin-right: 1%;\n}\n\n.depict .rec_outer.noautospacing:nth-child(1) {\n margin-left: 0;\n}\n\n.depict .rec_outer.noautospacing:nth-last-child(1) {\n margin-right: 0;\n}\n\n.depict-slider .slider_snap {\n scroll-snap-type: x mandatory;\n}\n\n.depict-slider {\n width: 100%;\n position: relative;\n}\n\n.depict-slider .sliding::-webkit-scrollbar {\n display: none;\n}\n\n.depict-slider .sliding {\n scroll-behavior: smooth;\n -ms-overflow-style: none;\n scrollbar-width: none;\n flex-flow: row;\n margin-top: -1%;\n margin-bottom: -2%;\n padding-top: 1%;\n padding-bottom: 2%;\n display: flex;\n overflow-x: scroll;\n}\n\n.depict-slider .sliding > * {\n box-sizing: border-box;\n flex: none;\n}\n\n.depict-slider button.right {\n right: 0;\n}\n\n.depict-slider button.left, .depict-slider button.right {\n z-index: 2;\n touch-action: manipulation;\n width: 1cm;\n height: 1cm;\n cursor: pointer;\n background: #fff;\n border: none;\n padding: .5%;\n transition-duration: .2s;\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n}\n\n.depict-slider button.left.hidden, .depict-slider button.right.hidden {\n opacity: 0;\n cursor: default;\n}\n\n.depict-slider button.left {\n left: 0;\n transform: translateY(-50%)rotate(180deg);\n}\n\n.depict-slider button.left img, .depict-slider button.right img {\n width: 100%;\n height: 100%;\n}\n\n.depict-slider .rec_outer {\n margin-top: 0 !important;\n}\n\n";
|
|
4666
4672
|
const $762a881271a51d1b$var$default_image_src = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjYsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAxNiAxNiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTYgMTY7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxwb2x5Z29uIHBvaW50cz0iOSwyLjYgOC4zLDMuNCAxMi40LDcuNSAxLjYsNy41IDEuNiw4LjUgMTIuNCw4LjUgOC4zLDEyLjYgOSwxMy40IDE0LjQsOCAiLz4NCjwvc3ZnPg0K";
|
|
4667
4673
|
class $762a881271a51d1b$export$4d41c6499d53639c extends (0, $c33c6faf8acc7442$export$68babfc5be0de5da) {
|
|
4668
4674
|
constructor(static_options, override_lazyfier_options) {
|
|
@@ -4693,7 +4699,7 @@ class $762a881271a51d1b$export$4d41c6499d53639c extends (0, $c33c6faf8acc7442$ex
|
|
|
4693
4699
|
function $762a881271a51d1b$export$f1b8b9fd75ddcab1(slider) {
|
|
4694
4700
|
const style_elem = document.createElement("style");
|
|
4695
4701
|
style_elem.type = "text/css";
|
|
4696
|
-
style_elem.append((0, /*@__PURE__*/$parcel$interopDefault($
|
|
4702
|
+
style_elem.append((0, /*@__PURE__*/$parcel$interopDefault($ac367c225b9acf18$exports)));
|
|
4697
4703
|
slider.container.appendChild(style_elem);
|
|
4698
4704
|
}
|
|
4699
4705
|
async function $e61f371a9bcdeb2f$export$cd12721587f4f16d(t, rendering_options, options_for_us, slider_options, override_lazyfier_options) {
|
|
@@ -5303,8 +5309,8 @@ async function $090b8182afa1b2a6$export$b0a773486c1c2312(t, recommendation_rende
|
|
|
5303
5309
|
}
|
|
5304
5310
|
|
|
5305
5311
|
// @ts-ignore
|
|
5306
|
-
var $
|
|
5307
|
-
$
|
|
5312
|
+
var $f2bd9116db2dd7da$exports = {};
|
|
5313
|
+
$f2bd9116db2dd7da$exports = ".depict-slider {\n width: 100%;\n position: relative;\n}\n\n.depict-slider .sliding {\n scroll-behavior: smooth;\n -ms-overflow-style: none;\n scrollbar-width: none;\n flex-flow: row;\n display: flex;\n overflow-x: scroll;\n}\n\n.depict-slider .sliding::-webkit-scrollbar {\n display: none;\n}\n\n.depict-slider .sliding > * {\n box-sizing: border-box;\n flex: none;\n}\n\n";
|
|
5308
5314
|
let $30f78542ed78cd31$var$slider_styling_was_inserted = false;
|
|
5309
5315
|
async function $30f78542ed78cd31$export$82cfdc85a4d15688(t, recommendation_renderer_options, {
|
|
5310
5316
|
container_elements: container_elements,
|
|
@@ -5327,7 +5333,7 @@ async function $30f78542ed78cd31$export$82cfdc85a4d15688(t, recommendation_rende
|
|
|
5327
5333
|
if (!elements) return rendering_result;
|
|
5328
5334
|
if (!$30f78542ed78cd31$var$slider_styling_was_inserted) {
|
|
5329
5335
|
$30f78542ed78cd31$var$slider_styling_was_inserted = true;
|
|
5330
|
-
(0, $0a581f1dfa083522$export$59ba1eb2c083f0cd)((0, /*@__PURE__*/$parcel$interopDefault($
|
|
5336
|
+
(0, $0a581f1dfa083522$export$59ba1eb2c083f0cd)((0, /*@__PURE__*/$parcel$interopDefault($f2bd9116db2dd7da$exports)));
|
|
5331
5337
|
}
|
|
5332
5338
|
insertion_point.replaceWith(slider.container);
|
|
5333
5339
|
slider.insert_here.append(...elements);
|
|
@@ -7372,8 +7378,8 @@ async function $72d170fd5c7cb3fe$export$c068ad5361be7646({
|
|
|
7372
7378
|
on_close_(exit_oos_iterator);
|
|
7373
7379
|
}));
|
|
7374
7380
|
}
|
|
7375
|
-
var $
|
|
7376
|
-
$
|
|
7381
|
+
var $88c888c4d16ccbd4$exports = {};
|
|
7382
|
+
$88c888c4d16ccbd4$exports = ".depict-placeholder {\n will-change: mask, -webkit-mask;\n mask-position-x: 125%;\n mask-position-y: center;\n background: #ddd;\n animation: 1.5s linear infinite depict-placeholder;\n display: inline-block;\n position: relative;\n overflow: hidden;\n -webkit-mask: linear-gradient(-60deg, #000 30%, #0005, #000 70%) 125% / 300% 100%;\n -webkit-mask-image: ;\n mask-image: ;\n -webkit-mask-size: ;\n mask-size: ;\n}\n\n@keyframes depict-placeholder {\n 0% {\n mask-position-x: 125%;\n -webkit-mask-position-x: 125%;\n }\n\n 10% {\n mask-position-x: 125%;\n -webkit-mask-position-x: 125%;\n }\n\n 90% {\n mask-position-x: -25%;\n -webkit-mask-position-x: -25%;\n }\n\n 100% {\n mask-position-x: -25%;\n -webkit-mask-position-x: -25%;\n }\n}\n\n";
|
|
7377
7383
|
let $ad592d9ddbcffe72$var$inserted = false;
|
|
7378
7384
|
const $ad592d9ddbcffe72$export$84712d0562a614b8 = ({
|
|
7379
7385
|
width: width,
|
|
@@ -7384,7 +7390,7 @@ const $ad592d9ddbcffe72$export$84712d0562a614b8 = ({
|
|
|
7384
7390
|
}) => {
|
|
7385
7391
|
if (!$ad592d9ddbcffe72$var$inserted) {
|
|
7386
7392
|
// Insert styling on first import
|
|
7387
|
-
(0, $0a581f1dfa083522$export$59ba1eb2c083f0cd)((0, /*@__PURE__*/$parcel$interopDefault($
|
|
7393
|
+
(0, $0a581f1dfa083522$export$59ba1eb2c083f0cd)((0, /*@__PURE__*/$parcel$interopDefault($88c888c4d16ccbd4$exports)));
|
|
7388
7394
|
$ad592d9ddbcffe72$var$inserted = true;
|
|
7389
7395
|
}
|
|
7390
7396
|
return (
|
|
@@ -7606,8 +7612,8 @@ const $7f57d546b5d5b3d6$export$237455ad7e59d4e5 = ({
|
|
|
7606
7612
|
collapse: collapse
|
|
7607
7613
|
};
|
|
7608
7614
|
};
|
|
7609
|
-
var $
|
|
7610
|
-
$
|
|
7615
|
+
var $3e5c76df45929e80$exports = {};
|
|
7616
|
+
$3e5c76df45929e80$exports = ".depict-img-cont {\n width: 100%;\n height: 100%;\n position: absolute;\n}\n\n.depict-img-filler {\n width: 100%;\n height: auto;\n display: inline-block;\n}\n\n.depict-img-comp {\n width: auto;\n height: auto;\n max-width: 100%;\n max-height: 100%;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n\n.depict-img-mod {\n width: 100%;\n height: 100%;\n object-fit: contain;\n position: absolute;\n inset: 0;\n}\n\n";
|
|
7611
7617
|
const $45af9e834781a9bc$export$3d13beba9b52c947 = "https://img.depict.ai/ResizeImage" + (process.env.TENANT ? "/" + process.env.TENANT : "");
|
|
7612
7618
|
const $45af9e834781a9bc$export$a98fc8a2c818d3d8 = /*@__PURE__*/(() => typeof navigator === "undefined" ? false : /^((?!chrome|android).)*safari/i.test(navigator.userAgent))(); // https://stackoverflow.com/a/23522755
|
|
7613
7619
|
function $45af9e834781a9bc$export$f39a7d0667e924a(what_to_watch, sizes_communicator = (0, $607fc90221d440a6$export$e806c6c1615a59ae)(), resolution_factor = 1) {
|
|
@@ -7763,7 +7769,7 @@ const $914971fb43986a16$export$788756b42446dc2d = ({
|
|
|
7763
7769
|
}) => {
|
|
7764
7770
|
if (!$914971fb43986a16$var$inserted) {
|
|
7765
7771
|
// Insert styling on first import
|
|
7766
|
-
(0, $0a581f1dfa083522$export$59ba1eb2c083f0cd)((0, /*@__PURE__*/$parcel$interopDefault($
|
|
7772
|
+
(0, $0a581f1dfa083522$export$59ba1eb2c083f0cd)((0, /*@__PURE__*/$parcel$interopDefault($3e5c76df45929e80$exports)));
|
|
7767
7773
|
$914971fb43986a16$var$inserted = true;
|
|
7768
7774
|
}
|
|
7769
7775
|
const img = process.env.BUILD_TARGET === "modern" || process.env.BUILD_TARGET === "dev" ? $914971fb43986a16$var$Image(options) : $914971fb43986a16$var$CompatibleImage(options);
|
|
@@ -7843,8 +7849,8 @@ function $914971fb43986a16$var$srcset_comp_from_map_or_new(rendering_options, sr
|
|
|
7843
7849
|
}
|
|
7844
7850
|
return sourceset_component;
|
|
7845
7851
|
}
|
|
7846
|
-
var $
|
|
7847
|
-
$
|
|
7852
|
+
var $e54f50426e7d0ab9$exports = {};
|
|
7853
|
+
$e54f50426e7d0ab9$exports = ".depict .images-container {\n position: relative;\n}\n\n.depict .second-image-container {\n width: 100%;\n opacity: 0;\n position: absolute;\n top: 0;\n}\n\n.depict .hovering .main-image-container {\n opacity: 0;\n}\n\n.depict .hovering .second-image-container {\n opacity: 1;\n}\n\n";
|
|
7848
7854
|
|
|
7849
7855
|
// Saving bytez
|
|
7850
7856
|
// Maybe? @Daniel
|
|
@@ -7972,7 +7978,7 @@ const $8483d1d9fcee52ec$export$2369f6fc1c911576 = ({
|
|
|
7972
7978
|
...options
|
|
7973
7979
|
}) => {
|
|
7974
7980
|
if (!$8483d1d9fcee52ec$var$styling_inserted) {
|
|
7975
|
-
(0, $0a581f1dfa083522$export$59ba1eb2c083f0cd)((0, /*@__PURE__*/$parcel$interopDefault($
|
|
7981
|
+
(0, $0a581f1dfa083522$export$59ba1eb2c083f0cd)((0, /*@__PURE__*/$parcel$interopDefault($e54f50426e7d0ab9$exports)));
|
|
7976
7982
|
$8483d1d9fcee52ec$var$styling_inserted = true;
|
|
7977
7983
|
}
|
|
7978
7984
|
const main_image = (0, $914971fb43986a16$export$788756b42446dc2d)({
|