@sesamy/sesamy-js 1.120.2 → 1.121.0
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/sesamy-js.cjs +7 -7
- package/dist/sesamy-js.d.ts +43 -5
- package/dist/sesamy-js.iife.js +7 -7
- package/dist/sesamy-js.mjs +1124 -1097
- package/package.json +2 -2
package/dist/sesamy-js.mjs
CHANGED
|
@@ -2618,6 +2618,9 @@ function er(e = {}) {
|
|
|
2618
2618
|
async getTokenSilently(e, t) {
|
|
2619
2619
|
return null;
|
|
2620
2620
|
},
|
|
2621
|
+
getProxyAuthBaseUrl() {
|
|
2622
|
+
return t;
|
|
2623
|
+
},
|
|
2621
2624
|
async getUser() {
|
|
2622
2625
|
if (!r) return null;
|
|
2623
2626
|
if (a) return a;
|
|
@@ -2686,24 +2689,27 @@ async function or(e = !0, t = !1) {
|
|
|
2686
2689
|
async function sr() {
|
|
2687
2690
|
return nr ? rr().getUser() : null;
|
|
2688
2691
|
}
|
|
2689
|
-
|
|
2690
|
-
return
|
|
2692
|
+
function cr() {
|
|
2693
|
+
return nr ? Jn()?.getProxyAuthBaseUrl?.() ?? null : null;
|
|
2691
2694
|
}
|
|
2692
2695
|
async function lr(e) {
|
|
2693
|
-
return rr().
|
|
2696
|
+
return rr().login(e);
|
|
2694
2697
|
}
|
|
2695
2698
|
async function ur(e) {
|
|
2699
|
+
return rr().loginWithRedirect(e);
|
|
2700
|
+
}
|
|
2701
|
+
async function dr(e) {
|
|
2696
2702
|
return rr().loginWithPopup(e);
|
|
2697
2703
|
}
|
|
2698
|
-
async function
|
|
2704
|
+
async function fr(e = {}) {
|
|
2699
2705
|
return rr().logout(e);
|
|
2700
2706
|
}
|
|
2701
|
-
async function
|
|
2707
|
+
async function pr() {
|
|
2702
2708
|
if (!nr) return !1;
|
|
2703
2709
|
let e = Jn();
|
|
2704
2710
|
return e ? typeof e.refresh == "function" ? e.refresh() : e.isAuthenticated() : !1;
|
|
2705
2711
|
}
|
|
2706
|
-
async function
|
|
2712
|
+
async function mr(e) {
|
|
2707
2713
|
let t = e.split(".");
|
|
2708
2714
|
if (t.length !== 3) throw Error("Invalid token");
|
|
2709
2715
|
let n = decodeURIComponent(atob(t[1].replace(/-/g, "+").replace(/_/g, "/")).split("").map((e) => "%" + ("00" + e.charCodeAt(0).toString(16)).slice(-2)).join("")), r = JSON.parse(n);
|
|
@@ -2717,7 +2723,7 @@ async function pr(e) {
|
|
|
2717
2723
|
}
|
|
2718
2724
|
//#endregion
|
|
2719
2725
|
//#region ../../node_modules/.pnpm/wretch@2.11.1/node_modules/wretch/dist/middlewares/dedupe.js
|
|
2720
|
-
var
|
|
2726
|
+
var hr = (e, t) => t.skipDedupe || t.method !== "GET", gr = (e, t) => t.method + "@" + e, _r = (e) => e.clone(), vr = ({ skip: e = hr, key: t = gr, resolver: n = _r } = {}) => {
|
|
2721
2727
|
let r = /* @__PURE__ */ new Map();
|
|
2722
2728
|
return (i) => (a, o) => {
|
|
2723
2729
|
if (e(a, o)) return i(a, o);
|
|
@@ -2734,7 +2740,7 @@ var mr = (e, t) => t.skipDedupe || t.method !== "GET", hr = (e, t) => t.method +
|
|
|
2734
2740
|
return r.delete(s), Promise.reject(e);
|
|
2735
2741
|
}
|
|
2736
2742
|
};
|
|
2737
|
-
},
|
|
2743
|
+
}, yr = (e, t) => e * t, br = (e) => e && e.ok, xr = ({ delayTimer: e = 500, delayRamp: t = yr, maxAttempts: n = 10, until: r = br, onRetry: i = null, retryOnNetworkError: a = !1, resolveWithLatestResponse: o = !1, skip: s } = {}) => (c) => (l, u) => {
|
|
2738
2744
|
let d = 0;
|
|
2739
2745
|
if (s && s(l, u)) return c(l, u);
|
|
2740
2746
|
let f = (s, p) => Promise.resolve(r(s, p)).then((r) => r ? s && o ? s : p ? Promise.reject(p) : s : (d++, !n || d <= n ? new Promise((n) => {
|
|
@@ -2757,7 +2763,7 @@ var mr = (e, t) => t.skipDedupe || t.method !== "GET", hr = (e, t) => t.method +
|
|
|
2757
2763
|
if (!a) throw e;
|
|
2758
2764
|
return f(null, e);
|
|
2759
2765
|
});
|
|
2760
|
-
},
|
|
2766
|
+
}, Sr = class e extends Error {
|
|
2761
2767
|
status;
|
|
2762
2768
|
statusText;
|
|
2763
2769
|
url;
|
|
@@ -2777,20 +2783,20 @@ var mr = (e, t) => t.skipDedupe || t.method !== "GET", hr = (e, t) => t.method +
|
|
|
2777
2783
|
isNotFoundError() {
|
|
2778
2784
|
return this.status === 404;
|
|
2779
2785
|
}
|
|
2780
|
-
},
|
|
2781
|
-
function
|
|
2786
|
+
}, Cr = /* @__PURE__ */ ((e) => (e.BROWSER = "browser", e.NORMAL = "normal", e))(Cr || {}), wr = "application/json", Tr = "Content-Type", Er = Symbol(), Dr = Symbol();
|
|
2787
|
+
function Or(e = {}) {
|
|
2782
2788
|
let t = e instanceof Array ? Object.fromEntries(e) : e;
|
|
2783
|
-
return Object.entries(t).find(([e]) => e.toLowerCase() ===
|
|
2789
|
+
return Object.entries(t).find(([e]) => e.toLowerCase() === Tr.toLowerCase())?.[1];
|
|
2784
2790
|
}
|
|
2785
|
-
function
|
|
2791
|
+
function kr(e) {
|
|
2786
2792
|
return /^application\/.*json.*/.test(e);
|
|
2787
2793
|
}
|
|
2788
|
-
var
|
|
2794
|
+
var Ar = function(e, t, n = !1) {
|
|
2789
2795
|
return Object.entries(t).reduce((t, [r, i]) => {
|
|
2790
2796
|
let a = e[r];
|
|
2791
|
-
return Array.isArray(a) && Array.isArray(i) ? t[r] = n ? [...a, ...i] : i : typeof a == "object" && typeof i == "object" ? t[r] =
|
|
2797
|
+
return Array.isArray(a) && Array.isArray(i) ? t[r] = n ? [...a, ...i] : i : typeof a == "object" && typeof i == "object" ? t[r] = Ar(a, i, n) : t[r] = i, t;
|
|
2792
2798
|
}, { ...e });
|
|
2793
|
-
},
|
|
2799
|
+
}, jr = {
|
|
2794
2800
|
options: {},
|
|
2795
2801
|
errorType: "text",
|
|
2796
2802
|
polyfills: {},
|
|
@@ -2800,23 +2806,23 @@ var kr = function(e, t, n = !1) {
|
|
|
2800
2806
|
return n && i ? new i(...r) : i;
|
|
2801
2807
|
}
|
|
2802
2808
|
};
|
|
2803
|
-
function jr(e, t = !1) {
|
|
2804
|
-
Ar.options = t ? e : kr(Ar.options, e);
|
|
2805
|
-
}
|
|
2806
2809
|
function Mr(e, t = !1) {
|
|
2807
|
-
|
|
2810
|
+
jr.options = t ? e : Ar(jr.options, e);
|
|
2811
|
+
}
|
|
2812
|
+
function Nr(e, t = !1) {
|
|
2813
|
+
jr.polyfills = t ? e : Ar(jr.polyfills, e);
|
|
2808
2814
|
}
|
|
2809
|
-
function
|
|
2810
|
-
|
|
2815
|
+
function Pr(e) {
|
|
2816
|
+
jr.errorType = e;
|
|
2811
2817
|
}
|
|
2812
|
-
var
|
|
2818
|
+
var Fr = (e) => (t) => e.reduceRight((e, t) => t(e), t) || t, Ir = class extends Error {}, Lr = (e) => {
|
|
2813
2819
|
let t = /* @__PURE__ */ Object.create(null);
|
|
2814
2820
|
e = e._addons.reduce((n, r) => r.beforeRequest && r.beforeRequest(n, e._options, t) || n, e);
|
|
2815
|
-
let { _url: n, _options: r, _config: i, _catchers: a, _resolvers: o, _middlewares: s, _addons: c } = e, l = new Map(a), u =
|
|
2816
|
-
throw { [
|
|
2821
|
+
let { _url: n, _options: r, _config: i, _catchers: a, _resolvers: o, _middlewares: s, _addons: c } = e, l = new Map(a), u = Ar(i.options, r), d = n, f = Fr(s)((e, t) => (d = e, i.polyfill("fetch")(e, t)))(n, u), p = /* @__PURE__ */ Error(), m = f.catch((e) => {
|
|
2822
|
+
throw { [Er]: e };
|
|
2817
2823
|
}).then((e) => {
|
|
2818
2824
|
if (!e.ok) {
|
|
2819
|
-
let t = new
|
|
2825
|
+
let t = new Ir();
|
|
2820
2826
|
if (t.cause = p, t.stack = t.stack + "\nCAUSE: " + p.stack, t.response = e, t.status = e.status, t.url = d, e.type === "opaque") throw t;
|
|
2821
2827
|
let n = i.errorType === "json" || e.headers.get("Content-Type")?.split(";")[0] === "application/json";
|
|
2822
2828
|
return (i.errorType ? n ? e.text() : e[i.errorType]() : Promise.resolve(e.body)).then((r) => {
|
|
@@ -2831,9 +2837,9 @@ var Pr = (e) => (t) => e.reduceRight((e, t) => t(e), t) || t, Fr = class extends
|
|
|
2831
2837
|
}
|
|
2832
2838
|
return e;
|
|
2833
2839
|
}), h = (t) => t.catch((t) => {
|
|
2834
|
-
let n = Object.prototype.hasOwnProperty.call(t,
|
|
2840
|
+
let n = Object.prototype.hasOwnProperty.call(t, Er), r = n ? t[Er] : t, i = r?.status && l.get(r.status) || l.get(r?.name) || n && l.has(Er) && l.get(Er);
|
|
2835
2841
|
if (i) return i(r, e);
|
|
2836
|
-
let a = l.get(
|
|
2842
|
+
let a = l.get(Dr);
|
|
2837
2843
|
if (a) return a(r, e);
|
|
2838
2844
|
throw r;
|
|
2839
2845
|
}), g = (e) => (t) => h(e ? m.then((t) => t && t[e]()).then((e) => t ? t(e) : e) : m.then((e) => t ? t(e) : e)), _ = {
|
|
@@ -2868,17 +2874,17 @@ var Pr = (e) => (t) => e.reduceRight((e, t) => t(e), t) || t, Fr = class extends
|
|
|
2868
2874
|
return this.error(500, e);
|
|
2869
2875
|
},
|
|
2870
2876
|
fetchError(e) {
|
|
2871
|
-
return this.error(
|
|
2877
|
+
return this.error(Er, e);
|
|
2872
2878
|
}
|
|
2873
2879
|
}, v = c.reduce((e, t) => ({
|
|
2874
2880
|
...e,
|
|
2875
2881
|
...typeof t.resolver == "function" ? t.resolver(e) : t.resolver
|
|
2876
2882
|
}), _);
|
|
2877
2883
|
return o.reduce((t, n) => n(t, e), v);
|
|
2878
|
-
},
|
|
2884
|
+
}, Rr = {
|
|
2879
2885
|
_url: "",
|
|
2880
2886
|
_options: {},
|
|
2881
|
-
_config:
|
|
2887
|
+
_config: jr,
|
|
2882
2888
|
_catchers: /* @__PURE__ */ new Map(),
|
|
2883
2889
|
_resolvers: [],
|
|
2884
2890
|
_deferred: [],
|
|
@@ -2905,7 +2911,7 @@ var Pr = (e) => (t) => e.reduceRight((e, t) => t(e), t) || t, Fr = class extends
|
|
|
2905
2911
|
...this,
|
|
2906
2912
|
_config: {
|
|
2907
2913
|
...this._config,
|
|
2908
|
-
polyfills: t ? e :
|
|
2914
|
+
polyfills: t ? e : Ar(this._config.polyfills, e)
|
|
2909
2915
|
}
|
|
2910
2916
|
};
|
|
2911
2917
|
},
|
|
@@ -2923,21 +2929,21 @@ var Pr = (e) => (t) => e.reduceRight((e, t) => t(e), t) || t, Fr = class extends
|
|
|
2923
2929
|
options(e, t = !1) {
|
|
2924
2930
|
return {
|
|
2925
2931
|
...this,
|
|
2926
|
-
_options: t ? e :
|
|
2932
|
+
_options: t ? e : Ar(this._options, e)
|
|
2927
2933
|
};
|
|
2928
2934
|
},
|
|
2929
2935
|
headers(e) {
|
|
2930
2936
|
let t = e ? Array.isArray(e) ? Object.fromEntries(e) : "entries" in e ? Object.fromEntries(e.entries()) : e : {};
|
|
2931
2937
|
return {
|
|
2932
2938
|
...this,
|
|
2933
|
-
_options:
|
|
2939
|
+
_options: Ar(this._options, { headers: t })
|
|
2934
2940
|
};
|
|
2935
2941
|
},
|
|
2936
2942
|
accept(e) {
|
|
2937
2943
|
return this.headers({ Accept: e });
|
|
2938
2944
|
},
|
|
2939
2945
|
content(e) {
|
|
2940
|
-
return this.headers({ [
|
|
2946
|
+
return this.headers({ [Tr]: e });
|
|
2941
2947
|
},
|
|
2942
2948
|
auth(e) {
|
|
2943
2949
|
return this.headers({ Authorization: e });
|
|
@@ -2950,7 +2956,7 @@ var Pr = (e) => (t) => e.reduceRight((e, t) => t(e), t) || t, Fr = class extends
|
|
|
2950
2956
|
};
|
|
2951
2957
|
},
|
|
2952
2958
|
catcherFallback(e) {
|
|
2953
|
-
return this.catcher(
|
|
2959
|
+
return this.catcher(Dr, e);
|
|
2954
2960
|
},
|
|
2955
2961
|
resolve(e, t = !1) {
|
|
2956
2962
|
return {
|
|
@@ -2971,8 +2977,8 @@ var Pr = (e) => (t) => e.reduceRight((e, t) => t(e), t) || t, Fr = class extends
|
|
|
2971
2977
|
};
|
|
2972
2978
|
},
|
|
2973
2979
|
fetch(e = this._options.method, t = "", n = null) {
|
|
2974
|
-
let r = this.url(t).options({ method: e }), i =
|
|
2975
|
-
return r = n ? o ? r.json(n, i) : r.body(n) : r,
|
|
2980
|
+
let r = this.url(t).options({ method: e }), i = Or(r._options.headers), a = this._config.polyfill("FormData", !1), o = typeof n == "object" && !(a && n instanceof a) && (!r._options.headers || !i || kr(i));
|
|
2981
|
+
return r = n ? o ? r.json(n, i) : r.body(n) : r, Lr(r._deferred.reduce((e, t) => t(e, e._url, e._options), r));
|
|
2976
2982
|
},
|
|
2977
2983
|
get(e = "") {
|
|
2978
2984
|
return this.fetch("GET", e);
|
|
@@ -3005,19 +3011,19 @@ var Pr = (e) => (t) => e.reduceRight((e, t) => t(e), t) || t, Fr = class extends
|
|
|
3005
3011
|
};
|
|
3006
3012
|
},
|
|
3007
3013
|
json(e, t) {
|
|
3008
|
-
let n =
|
|
3009
|
-
return this.content(t ||
|
|
3014
|
+
let n = Or(this._options.headers);
|
|
3015
|
+
return this.content(t || kr(n) && n || wr).body(JSON.stringify(e));
|
|
3010
3016
|
}
|
|
3011
3017
|
};
|
|
3012
|
-
function
|
|
3018
|
+
function zr(e = "", t = {}) {
|
|
3013
3019
|
return {
|
|
3014
|
-
...
|
|
3020
|
+
...Rr,
|
|
3015
3021
|
_url: e,
|
|
3016
3022
|
_options: t
|
|
3017
3023
|
};
|
|
3018
3024
|
}
|
|
3019
|
-
|
|
3020
|
-
var
|
|
3025
|
+
zr.default = zr, zr.options = Mr, zr.errorType = Pr, zr.polyfills = Nr, zr.WretchError = Ir;
|
|
3026
|
+
var Br = (e, t) => t.skipDedupe || t.method !== "GET", Vr = (e, t) => t.method + "@" + e, Hr = (e) => e.clone(), Ur = ({ skip: e = Br, key: t = Vr, resolver: n = Hr } = {}) => {
|
|
3021
3027
|
let r = /* @__PURE__ */ new Map();
|
|
3022
3028
|
return (i) => (a, o) => {
|
|
3023
3029
|
if (e(a, o)) return i(a, o);
|
|
@@ -3034,7 +3040,7 @@ var zr = (e, t) => t.skipDedupe || t.method !== "GET", Br = (e, t) => t.method +
|
|
|
3034
3040
|
return r.delete(s), Promise.reject(e);
|
|
3035
3041
|
}
|
|
3036
3042
|
};
|
|
3037
|
-
},
|
|
3043
|
+
}, Wr = (e, t) => t.skipCache || t.method !== "GET", Gr = (e, t) => t.method + "@" + e, Kr = () => !1, qr = () => null, Jr = (e) => e.ok, Yr = ({ throttle: e = 1e3, skip: t = Wr, key: n = Gr, clear: r = Kr, invalidate: i = qr, condition: a = Jr, flagResponseOnCacheHit: o = "__cached" } = {}) => {
|
|
3038
3044
|
let s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Set(), u = (t) => {
|
|
3039
3045
|
e && !l.has(t) && (l.add(t), setTimeout(() => {
|
|
3040
3046
|
l.delete(t);
|
|
@@ -3064,7 +3070,7 @@ var zr = (e, t) => t.skipDedupe || t.method !== "GET", Br = (e, t) => t.method +
|
|
|
3064
3070
|
return d.cacheResponse = function(e, t) {
|
|
3065
3071
|
u(e), s.set(e, t);
|
|
3066
3072
|
}, d.cache = s, d.inflight = c, d.throttling = l, d;
|
|
3067
|
-
},
|
|
3073
|
+
}, Xr = (e, t) => e * t, Zr = (e) => e && e.ok, Qr = ({ delayTimer: e = 500, delayRamp: t = Xr, maxAttempts: n = 10, until: r = Zr, onRetry: i = null, retryOnNetworkError: a = !1, resolveWithLatestResponse: o = !1, skip: s } = {}) => (c) => (l, u) => {
|
|
3068
3074
|
let d = 0;
|
|
3069
3075
|
if (s && s(l, u)) return c(l, u);
|
|
3070
3076
|
let f = (s, p) => Promise.resolve(r(s, p)).then((r) => r ? s && o ? s : p ? Promise.reject(p) : s : (d++, !n || d <= n ? new Promise((n) => {
|
|
@@ -3087,7 +3093,7 @@ var zr = (e, t) => t.skipDedupe || t.method !== "GET", Br = (e, t) => t.method +
|
|
|
3087
3093
|
if (!a) throw e;
|
|
3088
3094
|
return f(null, e);
|
|
3089
3095
|
});
|
|
3090
|
-
},
|
|
3096
|
+
}, $r = "@sesamy/sdk", ei = "1.32.0", ti = class {
|
|
3091
3097
|
cache = /* @__PURE__ */ new Map();
|
|
3092
3098
|
get(e) {
|
|
3093
3099
|
return this.cache.get(e) || null;
|
|
@@ -3101,12 +3107,12 @@ var zr = (e, t) => t.skipDedupe || t.method !== "GET", Br = (e, t) => t.method +
|
|
|
3101
3107
|
clear() {
|
|
3102
3108
|
this.cache.clear();
|
|
3103
3109
|
}
|
|
3104
|
-
},
|
|
3105
|
-
let { libraryName: t =
|
|
3110
|
+
}, ni = "sesamyCacheTimestamp", ri = (e) => {
|
|
3111
|
+
let { libraryName: t = $r, libraryVersion: n = ei, cache: r } = e, i = r?.storage || new ti(), a = [
|
|
3106
3112
|
(e) => async (t, n) => {
|
|
3107
|
-
if (r?.mode ===
|
|
3113
|
+
if (r?.mode === Cr.BROWSER) {
|
|
3108
3114
|
let r;
|
|
3109
|
-
return typeof sessionStorage < "u" ? (r = sessionStorage.getItem(
|
|
3115
|
+
return typeof sessionStorage < "u" ? (r = sessionStorage.getItem(ni), r || (r = Date.now().toString(), sessionStorage.setItem(ni, r))) : (r = i.get(ni), r || (r = Date.now().toString(), i.set(ni, r))), e(t, {
|
|
3110
3116
|
...n,
|
|
3111
3117
|
headers: {
|
|
3112
3118
|
...n.headers,
|
|
@@ -3129,19 +3135,19 @@ var zr = (e, t) => t.skipDedupe || t.method !== "GET", Br = (e, t) => t.method +
|
|
|
3129
3135
|
}
|
|
3130
3136
|
});
|
|
3131
3137
|
},
|
|
3132
|
-
|
|
3138
|
+
Ur()
|
|
3133
3139
|
];
|
|
3134
|
-
r?.mode ===
|
|
3140
|
+
r?.mode === Cr.NORMAL && a.push(Yr({
|
|
3135
3141
|
throttle: 300 * 1e3,
|
|
3136
3142
|
skip: (e, t) => t.method !== "GET"
|
|
3137
|
-
})), a.push(
|
|
3143
|
+
})), a.push(Qr({
|
|
3138
3144
|
delayTimer: 1e3,
|
|
3139
3145
|
delayRamp: (e, t) => e * t,
|
|
3140
3146
|
maxAttempts: 3,
|
|
3141
3147
|
until: (e) => !!(e && (e.ok || e.status >= 400 && e.status < 500)),
|
|
3142
3148
|
retryOnNetworkError: !1
|
|
3143
3149
|
}));
|
|
3144
|
-
let o =
|
|
3150
|
+
let o = zr(e.baseUrl).headers({
|
|
3145
3151
|
"X-Sesamy-Client": `${t}/${n}`,
|
|
3146
3152
|
...e.headers
|
|
3147
3153
|
}).middlewares(a);
|
|
@@ -3178,19 +3184,19 @@ var zr = (e, t) => t.skipDedupe || t.method !== "GET", Br = (e, t) => t.method +
|
|
|
3178
3184
|
"patch",
|
|
3179
3185
|
"put",
|
|
3180
3186
|
"delete"
|
|
3181
|
-
].includes(i) &&
|
|
3187
|
+
].includes(i) && ii(), s.status === 204) return null;
|
|
3182
3188
|
if (!s.ok) {
|
|
3183
3189
|
let e = await s.text().catch(() => "Unknown error");
|
|
3184
|
-
throw new
|
|
3190
|
+
throw new Sr(s.status, s.statusText, s.url, `API Error ${s.status}: ${e}`, e);
|
|
3185
3191
|
}
|
|
3186
3192
|
return await s.json();
|
|
3187
3193
|
} catch (n) {
|
|
3188
|
-
if (n instanceof
|
|
3194
|
+
if (n instanceof Sr) throw n;
|
|
3189
3195
|
let r = n.status || 500;
|
|
3190
|
-
throw new
|
|
3196
|
+
throw new Sr(r, n.message || "Unknown error", `${e.baseUrl}${t}`, `API Error ${r}: ${n.message || "Unknown error"}`, n.message || "Unknown error");
|
|
3191
3197
|
}
|
|
3192
3198
|
} };
|
|
3193
|
-
},
|
|
3199
|
+
}, ii = () => (typeof sessionStorage < "u" && sessionStorage.removeItem(ni), "Cache cleared"), ai = {
|
|
3194
3200
|
get: async (e, t) => e.request(`/profile/${t}`),
|
|
3195
3201
|
update: async (e, t, n) => e.request(`/profile/${t}`, {
|
|
3196
3202
|
method: "PATCH",
|
|
@@ -3201,7 +3207,7 @@ var zr = (e, t) => t.skipDedupe || t.method !== "GET", Br = (e, t) => t.method +
|
|
|
3201
3207
|
delete: async (e) => {
|
|
3202
3208
|
await e.request("/profile", { method: "DELETE" });
|
|
3203
3209
|
}
|
|
3204
|
-
},
|
|
3210
|
+
}, oi = {
|
|
3205
3211
|
list: async (e, t) => {
|
|
3206
3212
|
let n = new URLSearchParams();
|
|
3207
3213
|
t?.type && n.append("type", t.type), t?.sku && n.append("sku", t.sku), t?.purchaseOptionId && n.append("purchase-option-id", t.purchaseOptionId), t?.waitForEntitlementAfter && n.append("wait-for-entitlement-after", t.waitForEntitlementAfter);
|
|
@@ -3210,20 +3216,20 @@ var zr = (e, t) => t.skipDedupe || t.method !== "GET", Br = (e, t) => t.method +
|
|
|
3210
3216
|
},
|
|
3211
3217
|
get: async (e, t) => e.request(`/entitlements/${t}`),
|
|
3212
3218
|
getAccess: async (e, t) => e.request(`/entitlements/${t}/access`)
|
|
3213
|
-
},
|
|
3219
|
+
}, si = {
|
|
3214
3220
|
list: async (e) => e.request("/subscriptions"),
|
|
3215
3221
|
get: async (e, t) => e.request(`/subscriptions/${t}`)
|
|
3216
|
-
},
|
|
3222
|
+
}, ci = {
|
|
3217
3223
|
get: async (e, t) => e.request(`/products/${t}`),
|
|
3218
3224
|
autoOnboard: async (e, t) => e.request(`/products/${t}/auto-onboard`, { method: "POST" })
|
|
3219
|
-
},
|
|
3225
|
+
}, li = (e, t) => {
|
|
3220
3226
|
if (!e || !t) return e;
|
|
3221
3227
|
let n = new URL(e);
|
|
3222
3228
|
return n.hash = `access_token=${t}`, n.toString();
|
|
3223
|
-
},
|
|
3229
|
+
}, ui = (e, t) => !e.manageUrl || !t ? e : {
|
|
3224
3230
|
...e,
|
|
3225
|
-
manageUrl:
|
|
3226
|
-
},
|
|
3231
|
+
manageUrl: li(e.manageUrl, t)
|
|
3232
|
+
}, di = {
|
|
3227
3233
|
list: async (e) => e.request("/contracts"),
|
|
3228
3234
|
get: async (e, t) => e.request(`/contracts/${t}`),
|
|
3229
3235
|
cancel: async (e, t, n) => e.request(`/contracts/${t}/cancel`, {
|
|
@@ -3235,7 +3241,7 @@ var zr = (e, t) => t.skipDedupe || t.method !== "GET", Br = (e, t) => t.method +
|
|
|
3235
3241
|
body: JSON.stringify(n)
|
|
3236
3242
|
}),
|
|
3237
3243
|
confirmAmendment: async (e, t, n) => e.request(`/contracts/${t}/amendments/${n}/confirm`, { method: "POST" })
|
|
3238
|
-
},
|
|
3244
|
+
}, fi = {
|
|
3239
3245
|
get: async (e) => e.request("/user-metadata"),
|
|
3240
3246
|
set: async (e, t, n) => {
|
|
3241
3247
|
await e.request(`/user-metadata/${t}`, {
|
|
@@ -3246,7 +3252,7 @@ var zr = (e, t) => t.skipDedupe || t.method !== "GET", Br = (e, t) => t.method +
|
|
|
3246
3252
|
delete: async (e, t) => {
|
|
3247
3253
|
await e.request(`/user-metadata/${t}`, { method: "DELETE" });
|
|
3248
3254
|
}
|
|
3249
|
-
},
|
|
3255
|
+
}, pi = {
|
|
3250
3256
|
list: async (e) => e.request("/tallies"),
|
|
3251
3257
|
get: async (e, t) => e.request(`/tallies/${t}`),
|
|
3252
3258
|
update: async (e, t, n) => e.request(`/tallies/${t}`, {
|
|
@@ -3268,7 +3274,7 @@ var zr = (e, t) => t.skipDedupe || t.method !== "GET", Br = (e, t) => t.method +
|
|
|
3268
3274
|
method: "POST",
|
|
3269
3275
|
body: JSON.stringify(n)
|
|
3270
3276
|
})
|
|
3271
|
-
},
|
|
3277
|
+
}, mi = {
|
|
3272
3278
|
list: async (e) => e.request("/tags"),
|
|
3273
3279
|
add: async (e, t) => {
|
|
3274
3280
|
await e.request("/tags", {
|
|
@@ -3279,7 +3285,7 @@ var zr = (e, t) => t.skipDedupe || t.method !== "GET", Br = (e, t) => t.method +
|
|
|
3279
3285
|
remove: async (e, t) => {
|
|
3280
3286
|
await e.request(`/tags/${t}`, { method: "DELETE" });
|
|
3281
3287
|
}
|
|
3282
|
-
},
|
|
3288
|
+
}, hi = {
|
|
3283
3289
|
generateCheckoutLink: (e, t) => {
|
|
3284
3290
|
let n = new URL(`${e.apiUrl}/checkouts`);
|
|
3285
3291
|
return t.items && n.searchParams.set("items", JSON.stringify(t.items)), t.email && n.searchParams.set("email", t.email), t.language && n.searchParams.set("lang", t.language), t.redirectUrl && n.searchParams.set("redirect-url", t.redirectUrl), t.giftMode && n.searchParams.set("gift-mode", "true"), t.payerEmail && n.searchParams.set("payer-email", t.payerEmail), t.requireAddress && n.searchParams.set("require-address", "true"), t.metadata && Object.entries(t.metadata).forEach(([e, t]) => {
|
|
@@ -3302,7 +3308,7 @@ var zr = (e, t) => t.skipDedupe || t.method !== "GET", Br = (e, t) => t.method +
|
|
|
3302
3308
|
let n = t.language || "en", r = new URL(`${e.baseUrl}/consume/${encodeURIComponent(n)}/@${encodeURIComponent(e.clientId)}/${encodeURIComponent(t.sku)}`);
|
|
3303
3309
|
return t.episodeId ? r.href += `/${encodeURIComponent(t.episodeId)}` : r.href += "/listen", r.searchParams.set("sesamy-redirect-url", t.redirectUrl || "/"), r.toString();
|
|
3304
3310
|
}
|
|
3305
|
-
},
|
|
3311
|
+
}, gi = {
|
|
3306
3312
|
generateLink: (e, t) => {
|
|
3307
3313
|
let n = new URL(`${e.apiUrl}/checkouts`);
|
|
3308
3314
|
return t.items && n.searchParams.set("items", JSON.stringify(t.items)), t.email && n.searchParams.set("email", t.email), t.language && n.searchParams.set("lang", t.language), t.redirectUrl && n.searchParams.set("redirect-url", t.redirectUrl), t.giftMode && n.searchParams.set("gift-mode", "true"), t.payerEmail && n.searchParams.set("payer-email", t.payerEmail), t.requireAddress && n.searchParams.set("require-address", "true"), t.metadata && Object.entries(t.metadata).forEach(([e, t]) => {
|
|
@@ -3318,16 +3324,16 @@ var zr = (e, t) => t.skipDedupe || t.method !== "GET", Br = (e, t) => t.method +
|
|
|
3318
3324
|
method: "PATCH",
|
|
3319
3325
|
body: JSON.stringify(n)
|
|
3320
3326
|
})
|
|
3321
|
-
},
|
|
3327
|
+
}, _i = {
|
|
3322
3328
|
list: async (e) => e.request("/bills"),
|
|
3323
3329
|
get: async (e, t) => e.request(`/bills/${t}`)
|
|
3324
|
-
},
|
|
3330
|
+
}, vi = {
|
|
3325
3331
|
list: async (e) => e.request("/fulfillments"),
|
|
3326
3332
|
create: async (e, t) => e.request("/fulfillments", {
|
|
3327
3333
|
method: "POST",
|
|
3328
3334
|
body: JSON.stringify(t)
|
|
3329
3335
|
})
|
|
3330
|
-
},
|
|
3336
|
+
}, yi = {
|
|
3331
3337
|
get: async (e, t) => {
|
|
3332
3338
|
try {
|
|
3333
3339
|
return new URL(t), e.request(t);
|
|
@@ -3335,116 +3341,121 @@ var zr = (e, t) => t.skipDedupe || t.method !== "GET", Br = (e, t) => t.method +
|
|
|
3335
3341
|
return e.request(`/paywalls/${t}`);
|
|
3336
3342
|
}
|
|
3337
3343
|
},
|
|
3338
|
-
checkAccess: async (e, t, n) => e.request(`/paywalls/${encodeURIComponent(t)}/access`, {
|
|
3344
|
+
checkAccess: async (e, t, n) => e.request(`/paywalls/${encodeURIComponent(t)}/access/check`, {
|
|
3345
|
+
method: "POST",
|
|
3346
|
+
body: JSON.stringify(n)
|
|
3347
|
+
}),
|
|
3348
|
+
registerAccess: async (e, t, n) => e.request(`/paywalls/${encodeURIComponent(t)}/access`, {
|
|
3339
3349
|
method: "POST",
|
|
3340
3350
|
body: JSON.stringify(n)
|
|
3341
3351
|
})
|
|
3342
|
-
},
|
|
3352
|
+
}, bi = { list: async (e) => e.request("/payment-issues") }, xi = { content: async (e, t, n, r, i) => {
|
|
3343
3353
|
let a = new URLSearchParams({ url: t });
|
|
3344
3354
|
return n && a.append("selector", n), r && a.append("cache", r), e.request(`/proxy?${a.toString()}`, i);
|
|
3345
|
-
} },
|
|
3355
|
+
} }, Si = { list: async (e, t) => {
|
|
3346
3356
|
let n = (t ? new URLSearchParams({ q: t }) : new URLSearchParams()).toString(), r = n ? `/transactions?${n}` : "/transactions";
|
|
3347
3357
|
return e.request(r);
|
|
3348
|
-
} },
|
|
3358
|
+
} }, Ci = {
|
|
3349
3359
|
get: async (e) => e.request("/vendor"),
|
|
3350
3360
|
list: async (e) => e.request("/vendors")
|
|
3351
|
-
},
|
|
3352
|
-
let t =
|
|
3361
|
+
}, wi = (e) => {
|
|
3362
|
+
let t = ri(e);
|
|
3353
3363
|
return {
|
|
3354
3364
|
profile: {
|
|
3355
|
-
get: (e) =>
|
|
3356
|
-
update: (e, n) =>
|
|
3357
|
-
checkSpotifyLink: () =>
|
|
3358
|
-
unlinkSpotify: () =>
|
|
3359
|
-
delete: () =>
|
|
3365
|
+
get: (e) => ai.get(t, e),
|
|
3366
|
+
update: (e, n) => ai.update(t, e, n),
|
|
3367
|
+
checkSpotifyLink: () => ai.checkSpotifyLink(t),
|
|
3368
|
+
unlinkSpotify: () => ai.unlinkSpotify(t),
|
|
3369
|
+
delete: () => ai.delete(t)
|
|
3360
3370
|
},
|
|
3361
3371
|
entitlements: {
|
|
3362
|
-
list: (e) =>
|
|
3363
|
-
get: (e) =>
|
|
3364
|
-
getAccess: (e) =>
|
|
3372
|
+
list: (e) => oi.list(t, e),
|
|
3373
|
+
get: (e) => oi.get(t, e),
|
|
3374
|
+
getAccess: (e) => oi.getAccess(t, e)
|
|
3365
3375
|
},
|
|
3366
3376
|
subscriptions: {
|
|
3367
|
-
list: () =>
|
|
3368
|
-
get: (e) =>
|
|
3377
|
+
list: () => si.list(t),
|
|
3378
|
+
get: (e) => si.get(t, e)
|
|
3369
3379
|
},
|
|
3370
3380
|
products: {
|
|
3371
|
-
get: (e) =>
|
|
3372
|
-
autoOnboard: (e) =>
|
|
3381
|
+
get: (e) => ci.get(t, e),
|
|
3382
|
+
autoOnboard: (e) => ci.autoOnboard(t, e)
|
|
3373
3383
|
},
|
|
3374
3384
|
contracts: {
|
|
3375
3385
|
list: async () => {
|
|
3376
|
-
let n = await
|
|
3386
|
+
let n = await di.list(t), r = await e.tokenProvider();
|
|
3377
3387
|
if (!r || !r.toLowerCase().startsWith("bearer ")) return n;
|
|
3378
3388
|
let i = r.substring(7);
|
|
3379
|
-
return n.map((e) =>
|
|
3389
|
+
return n.map((e) => ui(e, i));
|
|
3380
3390
|
},
|
|
3381
3391
|
get: async (n) => {
|
|
3382
|
-
let r = await
|
|
3383
|
-
return !i || !i.toLowerCase().startsWith("bearer ") ? r :
|
|
3392
|
+
let r = await di.get(t, n), i = await e.tokenProvider();
|
|
3393
|
+
return !i || !i.toLowerCase().startsWith("bearer ") ? r : ui(r, i.substring(7));
|
|
3384
3394
|
},
|
|
3385
|
-
cancel: (e, n) =>
|
|
3386
|
-
createAmendment: (e, n) =>
|
|
3387
|
-
confirmAmendment: (e, n) =>
|
|
3395
|
+
cancel: (e, n) => di.cancel(t, e, n),
|
|
3396
|
+
createAmendment: (e, n) => di.createAmendment(t, e, n),
|
|
3397
|
+
confirmAmendment: (e, n) => di.confirmAmendment(t, e, n)
|
|
3388
3398
|
},
|
|
3389
3399
|
userMetadata: {
|
|
3390
|
-
get: () =>
|
|
3391
|
-
set: (e, n) =>
|
|
3392
|
-
delete: (e) =>
|
|
3400
|
+
get: () => fi.get(t),
|
|
3401
|
+
set: (e, n) => fi.set(t, e, n),
|
|
3402
|
+
delete: (e) => fi.delete(t, e)
|
|
3393
3403
|
},
|
|
3394
3404
|
tallies: {
|
|
3395
|
-
list: () =>
|
|
3396
|
-
get: (e) =>
|
|
3397
|
-
update: (e, n) =>
|
|
3398
|
-
create: (e) =>
|
|
3399
|
-
delete: (e) =>
|
|
3400
|
-
push: (e, n) =>
|
|
3405
|
+
list: () => pi.list(t),
|
|
3406
|
+
get: (e) => pi.get(t, e),
|
|
3407
|
+
update: (e, n) => pi.update(t, e, n),
|
|
3408
|
+
create: (e) => pi.create(t, e),
|
|
3409
|
+
delete: (e) => pi.delete(t, e),
|
|
3410
|
+
push: (e, n) => pi.push(t, e, n)
|
|
3401
3411
|
},
|
|
3402
3412
|
tags: {
|
|
3403
|
-
list: () =>
|
|
3404
|
-
add: (e) =>
|
|
3405
|
-
remove: (e) =>
|
|
3413
|
+
list: () => mi.list(t),
|
|
3414
|
+
add: (e) => mi.add(t, e),
|
|
3415
|
+
remove: (e) => mi.remove(t, e)
|
|
3406
3416
|
},
|
|
3407
3417
|
checkouts: {
|
|
3408
|
-
generateLink: (e, t) =>
|
|
3409
|
-
create: (e) =>
|
|
3410
|
-
get: (e) =>
|
|
3411
|
-
update: (e, n) =>
|
|
3418
|
+
generateLink: (e, t) => hi.generateCheckoutLink(e, t),
|
|
3419
|
+
create: (e) => gi.create(t, e),
|
|
3420
|
+
get: (e) => gi.get(t, e),
|
|
3421
|
+
update: (e, n) => gi.update(t, e, n)
|
|
3412
3422
|
},
|
|
3413
3423
|
links: {
|
|
3414
|
-
generateCheckoutLink: (e, t) =>
|
|
3415
|
-
generateAccountLink: (e, t) =>
|
|
3416
|
-
generateChangePaymentLink: (e, t) =>
|
|
3417
|
-
generateChangePlanLink: (e, t) =>
|
|
3418
|
-
generateConsumeLink: (e, t) =>
|
|
3424
|
+
generateCheckoutLink: (e, t) => hi.generateCheckoutLink(e, t),
|
|
3425
|
+
generateAccountLink: (e, t) => hi.generateAccountLink(e, t),
|
|
3426
|
+
generateChangePaymentLink: (e, t) => hi.generateChangePaymentLink(e, t),
|
|
3427
|
+
generateChangePlanLink: (e, t) => hi.generateChangePlanLink(e, t),
|
|
3428
|
+
generateConsumeLink: (e, t) => hi.generateConsumeLink(e, t)
|
|
3419
3429
|
},
|
|
3420
3430
|
bills: {
|
|
3421
|
-
list: () =>
|
|
3422
|
-
get: (e) =>
|
|
3431
|
+
list: () => _i.list(t),
|
|
3432
|
+
get: (e) => _i.get(t, e)
|
|
3423
3433
|
},
|
|
3424
3434
|
fulfillments: {
|
|
3425
|
-
list: () =>
|
|
3426
|
-
create: (e) =>
|
|
3435
|
+
list: () => vi.list(t),
|
|
3436
|
+
create: (e) => vi.create(t, e)
|
|
3427
3437
|
},
|
|
3428
3438
|
paywalls: {
|
|
3429
|
-
get: (e) =>
|
|
3430
|
-
checkAccess: (e, n) =>
|
|
3439
|
+
get: (e) => yi.get(t, e),
|
|
3440
|
+
checkAccess: (e, n) => yi.checkAccess(t, e, n),
|
|
3441
|
+
registerAccess: (e, n) => yi.registerAccess(t, e, n)
|
|
3431
3442
|
},
|
|
3432
|
-
paymentIssues: { list: () =>
|
|
3433
|
-
proxy: { content: (e, n, r, i) =>
|
|
3434
|
-
transactions: { list: (e) =>
|
|
3443
|
+
paymentIssues: { list: () => bi.list(t) },
|
|
3444
|
+
proxy: { content: (e, n, r, i) => xi.content(t, e, n, r, i) },
|
|
3445
|
+
transactions: { list: (e) => Si.list(t, e) },
|
|
3435
3446
|
vendor: {
|
|
3436
|
-
get: () =>
|
|
3437
|
-
list: () =>
|
|
3447
|
+
get: () => Ci.get(t),
|
|
3448
|
+
list: () => Ci.list(t)
|
|
3438
3449
|
}
|
|
3439
3450
|
};
|
|
3440
|
-
},
|
|
3441
|
-
function
|
|
3451
|
+
}, Ti = "sesamy.com", Ei = "sesamy.dev", Di = "https://sesa.my", Oi = "sesamyCacheTimestamp", ki = "sesamyContentReloaded", Ai = /* @__PURE__ */ "co.uk,com.au,co.nz,co.za,com.br,co.jp,gov.uk,ac.uk,org.uk,net.uk,com.sg,com.my,co.in,co.id,co.th,co.kr,com.mx,com.ar,com.co,com.pe,com.ph,com.pk,com.sa,com.eg,com.ng,co.ke,co.tz,co.zw,co.bw,co.mz,gov.au,edu.au,org.au,net.au,asn.au,id.au".split(",");
|
|
3452
|
+
function ji(e) {
|
|
3442
3453
|
try {
|
|
3443
3454
|
let t = new URL(e).hostname;
|
|
3444
3455
|
if (t.startsWith("[") || /^\d{1,3}(\.\d{1,3}){3}$/.test(t)) return t;
|
|
3445
3456
|
let n = t.split(".");
|
|
3446
3457
|
if (n.length <= 1) return t;
|
|
3447
|
-
for (let e of
|
|
3458
|
+
for (let e of Ai) if (t.endsWith(`.${e}`)) {
|
|
3448
3459
|
let t = e.split(".").length + 1;
|
|
3449
3460
|
return n.slice(-t).join(".");
|
|
3450
3461
|
}
|
|
@@ -3455,7 +3466,7 @@ function Ai(e) {
|
|
|
3455
3466
|
}
|
|
3456
3467
|
//#endregion
|
|
3457
3468
|
//#region src/types/Cache.ts
|
|
3458
|
-
var
|
|
3469
|
+
var Mi = class {
|
|
3459
3470
|
get(e) {
|
|
3460
3471
|
return typeof sessionStorage > "u" ? null : sessionStorage.getItem(e);
|
|
3461
3472
|
}
|
|
@@ -3469,21 +3480,21 @@ var ji = class {
|
|
|
3469
3480
|
};
|
|
3470
3481
|
//#endregion
|
|
3471
3482
|
//#region src/services/config/index.ts
|
|
3472
|
-
function Mi(e, t) {
|
|
3473
|
-
return `${e}.${t === "dev" ? Ti : wi}`;
|
|
3474
|
-
}
|
|
3475
3483
|
function Ni(e, t) {
|
|
3476
|
-
return
|
|
3484
|
+
return `${e}.${t === "dev" ? Ei : Ti}`;
|
|
3485
|
+
}
|
|
3486
|
+
function Pi(e, t) {
|
|
3487
|
+
return `https://${Ni(e, t)}`;
|
|
3477
3488
|
}
|
|
3478
3489
|
//#endregion
|
|
3479
3490
|
//#region src/utils/language.ts
|
|
3480
|
-
function
|
|
3491
|
+
function Fi() {
|
|
3481
3492
|
let e = (document.documentElement.getAttribute("lang") ?? navigator.language ?? "en").split("-")[0]?.toLowerCase() ?? "en";
|
|
3482
3493
|
return e === "nn" && (e = "nb"), e;
|
|
3483
3494
|
}
|
|
3484
3495
|
//#endregion
|
|
3485
3496
|
//#region src/utils/links.ts
|
|
3486
|
-
function
|
|
3497
|
+
function Ii(e) {
|
|
3487
3498
|
let t;
|
|
3488
3499
|
try {
|
|
3489
3500
|
t = new URL(e);
|
|
@@ -3492,8 +3503,8 @@ function Fi(e) {
|
|
|
3492
3503
|
}
|
|
3493
3504
|
return t.protocol === "http:" || t.protocol === "https:";
|
|
3494
3505
|
}
|
|
3495
|
-
function
|
|
3496
|
-
if (
|
|
3506
|
+
function Li(e, t) {
|
|
3507
|
+
if (Ii(e)) return { itemSrc: e };
|
|
3497
3508
|
let n = e.split(":");
|
|
3498
3509
|
if (n.length < 2) throw Error(`Invalid itemSrc format: expected at least 2 segments separated by ':', got ${n.length}`);
|
|
3499
3510
|
let [r, i, a] = n;
|
|
@@ -3503,17 +3514,17 @@ function Ii(e, t) {
|
|
|
3503
3514
|
purchaseOption: t || a
|
|
3504
3515
|
};
|
|
3505
3516
|
}
|
|
3506
|
-
function
|
|
3517
|
+
function Ri(e) {
|
|
3507
3518
|
return e.endsWith("/") ? e.slice(0, -1) : e;
|
|
3508
3519
|
}
|
|
3509
|
-
function
|
|
3510
|
-
if (!
|
|
3520
|
+
function zi(e, t) {
|
|
3521
|
+
if (!Ii(e) || !Ii(t)) return !1;
|
|
3511
3522
|
let n = new URL(e), r = new URL(t);
|
|
3512
|
-
return n.origin === r.origin &&
|
|
3523
|
+
return n.origin === r.origin && Ri(n.pathname) === Ri(r.pathname);
|
|
3513
3524
|
}
|
|
3514
3525
|
//#endregion
|
|
3515
3526
|
//#region src/services/consent/cmp-adapters.ts
|
|
3516
|
-
function
|
|
3527
|
+
function Bi(e) {
|
|
3517
3528
|
let t = window.Cookiebot;
|
|
3518
3529
|
t?.consent && e({
|
|
3519
3530
|
statistics: !!t.consent.statistics,
|
|
@@ -3528,25 +3539,25 @@ function zi(e) {
|
|
|
3528
3539
|
};
|
|
3529
3540
|
window.addEventListener("CookiebotOnAccept", n), window.addEventListener("CookiebotOnDecline", n);
|
|
3530
3541
|
}
|
|
3531
|
-
function
|
|
3542
|
+
function Vi() {
|
|
3532
3543
|
return window.Cookiebot !== void 0;
|
|
3533
3544
|
}
|
|
3534
|
-
function
|
|
3545
|
+
function Hi() {
|
|
3535
3546
|
let e = window.OptanonActiveGroups || "";
|
|
3536
3547
|
return {
|
|
3537
3548
|
statistics: e.includes("C0002"),
|
|
3538
3549
|
marketing: e.includes("C0004")
|
|
3539
3550
|
};
|
|
3540
3551
|
}
|
|
3541
|
-
function
|
|
3542
|
-
e(
|
|
3543
|
-
e(
|
|
3552
|
+
function Ui(e) {
|
|
3553
|
+
e(Hi()), window.addEventListener("OneTrustGroupsUpdated", () => {
|
|
3554
|
+
e(Hi());
|
|
3544
3555
|
});
|
|
3545
3556
|
}
|
|
3546
|
-
function
|
|
3557
|
+
function Wi() {
|
|
3547
3558
|
return window.OneTrust !== void 0;
|
|
3548
3559
|
}
|
|
3549
|
-
function
|
|
3560
|
+
function Gi() {
|
|
3550
3561
|
let e = window.dataLayer;
|
|
3551
3562
|
if (!e) return null;
|
|
3552
3563
|
for (let t = e.length - 1; t >= 0; t--) {
|
|
@@ -3561,8 +3572,8 @@ function Wi() {
|
|
|
3561
3572
|
}
|
|
3562
3573
|
return null;
|
|
3563
3574
|
}
|
|
3564
|
-
function
|
|
3565
|
-
let t =
|
|
3575
|
+
function Ki(e) {
|
|
3576
|
+
let t = Gi();
|
|
3566
3577
|
t && e(t);
|
|
3567
3578
|
let n = window.dataLayer ??= [], r = n.push.bind(n);
|
|
3568
3579
|
n.push = (...t) => {
|
|
@@ -3577,46 +3588,46 @@ function Gi(e) {
|
|
|
3577
3588
|
return n;
|
|
3578
3589
|
};
|
|
3579
3590
|
}
|
|
3580
|
-
function
|
|
3591
|
+
function qi() {
|
|
3581
3592
|
return Array.isArray(window.dataLayer);
|
|
3582
3593
|
}
|
|
3583
3594
|
//#endregion
|
|
3584
3595
|
//#region src/services/consent/index.ts
|
|
3585
3596
|
Vn();
|
|
3586
|
-
var
|
|
3597
|
+
var Ji = !1, Yi = {
|
|
3587
3598
|
statistics: !1,
|
|
3588
3599
|
marketing: !1
|
|
3589
3600
|
};
|
|
3590
|
-
function Yi() {
|
|
3591
|
-
return qi;
|
|
3592
|
-
}
|
|
3593
3601
|
function Xi() {
|
|
3594
|
-
return
|
|
3602
|
+
return Ji;
|
|
3595
3603
|
}
|
|
3596
|
-
function Zi(
|
|
3597
|
-
return
|
|
3604
|
+
function Zi() {
|
|
3605
|
+
return { ...Yi };
|
|
3598
3606
|
}
|
|
3599
3607
|
function Qi(e) {
|
|
3600
|
-
|
|
3601
|
-
e.statistics !== void 0 && (Ji.statistics = e.statistics), e.marketing !== void 0 && (Ji.marketing = e.marketing), t && window.dispatchEvent(new CustomEvent(J.CONSENT_CHANGED, { detail: Xi() }));
|
|
3608
|
+
return Ji ? Yi[e] : !0;
|
|
3602
3609
|
}
|
|
3603
3610
|
function $i(e) {
|
|
3611
|
+
let t = e.statistics !== void 0 && e.statistics !== Yi.statistics || e.marketing !== void 0 && e.marketing !== Yi.marketing;
|
|
3612
|
+
e.statistics !== void 0 && (Yi.statistics = e.statistics), e.marketing !== void 0 && (Yi.marketing = e.marketing), t && window.dispatchEvent(new CustomEvent(J.CONSENT_CHANGED, { detail: Zi() }));
|
|
3613
|
+
}
|
|
3614
|
+
function ea(e) {
|
|
3604
3615
|
if (!e?.enabled) return;
|
|
3605
|
-
|
|
3606
|
-
let t = (e) =>
|
|
3607
|
-
e.cmp === "cookiebot" ?
|
|
3616
|
+
Ji = !0, e.defaultConsent && (e.defaultConsent.statistics !== void 0 && (Yi.statistics = e.defaultConsent.statistics), e.defaultConsent.marketing !== void 0 && (Yi.marketing = e.defaultConsent.marketing));
|
|
3617
|
+
let t = (e) => $i(e);
|
|
3618
|
+
e.cmp === "cookiebot" ? Bi(t) : e.cmp === "onetrust" ? Ui(t) : e.cmp === "google-consent-mode" ? Ki(t) : e.onConsentChange ? e.onConsentChange(t) : Vi() ? Bi(t) : Wi() ? Ui(t) : qi() && Ki(t);
|
|
3608
3619
|
}
|
|
3609
3620
|
//#endregion
|
|
3610
3621
|
//#region src/controllers/checkout.ts
|
|
3611
|
-
function
|
|
3612
|
-
let r = new URL(`${
|
|
3622
|
+
function ta(e, t, n) {
|
|
3623
|
+
let r = new URL(`${Pi("checkout3", e.environment)}`);
|
|
3613
3624
|
t.language && r.searchParams.set("lang", t.language);
|
|
3614
3625
|
let i = t.sku, a = t.purchaseOptionId, o = t.itemSrc;
|
|
3615
3626
|
if (t.itemSrc) {
|
|
3616
|
-
let e =
|
|
3627
|
+
let e = Li(t.itemSrc, t.purchaseOptionId);
|
|
3617
3628
|
i = e.sku || i, a = e.purchaseOption || a, o = e.itemSrc;
|
|
3618
3629
|
}
|
|
3619
|
-
if (i ? (r.searchParams.set("sku", i), a && r.searchParams.set("po-id", a)) : o && r.searchParams.set("url", o), t.email && r.searchParams.set("email", t.email), t.business && r.searchParams.set("business", "true"), t.currency && r.searchParams.set("currency", t.currency), t.price && r.searchParams.set("price", t.price.toString()), t.discountCode && r.searchParams.set("discount-code", t.discountCode), t.attributionItemSrc ? r.searchParams.set("itemSrc", t.attributionItemSrc) : n.itemSrc && r.searchParams.set("itemSrc", n.itemSrc), t.attributionPublisherContentId ? r.searchParams.set("publisherContentId", t.attributionPublisherContentId) : n.publisherContentId && r.searchParams.set("publisherContentId", n.publisherContentId), t.utmSource ? r.searchParams.set("utm_source", t.utmSource) : n.utmSource && r.searchParams.set("utm_source", n.utmSource), t.utmMedium ? r.searchParams.set("utm_medium", t.utmMedium) : n.utmMedium && r.searchParams.set("utm_medium", n.utmMedium), t.utmCampaign ? r.searchParams.set("utm_campaign", t.utmCampaign) : n.utmCampaign && r.searchParams.set("utm_campaign", n.utmCampaign), t.utmTerm ? r.searchParams.set("utm_term", t.utmTerm) : n.utmTerm && r.searchParams.set("utm_term", n.utmTerm), t.utmContent ? r.searchParams.set("utm_content", t.utmContent) : n.utmContent && r.searchParams.set("utm_content", n.utmContent),
|
|
3630
|
+
if (i ? (r.searchParams.set("sku", i), a && r.searchParams.set("po-id", a)) : o && r.searchParams.set("url", o), t.email && r.searchParams.set("email", t.email), t.business && r.searchParams.set("business", "true"), t.currency && r.searchParams.set("currency", t.currency), t.price && r.searchParams.set("price", t.price.toString()), t.discountCode && r.searchParams.set("discount-code", t.discountCode), t.attributionItemSrc ? r.searchParams.set("itemSrc", t.attributionItemSrc) : n.itemSrc && r.searchParams.set("itemSrc", n.itemSrc), t.attributionPublisherContentId ? r.searchParams.set("publisherContentId", t.attributionPublisherContentId) : n.publisherContentId && r.searchParams.set("publisherContentId", n.publisherContentId), t.utmSource ? r.searchParams.set("utm_source", t.utmSource) : n.utmSource && r.searchParams.set("utm_source", n.utmSource), t.utmMedium ? r.searchParams.set("utm_medium", t.utmMedium) : n.utmMedium && r.searchParams.set("utm_medium", n.utmMedium), t.utmCampaign ? r.searchParams.set("utm_campaign", t.utmCampaign) : n.utmCampaign && r.searchParams.set("utm_campaign", n.utmCampaign), t.utmTerm ? r.searchParams.set("utm_term", t.utmTerm) : n.utmTerm && r.searchParams.set("utm_term", n.utmTerm), t.utmContent ? r.searchParams.set("utm_content", t.utmContent) : n.utmContent && r.searchParams.set("utm_content", n.utmContent), Qi("marketing")) {
|
|
3620
3631
|
let e = [
|
|
3621
3632
|
"_ga",
|
|
3622
3633
|
"_gid",
|
|
@@ -3646,18 +3657,22 @@ function ea(e, t, n) {
|
|
|
3646
3657
|
//#endregion
|
|
3647
3658
|
//#region src/controllers/index.ts
|
|
3648
3659
|
zn();
|
|
3649
|
-
var
|
|
3650
|
-
function
|
|
3651
|
-
let e = sessionStorage.getItem(
|
|
3660
|
+
var na = "sesamySignedURLs";
|
|
3661
|
+
function ra() {
|
|
3662
|
+
let e = sessionStorage.getItem(na);
|
|
3652
3663
|
return e ? JSON.parse(e) : [];
|
|
3653
3664
|
}
|
|
3654
|
-
function
|
|
3655
|
-
let t =
|
|
3656
|
-
t.push(e), q(`Adding signed URL: ${e}`), sessionStorage.setItem(
|
|
3665
|
+
function ia(e) {
|
|
3666
|
+
let t = ra();
|
|
3667
|
+
t.push(e), q(`Adding signed URL: ${e}`), sessionStorage.setItem(na, JSON.stringify(t));
|
|
3668
|
+
}
|
|
3669
|
+
function aa(e) {
|
|
3670
|
+
let t = ra().filter((t) => !e(t));
|
|
3671
|
+
sessionStorage.setItem(na, JSON.stringify(t));
|
|
3657
3672
|
}
|
|
3658
3673
|
//#endregion
|
|
3659
3674
|
//#region src/utils/removeUndefined.ts
|
|
3660
|
-
function
|
|
3675
|
+
function oa(e) {
|
|
3661
3676
|
let t = {};
|
|
3662
3677
|
return Object.keys(e).forEach((n) => {
|
|
3663
3678
|
let r = e[n];
|
|
@@ -3667,8 +3682,8 @@ function ia(e) {
|
|
|
3667
3682
|
//#endregion
|
|
3668
3683
|
//#region src/controllers/attribution.ts
|
|
3669
3684
|
zn();
|
|
3670
|
-
var
|
|
3671
|
-
function
|
|
3685
|
+
var sa = "sesamyAttribution";
|
|
3686
|
+
function ca(e) {
|
|
3672
3687
|
let t = localStorage.getItem(e);
|
|
3673
3688
|
if (!t) return null;
|
|
3674
3689
|
try {
|
|
@@ -3677,7 +3692,7 @@ function oa(e) {
|
|
|
3677
3692
|
return console.error(`Failed to parse ${e}`), null;
|
|
3678
3693
|
}
|
|
3679
3694
|
}
|
|
3680
|
-
function
|
|
3695
|
+
function la(e) {
|
|
3681
3696
|
return Object.keys(e).find((e) => e.startsWith("utm_")) ? {
|
|
3682
3697
|
utmSource: void 0,
|
|
3683
3698
|
utmMedium: void 0,
|
|
@@ -3685,23 +3700,23 @@ function sa(e) {
|
|
|
3685
3700
|
...e
|
|
3686
3701
|
} : e;
|
|
3687
3702
|
}
|
|
3688
|
-
function
|
|
3689
|
-
return
|
|
3703
|
+
function ua() {
|
|
3704
|
+
return ca(sa) || {};
|
|
3690
3705
|
}
|
|
3691
|
-
function
|
|
3692
|
-
if (e === null) localStorage.removeItem(
|
|
3706
|
+
function da(e) {
|
|
3707
|
+
if (e === null) localStorage.removeItem(sa);
|
|
3693
3708
|
else {
|
|
3694
3709
|
q(`Setting attribution ${JSON.stringify(e)}`);
|
|
3695
|
-
let t =
|
|
3696
|
-
...
|
|
3697
|
-
...
|
|
3710
|
+
let t = oa({
|
|
3711
|
+
...ua() ?? {},
|
|
3712
|
+
...la(e)
|
|
3698
3713
|
});
|
|
3699
|
-
localStorage.setItem(
|
|
3714
|
+
localStorage.setItem(sa, JSON.stringify({ value: t }));
|
|
3700
3715
|
}
|
|
3701
3716
|
}
|
|
3702
3717
|
//#endregion
|
|
3703
3718
|
//#region ../../node_modules/.pnpm/@analytics+type-utils@0.6.4/node_modules/@analytics/type-utils/dist/analytics-util-types.module.js
|
|
3704
|
-
var
|
|
3719
|
+
var fa = /* @__PURE__ */ u((/* @__PURE__ */ s(((e, t) => {
|
|
3705
3720
|
(function(n, r) {
|
|
3706
3721
|
typeof e == "object" && t !== void 0 ? t.exports = function(e, t, n, r, i) {
|
|
3707
3722
|
for (t = t.split ? t.split(".") : t, r = 0; r < t.length; r++) e = e ? e[t[r]] : i;
|
|
@@ -3716,102 +3731,102 @@ var ua = /* @__PURE__ */ u((/* @__PURE__ */ s(((e, t) => {
|
|
|
3716
3731
|
return e === i ? n : e;
|
|
3717
3732
|
};
|
|
3718
3733
|
})(e);
|
|
3719
|
-
})))(), 1),
|
|
3720
|
-
|
|
3721
|
-
var Y = typeof document !==
|
|
3722
|
-
Y && window.location.hostname,
|
|
3723
|
-
function
|
|
3734
|
+
})))(), 1), pa = "function", ma = "string", ha = "undefined", ga = "boolean", _a = "array", va = "symbol", ya = "null", ba = function() {}, xa = "form", Sa = "input", Ca = "button", wa = "select", Ta = typeof process < "u" ? process : {};
|
|
3735
|
+
Ta.env && Ta.env.NODE_ENV;
|
|
3736
|
+
var Y = typeof document !== ha;
|
|
3737
|
+
Y && window.location.hostname, Ta.versions != null && Ta.versions.node, typeof Deno < "u" && Deno.core, typeof self == "object" && self.constructor && self.constructor.name, Y && window.name === "nodejs" || typeof navigator < "u" && navigator.userAgent !== void 0 && (navigator.userAgent.includes("Node.js") || navigator.userAgent.includes("jsdom"));
|
|
3738
|
+
function Ea(e, t) {
|
|
3724
3739
|
return t.charAt(0)[e]() + t.slice(1);
|
|
3725
3740
|
}
|
|
3726
|
-
var
|
|
3727
|
-
function
|
|
3728
|
-
return
|
|
3741
|
+
var Da = Ea.bind(null, "toUpperCase"), Oa = Ea.bind(null, "toLowerCase");
|
|
3742
|
+
function ka(e) {
|
|
3743
|
+
return Ia(e) ? Da(ya) : typeof e == "object" ? Va(e) : Object.prototype.toString.call(e).slice(8, -1);
|
|
3729
3744
|
}
|
|
3730
|
-
function
|
|
3745
|
+
function Aa(e, t) {
|
|
3731
3746
|
t === void 0 && (t = !0);
|
|
3732
|
-
var n =
|
|
3733
|
-
return t ?
|
|
3747
|
+
var n = ka(e);
|
|
3748
|
+
return t ? Oa(n) : n;
|
|
3734
3749
|
}
|
|
3735
|
-
function
|
|
3750
|
+
function ja(e, t) {
|
|
3736
3751
|
return typeof t === e;
|
|
3737
3752
|
}
|
|
3738
|
-
var
|
|
3739
|
-
|
|
3740
|
-
function
|
|
3753
|
+
var Ma = ja.bind(null, pa), Na = ja.bind(null, ma), Pa = ja.bind(null, ha), Fa = ja.bind(null, ga);
|
|
3754
|
+
ja.bind(null, va);
|
|
3755
|
+
function Ia(e) {
|
|
3741
3756
|
return e === null;
|
|
3742
3757
|
}
|
|
3743
|
-
function
|
|
3744
|
-
return
|
|
3758
|
+
function La(e) {
|
|
3759
|
+
return Aa(e) === "number" && !isNaN(e);
|
|
3745
3760
|
}
|
|
3746
|
-
function
|
|
3747
|
-
return
|
|
3761
|
+
function Ra(e) {
|
|
3762
|
+
return Aa(e) === _a;
|
|
3748
3763
|
}
|
|
3749
|
-
function
|
|
3750
|
-
if (!
|
|
3764
|
+
function za(e) {
|
|
3765
|
+
if (!Ba(e)) return !1;
|
|
3751
3766
|
for (var t = e; Object.getPrototypeOf(t) !== null;) t = Object.getPrototypeOf(t);
|
|
3752
3767
|
return Object.getPrototypeOf(e) === t;
|
|
3753
3768
|
}
|
|
3754
|
-
function
|
|
3769
|
+
function Ba(e) {
|
|
3755
3770
|
return e && (typeof e == "object" || e !== null);
|
|
3756
3771
|
}
|
|
3757
|
-
function
|
|
3758
|
-
return
|
|
3772
|
+
function Va(e) {
|
|
3773
|
+
return Ma(e.constructor) ? e.constructor.name : null;
|
|
3759
3774
|
}
|
|
3760
|
-
function
|
|
3761
|
-
return e instanceof Error ||
|
|
3775
|
+
function Ha(e) {
|
|
3776
|
+
return e instanceof Error || Na(e.message) && e.constructor && La(e.constructor.stackTraceLimit);
|
|
3762
3777
|
}
|
|
3763
|
-
function
|
|
3764
|
-
if (typeof t != "object" ||
|
|
3778
|
+
function Ua(e, t) {
|
|
3779
|
+
if (typeof t != "object" || Ia(t)) return !1;
|
|
3765
3780
|
if (t instanceof e) return !0;
|
|
3766
|
-
var n =
|
|
3767
|
-
if (
|
|
3768
|
-
if (
|
|
3781
|
+
var n = Aa(new e(""));
|
|
3782
|
+
if (Ha(t)) for (; t;) {
|
|
3783
|
+
if (Aa(t) === n) return !0;
|
|
3769
3784
|
t = Object.getPrototypeOf(t);
|
|
3770
3785
|
}
|
|
3771
3786
|
return !1;
|
|
3772
3787
|
}
|
|
3773
|
-
|
|
3774
|
-
function
|
|
3788
|
+
Ua.bind(null, TypeError), Ua.bind(null, SyntaxError);
|
|
3789
|
+
function Wa(e, t) {
|
|
3775
3790
|
var n = e instanceof Element || e instanceof HTMLDocument;
|
|
3776
|
-
return n && t ?
|
|
3791
|
+
return n && t ? Ga(e, t) : n;
|
|
3777
3792
|
}
|
|
3778
|
-
function
|
|
3793
|
+
function Ga(e, t) {
|
|
3779
3794
|
return t === void 0 && (t = ""), e && e.nodeName === t.toUpperCase();
|
|
3780
3795
|
}
|
|
3781
|
-
function
|
|
3796
|
+
function Ka(e) {
|
|
3782
3797
|
var t = [].slice.call(arguments, 1);
|
|
3783
3798
|
return function() {
|
|
3784
3799
|
return e.apply(void 0, [].slice.call(arguments).concat(t));
|
|
3785
3800
|
};
|
|
3786
3801
|
}
|
|
3787
|
-
Wa
|
|
3788
|
-
function
|
|
3789
|
-
return e ?
|
|
3802
|
+
Ka(Wa, xa), Ka(Wa, Ca), Ka(Wa, Sa), Ka(Wa, wa);
|
|
3803
|
+
function qa(e) {
|
|
3804
|
+
return e ? Ra(e) ? e : [e] : [];
|
|
3790
3805
|
}
|
|
3791
3806
|
//#endregion
|
|
3792
3807
|
//#region ../../node_modules/.pnpm/analytics-utils@1.1.1_@types+dlv@1.1.5/node_modules/analytics-utils/dist/analytics-utils.module.js
|
|
3793
|
-
function
|
|
3808
|
+
function Ja(e) {
|
|
3794
3809
|
try {
|
|
3795
3810
|
return decodeURIComponent(e.replace(/\+/g, " "));
|
|
3796
3811
|
} catch {
|
|
3797
3812
|
return null;
|
|
3798
3813
|
}
|
|
3799
3814
|
}
|
|
3800
|
-
function
|
|
3815
|
+
function Ya() {
|
|
3801
3816
|
if (Y) {
|
|
3802
3817
|
var e = navigator, t = e.languages;
|
|
3803
3818
|
return e.userLanguage || (t && t.length ? t[0] : e.language);
|
|
3804
3819
|
}
|
|
3805
3820
|
}
|
|
3806
|
-
function
|
|
3821
|
+
function Xa() {
|
|
3807
3822
|
try {
|
|
3808
3823
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
3809
3824
|
} catch {}
|
|
3810
3825
|
}
|
|
3811
|
-
function
|
|
3826
|
+
function Za(e) {
|
|
3812
3827
|
return function(e) {
|
|
3813
3828
|
for (var t, n = Object.create(null), r = /([^&=]+)=?([^&]*)/g; t = r.exec(e);) {
|
|
3814
|
-
var i =
|
|
3829
|
+
var i = Ja(t[1]), a = Ja(t[2]);
|
|
3815
3830
|
if (i) if (i.substring(i.length - 2) === "[]") {
|
|
3816
3831
|
var o = n[i = i.substring(0, i.length - 2)] || (n[i] = []);
|
|
3817
3832
|
n[i] = Array.isArray(o) ? o : [], n[i].push(a);
|
|
@@ -3819,7 +3834,7 @@ function Ya(e) {
|
|
|
3819
3834
|
}
|
|
3820
3835
|
for (var s in n) {
|
|
3821
3836
|
var c = s.split("[");
|
|
3822
|
-
c.length > 1 && (
|
|
3837
|
+
c.length > 1 && (Qa(n, c.map(function(e) {
|
|
3823
3838
|
return e.replace(/[?[\]\\ ]/g, "");
|
|
3824
3839
|
}), n[s]), delete n[s]);
|
|
3825
3840
|
}
|
|
@@ -3832,7 +3847,7 @@ function Ya(e) {
|
|
|
3832
3847
|
return Y && window.location.search.substring(1);
|
|
3833
3848
|
}(e));
|
|
3834
3849
|
}
|
|
3835
|
-
function
|
|
3850
|
+
function Qa(e, t, n) {
|
|
3836
3851
|
for (var r = t.length - 1, i = 0; i < r; ++i) {
|
|
3837
3852
|
var a = t[i];
|
|
3838
3853
|
if (a === "__proto__" || a === "constructor") break;
|
|
@@ -3840,14 +3855,14 @@ function Xa(e, t, n) {
|
|
|
3840
3855
|
}
|
|
3841
3856
|
e[t[r]] = n;
|
|
3842
3857
|
}
|
|
3843
|
-
function
|
|
3858
|
+
function $a() {
|
|
3844
3859
|
for (var e = "", t = 0, n = 4294967295 * Math.random() | 0; t++ < 36;) {
|
|
3845
3860
|
var r = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"[t - 1], i = 15 & n;
|
|
3846
3861
|
e += r == "-" || r == "4" ? r : (r == "x" ? i : 3 & i | 8).toString(16), n = t % 8 == 0 ? 4294967295 * Math.random() | 0 : n >> 4;
|
|
3847
3862
|
}
|
|
3848
3863
|
return e;
|
|
3849
3864
|
}
|
|
3850
|
-
function
|
|
3865
|
+
function eo(e, t) {
|
|
3851
3866
|
var n, r, i, a = null, o = 0, s = function() {
|
|
3852
3867
|
o = /* @__PURE__ */ new Date(), a = null, i = e.apply(n, r);
|
|
3853
3868
|
};
|
|
@@ -3860,37 +3875,37 @@ function Qa(e, t) {
|
|
|
3860
3875
|
}
|
|
3861
3876
|
//#endregion
|
|
3862
3877
|
//#region ../../node_modules/.pnpm/@analytics+global-storage-utils@0.1.9/node_modules/@analytics/global-storage-utils/dist/analytics-util-global-storage.module.js
|
|
3863
|
-
var
|
|
3864
|
-
function
|
|
3865
|
-
return
|
|
3878
|
+
var to = "global", no = "__" + to + "__", ro = typeof self == "object" && self.self === self && self || typeof global == "object" && global.global === global && global || void 0;
|
|
3879
|
+
function io(e) {
|
|
3880
|
+
return ro[no][e];
|
|
3866
3881
|
}
|
|
3867
|
-
function
|
|
3868
|
-
return
|
|
3882
|
+
function ao(e, t) {
|
|
3883
|
+
return ro[no][e] = t;
|
|
3869
3884
|
}
|
|
3870
|
-
function
|
|
3871
|
-
delete
|
|
3885
|
+
function oo(e) {
|
|
3886
|
+
delete ro[no][e];
|
|
3872
3887
|
}
|
|
3873
|
-
function
|
|
3888
|
+
function so(e, t, n) {
|
|
3874
3889
|
var r;
|
|
3875
3890
|
try {
|
|
3876
|
-
if (
|
|
3891
|
+
if (lo(e)) {
|
|
3877
3892
|
var i = window[e];
|
|
3878
3893
|
r = i[t].bind(i);
|
|
3879
3894
|
}
|
|
3880
3895
|
} catch {}
|
|
3881
3896
|
return r || n;
|
|
3882
3897
|
}
|
|
3883
|
-
|
|
3884
|
-
var
|
|
3885
|
-
function
|
|
3886
|
-
if (
|
|
3898
|
+
ro[no] || (ro[no] = {});
|
|
3899
|
+
var co = {};
|
|
3900
|
+
function lo(e) {
|
|
3901
|
+
if (co[e] !== void 0) return co[e];
|
|
3887
3902
|
try {
|
|
3888
3903
|
var t = window[e];
|
|
3889
|
-
t.setItem(
|
|
3904
|
+
t.setItem(ha, ha), t.removeItem(ha);
|
|
3890
3905
|
} catch {
|
|
3891
|
-
return
|
|
3906
|
+
return co[e] = !1;
|
|
3892
3907
|
}
|
|
3893
|
-
return
|
|
3908
|
+
return co[e] = !0;
|
|
3894
3909
|
}
|
|
3895
3910
|
//#endregion
|
|
3896
3911
|
//#region ../../node_modules/.pnpm/@analytics+core@0.13.2_@types+dlv@1.1.5/node_modules/@analytics/core/dist/client/core.module.js
|
|
@@ -3903,16 +3918,16 @@ function X() {
|
|
|
3903
3918
|
return e;
|
|
3904
3919
|
}, X.apply(null, arguments);
|
|
3905
3920
|
}
|
|
3906
|
-
var
|
|
3907
|
-
return typeof Symbol ===
|
|
3908
|
-
}(),
|
|
3909
|
-
function
|
|
3921
|
+
var uo = "function", fo = "undefined", po = "reducer", mo = "@@redux/", ho = mo + "INIT", go = mo + Math.random().toString(36), _o = /* @__PURE__ */ function() {
|
|
3922
|
+
return typeof Symbol === uo && Symbol.observable || "@@observable";
|
|
3923
|
+
}(), vo = " != " + uo;
|
|
3924
|
+
function yo(e, t, n) {
|
|
3910
3925
|
var r;
|
|
3911
|
-
if (typeof t ===
|
|
3912
|
-
if (typeof n !==
|
|
3913
|
-
return n(
|
|
3926
|
+
if (typeof t === uo && typeof n === fo && (n = t, t = void 0), typeof n !== fo) {
|
|
3927
|
+
if (typeof n !== uo) throw Error("enhancer" + vo);
|
|
3928
|
+
return n(yo)(e, t);
|
|
3914
3929
|
}
|
|
3915
|
-
if (typeof e !==
|
|
3930
|
+
if (typeof e !== uo) throw Error(po + vo);
|
|
3916
3931
|
var i = e, a = t, o = [], s = o, c = !1;
|
|
3917
3932
|
function l() {
|
|
3918
3933
|
s === o && (s = o.slice());
|
|
@@ -3921,7 +3936,7 @@ function _o(e, t, n) {
|
|
|
3921
3936
|
return a;
|
|
3922
3937
|
}
|
|
3923
3938
|
function d(e) {
|
|
3924
|
-
if (typeof e !==
|
|
3939
|
+
if (typeof e !== uo) throw Error("Listener" + vo);
|
|
3925
3940
|
var t = !0;
|
|
3926
3941
|
return l(), s.push(e), function() {
|
|
3927
3942
|
if (t) {
|
|
@@ -3932,9 +3947,9 @@ function _o(e, t, n) {
|
|
|
3932
3947
|
};
|
|
3933
3948
|
}
|
|
3934
3949
|
function f(e) {
|
|
3935
|
-
if (!
|
|
3936
|
-
if (typeof e.type ===
|
|
3937
|
-
if (c) throw Error("Dispatch in " +
|
|
3950
|
+
if (!za(e)) throw Error("Act != obj");
|
|
3951
|
+
if (typeof e.type === fo) throw Error("ActType " + fo);
|
|
3952
|
+
if (c) throw Error("Dispatch in " + po);
|
|
3938
3953
|
try {
|
|
3939
3954
|
c = !0, a = i(a, e);
|
|
3940
3955
|
} finally {
|
|
@@ -3943,15 +3958,15 @@ function _o(e, t, n) {
|
|
|
3943
3958
|
for (var t = o = s, n = 0; n < t.length; n++) (0, t[n])();
|
|
3944
3959
|
return e;
|
|
3945
3960
|
}
|
|
3946
|
-
return f({ type:
|
|
3961
|
+
return f({ type: ho }), (r = {
|
|
3947
3962
|
dispatch: f,
|
|
3948
3963
|
subscribe: d,
|
|
3949
3964
|
getState: u,
|
|
3950
3965
|
replaceReducer: function(e) {
|
|
3951
|
-
if (typeof e !==
|
|
3952
|
-
i = e, f({ type:
|
|
3966
|
+
if (typeof e !== uo) throw Error("next " + po + vo);
|
|
3967
|
+
i = e, f({ type: ho });
|
|
3953
3968
|
}
|
|
3954
|
-
})[
|
|
3969
|
+
})[_o] = function() {
|
|
3955
3970
|
var e, t = d;
|
|
3956
3971
|
return (e = { subscribe: function(e) {
|
|
3957
3972
|
if (typeof e != "object") throw TypeError("Observer != obj");
|
|
@@ -3959,16 +3974,16 @@ function _o(e, t, n) {
|
|
|
3959
3974
|
e.next && e.next(u());
|
|
3960
3975
|
}
|
|
3961
3976
|
return n(), { unsubscribe: t(n) };
|
|
3962
|
-
} })[
|
|
3977
|
+
} })[_o] = function() {
|
|
3963
3978
|
return this;
|
|
3964
3979
|
}, e;
|
|
3965
3980
|
}, r;
|
|
3966
3981
|
}
|
|
3967
|
-
function
|
|
3982
|
+
function bo(e, t) {
|
|
3968
3983
|
var n = t && t.type;
|
|
3969
|
-
return "action " + (n && n.toString() || "?") +
|
|
3984
|
+
return "action " + (n && n.toString() || "?") + po + " " + e + " returns " + fo;
|
|
3970
3985
|
}
|
|
3971
|
-
function
|
|
3986
|
+
function xo() {
|
|
3972
3987
|
var e = [].slice.call(arguments);
|
|
3973
3988
|
return e.length === 0 ? function(e) {
|
|
3974
3989
|
return e;
|
|
@@ -3978,7 +3993,7 @@ function yo() {
|
|
|
3978
3993
|
};
|
|
3979
3994
|
});
|
|
3980
3995
|
}
|
|
3981
|
-
function
|
|
3996
|
+
function So() {
|
|
3982
3997
|
var e = arguments;
|
|
3983
3998
|
return function(t) {
|
|
3984
3999
|
return function(n, r, i) {
|
|
@@ -3990,16 +4005,16 @@ function bo() {
|
|
|
3990
4005
|
};
|
|
3991
4006
|
return a = [].slice.call(e).map(function(e) {
|
|
3992
4007
|
return e(c);
|
|
3993
|
-
}), X({}, o, { dispatch: s =
|
|
4008
|
+
}), X({}, o, { dispatch: s = xo.apply(void 0, a)(o.dispatch) });
|
|
3994
4009
|
};
|
|
3995
4010
|
};
|
|
3996
4011
|
}
|
|
3997
|
-
var
|
|
4012
|
+
var Co = "__anon_id", wo = "__user_id", To = "__user_traits", Eo = "analytics", Do = "userId", Oo = "anonymousId", ko = /* @__PURE__ */ "bootstrap.params.campaign.initializeStart.initialize.initializeEnd.ready.resetStart.reset.resetEnd.pageStart.page.pageEnd.pageAborted.trackStart.track.trackEnd.trackAborted.identifyStart.identify.identifyEnd.identifyAborted.userIdChanged.registerPlugins.enablePlugin.disablePlugin.online.offline.setItemStart.setItem.setItemEnd.setItemAborted.removeItemStart.removeItem.removeItemEnd.removeItemAborted".split("."), Ao = [
|
|
3998
4013
|
"name",
|
|
3999
4014
|
"EVENTS",
|
|
4000
4015
|
"config",
|
|
4001
4016
|
"loaded"
|
|
4002
|
-
], Z =
|
|
4017
|
+
], Z = ko.reduce(function(e, t) {
|
|
4003
4018
|
return e[t] = t, e;
|
|
4004
4019
|
}, {
|
|
4005
4020
|
registerPluginType: function(e) {
|
|
@@ -4008,23 +4023,23 @@ var xo = "__anon_id", So = "__user_id", Co = "__user_traits", wo = "analytics",
|
|
|
4008
4023
|
pluginReadyType: function(e) {
|
|
4009
4024
|
return "ready:" + e;
|
|
4010
4025
|
}
|
|
4011
|
-
}),
|
|
4012
|
-
function
|
|
4026
|
+
}), jo = /^utm_/, Mo = /^an_prop_/, No = /^an_trait_/;
|
|
4027
|
+
function Po(e) {
|
|
4013
4028
|
var t = e.storage.setItem;
|
|
4014
4029
|
return function(n) {
|
|
4015
4030
|
return function(r) {
|
|
4016
4031
|
return function(i) {
|
|
4017
4032
|
if (i.type === Z.bootstrap) {
|
|
4018
4033
|
var a = i.params, o = i.user, s = i.persistedUser, c = i.initialUser, l = s.userId === o.userId;
|
|
4019
|
-
s.anonymousId !== o.anonymousId && t(
|
|
4034
|
+
s.anonymousId !== o.anonymousId && t(Co, o.anonymousId), l || t(wo, o.userId), c.traits && t(To, X({}, l && s.traits ? s.traits : {}, c.traits));
|
|
4020
4035
|
var u = Object.keys(i.params);
|
|
4021
4036
|
if (u.length) {
|
|
4022
4037
|
var d = a.an_uid, f = a.an_event, p = u.reduce(function(e, t) {
|
|
4023
|
-
if (t.match(
|
|
4024
|
-
var n = t.replace(
|
|
4038
|
+
if (t.match(jo) || t.match(/^(d|g)clid/)) {
|
|
4039
|
+
var n = t.replace(jo, "");
|
|
4025
4040
|
e.campaign[n === "campaign" ? "name" : n] = a[t];
|
|
4026
4041
|
}
|
|
4027
|
-
return t.match(
|
|
4042
|
+
return t.match(Mo) && (e.props[t.replace(Mo, "")] = a[t]), t.match(No) && (e.traits[t.replace(No, "")] = a[t]), e;
|
|
4028
4043
|
}, {
|
|
4029
4044
|
campaign: {},
|
|
4030
4045
|
props: {},
|
|
@@ -4048,11 +4063,11 @@ function Mo(e) {
|
|
|
4048
4063
|
};
|
|
4049
4064
|
};
|
|
4050
4065
|
}
|
|
4051
|
-
function
|
|
4066
|
+
function Fo(e) {
|
|
4052
4067
|
return function(t, n) {
|
|
4053
4068
|
if (t === void 0 && (t = {}), n === void 0 && (n = {}), n.type === Z.setItemEnd) {
|
|
4054
|
-
if (n.key ===
|
|
4055
|
-
if (n.key ===
|
|
4069
|
+
if (n.key === Co) return X({}, t, { anonymousId: n.value });
|
|
4070
|
+
if (n.key === wo) return X({}, t, { userId: n.value });
|
|
4056
4071
|
}
|
|
4057
4072
|
switch (n.type) {
|
|
4058
4073
|
case Z.identify: return Object.assign({}, t, {
|
|
@@ -4060,9 +4075,9 @@ function No(e) {
|
|
|
4060
4075
|
traits: X({}, t.traits, n.traits)
|
|
4061
4076
|
});
|
|
4062
4077
|
case Z.reset: return [
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4078
|
+
wo,
|
|
4079
|
+
Co,
|
|
4080
|
+
To
|
|
4066
4081
|
].forEach(function(t) {
|
|
4067
4082
|
e.removeItem(t);
|
|
4068
4083
|
}), Object.assign({}, t, {
|
|
@@ -4074,37 +4089,37 @@ function No(e) {
|
|
|
4074
4089
|
}
|
|
4075
4090
|
};
|
|
4076
4091
|
}
|
|
4077
|
-
function
|
|
4092
|
+
function Io(e) {
|
|
4078
4093
|
return {
|
|
4079
|
-
userId: e.getItem(
|
|
4080
|
-
anonymousId: e.getItem(
|
|
4081
|
-
traits: e.getItem(
|
|
4094
|
+
userId: e.getItem(wo),
|
|
4095
|
+
anonymousId: e.getItem(Co),
|
|
4096
|
+
traits: e.getItem(To)
|
|
4082
4097
|
};
|
|
4083
4098
|
}
|
|
4084
|
-
var
|
|
4099
|
+
var Lo = function(e) {
|
|
4085
4100
|
return "__TEMP__" + e;
|
|
4086
4101
|
};
|
|
4087
|
-
function
|
|
4102
|
+
function Ro(e) {
|
|
4088
4103
|
var t = e.storage, n = t.setItem, r = t.removeItem, i = t.getItem;
|
|
4089
4104
|
return function(e) {
|
|
4090
4105
|
return function(t) {
|
|
4091
4106
|
return function(a) {
|
|
4092
4107
|
var o = a.userId, s = a.traits, c = a.options;
|
|
4093
4108
|
if (a.type === Z.reset && ([
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4109
|
+
wo,
|
|
4110
|
+
To,
|
|
4111
|
+
Co
|
|
4097
4112
|
].forEach(function(e) {
|
|
4098
4113
|
r(e);
|
|
4099
4114
|
}), [
|
|
4100
|
-
|
|
4101
|
-
|
|
4115
|
+
Do,
|
|
4116
|
+
Oo,
|
|
4102
4117
|
"traits"
|
|
4103
4118
|
].forEach(function(e) {
|
|
4104
|
-
|
|
4119
|
+
oo(Lo(e));
|
|
4105
4120
|
})), a.type === Z.identify) {
|
|
4106
|
-
i(
|
|
4107
|
-
var l = i(
|
|
4121
|
+
i(Co) || n(Co, $a());
|
|
4122
|
+
var l = i(wo), u = i(To) || {};
|
|
4108
4123
|
l && l !== o && e.dispatch({
|
|
4109
4124
|
type: Z.userIdChanged,
|
|
4110
4125
|
old: {
|
|
@@ -4116,30 +4131,30 @@ function Io(e) {
|
|
|
4116
4131
|
traits: s
|
|
4117
4132
|
},
|
|
4118
4133
|
options: c
|
|
4119
|
-
}), o && n(
|
|
4134
|
+
}), o && n(wo, o), s && n(To, X({}, u, s));
|
|
4120
4135
|
}
|
|
4121
4136
|
return t(a);
|
|
4122
4137
|
};
|
|
4123
4138
|
};
|
|
4124
4139
|
};
|
|
4125
4140
|
}
|
|
4126
|
-
var
|
|
4127
|
-
function
|
|
4128
|
-
|
|
4141
|
+
var zo = {};
|
|
4142
|
+
function Bo(e, t) {
|
|
4143
|
+
zo[e] && Ma(zo[e]) && (zo[e](t), delete zo[e]);
|
|
4129
4144
|
}
|
|
4130
|
-
function
|
|
4145
|
+
function Vo(e, t, n) {
|
|
4131
4146
|
return new Promise(function(r, i) {
|
|
4132
4147
|
return t() ? r(e) : n < 1 ? i(X({}, e, { queue: !0 })) : new Promise(function(e) {
|
|
4133
4148
|
return setTimeout(e, 10);
|
|
4134
4149
|
}).then(function(a) {
|
|
4135
|
-
return
|
|
4150
|
+
return Vo(e, t, n - 10).then(r, i);
|
|
4136
4151
|
});
|
|
4137
4152
|
});
|
|
4138
4153
|
}
|
|
4139
|
-
function
|
|
4154
|
+
function Ho(e) {
|
|
4140
4155
|
return { abort: e };
|
|
4141
4156
|
}
|
|
4142
|
-
function
|
|
4157
|
+
function Uo(e, t, n) {
|
|
4143
4158
|
var r = {}, i = t(), a = e.getState(), o = a.plugins, s = a.queue, c = a.user;
|
|
4144
4159
|
if (!a.context.offline && s && s.actions && s.actions.length) {
|
|
4145
4160
|
var l = s.actions.reduce(function(e, t, n) {
|
|
@@ -4152,9 +4167,9 @@ function Vo(e, t, n) {
|
|
|
4152
4167
|
});
|
|
4153
4168
|
l.processIndex && l.processIndex.length && (l.processIndex.forEach(function(t) {
|
|
4154
4169
|
var a = s.actions[t], l = a.plugin, u = a.payload.type, d = i[l][u];
|
|
4155
|
-
if (d &&
|
|
4170
|
+
if (d && Ma(d)) {
|
|
4156
4171
|
var f, p = function(e, t) {
|
|
4157
|
-
return e === void 0 && (e = {}), t === void 0 && (t = {}), [
|
|
4172
|
+
return e === void 0 && (e = {}), t === void 0 && (t = {}), [Do, Oo].reduce(function(n, r) {
|
|
4158
4173
|
return e.hasOwnProperty(r) && t[r] && t[r] !== e[r] && (n[r] = t[r]), n;
|
|
4159
4174
|
}, e);
|
|
4160
4175
|
}(a.payload, c), m = r[p.meta.rid];
|
|
@@ -4162,8 +4177,8 @@ function Vo(e, t, n) {
|
|
|
4162
4177
|
payload: p,
|
|
4163
4178
|
config: o[l].config,
|
|
4164
4179
|
instance: n,
|
|
4165
|
-
abort:
|
|
4166
|
-
})) &&
|
|
4180
|
+
abort: Ho
|
|
4181
|
+
})) && za(f) && f.abort) return void (r[p.meta.rid] = !0);
|
|
4167
4182
|
if (!m) {
|
|
4168
4183
|
var h = u + ":" + l;
|
|
4169
4184
|
e.dispatch(X({}, p, {
|
|
@@ -4180,10 +4195,10 @@ function Vo(e, t, n) {
|
|
|
4180
4195
|
}));
|
|
4181
4196
|
}
|
|
4182
4197
|
}
|
|
4183
|
-
var
|
|
4198
|
+
var Wo = function(e) {
|
|
4184
4199
|
var t = e.data, n = e.action, r = e.instance, i = e.state, a = e.allPlugins, o = e.allMatches, s = e.store, c = e.EVENTS;
|
|
4185
4200
|
try {
|
|
4186
|
-
var l = i.plugins, u = i.context, d = n.type, f = d.match(
|
|
4201
|
+
var l = i.plugins, u = i.context, d = n.type, f = d.match(Go), p = t.exact.map(function(e) {
|
|
4187
4202
|
return e.pluginName;
|
|
4188
4203
|
});
|
|
4189
4204
|
f && (p = o.during.map(function(e) {
|
|
@@ -4193,10 +4208,10 @@ var Ho = function(e) {
|
|
|
4193
4208
|
return function(n, r, i) {
|
|
4194
4209
|
var a = r.config, o = r.name, s = o + "." + n.type;
|
|
4195
4210
|
i && (s = i.event);
|
|
4196
|
-
var c = n.type.match(
|
|
4211
|
+
var c = n.type.match(Go) ? function(e, t, n, r, i) {
|
|
4197
4212
|
return function(a, o) {
|
|
4198
|
-
var s = r ? r.name : e, c = o &&
|
|
4199
|
-
if (r && (!(c = o &&
|
|
4213
|
+
var s = r ? r.name : e, c = o && es(o) ? o : n;
|
|
4214
|
+
if (r && (!(c = o && es(o) ? o : [e]).includes(e) || c.length !== 1)) throw Error("Method " + t + " can only abort " + e + " plugin. " + JSON.stringify(c) + " input valid");
|
|
4200
4215
|
return X({}, i, { abort: {
|
|
4201
4216
|
reason: a,
|
|
4202
4217
|
plugins: c,
|
|
@@ -4210,7 +4225,7 @@ var Ho = function(e) {
|
|
|
4210
4225
|
};
|
|
4211
4226
|
}(n, s);
|
|
4212
4227
|
return {
|
|
4213
|
-
payload:
|
|
4228
|
+
payload: rs(n),
|
|
4214
4229
|
instance: e,
|
|
4215
4230
|
config: a || {},
|
|
4216
4231
|
abort: c
|
|
@@ -4229,10 +4244,10 @@ var Ho = function(e) {
|
|
|
4229
4244
|
var o = function() {
|
|
4230
4245
|
if (t.namespaced && t.namespaced[s]) return Promise.resolve(t.namespaced[s].reduce(function(e, t, n) {
|
|
4231
4246
|
return Promise.resolve(e).then(function(e) {
|
|
4232
|
-
return t.method &&
|
|
4233
|
-
var n =
|
|
4247
|
+
return t.method && Ma(t.method) ? (function(e, t) {
|
|
4248
|
+
var n = ns(e);
|
|
4234
4249
|
if (n && n.name === t) {
|
|
4235
|
-
var r =
|
|
4250
|
+
var r = ns(n.method);
|
|
4236
4251
|
throw Error([
|
|
4237
4252
|
t + " plugin is calling method " + e,
|
|
4238
4253
|
"Plugins cant call self",
|
|
@@ -4250,10 +4265,10 @@ var Ho = function(e) {
|
|
|
4250
4265
|
from: o || i
|
|
4251
4266
|
} });
|
|
4252
4267
|
}),
|
|
4253
|
-
config:
|
|
4268
|
+
config: Yo(t.pluginName, l, a),
|
|
4254
4269
|
plugins: l
|
|
4255
4270
|
})).then(function(t) {
|
|
4256
|
-
var n =
|
|
4271
|
+
var n = za(t) ? t : {};
|
|
4257
4272
|
return Promise.resolve(X({}, e, n));
|
|
4258
4273
|
})) : e;
|
|
4259
4274
|
var n, i, o;
|
|
@@ -4271,14 +4286,14 @@ var Ho = function(e) {
|
|
|
4271
4286
|
var c = t.exact.length === o + 1, u = i.pluginName, p = a[u];
|
|
4272
4287
|
return Promise.resolve(n).then(function(t) {
|
|
4273
4288
|
var n = e[u] ? e[u] : {};
|
|
4274
|
-
if (f && (n = t),
|
|
4289
|
+
if (f && (n = t), Qo(n, u)) return Jo({
|
|
4275
4290
|
data: n,
|
|
4276
4291
|
method: d,
|
|
4277
4292
|
instance: r,
|
|
4278
4293
|
pluginName: u,
|
|
4279
4294
|
store: s
|
|
4280
4295
|
}), Promise.resolve(t);
|
|
4281
|
-
if (
|
|
4296
|
+
if (Qo(t, u)) return c && Jo({
|
|
4282
4297
|
data: t,
|
|
4283
4298
|
method: d,
|
|
4284
4299
|
instance: r,
|
|
@@ -4298,11 +4313,11 @@ var Ho = function(e) {
|
|
|
4298
4313
|
abort: i.abort,
|
|
4299
4314
|
payload: n,
|
|
4300
4315
|
instance: r,
|
|
4301
|
-
config:
|
|
4316
|
+
config: Yo(u, l, a),
|
|
4302
4317
|
plugins: l
|
|
4303
4318
|
})).then(function(i) {
|
|
4304
|
-
var a =
|
|
4305
|
-
if (
|
|
4319
|
+
var a = za(i) ? i : {}, o = X({}, t, a), c = e[u];
|
|
4320
|
+
if (Qo(c, u)) Jo({
|
|
4306
4321
|
data: c,
|
|
4307
4322
|
method: d,
|
|
4308
4323
|
instance: r,
|
|
@@ -4311,7 +4326,7 @@ var Ho = function(e) {
|
|
|
4311
4326
|
});
|
|
4312
4327
|
else {
|
|
4313
4328
|
var l = d + ":" + u;
|
|
4314
|
-
(l.match(/:/g) || []).length < 2 && !d.match(
|
|
4329
|
+
(l.match(/:/g) || []).length < 2 && !d.match(Ko) && !d.match(qo) && r.dispatch(X({}, f ? o : n, {
|
|
4315
4330
|
type: l,
|
|
4316
4331
|
_: {
|
|
4317
4332
|
called: l,
|
|
@@ -4326,14 +4341,14 @@ var Ho = function(e) {
|
|
|
4326
4341
|
return Promise.reject(e);
|
|
4327
4342
|
}
|
|
4328
4343
|
}, Promise.resolve(n))).then(function(e) {
|
|
4329
|
-
if (!(d.match(
|
|
4344
|
+
if (!(d.match(Go) || d.match(/^registerPlugin/) || d.match(qo) || d.match(Ko) || d.match(/^params/) || d.match(/^userIdChanged/))) {
|
|
4330
4345
|
if (c.plugins.includes(d), e._ && e._.originalAction === d) return e;
|
|
4331
4346
|
var n = X({}, e, { _: {
|
|
4332
4347
|
originalAction: e.type,
|
|
4333
4348
|
called: e.type,
|
|
4334
4349
|
from: "engineEnd"
|
|
4335
4350
|
} });
|
|
4336
|
-
|
|
4351
|
+
$o(e, t.exact.length) && !d.match(/End$/) && (n = X({}, n, { type: e.type + "Aborted" })), s.dispatch(n);
|
|
4337
4352
|
}
|
|
4338
4353
|
return e;
|
|
4339
4354
|
});
|
|
@@ -4341,8 +4356,8 @@ var Ho = function(e) {
|
|
|
4341
4356
|
} catch (e) {
|
|
4342
4357
|
return Promise.reject(e);
|
|
4343
4358
|
}
|
|
4344
|
-
},
|
|
4345
|
-
function
|
|
4359
|
+
}, Go = /Start$/, Ko = /^bootstrap/, qo = /^ready/;
|
|
4360
|
+
function Jo(e) {
|
|
4346
4361
|
var t = e.pluginName, n = e.method + "Aborted" + (t ? ":" + t : "");
|
|
4347
4362
|
e.store.dispatch(X({}, e.data, {
|
|
4348
4363
|
type: n,
|
|
@@ -4352,11 +4367,11 @@ function Ko(e) {
|
|
|
4352
4367
|
}
|
|
4353
4368
|
}));
|
|
4354
4369
|
}
|
|
4355
|
-
function
|
|
4370
|
+
function Yo(e, t, n) {
|
|
4356
4371
|
var r = t[e] || n[e];
|
|
4357
4372
|
return r && r.config ? r.config : {};
|
|
4358
4373
|
}
|
|
4359
|
-
function
|
|
4374
|
+
function Xo(e, t) {
|
|
4360
4375
|
return t.reduce(function(t, n) {
|
|
4361
4376
|
return n[e] ? t.concat({
|
|
4362
4377
|
methodName: e,
|
|
@@ -4365,44 +4380,44 @@ function Jo(e, t) {
|
|
|
4365
4380
|
}) : t;
|
|
4366
4381
|
}, []);
|
|
4367
4382
|
}
|
|
4368
|
-
function
|
|
4369
|
-
var n = e.replace(
|
|
4383
|
+
function Zo(e, t) {
|
|
4384
|
+
var n = e.replace(Go, ""), r = t ? ":" + t : "";
|
|
4370
4385
|
return [
|
|
4371
4386
|
"" + e + r,
|
|
4372
4387
|
"" + n + r,
|
|
4373
4388
|
n + "End" + r
|
|
4374
4389
|
];
|
|
4375
4390
|
}
|
|
4376
|
-
function
|
|
4391
|
+
function Qo(e, t) {
|
|
4377
4392
|
var n = e.abort;
|
|
4378
|
-
return !!n && (!0 === n ||
|
|
4393
|
+
return !!n && (!0 === n || ts(n, t) || n && ts(n.plugins, t));
|
|
4379
4394
|
}
|
|
4380
|
-
function
|
|
4395
|
+
function $o(e, t) {
|
|
4381
4396
|
var n = e.abort;
|
|
4382
4397
|
if (!n) return !1;
|
|
4383
|
-
if (!0 === n ||
|
|
4398
|
+
if (!0 === n || Na(n)) return !0;
|
|
4384
4399
|
var r = n.plugins;
|
|
4385
|
-
return
|
|
4400
|
+
return es(n) && n.length === t || es(r) && r.length === t;
|
|
4386
4401
|
}
|
|
4387
|
-
function
|
|
4402
|
+
function es(e) {
|
|
4388
4403
|
return Array.isArray(e);
|
|
4389
4404
|
}
|
|
4390
|
-
function
|
|
4391
|
-
return !(!e || !
|
|
4405
|
+
function ts(e, t) {
|
|
4406
|
+
return !(!e || !es(e)) && e.includes(t);
|
|
4392
4407
|
}
|
|
4393
|
-
function
|
|
4408
|
+
function ns(e) {
|
|
4394
4409
|
var t = e.match(/(.*):(.*)/);
|
|
4395
4410
|
return !!t && {
|
|
4396
4411
|
method: t[1],
|
|
4397
4412
|
name: t[2]
|
|
4398
4413
|
};
|
|
4399
4414
|
}
|
|
4400
|
-
function
|
|
4415
|
+
function rs(e) {
|
|
4401
4416
|
return Object.keys(e).reduce(function(t, n) {
|
|
4402
|
-
return n === "type" || (t[n] =
|
|
4417
|
+
return n === "type" || (t[n] = za(e[n]) ? Object.assign({}, e[n]) : e[n]), t;
|
|
4403
4418
|
}, {});
|
|
4404
4419
|
}
|
|
4405
|
-
function
|
|
4420
|
+
function is(e, t, n) {
|
|
4406
4421
|
var r = {};
|
|
4407
4422
|
return function(i) {
|
|
4408
4423
|
return function(a) {
|
|
@@ -4419,7 +4434,7 @@ function ns(e, t, n) {
|
|
|
4419
4434
|
fromEnable: !0,
|
|
4420
4435
|
meta: o.meta
|
|
4421
4436
|
}), l === Z.disablePlugin && setTimeout(function() {
|
|
4422
|
-
return
|
|
4437
|
+
return Bo(o.meta.rid, { payload: o });
|
|
4423
4438
|
}, 0), l === Z.initializeEnd) {
|
|
4424
4439
|
var f = t(), p = Object.keys(f), m = p.filter(function(e) {
|
|
4425
4440
|
return u.includes(e);
|
|
@@ -4427,14 +4442,14 @@ function ns(e, t, n) {
|
|
|
4427
4442
|
return f[e];
|
|
4428
4443
|
}), h = [], g = [], _ = o.disabled, v = m.map(function(e) {
|
|
4429
4444
|
var t = e.loaded, n = e.name, a = e.config;
|
|
4430
|
-
return
|
|
4445
|
+
return Vo(e, function() {
|
|
4431
4446
|
return t({ config: a });
|
|
4432
4447
|
}, 1e4).then(function(t) {
|
|
4433
4448
|
return r[n] || (i.dispatch({
|
|
4434
4449
|
type: Z.pluginReadyType(n),
|
|
4435
4450
|
name: n,
|
|
4436
4451
|
events: Object.keys(e).filter(function(e) {
|
|
4437
|
-
return !
|
|
4452
|
+
return !Ao.includes(e);
|
|
4438
4453
|
})
|
|
4439
4454
|
}), r[n] = !0), h = h.concat(n), e;
|
|
4440
4455
|
}).catch(function(e) {
|
|
@@ -4455,14 +4470,14 @@ function ns(e, t, n) {
|
|
|
4455
4470
|
}
|
|
4456
4471
|
var y = function() {
|
|
4457
4472
|
if (l !== Z.bootstrap) return /^ready:([^:]*)$/.test(l) && setTimeout(function() {
|
|
4458
|
-
return
|
|
4473
|
+
return Uo(i, t, e);
|
|
4459
4474
|
}, 0), Promise.resolve(function(e, t, n, r, i) {
|
|
4460
4475
|
try {
|
|
4461
|
-
var a =
|
|
4476
|
+
var a = Ma(t) ? t() : t, o = e.type, s = o.replace(Go, "");
|
|
4462
4477
|
if (e._ && e._.called) return Promise.resolve(e);
|
|
4463
4478
|
var c = n.getState(), l = (f = a, (p = c.plugins) === void 0 && (p = {}), (m = e.options) === void 0 && (m = {}), Object.keys(f).filter(function(e) {
|
|
4464
4479
|
var t = m.plugins || {};
|
|
4465
|
-
return
|
|
4480
|
+
return Fa(t[e]) ? t[e] : !1 !== t.all && (!p[e] || !1 !== p[e].enabled);
|
|
4466
4481
|
}).map(function(e) {
|
|
4467
4482
|
return f[e];
|
|
4468
4483
|
}));
|
|
@@ -4475,12 +4490,12 @@ function ns(e, t, n) {
|
|
|
4475
4490
|
var u = l.map(function(e) {
|
|
4476
4491
|
return e.name;
|
|
4477
4492
|
}), d = function(e, t) {
|
|
4478
|
-
var n =
|
|
4479
|
-
return
|
|
4493
|
+
var n = Zo(e).map(function(e) {
|
|
4494
|
+
return Xo(e, t);
|
|
4480
4495
|
});
|
|
4481
4496
|
return t.reduce(function(n, r) {
|
|
4482
|
-
var i = r.name, a =
|
|
4483
|
-
return
|
|
4497
|
+
var i = r.name, a = Zo(e, i).map(function(e) {
|
|
4498
|
+
return Xo(e, t);
|
|
4484
4499
|
}), o = a[0], s = a[1], c = a[2];
|
|
4485
4500
|
return o.length && (n.beforeNS[i] = o), s.length && (n.duringNS[i] = s), c.length && (n.afterNS[i] = c), n;
|
|
4486
4501
|
}, {
|
|
@@ -4492,7 +4507,7 @@ function ns(e, t, n) {
|
|
|
4492
4507
|
afterNS: {}
|
|
4493
4508
|
});
|
|
4494
4509
|
}(o, l);
|
|
4495
|
-
return Promise.resolve(
|
|
4510
|
+
return Promise.resolve(Wo({
|
|
4496
4511
|
action: e,
|
|
4497
4512
|
data: {
|
|
4498
4513
|
exact: d.before,
|
|
@@ -4507,7 +4522,7 @@ function ns(e, t, n) {
|
|
|
4507
4522
|
})).then(function(e) {
|
|
4508
4523
|
function t() {
|
|
4509
4524
|
var t = function() {
|
|
4510
|
-
if (o.match(
|
|
4525
|
+
if (o.match(Go)) return Promise.resolve(Wo({
|
|
4511
4526
|
action: X({}, l, { type: s + "End" }),
|
|
4512
4527
|
data: {
|
|
4513
4528
|
exact: d.after,
|
|
@@ -4520,16 +4535,16 @@ function ns(e, t, n) {
|
|
|
4520
4535
|
store: r,
|
|
4521
4536
|
EVENTS: i
|
|
4522
4537
|
})).then(function(e) {
|
|
4523
|
-
e.meta && e.meta.hasCallback &&
|
|
4538
|
+
e.meta && e.meta.hasCallback && Bo(e.meta.rid, { payload: e });
|
|
4524
4539
|
});
|
|
4525
4540
|
}();
|
|
4526
4541
|
return t && t.then ? t.then(function() {
|
|
4527
4542
|
return e;
|
|
4528
4543
|
}) : e;
|
|
4529
4544
|
}
|
|
4530
|
-
if (
|
|
4545
|
+
if ($o(e, u.length)) return e;
|
|
4531
4546
|
var l, f = function() {
|
|
4532
|
-
if (o !== s) return Promise.resolve(
|
|
4547
|
+
if (o !== s) return Promise.resolve(Wo({
|
|
4533
4548
|
action: X({}, e, { type: s }),
|
|
4534
4549
|
data: {
|
|
4535
4550
|
exact: d.during,
|
|
@@ -4565,7 +4580,7 @@ function ns(e, t, n) {
|
|
|
4565
4580
|
};
|
|
4566
4581
|
};
|
|
4567
4582
|
}
|
|
4568
|
-
function
|
|
4583
|
+
function as(e) {
|
|
4569
4584
|
return function(t) {
|
|
4570
4585
|
return function(t) {
|
|
4571
4586
|
return function(n) {
|
|
@@ -4579,7 +4594,7 @@ function rs(e) {
|
|
|
4579
4594
|
};
|
|
4580
4595
|
};
|
|
4581
4596
|
}
|
|
4582
|
-
var
|
|
4597
|
+
var os = function() {
|
|
4583
4598
|
var e = this;
|
|
4584
4599
|
this.before = [], this.after = [], this.addMiddleware = function(t, n) {
|
|
4585
4600
|
e[n] = e[n].concat(t);
|
|
@@ -4600,19 +4615,19 @@ var is = function() {
|
|
|
4600
4615
|
}, o = e[t].map(function(e) {
|
|
4601
4616
|
return e(a);
|
|
4602
4617
|
});
|
|
4603
|
-
return
|
|
4618
|
+
return xo.apply(void 0, o)(r)(i);
|
|
4604
4619
|
};
|
|
4605
4620
|
};
|
|
4606
4621
|
};
|
|
4607
4622
|
};
|
|
4608
4623
|
};
|
|
4609
|
-
function
|
|
4624
|
+
function ss(e) {
|
|
4610
4625
|
return function(t, n) {
|
|
4611
4626
|
t === void 0 && (t = {});
|
|
4612
4627
|
var r = {};
|
|
4613
4628
|
if (n.type === "initialize:aborted") return t;
|
|
4614
4629
|
if (/^registerPlugin:([^:]*)$/.test(n.type)) {
|
|
4615
|
-
var i =
|
|
4630
|
+
var i = cs(n.type, "registerPlugin"), a = e()[i];
|
|
4616
4631
|
if (!a || !i) return t;
|
|
4617
4632
|
var o = n.enabled, s = a.config;
|
|
4618
4633
|
return r[i] = {
|
|
@@ -4623,7 +4638,7 @@ function as(e) {
|
|
|
4623
4638
|
}, X({}, t, r);
|
|
4624
4639
|
}
|
|
4625
4640
|
if (/^initialize:([^:]*)$/.test(n.type)) {
|
|
4626
|
-
var c =
|
|
4641
|
+
var c = cs(n.type, Z.initialize), l = e()[c];
|
|
4627
4642
|
return l && c ? (r[c] = X({}, t[c], {
|
|
4628
4643
|
initialized: !0,
|
|
4629
4644
|
loaded: !!l.loaded({ config: l.config })
|
|
@@ -4631,35 +4646,35 @@ function as(e) {
|
|
|
4631
4646
|
}
|
|
4632
4647
|
if (/^ready:([^:]*)$/.test(n.type)) return r[n.name] = X({}, t[n.name], { loaded: !0 }), X({}, t, r);
|
|
4633
4648
|
switch (n.type) {
|
|
4634
|
-
case Z.disablePlugin: return X({}, t,
|
|
4635
|
-
case Z.enablePlugin: return X({}, t,
|
|
4649
|
+
case Z.disablePlugin: return X({}, t, ls(n.plugins, !1, t));
|
|
4650
|
+
case Z.enablePlugin: return X({}, t, ls(n.plugins, !0, t));
|
|
4636
4651
|
default: return t;
|
|
4637
4652
|
}
|
|
4638
4653
|
};
|
|
4639
4654
|
}
|
|
4640
|
-
function
|
|
4655
|
+
function cs(e, t) {
|
|
4641
4656
|
return e.substring(t.length + 1, e.length);
|
|
4642
4657
|
}
|
|
4643
|
-
function
|
|
4658
|
+
function ls(e, t, n) {
|
|
4644
4659
|
return e.reduce(function(e, r) {
|
|
4645
4660
|
return e[r] = X({}, n[r], { enabled: t }), e;
|
|
4646
4661
|
}, n);
|
|
4647
4662
|
}
|
|
4648
|
-
function
|
|
4663
|
+
function us(e) {
|
|
4649
4664
|
try {
|
|
4650
4665
|
return JSON.parse(JSON.stringify(e));
|
|
4651
4666
|
} catch {}
|
|
4652
4667
|
return e;
|
|
4653
4668
|
}
|
|
4654
|
-
var
|
|
4669
|
+
var ds = {
|
|
4655
4670
|
last: {},
|
|
4656
4671
|
history: []
|
|
4657
4672
|
};
|
|
4658
|
-
function
|
|
4659
|
-
e === void 0 && (e =
|
|
4673
|
+
function fs(e, t) {
|
|
4674
|
+
e === void 0 && (e = ds);
|
|
4660
4675
|
var n = t.options, r = t.meta;
|
|
4661
4676
|
if (t.type === Z.track) {
|
|
4662
|
-
var i =
|
|
4677
|
+
var i = us(X({
|
|
4663
4678
|
event: t.event,
|
|
4664
4679
|
properties: t.properties
|
|
4665
4680
|
}, Object.keys(n).length && { options: n }, { meta: r }));
|
|
@@ -4670,9 +4685,9 @@ function us(e, t) {
|
|
|
4670
4685
|
}
|
|
4671
4686
|
return e;
|
|
4672
4687
|
}
|
|
4673
|
-
var
|
|
4674
|
-
function
|
|
4675
|
-
e === void 0 && (e =
|
|
4688
|
+
var ps = { actions: [] };
|
|
4689
|
+
function ms(e, t) {
|
|
4690
|
+
e === void 0 && (e = ps);
|
|
4676
4691
|
var n = t.payload;
|
|
4677
4692
|
switch (t.type) {
|
|
4678
4693
|
case "queue":
|
|
@@ -4682,12 +4697,12 @@ function fs(e, t) {
|
|
|
4682
4697
|
default: return e;
|
|
4683
4698
|
}
|
|
4684
4699
|
}
|
|
4685
|
-
var
|
|
4686
|
-
function
|
|
4700
|
+
var hs = /#.*$/;
|
|
4701
|
+
function gs(e) {
|
|
4687
4702
|
var t = /(http[s]?:\/\/)?([^\/\s]+\/)(.*)/g.exec(e);
|
|
4688
|
-
return "/" + (t && t[3] ? t[3].split("?")[0].replace(
|
|
4703
|
+
return "/" + (t && t[3] ? t[3].split("?")[0].replace(hs, "") : "");
|
|
4689
4704
|
}
|
|
4690
|
-
var
|
|
4705
|
+
var _s, vs, ys, bs, xs = function(e) {
|
|
4691
4706
|
if (e === void 0 && (e = {}), !Y) return e;
|
|
4692
4707
|
var t = document, n = t.title, r = t.referrer, i = window, a = i.location, o = i.innerWidth, s = i.innerHeight, c = a.hash, l = a.search, u = function(e) {
|
|
4693
4708
|
var t = function() {
|
|
@@ -4695,26 +4710,26 @@ var hs, gs, _s, vs, ys = function(e) {
|
|
|
4695
4710
|
for (var e, t = document.getElementsByTagName("link"), n = 0; e = t[n]; n++) if (e.getAttribute("rel") === "canonical") return e.getAttribute("href");
|
|
4696
4711
|
}
|
|
4697
4712
|
}();
|
|
4698
|
-
return t ? t.match(/\?/) ? t : t + e : window.location.href.replace(
|
|
4713
|
+
return t ? t.match(/\?/) ? t : t + e : window.location.href.replace(hs, "");
|
|
4699
4714
|
}(l), d = {
|
|
4700
4715
|
title: n,
|
|
4701
4716
|
url: u,
|
|
4702
|
-
path:
|
|
4717
|
+
path: gs(u),
|
|
4703
4718
|
hash: c,
|
|
4704
4719
|
search: l,
|
|
4705
4720
|
width: o,
|
|
4706
4721
|
height: s
|
|
4707
4722
|
};
|
|
4708
4723
|
return r && r !== "" && (d.referrer = r), X({}, d, e);
|
|
4709
|
-
},
|
|
4724
|
+
}, Ss = {
|
|
4710
4725
|
last: {},
|
|
4711
4726
|
history: []
|
|
4712
4727
|
};
|
|
4713
|
-
function
|
|
4714
|
-
e === void 0 && (e =
|
|
4728
|
+
function Cs(e, t) {
|
|
4729
|
+
e === void 0 && (e = Ss);
|
|
4715
4730
|
var n = t.options;
|
|
4716
4731
|
if (t.type === Z.page) {
|
|
4717
|
-
var r =
|
|
4732
|
+
var r = us(X({
|
|
4718
4733
|
properties: t.properties,
|
|
4719
4734
|
meta: t.meta
|
|
4720
4735
|
}, Object.keys(n).length && { options: n }));
|
|
@@ -4725,45 +4740,45 @@ function xs(e, t) {
|
|
|
4725
4740
|
}
|
|
4726
4741
|
return e;
|
|
4727
4742
|
}
|
|
4728
|
-
|
|
4743
|
+
_s = function() {
|
|
4729
4744
|
if (!Y) return !1;
|
|
4730
4745
|
var e = navigator.appVersion;
|
|
4731
4746
|
return ~e.indexOf("Win") ? "Windows" : ~e.indexOf("Mac") ? "MacOS" : ~e.indexOf("X11") ? "UNIX" : ~e.indexOf("Linux") ? "Linux" : "Unknown OS";
|
|
4732
|
-
}(),
|
|
4733
|
-
var
|
|
4747
|
+
}(), vs = Y ? document.referrer : null, ys = Ya(), bs = Xa();
|
|
4748
|
+
var ws = {
|
|
4734
4749
|
initialized: !1,
|
|
4735
|
-
sessionId:
|
|
4750
|
+
sessionId: $a(),
|
|
4736
4751
|
app: null,
|
|
4737
4752
|
version: null,
|
|
4738
4753
|
debug: !1,
|
|
4739
4754
|
offline: !!Y && !navigator.onLine,
|
|
4740
|
-
os: { name:
|
|
4755
|
+
os: { name: _s },
|
|
4741
4756
|
userAgent: Y ? navigator.userAgent : "node",
|
|
4742
4757
|
library: {
|
|
4743
|
-
name:
|
|
4758
|
+
name: Eo,
|
|
4744
4759
|
version: "0.13.1"
|
|
4745
4760
|
},
|
|
4746
|
-
timezone:
|
|
4747
|
-
locale:
|
|
4761
|
+
timezone: bs,
|
|
4762
|
+
locale: ys,
|
|
4748
4763
|
campaign: {},
|
|
4749
|
-
referrer:
|
|
4764
|
+
referrer: vs
|
|
4750
4765
|
};
|
|
4751
|
-
function
|
|
4752
|
-
e === void 0 && (e =
|
|
4766
|
+
function Ts(e, t) {
|
|
4767
|
+
e === void 0 && (e = ws);
|
|
4753
4768
|
var n = e.initialized, r = t.campaign;
|
|
4754
4769
|
switch (t.type) {
|
|
4755
4770
|
case Z.campaign: return X({}, e, { campaign: r });
|
|
4756
4771
|
case Z.offline: return X({}, e, { offline: !0 });
|
|
4757
4772
|
case Z.online: return X({}, e, { offline: !1 });
|
|
4758
|
-
default: return n ? e : X({},
|
|
4773
|
+
default: return n ? e : X({}, ws, e, { initialized: !0 });
|
|
4759
4774
|
}
|
|
4760
4775
|
}
|
|
4761
|
-
var
|
|
4776
|
+
var Es = [
|
|
4762
4777
|
"plugins",
|
|
4763
4778
|
"reducers",
|
|
4764
4779
|
"storage"
|
|
4765
4780
|
];
|
|
4766
|
-
function
|
|
4781
|
+
function Ds(e, t, n) {
|
|
4767
4782
|
if (Y) {
|
|
4768
4783
|
var r = window[(n ? "add" : "remove") + "EventListener"];
|
|
4769
4784
|
e.split(" ").forEach(function(e) {
|
|
@@ -4771,37 +4786,37 @@ function Ts(e, t, n) {
|
|
|
4771
4786
|
});
|
|
4772
4787
|
}
|
|
4773
4788
|
}
|
|
4774
|
-
function
|
|
4775
|
-
var t =
|
|
4789
|
+
function Os(e) {
|
|
4790
|
+
var t = Ds.bind(null, "online offline", function(t) {
|
|
4776
4791
|
return Promise.resolve(!navigator.onLine).then(e);
|
|
4777
4792
|
});
|
|
4778
4793
|
return t(!0), function(e) {
|
|
4779
4794
|
return t(!1);
|
|
4780
4795
|
};
|
|
4781
4796
|
}
|
|
4782
|
-
function
|
|
4783
|
-
return
|
|
4797
|
+
function ks() {
|
|
4798
|
+
return ao(Eo, []), function(e) {
|
|
4784
4799
|
return function(t, n, r) {
|
|
4785
4800
|
var i = e(t, n, r), a = i.dispatch;
|
|
4786
4801
|
return Object.assign(i, { dispatch: function(e) {
|
|
4787
|
-
return
|
|
4802
|
+
return ro[no][Eo].push(e.action || e), a(e);
|
|
4788
4803
|
} });
|
|
4789
4804
|
};
|
|
4790
4805
|
};
|
|
4791
4806
|
}
|
|
4792
|
-
function
|
|
4807
|
+
function As(e) {
|
|
4793
4808
|
return function() {
|
|
4794
|
-
return
|
|
4809
|
+
return xo(xo.apply(null, arguments), ks());
|
|
4795
4810
|
};
|
|
4796
4811
|
}
|
|
4797
|
-
function
|
|
4798
|
-
return e ?
|
|
4812
|
+
function js(e) {
|
|
4813
|
+
return e ? Ra(e) ? e : [e] : [];
|
|
4799
4814
|
}
|
|
4800
|
-
function
|
|
4815
|
+
function Ms(e, t, n) {
|
|
4801
4816
|
e === void 0 && (e = {});
|
|
4802
|
-
var r, i, a =
|
|
4803
|
-
return t && (
|
|
4804
|
-
for (var t, n = e || Array.prototype.slice.call(arguments), r = 0; r < n.length; r++) if (
|
|
4817
|
+
var r, i, a = $a();
|
|
4818
|
+
return t && (zo[a] = (r = t, i = function(e) {
|
|
4819
|
+
for (var t, n = e || Array.prototype.slice.call(arguments), r = 0; r < n.length; r++) if (Ma(n[r])) {
|
|
4805
4820
|
t = n[r];
|
|
4806
4821
|
break;
|
|
4807
4822
|
}
|
|
@@ -4813,10 +4828,10 @@ function As(e, t, n) {
|
|
|
4813
4828
|
ts: (/* @__PURE__ */ new Date()).getTime()
|
|
4814
4829
|
}, t ? { hasCallback: !0 } : {});
|
|
4815
4830
|
}
|
|
4816
|
-
function
|
|
4831
|
+
function Ns(e) {
|
|
4817
4832
|
e === void 0 && (e = {});
|
|
4818
4833
|
var t = e.reducers || {}, n = e.initialUser || {}, r = (e.plugins || []).reduce(function(e, t) {
|
|
4819
|
-
if (
|
|
4834
|
+
if (Ma(t)) return e.middlewares = e.middlewares.concat(t), e;
|
|
4820
4835
|
if (t.NAMESPACE && (t.name = t.NAMESPACE), !t.name) throw Error("https://lytics.dev/errors/1");
|
|
4821
4836
|
t.config ||= {};
|
|
4822
4837
|
var n = t.EVENTS ? Object.keys(t.EVENTS).map(function(e) {
|
|
@@ -4842,29 +4857,29 @@ function js(e) {
|
|
|
4842
4857
|
middlewares: [],
|
|
4843
4858
|
events: []
|
|
4844
4859
|
}), i = e.storage ? e.storage : {
|
|
4845
|
-
getItem:
|
|
4846
|
-
setItem:
|
|
4847
|
-
removeItem:
|
|
4860
|
+
getItem: io,
|
|
4861
|
+
setItem: ao,
|
|
4862
|
+
removeItem: oo
|
|
4848
4863
|
}, a = function(e) {
|
|
4849
4864
|
return function(t, n, r) {
|
|
4850
|
-
return n.getState("user")[t] || (r &&
|
|
4865
|
+
return n.getState("user")[t] || (r && za(r) && r[t] ? r[t] : Io(e)[t] || io(Lo(t)) || null);
|
|
4851
4866
|
};
|
|
4852
4867
|
}(i), o = r.plugins, s = r.events.filter(function(e) {
|
|
4853
|
-
return !
|
|
4854
|
-
}).sort(), c = new Set(s.concat(
|
|
4855
|
-
return !
|
|
4868
|
+
return !Ao.includes(e);
|
|
4869
|
+
}).sort(), c = new Set(s.concat(ko).filter(function(e) {
|
|
4870
|
+
return !Ao.includes(e);
|
|
4856
4871
|
})), l = Array.from(c).sort(), u = function() {
|
|
4857
4872
|
return o;
|
|
4858
|
-
}, d = new
|
|
4873
|
+
}, d = new os(), f = d.addMiddleware, p = d.removeMiddleware, m = d.dynamicMiddlewares, h = function() {
|
|
4859
4874
|
throw Error("Abort disabled inListener");
|
|
4860
|
-
}, g =
|
|
4861
|
-
v.anonymousId ||=
|
|
4875
|
+
}, g = Za(), _ = Io(i), v = X({}, _, n, g.an_uid ? { userId: g.an_uid } : {}, g.an_aid ? { anonymousId: g.an_aid } : {});
|
|
4876
|
+
v.anonymousId ||= $a();
|
|
4862
4877
|
var y = X({
|
|
4863
4878
|
enable: function(e, t) {
|
|
4864
4879
|
return new Promise(function(n) {
|
|
4865
4880
|
A.dispatch({
|
|
4866
4881
|
type: Z.enablePlugin,
|
|
4867
|
-
plugins:
|
|
4882
|
+
plugins: js(e),
|
|
4868
4883
|
_: { originalAction: Z.enablePlugin }
|
|
4869
4884
|
}, n, [t]);
|
|
4870
4885
|
});
|
|
@@ -4873,7 +4888,7 @@ function js(e) {
|
|
|
4873
4888
|
return new Promise(function(n) {
|
|
4874
4889
|
A.dispatch({
|
|
4875
4890
|
type: Z.disablePlugin,
|
|
4876
|
-
plugins:
|
|
4891
|
+
plugins: js(e),
|
|
4877
4892
|
_: { originalAction: Z.disablePlugin }
|
|
4878
4893
|
}, n, [t]);
|
|
4879
4894
|
});
|
|
@@ -4881,9 +4896,9 @@ function js(e) {
|
|
|
4881
4896
|
}, r.methods), b = !1, x = {
|
|
4882
4897
|
identify: function(e, t, n, r) {
|
|
4883
4898
|
try {
|
|
4884
|
-
var i =
|
|
4885
|
-
|
|
4886
|
-
var l = i || o.userId || a(
|
|
4899
|
+
var i = Na(e) ? e : null, o = za(e) ? e : t, s = n || {}, c = x.user();
|
|
4900
|
+
ao(Lo(Do), i);
|
|
4901
|
+
var l = i || o.userId || a(Do, x, o);
|
|
4887
4902
|
return Promise.resolve(new Promise(function(e) {
|
|
4888
4903
|
A.dispatch(X({
|
|
4889
4904
|
type: Z.identifyStart,
|
|
@@ -4903,17 +4918,17 @@ function js(e) {
|
|
|
4903
4918
|
},
|
|
4904
4919
|
track: function(e, t, n, r) {
|
|
4905
4920
|
try {
|
|
4906
|
-
var i =
|
|
4907
|
-
if (!i || !
|
|
4908
|
-
var o =
|
|
4921
|
+
var i = za(e) ? e.event : e;
|
|
4922
|
+
if (!i || !Na(i)) throw Error("EventMissing");
|
|
4923
|
+
var o = za(e) ? e : t || {}, s = za(n) ? n : {};
|
|
4909
4924
|
return Promise.resolve(new Promise(function(e) {
|
|
4910
4925
|
A.dispatch({
|
|
4911
4926
|
type: Z.trackStart,
|
|
4912
4927
|
event: i,
|
|
4913
4928
|
properties: o,
|
|
4914
4929
|
options: s,
|
|
4915
|
-
userId: a(
|
|
4916
|
-
anonymousId: a(
|
|
4930
|
+
userId: a(Do, x, t),
|
|
4931
|
+
anonymousId: a(Oo, x, t)
|
|
4917
4932
|
}, e, [
|
|
4918
4933
|
t,
|
|
4919
4934
|
n,
|
|
@@ -4926,14 +4941,14 @@ function js(e) {
|
|
|
4926
4941
|
},
|
|
4927
4942
|
page: function(e, t, n) {
|
|
4928
4943
|
try {
|
|
4929
|
-
var r =
|
|
4944
|
+
var r = za(e) ? e : {}, i = za(t) ? t : {};
|
|
4930
4945
|
return Promise.resolve(new Promise(function(o) {
|
|
4931
4946
|
A.dispatch({
|
|
4932
4947
|
type: Z.pageStart,
|
|
4933
|
-
properties:
|
|
4948
|
+
properties: xs(r),
|
|
4934
4949
|
options: i,
|
|
4935
|
-
userId: a(
|
|
4936
|
-
anonymousId: a(
|
|
4950
|
+
userId: a(Do, x, r),
|
|
4951
|
+
anonymousId: a(Oo, x, r)
|
|
4937
4952
|
}, o, [
|
|
4938
4953
|
e,
|
|
4939
4954
|
t,
|
|
@@ -4945,10 +4960,10 @@ function js(e) {
|
|
|
4945
4960
|
}
|
|
4946
4961
|
},
|
|
4947
4962
|
user: function(e) {
|
|
4948
|
-
if (e ===
|
|
4949
|
-
if (e ===
|
|
4963
|
+
if (e === Do || e === "id") return a(Do, x);
|
|
4964
|
+
if (e === Oo || e === "anonId") return a(Oo, x);
|
|
4950
4965
|
var t = x.getState("user");
|
|
4951
|
-
return e ? (0,
|
|
4966
|
+
return e ? (0, fa.default)(t, e) : t;
|
|
4952
4967
|
},
|
|
4953
4968
|
reset: function(e) {
|
|
4954
4969
|
return new Promise(function(t) {
|
|
@@ -4964,7 +4979,7 @@ function js(e) {
|
|
|
4964
4979
|
});
|
|
4965
4980
|
},
|
|
4966
4981
|
on: function(e, t) {
|
|
4967
|
-
if (!e || !
|
|
4982
|
+
if (!e || !Ma(t)) return !1;
|
|
4968
4983
|
if (e === Z.bootstrap) throw Error(".on disabled for " + e);
|
|
4969
4984
|
var n = /Start$|Start:/;
|
|
4970
4985
|
if (e === "*") {
|
|
@@ -4989,11 +5004,11 @@ function js(e) {
|
|
|
4989
5004
|
};
|
|
4990
5005
|
};
|
|
4991
5006
|
};
|
|
4992
|
-
return f(r,
|
|
4993
|
-
p(r,
|
|
5007
|
+
return f(r, Ps), f(i, Fs), function() {
|
|
5008
|
+
p(r, Ps), p(i, Fs);
|
|
4994
5009
|
};
|
|
4995
5010
|
}
|
|
4996
|
-
var a = e.match(n) ?
|
|
5011
|
+
var a = e.match(n) ? Ps : Fs, s = function(n) {
|
|
4997
5012
|
return function(n) {
|
|
4998
5013
|
return function(r) {
|
|
4999
5014
|
return r.type === e && t({
|
|
@@ -5010,7 +5025,7 @@ function js(e) {
|
|
|
5010
5025
|
};
|
|
5011
5026
|
},
|
|
5012
5027
|
once: function(e, t) {
|
|
5013
|
-
if (!e || !
|
|
5028
|
+
if (!e || !Ma(t)) return !1;
|
|
5014
5029
|
if (e === Z.bootstrap) throw Error(".once disabled for " + e);
|
|
5015
5030
|
var n = x.on(e, function(e) {
|
|
5016
5031
|
t({
|
|
@@ -5024,11 +5039,11 @@ function js(e) {
|
|
|
5024
5039
|
},
|
|
5025
5040
|
getState: function(e) {
|
|
5026
5041
|
var t = A.getState();
|
|
5027
|
-
return e ? (0,
|
|
5042
|
+
return e ? (0, fa.default)(t, e) : Object.assign({}, t);
|
|
5028
5043
|
},
|
|
5029
5044
|
dispatch: function(e) {
|
|
5030
|
-
var t =
|
|
5031
|
-
if (
|
|
5045
|
+
var t = Na(e) ? { type: e } : e;
|
|
5046
|
+
if (ko.includes(t.type)) throw Error("reserved action " + t.type);
|
|
5032
5047
|
var n = X({}, t, { _: X({ originalAction: t.type }, e._ || {}) });
|
|
5033
5048
|
A.dispatch(n);
|
|
5034
5049
|
},
|
|
@@ -5054,49 +5069,49 @@ function js(e) {
|
|
|
5054
5069
|
}
|
|
5055
5070
|
},
|
|
5056
5071
|
setAnonymousId: function(e, t) {
|
|
5057
|
-
x.storage.setItem(
|
|
5072
|
+
x.storage.setItem(Co, e, t);
|
|
5058
5073
|
},
|
|
5059
5074
|
events: {
|
|
5060
|
-
core:
|
|
5075
|
+
core: ko,
|
|
5061
5076
|
plugins: s
|
|
5062
5077
|
}
|
|
5063
5078
|
}, S = r.middlewares.concat([
|
|
5064
5079
|
function(e) {
|
|
5065
5080
|
return function(e) {
|
|
5066
5081
|
return function(t) {
|
|
5067
|
-
return t.meta ||=
|
|
5082
|
+
return t.meta ||= Ms(), e(t);
|
|
5068
5083
|
};
|
|
5069
5084
|
};
|
|
5070
5085
|
},
|
|
5071
|
-
m(
|
|
5072
|
-
|
|
5086
|
+
m(Ps),
|
|
5087
|
+
is(x, u, {
|
|
5073
5088
|
all: l,
|
|
5074
5089
|
plugins: s
|
|
5075
5090
|
}),
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
m(
|
|
5091
|
+
as(i),
|
|
5092
|
+
Po(x),
|
|
5093
|
+
Ro(x),
|
|
5094
|
+
m(Fs)
|
|
5080
5095
|
]), C = {
|
|
5081
|
-
context:
|
|
5082
|
-
user:
|
|
5083
|
-
page:
|
|
5084
|
-
track:
|
|
5085
|
-
plugins:
|
|
5086
|
-
queue:
|
|
5087
|
-
}, w =
|
|
5096
|
+
context: Ts,
|
|
5097
|
+
user: Fo(i),
|
|
5098
|
+
page: Cs,
|
|
5099
|
+
track: fs,
|
|
5100
|
+
plugins: ss(u),
|
|
5101
|
+
queue: ms
|
|
5102
|
+
}, w = xo, T = xo;
|
|
5088
5103
|
if (Y && e.debug) {
|
|
5089
5104
|
var E = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;
|
|
5090
5105
|
E && (w = E({
|
|
5091
5106
|
trace: !0,
|
|
5092
5107
|
traceLimit: 25
|
|
5093
5108
|
})), T = function() {
|
|
5094
|
-
return arguments.length === 0 ?
|
|
5109
|
+
return arguments.length === 0 ? ks() : za(typeof arguments[0]) ? As() : As().apply(null, arguments);
|
|
5095
5110
|
};
|
|
5096
5111
|
}
|
|
5097
5112
|
var D, O = function(e) {
|
|
5098
5113
|
return Object.keys(e).reduce(function(t, n) {
|
|
5099
|
-
return
|
|
5114
|
+
return Es.includes(n) || (t[n] = e[n]), t;
|
|
5100
5115
|
}, {});
|
|
5101
5116
|
}(e), k = {
|
|
5102
5117
|
context: O,
|
|
@@ -5110,17 +5125,17 @@ function js(e) {
|
|
|
5110
5125
|
config: i
|
|
5111
5126
|
}, e;
|
|
5112
5127
|
}, {})
|
|
5113
|
-
}, A =
|
|
5128
|
+
}, A = yo(function(e) {
|
|
5114
5129
|
for (var t = Object.keys(e), n = {}, r = 0; r < t.length; r++) {
|
|
5115
5130
|
var i = t[r];
|
|
5116
|
-
typeof e[i] ===
|
|
5131
|
+
typeof e[i] === uo && (n[i] = e[i]);
|
|
5117
5132
|
}
|
|
5118
5133
|
var a, o = Object.keys(n);
|
|
5119
5134
|
try {
|
|
5120
5135
|
(function(e) {
|
|
5121
5136
|
Object.keys(e).forEach(function(t) {
|
|
5122
5137
|
var n = e[t];
|
|
5123
|
-
if (typeof n(void 0, { type:
|
|
5138
|
+
if (typeof n(void 0, { type: ho }) === fo || typeof n(void 0, { type: go }) === fo) throw Error(po + " " + t + " " + fo);
|
|
5124
5139
|
});
|
|
5125
5140
|
})(n);
|
|
5126
5141
|
} catch (e) {
|
|
@@ -5130,17 +5145,17 @@ function js(e) {
|
|
|
5130
5145
|
if (e === void 0 && (e = {}), a) throw a;
|
|
5131
5146
|
for (var r = !1, i = {}, s = 0; s < o.length; s++) {
|
|
5132
5147
|
var c = o[s], l = e[c], u = (0, n[c])(l, t);
|
|
5133
|
-
if (typeof u ===
|
|
5134
|
-
var d =
|
|
5148
|
+
if (typeof u === fo) {
|
|
5149
|
+
var d = bo(c, t);
|
|
5135
5150
|
throw Error(d);
|
|
5136
5151
|
}
|
|
5137
5152
|
i[c] = u, r ||= u !== l;
|
|
5138
5153
|
}
|
|
5139
5154
|
return r ? i : e;
|
|
5140
5155
|
};
|
|
5141
|
-
}(X({}, C, t)), k, T(w(
|
|
5156
|
+
}(X({}, C, t)), k, T(w(So.apply(void 0, S))));
|
|
5142
5157
|
A.dispatch = (D = A.dispatch, function(e, t, n) {
|
|
5143
|
-
var r = X({}, e, { meta:
|
|
5158
|
+
var r = X({}, e, { meta: Ms(e.meta, t, js(n)) });
|
|
5144
5159
|
return D.apply(null, [r]);
|
|
5145
5160
|
});
|
|
5146
5161
|
var j = Object.keys(o);
|
|
@@ -5164,7 +5179,7 @@ function js(e) {
|
|
|
5164
5179
|
enabled: r.pluginEnabled
|
|
5165
5180
|
}), r.pluginsArray.map(function(e, t) {
|
|
5166
5181
|
var n = e.bootstrap, i = e.config, a = e.name;
|
|
5167
|
-
n &&
|
|
5182
|
+
n && Ma(n) && n({
|
|
5168
5183
|
instance: x,
|
|
5169
5184
|
config: i,
|
|
5170
5185
|
payload: e
|
|
@@ -5178,64 +5193,64 @@ function js(e) {
|
|
|
5178
5193
|
plugins: M,
|
|
5179
5194
|
disabled: N
|
|
5180
5195
|
});
|
|
5181
|
-
}),
|
|
5196
|
+
}), Os(function(e) {
|
|
5182
5197
|
A.dispatch({ type: e ? Z.offline : Z.online });
|
|
5183
5198
|
}), function(e, t, n) {
|
|
5184
5199
|
setInterval(function() {
|
|
5185
|
-
return
|
|
5200
|
+
return Uo(e, t, n);
|
|
5186
5201
|
}, 3e3);
|
|
5187
5202
|
}(A, u, x), x;
|
|
5188
5203
|
}
|
|
5189
|
-
var
|
|
5190
|
-
function
|
|
5191
|
-
return
|
|
5204
|
+
var Ps = "before", Fs = "after", Is = "cookie", Ls = Vs(), Rs = Hs, zs = Hs;
|
|
5205
|
+
function Bs(e) {
|
|
5206
|
+
return Ls ? Hs(e, "", -1) : oo(e);
|
|
5192
5207
|
}
|
|
5193
|
-
function
|
|
5194
|
-
if (
|
|
5195
|
-
var e =
|
|
5208
|
+
function Vs() {
|
|
5209
|
+
if (Ls !== void 0) return Ls;
|
|
5210
|
+
var e = Is + Is;
|
|
5196
5211
|
try {
|
|
5197
|
-
|
|
5212
|
+
Hs(e, e), Ls = document.cookie.indexOf(e) !== -1, Bs(e);
|
|
5198
5213
|
} catch {
|
|
5199
|
-
|
|
5214
|
+
Ls = !1;
|
|
5200
5215
|
}
|
|
5201
|
-
return
|
|
5216
|
+
return Ls;
|
|
5202
5217
|
}
|
|
5203
|
-
function
|
|
5218
|
+
function Hs(e, t, n, r, i, a) {
|
|
5204
5219
|
if (typeof window < "u") {
|
|
5205
5220
|
var o = arguments.length > 1;
|
|
5206
|
-
return !1 ===
|
|
5221
|
+
return !1 === Ls && (o ? ao(e, t) : io(e)), o ? document.cookie = e + "=" + encodeURIComponent(t) + (n ? "; expires=" + (/* @__PURE__ */ new Date(+/* @__PURE__ */ new Date() + 1e3 * n)).toUTCString() + (r ? "; path=" + r : "") + (i ? "; domain=" + i : "") + (a ? "; secure" : "") : "") : decodeURIComponent((("; " + document.cookie).split("; " + e + "=")[1] || "").split(";")[0]);
|
|
5207
5222
|
}
|
|
5208
5223
|
}
|
|
5209
5224
|
//#endregion
|
|
5210
5225
|
//#region ../../node_modules/.pnpm/@analytics+localstorage-utils@0.1.12/node_modules/@analytics/localstorage-utils/dist/analytics-util-localstorage.module.js
|
|
5211
|
-
var
|
|
5212
|
-
|
|
5226
|
+
var Us = "localStorage", Ws = lo.bind(null, Us);
|
|
5227
|
+
so(Us, "getItem", io), so(Us, "setItem", ao), so(Us, "removeItem", oo);
|
|
5213
5228
|
//#endregion
|
|
5214
5229
|
//#region ../../node_modules/.pnpm/@analytics+session-storage-utils@0.0.9/node_modules/@analytics/session-storage-utils/dist/analytics-util-session-storage.module.js
|
|
5215
|
-
var
|
|
5216
|
-
|
|
5230
|
+
var Gs = "sessionStorage", Ks = lo.bind(null, Gs);
|
|
5231
|
+
so(Gs, "getItem", io), so(Gs, "setItem", ao), so(Gs, "removeItem", oo);
|
|
5217
5232
|
//#endregion
|
|
5218
5233
|
//#region ../../node_modules/.pnpm/@analytics+storage-utils@0.4.4/node_modules/@analytics/storage-utils/dist/analytics-util-storage.module.js
|
|
5219
|
-
function
|
|
5234
|
+
function qs(e) {
|
|
5220
5235
|
var t = e;
|
|
5221
5236
|
try {
|
|
5222
5237
|
if ((t = JSON.parse(e)) === "true") return !0;
|
|
5223
5238
|
if (t === "false") return !1;
|
|
5224
|
-
if (
|
|
5239
|
+
if (za(t)) return t;
|
|
5225
5240
|
parseFloat(t) === t && (t = parseFloat(t));
|
|
5226
5241
|
} catch {}
|
|
5227
5242
|
if (t !== null && t !== "") return t;
|
|
5228
5243
|
}
|
|
5229
|
-
var
|
|
5230
|
-
function
|
|
5244
|
+
var Js = Ws(), Ys = Ks(), Xs = Vs();
|
|
5245
|
+
function Zs(e, t) {
|
|
5231
5246
|
if (e) {
|
|
5232
|
-
var n =
|
|
5233
|
-
if (r && !
|
|
5234
|
-
var a =
|
|
5247
|
+
var n = ec(t), r = !ic(n), i = tc(n) ? qs(localStorage.getItem(e)) : void 0;
|
|
5248
|
+
if (r && !Pa(i)) return i;
|
|
5249
|
+
var a = nc(n) ? qs(Rs(e)) : void 0;
|
|
5235
5250
|
if (r && a) return a;
|
|
5236
|
-
var o =
|
|
5251
|
+
var o = rc(n) ? qs(sessionStorage.getItem(e)) : void 0;
|
|
5237
5252
|
if (r && o) return o;
|
|
5238
|
-
var s =
|
|
5253
|
+
var s = io(e);
|
|
5239
5254
|
return r ? s : {
|
|
5240
5255
|
localStorage: i,
|
|
5241
5256
|
sessionStorage: o,
|
|
@@ -5244,51 +5259,51 @@ function Ys(e, t) {
|
|
|
5244
5259
|
};
|
|
5245
5260
|
}
|
|
5246
5261
|
}
|
|
5247
|
-
function
|
|
5248
|
-
if (e && !
|
|
5249
|
-
var r = {}, i =
|
|
5250
|
-
return
|
|
5262
|
+
function Qs(e, t, n) {
|
|
5263
|
+
if (e && !Pa(t)) {
|
|
5264
|
+
var r = {}, i = ec(n), a = JSON.stringify(t), o = !ic(i);
|
|
5265
|
+
return tc(i) && (r.localStorage = oc("localStorage", t, qs(localStorage.getItem(e))), localStorage.setItem(e, a), o) ? r[Us] : nc(i) && (r.cookie = oc("cookie", t, qs(Rs(e))), zs(e, a), o) ? r[Is] : rc(i) && (r.sessionStorage = oc("sessionStorage", t, qs(sessionStorage.getItem(e))), sessionStorage.setItem(e, a), o) ? r[Gs] : (r[to] = oc(to, t, io(e)), ao(e, t), o ? r[to] : r);
|
|
5251
5266
|
}
|
|
5252
5267
|
}
|
|
5253
|
-
function
|
|
5268
|
+
function $s(e, t) {
|
|
5254
5269
|
if (e) {
|
|
5255
|
-
var n =
|
|
5256
|
-
return !
|
|
5270
|
+
var n = ec(t), r = Zs(e, "*"), i = {};
|
|
5271
|
+
return !Pa(r.localStorage) && tc(n) && (localStorage.removeItem(e), i.localStorage = r.localStorage), !Pa(r.cookie) && nc(n) && (Bs(e), i.cookie = r.cookie), !Pa(r.sessionStorage) && rc(n) && (sessionStorage.removeItem(e), i.sessionStorage = r.sessionStorage), !Pa(r.global) && ac(n, "global") && (oo(e), i.global = r.global), i;
|
|
5257
5272
|
}
|
|
5258
5273
|
}
|
|
5259
|
-
function Qs(e) {
|
|
5260
|
-
return e ? ja(e) ? e : e.storage : "any";
|
|
5261
|
-
}
|
|
5262
|
-
function $s(e) {
|
|
5263
|
-
return Ks && rc(e, "localStorage");
|
|
5264
|
-
}
|
|
5265
5274
|
function ec(e) {
|
|
5266
|
-
return
|
|
5275
|
+
return e ? Na(e) ? e : e.storage : "any";
|
|
5267
5276
|
}
|
|
5268
5277
|
function tc(e) {
|
|
5269
|
-
return
|
|
5278
|
+
return Js && ac(e, "localStorage");
|
|
5270
5279
|
}
|
|
5271
5280
|
function nc(e) {
|
|
5281
|
+
return Xs && ac(e, "cookie");
|
|
5282
|
+
}
|
|
5283
|
+
function rc(e) {
|
|
5284
|
+
return Ys && ac(e, "sessionStorage");
|
|
5285
|
+
}
|
|
5286
|
+
function ic(e) {
|
|
5272
5287
|
return e === "*" || e === "all";
|
|
5273
5288
|
}
|
|
5274
|
-
function
|
|
5275
|
-
return e === "any" || e === t ||
|
|
5289
|
+
function ac(e, t) {
|
|
5290
|
+
return e === "any" || e === t || ic(e);
|
|
5276
5291
|
}
|
|
5277
|
-
function
|
|
5292
|
+
function oc(e, t, n) {
|
|
5278
5293
|
return {
|
|
5279
5294
|
location: e,
|
|
5280
5295
|
current: t,
|
|
5281
5296
|
previous: n
|
|
5282
5297
|
};
|
|
5283
5298
|
}
|
|
5284
|
-
var
|
|
5285
|
-
setItem:
|
|
5286
|
-
getItem:
|
|
5287
|
-
removeItem:
|
|
5299
|
+
var sc = {
|
|
5300
|
+
setItem: Qs,
|
|
5301
|
+
getItem: Zs,
|
|
5302
|
+
removeItem: $s
|
|
5288
5303
|
};
|
|
5289
5304
|
//#endregion
|
|
5290
5305
|
//#region ../../node_modules/.pnpm/analytics@0.8.19_@types+dlv@1.1.5/node_modules/analytics/lib/analytics.browser.es.js
|
|
5291
|
-
function
|
|
5306
|
+
function cc(e, t, n) {
|
|
5292
5307
|
return t in e ? Object.defineProperty(e, t, {
|
|
5293
5308
|
value: n,
|
|
5294
5309
|
enumerable: !0,
|
|
@@ -5296,7 +5311,7 @@ function oc(e, t, n) {
|
|
|
5296
5311
|
writable: !0
|
|
5297
5312
|
}) : e[t] = n, e;
|
|
5298
5313
|
}
|
|
5299
|
-
function
|
|
5314
|
+
function lc(e, t) {
|
|
5300
5315
|
var n = Object.keys(e);
|
|
5301
5316
|
if (Object.getOwnPropertySymbols) {
|
|
5302
5317
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -5306,27 +5321,27 @@ function sc(e, t) {
|
|
|
5306
5321
|
}
|
|
5307
5322
|
return n;
|
|
5308
5323
|
}
|
|
5309
|
-
function
|
|
5324
|
+
function uc(e) {
|
|
5310
5325
|
for (var t = 1; t < arguments.length; t++) {
|
|
5311
5326
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
5312
|
-
t % 2 ?
|
|
5313
|
-
|
|
5314
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
5327
|
+
t % 2 ? lc(Object(n), !0).forEach(function(t) {
|
|
5328
|
+
cc(e, t, n[t]);
|
|
5329
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : lc(Object(n)).forEach(function(t) {
|
|
5315
5330
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
5316
5331
|
});
|
|
5317
5332
|
}
|
|
5318
5333
|
return e;
|
|
5319
5334
|
}
|
|
5320
|
-
function
|
|
5335
|
+
function dc() {
|
|
5321
5336
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
5322
|
-
return
|
|
5337
|
+
return Ns(uc(uc({}, { storage: sc }), e));
|
|
5323
5338
|
}
|
|
5324
5339
|
//#endregion
|
|
5325
5340
|
//#region package.json
|
|
5326
|
-
var
|
|
5341
|
+
var fc = "@sesamy/sesamy-js", pc = "1.121.0";
|
|
5327
5342
|
//#endregion
|
|
5328
5343
|
//#region src/services/analytics/listeners/route.ts
|
|
5329
|
-
function
|
|
5344
|
+
function mc(e) {
|
|
5330
5345
|
if (typeof window > "u") return;
|
|
5331
5346
|
let { addEventListener: t, history: n, location: r } = window, i = r.pathname;
|
|
5332
5347
|
t("popstate", () => e(r.pathname)), ["push", "replace"].map((t) => {
|
|
@@ -5334,56 +5349,56 @@ function fc(e) {
|
|
|
5334
5349
|
if (r !== "pushState" && r !== "replaceState") return;
|
|
5335
5350
|
let a = n[r];
|
|
5336
5351
|
n[r] = function(...t) {
|
|
5337
|
-
let r = t[2]?.toString() || "", o =
|
|
5352
|
+
let r = t[2]?.toString() || "", o = gc(r);
|
|
5338
5353
|
return i !== o && (i = o, setTimeout(() => e(r), 0)), a.apply(n, t);
|
|
5339
5354
|
};
|
|
5340
5355
|
});
|
|
5341
5356
|
}
|
|
5342
|
-
function
|
|
5357
|
+
function hc(e, t) {
|
|
5343
5358
|
let n = e.indexOf(t);
|
|
5344
5359
|
return n > -1 ? e.slice(0, n) : e;
|
|
5345
5360
|
}
|
|
5346
|
-
function
|
|
5347
|
-
return ["#", "?"].forEach((t) => e =
|
|
5361
|
+
function gc(e) {
|
|
5362
|
+
return ["#", "?"].forEach((t) => e = hc(e, t)), e;
|
|
5348
5363
|
}
|
|
5349
|
-
function
|
|
5350
|
-
|
|
5351
|
-
|
|
5364
|
+
function _c() {
|
|
5365
|
+
mc(() => {
|
|
5366
|
+
iu();
|
|
5352
5367
|
});
|
|
5353
5368
|
}
|
|
5354
5369
|
//#endregion
|
|
5355
5370
|
//#region ../../node_modules/.pnpm/@analytics+scroll-utils@0.1.26_@types+dlv@1.1.5/node_modules/@analytics/scroll-utils/dist/analytics-util-scroll.module.js
|
|
5356
|
-
var
|
|
5357
|
-
function
|
|
5358
|
-
if (e === void 0 && (e = {}), !Y) return
|
|
5359
|
-
var t =
|
|
5360
|
-
if (!f.length) return
|
|
5371
|
+
var vc = "up", yc = "down";
|
|
5372
|
+
function bc(e) {
|
|
5373
|
+
if (e === void 0 && (e = {}), !Y) return ba;
|
|
5374
|
+
var t = wc(), n = xc(), r = Cc(), i = Tc(r, t), a = Tc(n, t), o = [], s = [], c = [], l = r, u = i, d = a, f = Object.keys(e);
|
|
5375
|
+
if (!f.length) return ba;
|
|
5361
5376
|
var p = f.map(function(e) {
|
|
5362
5377
|
return Number(e);
|
|
5363
|
-
}), m =
|
|
5364
|
-
var t =
|
|
5378
|
+
}), m = eo(function() {
|
|
5379
|
+
var t = wc(), n = function(e, t) {
|
|
5365
5380
|
return t.map(function(t) {
|
|
5366
5381
|
return t === 100 ? e - 5 : t / 100 * e;
|
|
5367
5382
|
});
|
|
5368
|
-
}(t, p), r =
|
|
5383
|
+
}(t, p), r = xc(), i = Cc(), f = Tc(i, t), m = Tc(r, t);
|
|
5369
5384
|
if (u = f > u ? f : u, d = m < d ? m : d, !(o.length >= p.length)) {
|
|
5370
|
-
var h = l === i, g =
|
|
5371
|
-
h ? g = "initial" : l <= i && (g =
|
|
5385
|
+
var h = l === i, g = vc;
|
|
5386
|
+
h ? g = "initial" : l <= i && (g = yc);
|
|
5372
5387
|
var _ = n, v = p;
|
|
5373
|
-
(g ===
|
|
5388
|
+
(g === vc || h) && (_ = n.slice().reverse(), v = p.slice().reverse());
|
|
5374
5389
|
var y = v.reduce(function(e, t, n) {
|
|
5375
5390
|
var r = _[n];
|
|
5376
5391
|
return c.includes(t) && i <= r && (c = c.filter(function(e) {
|
|
5377
5392
|
return e !== t;
|
|
5378
|
-
}), e.singleFunction = t), g ===
|
|
5393
|
+
}), e.singleFunction = t), g === yc && !o.includes(t) && i >= r && t > a ? (s.push(t), e.callbacks = e.callbacks.concat(t), e) : g === vc && !o.includes(t) && i <= r && t <= f ? (e.foundFunc = [t], e) : (h && i >= r && e.foundFunc.length === 0 && (e.foundFunc = [t]), !s.includes(t) && i >= r && (s.push(t), e.singleFunction ? c.push(t) : e.singleFunction = t), e);
|
|
5379
5394
|
}, {
|
|
5380
5395
|
foundFunc: [],
|
|
5381
5396
|
singleFunction: null,
|
|
5382
5397
|
callbacks: [],
|
|
5383
5398
|
direction: g
|
|
5384
5399
|
});
|
|
5385
|
-
if (l = i, g ===
|
|
5386
|
-
|
|
5400
|
+
if (l = i, g === yc && y.callbacks && y.callbacks.forEach(function(t) {
|
|
5401
|
+
Ma(e[t]) && (e[t]({
|
|
5387
5402
|
trigger: t,
|
|
5388
5403
|
direction: g,
|
|
5389
5404
|
scrollMin: d,
|
|
@@ -5392,7 +5407,7 @@ function vc(e) {
|
|
|
5392
5407
|
}), o.push(t));
|
|
5393
5408
|
}), y.singleFunction) {
|
|
5394
5409
|
var b = y.singleFunction, x = y.direction;
|
|
5395
|
-
|
|
5410
|
+
Ma(e[b]) && e[b]({
|
|
5396
5411
|
trigger: b,
|
|
5397
5412
|
direction: x,
|
|
5398
5413
|
scrollMin: d,
|
|
@@ -5406,47 +5421,47 @@ function vc(e) {
|
|
|
5406
5421
|
return window.removeEventListener("scroll", m);
|
|
5407
5422
|
};
|
|
5408
5423
|
}
|
|
5409
|
-
function
|
|
5424
|
+
function xc() {
|
|
5410
5425
|
return Y ? document.body.scrollTop || document.documentElement.scrollTop : 0;
|
|
5411
5426
|
}
|
|
5412
|
-
function
|
|
5427
|
+
function Sc() {
|
|
5413
5428
|
return Y ? window.innerHeight || document.documentElement.clientHeight : 0;
|
|
5414
5429
|
}
|
|
5415
|
-
function
|
|
5416
|
-
return Math.round(
|
|
5430
|
+
function Cc() {
|
|
5431
|
+
return Math.round(xc() + Sc());
|
|
5417
5432
|
}
|
|
5418
|
-
function
|
|
5433
|
+
function wc() {
|
|
5419
5434
|
if (!Y) return 0;
|
|
5420
5435
|
var e = document.body, t = document.documentElement;
|
|
5421
5436
|
return Math.max(e.scrollHeight, e.offsetHeight, t.clientHeight, t.scrollHeight, t.offsetHeight);
|
|
5422
5437
|
}
|
|
5423
|
-
function
|
|
5438
|
+
function Tc(e, t) {
|
|
5424
5439
|
return Math.round(e / t * 100);
|
|
5425
5440
|
}
|
|
5426
5441
|
//#endregion
|
|
5427
5442
|
//#region ../../node_modules/.pnpm/@analytics+listener-utils@0.4.2/node_modules/@analytics/listener-utils/dist/analytics-util-listener.module.js
|
|
5428
|
-
var
|
|
5429
|
-
function
|
|
5443
|
+
var Ec = "Event", Dc = Ec + "Listener";
|
|
5444
|
+
function Oc(e) {
|
|
5430
5445
|
return function(t, n, r, i) {
|
|
5431
|
-
var a = r ||
|
|
5446
|
+
var a = r || ba, o = i || !1;
|
|
5432
5447
|
if (!Y) return a;
|
|
5433
|
-
var s =
|
|
5448
|
+
var s = kc(n), c = kc(t, !0);
|
|
5434
5449
|
if (!c.length) throw Error("noElements");
|
|
5435
|
-
if (!s.length) throw Error("no" +
|
|
5450
|
+
if (!s.length) throw Error("no" + Ec);
|
|
5436
5451
|
var l = [];
|
|
5437
5452
|
return function e(t) {
|
|
5438
5453
|
t && (l = []);
|
|
5439
|
-
for (var n = t ? "add" +
|
|
5454
|
+
for (var n = t ? "add" + Dc : "remove" + Dc, r = 0; r < c.length; r++) {
|
|
5440
5455
|
var i = c[r];
|
|
5441
|
-
l[r] = t ? o && o.once ?
|
|
5456
|
+
l[r] = t ? o && o.once ? Ac(a) : a : l[r] || a;
|
|
5442
5457
|
for (var u = 0; u < s.length; u++) i[n] ? i["on" + s[u]] = t ? l[r] : null : i[n](s[u], l[r], o);
|
|
5443
5458
|
}
|
|
5444
5459
|
return e.bind(null, !t);
|
|
5445
5460
|
}(e);
|
|
5446
5461
|
};
|
|
5447
5462
|
}
|
|
5448
|
-
function
|
|
5449
|
-
if (
|
|
5463
|
+
function kc(e, t) {
|
|
5464
|
+
if (Na(e)) return t ? kc(document.querySelectorAll(e)) : (n = e).split(n.indexOf(",") > -1 ? "," : " ").map(function(e) {
|
|
5450
5465
|
return e.trim();
|
|
5451
5466
|
});
|
|
5452
5467
|
var n;
|
|
@@ -5454,31 +5469,31 @@ function Dc(e, t) {
|
|
|
5454
5469
|
for (var r = [], i = e.length >>> 0; i--;) r[i] = e[i];
|
|
5455
5470
|
return r;
|
|
5456
5471
|
}
|
|
5457
|
-
var a =
|
|
5472
|
+
var a = qa(e);
|
|
5458
5473
|
return t ? a.map(function(e) {
|
|
5459
|
-
return
|
|
5474
|
+
return Na(e) ? kc(e, !0) : e;
|
|
5460
5475
|
}).flat() : a;
|
|
5461
5476
|
}
|
|
5462
|
-
function
|
|
5477
|
+
function Ac(e, t) {
|
|
5463
5478
|
var n;
|
|
5464
5479
|
return function() {
|
|
5465
5480
|
return e &&= (n = e.apply(t || this, arguments), null), n;
|
|
5466
5481
|
};
|
|
5467
5482
|
}
|
|
5468
|
-
var
|
|
5469
|
-
function
|
|
5470
|
-
return Y &&
|
|
5483
|
+
var jc = Oc(Ec);
|
|
5484
|
+
function Mc(e, t) {
|
|
5485
|
+
return Y && Ma(window[e]) ? (n = window[e], r = t, (i = window) === void 0 && (i = null), Ma(n) ? function() {
|
|
5471
5486
|
n.apply(i, arguments), r.apply(i, arguments);
|
|
5472
5487
|
} : r) : window[e] = t;
|
|
5473
5488
|
var n, r, i;
|
|
5474
5489
|
}
|
|
5475
|
-
|
|
5490
|
+
Mc.bind(null, "onerror"), Mc.bind(null, "onload");
|
|
5476
5491
|
//#endregion
|
|
5477
5492
|
//#region ../../node_modules/.pnpm/analytics-plugin-tab-events@0.2.1/node_modules/analytics-plugin-tab-events/lib/analytics-plugin-tab-events.browser.es.js
|
|
5478
|
-
var
|
|
5479
|
-
function
|
|
5480
|
-
if (
|
|
5481
|
-
var t =
|
|
5493
|
+
var Nc = typeof window > "u", Pc = "hidden";
|
|
5494
|
+
function Fc(e) {
|
|
5495
|
+
if (Nc) return !1;
|
|
5496
|
+
var t = Ic(), n = `${t.replace(/[H|h]idden/, "")}visibilitychange`, r = function() {
|
|
5482
5497
|
return e(!!document[t]);
|
|
5483
5498
|
}, i = function() {
|
|
5484
5499
|
return document.addEventListener(n, r);
|
|
@@ -5487,8 +5502,8 @@ function Nc(e) {
|
|
|
5487
5502
|
return document.removeEventListener(n, r), i;
|
|
5488
5503
|
};
|
|
5489
5504
|
}
|
|
5490
|
-
function
|
|
5491
|
-
return
|
|
5505
|
+
function Ic() {
|
|
5506
|
+
return Nc || "hidden" in document ? Pc : [
|
|
5492
5507
|
"webkit",
|
|
5493
5508
|
"moz",
|
|
5494
5509
|
"ms",
|
|
@@ -5500,7 +5515,7 @@ function Pc() {
|
|
|
5500
5515
|
}
|
|
5501
5516
|
//#endregion
|
|
5502
5517
|
//#region ../../node_modules/.pnpm/@analytics+activity-utils@0.1.16/node_modules/@analytics/activity-utils/dist/analytics-util-activity.module.js
|
|
5503
|
-
var
|
|
5518
|
+
var Lc = [
|
|
5504
5519
|
"mousemove",
|
|
5505
5520
|
"mousedown",
|
|
5506
5521
|
"touchmove",
|
|
@@ -5508,7 +5523,7 @@ var Fc = [
|
|
|
5508
5523
|
"touchend",
|
|
5509
5524
|
"keydown"
|
|
5510
5525
|
];
|
|
5511
|
-
function
|
|
5526
|
+
function Rc(e, t) {
|
|
5512
5527
|
t === void 0 && (t = {});
|
|
5513
5528
|
var n = function(e, t) {
|
|
5514
5529
|
var n = this, r = !1;
|
|
@@ -5519,11 +5534,11 @@ function Ic(e, t) {
|
|
|
5519
5534
|
};
|
|
5520
5535
|
}(e, t.throttle || 1e4), r = [];
|
|
5521
5536
|
function i() {
|
|
5522
|
-
return r = [
|
|
5537
|
+
return r = [Fc(function(e) {
|
|
5523
5538
|
e || n({ type: "tabVisible" });
|
|
5524
|
-
})].concat(
|
|
5525
|
-
return
|
|
5526
|
-
}),
|
|
5539
|
+
})].concat(Lc.map(function(e) {
|
|
5540
|
+
return jc(document, e, n);
|
|
5541
|
+
}), jc(window, "load", n), jc(window, "scroll", n, {
|
|
5527
5542
|
capture: !0,
|
|
5528
5543
|
passive: !0
|
|
5529
5544
|
})), a;
|
|
@@ -5537,16 +5552,16 @@ function Ic(e, t) {
|
|
|
5537
5552
|
return a(), i;
|
|
5538
5553
|
};
|
|
5539
5554
|
}
|
|
5540
|
-
function
|
|
5555
|
+
function zc(e) {
|
|
5541
5556
|
var t, n, r = e.onIdle, i = e.onWakeUp, a = e.onHeartbeat, o = e.timeout, s = o === void 0 ? 1e4 : o, c = e.throttle, l = c === void 0 ? 2e3 : c, u = !1, d = !1, f = /* @__PURE__ */ new Date(), p = function() {
|
|
5542
5557
|
return clearTimeout(t);
|
|
5543
5558
|
};
|
|
5544
5559
|
function m(e) {
|
|
5545
|
-
p(), a && !u && a(
|
|
5546
|
-
u = !0, r && (n = /* @__PURE__ */ new Date(), r(
|
|
5560
|
+
p(), a && !u && a(Bc(f), e), i && u && (u = !1, i(Bc(n), e), f = /* @__PURE__ */ new Date()), t = setTimeout(function() {
|
|
5561
|
+
u = !0, r && (n = /* @__PURE__ */ new Date(), r(Bc(f), e));
|
|
5547
5562
|
}, s);
|
|
5548
5563
|
}
|
|
5549
|
-
var h =
|
|
5564
|
+
var h = Rc(m, { throttle: l });
|
|
5550
5565
|
return {
|
|
5551
5566
|
disable: function() {
|
|
5552
5567
|
d = !0, u = !1, p();
|
|
@@ -5559,18 +5574,18 @@ function Lc(e) {
|
|
|
5559
5574
|
return {
|
|
5560
5575
|
isIdle: u,
|
|
5561
5576
|
isDisabled: d,
|
|
5562
|
-
active: u ? 0 :
|
|
5563
|
-
idle: u ?
|
|
5577
|
+
active: u ? 0 : Bc(f, d),
|
|
5578
|
+
idle: u ? Bc(n, d) : 0
|
|
5564
5579
|
};
|
|
5565
5580
|
}
|
|
5566
5581
|
};
|
|
5567
5582
|
}
|
|
5568
|
-
function
|
|
5583
|
+
function Bc(e, t) {
|
|
5569
5584
|
return t ? 0 : Math.round((/* @__PURE__ */ new Date() - e) / 1e3);
|
|
5570
5585
|
}
|
|
5571
5586
|
//#endregion
|
|
5572
5587
|
//#region src/services/analytics/element-tracker.ts
|
|
5573
|
-
var
|
|
5588
|
+
var Vc = 5e3, Hc = class {
|
|
5574
5589
|
element;
|
|
5575
5590
|
isInViewport = !1;
|
|
5576
5591
|
isAwake = !1;
|
|
@@ -5587,11 +5602,11 @@ var zc = 5e3, Bc = class {
|
|
|
5587
5602
|
e.forEach((e) => {
|
|
5588
5603
|
this.handleInViewPort(e.isIntersecting);
|
|
5589
5604
|
});
|
|
5590
|
-
}, { threshold: 0 }), this.observer.observe(this.element),
|
|
5605
|
+
}, { threshold: 0 }), this.observer.observe(this.element), zc({
|
|
5591
5606
|
onIdle: (e) => this.handleAwake(!1, e),
|
|
5592
5607
|
onWakeUp: (e) => this.handleAwake(!0, e),
|
|
5593
|
-
timeout:
|
|
5594
|
-
}),
|
|
5608
|
+
timeout: Vc
|
|
5609
|
+
}), bc({
|
|
5595
5610
|
25: this.handleScroll.bind(this),
|
|
5596
5611
|
50: this.handleScroll.bind(this),
|
|
5597
5612
|
75: this.handleScroll.bind(this),
|
|
@@ -5606,7 +5621,7 @@ var zc = 5e3, Bc = class {
|
|
|
5606
5621
|
e ? (this.isAwake = !0, this.trackInViewport()) : this.handleAwake(!1), this.isInViewport = e;
|
|
5607
5622
|
}
|
|
5608
5623
|
handleAwake(e, t = Math.round((Date.now() - this.lastEventAt) / 1e3)) {
|
|
5609
|
-
this.isAwake = e, this.lastEventAt = e ? Date.now() - t *
|
|
5624
|
+
this.isAwake = e, this.lastEventAt = e ? Date.now() - t * Vc : Date.now(), this.isInViewport && this.trackAwake(e, t);
|
|
5610
5625
|
}
|
|
5611
5626
|
handleScroll(e) {
|
|
5612
5627
|
this.scrollCallback && this.scrollCallback(e);
|
|
@@ -5625,17 +5640,17 @@ var zc = 5e3, Bc = class {
|
|
|
5625
5640
|
};
|
|
5626
5641
|
//#endregion
|
|
5627
5642
|
//#region src/utils/onDomContentLoaded.ts
|
|
5628
|
-
function
|
|
5643
|
+
function Uc(e) {
|
|
5629
5644
|
document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", e) : e();
|
|
5630
5645
|
}
|
|
5631
|
-
function
|
|
5646
|
+
function Wc() {
|
|
5632
5647
|
return new Promise((e) => {
|
|
5633
|
-
|
|
5648
|
+
Uc(() => e());
|
|
5634
5649
|
});
|
|
5635
5650
|
}
|
|
5636
5651
|
//#endregion
|
|
5637
5652
|
//#region ../../node_modules/.pnpm/saturated@1.0.0/node_modules/saturated/dist/saturated.mjs
|
|
5638
|
-
function
|
|
5653
|
+
function Gc(e, t) {
|
|
5639
5654
|
t ||= {};
|
|
5640
5655
|
var n, r, i = [], a = t.max || Infinity;
|
|
5641
5656
|
function o() {
|
|
@@ -5659,14 +5674,14 @@ function Uc(e, t) {
|
|
|
5659
5674
|
}
|
|
5660
5675
|
//#endregion
|
|
5661
5676
|
//#region src/services/analytics/session-id.ts
|
|
5662
|
-
var
|
|
5663
|
-
function
|
|
5664
|
-
let e = sessionStorage.getItem(
|
|
5665
|
-
return e || (e = Math.random().toString(36).slice(2, 9), sessionStorage.setItem(
|
|
5677
|
+
var Kc = "sesamy_session_id";
|
|
5678
|
+
function qc() {
|
|
5679
|
+
let e = sessionStorage.getItem(Kc);
|
|
5680
|
+
return e || (e = Math.random().toString(36).slice(2, 9), sessionStorage.setItem(Kc, e)), e;
|
|
5666
5681
|
}
|
|
5667
5682
|
//#endregion
|
|
5668
5683
|
//#region src/utils/selector.ts
|
|
5669
|
-
function
|
|
5684
|
+
function Jc(e) {
|
|
5670
5685
|
function t(e) {
|
|
5671
5686
|
return e.id ? `#${e.id}` : e.classList.length > 0 ? Array.from(e.classList).map((e) => `.${e}`).join("") : null;
|
|
5672
5687
|
}
|
|
@@ -5690,12 +5705,13 @@ function Kc(e) {
|
|
|
5690
5705
|
}
|
|
5691
5706
|
//#endregion
|
|
5692
5707
|
//#region src/utils/cleanObject.ts
|
|
5693
|
-
function
|
|
5708
|
+
function Yc(e) {
|
|
5694
5709
|
return e ? Object.fromEntries(Object.entries(e).filter(([e, t]) => t !== void 0)) : {};
|
|
5695
5710
|
}
|
|
5696
5711
|
//#endregion
|
|
5697
5712
|
//#region src/services/content/index.ts
|
|
5698
|
-
|
|
5713
|
+
var Xc = "leaky-paywall";
|
|
5714
|
+
function Zc(e) {
|
|
5699
5715
|
return e.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
5700
5716
|
}
|
|
5701
5717
|
var Q = {
|
|
@@ -5740,8 +5756,8 @@ var Q = {
|
|
|
5740
5756
|
selector: "sesamy-article",
|
|
5741
5757
|
attribute: "paywall-url"
|
|
5742
5758
|
}
|
|
5743
|
-
},
|
|
5744
|
-
function
|
|
5759
|
+
}, Qc = [], $c = !1, el;
|
|
5760
|
+
function tl(e) {
|
|
5745
5761
|
try {
|
|
5746
5762
|
let t = new URL(e).pathname.split("/").filter(Boolean);
|
|
5747
5763
|
return t[t.length - 1] || e;
|
|
@@ -5749,9 +5765,9 @@ function Qc(e) {
|
|
|
5749
5765
|
return e;
|
|
5750
5766
|
}
|
|
5751
5767
|
}
|
|
5752
|
-
function
|
|
5768
|
+
function nl() {
|
|
5753
5769
|
let e = window.location.pathname, t = new URLSearchParams(window.location.search), n = navigator.userAgent;
|
|
5754
|
-
return
|
|
5770
|
+
return Qc.find((r) => {
|
|
5755
5771
|
if (r.path && !e.includes(r.path) || r.queryParam && t.get(r.queryParam.key) !== r.queryParam.value) return !1;
|
|
5756
5772
|
if (r.headers) {
|
|
5757
5773
|
let e = r.headers.name.toLowerCase(), t = r.headers.contains.toLowerCase();
|
|
@@ -5762,26 +5778,26 @@ function $c() {
|
|
|
5762
5778
|
return !(r.userAgentContains && !n.includes(r.userAgentContains));
|
|
5763
5779
|
});
|
|
5764
5780
|
}
|
|
5765
|
-
function
|
|
5766
|
-
return
|
|
5781
|
+
function rl() {
|
|
5782
|
+
return nl();
|
|
5767
5783
|
}
|
|
5768
|
-
function
|
|
5769
|
-
|
|
5770
|
-
let n =
|
|
5784
|
+
function il(e, t) {
|
|
5785
|
+
Qc = e.content || [];
|
|
5786
|
+
let n = nl();
|
|
5771
5787
|
n && n.type === "article" && (Q = {
|
|
5772
5788
|
...Q,
|
|
5773
|
-
...
|
|
5774
|
-
},
|
|
5789
|
+
...Yc(n.selectors)
|
|
5790
|
+
}, $c = n.enablePaywallSettingsUrlFallback || !1), el = t;
|
|
5775
5791
|
}
|
|
5776
|
-
function
|
|
5792
|
+
function al(e, t) {
|
|
5777
5793
|
let { selector: n, attribute: r } = t;
|
|
5778
5794
|
return n === Q.article.selector || r && e.hasAttribute(r) ? e : e.querySelector(n);
|
|
5779
5795
|
}
|
|
5780
|
-
function
|
|
5796
|
+
function ol(e, t, n = !1) {
|
|
5781
5797
|
if (e) {
|
|
5782
5798
|
if (t.attribute) {
|
|
5783
5799
|
if (t.attribute === "textContent") return e.textContent ?? void 0;
|
|
5784
|
-
let r = e.getAttribute(t.attribute), i =
|
|
5800
|
+
let r = e.getAttribute(t.attribute), i = ol(e.parentElement, t, n);
|
|
5785
5801
|
if (n) {
|
|
5786
5802
|
let e = [];
|
|
5787
5803
|
return r && e.push(...r.split(",").map((e) => e.trim()).filter(Boolean)), i && e.push(...i.split(",").map((e) => e.trim()).filter(Boolean)), e.length > 0 ? [...new Set(e)].join(",") : void 0;
|
|
@@ -5797,7 +5813,7 @@ function $(e) {
|
|
|
5797
5813
|
let n = document.head.querySelectorAll(`[name~='${e}'][content]`);
|
|
5798
5814
|
for (let e = 0; e < n.length; e += 1) if (n[e].content) return n[e].content;
|
|
5799
5815
|
}
|
|
5800
|
-
function
|
|
5816
|
+
function sl(e) {
|
|
5801
5817
|
let t = [];
|
|
5802
5818
|
return document.head.querySelectorAll(`[property~='${e}'][content]`).forEach((e) => {
|
|
5803
5819
|
e.content && t.push(e.content);
|
|
@@ -5805,7 +5821,7 @@ function il(e) {
|
|
|
5805
5821
|
e.content && t.push(e.content);
|
|
5806
5822
|
}), t;
|
|
5807
5823
|
}
|
|
5808
|
-
function
|
|
5824
|
+
function cl(e) {
|
|
5809
5825
|
try {
|
|
5810
5826
|
let t = e.split(".");
|
|
5811
5827
|
if (t.length !== 3) return null;
|
|
@@ -5815,17 +5831,17 @@ function al(e) {
|
|
|
5815
5831
|
return null;
|
|
5816
5832
|
}
|
|
5817
5833
|
}
|
|
5818
|
-
var
|
|
5819
|
-
function
|
|
5820
|
-
if (
|
|
5834
|
+
var ll = /* @__PURE__ */ new WeakMap();
|
|
5835
|
+
function ul(e) {
|
|
5836
|
+
if (ll.has(e)) return ll.get(e) ?? null;
|
|
5821
5837
|
let t = e.querySelector("script.dca-manifest");
|
|
5822
|
-
if (!t?.textContent) return
|
|
5838
|
+
if (!t?.textContent) return ll.set(e, null), null;
|
|
5823
5839
|
try {
|
|
5824
5840
|
let n = JSON.parse(t.textContent), r = n.resourceJWT, i = {};
|
|
5825
5841
|
n.resource?.resourceId && (i.id = String(n.resource.resourceId));
|
|
5826
5842
|
let a = n.issuerData?.sesamy ?? n.issuers?.sesamy;
|
|
5827
5843
|
if (a?.keyId && (i.pass = String(a.keyId)), r) {
|
|
5828
|
-
let e =
|
|
5844
|
+
let e = cl(r);
|
|
5829
5845
|
if (e) {
|
|
5830
5846
|
e.contentId && (i.id = String(e.contentId)), e.tier && (i.pass = String(e.tier)), e.url && (i.url = String(e.url));
|
|
5831
5847
|
let t = e.meta;
|
|
@@ -5839,13 +5855,13 @@ function sl(e) {
|
|
|
5839
5855
|
}
|
|
5840
5856
|
}
|
|
5841
5857
|
let o = Object.keys(i).length > 0 ? i : null;
|
|
5842
|
-
return
|
|
5858
|
+
return ll.set(e, o), ll.get(e) ?? null;
|
|
5843
5859
|
} catch {
|
|
5844
|
-
return
|
|
5860
|
+
return ll.set(e, null), null;
|
|
5845
5861
|
}
|
|
5846
5862
|
}
|
|
5847
|
-
var
|
|
5848
|
-
function
|
|
5863
|
+
var dl = null;
|
|
5864
|
+
function fl() {
|
|
5849
5865
|
let e = [], t = document.querySelectorAll("script[type=\"application/ld+json\"]");
|
|
5850
5866
|
for (let n of t) try {
|
|
5851
5867
|
let t = JSON.parse(n.textContent || "");
|
|
@@ -5853,19 +5869,19 @@ function ll() {
|
|
|
5853
5869
|
} catch {}
|
|
5854
5870
|
return e;
|
|
5855
5871
|
}
|
|
5856
|
-
function
|
|
5857
|
-
return
|
|
5872
|
+
function pl(e) {
|
|
5873
|
+
return fl().find((t) => !e || t["@type"] === e || Array.isArray(t["@type"]) && t["@type"].includes(e)) || null;
|
|
5858
5874
|
}
|
|
5859
|
-
function
|
|
5860
|
-
return
|
|
5875
|
+
function ml(e) {
|
|
5876
|
+
return fl().filter((t) => !e || t["@type"] === e || Array.isArray(t["@type"]) && t["@type"].includes(e));
|
|
5861
5877
|
}
|
|
5862
|
-
function
|
|
5878
|
+
function hl(e, t, n) {
|
|
5863
5879
|
if (!e || typeof e != "object") return typeof e == "string" ? e : void 0;
|
|
5864
5880
|
let r = e[t];
|
|
5865
5881
|
if (typeof r == "string") return r;
|
|
5866
5882
|
if (r && typeof r == "object" && n) return r[n];
|
|
5867
5883
|
}
|
|
5868
|
-
function
|
|
5884
|
+
function gl(e) {
|
|
5869
5885
|
if (!e) return;
|
|
5870
5886
|
let t = (Array.isArray(e) ? e : [e]).map((e) => {
|
|
5871
5887
|
if (typeof e == "string") return { name: e };
|
|
@@ -5874,7 +5890,7 @@ function pl(e) {
|
|
|
5874
5890
|
return n ? {
|
|
5875
5891
|
name: n,
|
|
5876
5892
|
url: t.url,
|
|
5877
|
-
image:
|
|
5893
|
+
image: hl(t, "image", "url"),
|
|
5878
5894
|
jobTitle: t.jobTitle,
|
|
5879
5895
|
sameAs: t.sameAs
|
|
5880
5896
|
} : null;
|
|
@@ -5883,22 +5899,22 @@ function pl(e) {
|
|
|
5883
5899
|
}).filter((e) => e !== null && !!e.name);
|
|
5884
5900
|
return t.length > 0 ? t : void 0;
|
|
5885
5901
|
}
|
|
5886
|
-
function
|
|
5902
|
+
function _l(e) {
|
|
5887
5903
|
if (Array.isArray(e)) return e.filter((e) => typeof e == "string");
|
|
5888
5904
|
if (typeof e == "string") {
|
|
5889
5905
|
let t = e.split(",").map((e) => e.trim()).filter(Boolean);
|
|
5890
5906
|
return t.length > 0 ? t : void 0;
|
|
5891
5907
|
}
|
|
5892
5908
|
}
|
|
5893
|
-
function
|
|
5894
|
-
if (
|
|
5895
|
-
let e =
|
|
5896
|
-
return
|
|
5909
|
+
function vl() {
|
|
5910
|
+
if (dl) return dl;
|
|
5911
|
+
let e = pl("NewsArticle") || pl("Article") || pl("BlogPosting") || pl("WebPage"), t = (...e) => e.find((e) => e != null && e !== "") || void 0;
|
|
5912
|
+
return dl = Yc({
|
|
5897
5913
|
contentType: e ? Array.isArray(e["@type"]) ? e["@type"][0] : e["@type"] : void 0,
|
|
5898
|
-
authors:
|
|
5899
|
-
keywords: ((...e) => e.find((e) => e && e.length > 0))(
|
|
5900
|
-
tags:
|
|
5901
|
-
categories:
|
|
5914
|
+
authors: gl(e?.author) || (sl("article:author").length > 0 ? sl("article:author").map((e) => ({ name: e })) : void 0) || ($("author") ? [{ name: $("author") }] : void 0),
|
|
5915
|
+
keywords: ((...e) => e.find((e) => e && e.length > 0))(_l(e?.keywords), _l($("keywords"))),
|
|
5916
|
+
tags: sl("article:tag").length > 0 ? sl("article:tag") : void 0,
|
|
5917
|
+
categories: _l($("news_keywords")),
|
|
5902
5918
|
section: t(e?.articleSection, $("article:section")),
|
|
5903
5919
|
publishedAt: t(e?.datePublished, $("article:published_time")),
|
|
5904
5920
|
modifiedAt: t(e?.dateModified, $("article:modified_time")),
|
|
@@ -5909,28 +5925,28 @@ function hl() {
|
|
|
5909
5925
|
twitterSite: $("twitter:site"),
|
|
5910
5926
|
twitterCreator: $("twitter:creator"),
|
|
5911
5927
|
creator: t($("creator"), $("dc.creator")),
|
|
5912
|
-
mainEntityOfPage: e ?
|
|
5928
|
+
mainEntityOfPage: e ? hl(e.mainEntityOfPage, "@id") || (typeof e.mainEntityOfPage == "string" ? e.mainEntityOfPage : void 0) : void 0,
|
|
5913
5929
|
isAccessibleForFree: typeof e?.isAccessibleForFree == "boolean" ? e.isAccessibleForFree : void 0,
|
|
5914
5930
|
wordCount: typeof e?.wordCount == "number" ? e.wordCount : void 0,
|
|
5915
5931
|
publisher: e?.publisher && typeof e.publisher == "object" ? {
|
|
5916
5932
|
name: e.publisher.name || "",
|
|
5917
5933
|
url: e.publisher.url,
|
|
5918
|
-
logo:
|
|
5934
|
+
logo: hl(e.publisher, "logo", "url")
|
|
5919
5935
|
} : void 0
|
|
5920
|
-
}),
|
|
5936
|
+
}), dl;
|
|
5921
5937
|
}
|
|
5922
|
-
function
|
|
5923
|
-
|
|
5938
|
+
function yl() {
|
|
5939
|
+
dl = null, ll = /* @__PURE__ */ new WeakMap();
|
|
5924
5940
|
}
|
|
5925
|
-
function
|
|
5941
|
+
function bl({ publisherContentId: e, key: t, defaultValue: n = "" }) {
|
|
5926
5942
|
let r = e ? document.body.querySelector(`sesamy-content-data[id='${e}']`) : null, i = t.replace(/-([a-z])/g, (e, t) => t.toUpperCase());
|
|
5927
5943
|
return r?.getAttribute(t) || $(`sesamy:${t}`) || $(`sesamy:${i}`) || $(`og:${t}`) || $(t) || n;
|
|
5928
5944
|
}
|
|
5929
|
-
function
|
|
5945
|
+
function xl() {
|
|
5930
5946
|
let e = document.querySelectorAll(Q.article.selector);
|
|
5931
|
-
return Array.from(e).map(
|
|
5947
|
+
return Array.from(e).map(Sl).filter((e) => e !== null);
|
|
5932
5948
|
}
|
|
5933
|
-
function
|
|
5949
|
+
function Sl(e) {
|
|
5934
5950
|
let t = typeof e == "string" ? document.querySelector(e) : e;
|
|
5935
5951
|
if (!t) return null;
|
|
5936
5952
|
let n = Q.article.selector;
|
|
@@ -5942,14 +5958,14 @@ function yl(e) {
|
|
|
5942
5958
|
} catch {}
|
|
5943
5959
|
let r = {
|
|
5944
5960
|
element: t,
|
|
5945
|
-
selector: typeof e == "string" ? e :
|
|
5946
|
-
}, i =
|
|
5961
|
+
selector: typeof e == "string" ? e : Jc(t)
|
|
5962
|
+
}, i = ul(t);
|
|
5947
5963
|
i && (i.id && (r.id = i.id), i.title && (r.title = i.title), i.excerpt && (r.excerpt = i.excerpt), i.image && (r.image = i.image), i.price != null && (r.price = i.price), i.currency && (r.currency = i.currency), i.url && (r.url = i.url), i.pass && (r.pass = i.pass), i.accessLevel && (r.accessLevel = i.accessLevel));
|
|
5948
5964
|
let a = (e, n, i, a) => {
|
|
5949
5965
|
if (r[e] !== void 0) return;
|
|
5950
|
-
let { transform: o, collect: s = !1 } = a || {}, c =
|
|
5966
|
+
let { transform: o, collect: s = !1 } = a || {}, c = ol(al(t, n), n, s), l = bl({
|
|
5951
5967
|
publisherContentId: i,
|
|
5952
|
-
key:
|
|
5968
|
+
key: Zc(String(e))
|
|
5953
5969
|
}), u = c || l || void 0;
|
|
5954
5970
|
u && (r[e] = o ? o(u) : u);
|
|
5955
5971
|
};
|
|
@@ -5957,57 +5973,66 @@ function yl(e) {
|
|
|
5957
5973
|
let t = parseFloat(e);
|
|
5958
5974
|
return Number.isNaN(t) ? void 0 : t;
|
|
5959
5975
|
} }), a("currency", Q.currency, r.id), a("url", Q.url, r.id), a("pass", Q.pass, r.id, { collect: !0 }), a("paywallUrl", Q.paywallUrl, r.id), a("accessLevel", Q.accessLevel, r.id, { transform: (e) => e || "entitlement" });
|
|
5960
|
-
let o =
|
|
5961
|
-
if (o && o.type === "article" && (o.pass && (r.pass = r.pass ? `${r.pass},${o.pass}` : o.pass), o.price && !r.price && (r.price = o.price.amount), o.price?.currency && !r.currency && (r.currency = o.price.currency), o.paywallUrl && !r.paywallUrl && (r.paywallUrl = o.paywallUrl)),
|
|
5976
|
+
let o = nl();
|
|
5977
|
+
if (o && o.type === "article" && (o.pass && (r.pass = r.pass ? `${r.pass},${o.pass}` : o.pass), o.price && !r.price && (r.price = o.price.amount), o.price?.currency && !r.currency && (r.currency = o.price.currency), o.paywallUrl && !r.paywallUrl && (r.paywallUrl = o.paywallUrl)), $c && !r.paywallUrl) {
|
|
5962
5978
|
let e = document.querySelector("sesamy-paywall");
|
|
5963
5979
|
if (e) {
|
|
5964
5980
|
let t = e.getAttribute("settings-url");
|
|
5965
5981
|
t && (r.paywallUrl = t);
|
|
5966
5982
|
}
|
|
5967
5983
|
}
|
|
5968
|
-
return r.url ||= window.location.href, r.metadata =
|
|
5984
|
+
return r.url ||= window.location.href, r.metadata = vl(), r;
|
|
5969
5985
|
}
|
|
5970
|
-
async function
|
|
5971
|
-
let t = e === void 0 ?
|
|
5986
|
+
async function Cl(e) {
|
|
5987
|
+
let t = e === void 0 ? xl()[0] ?? null : Sl(e);
|
|
5972
5988
|
if (!t) throw Error("Could not find article element");
|
|
5973
5989
|
if (t.accessLevel === "public") return !0;
|
|
5974
|
-
if (t.accessLevel === "logged-in" && !t.paywallUrl || t.paywallUrl && ((await
|
|
5990
|
+
if (t.accessLevel === "logged-in" && !t.paywallUrl || t.paywallUrl && ((await el.paywalls.get(t.paywallUrl)).settings.template === "LOGIN" ? "logged-in" : "entitlement") == "logged-in") return await el.auth.isAuthenticated() ? !0 : null;
|
|
5975
5991
|
if (!t.url) throw Error("Article must have a URL");
|
|
5976
|
-
let n = await
|
|
5977
|
-
if (n) return n;
|
|
5992
|
+
let n = await el.entitlements.hasAccess(t.url, t.pass?.split(",") || []);
|
|
5993
|
+
if (n && n.id !== Xc) return n;
|
|
5978
5994
|
if (t.paywallUrl) {
|
|
5979
|
-
let e =
|
|
5995
|
+
let e = tl(t.paywallUrl);
|
|
5996
|
+
if ((await el.paywalls.checkAccess(e, {
|
|
5980
5997
|
publisherContentId: t.id || t.url,
|
|
5981
5998
|
url: t.url
|
|
5982
|
-
})
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
5999
|
+
})).status === "allowed") {
|
|
6000
|
+
let e = {
|
|
6001
|
+
id: Xc,
|
|
6002
|
+
sku: "",
|
|
6003
|
+
url: t.url,
|
|
6004
|
+
hasAccess: !0
|
|
6005
|
+
};
|
|
6006
|
+
return ra().some((e) => e.id === Xc && e.url === t.url) || ia(e), e;
|
|
6007
|
+
}
|
|
6008
|
+
aa((e) => e.id === Xc && e.url === t.url);
|
|
5990
6009
|
}
|
|
5991
6010
|
return null;
|
|
5992
6011
|
}
|
|
5993
|
-
async function
|
|
6012
|
+
async function wl(e, t) {
|
|
5994
6013
|
let n = typeof e == "string" ? document.querySelector(e) : e;
|
|
5995
6014
|
if (!n) throw Error("Could not find element");
|
|
5996
|
-
let r =
|
|
6015
|
+
let r = Sl(n);
|
|
5997
6016
|
if (!r?.url) throw Error("Could not find content for element");
|
|
5998
|
-
let i = await
|
|
5999
|
-
if (
|
|
6000
|
-
let a;
|
|
6001
|
-
if (i.token) a = i.token;
|
|
6017
|
+
let i = await el.entitlements.hasAccess(r.url, r.pass?.split(",") || []), a;
|
|
6018
|
+
if (i && i.id !== Xc) if (i.token) a = i.token;
|
|
6002
6019
|
else {
|
|
6003
|
-
let e = await
|
|
6020
|
+
let e = await el.entitlements.access(i.id);
|
|
6004
6021
|
if (!e.token) throw Error("Could not get access token");
|
|
6005
6022
|
a = e.token;
|
|
6006
6023
|
}
|
|
6007
|
-
|
|
6008
|
-
|
|
6024
|
+
else if (r.paywallUrl) {
|
|
6025
|
+
let e = tl(r.paywallUrl), t = await el.paywalls.registerAccess(e, {
|
|
6026
|
+
publisherContentId: r.id || r.url,
|
|
6027
|
+
url: r.url
|
|
6028
|
+
});
|
|
6029
|
+
t.status === "allowed" && (a = new URL(t.signedLink).searchParams.get("sesamy_token") || void 0);
|
|
6030
|
+
}
|
|
6031
|
+
if (!a) throw Error("User does not have access to the content");
|
|
6032
|
+
let o = t || Jc(n.parentElement || n);
|
|
6033
|
+
return el.proxy.getContent(a, r.url, o);
|
|
6009
6034
|
}
|
|
6010
|
-
function
|
|
6035
|
+
function Tl(e, t = {}) {
|
|
6011
6036
|
let { closeOnBackdropClick: n = !0, closeOnEscape: r = !0, zIndex: i = 2147483647, backdropBlur: a = "5px", overlayBackground: o = "rgba(0,0,0,0.5)" } = t, s = document.createElement("div");
|
|
6012
6037
|
s.setAttribute("data-sesamy-modal", "true"), Object.assign(s.style, {
|
|
6013
6038
|
position: "fixed",
|
|
@@ -6036,7 +6061,7 @@ function Sl(e, t = {}) {
|
|
|
6036
6061
|
close: l
|
|
6037
6062
|
};
|
|
6038
6063
|
}
|
|
6039
|
-
function
|
|
6064
|
+
function El(e, t = {}) {
|
|
6040
6065
|
let { position: n = "top", fixed: r = !0, zIndex: i = 2147483647, autoDismissMs: a, pushContent: o = !1, height: s, transitionDuration: c = "0.3s" } = t, l = document.createElement("div");
|
|
6041
6066
|
l.setAttribute("data-sesamy-notification-bar", "true"), l.setAttribute("data-sesamy-notification-position", n), Object.assign(l.style, {
|
|
6042
6067
|
position: r ? "fixed" : "absolute",
|
|
@@ -6066,8 +6091,8 @@ function Cl(e, t = {}) {
|
|
|
6066
6091
|
}
|
|
6067
6092
|
//#endregion
|
|
6068
6093
|
//#region src/services/analytics/plugins/sesamy-logger.ts
|
|
6069
|
-
var
|
|
6070
|
-
function
|
|
6094
|
+
var Dl = !1, Ol, kl, Al;
|
|
6095
|
+
function jl(e) {
|
|
6071
6096
|
return JSON.stringify(e.map((e) => {
|
|
6072
6097
|
let { campaign: t, ...n } = e.properties || {};
|
|
6073
6098
|
return {
|
|
@@ -6075,11 +6100,11 @@ function Ol(e) {
|
|
|
6075
6100
|
userId: e.userId,
|
|
6076
6101
|
type: e.type,
|
|
6077
6102
|
properties: n,
|
|
6078
|
-
clientId:
|
|
6103
|
+
clientId: Al,
|
|
6079
6104
|
requestId: Math.random().toString(36).slice(2, 9),
|
|
6080
|
-
sessionId:
|
|
6105
|
+
sessionId: qc(),
|
|
6081
6106
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
6082
|
-
version:
|
|
6107
|
+
version: pc,
|
|
6083
6108
|
event: e.event,
|
|
6084
6109
|
context: {
|
|
6085
6110
|
...e.context,
|
|
@@ -6092,17 +6117,17 @@ function Ol(e) {
|
|
|
6092
6117
|
},
|
|
6093
6118
|
campaign: t,
|
|
6094
6119
|
locale: navigator.language,
|
|
6095
|
-
library:
|
|
6120
|
+
library: fc,
|
|
6096
6121
|
userAgent: navigator.userAgent,
|
|
6097
|
-
clientId:
|
|
6122
|
+
clientId: Al
|
|
6098
6123
|
}
|
|
6099
6124
|
};
|
|
6100
6125
|
}));
|
|
6101
6126
|
}
|
|
6102
|
-
var
|
|
6127
|
+
var Ml = Gc(async (e) => {
|
|
6103
6128
|
if (e.length > 0) {
|
|
6104
|
-
let t =
|
|
6105
|
-
|
|
6129
|
+
let t = jl(e);
|
|
6130
|
+
Dl ? navigator.sendBeacon(kl, t) : (await fetch(kl, {
|
|
6106
6131
|
method: "POST",
|
|
6107
6132
|
body: t,
|
|
6108
6133
|
headers: { "Content-Type": "text/plain" }
|
|
@@ -6112,27 +6137,27 @@ var kl = Uc(async (e) => {
|
|
|
6112
6137
|
max: 10,
|
|
6113
6138
|
interval: 3e3
|
|
6114
6139
|
});
|
|
6115
|
-
function
|
|
6140
|
+
function Nl(e) {
|
|
6116
6141
|
if (e.anonymousId) if (e.properties?.flushing) {
|
|
6117
6142
|
let t = { ...e };
|
|
6118
|
-
delete t.properties.flushing, navigator.sendBeacon(
|
|
6119
|
-
} else
|
|
6143
|
+
delete t.properties.flushing, navigator.sendBeacon(kl, jl([t]));
|
|
6144
|
+
} else Ml.push(e);
|
|
6120
6145
|
}
|
|
6121
|
-
function
|
|
6122
|
-
return
|
|
6146
|
+
function Pl() {
|
|
6147
|
+
return Dl = !0, Ml.flush();
|
|
6123
6148
|
}
|
|
6124
|
-
function
|
|
6125
|
-
|
|
6149
|
+
function Fl(e) {
|
|
6150
|
+
Nl(e);
|
|
6126
6151
|
}
|
|
6127
|
-
function
|
|
6128
|
-
|
|
6152
|
+
function Il(e, t, n) {
|
|
6153
|
+
Ol = t, kl = `${Pi("logs", n)}/events`, Al = e;
|
|
6129
6154
|
}
|
|
6130
|
-
var
|
|
6155
|
+
var Ll = {
|
|
6131
6156
|
name: "custom-analytics-plugin",
|
|
6132
6157
|
page: ({ payload: e }) => {
|
|
6133
|
-
if (!
|
|
6158
|
+
if (!Ol) return;
|
|
6134
6159
|
let { properties: t, anonymousId: n, userId: r, event: i } = e;
|
|
6135
|
-
|
|
6160
|
+
Nl({
|
|
6136
6161
|
anonymousId: n,
|
|
6137
6162
|
userId: r,
|
|
6138
6163
|
properties: t,
|
|
@@ -6141,9 +6166,9 @@ var Pl = {
|
|
|
6141
6166
|
});
|
|
6142
6167
|
},
|
|
6143
6168
|
track: ({ payload: e }) => {
|
|
6144
|
-
if (!
|
|
6169
|
+
if (!Ol) return;
|
|
6145
6170
|
let { properties: t, anonymousId: n, userId: r, event: i } = e;
|
|
6146
|
-
|
|
6171
|
+
Nl({
|
|
6147
6172
|
anonymousId: n,
|
|
6148
6173
|
userId: r,
|
|
6149
6174
|
properties: t,
|
|
@@ -6152,9 +6177,9 @@ var Pl = {
|
|
|
6152
6177
|
});
|
|
6153
6178
|
},
|
|
6154
6179
|
identify: ({ payload: e }) => {
|
|
6155
|
-
if (!
|
|
6180
|
+
if (!Ol) return;
|
|
6156
6181
|
let { properties: t, anonymousId: n, userId: r } = e;
|
|
6157
|
-
|
|
6182
|
+
Nl({
|
|
6158
6183
|
anonymousId: n,
|
|
6159
6184
|
userId: r,
|
|
6160
6185
|
properties: t,
|
|
@@ -6165,56 +6190,56 @@ var Pl = {
|
|
|
6165
6190
|
//#endregion
|
|
6166
6191
|
//#region src/services/analytics/plugins/attribution-tracker.ts
|
|
6167
6192
|
Vn();
|
|
6168
|
-
var
|
|
6193
|
+
var Rl = [
|
|
6169
6194
|
"source",
|
|
6170
6195
|
"medium",
|
|
6171
6196
|
"campaign",
|
|
6172
6197
|
"term",
|
|
6173
6198
|
"content"
|
|
6174
|
-
],
|
|
6175
|
-
function
|
|
6176
|
-
return e ? Date.now() - parseInt(e, 10) >
|
|
6199
|
+
], zl = "utm_", Bl = 1800 * 1e3, Vl = {};
|
|
6200
|
+
function Hl(e) {
|
|
6201
|
+
return e ? Date.now() - parseInt(e, 10) > Bl : !0;
|
|
6177
6202
|
}
|
|
6178
|
-
function
|
|
6179
|
-
|
|
6203
|
+
function Ul(e, t) {
|
|
6204
|
+
Qi("statistics") ? Qs(e, t) : Vl[e] = t;
|
|
6180
6205
|
}
|
|
6181
|
-
function
|
|
6182
|
-
return
|
|
6206
|
+
function Wl(e) {
|
|
6207
|
+
return Qi("statistics") ? Zs(e) : Vl[e] || null;
|
|
6183
6208
|
}
|
|
6184
|
-
function
|
|
6185
|
-
for (let [e, t] of Object.entries(
|
|
6209
|
+
function Gl() {
|
|
6210
|
+
for (let [e, t] of Object.entries(Vl)) Qs(e, t);
|
|
6186
6211
|
}
|
|
6187
|
-
function
|
|
6212
|
+
function Kl() {
|
|
6188
6213
|
let e = document.referrer || "";
|
|
6189
|
-
e && (
|
|
6214
|
+
e && (Hl(Wl(`${zl}set_at`)) || !Wl(`${zl}referrer`)) && Ul(`${zl}referrer`, e);
|
|
6190
6215
|
}
|
|
6191
|
-
function
|
|
6216
|
+
function ql() {
|
|
6192
6217
|
let e = () => {
|
|
6193
6218
|
let e = {};
|
|
6194
|
-
for (let t of
|
|
6195
|
-
let n =
|
|
6219
|
+
for (let t of Rl) {
|
|
6220
|
+
let n = Wl(`${zl}${t}`);
|
|
6196
6221
|
n && (e[`utm_${t}`] = n);
|
|
6197
6222
|
}
|
|
6198
|
-
let t =
|
|
6223
|
+
let t = Wl(`${zl}referrer`);
|
|
6199
6224
|
return t && (e.utm_referrer = t), e;
|
|
6200
6225
|
};
|
|
6201
6226
|
return {
|
|
6202
6227
|
name: "attribution-tracking",
|
|
6203
6228
|
initialize() {
|
|
6204
|
-
|
|
6205
|
-
|
|
6229
|
+
Kl(), typeof window < "u" && window.addEventListener(J.CONSENT_CHANGED, () => {
|
|
6230
|
+
Qi("statistics") && Gl();
|
|
6206
6231
|
});
|
|
6207
6232
|
},
|
|
6208
6233
|
campaign({ payload: e }) {
|
|
6209
|
-
let t = e?.campaign || {}, n =
|
|
6210
|
-
if (Object.keys(t).length > 0 &&
|
|
6211
|
-
for (let e of
|
|
6234
|
+
let t = e?.campaign || {}, n = Wl(`${zl}set_at`);
|
|
6235
|
+
if (Object.keys(t).length > 0 && Hl(n)) {
|
|
6236
|
+
for (let e of Rl) {
|
|
6212
6237
|
let n = t[e];
|
|
6213
|
-
n &&
|
|
6238
|
+
n && Ul(`${zl}${e}`, n);
|
|
6214
6239
|
}
|
|
6215
|
-
|
|
6240
|
+
Ul(`${zl}set_at`, String(Date.now()));
|
|
6216
6241
|
}
|
|
6217
|
-
|
|
6242
|
+
Kl();
|
|
6218
6243
|
},
|
|
6219
6244
|
page({ payload: t }) {
|
|
6220
6245
|
return t.properties.campaign = e(), t;
|
|
@@ -6228,70 +6253,70 @@ function Wl() {
|
|
|
6228
6253
|
//#endregion
|
|
6229
6254
|
//#region src/services/analytics/index.ts
|
|
6230
6255
|
Vn();
|
|
6231
|
-
var
|
|
6232
|
-
function
|
|
6233
|
-
return `session-${
|
|
6256
|
+
var Jl = /* @__PURE__ */ new Map(), Yl = /* @__PURE__ */ new Map(), Xl = [];
|
|
6257
|
+
function Zl() {
|
|
6258
|
+
return `session-${qc()}`;
|
|
6234
6259
|
}
|
|
6235
|
-
function
|
|
6236
|
-
|
|
6237
|
-
anonymousId:
|
|
6260
|
+
function Ql(e) {
|
|
6261
|
+
Fl({
|
|
6262
|
+
anonymousId: Zl(),
|
|
6238
6263
|
userId: e.userId,
|
|
6239
6264
|
properties: e.properties || {},
|
|
6240
6265
|
event: e.event,
|
|
6241
6266
|
type: e.type
|
|
6242
6267
|
});
|
|
6243
6268
|
}
|
|
6244
|
-
function
|
|
6245
|
-
|
|
6246
|
-
|
|
6269
|
+
function $l({ clientId: e, enabled: t = !0, environment: n }) {
|
|
6270
|
+
Il(e, t, n), t && (window.addEventListener("beforeunload", () => {
|
|
6271
|
+
Yl.forEach((e, t) => {
|
|
6247
6272
|
e.bind(t)();
|
|
6248
|
-
}),
|
|
6273
|
+
}), Pl();
|
|
6249
6274
|
}), window.addEventListener("visibilitychange", () => {
|
|
6250
|
-
document.visibilityState !== "visible" &&
|
|
6275
|
+
document.visibilityState !== "visible" && Jl.forEach((e, t) => {
|
|
6251
6276
|
e.bind(t)();
|
|
6252
6277
|
});
|
|
6253
|
-
}),
|
|
6254
|
-
let e = new
|
|
6278
|
+
}), _c(), Uc(() => {
|
|
6279
|
+
let e = new Hc({
|
|
6255
6280
|
element: document.body,
|
|
6256
6281
|
viewCallback: () => {
|
|
6257
|
-
|
|
6282
|
+
iu();
|
|
6258
6283
|
},
|
|
6259
6284
|
activeDurationCallback: (e, t, n) => {
|
|
6260
|
-
|
|
6285
|
+
ou("activeDuration", {
|
|
6261
6286
|
duration: e,
|
|
6262
6287
|
durationStart: n,
|
|
6263
6288
|
flushing: t
|
|
6264
6289
|
});
|
|
6265
6290
|
},
|
|
6266
6291
|
idleDurationCallback: (e, t, n) => {
|
|
6267
|
-
|
|
6292
|
+
ou("idleDuration", {
|
|
6268
6293
|
duration: e,
|
|
6269
6294
|
durationStart: n,
|
|
6270
6295
|
flushing: t
|
|
6271
6296
|
});
|
|
6272
6297
|
},
|
|
6273
6298
|
scrollCallback: (e) => {
|
|
6274
|
-
|
|
6299
|
+
ou("scroll", { scroll: e.scrollMax });
|
|
6275
6300
|
}
|
|
6276
6301
|
});
|
|
6277
|
-
|
|
6302
|
+
Yl.set(document.body, () => {
|
|
6278
6303
|
e.flush();
|
|
6279
|
-
}),
|
|
6304
|
+
}), Jl.set(document.body, () => {
|
|
6280
6305
|
e.handleVisibilityChange();
|
|
6281
6306
|
});
|
|
6282
6307
|
}), window.addEventListener(J.AUTHENTICATED, async (e) => {
|
|
6283
6308
|
let t = e;
|
|
6284
|
-
if (
|
|
6309
|
+
if (eu()) await nu().identify(t.detail.sub);
|
|
6285
6310
|
else {
|
|
6286
6311
|
let e = {
|
|
6287
6312
|
type: "identify",
|
|
6288
6313
|
userId: t.detail.sub,
|
|
6289
6314
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
6290
6315
|
};
|
|
6291
|
-
|
|
6316
|
+
Xl.push(e), Ql(e);
|
|
6292
6317
|
}
|
|
6293
6318
|
}), window.addEventListener(J.LOGOUT, async () => {
|
|
6294
|
-
if (
|
|
6319
|
+
if (eu()) await nu().track("logout", {}), await nu().reset();
|
|
6295
6320
|
else {
|
|
6296
6321
|
let e = {
|
|
6297
6322
|
type: "track",
|
|
@@ -6299,50 +6324,50 @@ function Xl({ clientId: e, enabled: t = !0, environment: n }) {
|
|
|
6299
6324
|
properties: {},
|
|
6300
6325
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
6301
6326
|
};
|
|
6302
|
-
|
|
6327
|
+
Xl.push(e), Ql(e);
|
|
6303
6328
|
}
|
|
6304
|
-
}),
|
|
6305
|
-
|
|
6329
|
+
}), Xi() && !Qi("statistics") && window.addEventListener(J.CONSENT_CHANGED, () => {
|
|
6330
|
+
Qi("statistics") && ru();
|
|
6306
6331
|
}));
|
|
6307
6332
|
}
|
|
6308
|
-
function Zl() {
|
|
6309
|
-
return !Yi() || Zi("statistics");
|
|
6310
|
-
}
|
|
6311
|
-
var Ql;
|
|
6312
|
-
function $l() {
|
|
6313
|
-
return Ql ||= lc({
|
|
6314
|
-
app: uc,
|
|
6315
|
-
version: dc,
|
|
6316
|
-
plugins: [Wl(), Pl]
|
|
6317
|
-
}), Ql;
|
|
6318
|
-
}
|
|
6319
6333
|
function eu() {
|
|
6320
|
-
|
|
6321
|
-
|
|
6334
|
+
return !Xi() || Qi("statistics");
|
|
6335
|
+
}
|
|
6336
|
+
var tu;
|
|
6337
|
+
function nu() {
|
|
6338
|
+
return tu ||= dc({
|
|
6339
|
+
app: fc,
|
|
6340
|
+
version: pc,
|
|
6341
|
+
plugins: [ql(), Ll]
|
|
6342
|
+
}), tu;
|
|
6343
|
+
}
|
|
6344
|
+
function ru() {
|
|
6345
|
+
let e = nu().user().anonymousId;
|
|
6346
|
+
for (let t of Xl) Fl({
|
|
6322
6347
|
anonymousId: e,
|
|
6323
6348
|
userId: t.userId,
|
|
6324
6349
|
properties: t.properties || {},
|
|
6325
6350
|
event: t.event,
|
|
6326
6351
|
type: t.type
|
|
6327
6352
|
});
|
|
6328
|
-
|
|
6353
|
+
Xl.length = 0;
|
|
6329
6354
|
}
|
|
6330
|
-
function
|
|
6331
|
-
if (
|
|
6355
|
+
function iu() {
|
|
6356
|
+
if (eu()) nu().page();
|
|
6332
6357
|
else {
|
|
6333
6358
|
let e = {
|
|
6334
6359
|
type: "page",
|
|
6335
6360
|
properties: {},
|
|
6336
6361
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
6337
6362
|
};
|
|
6338
|
-
|
|
6363
|
+
Xl.push(e), Ql(e);
|
|
6339
6364
|
}
|
|
6340
6365
|
}
|
|
6341
|
-
function
|
|
6342
|
-
return
|
|
6366
|
+
function au() {
|
|
6367
|
+
return eu() ? nu().user().anonymousId : Zl();
|
|
6343
6368
|
}
|
|
6344
|
-
function
|
|
6345
|
-
if (
|
|
6369
|
+
function ou(e, t) {
|
|
6370
|
+
if (eu()) nu().track(e, t);
|
|
6346
6371
|
else {
|
|
6347
6372
|
let n = {
|
|
6348
6373
|
type: "track",
|
|
@@ -6350,49 +6375,49 @@ function ru(e, t) {
|
|
|
6350
6375
|
properties: t,
|
|
6351
6376
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
6352
6377
|
};
|
|
6353
|
-
|
|
6378
|
+
Xl.push(n), Ql(n);
|
|
6354
6379
|
}
|
|
6355
6380
|
}
|
|
6356
6381
|
//#endregion
|
|
6357
6382
|
//#region src/services/flags/index.ts
|
|
6358
6383
|
zn();
|
|
6359
|
-
var
|
|
6360
|
-
async function
|
|
6384
|
+
var su = "sesamyFlags";
|
|
6385
|
+
async function cu(e) {
|
|
6361
6386
|
try {
|
|
6362
|
-
localStorage.setItem(
|
|
6387
|
+
localStorage.setItem(su, JSON.stringify(e));
|
|
6363
6388
|
} catch {
|
|
6364
6389
|
q("Failed to save flags to localStorage");
|
|
6365
6390
|
}
|
|
6366
6391
|
}
|
|
6367
|
-
async function
|
|
6368
|
-
let n = await
|
|
6369
|
-
n[e] = t, await
|
|
6392
|
+
async function lu(e, t) {
|
|
6393
|
+
let n = await fu();
|
|
6394
|
+
n[e] = t, await cu(n);
|
|
6370
6395
|
}
|
|
6371
|
-
async function
|
|
6372
|
-
return (await
|
|
6396
|
+
async function uu(e) {
|
|
6397
|
+
return (await fu())[e];
|
|
6373
6398
|
}
|
|
6374
|
-
async function
|
|
6375
|
-
let t = await
|
|
6376
|
-
e in t && (delete t[e], await
|
|
6399
|
+
async function du(e) {
|
|
6400
|
+
let t = await fu();
|
|
6401
|
+
e in t && (delete t[e], await cu(t));
|
|
6377
6402
|
}
|
|
6378
|
-
async function
|
|
6403
|
+
async function fu() {
|
|
6379
6404
|
try {
|
|
6380
|
-
let e = localStorage.getItem(
|
|
6405
|
+
let e = localStorage.getItem(su);
|
|
6381
6406
|
return e ? JSON.parse(e) : {};
|
|
6382
6407
|
} catch {
|
|
6383
6408
|
return {};
|
|
6384
6409
|
}
|
|
6385
6410
|
}
|
|
6386
6411
|
Vn(), Gn();
|
|
6387
|
-
function
|
|
6388
|
-
let t = e.endpoint ??
|
|
6412
|
+
function pu(e) {
|
|
6413
|
+
let t = e.endpoint ?? Pi("api2", e.environment), n = (() => {
|
|
6389
6414
|
try {
|
|
6390
|
-
let e =
|
|
6415
|
+
let e = ji(new URL(t, window.location.origin).href), n = ji(window.location.href);
|
|
6391
6416
|
return e !== null && e === n;
|
|
6392
6417
|
} catch {
|
|
6393
6418
|
return !1;
|
|
6394
6419
|
}
|
|
6395
|
-
})(), r = e.useHttpCookies === !0, i =
|
|
6420
|
+
})(), r = e.useHttpCookies === !0, i = wi({
|
|
6396
6421
|
baseUrl: t,
|
|
6397
6422
|
tokenProvider: async () => {
|
|
6398
6423
|
if (r) return null;
|
|
@@ -6401,19 +6426,19 @@ function uu(e) {
|
|
|
6401
6426
|
if (e) return `Bearer ${e}`;
|
|
6402
6427
|
if (n) return null;
|
|
6403
6428
|
} catch {}
|
|
6404
|
-
let t =
|
|
6429
|
+
let t = Qi("statistics") ? localStorage.getItem("__anon_id") : au();
|
|
6405
6430
|
return `Basic ${btoa(`${e.vendorId || e.clientId}|${t}:`)}`;
|
|
6406
6431
|
},
|
|
6407
|
-
libraryName:
|
|
6408
|
-
libraryVersion:
|
|
6432
|
+
libraryName: fc,
|
|
6433
|
+
libraryVersion: pc,
|
|
6409
6434
|
vendorId: e.vendorId,
|
|
6410
6435
|
cache: {
|
|
6411
|
-
mode:
|
|
6412
|
-
storage: new
|
|
6436
|
+
mode: Cr.BROWSER,
|
|
6437
|
+
storage: new Mi()
|
|
6413
6438
|
}
|
|
6414
6439
|
}), a = (e) => async (t, n) => {
|
|
6415
|
-
let r = sessionStorage.getItem(
|
|
6416
|
-
return r || (r = Date.now().toString(), sessionStorage.setItem(
|
|
6440
|
+
let r = sessionStorage.getItem(Oi);
|
|
6441
|
+
return r || (r = Date.now().toString(), sessionStorage.setItem(Oi, r)), e(t, {
|
|
6417
6442
|
...n,
|
|
6418
6443
|
headers: {
|
|
6419
6444
|
...n.headers,
|
|
@@ -6440,11 +6465,11 @@ function uu(e) {
|
|
|
6440
6465
|
Authorization: `Bearer ${a}`
|
|
6441
6466
|
}
|
|
6442
6467
|
});
|
|
6443
|
-
}, c =
|
|
6468
|
+
}, c = zr(t).headers({ "Content-Type": "application/json" }).middlewares([
|
|
6444
6469
|
a,
|
|
6445
6470
|
r ? o : s(),
|
|
6446
|
-
|
|
6447
|
-
|
|
6471
|
+
vr(),
|
|
6472
|
+
xr({
|
|
6448
6473
|
delayTimer: 1e3,
|
|
6449
6474
|
delayRamp: (e, t) => e * t,
|
|
6450
6475
|
maxAttempts: 3,
|
|
@@ -6454,21 +6479,21 @@ function uu(e) {
|
|
|
6454
6479
|
]);
|
|
6455
6480
|
async function l(e = {}) {
|
|
6456
6481
|
let { waitForEntitlementAfter: t, includeSignedLinks: n = !0 } = e, r = await ar() ? await i.entitlements.list({ waitForEntitlementAfter: t?.toISOString() }) : [];
|
|
6457
|
-
return n && r.push(...
|
|
6482
|
+
return n && r.push(...ra()), r;
|
|
6458
6483
|
}
|
|
6459
6484
|
async function u(e, t = []) {
|
|
6460
6485
|
return (await l())?.find((n) => {
|
|
6461
6486
|
if (e) {
|
|
6462
|
-
let { sku: t, purchaseOption: r } =
|
|
6463
|
-
if ("sku" in n && t === n.sku || r && "purchaseOptionsId" in n && r === n.purchaseOptionsId ||
|
|
6487
|
+
let { sku: t, purchaseOption: r } = Li(e);
|
|
6488
|
+
if ("sku" in n && t === n.sku || r && "purchaseOptionsId" in n && r === n.purchaseOptionsId || zi(e, n.url)) return !0;
|
|
6464
6489
|
}
|
|
6465
|
-
return !!t.some((e) =>
|
|
6490
|
+
return !!t.some((e) => zi(e, n.url) || "sku" in n && e === n.sku);
|
|
6466
6491
|
});
|
|
6467
6492
|
}
|
|
6468
6493
|
async function d(e, n, i) {
|
|
6469
6494
|
let a = new URL(t, window.location.origin);
|
|
6470
6495
|
a.pathname = a.pathname.replace(/\/$/, "") + "/proxy", a.searchParams.set("url", n), i && a.searchParams.set("selector", i);
|
|
6471
|
-
let o =
|
|
6496
|
+
let o = zr(a.toString());
|
|
6472
6497
|
return o = r ? o.options({ credentials: "include" }) : o.headers({ Authorization: `Bearer ${e}` }), o.get().text();
|
|
6473
6498
|
}
|
|
6474
6499
|
async function f(e) {
|
|
@@ -6490,11 +6515,11 @@ function uu(e) {
|
|
|
6490
6515
|
}
|
|
6491
6516
|
async function _(e) {
|
|
6492
6517
|
let t = await c.url(`/tags/${encodeURIComponent(e)}`).delete().res();
|
|
6493
|
-
return
|
|
6518
|
+
return ii(), t.ok;
|
|
6494
6519
|
}
|
|
6495
6520
|
async function v(e) {
|
|
6496
6521
|
let t = await c.url("/tags").post(encodeURIComponent(e)).res();
|
|
6497
|
-
return Wn(J.USER_ATTRIBUTE_CHANGED, {}),
|
|
6522
|
+
return Wn(J.USER_ATTRIBUTE_CHANGED, {}), ii(), t.ok;
|
|
6498
6523
|
}
|
|
6499
6524
|
async function y(e) {
|
|
6500
6525
|
return (await i.tallies.get(e)).value;
|
|
@@ -6515,7 +6540,7 @@ function uu(e) {
|
|
|
6515
6540
|
}
|
|
6516
6541
|
async function w(e) {
|
|
6517
6542
|
let t = await c.url("/profile").patch(e).res();
|
|
6518
|
-
return
|
|
6543
|
+
return ii(), t.ok;
|
|
6519
6544
|
}
|
|
6520
6545
|
async function T() {
|
|
6521
6546
|
return (await c.url("/profile/spotify-link").get().json()).isSpotifyLinked;
|
|
@@ -6525,38 +6550,47 @@ function uu(e) {
|
|
|
6525
6550
|
}
|
|
6526
6551
|
async function D(t) {
|
|
6527
6552
|
let n = await or(!1);
|
|
6528
|
-
if (
|
|
6529
|
-
|
|
6530
|
-
|
|
6553
|
+
if (n) {
|
|
6554
|
+
let r = new URL(`${Pi("access-sync", e.environment)}/spotify/sesamy-callback`);
|
|
6555
|
+
r.searchParams.set("access_token", n), r.searchParams.set("state", t), window.location.href = r.toString();
|
|
6556
|
+
return;
|
|
6557
|
+
}
|
|
6558
|
+
let r = cr();
|
|
6559
|
+
if (r !== null && await ar()) {
|
|
6560
|
+
let e = new URL(`${r}/auth/spotify-link`, window.location.origin);
|
|
6561
|
+
e.searchParams.set("sku", t), window.location.href = e.toString();
|
|
6562
|
+
return;
|
|
6563
|
+
}
|
|
6564
|
+
throw Error("No access token available");
|
|
6531
6565
|
}
|
|
6532
6566
|
async function O(e) {
|
|
6533
6567
|
let t = await c.url(`/products/${encodeURIComponent(e)}/auto-onboard`).post().json();
|
|
6534
|
-
return t.length &&
|
|
6568
|
+
return t.length && ii(), t;
|
|
6535
6569
|
}
|
|
6536
6570
|
async function k(e, t = 3600) {
|
|
6537
|
-
let { shortlink: n } = await
|
|
6571
|
+
let { shortlink: n } = await zr(Di).post({
|
|
6538
6572
|
url: e,
|
|
6539
6573
|
ttl: t
|
|
6540
6574
|
}).json();
|
|
6541
6575
|
return n;
|
|
6542
6576
|
}
|
|
6543
6577
|
async function A(t) {
|
|
6544
|
-
let n = await or(!1, !0), r, i = t.language ||
|
|
6578
|
+
let n = await or(!1, !0), r, i = t.language || Fi(), a = ua();
|
|
6545
6579
|
switch (t.target) {
|
|
6546
6580
|
case "account":
|
|
6547
|
-
r = new URL(`${
|
|
6581
|
+
r = new URL(`${Pi("account", e.environment)}/${encodeURIComponent(t.language || i)}/subscriptions/${encodeURIComponent(e.vendorId || e.clientId)}${t.contractId ? `/${encodeURIComponent(t.contractId)}` : ""}`), r.searchParams.set("sesamy-redirect-url", t.redirectUrl || window.location.href);
|
|
6548
6582
|
break;
|
|
6549
6583
|
case "change-payment":
|
|
6550
|
-
r = new URL(`${
|
|
6584
|
+
r = new URL(`${Pi("account", e.environment)}/${encodeURIComponent(t.language || i)}/subscriptions/${encodeURIComponent(e.vendorId || e.clientId)}/${encodeURIComponent(t.contractId)}/change-payment-method`), r.searchParams.set("sesamy-redirect-url", t.redirectUrl || window.location.href);
|
|
6551
6585
|
break;
|
|
6552
6586
|
case "change-plan":
|
|
6553
|
-
r = new URL(`${
|
|
6587
|
+
r = new URL(`${Pi("account", e.environment)}/${encodeURIComponent(t.language || i)}/subscriptions/${encodeURIComponent(e.vendorId || e.clientId)}/${encodeURIComponent(t.contractId)}/edit-plan`), r.searchParams.set("sesamy-redirect-url", t.redirectUrl || window.location.href);
|
|
6554
6588
|
break;
|
|
6555
6589
|
case "consume":
|
|
6556
|
-
r = new URL(`${
|
|
6590
|
+
r = new URL(`${Pi("consume", e.environment)}/${encodeURIComponent(t.language || i)}/@${encodeURIComponent(e.vendorId || e.clientId)}/${encodeURIComponent(t.sku)}`), t.episodeId ? r.href += `/${t.episodeId}` : r.href += "/listen", r.searchParams.set("sesamy-redirect-url", t.redirectUrl || window.location.href);
|
|
6557
6591
|
break;
|
|
6558
6592
|
case "checkout":
|
|
6559
|
-
r =
|
|
6593
|
+
r = ta(e, {
|
|
6560
6594
|
language: i,
|
|
6561
6595
|
...t
|
|
6562
6596
|
}, a);
|
|
@@ -6566,12 +6600,12 @@ function uu(e) {
|
|
|
6566
6600
|
return n && (r.hash = `#access_token=${n}`), t.shorten ? k(r.href, t.ttl) : r.href;
|
|
6567
6601
|
}
|
|
6568
6602
|
async function j() {
|
|
6569
|
-
let t = await or(!1), n = new URL(`${
|
|
6603
|
+
let t = await or(!1), n = new URL(`${Pi("account", e.environment)}/subscriptions/${e.vendorId || e.clientId}`);
|
|
6570
6604
|
t && (n.hash = `#access_token=${t}`), window.location.href = n.toString();
|
|
6571
6605
|
}
|
|
6572
6606
|
async function M(e) {
|
|
6573
|
-
let t =
|
|
6574
|
-
if (
|
|
6607
|
+
let t = ua();
|
|
6608
|
+
if (Qi("marketing")) {
|
|
6575
6609
|
let e = [
|
|
6576
6610
|
"_ga",
|
|
6577
6611
|
"_gid",
|
|
@@ -6584,7 +6618,7 @@ function uu(e) {
|
|
|
6584
6618
|
});
|
|
6585
6619
|
}
|
|
6586
6620
|
return i.checkouts.create({
|
|
6587
|
-
language:
|
|
6621
|
+
language: Fi(),
|
|
6588
6622
|
...e,
|
|
6589
6623
|
attribution: {
|
|
6590
6624
|
...t,
|
|
@@ -6601,21 +6635,21 @@ function uu(e) {
|
|
|
6601
6635
|
update: i.checkouts.update
|
|
6602
6636
|
},
|
|
6603
6637
|
content: {
|
|
6604
|
-
list:
|
|
6605
|
-
get:
|
|
6606
|
-
getLanguage:
|
|
6607
|
-
unlock:
|
|
6608
|
-
getPropertyFromHTML:
|
|
6638
|
+
list: xl,
|
|
6639
|
+
get: Sl,
|
|
6640
|
+
getLanguage: Fi,
|
|
6641
|
+
unlock: wl,
|
|
6642
|
+
getPropertyFromHTML: bl
|
|
6609
6643
|
},
|
|
6610
6644
|
contracts: i.contracts,
|
|
6611
6645
|
deleteTag: _,
|
|
6612
6646
|
deleteTally: x,
|
|
6613
6647
|
entitlements: i.entitlements,
|
|
6614
6648
|
flags: {
|
|
6615
|
-
get:
|
|
6616
|
-
set:
|
|
6617
|
-
list:
|
|
6618
|
-
delete:
|
|
6649
|
+
get: uu,
|
|
6650
|
+
set: lu,
|
|
6651
|
+
list: fu,
|
|
6652
|
+
delete: du
|
|
6619
6653
|
},
|
|
6620
6654
|
generateLink: A,
|
|
6621
6655
|
getProxyContent: d,
|
|
@@ -6646,16 +6680,16 @@ function uu(e) {
|
|
|
6646
6680
|
}
|
|
6647
6681
|
//#endregion
|
|
6648
6682
|
//#region src/services/browser/detect-adblock.ts
|
|
6649
|
-
var
|
|
6683
|
+
var mu = [
|
|
6650
6684
|
"AdHeader",
|
|
6651
6685
|
"AdContainer",
|
|
6652
6686
|
"AD_Top",
|
|
6653
6687
|
"homead",
|
|
6654
6688
|
"ad-lead"
|
|
6655
6689
|
];
|
|
6656
|
-
function
|
|
6690
|
+
function hu() {
|
|
6657
6691
|
return new Promise((e) => {
|
|
6658
|
-
let t =
|
|
6692
|
+
let t = mu.map((e) => {
|
|
6659
6693
|
let t = document.createElement("div");
|
|
6660
6694
|
return t.innerHTML = " ", t.id = e, t.style.position = "absolute", document.body.appendChild(t), t;
|
|
6661
6695
|
});
|
|
@@ -6667,7 +6701,7 @@ function fu() {
|
|
|
6667
6701
|
}
|
|
6668
6702
|
//#endregion
|
|
6669
6703
|
//#region src/services/browser/in-app-browser.ts
|
|
6670
|
-
function
|
|
6704
|
+
function gu() {
|
|
6671
6705
|
let e = navigator.userAgent.toLowerCase();
|
|
6672
6706
|
for (let t of [
|
|
6673
6707
|
{
|
|
@@ -6732,20 +6766,20 @@ function pu() {
|
|
|
6732
6766
|
}
|
|
6733
6767
|
//#endregion
|
|
6734
6768
|
//#region ../../node_modules/.pnpm/detectincognitojs@1.6.2/node_modules/detectincognitojs/dist/detectIncognito.esm.js
|
|
6735
|
-
var
|
|
6769
|
+
var _u = {
|
|
6736
6770
|
d: (e, t) => {
|
|
6737
|
-
for (var n in t)
|
|
6771
|
+
for (var n in t) _u.o(t, n) && !_u.o(e, n) && Object.defineProperty(e, n, {
|
|
6738
6772
|
enumerable: !0,
|
|
6739
6773
|
get: t[n]
|
|
6740
6774
|
});
|
|
6741
6775
|
},
|
|
6742
6776
|
o: (e, t) => Object.prototype.hasOwnProperty.call(e, t)
|
|
6743
|
-
},
|
|
6744
|
-
|
|
6745
|
-
A: () =>
|
|
6746
|
-
k: () =>
|
|
6777
|
+
}, vu = {};
|
|
6778
|
+
_u.d(vu, {
|
|
6779
|
+
A: () => Su,
|
|
6780
|
+
k: () => xu
|
|
6747
6781
|
});
|
|
6748
|
-
var
|
|
6782
|
+
var yu = function(e, t, n, r) {
|
|
6749
6783
|
return new (n ||= Promise)(function(i, a) {
|
|
6750
6784
|
function o(e) {
|
|
6751
6785
|
try {
|
|
@@ -6769,7 +6803,7 @@ var gu = function(e, t, n, r) {
|
|
|
6769
6803
|
}
|
|
6770
6804
|
c((r = r.apply(e, t || [])).next());
|
|
6771
6805
|
});
|
|
6772
|
-
},
|
|
6806
|
+
}, bu = function(e, t) {
|
|
6773
6807
|
var n, r, i, a, o = {
|
|
6774
6808
|
label: 0,
|
|
6775
6809
|
sent: function() {
|
|
@@ -6842,9 +6876,9 @@ var gu = function(e, t, n, r) {
|
|
|
6842
6876
|
};
|
|
6843
6877
|
}
|
|
6844
6878
|
};
|
|
6845
|
-
function
|
|
6846
|
-
return
|
|
6847
|
-
return
|
|
6879
|
+
function xu() {
|
|
6880
|
+
return yu(this, void 0, Promise, function() {
|
|
6881
|
+
return bu(this, function(e) {
|
|
6848
6882
|
switch (e.label) {
|
|
6849
6883
|
case 0: return [4, new Promise(function(e, t) {
|
|
6850
6884
|
var n = "Unknown", r = !1;
|
|
@@ -6864,9 +6898,9 @@ function vu() {
|
|
|
6864
6898
|
return e;
|
|
6865
6899
|
}
|
|
6866
6900
|
function o() {
|
|
6867
|
-
return
|
|
6901
|
+
return yu(this, void 0, void 0, function() {
|
|
6868
6902
|
var e, t;
|
|
6869
|
-
return
|
|
6903
|
+
return bu(this, function(n) {
|
|
6870
6904
|
switch (n.label) {
|
|
6871
6905
|
case 0: return n.trys.push([
|
|
6872
6906
|
0,
|
|
@@ -6882,8 +6916,8 @@ function vu() {
|
|
|
6882
6916
|
});
|
|
6883
6917
|
}
|
|
6884
6918
|
function s() {
|
|
6885
|
-
return
|
|
6886
|
-
return
|
|
6919
|
+
return yu(this, void 0, Promise, function() {
|
|
6920
|
+
return bu(this, function(e) {
|
|
6887
6921
|
switch (e.label) {
|
|
6888
6922
|
case 0: return typeof navigator.storage?.getDirectory == "function" ? [4, o()] : [3, 2];
|
|
6889
6923
|
case 1: return e.sent(), [3, 3];
|
|
@@ -6946,9 +6980,9 @@ function vu() {
|
|
|
6946
6980
|
});
|
|
6947
6981
|
}
|
|
6948
6982
|
function u() {
|
|
6949
|
-
return
|
|
6983
|
+
return yu(this, void 0, Promise, function() {
|
|
6950
6984
|
var e, t, n;
|
|
6951
|
-
return
|
|
6985
|
+
return bu(this, function(r) {
|
|
6952
6986
|
switch (r.label) {
|
|
6953
6987
|
case 0:
|
|
6954
6988
|
if (typeof navigator.storage?.getDirectory != "function") return [3, 5];
|
|
@@ -6973,8 +7007,8 @@ function vu() {
|
|
|
6973
7007
|
});
|
|
6974
7008
|
}
|
|
6975
7009
|
(function() {
|
|
6976
|
-
return
|
|
6977
|
-
return
|
|
7010
|
+
return yu(this, void 0, Promise, function() {
|
|
7011
|
+
return bu(this, function(e) {
|
|
6978
7012
|
switch (e.label) {
|
|
6979
7013
|
case 0: return a() !== 44 && a() !== 43 ? [3, 2] : (n = "Safari", [4, s()]);
|
|
6980
7014
|
case 1: return e.sent(), [3, 6];
|
|
@@ -6994,34 +7028,34 @@ function vu() {
|
|
|
6994
7028
|
});
|
|
6995
7029
|
});
|
|
6996
7030
|
}
|
|
6997
|
-
typeof window < "u" && (window.detectIncognito =
|
|
6998
|
-
var
|
|
6999
|
-
|
|
7000
|
-
var
|
|
7001
|
-
function
|
|
7031
|
+
typeof window < "u" && (window.detectIncognito = xu);
|
|
7032
|
+
var Su = xu;
|
|
7033
|
+
vu.A;
|
|
7034
|
+
var Cu = vu.k, wu = "sesamy_incognito_mode";
|
|
7035
|
+
function Tu() {
|
|
7002
7036
|
try {
|
|
7003
|
-
let e = sessionStorage.getItem(
|
|
7037
|
+
let e = sessionStorage.getItem(wu);
|
|
7004
7038
|
return e === null ? void 0 : e === "true";
|
|
7005
7039
|
} catch {
|
|
7006
7040
|
return;
|
|
7007
7041
|
}
|
|
7008
7042
|
}
|
|
7009
|
-
async function
|
|
7043
|
+
async function Eu() {
|
|
7010
7044
|
try {
|
|
7011
|
-
let e = sessionStorage.getItem(
|
|
7045
|
+
let e = sessionStorage.getItem(wu);
|
|
7012
7046
|
if (e !== null) return e === "true";
|
|
7013
|
-
let { isPrivate: t } = await
|
|
7014
|
-
return sessionStorage.setItem(
|
|
7047
|
+
let { isPrivate: t } = await Cu();
|
|
7048
|
+
return sessionStorage.setItem(wu, t.toString()), t;
|
|
7015
7049
|
} catch {
|
|
7016
7050
|
try {
|
|
7017
|
-
sessionStorage.setItem(
|
|
7051
|
+
sessionStorage.setItem(wu, "false");
|
|
7018
7052
|
} catch {}
|
|
7019
7053
|
return !1;
|
|
7020
7054
|
}
|
|
7021
7055
|
}
|
|
7022
7056
|
//#endregion
|
|
7023
7057
|
//#region src/services/events/index.ts
|
|
7024
|
-
function
|
|
7058
|
+
function Du(e, t, n = !1) {
|
|
7025
7059
|
let r = {
|
|
7026
7060
|
name: e,
|
|
7027
7061
|
data: t
|
|
@@ -7030,7 +7064,7 @@ function wu(e, t, n = !1) {
|
|
|
7030
7064
|
cancelable: n,
|
|
7031
7065
|
bubbles: !0
|
|
7032
7066
|
});
|
|
7033
|
-
|
|
7067
|
+
ou(`event:${e}`, {
|
|
7034
7068
|
...t,
|
|
7035
7069
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
7036
7070
|
});
|
|
@@ -7040,25 +7074,25 @@ function wu(e, t, n = !1) {
|
|
|
7040
7074
|
message: r.cancellationMessage
|
|
7041
7075
|
} : { canceled: !1 };
|
|
7042
7076
|
}
|
|
7043
|
-
function
|
|
7077
|
+
function Ou(e, t) {
|
|
7044
7078
|
e.cancelable && (e.detail.cancellationMessage = t, e.preventDefault());
|
|
7045
7079
|
}
|
|
7046
7080
|
//#endregion
|
|
7047
7081
|
//#region src/services/capsule/plugin.ts
|
|
7048
|
-
var
|
|
7049
|
-
function
|
|
7050
|
-
|
|
7082
|
+
var ku = null;
|
|
7083
|
+
function Au(e) {
|
|
7084
|
+
ku = e;
|
|
7051
7085
|
}
|
|
7052
|
-
function
|
|
7053
|
-
return
|
|
7086
|
+
function ju() {
|
|
7087
|
+
return ku;
|
|
7054
7088
|
}
|
|
7055
7089
|
zn(), Vn();
|
|
7056
|
-
var
|
|
7057
|
-
function
|
|
7058
|
-
return
|
|
7090
|
+
var Mu = null;
|
|
7091
|
+
function Nu() {
|
|
7092
|
+
return ju()?.getDcaClient() ?? null;
|
|
7059
7093
|
}
|
|
7060
|
-
function
|
|
7061
|
-
let n =
|
|
7094
|
+
function Pu(e, t) {
|
|
7095
|
+
let n = ju();
|
|
7062
7096
|
if (!n) {
|
|
7063
7097
|
q("[capsule] No capsule plugin registered — capsule disabled");
|
|
7064
7098
|
return;
|
|
@@ -7067,35 +7101,28 @@ function ju(e, t) {
|
|
|
7067
7101
|
getToken: or,
|
|
7068
7102
|
apiEndpoint: t
|
|
7069
7103
|
}), q("[capsule] DcaClient initialized"), window.addEventListener(J.AUTH_INITIALIZED, () => {
|
|
7070
|
-
|
|
7104
|
+
Iu();
|
|
7071
7105
|
}), window.addEventListener(J.AUTHENTICATED, () => {
|
|
7072
|
-
|
|
7106
|
+
Fu(), Iu();
|
|
7073
7107
|
});
|
|
7074
7108
|
}
|
|
7075
|
-
function
|
|
7109
|
+
function Fu() {
|
|
7076
7110
|
document.querySelectorAll("article[publisher-content-id] sesamy-paywall[data-sesamy-injected]").forEach((e) => e.remove());
|
|
7077
7111
|
}
|
|
7078
|
-
async function
|
|
7079
|
-
let e =
|
|
7112
|
+
async function Iu() {
|
|
7113
|
+
let e = ju();
|
|
7080
7114
|
if (!e) return null;
|
|
7081
|
-
let t = !1;
|
|
7082
|
-
try {
|
|
7083
|
-
t = await ar();
|
|
7084
|
-
} catch (e) {
|
|
7085
|
-
return q(`[capsule] isAuthenticated error: ${e}`), Pu(), null;
|
|
7086
|
-
}
|
|
7087
|
-
if (!t) return q("[capsule] User not authenticated — skipping unlock"), Pu(), null;
|
|
7088
7115
|
try {
|
|
7089
|
-
if (!await
|
|
7116
|
+
if (!await Cl()) return q("[capsule] No access — skipping unlock"), Lu(), null;
|
|
7090
7117
|
} catch {}
|
|
7091
7118
|
try {
|
|
7092
7119
|
let t = await e.processPage();
|
|
7093
7120
|
return t && q(`[capsule] Decrypted ${Object.keys(t).length} content item(s)`), t;
|
|
7094
7121
|
} catch (e) {
|
|
7095
|
-
return q(`[capsule] Failed to process page: ${e}`),
|
|
7122
|
+
return q(`[capsule] Failed to process page: ${e}`), Lu(), null;
|
|
7096
7123
|
}
|
|
7097
7124
|
}
|
|
7098
|
-
function
|
|
7125
|
+
function Lu() {
|
|
7099
7126
|
let e = document.querySelectorAll("script.dca-manifest");
|
|
7100
7127
|
for (let t of e) {
|
|
7101
7128
|
let e = t.closest("article[publisher-content-id]");
|
|
@@ -7115,55 +7142,55 @@ function Pu() {
|
|
|
7115
7142
|
e.appendChild(n), q(`[capsule] Injected paywall for ${r}`);
|
|
7116
7143
|
}
|
|
7117
7144
|
}
|
|
7118
|
-
function
|
|
7119
|
-
|
|
7145
|
+
function Ru() {
|
|
7146
|
+
Mu || typeof MutationObserver > "u" || typeof document > "u" || !document.body || (Mu = new MutationObserver((e) => {
|
|
7120
7147
|
for (let t of e) for (let e of t.addedNodes) if (e instanceof HTMLElement && (e.matches?.("script.dca-manifest") || e.querySelector?.("script.dca-manifest"))) {
|
|
7121
|
-
|
|
7148
|
+
Iu();
|
|
7122
7149
|
return;
|
|
7123
7150
|
}
|
|
7124
|
-
}),
|
|
7151
|
+
}), Mu.observe(document.body, {
|
|
7125
7152
|
childList: !0,
|
|
7126
7153
|
subtree: !0
|
|
7127
7154
|
}), q("[capsule] DCA MutationObserver started"));
|
|
7128
7155
|
}
|
|
7129
7156
|
//#endregion
|
|
7130
7157
|
//#region src/services/diagnostics/index.ts
|
|
7131
|
-
var
|
|
7158
|
+
var zu = [
|
|
7132
7159
|
"sesamy",
|
|
7133
7160
|
"__sesamy",
|
|
7134
7161
|
"__anon_id",
|
|
7135
7162
|
"auth0",
|
|
7136
7163
|
"a0",
|
|
7137
7164
|
"_legacy_auth0"
|
|
7138
|
-
],
|
|
7165
|
+
], Bu = [
|
|
7139
7166
|
"access_token",
|
|
7140
7167
|
"id_token",
|
|
7141
7168
|
"refresh_token",
|
|
7142
7169
|
"token"
|
|
7143
7170
|
];
|
|
7144
|
-
function
|
|
7171
|
+
function Vu(e) {
|
|
7145
7172
|
let t = e.split(".");
|
|
7146
7173
|
return t.length === 3 ? `${t[0]}.${t[1]}.[REDACTED]` : e;
|
|
7147
7174
|
}
|
|
7148
|
-
function
|
|
7175
|
+
function Hu(e) {
|
|
7149
7176
|
let t = e.toLowerCase();
|
|
7150
|
-
return
|
|
7177
|
+
return Bu.some((e) => t.includes(e));
|
|
7151
7178
|
}
|
|
7152
|
-
function
|
|
7179
|
+
function Uu(e) {
|
|
7153
7180
|
let t = e.split(".");
|
|
7154
7181
|
return t.length === 3 && t.every((e) => e.length > 0);
|
|
7155
7182
|
}
|
|
7156
|
-
function
|
|
7183
|
+
function Wu(e) {
|
|
7157
7184
|
let t = [];
|
|
7158
7185
|
for (let n = 0; n < e.length; n++) {
|
|
7159
7186
|
let r = e.key(n);
|
|
7160
|
-
if (r &&
|
|
7187
|
+
if (r && zu.some((e) => r.toLowerCase().startsWith(e.toLowerCase()))) {
|
|
7161
7188
|
let n = e.getItem(r) || "", i = !1;
|
|
7162
|
-
(
|
|
7189
|
+
(Hu(r) || Uu(n)) && (n = Vu(n), i = !0);
|
|
7163
7190
|
try {
|
|
7164
7191
|
let e = JSON.parse(n);
|
|
7165
7192
|
if (typeof e == "object" && e) {
|
|
7166
|
-
let t =
|
|
7193
|
+
let t = Gu(e);
|
|
7167
7194
|
t.wasRedacted && (n = JSON.stringify(t.value), i = !0);
|
|
7168
7195
|
}
|
|
7169
7196
|
} catch {}
|
|
@@ -7176,13 +7203,13 @@ function Vu(e) {
|
|
|
7176
7203
|
}
|
|
7177
7204
|
return t;
|
|
7178
7205
|
}
|
|
7179
|
-
function
|
|
7206
|
+
function Gu(e) {
|
|
7180
7207
|
if (e == null) return {
|
|
7181
7208
|
value: e,
|
|
7182
7209
|
wasRedacted: !1
|
|
7183
7210
|
};
|
|
7184
|
-
if (typeof e == "string") return
|
|
7185
|
-
value:
|
|
7211
|
+
if (typeof e == "string") return Uu(e) ? {
|
|
7212
|
+
value: Vu(e),
|
|
7186
7213
|
wasRedacted: !0
|
|
7187
7214
|
} : {
|
|
7188
7215
|
value: e,
|
|
@@ -7192,7 +7219,7 @@ function Hu(e) {
|
|
|
7192
7219
|
let t = !1;
|
|
7193
7220
|
return {
|
|
7194
7221
|
value: e.map((e) => {
|
|
7195
|
-
let n =
|
|
7222
|
+
let n = Gu(e);
|
|
7196
7223
|
return n.wasRedacted && (t = !0), n.value;
|
|
7197
7224
|
}),
|
|
7198
7225
|
wasRedacted: t
|
|
@@ -7200,9 +7227,9 @@ function Hu(e) {
|
|
|
7200
7227
|
}
|
|
7201
7228
|
if (typeof e == "object") {
|
|
7202
7229
|
let t = !1, n = {};
|
|
7203
|
-
for (let [r, i] of Object.entries(e)) if (
|
|
7230
|
+
for (let [r, i] of Object.entries(e)) if (Hu(r) && typeof i == "string") n[r] = Vu(i), t = !0;
|
|
7204
7231
|
else {
|
|
7205
|
-
let e =
|
|
7232
|
+
let e = Gu(i);
|
|
7206
7233
|
e.wasRedacted && (t = !0), n[r] = e.value;
|
|
7207
7234
|
}
|
|
7208
7235
|
return {
|
|
@@ -7215,7 +7242,7 @@ function Hu(e) {
|
|
|
7215
7242
|
wasRedacted: !1
|
|
7216
7243
|
};
|
|
7217
7244
|
}
|
|
7218
|
-
function
|
|
7245
|
+
function Ku() {
|
|
7219
7246
|
let e = navigator;
|
|
7220
7247
|
return {
|
|
7221
7248
|
userAgent: e.userAgent,
|
|
@@ -7238,40 +7265,40 @@ function Uu() {
|
|
|
7238
7265
|
timezoneOffset: (/* @__PURE__ */ new Date()).getTimezoneOffset()
|
|
7239
7266
|
};
|
|
7240
7267
|
}
|
|
7241
|
-
async function
|
|
7242
|
-
await
|
|
7243
|
-
let [e] = await Promise.all([
|
|
7268
|
+
async function qu() {
|
|
7269
|
+
await Eu();
|
|
7270
|
+
let [e] = await Promise.all([hu()]), t = gu();
|
|
7244
7271
|
return {
|
|
7245
7272
|
adBlockEnabled: e,
|
|
7246
|
-
incognitoMode:
|
|
7273
|
+
incognitoMode: Tu() ?? !1,
|
|
7247
7274
|
inAppBrowser: t.isInAppBrowser
|
|
7248
7275
|
};
|
|
7249
7276
|
}
|
|
7250
|
-
async function
|
|
7277
|
+
async function Ju(e) {
|
|
7251
7278
|
let t = [], n = {
|
|
7252
7279
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
7253
|
-
sdkVersion:
|
|
7280
|
+
sdkVersion: pc,
|
|
7254
7281
|
clientId: e.clientId,
|
|
7255
|
-
fallbackId: e.fallbackId ||
|
|
7282
|
+
fallbackId: e.fallbackId || au()
|
|
7256
7283
|
};
|
|
7257
7284
|
n.pageUrl = window.location.href, n.pageTitle = document.title;
|
|
7258
7285
|
try {
|
|
7259
|
-
n.browser =
|
|
7286
|
+
n.browser = Ku();
|
|
7260
7287
|
} catch (e) {
|
|
7261
7288
|
t.push(`Browser info collection failed: ${e.message}`);
|
|
7262
7289
|
}
|
|
7263
7290
|
try {
|
|
7264
|
-
n.detection = await
|
|
7291
|
+
n.detection = await qu();
|
|
7265
7292
|
} catch (e) {
|
|
7266
7293
|
t.push(`Detection collection failed: ${e.message}`);
|
|
7267
7294
|
}
|
|
7268
7295
|
try {
|
|
7269
|
-
n.localStorage =
|
|
7296
|
+
n.localStorage = Wu(localStorage);
|
|
7270
7297
|
} catch (e) {
|
|
7271
7298
|
t.push(`LocalStorage collection failed: ${e.message}`);
|
|
7272
7299
|
}
|
|
7273
7300
|
try {
|
|
7274
|
-
n.sessionStorage =
|
|
7301
|
+
n.sessionStorage = Wu(sessionStorage);
|
|
7275
7302
|
} catch (e) {
|
|
7276
7303
|
t.push(`SessionStorage collection failed: ${e.message}`);
|
|
7277
7304
|
}
|
|
@@ -7313,14 +7340,14 @@ async function Gu(e) {
|
|
|
7313
7340
|
}
|
|
7314
7341
|
return t.length > 0 && (n.errors = t), n;
|
|
7315
7342
|
}
|
|
7316
|
-
async function
|
|
7317
|
-
let r = `${
|
|
7343
|
+
async function Yu(e, t, n) {
|
|
7344
|
+
let r = `${Pi("api2", t)}/diagnostics`, i = { "Content-Type": "application/json" };
|
|
7318
7345
|
if (await ar()) try {
|
|
7319
7346
|
let e = await or(!1);
|
|
7320
7347
|
e && (i.Authorization = `Bearer ${e}`);
|
|
7321
7348
|
} catch {}
|
|
7322
7349
|
if (!i.Authorization && n) {
|
|
7323
|
-
let e =
|
|
7350
|
+
let e = au() || "";
|
|
7324
7351
|
i.Authorization = `Basic ${btoa(`${n}|${e}:`)}`;
|
|
7325
7352
|
}
|
|
7326
7353
|
let a = await fetch(r, {
|
|
@@ -7337,11 +7364,11 @@ async function Ku(e, t, n) {
|
|
|
7337
7364
|
//#endregion
|
|
7338
7365
|
//#region src/handlers/user-diagnostics.ts
|
|
7339
7366
|
zn();
|
|
7340
|
-
var
|
|
7341
|
-
function
|
|
7367
|
+
var Xu = "user-diagnostics", Zu = "diagnostics-id", Qu = "\n .sesamy-diagnostics-modal {\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;\n background: white;\n border-radius: 12px;\n padding: 24px;\n max-width: 400px;\n width: 90vw;\n box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);\n text-align: center;\n }\n\n .sesamy-diagnostics-modal h2 {\n margin: 0 0 12px;\n font-size: 20px;\n font-weight: 600;\n color: #1a1a1a;\n }\n\n .sesamy-diagnostics-modal p {\n margin: 0 0 20px;\n color: #666;\n font-size: 14px;\n line-height: 1.5;\n }\n\n .sesamy-diagnostics-modal .buttons {\n display: flex;\n gap: 12px;\n justify-content: center;\n }\n\n .sesamy-diagnostics-modal button {\n padding: 10px 20px;\n border-radius: 6px;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.15s ease;\n border: none;\n }\n\n .sesamy-diagnostics-modal .btn-primary {\n background: #2563eb;\n color: white;\n }\n\n .sesamy-diagnostics-modal .btn-primary:hover {\n background: #1d4ed8;\n }\n\n .sesamy-diagnostics-modal .btn-primary:disabled {\n background: #93c5fd;\n cursor: not-allowed;\n }\n\n .sesamy-diagnostics-modal .btn-secondary {\n background: #f3f4f6;\n color: #374151;\n }\n\n .sesamy-diagnostics-modal .btn-secondary:hover {\n background: #e5e7eb;\n }\n\n .sesamy-diagnostics-modal .status {\n margin-top: 16px;\n font-size: 13px;\n }\n\n .sesamy-diagnostics-modal .status.success {\n color: #059669;\n }\n\n .sesamy-diagnostics-modal .status.error {\n color: #dc2626;\n }\n\n .sesamy-diagnostics-modal .status.loading {\n color: #6b7280;\n }\n\n .sesamy-diagnostics-modal .spinner {\n display: inline-block;\n width: 14px;\n height: 14px;\n border: 2px solid #e5e7eb;\n border-top-color: #2563eb;\n border-radius: 50%;\n animation: spin 0.8s linear infinite;\n margin-right: 8px;\n vertical-align: middle;\n }\n\n @keyframes spin {\n to { transform: rotate(360deg); }\n }\n";
|
|
7368
|
+
function $u() {
|
|
7342
7369
|
let e = document.createElement("div");
|
|
7343
7370
|
return e.className = "sesamy-diagnostics-modal", e.innerHTML = `
|
|
7344
|
-
<style>${
|
|
7371
|
+
<style>${Qu}</style>
|
|
7345
7372
|
<h2>Send Diagnostics</h2>
|
|
7346
7373
|
<p>
|
|
7347
7374
|
Our support team has requested diagnostic information to help troubleshoot your issue.
|
|
@@ -7354,9 +7381,9 @@ function Xu() {
|
|
|
7354
7381
|
<div class="status" style="display: none;"></div>
|
|
7355
7382
|
`, e;
|
|
7356
7383
|
}
|
|
7357
|
-
function
|
|
7384
|
+
function ed(e) {
|
|
7358
7385
|
return new Promise((t) => {
|
|
7359
|
-
let n =
|
|
7386
|
+
let n = $u(), { close: r } = Tl(n, {
|
|
7360
7387
|
closeOnBackdropClick: !1,
|
|
7361
7388
|
closeOnEscape: !0
|
|
7362
7389
|
}), i = n.querySelector("[data-action=\"cancel\"]"), a = n.querySelector("[data-action=\"send\"]"), o = n.querySelector(".status"), s = (e, t) => {
|
|
@@ -7367,9 +7394,9 @@ function Zu(e) {
|
|
|
7367
7394
|
}), a.addEventListener("click", async () => {
|
|
7368
7395
|
a.disabled = !0, i.disabled = !0, s("Collecting diagnostics...", "loading");
|
|
7369
7396
|
try {
|
|
7370
|
-
let n = await
|
|
7397
|
+
let n = await Ju(e);
|
|
7371
7398
|
s("Sending diagnostics...", "loading");
|
|
7372
|
-
let i = await
|
|
7399
|
+
let i = await Yu(n, e.environment, e.clientId);
|
|
7373
7400
|
s("Diagnostics sent successfully!", "success"), setTimeout(() => {
|
|
7374
7401
|
r(), t({
|
|
7375
7402
|
sent: !0,
|
|
@@ -7382,61 +7409,61 @@ function Zu(e) {
|
|
|
7382
7409
|
});
|
|
7383
7410
|
});
|
|
7384
7411
|
}
|
|
7385
|
-
async function
|
|
7412
|
+
async function td(e) {
|
|
7386
7413
|
let t = new URLSearchParams(window.location.search);
|
|
7387
|
-
if (t.get(
|
|
7388
|
-
let n = t.get(
|
|
7414
|
+
if (t.get(Xu)?.toLowerCase() !== "true") return;
|
|
7415
|
+
let n = t.get(Zu);
|
|
7389
7416
|
n && (e.fallbackId = n), q("User diagnostics requested via query parameter");
|
|
7390
7417
|
let r = new URL(window.location.href);
|
|
7391
|
-
r.searchParams.delete(
|
|
7392
|
-
let i = await
|
|
7418
|
+
r.searchParams.delete(Xu), r.searchParams.delete(Zu), window.history.replaceState(null, "", r);
|
|
7419
|
+
let i = await ed(e);
|
|
7393
7420
|
i.sent ? q(`Diagnostics sent with ID: ${i.id}`) : q("User cancelled diagnostics");
|
|
7394
7421
|
}
|
|
7395
|
-
async function
|
|
7396
|
-
return
|
|
7422
|
+
async function nd(e) {
|
|
7423
|
+
return ed(e);
|
|
7397
7424
|
}
|
|
7398
7425
|
//#endregion
|
|
7399
7426
|
//#region src/javascript-api.ts
|
|
7400
7427
|
zn();
|
|
7401
|
-
function
|
|
7402
|
-
let { autoOnboardProduct: t, bills: n, checkouts: r, contracts: i, deleteTag: a, deleteTally: o, entitlements: s, generateLink: c, getEntitlements: l, getFulfillments: u, getProfile: d, getProxyContent: f, getSubscriptions: p, getTags: m, getTally: h, getTallies: g, getTransaction: _, hasAccess: v, isSpotifyLinked: y, linkSpotify: b, openHostedAccountPage: x, paywalls: S, paymentIssues: C, products: w, pushTally: T, requestDelivery: E, setTag: D, transactions: O, unlinkSpotify: k, updateProfile: A, userMetadata: j, vendor: M } =
|
|
7403
|
-
analytics: { track:
|
|
7428
|
+
function rd(e) {
|
|
7429
|
+
let { autoOnboardProduct: t, bills: n, checkouts: r, contracts: i, deleteTag: a, deleteTally: o, entitlements: s, generateLink: c, getEntitlements: l, getFulfillments: u, getProfile: d, getProxyContent: f, getSubscriptions: p, getTags: m, getTally: h, getTallies: g, getTransaction: _, hasAccess: v, isSpotifyLinked: y, linkSpotify: b, openHostedAccountPage: x, paywalls: S, paymentIssues: C, products: w, pushTally: T, requestDelivery: E, setTag: D, transactions: O, unlinkSpotify: k, updateProfile: A, userMetadata: j, vendor: M } = pu(e), N = () => C.list(), P = {
|
|
7430
|
+
analytics: { track: ou },
|
|
7404
7431
|
attribution: {
|
|
7405
|
-
get:
|
|
7406
|
-
set:
|
|
7432
|
+
get: ua,
|
|
7433
|
+
set: da
|
|
7407
7434
|
},
|
|
7408
7435
|
auth: {
|
|
7409
7436
|
getUser: d,
|
|
7410
7437
|
getTokenSilently: or,
|
|
7411
7438
|
isAuthenticated: ar,
|
|
7412
|
-
loginWithRedirect:
|
|
7413
|
-
loginWithPopup:
|
|
7414
|
-
login:
|
|
7415
|
-
logout:
|
|
7416
|
-
refresh:
|
|
7417
|
-
setToken:
|
|
7439
|
+
loginWithRedirect: ur,
|
|
7440
|
+
loginWithPopup: dr,
|
|
7441
|
+
login: lr,
|
|
7442
|
+
logout: fr,
|
|
7443
|
+
refresh: pr,
|
|
7444
|
+
setToken: mr
|
|
7418
7445
|
},
|
|
7419
7446
|
bills: n,
|
|
7420
7447
|
browser: {
|
|
7421
|
-
detectAdblock:
|
|
7422
|
-
isInAppBrowser:
|
|
7423
|
-
isIncognito:
|
|
7448
|
+
detectAdblock: hu,
|
|
7449
|
+
isInAppBrowser: gu,
|
|
7450
|
+
isIncognito: Tu
|
|
7424
7451
|
},
|
|
7425
7452
|
checkouts: r,
|
|
7426
|
-
clearCache:
|
|
7453
|
+
clearCache: ii,
|
|
7427
7454
|
content: {
|
|
7428
|
-
list:
|
|
7429
|
-
get:
|
|
7430
|
-
getLanguage:
|
|
7431
|
-
hasAccess:
|
|
7432
|
-
unlock:
|
|
7433
|
-
getPropertyFromHTML:
|
|
7434
|
-
showModal:
|
|
7435
|
-
showNotificationBar:
|
|
7455
|
+
list: xl,
|
|
7456
|
+
get: Sl,
|
|
7457
|
+
getLanguage: Fi,
|
|
7458
|
+
hasAccess: Cl,
|
|
7459
|
+
unlock: wl,
|
|
7460
|
+
getPropertyFromHTML: bl,
|
|
7461
|
+
showModal: Tl,
|
|
7462
|
+
showNotificationBar: El
|
|
7436
7463
|
},
|
|
7437
7464
|
contracts: i,
|
|
7438
7465
|
diagnostics: {
|
|
7439
|
-
send: (t) =>
|
|
7466
|
+
send: (t) => nd({
|
|
7440
7467
|
clientId: e.clientId || e.vendorId,
|
|
7441
7468
|
environment: e.environment,
|
|
7442
7469
|
fallbackId: t,
|
|
@@ -7446,7 +7473,7 @@ function ed(e) {
|
|
|
7446
7473
|
getTags: () => m(),
|
|
7447
7474
|
getTallies: () => g()
|
|
7448
7475
|
}),
|
|
7449
|
-
collect: (t) =>
|
|
7476
|
+
collect: (t) => Ju({
|
|
7450
7477
|
clientId: e.clientId || e.vendorId,
|
|
7451
7478
|
environment: e.environment,
|
|
7452
7479
|
fallbackId: t,
|
|
@@ -7472,17 +7499,17 @@ function ed(e) {
|
|
|
7472
7499
|
},
|
|
7473
7500
|
hasAccess: v,
|
|
7474
7501
|
list: l,
|
|
7475
|
-
signedLinks:
|
|
7502
|
+
signedLinks: ra
|
|
7476
7503
|
},
|
|
7477
7504
|
events: {
|
|
7478
|
-
emit:
|
|
7479
|
-
cancel:
|
|
7505
|
+
emit: Du,
|
|
7506
|
+
cancel: Ou
|
|
7480
7507
|
},
|
|
7481
7508
|
flags: {
|
|
7482
|
-
get:
|
|
7483
|
-
set:
|
|
7484
|
-
list:
|
|
7485
|
-
delete:
|
|
7509
|
+
get: uu,
|
|
7510
|
+
set: lu,
|
|
7511
|
+
list: fu,
|
|
7512
|
+
delete: du
|
|
7486
7513
|
},
|
|
7487
7514
|
fulfillments: {
|
|
7488
7515
|
list: u,
|
|
@@ -7490,8 +7517,8 @@ function ed(e) {
|
|
|
7490
7517
|
},
|
|
7491
7518
|
generateLink: c,
|
|
7492
7519
|
getPaymentIssues: N,
|
|
7493
|
-
getVersion:
|
|
7494
|
-
isReady: () =>
|
|
7520
|
+
getVersion: id,
|
|
7521
|
+
isReady: () => zd,
|
|
7495
7522
|
log: q,
|
|
7496
7523
|
paywalls: S,
|
|
7497
7524
|
paymentIssues: C,
|
|
@@ -7526,25 +7553,25 @@ function ed(e) {
|
|
|
7526
7553
|
},
|
|
7527
7554
|
userMetadata: j,
|
|
7528
7555
|
capsule: {
|
|
7529
|
-
getClient: () =>
|
|
7530
|
-
processPage:
|
|
7556
|
+
getClient: () => Nu(),
|
|
7557
|
+
processPage: Iu
|
|
7531
7558
|
},
|
|
7532
7559
|
consent: {
|
|
7533
|
-
get:
|
|
7534
|
-
set:
|
|
7535
|
-
has:
|
|
7560
|
+
get: Zi,
|
|
7561
|
+
set: $i,
|
|
7562
|
+
has: Qi
|
|
7536
7563
|
},
|
|
7537
7564
|
vendor: M,
|
|
7538
|
-
setToken:
|
|
7565
|
+
setToken: mr
|
|
7539
7566
|
};
|
|
7540
7567
|
return e.namespace && typeof window < "u" && (window[e.namespace] = P), P;
|
|
7541
7568
|
}
|
|
7542
|
-
function
|
|
7543
|
-
return
|
|
7569
|
+
function id() {
|
|
7570
|
+
return pc;
|
|
7544
7571
|
}
|
|
7545
7572
|
//#endregion
|
|
7546
7573
|
//#region src/services/transform/gradient.ts
|
|
7547
|
-
function
|
|
7574
|
+
function ad(e, t) {
|
|
7548
7575
|
e.style.position = "relative", e.style.height = "200px", e.style.overflow = "hidden";
|
|
7549
7576
|
let n = 0, r = Array.from(e.children);
|
|
7550
7577
|
for (let e of r) {
|
|
@@ -7567,7 +7594,7 @@ function nd(e, t) {
|
|
|
7567
7594
|
}
|
|
7568
7595
|
//#endregion
|
|
7569
7596
|
//#region src/services/transform/helpers/fetch-content.ts
|
|
7570
|
-
async function
|
|
7597
|
+
async function od(e) {
|
|
7571
7598
|
try {
|
|
7572
7599
|
let t = await fetch(e);
|
|
7573
7600
|
return t.ok ? await t.text() : (console.error(`Failed to fetch content from ${e}: ${t.statusText}`), null);
|
|
@@ -7577,13 +7604,13 @@ async function rd(e) {
|
|
|
7577
7604
|
}
|
|
7578
7605
|
//#endregion
|
|
7579
7606
|
//#region src/services/transform/helpers/get-content.ts
|
|
7580
|
-
async function
|
|
7607
|
+
async function sd(e) {
|
|
7581
7608
|
if (e.contentType === "selector" && e.content) {
|
|
7582
7609
|
let t = document.querySelector(e.content);
|
|
7583
7610
|
if (t) return t.innerHTML;
|
|
7584
7611
|
console.warn(`Source element for selector '${e.content}' not found`);
|
|
7585
7612
|
} else if (e.contentType === "url" && e.content) {
|
|
7586
|
-
let t = await
|
|
7613
|
+
let t = await od(e.content);
|
|
7587
7614
|
if (t) return t;
|
|
7588
7615
|
console.warn(`Failed to fetch content from URL '${e.content}'`);
|
|
7589
7616
|
} else if (e.content) return e.content;
|
|
@@ -7591,8 +7618,8 @@ async function id(e) {
|
|
|
7591
7618
|
}
|
|
7592
7619
|
//#endregion
|
|
7593
7620
|
//#region src/services/transform/insert.ts
|
|
7594
|
-
async function
|
|
7595
|
-
let n = t.insertionPoint || "inside", r = await
|
|
7621
|
+
async function cd(e, t) {
|
|
7622
|
+
let n = t.insertionPoint || "inside", r = await sd(t);
|
|
7596
7623
|
switch (n) {
|
|
7597
7624
|
case "before":
|
|
7598
7625
|
e.insertAdjacentHTML("beforebegin", r);
|
|
@@ -7607,18 +7634,18 @@ async function ad(e, t) {
|
|
|
7607
7634
|
}
|
|
7608
7635
|
//#endregion
|
|
7609
7636
|
//#region src/services/transform/replace.ts
|
|
7610
|
-
async function
|
|
7611
|
-
e.innerHTML = await
|
|
7637
|
+
async function ld(e, t) {
|
|
7638
|
+
e.innerHTML = await sd(t);
|
|
7612
7639
|
}
|
|
7613
7640
|
//#endregion
|
|
7614
7641
|
//#region src/services/transform/wrap.ts
|
|
7615
|
-
async function
|
|
7616
|
-
e.innerHTML = (await
|
|
7642
|
+
async function ud(e, t) {
|
|
7643
|
+
e.innerHTML = (await sd(t)).replace("${content}", e.innerHTML);
|
|
7617
7644
|
}
|
|
7618
7645
|
//#endregion
|
|
7619
7646
|
//#region src/services/transform/index.ts
|
|
7620
|
-
async function
|
|
7621
|
-
e &&
|
|
7647
|
+
async function dd({ enabled: e = !1, rules: t }) {
|
|
7648
|
+
e && Uc(async () => {
|
|
7622
7649
|
let e = await ar(), n = window.location.href;
|
|
7623
7650
|
for (let r of t) {
|
|
7624
7651
|
let t = document.querySelectorAll(r.selector);
|
|
@@ -7626,19 +7653,19 @@ async function cd({ enabled: e = !1, rules: t }) {
|
|
|
7626
7653
|
let t = n;
|
|
7627
7654
|
if (!(r.authenticated !== void 0 && r.authenticated !== e)) switch (r.transform) {
|
|
7628
7655
|
case "insert":
|
|
7629
|
-
await
|
|
7656
|
+
await cd(t, r);
|
|
7630
7657
|
break;
|
|
7631
7658
|
case "replace":
|
|
7632
|
-
await
|
|
7659
|
+
await ld(t, r);
|
|
7633
7660
|
break;
|
|
7634
7661
|
case "remove":
|
|
7635
7662
|
n.remove();
|
|
7636
7663
|
break;
|
|
7637
7664
|
case "wrap":
|
|
7638
|
-
await
|
|
7665
|
+
await ud(t, r);
|
|
7639
7666
|
break;
|
|
7640
7667
|
case "gradient":
|
|
7641
|
-
|
|
7668
|
+
ad(t, r);
|
|
7642
7669
|
break;
|
|
7643
7670
|
default: console.warn(`Unknown transform type: ${r.transform}`);
|
|
7644
7671
|
}
|
|
@@ -7648,28 +7675,28 @@ async function cd({ enabled: e = !1, rules: t }) {
|
|
|
7648
7675
|
}
|
|
7649
7676
|
//#endregion
|
|
7650
7677
|
//#region src/handlers/token.ts
|
|
7651
|
-
var
|
|
7652
|
-
function
|
|
7653
|
-
let e = new URLSearchParams(window.location.hash.substring(1)), t = e.get(
|
|
7678
|
+
var fd = "access_token";
|
|
7679
|
+
function pd() {
|
|
7680
|
+
let e = new URLSearchParams(window.location.hash.substring(1)), t = e.get(fd);
|
|
7654
7681
|
if (t) {
|
|
7655
|
-
|
|
7682
|
+
mr(t);
|
|
7656
7683
|
let n = new URL(window.location.href);
|
|
7657
|
-
e.delete(
|
|
7684
|
+
e.delete(fd), n.hash = e.toString(), window.history.replaceState(null, "", n);
|
|
7658
7685
|
}
|
|
7659
7686
|
}
|
|
7660
7687
|
//#endregion
|
|
7661
7688
|
//#region src/handlers/force-refresh.ts
|
|
7662
|
-
var
|
|
7663
|
-
function
|
|
7664
|
-
let e = new URLSearchParams(window.location.search), t = e.get(
|
|
7689
|
+
var md = "sesamy-refresh", hd = "force-refetch-entitlements";
|
|
7690
|
+
function gd() {
|
|
7691
|
+
let e = new URLSearchParams(window.location.search), t = e.get(hd), n = e.get(md);
|
|
7665
7692
|
if (t !== null || n !== null) {
|
|
7666
7693
|
let t = new URL(window.location.href);
|
|
7667
|
-
e.delete(
|
|
7694
|
+
e.delete(hd), e.delete(md), t.search = e.toString(), ii(), window.history.replaceState(null, "", t);
|
|
7668
7695
|
}
|
|
7669
7696
|
}
|
|
7670
7697
|
//#endregion
|
|
7671
7698
|
//#region src/utils/jwt.ts
|
|
7672
|
-
function
|
|
7699
|
+
function _d(e) {
|
|
7673
7700
|
if (!e || typeof e != "string") throw Error("Invalid token: token must be a non-empty string");
|
|
7674
7701
|
let t = e.split(".");
|
|
7675
7702
|
if (t.length !== 3 && t.length !== 2) throw Error("Invalid JWT format: token must have 2 or 3 parts separated by dots");
|
|
@@ -7690,7 +7717,7 @@ function md(e) {
|
|
|
7690
7717
|
//#endregion
|
|
7691
7718
|
//#region src/handlers/signed-links.ts
|
|
7692
7719
|
zn();
|
|
7693
|
-
function
|
|
7720
|
+
function vd(e) {
|
|
7694
7721
|
try {
|
|
7695
7722
|
let t = e.lastIndexOf(".");
|
|
7696
7723
|
if (t === -1) return {
|
|
@@ -7723,7 +7750,7 @@ function hd(e) {
|
|
|
7723
7750
|
};
|
|
7724
7751
|
}
|
|
7725
7752
|
}
|
|
7726
|
-
function
|
|
7753
|
+
function yd(e, t) {
|
|
7727
7754
|
let n = /* @__PURE__ */ new Date(e.exp * 1e3);
|
|
7728
7755
|
return {
|
|
7729
7756
|
id: e.s?.toString() || "",
|
|
@@ -7740,7 +7767,7 @@ function gd(e, t) {
|
|
|
7740
7767
|
updatedAt: (/* @__PURE__ */ new Date(e.iat * 1e3)).toISOString()
|
|
7741
7768
|
};
|
|
7742
7769
|
}
|
|
7743
|
-
function
|
|
7770
|
+
function bd(e, t) {
|
|
7744
7771
|
let n = /* @__PURE__ */ new Date(e.exp * 1e3), r = e.meta;
|
|
7745
7772
|
return {
|
|
7746
7773
|
id: e.tid,
|
|
@@ -7757,76 +7784,76 @@ function _d(e, t) {
|
|
|
7757
7784
|
updatedAt: (/* @__PURE__ */ new Date(e.iat * 1e3)).toISOString()
|
|
7758
7785
|
};
|
|
7759
7786
|
}
|
|
7760
|
-
function
|
|
7787
|
+
function xd() {
|
|
7761
7788
|
let e = new URLSearchParams(window.location.search), t = e.get("sesamy_token") || e.get("sesamy-token") || e.get("token");
|
|
7762
7789
|
if (t) try {
|
|
7763
|
-
let e =
|
|
7764
|
-
e.valid && !e.expired ?
|
|
7790
|
+
let e = vd(t);
|
|
7791
|
+
e.valid && !e.expired ? ia(bd(e.payload, t)) : e.valid ? e.expired && q("Share token has expired") : ia(yd(_d(t), t));
|
|
7765
7792
|
} catch (e) {
|
|
7766
7793
|
q(`Failed to extract signed link ${e}`);
|
|
7767
7794
|
}
|
|
7768
7795
|
}
|
|
7769
|
-
function
|
|
7770
|
-
|
|
7796
|
+
function Sd() {
|
|
7797
|
+
xd();
|
|
7771
7798
|
let e = new URL(window.location.href), t = e.search;
|
|
7772
7799
|
e.searchParams.delete("ss"), e.searchParams.delete("se"), e.searchParams.delete("sp"), e.searchParams.delete("so"), e.searchParams.delete("token"), e.searchParams.delete("sesamy-token"), e.searchParams.delete("sesamy_token"), e.search !== t && window.history.replaceState(null, "", e);
|
|
7773
7800
|
}
|
|
7774
7801
|
//#endregion
|
|
7775
7802
|
//#region src/handlers/user.ts
|
|
7776
7803
|
zn();
|
|
7777
|
-
var
|
|
7778
|
-
async function
|
|
7779
|
-
let e = new URLSearchParams(window.location.search).get(
|
|
7804
|
+
var Cd = "sesamy-user";
|
|
7805
|
+
async function wd() {
|
|
7806
|
+
let e = new URLSearchParams(window.location.search).get(Cd)?.toLowerCase();
|
|
7780
7807
|
if (!e) return;
|
|
7781
7808
|
let t = await sr();
|
|
7782
|
-
t?.email === e ? q(`Current user matches sesamy user: ${t?.email} === ${e}`) : (q(`Current user does not match sesamy user: ${t?.email} !== ${e}`),
|
|
7809
|
+
t?.email === e ? q(`Current user matches sesamy user: ${t?.email} === ${e}`) : (q(`Current user does not match sesamy user: ${t?.email} !== ${e}`), ii(), ur({ authorizationParams: { login_hint: e } }));
|
|
7783
7810
|
let n = new URL(window.location.href);
|
|
7784
|
-
n.searchParams.delete(
|
|
7811
|
+
n.searchParams.delete(Cd), window.history.replaceState(null, "", n);
|
|
7785
7812
|
}
|
|
7786
7813
|
zn(), Gn(), Vn();
|
|
7787
|
-
var
|
|
7788
|
-
function
|
|
7789
|
-
let e = new URLSearchParams(window.location.search), t = e.get(
|
|
7814
|
+
var Td = "sesamy-purchase";
|
|
7815
|
+
function Ed() {
|
|
7816
|
+
let e = new URLSearchParams(window.location.search), t = e.get(Td);
|
|
7790
7817
|
if (t !== null) {
|
|
7791
7818
|
let n = new URL(window.location.href);
|
|
7792
|
-
e.delete(
|
|
7819
|
+
e.delete(Td), n.search = e.toString(), q(`Purchase ${t}`), Wn(J.PURCHASE, { itemSrc: t }), ii(), window.history.replaceState(null, "", n);
|
|
7793
7820
|
}
|
|
7794
7821
|
}
|
|
7795
7822
|
//#endregion
|
|
7796
7823
|
//#region src/handlers/login.ts
|
|
7797
|
-
var
|
|
7798
|
-
async function
|
|
7824
|
+
var Dd = "sesamy-login", Od = "sesamy_login";
|
|
7825
|
+
async function kd() {
|
|
7799
7826
|
let e = new URLSearchParams(window.location.search);
|
|
7800
|
-
if (!(e.get(
|
|
7801
|
-
await ar() ||
|
|
7827
|
+
if (!(e.get(Dd) || e.get(Od))) return;
|
|
7828
|
+
await ar() || ur();
|
|
7802
7829
|
let t = new URL(window.location.href);
|
|
7803
|
-
t.searchParams.delete(
|
|
7830
|
+
t.searchParams.delete(Dd), window.history.replaceState(null, "", t);
|
|
7804
7831
|
}
|
|
7805
7832
|
//#endregion
|
|
7806
7833
|
//#region src/handlers/debug.ts
|
|
7807
7834
|
Rn();
|
|
7808
|
-
var
|
|
7809
|
-
async function
|
|
7810
|
-
let e = new URLSearchParams(window.location.search).get(
|
|
7835
|
+
var Ad = "sesamy-debug";
|
|
7836
|
+
async function jd() {
|
|
7837
|
+
let e = new URLSearchParams(window.location.search).get(Ad)?.toLowerCase();
|
|
7811
7838
|
if (!e) return;
|
|
7812
7839
|
Fn(e === "true");
|
|
7813
7840
|
let t = new URL(window.location.href);
|
|
7814
|
-
t.searchParams.delete(
|
|
7841
|
+
t.searchParams.delete(Ad), window.history.replaceState(null, "", t);
|
|
7815
7842
|
}
|
|
7816
7843
|
//#endregion
|
|
7817
7844
|
//#region src/utils/browser.ts
|
|
7818
|
-
function
|
|
7845
|
+
function Md() {
|
|
7819
7846
|
return typeof window < "u";
|
|
7820
7847
|
}
|
|
7821
7848
|
//#endregion
|
|
7822
7849
|
//#region src/handlers/attribution.ts
|
|
7823
|
-
function
|
|
7850
|
+
function Nd() {
|
|
7824
7851
|
if (!document.referrer.length) return;
|
|
7825
7852
|
let e = new URL(document.referrer);
|
|
7826
7853
|
if (!(e.hostname === window.location.hostname || e.hostname.includes("sesamy"))) return console.log("handling referrer attribution:", document.referrer), document.referrer;
|
|
7827
7854
|
}
|
|
7828
|
-
async function
|
|
7829
|
-
if (!
|
|
7855
|
+
async function Pd(e) {
|
|
7856
|
+
if (!Md()) return;
|
|
7830
7857
|
let t = new URLSearchParams(window.location.search), n = {
|
|
7831
7858
|
utmSource: t.get("utm_source") ?? void 0,
|
|
7832
7859
|
utmMedium: t.get("utm_medium") ?? void 0,
|
|
@@ -7834,26 +7861,26 @@ async function jd(e) {
|
|
|
7834
7861
|
utmTerm: t.get("utm_term") ?? void 0,
|
|
7835
7862
|
utmContent: t.get("utm_content") ?? void 0,
|
|
7836
7863
|
ref: t.get("ref") ?? void 0,
|
|
7837
|
-
referrer:
|
|
7864
|
+
referrer: Nd()
|
|
7838
7865
|
}, [r] = e.content.list();
|
|
7839
|
-
r?.url && (n.itemSrc = r.url, n.publisherContentId = r.id),
|
|
7866
|
+
r?.url && (n.itemSrc = r.url, n.publisherContentId = r.id), da(n);
|
|
7840
7867
|
}
|
|
7841
7868
|
//#endregion
|
|
7842
7869
|
//#region src/handlers/login-reload.ts
|
|
7843
7870
|
zn();
|
|
7844
|
-
function
|
|
7871
|
+
function Fd() {
|
|
7845
7872
|
let e = new URLSearchParams(window.location.search), t = !1;
|
|
7846
7873
|
try {
|
|
7847
7874
|
t = !!window.opener && window.opener.location.origin === window.location.origin;
|
|
7848
7875
|
} catch {
|
|
7849
7876
|
t = !1;
|
|
7850
7877
|
}
|
|
7851
|
-
let n = sessionStorage.getItem(
|
|
7852
|
-
!t || n || (sessionStorage.setItem(
|
|
7878
|
+
let n = sessionStorage.getItem(ki) === "true", r = e.has("code") || e.has("error") || e.has("state");
|
|
7879
|
+
!t || n || (sessionStorage.setItem(ki, "true"), r || (q("Reloading page to get query params in incognito browser"), window.location.reload()));
|
|
7853
7880
|
}
|
|
7854
7881
|
//#endregion
|
|
7855
7882
|
//#region src/handlers/links.ts
|
|
7856
|
-
async function
|
|
7883
|
+
async function Id(e) {
|
|
7857
7884
|
let t = (e) => (t) => {
|
|
7858
7885
|
t.preventDefault();
|
|
7859
7886
|
try {
|
|
@@ -7878,7 +7905,7 @@ async function Nd(e) {
|
|
|
7878
7905
|
}
|
|
7879
7906
|
//#endregion
|
|
7880
7907
|
//#region src/handlers/visibility.ts
|
|
7881
|
-
async function
|
|
7908
|
+
async function Ld(e) {
|
|
7882
7909
|
let t = await e.auth.isAuthenticated();
|
|
7883
7910
|
try {
|
|
7884
7911
|
document.querySelectorAll(`[sesamy-visibility="${t ? "not-logged-in" : "logged-in"}"]`).forEach((e) => {
|
|
@@ -7892,15 +7919,15 @@ async function Pd(e) {
|
|
|
7892
7919
|
}
|
|
7893
7920
|
//#endregion
|
|
7894
7921
|
//#region src/handlers/locked-content-redirect.ts
|
|
7895
|
-
async function
|
|
7922
|
+
async function Rd(e) {
|
|
7896
7923
|
let t = $("sesamy:locked-content-redirect-url");
|
|
7897
7924
|
if (!t) return;
|
|
7898
7925
|
let [n] = e.content.list();
|
|
7899
7926
|
n && (await e.entitlements.hasAccess(n.url || "", n.pass?.split(",") || []) || (location.href = t));
|
|
7900
7927
|
}
|
|
7901
7928
|
Gn(), Vn(), zn();
|
|
7902
|
-
var
|
|
7903
|
-
async function
|
|
7929
|
+
var zd = !1;
|
|
7930
|
+
async function Bd(e, t, n) {
|
|
7904
7931
|
let r = e.auth?.idToken ? {
|
|
7905
7932
|
...e,
|
|
7906
7933
|
auth: {
|
|
@@ -7910,7 +7937,7 @@ async function Ld(e, t, n) {
|
|
|
7910
7937
|
} : e;
|
|
7911
7938
|
q(`Init with config: ${JSON.stringify(r)}`);
|
|
7912
7939
|
try {
|
|
7913
|
-
|
|
7940
|
+
Fd(), ea(e.consent), $l({
|
|
7914
7941
|
clientId: e.clientId,
|
|
7915
7942
|
environment: e.environment,
|
|
7916
7943
|
...e.analytics
|
|
@@ -7920,7 +7947,7 @@ async function Ld(e, t, n) {
|
|
|
7920
7947
|
organization: e.organization,
|
|
7921
7948
|
environment: e.environment,
|
|
7922
7949
|
...e.auth
|
|
7923
|
-
}), await
|
|
7950
|
+
}), await Wc(), il(e, t), e.capsule?.enabled && (Pu(e.capsule, e.api?.endpoint), xd(), e.capsule.autoProcess !== !1 && (await Iu(), Ru())), e.transform && await dd(e.transform), Eu(), jd(), td({
|
|
7924
7951
|
clientId: e.clientId || e.vendorId,
|
|
7925
7952
|
environment: e.environment,
|
|
7926
7953
|
getProfile: () => t.profile.get(),
|
|
@@ -7928,15 +7955,15 @@ async function Ld(e, t, n) {
|
|
|
7928
7955
|
getContracts: () => t.contracts.list(),
|
|
7929
7956
|
getTags: () => t.tags.list(),
|
|
7930
7957
|
getTallies: () => t.tallies.list()
|
|
7931
|
-
}),
|
|
7958
|
+
}), Pd(t), pd(), gd(), Sd(), await kd(), await wd(), Ed(), await Ld(t), await Id(t), await Rd(t), zd = !0, Wn(J.READY, {});
|
|
7932
7959
|
} catch (e) {
|
|
7933
7960
|
q(`Failed to init ${e.message}`);
|
|
7934
7961
|
}
|
|
7935
7962
|
}
|
|
7936
|
-
async function
|
|
7963
|
+
async function Vd(e, t) {
|
|
7937
7964
|
q("Initializing Sesamy");
|
|
7938
7965
|
let n = e.api?.namespace || "sesamy";
|
|
7939
|
-
if (
|
|
7966
|
+
if (Md() && n in window) return q("Sesamy already initialized. This is likely due to a duplicate import"), zd = !0, window[n];
|
|
7940
7967
|
e.auth?.useHttpCookies && !e.api?.endpoint && (e = {
|
|
7941
7968
|
...e,
|
|
7942
7969
|
api: {
|
|
@@ -7945,17 +7972,17 @@ async function Rd(e, t) {
|
|
|
7945
7972
|
}
|
|
7946
7973
|
}, q("useHttpCookies=true with no api.endpoint — defaulting to same-origin /api"));
|
|
7947
7974
|
let r = t?.authPlugin;
|
|
7948
|
-
if (!r && !Jn() &&
|
|
7975
|
+
if (!r && !Jn() && Md()) {
|
|
7949
7976
|
let e = window;
|
|
7950
7977
|
typeof e.auth0Plugin?.createAuth0Plugin == "function" && (r = e.auth0Plugin.createAuth0Plugin());
|
|
7951
7978
|
}
|
|
7952
7979
|
let i = t?.capsulePlugin;
|
|
7953
|
-
if (!i && !
|
|
7980
|
+
if (!i && !ju() && Md()) {
|
|
7954
7981
|
let e = window;
|
|
7955
7982
|
typeof e.capsulePlugin?.createCapsulePlugin == "function" && (i = e.capsulePlugin.createCapsulePlugin());
|
|
7956
7983
|
}
|
|
7957
|
-
i &&
|
|
7958
|
-
let a =
|
|
7984
|
+
i && Au(i);
|
|
7985
|
+
let a = rd({
|
|
7959
7986
|
clientId: e.clientId,
|
|
7960
7987
|
vendorId: e.vendorId,
|
|
7961
7988
|
environment: e.environment,
|
|
@@ -7963,16 +7990,16 @@ async function Rd(e, t) {
|
|
|
7963
7990
|
...e.api,
|
|
7964
7991
|
namespace: n
|
|
7965
7992
|
});
|
|
7966
|
-
return
|
|
7993
|
+
return Md() ? (e.awaitAllServices ? await Bd(e, a, r) : Bd(e, a, r), a) : (zd = !0, a);
|
|
7967
7994
|
}
|
|
7968
|
-
if (
|
|
7995
|
+
if (Md()) {
|
|
7969
7996
|
window.__sesamyLoaded = !0;
|
|
7970
7997
|
let e = document.getElementById("sesamy-js");
|
|
7971
7998
|
if (e?.textContent) try {
|
|
7972
|
-
|
|
7999
|
+
Vd(JSON.parse(e.textContent));
|
|
7973
8000
|
} catch (e) {
|
|
7974
8001
|
console.error("Failed to parse config", e);
|
|
7975
8002
|
}
|
|
7976
8003
|
}
|
|
7977
8004
|
//#endregion
|
|
7978
|
-
export { J as Events,
|
|
8005
|
+
export { J as Events, yl as clearMetadataCache, ml as getAllLdJson, sl as getAllMetaTags, Zi as getConsent, rl as getContentConfig, vl as getContentMetadata, Nu as getDcaClient, pl as getLdJson, Qi as hasConsent, Vd as init, zd as isInitialized, qn as registerAuthPlugin, Au as registerCapsulePlugin, $i as setConsent };
|