@esri/solutions-components 5.1.0-next.124 → 5.1.0-next.127
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/cdn/{EWUZF57U.js → 232XXYVJ.js} +1 -1
- package/dist/cdn/{Y6ZWXE53.js → 23LRX7AS.js} +1 -1
- package/dist/cdn/{Z25OUDBP.js → 23SGJQLW.js} +1 -1
- package/dist/cdn/2KSXH2TC.js +2 -0
- package/dist/cdn/3JZVI5AM.js +7 -0
- package/dist/cdn/{C7SMCM7E.js → 3UJAJDSF.js} +1 -1
- package/dist/cdn/{A4RZESK7.js → 3UKDJZ2D.js} +2 -2
- package/dist/cdn/{JR5GBFT2.js → 4V4CR63B.js} +1 -1
- package/dist/cdn/{ZV6TCDGB.js → 4Z6UJJJR.js} +1 -1
- package/dist/cdn/4ZUE6R22.js +2 -0
- package/dist/cdn/5AAG5ERI.js +2 -0
- package/dist/cdn/{6GSCRFFW.js → 5GHZQ66V.js} +1 -1
- package/dist/cdn/5U2GHXOV.js +2 -0
- package/dist/cdn/5UIJ4Z3C.js +2 -0
- package/dist/cdn/{6RTR35JT.js → 5XDPNTYE.js} +1 -1
- package/dist/cdn/6ID6N5BF.js +2 -0
- package/dist/cdn/6IMLSV3Z.js +2 -0
- package/dist/cdn/{K5MMGZY2.js → 6Q52JBZW.js} +1 -1
- package/dist/cdn/{4MAZNAHZ.js → 6SSQ6MIC.js} +1 -1
- package/dist/cdn/{KZBWKZOC.js → 74XF7DBP.js} +1 -1
- package/dist/cdn/75WQ7UGJ.js +2 -0
- package/dist/cdn/7CGCLEYB.js +2 -0
- package/dist/cdn/{SH72A5PB.js → 7V57GR4X.js} +1 -1
- package/dist/cdn/{D66IBZZA.js → 7ZKKR7QO.js} +1 -1
- package/dist/cdn/AL7O7ZB2.js +3 -0
- package/dist/cdn/{MYPJ63EE.js → ANVT6ANQ.js} +1 -1
- package/dist/cdn/{GWSB6X4X.js → AOJP5RQ6.js} +1 -1
- package/dist/cdn/{XQQ52NKX.js → AYSQIO6L.js} +1 -1
- package/dist/cdn/{WGEHABGS.js → B33EUN4X.js} +1 -1
- package/dist/cdn/BLCW2CZO.js +2 -0
- package/dist/cdn/{3WKKIXVT.js → BOSEAFVW.js} +1 -1
- package/dist/cdn/{CGFMGQ3A.js → BROZWKD5.js} +1 -1
- package/dist/cdn/CB7QDBRG.js +2 -0
- package/dist/cdn/CEWRVOKP.js +2 -0
- package/dist/cdn/{MOK7GNOH.js → CWXZSWUA.js} +1 -1
- package/dist/cdn/D4FRUAT3.js +2 -0
- package/dist/cdn/DQ7NBBUU.js +2 -0
- package/dist/cdn/{D5Y4JMF7.js → E4ZB3BPD.js} +1 -1
- package/dist/cdn/E5X2RW5Y.js +109 -0
- package/dist/cdn/{KGECA3WE.js → EDZIFJZR.js} +1 -1
- package/dist/cdn/{NYWKJJKK.js → EIF4KZBD.js} +1 -1
- package/dist/cdn/{B6Y3RA4F.js → ENG5BCAV.js} +1 -1
- package/dist/cdn/EOSKMSMP.js +2 -0
- package/dist/cdn/{RH47YGDG.js → EVZXWT6K.js} +1 -1
- package/dist/cdn/EXC566PM.js +2 -0
- package/dist/cdn/FOTFZKKU.js +2 -0
- package/dist/cdn/FTY7YPLA.js +88 -0
- package/dist/cdn/FW2HWQC7.js +2 -0
- package/dist/cdn/{MGAKD4WY.js → GDDMG3Q4.js} +1 -1
- package/dist/cdn/{BRBOVJ3Q.js → GPL6FNKN.js} +1 -1
- package/dist/cdn/{DUDZ4BGI.js → GSD6O5J7.js} +1 -1
- package/dist/cdn/{SSF6ST7U.js → H4YPSJ5G.js} +1 -1
- package/dist/cdn/{TTOCCH2K.js → H7J2FXMS.js} +1 -1
- package/dist/cdn/{C5QZMZX7.js → HEI6GMZN.js} +1 -1
- package/dist/cdn/{AZ4JB3M3.js → HJW2JW4G.js} +1 -1
- package/dist/cdn/HO4GBQJG.js +2 -0
- package/dist/cdn/HT2HC33W.js +2 -0
- package/dist/cdn/{IHKF4AMV.js → HYLQNC4V.js} +3 -3
- package/dist/cdn/HZOBBQYW.js +431 -0
- package/dist/cdn/ICSHJV2N.js +2 -0
- package/dist/cdn/IFI66PVI.js +2 -0
- package/dist/cdn/{YFXSWGXE.js → IHG7KTNC.js} +1 -1
- package/dist/cdn/IP3VJ34C.js +4 -0
- package/dist/cdn/IV7RVOFY.js +56 -0
- package/dist/cdn/{3UIIZPJJ.js → IYQGIBWM.js} +1 -1
- package/dist/cdn/{JFJRHOAG.js → KCTWFRCW.js} +1 -1
- package/dist/cdn/{F64NVBUS.js → KEOBSFBN.js} +1 -1
- package/dist/cdn/{N2KSPEVT.js → LP2JYX4X.js} +1 -1
- package/dist/cdn/{C4IFGE7P.js → MDNGEZ2V.js} +1 -1
- package/dist/cdn/{XVMCFCUH.js → MEDCFXMB.js} +1 -1
- package/dist/cdn/{X6JL6SAH.js → MOH6GREK.js} +1 -1
- package/dist/cdn/MURYADCX.js +2 -0
- package/dist/cdn/{JBNWEBAG.js → N22MFQSQ.js} +1 -1
- package/dist/cdn/N5D5ABJ6.js +2 -0
- package/dist/cdn/{5HZMUGQD.js → N7BXCDA3.js} +1 -1
- package/dist/cdn/{SGJY2CP3.js → ODB4CELR.js} +1 -1
- package/dist/cdn/PZW6JMSM.js +2 -0
- package/dist/cdn/{5MVIKBSS.js → QF2IXVAT.js} +1 -1
- package/dist/cdn/{CQRK2NYK.js → QJICQ4W3.js} +1 -1
- package/dist/cdn/QNRKGTZT.js +121 -0
- package/dist/cdn/{GIANH6D4.js → R3C2X4CM.js} +1 -1
- package/dist/cdn/{DKB6JTUF.js → RKZXRHZK.js} +1 -1
- package/dist/cdn/RPEQD2MH.js +2 -0
- package/dist/cdn/{SMNWKCWR.js → RXM4BHPK.js} +1 -1
- package/dist/cdn/S5F6KJQM.js +18 -0
- package/dist/cdn/SFFLZSAY.js +2 -0
- package/dist/cdn/SSH4MSHE.js +2 -0
- package/dist/cdn/{BQVD2BBH.js → SSZBIVTK.js} +1 -1
- package/dist/cdn/{EZ4DX2MW.js → TFTW5B3R.js} +1 -1
- package/dist/cdn/{I74AIIHN.js → TIF36KTA.js} +1 -1
- package/dist/cdn/TV3ZHJ7B.js +2 -0
- package/dist/cdn/{U6JZYJ4D.js → UM3P3Q52.js} +1 -1
- package/dist/cdn/{WH2NFOMH.js → UUHDVB24.js} +5 -5
- package/dist/cdn/UY5JVVRO.js +2 -0
- package/dist/cdn/VEDAG7UO.js +2 -0
- package/dist/cdn/VFBFI3KQ.js +2 -0
- package/dist/cdn/{BXOH6SN4.js → VTI5LEQY.js} +1 -1
- package/dist/cdn/W5FWW67G.js +2 -0
- package/dist/cdn/{RB3YU5TX.js → WA3BLQHA.js} +1 -1
- package/dist/cdn/{JEEUSHAF.js → X73XP424.js} +1 -1
- package/dist/cdn/XC3IZAIH.js +2 -0
- package/dist/cdn/{3FOUGCWY.js → XDZPQACK.js} +1 -1
- package/dist/cdn/XGODSNWZ.js +2 -0
- package/dist/cdn/{UNKHKP5I.js → YJCH2NIS.js} +1 -1
- package/dist/cdn/{A4NILC27.js → YKM2YRZP.js} +1 -1
- package/dist/cdn/{FBRYBN7J.js → YMLQXXAS.js} +1 -1
- package/dist/cdn/{JUUVYK2H.js → YQHYMLC7.js} +1 -1
- package/dist/cdn/{Y3CYPNEY.js → YWXDNRE2.js} +1 -1
- package/dist/cdn/{E4GB5Z4R.js → ZNWZWFMH.js} +1 -1
- package/dist/cdn/{DGUS2OKW.js → ZS3UOY5Q.js} +1 -1
- package/dist/cdn/{5VDDAINK.js → ZX3UHK6P.js} +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/solution-details-panel/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/solution-details-panel/t9n/messages.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/Auth.js +163 -71
- package/dist/chunks/CardsFetcher.js +3 -2
- package/dist/chunks/getRelatedInfos.js +1 -1
- package/dist/chunks/helpers.js +24 -20
- package/dist/chunks/interfaces.js +152 -141
- package/dist/chunks/solution-deploy-dialog.js +24 -18
- package/dist/chunks/solutions-deploy-app-nav.js +4 -5
- package/dist/components/arcgis-solutions-assistant/customElement.js +681 -57987
- package/dist/components/consent-manager/customElement.js +23 -3598
- package/dist/components/solution-builder-assistant/customElement.d.ts +8 -2
- package/dist/components/solution-builder-assistant/customElement.js +30 -23
- package/dist/components/solution-builder-assistant/index.js +1 -1
- package/dist/components/solution-configure-titles/customElement.js +63 -61
- package/dist/components/solution-delete-dialog/customElement.js +17 -14
- package/dist/components/solution-deployed-card/customElement.js +2 -3
- package/dist/components/solution-deployed-card-panel/customElement.d.ts +7 -0
- package/dist/components/solution-deployed-card-panel/customElement.js +34 -32
- package/dist/components/solution-deployed-card-panel/index.js +1 -0
- package/dist/components/solution-details-panel/customElement.d.ts +7 -4
- package/dist/components/solution-details-panel/customElement.js +115 -180
- package/dist/components/solution-snapshot-gallery/customElement.js +2 -1
- package/dist/components/solution-social-share/customElement.js +2 -2
- package/dist/components/solution-user-avatar/customElement.js +1 -1
- package/dist/components/solutions-deploy-app/customElement.d.ts +4 -0
- package/dist/components/solutions-deploy-app/customElement.js +14 -11
- package/dist/components/solutions-deploy-app-nav/customElement.js +2 -3
- package/dist/components/solutions-deployed-list/customElement.js +7 -6
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +3 -3
- package/dist/solutions-components_commit.txt +5 -8
- package/dist/types/lumina.d.ts +3 -3
- package/dist/types/preact.d.ts +3 -3
- package/dist/types/react.d.ts +3 -3
- package/dist/types/stencil.d.ts +3 -3
- package/dist/utils/Auth.d.ts +11 -0
- package/package.json +11 -6
- package/dist/cdn/2V4C3U3A.js +0 -2
- package/dist/cdn/3RUVSQ7E.js +0 -2
- package/dist/cdn/4FZ44STD.js +0 -2
- package/dist/cdn/52KL2BJB.js +0 -2
- package/dist/cdn/5DS6TJ6G.js +0 -2
- package/dist/cdn/5ZIXJCIR.js +0 -18
- package/dist/cdn/62PVXXRD.js +0 -2
- package/dist/cdn/7JUP4GFU.js +0 -2
- package/dist/cdn/7UERL2R2.js +0 -2
- package/dist/cdn/7WKV6M26.js +0 -2
- package/dist/cdn/BKZZ625R.js +0 -2
- package/dist/cdn/BWYFMFIB.js +0 -423
- package/dist/cdn/CQKON2YR.js +0 -2
- package/dist/cdn/F2J3FYTD.js +0 -2
- package/dist/cdn/GVEIFIEZ.js +0 -2
- package/dist/cdn/H5WTVMPJ.js +0 -2
- package/dist/cdn/HNZAE56I.js +0 -2
- package/dist/cdn/HQJ25PBT.js +0 -2
- package/dist/cdn/IF52R2FM.js +0 -2
- package/dist/cdn/IOKTYFKK.js +0 -7
- package/dist/cdn/IRRMUFW7.js +0 -2
- package/dist/cdn/JFKCARWJ.js +0 -2
- package/dist/cdn/K7QUGRWR.js +0 -4
- package/dist/cdn/MN3KMBU6.js +0 -2
- package/dist/cdn/MNZJP3PW.js +0 -2
- package/dist/cdn/MPZE3IV4.js +0 -2
- package/dist/cdn/QKKYYRVF.js +0 -2
- package/dist/cdn/QTV6GN3W.js +0 -2
- package/dist/cdn/QVJAIVT4.js +0 -2
- package/dist/cdn/RPEBBYE4.js +0 -2
- package/dist/cdn/RXFNNWEJ.js +0 -2
- package/dist/cdn/SBLN3F4Y.js +0 -2
- package/dist/cdn/STWIOVJR.js +0 -2
- package/dist/cdn/TUQVCY7T.js +0 -2
- package/dist/cdn/UM4ITZ4R.js +0 -2
- package/dist/cdn/VFEROJ77.js +0 -2
- package/dist/cdn/VL4OP3CF.js +0 -2
- package/dist/cdn/YNOD3Q5G.js +0 -2
- package/dist/cdn/ZPT5ISDK.js +0 -2
- package/dist/chunks/common.js +0 -26
- package/dist/chunks/get.js +0 -387
|
@@ -1,3596 +1,21 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const n = ot(t), i = ui(Object.assign(Object.assign({}, t.item), { access: t.item.access }), n), s = t.params.thumbnailUrl;
|
|
12
|
-
return typeof i.thumbnailUrl == "string" && typeof s == "string" && i.thumbnailUrl.split("?")[0] === s.split("?")[0] && delete t.params.thumbnailUrl, ci(r, t);
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
function hi() {
|
|
16
|
-
var t;
|
|
17
|
-
return !!(!((t = window?.navigator) === null || t === void 0) && t.globalPrivacyControl);
|
|
18
|
-
}
|
|
19
|
-
function mi(t = {}) {
|
|
20
|
-
const { disabled: e, portal: r, requireConsent: n, userPrivacySettings: i } = t;
|
|
21
|
-
if (n)
|
|
22
|
-
if (i?.accepted) {
|
|
23
|
-
if (i?.functional === !1 && i?.performance === !1 && i?.targeting === !1)
|
|
24
|
-
return !0;
|
|
25
|
-
} else
|
|
26
|
-
return !0;
|
|
27
|
-
return (
|
|
28
|
-
// if accepted were false, it would mean that the user didn't actually deny these, just that they have not made a selection
|
|
29
|
-
// so we only pay attention to functional, performance, and targeting if accepted is true
|
|
30
|
-
i?.accepted === !0 && i?.functional === !1 && i?.performance === !1 && i?.targeting === !1 || e || r?.eueiEnabled === !1 || hi() ? !0 : !(!r || vi(r) || yi(r) || bi(r))
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
function vi(t) {
|
|
34
|
-
return t.eueiEnabled && t.user && t.user.orgId === t.id;
|
|
35
|
-
}
|
|
36
|
-
function yi(t) {
|
|
37
|
-
return t.user && !t.user.orgId && t.ipCntryCode === "US";
|
|
38
|
-
}
|
|
39
|
-
function bi(t) {
|
|
40
|
-
return !t.user && t.ipCntryCode === "US";
|
|
41
|
-
}
|
|
42
|
-
const $e = {
|
|
43
|
-
storage: {},
|
|
44
|
-
memory: !0,
|
|
45
|
-
get(t) {
|
|
46
|
-
let e;
|
|
47
|
-
try {
|
|
48
|
-
e = window.localStorage && window.localStorage.getItem(t) || this.storage[t];
|
|
49
|
-
} catch {
|
|
50
|
-
e = this.storage[t];
|
|
51
|
-
}
|
|
52
|
-
if (e)
|
|
53
|
-
try {
|
|
54
|
-
return JSON.parse(e);
|
|
55
|
-
} catch {
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
else
|
|
59
|
-
return;
|
|
60
|
-
},
|
|
61
|
-
set(t, e) {
|
|
62
|
-
const r = JSON.stringify(e);
|
|
63
|
-
try {
|
|
64
|
-
window.localStorage.setItem(t, r);
|
|
65
|
-
} catch {
|
|
66
|
-
this.memory || (console.error("setting local storage failed, falling back to in-memory storage"), this.memory = !0), this.storage[t] = e;
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
delete(t) {
|
|
70
|
-
try {
|
|
71
|
-
window.localStorage.removeItem(t);
|
|
72
|
-
} catch {
|
|
73
|
-
this.memory || (console.error("setting local storage failed, falling back to in-memory storage"), this.memory = !0), delete this.storage[t];
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}, dn = "esri-telemetry";
|
|
77
|
-
function wi(t) {
|
|
78
|
-
return new Promise((r, n) => {
|
|
79
|
-
t.onload = r, t.onerror = n, (!Ei(t) || t.body) && r();
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
function Si(t) {
|
|
83
|
-
const { id: e, dataAttribute: r } = t;
|
|
84
|
-
return !!document.getElementById(e) || !!document.querySelector(`[data-${dn}="${r}"]`);
|
|
85
|
-
}
|
|
86
|
-
function Ei(t) {
|
|
87
|
-
const { body: e, src: r, id: n, dataAttribute: i, section: s = "body", type: a = "text/javascript", async: o = !1, defer: u = !1, onload: l, onerror: f } = t;
|
|
88
|
-
if (typeof window > "u")
|
|
89
|
-
throw new pn("Window is undefined: Cannot add script element.");
|
|
90
|
-
if (Si(t)) {
|
|
91
|
-
console.log(`script (${n || i}) is already present, skipping`);
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
const p = Ii({
|
|
95
|
-
id: n,
|
|
96
|
-
dataAttribute: i,
|
|
97
|
-
type: a,
|
|
98
|
-
async: o,
|
|
99
|
-
defer: u,
|
|
100
|
-
body: e,
|
|
101
|
-
src: r,
|
|
102
|
-
onload: l,
|
|
103
|
-
onerror: f
|
|
104
|
-
});
|
|
105
|
-
return s === "body" ? document.body.appendChild(p) : document.head.appendChild(p);
|
|
106
|
-
}
|
|
107
|
-
class pn extends Error {
|
|
108
|
-
}
|
|
109
|
-
function Ii({ id: t, dataAttribute: e, type: r, async: n, defer: i, body: s, src: a, onload: o, onerror: u }) {
|
|
110
|
-
const l = document.createElement("script");
|
|
111
|
-
return t && (l.id = t), e && l.setAttribute(`data-${dn}`, e), a && (l.src = a), s && (l.innerText = s), l.type = r, l.async = n, l.defer = i, o && (l.onload = o), u && (l.onerror = u), l;
|
|
112
|
-
}
|
|
113
|
-
function Ai(t) {
|
|
114
|
-
return t.map((e) => {
|
|
115
|
-
const r = [];
|
|
116
|
-
return ["src", "id", "dataAttribute", "type"].forEach((n) => {
|
|
117
|
-
let i = n;
|
|
118
|
-
n === "dataAttribute" && (i = "data-esri-telemetry"), e[n] && r.push(`${i}="${e[n]}"`);
|
|
119
|
-
}), ["async", "defer"].forEach((n) => {
|
|
120
|
-
e[n] && r.push(`${n}`);
|
|
121
|
-
}), `<script ${r.join(" ")}>${e.body ? e.body : ""}<\/script>`;
|
|
122
|
-
}).join("");
|
|
123
|
-
}
|
|
124
|
-
const Oi = [
|
|
125
|
-
"esri.com",
|
|
126
|
-
"esriuk.com",
|
|
127
|
-
"esri.de",
|
|
128
|
-
"esri.ca",
|
|
129
|
-
"esrifrance.fr",
|
|
130
|
-
"esri.nl",
|
|
131
|
-
"esri-portugal.pt",
|
|
132
|
-
"esribulgaria.com",
|
|
133
|
-
"esri.fi",
|
|
134
|
-
"esri.kr",
|
|
135
|
-
"esrimalaysia.com.my",
|
|
136
|
-
"esri.es",
|
|
137
|
-
"esriaustralia.com.au",
|
|
138
|
-
"esri-southafrica.com",
|
|
139
|
-
"esri.cl",
|
|
140
|
-
"esrichina.com.cn",
|
|
141
|
-
"esri.co",
|
|
142
|
-
"esriturkey.com.tr",
|
|
143
|
-
"geodata.no",
|
|
144
|
-
"esriitalia.it",
|
|
145
|
-
"esri.pl"
|
|
146
|
-
];
|
|
147
|
-
class Pi {
|
|
148
|
-
constructor(e) {
|
|
149
|
-
var r, n, i;
|
|
150
|
-
this.trackers = [], this.options = e, this.debug = e.debug, this.suppressDisabledWarnings = e.suppressDisabledWarnings, this.logger = e.logger || console, e.userPrivacySettings && (this._userPrivacySettings = e.userPrivacySettings), e.requireConsent && !e.userPrivacySettings && (this._userPrivacySettings = {
|
|
151
|
-
accepted: !1,
|
|
152
|
-
performance: !1,
|
|
153
|
-
targeting: !1,
|
|
154
|
-
functional: !1,
|
|
155
|
-
id: ki(),
|
|
156
|
-
timestamp: Date.now()
|
|
157
|
-
}, e.userPrivacySettings = this._userPrivacySettings), this.disabled = mi(e), this.disabled && !this.suppressDisabledWarnings && this.logger.info("Telemetry Disabled");
|
|
158
|
-
const s = ((r = e.portal) === null || r === void 0 ? void 0 : r.user) || e.user;
|
|
159
|
-
s && this.setUser(s, (i = (n = e.portal) === null || n === void 0 ? void 0 : n.subscriptionInfo) === null || i === void 0 ? void 0 : i.type), this.disabled || this.initializeTrackers();
|
|
160
|
-
}
|
|
161
|
-
shouldInitializeTrackers(e, r, n) {
|
|
162
|
-
const i = !r && !e?.accepted, s = n.every((a) => e?.[a]);
|
|
163
|
-
return i || s;
|
|
164
|
-
}
|
|
165
|
-
filterTrackers(e) {
|
|
166
|
-
return this.options.plugins.filter((r) => e.includes(r.name));
|
|
167
|
-
}
|
|
168
|
-
initializeTrackers() {
|
|
169
|
-
const e = this._userPrivacySettings, r = this.options.requireConsent;
|
|
170
|
-
this.trackers = [], this.options.plugins && (e ? (this.shouldInitializeTrackers(e, r, [
|
|
171
|
-
"performance"
|
|
172
|
-
]) && this.trackers.push(...this.filterTrackers(["amazon"])), this.shouldInitializeTrackers(e, r, [
|
|
173
|
-
"performance",
|
|
174
|
-
"targeting",
|
|
175
|
-
"functional"
|
|
176
|
-
]) && this.trackers.push(...this.filterTrackers([
|
|
177
|
-
"adobe-analytics",
|
|
178
|
-
"googleAnalytics",
|
|
179
|
-
"siteimprove"
|
|
180
|
-
]))) : this.trackers.push(...this.options.plugins)), this.trackers.length || this.logger.info("No trackers configured");
|
|
181
|
-
}
|
|
182
|
-
getScriptTags() {
|
|
183
|
-
return this.trackers.map((e) => e.getScriptTags && e.getScriptTags()).join("");
|
|
184
|
-
}
|
|
185
|
-
async init() {
|
|
186
|
-
const e = this.trackers.map((r) => r.init());
|
|
187
|
-
await Promise.all(e);
|
|
188
|
-
}
|
|
189
|
-
setUser(e = {}, r = "Public") {
|
|
190
|
-
e = typeof e == "string" ? { username: e } : e, this.user = e, this.user.accountType = r;
|
|
191
|
-
let n;
|
|
192
|
-
if (e.email && e.email.split) {
|
|
193
|
-
const i = e.email.split("@")[1];
|
|
194
|
-
n = Oi.filter((s) => i === s).length > 0;
|
|
195
|
-
}
|
|
196
|
-
(n || ["In House", "Demo and Marketing"].indexOf(r) > -1) && (this.user.internalUser = !0);
|
|
197
|
-
}
|
|
198
|
-
/**
|
|
199
|
-
* Allow clients to update the user privacy settings
|
|
200
|
-
* after the telemetry instance has been created.
|
|
201
|
-
* Host app is responsible for persisting the settings
|
|
202
|
-
* into localStorage or cookies, depending on their requirements
|
|
203
|
-
*/
|
|
204
|
-
async updateUserPrivacySettings(e) {
|
|
205
|
-
const { accepted: r, performance: n, targeting: i, functional: s } = this._userPrivacySettings, a = (
|
|
206
|
-
// this first case says, if they just accepted tracking and consent is not required (meaning we are currently tracking) but denied any of the categories
|
|
207
|
-
e.accepted && !r && !this.options.requireConsent && (!e.performance || !e.targeting || !e.functional) || !e.performance && n || !e.targeting && i || !e.functional && s
|
|
208
|
-
);
|
|
209
|
-
return this._userPrivacySettings = e, a || (this.disabled = !1, this.initializeTrackers(), await this.init()), { reload: a };
|
|
210
|
-
}
|
|
211
|
-
logPageView(e, r = {}, n = {}) {
|
|
212
|
-
if (this.disabled && !this.suppressDisabledWarnings)
|
|
213
|
-
return this.logger.info("Page view was not logged because telemetry is disabled."), !1;
|
|
214
|
-
const i = this.trackers.filter(({ disabled: o, hasError: u }) => !o && !u);
|
|
215
|
-
if (!i.length)
|
|
216
|
-
return this.logger.info("Page view was not logged because no enabled telemetry-plugins are registered."), !1;
|
|
217
|
-
const s = this.preProcess(r, n);
|
|
218
|
-
this.debug && this.logger.info("Tracking page view", JSON.stringify(s));
|
|
219
|
-
const a = i.map((o) => o.logPageView(e, s));
|
|
220
|
-
return Promise.all(a).then(), !0;
|
|
221
|
-
}
|
|
222
|
-
logEvent(e, r = {}) {
|
|
223
|
-
if (this.disabled && !this.suppressDisabledWarnings)
|
|
224
|
-
return this.logger.info("Event was not logged because telemetry is disabled."), !1;
|
|
225
|
-
const n = this.trackers.filter(({ disabled: a, hasError: o }) => !a && !o);
|
|
226
|
-
if (!n.length)
|
|
227
|
-
return this.logger.info("Event was not logged because no enabled telemetry-plugins are registered."), !1;
|
|
228
|
-
const i = this.preProcess(e, r);
|
|
229
|
-
this.debug && this.logger.info("Tracking event", JSON.stringify(i));
|
|
230
|
-
const s = n.map((a) => a.logEvent(i));
|
|
231
|
-
return Promise.all(s).then(), !0;
|
|
232
|
-
}
|
|
233
|
-
logError(e = {}) {
|
|
234
|
-
e = Object.assign({ eventType: "error" }, e), this.logEvent(e);
|
|
235
|
-
}
|
|
236
|
-
startWorkflow(e, r = {}) {
|
|
237
|
-
const n = {
|
|
238
|
-
name: e,
|
|
239
|
-
start: Date.now(),
|
|
240
|
-
steps: [],
|
|
241
|
-
workflowId: Math.floor((1 + Math.random()) * 17592186044416).toString(16)
|
|
242
|
-
};
|
|
243
|
-
this.saveWorkflow(n);
|
|
244
|
-
const i = Object.assign({ name: e, step: "start" }, r);
|
|
245
|
-
return this.logWorkflow(i), n;
|
|
246
|
-
}
|
|
247
|
-
stepWorkflow(e, r, n = {}) {
|
|
248
|
-
const i = typeof n == "string" ? n : n.details, s = Object.assign({ name: e, step: r, details: i }, n);
|
|
249
|
-
this.logWorkflow(s);
|
|
250
|
-
}
|
|
251
|
-
endWorkflow(e, r = {}) {
|
|
252
|
-
const n = Object.assign({ name: e, step: "finish" }, r);
|
|
253
|
-
this.logWorkflow(n);
|
|
254
|
-
}
|
|
255
|
-
cancelWorkflow(e, r = {}) {
|
|
256
|
-
const n = Object.assign({ name: e, step: "cancel" }, r);
|
|
257
|
-
this.logWorkflow(n);
|
|
258
|
-
}
|
|
259
|
-
getWorkflow(e) {
|
|
260
|
-
const r = $e.get(`TELEMETRY-WORKFLOW:${e}`);
|
|
261
|
-
if (r) {
|
|
262
|
-
const n = Date.now() - r.start, i = 1800 * 1e3;
|
|
263
|
-
if (n < i)
|
|
264
|
-
return r;
|
|
265
|
-
this.deleteWorkflow(r);
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
saveWorkflow(e) {
|
|
269
|
-
$e.set(`TELEMETRY-WORKFLOW:${e.name}`, e);
|
|
270
|
-
}
|
|
271
|
-
deleteWorkflow(e) {
|
|
272
|
-
$e.delete(`TELEMETRY-WORKFLOW:${e.name}`);
|
|
273
|
-
}
|
|
274
|
-
logWorkflow(e = {}) {
|
|
275
|
-
e = this.preProcess(e);
|
|
276
|
-
let r = this.getWorkflow(e.name);
|
|
277
|
-
r || (this.startWorkflow(e.name), r = this.getWorkflow(e.name)), r.steps.push(e.step), r.duration = (Date.now() - r.start) / 1e3, ["cancel", "finish"].indexOf(e.step) > -1 ? this.deleteWorkflow(r) : this.saveWorkflow(r);
|
|
278
|
-
const n = Object.assign(e, {
|
|
279
|
-
eventType: "workflow",
|
|
280
|
-
category: e.name,
|
|
281
|
-
action: e.step,
|
|
282
|
-
label: e.details,
|
|
283
|
-
duration: r.duration,
|
|
284
|
-
workflowId: r.workflowId
|
|
285
|
-
});
|
|
286
|
-
this.logEvent(n);
|
|
287
|
-
}
|
|
288
|
-
preProcess(e = {}, r = {}) {
|
|
289
|
-
let n = {};
|
|
290
|
-
return this.user && (n = {
|
|
291
|
-
user: "unknown",
|
|
292
|
-
org: "unknown",
|
|
293
|
-
lastLogin: this.user.lastLogin,
|
|
294
|
-
userSince: this.user.created,
|
|
295
|
-
internalUser: this.user.internalUser || !1,
|
|
296
|
-
accountType: this.user.accountType
|
|
297
|
-
}), Object.entries(Object.assign(Object.assign({}, e), n)).reduce(xi(r.omitComplexData, this.logger), {});
|
|
298
|
-
}
|
|
299
|
-
/**
|
|
300
|
-
* Disable all configured trackers. This does not deterministically unload
|
|
301
|
-
* the trackers from the page, but it does prevent events from
|
|
302
|
-
* this library from being sent to them. Thus, if you need to ensure
|
|
303
|
-
* that all instantiated trackers are fully disabled, you should reload
|
|
304
|
-
* the application (thus, the `reload` property on the return value from `updateUserPrivacySettings`)
|
|
305
|
-
*/
|
|
306
|
-
disable() {
|
|
307
|
-
this.disabled = !0, this.trackers.forEach((e) => {
|
|
308
|
-
var r;
|
|
309
|
-
e.hasError || (e.disabled = !0, (r = e.disable) === null || r === void 0 || r.call(e));
|
|
310
|
-
});
|
|
311
|
-
}
|
|
312
|
-
/**
|
|
313
|
-
* Disable a tracker. This does not deterministically unload
|
|
314
|
-
* the tracker from the page, but it does prevent events from
|
|
315
|
-
* this library from being sent to it. Thus, if you need to ensure
|
|
316
|
-
* that an instantiated tracker is fully disabled, you should reload
|
|
317
|
-
* the application (thus, the `reload` property on the return value from `updateUserPrivacySettings`)
|
|
318
|
-
* @param trackerName
|
|
319
|
-
*/
|
|
320
|
-
disableTracker(e) {
|
|
321
|
-
var r;
|
|
322
|
-
const n = this.trackers.find(({ name: i }) => i === e);
|
|
323
|
-
n && !n.hasError && (n.disabled = !0, (r = n.disable) === null || r === void 0 || r.call(n));
|
|
324
|
-
}
|
|
325
|
-
/**
|
|
326
|
-
* Enable a specific tracker
|
|
327
|
-
* @param trackerName
|
|
328
|
-
*/
|
|
329
|
-
enableTracker(e) {
|
|
330
|
-
var r;
|
|
331
|
-
const n = this.trackers.find(({ name: i }) => i === e);
|
|
332
|
-
n && !n.hasError && (n.disabled = !1, (r = n.enable) === null || r === void 0 || r.call(n));
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
function xi(t, e) {
|
|
336
|
-
return function(r, [n, i]) {
|
|
337
|
-
return Ti(i) ? r[n] = i : t || (e.warn(`You are trying to log a non-primitive value, ${n}:${JSON.stringify(i)}. This will get logged as [object Object]`), r[n] = i), r;
|
|
338
|
-
};
|
|
339
|
-
}
|
|
340
|
-
function Ti(t) {
|
|
341
|
-
return ["string", "number", "boolean", "undefined"].includes(typeof t) || t && typeof t.valueOf() == "string";
|
|
342
|
-
}
|
|
343
|
-
function ki() {
|
|
344
|
-
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(t) {
|
|
345
|
-
const e = Math.random() * 16 | 0;
|
|
346
|
-
return (t === "x" ? e : e & 3 | 8).toString(16);
|
|
347
|
-
});
|
|
348
|
-
}
|
|
349
|
-
class ji {
|
|
350
|
-
constructor(e) {
|
|
351
|
-
var r;
|
|
352
|
-
if (this.name = "googleAnalytics", this.dimensions = {}, this.metrics = {}, this.isInitialized = !1, typeof window < "u" && !(!((r = e?.measurementIds) === null || r === void 0) && r.length))
|
|
353
|
-
throw new Error("at least one measurementId needs to be provided in your configuration");
|
|
354
|
-
Object.assign(this, e);
|
|
355
|
-
}
|
|
356
|
-
_getScripts() {
|
|
357
|
-
return [
|
|
358
|
-
{
|
|
359
|
-
dataAttribute: "google-analytics",
|
|
360
|
-
async: !0,
|
|
361
|
-
src: `https://www.googletagmanager.com/gtag/js?id=${this.measurementIds ? this.measurementIds[0] : ""}`
|
|
362
|
-
}
|
|
363
|
-
];
|
|
364
|
-
}
|
|
365
|
-
getScriptTags() {
|
|
366
|
-
return Ai(this._getScripts());
|
|
367
|
-
}
|
|
368
|
-
async init() {
|
|
369
|
-
if (!this.isInitialized) {
|
|
370
|
-
if (typeof window > "u")
|
|
371
|
-
throw new pn("Window is undefined: Cannot add script element.");
|
|
372
|
-
await Promise.all(this._getScripts().map((e) => wi(e))), this.injectConfig(), this.isInitialized = !0;
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
// we log page views manually, even though ga4 can do so automatically for pages now
|
|
376
|
-
logPageView(e, r = {}) {
|
|
377
|
-
const n = this.buildCustomParams(r), i = Object.assign({ page_title: e || window.location.pathname }, n);
|
|
378
|
-
return window.gtag("event", "page_view", i), !0;
|
|
379
|
-
}
|
|
380
|
-
logEvent(e) {
|
|
381
|
-
let { action: r } = e, n = cn(e, ["action"]);
|
|
382
|
-
const i = r || "other", s = this.buildCustomParams(n);
|
|
383
|
-
return window.gtag("event", i, s), !0;
|
|
384
|
-
}
|
|
385
|
-
disable() {
|
|
386
|
-
this.measurementIds && this.measurementIds.forEach((e) => {
|
|
387
|
-
window[`ga-disable-${e}`] = !0;
|
|
388
|
-
});
|
|
389
|
-
}
|
|
390
|
-
enable() {
|
|
391
|
-
this.measurementIds && this.measurementIds.forEach((e) => {
|
|
392
|
-
window[`ga-disable-${e}`] = void 0;
|
|
393
|
-
});
|
|
394
|
-
}
|
|
395
|
-
// injects configs for each measurement id
|
|
396
|
-
injectConfig() {
|
|
397
|
-
window.dataLayer = window.dataLayer || [], window.gtag = function() {
|
|
398
|
-
window.dataLayer.push(arguments);
|
|
399
|
-
}, window.gtag("js", /* @__PURE__ */ new Date());
|
|
400
|
-
const e = {
|
|
401
|
-
custom_map: this.createDimensionsAndMetricsCustomMap(this.dimensions, this.metrics),
|
|
402
|
-
send_page_view: !1,
|
|
403
|
-
anonymize_ip: !0
|
|
404
|
-
// anonymize ip for each event/page view tracked
|
|
405
|
-
};
|
|
406
|
-
this.measurementIds.forEach((r) => {
|
|
407
|
-
window.gtag("config", r, e);
|
|
408
|
-
});
|
|
409
|
-
}
|
|
410
|
-
buildCustomParams(e) {
|
|
411
|
-
let r, { category: n, label: i } = e;
|
|
412
|
-
return r = this.verifyCustomDimensionAndMetrics(e), n && (r = Object.assign(Object.assign({}, r), { event_category: n })), i && (r = Object.assign(Object.assign({}, r), { event_label: i })), r;
|
|
413
|
-
}
|
|
414
|
-
verifyCustomDimensionAndMetrics(e) {
|
|
415
|
-
const r = this.createDimensionsAndMetricsCustomMap(this.dimensions, this.metrics), n = Object.values(r);
|
|
416
|
-
return Object.keys(e).filter((s) => n.includes(s)).reduce((s, a) => Object.assign(s, { [a]: e[a] }), {});
|
|
417
|
-
}
|
|
418
|
-
createDimensionsAndMetricsCustomMap(e = {}, r = {}) {
|
|
419
|
-
const n = this.createMetricCustomMap(r), i = this.createDimensionCustomMap(e);
|
|
420
|
-
return Object.assign(Object.assign({}, n), i);
|
|
421
|
-
}
|
|
422
|
-
// under the assumption that our metrics come like { timeMetric: 1, otherMetric: 3} where metric_name: index
|
|
423
|
-
createMetricCustomMap(e = {}) {
|
|
424
|
-
return Object.keys(e).map(function(r) {
|
|
425
|
-
return {
|
|
426
|
-
// format of metric<Index>: metric_name
|
|
427
|
-
key: `metric${e[r]}`,
|
|
428
|
-
value: r
|
|
429
|
-
};
|
|
430
|
-
}).filter((r) => r).reduce((r, { key: n, value: i }) => (r[n] = i, r), {});
|
|
431
|
-
}
|
|
432
|
-
// under the assumption that our dimensions come like { someAttribute: 7, datasetId: 6} where dimension_name: index
|
|
433
|
-
createDimensionCustomMap(e = {}) {
|
|
434
|
-
return Object.keys(e).map(function(r) {
|
|
435
|
-
return {
|
|
436
|
-
// format of dimension<Index>: dimension_name
|
|
437
|
-
key: `dimension${e[r]}`,
|
|
438
|
-
value: r
|
|
439
|
-
};
|
|
440
|
-
}).filter((r) => r).reduce((r, { key: n, value: i }) => (r[n] = i, r), {});
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
const ar = "TELEMETRY_COGNITO_CREDENTIALS";
|
|
444
|
-
function Ni(t, e = {}) {
|
|
445
|
-
const n = `https://cognito-identity${e.fips === !0 ? "-fips" : ""}.us-east-1.amazonaws.com/`;
|
|
446
|
-
let i = $e.get(ar);
|
|
447
|
-
if (i && Date.now() / 1e3 < i.Expiration)
|
|
448
|
-
return Promise.resolve(i);
|
|
449
|
-
const s = {
|
|
450
|
-
method: "POST",
|
|
451
|
-
headers: {
|
|
452
|
-
"Content-type": "application/x-amz-json-1.1",
|
|
453
|
-
"X-Amz-Target": "AWSCognitoIdentityService.GetId"
|
|
454
|
-
},
|
|
455
|
-
body: JSON.stringify({ IdentityPoolId: t })
|
|
456
|
-
};
|
|
457
|
-
return fetch(n, s).then((a) => {
|
|
458
|
-
if (!a.ok)
|
|
459
|
-
throw new Error(a.statusText);
|
|
460
|
-
return a.json();
|
|
461
|
-
}).then((a) => {
|
|
462
|
-
const { IdentityId: o } = a, u = {
|
|
463
|
-
method: "POST",
|
|
464
|
-
headers: {
|
|
465
|
-
"Content-type": "application/x-amz-json-1.1",
|
|
466
|
-
"X-Amz-Target": "AWSCognitoIdentityService.GetCredentialsForIdentity"
|
|
467
|
-
},
|
|
468
|
-
body: JSON.stringify({ IdentityId: o })
|
|
469
|
-
};
|
|
470
|
-
return fetch(n, u);
|
|
471
|
-
}).then((a) => {
|
|
472
|
-
if (!a.ok)
|
|
473
|
-
throw new Error(a.statusText);
|
|
474
|
-
return a.json();
|
|
475
|
-
}).then(({ Credentials: a }) => ($e.set(ar, a), a));
|
|
476
|
-
}
|
|
477
|
-
function gn({ telemetryData: t, dimensionLookup: e = {}, excludeKeys: r = [] }) {
|
|
478
|
-
return Object.keys(t).filter((n) => !r.includes(n)).map((n) => e[n] ? {
|
|
479
|
-
key: $i(e, n),
|
|
480
|
-
value: t[n]
|
|
481
|
-
} : {
|
|
482
|
-
key: n,
|
|
483
|
-
value: Mi(t, n)
|
|
484
|
-
}).reduce((n, { key: i, value: s }) => (n[i] = s, n), {});
|
|
485
|
-
}
|
|
486
|
-
function Mi(t, e) {
|
|
487
|
-
return e === "json" ? t[e] ? JSON.stringify(t[e]) : "null" : t[e] === void 0 ? "null" : t[e].toString();
|
|
488
|
-
}
|
|
489
|
-
function $i(t, e) {
|
|
490
|
-
return `dimension${t[e]}`;
|
|
491
|
-
}
|
|
492
|
-
const Ci = ["size", "duration", "position", "number", "count"];
|
|
493
|
-
function hn(t, e = {}) {
|
|
494
|
-
return Object.keys(t).filter((r) => e[r] || Ci.includes(r)).map((r) => e[r] ? {
|
|
495
|
-
key: _i(e, r),
|
|
496
|
-
value: t[r]
|
|
497
|
-
} : {
|
|
498
|
-
key: r,
|
|
499
|
-
value: t[r]
|
|
500
|
-
}).reduce((r, { key: n, value: i }) => (r[n] = i, r), {});
|
|
501
|
-
}
|
|
502
|
-
function _i(t, e) {
|
|
503
|
-
return `metric${t[e]}`;
|
|
504
|
-
}
|
|
505
|
-
function Di({ event: t = {}, dimensionLookup: e = {}, metricLookup: r = {} }) {
|
|
506
|
-
var n, i;
|
|
507
|
-
const { pathname: s, eventType: a = "other" } = t, o = hn(t, r), u = gn({
|
|
508
|
-
telemetryData: Object.assign({ eventType: a }, t),
|
|
509
|
-
dimensionLookup: e,
|
|
510
|
-
excludeKeys: [
|
|
511
|
-
"workflow",
|
|
512
|
-
"pathname",
|
|
513
|
-
...Object.keys(o),
|
|
514
|
-
...Object.keys(r)
|
|
515
|
-
]
|
|
516
|
-
}), l = Object.assign(Object.assign({ name: a }, u), o);
|
|
517
|
-
return typeof document < "u" && document.referrer && (l.referrer = document.referrer), typeof window < "u" && !l.hostname && (l.hostname = (n = window.location) === null || n === void 0 ? void 0 : n.hostname), l.path = typeof window < "u" && window.location.pathname ? (i = window.location) === null || i === void 0 ? void 0 : i.pathname : s, l;
|
|
518
|
-
}
|
|
519
|
-
function Ri({ page: t, previousPage: e = {}, options: r = {}, dimensionLookup: n = {}, metricLookup: i = {} }) {
|
|
520
|
-
const s = hn(r, i), a = gn({
|
|
521
|
-
telemetryData: r,
|
|
522
|
-
dimensionLookup: n,
|
|
523
|
-
excludeKeys: [
|
|
524
|
-
"workflow",
|
|
525
|
-
...Object.keys(s),
|
|
526
|
-
...Object.keys(i)
|
|
527
|
-
]
|
|
528
|
-
}), { referrer: o, title: u } = document || {}, { hostname: l, pathname: f } = window && window.location ? window.location : {};
|
|
529
|
-
return Object.assign(Object.assign({
|
|
530
|
-
name: "pageView",
|
|
531
|
-
referrer: o,
|
|
532
|
-
hostname: l,
|
|
533
|
-
path: t || f,
|
|
534
|
-
pageUrl: t || f,
|
|
535
|
-
pageName: u,
|
|
536
|
-
previousPageUrl: e.pageUrl,
|
|
537
|
-
previousPageName: e.pageName
|
|
538
|
-
}, a), s);
|
|
539
|
-
}
|
|
540
|
-
function sr(t, e, r, n, i) {
|
|
541
|
-
for (e = e.split ? e.split(".") : e, n = 0; n < e.length; n++) t = t ? t[e[n]] : i;
|
|
542
|
-
return t === i ? r : t;
|
|
543
|
-
}
|
|
544
|
-
var Ui = "function", zi = "string", te = "undefined", Vi = "boolean", Ge = "object", Li = "array", Wi = "number", Hi = "symbol", Ki = "null", qi = function() {
|
|
545
|
-
}, mn = "any", vn = "*", ye = "__", Gi = "form", Fi = "input", Bi = "button", Yi = "select", Fe = typeof process !== te ? process : {};
|
|
546
|
-
Fe.env && Fe.env.NODE_ENV;
|
|
547
|
-
var Q = typeof document !== te;
|
|
548
|
-
Fe.versions != null && Fe.versions.node != null;
|
|
549
|
-
typeof Deno !== te && Deno.core;
|
|
550
|
-
Q && window.name === "nodejs" || typeof navigator !== te && typeof navigator.userAgent !== te && (navigator.userAgent.includes("Node.js") || navigator.userAgent.includes("jsdom"));
|
|
551
|
-
function yn(t, e) {
|
|
552
|
-
return e.charAt(0)[t]() + e.slice(1);
|
|
553
|
-
}
|
|
554
|
-
var Xi = yn.bind(null, "toUpperCase"), Ji = yn.bind(null, "toLowerCase");
|
|
555
|
-
function Qi(t) {
|
|
556
|
-
return bn(t) ? Xi(Ki) : typeof t === Ge ? ra(t) : Object.prototype.toString.call(t).slice(8, -1);
|
|
557
|
-
}
|
|
558
|
-
function Be(t, e) {
|
|
559
|
-
e === void 0 && (e = !0);
|
|
560
|
-
var r = Qi(t);
|
|
561
|
-
return e ? Ji(r) : r;
|
|
562
|
-
}
|
|
563
|
-
function Re(t, e) {
|
|
564
|
-
return typeof e === t;
|
|
565
|
-
}
|
|
566
|
-
var Z = Re.bind(null, Ui), ce = Re.bind(null, zi), we = Re.bind(null, te), Zi = Re.bind(null, Vi);
|
|
567
|
-
Re.bind(null, Hi);
|
|
568
|
-
function bn(t) {
|
|
569
|
-
return t === null;
|
|
570
|
-
}
|
|
571
|
-
function ea(t) {
|
|
572
|
-
return Be(t) === Wi && !isNaN(t);
|
|
573
|
-
}
|
|
574
|
-
function wn(t) {
|
|
575
|
-
return Be(t) === Li;
|
|
576
|
-
}
|
|
577
|
-
function J(t) {
|
|
578
|
-
if (!ta(t)) return !1;
|
|
579
|
-
for (var e = t; Object.getPrototypeOf(e) !== null; ) e = Object.getPrototypeOf(e);
|
|
580
|
-
return Object.getPrototypeOf(t) === e;
|
|
581
|
-
}
|
|
582
|
-
function ta(t) {
|
|
583
|
-
return t && (typeof t === Ge || t !== null);
|
|
584
|
-
}
|
|
585
|
-
function ra(t) {
|
|
586
|
-
return Z(t.constructor) ? t.constructor.name : null;
|
|
587
|
-
}
|
|
588
|
-
function na(t) {
|
|
589
|
-
return t instanceof Error || ce(t.message) && t.constructor && ea(t.constructor.stackTraceLimit);
|
|
590
|
-
}
|
|
591
|
-
function Sn(t, e) {
|
|
592
|
-
if (typeof e != "object" || bn(e)) return !1;
|
|
593
|
-
if (e instanceof t) return !0;
|
|
594
|
-
var r = Be(new t(""));
|
|
595
|
-
if (na(e)) for (; e; ) {
|
|
596
|
-
if (Be(e) === r) return !0;
|
|
597
|
-
e = Object.getPrototypeOf(e);
|
|
598
|
-
}
|
|
599
|
-
return !1;
|
|
600
|
-
}
|
|
601
|
-
Sn.bind(null, TypeError);
|
|
602
|
-
Sn.bind(null, SyntaxError);
|
|
603
|
-
function Je(t, e) {
|
|
604
|
-
var r = t instanceof Element || t instanceof HTMLDocument;
|
|
605
|
-
return r && e ? ia(t, e) : r;
|
|
606
|
-
}
|
|
607
|
-
function ia(t, e) {
|
|
608
|
-
return e === void 0 && (e = ""), t && t.nodeName === e.toUpperCase();
|
|
609
|
-
}
|
|
610
|
-
function Qe(t) {
|
|
611
|
-
var e = [].slice.call(arguments, 1);
|
|
612
|
-
return function() {
|
|
613
|
-
return t.apply(void 0, [].slice.call(arguments).concat(e));
|
|
614
|
-
};
|
|
615
|
-
}
|
|
616
|
-
Qe(Je, Gi);
|
|
617
|
-
Qe(Je, Bi);
|
|
618
|
-
Qe(Je, Fi);
|
|
619
|
-
Qe(Je, Yi);
|
|
620
|
-
function aa(t) {
|
|
621
|
-
return t ? wn(t) ? t : [t] : [];
|
|
622
|
-
}
|
|
623
|
-
function or(t) {
|
|
624
|
-
try {
|
|
625
|
-
return decodeURIComponent(t.replace(/\+/g, " "));
|
|
626
|
-
} catch {
|
|
627
|
-
return null;
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
function sa() {
|
|
631
|
-
if (Q) {
|
|
632
|
-
var t = navigator, e = t.languages;
|
|
633
|
-
return t.userLanguage || (e && e.length ? e[0] : t.language);
|
|
634
|
-
}
|
|
635
|
-
}
|
|
636
|
-
function oa() {
|
|
637
|
-
try {
|
|
638
|
-
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
639
|
-
} catch {
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
|
-
function ua(t) {
|
|
643
|
-
return (function(e) {
|
|
644
|
-
for (var r, n = /* @__PURE__ */ Object.create(null), i = /([^&=]+)=?([^&]*)/g; r = i.exec(e); ) {
|
|
645
|
-
var s = or(r[1]), a = or(r[2]);
|
|
646
|
-
if (s) if (s.substring(s.length - 2) === "[]") {
|
|
647
|
-
var o = n[s = s.substring(0, s.length - 2)] || (n[s] = []);
|
|
648
|
-
n[s] = Array.isArray(o) ? o : [], n[s].push(a);
|
|
649
|
-
} else n[s] = a === "" || a;
|
|
650
|
-
}
|
|
651
|
-
for (var u in n) {
|
|
652
|
-
var l = u.split("[");
|
|
653
|
-
l.length > 1 && (ca(n, l.map(function(f) {
|
|
654
|
-
return f.replace(/[?[\]\\ ]/g, "");
|
|
655
|
-
}), n[u]), delete n[u]);
|
|
656
|
-
}
|
|
657
|
-
return n;
|
|
658
|
-
})((function(e) {
|
|
659
|
-
return Q && window.location.search.substring(1);
|
|
660
|
-
})());
|
|
661
|
-
}
|
|
662
|
-
function ca(t, e, r) {
|
|
663
|
-
for (var n = e.length - 1, i = 0; i < n; ++i) {
|
|
664
|
-
var s = e[i];
|
|
665
|
-
if (s === "__proto__" || s === "constructor") break;
|
|
666
|
-
s in t || (t[s] = {}), t = t[s];
|
|
667
|
-
}
|
|
668
|
-
t[e[n]] = r;
|
|
669
|
-
}
|
|
670
|
-
function be() {
|
|
671
|
-
for (var t = "", e = 0, r = 4294967295 * Math.random() | 0; e++ < 36; ) {
|
|
672
|
-
var n = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"[e - 1], i = 15 & r;
|
|
673
|
-
t += n == "-" || n == "4" ? n : (n == "x" ? i : 3 & i | 8).toString(16), r = e % 8 == 0 ? 4294967295 * Math.random() | 0 : r >> 4;
|
|
674
|
-
}
|
|
675
|
-
return t;
|
|
676
|
-
}
|
|
677
|
-
var ge = "global", Oe = ye + ge + ye, Pe = typeof self === Ge && self.self === self && self || typeof global === Ge && global[ge] === global && global || void 0;
|
|
678
|
-
function fe(t) {
|
|
679
|
-
return Pe[Oe][t];
|
|
680
|
-
}
|
|
681
|
-
function de(t, e) {
|
|
682
|
-
return Pe[Oe][t] = e;
|
|
683
|
-
}
|
|
684
|
-
function Te(t) {
|
|
685
|
-
delete Pe[Oe][t];
|
|
686
|
-
}
|
|
687
|
-
function ke(t, e, r) {
|
|
688
|
-
var n;
|
|
689
|
-
try {
|
|
690
|
-
if (Kt(t)) {
|
|
691
|
-
var i = window[t];
|
|
692
|
-
n = i[e].bind(i);
|
|
693
|
-
}
|
|
694
|
-
} catch {
|
|
695
|
-
}
|
|
696
|
-
return n || r;
|
|
697
|
-
}
|
|
698
|
-
Pe[Oe] || (Pe[Oe] = {});
|
|
699
|
-
var ze = {};
|
|
700
|
-
function Kt(t) {
|
|
701
|
-
if (typeof ze[t] !== te) return ze[t];
|
|
702
|
-
try {
|
|
703
|
-
var e = window[t];
|
|
704
|
-
e.setItem(te, te), e.removeItem(te);
|
|
705
|
-
} catch {
|
|
706
|
-
return ze[t] = !1;
|
|
707
|
-
}
|
|
708
|
-
return ze[t] = !0;
|
|
709
|
-
}
|
|
710
|
-
function N() {
|
|
711
|
-
return N = Object.assign ? Object.assign.bind() : function(t) {
|
|
712
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
713
|
-
var r = arguments[e];
|
|
714
|
-
for (var n in r) ({}).hasOwnProperty.call(r, n) && (t[n] = r[n]);
|
|
715
|
-
}
|
|
716
|
-
return t;
|
|
717
|
-
}, N.apply(null, arguments);
|
|
718
|
-
}
|
|
719
|
-
var ue = "function", ie = "undefined", Ce = "reducer", En = "@@redux/", kt = En + "INIT", la = En + Math.random().toString(36), ur = /* @__PURE__ */ (function() {
|
|
720
|
-
return typeof Symbol === ue && Symbol.observable || "@@observable";
|
|
721
|
-
})(), Ve = " != " + ue;
|
|
722
|
-
function In(t, e, r) {
|
|
723
|
-
var n;
|
|
724
|
-
if (typeof e === ue && typeof r === ie && (r = e, e = void 0), typeof r !== ie) {
|
|
725
|
-
if (typeof r !== ue) throw new Error("enhancer" + Ve);
|
|
726
|
-
return r(In)(t, e);
|
|
727
|
-
}
|
|
728
|
-
if (typeof t !== ue) throw new Error(Ce + Ve);
|
|
729
|
-
var i = t, s = e, a = [], o = a, u = !1;
|
|
730
|
-
function l() {
|
|
731
|
-
o === a && (o = a.slice());
|
|
732
|
-
}
|
|
733
|
-
function f() {
|
|
734
|
-
return s;
|
|
735
|
-
}
|
|
736
|
-
function p(b) {
|
|
737
|
-
if (typeof b !== ue) throw new Error("Listener" + Ve);
|
|
738
|
-
var S = !0;
|
|
739
|
-
return l(), o.push(b), function() {
|
|
740
|
-
if (S) {
|
|
741
|
-
S = !1, l();
|
|
742
|
-
var I = o.indexOf(b);
|
|
743
|
-
o.splice(I, 1);
|
|
744
|
-
}
|
|
745
|
-
};
|
|
746
|
-
}
|
|
747
|
-
function g(b) {
|
|
748
|
-
if (!J(b)) throw new Error("Act != obj");
|
|
749
|
-
if (typeof b.type === ie) throw new Error("ActType " + ie);
|
|
750
|
-
if (u) throw new Error("Dispatch in " + Ce);
|
|
751
|
-
try {
|
|
752
|
-
u = !0, s = i(s, b);
|
|
753
|
-
} finally {
|
|
754
|
-
u = !1;
|
|
755
|
-
}
|
|
756
|
-
for (var S = a = o, I = 0; I < S.length; I++) (0, S[I])();
|
|
757
|
-
return b;
|
|
758
|
-
}
|
|
759
|
-
return g({ type: kt }), (n = { dispatch: g, subscribe: p, getState: f, replaceReducer: function(b) {
|
|
760
|
-
if (typeof b !== ue) throw new Error("next " + Ce + Ve);
|
|
761
|
-
i = b, g({ type: kt });
|
|
762
|
-
} })[ur] = function() {
|
|
763
|
-
var b, S = p;
|
|
764
|
-
return (b = { subscribe: function(I) {
|
|
765
|
-
if (typeof I != "object") throw new TypeError("Observer != obj");
|
|
766
|
-
function w() {
|
|
767
|
-
I.next && I.next(f());
|
|
768
|
-
}
|
|
769
|
-
return w(), { unsubscribe: S(w) };
|
|
770
|
-
} })[ur] = function() {
|
|
771
|
-
return this;
|
|
772
|
-
}, b;
|
|
773
|
-
}, n;
|
|
774
|
-
}
|
|
775
|
-
function fa(t, e) {
|
|
776
|
-
var r = e && e.type;
|
|
777
|
-
return "action " + (r && r.toString() || "?") + Ce + " " + t + " returns " + ie;
|
|
778
|
-
}
|
|
779
|
-
function xe() {
|
|
780
|
-
var t = [].slice.call(arguments);
|
|
781
|
-
return t.length === 0 ? function(e) {
|
|
782
|
-
return e;
|
|
783
|
-
} : t.length === 1 ? t[0] : t.reduce(function(e, r) {
|
|
784
|
-
return function() {
|
|
785
|
-
return e(r.apply(void 0, [].slice.call(arguments)));
|
|
786
|
-
};
|
|
787
|
-
});
|
|
788
|
-
}
|
|
789
|
-
function da() {
|
|
790
|
-
var t = arguments;
|
|
791
|
-
return function(e) {
|
|
792
|
-
return function(r, n, i) {
|
|
793
|
-
var s, a = e(r, n, i), o = a.dispatch, u = { getState: a.getState, dispatch: function(l) {
|
|
794
|
-
return o(l);
|
|
795
|
-
} };
|
|
796
|
-
return s = [].slice.call(t).map(function(l) {
|
|
797
|
-
return l(u);
|
|
798
|
-
}), N({}, a, { dispatch: o = xe.apply(void 0, s)(a.dispatch) });
|
|
799
|
-
};
|
|
800
|
-
};
|
|
801
|
-
}
|
|
802
|
-
var le = ye + "anon_id", he = ye + "user_id", Ee = ye + "user_traits", jt = "analytics", oe = "userId", Se = "anonymousId", Ke = ["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"], Nt = ["name", "EVENTS", "config", "loaded"], j = Ke.reduce(function(t, e) {
|
|
803
|
-
return t[e] = e, t;
|
|
804
|
-
}, { registerPluginType: function(t) {
|
|
805
|
-
return "registerPlugin:" + t;
|
|
806
|
-
}, pluginReadyType: function(t) {
|
|
807
|
-
return "ready:" + t;
|
|
808
|
-
} }), cr = /^utm_/, lr = /^an_prop_/, fr = /^an_trait_/;
|
|
809
|
-
function pa(t) {
|
|
810
|
-
var e = t.storage.setItem;
|
|
811
|
-
return function(r) {
|
|
812
|
-
return function(n) {
|
|
813
|
-
return function(i) {
|
|
814
|
-
if (i.type === j.bootstrap) {
|
|
815
|
-
var s = i.params, a = i.user, o = i.persistedUser, u = i.initialUser, l = o.userId === a.userId;
|
|
816
|
-
o.anonymousId !== a.anonymousId && e(le, a.anonymousId), l || e(he, a.userId), u.traits && e(Ee, N({}, l && o.traits ? o.traits : {}, u.traits));
|
|
817
|
-
var f = Object.keys(i.params);
|
|
818
|
-
if (f.length) {
|
|
819
|
-
var p = s.an_uid, g = s.an_event, b = f.reduce(function(S, I) {
|
|
820
|
-
if (I.match(cr) || I.match(/^(d|g)clid/)) {
|
|
821
|
-
var w = I.replace(cr, "");
|
|
822
|
-
S.campaign[w === "campaign" ? "name" : w] = s[I];
|
|
823
|
-
}
|
|
824
|
-
return I.match(lr) && (S.props[I.replace(lr, "")] = s[I]), I.match(fr) && (S.traits[I.replace(fr, "")] = s[I]), S;
|
|
825
|
-
}, { campaign: {}, props: {}, traits: {} });
|
|
826
|
-
r.dispatch(N({ type: j.params, raw: s }, b, p ? { userId: p } : {})), p && setTimeout(function() {
|
|
827
|
-
return t.identify(p, b.traits);
|
|
828
|
-
}, 0), g && setTimeout(function() {
|
|
829
|
-
return t.track(g, b.props);
|
|
830
|
-
}, 0), Object.keys(b.campaign).length && r.dispatch({ type: j.campaign, campaign: b.campaign });
|
|
831
|
-
}
|
|
832
|
-
}
|
|
833
|
-
return n(i);
|
|
834
|
-
};
|
|
835
|
-
};
|
|
836
|
-
};
|
|
837
|
-
}
|
|
838
|
-
function ga(t) {
|
|
839
|
-
return function(e, r) {
|
|
840
|
-
if (e === void 0 && (e = {}), r === void 0 && (r = {}), r.type === j.setItemEnd) {
|
|
841
|
-
if (r.key === le) return N({}, e, { anonymousId: r.value });
|
|
842
|
-
if (r.key === he) return N({}, e, { userId: r.value });
|
|
843
|
-
}
|
|
844
|
-
switch (r.type) {
|
|
845
|
-
case j.identify:
|
|
846
|
-
return Object.assign({}, e, { userId: r.userId, traits: N({}, e.traits, r.traits) });
|
|
847
|
-
case j.reset:
|
|
848
|
-
return [he, le, Ee].forEach(function(n) {
|
|
849
|
-
t.removeItem(n);
|
|
850
|
-
}), Object.assign({}, e, { userId: null, anonymousId: null, traits: {} });
|
|
851
|
-
default:
|
|
852
|
-
return e;
|
|
853
|
-
}
|
|
854
|
-
};
|
|
855
|
-
}
|
|
856
|
-
function dr(t) {
|
|
857
|
-
return { userId: t.getItem(he), anonymousId: t.getItem(le), traits: t.getItem(Ee) };
|
|
858
|
-
}
|
|
859
|
-
var Mt = function(t) {
|
|
860
|
-
return ye + "TEMP" + ye + t;
|
|
861
|
-
};
|
|
862
|
-
function ha(t) {
|
|
863
|
-
var e = t.storage, r = e.setItem, n = e.removeItem, i = e.getItem;
|
|
864
|
-
return function(s) {
|
|
865
|
-
return function(a) {
|
|
866
|
-
return function(o) {
|
|
867
|
-
var u = o.userId, l = o.traits, f = o.options;
|
|
868
|
-
if (o.type === j.reset && ([he, Ee, le].forEach(function(b) {
|
|
869
|
-
n(b);
|
|
870
|
-
}), [oe, Se, "traits"].forEach(function(b) {
|
|
871
|
-
Te(Mt(b));
|
|
872
|
-
})), o.type === j.identify) {
|
|
873
|
-
i(le) || r(le, be());
|
|
874
|
-
var p = i(he), g = i(Ee) || {};
|
|
875
|
-
p && p !== u && s.dispatch({ type: j.userIdChanged, old: { userId: p, traits: g }, new: { userId: u, traits: l }, options: f }), u && r(he, u), l && r(Ee, N({}, g, l));
|
|
876
|
-
}
|
|
877
|
-
return a(o);
|
|
878
|
-
};
|
|
879
|
-
};
|
|
880
|
-
};
|
|
881
|
-
}
|
|
882
|
-
var Me = {};
|
|
883
|
-
function pr(t, e) {
|
|
884
|
-
Me[t] && Z(Me[t]) && (Me[t](e), delete Me[t]);
|
|
885
|
-
}
|
|
886
|
-
function An(t, e, r) {
|
|
887
|
-
return new Promise(function(n, i) {
|
|
888
|
-
return e() ? n(t) : r < 1 ? i(N({}, t, { queue: !0 })) : new Promise(function(s) {
|
|
889
|
-
return setTimeout(s, 10);
|
|
890
|
-
}).then(function(s) {
|
|
891
|
-
return An(t, e, r - 10).then(n, i);
|
|
892
|
-
});
|
|
893
|
-
});
|
|
894
|
-
}
|
|
895
|
-
function ma(t) {
|
|
896
|
-
return { abort: t };
|
|
897
|
-
}
|
|
898
|
-
function On(t, e, r) {
|
|
899
|
-
var n = {}, i = e(), s = t.getState(), a = s.plugins, o = s.queue, u = s.user;
|
|
900
|
-
if (!s.context.offline && o && o.actions && o.actions.length) {
|
|
901
|
-
var l = o.actions.reduce(function(p, g, b) {
|
|
902
|
-
return a[g.plugin].loaded ? (p.process.push(g), p.processIndex.push(b)) : (p.requeue.push(g), p.requeueIndex.push(b)), p;
|
|
903
|
-
}, { processIndex: [], process: [], requeue: [], requeueIndex: [] });
|
|
904
|
-
if (l.processIndex && l.processIndex.length) {
|
|
905
|
-
l.processIndex.forEach(function(p) {
|
|
906
|
-
var g = o.actions[p], b = g.plugin, S = g.payload.type, I = i[b][S];
|
|
907
|
-
if (I && Z(I)) {
|
|
908
|
-
var w, y = (function(v, m) {
|
|
909
|
-
return v === void 0 && (v = {}), m === void 0 && (m = {}), [oe, Se].reduce(function(T, x) {
|
|
910
|
-
return v.hasOwnProperty(x) && m[x] && m[x] !== v[x] && (T[x] = m[x]), T;
|
|
911
|
-
}, v);
|
|
912
|
-
})(g.payload, u), d = n[y.meta.rid];
|
|
913
|
-
if (!d && (w = I({ payload: y, config: a[b].config, instance: r, abort: ma })) && J(w) && w.abort) return void (n[y.meta.rid] = !0);
|
|
914
|
-
if (!d) {
|
|
915
|
-
var E = S + ":" + b;
|
|
916
|
-
t.dispatch(N({}, y, { type: E, _: { called: E, from: "queueDrain" } }));
|
|
917
|
-
}
|
|
918
|
-
}
|
|
919
|
-
});
|
|
920
|
-
var f = o.actions.filter(function(p, g) {
|
|
921
|
-
return !~l.processIndex.indexOf(g);
|
|
922
|
-
});
|
|
923
|
-
o.actions = f;
|
|
924
|
-
}
|
|
925
|
-
}
|
|
926
|
-
}
|
|
927
|
-
var ut = function(t) {
|
|
928
|
-
var e = t.data, r = t.action, n = t.instance, i = t.state, s = t.allPlugins, a = t.allMatches, o = t.store, u = t.EVENTS;
|
|
929
|
-
try {
|
|
930
|
-
var l = i.plugins, f = i.context, p = r.type, g = p.match(Ie), b = e.exact.map(function(w) {
|
|
931
|
-
return w.pluginName;
|
|
932
|
-
});
|
|
933
|
-
g && (b = a.during.map(function(w) {
|
|
934
|
-
return w.pluginName;
|
|
935
|
-
}));
|
|
936
|
-
var S = /* @__PURE__ */ (function(w, y) {
|
|
937
|
-
return function(d, E, v) {
|
|
938
|
-
var m = E.config, T = E.name, x = T + "." + d.type;
|
|
939
|
-
v && (x = v.event);
|
|
940
|
-
var A = d.type.match(Ie) ? /* @__PURE__ */ (function($, k, _, z, V) {
|
|
941
|
-
return function(C, O) {
|
|
942
|
-
var W = z ? z.name : $, R = O && _e(O) ? O : _;
|
|
943
|
-
if (z && (!(R = O && _e(O) ? O : [$]).includes($) || R.length !== 1)) throw new Error("Method " + k + " can only abort " + $ + " plugin. " + JSON.stringify(R) + " input valid");
|
|
944
|
-
return N({}, V, { abort: { reason: C, plugins: R, caller: k, _: W } });
|
|
945
|
-
};
|
|
946
|
-
})(T, x, y, v, d) : /* @__PURE__ */ (function($, k) {
|
|
947
|
-
return function() {
|
|
948
|
-
throw new Error($.type + " action not cancellable. Remove abort in " + k);
|
|
949
|
-
};
|
|
950
|
-
})(d, x);
|
|
951
|
-
return { payload: va(d), instance: w, config: m || {}, abort: A };
|
|
952
|
-
};
|
|
953
|
-
})(n, b), I = e.exact.reduce(function(w, y) {
|
|
954
|
-
var d = y.pluginName, E = y.methodName, v = !1;
|
|
955
|
-
return E.match(/^initialize/) || E.match(/^reset/) || (v = !l[d].loaded), f.offline && E.match(/^(page|track|identify)/) && (v = !0), w["" + d] = v, w;
|
|
956
|
-
}, {});
|
|
957
|
-
return Promise.resolve(e.exact.reduce(function(w, y, d) {
|
|
958
|
-
var E = y.pluginName;
|
|
959
|
-
return Promise.resolve(w).then(function(v) {
|
|
960
|
-
function m() {
|
|
961
|
-
return Promise.resolve(v);
|
|
962
|
-
}
|
|
963
|
-
var T = (function() {
|
|
964
|
-
if (e.namespaced && e.namespaced[E]) return Promise.resolve(e.namespaced[E].reduce(function(x, A, $) {
|
|
965
|
-
return Promise.resolve(x).then(function(k) {
|
|
966
|
-
return A.method && Z(A.method) ? ((function(C, O) {
|
|
967
|
-
var W = wr(C);
|
|
968
|
-
if (W && W.name === O) {
|
|
969
|
-
var R = wr(W.method);
|
|
970
|
-
throw new Error([O + " plugin is calling method " + C, "Plugins cant call self", "Use " + W.method + " " + (R ? "or " + R.method : "") + " in " + O + " plugin insteadof " + C].join(`
|
|
971
|
-
`));
|
|
972
|
-
}
|
|
973
|
-
})(A.methodName, A.pluginName), Promise.resolve(A.method({ payload: k, instance: n, abort: (_ = k, z = E, V = A.pluginName, function(C, O) {
|
|
974
|
-
return N({}, _, { abort: { reason: C, plugins: O || [z], caller: p, from: V || z } });
|
|
975
|
-
}), config: mr(A.pluginName, l, s), plugins: l })).then(function(C) {
|
|
976
|
-
var O = J(C) ? C : {};
|
|
977
|
-
return Promise.resolve(N({}, k, O));
|
|
978
|
-
})) : k;
|
|
979
|
-
var _, z, V;
|
|
980
|
-
});
|
|
981
|
-
}, Promise.resolve(r))).then(function(x) {
|
|
982
|
-
v[E] = x;
|
|
983
|
-
});
|
|
984
|
-
v[E] = r;
|
|
985
|
-
})();
|
|
986
|
-
return T && T.then ? T.then(m) : m();
|
|
987
|
-
});
|
|
988
|
-
}, Promise.resolve({}))).then(function(w) {
|
|
989
|
-
return Promise.resolve(e.exact.reduce(function(y, d, E) {
|
|
990
|
-
try {
|
|
991
|
-
var v = e.exact.length === E + 1, m = d.pluginName, T = s[m];
|
|
992
|
-
return Promise.resolve(y).then(function(x) {
|
|
993
|
-
var A = w[m] ? w[m] : {};
|
|
994
|
-
if (g && (A = x), lt(A, m)) return ct({ data: A, method: p, instance: n, pluginName: m, store: o }), Promise.resolve(x);
|
|
995
|
-
if (lt(x, m)) return v && ct({ data: x, method: p, instance: n, store: o }), Promise.resolve(x);
|
|
996
|
-
if (I.hasOwnProperty(m) && I[m] === !0) return o.dispatch({ type: "queue", plugin: m, payload: A, _: { called: "queue", from: "queueMechanism" } }), Promise.resolve(x);
|
|
997
|
-
var $ = S(w[m], s[m]);
|
|
998
|
-
return Promise.resolve(T[p]({ abort: $.abort, payload: A, instance: n, config: mr(m, l, s), plugins: l })).then(function(k) {
|
|
999
|
-
var _ = J(k) ? k : {}, z = N({}, x, _), V = w[m];
|
|
1000
|
-
if (lt(V, m)) ct({ data: V, method: p, instance: n, pluginName: m, store: o });
|
|
1001
|
-
else {
|
|
1002
|
-
var C = p + ":" + m;
|
|
1003
|
-
(C.match(/:/g) || []).length < 2 && !p.match(gr) && !p.match(hr) && n.dispatch(N({}, g ? z : A, { type: C, _: { called: C, from: "submethod" } }));
|
|
1004
|
-
}
|
|
1005
|
-
return Promise.resolve(z);
|
|
1006
|
-
});
|
|
1007
|
-
});
|
|
1008
|
-
} catch (x) {
|
|
1009
|
-
return Promise.reject(x);
|
|
1010
|
-
}
|
|
1011
|
-
}, Promise.resolve(r))).then(function(y) {
|
|
1012
|
-
if (!(p.match(Ie) || p.match(/^registerPlugin/) || p.match(hr) || p.match(gr) || p.match(/^params/) || p.match(/^userIdChanged/))) {
|
|
1013
|
-
if (u.plugins.includes(p), y._ && y._.originalAction === p) return y;
|
|
1014
|
-
var d = N({}, y, { _: { originalAction: y.type, called: y.type, from: "engineEnd" } });
|
|
1015
|
-
Pn(y, e.exact.length) && !p.match(/End$/) && (d = N({}, d, { type: y.type + "Aborted" })), o.dispatch(d);
|
|
1016
|
-
}
|
|
1017
|
-
return y;
|
|
1018
|
-
});
|
|
1019
|
-
});
|
|
1020
|
-
} catch (w) {
|
|
1021
|
-
return Promise.reject(w);
|
|
1022
|
-
}
|
|
1023
|
-
}, Ie = /Start$/, gr = /^bootstrap/, hr = /^ready/;
|
|
1024
|
-
function ct(t) {
|
|
1025
|
-
var e = t.pluginName, r = t.method + "Aborted" + (e ? ":" + e : "");
|
|
1026
|
-
t.store.dispatch(N({}, t.data, { type: r, _: { called: r, from: "abort" } }));
|
|
1027
|
-
}
|
|
1028
|
-
function mr(t, e, r) {
|
|
1029
|
-
var n = e[t] || r[t];
|
|
1030
|
-
return n && n.config ? n.config : {};
|
|
1031
|
-
}
|
|
1032
|
-
function vr(t, e) {
|
|
1033
|
-
return e.reduce(function(r, n) {
|
|
1034
|
-
return n[t] ? r.concat({ methodName: t, pluginName: n.name, method: n[t] }) : r;
|
|
1035
|
-
}, []);
|
|
1036
|
-
}
|
|
1037
|
-
function yr(t, e) {
|
|
1038
|
-
var r = t.replace(Ie, ""), n = e ? ":" + e : "";
|
|
1039
|
-
return ["" + t + n, "" + r + n, r + "End" + n];
|
|
1040
|
-
}
|
|
1041
|
-
function lt(t, e) {
|
|
1042
|
-
var r = t.abort;
|
|
1043
|
-
return !!r && (r === !0 || br(r, e) || r && br(r.plugins, e));
|
|
1044
|
-
}
|
|
1045
|
-
function Pn(t, e) {
|
|
1046
|
-
var r = t.abort;
|
|
1047
|
-
if (!r) return !1;
|
|
1048
|
-
if (r === !0 || ce(r)) return !0;
|
|
1049
|
-
var n = r.plugins;
|
|
1050
|
-
return _e(r) && r.length === e || _e(n) && n.length === e;
|
|
1051
|
-
}
|
|
1052
|
-
function _e(t) {
|
|
1053
|
-
return Array.isArray(t);
|
|
1054
|
-
}
|
|
1055
|
-
function br(t, e) {
|
|
1056
|
-
return !(!t || !_e(t)) && t.includes(e);
|
|
1057
|
-
}
|
|
1058
|
-
function wr(t) {
|
|
1059
|
-
var e = t.match(/(.*):(.*)/);
|
|
1060
|
-
return !!e && { method: e[1], name: e[2] };
|
|
1061
|
-
}
|
|
1062
|
-
function va(t) {
|
|
1063
|
-
return Object.keys(t).reduce(function(e, r) {
|
|
1064
|
-
return r === "type" || (e[r] = J(t[r]) ? Object.assign({}, t[r]) : t[r]), e;
|
|
1065
|
-
}, {});
|
|
1066
|
-
}
|
|
1067
|
-
function ya(t, e, r) {
|
|
1068
|
-
var n = {};
|
|
1069
|
-
return function(i) {
|
|
1070
|
-
return function(s) {
|
|
1071
|
-
return function(a) {
|
|
1072
|
-
try {
|
|
1073
|
-
var o, u = function(v) {
|
|
1074
|
-
return o ? v : s(p);
|
|
1075
|
-
}, l = a.type, f = a.plugins, p = a;
|
|
1076
|
-
if (a.abort) return Promise.resolve(s(a));
|
|
1077
|
-
if (l === j.enablePlugin && i.dispatch({ type: j.initializeStart, plugins: f, disabled: [], fromEnable: !0, meta: a.meta }), l === j.disablePlugin && setTimeout(function() {
|
|
1078
|
-
return pr(a.meta.rid, { payload: a });
|
|
1079
|
-
}, 0), l === j.initializeEnd) {
|
|
1080
|
-
var g = e(), b = Object.keys(g), S = b.filter(function(v) {
|
|
1081
|
-
return f.includes(v);
|
|
1082
|
-
}).map(function(v) {
|
|
1083
|
-
return g[v];
|
|
1084
|
-
}), I = [], w = [], y = a.disabled, d = S.map(function(v) {
|
|
1085
|
-
var m = v.loaded, T = v.name, x = v.config;
|
|
1086
|
-
return An(v, function() {
|
|
1087
|
-
return m({ config: x });
|
|
1088
|
-
}, 1e4).then(function(A) {
|
|
1089
|
-
return n[T] || (i.dispatch({ type: j.pluginReadyType(T), name: T, events: Object.keys(v).filter(function($) {
|
|
1090
|
-
return !Nt.includes($);
|
|
1091
|
-
}) }), n[T] = !0), I = I.concat(T), v;
|
|
1092
|
-
}).catch(function(A) {
|
|
1093
|
-
if (A instanceof Error) throw new Error(A);
|
|
1094
|
-
return w = w.concat(A.name), A;
|
|
1095
|
-
});
|
|
1096
|
-
});
|
|
1097
|
-
Promise.all(d).then(function(v) {
|
|
1098
|
-
var m = { plugins: I, failed: w, disabled: y };
|
|
1099
|
-
setTimeout(function() {
|
|
1100
|
-
b.length === d.length + y.length && i.dispatch(N({}, { type: j.ready }, m));
|
|
1101
|
-
}, 0);
|
|
1102
|
-
});
|
|
1103
|
-
}
|
|
1104
|
-
var E = (function() {
|
|
1105
|
-
if (l !== j.bootstrap) return /^ready:([^:]*)$/.test(l) && setTimeout(function() {
|
|
1106
|
-
return On(i, e, t);
|
|
1107
|
-
}, 0), Promise.resolve((function(v, m, T, x, A) {
|
|
1108
|
-
try {
|
|
1109
|
-
var $ = Z(m) ? m() : m, k = v.type, _ = k.replace(Ie, "");
|
|
1110
|
-
if (v._ && v._.called) return Promise.resolve(v);
|
|
1111
|
-
var z = T.getState(), V = (W = $, (R = z.plugins) === void 0 && (R = {}), (q = v.options) === void 0 && (q = {}), Object.keys(W).filter(function(c) {
|
|
1112
|
-
var h = q.plugins || {};
|
|
1113
|
-
return Zi(h[c]) ? h[c] : h.all !== !1 && (!R[c] || R[c].enabled !== !1);
|
|
1114
|
-
}).map(function(c) {
|
|
1115
|
-
return W[c];
|
|
1116
|
-
}));
|
|
1117
|
-
k === j.initializeStart && v.fromEnable && (V = Object.keys(z.plugins).filter(function(c) {
|
|
1118
|
-
var h = z.plugins[c];
|
|
1119
|
-
return v.plugins.includes(c) && !h.initialized;
|
|
1120
|
-
}).map(function(c) {
|
|
1121
|
-
return $[c];
|
|
1122
|
-
}));
|
|
1123
|
-
var C = V.map(function(c) {
|
|
1124
|
-
return c.name;
|
|
1125
|
-
}), O = (function(c, h) {
|
|
1126
|
-
var P = yr(c).map(function(M) {
|
|
1127
|
-
return vr(M, h);
|
|
1128
|
-
});
|
|
1129
|
-
return h.reduce(function(M, U) {
|
|
1130
|
-
var D = U.name, B = yr(c, D).map(function(ne) {
|
|
1131
|
-
return vr(ne, h);
|
|
1132
|
-
}), H = B[0], G = B[1], L = B[2];
|
|
1133
|
-
return H.length && (M.beforeNS[D] = H), G.length && (M.duringNS[D] = G), L.length && (M.afterNS[D] = L), M;
|
|
1134
|
-
}, { before: P[0], beforeNS: {}, during: P[1], duringNS: {}, after: P[2], afterNS: {} });
|
|
1135
|
-
})(k, V);
|
|
1136
|
-
return Promise.resolve(ut({ action: v, data: { exact: O.before, namespaced: O.beforeNS }, state: z, allPlugins: $, allMatches: O, instance: T, store: x, EVENTS: A })).then(function(c) {
|
|
1137
|
-
function h() {
|
|
1138
|
-
var U = (function() {
|
|
1139
|
-
if (k.match(Ie)) return Promise.resolve(ut({ action: N({}, P, { type: _ + "End" }), data: { exact: O.after, namespaced: O.afterNS }, state: z, allPlugins: $, allMatches: O, instance: T, store: x, EVENTS: A })).then(function(D) {
|
|
1140
|
-
D.meta && D.meta.hasCallback && pr(D.meta.rid, { payload: D });
|
|
1141
|
-
});
|
|
1142
|
-
})();
|
|
1143
|
-
return U && U.then ? U.then(function() {
|
|
1144
|
-
return c;
|
|
1145
|
-
}) : c;
|
|
1146
|
-
}
|
|
1147
|
-
if (Pn(c, C.length)) return c;
|
|
1148
|
-
var P, M = (function() {
|
|
1149
|
-
if (k !== _) return Promise.resolve(ut({ action: N({}, c, { type: _ }), data: { exact: O.during, namespaced: O.duringNS }, state: z, allPlugins: $, allMatches: O, instance: T, store: x, EVENTS: A })).then(function(U) {
|
|
1150
|
-
P = U;
|
|
1151
|
-
});
|
|
1152
|
-
P = c;
|
|
1153
|
-
})();
|
|
1154
|
-
return M && M.then ? M.then(h) : h();
|
|
1155
|
-
});
|
|
1156
|
-
} catch (c) {
|
|
1157
|
-
return Promise.reject(c);
|
|
1158
|
-
}
|
|
1159
|
-
var W, R, q;
|
|
1160
|
-
})(a, e, t, i, r)).then(function(v) {
|
|
1161
|
-
var m = s(v);
|
|
1162
|
-
return o = 1, m;
|
|
1163
|
-
});
|
|
1164
|
-
})();
|
|
1165
|
-
return Promise.resolve(E && E.then ? E.then(u) : u(E));
|
|
1166
|
-
} catch (v) {
|
|
1167
|
-
return Promise.reject(v);
|
|
1168
|
-
}
|
|
1169
|
-
};
|
|
1170
|
-
};
|
|
1171
|
-
};
|
|
1172
|
-
}
|
|
1173
|
-
function ba(t) {
|
|
1174
|
-
return function(e) {
|
|
1175
|
-
return function(r) {
|
|
1176
|
-
return function(n) {
|
|
1177
|
-
var i = n.type, s = n.key, a = n.value, o = n.options;
|
|
1178
|
-
if (i === j.setItem || i === j.removeItem) {
|
|
1179
|
-
if (n.abort) return r(n);
|
|
1180
|
-
i === j.setItem ? t.setItem(s, a, o) : t.removeItem(s, o);
|
|
1181
|
-
}
|
|
1182
|
-
return r(n);
|
|
1183
|
-
};
|
|
1184
|
-
};
|
|
1185
|
-
};
|
|
1186
|
-
}
|
|
1187
|
-
var wa = function() {
|
|
1188
|
-
var t = this;
|
|
1189
|
-
this.before = [], this.after = [], this.addMiddleware = function(e, r) {
|
|
1190
|
-
t[r] = t[r].concat(e);
|
|
1191
|
-
}, this.removeMiddleware = function(e, r) {
|
|
1192
|
-
var n = t[r].findIndex(function(i) {
|
|
1193
|
-
return i === e;
|
|
1194
|
-
});
|
|
1195
|
-
n !== -1 && (t[r] = [].concat(t[r].slice(0, n), t[r].slice(n + 1)));
|
|
1196
|
-
}, this.dynamicMiddlewares = function(e) {
|
|
1197
|
-
return function(r) {
|
|
1198
|
-
return function(n) {
|
|
1199
|
-
return function(i) {
|
|
1200
|
-
var s = { getState: r.getState, dispatch: function(o) {
|
|
1201
|
-
return r.dispatch(o);
|
|
1202
|
-
} }, a = t[e].map(function(o) {
|
|
1203
|
-
return o(s);
|
|
1204
|
-
});
|
|
1205
|
-
return xe.apply(void 0, a)(n)(i);
|
|
1206
|
-
};
|
|
1207
|
-
};
|
|
1208
|
-
};
|
|
1209
|
-
};
|
|
1210
|
-
};
|
|
1211
|
-
function Sa(t) {
|
|
1212
|
-
return function(e, r) {
|
|
1213
|
-
e === void 0 && (e = {});
|
|
1214
|
-
var n = {};
|
|
1215
|
-
if (r.type === "initialize:aborted") return e;
|
|
1216
|
-
if (/^registerPlugin:([^:]*)$/.test(r.type)) {
|
|
1217
|
-
var i = Sr(r.type, "registerPlugin"), s = t()[i];
|
|
1218
|
-
if (!s || !i) return e;
|
|
1219
|
-
var a = r.enabled, o = s.config;
|
|
1220
|
-
return n[i] = { enabled: a, initialized: !!a && !s.initialize, loaded: !!a && !!s.loaded({ config: o }), config: o }, N({}, e, n);
|
|
1221
|
-
}
|
|
1222
|
-
if (/^initialize:([^:]*)$/.test(r.type)) {
|
|
1223
|
-
var u = Sr(r.type, j.initialize), l = t()[u];
|
|
1224
|
-
return l && u ? (n[u] = N({}, e[u], { initialized: !0, loaded: !!l.loaded({ config: l.config }) }), N({}, e, n)) : e;
|
|
1225
|
-
}
|
|
1226
|
-
if (/^ready:([^:]*)$/.test(r.type)) return n[r.name] = N({}, e[r.name], { loaded: !0 }), N({}, e, n);
|
|
1227
|
-
switch (r.type) {
|
|
1228
|
-
case j.disablePlugin:
|
|
1229
|
-
return N({}, e, Er(r.plugins, !1, e));
|
|
1230
|
-
case j.enablePlugin:
|
|
1231
|
-
return N({}, e, Er(r.plugins, !0, e));
|
|
1232
|
-
default:
|
|
1233
|
-
return e;
|
|
1234
|
-
}
|
|
1235
|
-
};
|
|
1236
|
-
}
|
|
1237
|
-
function Sr(t, e) {
|
|
1238
|
-
return t.substring(e.length + 1, t.length);
|
|
1239
|
-
}
|
|
1240
|
-
function Er(t, e, r) {
|
|
1241
|
-
return t.reduce(function(n, i) {
|
|
1242
|
-
return n[i] = N({}, r[i], { enabled: e }), n;
|
|
1243
|
-
}, r);
|
|
1244
|
-
}
|
|
1245
|
-
function xn(t) {
|
|
1246
|
-
try {
|
|
1247
|
-
return JSON.parse(JSON.stringify(t));
|
|
1248
|
-
} catch {
|
|
1249
|
-
}
|
|
1250
|
-
return t;
|
|
1251
|
-
}
|
|
1252
|
-
var Ea = { last: {}, history: [] };
|
|
1253
|
-
function Ia(t, e) {
|
|
1254
|
-
t === void 0 && (t = Ea);
|
|
1255
|
-
var r = e.options, n = e.meta;
|
|
1256
|
-
if (e.type === j.track) {
|
|
1257
|
-
var i = xn(N({ event: e.event, properties: e.properties }, Object.keys(r).length && { options: r }, { meta: n }));
|
|
1258
|
-
return N({}, t, { last: i, history: t.history.concat(i) });
|
|
1259
|
-
}
|
|
1260
|
-
return t;
|
|
1261
|
-
}
|
|
1262
|
-
var Aa = { actions: [] };
|
|
1263
|
-
function Oa(t, e) {
|
|
1264
|
-
t === void 0 && (t = Aa);
|
|
1265
|
-
var r = e.payload;
|
|
1266
|
-
switch (e.type) {
|
|
1267
|
-
case "queue":
|
|
1268
|
-
var n;
|
|
1269
|
-
return n = r && r.type && r.type === j.identify ? [e].concat(t.actions) : t.actions.concat(e), N({}, t, { actions: n });
|
|
1270
|
-
case "dequeue":
|
|
1271
|
-
return [];
|
|
1272
|
-
default:
|
|
1273
|
-
return t;
|
|
1274
|
-
}
|
|
1275
|
-
}
|
|
1276
|
-
var Tn = /#.*$/;
|
|
1277
|
-
function Pa(t) {
|
|
1278
|
-
var e = /(http[s]?:\/\/)?([^\/\s]+\/)(.*)/g.exec(t);
|
|
1279
|
-
return "/" + (e && e[3] ? e[3].split("?")[0].replace(Tn, "") : "");
|
|
1280
|
-
}
|
|
1281
|
-
var kn, jn, Nn, Mn, xa = function(t) {
|
|
1282
|
-
if (t === void 0 && (t = {}), !Q) return t;
|
|
1283
|
-
var e = document, r = e.title, n = e.referrer, i = window, s = i.location, a = i.innerWidth, o = i.innerHeight, u = s.hash, l = s.search, f = (function(g) {
|
|
1284
|
-
var b = (function() {
|
|
1285
|
-
if (Q) {
|
|
1286
|
-
for (var S, I = document.getElementsByTagName("link"), w = 0; S = I[w]; w++) if (S.getAttribute("rel") === "canonical") return S.getAttribute("href");
|
|
1287
|
-
}
|
|
1288
|
-
})();
|
|
1289
|
-
return b ? b.match(/\?/) ? b : b + g : window.location.href.replace(Tn, "");
|
|
1290
|
-
})(l), p = { title: r, url: f, path: Pa(f), hash: u, search: l, width: a, height: o };
|
|
1291
|
-
return n && n !== "" && (p.referrer = n), N({}, p, t);
|
|
1292
|
-
}, Ta = { last: {}, history: [] };
|
|
1293
|
-
function ka(t, e) {
|
|
1294
|
-
t === void 0 && (t = Ta);
|
|
1295
|
-
var r = e.options;
|
|
1296
|
-
if (e.type === j.page) {
|
|
1297
|
-
var n = xn(N({ properties: e.properties, meta: e.meta }, Object.keys(r).length && { options: r }));
|
|
1298
|
-
return N({}, t, { last: n, history: t.history.concat(n) });
|
|
1299
|
-
}
|
|
1300
|
-
return t;
|
|
1301
|
-
}
|
|
1302
|
-
kn = (function() {
|
|
1303
|
-
if (!Q) return !1;
|
|
1304
|
-
var t = navigator.appVersion;
|
|
1305
|
-
return ~t.indexOf("Win") ? "Windows" : ~t.indexOf("Mac") ? "MacOS" : ~t.indexOf("X11") ? "UNIX" : ~t.indexOf("Linux") ? "Linux" : "Unknown OS";
|
|
1306
|
-
})(), jn = Q ? document.referrer : null, Nn = sa(), Mn = oa();
|
|
1307
|
-
var Ir = { initialized: !1, sessionId: be(), app: null, version: null, debug: !1, offline: !!Q && !navigator.onLine, os: { name: kn }, userAgent: Q ? navigator.userAgent : "node", library: { name: jt, version: "0.13.1" }, timezone: Mn, locale: Nn, campaign: {}, referrer: jn };
|
|
1308
|
-
function ja(t, e) {
|
|
1309
|
-
t === void 0 && (t = Ir);
|
|
1310
|
-
var r = t.initialized, n = e.campaign;
|
|
1311
|
-
switch (e.type) {
|
|
1312
|
-
case j.campaign:
|
|
1313
|
-
return N({}, t, { campaign: n });
|
|
1314
|
-
case j.offline:
|
|
1315
|
-
return N({}, t, { offline: !0 });
|
|
1316
|
-
case j.online:
|
|
1317
|
-
return N({}, t, { offline: !1 });
|
|
1318
|
-
default:
|
|
1319
|
-
return r ? t : N({}, Ir, t, { initialized: !0 });
|
|
1320
|
-
}
|
|
1321
|
-
}
|
|
1322
|
-
var Na = ["plugins", "reducers", "storage"];
|
|
1323
|
-
function Ma(t, e, r) {
|
|
1324
|
-
if (Q) {
|
|
1325
|
-
var n = window[(r ? "add" : "remove") + "EventListener"];
|
|
1326
|
-
t.split(" ").forEach(function(i) {
|
|
1327
|
-
n(i, e);
|
|
1328
|
-
});
|
|
1329
|
-
}
|
|
1330
|
-
}
|
|
1331
|
-
function $a(t) {
|
|
1332
|
-
var e = Ma.bind(null, "online offline", function(r) {
|
|
1333
|
-
return Promise.resolve(!navigator.onLine).then(t);
|
|
1334
|
-
});
|
|
1335
|
-
return e(!0), function(r) {
|
|
1336
|
-
return e(!1);
|
|
1337
|
-
};
|
|
1338
|
-
}
|
|
1339
|
-
function $n() {
|
|
1340
|
-
return de(jt, []), function(t) {
|
|
1341
|
-
return function(e, r, n) {
|
|
1342
|
-
var i = t(e, r, n), s = i.dispatch;
|
|
1343
|
-
return Object.assign(i, { dispatch: function(a) {
|
|
1344
|
-
return Pe[Oe][jt].push(a.action || a), s(a);
|
|
1345
|
-
} });
|
|
1346
|
-
};
|
|
1347
|
-
};
|
|
1348
|
-
}
|
|
1349
|
-
function Ar(t) {
|
|
1350
|
-
return function() {
|
|
1351
|
-
return xe(xe.apply(null, arguments), $n());
|
|
1352
|
-
};
|
|
1353
|
-
}
|
|
1354
|
-
function ft(t) {
|
|
1355
|
-
return t ? wn(t) ? t : [t] : [];
|
|
1356
|
-
}
|
|
1357
|
-
function Or(t, e, r) {
|
|
1358
|
-
t === void 0 && (t = {});
|
|
1359
|
-
var n, i, s = be();
|
|
1360
|
-
return e && (Me[s] = (n = e, i = (function(a) {
|
|
1361
|
-
for (var o, u = a || Array.prototype.slice.call(arguments), l = 0; l < u.length; l++) if (Z(u[l])) {
|
|
1362
|
-
o = u[l];
|
|
1363
|
-
break;
|
|
1364
|
-
}
|
|
1365
|
-
return o;
|
|
1366
|
-
})(r), function(a) {
|
|
1367
|
-
i && i(a), n(a);
|
|
1368
|
-
})), N({}, t, { rid: s, ts: (/* @__PURE__ */ new Date()).getTime() }, e ? { hasCallback: !0 } : {});
|
|
1369
|
-
}
|
|
1370
|
-
function Ca(t) {
|
|
1371
|
-
t === void 0 && (t = {});
|
|
1372
|
-
var e = t.reducers || {}, r = t.initialUser || {}, n = (t.plugins || []).reduce(function(c, h) {
|
|
1373
|
-
if (Z(h)) return c.middlewares = c.middlewares.concat(h), c;
|
|
1374
|
-
if (h.NAMESPACE && (h.name = h.NAMESPACE), !h.name) throw new Error("https://lytics.dev/errors/1");
|
|
1375
|
-
h.config || (h.config = {});
|
|
1376
|
-
var P = h.EVENTS ? Object.keys(h.EVENTS).map(function(D) {
|
|
1377
|
-
return h.EVENTS[D];
|
|
1378
|
-
}) : [];
|
|
1379
|
-
c.pluginEnabled[h.name] = !(h.enabled === !1 || h.config.enabled === !1), delete h.enabled, h.methods && (c.methods[h.name] = Object.keys(h.methods).reduce(function(D, B) {
|
|
1380
|
-
var H;
|
|
1381
|
-
return D[B] = (H = h.methods[B], function() {
|
|
1382
|
-
for (var G = Array.prototype.slice.call(arguments), L = new Array(H.length), ne = 0; ne < G.length; ne++) L[ne] = G[ne];
|
|
1383
|
-
return L[L.length] = m, H.apply({ instance: m }, L);
|
|
1384
|
-
}), D;
|
|
1385
|
-
}, {}), delete h.methods);
|
|
1386
|
-
var M = Object.keys(h).concat(P), U = new Set(c.events.concat(M));
|
|
1387
|
-
if (c.events = Array.from(U), c.pluginsArray = c.pluginsArray.concat(h), c.plugins[h.name]) throw new Error(h.name + "AlreadyLoaded");
|
|
1388
|
-
return c.plugins[h.name] = h, c.plugins[h.name].loaded || (c.plugins[h.name].loaded = function() {
|
|
1389
|
-
return !0;
|
|
1390
|
-
}), c;
|
|
1391
|
-
}, { plugins: {}, pluginEnabled: {}, methods: {}, pluginsArray: [], middlewares: [], events: [] }), i = t.storage ? t.storage : { getItem: fe, setItem: de, removeItem: Te }, s = /* @__PURE__ */ (function(c) {
|
|
1392
|
-
return function(h, P, M) {
|
|
1393
|
-
return P.getState("user")[h] || (M && J(M) && M[h] ? M[h] : dr(c)[h] || fe(Mt(h)) || null);
|
|
1394
|
-
};
|
|
1395
|
-
})(i), a = n.plugins, o = n.events.filter(function(c) {
|
|
1396
|
-
return !Nt.includes(c);
|
|
1397
|
-
}).sort(), u = new Set(o.concat(Ke).filter(function(c) {
|
|
1398
|
-
return !Nt.includes(c);
|
|
1399
|
-
})), l = Array.from(u).sort(), f = function() {
|
|
1400
|
-
return a;
|
|
1401
|
-
}, p = new wa(), g = p.addMiddleware, b = p.removeMiddleware, S = p.dynamicMiddlewares, I = function() {
|
|
1402
|
-
throw new Error("Abort disabled inListener");
|
|
1403
|
-
}, w = ua(), y = dr(i), d = N({}, y, r, w.an_uid ? { userId: w.an_uid } : {}, w.an_aid ? { anonymousId: w.an_aid } : {});
|
|
1404
|
-
d.anonymousId || (d.anonymousId = be());
|
|
1405
|
-
var E = N({ enable: function(c, h) {
|
|
1406
|
-
return new Promise(function(P) {
|
|
1407
|
-
O.dispatch({ type: j.enablePlugin, plugins: ft(c), _: { originalAction: j.enablePlugin } }, P, [h]);
|
|
1408
|
-
});
|
|
1409
|
-
}, disable: function(c, h) {
|
|
1410
|
-
return new Promise(function(P) {
|
|
1411
|
-
O.dispatch({ type: j.disablePlugin, plugins: ft(c), _: { originalAction: j.disablePlugin } }, P, [h]);
|
|
1412
|
-
});
|
|
1413
|
-
} }, n.methods), v = !1, m = { identify: function(c, h, P, M) {
|
|
1414
|
-
try {
|
|
1415
|
-
var U = ce(c) ? c : null, D = J(c) ? c : h, B = P || {}, H = m.user();
|
|
1416
|
-
de(Mt(oe), U);
|
|
1417
|
-
var G = U || D.userId || s(oe, m, D);
|
|
1418
|
-
return Promise.resolve(new Promise(function(L) {
|
|
1419
|
-
O.dispatch(N({ type: j.identifyStart, userId: G, traits: D || {}, options: B, anonymousId: H.anonymousId }, H.id && H.id !== U && { previousId: H.id }), L, [h, P, M]);
|
|
1420
|
-
}));
|
|
1421
|
-
} catch (L) {
|
|
1422
|
-
return Promise.reject(L);
|
|
1423
|
-
}
|
|
1424
|
-
}, track: function(c, h, P, M) {
|
|
1425
|
-
try {
|
|
1426
|
-
var U = J(c) ? c.event : c;
|
|
1427
|
-
if (!U || !ce(U)) throw new Error("EventMissing");
|
|
1428
|
-
var D = J(c) ? c : h || {}, B = J(P) ? P : {};
|
|
1429
|
-
return Promise.resolve(new Promise(function(H) {
|
|
1430
|
-
O.dispatch({ type: j.trackStart, event: U, properties: D, options: B, userId: s(oe, m, h), anonymousId: s(Se, m, h) }, H, [h, P, M]);
|
|
1431
|
-
}));
|
|
1432
|
-
} catch (H) {
|
|
1433
|
-
return Promise.reject(H);
|
|
1434
|
-
}
|
|
1435
|
-
}, page: function(c, h, P) {
|
|
1436
|
-
try {
|
|
1437
|
-
var M = J(c) ? c : {}, U = J(h) ? h : {};
|
|
1438
|
-
return Promise.resolve(new Promise(function(D) {
|
|
1439
|
-
O.dispatch({ type: j.pageStart, properties: xa(M), options: U, userId: s(oe, m, M), anonymousId: s(Se, m, M) }, D, [c, h, P]);
|
|
1440
|
-
}));
|
|
1441
|
-
} catch (D) {
|
|
1442
|
-
return Promise.reject(D);
|
|
1443
|
-
}
|
|
1444
|
-
}, user: function(c) {
|
|
1445
|
-
if (c === oe || c === "id") return s(oe, m);
|
|
1446
|
-
if (c === Se || c === "anonId") return s(Se, m);
|
|
1447
|
-
var h = m.getState("user");
|
|
1448
|
-
return c ? sr(h, c) : h;
|
|
1449
|
-
}, reset: function(c) {
|
|
1450
|
-
return new Promise(function(h) {
|
|
1451
|
-
O.dispatch({ type: j.resetStart }, h, c);
|
|
1452
|
-
});
|
|
1453
|
-
}, ready: function(c) {
|
|
1454
|
-
return v && c({ plugins: E, instance: m }), m.on(j.ready, function(h) {
|
|
1455
|
-
c && c(h), v = !0;
|
|
1456
|
-
});
|
|
1457
|
-
}, on: function(c, h) {
|
|
1458
|
-
if (!c || !Z(h)) return !1;
|
|
1459
|
-
if (c === j.bootstrap) throw new Error(".on disabled for " + c);
|
|
1460
|
-
var P = /Start$|Start:/;
|
|
1461
|
-
if (c === "*") {
|
|
1462
|
-
var M = function(H) {
|
|
1463
|
-
return function(G) {
|
|
1464
|
-
return function(L) {
|
|
1465
|
-
return L.type.match(P) && h({ payload: L, instance: m, plugins: a }), G(L);
|
|
1466
|
-
};
|
|
1467
|
-
};
|
|
1468
|
-
}, U = function(H) {
|
|
1469
|
-
return function(G) {
|
|
1470
|
-
return function(L) {
|
|
1471
|
-
return L.type.match(P) || h({ payload: L, instance: m, plugins: a }), G(L);
|
|
1472
|
-
};
|
|
1473
|
-
};
|
|
1474
|
-
};
|
|
1475
|
-
return g(M, Le), g(U, We), function() {
|
|
1476
|
-
b(M, Le), b(U, We);
|
|
1477
|
-
};
|
|
1478
|
-
}
|
|
1479
|
-
var D = c.match(P) ? Le : We, B = function(H) {
|
|
1480
|
-
return function(G) {
|
|
1481
|
-
return function(L) {
|
|
1482
|
-
return L.type === c && h({ payload: L, instance: m, plugins: a, abort: I }), G(L);
|
|
1483
|
-
};
|
|
1484
|
-
};
|
|
1485
|
-
};
|
|
1486
|
-
return g(B, D), function() {
|
|
1487
|
-
return b(B, D);
|
|
1488
|
-
};
|
|
1489
|
-
}, once: function(c, h) {
|
|
1490
|
-
if (!c || !Z(h)) return !1;
|
|
1491
|
-
if (c === j.bootstrap) throw new Error(".once disabled for " + c);
|
|
1492
|
-
var P = m.on(c, function(M) {
|
|
1493
|
-
h({ payload: M.payload, instance: m, plugins: a, abort: I }), P();
|
|
1494
|
-
});
|
|
1495
|
-
return P;
|
|
1496
|
-
}, getState: function(c) {
|
|
1497
|
-
var h = O.getState();
|
|
1498
|
-
return c ? sr(h, c) : Object.assign({}, h);
|
|
1499
|
-
}, dispatch: function(c) {
|
|
1500
|
-
var h = ce(c) ? { type: c } : c;
|
|
1501
|
-
if (Ke.includes(h.type)) throw new Error("reserved action " + h.type);
|
|
1502
|
-
var P = N({}, h, { _: N({ originalAction: h.type }, c._ || {}) });
|
|
1503
|
-
O.dispatch(P);
|
|
1504
|
-
}, enablePlugin: E.enable, disablePlugin: E.disable, plugins: E, storage: { getItem: i.getItem, setItem: function(c, h, P) {
|
|
1505
|
-
O.dispatch({ type: j.setItemStart, key: c, value: h, options: P });
|
|
1506
|
-
}, removeItem: function(c, h) {
|
|
1507
|
-
O.dispatch({ type: j.removeItemStart, key: c, options: h });
|
|
1508
|
-
} }, setAnonymousId: function(c, h) {
|
|
1509
|
-
m.storage.setItem(le, c, h);
|
|
1510
|
-
}, events: { core: Ke, plugins: o } }, T = n.middlewares.concat([function(c) {
|
|
1511
|
-
return function(h) {
|
|
1512
|
-
return function(P) {
|
|
1513
|
-
return P.meta || (P.meta = Or()), h(P);
|
|
1514
|
-
};
|
|
1515
|
-
};
|
|
1516
|
-
}, S(Le), ya(m, f, { all: l, plugins: o }), ba(i), pa(m), ha(m), S(We)]), x = { context: ja, user: ga(i), page: ka, track: Ia, plugins: Sa(f), queue: Oa }, A = xe, $ = xe;
|
|
1517
|
-
if (Q && t.debug) {
|
|
1518
|
-
var k = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;
|
|
1519
|
-
k && (A = k({ trace: !0, traceLimit: 25 })), $ = function() {
|
|
1520
|
-
return arguments.length === 0 ? $n() : J(typeof arguments[0]) ? Ar() : Ar().apply(null, arguments);
|
|
1521
|
-
};
|
|
1522
|
-
}
|
|
1523
|
-
var _, z = (function(c) {
|
|
1524
|
-
return Object.keys(c).reduce(function(h, P) {
|
|
1525
|
-
return Na.includes(P) || (h[P] = c[P]), h;
|
|
1526
|
-
}, {});
|
|
1527
|
-
})(t), V = n.pluginsArray.reduce(function(c, h) {
|
|
1528
|
-
var P = h.name, M = h.config, U = h.loaded, D = n.pluginEnabled[P];
|
|
1529
|
-
return c[P] = { enabled: D, initialized: !!D && !h.initialize, loaded: !!U({ config: M }), config: M }, c;
|
|
1530
|
-
}, {}), C = { context: z, user: d, plugins: V }, O = In((function(c) {
|
|
1531
|
-
for (var h = Object.keys(c), P = {}, M = 0; M < h.length; M++) {
|
|
1532
|
-
var U = h[M];
|
|
1533
|
-
typeof c[U] === ue && (P[U] = c[U]);
|
|
1534
|
-
}
|
|
1535
|
-
var D, B = Object.keys(P);
|
|
1536
|
-
try {
|
|
1537
|
-
(function(H) {
|
|
1538
|
-
Object.keys(H).forEach(function(G) {
|
|
1539
|
-
var L = H[G];
|
|
1540
|
-
if (typeof L(void 0, { type: kt }) === ie || typeof L(void 0, { type: la }) === ie) throw new Error(Ce + " " + G + " " + ie);
|
|
1541
|
-
});
|
|
1542
|
-
})(P);
|
|
1543
|
-
} catch (H) {
|
|
1544
|
-
D = H;
|
|
1545
|
-
}
|
|
1546
|
-
return function(H, G) {
|
|
1547
|
-
if (H === void 0 && (H = {}), D) throw D;
|
|
1548
|
-
for (var L = !1, ne = {}, at = 0; at < B.length; at++) {
|
|
1549
|
-
var Ue = B[at], ir = H[Ue], st = (0, P[Ue])(ir, G);
|
|
1550
|
-
if (typeof st === ie) {
|
|
1551
|
-
var ni = fa(Ue, G);
|
|
1552
|
-
throw new Error(ni);
|
|
1553
|
-
}
|
|
1554
|
-
ne[Ue] = st, L = L || st !== ir;
|
|
1555
|
-
}
|
|
1556
|
-
return L ? ne : H;
|
|
1557
|
-
};
|
|
1558
|
-
})(N({}, x, e)), C, $(A(da.apply(void 0, T))));
|
|
1559
|
-
O.dispatch = (_ = O.dispatch, function(c, h, P) {
|
|
1560
|
-
var M = N({}, c, { meta: Or(c.meta, h, ft(P)) });
|
|
1561
|
-
return _.apply(null, [M]);
|
|
1562
|
-
});
|
|
1563
|
-
var W = Object.keys(a);
|
|
1564
|
-
O.dispatch({ type: j.bootstrap, plugins: W, config: z, params: w, user: d, initialUser: r, persistedUser: y });
|
|
1565
|
-
var R = W.filter(function(c) {
|
|
1566
|
-
return n.pluginEnabled[c];
|
|
1567
|
-
}), q = W.filter(function(c) {
|
|
1568
|
-
return !n.pluginEnabled[c];
|
|
1569
|
-
});
|
|
1570
|
-
return O.dispatch({ type: j.registerPlugins, plugins: W, enabled: n.pluginEnabled }), n.pluginsArray.map(function(c, h) {
|
|
1571
|
-
var P = c.bootstrap, M = c.config, U = c.name;
|
|
1572
|
-
P && Z(P) && P({ instance: m, config: M, payload: c }), O.dispatch({ type: j.registerPluginType(U), name: U, enabled: n.pluginEnabled[U], plugin: c }), n.pluginsArray.length === h + 1 && O.dispatch({ type: j.initializeStart, plugins: R, disabled: q });
|
|
1573
|
-
}), $a(function(c) {
|
|
1574
|
-
O.dispatch({ type: c ? j.offline : j.online });
|
|
1575
|
-
}), (function(c, h, P) {
|
|
1576
|
-
setInterval(function() {
|
|
1577
|
-
return On(c, h, P);
|
|
1578
|
-
}, 3e3);
|
|
1579
|
-
})(O, f, m), m;
|
|
1580
|
-
}
|
|
1581
|
-
var Le = "before", We = "after", me = "cookie", pe = Dn(), qt = Ze, Cn = Ze;
|
|
1582
|
-
function _n(t) {
|
|
1583
|
-
return pe ? Ze(t, "", -1) : Te(t);
|
|
1584
|
-
}
|
|
1585
|
-
function Dn() {
|
|
1586
|
-
if (pe !== void 0) return pe;
|
|
1587
|
-
var t = me + me;
|
|
1588
|
-
try {
|
|
1589
|
-
Ze(t, t), pe = document.cookie.indexOf(t) !== -1, _n(t);
|
|
1590
|
-
} catch {
|
|
1591
|
-
pe = !1;
|
|
1592
|
-
}
|
|
1593
|
-
return pe;
|
|
1594
|
-
}
|
|
1595
|
-
function Ze(t, e, r, n, i, s) {
|
|
1596
|
-
if (typeof window < "u") {
|
|
1597
|
-
var a = arguments.length > 1;
|
|
1598
|
-
return pe === !1 && (a ? de(t, e) : fe(t)), a ? document.cookie = t + "=" + encodeURIComponent(e) + (r ? "; expires=" + new Date(+/* @__PURE__ */ new Date() + 1e3 * r).toUTCString() + (n ? "; path=" + n : "") + (i ? "; domain=" + i : "") + (s ? "; secure" : "") : "") : decodeURIComponent((("; " + document.cookie).split("; " + t + "=")[1] || "").split(";")[0]);
|
|
1599
|
-
}
|
|
1600
|
-
}
|
|
1601
|
-
var ae = "localStorage", _a = Kt.bind(null, ae), Gt = ke(ae, "getItem", fe), Da = ke(ae, "setItem", de), Rn = ke(ae, "removeItem", Te), se = "sessionStorage", Ra = Kt.bind(null, se), Ua = ke(se, "getItem", fe), za = ke(se, "setItem", de);
|
|
1602
|
-
ke(se, "removeItem", Te);
|
|
1603
|
-
function Ae(t) {
|
|
1604
|
-
var e = t;
|
|
1605
|
-
try {
|
|
1606
|
-
if ((e = JSON.parse(t)) === "true") return !0;
|
|
1607
|
-
if (e === "false") return !1;
|
|
1608
|
-
if (J(e)) return e;
|
|
1609
|
-
parseFloat(e) === e && (e = parseFloat(e));
|
|
1610
|
-
} catch {
|
|
1611
|
-
}
|
|
1612
|
-
if (e !== null && e !== "") return e;
|
|
1613
|
-
}
|
|
1614
|
-
var Va = _a(), La = Ra(), Wa = Dn();
|
|
1615
|
-
function Un(t, e) {
|
|
1616
|
-
if (t) {
|
|
1617
|
-
var r = Ft(e), n = !Jt(r), i = Bt(r) ? Ae(localStorage.getItem(t)) : void 0;
|
|
1618
|
-
if (n && !we(i)) return i;
|
|
1619
|
-
var s = Yt(r) ? Ae(qt(t)) : void 0;
|
|
1620
|
-
if (n && s) return s;
|
|
1621
|
-
var a = Xt(r) ? Ae(sessionStorage.getItem(t)) : void 0;
|
|
1622
|
-
if (n && a) return a;
|
|
1623
|
-
var o = fe(t);
|
|
1624
|
-
return n ? o : { localStorage: i, sessionStorage: a, cookie: s, global: o };
|
|
1625
|
-
}
|
|
1626
|
-
}
|
|
1627
|
-
function Ha(t, e, r) {
|
|
1628
|
-
if (t && !we(e)) {
|
|
1629
|
-
var n = {}, i = Ft(r), s = JSON.stringify(e), a = !Jt(i);
|
|
1630
|
-
return Bt(i) && (n[ae] = He(ae, e, Ae(localStorage.getItem(t))), localStorage.setItem(t, s), a) ? n[ae] : Yt(i) && (n[me] = He(me, e, Ae(qt(t))), Cn(t, s), a) ? n[me] : Xt(i) && (n[se] = He(se, e, Ae(sessionStorage.getItem(t))), sessionStorage.setItem(t, s), a) ? n[se] : (n[ge] = He(ge, e, fe(t)), de(t, e), a ? n[ge] : n);
|
|
1631
|
-
}
|
|
1632
|
-
}
|
|
1633
|
-
function Ka(t, e) {
|
|
1634
|
-
if (t) {
|
|
1635
|
-
var r = Ft(e), n = Un(t, vn), i = {};
|
|
1636
|
-
return !we(n.localStorage) && Bt(r) && (localStorage.removeItem(t), i[ae] = n.localStorage), !we(n.cookie) && Yt(r) && (_n(t), i[me] = n.cookie), !we(n.sessionStorage) && Xt(r) && (sessionStorage.removeItem(t), i[se] = n.sessionStorage), !we(n.global) && et(r, ge) && (Te(t), i[ge] = n.global), i;
|
|
1637
|
-
}
|
|
1638
|
-
}
|
|
1639
|
-
function Ft(t) {
|
|
1640
|
-
return t ? ce(t) ? t : t.storage : mn;
|
|
1641
|
-
}
|
|
1642
|
-
function Bt(t) {
|
|
1643
|
-
return Va && et(t, ae);
|
|
1644
|
-
}
|
|
1645
|
-
function Yt(t) {
|
|
1646
|
-
return Wa && et(t, me);
|
|
1647
|
-
}
|
|
1648
|
-
function Xt(t) {
|
|
1649
|
-
return La && et(t, se);
|
|
1650
|
-
}
|
|
1651
|
-
function Jt(t) {
|
|
1652
|
-
return t === vn || t === "all";
|
|
1653
|
-
}
|
|
1654
|
-
function et(t, e) {
|
|
1655
|
-
return t === mn || t === e || Jt(t);
|
|
1656
|
-
}
|
|
1657
|
-
function He(t, e, r) {
|
|
1658
|
-
return { location: t, current: e, previous: r };
|
|
1659
|
-
}
|
|
1660
|
-
var qa = { setItem: Ha, getItem: Un, removeItem: Ka };
|
|
1661
|
-
function Ga(t, e, r) {
|
|
1662
|
-
return e in t ? Object.defineProperty(t, e, {
|
|
1663
|
-
value: r,
|
|
1664
|
-
enumerable: !0,
|
|
1665
|
-
configurable: !0,
|
|
1666
|
-
writable: !0
|
|
1667
|
-
}) : t[e] = r, t;
|
|
1668
|
-
}
|
|
1669
|
-
function Pr(t, e) {
|
|
1670
|
-
var r = Object.keys(t);
|
|
1671
|
-
if (Object.getOwnPropertySymbols) {
|
|
1672
|
-
var n = Object.getOwnPropertySymbols(t);
|
|
1673
|
-
e && (n = n.filter(function(i) {
|
|
1674
|
-
return Object.getOwnPropertyDescriptor(t, i).enumerable;
|
|
1675
|
-
})), r.push.apply(r, n);
|
|
1676
|
-
}
|
|
1677
|
-
return r;
|
|
1678
|
-
}
|
|
1679
|
-
function xr(t) {
|
|
1680
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
1681
|
-
var r = arguments[e] != null ? arguments[e] : {};
|
|
1682
|
-
e % 2 ? Pr(Object(r), !0).forEach(function(n) {
|
|
1683
|
-
Ga(t, n, r[n]);
|
|
1684
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Pr(Object(r)).forEach(function(n) {
|
|
1685
|
-
Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n));
|
|
1686
|
-
});
|
|
1687
|
-
}
|
|
1688
|
-
return t;
|
|
1689
|
-
}
|
|
1690
|
-
function Fa() {
|
|
1691
|
-
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = {
|
|
1692
|
-
storage: qa
|
|
1693
|
-
};
|
|
1694
|
-
return Ca(xr(xr({}, e), t));
|
|
1695
|
-
}
|
|
1696
|
-
function ee(t) {
|
|
1697
|
-
"@babel/helpers - typeof";
|
|
1698
|
-
return ee = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
1699
|
-
return typeof e;
|
|
1700
|
-
} : function(e) {
|
|
1701
|
-
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
1702
|
-
}, ee(t);
|
|
1703
|
-
}
|
|
1704
|
-
function Ba(t, e) {
|
|
1705
|
-
if (ee(t) != "object" || !t) return t;
|
|
1706
|
-
var r = t[Symbol.toPrimitive];
|
|
1707
|
-
if (r !== void 0) {
|
|
1708
|
-
var n = r.call(t, e);
|
|
1709
|
-
if (ee(n) != "object") return n;
|
|
1710
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1711
|
-
}
|
|
1712
|
-
return (e === "string" ? String : Number)(t);
|
|
1713
|
-
}
|
|
1714
|
-
function Ya(t) {
|
|
1715
|
-
var e = Ba(t, "string");
|
|
1716
|
-
return ee(e) == "symbol" ? e : e + "";
|
|
1717
|
-
}
|
|
1718
|
-
function Qt(t, e, r) {
|
|
1719
|
-
return (e = Ya(e)) in t ? Object.defineProperty(t, e, {
|
|
1720
|
-
value: r,
|
|
1721
|
-
enumerable: !0,
|
|
1722
|
-
configurable: !0,
|
|
1723
|
-
writable: !0
|
|
1724
|
-
}) : t[e] = r, t;
|
|
1725
|
-
}
|
|
1726
|
-
function Tr(t, e) {
|
|
1727
|
-
var r = Object.keys(t);
|
|
1728
|
-
if (Object.getOwnPropertySymbols) {
|
|
1729
|
-
var n = Object.getOwnPropertySymbols(t);
|
|
1730
|
-
e && (n = n.filter(function(i) {
|
|
1731
|
-
return Object.getOwnPropertyDescriptor(t, i).enumerable;
|
|
1732
|
-
})), r.push.apply(r, n);
|
|
1733
|
-
}
|
|
1734
|
-
return r;
|
|
1735
|
-
}
|
|
1736
|
-
function F(t) {
|
|
1737
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
1738
|
-
var r = arguments[e] != null ? arguments[e] : {};
|
|
1739
|
-
e % 2 ? Tr(Object(r), !0).forEach(function(n) {
|
|
1740
|
-
Qt(t, n, r[n]);
|
|
1741
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Tr(Object(r)).forEach(function(n) {
|
|
1742
|
-
Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n));
|
|
1743
|
-
});
|
|
1744
|
-
}
|
|
1745
|
-
return t;
|
|
1746
|
-
}
|
|
1747
|
-
var dt = { exports: {} }, pt = { exports: {} }, kr;
|
|
1748
|
-
function zn() {
|
|
1749
|
-
return kr || (kr = 1, (function(t) {
|
|
1750
|
-
function e(r, n) {
|
|
1751
|
-
this.v = r, this.k = n;
|
|
1752
|
-
}
|
|
1753
|
-
t.exports = e, t.exports.__esModule = !0, t.exports.default = t.exports;
|
|
1754
|
-
})(pt)), pt.exports;
|
|
1755
|
-
}
|
|
1756
|
-
var gt = { exports: {} }, ht = { exports: {} }, jr;
|
|
1757
|
-
function Vn() {
|
|
1758
|
-
return jr || (jr = 1, (function(t) {
|
|
1759
|
-
function e(r, n, i, s) {
|
|
1760
|
-
var a = Object.defineProperty;
|
|
1761
|
-
try {
|
|
1762
|
-
a({}, "", {});
|
|
1763
|
-
} catch {
|
|
1764
|
-
a = 0;
|
|
1765
|
-
}
|
|
1766
|
-
t.exports = e = function(u, l, f, p) {
|
|
1767
|
-
function g(b, S) {
|
|
1768
|
-
e(u, b, function(I) {
|
|
1769
|
-
return this._invoke(b, S, I);
|
|
1770
|
-
});
|
|
1771
|
-
}
|
|
1772
|
-
l ? a ? a(u, l, {
|
|
1773
|
-
value: f,
|
|
1774
|
-
enumerable: !p,
|
|
1775
|
-
configurable: !p,
|
|
1776
|
-
writable: !p
|
|
1777
|
-
}) : u[l] = f : (g("next", 0), g("throw", 1), g("return", 2));
|
|
1778
|
-
}, t.exports.__esModule = !0, t.exports.default = t.exports, e(r, n, i, s);
|
|
1779
|
-
}
|
|
1780
|
-
t.exports = e, t.exports.__esModule = !0, t.exports.default = t.exports;
|
|
1781
|
-
})(ht)), ht.exports;
|
|
1782
|
-
}
|
|
1783
|
-
var Nr;
|
|
1784
|
-
function Ln() {
|
|
1785
|
-
return Nr || (Nr = 1, (function(t) {
|
|
1786
|
-
var e = Vn();
|
|
1787
|
-
function r() {
|
|
1788
|
-
var n, i, s = typeof Symbol == "function" ? Symbol : {}, a = s.iterator || "@@iterator", o = s.toStringTag || "@@toStringTag";
|
|
1789
|
-
function u(w, y, d, E) {
|
|
1790
|
-
var v = y && y.prototype instanceof f ? y : f, m = Object.create(v.prototype);
|
|
1791
|
-
return e(m, "_invoke", (function(T, x, A) {
|
|
1792
|
-
var $, k, _, z = 0, V = A || [], C = !1, O = {
|
|
1793
|
-
p: 0,
|
|
1794
|
-
n: 0,
|
|
1795
|
-
v: n,
|
|
1796
|
-
a: W,
|
|
1797
|
-
f: W.bind(n, 4),
|
|
1798
|
-
d: function(q, c) {
|
|
1799
|
-
return $ = q, k = 0, _ = n, O.n = c, l;
|
|
1800
|
-
}
|
|
1801
|
-
};
|
|
1802
|
-
function W(R, q) {
|
|
1803
|
-
for (k = R, _ = q, i = 0; !C && z && !c && i < V.length; i++) {
|
|
1804
|
-
var c, h = V[i], P = O.p, M = h[2];
|
|
1805
|
-
R > 3 ? (c = M === q) && (_ = h[(k = h[4]) ? 5 : (k = 3, 3)], h[4] = h[5] = n) : h[0] <= P && ((c = R < 2 && P < h[1]) ? (k = 0, O.v = q, O.n = h[1]) : P < M && (c = R < 3 || h[0] > q || q > M) && (h[4] = R, h[5] = q, O.n = M, k = 0));
|
|
1806
|
-
}
|
|
1807
|
-
if (c || R > 1) return l;
|
|
1808
|
-
throw C = !0, q;
|
|
1809
|
-
}
|
|
1810
|
-
return function(R, q, c) {
|
|
1811
|
-
if (z > 1) throw TypeError("Generator is already running");
|
|
1812
|
-
for (C && q === 1 && W(q, c), k = q, _ = c; (i = k < 2 ? n : _) || !C; ) {
|
|
1813
|
-
$ || (k ? k < 3 ? (k > 1 && (O.n = -1), W(k, _)) : O.n = _ : O.v = _);
|
|
1814
|
-
try {
|
|
1815
|
-
if (z = 2, $) {
|
|
1816
|
-
if (k || (R = "next"), i = $[R]) {
|
|
1817
|
-
if (!(i = i.call($, _))) throw TypeError("iterator result is not an object");
|
|
1818
|
-
if (!i.done) return i;
|
|
1819
|
-
_ = i.value, k < 2 && (k = 0);
|
|
1820
|
-
} else k === 1 && (i = $.return) && i.call($), k < 2 && (_ = TypeError("The iterator does not provide a '" + R + "' method"), k = 1);
|
|
1821
|
-
$ = n;
|
|
1822
|
-
} else if ((i = (C = O.n < 0) ? _ : T.call(x, O)) !== l) break;
|
|
1823
|
-
} catch (h) {
|
|
1824
|
-
$ = n, k = 1, _ = h;
|
|
1825
|
-
} finally {
|
|
1826
|
-
z = 1;
|
|
1827
|
-
}
|
|
1828
|
-
}
|
|
1829
|
-
return {
|
|
1830
|
-
value: i,
|
|
1831
|
-
done: C
|
|
1832
|
-
};
|
|
1833
|
-
};
|
|
1834
|
-
})(w, d, E), !0), m;
|
|
1835
|
-
}
|
|
1836
|
-
var l = {};
|
|
1837
|
-
function f() {
|
|
1838
|
-
}
|
|
1839
|
-
function p() {
|
|
1840
|
-
}
|
|
1841
|
-
function g() {
|
|
1842
|
-
}
|
|
1843
|
-
i = Object.getPrototypeOf;
|
|
1844
|
-
var b = [][a] ? i(i([][a]())) : (e(i = {}, a, function() {
|
|
1845
|
-
return this;
|
|
1846
|
-
}), i), S = g.prototype = f.prototype = Object.create(b);
|
|
1847
|
-
function I(w) {
|
|
1848
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(w, g) : (w.__proto__ = g, e(w, o, "GeneratorFunction")), w.prototype = Object.create(S), w;
|
|
1849
|
-
}
|
|
1850
|
-
return p.prototype = g, e(S, "constructor", g), e(g, "constructor", p), p.displayName = "GeneratorFunction", e(g, o, "GeneratorFunction"), e(S), e(S, o, "Generator"), e(S, a, function() {
|
|
1851
|
-
return this;
|
|
1852
|
-
}), e(S, "toString", function() {
|
|
1853
|
-
return "[object Generator]";
|
|
1854
|
-
}), (t.exports = r = function() {
|
|
1855
|
-
return {
|
|
1856
|
-
w: u,
|
|
1857
|
-
m: I
|
|
1858
|
-
};
|
|
1859
|
-
}, t.exports.__esModule = !0, t.exports.default = t.exports)();
|
|
1860
|
-
}
|
|
1861
|
-
t.exports = r, t.exports.__esModule = !0, t.exports.default = t.exports;
|
|
1862
|
-
})(gt)), gt.exports;
|
|
1863
|
-
}
|
|
1864
|
-
var mt = { exports: {} }, vt = { exports: {} }, yt = { exports: {} }, Mr;
|
|
1865
|
-
function Wn() {
|
|
1866
|
-
return Mr || (Mr = 1, (function(t) {
|
|
1867
|
-
var e = zn(), r = Vn();
|
|
1868
|
-
function n(i, s) {
|
|
1869
|
-
function a(u, l, f, p) {
|
|
1870
|
-
try {
|
|
1871
|
-
var g = i[u](l), b = g.value;
|
|
1872
|
-
return b instanceof e ? s.resolve(b.v).then(function(S) {
|
|
1873
|
-
a("next", S, f, p);
|
|
1874
|
-
}, function(S) {
|
|
1875
|
-
a("throw", S, f, p);
|
|
1876
|
-
}) : s.resolve(b).then(function(S) {
|
|
1877
|
-
g.value = S, f(g);
|
|
1878
|
-
}, function(S) {
|
|
1879
|
-
return a("throw", S, f, p);
|
|
1880
|
-
});
|
|
1881
|
-
} catch (S) {
|
|
1882
|
-
p(S);
|
|
1883
|
-
}
|
|
1884
|
-
}
|
|
1885
|
-
var o;
|
|
1886
|
-
this.next || (r(n.prototype), r(n.prototype, typeof Symbol == "function" && Symbol.asyncIterator || "@asyncIterator", function() {
|
|
1887
|
-
return this;
|
|
1888
|
-
})), r(this, "_invoke", function(u, l, f) {
|
|
1889
|
-
function p() {
|
|
1890
|
-
return new s(function(g, b) {
|
|
1891
|
-
a(u, f, g, b);
|
|
1892
|
-
});
|
|
1893
|
-
}
|
|
1894
|
-
return o = o ? o.then(p, p) : p();
|
|
1895
|
-
}, !0);
|
|
1896
|
-
}
|
|
1897
|
-
t.exports = n, t.exports.__esModule = !0, t.exports.default = t.exports;
|
|
1898
|
-
})(yt)), yt.exports;
|
|
1899
|
-
}
|
|
1900
|
-
var $r;
|
|
1901
|
-
function Hn() {
|
|
1902
|
-
return $r || ($r = 1, (function(t) {
|
|
1903
|
-
var e = Ln(), r = Wn();
|
|
1904
|
-
function n(i, s, a, o, u) {
|
|
1905
|
-
return new r(e().w(i, s, a, o), u || Promise);
|
|
1906
|
-
}
|
|
1907
|
-
t.exports = n, t.exports.__esModule = !0, t.exports.default = t.exports;
|
|
1908
|
-
})(vt)), vt.exports;
|
|
1909
|
-
}
|
|
1910
|
-
var Cr;
|
|
1911
|
-
function Xa() {
|
|
1912
|
-
return Cr || (Cr = 1, (function(t) {
|
|
1913
|
-
var e = Hn();
|
|
1914
|
-
function r(n, i, s, a, o) {
|
|
1915
|
-
var u = e(n, i, s, a, o);
|
|
1916
|
-
return u.next().then(function(l) {
|
|
1917
|
-
return l.done ? l.value : u.next();
|
|
1918
|
-
});
|
|
1919
|
-
}
|
|
1920
|
-
t.exports = r, t.exports.__esModule = !0, t.exports.default = t.exports;
|
|
1921
|
-
})(mt)), mt.exports;
|
|
1922
|
-
}
|
|
1923
|
-
var bt = { exports: {} }, _r;
|
|
1924
|
-
function Ja() {
|
|
1925
|
-
return _r || (_r = 1, (function(t) {
|
|
1926
|
-
function e(r) {
|
|
1927
|
-
var n = Object(r), i = [];
|
|
1928
|
-
for (var s in n) i.unshift(s);
|
|
1929
|
-
return function a() {
|
|
1930
|
-
for (; i.length; ) if ((s = i.pop()) in n) return a.value = s, a.done = !1, a;
|
|
1931
|
-
return a.done = !0, a;
|
|
1932
|
-
};
|
|
1933
|
-
}
|
|
1934
|
-
t.exports = e, t.exports.__esModule = !0, t.exports.default = t.exports;
|
|
1935
|
-
})(bt)), bt.exports;
|
|
1936
|
-
}
|
|
1937
|
-
var wt = { exports: {} }, St = { exports: {} }, Dr;
|
|
1938
|
-
function Qa() {
|
|
1939
|
-
return Dr || (Dr = 1, (function(t) {
|
|
1940
|
-
function e(r) {
|
|
1941
|
-
"@babel/helpers - typeof";
|
|
1942
|
-
return t.exports = e = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(n) {
|
|
1943
|
-
return typeof n;
|
|
1944
|
-
} : function(n) {
|
|
1945
|
-
return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
|
|
1946
|
-
}, t.exports.__esModule = !0, t.exports.default = t.exports, e(r);
|
|
1947
|
-
}
|
|
1948
|
-
t.exports = e, t.exports.__esModule = !0, t.exports.default = t.exports;
|
|
1949
|
-
})(St)), St.exports;
|
|
1950
|
-
}
|
|
1951
|
-
var Rr;
|
|
1952
|
-
function Za() {
|
|
1953
|
-
return Rr || (Rr = 1, (function(t) {
|
|
1954
|
-
var e = Qa().default;
|
|
1955
|
-
function r(n) {
|
|
1956
|
-
if (n != null) {
|
|
1957
|
-
var i = n[typeof Symbol == "function" && Symbol.iterator || "@@iterator"], s = 0;
|
|
1958
|
-
if (i) return i.call(n);
|
|
1959
|
-
if (typeof n.next == "function") return n;
|
|
1960
|
-
if (!isNaN(n.length)) return {
|
|
1961
|
-
next: function() {
|
|
1962
|
-
return n && s >= n.length && (n = void 0), {
|
|
1963
|
-
value: n && n[s++],
|
|
1964
|
-
done: !n
|
|
1965
|
-
};
|
|
1966
|
-
}
|
|
1967
|
-
};
|
|
1968
|
-
}
|
|
1969
|
-
throw new TypeError(e(n) + " is not iterable");
|
|
1970
|
-
}
|
|
1971
|
-
t.exports = r, t.exports.__esModule = !0, t.exports.default = t.exports;
|
|
1972
|
-
})(wt)), wt.exports;
|
|
1973
|
-
}
|
|
1974
|
-
var Ur;
|
|
1975
|
-
function es() {
|
|
1976
|
-
return Ur || (Ur = 1, (function(t) {
|
|
1977
|
-
var e = zn(), r = Ln(), n = Xa(), i = Hn(), s = Wn(), a = Ja(), o = Za();
|
|
1978
|
-
function u() {
|
|
1979
|
-
var l = r(), f = l.m(u), p = (Object.getPrototypeOf ? Object.getPrototypeOf(f) : f.__proto__).constructor;
|
|
1980
|
-
function g(I) {
|
|
1981
|
-
var w = typeof I == "function" && I.constructor;
|
|
1982
|
-
return !!w && (w === p || (w.displayName || w.name) === "GeneratorFunction");
|
|
1983
|
-
}
|
|
1984
|
-
var b = {
|
|
1985
|
-
throw: 1,
|
|
1986
|
-
return: 2,
|
|
1987
|
-
break: 3,
|
|
1988
|
-
continue: 3
|
|
1989
|
-
};
|
|
1990
|
-
function S(I) {
|
|
1991
|
-
var w, y;
|
|
1992
|
-
return function(d) {
|
|
1993
|
-
w || (w = {
|
|
1994
|
-
stop: function() {
|
|
1995
|
-
return y(d.a, 2);
|
|
1996
|
-
},
|
|
1997
|
-
catch: function() {
|
|
1998
|
-
return d.v;
|
|
1999
|
-
},
|
|
2000
|
-
abrupt: function(v, m) {
|
|
2001
|
-
return y(d.a, b[v], m);
|
|
2002
|
-
},
|
|
2003
|
-
delegateYield: function(v, m, T) {
|
|
2004
|
-
return w.resultName = m, y(d.d, o(v), T);
|
|
2005
|
-
},
|
|
2006
|
-
finish: function(v) {
|
|
2007
|
-
return y(d.f, v);
|
|
2008
|
-
}
|
|
2009
|
-
}, y = function(v, m, T) {
|
|
2010
|
-
d.p = w.prev, d.n = w.next;
|
|
2011
|
-
try {
|
|
2012
|
-
return v(m, T);
|
|
2013
|
-
} finally {
|
|
2014
|
-
w.next = d.n;
|
|
2015
|
-
}
|
|
2016
|
-
}), w.resultName && (w[w.resultName] = d.v, w.resultName = void 0), w.sent = d.v, w.next = d.n;
|
|
2017
|
-
try {
|
|
2018
|
-
return I.call(this, w);
|
|
2019
|
-
} finally {
|
|
2020
|
-
d.p = w.prev, d.n = w.next;
|
|
2021
|
-
}
|
|
2022
|
-
};
|
|
2023
|
-
}
|
|
2024
|
-
return (t.exports = u = function() {
|
|
2025
|
-
return {
|
|
2026
|
-
wrap: function(y, d, E, v) {
|
|
2027
|
-
return l.w(S(y), d, E, v && v.reverse());
|
|
2028
|
-
},
|
|
2029
|
-
isGeneratorFunction: g,
|
|
2030
|
-
mark: l.m,
|
|
2031
|
-
awrap: function(y, d) {
|
|
2032
|
-
return new e(y, d);
|
|
2033
|
-
},
|
|
2034
|
-
AsyncIterator: s,
|
|
2035
|
-
async: function(y, d, E, v, m) {
|
|
2036
|
-
return (g(d) ? i : n)(S(y), d, E, v, m);
|
|
2037
|
-
},
|
|
2038
|
-
keys: a,
|
|
2039
|
-
values: o
|
|
2040
|
-
};
|
|
2041
|
-
}, t.exports.__esModule = !0, t.exports.default = t.exports)();
|
|
2042
|
-
}
|
|
2043
|
-
t.exports = u, t.exports.__esModule = !0, t.exports.default = t.exports;
|
|
2044
|
-
})(dt)), dt.exports;
|
|
2045
|
-
}
|
|
2046
|
-
var Et, zr;
|
|
2047
|
-
function ts() {
|
|
2048
|
-
if (zr) return Et;
|
|
2049
|
-
zr = 1;
|
|
2050
|
-
var t = es()();
|
|
2051
|
-
Et = t;
|
|
2052
|
-
try {
|
|
2053
|
-
regeneratorRuntime = t;
|
|
2054
|
-
} catch {
|
|
2055
|
-
typeof globalThis == "object" ? globalThis.regeneratorRuntime = t : Function("r", "regeneratorRuntime = r")(t);
|
|
2056
|
-
}
|
|
2057
|
-
return Et;
|
|
2058
|
-
}
|
|
2059
|
-
var rs = ts();
|
|
2060
|
-
const K = /* @__PURE__ */ ln(rs);
|
|
2061
|
-
function Vr(t, e, r, n, i, s, a) {
|
|
2062
|
-
try {
|
|
2063
|
-
var o = t[s](a), u = o.value;
|
|
2064
|
-
} catch (l) {
|
|
2065
|
-
return void r(l);
|
|
2066
|
-
}
|
|
2067
|
-
o.done ? e(u) : Promise.resolve(u).then(n, i);
|
|
2068
|
-
}
|
|
2069
|
-
function re(t) {
|
|
2070
|
-
return function() {
|
|
2071
|
-
var e = this, r = arguments;
|
|
2072
|
-
return new Promise(function(n, i) {
|
|
2073
|
-
var s = t.apply(e, r);
|
|
2074
|
-
function a(u) {
|
|
2075
|
-
Vr(s, n, i, a, o, "next", u);
|
|
2076
|
-
}
|
|
2077
|
-
function o(u) {
|
|
2078
|
-
Vr(s, n, i, a, o, "throw", u);
|
|
2079
|
-
}
|
|
2080
|
-
a(void 0);
|
|
2081
|
-
});
|
|
2082
|
-
};
|
|
2083
|
-
}
|
|
2084
|
-
var Lr = function() {
|
|
2085
|
-
};
|
|
2086
|
-
function ns(t, e) {
|
|
2087
|
-
var r, n, i, s = (e = e || {}).initial || [], a = e.max || 1 / 0, o = e.interval || 1e4, u = e.onEmpty || Lr, l = e.onPause || Lr;
|
|
2088
|
-
function f(g) {
|
|
2089
|
-
clearInterval(r);
|
|
2090
|
-
var b = s.splice(0, a);
|
|
2091
|
-
return b.length && t(b, s), s.length ? g ? f() : p() : (i = !1, u(s));
|
|
2092
|
-
}
|
|
2093
|
-
function p() {
|
|
2094
|
-
i = !0, r = setInterval(f, o);
|
|
2095
|
-
}
|
|
2096
|
-
return s.length && p(), { flush: function(g) {
|
|
2097
|
-
f(g);
|
|
2098
|
-
}, resume: f, push: function(g) {
|
|
2099
|
-
return (n = s.push(g)) >= a && !e.throttle && f(), i || p(), n;
|
|
2100
|
-
}, size: function() {
|
|
2101
|
-
return s.length;
|
|
2102
|
-
}, pause: function(g) {
|
|
2103
|
-
g && f(), clearInterval(r), i = !1, l(s);
|
|
2104
|
-
} };
|
|
2105
|
-
}
|
|
2106
|
-
var qe = "__", tt = "session", Kn = qe + tt, qn = "page", Wr = ["id", "createdAt", "created"];
|
|
2107
|
-
function $t(t) {
|
|
2108
|
-
var e = t ? new Date(t) : /* @__PURE__ */ new Date();
|
|
2109
|
-
return [e.toISOString(), e.getTime()];
|
|
2110
|
-
}
|
|
2111
|
-
function Gn() {
|
|
2112
|
-
var t = $t(), e = t[0], r = t[1];
|
|
2113
|
-
return { id: be(), created: r, createdAt: e };
|
|
2114
|
-
}
|
|
2115
|
-
var is = { session: [Ua, za], page: [fe, de] };
|
|
2116
|
-
function rt(t, e) {
|
|
2117
|
-
for (var r = is[t], n = r[0], i = r[1], s = Gn(), a = !1, o = {}, u = 0; u < Wr.length; u++) {
|
|
2118
|
-
var l = Wr[u], f = qe + t + qe + tt + qe + l, p = n(f);
|
|
2119
|
-
a = e || !p, (e || !e && !p) && i(f, s[l]);
|
|
2120
|
-
var g = p && !e ? p : s[l], b = l !== "created" ? g : Number(g);
|
|
2121
|
-
o[l] = b;
|
|
2122
|
-
}
|
|
2123
|
-
return Zt(o, a);
|
|
2124
|
-
}
|
|
2125
|
-
function Zt(t, e) {
|
|
2126
|
-
var r = Date.now();
|
|
2127
|
-
return t.elapsed = r - t.created, t.expires && (t.remaining = Math.max(t.expires - r, 0), t.isExpired = t.remaining === 0), t.isNew = e, t;
|
|
2128
|
-
}
|
|
2129
|
-
function De(t, e) {
|
|
2130
|
-
t === void 0 && (t = 30);
|
|
2131
|
-
var r = qt(Kn), n = r ? JSON.parse(r) : Ye(t);
|
|
2132
|
-
return e ? n : Zt(n, !r);
|
|
2133
|
-
}
|
|
2134
|
-
function Ye(t, e, r) {
|
|
2135
|
-
t === void 0 && (t = 30);
|
|
2136
|
-
var n = r ? De(t, !0) : Gn(), i = 60 * t, s = n.created;
|
|
2137
|
-
if (r) {
|
|
2138
|
-
var a = $t(), o = a[0], u = a[1];
|
|
2139
|
-
n.modified = u, n.modifiedAt = o, s = u;
|
|
2140
|
-
}
|
|
2141
|
-
var l = $t(s + 1e3 * i), f = l[0];
|
|
2142
|
-
return n.expires = l[1], n.expiresAt = f, n.duration = 1e3 * i, e && (n = Object.assign(n, e)), Cn(Kn, JSON.stringify(n), i), Zt(n, !r);
|
|
2143
|
-
}
|
|
2144
|
-
var as = function(t, e) {
|
|
2145
|
-
return Ye(t, e, !0);
|
|
2146
|
-
}, Fn = rt.bind(null, tt), ss = rt.bind(null, tt, !0), er = rt.bind(null, qn), Hr = rt.bind(null, qn, !0), ve = typeof window < "u";
|
|
2147
|
-
function os(t) {
|
|
2148
|
-
return typeof t == "string";
|
|
2149
|
-
}
|
|
2150
|
-
function Kr(t) {
|
|
2151
|
-
return typeof t == "boolean";
|
|
2152
|
-
}
|
|
2153
|
-
var It, qr;
|
|
2154
|
-
function us() {
|
|
2155
|
-
if (qr) return It;
|
|
2156
|
-
qr = 1;
|
|
2157
|
-
var t = function(d) {
|
|
2158
|
-
return e(d) && !r(d);
|
|
2159
|
-
};
|
|
2160
|
-
function e(y) {
|
|
2161
|
-
return !!y && typeof y == "object";
|
|
2162
|
-
}
|
|
2163
|
-
function r(y) {
|
|
2164
|
-
var d = Object.prototype.toString.call(y);
|
|
2165
|
-
return d === "[object RegExp]" || d === "[object Date]" || s(y);
|
|
2166
|
-
}
|
|
2167
|
-
var n = typeof Symbol == "function" && Symbol.for, i = n ? /* @__PURE__ */ Symbol.for("react.element") : 60103;
|
|
2168
|
-
function s(y) {
|
|
2169
|
-
return y.$$typeof === i;
|
|
2170
|
-
}
|
|
2171
|
-
function a(y) {
|
|
2172
|
-
return Array.isArray(y) ? [] : {};
|
|
2173
|
-
}
|
|
2174
|
-
function o(y, d) {
|
|
2175
|
-
return d.clone !== !1 && d.isMergeableObject(y) ? I(a(y), y, d) : y;
|
|
2176
|
-
}
|
|
2177
|
-
function u(y, d, E) {
|
|
2178
|
-
return y.concat(d).map(function(v) {
|
|
2179
|
-
return o(v, E);
|
|
2180
|
-
});
|
|
2181
|
-
}
|
|
2182
|
-
function l(y, d) {
|
|
2183
|
-
if (!d.customMerge)
|
|
2184
|
-
return I;
|
|
2185
|
-
var E = d.customMerge(y);
|
|
2186
|
-
return typeof E == "function" ? E : I;
|
|
2187
|
-
}
|
|
2188
|
-
function f(y) {
|
|
2189
|
-
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(y).filter(function(d) {
|
|
2190
|
-
return Object.propertyIsEnumerable.call(y, d);
|
|
2191
|
-
}) : [];
|
|
2192
|
-
}
|
|
2193
|
-
function p(y) {
|
|
2194
|
-
return Object.keys(y).concat(f(y));
|
|
2195
|
-
}
|
|
2196
|
-
function g(y, d) {
|
|
2197
|
-
try {
|
|
2198
|
-
return d in y;
|
|
2199
|
-
} catch {
|
|
2200
|
-
return !1;
|
|
2201
|
-
}
|
|
2202
|
-
}
|
|
2203
|
-
function b(y, d) {
|
|
2204
|
-
return g(y, d) && !(Object.hasOwnProperty.call(y, d) && Object.propertyIsEnumerable.call(y, d));
|
|
2205
|
-
}
|
|
2206
|
-
function S(y, d, E) {
|
|
2207
|
-
var v = {};
|
|
2208
|
-
return E.isMergeableObject(y) && p(y).forEach(function(m) {
|
|
2209
|
-
v[m] = o(y[m], E);
|
|
2210
|
-
}), p(d).forEach(function(m) {
|
|
2211
|
-
b(y, m) || (g(y, m) && E.isMergeableObject(d[m]) ? v[m] = l(m, E)(y[m], d[m], E) : v[m] = o(d[m], E));
|
|
2212
|
-
}), v;
|
|
2213
|
-
}
|
|
2214
|
-
function I(y, d, E) {
|
|
2215
|
-
E = E || {}, E.arrayMerge = E.arrayMerge || u, E.isMergeableObject = E.isMergeableObject || t, E.cloneUnlessOtherwiseSpecified = o;
|
|
2216
|
-
var v = Array.isArray(d), m = Array.isArray(y), T = v === m;
|
|
2217
|
-
return T ? v ? E.arrayMerge(y, d, E) : S(y, d, E) : o(d, E);
|
|
2218
|
-
}
|
|
2219
|
-
I.all = function(d, E) {
|
|
2220
|
-
if (!Array.isArray(d))
|
|
2221
|
-
throw new Error("first argument should be an array");
|
|
2222
|
-
return d.reduce(function(v, m) {
|
|
2223
|
-
return I(v, m, E);
|
|
2224
|
-
}, {});
|
|
2225
|
-
};
|
|
2226
|
-
var w = I;
|
|
2227
|
-
return It = w, It;
|
|
2228
|
-
}
|
|
2229
|
-
var cs = us();
|
|
2230
|
-
const ls = /* @__PURE__ */ ln(cs);
|
|
2231
|
-
const Ct = new TextEncoder(), fs = {
|
|
2232
|
-
appstream2: "appstream",
|
|
2233
|
-
cloudhsmv2: "cloudhsm",
|
|
2234
|
-
email: "ses",
|
|
2235
|
-
marketplace: "aws-marketplace",
|
|
2236
|
-
mobile: "AWSMobileHubService",
|
|
2237
|
-
pinpoint: "mobiletargeting",
|
|
2238
|
-
queue: "sqs",
|
|
2239
|
-
"git-codecommit": "codecommit",
|
|
2240
|
-
"mturk-requester-sandbox": "mturk-requester",
|
|
2241
|
-
"personalize-runtime": "personalize"
|
|
2242
|
-
}, ds = /* @__PURE__ */ new Set([
|
|
2243
|
-
"authorization",
|
|
2244
|
-
"content-type",
|
|
2245
|
-
"content-length",
|
|
2246
|
-
"user-agent",
|
|
2247
|
-
"presigned-expires",
|
|
2248
|
-
"expect",
|
|
2249
|
-
"x-amzn-trace-id",
|
|
2250
|
-
"range",
|
|
2251
|
-
"connection"
|
|
2252
|
-
]);
|
|
2253
|
-
class ps {
|
|
2254
|
-
constructor({ accessKeyId: e, secretAccessKey: r, sessionToken: n, service: i, region: s, cache: a, retries: o, initRetryMs: u }) {
|
|
2255
|
-
if (e == null) throw new TypeError("accessKeyId is a required option");
|
|
2256
|
-
if (r == null) throw new TypeError("secretAccessKey is a required option");
|
|
2257
|
-
this.accessKeyId = e, this.secretAccessKey = r, this.sessionToken = n, this.service = i, this.region = s, this.cache = a || /* @__PURE__ */ new Map(), this.retries = o ?? 10, this.initRetryMs = u || 50;
|
|
2258
|
-
}
|
|
2259
|
-
async sign(e, r) {
|
|
2260
|
-
if (e instanceof Request) {
|
|
2261
|
-
const { method: s, url: a, headers: o, body: u } = e;
|
|
2262
|
-
r = Object.assign({ method: s, url: a, headers: o }, r), r.body == null && o.has("Content-Type") && (r.body = u != null && o.has("X-Amz-Content-Sha256") ? u : await e.clone().arrayBuffer()), e = a;
|
|
2263
|
-
}
|
|
2264
|
-
const n = new gs(Object.assign({ url: e.toString() }, r, this, r && r.aws)), i = Object.assign({}, r, await n.sign());
|
|
2265
|
-
delete i.aws;
|
|
2266
|
-
try {
|
|
2267
|
-
return new Request(i.url.toString(), i);
|
|
2268
|
-
} catch (s) {
|
|
2269
|
-
if (s instanceof TypeError)
|
|
2270
|
-
return new Request(i.url.toString(), Object.assign({ duplex: "half" }, i));
|
|
2271
|
-
throw s;
|
|
2272
|
-
}
|
|
2273
|
-
}
|
|
2274
|
-
async fetch(e, r) {
|
|
2275
|
-
for (let n = 0; n <= this.retries; n++) {
|
|
2276
|
-
const i = fetch(await this.sign(e, r));
|
|
2277
|
-
if (n === this.retries)
|
|
2278
|
-
return i;
|
|
2279
|
-
const s = await i;
|
|
2280
|
-
if (s.status < 500 && s.status !== 429)
|
|
2281
|
-
return s;
|
|
2282
|
-
await new Promise((a) => setTimeout(a, Math.random() * this.initRetryMs * Math.pow(2, n)));
|
|
2283
|
-
}
|
|
2284
|
-
throw new Error("An unknown error occurred, ensure retries is not negative");
|
|
2285
|
-
}
|
|
2286
|
-
}
|
|
2287
|
-
class gs {
|
|
2288
|
-
constructor({ method: e, url: r, headers: n, body: i, accessKeyId: s, secretAccessKey: a, sessionToken: o, service: u, region: l, cache: f, datetime: p, signQuery: g, appendSessionToken: b, allHeaders: S, singleEncode: I }) {
|
|
2289
|
-
if (r == null) throw new TypeError("url is a required option");
|
|
2290
|
-
if (s == null) throw new TypeError("accessKeyId is a required option");
|
|
2291
|
-
if (a == null) throw new TypeError("secretAccessKey is a required option");
|
|
2292
|
-
this.method = e || (i ? "POST" : "GET"), this.url = new URL(r), this.headers = new Headers(n || {}), this.body = i, this.accessKeyId = s, this.secretAccessKey = a, this.sessionToken = o;
|
|
2293
|
-
let w, y;
|
|
2294
|
-
(!u || !l) && ([w, y] = hs(this.url, this.headers)), this.service = u || w || "", this.region = l || y || "us-east-1", this.cache = f || /* @__PURE__ */ new Map(), this.datetime = p || (/* @__PURE__ */ new Date()).toISOString().replace(/[:-]|\.\d{3}/g, ""), this.signQuery = g, this.appendSessionToken = b || this.service === "iotdevicegateway", this.headers.delete("Host"), this.service === "s3" && !this.signQuery && !this.headers.has("X-Amz-Content-Sha256") && this.headers.set("X-Amz-Content-Sha256", "UNSIGNED-PAYLOAD");
|
|
2295
|
-
const d = this.signQuery ? this.url.searchParams : this.headers;
|
|
2296
|
-
if (d.set("X-Amz-Date", this.datetime), this.sessionToken && !this.appendSessionToken && d.set("X-Amz-Security-Token", this.sessionToken), this.signableHeaders = ["host", ...this.headers.keys()].filter((v) => S || !ds.has(v)).sort(), this.signedHeaders = this.signableHeaders.join(";"), this.canonicalHeaders = this.signableHeaders.map((v) => v + ":" + (v === "host" ? this.url.host : (this.headers.get(v) || "").replace(/\s+/g, " "))).join(`
|
|
2297
|
-
`), this.credentialString = [this.datetime.slice(0, 8), this.region, this.service, "aws4_request"].join("/"), this.signQuery && (this.service === "s3" && !d.has("X-Amz-Expires") && d.set("X-Amz-Expires", "86400"), d.set("X-Amz-Algorithm", "AWS4-HMAC-SHA256"), d.set("X-Amz-Credential", this.accessKeyId + "/" + this.credentialString), d.set("X-Amz-SignedHeaders", this.signedHeaders)), this.service === "s3")
|
|
2298
|
-
try {
|
|
2299
|
-
this.encodedPath = decodeURIComponent(this.url.pathname.replace(/\+/g, " "));
|
|
2300
|
-
} catch {
|
|
2301
|
-
this.encodedPath = this.url.pathname;
|
|
2302
|
-
}
|
|
2303
|
-
else
|
|
2304
|
-
this.encodedPath = this.url.pathname.replace(/\/+/g, "/");
|
|
2305
|
-
I || (this.encodedPath = encodeURIComponent(this.encodedPath).replace(/%2F/g, "/")), this.encodedPath = Br(this.encodedPath);
|
|
2306
|
-
const E = /* @__PURE__ */ new Set();
|
|
2307
|
-
this.encodedSearch = [...this.url.searchParams].filter(([v]) => {
|
|
2308
|
-
if (!v) return !1;
|
|
2309
|
-
if (this.service === "s3") {
|
|
2310
|
-
if (E.has(v)) return !1;
|
|
2311
|
-
E.add(v);
|
|
2312
|
-
}
|
|
2313
|
-
return !0;
|
|
2314
|
-
}).map((v) => v.map((m) => Br(encodeURIComponent(m)))).sort(([v, m], [T, x]) => v < T ? -1 : v > T ? 1 : m < x ? -1 : m > x ? 1 : 0).map((v) => v.join("=")).join("&");
|
|
2315
|
-
}
|
|
2316
|
-
async sign() {
|
|
2317
|
-
return this.signQuery ? (this.url.searchParams.set("X-Amz-Signature", await this.signature()), this.sessionToken && this.appendSessionToken && this.url.searchParams.set("X-Amz-Security-Token", this.sessionToken)) : this.headers.set("Authorization", await this.authHeader()), {
|
|
2318
|
-
method: this.method,
|
|
2319
|
-
url: this.url,
|
|
2320
|
-
headers: this.headers,
|
|
2321
|
-
body: this.body
|
|
2322
|
-
};
|
|
2323
|
-
}
|
|
2324
|
-
async authHeader() {
|
|
2325
|
-
return [
|
|
2326
|
-
"AWS4-HMAC-SHA256 Credential=" + this.accessKeyId + "/" + this.credentialString,
|
|
2327
|
-
"SignedHeaders=" + this.signedHeaders,
|
|
2328
|
-
"Signature=" + await this.signature()
|
|
2329
|
-
].join(", ");
|
|
2330
|
-
}
|
|
2331
|
-
async signature() {
|
|
2332
|
-
const e = this.datetime.slice(0, 8), r = [this.secretAccessKey, e, this.region, this.service].join();
|
|
2333
|
-
let n = this.cache.get(r);
|
|
2334
|
-
if (!n) {
|
|
2335
|
-
const i = await je("AWS4" + this.secretAccessKey, e), s = await je(i, this.region), a = await je(s, this.service);
|
|
2336
|
-
n = await je(a, "aws4_request"), this.cache.set(r, n);
|
|
2337
|
-
}
|
|
2338
|
-
return At(await je(n, await this.stringToSign()));
|
|
2339
|
-
}
|
|
2340
|
-
async stringToSign() {
|
|
2341
|
-
return [
|
|
2342
|
-
"AWS4-HMAC-SHA256",
|
|
2343
|
-
this.datetime,
|
|
2344
|
-
this.credentialString,
|
|
2345
|
-
At(await Gr(await this.canonicalString()))
|
|
2346
|
-
].join(`
|
|
2347
|
-
`);
|
|
2348
|
-
}
|
|
2349
|
-
async canonicalString() {
|
|
2350
|
-
return [
|
|
2351
|
-
this.method.toUpperCase(),
|
|
2352
|
-
this.encodedPath,
|
|
2353
|
-
this.encodedSearch,
|
|
2354
|
-
this.canonicalHeaders + `
|
|
2355
|
-
`,
|
|
2356
|
-
this.signedHeaders,
|
|
2357
|
-
await this.hexBodyHash()
|
|
2358
|
-
].join(`
|
|
2359
|
-
`);
|
|
2360
|
-
}
|
|
2361
|
-
async hexBodyHash() {
|
|
2362
|
-
let e = this.headers.get("X-Amz-Content-Sha256") || (this.service === "s3" && this.signQuery ? "UNSIGNED-PAYLOAD" : null);
|
|
2363
|
-
if (e == null) {
|
|
2364
|
-
if (this.body && typeof this.body != "string" && !("byteLength" in this.body))
|
|
2365
|
-
throw new Error("body must be a string, ArrayBuffer or ArrayBufferView, unless you include the X-Amz-Content-Sha256 header");
|
|
2366
|
-
e = At(await Gr(this.body || ""));
|
|
2367
|
-
}
|
|
2368
|
-
return e;
|
|
2369
|
-
}
|
|
2370
|
-
}
|
|
2371
|
-
async function je(t, e) {
|
|
2372
|
-
const r = await crypto.subtle.importKey(
|
|
2373
|
-
"raw",
|
|
2374
|
-
typeof t == "string" ? Ct.encode(t) : t,
|
|
2375
|
-
{ name: "HMAC", hash: { name: "SHA-256" } },
|
|
2376
|
-
!1,
|
|
2377
|
-
["sign"]
|
|
2378
|
-
);
|
|
2379
|
-
return crypto.subtle.sign("HMAC", r, Ct.encode(e));
|
|
2380
|
-
}
|
|
2381
|
-
async function Gr(t) {
|
|
2382
|
-
return crypto.subtle.digest("SHA-256", typeof t == "string" ? Ct.encode(t) : t);
|
|
2383
|
-
}
|
|
2384
|
-
const Fr = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"];
|
|
2385
|
-
function At(t) {
|
|
2386
|
-
const e = new Uint8Array(t);
|
|
2387
|
-
let r = "";
|
|
2388
|
-
for (let n = 0; n < e.length; n++) {
|
|
2389
|
-
const i = e[n];
|
|
2390
|
-
r += Fr[i >>> 4 & 15], r += Fr[i & 15];
|
|
2391
|
-
}
|
|
2392
|
-
return r;
|
|
2393
|
-
}
|
|
2394
|
-
function Br(t) {
|
|
2395
|
-
return t.replace(/[!'()*]/g, (e) => "%" + e.charCodeAt(0).toString(16).toUpperCase());
|
|
2396
|
-
}
|
|
2397
|
-
function hs(t, e) {
|
|
2398
|
-
const { hostname: r, pathname: n } = t;
|
|
2399
|
-
if (r.endsWith(".on.aws")) {
|
|
2400
|
-
const o = r.match(/^[^.]{1,63}\.lambda-url\.([^.]{1,63})\.on\.aws$/);
|
|
2401
|
-
return o != null ? ["lambda", o[1] || ""] : ["", ""];
|
|
2402
|
-
}
|
|
2403
|
-
if (r.endsWith(".r2.cloudflarestorage.com"))
|
|
2404
|
-
return ["s3", "auto"];
|
|
2405
|
-
if (r.endsWith(".backblazeb2.com")) {
|
|
2406
|
-
const o = r.match(/^(?:[^.]{1,63}\.)?s3\.([^.]{1,63})\.backblazeb2\.com$/);
|
|
2407
|
-
return o != null ? ["s3", o[1] || ""] : ["", ""];
|
|
2408
|
-
}
|
|
2409
|
-
const i = r.replace("dualstack.", "").match(/([^.]{1,63})\.(?:([^.]{0,63})\.)?amazonaws\.com(?:\.cn)?$/);
|
|
2410
|
-
let s = i && i[1] || "", a = i && i[2];
|
|
2411
|
-
if (a === "us-gov")
|
|
2412
|
-
a = "us-gov-west-1";
|
|
2413
|
-
else if (a === "s3" || a === "s3-accelerate")
|
|
2414
|
-
a = "us-east-1", s = "s3";
|
|
2415
|
-
else if (s === "iot")
|
|
2416
|
-
r.startsWith("iot.") ? s = "execute-api" : r.startsWith("data.jobs.iot.") ? s = "iot-jobs-data" : s = n === "/mqtt" ? "iotdevicegateway" : "iotdata";
|
|
2417
|
-
else if (s === "autoscaling") {
|
|
2418
|
-
const o = (e.get("X-Amz-Target") || "").split(".")[0];
|
|
2419
|
-
o === "AnyScaleFrontendService" ? s = "application-autoscaling" : o === "AnyScaleScalingPlannerFrontendService" && (s = "autoscaling-plans");
|
|
2420
|
-
} else a == null && s.startsWith("s3-") ? (a = s.slice(3).replace(/^fips-|^external-1/, ""), s = "s3") : s.endsWith("-fips") ? s = s.slice(0, -5) : a && /-\d$/.test(s) && !/-\d$/.test(a) && ([s, a] = [a, s]);
|
|
2421
|
-
return [fs[s] || s, a || ""];
|
|
2422
|
-
}
|
|
2423
|
-
var tr = "Event", Yr = tr + "Listener";
|
|
2424
|
-
function ms(t) {
|
|
2425
|
-
return function(e, r, n, i) {
|
|
2426
|
-
var s = n || qi, a = i || !1;
|
|
2427
|
-
if (!Q) return s;
|
|
2428
|
-
var o = Xe(r), u = Xe(e, !0);
|
|
2429
|
-
if (!u.length) throw new Error("noElements");
|
|
2430
|
-
if (!o.length) throw new Error("no" + tr);
|
|
2431
|
-
var l = [];
|
|
2432
|
-
return (function f(p) {
|
|
2433
|
-
p && (l = []);
|
|
2434
|
-
for (var g = p ? "add" + Yr : "remove" + Yr, b = 0; b < u.length; b++) {
|
|
2435
|
-
var S = u[b];
|
|
2436
|
-
l[b] = p ? a && a.once ? vs(s) : s : l[b] || s;
|
|
2437
|
-
for (var I = 0; I < o.length; I++) S[g] ? S["on" + o[I]] = p ? l[b] : null : S[g](o[I], l[b], a);
|
|
2438
|
-
}
|
|
2439
|
-
return f.bind(null, !p);
|
|
2440
|
-
})(t);
|
|
2441
|
-
};
|
|
2442
|
-
}
|
|
2443
|
-
function Xe(t, e) {
|
|
2444
|
-
if (ce(t)) return e ? Xe(document.querySelectorAll(t)) : (r = t).split(r.indexOf(",") > -1 ? "," : " ").map(function(a) {
|
|
2445
|
-
return a.trim();
|
|
2446
|
-
});
|
|
2447
|
-
var r;
|
|
2448
|
-
if (NodeList.prototype.isPrototypeOf(t)) {
|
|
2449
|
-
for (var n = [], i = t.length >>> 0; i--; ) n[i] = t[i];
|
|
2450
|
-
return n;
|
|
2451
|
-
}
|
|
2452
|
-
var s = aa(t);
|
|
2453
|
-
return e ? s.map(function(a) {
|
|
2454
|
-
return ce(a) ? Xe(a, !0) : a;
|
|
2455
|
-
}).flat() : s;
|
|
2456
|
-
}
|
|
2457
|
-
function vs(t, e) {
|
|
2458
|
-
var r;
|
|
2459
|
-
return function() {
|
|
2460
|
-
return t && (r = t.apply(this, arguments), t = null), r;
|
|
2461
|
-
};
|
|
2462
|
-
}
|
|
2463
|
-
var Ot = ms(tr);
|
|
2464
|
-
function Bn(t, e) {
|
|
2465
|
-
return Q && Z(window[t]) ? (r = window[t], n = e, (i = window) === void 0 && (i = null), Z(r) ? function() {
|
|
2466
|
-
r.apply(i, arguments), n.apply(i, arguments);
|
|
2467
|
-
} : n) : window[t] = e;
|
|
2468
|
-
var r, n, i;
|
|
2469
|
-
}
|
|
2470
|
-
Bn.bind(null, "onerror");
|
|
2471
|
-
Bn.bind(null, "onload");
|
|
2472
|
-
var Yn = typeof window > "u", Xr = "hidden";
|
|
2473
|
-
function ys(t) {
|
|
2474
|
-
if (Yn) return !1;
|
|
2475
|
-
var e = bs(), r = "".concat(e.replace(/[H|h]idden/, ""), "visibilitychange"), n = function() {
|
|
2476
|
-
return t(!!document[e]);
|
|
2477
|
-
}, i = function() {
|
|
2478
|
-
return document.addEventListener(r, n);
|
|
2479
|
-
};
|
|
2480
|
-
return i(), function() {
|
|
2481
|
-
return document.removeEventListener(r, n), i;
|
|
2482
|
-
};
|
|
2483
|
-
}
|
|
2484
|
-
function bs() {
|
|
2485
|
-
var t = ["webkit", "moz", "ms", "o"];
|
|
2486
|
-
return Yn || Xr in document ? Xr : t.reduce(function(e, r) {
|
|
2487
|
-
var n = r + "Hidden";
|
|
2488
|
-
return !e && n in document ? n : e;
|
|
2489
|
-
}, null);
|
|
2490
|
-
}
|
|
2491
|
-
var ws = ["mousemove", "mousedown", "touchmove", "touchstart", "touchend", "keydown"];
|
|
2492
|
-
function Ss(t, e) {
|
|
2493
|
-
e === void 0 && (e = {});
|
|
2494
|
-
var r = /* @__PURE__ */ (function(a, o) {
|
|
2495
|
-
var u = this, l = !1;
|
|
2496
|
-
return function(f) {
|
|
2497
|
-
l || (a.call(u, f), l = !0, setTimeout(function() {
|
|
2498
|
-
return l = !1;
|
|
2499
|
-
}, o));
|
|
2500
|
-
};
|
|
2501
|
-
})(t, e.throttle || 1e4), n = [];
|
|
2502
|
-
function i() {
|
|
2503
|
-
var a = ys(function(o) {
|
|
2504
|
-
o || r({ type: "tabVisible" });
|
|
2505
|
-
});
|
|
2506
|
-
return n = [a].concat(ws.map(function(o) {
|
|
2507
|
-
return Ot(document, o, r);
|
|
2508
|
-
})).concat(Ot(window, "load", r)).concat(Ot(window, "scroll", r, { capture: !0, passive: !0 })), s;
|
|
2509
|
-
}
|
|
2510
|
-
function s() {
|
|
2511
|
-
n.map(function(a) {
|
|
2512
|
-
return a();
|
|
2513
|
-
});
|
|
2514
|
-
}
|
|
2515
|
-
return i(), function() {
|
|
2516
|
-
return s(), i;
|
|
2517
|
-
};
|
|
2518
|
-
}
|
|
2519
|
-
function Es(t) {
|
|
2520
|
-
var e, r, n = t.onIdle, i = t.onWakeUp, s = t.onHeartbeat, a = t.timeout, o = a, u = t.throttle, l = u, f = !1, p = !1, g = /* @__PURE__ */ new Date(), b = function() {
|
|
2521
|
-
return clearTimeout(e);
|
|
2522
|
-
};
|
|
2523
|
-
function S(w) {
|
|
2524
|
-
b(), s && !f && s(Ne(g), w), i && f && (f = !1, i(Ne(r), w), g = /* @__PURE__ */ new Date()), e = setTimeout(function() {
|
|
2525
|
-
f = !0, n && (r = /* @__PURE__ */ new Date(), n(Ne(g), w));
|
|
2526
|
-
}, o);
|
|
2527
|
-
}
|
|
2528
|
-
var I = Ss(S, { throttle: l });
|
|
2529
|
-
return { disable: function() {
|
|
2530
|
-
p = !0, f = !1, b();
|
|
2531
|
-
var w = I();
|
|
2532
|
-
return function() {
|
|
2533
|
-
return p = !1, g = /* @__PURE__ */ new Date(), S({ type: "load" }), w();
|
|
2534
|
-
};
|
|
2535
|
-
}, getStatus: function() {
|
|
2536
|
-
return { isIdle: f, isDisabled: p, active: f ? 0 : Ne(g, p), idle: f ? Ne(r, p) : 0 };
|
|
2537
|
-
} };
|
|
2538
|
-
}
|
|
2539
|
-
function Ne(t, e) {
|
|
2540
|
-
return e ? 0 : Math.round((/* @__PURE__ */ new Date() - t) / 1e3);
|
|
2541
|
-
}
|
|
2542
|
-
var Xn = "object", Is = "string", Jr = "?", Y = "name", X = "version", As = "", Qr = "function", Os = "undefined", Ps = "BlackBerry", xs = "Chrome", Ts = "Firefox", Zr = {
|
|
2543
|
-
ME: "4.90",
|
|
2544
|
-
"NT 3.11": "NT3.51",
|
|
2545
|
-
"NT 4.0": "NT4.0",
|
|
2546
|
-
2e3: "NT 5.0",
|
|
2547
|
-
XP: ["NT 5.1", "NT 5.2"],
|
|
2548
|
-
Vista: "NT 6.0",
|
|
2549
|
-
7: "NT 6.1",
|
|
2550
|
-
8: "NT 6.2",
|
|
2551
|
-
"8.1": "NT 6.3",
|
|
2552
|
-
10: ["NT 6.4", "NT 10.0"],
|
|
2553
|
-
RT: "ARM"
|
|
2554
|
-
}, ks = [
|
|
2555
|
-
[
|
|
2556
|
-
/* Windows */
|
|
2557
|
-
// Windows (iTunes)
|
|
2558
|
-
/microsoft (windows) (vista|xp)/i
|
|
2559
|
-
],
|
|
2560
|
-
[Y, X],
|
|
2561
|
-
// Windows RT
|
|
2562
|
-
[
|
|
2563
|
-
/(windows) nt 6\.2; (arm)/i,
|
|
2564
|
-
// Windows Phone
|
|
2565
|
-
/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,
|
|
2566
|
-
/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i
|
|
2567
|
-
],
|
|
2568
|
-
[Y, [X, en, Zr]],
|
|
2569
|
-
[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],
|
|
2570
|
-
[[Y, "Windows"], [X, en, Zr]],
|
|
2571
|
-
/* iOS/macOS */
|
|
2572
|
-
// iOS
|
|
2573
|
-
[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i, /cfnetwork\/.+darwin/i],
|
|
2574
|
-
[[X, /_/g, "."], [Y, "iOS"]],
|
|
2575
|
-
// Mac OS
|
|
2576
|
-
[/(mac os x) ?([\w\. ]*)/i, /(macintosh|mac_powerpc\b)(?!.+haiku)/i],
|
|
2577
|
-
[[Y, "MacOS"], [X, /_/g, "."]],
|
|
2578
|
-
/* Mobile OSes */
|
|
2579
|
-
// Android-x86
|
|
2580
|
-
[/droid ([\w\.]+)\b.+(android[- ]x86)/i],
|
|
2581
|
-
[X, Y],
|
|
2582
|
-
// Android/WebOS/QNX/Bada/RIM/Maemo/MeeGo/Sailfish OS
|
|
2583
|
-
[
|
|
2584
|
-
/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,
|
|
2585
|
-
// Blackberry
|
|
2586
|
-
/(blackberry)\w*\/([\w\.]*)/i,
|
|
2587
|
-
// Tizen/KaiOS
|
|
2588
|
-
/(tizen|kaios)[\/ ]([\w\.]+)/i,
|
|
2589
|
-
// Series 40
|
|
2590
|
-
/\((series40);/i
|
|
2591
|
-
],
|
|
2592
|
-
[Y, X],
|
|
2593
|
-
// BlackBerry 10
|
|
2594
|
-
[/\(bb(10);/i],
|
|
2595
|
-
[X, [Y, Ps]],
|
|
2596
|
-
// Firefox OS
|
|
2597
|
-
[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],
|
|
2598
|
-
[X, [Y, Ts + " OS"]],
|
|
2599
|
-
// WebOS
|
|
2600
|
-
[/web0s;.+rt(tv)/i, /\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],
|
|
2601
|
-
[X, [Y, "webOS"]],
|
|
2602
|
-
// Google Chromecast
|
|
2603
|
-
[/crkey\/([\d\.]+)/i],
|
|
2604
|
-
// Google Chromecast
|
|
2605
|
-
[X, [Y, xs + "cast"]],
|
|
2606
|
-
// Chromium OS
|
|
2607
|
-
[/(cros) [\w]+ ([\w\.]+\w)/i],
|
|
2608
|
-
[[Y, "Chromium OS"], X],
|
|
2609
|
-
// Other
|
|
2610
|
-
[
|
|
2611
|
-
// Mageia/VectorLinux
|
|
2612
|
-
/(mageia|vectorlinux)[; ]/i,
|
|
2613
|
-
// Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware/Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus/Raspbian/Plan9/Minix/RISCOS/Contiki/Deepin/Manjaro/elementary/Sabayon/Linspire
|
|
2614
|
-
/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,
|
|
2615
|
-
// Hurd/Linux
|
|
2616
|
-
/(hurd|linux) ?([\w\.]*)/i,
|
|
2617
|
-
// GNU
|
|
2618
|
-
/(gnu) ?([\w\.]*)/i,
|
|
2619
|
-
// UNIX
|
|
2620
|
-
/(unix) ?([\w\.]*)/i
|
|
2621
|
-
],
|
|
2622
|
-
[Y, X]
|
|
2623
|
-
];
|
|
2624
|
-
function js(t, e) {
|
|
2625
|
-
for (var r = 0, n, i, s, a, o, u; r < e.length && !o; ) {
|
|
2626
|
-
var l = e[r], f = e[r + 1];
|
|
2627
|
-
for (n = i = 0; n < l.length && !o; )
|
|
2628
|
-
if (o = l[n++].exec(t), o)
|
|
2629
|
-
for (s = 0; s < f.length; s++)
|
|
2630
|
-
u = o[++i], a = f[s], ee(a) === Xn && a.length > 0 ? a.length == 2 ? ee(a[1]) == Qr ? this[a[0]] = a[1].call(this, u) : this[a[0]] = a[1] : a.length == 3 ? ee(a[1]) === Qr && !(a[1].exec && a[1].test) ? this[a[0]] = u ? a[1].call(this, u, a[2]) : void 0 : this[a[0]] = u ? u.replace(a[1], a[2]) : void 0 : a.length == 4 && (this[a[0]] = u ? a[3].call(this, u.replace(a[1], a[2])) : void 0) : this[a] = u || void 0;
|
|
2631
|
-
r += 2;
|
|
2632
|
-
}
|
|
2633
|
-
}
|
|
2634
|
-
function en(t, e) {
|
|
2635
|
-
for (var r in e)
|
|
2636
|
-
if (ee(e[r]) === Xn && e[r].length > 0) {
|
|
2637
|
-
for (var n = 0; n < e[r].length; n++)
|
|
2638
|
-
if (tn(e[r][n], t))
|
|
2639
|
-
return r === Jr ? void 0 : r;
|
|
2640
|
-
} else if (tn(e[r], t))
|
|
2641
|
-
return r === Jr ? void 0 : r;
|
|
2642
|
-
return t;
|
|
2643
|
-
}
|
|
2644
|
-
function tn(t, e) {
|
|
2645
|
-
return ee(t) === Is ? rn(e).indexOf(rn(t)) !== -1 : !1;
|
|
2646
|
-
}
|
|
2647
|
-
function rn(t) {
|
|
2648
|
-
return t.toLowerCase();
|
|
2649
|
-
}
|
|
2650
|
-
function Ns(t) {
|
|
2651
|
-
var e = (typeof window > "u" ? "undefined" : ee(window)) !== Os && window.navigator && window.navigator.userAgent ? window.navigator.userAgent : As, r = {};
|
|
2652
|
-
return r[Y] = void 0, r[X] = void 0, js.call(r, e, ks), r;
|
|
2653
|
-
}
|
|
2654
|
-
var Jn = "Brave";
|
|
2655
|
-
function rr() {
|
|
2656
|
-
if (typeof window > "u")
|
|
2657
|
-
return {};
|
|
2658
|
-
if (!window.navigator)
|
|
2659
|
-
return {};
|
|
2660
|
-
var t = window.navigator, e = t.platform, r = t.product, n = t.vendor, i = Cs(window.navigator), s = i.type, a = i.version, o = s === Jn ? s : (n || "").split(" ")[0];
|
|
2661
|
-
return {
|
|
2662
|
-
platform: e,
|
|
2663
|
-
os: Ns(),
|
|
2664
|
-
make: o || r,
|
|
2665
|
-
// product always gecko
|
|
2666
|
-
model: s,
|
|
2667
|
-
version: a,
|
|
2668
|
-
name: [s, a].join("/"),
|
|
2669
|
-
language: Ms(),
|
|
2670
|
-
timezone: $s()
|
|
2671
|
-
};
|
|
2672
|
-
}
|
|
2673
|
-
function Ms() {
|
|
2674
|
-
var t = window.navigator, e = t.language, r = t.browserLanguage, n = t.languages;
|
|
2675
|
-
return (e || r || (n || ["en_US"])[0]).toLowerCase().replace("-", "_");
|
|
2676
|
-
}
|
|
2677
|
-
function $s() {
|
|
2678
|
-
var t = /\(([A-Za-z\s].*)\)/.exec((/* @__PURE__ */ new Date()).toString());
|
|
2679
|
-
return t && t[1] || "";
|
|
2680
|
-
}
|
|
2681
|
-
function Cs(t) {
|
|
2682
|
-
var e = t.userAgent, r = /.+(Opera[\s[A-Z]*|OPR[\sA-Z]*)\/([0-9\.]+).*/i.exec(e);
|
|
2683
|
-
if (r)
|
|
2684
|
-
return {
|
|
2685
|
-
type: r[1],
|
|
2686
|
-
version: r[2]
|
|
2687
|
-
};
|
|
2688
|
-
var n = /.+(Trident|Edge)\/([0-9\.]+).*/i.exec(e);
|
|
2689
|
-
if (n)
|
|
2690
|
-
return {
|
|
2691
|
-
type: n[1],
|
|
2692
|
-
version: n[2]
|
|
2693
|
-
};
|
|
2694
|
-
var i = /(headlesschrome)(?:\/([\w\.]+)| )/i.exec(e);
|
|
2695
|
-
if (i)
|
|
2696
|
-
return {
|
|
2697
|
-
type: i[1],
|
|
2698
|
-
version: i[2]
|
|
2699
|
-
};
|
|
2700
|
-
var s = /.+(Chrome|Firefox|FxiOS)\/([0-9\.]+).*/i.exec(e);
|
|
2701
|
-
if (s) {
|
|
2702
|
-
var a = t.brave && t.brave.isBrave || !1;
|
|
2703
|
-
return {
|
|
2704
|
-
type: a ? Jn : s[1],
|
|
2705
|
-
version: s[2]
|
|
2706
|
-
};
|
|
2707
|
-
}
|
|
2708
|
-
var o = /.+(Safari)\/([0-9\.]+).*/i.exec(e);
|
|
2709
|
-
if (o)
|
|
2710
|
-
return {
|
|
2711
|
-
type: o[1],
|
|
2712
|
-
version: o[2]
|
|
2713
|
-
};
|
|
2714
|
-
var u = /.+(AppleWebKit)\/([0-9\.]+).*/i.exec(e);
|
|
2715
|
-
if (u)
|
|
2716
|
-
return {
|
|
2717
|
-
type: u[1],
|
|
2718
|
-
version: u[2]
|
|
2719
|
-
};
|
|
2720
|
-
var l = /.*([A-Z]+)\/([0-9\.]+).*/i.exec(e), f = l || ["", "NA", "0.0.0"];
|
|
2721
|
-
return {
|
|
2722
|
-
type: f[1],
|
|
2723
|
-
version: f[2]
|
|
2724
|
-
};
|
|
2725
|
-
}
|
|
2726
|
-
function _s(t) {
|
|
2727
|
-
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2728
|
-
return e[t] || t;
|
|
2729
|
-
}
|
|
2730
|
-
function _t(t) {
|
|
2731
|
-
return Dt.apply(this, arguments);
|
|
2732
|
-
}
|
|
2733
|
-
function Dt() {
|
|
2734
|
-
return Dt = re(/* @__PURE__ */ K.mark(function t(e) {
|
|
2735
|
-
var r, n, i, s, a, o, u = arguments;
|
|
2736
|
-
return K.wrap(function(f) {
|
|
2737
|
-
for (; ; )
|
|
2738
|
-
switch (f.prev = f.next) {
|
|
2739
|
-
case 0:
|
|
2740
|
-
r = u.length > 1 && u[1] !== void 0 ? u[1] : !1, n = {}, f.t0 = K.keys(e);
|
|
2741
|
-
case 3:
|
|
2742
|
-
if ((f.t1 = f.t0()).done) {
|
|
2743
|
-
f.next = 13;
|
|
2744
|
-
break;
|
|
2745
|
-
}
|
|
2746
|
-
return i = f.t1.value, s = Array.isArray(e[i]) ? e[i] : [e[i]], a = r ? s : s[0], f.next = 9, Zn(a, Ds);
|
|
2747
|
-
case 9:
|
|
2748
|
-
o = f.sent, ei(o) || (n[i] = o), f.next = 3;
|
|
2749
|
-
break;
|
|
2750
|
-
case 13:
|
|
2751
|
-
return f.abrupt("return", n);
|
|
2752
|
-
case 14:
|
|
2753
|
-
case "end":
|
|
2754
|
-
return f.stop();
|
|
2755
|
-
}
|
|
2756
|
-
}, t);
|
|
2757
|
-
})), Dt.apply(this, arguments);
|
|
2758
|
-
}
|
|
2759
|
-
function Qn(t) {
|
|
2760
|
-
return Rt.apply(this, arguments);
|
|
2761
|
-
}
|
|
2762
|
-
function Rt() {
|
|
2763
|
-
return Rt = re(/* @__PURE__ */ K.mark(function t(e) {
|
|
2764
|
-
var r, n;
|
|
2765
|
-
return K.wrap(function(s) {
|
|
2766
|
-
for (; ; )
|
|
2767
|
-
switch (s.prev = s.next) {
|
|
2768
|
-
case 0:
|
|
2769
|
-
r = {}, s.t0 = K.keys(e);
|
|
2770
|
-
case 2:
|
|
2771
|
-
if ((s.t1 = s.t0()).done) {
|
|
2772
|
-
s.next = 9;
|
|
2773
|
-
break;
|
|
2774
|
-
}
|
|
2775
|
-
return n = s.t1.value, s.next = 6, Zn(e[n], Rs);
|
|
2776
|
-
case 6:
|
|
2777
|
-
r[n] = s.sent, s.next = 2;
|
|
2778
|
-
break;
|
|
2779
|
-
case 9:
|
|
2780
|
-
return s.abrupt("return", r);
|
|
2781
|
-
case 10:
|
|
2782
|
-
case "end":
|
|
2783
|
-
return s.stop();
|
|
2784
|
-
}
|
|
2785
|
-
}, t);
|
|
2786
|
-
})), Rt.apply(this, arguments);
|
|
2787
|
-
}
|
|
2788
|
-
function Zn(t, e) {
|
|
2789
|
-
return Ut.apply(this, arguments);
|
|
2790
|
-
}
|
|
2791
|
-
function Ut() {
|
|
2792
|
-
return Ut = re(/* @__PURE__ */ K.mark(function t(e, r) {
|
|
2793
|
-
return K.wrap(function(i) {
|
|
2794
|
-
for (; ; )
|
|
2795
|
-
switch (i.prev = i.next) {
|
|
2796
|
-
case 0:
|
|
2797
|
-
if (typeof e != "function") {
|
|
2798
|
-
i.next = 4;
|
|
2799
|
-
break;
|
|
2800
|
-
}
|
|
2801
|
-
return i.next = 3, e();
|
|
2802
|
-
case 3:
|
|
2803
|
-
e = i.sent;
|
|
2804
|
-
case 4:
|
|
2805
|
-
return i.abrupt("return", r(e));
|
|
2806
|
-
case 5:
|
|
2807
|
-
case "end":
|
|
2808
|
-
return i.stop();
|
|
2809
|
-
}
|
|
2810
|
-
}, t);
|
|
2811
|
-
})), Ut.apply(this, arguments);
|
|
2812
|
-
}
|
|
2813
|
-
function Ds(t) {
|
|
2814
|
-
if (t != null)
|
|
2815
|
-
return Array.isArray(t) ? t.filter(Us).map(function(e) {
|
|
2816
|
-
return e.toString();
|
|
2817
|
-
}) : ei(t) ? t : t.toString();
|
|
2818
|
-
}
|
|
2819
|
-
function Rs(t) {
|
|
2820
|
-
return parseFloat(Number(Array.isArray(t) ? t[0] : t));
|
|
2821
|
-
}
|
|
2822
|
-
function Us(t) {
|
|
2823
|
-
return t !== null && typeof t < "u";
|
|
2824
|
-
}
|
|
2825
|
-
function ei(t) {
|
|
2826
|
-
return t == null;
|
|
2827
|
-
}
|
|
2828
|
-
var zt = "_session.start", nt = "_session.stop", ti = "pageView";
|
|
2829
|
-
function zs(t) {
|
|
2830
|
-
return Vt.apply(this, arguments);
|
|
2831
|
-
}
|
|
2832
|
-
function Vt() {
|
|
2833
|
-
return Vt = re(/* @__PURE__ */ K.mark(function t(e) {
|
|
2834
|
-
var r, n, i, s, a, o, u, l, f, p, g, b, S, I, w, y, d, E, v, m, T, x, A, $, k, _, z, V, C, O, W, R = arguments;
|
|
2835
|
-
return K.wrap(function(c) {
|
|
2836
|
-
for (; ; )
|
|
2837
|
-
switch (c.prev = c.next) {
|
|
2838
|
-
case 0:
|
|
2839
|
-
if (r = R.length > 1 && R[1] !== void 0 ? R[1] : {}, n = R.length > 2 && R[2] !== void 0 ? R[2] : {}, i = n.appTitle, s = n.appPackageName, a = n.appVersionCode, o = n.eventMapping, u = n.enrichEventAttributes, l = n.enrichEventMetrics, f = n.debug, p = f ? console.log : function() {
|
|
2840
|
-
}, g = _s(e, o), b = De(), S = r.sessionId || b.id, I = r.sessionStart || b.createdAt, w = r.sessionStart ? new Date(r.sessionStart).getTime() : b.created, p("event sessionData ", JSON.stringify(b)), ve && (y = er(), d = Fn(), p("event pageSessionInfo", JSON.stringify(y)), p("event tabSessionData ", JSON.stringify(d))), E = r.attributes || {}, v = r.eventId || be(), m = r.time ? new Date(r.time) : /* @__PURE__ */ new Date(), T = m.toISOString(), x = m.getTime() - w, A = F({
|
|
2841
|
-
date: T,
|
|
2842
|
-
sessionId: S
|
|
2843
|
-
}, ve ? {
|
|
2844
|
-
pageSession: y.id
|
|
2845
|
-
} : {}), !u) {
|
|
2846
|
-
c.next = 23;
|
|
2847
|
-
break;
|
|
2848
|
-
}
|
|
2849
|
-
return c.next = 20, u();
|
|
2850
|
-
case 20:
|
|
2851
|
-
c.t0 = c.sent, c.next = 24;
|
|
2852
|
-
break;
|
|
2853
|
-
case 23:
|
|
2854
|
-
c.t0 = {};
|
|
2855
|
-
case 24:
|
|
2856
|
-
if ($ = c.t0, k = F(F(F({}, A), $), E), _ = r.metrics || {}, z = {
|
|
2857
|
-
/* Time of session */
|
|
2858
|
-
sessionTime: b.elapsed || x,
|
|
2859
|
-
/* Date metrics */
|
|
2860
|
-
hour: m.getHours(),
|
|
2861
|
-
day: m.getDay() + 1,
|
|
2862
|
-
month: m.getMonth() + 1,
|
|
2863
|
-
year: m.getFullYear()
|
|
2864
|
-
}, !l) {
|
|
2865
|
-
c.next = 34;
|
|
2866
|
-
break;
|
|
2867
|
-
}
|
|
2868
|
-
return c.next = 31, l();
|
|
2869
|
-
case 31:
|
|
2870
|
-
c.t1 = c.sent, c.next = 35;
|
|
2871
|
-
break;
|
|
2872
|
-
case 34:
|
|
2873
|
-
c.t1 = {};
|
|
2874
|
-
case 35:
|
|
2875
|
-
return V = c.t1, C = F(F(F({}, z), V), _), c.next = 39, _t(k);
|
|
2876
|
-
case 39:
|
|
2877
|
-
return c.t2 = c.sent, c.next = 42, Qn(C);
|
|
2878
|
-
case 42:
|
|
2879
|
-
return c.t3 = c.sent, O = {
|
|
2880
|
-
attributes: c.t2,
|
|
2881
|
-
metrics: c.t3
|
|
2882
|
-
}, p("".concat(v, ":").concat(g)), p("eventAttributes", O.attributes), p("eventMetrics", O.metrics), ve && p("clientInfo", rr()), W = Qt({}, v, F(F({
|
|
2883
|
-
/* The name of the event */
|
|
2884
|
-
EventType: g,
|
|
2885
|
-
/* The date and time, in ISO 8601 format, when the event occurred. */
|
|
2886
|
-
Timestamp: T,
|
|
2887
|
-
/* The package name of the app that's recording the event. */
|
|
2888
|
-
AppPackageName: s,
|
|
2889
|
-
/* The title of the app that's recording the event. */
|
|
2890
|
-
AppTitle: i
|
|
2891
|
-
}, a ? {
|
|
2892
|
-
AppVersionCode: a
|
|
2893
|
-
} : {}), {}, {
|
|
2894
|
-
/* Event attributes - One or more custom attributes that are associated with the event. */
|
|
2895
|
-
Attributes: O.attributes,
|
|
2896
|
-
/* The version of the SDK that's running on the client device. */
|
|
2897
|
-
// ClientSdkVersion: 'STRING_VALUE',
|
|
2898
|
-
/* The name of the SDK that's being used to record the event. */
|
|
2899
|
-
// SdkName: 'STRING_VALUE',
|
|
2900
|
-
/* Event metrics - One or more custom metrics that are associated with the event. */
|
|
2901
|
-
Metrics: O.metrics,
|
|
2902
|
-
Session: {
|
|
2903
|
-
/* SessionId is required */
|
|
2904
|
-
Id: S,
|
|
2905
|
-
/* StartTimestamp is required */
|
|
2906
|
-
StartTimestamp: I
|
|
2907
|
-
// ISOString
|
|
2908
|
-
}
|
|
2909
|
-
})), e === nt && (W[v].Session.Duration = x, W[v].Session.StopTimestamp = T), c.abrupt("return", W);
|
|
2910
|
-
case 51:
|
|
2911
|
-
case "end":
|
|
2912
|
-
return c.stop();
|
|
2913
|
-
}
|
|
2914
|
-
}, t);
|
|
2915
|
-
})), Vt.apply(this, arguments);
|
|
2916
|
-
}
|
|
2917
|
-
var Vs = "__endpoint";
|
|
2918
|
-
function it(t) {
|
|
2919
|
-
return "".concat(Vs, ".").concat(t);
|
|
2920
|
-
}
|
|
2921
|
-
var nn = "__endpoint", an = !1;
|
|
2922
|
-
function nr() {
|
|
2923
|
-
return Lt.apply(this, arguments);
|
|
2924
|
-
}
|
|
2925
|
-
function Lt() {
|
|
2926
|
-
return Lt = re(/* @__PURE__ */ K.mark(function t() {
|
|
2927
|
-
var e, r, n, i, s, a, o, u, l, f, p, g, b, S, I, w, y, d, E, v, m, T = arguments;
|
|
2928
|
-
return K.wrap(function(A) {
|
|
2929
|
-
for (; ; )
|
|
2930
|
-
switch (A.prev = A.next) {
|
|
2931
|
-
case 0:
|
|
2932
|
-
return e = T.length > 0 && T[0] !== void 0 ? T[0] : {}, r = T.length > 1 && T[1] !== void 0 ? T[1] : {}, n = r.getUserId, i = r.getEndpointId, s = r.endpointMigration, a = Fs(r), o = a.sessionKey ? a.sessionKey() : "sessions", u = a.pageViewKey ? a.pageViewKey() : "pageViews", ve && (p = rr(), l = er(), f = l.id), g = De(), A.next = 10, i();
|
|
2933
|
-
case 10:
|
|
2934
|
-
if (b = A.sent, an || (an = !0, S = Gt(nn), S && (Pt(b, S), Rn(nn))), I = Ls(b), w = qs(r), y = Ws(w, p), d = {
|
|
2935
|
-
Attributes: {},
|
|
2936
|
-
Demographic: y,
|
|
2937
|
-
Location: {
|
|
2938
|
-
/*
|
|
2939
|
-
City: 'STRING_VALUE',
|
|
2940
|
-
Country: 'STRING_VALUE',
|
|
2941
|
-
Latitude: 'NUMBER_VALUE',
|
|
2942
|
-
Longitude: 'NUMBER_VALUE',
|
|
2943
|
-
PostalCode: 'STRING_VALUE',
|
|
2944
|
-
Region: 'STRING_VALUE'
|
|
2945
|
-
*/
|
|
2946
|
-
},
|
|
2947
|
-
Metrics: {
|
|
2948
|
-
// [`${sessionKey}Unix`]: sessionData.Unix
|
|
2949
|
-
}
|
|
2950
|
-
/** Indicates whether a user has opted out of receiving messages with one of the following values:
|
|
2951
|
-
* ALL - User has opted out of all messages.
|
|
2952
|
-
* NONE - Users has not opted out and receives all messages.
|
|
2953
|
-
*/
|
|
2954
|
-
// OptOut: 'STRING_VALUE',
|
|
2955
|
-
}, ve && (p.device && p.device.vendor && (d.Attributes.DeviceMake = [p.device.vendor]), p.device && p.device.model && (d.Attributes.DeviceModel = [p.device.model]), p.device && p.device.type && (d.Attributes.DeviceType = [p.device.type])), e = ls.all([I, d, e], {
|
|
2956
|
-
arrayMerge: Gs
|
|
2957
|
-
// TODO maybe change array merge
|
|
2958
|
-
}), !(e.User && e.User.UserId)) {
|
|
2959
|
-
A.next = 23;
|
|
2960
|
-
break;
|
|
2961
|
-
}
|
|
2962
|
-
return A.next = 21, n();
|
|
2963
|
-
case 21:
|
|
2964
|
-
E = A.sent, e.User.UserId !== E && (e.User.UserId = E);
|
|
2965
|
-
case 23:
|
|
2966
|
-
if (!(!e.User || !e.User.UserId)) {
|
|
2967
|
-
A.next = 28;
|
|
2968
|
-
break;
|
|
2969
|
-
}
|
|
2970
|
-
return A.next = 26, n();
|
|
2971
|
-
case 26:
|
|
2972
|
-
v = A.sent, v && (e.User = e.User || {}, e.User.UserId = v);
|
|
2973
|
-
case 28:
|
|
2974
|
-
if (!(e.User && e.User.UserAttributes)) {
|
|
2975
|
-
A.next = 32;
|
|
2976
|
-
break;
|
|
2977
|
-
}
|
|
2978
|
-
return A.next = 31, _t(e.User.UserAttributes, !0);
|
|
2979
|
-
case 31:
|
|
2980
|
-
e.User.UserAttributes = A.sent;
|
|
2981
|
-
case 32:
|
|
2982
|
-
return A.next = 34, _t(e.Attributes, !0);
|
|
2983
|
-
case 34:
|
|
2984
|
-
return e.Attributes = A.sent, A.next = 37, Qn(e.Metrics);
|
|
2985
|
-
case 37:
|
|
2986
|
-
if (e.Metrics = A.sent, e.Metrics[o] || (e.Metrics[o] = 1), e.Metrics[u] || (e.Metrics[u] = 1), s && (e = s(b, e)), m = e.Attributes.lastSession, m) {
|
|
2987
|
-
A.next = 47;
|
|
2988
|
-
break;
|
|
2989
|
-
}
|
|
2990
|
-
return e.Attributes.lastSessionDate = [g.createdAt], e.Attributes.lastSession = [g.id], f && (e.Attributes.lastPageSession = [f]), A.abrupt("return", Pt(b, e));
|
|
2991
|
-
case 47:
|
|
2992
|
-
return m && m[0] !== g.id && (e.Attributes.lastSessionDate = [g.createdAt], e.Attributes.lastSession = [g.id], e.Metrics[o] += 1), e.Attributes && e.Attributes.lastPageSession && Array.isArray(e.Attributes.lastPageSession) && e.Attributes.lastPageSession.length > 0 && e.Attributes.lastPageSession[0] !== f && (e.Attributes.lastPageSession = [f], e.Metrics[u] += 1), A.abrupt("return", Pt(b, e));
|
|
2993
|
-
case 50:
|
|
2994
|
-
case "end":
|
|
2995
|
-
return A.stop();
|
|
2996
|
-
}
|
|
2997
|
-
}, t);
|
|
2998
|
-
})), Lt.apply(this, arguments);
|
|
2999
|
-
}
|
|
3000
|
-
function Pt(t, e) {
|
|
3001
|
-
var r = it(t), n = os(e) ? e : JSON.stringify(e);
|
|
3002
|
-
return Da(r, n), e;
|
|
3003
|
-
}
|
|
3004
|
-
function Ls(t) {
|
|
3005
|
-
try {
|
|
3006
|
-
return JSON.parse(Gt(it(t))) || {};
|
|
3007
|
-
} catch {
|
|
3008
|
-
}
|
|
3009
|
-
return {};
|
|
3010
|
-
}
|
|
3011
|
-
function Ws(t, e) {
|
|
3012
|
-
return ve ? Ks(t, e) : Hs(t);
|
|
3013
|
-
}
|
|
3014
|
-
function Hs(t) {
|
|
3015
|
-
var e = {
|
|
3016
|
-
AppVersion: t,
|
|
3017
|
-
Make: "generic server",
|
|
3018
|
-
Platform: "Node.js",
|
|
3019
|
-
PlatformVersion: process.version
|
|
3020
|
-
};
|
|
3021
|
-
return e;
|
|
3022
|
-
}
|
|
3023
|
-
function Ks(t, e) {
|
|
3024
|
-
var r = {
|
|
3025
|
-
// AppTitle/0.0.0. Maps to application.version_name in kinesis stream
|
|
3026
|
-
AppVersion: t,
|
|
3027
|
-
/* The locale of the endpoint, in the following format:
|
|
3028
|
-
the ISO 639-1 alpha-2 code, followed by an underscore (_),
|
|
3029
|
-
followed by an ISO 3166-1 alpha-2 value.
|
|
3030
|
-
*/
|
|
3031
|
-
Locale: e.language,
|
|
3032
|
-
// Maker - Google/Mozilla/Apple
|
|
3033
|
-
Make: e.make,
|
|
3034
|
-
// Model - Safari/Chrome/Brave/Opera
|
|
3035
|
-
Model: e.model,
|
|
3036
|
-
// ModelVersion - 91.0.0
|
|
3037
|
-
ModelVersion: e.version,
|
|
3038
|
-
// Platform - os name
|
|
3039
|
-
Platform: e.os.name || e.platform
|
|
3040
|
-
// PlatformVersion: browserVersion,
|
|
3041
|
-
// Timezone: 'STRING_VALUE'
|
|
3042
|
-
};
|
|
3043
|
-
return e.os && e.os.version && (r.PlatformVersion = e.os.version), r;
|
|
3044
|
-
}
|
|
3045
|
-
function qs(t) {
|
|
3046
|
-
var e = t.appTitle || t.appPackageName || "", r = t.appVersionCode || "0.0.0";
|
|
3047
|
-
return e ? "".concat(e, "@").concat(r) : r;
|
|
3048
|
-
}
|
|
3049
|
-
function Gs(t, e) {
|
|
3050
|
-
return e;
|
|
3051
|
-
}
|
|
3052
|
-
function Fs(t) {
|
|
3053
|
-
var e = t.getContext;
|
|
3054
|
-
return typeof e == "function" ? e() : e;
|
|
3055
|
-
}
|
|
3056
|
-
function Bs(t) {
|
|
3057
|
-
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
3058
|
-
return /* @__PURE__ */ (function() {
|
|
3059
|
-
var r = re(/* @__PURE__ */ K.mark(function i(s) {
|
|
3060
|
-
var a, o, u, l, f = arguments;
|
|
3061
|
-
return K.wrap(function(g) {
|
|
3062
|
-
for (; ; )
|
|
3063
|
-
switch (g.prev = g.next) {
|
|
3064
|
-
case 0:
|
|
3065
|
-
return a = f.length > 1 && f[1] !== void 0 ? f[1] : {}, o = f.length > 2 && f[2] !== void 0 ? f[2] : {}, u = f.length > 3 && f[3] !== void 0 ? f[3] : !1, Kr(a) && (a = {}, u = a), Kr(o) && (o = {}, u = o), g.next = 7, zs(s, a, e);
|
|
3066
|
-
case 7:
|
|
3067
|
-
if (l = g.sent, !(Object.entries(o).length || s === ti)) {
|
|
3068
|
-
g.next = 12;
|
|
3069
|
-
break;
|
|
3070
|
-
}
|
|
3071
|
-
return g.next = 11, nr(o, e);
|
|
3072
|
-
case 11:
|
|
3073
|
-
o = g.sent;
|
|
3074
|
-
case 12:
|
|
3075
|
-
if (t.push(l), !u) {
|
|
3076
|
-
g.next = 17;
|
|
3077
|
-
break;
|
|
3078
|
-
}
|
|
3079
|
-
return g.abrupt("return", t.flush());
|
|
3080
|
-
case 17:
|
|
3081
|
-
case "end":
|
|
3082
|
-
return g.stop();
|
|
3083
|
-
}
|
|
3084
|
-
}, i);
|
|
3085
|
-
}));
|
|
3086
|
-
function n(i) {
|
|
3087
|
-
return r.apply(this, arguments);
|
|
3088
|
-
}
|
|
3089
|
-
return n;
|
|
3090
|
-
})();
|
|
3091
|
-
}
|
|
3092
|
-
var sn, Ys = [429, 500], Xs = [202], Js = 400;
|
|
3093
|
-
function Qs(t, e) {
|
|
3094
|
-
return Wt.apply(this, arguments);
|
|
3095
|
-
}
|
|
3096
|
-
function Wt() {
|
|
3097
|
-
return Wt = re(/* @__PURE__ */ K.mark(function t(e, r) {
|
|
3098
|
-
var n, i, s, a, o, u, l, f, p, g, b, S, I, w, y, d, E, v, m;
|
|
3099
|
-
return K.wrap(function(x) {
|
|
3100
|
-
for (; ; )
|
|
3101
|
-
switch (x.prev = x.next) {
|
|
3102
|
-
case 0:
|
|
3103
|
-
return n = r.pinpointRegion, i = r.pinpointAppId, s = r.lambdaArn, a = r.lambdaRegion, o = r.credentials, u = r.getCredentials, l = r.debug, x.next = 3, Zs(o, u);
|
|
3104
|
-
case 3:
|
|
3105
|
-
return f = x.sent, l && console.log("pinpoint auth", f), p = a || n, g = n || a, b = r.fips === !0 ? "-fips" : "", S = "https://lambda.".concat(p, ".amazonaws.com/2015-03-31/functions/").concat(s, "/invocations"), I = "https://pinpoint".concat(b, ".").concat(g, ".amazonaws.com/v1/apps/").concat(i, "/events"), w = s ? S : I, E = {
|
|
3106
|
-
body: JSON.stringify(e)
|
|
3107
|
-
}, y = new ps(f), x.next = 16, y.fetch(w, E).then(function(A) {
|
|
3108
|
-
return A.json();
|
|
3109
|
-
});
|
|
3110
|
-
case 16:
|
|
3111
|
-
d = x.sent, x.next = 24;
|
|
3112
|
-
break;
|
|
3113
|
-
case 19:
|
|
3114
|
-
return y = new sn.PinpointClient({
|
|
3115
|
-
credentials: f,
|
|
3116
|
-
region: n
|
|
3117
|
-
}), v = new sn.PutEventsCommand({
|
|
3118
|
-
ApplicationId: i,
|
|
3119
|
-
EventsRequest: e
|
|
3120
|
-
}), x.next = 23, y.send(v);
|
|
3121
|
-
case 23:
|
|
3122
|
-
d = x.sent;
|
|
3123
|
-
case 24:
|
|
3124
|
-
return d && d.Results && (m = Object.keys(d.Results).map(function(A) {
|
|
3125
|
-
return d.Results[A];
|
|
3126
|
-
}), m.forEach(function(A) {
|
|
3127
|
-
var $ = A.EndpointItemResponse || {}, k = A.EventsItemResponse || {};
|
|
3128
|
-
Object.keys($).length && (Xs.includes($.StatusCode) || Ys.includes($.StatusCode) || eo($, Endpoint));
|
|
3129
|
-
var _ = Object.keys(k);
|
|
3130
|
-
_.length && _.forEach(function(z) {
|
|
3131
|
-
});
|
|
3132
|
-
})), x.abrupt("return", d);
|
|
3133
|
-
case 26:
|
|
3134
|
-
case "end":
|
|
3135
|
-
return x.stop();
|
|
3136
|
-
}
|
|
3137
|
-
}, t);
|
|
3138
|
-
})), Wt.apply(this, arguments);
|
|
3139
|
-
}
|
|
3140
|
-
function Zs(t, e) {
|
|
3141
|
-
return Ht.apply(this, arguments);
|
|
3142
|
-
}
|
|
3143
|
-
function Ht() {
|
|
3144
|
-
return Ht = re(/* @__PURE__ */ K.mark(function t(e, r) {
|
|
3145
|
-
var n, i;
|
|
3146
|
-
return K.wrap(function(a) {
|
|
3147
|
-
for (; ; )
|
|
3148
|
-
switch (a.prev = a.next) {
|
|
3149
|
-
case 0:
|
|
3150
|
-
if (n = e, !(!Object.keys(n).length && r)) {
|
|
3151
|
-
a.next = 11;
|
|
3152
|
-
break;
|
|
3153
|
-
}
|
|
3154
|
-
return a.prev = 2, a.next = 5, r();
|
|
3155
|
-
case 5:
|
|
3156
|
-
n = a.sent, a.next = 11;
|
|
3157
|
-
break;
|
|
3158
|
-
case 8:
|
|
3159
|
-
throw a.prev = 8, a.t0 = a.catch(2), new Error(a.t0);
|
|
3160
|
-
case 11:
|
|
3161
|
-
return i = {
|
|
3162
|
-
// Support amplify and raw client auth params
|
|
3163
|
-
accessKeyId: n.accessKeyId || n.AccessKeyId,
|
|
3164
|
-
secretAccessKey: n.secretAccessKey || n.SecretKey,
|
|
3165
|
-
sessionToken: n.sessionToken || n.SessionToken,
|
|
3166
|
-
retries: 5
|
|
3167
|
-
}, a.abrupt("return", i);
|
|
3168
|
-
case 13:
|
|
3169
|
-
case "end":
|
|
3170
|
-
return a.stop();
|
|
3171
|
-
}
|
|
3172
|
-
}, t, null, [[2, 8]]);
|
|
3173
|
-
})), Ht.apply(this, arguments);
|
|
3174
|
-
}
|
|
3175
|
-
function eo(t, e) {
|
|
3176
|
-
var r = t.StatusCode, n = t.Message;
|
|
3177
|
-
if (r === Js) {
|
|
3178
|
-
if (n.startsWith("Missing ChannelType"))
|
|
3179
|
-
throw new Error("Missing ChannelType");
|
|
3180
|
-
if (n.startsWith("Exceeded maximum endpoint per user count"))
|
|
3181
|
-
throw new Error("Exceeded maximum endpoint per user count");
|
|
3182
|
-
}
|
|
3183
|
-
}
|
|
3184
|
-
var to = [
|
|
3185
|
-
"PUSH",
|
|
3186
|
-
"GCM",
|
|
3187
|
-
"APNS",
|
|
3188
|
-
"APNS_SANDBOX",
|
|
3189
|
-
"APNS_VOIP",
|
|
3190
|
-
"APNS_VOIP_SANDBOX",
|
|
3191
|
-
"ADM",
|
|
3192
|
-
"SMS",
|
|
3193
|
-
"VOICE",
|
|
3194
|
-
"EMAIL",
|
|
3195
|
-
"BAIDU",
|
|
3196
|
-
"CUSTOM"
|
|
3197
|
-
// 'IN_APP' what is this?
|
|
3198
|
-
], xt = to.reduce(function(t, e) {
|
|
3199
|
-
return t[e] = e, t;
|
|
3200
|
-
}, {}), ro = rr(), on = zt, un = nt, no = /.+\@.+\..+/;
|
|
3201
|
-
function io(t) {
|
|
3202
|
-
return no.test(t);
|
|
3203
|
-
}
|
|
3204
|
-
function ao() {
|
|
3205
|
-
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = t.getEndpointId, r = t.debug;
|
|
3206
|
-
return /* @__PURE__ */ (function() {
|
|
3207
|
-
var n = re(/* @__PURE__ */ K.mark(function s() {
|
|
3208
|
-
var a, o, u, l, f, p, g, b, S, I, w = arguments;
|
|
3209
|
-
return K.wrap(function(d) {
|
|
3210
|
-
for (; ; )
|
|
3211
|
-
switch (d.prev = d.next) {
|
|
3212
|
-
case 0:
|
|
3213
|
-
return a = w.length > 0 && w[0] !== void 0 ? w[0] : [], o = w.length > 1 && w[1] !== void 0 ? w[1] : {}, d.next = 4, e();
|
|
3214
|
-
case 4:
|
|
3215
|
-
if (u = d.sent, u) {
|
|
3216
|
-
d.next = 8;
|
|
3217
|
-
break;
|
|
3218
|
-
}
|
|
3219
|
-
return console.error("No endpoint id. check getEndpointId()"), d.abrupt("return");
|
|
3220
|
-
case 8:
|
|
3221
|
-
if (l = ee(o) === "object" && Object.keys(o).length, l) {
|
|
3222
|
-
d.next = 13;
|
|
3223
|
-
break;
|
|
3224
|
-
}
|
|
3225
|
-
d.t0 = so(u), d.next = 16;
|
|
3226
|
-
break;
|
|
3227
|
-
case 13:
|
|
3228
|
-
return d.next = 15, nr(o, t);
|
|
3229
|
-
case 15:
|
|
3230
|
-
d.t0 = d.sent;
|
|
3231
|
-
case 16:
|
|
3232
|
-
return f = d.t0, p = f.ChannelType, f.Address && io(f.Address) && (p = xt.EMAIL), !p && f.Address && (ro.platform === "android" ? p = p || xt.GCM : p = p || xt.APNS), r && (console.log("Endpoint", f), console.log("CHANNEL_TYPE", p)), f.RequestId = be(), f.ChannelType = p, f.Address && (f.OptOut = f.OptOut || "NONE"), g = oo(a), b = uo(u, f, g), d.prev = 26, d.next = 29, Qs(b, t);
|
|
3233
|
-
case 29:
|
|
3234
|
-
S = d.sent, d.next = 36;
|
|
3235
|
-
break;
|
|
3236
|
-
case 32:
|
|
3237
|
-
d.prev = 32, d.t1 = d.catch(26), console.log("Error calling AWS", d.t1), I = d.t1;
|
|
3238
|
-
case 36:
|
|
3239
|
-
return d.abrupt("return", {
|
|
3240
|
-
endpoint: f,
|
|
3241
|
-
response: S,
|
|
3242
|
-
error: I,
|
|
3243
|
-
events: a
|
|
3244
|
-
});
|
|
3245
|
-
case 37:
|
|
3246
|
-
case "end":
|
|
3247
|
-
return d.stop();
|
|
3248
|
-
}
|
|
3249
|
-
}, s, null, [[26, 32]]);
|
|
3250
|
-
}));
|
|
3251
|
-
function i() {
|
|
3252
|
-
return n.apply(this, arguments);
|
|
3253
|
-
}
|
|
3254
|
-
return i;
|
|
3255
|
-
})();
|
|
3256
|
-
}
|
|
3257
|
-
function so(t) {
|
|
3258
|
-
try {
|
|
3259
|
-
return JSON.parse(Gt(it(t))) || {};
|
|
3260
|
-
} catch {
|
|
3261
|
-
}
|
|
3262
|
-
return {};
|
|
3263
|
-
}
|
|
3264
|
-
function oo(t) {
|
|
3265
|
-
return t.sort(function(e, r) {
|
|
3266
|
-
var n = e.EventType, i = r.EventType;
|
|
3267
|
-
if (n == on) return -1;
|
|
3268
|
-
if (i == on || n == un) return 1;
|
|
3269
|
-
if (i == un) return -1;
|
|
3270
|
-
}).reduce(function(e, r) {
|
|
3271
|
-
return F(F({}, r), e);
|
|
3272
|
-
}, {});
|
|
3273
|
-
}
|
|
3274
|
-
function uo(t, e, r) {
|
|
3275
|
-
return {
|
|
3276
|
-
BatchItem: Qt({}, t, {
|
|
3277
|
-
Endpoint: e,
|
|
3278
|
-
Events: r
|
|
3279
|
-
})
|
|
3280
|
-
};
|
|
3281
|
-
}
|
|
3282
|
-
var co = nt;
|
|
3283
|
-
function ri() {
|
|
3284
|
-
return {};
|
|
3285
|
-
}
|
|
3286
|
-
function lo() {
|
|
3287
|
-
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = F({
|
|
3288
|
-
getContext: t.getContext || ri,
|
|
3289
|
-
credentials: t.credentials || {},
|
|
3290
|
-
getEndpointId: t.getEndpointId
|
|
3291
|
-
}, t), r = e.debug ? console.log : function() {
|
|
3292
|
-
}, n = ao(e), i = ns(/* @__PURE__ */ (function() {
|
|
3293
|
-
var u = re(/* @__PURE__ */ K.mark(function l(f, p) {
|
|
3294
|
-
var g;
|
|
3295
|
-
return K.wrap(function(S) {
|
|
3296
|
-
for (; ; )
|
|
3297
|
-
switch (S.prev = S.next) {
|
|
3298
|
-
case 0:
|
|
3299
|
-
return f.forEach(function(I) {
|
|
3300
|
-
return r("> Queue event", I);
|
|
3301
|
-
}), S.next = 3, n(f, {});
|
|
3302
|
-
case 3:
|
|
3303
|
-
g = S.sent, r("> Queue response", g);
|
|
3304
|
-
case 5:
|
|
3305
|
-
case "end":
|
|
3306
|
-
return S.stop();
|
|
3307
|
-
}
|
|
3308
|
-
}, l);
|
|
3309
|
-
}));
|
|
3310
|
-
return function(l, f) {
|
|
3311
|
-
return u.apply(this, arguments);
|
|
3312
|
-
};
|
|
3313
|
-
})(), {
|
|
3314
|
-
max: 10,
|
|
3315
|
-
// limit... event limit is 100 for pinpoint
|
|
3316
|
-
interval: t.flushInterval || 3e3,
|
|
3317
|
-
// 3s
|
|
3318
|
-
throttle: !0
|
|
3319
|
-
// Ensure only max is processed at interval
|
|
3320
|
-
// onPause: (queue) => {},
|
|
3321
|
-
// onEmpty: () => {}
|
|
3322
|
-
}), s = Bs(i, e);
|
|
3323
|
-
nr({}, t);
|
|
3324
|
-
var a = fo(s);
|
|
3325
|
-
function o(u) {
|
|
3326
|
-
return n([], u);
|
|
3327
|
-
}
|
|
3328
|
-
return {
|
|
3329
|
-
updateEndpoint: o,
|
|
3330
|
-
recordEvent: s,
|
|
3331
|
-
disable: function() {
|
|
3332
|
-
a();
|
|
3333
|
-
}
|
|
3334
|
-
};
|
|
3335
|
-
}
|
|
3336
|
-
function fo(t) {
|
|
3337
|
-
if (!ve)
|
|
3338
|
-
return ri;
|
|
3339
|
-
var e = po(t);
|
|
3340
|
-
return window.addEventListener("beforeunload", e), function() {
|
|
3341
|
-
return window.removeEventListener("beforeunload", e);
|
|
3342
|
-
};
|
|
3343
|
-
}
|
|
3344
|
-
function po(t) {
|
|
3345
|
-
return function() {
|
|
3346
|
-
t(co, !0);
|
|
3347
|
-
};
|
|
3348
|
-
}
|
|
3349
|
-
function Tt() {
|
|
3350
|
-
throw new Error("Pinpoint not loaded");
|
|
3351
|
-
}
|
|
3352
|
-
function go(t) {
|
|
3353
|
-
return Object.keys(t).reduce(function(e, r) {
|
|
3354
|
-
var n = t[r];
|
|
3355
|
-
return typeof n == "number" && (e.metrics[r] = n), (typeof n == "string" || typeof n == "boolean") && (e.attributes[r] = n), e;
|
|
3356
|
-
}, {
|
|
3357
|
-
attributes: {},
|
|
3358
|
-
metrics: {}
|
|
3359
|
-
});
|
|
3360
|
-
}
|
|
3361
|
-
function ho(t) {
|
|
3362
|
-
var e = t.config, r = t.instance;
|
|
3363
|
-
e && e.disableAnonymousTraffic && !r.user("userId") && r.once("identifyStart", function(n) {
|
|
3364
|
-
var i = n.plugins, s = i["aws-pinpoint"];
|
|
3365
|
-
s.loaded() || r.loadPlugin("aws-pinpoint");
|
|
3366
|
-
});
|
|
3367
|
-
}
|
|
3368
|
-
var mo = {
|
|
3369
|
-
/* Disable anonymous MTU */
|
|
3370
|
-
disableAnonymousTraffic: !1,
|
|
3371
|
-
// Pinpoint service region
|
|
3372
|
-
pinpointRegion: "us-east-1",
|
|
3373
|
-
// Custom event mapping
|
|
3374
|
-
eventMapping: {}
|
|
3375
|
-
};
|
|
3376
|
-
function vo() {
|
|
3377
|
-
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e, r, n = !1;
|
|
3378
|
-
function i() {
|
|
3379
|
-
var a = De();
|
|
3380
|
-
t.debug && console.log("Stop session", a), e(nt, !0);
|
|
3381
|
-
}
|
|
3382
|
-
function s() {
|
|
3383
|
-
var a = Ye(30);
|
|
3384
|
-
t.debug && console.log("START SESSION", a), e(zt);
|
|
3385
|
-
}
|
|
3386
|
-
return {
|
|
3387
|
-
name: "aws-pinpoint",
|
|
3388
|
-
config: F(F({}, mo), t),
|
|
3389
|
-
bootstrap: ho,
|
|
3390
|
-
initialize: function(o) {
|
|
3391
|
-
var u = o.config, l = o.instance, f = u.disableAnonymousTraffic, p = u.debug, g = p ? console.log : function() {
|
|
3392
|
-
}, b = l.getState(), S = b.user || {}, I = S.userId, w = S.anonymousId, y = b.context || {}, d = y.app, E = y.version, v = y.campaign, m = er(), T = Fn(), x = De();
|
|
3393
|
-
if (g("initPageSession", m), g("initTabSession", T), g("initSessionData", x), x && x.anonId && x.anonId !== w) {
|
|
3394
|
-
g("anonId different refresh session details"), Hr(), ss();
|
|
3395
|
-
var A = Ye(30, {
|
|
3396
|
-
anonId: w,
|
|
3397
|
-
userId: I
|
|
3398
|
-
});
|
|
3399
|
-
g("newSessionForNewUser", A);
|
|
3400
|
-
}
|
|
3401
|
-
if (!I && f)
|
|
3402
|
-
return !1;
|
|
3403
|
-
var $ = Object.keys(v).reduce(function(V, C) {
|
|
3404
|
-
return V["utm_".concat(C)] = v[C], V;
|
|
3405
|
-
}, {}), k = lo(F(F({}, u), {}, {
|
|
3406
|
-
// The title of the app that's recording the event.
|
|
3407
|
-
appTitle: u.appTitle || d,
|
|
3408
|
-
// The package name of the app that's recording the event.
|
|
3409
|
-
appPackageName: u.appPackageName || d,
|
|
3410
|
-
// The version number of the app that's recording the event.
|
|
3411
|
-
appVersionCode: u.appVersionCode || E,
|
|
3412
|
-
// Custom event mapping
|
|
3413
|
-
eventMapping: u.eventMapping,
|
|
3414
|
-
// Get pinpoint endpoint ID
|
|
3415
|
-
getEndpointId: function() {
|
|
3416
|
-
return l.user("anonymousId");
|
|
3417
|
-
},
|
|
3418
|
-
getUserId: function() {
|
|
3419
|
-
return l.user("userId");
|
|
3420
|
-
},
|
|
3421
|
-
getContext: function() {
|
|
3422
|
-
return {
|
|
3423
|
-
sessionKey: u.sessionKey,
|
|
3424
|
-
pageViewKey: u.pageViewKey,
|
|
3425
|
-
initialSession: x
|
|
3426
|
-
// scrollDepth: scrollDepthNow,
|
|
3427
|
-
// scrollDepthMax
|
|
3428
|
-
};
|
|
3429
|
-
},
|
|
3430
|
-
enrichEventAttributes: function() {
|
|
3431
|
-
return F({
|
|
3432
|
-
anonId: l.user("anonymousId"),
|
|
3433
|
-
userId: l.user("userId"),
|
|
3434
|
-
hash: window.location.hash,
|
|
3435
|
-
path: window.location.pathname,
|
|
3436
|
-
referrer: document.referrer,
|
|
3437
|
-
search: window.location.search,
|
|
3438
|
-
title: document.title,
|
|
3439
|
-
host: window.location.hostname,
|
|
3440
|
-
url: window.location.origin + window.location.pathname
|
|
3441
|
-
}, $);
|
|
3442
|
-
},
|
|
3443
|
-
// Custom event mapping
|
|
3444
|
-
enrichUserAttributes: u.enrichUserAttributes,
|
|
3445
|
-
// Pass scroll into with all events
|
|
3446
|
-
enrichEventMetrics: function() {
|
|
3447
|
-
return {};
|
|
3448
|
-
}
|
|
3449
|
-
}));
|
|
3450
|
-
e = k.recordEvent, r = k.updateEndpoint, x && x.isNew && (g("Start brand new session because cookie not found"), e(zt));
|
|
3451
|
-
var _ = 18e5, z = _;
|
|
3452
|
-
Es({
|
|
3453
|
-
timeout: z,
|
|
3454
|
-
throttle: 2e4,
|
|
3455
|
-
onIdle: function(C, O) {
|
|
3456
|
-
g("Session idle. Active ".concat(C, " seconds")), i();
|
|
3457
|
-
},
|
|
3458
|
-
onWakeUp: function(C, O) {
|
|
3459
|
-
g("Session wakeup. Idle ".concat(C, " seconds")), s();
|
|
3460
|
-
},
|
|
3461
|
-
onHeartbeat: function(C, O) {
|
|
3462
|
-
g("ping session", /* @__PURE__ */ new Date()), g("total active time", C);
|
|
3463
|
-
var W = l.user();
|
|
3464
|
-
as(30, {
|
|
3465
|
-
anonId: W.anonymousId,
|
|
3466
|
-
userId: W.userId
|
|
3467
|
-
});
|
|
3468
|
-
}
|
|
3469
|
-
});
|
|
3470
|
-
},
|
|
3471
|
-
page: function(o) {
|
|
3472
|
-
if (o.payload, o.config, !e)
|
|
3473
|
-
return Tt();
|
|
3474
|
-
n && Hr(), e(ti), n = !0;
|
|
3475
|
-
},
|
|
3476
|
-
/* Track event & update endpoint details */
|
|
3477
|
-
track: function(o) {
|
|
3478
|
-
var u = o.payload, l = o.config;
|
|
3479
|
-
if (o.instance, !e)
|
|
3480
|
-
return Tt();
|
|
3481
|
-
if (!(l.disableAnonymousTraffic && !u.userId)) {
|
|
3482
|
-
var f = go(u.properties);
|
|
3483
|
-
e(u.event, f);
|
|
3484
|
-
}
|
|
3485
|
-
},
|
|
3486
|
-
/* Update endpoint details */
|
|
3487
|
-
identify: function(o) {
|
|
3488
|
-
var u = o.payload, l = u.userId, f = u.traits;
|
|
3489
|
-
if (!r)
|
|
3490
|
-
return Tt();
|
|
3491
|
-
var p = {}, g = {};
|
|
3492
|
-
l && (g.UserId = l), f && Object.keys(f).length && (g.UserAttributes = f), Object.keys(g).length && (p.User = g), r(p, !0);
|
|
3493
|
-
},
|
|
3494
|
-
/* Reset user details */
|
|
3495
|
-
reset: function(o) {
|
|
3496
|
-
var u = o.instance, l = u.user("anonymousId"), f = it(l);
|
|
3497
|
-
Rn(f);
|
|
3498
|
-
},
|
|
3499
|
-
loaded: function() {
|
|
3500
|
-
return !!e;
|
|
3501
|
-
}
|
|
3502
|
-
};
|
|
3503
|
-
}
|
|
3504
|
-
var yo = vo;
|
|
3505
|
-
function bo(t, e, r) {
|
|
3506
|
-
return r.reduce((n, i) => {
|
|
3507
|
-
const { action: s, targetProperty: a } = i;
|
|
3508
|
-
return s === "add" ? n[a] = {
|
|
3509
|
-
updatedAt: /* @__PURE__ */ new Date(),
|
|
3510
|
-
updatedBy: t
|
|
3511
|
-
} : s === "remove" && delete n[a], n;
|
|
3512
|
-
}, e);
|
|
3513
|
-
}
|
|
3514
|
-
async function wo({ id: t, authentication: e, username: r, accessChangeset: n }) {
|
|
3515
|
-
const { properties: i = {} } = await fn(t, {
|
|
3516
|
-
authentication: e
|
|
3517
|
-
}), s = i.telemetry, a = s === void 0 ? {} : s, { arcgis: { access: o = {} } = {} } = a, u = cn(a, ["arcgis"]), l = bo(r, o, n);
|
|
3518
|
-
return gi({
|
|
3519
|
-
item: {
|
|
3520
|
-
id: t,
|
|
3521
|
-
properties: Object.assign(Object.assign({}, i), { telemetry: Object.assign(Object.assign({}, u), { arcgis: {
|
|
3522
|
-
access: Object.assign({}, l)
|
|
3523
|
-
} }) })
|
|
3524
|
-
},
|
|
3525
|
-
authentication: e
|
|
3526
|
-
});
|
|
3527
|
-
}
|
|
3528
|
-
async function So({ id: t, authentication: e }) {
|
|
3529
|
-
const { properties: { telemetry: { arcgis: { access: r = {} } = {} } = {} } } = await fn(t, {
|
|
3530
|
-
authentication: e
|
|
3531
|
-
});
|
|
3532
|
-
return { access: r };
|
|
3533
|
-
}
|
|
3534
|
-
class Eo {
|
|
3535
|
-
constructor(e) {
|
|
3536
|
-
this.name = "amazon", this.isInitialized = !1;
|
|
3537
|
-
const { app: r = {}, fips: n, userPoolID: i } = e;
|
|
3538
|
-
this.analytics = Fa({
|
|
3539
|
-
app: r.name,
|
|
3540
|
-
version: r.version,
|
|
3541
|
-
plugins: [
|
|
3542
|
-
yo({
|
|
3543
|
-
fips: n,
|
|
3544
|
-
pinpointAppId: r.id,
|
|
3545
|
-
getCredentials: () => Ni(i, { fips: n })
|
|
3546
|
-
})
|
|
3547
|
-
]
|
|
3548
|
-
}), Object.assign(this, e);
|
|
3549
|
-
}
|
|
3550
|
-
init() {
|
|
3551
|
-
if (!this.isInitialized)
|
|
3552
|
-
return this.isInitialized = !0, Promise.resolve();
|
|
3553
|
-
}
|
|
3554
|
-
static async setAccessPermissions({ id: e, authentication: r, username: n, accessChangeset: i }) {
|
|
3555
|
-
return wo({
|
|
3556
|
-
id: e,
|
|
3557
|
-
authentication: r,
|
|
3558
|
-
username: n,
|
|
3559
|
-
accessChangeset: i
|
|
3560
|
-
});
|
|
3561
|
-
}
|
|
3562
|
-
static async getAccessPermissions({ id: e, authentication: r }) {
|
|
3563
|
-
return So({ id: e, authentication: r });
|
|
3564
|
-
}
|
|
3565
|
-
logPageView(e, r) {
|
|
3566
|
-
const n = Ri({
|
|
3567
|
-
page: e,
|
|
3568
|
-
previousPage: this.previousPage,
|
|
3569
|
-
options: r,
|
|
3570
|
-
dimensionLookup: this.dimensions,
|
|
3571
|
-
metricLookup: this.metrics
|
|
3572
|
-
}), { pageUrl: i, pageName: s } = n;
|
|
3573
|
-
this.previousPage = { pageUrl: i, pageName: s }, this.analytics.track("pageView", n);
|
|
3574
|
-
}
|
|
3575
|
-
logEvent(e = {}) {
|
|
3576
|
-
const r = Di({
|
|
3577
|
-
event: e,
|
|
3578
|
-
dimensionLookup: this.dimensions,
|
|
3579
|
-
metricLookup: this.metrics
|
|
3580
|
-
}), { name: n } = r;
|
|
3581
|
-
this.analytics.track(n, r);
|
|
3582
|
-
}
|
|
3583
|
-
}
|
|
3584
|
-
const Io = pi`:host{display:block}`;
|
|
3585
|
-
class Ao extends fi {
|
|
2
|
+
import { c as n } from "../../chunks/runtime.js";
|
|
3
|
+
import { Telemetry as a } from "@esri/telemetry";
|
|
4
|
+
import { GoogleAnalytics as r } from "@esri/telemetry-google-analytics";
|
|
5
|
+
import { Amazon as i } from "@esri/telemetry-amazon";
|
|
6
|
+
import { u as l } from "../../chunks/useT9n.js";
|
|
7
|
+
import { LitElement as m, createEvent as c } from "@arcgis/lumina";
|
|
8
|
+
import { css as p } from "lit";
|
|
9
|
+
const h = p`:host{display:block}`;
|
|
10
|
+
class d extends m {
|
|
3586
11
|
constructor() {
|
|
3587
|
-
super(...arguments), this.amazonAppId = "", this.amazonAppName = "", this.amazonUserPoolID = "", this.amazonVersion = "", this.firstUseVar = "", this.measurementIds = [], this._open = !1, this._translations =
|
|
12
|
+
super(...arguments), this.amazonAppId = "", this.amazonAppName = "", this.amazonUserPoolID = "", this.amazonVersion = "", this.firstUseVar = "", this.measurementIds = [], this._open = !1, this._translations = l({ name: "consent-manager", blocking: !0 }), this._loaded = !1, this.consentGranted = c();
|
|
3588
13
|
}
|
|
3589
14
|
static {
|
|
3590
15
|
this.properties = { amazonAppId: 1, amazonAppName: 1, amazonUserPoolID: 1, amazonVersion: 1, firstUseVar: 1, measurementIds: 0, portal: 0, _open: 16, _translations: 16 };
|
|
3591
16
|
}
|
|
3592
17
|
static {
|
|
3593
|
-
this.styles =
|
|
18
|
+
this.styles = h;
|
|
3594
19
|
}
|
|
3595
20
|
async getInstance() {
|
|
3596
21
|
if (localStorage.getItem(this.firstUseVar) === "true" || this.portal?.eueiEnabled)
|
|
@@ -3609,25 +34,25 @@ class Ao extends fi {
|
|
|
3609
34
|
}
|
|
3610
35
|
async _init() {
|
|
3611
36
|
if (!this._loaded) {
|
|
3612
|
-
const
|
|
37
|
+
const s = {
|
|
3613
38
|
info: console.info ? console.info.bind(console) : console.log.bind(console),
|
|
3614
39
|
error: console.error ? console.error.bind(console) : console.log.bind(console),
|
|
3615
|
-
warn: (
|
|
3616
|
-
(!
|
|
40
|
+
warn: (e, ...o) => {
|
|
41
|
+
(!e.includes("non-primitive value") || !e.includes("userSince")) && (console.warn || console.log)(e, ...o);
|
|
3617
42
|
}
|
|
3618
|
-
},
|
|
43
|
+
}, t = {
|
|
3619
44
|
plugins: [],
|
|
3620
45
|
portal: this.portal,
|
|
3621
|
-
logger:
|
|
46
|
+
logger: s
|
|
3622
47
|
};
|
|
3623
48
|
if (this.measurementIds?.length > 0) {
|
|
3624
|
-
const
|
|
49
|
+
const e = new r({
|
|
3625
50
|
measurementIds: this.measurementIds
|
|
3626
51
|
});
|
|
3627
|
-
|
|
52
|
+
t.plugins.push(e);
|
|
3628
53
|
}
|
|
3629
54
|
if (this.amazonUserPoolID) {
|
|
3630
|
-
const
|
|
55
|
+
const e = new i({
|
|
3631
56
|
userPoolID: this.amazonUserPoolID,
|
|
3632
57
|
app: {
|
|
3633
58
|
name: this.amazonAppName,
|
|
@@ -3635,9 +60,9 @@ class Ao extends fi {
|
|
|
3635
60
|
version: this.amazonVersion
|
|
3636
61
|
}
|
|
3637
62
|
});
|
|
3638
|
-
|
|
63
|
+
t.plugins.push(e);
|
|
3639
64
|
}
|
|
3640
|
-
this._telemetryInstance = new
|
|
65
|
+
this._telemetryInstance = new a(t), await this._telemetryInstance.init(), this._loaded = !0;
|
|
3641
66
|
}
|
|
3642
67
|
}
|
|
3643
68
|
_alertClosed() {
|
|
@@ -3649,7 +74,7 @@ class Ao extends fi {
|
|
|
3649
74
|
}), this._open = !1;
|
|
3650
75
|
}
|
|
3651
76
|
}
|
|
3652
|
-
|
|
77
|
+
n("consent-manager", d);
|
|
3653
78
|
export {
|
|
3654
|
-
|
|
79
|
+
d as ConsentManager
|
|
3655
80
|
};
|