@depict-ai/utilishared 2.0.2 → 2.0.4
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 +340 -302
- package/ES10/index.d.ts +15 -16
- package/ES10/index.js +340 -302
- package/latest/index.cjs +328 -298
- package/latest/index.d.ts +15 -16
- package/latest/index.js +328 -298
- package/package.json +66 -7
package/ES10/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { onCleanup as $76EG6$onCleanup, createEffect as $76EG6$createEffect, createSignal as $76EG6$createSignal } from "solid-js";
|
|
2
|
+
import $76EG6$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
3
|
import $76EG6$babelruntimehelpersclassPrivateFieldSet from "@babel/runtime/helpers/classPrivateFieldSet";
|
|
3
4
|
import $76EG6$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpers/classPrivateFieldGet";
|
|
4
|
-
import $76EG6$
|
|
5
|
+
import { template as $76EG6$template, getNextElement as $76EG6$getNextElement, insert as $76EG6$insert, className as $76EG6$className, setAttribute as $76EG6$setAttribute, spread as $76EG6$spread, mergeProps as $76EG6$mergeProps, runHydrationEvents as $76EG6$runHydrationEvents, addEventListener as $76EG6$addEventListener, getNextMarker as $76EG6$getNextMarker, delegateEvents as $76EG6$delegateEvents, effect as $76EG6$effect, style as $76EG6$style, createComponent as $76EG6$createComponent } from "solid-js/web";
|
|
5
6
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
6
7
|
register_es_version("utilishared", "ES10");
|
|
7
8
|
function $parcel$export(e, n, v, s) {
|
|
@@ -15,7 +16,7 @@ function $parcel$export(e, n, v, s) {
|
|
|
15
16
|
function $parcel$interopDefault(a) {
|
|
16
17
|
return a && a.__esModule ? a.default : a;
|
|
17
18
|
}
|
|
18
|
-
const $b9e07ce3c67aa344$export$83d89fbfd8236492 = "2.0.
|
|
19
|
+
const $b9e07ce3c67aa344$export$83d89fbfd8236492 = "2.0.4";
|
|
19
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"))();
|
|
20
21
|
const $241f2f02cc612a49$var$browser_prefix_styling = "color: #fff;";
|
|
21
22
|
let $241f2f02cc612a49$var$browser_prefix = "[Depict]";
|
|
@@ -74,6 +75,7 @@ class $449d6683cecfa078$export$e2c811ae0eb35313 {
|
|
|
74
75
|
$76EG6$babelruntimehelpersdefineProperty(this, "subscribers_", []);
|
|
75
76
|
$76EG6$babelruntimehelpersdefineProperty(this, "waiting_for_update_", 0);
|
|
76
77
|
$76EG6$babelruntimehelpersdefineProperty(this, "queue_", []);
|
|
78
|
+
$76EG6$babelruntimehelpersdefineProperty(this, "last_processed_value_", void 0);
|
|
77
79
|
$76EG6$babelruntimehelpersdefineProperty(this, "has_had_value_", false);
|
|
78
80
|
$76EG6$babelruntimehelpersdefineProperty(this, "push_value_", value => {
|
|
79
81
|
this.queue_.push(value);
|
|
@@ -748,6 +750,7 @@ class $f5a4b8e233f0e1cd$export$1b28bc5c68cc4d77 extends EventTarget {
|
|
|
748
750
|
get: $f5a4b8e233f0e1cd$var$_get_initial_reconnect_delay,
|
|
749
751
|
set: void 0
|
|
750
752
|
});
|
|
753
|
+
$76EG6$babelruntimehelpersdefineProperty(this, "current_socket", void 0);
|
|
751
754
|
$f5a4b8e233f0e1cd$var$_classPrivateFieldInitSpec(this, $f5a4b8e233f0e1cd$var$_ws_constructor_options, {
|
|
752
755
|
writable: true,
|
|
753
756
|
value: void 0
|
|
@@ -760,6 +763,7 @@ class $f5a4b8e233f0e1cd$export$1b28bc5c68cc4d77 extends EventTarget {
|
|
|
760
763
|
writable: true,
|
|
761
764
|
value: {}
|
|
762
765
|
});
|
|
766
|
+
$76EG6$babelruntimehelpersdefineProperty(this, "restart_ws", void 0);
|
|
763
767
|
$f5a4b8e233f0e1cd$var$_classPrivateFieldInitSpec(this, $f5a4b8e233f0e1cd$var$_try_again_in_ms, {
|
|
764
768
|
writable: true,
|
|
765
769
|
value: $76EG6$babelruntimehelpersclassPrivateFieldGet(this, $f5a4b8e233f0e1cd$var$_initial_reconnect_delay)
|
|
@@ -3918,6 +3922,7 @@ class $5f31622ffb78bc10$export$3be7054c61590ee3 {
|
|
|
3918
3922
|
$5f31622ffb78bc10$var$_classPrivateMethodInitSpec(this, $5f31622ffb78bc10$var$_unload_images_and_add_load_listeners);
|
|
3919
3923
|
$5f31622ffb78bc10$var$_classPrivateMethodInitSpec(this, $5f31622ffb78bc10$var$_add_load_event_listener);
|
|
3920
3924
|
$5f31622ffb78bc10$var$_classPrivateMethodInitSpec(this, $5f31622ffb78bc10$var$_initiate_new_image);
|
|
3925
|
+
$76EG6$babelruntimehelpersdefineProperty(this, "intersection_observer", void 0);
|
|
3921
3926
|
$5f31622ffb78bc10$var$_classPrivateFieldInitSpec(this, $5f31622ffb78bc10$var$_verbose, {
|
|
3922
3927
|
writable: true,
|
|
3923
3928
|
value: false
|
|
@@ -4136,59 +4141,10 @@ function $5f31622ffb78bc10$export$e4741190ccada479(element, selector) {
|
|
|
4136
4141
|
}
|
|
4137
4142
|
return result;
|
|
4138
4143
|
}
|
|
4139
|
-
const $
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
}
|
|
4144
|
-
const $a285401a927e4306$export$22a65337c1b43b1f = /* @PURE */classes => classes.filter(c => c !== undefined).join(" ");
|
|
4145
|
-
const $0f650018c3cbc373$var$appendChild = (parent, child) => {
|
|
4146
|
-
if (!child) return; // null, undefined, false, "", etc should not create nodes
|
|
4147
|
-
if (!(child instanceof Node || typeof child === "string") && typeof child[Symbol.iterator] === "function") {
|
|
4148
|
-
if (child.length !== undefined)
|
|
4149
|
-
// it's array-like enough to be iterated with a normal for loop (for-of is 20% of that speed)
|
|
4150
|
-
for (let i = 0; i < child.length; i++) $0f650018c3cbc373$var$appendChild(parent, child[i]);else
|
|
4151
|
-
// fallback for things only implementing iterator interface
|
|
4152
|
-
for (const more_kids of child) $0f650018c3cbc373$var$appendChild(parent, more_kids);
|
|
4153
|
-
return;
|
|
4154
|
-
}
|
|
4155
|
-
parent.append(child);
|
|
4156
|
-
};
|
|
4157
|
-
const $0f650018c3cbc373$export$34b9dba7ce09269b = (tag, _ref, _unknown) => {
|
|
4158
|
-
let {
|
|
4159
|
-
children: children,
|
|
4160
|
-
...props
|
|
4161
|
-
} = _ref;
|
|
4162
|
-
if (typeof tag === "function") return tag({
|
|
4163
|
-
children: children,
|
|
4164
|
-
...props
|
|
4165
|
-
}, _unknown);
|
|
4166
|
-
// For partial SVG support
|
|
4167
|
-
// Exhaustive list (I think) for these checks should be ["svg","animate","animateMotion","animateTransform","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","metadata","path","pattern","polygon","polyline","radialGradient","rect","stop","switch","symbol","text","textPath","tspan","use","view"]
|
|
4168
|
-
const is_svg = (props === null || props === void 0 ? void 0 : props.xmlns) || tag == "defs" || tag == "filter" || tag == "fecolormatrix" || tag == "g" || tag == "circle" || tag == "circle" || tag == "svg" || tag == "path" || tag == "polygon";
|
|
4169
|
-
if (is_svg) var namespace = (props === null || props === void 0 ? void 0 : props.xmlns) || "http://www.w3.org/2000/svg";
|
|
4170
|
-
if (typeof document === "undefined") return {};
|
|
4171
|
-
const element = is_svg ? document.createElementNS(namespace, tag) : document.createElement(tag);
|
|
4172
|
-
for (const key in props) {
|
|
4173
|
-
const value = props[key];
|
|
4174
|
-
if (key === "onClick") element.addEventListener("click", $5e1f45affc1d7def$export$b3bbfd758f11cfa9(value));else if (key.startsWith("xlink:"))
|
|
4175
|
-
// https://stackoverflow.com/a/23142447
|
|
4176
|
-
// https://developer.mozilla.org/en-US/docs/Web/SVG/Namespaces_Crash_Course
|
|
4177
|
-
element.setAttributeNS("http://www.w3.org/1999/xlink", key, value);else if (key == "xmlns" || key.startsWith("xmlns:")) element.setAttributeNS("http://www.w3.org/2000/xmlns/", key, value);else if (key.startsWith("xml:")) element.setAttributeNS("http://www.w3.org/XML/1998/namespace", key, value);else element.setAttribute(key, props[key]);
|
|
4178
|
-
}
|
|
4179
|
-
$0f650018c3cbc373$var$appendChild(element, children);
|
|
4180
|
-
return element;
|
|
4181
|
-
};
|
|
4182
|
-
const $0f650018c3cbc373$export$25062201e9e25d76 = $0f650018c3cbc373$export$34b9dba7ce09269b;
|
|
4183
|
-
const $0f650018c3cbc373$export$ffb0004e005737fa = (_ref2, _unknown) => {
|
|
4184
|
-
let {
|
|
4185
|
-
children: children
|
|
4186
|
-
} = _ref2;
|
|
4187
|
-
if (typeof document === "undefined") return {};
|
|
4188
|
-
const df = document.createDocumentFragment();
|
|
4189
|
-
$0f650018c3cbc373$var$appendChild(df, children);
|
|
4190
|
-
return df;
|
|
4191
|
-
};
|
|
4144
|
+
const $be288a83d9eabf2a$var$_tmpl$ = /*#__PURE__*/$76EG6$template(`<div class="depict-slider depict">`),
|
|
4145
|
+
$be288a83d9eabf2a$var$_tmpl$2 = /*#__PURE__*/$76EG6$template(`<div class=sliding>`),
|
|
4146
|
+
$be288a83d9eabf2a$var$_tmpl$3 = /*#__PURE__*/$76EG6$template(`<button aria-label="Scroll left"class="left d-navbutton"type=button>`),
|
|
4147
|
+
$be288a83d9eabf2a$var$_tmpl$4 = /*#__PURE__*/$76EG6$template(`<button aria-label="Scroll right"class="right d-navbutton"type=button>`);
|
|
4192
4148
|
function $be288a83d9eabf2a$var$_classPrivateMethodInitSpec(obj, privateSet) {
|
|
4193
4149
|
$be288a83d9eabf2a$var$_checkPrivateRedeclaration(obj, privateSet);
|
|
4194
4150
|
privateSet.add(obj);
|
|
@@ -4383,25 +4339,13 @@ class $be288a83d9eabf2a$export$692b27c28639e5b9 {
|
|
|
4383
4339
|
$be288a83d9eabf2a$var$_classPrivateMethodInitSpec(this, $be288a83d9eabf2a$var$_hide_buttons_if_needed);
|
|
4384
4340
|
$be288a83d9eabf2a$var$_classPrivateMethodInitSpec(this, $be288a83d9eabf2a$var$_observer_callback);
|
|
4385
4341
|
$be288a83d9eabf2a$var$_classPrivateMethodInitSpec(this, $be288a83d9eabf2a$var$_observe_element);
|
|
4386
|
-
$76EG6$babelruntimehelpersdefineProperty(this, "container", $
|
|
4387
|
-
class: "depict-slider depict"
|
|
4388
|
-
}));
|
|
4342
|
+
$76EG6$babelruntimehelpersdefineProperty(this, "container", $76EG6$getNextElement($be288a83d9eabf2a$var$_tmpl$));
|
|
4389
4343
|
$be288a83d9eabf2a$var$_classPrivateFieldInitSpec(this, $be288a83d9eabf2a$var$_elements, {
|
|
4390
4344
|
writable: true,
|
|
4391
4345
|
value: {
|
|
4392
|
-
sliding_el_: $
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
left_: $0f650018c3cbc373$export$34b9dba7ce09269b("button", {
|
|
4396
|
-
"aria-label": "Scroll left",
|
|
4397
|
-
class: "left d-navbutton",
|
|
4398
|
-
type: "button"
|
|
4399
|
-
}),
|
|
4400
|
-
right_: $0f650018c3cbc373$export$34b9dba7ce09269b("button", {
|
|
4401
|
-
"aria-label": "Scroll right",
|
|
4402
|
-
class: "right d-navbutton",
|
|
4403
|
-
type: "button"
|
|
4404
|
-
})
|
|
4346
|
+
sliding_el_: $76EG6$getNextElement($be288a83d9eabf2a$var$_tmpl$2),
|
|
4347
|
+
left_: $76EG6$getNextElement($be288a83d9eabf2a$var$_tmpl$3),
|
|
4348
|
+
right_: $76EG6$getNextElement($be288a83d9eabf2a$var$_tmpl$4)
|
|
4405
4349
|
}
|
|
4406
4350
|
});
|
|
4407
4351
|
$76EG6$babelruntimehelpersdefineProperty(this, "insert_here", $76EG6$babelruntimehelpersclassPrivateFieldGet(this, $be288a83d9eabf2a$var$_elements).sliding_el_);
|
|
@@ -4415,6 +4359,7 @@ class $be288a83d9eabf2a$export$692b27c28639e5b9 {
|
|
|
4415
4359
|
$76EG6$babelruntimehelpersdefineProperty(this, "dist_to_hide_right", 10);
|
|
4416
4360
|
$76EG6$babelruntimehelpersdefineProperty(this, "center_target", false);
|
|
4417
4361
|
$76EG6$babelruntimehelpersdefineProperty(this, "correct_bs_targets", true);
|
|
4362
|
+
$76EG6$babelruntimehelpersdefineProperty(this, "snap_style", void 0);
|
|
4418
4363
|
$76EG6$babelruntimehelpersdefineProperty(this, "on_elements_changed", [$be288a83d9eabf2a$var$_classPrivateMethodGet(this, $be288a83d9eabf2a$var$_observe_element, $be288a83d9eabf2a$var$_observe_element2)]);
|
|
4419
4364
|
$be288a83d9eabf2a$var$_classPrivateFieldInitSpec(this, $be288a83d9eabf2a$var$_index_cache, {
|
|
4420
4365
|
writable: true,
|
|
@@ -4931,6 +4876,9 @@ let $eb252431088a7c2b$var$pageview_sent = false;
|
|
|
4931
4876
|
var $eb252431088a7c2b$var$_dispatched_recs_inserted = /*#__PURE__*/new WeakMap();
|
|
4932
4877
|
class $eb252431088a7c2b$export$1a8782481a9af507 {
|
|
4933
4878
|
constructor(settings) {
|
|
4879
|
+
$76EG6$babelruntimehelpersdefineProperty(this, "settings", void 0);
|
|
4880
|
+
$76EG6$babelruntimehelpersdefineProperty(this, "data", void 0);
|
|
4881
|
+
$76EG6$babelruntimehelpersdefineProperty(this, "tracker", void 0);
|
|
4934
4882
|
$eb252431088a7c2b$var$_classPrivateFieldInitSpec(this, $eb252431088a7c2b$var$_dispatched_recs_inserted, {
|
|
4935
4883
|
writable: true,
|
|
4936
4884
|
value: false
|
|
@@ -4972,6 +4920,7 @@ class $eb252431088a7c2b$export$1a8782481a9af507 {
|
|
|
4972
4920
|
}
|
|
4973
4921
|
trackGAEvent(action, index, product_id, ga_product_ids) {
|
|
4974
4922
|
if (this.settings.sendGa === false) return;
|
|
4923
|
+
// @ts-ignore
|
|
4975
4924
|
if (typeof ga !== "function") {
|
|
4976
4925
|
console.log("Could not send", action, "to GA. analytics.js not loaded.");
|
|
4977
4926
|
return;
|
|
@@ -4984,7 +4933,9 @@ class $eb252431088a7c2b$export$1a8782481a9af507 {
|
|
|
4984
4933
|
list_name: "depict_" + this.settings.type
|
|
4985
4934
|
});
|
|
4986
4935
|
}
|
|
4987
|
-
if (this.tracker === undefined)
|
|
4936
|
+
if (this.tracker === undefined)
|
|
4937
|
+
// @ts-ignore
|
|
4938
|
+
this.tracker = ga("create", this.settings.gaid, "auto", "depict");
|
|
4988
4939
|
$3674b9afc9a63520$export$f75172d2e289cd02(action);
|
|
4989
4940
|
}
|
|
4990
4941
|
trackPageView() {
|
|
@@ -5255,6 +5206,7 @@ async function $b7b39b38d6e695e9$export$cd12721587f4f16d(t, rendering_options, o
|
|
|
5255
5206
|
elements: container ? container : [slider.container]
|
|
5256
5207
|
};
|
|
5257
5208
|
}
|
|
5209
|
+
const $193ee64f5599f8a8$var$_tmpl$ = /*#__PURE__*/$76EG6$template(`<button class=load_more>`);
|
|
5258
5210
|
async function $193ee64f5599f8a8$export$30933c637c977eef(_ref) {
|
|
5259
5211
|
var _template_tool$data;
|
|
5260
5212
|
let {
|
|
@@ -5398,10 +5350,11 @@ function $193ee64f5599f8a8$var$setup_load_more(t, root, chunk_size) {
|
|
|
5398
5350
|
catchify: catchify
|
|
5399
5351
|
} = t,
|
|
5400
5352
|
load_more_cont = $652300c6621d5500$export$d3e2a0560cbf4787('<div class="load-more-container"></div>'),
|
|
5401
|
-
load_button = load_more_cont.appendChild(
|
|
5402
|
-
|
|
5403
|
-
|
|
5404
|
-
|
|
5353
|
+
load_button = load_more_cont.appendChild((() => {
|
|
5354
|
+
const _el$ = $76EG6$getNextElement($193ee64f5599f8a8$var$_tmpl$);
|
|
5355
|
+
$76EG6$insert(_el$, view_more_text);
|
|
5356
|
+
return _el$;
|
|
5357
|
+
})());
|
|
5405
5358
|
load_button.addEventListener("click", catchify(load_more_recs_and_hide_button_if_needed));
|
|
5406
5359
|
root.after(load_more_cont);
|
|
5407
5360
|
load_more_recs_and_hide_button_if_needed();
|
|
@@ -5499,24 +5452,63 @@ async function $03021b39f80fac4b$var$send_sentry_422(response, body, stack) {
|
|
|
5499
5452
|
this.captureException(new Error(msg));
|
|
5500
5453
|
});
|
|
5501
5454
|
}
|
|
5502
|
-
const $
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
|
|
5512
|
-
|
|
5513
|
-
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
}
|
|
5455
|
+
const $a285401a927e4306$export$eb0b9ed911409b57 = (callback, element) => ($5e1f45affc1d7def$export$b3bbfd758f11cfa9(callback)(element), element);
|
|
5456
|
+
function $a285401a927e4306$export$f63fcc839cb0f734(event, handler, element) {
|
|
5457
|
+
element.addEventListener(event, $5e1f45affc1d7def$export$b3bbfd758f11cfa9(handler));
|
|
5458
|
+
return element;
|
|
5459
|
+
}
|
|
5460
|
+
const $a285401a927e4306$export$22a65337c1b43b1f = /* @PURE */classes => classes.filter(c => c !== undefined).join(" ");
|
|
5461
|
+
const $0f650018c3cbc373$var$appendChild = (parent, child) => {
|
|
5462
|
+
if (!child) return; // null, undefined, false, "", etc should not create nodes
|
|
5463
|
+
if (!(child instanceof Node || typeof child === "string") && typeof child[Symbol.iterator] === "function") {
|
|
5464
|
+
if (child.length !== undefined)
|
|
5465
|
+
// it's array-like enough to be iterated with a normal for loop (for-of is 20% of that speed)
|
|
5466
|
+
for (let i = 0; i < child.length; i++) $0f650018c3cbc373$var$appendChild(parent, child[i]);else
|
|
5467
|
+
// fallback for things only implementing iterator interface
|
|
5468
|
+
for (const more_kids of child) $0f650018c3cbc373$var$appendChild(parent, more_kids);
|
|
5469
|
+
return;
|
|
5470
|
+
}
|
|
5471
|
+
parent.append(child);
|
|
5472
|
+
};
|
|
5473
|
+
const $0f650018c3cbc373$export$34b9dba7ce09269b = (tag, _ref, _unknown) => {
|
|
5474
|
+
let {
|
|
5475
|
+
children: children,
|
|
5476
|
+
...props
|
|
5477
|
+
} = _ref;
|
|
5478
|
+
if (typeof tag === "function") return tag({
|
|
5479
|
+
children: children,
|
|
5480
|
+
...props
|
|
5481
|
+
}, _unknown);
|
|
5482
|
+
// For partial SVG support
|
|
5483
|
+
// Exhaustive list (I think) for these checks should be ["svg","animate","animateMotion","animateTransform","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","metadata","path","pattern","polygon","polyline","radialGradient","rect","stop","switch","symbol","text","textPath","tspan","use","view"]
|
|
5484
|
+
const is_svg = (props === null || props === void 0 ? void 0 : props.xmlns) || tag == "defs" || tag == "filter" || tag == "fecolormatrix" || tag == "g" || tag == "circle" || tag == "circle" || tag == "svg" || tag == "path" || tag == "polygon";
|
|
5485
|
+
if (is_svg) var namespace = (props === null || props === void 0 ? void 0 : props.xmlns) || "http://www.w3.org/2000/svg";
|
|
5486
|
+
if (typeof document === "undefined") return {};
|
|
5487
|
+
const element = is_svg ? document.createElementNS(namespace, tag) : document.createElement(tag);
|
|
5488
|
+
for (const key in props) {
|
|
5489
|
+
const value = props[key];
|
|
5490
|
+
if (key === "onClick") element.addEventListener("click", $5e1f45affc1d7def$export$b3bbfd758f11cfa9(value));else if (key.startsWith("xlink:"))
|
|
5491
|
+
// https://stackoverflow.com/a/23142447
|
|
5492
|
+
// https://developer.mozilla.org/en-US/docs/Web/SVG/Namespaces_Crash_Course
|
|
5493
|
+
element.setAttributeNS("http://www.w3.org/1999/xlink", key, value);else if (key == "xmlns" || key.startsWith("xmlns:")) element.setAttributeNS("http://www.w3.org/2000/xmlns/", key, value);else if (key.startsWith("xml:")) element.setAttributeNS("http://www.w3.org/XML/1998/namespace", key, value);else element.setAttribute(key, props[key]);
|
|
5494
|
+
}
|
|
5495
|
+
$0f650018c3cbc373$var$appendChild(element, children);
|
|
5496
|
+
return element;
|
|
5497
|
+
};
|
|
5498
|
+
const $0f650018c3cbc373$export$25062201e9e25d76 = $0f650018c3cbc373$export$34b9dba7ce09269b;
|
|
5499
|
+
const $0f650018c3cbc373$export$ffb0004e005737fa = (_ref2, _unknown) => {
|
|
5500
|
+
let {
|
|
5501
|
+
children: children
|
|
5502
|
+
} = _ref2;
|
|
5503
|
+
if (typeof document === "undefined") return {};
|
|
5504
|
+
const df = document.createDocumentFragment();
|
|
5505
|
+
$0f650018c3cbc373$var$appendChild(df, children);
|
|
5506
|
+
return df;
|
|
5507
|
+
};
|
|
5508
|
+
const $c755e2b0d4b18501$var$_tmpl$ = /*#__PURE__*/$76EG6$template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 320 512"><desc>Right arrow</desc><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z">`),
|
|
5509
|
+
$c755e2b0d4b18501$var$_tmpl$2 = /*#__PURE__*/$76EG6$template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 320 512"><desc>Left arrow</desc><path d="M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z">`);
|
|
5510
|
+
const $c755e2b0d4b18501$export$dc84183312f0c201 = /*@__PURE__*/(() => $76EG6$getNextElement($c755e2b0d4b18501$var$_tmpl$))();
|
|
5511
|
+
const $c755e2b0d4b18501$export$6038895ac52bd044 = /*@__PURE__*/(() => $76EG6$getNextElement($c755e2b0d4b18501$var$_tmpl$2))();
|
|
5520
5512
|
const $0fe3923936d40f55$export$68c017fd93791405 = function () {
|
|
5521
5513
|
let {
|
|
5522
5514
|
duration = 500
|
|
@@ -5554,6 +5546,8 @@ function $07beada135e5f5e8$export$f8913c8a18f7ca21(iterables) {
|
|
|
5554
5546
|
return ourselves;
|
|
5555
5547
|
}
|
|
5556
5548
|
let $df6d080cba513381$var$_Symbol$iterator, $df6d080cba513381$var$_Symbol$toPrimitive;
|
|
5549
|
+
const $df6d080cba513381$var$_tmpl$ = /*#__PURE__*/$76EG6$template(`<style type=text/css>`),
|
|
5550
|
+
$df6d080cba513381$var$_tmpl$2 = /*#__PURE__*/$76EG6$template(`<div>`);
|
|
5557
5551
|
const $df6d080cba513381$export$717f13d9ba00ca19 = (min, max) => "@media ".concat(min ? "(min-width:".concat(min, ")") : "").concat(min && max ? " and " : "").concat(max ? "(max-width:".concat(max, ")") : "");
|
|
5558
5552
|
async function $df6d080cba513381$export$c84671f46d6a1ca(_ref) {
|
|
5559
5553
|
let {
|
|
@@ -5575,9 +5569,7 @@ async function $df6d080cba513381$export$c84671f46d6a1ca(_ref) {
|
|
|
5575
5569
|
ipns: ipns
|
|
5576
5570
|
} = rows_or_empty_object;
|
|
5577
5571
|
const is_static = !ipns && !button;
|
|
5578
|
-
const our_style_el = $
|
|
5579
|
-
type: "text/css"
|
|
5580
|
-
});
|
|
5572
|
+
const our_style_el = $76EG6$getNextElement($df6d080cba513381$var$_tmpl$);
|
|
5581
5573
|
const container_class = $6cb4d83127e468ea$export$a6db784f019668ba();
|
|
5582
5574
|
const selector_beginning = ".depict .".concat(container_class, ">");
|
|
5583
5575
|
const el_count_ipns = $7ca6fdc721083788$export$e806c6c1615a59ae();
|
|
@@ -5616,13 +5608,15 @@ async function $df6d080cba513381$export$c84671f46d6a1ca(_ref) {
|
|
|
5616
5608
|
});
|
|
5617
5609
|
if (button) {
|
|
5618
5610
|
button_class = $6cb4d83127e468ea$export$a6db784f019668ba();
|
|
5619
|
-
const button_container =
|
|
5620
|
-
|
|
5621
|
-
|
|
5611
|
+
const button_container = (() => {
|
|
5612
|
+
const _el$2 = $76EG6$getNextElement($df6d080cba513381$var$_tmpl$2);
|
|
5613
|
+
$76EG6$className(_el$2, "load-more-container " + button_class);
|
|
5614
|
+
$76EG6$insert(_el$2, () => $a285401a927e4306$export$f63fcc839cb0f734("click", () => {
|
|
5622
5615
|
var _rows_or_empty_object;
|
|
5623
5616
|
return ipns(ipns.state + ((_rows_or_empty_object = rows_or_empty_object.rows_per_click) !== null && _rows_or_empty_object !== void 0 ? _rows_or_empty_object : 1));
|
|
5624
|
-
}, button)
|
|
5625
|
-
|
|
5617
|
+
}, button));
|
|
5618
|
+
return _el$2;
|
|
5619
|
+
})();
|
|
5626
5620
|
container_element.after(button_container);
|
|
5627
5621
|
}
|
|
5628
5622
|
(0, $90fa633a9564f115$export$b6ae1bc530f4c149).oncreation(container_element, async () => {
|
|
@@ -5923,15 +5917,15 @@ function $090af64928922937$export$80039a49055269fb() {
|
|
|
5923
5917
|
};
|
|
5924
5918
|
return Object.fromEntries(["left", "right"].map(side => [side, [new_arrowimage()]]));
|
|
5925
5919
|
}
|
|
5920
|
+
const $66c5b496f7887c00$var$_tmpl$ = /*#__PURE__*/$76EG6$template(`<img src=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJkaXNwbGF5OiBpbmxpbmUtYmxvY2s7IHZlcnRpY2FsLWFsaWduOiBtaWRkbGU7IiB3aWR0aD0iMTZweCIgaGVpZ2h0PSIxNnB4IiB2aWV3Qm94PSIwIDAgOCAxNSI+PHBhdGggc3R5bGU9ImZpbGw6IHJnYigwLCAwLCAwKTsiIGQ9Ik0uNjI5LjAwMWMuMTUuMDA4LjI5My4wNzIuMzk4LjE4bDYuNzkyIDYuODlhLjYwMS42MDEgMCAwIDEgMCAuODZsLTYuNzkyIDYuODg4YS41ODYuNTg2IDAgMCAxLS44NDYgMCAuNjAxLjYwMSAwIDAgMSAwLS44Nkw2LjU1NCA3LjUuMjExIDEuMDAxYS42MDEuNjAxIDAgMCAxIDAtLjg2Yy4xMTUtLjEuMjY2LS4xNS40MTgtLjE0Ij48L3BhdGg+PC9zdmc+>`);
|
|
5926
5921
|
function $66c5b496f7887c00$export$af88b4929c2dc86() {
|
|
5927
|
-
const img = $
|
|
5928
|
-
src: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJkaXNwbGF5OiBpbmxpbmUtYmxvY2s7IHZlcnRpY2FsLWFsaWduOiBtaWRkbGU7IiB3aWR0aD0iMTZweCIgaGVpZ2h0PSIxNnB4IiB2aWV3Qm94PSIwIDAgOCAxNSI+PHBhdGggc3R5bGU9ImZpbGw6IHJnYigwLCAwLCAwKTsiIGQ9Ik0uNjI5LjAwMWMuMTUuMDA4LjI5My4wNzIuMzk4LjE4bDYuNzkyIDYuODlhLjYwMS42MDEgMCAwIDEgMCAuODZsLTYuNzkyIDYuODg4YS41ODYuNTg2IDAgMCAxLS44NDYgMCAuNjAxLjYwMSAwIDAgMSAwLS44Nkw2LjU1NCA3LjUuMjExIDEuMDAxYS42MDEuNjAxIDAgMCAxIDAtLjg2Yy4xMTUtLjEuMjY2LS4xNS40MTgtLjE0Ij48L3BhdGg+PC9zdmc+"
|
|
5929
|
-
});
|
|
5922
|
+
const img = $76EG6$getNextElement($66c5b496f7887c00$var$_tmpl$);
|
|
5930
5923
|
return {
|
|
5931
5924
|
left: [img],
|
|
5932
5925
|
right: [img.cloneNode()]
|
|
5933
5926
|
};
|
|
5934
5927
|
}
|
|
5928
|
+
const $d3c54fdf1bfb087a$var$_tmpl$ = /*#__PURE__*/$76EG6$template(`<label class=checkbox_container><input type=radio><span class=checkmark>`);
|
|
5935
5929
|
function $d3c54fdf1bfb087a$export$1d17a045bcc711b1(_ref) {
|
|
5936
5930
|
let {
|
|
5937
5931
|
t: t,
|
|
@@ -6024,15 +6018,12 @@ function $d3c54fdf1bfb087a$export$1d17a045bcc711b1(_ref) {
|
|
|
6024
6018
|
};
|
|
6025
6019
|
}
|
|
6026
6020
|
function $d3c54fdf1bfb087a$export$a09282b33e69b43f(unique_name) {
|
|
6027
|
-
return
|
|
6028
|
-
|
|
6029
|
-
|
|
6030
|
-
|
|
6031
|
-
|
|
6032
|
-
|
|
6033
|
-
class: "checkmark"
|
|
6034
|
-
})]
|
|
6035
|
-
});
|
|
6021
|
+
return (() => {
|
|
6022
|
+
const _el$ = $76EG6$getNextElement($d3c54fdf1bfb087a$var$_tmpl$),
|
|
6023
|
+
_el$2 = _el$.firstChild;
|
|
6024
|
+
$76EG6$setAttribute(_el$2, "name", "radio-".concat(unique_name));
|
|
6025
|
+
return _el$;
|
|
6026
|
+
})();
|
|
6036
6027
|
}
|
|
6037
6028
|
|
|
6038
6029
|
// // You need to do this on all elements you insert into the slider before you insert them:
|
|
@@ -6206,15 +6197,13 @@ function $0cbf24ae3e670238$export$5723caf9a8335aa6(_t) {
|
|
|
6206
6197
|
mutation_plugin: mutation_plugin
|
|
6207
6198
|
};
|
|
6208
6199
|
}
|
|
6200
|
+
const $4837ebe61ecec421$var$_tmpl$ = /*#__PURE__*/$76EG6$template(`<div class=depict_slider_scroll_bar>`),
|
|
6201
|
+
$4837ebe61ecec421$var$_tmpl$2 = /*#__PURE__*/$76EG6$template(`<div class=depict_slider_scroll_container>`);
|
|
6209
6202
|
function $4837ebe61ecec421$export$93223e488e7ee078(options) {
|
|
6210
6203
|
function constructor_plugin(_slider_options) {
|
|
6211
6204
|
var _options$scroll_bar_c, _options$scroll_conta;
|
|
6212
|
-
const scroll_bar = $
|
|
6213
|
-
|
|
6214
|
-
});
|
|
6215
|
-
const scroll_container = $0f650018c3cbc373$export$34b9dba7ce09269b("div", {
|
|
6216
|
-
class: "depict_slider_scroll_container"
|
|
6217
|
-
});
|
|
6205
|
+
const scroll_bar = $76EG6$getNextElement($4837ebe61ecec421$var$_tmpl$);
|
|
6206
|
+
const scroll_container = $76EG6$getNextElement($4837ebe61ecec421$var$_tmpl$2);
|
|
6218
6207
|
if ((_options$scroll_bar_c = options.scroll_bar_classes) !== null && _options$scroll_bar_c !== void 0 && _options$scroll_bar_c.length) scroll_bar.classList.add(...options.scroll_bar_classes);
|
|
6219
6208
|
if ((_options$scroll_conta = options.scroll_container_classes) !== null && _options$scroll_conta !== void 0 && _options$scroll_conta.length) scroll_container.classList.add(...options.scroll_container_classes);
|
|
6220
6209
|
// Default styles always present
|
|
@@ -6241,6 +6230,7 @@ function $4837ebe61ecec421$export$93223e488e7ee078(options) {
|
|
|
6241
6230
|
mutation_plugin: mutation_plugin
|
|
6242
6231
|
};
|
|
6243
6232
|
}
|
|
6233
|
+
const $ff905d87817a07f4$var$_tmpl$ = /*#__PURE__*/$76EG6$template(`<div style="position:absolute;width:1em;overflow:scroll;scroll-snap-type:x mandatory;"><div style=scroll-snap-align:start;color:transparent;>test`);
|
|
6244
6234
|
function $ff905d87817a07f4$export$b36d2489a5a16728(_t) {
|
|
6245
6235
|
let {
|
|
6246
6236
|
snapEvery: snapEvery,
|
|
@@ -6271,13 +6261,7 @@ function $ff905d87817a07f4$export$b36d2489a5a16728(_t) {
|
|
|
6271
6261
|
}
|
|
6272
6262
|
async function $ff905d87817a07f4$export$49b950309ab787ad() {
|
|
6273
6263
|
if ("scrollBehavior" in document.documentElement.style) return true;
|
|
6274
|
-
const test_div = $
|
|
6275
|
-
style: "position: absolute; width: 1em; overflow: scroll; scroll-snap-type: x mandatory;",
|
|
6276
|
-
children: $0f650018c3cbc373$export$34b9dba7ce09269b("div", {
|
|
6277
|
-
style: "scroll-snap-align: start; color: transparent;",
|
|
6278
|
-
children: "test"
|
|
6279
|
-
})
|
|
6280
|
-
});
|
|
6264
|
+
const test_div = $76EG6$getNextElement($ff905d87817a07f4$var$_tmpl$);
|
|
6281
6265
|
const body = await (0, $90fa633a9564f115$export$b6ae1bc530f4c149).wait_for_element("body");
|
|
6282
6266
|
body.append(test_div);
|
|
6283
6267
|
test_div.scrollLeft = 1;
|
|
@@ -6843,10 +6827,12 @@ function $f991aad8d6175c9b$export$1ac466d53a6636ac(t, input_id) {
|
|
|
6843
6827
|
function $ed8073ecbced6e7e$export$1ff14fec60ed5697(t, filter) {
|
|
6844
6828
|
try {
|
|
6845
6829
|
$799496226e956169$export$674d8cd8b6868154();
|
|
6830
|
+
// @ts-ignore
|
|
6846
6831
|
ga($5e1f45affc1d7def$export$b3bbfd758f11cfa9(async function (tracker) {
|
|
6847
6832
|
var _window, _window$ga;
|
|
6848
6833
|
let get_all_function = (_window = window) === null || _window === void 0 ? void 0 : (_window$ga = _window.ga) === null || _window$ga === void 0 ? void 0 : _window$ga.getAll; // https://sentry.io/organizations/depictai-0o/issues/3621911835/?project=5476183&referrer=slack
|
|
6849
6834
|
if (typeof get_all_function !== "function") get_all_function = await $2da62df28669a48a$export$2fc1a072736ae2f6(window, "ga", "getAll");
|
|
6835
|
+
// @ts-ignore
|
|
6850
6836
|
const all_trackers = get_all_function.call(ga);
|
|
6851
6837
|
$241f2f02cc612a49$export$de56f1198d121036("we have trackers", all_trackers);
|
|
6852
6838
|
// @ts-ignore
|
|
@@ -6871,7 +6857,9 @@ function $ed8073ecbced6e7e$export$1ff14fec60ed5697(t, filter) {
|
|
|
6871
6857
|
$5e1f45affc1d7def$export$f18d5b0af29128b7(error, "error");
|
|
6872
6858
|
}
|
|
6873
6859
|
}
|
|
6874
|
-
function $ed8073ecbced6e7e$var$make_tracker_send_to_depict(
|
|
6860
|
+
function $ed8073ecbced6e7e$var$make_tracker_send_to_depict(
|
|
6861
|
+
// @ts-ignore
|
|
6862
|
+
ga_tracker, t, filter) {
|
|
6875
6863
|
// Docs for analytics.js Tasks:
|
|
6876
6864
|
// https://developers.google.com/analytics/devguides/collection/analyticsjs/tasks
|
|
6877
6865
|
const sendHitTask = "sendHitTask";
|
|
@@ -7840,19 +7828,27 @@ const $8a812fa4638e2832$var$get_voyado_id = () => {
|
|
|
7840
7828
|
const $8a812fa4638e2832$export$a739d9a07da7f9ce = /*@__PURE__*/$5e1f45affc1d7def$export$b3bbfd758f11cfa9(() => {
|
|
7841
7829
|
$d5f7352b58e0d737$export$93ae15b1ae509334($8a812fa4638e2832$var$get_voyado_id);
|
|
7842
7830
|
});
|
|
7831
|
+
const $c40fc6dc2c22b3c4$var$_tmpl$ = /*#__PURE__*/$76EG6$template(`<button>`);
|
|
7843
7832
|
function $c40fc6dc2c22b3c4$export$4a3043e508dd72f0(_ref) {
|
|
7844
7833
|
let {
|
|
7845
7834
|
children: children,
|
|
7846
7835
|
...attributes
|
|
7847
7836
|
} = _ref;
|
|
7848
|
-
const button =
|
|
7849
|
-
|
|
7850
|
-
|
|
7851
|
-
|
|
7852
|
-
|
|
7837
|
+
const button = (() => {
|
|
7838
|
+
const _el$ = $76EG6$getNextElement($c40fc6dc2c22b3c4$var$_tmpl$);
|
|
7839
|
+
$76EG6$spread(_el$, $76EG6$mergeProps(attributes, {
|
|
7840
|
+
"type": "button"
|
|
7841
|
+
}), false, true);
|
|
7842
|
+
$76EG6$insert(_el$, children);
|
|
7843
|
+
$76EG6$runHydrationEvents();
|
|
7844
|
+
return _el$;
|
|
7845
|
+
})();
|
|
7853
7846
|
button.classList.add("show-more");
|
|
7854
7847
|
return button;
|
|
7855
7848
|
}
|
|
7849
|
+
const $a59cde169150d10b$var$_tmpl$ = /*#__PURE__*/$76EG6$template(`<div class=slidein-backdrop>`),
|
|
7850
|
+
$a59cde169150d10b$var$_tmpl$2 = /*#__PURE__*/$76EG6$template(`<div class=slidein><div class=header><span class=title></span><button class=close></button></div><div class=body>`),
|
|
7851
|
+
$a59cde169150d10b$var$_tmpl$3 = /*#__PURE__*/$76EG6$template(`<div class=depict><!$><!/><!$><!/>`);
|
|
7856
7852
|
async function $a59cde169150d10b$export$8a0e4d6f6abf7e90(_ref) {
|
|
7857
7853
|
let {
|
|
7858
7854
|
title_: title_,
|
|
@@ -7863,33 +7859,37 @@ async function $a59cde169150d10b$export$8a0e4d6f6abf7e90(_ref) {
|
|
|
7863
7859
|
let close_;
|
|
7864
7860
|
const open_promise = new Promise(r => close_ = r);
|
|
7865
7861
|
const body = await (0, $90fa633a9564f115$export$b6ae1bc530f4c149).wait_for_element("body");
|
|
7866
|
-
const backdrop =
|
|
7867
|
-
|
|
7868
|
-
|
|
7869
|
-
|
|
7862
|
+
const backdrop = (() => {
|
|
7863
|
+
const _el$ = $76EG6$getNextElement($a59cde169150d10b$var$_tmpl$);
|
|
7864
|
+
$76EG6$addEventListener(_el$, "click", close_, true);
|
|
7865
|
+
$76EG6$runHydrationEvents();
|
|
7866
|
+
return _el$;
|
|
7867
|
+
})();
|
|
7870
7868
|
const [exit_title_iterator, exitable_title_iterator] = $fee212025270d5b9$export$927664b47117acb0(title_);
|
|
7871
7869
|
const closing_handlers = [exit_title_iterator];
|
|
7872
|
-
const slidein =
|
|
7873
|
-
|
|
7874
|
-
|
|
7875
|
-
|
|
7876
|
-
|
|
7877
|
-
|
|
7878
|
-
|
|
7879
|
-
|
|
7880
|
-
|
|
7881
|
-
|
|
7882
|
-
|
|
7883
|
-
|
|
7884
|
-
|
|
7885
|
-
|
|
7886
|
-
|
|
7887
|
-
|
|
7888
|
-
|
|
7889
|
-
|
|
7890
|
-
|
|
7891
|
-
|
|
7892
|
-
|
|
7870
|
+
const slidein = (() => {
|
|
7871
|
+
const _el$2 = $76EG6$getNextElement($a59cde169150d10b$var$_tmpl$2),
|
|
7872
|
+
_el$3 = _el$2.firstChild,
|
|
7873
|
+
_el$4 = _el$3.firstChild,
|
|
7874
|
+
_el$5 = _el$4.nextSibling,
|
|
7875
|
+
_el$6 = _el$3.nextSibling;
|
|
7876
|
+
$76EG6$insert(_el$4, () => $332ef338faf216a4$export$7c081fdbc65b6a2a(exitable_title_iterator, false));
|
|
7877
|
+
$76EG6$addEventListener(_el$5, "click", close_, true);
|
|
7878
|
+
$76EG6$insert(_el$5, CloseIcon);
|
|
7879
|
+
$76EG6$insert(_el$6, children);
|
|
7880
|
+
$76EG6$runHydrationEvents();
|
|
7881
|
+
return _el$2;
|
|
7882
|
+
})();
|
|
7883
|
+
const elements_in_container = (() => {
|
|
7884
|
+
const _el$7 = $76EG6$getNextElement($a59cde169150d10b$var$_tmpl$3),
|
|
7885
|
+
_el$8 = _el$7.firstChild,
|
|
7886
|
+
[_el$9, _co$] = $76EG6$getNextMarker(_el$8.nextSibling),
|
|
7887
|
+
_el$10 = _el$9.nextSibling,
|
|
7888
|
+
[_el$11, _co$2] = $76EG6$getNextMarker(_el$10.nextSibling);
|
|
7889
|
+
$76EG6$insert(_el$7, backdrop, _el$9, _co$);
|
|
7890
|
+
$76EG6$insert(_el$7, slidein, _el$11, _co$2);
|
|
7891
|
+
return _el$7;
|
|
7892
|
+
})();
|
|
7893
7893
|
body.append(elements_in_container);
|
|
7894
7894
|
backdrop.animate({
|
|
7895
7895
|
opacity: [0, 1]
|
|
@@ -7938,6 +7938,10 @@ async function $a59cde169150d10b$export$8a0e4d6f6abf7e90(_ref) {
|
|
|
7938
7938
|
on_close_: fn => closing_handlers.push(fn)
|
|
7939
7939
|
};
|
|
7940
7940
|
}
|
|
7941
|
+
$76EG6$delegateEvents(["click"]);
|
|
7942
|
+
const $24f3fd73864991c0$var$_tmpl$ = /*#__PURE__*/$76EG6$template(`<div class=option-list>`),
|
|
7943
|
+
$24f3fd73864991c0$var$_tmpl$2 = /*#__PURE__*/$76EG6$template(`<button type=button><span class=size></span><!$><!/>`),
|
|
7944
|
+
$24f3fd73864991c0$var$_tmpl$3 = /*#__PURE__*/$76EG6$template(`<span class=sold-out>`);
|
|
7941
7945
|
async function $24f3fd73864991c0$export$c068ad5361be7646(_ref) {
|
|
7942
7946
|
let {
|
|
7943
7947
|
title_: title_,
|
|
@@ -7954,40 +7958,47 @@ async function $24f3fd73864991c0$export$c068ad5361be7646(_ref) {
|
|
|
7954
7958
|
} = await $a59cde169150d10b$export$8a0e4d6f6abf7e90({
|
|
7955
7959
|
CloseIcon: CloseIcon,
|
|
7956
7960
|
title_: title_,
|
|
7957
|
-
children: [
|
|
7958
|
-
|
|
7959
|
-
|
|
7961
|
+
children: [(() => {
|
|
7962
|
+
const _el$ = $76EG6$getNextElement($24f3fd73864991c0$var$_tmpl$);
|
|
7963
|
+
$76EG6$insert(_el$, () => items_.map(_ref2 => {
|
|
7960
7964
|
let {
|
|
7961
7965
|
size_name_: size_name_,
|
|
7962
7966
|
is_available_: is_available_,
|
|
7963
7967
|
id_: id_
|
|
7964
7968
|
} = _ref2;
|
|
7965
|
-
const button =
|
|
7966
|
-
|
|
7967
|
-
|
|
7968
|
-
|
|
7969
|
+
const button = (() => {
|
|
7970
|
+
const _el$2 = $76EG6$getNextElement($24f3fd73864991c0$var$_tmpl$2),
|
|
7971
|
+
_el$3 = _el$2.firstChild,
|
|
7972
|
+
_el$4 = _el$3.nextSibling,
|
|
7973
|
+
[_el$5, _co$] = $76EG6$getNextMarker(_el$4.nextSibling);
|
|
7974
|
+
_el$2.$$click = () => {
|
|
7969
7975
|
size_selected(id_);
|
|
7970
7976
|
close_();
|
|
7971
|
-
}
|
|
7972
|
-
|
|
7973
|
-
|
|
7974
|
-
|
|
7975
|
-
|
|
7976
|
-
|
|
7977
|
-
|
|
7978
|
-
})
|
|
7979
|
-
|
|
7977
|
+
};
|
|
7978
|
+
$76EG6$className(_el$2, "option" + (is_available_ ? " available" : ""));
|
|
7979
|
+
$76EG6$insert(_el$3, size_name_);
|
|
7980
|
+
$76EG6$insert(_el$2, !is_available_ && (() => {
|
|
7981
|
+
const _el$6 = $76EG6$getNextElement($24f3fd73864991c0$var$_tmpl$3);
|
|
7982
|
+
$76EG6$insert(_el$6, () => $332ef338faf216a4$export$7c081fdbc65b6a2a(exitable_oos_iterator));
|
|
7983
|
+
return _el$6;
|
|
7984
|
+
})(), _el$5, _co$);
|
|
7985
|
+
$76EG6$runHydrationEvents();
|
|
7986
|
+
return _el$2;
|
|
7987
|
+
})();
|
|
7980
7988
|
if (!is_available_) button.disabled = true;
|
|
7981
7989
|
return button;
|
|
7982
|
-
})
|
|
7983
|
-
|
|
7990
|
+
}));
|
|
7991
|
+
return _el$;
|
|
7992
|
+
})()]
|
|
7984
7993
|
});
|
|
7985
7994
|
on_close_(size_selected);
|
|
7986
7995
|
on_close_(exit_oos_iterator);
|
|
7987
7996
|
}));
|
|
7988
7997
|
}
|
|
7998
|
+
$76EG6$delegateEvents(["click"]);
|
|
7989
7999
|
var $aae9878972b17321$exports = {};
|
|
7990
8000
|
$aae9878972b17321$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";
|
|
8001
|
+
const $adc0bb548fdb574f$var$_tmpl$ = /*#__PURE__*/$76EG6$template(`<div>`);
|
|
7991
8002
|
let $adc0bb548fdb574f$var$inserted = false;
|
|
7992
8003
|
const $adc0bb548fdb574f$export$84712d0562a614b8 = _ref => {
|
|
7993
8004
|
let {
|
|
@@ -8002,54 +8013,47 @@ const $adc0bb548fdb574f$export$84712d0562a614b8 = _ref => {
|
|
|
8002
8013
|
$1013f2e568f87406$export$59ba1eb2c083f0cd((0, /*@__PURE__*/$parcel$interopDefault($aae9878972b17321$exports)));
|
|
8003
8014
|
$adc0bb548fdb574f$var$inserted = true;
|
|
8004
8015
|
}
|
|
8005
|
-
return (
|
|
8006
|
-
|
|
8007
|
-
$
|
|
8008
|
-
|
|
8009
|
-
|
|
8010
|
-
|
|
8011
|
-
|
|
8012
|
-
);
|
|
8016
|
+
return (() => {
|
|
8017
|
+
const _el$ = $76EG6$getNextElement($adc0bb548fdb574f$var$_tmpl$);
|
|
8018
|
+
$76EG6$className(_el$, "depict-placeholder".concat(extra_classes ? " " + extra_classes : ""));
|
|
8019
|
+
$76EG6$spread(_el$, attributes, false, false);
|
|
8020
|
+
$76EG6$effect(_$p => $76EG6$style(_el$, style ? style : "width:".concat(width, ";height:").concat(height, ";"), _$p));
|
|
8021
|
+
$76EG6$runHydrationEvents();
|
|
8022
|
+
return _el$;
|
|
8023
|
+
})();
|
|
8013
8024
|
};
|
|
8014
8025
|
const $adc0bb548fdb574f$export$d613f5b6d0a331a8 = _ref2 => {
|
|
8015
8026
|
let {
|
|
8016
8027
|
aspect_ratio: aspect_ratio,
|
|
8017
8028
|
...attributes
|
|
8018
8029
|
} = _ref2;
|
|
8019
|
-
return $
|
|
8020
|
-
style: "position:relative;width:100%;padding-bottom:".concat(1 / aspect_ratio * 100, "%")
|
|
8021
|
-
|
|
8022
|
-
});
|
|
8030
|
+
return $76EG6$createComponent($adc0bb548fdb574f$export$84712d0562a614b8, $76EG6$mergeProps({
|
|
8031
|
+
style: "position:relative;width:100%;padding-bottom:".concat(1 / aspect_ratio * 100, "%")
|
|
8032
|
+
}, attributes));
|
|
8023
8033
|
};
|
|
8034
|
+
const $2e6ca552eb0e0b2b$var$_tmpl$ = /*#__PURE__*/$76EG6$template(`<div class="depict recommendation_container"><!$><!/><div class=grid>`),
|
|
8035
|
+
$2e6ca552eb0e0b2b$var$_tmpl$2 = /*#__PURE__*/$76EG6$template(`<h4 class=recs_header>`);
|
|
8024
8036
|
const $2e6ca552eb0e0b2b$export$97f31f44c68c1d5 = function (title) {
|
|
8025
8037
|
let surface_classes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
8026
|
-
return $a285401a927e4306$export$eb0b9ed911409b57(e => e.classList.add(...surface_classes),
|
|
8027
|
-
|
|
8028
|
-
|
|
8029
|
-
|
|
8030
|
-
|
|
8031
|
-
|
|
8032
|
-
|
|
8033
|
-
|
|
8034
|
-
|
|
8038
|
+
return $a285401a927e4306$export$eb0b9ed911409b57(e => e.classList.add(...surface_classes), (() => {
|
|
8039
|
+
const _el$ = $76EG6$getNextElement($2e6ca552eb0e0b2b$var$_tmpl$),
|
|
8040
|
+
_el$3 = _el$.firstChild,
|
|
8041
|
+
[_el$4, _co$] = $76EG6$getNextMarker(_el$3.nextSibling),
|
|
8042
|
+
_el$2 = _el$4.nextSibling;
|
|
8043
|
+
$76EG6$insert(_el$, title && typeof title === "string" ? (() => {
|
|
8044
|
+
const _el$5 = $76EG6$getNextElement($2e6ca552eb0e0b2b$var$_tmpl$2);
|
|
8045
|
+
$76EG6$insert(_el$5, title);
|
|
8046
|
+
return _el$5;
|
|
8047
|
+
})() : title, _el$4, _co$);
|
|
8048
|
+
return _el$;
|
|
8049
|
+
})());
|
|
8035
8050
|
};
|
|
8036
|
-
const $ad0b2591dac160be$
|
|
8037
|
-
viewBox
|
|
8038
|
-
|
|
8039
|
-
|
|
8040
|
-
|
|
8041
|
-
|
|
8042
|
-
})]
|
|
8043
|
-
});
|
|
8044
|
-
const $ad0b2591dac160be$export$ddd70fdae1b350e6 = () => $0f650018c3cbc373$export$25062201e9e25d76("svg", {
|
|
8045
|
-
viewBox: "0 0 320 512",
|
|
8046
|
-
children: [$0f650018c3cbc373$export$34b9dba7ce09269b("desc", {
|
|
8047
|
-
children: "Left arrow"
|
|
8048
|
-
}), $0f650018c3cbc373$export$34b9dba7ce09269b("path", {
|
|
8049
|
-
d: "M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z"
|
|
8050
|
-
})]
|
|
8051
|
-
});
|
|
8052
|
-
|
|
8051
|
+
const $ad0b2591dac160be$var$_tmpl$ = /*#__PURE__*/$76EG6$template(`<svg viewBox="0 0 320 512"><desc>Right arrow</desc><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z">`),
|
|
8052
|
+
$ad0b2591dac160be$var$_tmpl$2 = /*#__PURE__*/$76EG6$template(`<svg viewBox="0 0 320 512"><desc>Left arrow</desc><path d="M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z">`);
|
|
8053
|
+
const $ad0b2591dac160be$export$32a55d57d151bc5a = () => $76EG6$getNextElement($ad0b2591dac160be$var$_tmpl$);
|
|
8054
|
+
const $ad0b2591dac160be$export$ddd70fdae1b350e6 = () => $76EG6$getNextElement($ad0b2591dac160be$var$_tmpl$2);
|
|
8055
|
+
const $9a74c17d1ef21fdf$var$_tmpl$ = /*#__PURE__*/$76EG6$template(`<button class=color-circle-container><div class=outer-circle><div class=inner-circle>`),
|
|
8056
|
+
$9a74c17d1ef21fdf$var$_tmpl$2 = /*#__PURE__*/$76EG6$template(`<div class=color-picker role=form aria-label="Color picker">`);
|
|
8053
8057
|
/**
|
|
8054
8058
|
* Internal color circle used in ColorPicker
|
|
8055
8059
|
* @see {createColorPicker}
|
|
@@ -8060,19 +8064,27 @@ function $9a74c17d1ef21fdf$var$ColorCircle(_ref) {
|
|
|
8060
8064
|
onClick: onClick,
|
|
8061
8065
|
onHoverUpdate: onHoverUpdate
|
|
8062
8066
|
} = _ref;
|
|
8063
|
-
const button =
|
|
8064
|
-
|
|
8065
|
-
|
|
8066
|
-
|
|
8067
|
-
|
|
8068
|
-
|
|
8069
|
-
|
|
8070
|
-
|
|
8071
|
-
|
|
8072
|
-
|
|
8073
|
-
|
|
8074
|
-
|
|
8075
|
-
|
|
8067
|
+
const button = (() => {
|
|
8068
|
+
const _el$ = $76EG6$getNextElement($9a74c17d1ef21fdf$var$_tmpl$),
|
|
8069
|
+
_el$2 = _el$.firstChild,
|
|
8070
|
+
_el$3 = _el$2.firstChild;
|
|
8071
|
+
_el$.$$click = e => onClick(e.currentTarget, color);
|
|
8072
|
+
$76EG6$effect(_p$ => {
|
|
8073
|
+
const _v$ = color.label || "",
|
|
8074
|
+
_v$2 = "border-color: ".concat(color.value, ";"),
|
|
8075
|
+
_v$3 = "background-color: ".concat(color.value, ";");
|
|
8076
|
+
_v$ !== _p$._v$ && $76EG6$setAttribute(_el$, "title", _p$._v$ = _v$);
|
|
8077
|
+
_p$._v$2 = $76EG6$style(_el$2, _v$2, _p$._v$2);
|
|
8078
|
+
_p$._v$3 = $76EG6$style(_el$3, _v$3, _p$._v$3);
|
|
8079
|
+
return _p$;
|
|
8080
|
+
}, {
|
|
8081
|
+
_v$: undefined,
|
|
8082
|
+
_v$2: undefined,
|
|
8083
|
+
_v$3: undefined
|
|
8084
|
+
});
|
|
8085
|
+
$76EG6$runHydrationEvents();
|
|
8086
|
+
return _el$;
|
|
8087
|
+
})();
|
|
8076
8088
|
button.addEventListener("mouseenter", $5e1f45affc1d7def$export$b3bbfd758f11cfa9(() => onHoverUpdate(button, color, true)));
|
|
8077
8089
|
button.addEventListener("mouseleave", $5e1f45affc1d7def$export$b3bbfd758f11cfa9(() => onHoverUpdate(button, color, false)));
|
|
8078
8090
|
return button;
|
|
@@ -8131,7 +8143,7 @@ function $9a74c17d1ef21fdf$export$590326cc34f49e2d(_ref2) {
|
|
|
8131
8143
|
if (selectOnHover) handleSelectOnHover(hovered, color, hovering);
|
|
8132
8144
|
};
|
|
8133
8145
|
// Create the color circles
|
|
8134
|
-
const circles = colors.map(color => $
|
|
8146
|
+
const circles = colors.map(color => $76EG6$createComponent($9a74c17d1ef21fdf$var$ColorCircle, {
|
|
8135
8147
|
color: color,
|
|
8136
8148
|
onClick: handleClick,
|
|
8137
8149
|
onHoverUpdate: handleHoverUpdate
|
|
@@ -8142,15 +8154,17 @@ function $9a74c17d1ef21fdf$export$590326cc34f49e2d(_ref2) {
|
|
|
8142
8154
|
const initial_index = initialColor == undefined ? -1 : colors.findIndex(c => typeof initialColor === "string" ? c.value === initialColor : c.value === initialColor.value && c.label === initialColor.label);
|
|
8143
8155
|
if (initial_index > -1) setActiveIndex(initial_index);
|
|
8144
8156
|
if (onlyCircles) return circles;
|
|
8145
|
-
return
|
|
8146
|
-
|
|
8147
|
-
|
|
8148
|
-
|
|
8149
|
-
|
|
8150
|
-
});
|
|
8157
|
+
return (() => {
|
|
8158
|
+
const _el$4 = $76EG6$getNextElement($9a74c17d1ef21fdf$var$_tmpl$2);
|
|
8159
|
+
$76EG6$insert(_el$4, circles);
|
|
8160
|
+
return _el$4;
|
|
8161
|
+
})();
|
|
8151
8162
|
}
|
|
8152
8163
|
};
|
|
8153
8164
|
}
|
|
8165
|
+
$76EG6$delegateEvents(["click"]);
|
|
8166
|
+
const $0f55c2bc0a7b363b$var$_tmpl$ = /*#__PURE__*/$76EG6$template(`<div>`),
|
|
8167
|
+
$0f55c2bc0a7b363b$var$_tmpl$2 = /*#__PURE__*/$76EG6$template(`<div style=overflow:hidden;height:0px;visibility:hidden aria-hidden=true>`);
|
|
8154
8168
|
const $0f55c2bc0a7b363b$export$237455ad7e59d4e5 = function () {
|
|
8155
8169
|
let {
|
|
8156
8170
|
duration = 500,
|
|
@@ -8176,14 +8190,16 @@ const $0f55c2bc0a7b363b$export$237455ad7e59d4e5 = function () {
|
|
|
8176
8190
|
children: children
|
|
8177
8191
|
} = _ref;
|
|
8178
8192
|
if (Array.isArray(children) && children.length === 1) children = children[0];
|
|
8179
|
-
innerRef =
|
|
8180
|
-
|
|
8181
|
-
|
|
8182
|
-
|
|
8183
|
-
|
|
8184
|
-
|
|
8185
|
-
|
|
8186
|
-
|
|
8193
|
+
innerRef = (() => {
|
|
8194
|
+
const _el$ = $76EG6$getNextElement($0f55c2bc0a7b363b$var$_tmpl$);
|
|
8195
|
+
$76EG6$insert(_el$, children);
|
|
8196
|
+
return _el$;
|
|
8197
|
+
})();
|
|
8198
|
+
outerRef = (() => {
|
|
8199
|
+
const _el$2 = $76EG6$getNextElement($0f55c2bc0a7b363b$var$_tmpl$2);
|
|
8200
|
+
$76EG6$insert(_el$2, innerRef);
|
|
8201
|
+
return _el$2;
|
|
8202
|
+
})();
|
|
8187
8203
|
return outerRef;
|
|
8188
8204
|
};
|
|
8189
8205
|
const expand = $5e1f45affc1d7def$export$b3bbfd758f11cfa9(async function () {
|
|
@@ -8240,6 +8256,9 @@ const $0f55c2bc0a7b363b$export$237455ad7e59d4e5 = function () {
|
|
|
8240
8256
|
};
|
|
8241
8257
|
var $5305cfbbfffd9dc8$exports = {};
|
|
8242
8258
|
$5305cfbbfffd9dc8$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";
|
|
8259
|
+
const $9ef5ce4804a3b61b$var$_tmpl$ = /*#__PURE__*/$76EG6$template(`<img>`),
|
|
8260
|
+
$9ef5ce4804a3b61b$var$_tmpl$2 = /*#__PURE__*/$76EG6$template(`<source sizes=0px>`),
|
|
8261
|
+
$9ef5ce4804a3b61b$var$_tmpl$3 = /*#__PURE__*/$76EG6$template(`<picture>`);
|
|
8243
8262
|
const $9ef5ce4804a3b61b$export$3d13beba9b52c947 = "https://img.depict.ai/ResizeImage" + (process.env.TENANT ? "/" + process.env.TENANT : "");
|
|
8244
8263
|
const $9ef5ce4804a3b61b$export$a98fc8a2c818d3d8 = /*@__PURE__*/(() => typeof navigator === "undefined" ? false : /^((?!chrome|android).)*safari/i.test(navigator.userAgent))(); // https://stackoverflow.com/a/23522755
|
|
8245
8264
|
function $9ef5ce4804a3b61b$export$f39a7d0667e924a(what_to_watch) {
|
|
@@ -8322,9 +8341,12 @@ function $9ef5ce4804a3b61b$export$a62825542f1bfcf5() {
|
|
|
8322
8341
|
if (!src) {
|
|
8323
8342
|
$241f2f02cc612a49$export$de56f1198d121036(image_options, () => {}); // noop function is to allow to get here quickly by "jump to function definition"
|
|
8324
8343
|
$b000f5ef6ce456d9$export$8048b892d651b310(new Error("no image src provided: " + src));
|
|
8325
|
-
return
|
|
8326
|
-
|
|
8327
|
-
|
|
8344
|
+
return (() => {
|
|
8345
|
+
const _el$ = $76EG6$getNextElement($9ef5ce4804a3b61b$var$_tmpl$);
|
|
8346
|
+
$76EG6$spread(_el$, image_options, false, false);
|
|
8347
|
+
$76EG6$runHydrationEvents();
|
|
8348
|
+
return _el$;
|
|
8349
|
+
})(); // we don't want everything to fail if someone misused this component
|
|
8328
8350
|
}
|
|
8329
8351
|
// Create an array of elements that will get their `sizes` attribute updated when what_to_watch resizes
|
|
8330
8352
|
const sources = [];
|
|
@@ -8333,35 +8355,40 @@ function $9ef5ce4804a3b61b$export$a62825542f1bfcf5() {
|
|
|
8333
8355
|
// Much faster than .map and this will run kinda often
|
|
8334
8356
|
const format = formats[i];
|
|
8335
8357
|
const srcset = $9ef5ce4804a3b61b$var$make_srcset(src, format, resolutions);
|
|
8336
|
-
sources.push(
|
|
8337
|
-
|
|
8338
|
-
|
|
8339
|
-
|
|
8340
|
-
type: "image/".concat(format),
|
|
8341
|
-
...(set_dataset ? {
|
|
8358
|
+
sources.push((() => {
|
|
8359
|
+
const _el$2 = $76EG6$getNextElement($9ef5ce4804a3b61b$var$_tmpl$2);
|
|
8360
|
+
$76EG6$setAttribute(_el$2, "type", "image/".concat(format));
|
|
8361
|
+
$76EG6$spread(_el$2, set_dataset ? {
|
|
8342
8362
|
"data-srcset": srcset
|
|
8343
8363
|
} : {
|
|
8344
8364
|
srcset: srcset
|
|
8345
|
-
})
|
|
8346
|
-
|
|
8365
|
+
}, false, false);
|
|
8366
|
+
$76EG6$runHydrationEvents();
|
|
8367
|
+
return _el$2;
|
|
8368
|
+
})());
|
|
8347
8369
|
}
|
|
8348
8370
|
const opts_without_src = {
|
|
8349
8371
|
...image_options
|
|
8350
8372
|
}; // Prevents the image from instantly loading the original source
|
|
8351
8373
|
delete opts_without_src["src"];
|
|
8352
8374
|
delete opts_without_src["srcset"];
|
|
8353
|
-
const the_image =
|
|
8354
|
-
|
|
8355
|
-
|
|
8375
|
+
const the_image = (() => {
|
|
8376
|
+
const _el$3 = $76EG6$getNextElement($9ef5ce4804a3b61b$var$_tmpl$);
|
|
8377
|
+
$76EG6$spread(_el$3, opts_without_src, false, false);
|
|
8378
|
+
$76EG6$runHydrationEvents();
|
|
8379
|
+
return _el$3;
|
|
8380
|
+
})(); // create image
|
|
8356
8381
|
sources.push(the_image); // chrome seems to be the dumbest piece of cake that has ever existed and just load the first source?????
|
|
8357
8382
|
what_to_watch || (what_to_watch = the_image);
|
|
8358
8383
|
sizes_setter_ || (sizes_setter_ = $9ef5ce4804a3b61b$export$f39a7d0667e924a(what_to_watch, sizes_communicator, resolution_factor)); // now we can finally create the sizes_setter
|
|
8359
8384
|
// start a sizes_setter for every source (including fallback image)
|
|
8360
8385
|
for (let i = 0; i < sources.length; i++) sizes_setter_(sources[i]).catch((0, $b000f5ef6ce456d9$export$8048b892d651b310));
|
|
8361
8386
|
// embed all sources into a <picture> so that the browser understands they're "together"
|
|
8362
|
-
const picture =
|
|
8363
|
-
|
|
8364
|
-
|
|
8387
|
+
const picture = (() => {
|
|
8388
|
+
const _el$4 = $76EG6$getNextElement($9ef5ce4804a3b61b$var$_tmpl$3);
|
|
8389
|
+
$76EG6$insert(_el$4, sources);
|
|
8390
|
+
return _el$4;
|
|
8391
|
+
})();
|
|
8365
8392
|
// Create src and srcset for fallback image and set it.
|
|
8366
8393
|
// This is so that the browser doesn't start loading the fallback image for fun (chrome loads very eagerly)
|
|
8367
8394
|
const fallback_src = $9ef5ce4804a3b61b$var$optimized_img_url_generator("png", src, 400);
|
|
@@ -8391,6 +8418,9 @@ function $9ef5ce4804a3b61b$var$optimized_img_url_generator(format, url, width) {
|
|
|
8391
8418
|
// using make_url_with_query_params takes ~100ms on CDON with 2 surfaces and hover images, we can't afford that when it could be essentially free
|
|
8392
8419
|
return "".concat($9ef5ce4804a3b61b$export$3d13beba9b52c947, "?format=").concat(format, "&url=").concat(encodeURIComponent(url), "&width=").concat(width);
|
|
8393
8420
|
}
|
|
8421
|
+
const $c987460cedc0d7ec$var$_tmpl$ = /*#__PURE__*/$76EG6$template(`<div>`),
|
|
8422
|
+
$c987460cedc0d7ec$var$_tmpl$2 = /*#__PURE__*/$76EG6$template(`<canvas class=depict-img-filler height=3000>`),
|
|
8423
|
+
$c987460cedc0d7ec$var$_tmpl$3 = /*#__PURE__*/$76EG6$template(`<div style=position:relative><div class=depict-img-cont></div><!$><!/>`);
|
|
8394
8424
|
const $c987460cedc0d7ec$var$rendering_options_to_sourceset_component = /*@__PURE__*/new WeakMap();
|
|
8395
8425
|
// Add nolazy to placeholders to avoid errors with the stupid lazyfier
|
|
8396
8426
|
const $c987460cedc0d7ec$var$add_nolazy_to_placeholder = type => type === "placeholder" ? "nolazy" : "";
|
|
@@ -8422,21 +8452,22 @@ function $c987460cedc0d7ec$var$Image(_ref2) {
|
|
|
8422
8452
|
init_with_placeholder: _,
|
|
8423
8453
|
...image_options
|
|
8424
8454
|
} = _ref2;
|
|
8425
|
-
const div =
|
|
8426
|
-
|
|
8427
|
-
|
|
8455
|
+
const div = (() => {
|
|
8456
|
+
const _el$ = $76EG6$getNextElement($c987460cedc0d7ec$var$_tmpl$);
|
|
8457
|
+
$76EG6$effect(_$p => $76EG6$style(_el$, "position:relative;width:100%;padding-bottom:".concat(1 / aspect_ratio * 100, "%"), _$p));
|
|
8458
|
+
return _el$;
|
|
8459
|
+
})();
|
|
8428
8460
|
const sourceset_component = $c987460cedc0d7ec$var$srcset_comp_from_map_or_new(rendering_options, srcset_opts, div);
|
|
8429
8461
|
const IMG_tag = (_image_options$src = image_options.src) !== null && _image_options$src !== void 0 && _image_options$src.startsWith("data:") || !sourceset_component ? "img" : sourceset_component;
|
|
8430
|
-
div.append(
|
|
8431
|
-
|
|
8432
|
-
|
|
8433
|
-
|
|
8434
|
-
|
|
8435
|
-
|
|
8436
|
-
|
|
8437
|
-
|
|
8438
|
-
|
|
8439
|
-
}));
|
|
8462
|
+
div.append($76EG6$createComponent(IMG_tag, $76EG6$mergeProps({
|
|
8463
|
+
alt: alt
|
|
8464
|
+
}, remove_on_error ? {
|
|
8465
|
+
onerror: "this.remove()"
|
|
8466
|
+
} : {}, image_options, {
|
|
8467
|
+
get ["class"]() {
|
|
8468
|
+
return $a285401a927e4306$export$22a65337c1b43b1f(["depict-img-mod ", image_options.class, $c987460cedc0d7ec$var$add_nolazy_to_placeholder(rendering_options === null || rendering_options === void 0 ? void 0 : rendering_options.type)]);
|
|
8469
|
+
}
|
|
8470
|
+
})));
|
|
8440
8471
|
return div;
|
|
8441
8472
|
}
|
|
8442
8473
|
function $c987460cedc0d7ec$var$CompatibleImage(_ref3) {
|
|
@@ -8449,27 +8480,30 @@ function $c987460cedc0d7ec$var$CompatibleImage(_ref3) {
|
|
|
8449
8480
|
srcset_opts: srcset_opts,
|
|
8450
8481
|
...image_options
|
|
8451
8482
|
} = _ref3;
|
|
8452
|
-
const canvas =
|
|
8453
|
-
|
|
8454
|
-
width
|
|
8455
|
-
|
|
8456
|
-
});
|
|
8483
|
+
const canvas = (() => {
|
|
8484
|
+
const _el$2 = $76EG6$getNextElement($c987460cedc0d7ec$var$_tmpl$2);
|
|
8485
|
+
$76EG6$setAttribute(_el$2, "width", 3000 * aspect_ratio);
|
|
8486
|
+
return _el$2;
|
|
8487
|
+
})();
|
|
8457
8488
|
const sourceset_component = $c987460cedc0d7ec$var$srcset_comp_from_map_or_new(rendering_options, srcset_opts, canvas);
|
|
8458
8489
|
const IMG_tag = (_image_options$src2 = image_options.src) !== null && _image_options$src2 !== void 0 && _image_options$src2.startsWith("data:") || !sourceset_component ? "img" : sourceset_component;
|
|
8459
|
-
return
|
|
8460
|
-
|
|
8461
|
-
|
|
8462
|
-
|
|
8463
|
-
|
|
8464
|
-
|
|
8465
|
-
|
|
8466
|
-
|
|
8467
|
-
|
|
8468
|
-
|
|
8469
|
-
|
|
8470
|
-
|
|
8471
|
-
|
|
8472
|
-
|
|
8490
|
+
return (() => {
|
|
8491
|
+
const _el$3 = $76EG6$getNextElement($c987460cedc0d7ec$var$_tmpl$3),
|
|
8492
|
+
_el$4 = _el$3.firstChild,
|
|
8493
|
+
_el$5 = _el$4.nextSibling,
|
|
8494
|
+
[_el$6, _co$] = $76EG6$getNextMarker(_el$5.nextSibling);
|
|
8495
|
+
$76EG6$insert(_el$4, $76EG6$createComponent(IMG_tag, $76EG6$mergeProps({
|
|
8496
|
+
alt: alt
|
|
8497
|
+
}, remove_on_error ? {
|
|
8498
|
+
onerror: "this.remove()"
|
|
8499
|
+
} : {}, image_options, {
|
|
8500
|
+
get ["class"]() {
|
|
8501
|
+
return $a285401a927e4306$export$22a65337c1b43b1f(["depict-img-comp", image_options.class, $c987460cedc0d7ec$var$add_nolazy_to_placeholder(rendering_options === null || rendering_options === void 0 ? void 0 : rendering_options.type)]);
|
|
8502
|
+
}
|
|
8503
|
+
})));
|
|
8504
|
+
$76EG6$insert(_el$3, canvas, _el$6, _co$);
|
|
8505
|
+
return _el$3;
|
|
8506
|
+
})();
|
|
8473
8507
|
}
|
|
8474
8508
|
function $c987460cedc0d7ec$var$srcset_comp_from_map_or_new(rendering_options) {
|
|
8475
8509
|
let srcset_opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -8491,7 +8525,8 @@ function $c987460cedc0d7ec$var$srcset_comp_from_map_or_new(rendering_options) {
|
|
|
8491
8525
|
}
|
|
8492
8526
|
var $8254bab8001eaa15$exports = {};
|
|
8493
8527
|
$8254bab8001eaa15$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";
|
|
8494
|
-
|
|
8528
|
+
const $73f0a7e385687d5d$var$_tmpl$ = /*#__PURE__*/$76EG6$template(`<div class=images-container><!$><!/><div class=main-image-container>`),
|
|
8529
|
+
$73f0a7e385687d5d$var$_tmpl$2 = /*#__PURE__*/$76EG6$template(`<div class=second-image-container>`);
|
|
8495
8530
|
// Saving bytez
|
|
8496
8531
|
// Maybe? @Daniel
|
|
8497
8532
|
const $73f0a7e385687d5d$var$TOUCHSTART = "touchstart";
|
|
@@ -8637,16 +8672,19 @@ const $73f0a7e385687d5d$export$2369f6fc1c911576 = _ref => {
|
|
|
8637
8672
|
srcset_opts: second_srcset_opts || {}
|
|
8638
8673
|
});
|
|
8639
8674
|
const no_second_img = !second_src && !second_srcset && !second_srcset_opts;
|
|
8640
|
-
const images_container =
|
|
8641
|
-
|
|
8642
|
-
|
|
8643
|
-
|
|
8644
|
-
|
|
8645
|
-
|
|
8646
|
-
|
|
8647
|
-
|
|
8648
|
-
|
|
8649
|
-
|
|
8675
|
+
const images_container = (() => {
|
|
8676
|
+
const _el$ = $76EG6$getNextElement($73f0a7e385687d5d$var$_tmpl$),
|
|
8677
|
+
_el$3 = _el$.firstChild,
|
|
8678
|
+
[_el$4, _co$] = $76EG6$getNextMarker(_el$3.nextSibling),
|
|
8679
|
+
_el$2 = _el$4.nextSibling;
|
|
8680
|
+
$76EG6$insert(_el$, !no_second_img && (() => {
|
|
8681
|
+
const _el$5 = $76EG6$getNextElement($73f0a7e385687d5d$var$_tmpl$2);
|
|
8682
|
+
$76EG6$insert(_el$5, second_image);
|
|
8683
|
+
return _el$5;
|
|
8684
|
+
})(), _el$4, _co$);
|
|
8685
|
+
$76EG6$insert(_el$2, main_image);
|
|
8686
|
+
return _el$;
|
|
8687
|
+
})();
|
|
8650
8688
|
if (no_second_img) return images_container;
|
|
8651
8689
|
const hover_element = images_container;
|
|
8652
8690
|
const event_handler_mouse = _ref2 => {
|