@depict-ai/utilishared 0.0.40 → 0.0.41
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/dist/index.d.ts +228 -110
- package/dist/main.js +53 -43
- package/dist/module.js +53 -43
- package/package.json +1 -1
package/dist/module.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const process = { env: {} }; // In case that the code using this wasn't built with "node emulation", just make process.env accesses become undefined.
|
|
1
2
|
function $parcel$export(e, n, v, s) {
|
|
2
3
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
3
4
|
}
|
|
@@ -31,6 +32,9 @@ function $649f456f663da9fc$export$997143d41f6a0c9b(...args) {
|
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
|
|
35
|
+
const $0766c85d387a9765$export$83d89fbfd8236492 = "0.0.41";
|
|
36
|
+
|
|
37
|
+
|
|
34
38
|
/**
|
|
35
39
|
* @deprecated this was a stupid idea, it's much easier to read if one just does a quick arrow function that provides the wanted arguments
|
|
36
40
|
*/ function $a1c80794e6bf4cc2$export$6e7454c733fa1fb2(fn, ...args) {
|
|
@@ -572,18 +576,16 @@ function $eba382943196079c$var$fakesentry() {
|
|
|
572
576
|
}
|
|
573
577
|
|
|
574
578
|
|
|
575
|
-
function $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(fn,
|
|
576
|
-
const report_w_severity = (e)=>$b04e44fad5ea42c7$export$f18d5b0af29128b7(msg ? [
|
|
577
|
-
e,
|
|
578
|
-
msg
|
|
579
|
-
] : e, severity);
|
|
579
|
+
function $b04e44fad5ea42c7$export$b3bbfd758f11cfa9(fn, message, severity = "error") {
|
|
580
580
|
return function() {
|
|
581
|
+
const report_w_severity = (e)=>$b04e44fad5ea42c7$export$f18d5b0af29128b7(message ? [
|
|
582
|
+
e,
|
|
583
|
+
message
|
|
584
|
+
] : e, severity);
|
|
581
585
|
try {
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
if (typeof maybe_promise?.catch == "function") return maybe_promise.catch(report_w_severity);
|
|
586
|
-
return maybe_promise;
|
|
586
|
+
const return_value = Reflect.apply(fn, this, arguments);
|
|
587
|
+
if (fn?.constructor?.name === "AsyncFunction" || typeof return_value?.then === "function") return return_value.catch(report_w_severity);
|
|
588
|
+
return return_value;
|
|
587
589
|
} catch (e) {
|
|
588
590
|
report_w_severity(e);
|
|
589
591
|
}
|
|
@@ -827,11 +829,13 @@ class $cdca9fea6eb103e5$export$12e07a2a9f87578a {
|
|
|
827
829
|
ifexists: (selector, callback)=>{
|
|
828
830
|
this.#check_observer_args(selector, callback, true);
|
|
829
831
|
if (selector instanceof Node) {
|
|
830
|
-
if (document.documentElement.contains(selector))
|
|
832
|
+
if (document.documentElement.contains(selector)) // When the selector is a node the selector and the element are the same, dunno how we could reflect that in the typing though
|
|
833
|
+
this.#call_callbacks([
|
|
831
834
|
callback
|
|
832
835
|
], (callback_)=>({
|
|
833
836
|
element_: selector,
|
|
834
837
|
selector_: selector,
|
|
838
|
+
// ts is being stupid here because it doesn't understand that everything in string | Text | Element | Comment that's a node is Text | Element | Comment
|
|
835
839
|
disconnector_: this.#disconnect_fn({
|
|
836
840
|
event_: "exists",
|
|
837
841
|
selector_: new WeakRef(selector),
|
|
@@ -1459,10 +1463,11 @@ class $4ce764ddfee055ef$export$1b28bc5c68cc4d77 extends EventTarget {
|
|
|
1459
1463
|
get: ()=>this.#ons[ev],
|
|
1460
1464
|
set: (v)=>this.#ons[ev] = v
|
|
1461
1465
|
});
|
|
1462
|
-
this.addEventListener(ev, (
|
|
1466
|
+
this.addEventListener(ev, (e)=>{
|
|
1467
|
+
// e can be MessageEvent | CloseEvent | ErrorEvent I think
|
|
1463
1468
|
const on_fn = this.#ons[ev];
|
|
1464
1469
|
if (typeof on_fn === "function") (0, $b04e44fad5ea42c7$export$b3bbfd758f11cfa9)(on_fn).call(ev, e);
|
|
1465
|
-
})
|
|
1470
|
+
});
|
|
1466
1471
|
}
|
|
1467
1472
|
}
|
|
1468
1473
|
async #ensure_connection() {
|
|
@@ -1693,7 +1698,7 @@ const $cafa1ff1049985c2$export$aa26019042811d4f = /*@__PURE__*/ $cafa1ff1049985c
|
|
|
1693
1698
|
if (process.env.DEPICT === "false") return;
|
|
1694
1699
|
for(let i = 0; i < bodies.length; i++){
|
|
1695
1700
|
const id = (0, $460df8550f9d084d$export$656831b7e9c341c3)();
|
|
1696
|
-
$cafa1ff1049985c2$var$ws_instance
|
|
1701
|
+
$cafa1ff1049985c2$var$ws_instance?.ensure_sent({
|
|
1697
1702
|
id: id,
|
|
1698
1703
|
event: bodies[i]
|
|
1699
1704
|
}).catch((e)=>(0, $b04e44fad5ea42c7$export$f18d5b0af29128b7)(e, "error"));
|
|
@@ -1763,7 +1768,7 @@ const $cafa1ff1049985c2$export$28cacbd9b4306ffc = /*@__PURE__*/ $cafa1ff1049985c
|
|
|
1763
1768
|
|
|
1764
1769
|
|
|
1765
1770
|
|
|
1766
|
-
let $43683b1103edab15$export$6399bdb2291895e0 =
|
|
1771
|
+
let $43683b1103edab15$export$6399bdb2291895e0 = ()=>{
|
|
1767
1772
|
let id = "";
|
|
1768
1773
|
let localstorage_error;
|
|
1769
1774
|
let cookie_error;
|
|
@@ -1800,7 +1805,7 @@ let $43683b1103edab15$export$6399bdb2291895e0 = /*@__PURE__*/ (0, /*@__PURE__*/$
|
|
|
1800
1805
|
}
|
|
1801
1806
|
if (!id) id = (0, $460df8550f9d084d$export$656831b7e9c341c3)();
|
|
1802
1807
|
return id;
|
|
1803
|
-
}
|
|
1808
|
+
};
|
|
1804
1809
|
let $43683b1103edab15$export$adc61a405a4cabed = $43683b1103edab15$export$6399bdb2291895e0;
|
|
1805
1810
|
let $43683b1103edab15$export$61e7e1f11e96692f = ()=>undefined;
|
|
1806
1811
|
const $43683b1103edab15$export$336e7ad40bae0652 = /*@__PURE__*/ (0, /*@__PURE__*/$b04e44fad5ea42c7$export$b3bbfd758f11cfa9)((newfn)=>$43683b1103edab15$export$6399bdb2291895e0 = newfn);
|
|
@@ -2398,7 +2403,8 @@ function $5dbacdc6a3feeb15$export$7e4427e80d5fc619() {
|
|
|
2398
2403
|
const existing_consent = $5dbacdc6a3feeb15$var$consent_from_cookie();
|
|
2399
2404
|
if (existing_consent?.necessary) // If "necessary" isn't set, user hasn't actually given/withold consent yet.
|
|
2400
2405
|
$5dbacdc6a3feeb15$var$cookie_ipns(existing_consent);
|
|
2401
|
-
window.addEventListener("consent.onetrust", (0, $b04e44fad5ea42c7$export$b3bbfd758f11cfa9)((
|
|
2406
|
+
window.addEventListener("consent.onetrust", (0, $b04e44fad5ea42c7$export$b3bbfd758f11cfa9)((evt)=>{
|
|
2407
|
+
const c = evt;
|
|
2402
2408
|
// Cast because TS doesn't know about the forEach coming up
|
|
2403
2409
|
const consent_obj = {};
|
|
2404
2410
|
Object.keys($5dbacdc6a3feeb15$var$OPTANON_TO_COOKIEBOT).forEach((k)=>{
|
|
@@ -2594,7 +2600,7 @@ const $0a581f1dfa083522$export$59ba1eb2c083f0cd = /*@__PURE__*/ (0, /*@__PURE__*
|
|
|
2594
2600
|
const style_tag = await ($0a581f1dfa083522$var$existing_style_tag ||= (0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).wait_for_element("head").then((head)=>{
|
|
2595
2601
|
const tag = document.createElement("style");
|
|
2596
2602
|
(0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).onremoved(// reinsertion for next.js's "portable" <head>
|
|
2597
|
-
tag, (
|
|
2603
|
+
tag, (eoe)=>{
|
|
2598
2604
|
if (document.head.contains(tag)) // just make sure to not freak out if it's already been added again
|
|
2599
2605
|
return;
|
|
2600
2606
|
if ($0a581f1dfa083522$var$reactions_in_last_s >= 10) {
|
|
@@ -2605,14 +2611,14 @@ const $0a581f1dfa083522$export$59ba1eb2c083f0cd = /*@__PURE__*/ (0, /*@__PURE__*
|
|
|
2605
2611
|
$0a581f1dfa083522$var$reactions_in_last_s++;
|
|
2606
2612
|
setTimeout(()=>$0a581f1dfa083522$var$reactions_in_last_s--, 1000);
|
|
2607
2613
|
document.head.append(tag); // we're sure that head exists now since we inserted it there previously
|
|
2608
|
-
})
|
|
2614
|
+
});
|
|
2609
2615
|
(0, $649f456f663da9fc$export$de56f1198d121036)("inserting", tag, "into", head);
|
|
2610
2616
|
return head.appendChild(tag);
|
|
2611
2617
|
}));
|
|
2612
2618
|
style_tag.append(css);
|
|
2613
2619
|
});
|
|
2614
2620
|
const $0a581f1dfa083522$export$a96c18473f2af463 = (tenant, selector, validator)=>{
|
|
2615
|
-
return (0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).onexists(selector, (
|
|
2621
|
+
return (0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).onexists(selector, ({ element: element })=>(0, $91b2e49f92ed636c$export$2c34560c3749dc63)(element, tenant.get_product_id, (p_id, r_id, was_unmatching, event)=>{
|
|
2616
2622
|
if (typeof validator === "function" && !validator(event)) return;
|
|
2617
2623
|
if (!was_unmatching) (0, $0263af58e2304a2b$export$bf205937e5e012cb)();
|
|
2618
2624
|
(0, $43683b1103edab15$export$9028351cb994757e)({
|
|
@@ -2624,7 +2630,7 @@ const $0a581f1dfa083522$export$a96c18473f2af463 = (tenant, selector, validator)=
|
|
|
2624
2630
|
recommendation_id: r_id
|
|
2625
2631
|
}
|
|
2626
2632
|
});
|
|
2627
|
-
}, true))
|
|
2633
|
+
}, true));
|
|
2628
2634
|
};
|
|
2629
2635
|
const $0a581f1dfa083522$export$a4f97b27a0592e6c = (url)=>(url ? new URL(url, window.location.origin) : window.location).pathname.split("/").filter((a)=>a).pop()?.replace(/\.html?$/i, "") || "";
|
|
2630
2636
|
const $0a581f1dfa083522$export$692b606677218a16 = (callback)=>{
|
|
@@ -3086,6 +3092,7 @@ async function $5cbe24d064a033ed$export$a9fc160c5ed83bd7(t, rendering_options) {
|
|
|
3086
3092
|
}
|
|
3087
3093
|
const { template: template , post_processors: post_processors = [] } = rendering_options;
|
|
3088
3094
|
const caught_post_processing_functions = post_processors.map((post_pro)=>(0, $b04e44fad5ea42c7$export$b3bbfd758f11cfa9)(post_pro));
|
|
3095
|
+
let a;
|
|
3089
3096
|
const caught_html2elems = (0, $b04e44fad5ea42c7$export$b3bbfd758f11cfa9)((0, $0bdb8dbcf1bc7f34$export$44951404cb8d0583));
|
|
3090
3097
|
let output_elements;
|
|
3091
3098
|
if (typeof template === "function") {
|
|
@@ -3096,7 +3103,7 @@ async function $5cbe24d064a033ed$export$a9fc160c5ed83bd7(t, rendering_options) {
|
|
|
3096
3103
|
const info = new $5cbe24d064a033ed$export$da854280fb61cd32(t, rendering_options, displays, index, ()=>keep = false, event_listeners);
|
|
3097
3104
|
const template_result = await caught_template(display, info);
|
|
3098
3105
|
if (!keep) throw keep;
|
|
3099
|
-
const elements = typeof template_result == "string" ? caught_html2elems(template_result) : template_result;
|
|
3106
|
+
const elements = (typeof template_result == "string" ? caught_html2elems(template_result) : template_result) || [];
|
|
3100
3107
|
const post_processed_elements = await $5cbe24d064a033ed$export$cf7cbc6b76039101(t, rendering_options, processed_displays, index, caught_post_processing_functions, elements, event_listeners);
|
|
3101
3108
|
return Array.from(post_processed_elements);
|
|
3102
3109
|
}))).filter((p)=>p.status === "fulfilled").map((p)=>p.value).flat();
|
|
@@ -3105,7 +3112,7 @@ async function $5cbe24d064a033ed$export$a9fc160c5ed83bd7(t, rendering_options) {
|
|
|
3105
3112
|
// we don't know how this will be used and want it to be robust
|
|
3106
3113
|
} else output_elements = (await Promise.all(processed_displays.map(async (display, index)=>{
|
|
3107
3114
|
const html = $5cbe24d064a033ed$export$e0009e7da572f99b(template, display);
|
|
3108
|
-
const elements = caught_html2elems(html);
|
|
3115
|
+
const elements = caught_html2elems(html) || [];
|
|
3109
3116
|
const post_processed_elements = await $5cbe24d064a033ed$export$cf7cbc6b76039101(t, rendering_options, processed_displays, index, caught_post_processing_functions, elements);
|
|
3110
3117
|
return Array.from(post_processed_elements);
|
|
3111
3118
|
}))).flat();
|
|
@@ -3149,8 +3156,8 @@ function $5cbe24d064a033ed$export$c42139a43c877ecd(obj) {
|
|
|
3149
3156
|
}
|
|
3150
3157
|
return obj;
|
|
3151
3158
|
}
|
|
3152
|
-
async function $5cbe24d064a033ed$export$cf7cbc6b76039101(t, rendering_options, displays, index, functions,
|
|
3153
|
-
|
|
3159
|
+
async function $5cbe24d064a033ed$export$cf7cbc6b76039101(t, rendering_options, displays, index, functions, elements, event_listeners = []) {
|
|
3160
|
+
let b;
|
|
3154
3161
|
let keep = true;
|
|
3155
3162
|
const info = new $5cbe24d064a033ed$export$da854280fb61cd32(t, rendering_options, displays, index, ()=>keep = false, event_listeners);
|
|
3156
3163
|
for(let i = 0; i < functions.length; i++){
|
|
@@ -3175,7 +3182,7 @@ async function $5cbe24d064a033ed$export$c22e610107c5a15a(t, rendering_options, d
|
|
|
3175
3182
|
for(let j = 0; j < caught_pre_processors.length; j++){
|
|
3176
3183
|
const pre_processor = caught_pre_processors[j];
|
|
3177
3184
|
const result = await pre_processor(display, info_for_pre_pro);
|
|
3178
|
-
if (result) display = result;
|
|
3185
|
+
if (result) display = result; // Don't understand why this cast is needed
|
|
3179
3186
|
if (!keep) break;
|
|
3180
3187
|
}
|
|
3181
3188
|
if (keep) processed_displays.push(display);
|
|
@@ -3184,7 +3191,6 @@ async function $5cbe24d064a033ed$export$c22e610107c5a15a(t, rendering_options, d
|
|
|
3184
3191
|
return processed_displays;
|
|
3185
3192
|
}
|
|
3186
3193
|
class $5cbe24d064a033ed$export$da854280fb61cd32 {
|
|
3187
|
-
// maybe not ideal? idk
|
|
3188
3194
|
constructor(t, rendering_options, displays, index, remove_display, event_listeners){
|
|
3189
3195
|
this.t = t;
|
|
3190
3196
|
this.rendering_options = rendering_options;
|
|
@@ -3984,7 +3990,10 @@ function $b83068cbd26dcc41$export$e4741190ccada479(element, selector) {
|
|
|
3984
3990
|
|
|
3985
3991
|
|
|
3986
3992
|
const $b9b0dba897847b2a$export$eb0b9ed911409b57 = (callback, element)=>((0, $b04e44fad5ea42c7$export$b3bbfd758f11cfa9)(callback)(element), element);
|
|
3987
|
-
|
|
3993
|
+
function $b9b0dba897847b2a$export$f63fcc839cb0f734(event, handler, element) {
|
|
3994
|
+
element.addEventListener(event, (0, $b04e44fad5ea42c7$export$b3bbfd758f11cfa9)(handler));
|
|
3995
|
+
return element;
|
|
3996
|
+
}
|
|
3988
3997
|
const $b9b0dba897847b2a$export$22a65337c1b43b1f = /* @PURE */ (classes)=>classes.filter((c)=>c !== undefined).join(" ");
|
|
3989
3998
|
|
|
3990
3999
|
|
|
@@ -4422,7 +4431,7 @@ class $c33c6faf8acc7442$export$68babfc5be0de5da extends (0, $ef9394fafebd5eab$ex
|
|
|
4422
4431
|
constructor(options, lazyfier_options){
|
|
4423
4432
|
super(options);
|
|
4424
4433
|
const lazy_promise = new Promise((r)=>{
|
|
4425
|
-
(0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).onexists(this.insert_here, (
|
|
4434
|
+
(0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).onexists(this.insert_here, ({ element: element , disconnector: disconnector })=>{
|
|
4426
4435
|
const i_o = new IntersectionObserver((0, $b04e44fad5ea42c7$export$b3bbfd758f11cfa9)((records)=>{
|
|
4427
4436
|
for (const record of records)if (record.intersectionRatio > 0) {
|
|
4428
4437
|
r(true);
|
|
@@ -4432,7 +4441,7 @@ class $c33c6faf8acc7442$export$68babfc5be0de5da extends (0, $ef9394fafebd5eab$ex
|
|
|
4432
4441
|
}
|
|
4433
4442
|
}));
|
|
4434
4443
|
i_o.observe(element);
|
|
4435
|
-
})
|
|
4444
|
+
});
|
|
4436
4445
|
});
|
|
4437
4446
|
this.lazyfier = new (0, $b83068cbd26dcc41$export$3be7054c61590ee3)({
|
|
4438
4447
|
container: this.insert_here,
|
|
@@ -4500,7 +4509,7 @@ function $c1503704e45e6a15$export$1bffac19f9f0d6fc(elements, _display, info) {
|
|
|
4500
4509
|
$c1503704e45e6a15$export$3777a14dd8c2363d.add(displays);
|
|
4501
4510
|
const { get_product_id: get_product_id } = info.t;
|
|
4502
4511
|
const { type: type } = rendering_options;
|
|
4503
|
-
(0, $0263af58e2304a2b$export$7babcd5d4056b2ca)(displays, get_product_id, {
|
|
4512
|
+
(0, $0263af58e2304a2b$export$7babcd5d4056b2ca)(displays, get_product_id /* yes this might create errors if there's no page_url in the display but don't have time to fix, sorry */ , {
|
|
4504
4513
|
list_name: "depict_" + type
|
|
4505
4514
|
});
|
|
4506
4515
|
}
|
|
@@ -5364,7 +5373,9 @@ async function $30e801eaa3dc319e$export$c84671f46d6a1ca({ rows: rows , container
|
|
|
5364
5373
|
for await (const [currently_showing_rows, number_of_els] of (0, $693e2a1517bef984$export$f8913c8a18f7ca21)([
|
|
5365
5374
|
// start for await loop when the container element gets inserted into the DOM
|
|
5366
5375
|
// the loop is broken by an observer.onremoved above calling .exit on the IPNS this depends on
|
|
5376
|
+
// @ts-ignore
|
|
5367
5377
|
ipns,
|
|
5378
|
+
// @ts-ignore too complicated to fix this IMO
|
|
5368
5379
|
el_count_ipns
|
|
5369
5380
|
])){
|
|
5370
5381
|
our_style_el.innerText = col_styling + cols_at_size.map((options)=>{
|
|
@@ -6306,7 +6317,7 @@ function $556d9c321900f1d4$var$scroll_idle(slider, chunk_size, clones_per_side)
|
|
|
6306
6317
|
];
|
|
6307
6318
|
const { intersecting_items_object: intersecting_items_object } = slider;
|
|
6308
6319
|
const index_of_first_intersecting = slider.first_intersecting_index();
|
|
6309
|
-
const index_of_last_intersecting = Math.max(...Object.keys(
|
|
6320
|
+
const index_of_last_intersecting = Math.max(...Object.keys(intersecting_items_object).map((v)=>+v));
|
|
6310
6321
|
const post_move = (direction)=>{
|
|
6311
6322
|
// slider.invalidate_cache();
|
|
6312
6323
|
// for (const key in intersecting_items_object) {
|
|
@@ -6535,12 +6546,12 @@ function $159237486410355f$export$be95cb0e8cfd099e() {
|
|
|
6535
6546
|
|
|
6536
6547
|
|
|
6537
6548
|
function $847e4a06ea6767c0$export$3ebd86018b39d9d2(t, selector, filter) {
|
|
6538
|
-
(0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).onexists(selector, (
|
|
6549
|
+
(0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).onexists(selector, (eoe)=>{
|
|
6539
6550
|
(0, $649f456f663da9fc$export$de56f1198d121036)("Order confirmation element showed up!", eoe);
|
|
6540
6551
|
const { element: element } = eoe;
|
|
6541
6552
|
const the_id = element.innerText;
|
|
6542
6553
|
$847e4a06ea6767c0$export$1ac466d53a6636ac(t, the_id, (0, $43683b1103edab15$export$6399bdb2291895e0)(), filter);
|
|
6543
|
-
})
|
|
6554
|
+
});
|
|
6544
6555
|
}
|
|
6545
6556
|
function $847e4a06ea6767c0$export$b11248fa13a8a86c(tenant, id_extractor) {
|
|
6546
6557
|
// Use the given extractor to find a transaction ID from each entry pushed to dataLayer.
|
|
@@ -6548,7 +6559,7 @@ function $847e4a06ea6767c0$export$b11248fa13a8a86c(tenant, id_extractor) {
|
|
|
6548
6559
|
const maybe_send_entries = (entries)=>entries.map(id_extractor).filter((id)=>id && typeof id === "string").forEach((id)=>{
|
|
6549
6560
|
$847e4a06ea6767c0$export$1ac466d53a6636ac(tenant, id);
|
|
6550
6561
|
});
|
|
6551
|
-
const dataLayer =
|
|
6562
|
+
const dataLayer = globalThis.dataLayer ||= [];
|
|
6552
6563
|
// Process entries that are already queued at this point
|
|
6553
6564
|
maybe_send_entries(dataLayer);
|
|
6554
6565
|
// And then process any future entries, making sure to pass them on to other potential proxies to the push function
|
|
@@ -6823,7 +6834,7 @@ function $802201ed0a316c43$export$ab0f802c05dd969b(on_request) {
|
|
|
6823
6834
|
const response_promise = target.apply(this_arg, argument_list);
|
|
6824
6835
|
try {
|
|
6825
6836
|
const input = argument_list[0];
|
|
6826
|
-
const url = input instanceof Request ? input.url : input;
|
|
6837
|
+
const url = input instanceof Request ? input.url : input instanceof URL ? input.href : input;
|
|
6827
6838
|
// TODO, doing it like this doesn't feel very robust.
|
|
6828
6839
|
// And what if the developer wants to override which url's corespond to which events?
|
|
6829
6840
|
const url_segement_to_type = [
|
|
@@ -7060,7 +7071,7 @@ const $8bed543774ca0dd4$export$e3f70ef7e3d00501 = /*@__PURE__*/ (0, /*@__PURE__*
|
|
|
7060
7071
|
});
|
|
7061
7072
|
};
|
|
7062
7073
|
if (typeof target == "string") {
|
|
7063
|
-
const disconnect_observer = (0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).onexists(target, (
|
|
7074
|
+
const disconnect_observer = (0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).onexists(target, ({ element: element , disconnector: disconnector })=>per_el_fn(element, disconnector));
|
|
7064
7075
|
(0, $0d2acf276472ebf7$export$1cd22bab0d2c3b0b)(disconnect_observer);
|
|
7065
7076
|
} else {
|
|
7066
7077
|
let did_already_fail = false;
|
|
@@ -7230,6 +7241,7 @@ const $78270f2ea7ca229f$export$a4eccf92efefa04d = (image_width, image_height, co
|
|
|
7230
7241
|
async function $78270f2ea7ca229f$export$2dd69958012e3e49({ override_rec_renderer: override_rec_renderer = (0, $6be99244fa573db5$export$50ce83ace0cdd87e) , image_width: image_width = 2000 , image_height: image_height = 2000 , num_items: num_items = 10 , color: color = "#d9d9d9" , on_no_rendering_result: on_no_rendering_result , post_rendering: post_rendering } = {}) {
|
|
7231
7242
|
const image_url = $78270f2ea7ca229f$export$a4eccf92efefa04d(image_width, image_height, color);
|
|
7232
7243
|
return async (t, rendering_options)=>{
|
|
7244
|
+
// @ts-ignore FIXME: this is a hack to make the type checker happy
|
|
7233
7245
|
const actual_rendering = override_rec_renderer(t, rendering_options).catch((0, $7547e32486a3abc0$export$8048b892d651b310)); // start rendering first
|
|
7234
7246
|
const placeholder_opts = {
|
|
7235
7247
|
...rendering_options,
|
|
@@ -7265,6 +7277,7 @@ async function $78270f2ea7ca229f$export$2dd69958012e3e49({ override_rec_renderer
|
|
|
7265
7277
|
}
|
|
7266
7278
|
]
|
|
7267
7279
|
};
|
|
7280
|
+
// @ts-ignore FIXME: this is a hack to make the type checker happy
|
|
7268
7281
|
const placeholder_rendering = await override_rec_renderer(t, placeholder_opts).catch((0, $7547e32486a3abc0$export$8048b892d651b310));
|
|
7269
7282
|
let set_should_stay_inserted;
|
|
7270
7283
|
const should_stay_inserted = new Promise((r)=>set_should_stay_inserted = r);
|
|
@@ -7682,9 +7695,9 @@ const $690d8897acf7a743$var$get_voyado_id = ()=>{
|
|
|
7682
7695
|
const va = /\b_vaI=([^;]+)/.exec(document.cookie)?.[1];
|
|
7683
7696
|
return va || $690d8897acf7a743$var$default_id;
|
|
7684
7697
|
};
|
|
7685
|
-
const $690d8897acf7a743$export$a739d9a07da7f9ce = ()=>{
|
|
7686
|
-
|
|
7687
|
-
};
|
|
7698
|
+
const $690d8897acf7a743$export$a739d9a07da7f9ce = (0, $b04e44fad5ea42c7$export$b3bbfd758f11cfa9)(()=>{
|
|
7699
|
+
(0, $43683b1103edab15$export$336e7ad40bae0652)($690d8897acf7a743$var$get_voyado_id);
|
|
7700
|
+
});
|
|
7688
7701
|
|
|
7689
7702
|
|
|
7690
7703
|
|
|
@@ -8668,9 +8681,6 @@ function $f5ca01afd4680bdd$export$f2ca6fc699ca1fb4(props = {}) {
|
|
|
8668
8681
|
|
|
8669
8682
|
|
|
8670
8683
|
|
|
8671
|
-
const $0766c85d387a9765$export$83d89fbfd8236492 = "0.0.40";
|
|
8672
|
-
|
|
8673
|
-
|
|
8674
8684
|
|
|
8675
8685
|
/**
|
|
8676
8686
|
* Shallowly converts all keys in an object from snake_case to camelCase.
|