@revolugo/elements 6.8.2-beta.3 → 6.8.2-beta.30
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/css/revolugo.bhoteloffersfilterbar.C1Hvm7FH.css +1 -0
- package/dist/css/revolugo.cancellationpoliciesbadge.CzUQOfdk.css +1 -0
- package/dist/css/{revolugo.hoteldescriptionview.CqUUU1fv.css → revolugo.hoteldescriptionview.BQ3adGPS.css} +1 -1
- package/dist/css/revolugo.hoteloffersview.CL1wiz4I.css +1 -0
- package/dist/css/{revolugo.hotelroomofferlist.DI_s2G5c.css → revolugo.hotelroomofferlist.CCKyS5V3.css} +1 -1
- package/dist/css/revolugo.index.4hIg6F8J.css +1 -0
- package/dist/css/revolugo.langpickerbtn.DTsRMVL8.css +1 -0
- package/dist/css/revolugo.vicon.eIkh7vVK.css +1 -0
- package/dist/css/{revolugo.vtooltip.O8QDYs1J.css → revolugo.vslidegroup.ECiLCEE9.css} +1 -1
- package/dist/css/revolugo.vtooltip.BHXJTQ4V.css +1 -0
- package/dist/index.es.min.js +1130 -1120
- package/dist/index.es.min.js.map +1 -1
- package/dist/index.min.js +6 -6
- package/dist/index.min.js.map +1 -1
- package/dist/revolugo._baseiteratee.CLhJGa_I.min.js +247 -0
- package/dist/{revolugo.banktransferdetails.B2ekby51.min.js → revolugo.banktransferdetails.Djs6mxU0.min.js} +9 -9
- package/dist/{revolugo.bdaterangepicker.CTD21Xkh.min.js → revolugo.bdaterangepicker.D9a3kNuM.min.js} +12 -11
- package/dist/revolugo.bformattedamount.vue_vue_type_script_setup_true_lang.C3xbTcQN.min.js +149 -0
- package/dist/revolugo.bhoteloffersfilterbar.CVh2pH-N.min.js +4818 -0
- package/dist/{revolugo.bhotelroomsdetails.B_oUGHlu.min.js → revolugo.bhotelroomsdetails.C4xdQLfe.min.js} +35 -34
- package/dist/{revolugo.bhotelsearchbar.CZZ7nrV4.min.js → revolugo.bhotelsearchbar.DR7UHkQo.min.js} +16 -16
- package/dist/{revolugo.bimagecarousel.B0c13uQA.min.js → revolugo.bimagecarousel.DhwrLMiX.min.js} +37 -38
- package/dist/{revolugo.bookingdetailssidebar.BGsPcF2v.min.js → revolugo.bookingdetailssidebar.DkBHaNwV.min.js} +4 -4
- package/dist/{revolugo.bookingdetailssidebar.Bs3FC4cg.min.js → revolugo.bookingdetailssidebar.DwIul6C1.min.js} +17 -17
- package/dist/{revolugo.bookingmanager.CrXALVnI.min.js → revolugo.bookingmanager.CmdsCQDi.min.js} +27 -27
- package/dist/{revolugo.bpricesummaryskeleton.8052AuK3.min.js → revolugo.bpricesummaryskeleton.BcgNLGYX.min.js} +4 -4
- package/dist/{revolugo.bstarrating.vue_vue_type_script_setup_true_lang.DxGtfGu-.min.js → revolugo.bstarrating.vue_vue_type_script_setup_true_lang.B4psJ9Sg.min.js} +8 -8
- package/dist/{revolugo.btag.BWSoB2pK.min.js → revolugo.btag.mY1ErEMj.min.js} +64 -62
- package/dist/revolugo.cancellationpoliciesbadge.Bp43_l5_.min.js +28 -0
- package/dist/revolugo.cancellationpoliciesbadge.D7CMWTdG.min.js +207 -0
- package/dist/revolugo.cancellationpolicieslist.D2idtSnK.min.js +25 -0
- package/dist/{revolugo.cancellationpolicieslist.CurBz21i.min.js → revolugo.cancellationpolicieslist.hSJAFEGT.min.js} +70 -98
- package/dist/revolugo.cancellationpolicieslist.props.s6oWxIxG.min.js +21 -0
- package/dist/{revolugo.case-transformers.Oo4YCZeL.min.js → revolugo.case-transformers.VM7X_9Q1.min.js} +6 -6
- package/dist/{revolugo.creditcardform.D35ZslX6.min.js → revolugo.creditcardform.CrwpUivQ.min.js} +4 -4
- package/dist/{revolugo.creditcardform.Zgq-wqLH.min.js → revolugo.creditcardform.SRz4ls19.min.js} +45 -45
- package/dist/{revolugo.creditcardpayment.B3gGpWtL.min.js → revolugo.creditcardpayment.BcVHQlKJ.min.js} +42 -40
- package/dist/{revolugo.creditcardpayment.BpY-gafO.min.js → revolugo.creditcardpayment.bSs8I8av.min.js} +4 -4
- package/dist/{revolugo.currencypicker.BgqkzwCT.min.js → revolugo.currencypicker.-B3knz6i.min.js} +8 -8
- package/dist/{revolugo.currencypickerbtn.CL_hu26M.min.js → revolugo.currencypickerbtn.CyHWGHaW.min.js} +4 -4
- package/dist/{revolugo.currencypickerbtn.0iqvXHCJ.min.js → revolugo.currencypickerbtn.D38ZdlKW.min.js} +17 -17
- package/dist/{revolugo.defaultsdeep.CCR2LAoW.min.js → revolugo.defaultsdeep.z9urzKAp.min.js} +32 -32
- package/dist/{revolugo.dialog-attach.t7JTHXax.min.js → revolugo.dialog-attach.D_OA19-E.min.js} +2 -2
- package/dist/{revolugo.dialog-transition.Cot8jmLN.min.js → revolugo.dialog-transition.D9Rvu5kv.min.js} +6 -6
- package/dist/{revolugo.fastbookingflow.D5i5QakB.min.js → revolugo.fastbookingflow.CJP79XT7.min.js} +4 -4
- package/dist/{revolugo.fullbookingflow.B3R9Mi6f.min.js → revolugo.fullbookingflow.Cd2NIaQ2.min.js} +17 -17
- package/dist/revolugo.hotel-offer-request.CgsVMCkE.min.js +98 -0
- package/dist/{revolugo.hoteldescriptionview.mr1BBzFi.min.js → revolugo.hoteldescriptionview.BSrnxJem.min.js} +394 -412
- package/dist/{revolugo.hoteldescriptionview.0om5ATP0.min.js → revolugo.hoteldescriptionview.Cl2E63e2.min.js} +4 -4
- package/dist/{revolugo.hotelofferitemlayout.CpMoPSRH.min.js → revolugo.hotelofferitemlayout.BMzCfYQ7.min.js} +6 -6
- package/dist/{revolugo.hotelofferlist.DRdkrfqu.min.js → revolugo.hotelofferlist.B3yjbXlQ.min.js} +789 -796
- package/dist/{revolugo.hotelofferlist.Bb-RsXSl.min.js → revolugo.hotelofferlist.DhYBX5pF.min.js} +4 -4
- package/dist/{revolugo.hotelofferrequestcreator.f8olJbDW.min.js → revolugo.hotelofferrequestcreator.CNbav2EO.min.js} +16 -15
- package/dist/revolugo.hoteloffersearchmenu.BZascblw.min.js +47 -0
- package/dist/{revolugo.hoteloffersmap.BjjBIhE9.min.js → revolugo.hoteloffersmap.D6hRTrsf.min.js} +22 -23
- package/dist/{revolugo.hoteloffersmap.BleGDfiI.min.js → revolugo.hoteloffersmap.DkNN0NQB.min.js} +4 -4
- package/dist/{revolugo.hoteloffersview.M1WJegEH.min.js → revolugo.hoteloffersview.CPYXigVN.min.js} +4 -4
- package/dist/{revolugo.hoteloffersview.DyWUZJ-a.min.js → revolugo.hoteloffersview.DjAXSPOG.min.js} +51 -49
- package/dist/{revolugo.hotelroomofferlist.7bwYQgtE.min.js → revolugo.hotelroomofferlist.C_HCimvP.min.js} +4 -4
- package/dist/{revolugo.hotelroomofferlist.Dr11epuR.min.js → revolugo.hotelroomofferlist.wD_JIpuK.min.js} +187 -186
- package/dist/{revolugo.hotelroomofferrequestcreator.props.DUhujwnh.min.js → revolugo.hotelroomofferrequestcreator.props.DjBXUl-H.min.js} +2 -2
- package/dist/{revolugo.hotelroomoffersbookingflow.CKjKX7Kc.min.js → revolugo.hotelroomoffersbookingflow.2E3AYERj.min.js} +55 -55
- package/dist/{revolugo.hotelroomoffersearchmenu.CT-i5FLW.min.js → revolugo.hotelroomoffersearchmenu.B-C4YSFE.min.js} +5 -5
- package/dist/{revolugo.hotelroomoffersearchmenu.9fzTS1um.min.js → revolugo.hotelroomoffersearchmenu.DrW5uMfL.min.js} +7 -7
- package/dist/{revolugo.hotelroomoffersview.D2XUHzuN.min.js → revolugo.hotelroomoffersview.CCmILEaO.min.js} +12 -12
- package/dist/{revolugo.hotelroomoffersview.iTt3yxQK.min.js → revolugo.hotelroomoffersview.DVsdh7Jz.min.js} +4 -4
- package/dist/revolugo.index.Dyr1hnew.min.js +1255 -0
- package/dist/{revolugo.index.wc.CNPB8R3P.min.js → revolugo.index.wc.BaFPloEH.min.js} +11412 -11783
- package/dist/revolugo.langpicker.CaQ17b6t.min.js +99 -0
- package/dist/revolugo.langpickerbtn.DTkV9PYE.min.js +29 -0
- package/dist/revolugo.langpickerbtn.DmoEWum3.min.js +126 -0
- package/dist/revolugo.min.js +1 -1
- package/dist/revolugo.pathify.CKNqCKLR.min.js +58 -0
- package/dist/{revolugo.prebookform.DhCYUQX2.min.js → revolugo.prebookform.CxKmwFK-.min.js} +21 -21
- package/dist/{revolugo.prebookform.CDoJAivN.min.js → revolugo.prebookform.p-M6zS08.min.js} +4 -4
- package/dist/{revolugo.roominglisteditor.Dgtcs_-O.min.js → revolugo.roominglisteditor.5gfIA3r6.min.js} +11 -11
- package/dist/{revolugo.roominglisteditor.DvUmxfal.min.js → revolugo.roominglisteditor.Zz9TPhp6.min.js} +4 -4
- package/dist/{revolugo.rounded.Dulx85qq.min.js → revolugo.rounded.CQuigzpH.min.js} +2 -2
- package/dist/{revolugo.ssrboot.CTe1vadS.min.js → revolugo.ssrboot.DfQY0r5E.min.js} +4 -4
- package/dist/{revolugo.storybooktoolbar.D182Uwjq.min.js → revolugo.storybooktoolbar.DikXrkgz.min.js} +111 -107
- package/dist/{revolugo.termsandconditions.DvldqW3w.min.js → revolugo.termsandconditions.Bbo5pbgR.min.js} +4 -4
- package/dist/{revolugo.termsandconditions.BSpX2Wim.min.js → revolugo.termsandconditions.CiHuvfp6.min.js} +4 -4
- package/dist/revolugo.use-breakpoint-service.BLlHYRIa.min.js +45 -0
- package/dist/revolugo.use-html-element.C-V3ql2M.min.js +12 -0
- package/dist/{revolugo.vautocomplete.DNxDeH8S.min.js → revolugo.vautocomplete.CimHObsW.min.js} +110 -109
- package/dist/{revolugo.vbadge.DqpIeIfj.min.js → revolugo.vbadge.dOVHEqkO.min.js} +16 -16
- package/dist/{revolugo.vbtn.DsvUpshD.min.js → revolugo.vbtn.C5rBd2Qx.min.js} +61 -61
- package/dist/{revolugo.vcard.D1VwO30r.min.js → revolugo.vcard.Dw6Qxohz.min.js} +48 -48
- package/dist/{revolugo.vcheckboxbtn.BnbOlneq.min.js → revolugo.vcheckboxbtn.oJMjQhq7.min.js} +58 -58
- package/dist/{revolugo.vdialog.rsw4VlQE.min.js → revolugo.vdialog.DBJFoM4O.min.js} +25 -25
- package/dist/{revolugo.vdivider.Cq5RMY7t.min.js → revolugo.vdivider.93Ehbd8W.min.js} +3 -3
- package/dist/{revolugo.vexpansionpanels.Cy-T-RLA.min.js → revolugo.vexpansionpanels.nGkPqsEk.min.js} +24 -23
- package/dist/{revolugo.vform.CO-9AfdO.min.js → revolugo.vform.D7BJmMQ-.min.js} +4 -4
- package/dist/revolugo.vicon.CuIGTijn.min.js +106 -0
- package/dist/{revolugo.vinput.DEbpex7C.min.js → revolugo.vinput.C6k3-74L.min.js} +57 -56
- package/dist/{revolugo.vlabel.CBGmCU1C.min.js → revolugo.vlabel.BNLTPj0h.min.js} +3 -3
- package/dist/{revolugo.vlist.BzvP4Aad.min.js → revolugo.vlist.B56e-cT_.min.js} +95 -95
- package/dist/{revolugo.vmenu.CIfiL0Ib.min.js → revolugo.vmenu.DhHohFn7.min.js} +22 -22
- package/dist/{revolugo.vselect.CDieig82.min.js → revolugo.vselect.BHhGGQU3.min.js} +77 -76
- package/dist/{revolugo.vsheet.AqixfoVv.min.js → revolugo.vsheet.H2Eli2di.min.js} +10 -10
- package/dist/{revolugo.vskeletonloader.BUxAIEgD.min.js → revolugo.vskeletonloader.B-Qq0740.min.js} +6 -6
- package/dist/revolugo.vslidegroup.ChtHIkDN.min.js +333 -0
- package/dist/{revolugo.vsnackbar.D5nwTNfd.min.js → revolugo.vsnackbar.-lEdFT5G.min.js} +49 -50
- package/dist/revolugo.vspacer.DaFDHuC9.min.js +7 -0
- package/dist/{revolugo.vtextarea.ByrL6SoY.min.js → revolugo.vtextarea.BJaCwHl5.min.js} +33 -33
- package/dist/{revolugo.vtextfield.Br_yyf1t.min.js → revolugo.vtextfield.CMQN6tSz.min.js} +73 -74
- package/dist/{revolugo.vtoolbar.VPqzB-yU.min.js → revolugo.vtoolbar.CSyyGTVc.min.js} +23 -23
- package/dist/revolugo.vtooltip.CvplYWvb.min.js +90 -0
- package/dist/{revolugo.vwindowitem.IF1zLcjR.min.js → revolugo.vwindowitem.bzpa5cVc.min.js} +31 -31
- package/dist/{revolugo.watch-list.BD0XoO1O.min.js → revolugo.watch-list.Be1UUzWP.min.js} +2 -2
- package/dist/{revolugo.webcomponentwrapper.Ci87Oown.min.js → revolugo.webcomponentwrapper.Byzhja-M.min.js} +302 -302
- package/package.json +1 -1
- package/dist/css/revolugo.bhoteloffersfilterbar.1tLwDxXe.css +0 -1
- package/dist/css/revolugo.cancellationpoliciesbadge.CwgZ0PpX.css +0 -1
- package/dist/css/revolugo.hoteloffersview.oDGeJCwG.css +0 -1
- package/dist/css/revolugo.index.DQ3Yd6SO.css +0 -1
- package/dist/css/revolugo.langpickerbtn.D2iA6mCb.css +0 -1
- package/dist/css/revolugo.position.7fn84IQ5.css +0 -1
- package/dist/revolugo.bformattedamount.vue_vue_type_script_setup_true_lang.DFgVEyLr.min.js +0 -61
- package/dist/revolugo.bhoteloffersfilterbar.C677v5nL.min.js +0 -4689
- package/dist/revolugo.cancellationpoliciesbadge.B19weMQp.min.js +0 -225
- package/dist/revolugo.cancellationpoliciesbadge.CvnUmIqX.min.js +0 -24
- package/dist/revolugo.cancellationpolicieslist.BsjkpRRW.min.js +0 -24
- package/dist/revolugo.hoteloffersearchmenu.CLH7PdDD.min.js +0 -46
- package/dist/revolugo.index.CDltx0TU.min.js +0 -1037
- package/dist/revolugo.index.D5-DO18f.min.js +0 -13
- package/dist/revolugo.langpicker.Df8h8dCw.min.js +0 -107
- package/dist/revolugo.langpickerbtn.CIKlUC4J.min.js +0 -178
- package/dist/revolugo.langpickerbtn.CMIJmkLf.min.js +0 -24
- package/dist/revolugo.position.BFDPs3FP.min.js +0 -322
- package/dist/revolugo.use-breakpoint-service.CEx6DRka.min.js +0 -106
- package/dist/revolugo.vspacer.Dv72HR_2.min.js +0 -7
- package/dist/revolugo.vtooltip.CI_oDjbQ.min.js +0 -395
package/dist/{revolugo.hotelofferlist.DRdkrfqu.min.js → revolugo.hotelofferlist.B3yjbXlQ.min.js}
RENAMED
@@ -1,30 +1,29 @@
|
|
1
|
-
var
|
2
|
-
var
|
3
|
-
var N = (t, e, n) =>
|
4
|
-
import {
|
5
|
-
import { h as sr, H as ir } from "./revolugo.hotelofferrequestcreator.
|
6
|
-
import { H as rr, D as or, B as ar, p as lr,
|
7
|
-
import { H as
|
8
|
-
import { B as
|
9
|
-
import { u as
|
10
|
-
import { V as
|
11
|
-
import { V as
|
12
|
-
import { a as ae } from "./revolugo.vbtn.
|
13
|
-
import { V as
|
14
|
-
import { a as
|
15
|
-
import {
|
16
|
-
import { V as
|
17
|
-
import { V as
|
18
|
-
import {
|
19
|
-
import {
|
20
|
-
import {
|
21
|
-
import {
|
22
|
-
import {
|
23
|
-
import {
|
24
|
-
import {
|
25
|
-
import {
|
26
|
-
|
27
|
-
function xi(t) {
|
1
|
+
var Bi = Object.defineProperty;
|
2
|
+
var Vi = (t, e, n) => e in t ? Bi(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
3
|
+
var N = (t, e, n) => Vi(t, typeof e != "symbol" ? e + "" : e, n);
|
4
|
+
import { W as xi, X as Hi, d as fn, u as hn, k as Ft, Y as Me, Z as Te, D as U, a as b, _ as pt, $ as Gi, a0 as dt, a1 as Le, a2 as vt, a3 as ji, C as Xt, a4 as yt, L as Rs, f as je, a5 as at, a6 as Is, a7 as Ts, y as re, a8 as As, a9 as qi, S as zi, Q as Yi, aa as Ki, ab as Wi, F as xe, i as pe, w as _, e as Jt, t as He, r as oe, o as $, b as Os, c as Q, g as Z, v as Ds, x as bt, K as Qi, P as Xi, ac as Ji, ad as Zi, H as er, I as tr, A as nr } from "./revolugo.index.wc.BaFPloEH.min.js";
|
5
|
+
import { h as sr, H as ir } from "./revolugo.hotelofferrequestcreator.CNbav2EO.min.js";
|
6
|
+
import { H as rr, D as or, B as ar, p as lr, c as ur, d as cr, u as dr } from "./revolugo.bhoteloffersfilterbar.CVh2pH-N.min.js";
|
7
|
+
import { H as Cs } from "./revolugo.hotelofferitemlayout.BMzCfYQ7.min.js";
|
8
|
+
import { B as fr, v as Ue, V as hr } from "./revolugo.vtextarea.BJaCwHl5.min.js";
|
9
|
+
import { u as Ke, b as _s, M as Ps, _ as gn, V as it, a as Pe, B as gr } from "./revolugo.webcomponentwrapper.Byzhja-M.min.js";
|
10
|
+
import { V as Ze } from "./revolugo.vtextfield.CMQN6tSz.min.js";
|
11
|
+
import { V as On } from "./revolugo.vmenu.DhHohFn7.min.js";
|
12
|
+
import { a as ae } from "./revolugo.vbtn.C5rBd2Qx.min.js";
|
13
|
+
import { V as mr } from "./revolugo.vspacer.DaFDHuC9.min.js";
|
14
|
+
import { a as Mt, c as pr, b as vr, V as yr } from "./revolugo.index.Dyr1hnew.min.js";
|
15
|
+
import { V as Dn, m as br } from "./revolugo.vsheet.H2Eli2di.min.js";
|
16
|
+
import { V as Er } from "./revolugo.vform.D7BJmMQ-.min.js";
|
17
|
+
import { V as Zt } from "./revolugo.vdivider.93Ehbd8W.min.js";
|
18
|
+
import { H as Sr } from "./revolugo.hotelroomofferlist.wD_JIpuK.min.js";
|
19
|
+
import { B as kr } from "./revolugo.bhotelsearchbar.DR7UHkQo.min.js";
|
20
|
+
import { p as Rr } from "./revolugo.bstarrating.vue_vue_type_script_setup_true_lang.B4psJ9Sg.min.js";
|
21
|
+
import { w as Ir } from "./revolugo.watch-list.Be1UUzWP.min.js";
|
22
|
+
import { T as Tr } from "./revolugo.termsandconditions.CiHuvfp6.min.js";
|
23
|
+
import { u as Ar } from "./revolugo.hotelroomofferrequestcreator.props.DjBXUl-H.min.js";
|
24
|
+
import { p as Or, g as be } from "./revolugo.pathify.CKNqCKLR.min.js";
|
25
|
+
import { V as Dr } from "./revolugo.bdaterangepicker.D9a3kNuM.min.js";
|
26
|
+
function Fi(t) {
|
28
27
|
try {
|
29
28
|
if (typeof document < "u") {
|
30
29
|
window.REVOLUGO_ELEMENTS_STYLES = window.REVOLUGO_ELEMENTS_STYLES || {
|
@@ -44,15 +43,15 @@ function xi(t) {
|
|
44
43
|
console.error("[revolugo-elements] ", e);
|
45
44
|
}
|
46
45
|
}
|
47
|
-
const
|
46
|
+
const Ns = {
|
48
47
|
FiltersBar: !0,
|
49
48
|
HotelOfferSearchMenu: !1,
|
50
49
|
TermsAndConditionsFooter: !0,
|
51
50
|
HotelOfferItem: rr
|
52
|
-
},
|
51
|
+
}, Cr = {
|
53
52
|
...sr,
|
54
53
|
features: {
|
55
|
-
default: () =>
|
54
|
+
default: () => Ns,
|
56
55
|
type: [Object, String]
|
57
56
|
},
|
58
57
|
height: {
|
@@ -105,7 +104,7 @@ function Ee(t) {
|
|
105
104
|
}
|
106
105
|
};
|
107
106
|
}
|
108
|
-
function
|
107
|
+
function mn(t) {
|
109
108
|
return function e(n, s, i) {
|
110
109
|
switch (arguments.length) {
|
111
110
|
case 0:
|
@@ -139,30 +138,30 @@ function pn(t) {
|
|
139
138
|
}
|
140
139
|
};
|
141
140
|
}
|
142
|
-
function
|
141
|
+
function ft(t, e) {
|
143
142
|
return Object.prototype.hasOwnProperty.call(e, t);
|
144
143
|
}
|
145
|
-
var
|
144
|
+
var _r = /* @__PURE__ */ ve(function(e) {
|
146
145
|
return e === null ? "Null" : e === void 0 ? "Undefined" : Object.prototype.toString.call(e).slice(8, -1);
|
147
146
|
});
|
148
|
-
function
|
147
|
+
function Cn(t) {
|
149
148
|
return Object.prototype.toString.call(t) === "[object Object]";
|
150
149
|
}
|
151
|
-
const
|
150
|
+
const Pr = Number.isInteger || function(e) {
|
152
151
|
return e << 0 === e;
|
153
152
|
};
|
154
|
-
function
|
153
|
+
function Nr(t) {
|
155
154
|
return Object.prototype.toString.call(t) === "[object String]";
|
156
155
|
}
|
157
|
-
function
|
156
|
+
function Lr(t, e) {
|
158
157
|
var n = t < 0 ? e.length + t : t;
|
159
|
-
return
|
158
|
+
return Nr(e) ? e.charAt(n) : e[n];
|
160
159
|
}
|
161
|
-
function
|
160
|
+
function wr(t) {
|
162
161
|
return new RegExp(t.source, t.flags ? t.flags : (t.global ? "g" : "") + (t.ignoreCase ? "i" : "") + (t.multiline ? "m" : "") + (t.sticky ? "y" : "") + (t.unicode ? "u" : "") + (t.dotAll ? "s" : ""));
|
163
162
|
}
|
164
|
-
function
|
165
|
-
if (n || (n = new
|
163
|
+
function Ls(t, e, n) {
|
164
|
+
if (n || (n = new $r()), Mr(t))
|
166
165
|
return t;
|
167
166
|
var s = function(r) {
|
168
167
|
var a = n.get(t);
|
@@ -170,10 +169,10 @@ function ws(t, e, n) {
|
|
170
169
|
return a;
|
171
170
|
n.set(t, r);
|
172
171
|
for (var u in t)
|
173
|
-
Object.prototype.hasOwnProperty.call(t, u) && (r[u] =
|
172
|
+
Object.prototype.hasOwnProperty.call(t, u) && (r[u] = Ls(t[u], !0, n));
|
174
173
|
return r;
|
175
174
|
};
|
176
|
-
switch (
|
175
|
+
switch (_r(t)) {
|
177
176
|
case "Object":
|
178
177
|
return s(Object.create(Object.getPrototypeOf(t)));
|
179
178
|
case "Array":
|
@@ -181,7 +180,7 @@ function ws(t, e, n) {
|
|
181
180
|
case "Date":
|
182
181
|
return new Date(t.valueOf());
|
183
182
|
case "RegExp":
|
184
|
-
return
|
183
|
+
return wr(t);
|
185
184
|
case "Int8Array":
|
186
185
|
case "Uint8Array":
|
187
186
|
case "Uint8ClampedArray":
|
@@ -198,11 +197,11 @@ function ws(t, e, n) {
|
|
198
197
|
return t;
|
199
198
|
}
|
200
199
|
}
|
201
|
-
function
|
200
|
+
function Mr(t) {
|
202
201
|
var e = typeof t;
|
203
202
|
return t == null || e != "object" && e != "function";
|
204
203
|
}
|
205
|
-
var
|
204
|
+
var $r = /* @__PURE__ */ function() {
|
206
205
|
function t() {
|
207
206
|
this.map = {}, this.length = 0;
|
208
207
|
}
|
@@ -233,40 +232,40 @@ var Mr = /* @__PURE__ */ function() {
|
|
233
232
|
}
|
234
233
|
}, t;
|
235
234
|
}(), T = /* @__PURE__ */ ve(function(e) {
|
236
|
-
return e != null && typeof e.clone == "function" ? e.clone() :
|
235
|
+
return e != null && typeof e.clone == "function" ? e.clone() : Ls(e);
|
237
236
|
});
|
238
|
-
function
|
237
|
+
function Ur(t, e) {
|
239
238
|
for (var n = e, s = 0; s < t.length; s += 1) {
|
240
239
|
if (n == null)
|
241
240
|
return;
|
242
241
|
var i = t[s];
|
243
|
-
|
242
|
+
Pr(i) ? n = Lr(i, n) : n = n[i];
|
244
243
|
}
|
245
244
|
return n;
|
246
245
|
}
|
247
|
-
var
|
246
|
+
var Br = /* @__PURE__ */ mn(function(e, n, s) {
|
248
247
|
var i = {}, r;
|
249
248
|
n = n || {}, s = s || {};
|
250
249
|
for (r in n)
|
251
|
-
|
250
|
+
ft(r, n) && (i[r] = ft(r, s) ? e(r, n[r], s[r]) : n[r]);
|
252
251
|
for (r in s)
|
253
|
-
|
252
|
+
ft(r, s) && !ft(r, i) && (i[r] = s[r]);
|
254
253
|
return i;
|
255
|
-
}),
|
256
|
-
return Ur(function(i, r, a) {
|
257
|
-
return _n(r) && _n(a) ? t(e, r, a) : e(i, r, a);
|
258
|
-
}, n, s);
|
259
|
-
}), Vr = /* @__PURE__ */ pn(function(e, n, s) {
|
254
|
+
}), Vr = /* @__PURE__ */ mn(function t(e, n, s) {
|
260
255
|
return Br(function(i, r, a) {
|
256
|
+
return Cn(r) && Cn(a) ? t(e, r, a) : e(i, r, a);
|
257
|
+
}, n, s);
|
258
|
+
}), Fr = /* @__PURE__ */ mn(function(e, n, s) {
|
259
|
+
return Vr(function(i, r, a) {
|
261
260
|
return e(r, a);
|
262
261
|
}, n, s);
|
263
|
-
}),
|
262
|
+
}), xr = /* @__PURE__ */ Ee(Ur), ws = /* @__PURE__ */ Ee(function(e, n) {
|
264
263
|
var s = {};
|
265
264
|
for (var i in n)
|
266
265
|
e(n[i], i, n) && (s[i] = n[i]);
|
267
266
|
return s;
|
268
267
|
});
|
269
|
-
const S = (t) => typeof t == "function" && !!(t.constructor && t.call && t.apply), L = (t) => typeof t == "string", ne = (t) => t === null, x = (t) => typeof t > "u", le = (t) => ne(t) || x(t),
|
268
|
+
const S = (t) => typeof t == "function" && !!(t.constructor && t.call && t.apply), L = (t) => typeof t == "string", ne = (t) => t === null, x = (t) => typeof t > "u", le = (t) => ne(t) || x(t), Hr = (t) => typeof t == "bigint", C = (t) => !x(t), qe = (t) => !le(t), Gr = (t) => qe(t) && t !== "", pn = (t) => {
|
270
269
|
switch (Object.prototype.toString.call(t)) {
|
271
270
|
case "[object Error]":
|
272
271
|
case "[object Exception]":
|
@@ -275,35 +274,35 @@ const S = (t) => typeof t == "function" && !!(t.constructor && t.call && t.apply
|
|
275
274
|
default:
|
276
275
|
return t instanceof Error;
|
277
276
|
}
|
278
|
-
},
|
277
|
+
}, en = (t, e) => {
|
279
278
|
const n = e.split(".");
|
280
|
-
return
|
281
|
-
},
|
279
|
+
return xr(n, t);
|
280
|
+
}, jr = (t, e) => !!en(t, e), qr = (t) => typeof t == "object", zr = (t) => !ne(t) && qr(t) && !Array.isArray(t), M = (t) => !ne(t) && Object.prototype.toString.call(t) === "[object Object]", Yr = (t, e) => {
|
282
281
|
if (!Array.isArray(t) || !Array.isArray(e))
|
283
282
|
return T(e);
|
284
283
|
const n = T(t);
|
285
284
|
return e.forEach((s, i) => {
|
286
|
-
n[i] = Array.isArray(s) ||
|
285
|
+
n[i] = Array.isArray(s) || zr(s) ? (
|
287
286
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
288
287
|
H(n[i], s)
|
289
288
|
) : s;
|
290
289
|
}), n;
|
291
|
-
}, H = (t, e) =>
|
292
|
-
const e =
|
290
|
+
}, H = (t, e) => Fr(Yr, t, e), Ie = (t) => M(t) && Object.keys(t).length > 0, tt = (t) => {
|
291
|
+
const e = ws(C, t);
|
293
292
|
return Object.keys(e).forEach((n) => {
|
294
293
|
const s = e[n];
|
295
|
-
M(s) && (e[n] =
|
294
|
+
M(s) && (e[n] = tt(s));
|
296
295
|
}), e;
|
297
|
-
},
|
298
|
-
const e =
|
296
|
+
}, Ct = (t) => {
|
297
|
+
const e = ws(qe, t);
|
299
298
|
return Object.keys(e).forEach((n) => {
|
300
299
|
const s = e[n];
|
301
|
-
M(s) && (e[n] =
|
300
|
+
M(s) && (e[n] = Ct(s));
|
302
301
|
}), e;
|
303
302
|
}, ge = (t) => {
|
304
303
|
if (Ie(t))
|
305
|
-
return
|
306
|
-
}, ue = (t, e) => typeof t == "boolean" ? t : e, Kr = (t) => t.replace(/^\s+|\s+$/gm, ""),
|
304
|
+
return Ct(t);
|
305
|
+
}, ue = (t, e) => typeof t == "boolean" ? t : e, Kr = (t) => t.replace(/^\s+|\s+$/gm, ""), _n = (t) => t.replace(/^\.+/, ""), _t = (t) => {
|
307
306
|
let e = t;
|
308
307
|
if (!L(t) && !le(t))
|
309
308
|
try {
|
@@ -312,56 +311,56 @@ const S = (t) => typeof t == "function" && !!(t.constructor && t.call && t.apply
|
|
312
311
|
e = null;
|
313
312
|
}
|
314
313
|
return e;
|
315
|
-
},
|
314
|
+
}, Wr = (t) => {
|
316
315
|
const e = Array.from(t, (n) => String.fromCodePoint(n)).join("");
|
317
316
|
return globalThis.btoa(e);
|
318
|
-
},
|
317
|
+
}, Qr = (t) => Wr(new TextEncoder().encode(t)), Pt = (t, e, n, s, i) => {
|
319
318
|
const r = { category: t, name: e, properties: n, options: s, callback: void 0 };
|
320
319
|
S(i) && (r.callback = i), S(s) && (r.category = t, r.name = e, r.properties = n, r.options = void 0, r.callback = s), S(n) && (r.category = t, r.name = e, r.properties = void 0, r.options = void 0, r.callback = n), S(e) && (r.category = t, r.name = void 0, r.properties = void 0, r.options = void 0, r.callback = e), S(t) && (r.category = void 0, r.name = void 0, r.properties = void 0, r.options = void 0, r.callback = t), M(t) ? (r.name = void 0, r.category = void 0, r.properties = t, S(e) ? r.options = void 0 : r.options = e) : M(e) && (r.name = void 0, r.properties = e, S(n) ? r.options = void 0 : r.options = n), L(t) && !L(e) && (r.category = void 0, r.name = t), C(r.category) || (r.category = void 0), C(r.name) || (r.name = void 0), r.properties = r.properties ? T(r.properties) : {}, C(r.options) ? r.options = T(r.options) : r.options = void 0;
|
321
320
|
const a = L(r.name) ? r.name : r.properties.name, u = L(r.category) ? r.category : r.properties.category;
|
322
321
|
return r.properties = H(M(r.properties) ? r.properties : {}, { ...a && { name: a }, ...u && { category: u } }), r;
|
323
|
-
},
|
322
|
+
}, vn = (t, e, n, s) => {
|
324
323
|
const i = { name: t, properties: e, options: n, callback: void 0 };
|
325
324
|
return S(s) && (i.callback = s), S(n) && (i.properties = e, i.options = void 0, i.callback = n), S(e) && (i.properties = void 0, i.options = void 0, i.callback = e), i.properties = qe(i.properties) ? T(i.properties) : {}, C(i.options) ? i.options = T(i.options) : i.options = void 0, i;
|
326
|
-
},
|
325
|
+
}, Ms = (t, e, n, s) => {
|
327
326
|
const i = { userId: t, traits: e, options: n, callback: void 0 };
|
328
|
-
return S(s) && (i.callback = s), S(n) && (i.userId = t, i.traits = e, i.options = void 0, i.callback = n), S(e) && (i.userId = t, i.traits = void 0, i.options = void 0, i.callback = e), (M(t) || ne(t)) && (i.userId = null, i.traits = t, S(e) ? i.options = void 0 : i.options = e), i.userId =
|
329
|
-
},
|
327
|
+
return S(s) && (i.callback = s), S(n) && (i.userId = t, i.traits = e, i.options = void 0, i.callback = n), S(e) && (i.userId = t, i.traits = void 0, i.options = void 0, i.callback = e), (M(t) || ne(t)) && (i.userId = null, i.traits = t, S(e) ? i.options = void 0 : i.options = e), i.userId = _t(i.userId), M(i.traits) ? i.traits = T(i.traits) : i.traits = void 0, C(i.options) ? i.options = T(i.options) : i.options = void 0, i;
|
328
|
+
}, $s = (t, e, n, s) => {
|
330
329
|
const i = { to: t, from: e, options: n, callback: void 0 };
|
331
|
-
return S(s) && (i.callback = s), S(n) && (i.to = t, i.from = e, i.options = void 0, i.callback = n), S(e) ? (i.to = t, i.from = void 0, i.options = void 0, i.callback = e) : (M(e) || ne(e)) && (i.to = t, i.from = void 0, i.options = e), C(i.to) && (i.to =
|
332
|
-
},
|
330
|
+
return S(s) && (i.callback = s), S(n) && (i.to = t, i.from = e, i.options = void 0, i.callback = n), S(e) ? (i.to = t, i.from = void 0, i.options = void 0, i.callback = e) : (M(e) || ne(e)) && (i.to = t, i.from = void 0, i.options = e), C(i.to) && (i.to = _t(i.to)), C(i.from) ? i.from = _t(i.from) : i.from = void 0, C(i.options) ? i.options = T(i.options) : i.options = void 0, i;
|
331
|
+
}, Us = (t, e, n, s) => {
|
333
332
|
const i = { groupId: t, traits: e, options: n, callback: void 0 };
|
334
|
-
return S(s) && (i.callback = s), S(n) && (i.groupId = t, i.traits = e, i.options = void 0, i.callback = n), S(e) && (i.groupId = t, i.traits = void 0, i.options = void 0, i.callback = e), (M(t) || ne(t)) && (i.groupId = null, i.traits = t, S(e) ? i.options = void 0 : i.options = e), i.groupId =
|
333
|
+
return S(s) && (i.callback = s), S(n) && (i.groupId = t, i.traits = e, i.options = void 0, i.callback = n), S(e) && (i.groupId = t, i.traits = void 0, i.options = void 0, i.callback = e), (M(t) || ne(t)) && (i.groupId = null, i.traits = t, S(e) ? i.options = void 0 : i.options = e), i.groupId = _t(i.groupId), M(i.traits) ? i.traits = T(i.traits) : i.traits = void 0, C(i.options) ? i.options = T(i.options) : i.options = void 0, i;
|
335
334
|
};
|
336
|
-
let
|
335
|
+
let xt = /* @__PURE__ */ function(t) {
|
337
336
|
return t.UNLOADED = "Page Unloaded", t;
|
338
337
|
}({});
|
339
|
-
const
|
340
|
-
function
|
338
|
+
const yn = "API", tn = "CapabilitiesManager", te = "ConfigManager", Bs = "EventManager", ht = "PluginsManager", De = "UserSessionManager", nt = "ErrorHandler", Be = "PluginEngine", Xr = "StoreManager", Ht = `Ready${yn}`, Jr = `Load${yn}`, Zr = "HttpClient", eo = "RudderStackAnalytics", Gt = "AnalyticsCore";
|
339
|
+
function to(t) {
|
341
340
|
return crypto.getRandomValues(new Uint8Array(t));
|
342
341
|
}
|
343
|
-
var
|
342
|
+
var Pn = 4096, Et = [], ke = 0, jt;
|
344
343
|
for (; ke < 256; ke++)
|
345
|
-
|
346
|
-
function
|
347
|
-
(!
|
344
|
+
Et[ke] = (ke + 256).toString(16).substring(1);
|
345
|
+
function no() {
|
346
|
+
(!jt || ke + 16 > Pn) && (jt = to(Pn), ke = 0);
|
348
347
|
for (var t = 0, e, n = ""; t < 16; t++)
|
349
|
-
e =
|
348
|
+
e = jt[ke + t], t == 6 ? n += Et[e & 15 | 64] : t == 8 ? n += Et[e & 63 | 128] : n += Et[e], t & 1 && t > 1 && t < 11 && (n += "-");
|
350
349
|
return ke += 16, n;
|
351
350
|
}
|
352
|
-
var Ne = 256,
|
353
|
-
for (; Ne--; )
|
354
|
-
function
|
351
|
+
var Ne = 256, St = [], gt;
|
352
|
+
for (; Ne--; ) St[Ne] = (Ne + 256).toString(16).substring(1);
|
353
|
+
function so() {
|
355
354
|
var t = 0, e, n = "";
|
356
|
-
if (!
|
357
|
-
for (
|
355
|
+
if (!gt || Ne + 16 > 256) {
|
356
|
+
for (gt = Array(t = 256); t--; ) gt[t] = 256 * Math.random() | 0;
|
358
357
|
t = Ne = 0;
|
359
358
|
}
|
360
359
|
for (; t < 16; t++)
|
361
|
-
e =
|
360
|
+
e = gt[Ne + t], t == 6 ? n += St[e & 15 | 64] : t == 8 ? n += St[e & 63 | 128] : n += St[e], t & 1 && t > 1 && t < 11 && (n += "-");
|
362
361
|
return Ne++, n;
|
363
362
|
}
|
364
|
-
const
|
363
|
+
const io = () => !le(globalThis.crypto) && S(globalThis.crypto.getRandomValues), $t = () => io() ? no() : so(), ro = (t) => {
|
365
364
|
let e = !1, n = !1;
|
366
365
|
function s() {
|
367
366
|
e || (e = !0, t(n), setTimeout(() => {
|
@@ -379,7 +378,7 @@ const so = () => !le(globalThis.crypto) && S(globalThis.crypto.getRandomValues),
|
|
379
378
|
}), document.addEventListener("visibilitychange", () => {
|
380
379
|
n = !0, document.visibilityState === "hidden" ? s() : e = !1;
|
381
380
|
});
|
382
|
-
},
|
381
|
+
}, Vs = (t) => t.toISOString(), oo = () => Vs(/* @__PURE__ */ new Date()), R = ":: ", ao = (t) => `A script with the id "${t}" is already loaded. Skipping the loading of this script to prevent conflicts`, Nn = (t, e, n) => `Unable to load (${L(n) ? n : n.type}) the script with the id "${t}" from URL "${e}"`, lo = (t, e, n) => `A timeout of ${n} ms occurred while trying to load the script with id "${t}" from URL "${e}"`, uo = (t, e) => `${t}${R}A circular reference has been detected in the object and the property "${e}" has been dropped from the output.`, co = "Failed to convert the value to a JSON string.", fo = "Failed to encode the cookie data.", ho = "JSONStringify", go = "[BigInt]", Fs = "[Circular Reference]", mo = (t, e, n) => {
|
383
382
|
const s = [];
|
384
383
|
return function(i, r) {
|
385
384
|
if (!(e != null && e.includes(i)) && !(t && le(r))) {
|
@@ -387,71 +386,71 @@ const so = () => !le(globalThis.crypto) && S(globalThis.crypto.getRandomValues),
|
|
387
386
|
return r;
|
388
387
|
for (; s.length > 0 && s[s.length - 1] !== this; )
|
389
388
|
s.pop();
|
390
|
-
return s.includes(r) ? (n == null || n.warn(
|
389
|
+
return s.includes(r) ? (n == null || n.warn(uo(ho, i)), Fs) : (s.push(r), r);
|
391
390
|
}
|
392
391
|
};
|
393
392
|
}, de = (t, e, n, s) => {
|
394
393
|
try {
|
395
|
-
return JSON.stringify(t,
|
394
|
+
return JSON.stringify(t, mo(e, n, s));
|
396
395
|
} catch (i) {
|
397
|
-
return s == null || s.warn(
|
396
|
+
return s == null || s.warn(co, i), null;
|
398
397
|
}
|
399
|
-
},
|
398
|
+
}, po = (t) => {
|
400
399
|
const e = [];
|
401
400
|
return function(s, i) {
|
402
|
-
if (
|
403
|
-
return
|
401
|
+
if (Hr(i))
|
402
|
+
return go;
|
404
403
|
for (; e.length > 0 && e[e.length - 1] !== this; )
|
405
404
|
e.pop();
|
406
|
-
return e.includes(i) ?
|
405
|
+
return e.includes(i) ? Fs : (e.push(i), i);
|
407
406
|
};
|
408
|
-
},
|
407
|
+
}, xs = (t, e) => {
|
409
408
|
const n = Array.isArray(t) ? [] : {};
|
410
409
|
for (const s in t)
|
411
410
|
if (Object.hasOwnProperty.call(t, s)) {
|
412
411
|
const i = t[s], r = e.call(t, s, i);
|
413
|
-
M(r) || Array.isArray(r) ? n[s] =
|
412
|
+
M(r) || Array.isArray(r) ? n[s] = xs(r, e) : n[s] = r;
|
414
413
|
}
|
415
414
|
return n;
|
416
415
|
}, O = (t, e) => {
|
417
|
-
const n =
|
418
|
-
return M(t) || Array.isArray(t) ?
|
419
|
-
},
|
416
|
+
const n = po(), s = n.call(t, "", t);
|
417
|
+
return M(t) || Array.isArray(t) ? xs(t, n) : s;
|
418
|
+
}, kt = "[SDK DISPATCHED ERROR]", bn = (t) => {
|
420
419
|
const { stack: e, stacktrace: n } = t, s = t["opera#sourceloc"], i = e ?? n ?? s;
|
421
420
|
if (i && typeof i == "string")
|
422
421
|
return i;
|
423
|
-
},
|
422
|
+
}, En = (t, e) => {
|
424
423
|
let n = t;
|
425
|
-
return
|
424
|
+
return pn(t) ? n.message = `${e}: ${t.message}` : n = new Error(`${e}: ${de(t)}`), n;
|
426
425
|
}, B = (t) => {
|
427
|
-
if (
|
428
|
-
const e =
|
426
|
+
if (pn(t)) {
|
427
|
+
const e = bn(t);
|
429
428
|
if (e) {
|
430
429
|
const { stack: n, stacktrace: s } = t, i = t["opera#sourceloc"];
|
431
430
|
switch (e) {
|
432
431
|
case n:
|
433
432
|
t.stack = `${n}
|
434
|
-
${
|
433
|
+
${kt}`;
|
435
434
|
break;
|
436
435
|
case s:
|
437
436
|
t.stacktrace = `${s}
|
438
|
-
${
|
437
|
+
${kt}`;
|
439
438
|
break;
|
440
439
|
case i:
|
441
440
|
default:
|
442
441
|
t["opera#sourceloc"] = `${i}
|
443
|
-
${
|
442
|
+
${kt}`;
|
444
443
|
break;
|
445
444
|
}
|
446
445
|
}
|
447
446
|
}
|
448
447
|
globalThis.dispatchEvent(new ErrorEvent("error", { error: t, bubbles: !0, cancelable: !0, composed: !0 }));
|
449
|
-
},
|
448
|
+
}, Ln = "RudderLabs JavaScript SDK", lt = "3.21.0", vo = "com.rudderlabs.javascript", Hs = "npm", wn = "RudderJS-Initiated", yo = "ad-block page request", bo = "/ad-blocked", rt = "preloadedEventsBuffer", Eo = "Consent Management Interaction", So = "ajs_trait_", ko = "ajs_prop_", Mn = "ajs_aid", $n = "ajs_uid", Un = "ajs_event", Ro = 10 * 1e3, Io = 31536e3 * 1e3, Bn = 12 * 60 * 60 * 1e3, nn = 30 * 60 * 1e3, Vn = 10 * 1e3, To = 10 * 1e3, Ao = 250, Gs = (t = "app") => {
|
450
449
|
globalThis.RudderStackGlobals || (globalThis.RudderStackGlobals = {}), globalThis.RudderStackGlobals[t] || (globalThis.RudderStackGlobals[t] = {});
|
451
|
-
},
|
452
|
-
|
453
|
-
},
|
454
|
-
function
|
450
|
+
}, ut = (t, e, n = "app") => {
|
451
|
+
Gs(n), globalThis.RudderStackGlobals[n][t] = e;
|
452
|
+
}, js = (t, e = "app") => (Gs(e), globalThis.RudderStackGlobals[e][t]);
|
453
|
+
function Oo(t, e, n = Ao) {
|
455
454
|
let s;
|
456
455
|
return (...i) => {
|
457
456
|
globalThis.clearTimeout(s), s = globalThis.setTimeout(() => {
|
@@ -459,7 +458,7 @@ function Ao(t, e, n = To) {
|
|
459
458
|
}, n);
|
460
459
|
};
|
461
460
|
}
|
462
|
-
const
|
461
|
+
const Fn = (t, e) => {
|
463
462
|
const n = {};
|
464
463
|
return t.forEach((s, i) => {
|
465
464
|
if (i.startsWith(e)) {
|
@@ -467,10 +466,10 @@ const xn = (t, e) => {
|
|
467
466
|
n[r] = t.get(i);
|
468
467
|
}
|
469
468
|
}), n;
|
470
|
-
},
|
471
|
-
const e = { trait:
|
472
|
-
n.get(
|
473
|
-
},
|
469
|
+
}, Do = (t = []) => {
|
470
|
+
const e = { trait: So, properties: ko }, n = new URLSearchParams(globalThis.location.search);
|
471
|
+
n.get(Un) && t.unshift(["track", n.get(Un), Fn(n, e.properties)]), n.get($n) && t.unshift(["identify", n.get($n), Fn(n, e.trait)]), n.get(Mn) && t.unshift(["setAnonymousId", n.get(Mn)]);
|
472
|
+
}, Co = (t) => {
|
474
473
|
const e = "load";
|
475
474
|
let n = [], s = 0;
|
476
475
|
for (; s < t.length; ) {
|
@@ -481,31 +480,31 @@ const xn = (t, e) => {
|
|
481
480
|
s += 1;
|
482
481
|
}
|
483
482
|
return n;
|
484
|
-
},
|
483
|
+
}, _o = (t) => {
|
485
484
|
const e = "consent", n = t.filter((i) => i[0] === e), s = t.filter((i) => i[0] !== e);
|
486
485
|
t.splice(0, t.length, ...n, ...s);
|
487
|
-
},
|
488
|
-
const e =
|
489
|
-
|
490
|
-
},
|
486
|
+
}, Po = (t) => {
|
487
|
+
const e = js(rt) || [];
|
488
|
+
Do(e), e.length > 0 && (t.enqueuePreloadBufferEvents(e), ut(rt, []));
|
489
|
+
}, No = (t, e) => {
|
491
490
|
const n = t.shift();
|
492
491
|
let s;
|
493
492
|
if (S(e[n])) {
|
494
493
|
switch (n) {
|
495
494
|
case "page":
|
496
|
-
s =
|
495
|
+
s = Pt(...t);
|
497
496
|
break;
|
498
497
|
case "track":
|
499
|
-
s =
|
498
|
+
s = vn(...t);
|
500
499
|
break;
|
501
500
|
case "identify":
|
502
|
-
s =
|
501
|
+
s = Ms(...t);
|
503
502
|
break;
|
504
503
|
case "alias":
|
505
|
-
s =
|
504
|
+
s = $s(...t);
|
506
505
|
break;
|
507
506
|
case "group":
|
508
|
-
s =
|
507
|
+
s = Us(...t);
|
509
508
|
break;
|
510
509
|
default:
|
511
510
|
e[n](...t);
|
@@ -513,12 +512,12 @@ const xn = (t, e) => {
|
|
513
512
|
}
|
514
513
|
s && e[n](s);
|
515
514
|
}
|
516
|
-
},
|
515
|
+
}, Lo = 10 * 1e3, wo = "RS_JS_SDK", Mo = (t, e, n = !0, s = null, i = null, r = {}) => {
|
517
516
|
const a = document.createElement("script");
|
518
517
|
return a.type = "text/javascript", a.onload = s, a.onerror = i, a.src = t, a.id = e, a.async = n, Object.keys(r).forEach((u) => {
|
519
518
|
a.setAttribute(u, r[u]);
|
520
|
-
}), a.setAttribute("data-loader",
|
521
|
-
},
|
519
|
+
}), a.setAttribute("data-loader", wo), a;
|
520
|
+
}, $o = (t) => {
|
522
521
|
var r, a, u, l;
|
523
522
|
const e = document.getElementsByTagName("head");
|
524
523
|
if (e.length > 0) {
|
@@ -534,23 +533,23 @@ const xn = (t, e) => {
|
|
534
533
|
s.appendChild(t);
|
535
534
|
const i = document.getElementsByTagName("html")[0];
|
536
535
|
i == null || i.insertBefore(s, i.firstChild);
|
537
|
-
},
|
538
|
-
document.getElementById(e) && a(new Error(
|
536
|
+
}, Uo = (t, e, n, s = !0, i) => new Promise((r, a) => {
|
537
|
+
document.getElementById(e) && a(new Error(ao(e)));
|
539
538
|
try {
|
540
539
|
let l;
|
541
|
-
Mo(
|
540
|
+
$o(Mo(t, e, s, () => {
|
542
541
|
globalThis.clearTimeout(l), r(e);
|
543
542
|
}, (h) => {
|
544
|
-
globalThis.clearTimeout(l), a(new Error(
|
543
|
+
globalThis.clearTimeout(l), a(new Error(Nn(e, t, h)));
|
545
544
|
}, i)), l = globalThis.setTimeout(() => {
|
546
|
-
a(new Error(
|
545
|
+
a(new Error(lo(e, t, n)));
|
547
546
|
}, n);
|
548
547
|
} catch (l) {
|
549
|
-
a(
|
548
|
+
a(En(l, Nn(e, t, "unknown")));
|
550
549
|
}
|
551
550
|
});
|
552
|
-
class
|
553
|
-
constructor(e, n =
|
551
|
+
class qs {
|
552
|
+
constructor(e, n = Lo) {
|
554
553
|
this.logger = e, this.timeout = n;
|
555
554
|
}
|
556
555
|
/**
|
@@ -558,23 +557,23 @@ class zs {
|
|
558
557
|
*/
|
559
558
|
loadJSFile(e) {
|
560
559
|
const { url: n, id: s, timeout: i, async: r, callback: a, extraAttributes: u } = e, l = !S(a);
|
561
|
-
|
560
|
+
Uo(n, s, i || this.timeout, r, u).then((c) => {
|
562
561
|
l || a(c);
|
563
562
|
}).catch((c) => {
|
564
563
|
l || a(s, c);
|
565
564
|
});
|
566
565
|
}
|
567
566
|
}
|
568
|
-
var
|
569
|
-
function
|
567
|
+
var Bo = Symbol.for("preact-signals");
|
568
|
+
function Ut() {
|
570
569
|
if (Re > 1)
|
571
570
|
Re--;
|
572
571
|
else {
|
573
|
-
for (var t, e = !1;
|
574
|
-
var n =
|
575
|
-
for (
|
572
|
+
for (var t, e = !1; ot !== void 0; ) {
|
573
|
+
var n = ot;
|
574
|
+
for (ot = void 0, sn++; n !== void 0; ) {
|
576
575
|
var s = n.o;
|
577
|
-
if (n.o = void 0, n.f &= -3, !(8 & n.f) &&
|
576
|
+
if (n.o = void 0, n.f &= -3, !(8 & n.f) && Ks(n)) try {
|
578
577
|
n.c();
|
579
578
|
} catch (i) {
|
580
579
|
e || (t = i, e = !0);
|
@@ -582,7 +581,7 @@ function Bt() {
|
|
582
581
|
n = s;
|
583
582
|
}
|
584
583
|
}
|
585
|
-
if (
|
584
|
+
if (sn = 0, Re--, e) throw t;
|
586
585
|
}
|
587
586
|
}
|
588
587
|
function j(t) {
|
@@ -591,11 +590,11 @@ function j(t) {
|
|
591
590
|
try {
|
592
591
|
return t();
|
593
592
|
} finally {
|
594
|
-
|
593
|
+
Ut();
|
595
594
|
}
|
596
595
|
}
|
597
596
|
var D = void 0;
|
598
|
-
function
|
597
|
+
function zs(t) {
|
599
598
|
var e = D;
|
600
599
|
D = void 0;
|
601
600
|
try {
|
@@ -604,7 +603,7 @@ function Ks(t) {
|
|
604
603
|
D = e;
|
605
604
|
}
|
606
605
|
}
|
607
|
-
var
|
606
|
+
var ot = void 0, Re = 0, sn = 0, Nt = 0;
|
608
607
|
function Ys(t) {
|
609
608
|
if (D !== void 0) {
|
610
609
|
var e = t.n;
|
@@ -617,13 +616,13 @@ function Ys(t) {
|
|
617
616
|
function q(t, e) {
|
618
617
|
this.v = t, this.i = 0, this.n = void 0, this.t = void 0, this.W = e == null ? void 0 : e.watched, this.Z = e == null ? void 0 : e.unwatched;
|
619
618
|
}
|
620
|
-
q.prototype.brand =
|
619
|
+
q.prototype.brand = Bo;
|
621
620
|
q.prototype.h = function() {
|
622
621
|
return !0;
|
623
622
|
};
|
624
623
|
q.prototype.S = function(t) {
|
625
624
|
var e = this, n = this.t;
|
626
|
-
n !== t && t.e === void 0 && (t.x = n, this.t = t, n !== void 0 ? n.e = t :
|
625
|
+
n !== t && t.e === void 0 && (t.x = n, this.t = t, n !== void 0 ? n.e = t : zs(function() {
|
627
626
|
var s;
|
628
627
|
(s = e.W) == null || s.call(e);
|
629
628
|
}));
|
@@ -632,7 +631,7 @@ q.prototype.U = function(t) {
|
|
632
631
|
var e = this;
|
633
632
|
if (this.t !== void 0) {
|
634
633
|
var n = t.e, s = t.x;
|
635
|
-
n !== void 0 && (n.x = s, t.e = void 0), s !== void 0 && (s.e = n, t.x = void 0), t === this.t && (this.t = s, s === void 0 &&
|
634
|
+
n !== void 0 && (n.x = s, t.e = void 0), s !== void 0 && (s.e = n, t.x = void 0), t === this.t && (this.t = s, s === void 0 && zs(function() {
|
636
635
|
var i;
|
637
636
|
(i = e.Z) == null || i.call(e);
|
638
637
|
}));
|
@@ -673,23 +672,23 @@ Object.defineProperty(q.prototype, "value", { get: function() {
|
|
673
672
|
return t !== void 0 && (t.i = this.i), this.v;
|
674
673
|
}, set: function(t) {
|
675
674
|
if (t !== this.v) {
|
676
|
-
if (
|
677
|
-
this.v = t, this.i++,
|
675
|
+
if (sn > 100) throw new Error("Cycle detected");
|
676
|
+
this.v = t, this.i++, Nt++, Re++;
|
678
677
|
try {
|
679
678
|
for (var e = this.t; e !== void 0; e = e.x) e.t.N();
|
680
679
|
} finally {
|
681
|
-
|
680
|
+
Ut();
|
682
681
|
}
|
683
682
|
}
|
684
683
|
} });
|
685
684
|
function p(t, e) {
|
686
685
|
return new q(t, e);
|
687
686
|
}
|
688
|
-
function
|
687
|
+
function Ks(t) {
|
689
688
|
for (var e = t.s; e !== void 0; e = e.n) if (e.S.i !== e.i || !e.S.h() || e.S.i !== e.i) return !0;
|
690
689
|
return !1;
|
691
690
|
}
|
692
|
-
function
|
691
|
+
function Ws(t) {
|
693
692
|
for (var e = t.s; e !== void 0; e = e.n) {
|
694
693
|
var n = e.S.n;
|
695
694
|
if (n !== void 0 && (e.r = n), e.S.n = e, e.i = -1, e.n === void 0) {
|
@@ -698,7 +697,7 @@ function Qs(t) {
|
|
698
697
|
}
|
699
698
|
}
|
700
699
|
}
|
701
|
-
function
|
700
|
+
function Qs(t) {
|
702
701
|
for (var e = t.s, n = void 0; e !== void 0; ) {
|
703
702
|
var s = e.p;
|
704
703
|
e.i === -1 ? (e.S.U(e), s !== void 0 && (s.n = e.n), e.n !== void 0 && (e.n.p = s)) : n = e, e.S.n = e.r, e.r !== void 0 && (e.r = void 0), e = s;
|
@@ -706,23 +705,23 @@ function Xs(t) {
|
|
706
705
|
t.s = n;
|
707
706
|
}
|
708
707
|
function We(t, e) {
|
709
|
-
q.call(this, void 0), this.x = t, this.s = void 0, this.g =
|
708
|
+
q.call(this, void 0), this.x = t, this.s = void 0, this.g = Nt - 1, this.f = 4, this.W = e == null ? void 0 : e.watched, this.Z = e == null ? void 0 : e.unwatched;
|
710
709
|
}
|
711
710
|
We.prototype = new q();
|
712
711
|
We.prototype.h = function() {
|
713
712
|
if (this.f &= -3, 1 & this.f) return !1;
|
714
|
-
if ((36 & this.f) == 32 || (this.f &= -5, this.g ===
|
715
|
-
if (this.g =
|
713
|
+
if ((36 & this.f) == 32 || (this.f &= -5, this.g === Nt)) return !0;
|
714
|
+
if (this.g = Nt, this.f |= 1, this.i > 0 && !Ks(this))
|
716
715
|
return this.f &= -2, !0;
|
717
716
|
var t = D;
|
718
717
|
try {
|
719
|
-
|
718
|
+
Ws(this), D = this;
|
720
719
|
var e = this.x();
|
721
720
|
(16 & this.f || this.v !== e || this.i === 0) && (this.v = e, this.f &= -17, this.i++);
|
722
721
|
} catch (n) {
|
723
722
|
this.v = n, this.f |= 16, this.i++;
|
724
723
|
}
|
725
|
-
return D = t,
|
724
|
+
return D = t, Qs(this), this.f &= -2, !0;
|
726
725
|
};
|
727
726
|
We.prototype.S = function(t) {
|
728
727
|
if (this.t === void 0) {
|
@@ -749,7 +748,7 @@ Object.defineProperty(We.prototype, "value", { get: function() {
|
|
749
748
|
if (this.h(), t !== void 0 && (t.i = this.i), 16 & this.f) throw this.v;
|
750
749
|
return this.v;
|
751
750
|
} });
|
752
|
-
function
|
751
|
+
function Xs(t) {
|
753
752
|
var e = t.u;
|
754
753
|
if (t.u = void 0, typeof e == "function") {
|
755
754
|
Re++;
|
@@ -758,19 +757,19 @@ function Js(t) {
|
|
758
757
|
try {
|
759
758
|
e();
|
760
759
|
} catch (s) {
|
761
|
-
throw t.f &= -2, t.f |= 8,
|
760
|
+
throw t.f &= -2, t.f |= 8, Sn(t), s;
|
762
761
|
} finally {
|
763
|
-
D = n,
|
762
|
+
D = n, Ut();
|
764
763
|
}
|
765
764
|
}
|
766
765
|
}
|
767
|
-
function
|
766
|
+
function Sn(t) {
|
768
767
|
for (var e = t.s; e !== void 0; e = e.n) e.S.U(e);
|
769
|
-
t.x = void 0, t.s = void 0,
|
768
|
+
t.x = void 0, t.s = void 0, Xs(t);
|
770
769
|
}
|
771
|
-
function
|
770
|
+
function Vo(t) {
|
772
771
|
if (D !== this) throw new Error("Out-of-order effect");
|
773
|
-
|
772
|
+
Qs(this), D = t, this.f &= -2, 8 & this.f && Sn(this), Ut();
|
774
773
|
}
|
775
774
|
function Qe(t) {
|
776
775
|
this.x = t, this.u = void 0, this.s = void 0, this.o = void 0, this.f = 32;
|
@@ -787,15 +786,15 @@ Qe.prototype.c = function() {
|
|
787
786
|
};
|
788
787
|
Qe.prototype.S = function() {
|
789
788
|
if (1 & this.f) throw new Error("Cycle detected");
|
790
|
-
this.f |= 1, this.f &= -9,
|
789
|
+
this.f |= 1, this.f &= -9, Xs(this), Ws(this), Re++;
|
791
790
|
var t = D;
|
792
|
-
return D = this,
|
791
|
+
return D = this, Vo.bind(this, t);
|
793
792
|
};
|
794
793
|
Qe.prototype.N = function() {
|
795
|
-
2 & this.f || (this.f |= 2, this.o =
|
794
|
+
2 & this.f || (this.f |= 2, this.o = ot, ot = this);
|
796
795
|
};
|
797
796
|
Qe.prototype.d = function() {
|
798
|
-
this.f |= 8, 1 & this.f ||
|
797
|
+
this.f |= 8, 1 & this.f || Sn(this);
|
799
798
|
};
|
800
799
|
Qe.prototype.dispose = function() {
|
801
800
|
this.d();
|
@@ -809,7 +808,7 @@ function fe(t) {
|
|
809
808
|
}
|
810
809
|
return e.d.bind(e);
|
811
810
|
}
|
812
|
-
class
|
811
|
+
class Fo {
|
813
812
|
constructor() {
|
814
813
|
this.items = [];
|
815
814
|
}
|
@@ -829,10 +828,10 @@ class Vo {
|
|
829
828
|
this.items = [];
|
830
829
|
}
|
831
830
|
}
|
832
|
-
const
|
833
|
-
class
|
834
|
-
constructor(e =
|
835
|
-
this.minLogLevel =
|
831
|
+
const mt = { LOG: 0, INFO: 1, DEBUG: 2, WARN: 3, ERROR: 4, NONE: 5 }, xn = "LOG", Js = "ERROR", xo = "RS SDK", Ho = "font-weight: bold; background: black; color: white;", Go = "font-weight: normal;";
|
832
|
+
class jo {
|
833
|
+
constructor(e = xn, n = "", s = console) {
|
834
|
+
this.minLogLevel = mt[e], this.scope = n, this.logProvider = s;
|
836
835
|
}
|
837
836
|
log(...e) {
|
838
837
|
this.outputLog("LOG", e);
|
@@ -851,7 +850,7 @@ class Go {
|
|
851
850
|
}
|
852
851
|
outputLog(e, n) {
|
853
852
|
var s, i;
|
854
|
-
this.minLogLevel <=
|
853
|
+
this.minLogLevel <= mt[e] && ((i = (s = this.logProvider)[e.toLowerCase()]) == null || i.call(s, ...this.formatLogData(n)));
|
855
854
|
}
|
856
855
|
setScope(e) {
|
857
856
|
this.scope = e || this.scope;
|
@@ -859,22 +858,22 @@ class Go {
|
|
859
858
|
// TODO: should we allow to change the level via global variable on run time
|
860
859
|
// to assist on the fly debugging?
|
861
860
|
setMinLogLevel(e) {
|
862
|
-
this.minLogLevel =
|
861
|
+
this.minLogLevel = mt[e], x(this.minLogLevel) && (this.minLogLevel = mt[xn]);
|
863
862
|
}
|
864
863
|
/**
|
865
864
|
* Formats the console message using `scope` and styles
|
866
865
|
*/
|
867
866
|
formatLogData(e) {
|
868
867
|
if (Array.isArray(e) && e.length > 0) {
|
869
|
-
let n = `%c ${
|
868
|
+
let n = `%c ${xo}`;
|
870
869
|
this.scope && (n = `${n} - ${this.scope}`);
|
871
870
|
const s = L(e[0]) ? e[0].trim() : "";
|
872
871
|
n = `${n} %c ${s}`;
|
873
872
|
const i = [
|
874
873
|
n,
|
875
|
-
|
874
|
+
Ho,
|
876
875
|
// add style for the prefix
|
877
|
-
|
876
|
+
Go
|
878
877
|
// reset the style for the actual message
|
879
878
|
];
|
880
879
|
return L(e[0]) || i.push(e[0]), i.push(...e.slice(1)), i;
|
@@ -882,27 +881,27 @@ class Go {
|
|
882
881
|
return e;
|
883
882
|
}
|
884
883
|
}
|
885
|
-
const ye = new
|
884
|
+
const ye = new jo();
|
886
885
|
let me = /* @__PURE__ */ function(t) {
|
887
886
|
return t.HANDLEDEXCEPTION = "handledException", t.UNHANDLEDEXCEPTION = "unhandledException", t.UNHANDLEDREJECTION = "unhandledPromiseRejection", t;
|
888
887
|
}({});
|
889
|
-
const
|
888
|
+
const Zs = ["localStorage", "memoryStorage", "cookieStorage", "sessionStorage", "none"], rn = "cookieStorage", Hn = "Unable to process/parse source configuration response", qo = "The source is disabled. Please enable the source in the dashboard to send events.", zo = "Failed to prepare data for the request.", Yo = "Failed to invoke plugin because the extension point name is missing.", Ko = "Failed to invoke plugin because the extension point name is invalid.", Wo = (t) => `${t}${R}The "getSourceConfig" load API option must be a function that returns valid source configuration data.`, Qo = (t, e, n) => `${t}${R}The base URL "${n}" for ${e} is not valid.`, Xo = (t, e, n) => `${t}${R}The consent manager "${e}" is not supported. Please choose one of the following supported consent managers: "${Object.keys(n)}".`, Jo = (t, e) => `${t}${R}Ignoring a non-error: ${e}.`, Gn = "Failed to log breadcrumb", Zo = (t) => `${t}${R}Failed to handle the error.`, ea = (t) => `${t}${R}Plugin name is missing.`, ta = (t, e) => `${t}${R}Plugin "${e}" already exists.`, na = (t, e) => `${t}${R}Plugin "${e}" not found.`, sa = (t, e) => `${t}${R}Plugin "${e}" not found in plugins but found in byName. This indicates a bug in the plugin engine. Please report this issue to the development team.`, ia = (t, e, n) => `${t}${R}Plugin "${e}" could not be loaded because some of its dependencies "${n}" do not exist.`, ra = (t, e, n) => `${t}${R}Failed to invoke the "${e}" extension point of plugin "${n}".`, oa = (t, e) => `${t}${R}The "${e}" storage type is `, jn = "Failed to fetch the source config", aa = (t, e) => `${t}${R}The write key "${e}" is invalid. It must be a non-empty string. Please check that the write key is correct and try again.`, la = (t, e) => `${t}${R}The data plane URL "${e}" is invalid. It must be a valid URL string. Please check that the data plane URL is correct and try again.`, ei = (t) => `${t}${R}The provided callback parameter is not a function.`, ua = (t, e, n, s, i) => `${t} with status ${e} (${n}) for URL: ${s}. Response: ${i.trim()}`, ca = (t, e, n) => `${t} due to timeout or no connection (${e ? e.type : ""}) at the client side for URL: ${n}`, da = (t, e) => `${t} for URL: ${e}`, fa = (t) => `Failed to save the value for "${t}" to storage`, ha = (t) => `Failed to retrieve or parse data for "${t}" from storage`, ga = (t) => `The server responded with status ${t} while setting the cookies. As a fallback, the cookies will be set client side.`, ma = (t) => `The server failed to set the ${t} cookie. As a fallback, the cookies will be set client side.`, qn = "Failed to set/remove cookies via server. As a fallback, the cookies will be managed client side.", pa = (t, e, n) => `${t}${R}The storage type "${e}" is not supported. Please choose one of the following supported types: "${Zs}". The default type "${n}" will be used instead.`, va = (t, e, n, s) => `${t}${R}The storage encryption version "${e}" is not supported. Please choose one of the following supported versions: "${Object.keys(n)}". The default version "${s}" will be used instead.`, ya = (t, e, n) => `${t}${R}The storage data migration has been disabled because the configured storage encryption version (${e}) is not the latest (${n}). To enable storage data migration, please update the storage encryption version to the latest version.`, ba = (t, e, n) => `${t}${R}The provided cookie domain (${e}) does not match the current webpage's domain (${n}). Hence, the cookies will be set client-side.`, Ea = (t, e, n, s) => `${t}${R}The "${e}" property defined under "${n}" is a reserved keyword. Please choose a different property name to avoid conflicts with reserved keywords (${s}).`, Sa = (t) => `${t}${R}Please make sure that the "context" property in the event API's "options" argument is a valid object literal with key-value pairs.`, ka = (t) => `${t}${R}The Beacon API is not supported by your browser. The events will be sent using XHR instead.`, Ra = (t, e, n) => `${t}${R}The session timeout value "${e}" is not a number. The default timeout of ${n} ms will be used instead.`, Ia = (t, e, n) => `${t}${R}The session cut off duration value "${e}" is not a number. The default cut off duration of ${n} ms will be used instead.`, Ta = (t, e, n) => `${t}${R}The session cut off duration value "${e}" ms is less than the session timeout value "${n}" ms. The cut off functionality will be disabled.`, Aa = (t) => `${t}${R}The session timeout value is 0, which disables the automatic session tracking feature. If you want to enable session tracking, please provide a positive integer value for the timeout.`, Oa = (t, e, n) => `${t}${R}The session timeout value ${e} ms is less than the recommended minimum of ${n} ms. Please consider increasing the timeout value to ensure optimal performance and reliability.`, Da = (t, e, n) => `${t}${R}The provided session ID (${e}) is either invalid, not a positive integer, or not at least "${n}" digits long. A new session ID will be auto-generated instead.`, Ca = (t) => `${t}${R}The storage is either full or unavailable, so the data will not be persisted. Switching to in-memory storage.`, _a = (t, e, n, s) => `${t}${R}The storage type "${n}" is not available for entry "${e}". The SDK will initialize the entry with "${s}" storage type instead.`, Pa = (t) => `${t}${R}The callback threw an exception`, Na = (t, e) => `${t}${R}The provided source config URL "${e}" is invalid. Using the default source config URL instead.`, La = (t, e) => `Failed to load the polyfill script with ID "${t}" from URL ${e}.`, wa = (t, e, n) => `${t}${R}The pre-consent storage strategy "${e}" is not supported. Please choose one of the following supported strategies: "none, session, anonymousId". The default strategy "${n}" will be used instead.`, Ma = (t, e, n) => `${t}${R}The pre-consent events delivery type "${e}" is not supported. Please choose one of the following supported types: "immediate, buffer". The default type "${n}" will be used instead.`, $a = (t, e) => `${t}${R}${e} plugin is deprecated. Please exclude it from the load API options.`, Ua = (t, e, n, s) => {
|
890
889
|
const i = n.length === 1, r = i ? ` '${n[0]}' plugin was` : ` ['${n.join("', '")}'] plugins were`, a = `${t}${R}${e}, but${r} not configured to load.`;
|
891
890
|
return s ? `${a} So, ${i ? "the plugin" : "those plugins"} will be loaded automatically.` : `${a} Ignore if this was intentional. Otherwise, consider adding ${i ? "it" : "them"} to the 'plugins' load API option.`;
|
892
|
-
},
|
891
|
+
}, Ba = (t, e) => `${t}${R}The provided polyfill URL "${e}" is invalid. The default polyfill URL will be used instead.`, Va = (t) => `${t}${R}Page Unloaded event can only be tracked when the Beacon transport is active. Please enable "useBeacon" load API option.`, Fa = (t, e) => `${t}${R}Ignoring unknown plugins: ${e.join(", ")}.`, ti = { All: !0 }, kn = "js-integrations", ni = "plugins", xa = new RegExp("^(https?:\\/\\/)(((([a-zA-Z\\d]([a-zA-Z\\d-]*[a-zA-Z\\d])*)\\.)+[a-zA-Z]{2,}|localhost|((25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9]?)))(\\:\\d+)?(\\/[-a-zA-Z\\d%_.~+]*)*(\\?[;&a-zA-Z\\d%_.~+=-]*)?(\\#[-a-zA-Z\\d_]*)?$"), ct = "modern", Bt = "https://cdn.rudderlabs.com", Rn = "v3", si = `${Bt}/${Rn}/${ct}/${kn}`, ii = `${Bt}/${Rn}/${ct}/${ni}`, ri = "https://api.rudderstack.com", Ce = "v3", Ha = "xhr", on = { iubenda: "IubendaConsentManager", oneTrust: "OneTrustConsentManager", ketch: "KetchConsentManager", custom: "CustomConsentManager" }, Rt = { [Ce]: "StorageEncryption", legacy: "StorageEncryptionLegacy" }, Ga = { [Ha]: "XhrQueue", beacon: "BeaconQueue" }, ja = "rsaRequest", qa = "rsaMetrics", za = { configUrl: ri, loadIntegration: !0, sessions: { autoTrack: !0, timeout: nn, cutOff: { enabled: !1 } }, sameSiteCookie: "Lax", polyfillIfRequired: !0, integrations: ti, useBeacon: !1, beaconQueueOptions: {}, destinationsQueueOptions: {}, queueOptions: {}, lockIntegrationsVersion: !0, lockPluginsVersion: !0, uaChTrackLevel: "none", plugins: [], useGlobalIntegrationsConfigInEvents: !1, bufferDataPlaneEventsUntilReady: !1, dataPlaneEventsBufferTimeout: To, storage: { encryption: { version: Ce }, migrate: !0, cookie: {} }, sendAdblockPage: !1, sameDomainCookiesOnly: !1, secureCookie: !1, sendAdblockPageOptions: {}, useServerSideCookies: !1 }, Ya = p(T(za)), A = { userId: "", userTraits: {}, anonymousId: "", groupId: "", groupTraits: {}, initialReferrer: "", initialReferringDomain: "", sessionInfo: {}, authToken: null }, Ka = 10, Wa = { userId: p(A.userId), userTraits: p(A.userTraits), anonymousId: p(A.anonymousId), groupId: p(A.groupId), groupTraits: p(A.groupTraits), initialReferrer: p(A.initialReferrer), initialReferringDomain: p(A.initialReferringDomain), sessionInfo: p(A.sessionInfo), authToken: p(A.authToken) }, Qa = { isOnline: p(!0), storage: { isLocalStorageAvailable: p(!1), isCookieStorageAvailable: p(!1), isSessionStorageAvailable: p(!1) }, isBeaconAvailable: p(!1), isLegacyDOM: p(!1), isUaCHAvailable: p(!1), isCryptoAvailable: p(!1), isIE11: p(!1), isAdBlockerDetectionInProgress: p(!1), isAdBlocked: p(void 0), cspBlockedURLs: p([]) }, Xa = { isErrorReportingEnabled: p(!1), isMetricsReportingEnabled: p(!1), breadcrumbs: p([]) }, Ja = p(void 0), Za = { activeDataplaneUrl: p(void 0), integrationsCDNPath: p(si), pluginsCDNPath: p(ii), sourceConfigUrl: p(void 0), status: p(void 0), initialized: p(!1), logLevel: p(Js), loaded: p(!1), readyCallbacks: p([]), writeKey: p(void 0), dataPlaneUrl: p(void 0) }, el = { enabled: p(!1), initialized: p(!1), data: p({}), activeConsentManagerPluginName: p(void 0), preConsent: p({ enabled: !1 }), postConsent: p({}), resolutionStrategy: p("and"), provider: p(void 0), metadata: p(void 0) }, tl = { retries: p(0), dropped: p(0), sent: p(0), queued: p(0), triggered: p(0), metricsServiceUrl: p(void 0) }, nl = { app: p({ name: Ln, namespace: vo, version: lt, installType: Hs }), traits: p(null), library: p({ name: Ln, version: lt, snippetVersion: globalThis.RudderSnippetVersion }), userAgent: p(null), device: p(null), network: p(null), os: p({ name: "", version: "" }), locale: p(null), screen: p({ density: 0, width: 0, height: 0, innerWidth: 0, innerHeight: 0 }), "ua-ch": p(void 0), timezone: p(void 0) }, sl = { configuredDestinations: p([]), activeDestinations: p([]), loadOnlyIntegrations: p({}), failedDestinations: p([]), loadIntegration: p(!0), initializedDestinations: p([]), clientDestinationsReady: p(!1), integrationsConfig: p({}) }, il = { toBeProcessedArray: p([]), readyCallbacksArray: p([]) }, rl = { ready: p(!1), loadedPlugins: p([]), failedPlugins: p([]), pluginsToLoadFromConfig: p([]), activePlugins: p([]), totalPluginsToLoad: p(0) }, ol = { encryptionPluginName: p(void 0), migrate: p(!1), type: p(void 0), cookie: p(void 0), entries: p({}), trulyAnonymousTracking: p(!1) }, al = { isEnabledServerSideCookies: p(!1), dataServiceUrl: p(void 0) }, ll = {
|
893
892
|
eventsQueuePluginName: p(void 0),
|
894
893
|
deliveryEnabled: p(!0)
|
895
894
|
// Delivery should always happen
|
896
|
-
},
|
897
|
-
function
|
895
|
+
}, ul = { enabled: p(!1), pageLifecycle: { enabled: p(!1), pageViewId: p(void 0), pageLoadedTimestamp: p(void 0) } }, cl = { capabilities: Qa, consents: el, context: nl, eventBuffer: il, lifecycle: Za, loadOptions: Ya, metrics: tl, nativeDestinations: sl, plugins: rl, reporting: Xa, session: Wa, source: Ja, storage: ol, serverCookies: al, dataPlaneEvents: ll, autoTrack: ul }, o = { ...T(cl) };
|
896
|
+
function oi(t) {
|
898
897
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
899
898
|
}
|
900
|
-
var
|
901
|
-
function
|
902
|
-
return
|
899
|
+
var It = { exports: {} }, Tt = { exports: {} }, dl = Tt.exports, zn;
|
900
|
+
function fl() {
|
901
|
+
return zn || (zn = 1, function(t, e) {
|
903
902
|
(function(n, s) {
|
904
903
|
t.exports = s();
|
905
|
-
})(
|
904
|
+
})(dl, function() {
|
906
905
|
function n(m) {
|
907
906
|
return !isNaN(parseFloat(m)) && isFinite(m);
|
908
907
|
}
|
@@ -966,14 +965,14 @@ function dl() {
|
|
966
965
|
}(u[f]);
|
967
966
|
return h;
|
968
967
|
});
|
969
|
-
}(
|
968
|
+
}(Tt)), Tt.exports;
|
970
969
|
}
|
971
|
-
var
|
972
|
-
function
|
970
|
+
var hl = It.exports, Yn;
|
971
|
+
function gl() {
|
973
972
|
return Yn || (Yn = 1, function(t, e) {
|
974
973
|
(function(n, s) {
|
975
|
-
t.exports = s(
|
976
|
-
})(
|
974
|
+
t.exports = s(fl());
|
975
|
+
})(hl, function(s) {
|
977
976
|
var i = /(^|@)\S+:\d+/, r = /^\s*at .*(\S+:\d+|\(native\))/m, a = /^(eval@)?(\[native code])?$/;
|
978
977
|
return {
|
979
978
|
/**
|
@@ -1060,16 +1059,16 @@ function hl() {
|
|
1060
1059
|
}
|
1061
1060
|
};
|
1062
1061
|
});
|
1063
|
-
}(
|
1062
|
+
}(It)), It.exports;
|
1064
1063
|
}
|
1065
|
-
var
|
1066
|
-
const
|
1067
|
-
const e = { file: t.fileName, method:
|
1068
|
-
return e.lineNumber && e.lineNumber > -1 && !e.file && !e.method && (e.file =
|
1069
|
-
},
|
1070
|
-
function
|
1071
|
-
return { errorClass:
|
1072
|
-
const a =
|
1064
|
+
var ml = gl();
|
1065
|
+
const pl = /* @__PURE__ */ oi(ml), ai = "global code", vl = (t) => C(t) && /^global code$/i.test(t) ? ai : t, yl = (t) => {
|
1066
|
+
const e = { file: t.fileName, method: vl(t.functionName), lineNumber: t.lineNumber, columnNumber: t.columnNumber };
|
1067
|
+
return e.lineNumber && e.lineNumber > -1 && !e.file && !e.method && (e.file = ai), e;
|
1068
|
+
}, Kn = (t) => L(t) ? t : "";
|
1069
|
+
function Wn(t, e, n, s) {
|
1070
|
+
return { errorClass: Kn(t), message: `${n}${Kn(e)}`, type: "browserjs", stacktrace: s.reduce((i, r) => {
|
1071
|
+
const a = yl(r);
|
1073
1072
|
try {
|
1074
1073
|
return JSON.stringify(a) === "{}" ? i : i.concat(a);
|
1075
1074
|
} catch {
|
@@ -1077,38 +1076,38 @@ function Qn(t, e, n, s) {
|
|
1077
1076
|
}
|
1078
1077
|
}, []) };
|
1079
1078
|
}
|
1080
|
-
const
|
1079
|
+
const li = (t, e) => {
|
1081
1080
|
let n;
|
1082
|
-
return
|
1083
|
-
},
|
1081
|
+
return pn(t) && L(bn(t)) ? n = t : (e.warn(Jo(nt, de(t))), n = void 0), n;
|
1082
|
+
}, bl = (t, e) => {
|
1084
1083
|
try {
|
1085
|
-
const n =
|
1086
|
-
return
|
1084
|
+
const n = pl.parse(t);
|
1085
|
+
return Wn(t.name, t.message, e, n);
|
1087
1086
|
} catch {
|
1088
|
-
return
|
1087
|
+
return Wn(t.name, t.message, e, []);
|
1089
1088
|
}
|
1090
|
-
},
|
1089
|
+
}, Qn = (t, e) => {
|
1091
1090
|
try {
|
1092
1091
|
return JSON.parse(t || "");
|
1093
1092
|
} catch (n) {
|
1094
|
-
const s =
|
1093
|
+
const s = En(n, "Failed to parse response data");
|
1095
1094
|
e(s);
|
1096
1095
|
}
|
1097
|
-
},
|
1098
|
-
const s = H(
|
1096
|
+
}, At = "The request failed", El = [/Failed to fetch dynamically imported module: .*/], Sl = [/Unable to load \(.*\) the script with the id .*/, /A timeout of \d+ ms occurred while trying to load the script with id .*/], kl = [new RegExp(`${At}.*`), /A script with the id .* is already loaded\./], Rl = [...El, ...Sl], Il = { headers: { Accept: "application/json", "Content-Type": "application/json;charset=UTF-8" }, method: "GET" }, Xn = (t, e, n) => {
|
1097
|
+
const s = H(Il, e || {});
|
1099
1098
|
return n && (s.headers = H(s.headers, { Authorization: n })), s.url = t, s;
|
1100
|
-
},
|
1099
|
+
}, Jn = (t, e = Ro, n) => new Promise((s, i) => {
|
1101
1100
|
let r;
|
1102
1101
|
if (t.sendRawData === !0)
|
1103
1102
|
r = t.data;
|
1104
1103
|
else if (r = de(t.data, !1, [], n), ne(r)) {
|
1105
|
-
i({ error: new Error(
|
1104
|
+
i({ error: new Error(zo), undefined: void 0, options: t });
|
1106
1105
|
return;
|
1107
1106
|
}
|
1108
1107
|
const a = new XMLHttpRequest(), u = (c) => {
|
1109
|
-
i({ error: new Error(
|
1108
|
+
i({ error: new Error(ua(At, a.status, a.statusText, t.url, a.responseText)), xhr: a, options: t });
|
1110
1109
|
}, l = (c) => {
|
1111
|
-
i({ error: new Error(
|
1110
|
+
i({ error: new Error(ca(At, c, t.url)), xhr: a, options: t, ...(c == null ? void 0 : c.type) === "timeout" ? { timedOut: !0 } : {} });
|
1112
1111
|
};
|
1113
1112
|
a.ontimeout = l, a.onerror = l, a.onload = () => {
|
1114
1113
|
a.status >= 200 && a.status < 400 ? s({ response: a.responseText, xhr: a, options: t }) : u();
|
@@ -1118,10 +1117,10 @@ const ui = (t, e) => {
|
|
1118
1117
|
try {
|
1119
1118
|
a.send(r);
|
1120
1119
|
} catch (c) {
|
1121
|
-
i({ error:
|
1120
|
+
i({ error: En(c, da(At, t.url)), xhr: a, options: t });
|
1122
1121
|
}
|
1123
1122
|
});
|
1124
|
-
class
|
1123
|
+
class Tl {
|
1125
1124
|
constructor(e) {
|
1126
1125
|
this.logger = e, this.onError = this.onError.bind(this);
|
1127
1126
|
}
|
@@ -1134,8 +1133,8 @@ class Il {
|
|
1134
1133
|
async getData(e) {
|
1135
1134
|
const { url: n, options: s, timeout: i, isRawResponse: r } = e;
|
1136
1135
|
try {
|
1137
|
-
const a = await
|
1138
|
-
return { data: r ? a.response :
|
1136
|
+
const a = await Jn(Xn(n, s, this.basicAuthHeader), i, this.logger);
|
1137
|
+
return { data: r ? a.response : Qn(a.response, this.onError), details: a };
|
1139
1138
|
} catch (a) {
|
1140
1139
|
return { data: void 0, details: a };
|
1141
1140
|
}
|
@@ -1145,8 +1144,8 @@ class Il {
|
|
1145
1144
|
*/
|
1146
1145
|
getAsyncData(e) {
|
1147
1146
|
const { callback: n, url: s, options: i, timeout: r, isRawResponse: a } = e, u = !S(n);
|
1148
|
-
|
1149
|
-
u || n(a ? l.response :
|
1147
|
+
Jn(Xn(s, i, this.basicAuthHeader), r, this.logger).then((l) => {
|
1148
|
+
u || n(a ? l.response : Qn(l.response, this.onError), l);
|
1150
1149
|
}).catch((l) => {
|
1151
1150
|
u || n(void 0, l);
|
1152
1151
|
});
|
@@ -1156,13 +1155,13 @@ class Il {
|
|
1156
1155
|
*/
|
1157
1156
|
onError(e, n) {
|
1158
1157
|
var s;
|
1159
|
-
(s = this.errorHandler) == null || s.onError({ error: e, context:
|
1158
|
+
(s = this.errorHandler) == null || s.onError({ error: e, context: Zr, groupingHash: n });
|
1160
1159
|
}
|
1161
1160
|
/**
|
1162
1161
|
* Set basic authentication header (eg writekey)
|
1163
1162
|
*/
|
1164
1163
|
setAuthHeader(e, n = !1) {
|
1165
|
-
const s = n ? e :
|
1164
|
+
const s = n ? e : Qr(`${e}:`);
|
1166
1165
|
this.basicAuthHeader = `Basic ${s}`;
|
1167
1166
|
}
|
1168
1167
|
/**
|
@@ -1172,10 +1171,10 @@ class Il {
|
|
1172
1171
|
this.basicAuthHeader = void 0;
|
1173
1172
|
}
|
1174
1173
|
}
|
1175
|
-
const
|
1174
|
+
const ui = new Tl(ye), Al = "1", Ol = () => [
|
1176
1175
|
"rsa"
|
1177
1176
|
// Prefix for all the SDK scripts including plugins and module federated chunks
|
1178
|
-
],
|
1177
|
+
], Dl = ["www.test-host.com", "localhost", "127.0.0.1", "[::1]"], Cl = [
|
1179
1178
|
"userId",
|
1180
1179
|
"userTraits",
|
1181
1180
|
"groupId",
|
@@ -1188,7 +1187,7 @@ const ci = new Il(ye), Tl = "1", Al = () => [
|
|
1188
1187
|
// pre-load event buffer (may contain PII)
|
1189
1188
|
"traits",
|
1190
1189
|
"authToken"
|
1191
|
-
],
|
1190
|
+
], _l = "RudderStack JavaScript SDK", Pl = "__REPOSITORY_URL__", Nl = "js", ci = (t) => {
|
1192
1191
|
o.capabilities.isAdBlockerDetectionInProgress.value = !0;
|
1193
1192
|
try {
|
1194
1193
|
const e = new URL(o.lifecycle.sourceConfigUrl.value), n = `${e.origin}${e.pathname}?view=ad`;
|
@@ -1203,7 +1202,7 @@ const ci = new Il(ye), Tl = "1", Al = () => [
|
|
1203
1202
|
} catch (e) {
|
1204
1203
|
throw o.capabilities.isAdBlockerDetectionInProgress.value = !1, e;
|
1205
1204
|
}
|
1206
|
-
},
|
1205
|
+
}, Ll = (t, e) => {
|
1207
1206
|
switch (e) {
|
1208
1207
|
case me.UNHANDLEDEXCEPTION: {
|
1209
1208
|
const { error: n } = t;
|
@@ -1215,53 +1214,53 @@ const ci = new Il(ye), Tl = "1", Al = () => [
|
|
1215
1214
|
default:
|
1216
1215
|
return t;
|
1217
1216
|
}
|
1218
|
-
},
|
1217
|
+
}, wl = (t) => ({ type: "manual", name: t, timestamp: /* @__PURE__ */ new Date(), metaData: {} }), Ml = () => {
|
1219
1218
|
const t = globalThis.location.hostname;
|
1220
|
-
return !t || t &&
|
1221
|
-
},
|
1222
|
-
const e = de(t, !1,
|
1219
|
+
return !t || t && Dl.includes(t) ? "development" : "production";
|
1220
|
+
}, $l = (t) => {
|
1221
|
+
const e = de(t, !1, Cl);
|
1223
1222
|
return e !== null ? JSON.parse(e) : {};
|
1224
|
-
},
|
1223
|
+
}, Ul = () => globalThis.location.href.split("?")[0], Bl = (t, e, n, s) => {
|
1225
1224
|
var i, r;
|
1226
1225
|
return { id: `${((i = t.value) == null ? void 0 : i.id) ?? n.writeKey.value}..${e.sessionInfo.value.id ?? "NA"}..${s.pageLifecycle.pageViewId.value ?? "NA"}`, name: ((r = t.value) == null ? void 0 : r.name) ?? "NA" };
|
1227
|
-
},
|
1226
|
+
}, Vl = (t, e) => ({ locale: t.value ?? "NA", userAgent: e.value ?? "NA", time: /* @__PURE__ */ new Date() }), Fl = (t, e, n, s) => {
|
1228
1227
|
const { context: i, lifecycle: r, session: a, source: u, reporting: l, autoTrack: c } = n, { app: d, locale: h, userAgent: y, timezone: g, screen: f, library: m } = i;
|
1229
|
-
return { payloadVersion: "5", notifier: { name:
|
1228
|
+
return { payloadVersion: "5", notifier: { name: _l, version: d.value.version, url: Pl }, events: [{ exceptions: [T(t)], severity: e.severity, unhandled: e.unhandled, severityReason: e.severityReason, app: { version: d.value.version, releaseStage: Ml(), type: d.value.installType }, device: Vl(h, y), request: { url: Ul(), clientIp: "[NOT COLLECTED]" }, breadcrumbs: T(l.breadcrumbs.value), context: t.message, groupingHash: s, metaData: {
|
1230
1229
|
app: { snippetVersion: m.value.snippetVersion },
|
1231
1230
|
device: { ...f.value, timezone: g.value },
|
1232
1231
|
// Add rest of the state groups as metadata
|
1233
1232
|
// so that they show up as separate tabs in the dashboard
|
1234
|
-
|
1235
|
-
}, user:
|
1236
|
-
},
|
1233
|
+
...$l(n)
|
1234
|
+
}, user: Bl(u, a, r, c) }] };
|
1235
|
+
}, xl = (t, e, n) => {
|
1237
1236
|
if (x(t.capabilities.isAdBlocked.value)) {
|
1238
|
-
t.capabilities.isAdBlockerDetectionInProgress.value === !1 &&
|
1237
|
+
t.capabilities.isAdBlockerDetectionInProgress.value === !1 && ci(e);
|
1239
1238
|
const s = fe(() => {
|
1240
1239
|
C(t.capabilities.isAdBlocked.value) && (n(t.capabilities.isAdBlocked.value === !1), s());
|
1241
1240
|
});
|
1242
1241
|
} else
|
1243
1242
|
n(t.capabilities.isAdBlocked.value === !1);
|
1244
|
-
},
|
1243
|
+
}, Hl = (t, e, n) => {
|
1245
1244
|
const s = t.message;
|
1246
1245
|
return new Promise((i) => {
|
1247
1246
|
var r;
|
1248
|
-
if (
|
1247
|
+
if (Rl.some((a) => a.test(s))) {
|
1249
1248
|
const a = (r = /https?:\/\/[^\s"'(),;<>[\]{}]+/.exec(s)) == null ? void 0 : r[0];
|
1250
|
-
L(a) ? a.startsWith(
|
1249
|
+
L(a) ? a.startsWith(Bt) ? e.capabilities.cspBlockedURLs.value.includes(a) ? i(!1) : xl(e, n, i) : i(!1) : i(!0);
|
1251
1250
|
} else
|
1252
|
-
i(!
|
1251
|
+
i(!kl.some((a) => a.test(s)));
|
1253
1252
|
});
|
1254
|
-
},
|
1253
|
+
}, Gl = (t) => {
|
1255
1254
|
var r;
|
1256
1255
|
const e = (r = t.stacktrace[0]) == null ? void 0 : r.file;
|
1257
1256
|
if (!e || typeof e != "string")
|
1258
1257
|
return !1;
|
1259
1258
|
const n = e.substring(e.lastIndexOf("/") + 1), s = e.split("/");
|
1260
|
-
return s[s.length - 2] ===
|
1261
|
-
},
|
1262
|
-
const n = { version:
|
1259
|
+
return s[s.length - 2] === kn || Ol().some((a) => n.startsWith(a) && n.endsWith(".js"));
|
1260
|
+
}, jl = (t, e) => {
|
1261
|
+
const n = { version: Al, message_id: $t(), source: { name: Nl, sdk_version: e.context.app.value.version, write_key: e.lifecycle.writeKey.value, install_type: e.context.app.value.installType }, errors: t };
|
1263
1262
|
return de(n);
|
1264
|
-
},
|
1263
|
+
}, ql = (t, e, n, s) => {
|
1265
1264
|
let i;
|
1266
1265
|
if (n.context.app.value.installType !== "cdn")
|
1267
1266
|
return i;
|
@@ -1270,12 +1269,12 @@ const ci = new Il(ye), Tl = "1", Al = () => [
|
|
1270
1269
|
else if (L(t))
|
1271
1270
|
i = t;
|
1272
1271
|
else {
|
1273
|
-
const r =
|
1272
|
+
const r = li(t, s);
|
1274
1273
|
C(r) ? i = r.message : i = e;
|
1275
1274
|
}
|
1276
1275
|
return i;
|
1277
1276
|
};
|
1278
|
-
class
|
1277
|
+
class zl {
|
1279
1278
|
// If no logger is passed errors will be thrown as unhandled error
|
1280
1279
|
constructor(e, n) {
|
1281
1280
|
N(this, "initialized", !1);
|
@@ -1293,12 +1292,12 @@ class ql {
|
|
1293
1292
|
*/
|
1294
1293
|
attachErrorListeners() {
|
1295
1294
|
globalThis.addEventListener("error", (e) => {
|
1296
|
-
this.onError({ error: e, context:
|
1295
|
+
this.onError({ error: e, context: nt, errorType: me.UNHANDLEDEXCEPTION });
|
1297
1296
|
}), globalThis.addEventListener("unhandledrejection", (e) => {
|
1298
|
-
this.onError({ error: e, context:
|
1297
|
+
this.onError({ error: e, context: nt, errorType: me.UNHANDLEDREJECTION });
|
1299
1298
|
}), document.addEventListener("securitypolicyviolation", (e) => {
|
1300
1299
|
const n = L(e.blockedURI) ? e.blockedURI : "";
|
1301
|
-
e.disposition === "enforce" && n.startsWith(
|
1300
|
+
e.disposition === "enforce" && n.startsWith(Bt) && !o.capabilities.cspBlockedURLs.value.includes(n) && (o.capabilities.cspBlockedURLs.value = [...o.capabilities.cspBlockedURLs.value, n]);
|
1302
1301
|
});
|
1303
1302
|
}
|
1304
1303
|
/**
|
@@ -1312,19 +1311,19 @@ class ql {
|
|
1312
1311
|
*/
|
1313
1312
|
async onError(e) {
|
1314
1313
|
try {
|
1315
|
-
const { error: n, context: s, customMessage: i, groupingHash: r } = e, a = e.errorType ?? me.HANDLEDEXCEPTION, u =
|
1314
|
+
const { error: n, context: s, customMessage: i, groupingHash: r } = e, a = e.errorType ?? me.HANDLEDEXCEPTION, u = Ll(n, a), l = li(u, this.logger);
|
1316
1315
|
if (x(l))
|
1317
1316
|
return;
|
1318
|
-
const c = i ? `${i} - ` : "", d = `${s}${R}${c}`, h =
|
1319
|
-
if (!g && !
|
1317
|
+
const c = i ? `${i} - ` : "", d = `${s}${R}${c}`, h = bl(l, d), g = bn(l).includes(kt);
|
1318
|
+
if (!g && !Gl(h) && a !== me.HANDLEDEXCEPTION)
|
1320
1319
|
return;
|
1321
|
-
if (o.reporting.isErrorReportingEnabled.value && await
|
1322
|
-
const m = { severity: "error", unhandled: a !== me.HANDLEDEXCEPTION, severityReason: { type: a } }, v =
|
1323
|
-
this.httpClient.getAsyncData({ url: o.metrics.metricsServiceUrl.value, options: { method: "POST", data:
|
1320
|
+
if (o.reporting.isErrorReportingEnabled.value && await Hl(h, o, this.httpClient)) {
|
1321
|
+
const m = { severity: "error", unhandled: a !== me.HANDLEDEXCEPTION, severityReason: { type: a } }, v = ql(r, h.message, o, this.logger), k = Fl(h, m, o, v);
|
1322
|
+
this.httpClient.getAsyncData({ url: o.metrics.metricsServiceUrl.value, options: { method: "POST", data: jl(k, o), sendRawData: !0 }, isRawResponse: !0 });
|
1324
1323
|
}
|
1325
1324
|
(a === me.HANDLEDEXCEPTION || g) && this.logger.error(h.message);
|
1326
1325
|
} catch (n) {
|
1327
|
-
this.logger.error(
|
1326
|
+
this.logger.error(Zo(nt), n);
|
1328
1327
|
}
|
1329
1328
|
}
|
1330
1329
|
/**
|
@@ -1335,14 +1334,14 @@ class ql {
|
|
1335
1334
|
*/
|
1336
1335
|
leaveBreadcrumb(e) {
|
1337
1336
|
try {
|
1338
|
-
o.reporting.breadcrumbs.value = [...o.reporting.breadcrumbs.value,
|
1337
|
+
o.reporting.breadcrumbs.value = [...o.reporting.breadcrumbs.value, wl(e)];
|
1339
1338
|
} catch (n) {
|
1340
|
-
this.onError({ error: n, context:
|
1339
|
+
this.onError({ error: n, context: nt, customMessage: Gn, groupingHash: Gn });
|
1341
1340
|
}
|
1342
1341
|
}
|
1343
1342
|
}
|
1344
|
-
const
|
1345
|
-
class
|
1343
|
+
const di = new zl(ui, ye);
|
1344
|
+
class Yl {
|
1346
1345
|
constructor(e, n = {}) {
|
1347
1346
|
N(this, "plugins", []);
|
1348
1347
|
N(this, "byName", {});
|
@@ -1352,14 +1351,14 @@ class zl {
|
|
1352
1351
|
}
|
1353
1352
|
register(e, n) {
|
1354
1353
|
if (!e.name) {
|
1355
|
-
const i =
|
1354
|
+
const i = ea(Be);
|
1356
1355
|
if (this.config.throws)
|
1357
1356
|
throw new Error(i);
|
1358
1357
|
this.logger.error(i, e);
|
1359
1358
|
return;
|
1360
1359
|
}
|
1361
1360
|
if (this.byName[e.name]) {
|
1362
|
-
const i =
|
1361
|
+
const i = ta(Be, e.name);
|
1363
1362
|
if (this.config.throws)
|
1364
1363
|
throw new Error(i);
|
1365
1364
|
this.logger.error(i);
|
@@ -1375,7 +1374,7 @@ class zl {
|
|
1375
1374
|
unregister(e) {
|
1376
1375
|
const n = this.byName[e];
|
1377
1376
|
if (!n) {
|
1378
|
-
const i =
|
1377
|
+
const i = na(Be, e);
|
1379
1378
|
if (this.config.throws)
|
1380
1379
|
throw new Error(i);
|
1381
1380
|
this.logger.error(i);
|
@@ -1383,7 +1382,7 @@ class zl {
|
|
1383
1382
|
}
|
1384
1383
|
const s = this.plugins.indexOf(n);
|
1385
1384
|
if (s === -1) {
|
1386
|
-
const i =
|
1385
|
+
const i = sa(Be, e);
|
1387
1386
|
if (this.config.throws)
|
1388
1387
|
throw new Error(i);
|
1389
1388
|
this.logger.error(i);
|
@@ -1400,9 +1399,9 @@ class zl {
|
|
1400
1399
|
var i;
|
1401
1400
|
if ((i = s.deps) != null && i.some((r) => !this.byName[r])) {
|
1402
1401
|
const r = s.deps.filter((a) => !this.byName[a]);
|
1403
|
-
return this.logger.error(
|
1402
|
+
return this.logger.error(ia(Be, s.name, r)), !1;
|
1404
1403
|
}
|
1405
|
-
return n === "." ? !0 :
|
1404
|
+
return n === "." ? !0 : jr(s, n);
|
1406
1405
|
})), this.cache[n];
|
1407
1406
|
}
|
1408
1407
|
// This method allows to process this.plugins so that it could
|
@@ -1413,7 +1412,7 @@ class zl {
|
|
1413
1412
|
invoke(e, n = !0, ...s) {
|
1414
1413
|
let i = e;
|
1415
1414
|
if (!i)
|
1416
|
-
throw new Error(
|
1415
|
+
throw new Error(Yo);
|
1417
1416
|
const r = i.startsWith("!"), a = this.config.throws ?? i.endsWith("!");
|
1418
1417
|
if (i = i.replace(/(^!|!$)/g, ""), !i)
|
1419
1418
|
throw new Error(Ko);
|
@@ -1421,15 +1420,15 @@ class zl {
|
|
1421
1420
|
u.pop();
|
1422
1421
|
const l = u.join(".");
|
1423
1422
|
return (n ? this.getPlugins(i) : [this.getPlugins(i)[0]]).map((d) => {
|
1424
|
-
const h =
|
1423
|
+
const h = en(d, i);
|
1425
1424
|
if (!S(h) || r)
|
1426
1425
|
return h;
|
1427
1426
|
try {
|
1428
|
-
return h.apply(
|
1427
|
+
return h.apply(en(d, l), s);
|
1429
1428
|
} catch (y) {
|
1430
1429
|
if (a)
|
1431
1430
|
throw y;
|
1432
|
-
this.logger.error(
|
1431
|
+
this.logger.error(ra(Be, i, d.name), y);
|
1433
1432
|
}
|
1434
1433
|
return null;
|
1435
1434
|
});
|
@@ -1441,19 +1440,19 @@ class zl {
|
|
1441
1440
|
return this.invoke(e, !0, ...n);
|
1442
1441
|
}
|
1443
1442
|
}
|
1444
|
-
const Kl = new
|
1445
|
-
t.config.useNativeSDK === !0,
|
1443
|
+
const Kl = new Yl(ye, { throws: !0 }), Wl = (t) => t.config.connectionMode !== "cloud" || t.config.useNativeSDKToSend === !0 || // this is the older flag for hybrid mode destinations
|
1444
|
+
t.config.useNativeSDK === !0, Ql = (t) => t.config.connectionMode === "hybrid" || t.config.useNativeSDKToSend === !0, Zn = (t) => t.filter(Wl), fi = ["BeaconQueue", "CustomConsentManager", "DeviceModeDestinations", "DeviceModeTransformation", "ExternalAnonymousId", "GoogleLinker", "IubendaConsentManager", "KetchConsentManager", "NativeDestinationQueue", "OneTrustConsentManager", "StorageEncryption", "StorageEncryptionLegacy", "StorageMigrator", "XhrQueue"], Xl = ["Bugsnag", "ErrorReporting"], Jl = {
|
1446
1445
|
rudderAnalyticsRemotePlugins: { url: () => Promise.resolve(window.RudderStackGlobals && window.RudderStackGlobals.app && window.RudderStackGlobals.app.pluginsCDNPath ? `${window.RudderStackGlobals.app.pluginsCDNPath}/rsa-plugins.js` : "https://cdn.rudderlabs.com/v3/modern/plugins//rsa-plugins.js"), format: "esm", from: "vite" }
|
1447
1446
|
};
|
1448
|
-
function
|
1447
|
+
function hi(t, e) {
|
1449
1448
|
const n = Object.assign(t, e);
|
1450
1449
|
for (const s of Object.keys(n))
|
1451
|
-
typeof n[s] == "object" && typeof e[s] == "object" && (n[s] =
|
1450
|
+
typeof n[s] == "object" && typeof e[s] == "object" && (n[s] = hi(n[s], e[s]));
|
1452
1451
|
return n;
|
1453
1452
|
}
|
1454
|
-
const
|
1455
|
-
async function
|
1456
|
-
const e =
|
1453
|
+
const Zl = (t) => hi({}, (globalThis.__federation_shared__ || {}).default || {});
|
1454
|
+
async function eu(t) {
|
1455
|
+
const e = Jl[t];
|
1457
1456
|
if (e.inited)
|
1458
1457
|
return e.lib;
|
1459
1458
|
if (["esm", "systemjs"].includes(e.format))
|
@@ -1465,7 +1464,7 @@ async function Zl(t) {
|
|
1465
1464
|
r
|
1466
1465
|
).then((a) => {
|
1467
1466
|
if (!e.inited) {
|
1468
|
-
const u =
|
1467
|
+
const u = Zl();
|
1469
1468
|
a.init(u), e.lib = a, e.lib.init(u), e.inited = !0;
|
1470
1469
|
}
|
1471
1470
|
n(e.lib);
|
@@ -1473,59 +1472,59 @@ async function Zl(t) {
|
|
1473
1472
|
});
|
1474
1473
|
});
|
1475
1474
|
}
|
1476
|
-
function
|
1475
|
+
function Y(t, e) {
|
1477
1476
|
if (!(t != null && t.default) && e) {
|
1478
1477
|
let n = /* @__PURE__ */ Object.create(null);
|
1479
1478
|
return n.default = t, n.__esModule = !0, n;
|
1480
1479
|
}
|
1481
1480
|
return t;
|
1482
1481
|
}
|
1483
|
-
function
|
1484
|
-
return
|
1482
|
+
function K(t, e) {
|
1483
|
+
return eu(t).then((n) => n.get(e).then((s) => s()));
|
1485
1484
|
}
|
1486
|
-
const
|
1485
|
+
const tu = (t) => {
|
1487
1486
|
switch (t) {
|
1488
1487
|
case "BeaconQueue":
|
1489
|
-
return () =>
|
1488
|
+
return () => K("rudderAnalyticsRemotePlugins", "./BeaconQueue").then((e) => Y(e, !0));
|
1490
1489
|
case "CustomConsentManager":
|
1491
|
-
return () =>
|
1490
|
+
return () => K("rudderAnalyticsRemotePlugins", "./CustomConsentManager").then((e) => Y(e, !0));
|
1492
1491
|
case "DeviceModeDestinations":
|
1493
|
-
return () =>
|
1492
|
+
return () => K("rudderAnalyticsRemotePlugins", "./DeviceModeDestinations").then((e) => Y(e, !0));
|
1494
1493
|
case "DeviceModeTransformation":
|
1495
|
-
return () =>
|
1494
|
+
return () => K("rudderAnalyticsRemotePlugins", "./DeviceModeTransformation").then((e) => Y(e, !0));
|
1496
1495
|
case "ExternalAnonymousId":
|
1497
|
-
return () =>
|
1496
|
+
return () => K("rudderAnalyticsRemotePlugins", "./ExternalAnonymousId").then((e) => Y(e, !0));
|
1498
1497
|
case "GoogleLinker":
|
1499
|
-
return () =>
|
1498
|
+
return () => K("rudderAnalyticsRemotePlugins", "./GoogleLinker").then((e) => Y(e, !0));
|
1500
1499
|
case "KetchConsentManager":
|
1501
|
-
return () =>
|
1500
|
+
return () => K("rudderAnalyticsRemotePlugins", "./KetchConsentManager").then((e) => Y(e, !0));
|
1502
1501
|
case "IubendaConsentManager":
|
1503
|
-
return () =>
|
1502
|
+
return () => K("rudderAnalyticsRemotePlugins", "./IubendaConsentManager").then((e) => Y(e, !0));
|
1504
1503
|
case "NativeDestinationQueue":
|
1505
|
-
return () =>
|
1504
|
+
return () => K("rudderAnalyticsRemotePlugins", "./NativeDestinationQueue").then((e) => Y(e, !0));
|
1506
1505
|
case "OneTrustConsentManager":
|
1507
|
-
return () =>
|
1506
|
+
return () => K("rudderAnalyticsRemotePlugins", "./OneTrustConsentManager").then((e) => Y(e, !0));
|
1508
1507
|
case "StorageEncryption":
|
1509
|
-
return () =>
|
1508
|
+
return () => K("rudderAnalyticsRemotePlugins", "./StorageEncryption").then((e) => Y(e, !0));
|
1510
1509
|
case "StorageEncryptionLegacy":
|
1511
|
-
return () =>
|
1510
|
+
return () => K("rudderAnalyticsRemotePlugins", "./StorageEncryptionLegacy").then((e) => Y(e, !0));
|
1512
1511
|
case "StorageMigrator":
|
1513
|
-
return () =>
|
1512
|
+
return () => K("rudderAnalyticsRemotePlugins", "./StorageMigrator").then((e) => Y(e, !0));
|
1514
1513
|
case "XhrQueue":
|
1515
|
-
return () =>
|
1514
|
+
return () => K("rudderAnalyticsRemotePlugins", "./XhrQueue").then((e) => Y(e, !0));
|
1516
1515
|
default:
|
1517
1516
|
return;
|
1518
1517
|
}
|
1519
|
-
},
|
1518
|
+
}, qt = (t) => {
|
1520
1519
|
const e = {};
|
1521
1520
|
return t.forEach((n) => {
|
1522
|
-
if (
|
1523
|
-
const s =
|
1521
|
+
if (fi.includes(n)) {
|
1522
|
+
const s = tu(n);
|
1524
1523
|
s && (e[n] = s);
|
1525
1524
|
}
|
1526
1525
|
}), e;
|
1527
|
-
},
|
1528
|
-
class
|
1526
|
+
}, gi = () => ({}), nu = () => ({}), su = (t) => (qt == null ? void 0 : qt(t)) || {}, zt = { ...gi(), ...nu() }, iu = (t) => ({ ...su(t) });
|
1527
|
+
class ru {
|
1529
1528
|
constructor(e, n, s) {
|
1530
1529
|
this.engine = e, this.errorHandler = n, this.logger = s, this.onError = this.onError.bind(this);
|
1531
1530
|
}
|
@@ -1533,7 +1532,7 @@ class iu {
|
|
1533
1532
|
* Orchestrate the plugin loading and registering
|
1534
1533
|
*/
|
1535
1534
|
init() {
|
1536
|
-
o.lifecycle.status.value = "pluginsLoading",
|
1535
|
+
o.lifecycle.status.value = "pluginsLoading", ut("pluginsCDNPath", o.lifecycle.pluginsCDNPath.value), this.setActivePlugins(), this.registerLocalPlugins(), this.registerRemotePlugins(), this.attachEffects();
|
1537
1536
|
}
|
1538
1537
|
/**
|
1539
1538
|
* Update state based on plugin loaded status
|
@@ -1554,30 +1553,30 @@ class iu {
|
|
1554
1553
|
let e = o.plugins.pluginsToLoadFromConfig.value;
|
1555
1554
|
if (!e)
|
1556
1555
|
return [];
|
1557
|
-
e = e.filter((i) =>
|
1558
|
-
const n = [{ configurationStatus: () => C(o.dataPlaneEvents.eventsQueuePluginName.value), configurationStatusStr: "Data plane events delivery is enabled", activePluginName: o.dataPlaneEvents.eventsQueuePluginName.value, supportedPlugins: Object.values(
|
1556
|
+
e = e.filter((i) => Xl.includes(i) ? (this.logger.warn($a(ht, i)), !1) : !0);
|
1557
|
+
const n = [{ configurationStatus: () => C(o.dataPlaneEvents.eventsQueuePluginName.value), configurationStatusStr: "Data plane events delivery is enabled", activePluginName: o.dataPlaneEvents.eventsQueuePluginName.value, supportedPlugins: Object.values(Ga), shouldAddMissingPlugins: !0 }, { configurationStatus: () => Zn(o.nativeDestinations.configuredDestinations.value).length > 0, configurationStatusStr: "Device mode destinations are connected to the source", supportedPlugins: ["DeviceModeDestinations", "NativeDestinationQueue"] }, { configurationStatus: () => Zn(o.nativeDestinations.configuredDestinations.value).some((i) => i.shouldApplyDeviceModeTransformation), configurationStatusStr: "Device mode transformations are enabled for at least one destination", supportedPlugins: ["DeviceModeTransformation"] }, { configurationStatus: () => C(o.consents.activeConsentManagerPluginName.value), configurationStatusStr: "Consent management is enabled", activePluginName: o.consents.activeConsentManagerPluginName.value, supportedPlugins: Object.values(on) }, { configurationStatus: () => C(o.storage.encryptionPluginName.value), configurationStatusStr: "Storage encryption is enabled", activePluginName: o.storage.encryptionPluginName.value, supportedPlugins: Object.values(Rt) }, { configurationStatus: () => o.storage.migrate.value, configurationStatusStr: "Storage migration is enabled", supportedPlugins: ["StorageMigrator"] }], s = !1;
|
1559
1558
|
return n.forEach((i) => {
|
1560
1559
|
i.configurationStatus() ? (e = e.filter(
|
1561
1560
|
i.activePluginName ? (r) => !(r !== i.activePluginName && i.supportedPlugins.includes(r)) : (r) => C(r)
|
1562
1561
|
// pass through
|
1563
1562
|
), this.addMissingPlugins(i, s, e)) : e = e.filter(i.basePlugins !== void 0 ? (r) => !(i.basePlugins.includes(r) || i.supportedPlugins.includes(r)) : (r) => !i.supportedPlugins.includes(r));
|
1564
|
-
}), [...Object.keys(
|
1563
|
+
}), [...Object.keys(gi()), ...e];
|
1565
1564
|
}
|
1566
1565
|
addMissingPlugins(e, n, s) {
|
1567
1566
|
const i = e.shouldAddMissingPlugins || n;
|
1568
1567
|
let r;
|
1569
1568
|
e.activePluginName ? r = [...e.basePlugins || [], e.activePluginName] : r = [...e.supportedPlugins];
|
1570
1569
|
const a = r.filter((u) => !s.includes(u));
|
1571
|
-
a.length > 0 && (i && s.push(...a), this.logger.warn(
|
1570
|
+
a.length > 0 && (i && s.push(...a), this.logger.warn(Ua(ht, e.configurationStatusStr, a, i)));
|
1572
1571
|
}
|
1573
1572
|
/**
|
1574
1573
|
* Determine the list of plugins that should be activated
|
1575
1574
|
*/
|
1576
1575
|
setActivePlugins() {
|
1577
|
-
const e = this.getPluginsToLoadBasedOnConfig(), n = [...Object.keys(
|
1576
|
+
const e = this.getPluginsToLoadBasedOnConfig(), n = [...Object.keys(zt), ...fi], s = [], i = [];
|
1578
1577
|
e.forEach((r) => {
|
1579
1578
|
n.includes(r) ? s.push(r) : i.push(r);
|
1580
|
-
}), i.length > 0 && this.logger.warn(
|
1579
|
+
}), i.length > 0 && this.logger.warn(Fa(ht, i)), j(() => {
|
1581
1580
|
o.plugins.totalPluginsToLoad.value = e.length, o.plugins.activePlugins.value = s, o.plugins.failedPlugins.value = i;
|
1582
1581
|
});
|
1583
1582
|
}
|
@@ -1585,7 +1584,7 @@ class iu {
|
|
1585
1584
|
* Register plugins that are direct imports to PluginEngine
|
1586
1585
|
*/
|
1587
1586
|
registerLocalPlugins() {
|
1588
|
-
Object.values(
|
1587
|
+
Object.values(zt).forEach((e) => {
|
1589
1588
|
S(e) && o.plugins.activePlugins.value.includes(e().name) && this.register([e()]);
|
1590
1589
|
});
|
1591
1590
|
}
|
@@ -1593,7 +1592,7 @@ class iu {
|
|
1593
1592
|
* Register plugins that are dynamic imports to PluginEngine
|
1594
1593
|
*/
|
1595
1594
|
registerRemotePlugins() {
|
1596
|
-
const e =
|
1595
|
+
const e = iu(o.plugins.activePlugins.value);
|
1597
1596
|
Promise.all(Object.keys(e).map(async (n) => {
|
1598
1597
|
await e[n]().then((s) => this.register([s.default()])).catch((s) => {
|
1599
1598
|
o.plugins.failedPlugins.value = [...o.plugins.failedPlugins.value, n], this.onError(s, `Failed to load plugin "${n}"`, s);
|
@@ -1636,7 +1635,7 @@ class iu {
|
|
1636
1635
|
}
|
1637
1636
|
// TODO: Implement reset API instead
|
1638
1637
|
unregisterLocalPlugins() {
|
1639
|
-
Object.values(
|
1638
|
+
Object.values(zt).forEach((e) => {
|
1640
1639
|
try {
|
1641
1640
|
this.engine.unregister(e().name);
|
1642
1641
|
} catch (n) {
|
@@ -1648,53 +1647,53 @@ class iu {
|
|
1648
1647
|
* Handle errors
|
1649
1648
|
*/
|
1650
1649
|
onError(e, n, s) {
|
1651
|
-
this.errorHandler.onError({ error: e, context:
|
1650
|
+
this.errorHandler.onError({ error: e, context: ht, customMessage: n, groupingHash: s });
|
1652
1651
|
}
|
1653
1652
|
}
|
1654
|
-
const W = "cookieStorage", X = "localStorage", ee = "sessionStorage", ce = "memoryStorage", we = "none",
|
1653
|
+
const W = "cookieStorage", X = "localStorage", ee = "sessionStorage", ce = "memoryStorage", we = "none", ou = "rl_user_id", au = "rl_trait", lu = "rl_anonymous_id", uu = "rl_group_id", cu = "rl_group_trait", du = "rl_page_init_referrer", fu = "rl_page_init_referring_domain", hu = "rl_session", gu = "rl_auth_token", Ve = { userId: ou, userTraits: au, anonymousId: lu, groupId: uu, groupTraits: cu, initialReferrer: du, initialReferringDomain: fu, sessionInfo: hu, authToken: gu }, mu = "test_rudder_cookie", pu = "test_rudder_ls", vu = "test_rudder_ss", yu = "__tld__", mi = "clientDataInCookie", pi = "clientDataInLocalStorage", bu = "clientDataInMemory", vi = "clientDataInSessionStorage", yi = ["userId", "userTraits", "anonymousId", "groupId", "groupTraits", "initialReferrer", "initialReferringDomain", "sessionInfo", "authToken"], Fe = { [W]: mi, [X]: pi, [ce]: bu, [ee]: vi }, es = (t, e) => {
|
1655
1654
|
try {
|
1656
1655
|
return encodeURIComponent(t);
|
1657
1656
|
} catch (n) {
|
1658
|
-
e == null || e.error(
|
1657
|
+
e == null || e.error(fo, n);
|
1659
1658
|
return;
|
1660
1659
|
}
|
1661
|
-
},
|
1660
|
+
}, ts = (t) => {
|
1662
1661
|
try {
|
1663
1662
|
return decodeURIComponent(t);
|
1664
1663
|
} catch {
|
1665
1664
|
return;
|
1666
1665
|
}
|
1667
|
-
},
|
1666
|
+
}, Eu = (t) => {
|
1668
1667
|
const e = {}, n = t.split(/\s*;\s*/);
|
1669
1668
|
let s;
|
1670
1669
|
return n[0] && n.forEach((i) => {
|
1671
1670
|
s = i.split("=");
|
1672
|
-
const r = s[0] ?
|
1673
|
-
r && (e[r] = s[1] ?
|
1671
|
+
const r = s[0] ? ts(s[0]) : void 0;
|
1672
|
+
r && (e[r] = s[1] ? ts(s[1]) : void 0);
|
1674
1673
|
}), e;
|
1675
|
-
},
|
1674
|
+
}, Su = (t, e, n, s) => {
|
1676
1675
|
const i = { ...n || {} };
|
1677
|
-
let r = `${
|
1676
|
+
let r = `${es(t, s)}=${es(e, s)}`;
|
1678
1677
|
ne(e) && (i.maxage = -1), i.maxage && (i.expires = new Date(+/* @__PURE__ */ new Date() + i.maxage)), i.path && (r += `; path=${i.path}`), i.domain && (r += `; domain=${i.domain}`), i.expires && (r += `; expires=${i.expires.toUTCString()}`), i.samesite && (r += `; samesite=${i.samesite}`), i.secure && (r += "; secure"), globalThis.document.cookie = r;
|
1679
|
-
},
|
1678
|
+
}, an = () => {
|
1680
1679
|
const t = globalThis.document.cookie;
|
1681
|
-
return
|
1682
|
-
},
|
1680
|
+
return Eu(t);
|
1681
|
+
}, ku = (t) => an()[t], Se = function(t, e, n, s) {
|
1683
1682
|
switch (arguments.length) {
|
1684
1683
|
case 4:
|
1685
1684
|
case 3:
|
1686
1685
|
case 2:
|
1687
|
-
return
|
1686
|
+
return Su(t, e, n, s);
|
1688
1687
|
case 1:
|
1689
|
-
return t ?
|
1688
|
+
return t ? ku(t) : an();
|
1690
1689
|
default:
|
1691
|
-
return
|
1690
|
+
return an();
|
1692
1691
|
}
|
1693
|
-
},
|
1692
|
+
}, Ru = (t) => {
|
1694
1693
|
const e = document.createElement("a");
|
1695
1694
|
return e.href = t, e.hostname;
|
1696
|
-
},
|
1697
|
-
const e = typeof globalThis.URL != "function" ?
|
1695
|
+
}, Iu = (t) => {
|
1696
|
+
const e = typeof globalThis.URL != "function" ? Ru(t) : new URL(t).hostname, n = (e == null ? void 0 : e.split(".")) ?? [], s = n[n.length - 1], i = [];
|
1698
1697
|
if (n.length === 4 && s && s === parseInt(s, 10).toString())
|
1699
1698
|
return i;
|
1700
1699
|
if (n.length <= 1)
|
@@ -1702,24 +1701,24 @@ const W = "cookieStorage", X = "localStorage", ee = "sessionStorage", ce = "memo
|
|
1702
1701
|
for (let r = n.length - 2; r >= 0; r -= 1)
|
1703
1702
|
i.push(n.slice(r).join("."));
|
1704
1703
|
return i;
|
1705
|
-
},
|
1706
|
-
const e =
|
1704
|
+
}, Tu = (t) => {
|
1705
|
+
const e = Iu(t);
|
1707
1706
|
for (let n = 0; n < e.length; n += 1) {
|
1708
|
-
const s = e[n], i =
|
1707
|
+
const s = e[n], i = yu, r = { domain: `${s.indexOf("localhost") !== -1 ? "" : "."}${s}` };
|
1709
1708
|
if (Se(i, 1, r), Se(i))
|
1710
1709
|
return Se(i, null, r), s;
|
1711
1710
|
}
|
1712
1711
|
return "";
|
1713
|
-
},
|
1714
|
-
const t = `.${
|
1715
|
-
return { maxage:
|
1716
|
-
},
|
1717
|
-
class
|
1712
|
+
}, Au = () => {
|
1713
|
+
const t = `.${Tu(globalThis.location.href)}`;
|
1714
|
+
return { maxage: Io, path: "/", domain: !t || t === "." ? void 0 : t, samesite: "Lax", enabled: !0 };
|
1715
|
+
}, Ou = () => ({ enabled: !0 }), Du = () => ({ enabled: !0 }), Cu = () => ({ enabled: !0 });
|
1716
|
+
class _u {
|
1718
1717
|
constructor(e) {
|
1719
1718
|
N(this, "isEnabled", !0);
|
1720
1719
|
N(this, "length", 0);
|
1721
1720
|
N(this, "data", {});
|
1722
|
-
this.options =
|
1721
|
+
this.options = Cu(), this.logger = e;
|
1723
1722
|
}
|
1724
1723
|
configure(e) {
|
1725
1724
|
return this.options = H(this.options, e ?? {}), this.isEnabled = !!this.options.enabled, this.options;
|
@@ -1743,13 +1742,13 @@ class Cu {
|
|
1743
1742
|
return Object.keys(this.data);
|
1744
1743
|
}
|
1745
1744
|
}
|
1746
|
-
const
|
1747
|
-
var
|
1748
|
-
function
|
1749
|
-
return
|
1745
|
+
const Lt = new _u(ye);
|
1746
|
+
var Ot = { exports: {} }, Pu = Ot.exports, ns;
|
1747
|
+
function Nu() {
|
1748
|
+
return ns || (ns = 1, function(t, e) {
|
1750
1749
|
(function(n, s) {
|
1751
1750
|
t.exports = s();
|
1752
|
-
})(
|
1751
|
+
})(Pu, function() {
|
1753
1752
|
function n(g) {
|
1754
1753
|
return g = JSON.stringify(g), !!/^\{[\s\S]*\}$/.test(g);
|
1755
1754
|
}
|
@@ -1865,20 +1864,20 @@ function Pu() {
|
|
1865
1864
|
for (var y in c.prototype) h[y] = c.prototype[y];
|
1866
1865
|
return h;
|
1867
1866
|
});
|
1868
|
-
}(
|
1867
|
+
}(Ot)), Ot.exports;
|
1869
1868
|
}
|
1870
|
-
var
|
1871
|
-
const Oe = /* @__PURE__ */
|
1869
|
+
var Lu = Nu();
|
1870
|
+
const Oe = /* @__PURE__ */ oi(Lu), wu = () => !le(globalThis.crypto) && S(globalThis.crypto.getRandomValues), ss = () => !le(globalThis.navigator.userAgentData), Mu = () => !le(globalThis.navigator.sendBeacon) && S(globalThis.navigator.sendBeacon), $u = () => !!globalThis.navigator.userAgent.match(/Trident.*rv:11\./), Uu = (t, e = "none") => {
|
1872
1871
|
var n;
|
1873
1872
|
e === "none" && t(void 0), e === "default" && t(navigator.userAgentData), e === "full" && ((n = navigator.userAgentData) == null || n.getHighEntropyValues(["architecture", "bitness", "brands", "mobile", "model", "platform", "platformVersion", "uaFullVersion", "fullVersionList", "wow64"]).then((s) => {
|
1874
1873
|
t(s);
|
1875
1874
|
}).catch(() => {
|
1876
1875
|
t();
|
1877
1876
|
}));
|
1878
|
-
},
|
1877
|
+
}, Bu = () => {
|
1879
1878
|
const t = globalThis.document.createElement("div");
|
1880
1879
|
return t.setAttribute("data-a-b", "c"), t.dataset ? t.dataset.aB === "c" : !1;
|
1881
|
-
},
|
1880
|
+
}, ln = {
|
1882
1881
|
// Ideally, we should separate the checks for URL and URLSearchParams but
|
1883
1882
|
// the polyfill service serves them under the same feature name, "URL".
|
1884
1883
|
URL: () => !S(globalThis.URL) || !S(globalThis.URLSearchParams),
|
@@ -1897,7 +1896,7 @@ const Oe = /* @__PURE__ */ ai(Nu), Lu = () => !le(globalThis.crypto) && S(global
|
|
1897
1896
|
"Object.values": () => !S(globalThis.Object.values),
|
1898
1897
|
"Object.assign": () => !S(globalThis.Object.assign),
|
1899
1898
|
"Object.fromEntries": () => !S(globalThis.Object.fromEntries),
|
1900
|
-
"Element.prototype.dataset": () => !
|
1899
|
+
"Element.prototype.dataset": () => !Bu(),
|
1901
1900
|
// Ideally, we should separate the checks for TextEncoder and TextDecoder but
|
1902
1901
|
// the polyfill service serves them under the same feature name, "TextEncoder".
|
1903
1902
|
TextEncoder: () => !S(globalThis.TextEncoder) || !S(globalThis.TextDecoder),
|
@@ -1908,39 +1907,39 @@ const Oe = /* @__PURE__ */ ai(Nu), Lu = () => !le(globalThis.crypto) && S(global
|
|
1908
1907
|
ArrayBuffer: () => !S(globalThis.Uint8Array),
|
1909
1908
|
Set: () => !S(globalThis.Set),
|
1910
1909
|
atob: () => !S(globalThis.atob)
|
1911
|
-
},
|
1912
|
-
const t = Object.keys(
|
1910
|
+
}, Vu = () => {
|
1911
|
+
const t = Object.keys(ln);
|
1913
1912
|
let e = !1;
|
1914
1913
|
for (let n = 0; n < t.length; n++) {
|
1915
|
-
const s =
|
1914
|
+
const s = ln[t[n]];
|
1916
1915
|
if (S(s) && s()) {
|
1917
1916
|
e = !0;
|
1918
1917
|
break;
|
1919
1918
|
}
|
1920
1919
|
}
|
1921
1920
|
return e;
|
1922
|
-
},
|
1921
|
+
}, is = () => {
|
1923
1922
|
let t = { density: 0, width: 0, height: 0, innerWidth: 0, innerHeight: 0 };
|
1924
1923
|
return t = { width: globalThis.screen.width, height: globalThis.screen.height, density: globalThis.devicePixelRatio, innerWidth: globalThis.innerWidth, innerHeight: globalThis.innerHeight }, t;
|
1925
|
-
},
|
1924
|
+
}, bi = (t) => {
|
1926
1925
|
const e = ["QuotaExceededError", "NS_ERROR_DOM_QUOTA_REACHED"], n = [22, 1014], s = e.includes(t.name) || n.includes(t.code);
|
1927
1926
|
return t instanceof DOMException && s;
|
1928
1927
|
}, Ge = (t = X, e, n) => {
|
1929
1928
|
let s, i;
|
1930
|
-
const r =
|
1929
|
+
const r = oa(tn, t);
|
1931
1930
|
let a = "unavailable", u = !0, l;
|
1932
1931
|
try {
|
1933
1932
|
switch (t) {
|
1934
1933
|
case ce:
|
1935
1934
|
return !0;
|
1936
1935
|
case W:
|
1937
|
-
s = e, i =
|
1936
|
+
s = e, i = mu;
|
1938
1937
|
break;
|
1939
1938
|
case X:
|
1940
|
-
s = e ?? globalThis.localStorage, i =
|
1939
|
+
s = e ?? globalThis.localStorage, i = pu;
|
1941
1940
|
break;
|
1942
1941
|
case ee:
|
1943
|
-
s = e ?? globalThis.sessionStorage, i =
|
1942
|
+
s = e ?? globalThis.sessionStorage, i = vu;
|
1944
1943
|
break;
|
1945
1944
|
default:
|
1946
1945
|
return !1;
|
@@ -1949,16 +1948,16 @@ const Oe = /* @__PURE__ */ ai(Nu), Lu = () => !le(globalThis.crypto) && S(global
|
|
1949
1948
|
return s.removeItem(i), !0;
|
1950
1949
|
u = !1;
|
1951
1950
|
} catch (c) {
|
1952
|
-
u = !1, l = c,
|
1951
|
+
u = !1, l = c, bi(c) && (a = "full");
|
1953
1952
|
}
|
1954
1953
|
return u || n == null || n.warn(`${r}${a}.`, l), !1;
|
1955
1954
|
};
|
1956
|
-
class
|
1955
|
+
class Fu {
|
1957
1956
|
constructor(e) {
|
1958
1957
|
N(this, "isSupportAvailable", !0);
|
1959
1958
|
N(this, "isEnabled", !0);
|
1960
1959
|
N(this, "length", 0);
|
1961
|
-
this.options =
|
1960
|
+
this.options = Ou(), this.logger = e;
|
1962
1961
|
}
|
1963
1962
|
configure(e) {
|
1964
1963
|
return this.options = H(this.options, e ?? {}), this.isSupportAvailable = Ge(X), this.isEnabled = !!(this.options.enabled && this.isSupportAvailable), this.options;
|
@@ -1985,13 +1984,13 @@ class Vu {
|
|
1985
1984
|
return Oe.keys();
|
1986
1985
|
}
|
1987
1986
|
}
|
1988
|
-
const
|
1989
|
-
class
|
1987
|
+
const In = new Fu(ye);
|
1988
|
+
class xu {
|
1990
1989
|
constructor(e) {
|
1991
1990
|
N(this, "isSupportAvailable", !0);
|
1992
1991
|
N(this, "isEnabled", !0);
|
1993
1992
|
N(this, "length", 0);
|
1994
|
-
this.options =
|
1993
|
+
this.options = Du(), this.logger = e;
|
1995
1994
|
}
|
1996
1995
|
configure(e) {
|
1997
1996
|
return this.options = H(this.options, e ?? {}), this.isSupportAvailable = Ge(ee), this.isSupportAvailable && (this.store = globalThis.sessionStorage), this.isEnabled = !!(this.options.enabled && this.isSupportAvailable), this.options;
|
@@ -2027,8 +2026,8 @@ class Fu {
|
|
2027
2026
|
return e;
|
2028
2027
|
}
|
2029
2028
|
}
|
2030
|
-
const
|
2031
|
-
class
|
2029
|
+
const Tn = new xu(ye);
|
2030
|
+
class Hu {
|
2032
2031
|
constructor(e) {
|
2033
2032
|
N(this, "isSupportAvailable", !0);
|
2034
2033
|
N(this, "isEnabled", !0);
|
@@ -2036,7 +2035,7 @@ class xu {
|
|
2036
2035
|
this.logger = e;
|
2037
2036
|
}
|
2038
2037
|
configure(e) {
|
2039
|
-
return this.options || (this.options =
|
2038
|
+
return this.options || (this.options = Au()), this.options = H(this.options, e ?? {}), this.options.sameDomainCookiesOnly && delete this.options.domain, this.isSupportAvailable = Ge(W, this), this.isEnabled = !!(this.options.enabled && this.isSupportAvailable), this.options;
|
2040
2039
|
}
|
2041
2040
|
setItem(e, n) {
|
2042
2041
|
return Se(e, n, this.options, this.logger), this.length = Object.keys(Se()).length, !0;
|
@@ -2061,30 +2060,30 @@ class xu {
|
|
2061
2060
|
return Object.keys(Se());
|
2062
2061
|
}
|
2063
2062
|
}
|
2064
|
-
const
|
2063
|
+
const An = new Hu(ye), ie = (t) => {
|
2065
2064
|
switch (t) {
|
2066
2065
|
case X:
|
2067
|
-
return
|
2066
|
+
return In;
|
2068
2067
|
case ee:
|
2069
|
-
return
|
2068
|
+
return Tn;
|
2070
2069
|
case ce:
|
2071
|
-
return
|
2070
|
+
return Lt;
|
2072
2071
|
case W:
|
2073
|
-
return
|
2072
|
+
return An;
|
2074
2073
|
default:
|
2075
|
-
return
|
2074
|
+
return Lt;
|
2076
2075
|
}
|
2077
|
-
}, Hu = (t) => {
|
2078
|
-
const e = On.configure(t);
|
2079
|
-
o.storage.cookie.value = { maxage: e.maxage, path: e.path, domain: e.domain, samesite: e.samesite, expires: e.expires, secure: e.secure };
|
2080
2076
|
}, Gu = (t) => {
|
2081
|
-
|
2077
|
+
const e = An.configure(t);
|
2078
|
+
o.storage.cookie.value = { maxage: e.maxage, path: e.path, domain: e.domain, samesite: e.samesite, expires: e.expires, secure: e.secure };
|
2082
2079
|
}, ju = (t) => {
|
2083
|
-
|
2080
|
+
In.configure(t);
|
2084
2081
|
}, qu = (t) => {
|
2085
|
-
|
2086
|
-
}, zu = (t
|
2087
|
-
|
2082
|
+
Lt.configure(t);
|
2083
|
+
}, zu = (t) => {
|
2084
|
+
Tn.configure(t);
|
2085
|
+
}, Yu = (t = {}, e = {}, n = {}, s = {}) => {
|
2086
|
+
Gu(t), ju(e), qu(n), zu(s);
|
2088
2087
|
};
|
2089
2088
|
class Ku {
|
2090
2089
|
constructor(e, n, s) {
|
@@ -2121,10 +2120,10 @@ class Ku {
|
|
2121
2120
|
try {
|
2122
2121
|
this.engine.setItem(s, this.encrypt(de(n, !1, [], this.logger)));
|
2123
2122
|
} catch (i) {
|
2124
|
-
if (
|
2125
|
-
this.logger.warn(
|
2123
|
+
if (bi(i))
|
2124
|
+
this.logger.warn(Ca(`Store ${this.id}`)), this.swapQueueStoreToInMemoryEngine(), this.set(e, n);
|
2126
2125
|
else {
|
2127
|
-
const r =
|
2126
|
+
const r = fa(e);
|
2128
2127
|
this.onError(i, r, r);
|
2129
2128
|
}
|
2130
2129
|
}
|
@@ -2138,7 +2137,7 @@ class Ku {
|
|
2138
2137
|
try {
|
2139
2138
|
return !n || (s = this.decrypt(this.engine.getItem(n)), le(s) || s === "") ? null : JSON.parse(s);
|
2140
2139
|
} catch (i) {
|
2141
|
-
const r =
|
2140
|
+
const r = ha(e);
|
2142
2141
|
return this.onError(i, r, r), null;
|
2143
2142
|
}
|
2144
2143
|
}
|
@@ -2183,7 +2182,7 @@ class Ku {
|
|
2183
2182
|
this.errorHandler.onError({ error: e, context: `Store ${this.id}`, customMessage: n, groupingHash: s });
|
2184
2183
|
}
|
2185
2184
|
}
|
2186
|
-
const
|
2185
|
+
const Wu = (t, e) => {
|
2187
2186
|
var s;
|
2188
2187
|
let n;
|
2189
2188
|
if (t.consents.preConsent.value.enabled)
|
@@ -2200,7 +2199,7 @@ const Yu = (t, e) => {
|
|
2200
2199
|
}
|
2201
2200
|
return n;
|
2202
2201
|
};
|
2203
|
-
class
|
2202
|
+
class Qu {
|
2204
2203
|
constructor(e, n, s) {
|
2205
2204
|
N(this, "stores", {});
|
2206
2205
|
N(this, "isInitialized", !1);
|
@@ -2214,7 +2213,7 @@ class Wu {
|
|
2214
2213
|
if (this.isInitialized)
|
2215
2214
|
return;
|
2216
2215
|
const e = o.loadOptions.value, n = { cookieStorageOptions: { samesite: e.sameSiteCookie, secure: e.secureCookie, domain: e.setCookieDomain, sameDomainCookiesOnly: e.sameDomainCookiesOnly }, localStorageOptions: {}, inMemoryStorageOptions: {}, sessionStorageOptions: {} };
|
2217
|
-
|
2216
|
+
Yu(tt(H(n.cookieStorageOptions ?? {}, ((s = o.storage.cookie) == null ? void 0 : s.value) ?? {})), tt(n.localStorageOptions), tt(n.inMemoryStorageOptions), tt(n.sessionStorageOptions)), this.initClientDataStores(), this.isInitialized = !0;
|
2218
2217
|
}
|
2219
2218
|
/**
|
2220
2219
|
* Create store to persist data used by the SDK like session, used details etc
|
@@ -2231,9 +2230,9 @@ class Wu {
|
|
2231
2230
|
const s = o.consents.postConsent.value.storage;
|
2232
2231
|
(C(s == null ? void 0 : s.type) || C(s == null ? void 0 : s.entries)) && (e = s == null ? void 0 : s.type, n = s == null ? void 0 : s.entries);
|
2233
2232
|
let i = !0, r = {};
|
2234
|
-
|
2233
|
+
yi.forEach((u) => {
|
2235
2234
|
var f;
|
2236
|
-
const l = u, c = u, d = (f = n == null ? void 0 : n[l]) == null ? void 0 : f.type, y =
|
2235
|
+
const l = u, c = u, d = (f = n == null ? void 0 : n[l]) == null ? void 0 : f.type, y = Wu(o, u) ?? d ?? e ?? rn, g = this.getResolvedStorageTypeForEntry(y, u);
|
2237
2236
|
g !== we && (i = !1), r = { ...r, [u]: { type: g, key: Ve[c] } };
|
2238
2237
|
}), j(() => {
|
2239
2238
|
o.storage.type.value = e, o.storage.entries.value = r, o.storage.trulyAnonymousTracking.value = i;
|
@@ -2257,7 +2256,7 @@ class Wu {
|
|
2257
2256
|
(a = ie(W)) != null && a.isEnabled ? s = W : (u = ie(X)) != null && u.isEnabled ? s = X : (l = ie(ee)) != null && l.isEnabled ? s = ee : s = ce;
|
2258
2257
|
break;
|
2259
2258
|
}
|
2260
|
-
return s !== e && this.logger.warn(
|
2259
|
+
return s !== e && this.logger.warn(_a(Xr, n, e, s)), s;
|
2261
2260
|
}
|
2262
2261
|
/**
|
2263
2262
|
* Create a new store
|
@@ -2273,26 +2272,26 @@ class Wu {
|
|
2273
2272
|
return this.stores[e];
|
2274
2273
|
}
|
2275
2274
|
}
|
2276
|
-
const
|
2275
|
+
const Xu = (t) => M(t) && M(t.source) && !le(t.source.id) && M(t.source.config) && Array.isArray(t.source.destinations), Ju = (t) => typeof t == "string" && Zs.includes(t), Ei = (t) => {
|
2277
2276
|
const e = new URL(t), { host: n, protocol: s } = e, i = n.split(".");
|
2278
2277
|
let r;
|
2279
2278
|
return i.length > 2 ? r = `${i[i.length - 2]}.${i[i.length - 1]}` : r = n, { topDomain: r, protocol: s };
|
2280
|
-
},
|
2281
|
-
const { topDomain: e, protocol: n } =
|
2279
|
+
}, Zu = (t) => {
|
2280
|
+
const { topDomain: e, protocol: n } = Ei(t);
|
2282
2281
|
return `${n}//${e}`;
|
2283
|
-
},
|
2284
|
-
const n = e ? window.location.origin :
|
2282
|
+
}, ec = (t, e) => {
|
2283
|
+
const n = e ? window.location.origin : Zu(window.location.href), s = t.startsWith("/") ? t.substring(1) : t;
|
2285
2284
|
return `${n}/${s}`;
|
2286
|
-
},
|
2287
|
-
const { topDomain: e } =
|
2285
|
+
}, tc = (t) => {
|
2286
|
+
const { topDomain: e } = Ei(window.location.href);
|
2288
2287
|
return e === t;
|
2289
|
-
}, ze = (t) => t != null && t.endsWith("/") ? ze(t.substring(0, t.length - 1)) : t,
|
2288
|
+
}, ze = (t) => t != null && t.endsWith("/") ? ze(t.substring(0, t.length - 1)) : t, un = (t) => {
|
2290
2289
|
try {
|
2291
2290
|
return new URL(t).host;
|
2292
2291
|
} catch {
|
2293
2292
|
return null;
|
2294
2293
|
}
|
2295
|
-
},
|
2294
|
+
}, Si = (t) => un(t) ?? "", nc = (t) => {
|
2296
2295
|
const e = {};
|
2297
2296
|
try {
|
2298
2297
|
const n = new URL(t), s = "utm_";
|
@@ -2305,7 +2304,7 @@ const Qu = (t) => M(t) && M(t.source) && !le(t.source.id) && M(t.source.config)
|
|
2305
2304
|
} catch {
|
2306
2305
|
}
|
2307
2306
|
return e;
|
2308
|
-
},
|
2307
|
+
}, sc = (t) => {
|
2309
2308
|
let e = t;
|
2310
2309
|
try {
|
2311
2310
|
const n = new URL(t);
|
@@ -2313,40 +2312,40 @@ const Qu = (t) => M(t) && M(t.source) && !le(t.source.id) && M(t.source.config)
|
|
2313
2312
|
} catch {
|
2314
2313
|
}
|
2315
2314
|
return e;
|
2316
|
-
},
|
2315
|
+
}, ic = (t) => t.replace(/\/{2,}/g, "/"), Ye = (t) => {
|
2317
2316
|
if (!L(t))
|
2318
2317
|
return !1;
|
2319
2318
|
try {
|
2320
|
-
return S(globalThis.URL) && new URL(t),
|
2319
|
+
return S(globalThis.URL) && new URL(t), xa.test(t);
|
2321
2320
|
} catch {
|
2322
2321
|
return !1;
|
2323
2322
|
}
|
2324
|
-
},
|
2323
|
+
}, rc = () => {
|
2325
2324
|
var t, e;
|
2326
2325
|
return !!((e = (t = window.chrome) == null ? void 0 : t.runtime) != null && e.id);
|
2327
|
-
}, Yt = "none",
|
2326
|
+
}, Yt = "none", Kt = "immediate", oc = (t) => {
|
2328
2327
|
var e, n;
|
2329
2328
|
return ((n = (e = t == null ? void 0 : t.statsCollection) == null ? void 0 : e.errors) == null ? void 0 : n.enabled) === !0;
|
2330
|
-
},
|
2329
|
+
}, ac = (t) => {
|
2331
2330
|
var e, n;
|
2332
2331
|
return ((n = (e = t == null ? void 0 : t.statsCollection) == null ? void 0 : e.metrics) == null ? void 0 : n.enabled) === !0;
|
2333
|
-
},
|
2332
|
+
}, lc = (t) => {
|
2334
2333
|
const e = { sendPageEvent: !1, trackConsent: !1, discardPreConsentEvents: !1 };
|
2335
2334
|
if (M(t)) {
|
2336
2335
|
const n = T(t);
|
2337
2336
|
e.storage = n.storage, Ie(n.integrations) && (e.integrations = n.integrations), e.discardPreConsentEvents = n.discardPreConsentEvents === !0, e.sendPageEvent = n.sendPageEvent === !0, e.trackConsent = n.trackConsent === !0, Ie(n.consentManagement) && (e.consentManagement = H(n.consentManagement, { enabled: o.consents.enabled.value }));
|
2338
2337
|
}
|
2339
2338
|
return e;
|
2340
|
-
},
|
2339
|
+
}, rs = (t) => Ie(t) || Array.isArray(t), uc = (t, e) => {
|
2341
2340
|
let { provider: n } = t;
|
2342
|
-
const s = n ?
|
2343
|
-
return n && !s && (e.error(
|
2344
|
-
},
|
2341
|
+
const s = n ? on[n] : void 0;
|
2342
|
+
return n && !s && (e.error(Xo(te, n, on)), n = void 0), { provider: n, consentManagerPluginName: s };
|
2343
|
+
}, ki = (t, e) => {
|
2345
2344
|
let n, s = [], i = [], r = !1, a, u = (t == null ? void 0 : t.enabled) === !0;
|
2346
|
-
Ie(t) && u && ({ provider: a, consentManagerPluginName: n } =
|
2345
|
+
Ie(t) && u && ({ provider: a, consentManagerPluginName: n } = uc(t, e), rs(t.allowedConsentIds) && (s = t.allowedConsentIds, r = !0), rs(t.deniedConsentIds) && (i = t.deniedConsentIds, r = !0));
|
2347
2346
|
const l = { allowedConsentIds: s, deniedConsentIds: i };
|
2348
2347
|
return u = u && !!n, { provider: a, consentManagerPluginName: n, initialized: r, enabled: u, consentsData: l };
|
2349
|
-
},
|
2348
|
+
}, cc = () => {
|
2350
2349
|
const t = document.querySelector("script[data-rsa-write-key]");
|
2351
2350
|
if (t && t.dataset.rsaWriteKey === o.lifecycle.writeKey.value)
|
2352
2351
|
return t.src;
|
@@ -2356,45 +2355,45 @@ const Qu = (t) => M(t) && M(t.source) && !le(t.source.id) && M(t.source.config)
|
|
2356
2355
|
if (i && n.test(i))
|
2357
2356
|
return i;
|
2358
2357
|
}
|
2359
|
-
}, cc = (t) => {
|
2360
|
-
o.reporting.isErrorReportingEnabled.value = rc(t.source.config) && !ic(), o.reporting.isMetricsReportingEnabled.value = oc(t.source.config);
|
2361
2358
|
}, dc = (t) => {
|
2359
|
+
o.reporting.isErrorReportingEnabled.value = oc(t.source.config) && !rc(), o.reporting.isMetricsReportingEnabled.value = ac(t.source.config);
|
2360
|
+
}, fc = (t) => {
|
2362
2361
|
const { useServerSideCookies: e, dataServiceEndpoint: n, storage: s, setCookieDomain: i, sameDomainCookiesOnly: r } = o.loadOptions.value;
|
2363
2362
|
let a = s == null ? void 0 : s.cookie, u = !1, l;
|
2364
2363
|
if (e) {
|
2365
2364
|
u = e;
|
2366
|
-
const c = a.domain ?? i, d = C(c) && !
|
2367
|
-
if (
|
2365
|
+
const c = a.domain ?? i, d = C(c) && !tc(_n(c)) || r, h = ec(n ?? ja, d);
|
2366
|
+
if (Ye(h)) {
|
2368
2367
|
l = ze(h);
|
2369
|
-
const y =
|
2370
|
-
y !== g && (a = { ...a, samesite: "None", secure: !0 }), !r && d && g !==
|
2368
|
+
const y = un(window.location.href), g = un(h);
|
2369
|
+
y !== g && (a = { ...a, samesite: "None", secure: !0 }), !r && d && g !== _n(c) && (u = !1, t.warn(ba(te, c, g)));
|
2371
2370
|
} else
|
2372
2371
|
u = !1;
|
2373
2372
|
}
|
2374
2373
|
return { sscEnabled: u, cookieOptions: a, finalDataServiceUrl: l };
|
2375
|
-
},
|
2374
|
+
}, hc = (t) => {
|
2376
2375
|
var d;
|
2377
2376
|
const { storage: e } = o.loadOptions.value;
|
2378
2377
|
let n = e == null ? void 0 : e.type;
|
2379
|
-
C(n) && !
|
2378
|
+
C(n) && !Ju(n) && (t.warn(pa(te, n, rn)), n = rn);
|
2380
2379
|
let s = (d = e == null ? void 0 : e.encryption) == null ? void 0 : d.version;
|
2381
|
-
const i = s &&
|
2382
|
-
!x(s) && x(i) ? (t.warn(
|
2380
|
+
const i = s && Rt[s];
|
2381
|
+
!x(s) && x(i) ? (t.warn(va(te, s, Rt, Ce)), s = Ce) : x(s) && (s = Ce);
|
2383
2382
|
const r = e == null ? void 0 : e.migrate, a = r && s === Ce;
|
2384
|
-
r === !0 && a !== r && t.warn(
|
2385
|
-
const { sscEnabled: u, finalDataServiceUrl: l, cookieOptions: c } =
|
2383
|
+
r === !0 && a !== r && t.warn(ya(te, s, Ce));
|
2384
|
+
const { sscEnabled: u, finalDataServiceUrl: l, cookieOptions: c } = fc(t);
|
2386
2385
|
j(() => {
|
2387
|
-
o.storage.type.value = n, o.storage.cookie.value = c, o.serverCookies.isEnabledServerSideCookies.value = u, o.serverCookies.dataServiceUrl.value = l, o.storage.encryptionPluginName.value =
|
2386
|
+
o.storage.type.value = n, o.storage.cookie.value = c, o.serverCookies.isEnabledServerSideCookies.value = u, o.serverCookies.dataServiceUrl.value = l, o.storage.encryptionPluginName.value = Rt[s], o.storage.migrate.value = a;
|
2388
2387
|
});
|
2389
|
-
},
|
2388
|
+
}, gc = (t) => {
|
2390
2389
|
var h, y, g, f;
|
2391
|
-
const { provider: e, consentManagerPluginName: n, initialized: s, enabled: i, consentsData: r } =
|
2390
|
+
const { provider: e, consentManagerPluginName: n, initialized: s, enabled: i, consentsData: r } = ki(o.loadOptions.value.consentManagement, t), a = o.loadOptions.value.preConsent;
|
2392
2391
|
let u = ((h = a == null ? void 0 : a.storage) == null ? void 0 : h.strategy) ?? Yt;
|
2393
2392
|
const l = ["none", "session", "anonymousId"];
|
2394
|
-
C(u) && !l.includes(u) && (u = Yt, t.warn(
|
2395
|
-
let c = ((g = a == null ? void 0 : a.events) == null ? void 0 : g.delivery) ??
|
2393
|
+
C(u) && !l.includes(u) && (u = Yt, t.warn(wa(te, (y = a == null ? void 0 : a.storage) == null ? void 0 : y.strategy, Yt)));
|
2394
|
+
let c = ((g = a == null ? void 0 : a.events) == null ? void 0 : g.delivery) ?? Kt;
|
2396
2395
|
const d = ["immediate", "buffer"];
|
2397
|
-
C(c) && !d.includes(c) && (c =
|
2396
|
+
C(c) && !d.includes(c) && (c = Kt, t.warn(Ma(te, (f = a == null ? void 0 : a.events) == null ? void 0 : f.delivery, Kt))), j(() => {
|
2398
2397
|
var m;
|
2399
2398
|
o.consents.activeConsentManagerPluginName.value = n, o.consents.initialized.value = s, o.consents.enabled.value = i, o.consents.data.value = r, o.consents.provider.value = e, o.consents.preConsent.value = {
|
2400
2399
|
// Only enable pre-consent if it is explicitly enabled and
|
@@ -2405,44 +2404,44 @@ const Qu = (t) => M(t) && M(t.source) && !le(t.source.id) && M(t.source.config)
|
|
2405
2404
|
events: { delivery: c }
|
2406
2405
|
};
|
2407
2406
|
});
|
2408
|
-
},
|
2407
|
+
}, mc = (t) => {
|
2409
2408
|
var s;
|
2410
2409
|
let e = o.consents.resolutionStrategy.value, n;
|
2411
2410
|
M(t.consentManagementMetadata) && (o.consents.provider.value && (e = ((s = t.consentManagementMetadata.providers.find((i) => i.provider === o.consents.provider.value)) == null ? void 0 : s.resolutionStrategy) ?? o.consents.resolutionStrategy.value), n = t.consentManagementMetadata), o.consents.provider.value === "custom" && (e = void 0), j(() => {
|
2412
2411
|
o.consents.metadata.value = T(n), o.consents.resolutionStrategy.value = e;
|
2413
2412
|
});
|
2414
|
-
},
|
2413
|
+
}, pc = (t) => {
|
2415
2414
|
if (o.dataPlaneEvents.deliveryEnabled.value) {
|
2416
2415
|
const e = "XhrQueue";
|
2417
2416
|
let n = e;
|
2418
|
-
o.loadOptions.value.useBeacon && (o.capabilities.isBeaconAvailable.value ? n = "BeaconQueue" : (n = e, t.warn(
|
2417
|
+
o.loadOptions.value.useBeacon && (o.capabilities.isBeaconAvailable.value ? n = "BeaconQueue" : (n = e, t.warn(ka(te)))), j(() => {
|
2419
2418
|
o.dataPlaneEvents.eventsQueuePluginName.value = n;
|
2420
2419
|
});
|
2421
2420
|
}
|
2422
|
-
},
|
2423
|
-
const r = new URLSearchParams({ p:
|
2424
|
-
let a =
|
2425
|
-
if (
|
2421
|
+
}, vc = (t, e, n, s, i) => {
|
2422
|
+
const r = new URLSearchParams({ p: Hs, v: lt, build: ct, writeKey: e, lockIntegrationsVersion: n.toString(), lockPluginsVersion: s.toString() });
|
2423
|
+
let a = ri, u = r, l = "/sourceConfig/", c = "";
|
2424
|
+
if (Ye(t)) {
|
2426
2425
|
const d = new URL(t);
|
2427
|
-
ze(d.pathname).endsWith("/sourceConfig") || (d.pathname = `${ze(d.pathname)}/sourceConfig/`), d.pathname =
|
2426
|
+
ze(d.pathname).endsWith("/sourceConfig") || (d.pathname = `${ze(d.pathname)}/sourceConfig/`), d.pathname = ic(d.pathname), r.forEach((h, y) => {
|
2428
2427
|
d.searchParams.get(y) === null && d.searchParams.set(y, h);
|
2429
2428
|
}), a = d.origin, l = d.pathname, u = d.searchParams, c = d.hash;
|
2430
2429
|
} else
|
2431
|
-
i.warn(
|
2430
|
+
i.warn(Na(te, t));
|
2432
2431
|
return `${a}${l}?${u}${c}`;
|
2433
|
-
},
|
2432
|
+
}, yc = (t) => t.map((e) => ({ id: e.id, displayName: e.destinationDefinition.displayName, enabled: e.enabled, config: e.config, shouldApplyDeviceModeTransformation: e.shouldApplyDeviceModeTransformation ?? !1, propagateEventsUntransformedOnError: e.propagateEventsUntransformedOnError ?? !1, userFriendlyId: `${e.destinationDefinition.displayName.replaceAll(" ", "-")}___${e.id}` })), Ri = (t, e, n, s, i, r, a) => {
|
2434
2433
|
let u;
|
2435
2434
|
if (r) {
|
2436
|
-
if (!
|
2437
|
-
return a.error(
|
2435
|
+
if (!Ye(r))
|
2436
|
+
return a.error(Qo(te, t, r)), null;
|
2438
2437
|
u = ze(r);
|
2439
2438
|
} else if (u = n, o.context.app.value.installType === "cdn") {
|
2440
|
-
const l =
|
2439
|
+
const l = cc();
|
2441
2440
|
l && (u = l.split("/").slice(0, -1).concat(e).join("/"));
|
2442
2441
|
}
|
2443
|
-
return i && (u = u.replace(new RegExp(`/${
|
2444
|
-
},
|
2445
|
-
class
|
2442
|
+
return i && (u = u.replace(new RegExp(`/${Rn}/${ct}/${e}$`), `/${s}/${ct}/${e}`)), u;
|
2443
|
+
}, bc = (t, e, n, s) => Ri("integrations", kn, si, t, e, n, s), Ec = (t, e, n, s) => Ri("plugins", ni, ii, t, e, n, s);
|
2444
|
+
class Sc {
|
2446
2445
|
constructor(e, n, s) {
|
2447
2446
|
this.errorHandler = n, this.logger = s, this.httpClient = e, this.onError = this.onError.bind(this), this.processConfig = this.processConfig.bind(this);
|
2448
2447
|
}
|
@@ -2456,12 +2455,12 @@ class Ec {
|
|
2456
2455
|
* config related information in global state
|
2457
2456
|
*/
|
2458
2457
|
init() {
|
2459
|
-
const { logLevel: e, configUrl: n, lockIntegrationsVersion: s, lockPluginsVersion: i, destSDKBaseURL: r, pluginsSDKBaseURL: a, integrations: u } = o.loadOptions.value, l =
|
2458
|
+
const { logLevel: e, configUrl: n, lockIntegrationsVersion: s, lockPluginsVersion: i, destSDKBaseURL: r, pluginsSDKBaseURL: a, integrations: u } = o.loadOptions.value, l = bc(lt, s, r, this.logger);
|
2460
2459
|
if (ne(l))
|
2461
2460
|
return;
|
2462
2461
|
let c;
|
2463
|
-
c =
|
2464
|
-
o.lifecycle.integrationsCDNPath.value = l, o.lifecycle.pluginsCDNPath.value = c, e && (o.lifecycle.logLevel.value = e), o.lifecycle.sourceConfigUrl.value =
|
2462
|
+
c = Ec(lt, i, a, this.logger), c !== null && (this.attachEffects(), o.lifecycle.activeDataplaneUrl.value = ze(o.lifecycle.dataPlaneUrl.value), hc(this.logger), gc(this.logger), pc(this.logger), j(() => {
|
2463
|
+
o.lifecycle.integrationsCDNPath.value = l, o.lifecycle.pluginsCDNPath.value = c, e && (o.lifecycle.logLevel.value = e), o.lifecycle.sourceConfigUrl.value = vc(n, o.lifecycle.writeKey.value, s, i, this.logger), o.metrics.metricsServiceUrl.value = `${o.lifecycle.activeDataplaneUrl.value}/${qa}`, o.nativeDestinations.loadOnlyIntegrations.value = u;
|
2465
2464
|
}), this.getConfig());
|
2466
2465
|
}
|
2467
2466
|
/**
|
@@ -2476,28 +2475,28 @@ class Ec {
|
|
2476
2475
|
*/
|
2477
2476
|
processConfig(e, n) {
|
2478
2477
|
if (!C(e)) {
|
2479
|
-
C(n) ? this.onError(n.error,
|
2478
|
+
C(n) ? this.onError(n.error, jn) : this.onError(new Error(jn));
|
2480
2479
|
return;
|
2481
2480
|
}
|
2482
2481
|
let s;
|
2483
2482
|
try {
|
2484
2483
|
L(e) ? s = JSON.parse(e) : s = e;
|
2485
2484
|
} catch (r) {
|
2486
|
-
this.onError(r,
|
2485
|
+
this.onError(r, Hn);
|
2487
2486
|
return;
|
2488
2487
|
}
|
2489
|
-
if (!
|
2490
|
-
this.onError(new Error(
|
2488
|
+
if (!Xu(s)) {
|
2489
|
+
this.onError(new Error(Hn));
|
2491
2490
|
return;
|
2492
2491
|
}
|
2493
2492
|
if (s.source.enabled === !1) {
|
2494
|
-
this.logger.error(
|
2493
|
+
this.logger.error(qo);
|
2495
2494
|
return;
|
2496
2495
|
}
|
2497
|
-
|
2498
|
-
const i = s.source.destinations.length > 0 ?
|
2496
|
+
dc(s);
|
2497
|
+
const i = s.source.destinations.length > 0 ? yc(s.source.destinations) : [];
|
2499
2498
|
j(() => {
|
2500
|
-
o.source.value = { config: s.source.config, name: s.source.name, id: s.source.id, workspaceId: s.source.workspaceId }, o.nativeDestinations.configuredDestinations.value = i, o.plugins.pluginsToLoadFromConfig.value = o.loadOptions.value.plugins ?? [],
|
2499
|
+
o.source.value = { config: s.source.config, name: s.source.name, id: s.source.id, workspaceId: s.source.workspaceId }, o.nativeDestinations.configuredDestinations.value = i, o.plugins.pluginsToLoadFromConfig.value = o.loadOptions.value.plugins ?? [], mc(s), o.lifecycle.status.value = "configured";
|
2501
2500
|
});
|
2502
2501
|
}
|
2503
2502
|
/**
|
@@ -2509,7 +2508,7 @@ class Ec {
|
|
2509
2508
|
const e = o.loadOptions.value.getSourceConfig;
|
2510
2509
|
if (e) {
|
2511
2510
|
if (!S(e)) {
|
2512
|
-
this.logger.error(
|
2511
|
+
this.logger.error(Wo(te));
|
2513
2512
|
return;
|
2514
2513
|
}
|
2515
2514
|
const n = e();
|
@@ -2520,10 +2519,10 @@ class Ec {
|
|
2520
2519
|
this.httpClient.getAsyncData({ url: o.lifecycle.sourceConfigUrl.value, options: { headers: { "Content-Type": void 0 } }, callback: this.processConfig });
|
2521
2520
|
}
|
2522
2521
|
}
|
2523
|
-
const
|
2522
|
+
const kc = () => {
|
2524
2523
|
const t = /([A-Z]+[+-]\d+)/.exec((/* @__PURE__ */ new Date()).toString());
|
2525
2524
|
return t != null && t[1] ? t[1] : "NA";
|
2526
|
-
},
|
2525
|
+
}, Ii = () => (document == null ? void 0 : document.referrer) || "$direct", Rc = () => {
|
2527
2526
|
const t = document.getElementsByTagName("link");
|
2528
2527
|
let e = "";
|
2529
2528
|
for (let n = 0; t[n]; n += 1) {
|
@@ -2534,7 +2533,7 @@ const Sc = () => {
|
|
2534
2533
|
}
|
2535
2534
|
}
|
2536
2535
|
return e;
|
2537
|
-
},
|
2536
|
+
}, Ic = () => {
|
2538
2537
|
if (x(globalThis.navigator))
|
2539
2538
|
return null;
|
2540
2539
|
let { userAgent: t } = globalThis.navigator;
|
@@ -2544,8 +2543,8 @@ const Sc = () => {
|
|
2544
2543
|
n && (t = `${t} Brave/${n[2]}`);
|
2545
2544
|
}
|
2546
2545
|
return t;
|
2547
|
-
},
|
2548
|
-
const t =
|
2546
|
+
}, Tc = () => x(globalThis.navigator) ? null : globalThis.navigator.language ?? globalThis.navigator.browserLanguage, Ti = () => {
|
2547
|
+
const t = Rc();
|
2549
2548
|
let e = globalThis.location.pathname;
|
2550
2549
|
const { href: n } = globalThis.location;
|
2551
2550
|
let s = n;
|
@@ -2556,12 +2555,12 @@ const Sc = () => {
|
|
2556
2555
|
l.search === "" ? s = t + i : s = t, e = l.pathname;
|
2557
2556
|
} catch {
|
2558
2557
|
}
|
2559
|
-
const r =
|
2560
|
-
return { path: e, referrer: u, referring_domain:
|
2561
|
-
},
|
2562
|
-
class
|
2558
|
+
const r = sc(s), { title: a } = document, u = Ii();
|
2559
|
+
return { path: e, referrer: u, referring_domain: Si(u), search: i, title: a, url: r, tab_url: n };
|
2560
|
+
}, Ac = `https://polyfill-fastly.io/v3/polyfill.min.js?version=3.111.0&features=${Object.keys(ln).join("%2C")}`, Oc = 10 * 1e3, os = "rudderstackPolyfill";
|
2561
|
+
class Dc {
|
2563
2562
|
constructor(e, n, s) {
|
2564
|
-
this.httpClient = e, this.errorHandler = n, this.logger = s, this.externalSrcLoader = new
|
2563
|
+
this.httpClient = e, this.errorHandler = n, this.logger = s, this.externalSrcLoader = new qs(this.logger), this.onError = this.onError.bind(this), this.onReady = this.onReady.bind(this);
|
2565
2564
|
}
|
2566
2565
|
init() {
|
2567
2566
|
this.prepareBrowserCapabilities(), this.attachWindowListeners();
|
@@ -2572,21 +2571,21 @@ class Oc {
|
|
2572
2571
|
// eslint-disable-next-line class-methods-use-this
|
2573
2572
|
detectBrowserCapabilities() {
|
2574
2573
|
j(() => {
|
2575
|
-
o.capabilities.storage.isCookieStorageAvailable.value = Ge(W, ie(W), this.logger), o.capabilities.storage.isLocalStorageAvailable.value = Ge(X, void 0, this.logger), o.capabilities.storage.isSessionStorageAvailable.value = Ge(ee, void 0, this.logger), o.capabilities.isBeaconAvailable.value =
|
2574
|
+
o.capabilities.storage.isCookieStorageAvailable.value = Ge(W, ie(W), this.logger), o.capabilities.storage.isLocalStorageAvailable.value = Ge(X, void 0, this.logger), o.capabilities.storage.isSessionStorageAvailable.value = Ge(ee, void 0, this.logger), o.capabilities.isBeaconAvailable.value = Mu(), o.capabilities.isUaCHAvailable.value = ss(), o.capabilities.isCryptoAvailable.value = wu(), o.capabilities.isIE11.value = $u(), o.capabilities.isOnline.value = globalThis.navigator.onLine, o.context.userAgent.value = Ic(), o.context.locale.value = Tc(), o.context.screen.value = is(), o.context.timezone.value = kc(), ss() && Uu((e) => {
|
2576
2575
|
o.context["ua-ch"].value = e;
|
2577
2576
|
}, o.loadOptions.value.uaChTrackLevel);
|
2578
2577
|
}), fe(() => {
|
2579
|
-
o.loadOptions.value.sendAdblockPage === !0 && o.lifecycle.sourceConfigUrl.value !== void 0 &&
|
2578
|
+
o.loadOptions.value.sendAdblockPage === !0 && o.lifecycle.sourceConfigUrl.value !== void 0 && ci(this.httpClient);
|
2580
2579
|
});
|
2581
2580
|
}
|
2582
2581
|
/**
|
2583
2582
|
* Detect if polyfills are required and then load script from polyfill URL
|
2584
2583
|
*/
|
2585
2584
|
prepareBrowserCapabilities() {
|
2586
|
-
o.capabilities.isLegacyDOM.value =
|
2585
|
+
o.capabilities.isLegacyDOM.value = Vu();
|
2587
2586
|
const e = o.loadOptions.value.polyfillURL;
|
2588
|
-
let n =
|
2589
|
-
if (qe(e) && (
|
2587
|
+
let n = Ac;
|
2588
|
+
if (qe(e) && (Ye(e) ? n = e : this.logger.warn(Ba(tn, e))), o.loadOptions.value.polyfillIfRequired && o.capabilities.isLegacyDOM.value && Ye(n)) {
|
2590
2589
|
const i = n !== o.loadOptions.value.polyfillURL;
|
2591
2590
|
if (i) {
|
2592
2591
|
const r = `RS_polyfillCallback_${o.lifecycle.writeKey.value}`, a = () => {
|
@@ -2594,8 +2593,8 @@ class Oc {
|
|
2594
2593
|
};
|
2595
2594
|
globalThis[r] = a, n = `${n}&callback=${r}`;
|
2596
2595
|
}
|
2597
|
-
this.externalSrcLoader.loadJSFile({ url: n, id:
|
2598
|
-
r ? i || this.onReady() : this.onError(new Error(
|
2596
|
+
this.externalSrcLoader.loadJSFile({ url: n, id: os, async: !0, timeout: Oc, callback: (r) => {
|
2597
|
+
r ? i || this.onReady() : this.onError(new Error(La(os, n)));
|
2599
2598
|
} });
|
2600
2599
|
} else
|
2601
2600
|
this.onReady();
|
@@ -2608,8 +2607,8 @@ class Oc {
|
|
2608
2607
|
o.capabilities.isOnline.value = !1;
|
2609
2608
|
}), globalThis.addEventListener("online", () => {
|
2610
2609
|
o.capabilities.isOnline.value = !0;
|
2611
|
-
}), globalThis.addEventListener("resize",
|
2612
|
-
o.context.screen.value =
|
2610
|
+
}), globalThis.addEventListener("resize", Oo(() => {
|
2611
|
+
o.context.screen.value = is();
|
2613
2612
|
}, this));
|
2614
2613
|
}
|
2615
2614
|
/**
|
@@ -2624,16 +2623,16 @@ class Oc {
|
|
2624
2623
|
* @param error The error object
|
2625
2624
|
*/
|
2626
2625
|
onError(e, n) {
|
2627
|
-
this.errorHandler.onError({ error: e, context:
|
2626
|
+
this.errorHandler.onError({ error: e, context: tn, groupingHash: n });
|
2628
2627
|
}
|
2629
2628
|
}
|
2630
|
-
const
|
2629
|
+
const Cc = "web", _c = ["integrations", "anonymousId", "originalTimestamp"], as = ["library", "consentManagement", "userAgent", "ua-ch", "screen"], Wt = ["id", "anonymous_id", "user_id", "sent_at", "timestamp", "received_at", "original_timestamp", "event", "event_text", "channel", "context_ip", "context_request_ip", "context_passed_ip", "group_id", "previous_id"], Ai = (t) => typeof t == "number" && !Number.isNaN(t), Pc = (t, e) => e.toString().length >= t, wt = (t) => Ai(t) && t >= 0 && Number.isInteger(t), ls = 10, Oi = (t) => {
|
2631
2630
|
const { cutOff: e } = t, n = Date.now();
|
2632
2631
|
return !!(e != null && e.enabled && e.expiresAt && n > e.expiresAt);
|
2633
|
-
},
|
2632
|
+
}, us = (t) => !t.expiresAt || Date.now() > t.expiresAt || Oi(t), Nc = () => Date.now(), Lc = (t, e) => !t || !wt(t) || !Pc(ls, t) ? (e.warn(Da(De, t, ls)), !1) : !0, wc = (t) => {
|
2634
2633
|
if (t != null && t.enabled)
|
2635
|
-
return t.expiresAt ?? (
|
2636
|
-
},
|
2634
|
+
return t.expiresAt ?? (wt(t.duration) ? Date.now() + t.duration : void 0);
|
2635
|
+
}, Mc = (t) => {
|
2637
2636
|
const { timeout: e, cutOff: n } = t, s = Date.now();
|
2638
2637
|
return {
|
2639
2638
|
id: s,
|
@@ -2644,47 +2643,47 @@ const Dc = "web", Cc = ["integrations", "anonymousId", "originalTimestamp"], ls
|
|
2644
2643
|
autoTrack: !0,
|
2645
2644
|
...n && { cutOff: n }
|
2646
2645
|
};
|
2647
|
-
},
|
2648
|
-
const e =
|
2646
|
+
}, $c = (t, e) => ({ id: Lc(t, e) ? t : Nc(), sessionStart: void 0, manualTrack: !0 }), st = (t) => t === W || t === X || t === ee || t === ce, cn = () => $t(), Uc = (t) => {
|
2647
|
+
const e = Ti(), n = {};
|
2649
2648
|
return Object.keys(e).forEach((s) => {
|
2650
2649
|
n[s] = (t == null ? void 0 : t[s]) || e[s];
|
2651
2650
|
}), n.initial_referrer = (t == null ? void 0 : t.initial_referrer) || o.session.initialReferrer.value, n.initial_referring_domain = (t == null ? void 0 : t.initial_referring_domain) || o.session.initialReferringDomain.value, n;
|
2652
|
-
},
|
2653
|
-
const n = (e == null ? void 0 : e.page) || {}, s = t, i =
|
2651
|
+
}, Bc = (t, e) => {
|
2652
|
+
const n = (e == null ? void 0 : e.page) || {}, s = t, i = Ti();
|
2654
2653
|
return Object.keys(i).forEach((r) => {
|
2655
2654
|
x(s[r]) && (s[r] = n[r] || i[r]);
|
2656
2655
|
}), x(s.initial_referrer) && (s.initial_referrer = n.initial_referrer || o.session.initialReferrer.value), x(s.initial_referring_domain) && (s.initial_referring_domain = n.initial_referring_domain || o.session.initialReferringDomain.value), s;
|
2657
|
-
},
|
2656
|
+
}, Qt = (t, e, n) => {
|
2658
2657
|
M(t) && Object.keys(t).forEach((s) => {
|
2659
|
-
(
|
2658
|
+
(Wt.includes(s) || Wt.includes(s.toLowerCase())) && n.warn(Ea(Bs, s, e, Wt));
|
2660
2659
|
});
|
2661
|
-
}, Bc = (t, e) => {
|
2662
|
-
const { properties: n, traits: s, context: i } = t, { traits: r } = i;
|
2663
|
-
Xt(n, "properties", e), Xt(s, "traits", e), Xt(r, "context.traits", e);
|
2664
2660
|
}, Vc = (t, e) => {
|
2661
|
+
const { properties: n, traits: s, context: i } = t, { traits: r } = i;
|
2662
|
+
Qt(n, "properties", e), Qt(s, "traits", e), Qt(r, "context.traits", e);
|
2663
|
+
}, Fc = (t, e) => {
|
2665
2664
|
e.anonymousId && L(e.anonymousId) && (t.anonymousId = e.anonymousId), Ie(e.integrations) && (t.integrations = e.integrations), e.originalTimestamp && L(e.originalTimestamp) && (t.originalTimestamp = e.originalTimestamp);
|
2666
|
-
},
|
2665
|
+
}, xc = (t, e, n) => {
|
2667
2666
|
let s = t;
|
2668
2667
|
return Object.keys(e).forEach((i) => {
|
2669
|
-
if (!
|
2668
|
+
if (!_c.includes(i) && !as.includes(i))
|
2670
2669
|
if (i !== "context")
|
2671
2670
|
s = H(s, { [i]: e[i] });
|
2672
2671
|
else if (!x(e[i]) && M(e[i])) {
|
2673
2672
|
const r = {};
|
2674
2673
|
Object.keys(e[i]).forEach((a) => {
|
2675
|
-
|
2674
|
+
as.includes(a) || (r[a] = e[i][a]);
|
2676
2675
|
}), s = H(s, { ...r });
|
2677
2676
|
} else
|
2678
|
-
n.warn(
|
2677
|
+
n.warn(Sa(Bs));
|
2679
2678
|
}), s;
|
2680
|
-
},
|
2681
|
-
M(e) && (
|
2682
|
-
},
|
2679
|
+
}, Hc = (t, e, n) => {
|
2680
|
+
M(e) && (Fc(t, e), t.context = xc(t.context, e, n));
|
2681
|
+
}, Gc = (t) => {
|
2683
2682
|
let e;
|
2684
|
-
return o.loadOptions.value.useGlobalIntegrationsConfigInEvents ? e = o.consents.postConsent.value.integrations ?? o.nativeDestinations.loadOnlyIntegrations.value : t ? e = t : e =
|
2685
|
-
},
|
2683
|
+
return o.loadOptions.value.useGlobalIntegrationsConfigInEvents ? e = o.consents.postConsent.value.integrations ?? o.nativeDestinations.loadOnlyIntegrations.value : t ? e = t : e = ti, T(e);
|
2684
|
+
}, et = (t, e, n, s) => {
|
2686
2685
|
var a, u, l;
|
2687
|
-
const i = { channel:
|
2686
|
+
const i = { channel: Cc, context: {
|
2688
2687
|
traits: T(o.session.userTraits.value),
|
2689
2688
|
sessionId: o.session.sessionInfo.value.id || void 0,
|
2690
2689
|
sessionStart: o.session.sessionInfo.value.sessionStart || void 0,
|
@@ -2697,17 +2696,17 @@ const Dc = "web", Cc = ["integrations", "anonymousId", "originalTimestamp"], ls
|
|
2697
2696
|
os: o.context.os.value,
|
2698
2697
|
locale: o.context.locale.value,
|
2699
2698
|
screen: o.context.screen.value,
|
2700
|
-
campaign:
|
2701
|
-
page:
|
2699
|
+
campaign: nc(globalThis.location.href),
|
2700
|
+
page: Uc(n),
|
2702
2701
|
timezone: o.context.timezone.value,
|
2703
2702
|
// Add auto tracking information
|
2704
2703
|
...o.autoTrack.enabled.value && { autoTrack: { ...o.autoTrack.pageLifecycle.enabled.value && { page: { pageViewId: o.autoTrack.pageLifecycle.pageViewId.value } } } }
|
2705
|
-
}, originalTimestamp:
|
2706
|
-
|
2704
|
+
}, originalTimestamp: oo(), messageId: $t(), userId: t.userId || o.session.userId.value };
|
2705
|
+
st((a = o.storage.entries.value.anonymousId) == null ? void 0 : a.type) ? i.anonymousId = o.session.anonymousId.value : i.anonymousId = cn(), o.storage.trulyAnonymousTracking.value && (i.context.trulyAnonymousTracking = !0), t.type === "identify" && (i.context.traits = ((u = o.storage.entries.value.userTraits) == null ? void 0 : u.type) !== we ? T(o.session.userTraits.value) : t.context.traits), t.type === "group" && ((t.groupId || o.session.groupId.value) && (i.groupId = t.groupId || o.session.groupId.value), (t.traits || o.session.groupTraits.value) && (i.traits = ((l = o.storage.entries.value.groupTraits) == null ? void 0 : l.type) !== we ? T(o.session.groupTraits.value) : t.traits));
|
2707
2706
|
const r = H(t, i);
|
2708
|
-
return r.event === void 0 && (r.event = null), r.properties === void 0 && (r.properties = null),
|
2707
|
+
return r.event === void 0 && (r.event = null), r.properties === void 0 && (r.properties = null), Hc(r, e, s), Vc(r, s), r.integrations = Gc(r.integrations), r;
|
2709
2708
|
};
|
2710
|
-
class
|
2709
|
+
class jc {
|
2711
2710
|
constructor(e) {
|
2712
2711
|
this.logger = e;
|
2713
2712
|
}
|
@@ -2720,7 +2719,7 @@ class Gc {
|
|
2720
2719
|
*/
|
2721
2720
|
generatePageEvent(e, n, s, i) {
|
2722
2721
|
let r = s ?? {};
|
2723
|
-
return r =
|
2722
|
+
return r = Bc(r, i), et({ properties: r, name: n, category: e, type: "page" }, i, r, this.logger);
|
2724
2723
|
}
|
2725
2724
|
/**
|
2726
2725
|
* Generate a 'track' event based on the user-input fields
|
@@ -2729,7 +2728,7 @@ class Gc {
|
|
2729
2728
|
* @param options API options
|
2730
2729
|
*/
|
2731
2730
|
generateTrackEvent(e, n, s) {
|
2732
|
-
return
|
2731
|
+
return et({ properties: n, event: e, type: "track" }, s, void 0, this.logger);
|
2733
2732
|
}
|
2734
2733
|
/**
|
2735
2734
|
* Generate an 'identify' event based on the user-input fields
|
@@ -2738,7 +2737,7 @@ class Gc {
|
|
2738
2737
|
* @param options API options
|
2739
2738
|
*/
|
2740
2739
|
generateIdentifyEvent(e, n, s) {
|
2741
|
-
return
|
2740
|
+
return et({ userId: e, type: "identify", context: { traits: n } }, s, void 0, this.logger);
|
2742
2741
|
}
|
2743
2742
|
/**
|
2744
2743
|
* Generate an 'alias' event based on the user-input fields
|
@@ -2747,7 +2746,7 @@ class Gc {
|
|
2747
2746
|
* @param options API options
|
2748
2747
|
*/
|
2749
2748
|
generateAliasEvent(e, n, s) {
|
2750
|
-
const r =
|
2749
|
+
const r = et({ previousId: n, type: "alias" }, s, void 0, this.logger);
|
2751
2750
|
return r.userId = e ?? r.userId, r;
|
2752
2751
|
}
|
2753
2752
|
/**
|
@@ -2758,7 +2757,7 @@ class Gc {
|
|
2758
2757
|
*/
|
2759
2758
|
generateGroupEvent(e, n, s) {
|
2760
2759
|
const i = { type: "group" };
|
2761
|
-
return e && (i.groupId = e), n && (i.traits = n),
|
2760
|
+
return e && (i.groupId = e), n && (i.traits = n), et(i, s, void 0, this.logger);
|
2762
2761
|
}
|
2763
2762
|
/**
|
2764
2763
|
* Generates a new RudderEvent object based on the user-input fields
|
@@ -2788,7 +2787,7 @@ class Gc {
|
|
2788
2787
|
return n;
|
2789
2788
|
}
|
2790
2789
|
}
|
2791
|
-
class
|
2790
|
+
class qc {
|
2792
2791
|
/**
|
2793
2792
|
*
|
2794
2793
|
* @param eventRepository Event repository instance
|
@@ -2797,7 +2796,7 @@ class jc {
|
|
2797
2796
|
* @param logger Logger object
|
2798
2797
|
*/
|
2799
2798
|
constructor(e, n, s, i) {
|
2800
|
-
this.eventRepository = e, this.userSessionManager = n, this.errorHandler = s, this.logger = i, this.eventFactory = new
|
2799
|
+
this.eventRepository = e, this.userSessionManager = n, this.errorHandler = s, this.logger = i, this.eventFactory = new jc(this.logger);
|
2801
2800
|
}
|
2802
2801
|
/**
|
2803
2802
|
* Initializes the event manager
|
@@ -2818,7 +2817,7 @@ class jc {
|
|
2818
2817
|
this.eventRepository.enqueue(n, e.callback);
|
2819
2818
|
}
|
2820
2819
|
}
|
2821
|
-
class
|
2820
|
+
class zc {
|
2822
2821
|
constructor(e, n, s, i, r) {
|
2823
2822
|
this.storeManager = n, this.pluginsManager = e, this.logger = r, this.errorHandler = i, this.httpClient = s, this.onError = this.onError.bind(this), this.serverSideCookieDebounceFuncs = {};
|
2824
2823
|
}
|
@@ -2858,13 +2857,13 @@ class qc {
|
|
2858
2857
|
if (e && n)
|
2859
2858
|
this.setInitialReferrer(e), this.setInitialReferringDomain(n);
|
2860
2859
|
else {
|
2861
|
-
const s = e ||
|
2862
|
-
this.setInitialReferrer(s), this.setInitialReferringDomain(
|
2860
|
+
const s = e || Ii();
|
2861
|
+
this.setInitialReferrer(s), this.setInitialReferringDomain(Si(s));
|
2863
2862
|
}
|
2864
2863
|
}
|
2865
2864
|
isPersistenceEnabledForStorageEntry(e) {
|
2866
2865
|
var n;
|
2867
|
-
return
|
2866
|
+
return st((n = o.storage.entries.value[e]) == null ? void 0 : n.type);
|
2868
2867
|
}
|
2869
2868
|
migrateDataFromPreviousStorage() {
|
2870
2869
|
const e = o.storage.entries.value, n = [W, X, ee];
|
@@ -2876,7 +2875,7 @@ class qc {
|
|
2876
2875
|
const d = (h = this.storeManager) == null ? void 0 : h.getStore(Fe[c]);
|
2877
2876
|
if (d && c !== r) {
|
2878
2877
|
const y = d.get(Ve[i]);
|
2879
|
-
|
2878
|
+
Gr(y) && a.set(Ve[i], y), d.remove(Ve[i]);
|
2880
2879
|
}
|
2881
2880
|
});
|
2882
2881
|
});
|
@@ -2885,7 +2884,7 @@ class qc {
|
|
2885
2884
|
if (!o.storage.migrate.value)
|
2886
2885
|
return;
|
2887
2886
|
let s = e ?? [];
|
2888
|
-
s.length === 0 && [pi, vi
|
2887
|
+
s.length === 0 && [mi, pi, vi].forEach((a) => {
|
2889
2888
|
var l;
|
2890
2889
|
const u = (l = this.storeManager) == null ? void 0 : l.getStore(a);
|
2891
2890
|
u && s.push(u);
|
@@ -2905,14 +2904,14 @@ class qc {
|
|
2905
2904
|
return { autoTrack: e };
|
2906
2905
|
let n;
|
2907
2906
|
const s = (r = o.loadOptions.value.sessions) == null ? void 0 : r.timeout;
|
2908
|
-
|
2907
|
+
wt(s) ? n = s : (this.logger.warn(Ra(De, s, nn)), n = nn), n === 0 && (this.logger.warn(Aa(De)), e = !1), n > 0 && n < Vn && this.logger.warn(Oa(De, n, Vn));
|
2909
2908
|
const i = this.getCutOffInfo(n);
|
2910
2909
|
return { timeout: n, autoTrack: e, cutOff: i };
|
2911
2910
|
}
|
2912
2911
|
getCutOffInfo(e) {
|
2913
2912
|
const n = o.loadOptions.value.sessions.cutOff;
|
2914
2913
|
let s, i = !1;
|
2915
|
-
return n.enabled === !0 && (s = n.duration, i = !0,
|
2914
|
+
return n.enabled === !0 && (s = n.duration, i = !0, wt(s) ? s < e && (this.logger.warn(Ta(De, s, e)), i = !1) : (this.logger.warn(Ia(De, s, Bn)), s = Bn)), { enabled: i, duration: s };
|
2916
2915
|
}
|
2917
2916
|
/**
|
2918
2917
|
* Handles error
|
@@ -2955,13 +2954,13 @@ class qc {
|
|
2955
2954
|
var u, l;
|
2956
2955
|
((u = a == null ? void 0 : a.xhr) == null ? void 0 : u.status) === 200 ? e.forEach((c) => {
|
2957
2956
|
const d = s == null ? void 0 : s.get(c.name), h = de(c.value, !1, []);
|
2958
|
-
de(d, !1, []) !== h && (this.logger.error(
|
2959
|
-
}) : (this.logger.error(
|
2957
|
+
de(d, !1, []) !== h && (this.logger.error(ma(c.name)), n && n(c.name, c.value));
|
2958
|
+
}) : (this.logger.error(ga((l = a == null ? void 0 : a.xhr) == null ? void 0 : l.status)), e.forEach((c) => {
|
2960
2959
|
n && n(c.name, c.value);
|
2961
2960
|
}));
|
2962
2961
|
});
|
2963
2962
|
} catch (i) {
|
2964
|
-
this.onError(i,
|
2963
|
+
this.onError(i, qn, qn), e.forEach((r) => {
|
2965
2964
|
n && n(r.name, r.value);
|
2966
2965
|
});
|
2967
2966
|
}
|
@@ -2974,7 +2973,7 @@ class qc {
|
|
2974
2973
|
syncValueToStorage(e, n) {
|
2975
2974
|
var r, a, u;
|
2976
2975
|
const s = o.storage.entries.value, i = (r = s[e]) == null ? void 0 : r.type;
|
2977
|
-
if (
|
2976
|
+
if (st(i)) {
|
2978
2977
|
const l = (a = this.storeManager) == null ? void 0 : a.getStore(Fe[i]), c = (u = s[e]) == null ? void 0 : u.key;
|
2979
2978
|
n && (L(n) || Ie(n)) ? o.serverCookies.isEnabledServerSideCookies.value && i === W ? (this.serverSideCookieDebounceFuncs[e] && globalThis.clearTimeout(this.serverSideCookieDebounceFuncs[e]), this.serverSideCookieDebounceFuncs[e] = globalThis.setTimeout(() => {
|
2980
2979
|
this.setServerSideCookies([{ name: c, value: n }], (d, h) => {
|
@@ -2987,7 +2986,7 @@ class qc {
|
|
2987
2986
|
* Function to update storage whenever state value changes
|
2988
2987
|
*/
|
2989
2988
|
registerEffects() {
|
2990
|
-
|
2989
|
+
yi.forEach((e) => {
|
2991
2990
|
fe(() => {
|
2992
2991
|
this.syncValueToStorage(e, o.session[e].value);
|
2993
2992
|
});
|
@@ -3004,7 +3003,7 @@ class qc {
|
|
3004
3003
|
setAnonymousId(e, n) {
|
3005
3004
|
var i;
|
3006
3005
|
let s = e;
|
3007
|
-
(!L(e) || !s) && (s = void 0), this.isPersistenceEnabledForStorageEntry("anonymousId") ? (!s && n && (s = (i = this.pluginsManager) == null ? void 0 : i.invokeSingle("userSession.anonymousIdGoogleLinker", n)), s = s ||
|
3006
|
+
(!L(e) || !s) && (s = void 0), this.isPersistenceEnabledForStorageEntry("anonymousId") ? (!s && n && (s = (i = this.pluginsManager) == null ? void 0 : i.invokeSingle("userSession.anonymousIdGoogleLinker", n)), s = s || cn()) : s = A.anonymousId, o.session.anonymousId.value = s;
|
3008
3007
|
}
|
3009
3008
|
/**
|
3010
3009
|
* Fetches anonymousId
|
@@ -3014,16 +3013,16 @@ class qc {
|
|
3014
3013
|
getAnonymousId(e) {
|
3015
3014
|
var s, i;
|
3016
3015
|
const n = (s = o.storage.entries.value.anonymousId) == null ? void 0 : s.type;
|
3017
|
-
if (
|
3016
|
+
if (st(n)) {
|
3018
3017
|
let r = o.session.anonymousId.value;
|
3019
|
-
(!r || r === A.anonymousId) && (r = this.getEntryValue("anonymousId")), !r && e && (r = (i = this.pluginsManager) == null ? void 0 : i.invokeSingle("storage.getAnonymousId", ie, e)), o.session.anonymousId.value = r ||
|
3018
|
+
(!r || r === A.anonymousId) && (r = this.getEntryValue("anonymousId")), !r && e && (r = (i = this.pluginsManager) == null ? void 0 : i.invokeSingle("storage.getAnonymousId", ie, e)), o.session.anonymousId.value = r || cn();
|
3020
3019
|
}
|
3021
3020
|
return o.session.anonymousId.value;
|
3022
3021
|
}
|
3023
3022
|
getEntryValue(e) {
|
3024
3023
|
var i, r, a;
|
3025
3024
|
const n = o.storage.entries.value, s = (i = n[e]) == null ? void 0 : i.type;
|
3026
|
-
if (
|
3025
|
+
if (st(s)) {
|
3027
3026
|
const u = (r = this.storeManager) == null ? void 0 : r.getStore(Fe[s]);
|
3028
3027
|
this.migrateStorageIfNeeded([u], [e]);
|
3029
3028
|
const l = (a = n[e]) == null ? void 0 : a.key;
|
@@ -3097,7 +3096,7 @@ class qc {
|
|
3097
3096
|
*/
|
3098
3097
|
getSessionId() {
|
3099
3098
|
const e = this.getSessionInfo() ?? A.sessionInfo;
|
3100
|
-
return e.autoTrack && !
|
3099
|
+
return e.autoTrack && !us(e) || e.manualTrack ? e.id ?? null : null;
|
3101
3100
|
}
|
3102
3101
|
/**
|
3103
3102
|
* A function to keep the session information up to date in the state
|
@@ -3170,14 +3169,14 @@ class qc {
|
|
3170
3169
|
*/
|
3171
3170
|
startOrRenewAutoTracking(e) {
|
3172
3171
|
let n = e;
|
3173
|
-
if (
|
3174
|
-
n =
|
3172
|
+
if (us(e))
|
3173
|
+
n = Mc(e);
|
3175
3174
|
else {
|
3176
3175
|
const s = Date.now(), i = e.timeout;
|
3177
3176
|
n.expiresAt = s + i;
|
3178
3177
|
}
|
3179
|
-
if (
|
3180
|
-
const s =
|
3178
|
+
if (Oi(n) && (n.cutOff.expiresAt = void 0), n.cutOff) {
|
3179
|
+
const s = wc(n.cutOff);
|
3181
3180
|
n.cutOff.expiresAt = s;
|
3182
3181
|
}
|
3183
3182
|
o.session.sessionInfo.value = n;
|
@@ -3188,7 +3187,7 @@ class qc {
|
|
3188
3187
|
* @returns
|
3189
3188
|
*/
|
3190
3189
|
start(e) {
|
3191
|
-
o.session.sessionInfo.value =
|
3190
|
+
o.session.sessionInfo.value = $c(e, this.logger);
|
3192
3191
|
}
|
3193
3192
|
/**
|
3194
3193
|
* An internal function to start manual session
|
@@ -3210,31 +3209,31 @@ class qc {
|
|
3210
3209
|
o.session.authToken.value = this.isPersistenceEnabledForStorageEntry("authToken") && e ? e : A.authToken;
|
3211
3210
|
}
|
3212
3211
|
}
|
3213
|
-
const
|
3212
|
+
const Yc = ["BeaconQueue", "CustomConsentManager", "DeviceModeDestinations", "DeviceModeTransformation", "ExternalAnonymousId", "GoogleLinker", "IubendaConsentManager", "KetchConsentManager", "NativeDestinationQueue", "OneTrustConsentManager", "StorageEncryption", "StorageEncryptionLegacy", "StorageMigrator", "XhrQueue"], Kc = (t, e) => {
|
3214
3213
|
var a;
|
3215
3214
|
const n = T(e);
|
3216
|
-
return L(n.setCookieDomain) || (n.setCookieDomain = void 0), ["Strict", "Lax", "None"].includes(n.sameSiteCookie) || (n.sameSiteCookie = void 0), n.secureCookie = ue(n.secureCookie, t.secureCookie), n.sameDomainCookiesOnly = ue(n.sameDomainCookiesOnly, t.sameDomainCookiesOnly), ["none", "default", "full"].includes(n.uaChTrackLevel) || (n.uaChTrackLevel = void 0), n.integrations = ge(n.integrations), Array.isArray(n.plugins) || (n.plugins =
|
3217
|
-
},
|
3215
|
+
return L(n.setCookieDomain) || (n.setCookieDomain = void 0), ["Strict", "Lax", "None"].includes(n.sameSiteCookie) || (n.sameSiteCookie = void 0), n.secureCookie = ue(n.secureCookie, t.secureCookie), n.sameDomainCookiesOnly = ue(n.sameDomainCookiesOnly, t.sameDomainCookiesOnly), ["none", "default", "full"].includes(n.uaChTrackLevel) || (n.uaChTrackLevel = void 0), n.integrations = ge(n.integrations), Array.isArray(n.plugins) || (n.plugins = Yc), n.useGlobalIntegrationsConfigInEvents = ue(n.useGlobalIntegrationsConfigInEvents, t.useGlobalIntegrationsConfigInEvents), n.bufferDataPlaneEventsUntilReady = ue(n.bufferDataPlaneEventsUntilReady, t.bufferDataPlaneEventsUntilReady), n.sendAdblockPage = ue(n.sendAdblockPage, t.sendAdblockPage), n.useServerSideCookies = ue(n.useServerSideCookies, t.useServerSideCookies), L(n.dataServiceEndpoint) || (n.dataServiceEndpoint = void 0), n.sendAdblockPageOptions = ge(n.sendAdblockPageOptions), n.loadIntegration = ue(n.loadIntegration, t.loadIntegration), Ie(n.storage) ? (n.storage.migrate = ue(n.storage.migrate, (a = t.storage) == null ? void 0 : a.migrate), n.storage.cookie = ge(n.storage.cookie), n.storage.encryption = ge(n.storage.encryption), n.storage = Ct(n.storage)) : n.storage = void 0, n.destinationsQueueOptions = ge(n.destinationsQueueOptions), n.queueOptions = ge(n.queueOptions), n.lockIntegrationsVersion = ue(n.lockIntegrationsVersion, t.lockIntegrationsVersion), n.lockPluginsVersion = ue(n.lockPluginsVersion, t.lockPluginsVersion), Ai(n.dataPlaneEventsBufferTimeout) || (n.dataPlaneEventsBufferTimeout = void 0), n.beaconQueueOptions = ge(n.beaconQueueOptions), n.preConsent = ge(n.preConsent), n.sourceConfigurationOverride = ge(n.sourceConfigurationOverride), H(t, Ct(n));
|
3216
|
+
}, cs = "dataplaneEventsQueue", ds = "destinationsEventsQueue", Wc = "transformEvent", Qc = (t, e) => Object.keys(t).filter((n) => t[n] !== !0 || !e[n]).reduce((n, s) => {
|
3218
3217
|
const i = T(n);
|
3219
3218
|
return i[s] = t[s], i;
|
3220
|
-
}, {}),
|
3221
|
-
const n = T(t), s = e.nativeDestinations.integrationsConfig.value, i =
|
3219
|
+
}, {}), Xc = (t, e) => {
|
3220
|
+
const n = T(t), s = e.nativeDestinations.integrationsConfig.value, i = Qc(t.integrations, s);
|
3222
3221
|
return n.integrations = H(s, i), n;
|
3223
|
-
},
|
3222
|
+
}, Jc = (t) => {
|
3224
3223
|
var e;
|
3225
3224
|
return t.consents.preConsent.value.enabled && ((e = t.consents.preConsent.value.events) == null ? void 0 : e.delivery) === "buffer";
|
3226
|
-
},
|
3225
|
+
}, Dt = (t, e, n, s) => {
|
3227
3226
|
if (C(t))
|
3228
3227
|
if (S(t))
|
3229
3228
|
try {
|
3230
3229
|
t(...e);
|
3231
3230
|
} catch (i) {
|
3232
|
-
s.error(
|
3231
|
+
s.error(Pa(n), i);
|
3233
3232
|
}
|
3234
3233
|
else
|
3235
|
-
s.error(
|
3234
|
+
s.error(ei(n));
|
3236
3235
|
};
|
3237
|
-
class
|
3236
|
+
class Zc {
|
3238
3237
|
/**
|
3239
3238
|
*
|
3240
3239
|
* @param pluginsManager Plugins manager instance
|
@@ -3249,16 +3248,16 @@ class Jc {
|
|
3249
3248
|
* Initializes the event repository
|
3250
3249
|
*/
|
3251
3250
|
init() {
|
3252
|
-
this.dataplaneEventsQueue = this.pluginsManager.invokeSingle(`${
|
3251
|
+
this.dataplaneEventsQueue = this.pluginsManager.invokeSingle(`${cs}.init`, o, this.httpClient, this.storeManager, this.errorHandler, this.logger), this.dmtEventsQueue = this.pluginsManager.invokeSingle(`${Wc}.init`, o, this.pluginsManager, this.httpClient, this.storeManager, this.errorHandler, this.logger), this.destinationsEventsQueue = this.pluginsManager.invokeSingle(`${ds}.init`, o, this.pluginsManager, this.storeManager, this.dmtEventsQueue, this.errorHandler, this.logger), fe(() => {
|
3253
3252
|
var s, i;
|
3254
3253
|
o.nativeDestinations.clientDestinationsReady.value === !0 && ((s = this.destinationsEventsQueue) == null || s.start(), (i = this.dmtEventsQueue) == null || i.start());
|
3255
3254
|
});
|
3256
|
-
const e =
|
3255
|
+
const e = Jc(o);
|
3257
3256
|
let n;
|
3258
3257
|
fe(() => {
|
3259
3258
|
var r, a;
|
3260
3259
|
const s = o.loadOptions.value.bufferDataPlaneEventsUntilReady === !0 && o.nativeDestinations.clientDestinationsReady.value === !1;
|
3261
|
-
(o.nativeDestinations.activeDestinations.value.some((u) =>
|
3260
|
+
(o.nativeDestinations.activeDestinations.value.some((u) => Ql(u)) === !1 || s === !1) && !e && ((r = this.dataplaneEventsQueue) == null ? void 0 : r.scheduleTimeoutActive) !== !0 && (globalThis.clearTimeout(n), (a = this.dataplaneEventsQueue) == null || a.start());
|
3262
3261
|
}), o.loadOptions.value.bufferDataPlaneEventsUntilReady === !0 && (n = globalThis.setTimeout(() => {
|
3263
3262
|
var s, i;
|
3264
3263
|
((s = this.dataplaneEventsQueue) == null ? void 0 : s.scheduleTimeoutActive) !== !0 && ((i = this.dataplaneEventsQueue) == null || i.start());
|
@@ -3274,41 +3273,41 @@ class Jc {
|
|
3274
3273
|
* @param callback API callback function
|
3275
3274
|
*/
|
3276
3275
|
enqueue(e, n) {
|
3277
|
-
const s =
|
3278
|
-
this.pluginsManager.invokeSingle(`${
|
3276
|
+
const s = Xc(e, o);
|
3277
|
+
this.pluginsManager.invokeSingle(`${cs}.enqueue`, o, this.dataplaneEventsQueue, s, this.errorHandler, this.logger);
|
3279
3278
|
const i = T(e);
|
3280
|
-
this.pluginsManager.invokeSingle(`${
|
3281
|
-
const r = `${e.type.charAt(0).toUpperCase()}${e.type.slice(1)}${
|
3282
|
-
|
3279
|
+
this.pluginsManager.invokeSingle(`${ds}.enqueue`, o, this.destinationsEventsQueue, i, this.errorHandler, this.logger);
|
3280
|
+
const r = `${e.type.charAt(0).toUpperCase()}${e.type.slice(1)}${yn}`;
|
3281
|
+
Dt(n, [s], r, this.logger);
|
3283
3282
|
}
|
3284
3283
|
}
|
3285
|
-
const
|
3284
|
+
const fs = (t) => {
|
3286
3285
|
const e = new CustomEvent(t, { detail: { analyticsInstance: globalThis.rudderanalytics }, bubbles: !0, cancelable: !0, composed: !0 });
|
3287
3286
|
globalThis.document.dispatchEvent(e);
|
3288
|
-
},
|
3289
|
-
class
|
3287
|
+
}, ed = (t) => L(t) && t.trim().length > 0, td = (t) => Ye(t);
|
3288
|
+
class nd {
|
3290
3289
|
/**
|
3291
3290
|
* Initialize services and components or use default ones if singletons
|
3292
3291
|
*/
|
3293
3292
|
constructor() {
|
3294
|
-
this.preloadBuffer = new
|
3293
|
+
this.preloadBuffer = new Fo(), this.initialized = !1, this.errorHandler = di, this.logger = ye, this.externalSrcLoader = new qs(this.logger), this.httpClient = ui, this.httpClient.init(this.errorHandler), this.capabilitiesManager = new Dc(this.httpClient, this.errorHandler, this.logger);
|
3295
3294
|
}
|
3296
3295
|
/**
|
3297
3296
|
* Start application lifecycle if not already started
|
3298
3297
|
*/
|
3299
3298
|
load(e, n, s = {}) {
|
3300
3299
|
if (!o.lifecycle.status.value) {
|
3301
|
-
if (!
|
3302
|
-
this.logger.error(
|
3300
|
+
if (!ed(e)) {
|
3301
|
+
this.logger.error(aa(Gt, e));
|
3303
3302
|
return;
|
3304
3303
|
}
|
3305
|
-
if (!
|
3306
|
-
this.logger.error(
|
3304
|
+
if (!td(n)) {
|
3305
|
+
this.logger.error(la(Gt, n));
|
3307
3306
|
return;
|
3308
3307
|
}
|
3309
3308
|
j(() => {
|
3310
3309
|
o.lifecycle.writeKey.value = T(e), o.lifecycle.dataPlaneUrl.value = T(n), o.loadOptions.value = Kc(o.loadOptions.value, s), o.lifecycle.status.value = "mounted";
|
3311
|
-
}), this.logger.setMinLogLevel(o.loadOptions.value.logLevel ??
|
3310
|
+
}), this.logger.setMinLogLevel(o.loadOptions.value.logLevel ?? Js), ut("state", o, e), this.startLifecycle();
|
3312
3311
|
}
|
3313
3312
|
}
|
3314
3313
|
// Start lifecycle methods
|
@@ -3353,12 +3352,12 @@ class td {
|
|
3353
3352
|
}
|
3354
3353
|
} catch (e) {
|
3355
3354
|
const n = "Failed to load the SDK";
|
3356
|
-
this.errorHandler.onError({ error: e, context:
|
3355
|
+
this.errorHandler.onError({ error: e, context: Gt, customMessage: n, groupingHash: n });
|
3357
3356
|
}
|
3358
3357
|
});
|
3359
3358
|
}
|
3360
3359
|
onBrowserCapabilitiesReady() {
|
3361
|
-
|
3360
|
+
Po(this), this.prepareInternalServices(), this.loadConfig();
|
3362
3361
|
}
|
3363
3362
|
onLoaded() {
|
3364
3363
|
this.processBufferedEvents(), o.consents.preConsent.value.enabled === !0 ? o.lifecycle.status.value = "ready" : this.loadDestinations();
|
@@ -3381,11 +3380,11 @@ class td {
|
|
3381
3380
|
processDataInPreloadBuffer() {
|
3382
3381
|
for (; this.preloadBuffer.size() > 0; ) {
|
3383
3382
|
const e = this.preloadBuffer.dequeue();
|
3384
|
-
e &&
|
3383
|
+
e && No([...e], this);
|
3385
3384
|
}
|
3386
3385
|
}
|
3387
3386
|
prepareInternalServices() {
|
3388
|
-
this.pluginsManager = new
|
3387
|
+
this.pluginsManager = new ru(Kl, this.errorHandler, this.logger), this.storeManager = new Qu(this.pluginsManager, this.errorHandler, this.logger), this.configManager = new Sc(this.httpClient, this.errorHandler, this.logger), this.userSessionManager = new zc(this.pluginsManager, this.storeManager, this.httpClient, this.errorHandler, this.logger), this.eventRepository = new Zc(this.pluginsManager, this.storeManager, this.httpClient, this.errorHandler, this.logger), this.eventManager = new qc(this.eventRepository, this.userSessionManager, this.errorHandler, this.logger);
|
3389
3388
|
}
|
3390
3389
|
/**
|
3391
3390
|
* Load configuration
|
@@ -3414,9 +3413,9 @@ class td {
|
|
3414
3413
|
onInitialized() {
|
3415
3414
|
this.processDataInPreloadBuffer();
|
3416
3415
|
const e = o.loadOptions.value.onLoaded;
|
3417
|
-
|
3416
|
+
Dt(e, [globalThis.rudderanalytics], Jr, this.logger), j(() => {
|
3418
3417
|
o.lifecycle.loaded.value = !0, o.lifecycle.status.value = "loaded";
|
3419
|
-
}), this.initialized = !0,
|
3418
|
+
}), this.initialized = !0, fs("RSA_Initialised");
|
3420
3419
|
}
|
3421
3420
|
/**
|
3422
3421
|
* Emit ready event
|
@@ -3424,8 +3423,8 @@ class td {
|
|
3424
3423
|
// eslint-disable-next-line class-methods-use-this
|
3425
3424
|
onReady() {
|
3426
3425
|
o.lifecycle.status.value = "readyExecuted", o.eventBuffer.readyCallbacksArray.value.forEach((e) => {
|
3427
|
-
|
3428
|
-
}),
|
3426
|
+
Dt(e, [], Ht, this.logger);
|
3427
|
+
}), fs("RSA_Ready");
|
3429
3428
|
}
|
3430
3429
|
/**
|
3431
3430
|
* Consume preloaded events buffer
|
@@ -3476,10 +3475,10 @@ class td {
|
|
3476
3475
|
return;
|
3477
3476
|
}
|
3478
3477
|
if (this.errorHandler.leaveBreadcrumb(`New ${s} invocation`), !S(e)) {
|
3479
|
-
this.logger.error(
|
3478
|
+
this.logger.error(ei(Ht));
|
3480
3479
|
return;
|
3481
3480
|
}
|
3482
|
-
o.lifecycle.status.value === "readyExecuted" ?
|
3481
|
+
o.lifecycle.status.value === "readyExecuted" ? Dt(e, [], Ht, this.logger) : o.eventBuffer.readyCallbacksArray.value = [...o.eventBuffer.readyCallbacksArray.value, e];
|
3483
3482
|
}
|
3484
3483
|
page(e, n = !1) {
|
3485
3484
|
var i;
|
@@ -3488,10 +3487,10 @@ class td {
|
|
3488
3487
|
o.eventBuffer.toBeProcessedArray.value = [...o.eventBuffer.toBeProcessedArray.value, [s, e]];
|
3489
3488
|
return;
|
3490
3489
|
}
|
3491
|
-
this.errorHandler.leaveBreadcrumb(`New ${s} event`), o.metrics.triggered.value += 1, (i = this.eventManager) == null || i.addEvent({ type: "page", category: e.category, name: e.name, properties: e.properties, options: e.options, callback: e.callback }), o.capabilities.isAdBlocked.value === !0 && e.category !==
|
3490
|
+
this.errorHandler.leaveBreadcrumb(`New ${s} event`), o.metrics.triggered.value += 1, (i = this.eventManager) == null || i.addEvent({ type: "page", category: e.category, name: e.name, properties: e.properties, options: e.options, callback: e.callback }), o.capabilities.isAdBlocked.value === !0 && e.category !== wn && this.page(Pt(wn, yo, {
|
3492
3491
|
// 'title' is intentionally omitted as it does not make sense
|
3493
3492
|
// in v3 implementation
|
3494
|
-
path:
|
3493
|
+
path: bo
|
3495
3494
|
}, o.loadOptions.value.sendAdblockPageOptions));
|
3496
3495
|
}
|
3497
3496
|
track(e, n = !1) {
|
@@ -3601,18 +3600,18 @@ class td {
|
|
3601
3600
|
return;
|
3602
3601
|
}
|
3603
3602
|
this.errorHandler.leaveBreadcrumb("New consent invocation"), j(() => {
|
3604
|
-
o.consents.preConsent.value = { ...o.consents.preConsent.value, enabled: !1 }, o.consents.postConsent.value =
|
3605
|
-
const { initialized: l, consentsData: c } =
|
3603
|
+
o.consents.preConsent.value = { ...o.consents.preConsent.value, enabled: !1 }, o.consents.postConsent.value = lc(e);
|
3604
|
+
const { initialized: l, consentsData: c } = ki(o.consents.postConsent.value.consentManagement, this.logger);
|
3606
3605
|
o.consents.initialized.value = l, o.consents.data.value = c;
|
3607
3606
|
}), o.consents.enabled.value && !o.consents.initialized.value && ((i = this.pluginsManager) == null || i.invokeSingle("consentManager.updateConsentsInfo", o, this.storeManager, this.logger)), (r = this.storeManager) == null || r.initializeStorageState(), (a = this.userSessionManager) == null || a.syncStorageDataToState(), (u = this.eventManager) == null || u.resume(), this.loadDestinations(), this.sendTrackingEvents(n);
|
3608
3607
|
}
|
3609
3608
|
sendTrackingEvents(e) {
|
3610
3609
|
if (o.consents.postConsent.value.trackConsent) {
|
3611
|
-
const n =
|
3610
|
+
const n = vn(Eo);
|
3612
3611
|
e ? o.eventBuffer.toBeProcessedArray.value = [...o.eventBuffer.toBeProcessedArray.value, ["track", n]] : this.track(n);
|
3613
3612
|
}
|
3614
3613
|
if (o.consents.postConsent.value.sendPageEvent) {
|
3615
|
-
const n =
|
3614
|
+
const n = Pt();
|
3616
3615
|
e ? o.eventBuffer.toBeProcessedArray.value = [...o.eventBuffer.toBeProcessedArray.value, ["page", n]] : this.page(n);
|
3617
3616
|
}
|
3618
3617
|
}
|
@@ -3632,13 +3631,13 @@ const _e = class _e {
|
|
3632
3631
|
try {
|
3633
3632
|
if (_e.globalSingleton)
|
3634
3633
|
return _e.globalSingleton;
|
3635
|
-
_e.initializeGlobalResources(), this.setDefaultInstanceKey = this.setDefaultInstanceKey.bind(this), this.getAnalyticsInstance = this.getAnalyticsInstance.bind(this), this.load = this.load.bind(this), this.ready = this.ready.bind(this), this.triggerBufferedLoadEvent = this.triggerBufferedLoadEvent.bind(this), this.page = this.page.bind(this), this.track = this.track.bind(this), this.identify = this.identify.bind(this), this.alias = this.alias.bind(this), this.group = this.group.bind(this), this.reset = this.reset.bind(this), this.getAnonymousId = this.getAnonymousId.bind(this), this.setAnonymousId = this.setAnonymousId.bind(this), this.getUserId = this.getUserId.bind(this), this.getUserTraits = this.getUserTraits.bind(this), this.getGroupId = this.getGroupId.bind(this), this.getGroupTraits = this.getGroupTraits.bind(this), this.startSession = this.startSession.bind(this), this.endSession = this.endSession.bind(this), this.getSessionId = this.getSessionId.bind(this), this.setAuthToken = this.setAuthToken.bind(this), this.consent = this.consent.bind(this), _e.globalSingleton = this, o.autoTrack.pageLifecycle.pageViewId.value =
|
3634
|
+
_e.initializeGlobalResources(), this.setDefaultInstanceKey = this.setDefaultInstanceKey.bind(this), this.getAnalyticsInstance = this.getAnalyticsInstance.bind(this), this.load = this.load.bind(this), this.ready = this.ready.bind(this), this.triggerBufferedLoadEvent = this.triggerBufferedLoadEvent.bind(this), this.page = this.page.bind(this), this.track = this.track.bind(this), this.identify = this.identify.bind(this), this.alias = this.alias.bind(this), this.group = this.group.bind(this), this.reset = this.reset.bind(this), this.getAnonymousId = this.getAnonymousId.bind(this), this.setAnonymousId = this.setAnonymousId.bind(this), this.getUserId = this.getUserId.bind(this), this.getUserTraits = this.getUserTraits.bind(this), this.getGroupId = this.getGroupId.bind(this), this.getGroupTraits = this.getGroupTraits.bind(this), this.startSession = this.startSession.bind(this), this.endSession = this.endSession.bind(this), this.getSessionId = this.getSessionId.bind(this), this.setAuthToken = this.setAuthToken.bind(this), this.consent = this.consent.bind(this), _e.globalSingleton = this, o.autoTrack.pageLifecycle.pageViewId.value = $t(), o.autoTrack.pageLifecycle.pageLoadedTimestamp.value = Date.now(), this.triggerBufferedLoadEvent(), globalThis.rudderanalytics = this;
|
3636
3635
|
} catch (e) {
|
3637
3636
|
B(e);
|
3638
3637
|
}
|
3639
3638
|
}
|
3640
3639
|
static initializeGlobalResources() {
|
3641
|
-
|
3640
|
+
di.init(), An.configure(), In.configure(), Tn.configure(), Lt.configure();
|
3642
3641
|
}
|
3643
3642
|
/**
|
3644
3643
|
* Set instance to use if no specific writeKey is provided in methods
|
@@ -3654,7 +3653,7 @@ const _e = class _e {
|
|
3654
3653
|
getAnalyticsInstance(e) {
|
3655
3654
|
try {
|
3656
3655
|
let n = e;
|
3657
|
-
return (!L(n) || !n) && (n = this.defaultAnalyticsKey), !!this.analyticsInstances[n] || (this.analyticsInstances[n] = new
|
3656
|
+
return (!L(n) || !n) && (n = this.defaultAnalyticsKey), !!this.analyticsInstances[n] || (this.analyticsInstances[n] = new nd()), this.analyticsInstances[n];
|
3658
3657
|
} catch (n) {
|
3659
3658
|
B(n);
|
3660
3659
|
return;
|
@@ -3673,8 +3672,8 @@ const _e = class _e {
|
|
3673
3672
|
if (this.analyticsInstances[e])
|
3674
3673
|
return;
|
3675
3674
|
this.setDefaultInstanceKey(e), this.trackPageLifecycleEvents(s);
|
3676
|
-
const r =
|
3677
|
-
|
3675
|
+
const r = js(rt);
|
3676
|
+
_o(r), ut(rt, T(r)), (i = this.getAnalyticsInstance(e)) == null || i.load(e, n, O(s));
|
3678
3677
|
} catch (r) {
|
3679
3678
|
B(r);
|
3680
3679
|
}
|
@@ -3685,7 +3684,7 @@ const _e = class _e {
|
|
3685
3684
|
* @returns
|
3686
3685
|
*/
|
3687
3686
|
trackPageLifecycleEvents(e) {
|
3688
|
-
const { autoTrack: n, useBeacon: s } = e ?? {}, { enabled: i = !1, options: r = {}, pageLifecycle: a } = n ?? {}, { events: u = [
|
3687
|
+
const { autoTrack: n, useBeacon: s } = e ?? {}, { enabled: i = !1, options: r = {}, pageLifecycle: a } = n ?? {}, { events: u = [xt.UNLOADED], enabled: l = i, options: c = r } = a ?? {};
|
3689
3688
|
o.autoTrack.pageLifecycle.enabled.value = l, o.autoTrack.enabled.value = i || l, l && this.setupPageUnloadTracking(u, s, c);
|
3690
3689
|
}
|
3691
3690
|
/**
|
@@ -3695,20 +3694,20 @@ const _e = class _e {
|
|
3695
3694
|
* @param options
|
3696
3695
|
*/
|
3697
3696
|
setupPageUnloadTracking(e, n, s) {
|
3698
|
-
(e.length === 0 || e.includes(
|
3697
|
+
(e.length === 0 || e.includes(xt.UNLOADED)) && (n === !0 ? ro((i) => {
|
3699
3698
|
if (i === !1 && o.lifecycle.loaded.value) {
|
3700
3699
|
const r = Date.now(), a = r - o.autoTrack.pageLifecycle.pageLoadedTimestamp.value;
|
3701
|
-
this.track(
|
3700
|
+
this.track(xt.UNLOADED, { timeOnPage: a }, { ...s, originalTimestamp: Vs(new Date(r)) });
|
3702
3701
|
}
|
3703
|
-
}) : this.logger.warn(
|
3702
|
+
}) : this.logger.warn(Va(eo)));
|
3704
3703
|
}
|
3705
3704
|
/**
|
3706
3705
|
* Trigger load event in buffer queue if exists and stores the
|
3707
3706
|
* remaining preloaded events array in global object
|
3708
3707
|
*/
|
3709
3708
|
triggerBufferedLoadEvent() {
|
3710
|
-
const e = Array.isArray(globalThis.rudderanalytics) ? globalThis.rudderanalytics : [], n =
|
3711
|
-
|
3709
|
+
const e = Array.isArray(globalThis.rudderanalytics) ? globalThis.rudderanalytics : [], n = Co(e);
|
3710
|
+
ut(rt, T([...e])), n.length > 0 && (n.shift(), this.load.apply(null, n));
|
3712
3711
|
}
|
3713
3712
|
/**
|
3714
3713
|
* Get ready callback arguments and forward to ready call
|
@@ -3728,7 +3727,7 @@ const _e = class _e {
|
|
3728
3727
|
page(e, n, s, i, r) {
|
3729
3728
|
var a;
|
3730
3729
|
try {
|
3731
|
-
(a = this.getAnalyticsInstance()) == null || a.page(
|
3730
|
+
(a = this.getAnalyticsInstance()) == null || a.page(Pt(O(e), O(n), O(s), O(i), O(r)));
|
3732
3731
|
} catch (u) {
|
3733
3732
|
B(u);
|
3734
3733
|
}
|
@@ -3740,7 +3739,7 @@ const _e = class _e {
|
|
3740
3739
|
track(e, n, s, i) {
|
3741
3740
|
var r;
|
3742
3741
|
try {
|
3743
|
-
(r = this.getAnalyticsInstance()) == null || r.track(
|
3742
|
+
(r = this.getAnalyticsInstance()) == null || r.track(vn(O(e), O(n), O(s), O(i)));
|
3744
3743
|
} catch (a) {
|
3745
3744
|
B(a);
|
3746
3745
|
}
|
@@ -3752,7 +3751,7 @@ const _e = class _e {
|
|
3752
3751
|
identify(e, n, s, i) {
|
3753
3752
|
var r;
|
3754
3753
|
try {
|
3755
|
-
(r = this.getAnalyticsInstance()) == null || r.identify(
|
3754
|
+
(r = this.getAnalyticsInstance()) == null || r.identify(Ms(O(e), O(n), O(s), O(i)));
|
3756
3755
|
} catch (a) {
|
3757
3756
|
B(a);
|
3758
3757
|
}
|
@@ -3764,7 +3763,7 @@ const _e = class _e {
|
|
3764
3763
|
alias(e, n, s, i) {
|
3765
3764
|
var r;
|
3766
3765
|
try {
|
3767
|
-
(r = this.getAnalyticsInstance()) == null || r.alias(
|
3766
|
+
(r = this.getAnalyticsInstance()) == null || r.alias($s(O(e), O(n), O(s), O(i)));
|
3768
3767
|
} catch (a) {
|
3769
3768
|
B(a);
|
3770
3769
|
}
|
@@ -3776,7 +3775,7 @@ const _e = class _e {
|
|
3776
3775
|
group(e, n, s, i) {
|
3777
3776
|
var r;
|
3778
3777
|
try {
|
3779
|
-
(r = this.getAnalyticsInstance()) == null || r.group(
|
3778
|
+
(r = this.getAnalyticsInstance()) == null || r.group(Us(O(e), O(n), O(s), O(i)));
|
3780
3779
|
} catch (a) {
|
3781
3780
|
B(a);
|
3782
3781
|
}
|
@@ -3887,20 +3886,14 @@ const _e = class _e {
|
|
3887
3886
|
// START-NO-SONAR-SCAN
|
3888
3887
|
// eslint-disable-next-line sonarjs/public-static-readonly
|
3889
3888
|
N(_e, "globalSingleton", null);
|
3890
|
-
let
|
3891
|
-
const
|
3892
|
-
[Ze.Production]: "2R6mT9xSJCcbvr6JkiEu7vbrUSW",
|
3893
|
-
[Ze.Sandbox]: "2R6mEpjiTJBErRIn724pt2MWyLA",
|
3894
|
-
[Ze.Staging]: "2R6llJi7YSuOeJToPXGlQfizt18",
|
3895
|
-
[Ze.CiCd]: "2QHmFAx84bL4Up6CDHRw0XkKJKC",
|
3896
|
-
[Ze.Local]: "2QHmFAx84bL4Up6CDHRw0XkKJKC"
|
3897
|
-
}, sd = "https://revolugohxxwg.dataplane.rudderstack.com", id = window.RevolugoElements.config.apiEnvironment, rd = nd[id], Ci = new fn();
|
3889
|
+
let dn = _e;
|
3890
|
+
const Di = new dn();
|
3898
3891
|
try {
|
3899
|
-
|
3892
|
+
Di.load(xi, Hi);
|
3900
3893
|
} catch (t) {
|
3901
3894
|
console.error(t);
|
3902
3895
|
}
|
3903
|
-
const
|
3896
|
+
const Ci = {
|
3904
3897
|
adultCount: {
|
3905
3898
|
type: Number
|
3906
3899
|
},
|
@@ -3916,9 +3909,9 @@ const _i = {
|
|
3916
3909
|
startDate: {
|
3917
3910
|
type: String
|
3918
3911
|
}
|
3919
|
-
},
|
3912
|
+
}, _i = fn({
|
3920
3913
|
components: {
|
3921
|
-
BPhoneInput:
|
3914
|
+
BPhoneInput: fr,
|
3922
3915
|
BSearchLocationInput: ar
|
3923
3916
|
},
|
3924
3917
|
data() {
|
@@ -3927,7 +3920,7 @@ const _i = {
|
|
3927
3920
|
formData: {
|
3928
3921
|
adultCount: this.adultCount,
|
3929
3922
|
email: "",
|
3930
|
-
endDate:
|
3923
|
+
endDate: Ft(this.endDate).toDate(),
|
3931
3924
|
location: this.location,
|
3932
3925
|
phoneData: {
|
3933
3926
|
phoneCountry: "FR",
|
@@ -3936,7 +3929,7 @@ const _i = {
|
|
3936
3929
|
},
|
3937
3930
|
roomCount: this.roomCount,
|
3938
3931
|
specificRequest: "",
|
3939
|
-
startDate:
|
3932
|
+
startDate: Ft(this.startDate).toDate()
|
3940
3933
|
},
|
3941
3934
|
isFormValid: !1,
|
3942
3935
|
isSubmitting: !1,
|
@@ -3961,13 +3954,13 @@ const _i = {
|
|
3961
3954
|
},
|
3962
3955
|
methods: {
|
3963
3956
|
formatDate(t) {
|
3964
|
-
return
|
3957
|
+
return Ft(t).format("YYYY-MM-DD");
|
3965
3958
|
},
|
3966
3959
|
onSubmit() {
|
3967
3960
|
var e, n;
|
3968
3961
|
this.isSubmitting = !0;
|
3969
3962
|
let t = ((e = this.config.eventMetadata) == null ? void 0 : e.name) || "";
|
3970
|
-
(n = this.config.eventMetadata) != null && n.slug && (t += ` ${this.config.eventMetadata.slug}`),
|
3963
|
+
(n = this.config.eventMetadata) != null && n.slug && (t += ` ${this.config.eventMetadata.slug}`), Di.track(
|
3971
3964
|
"accommodation-request",
|
3972
3965
|
{
|
3973
3966
|
data: {
|
@@ -3984,15 +3977,15 @@ const _i = {
|
|
3984
3977
|
}
|
3985
3978
|
},
|
3986
3979
|
name: "ContactForm",
|
3987
|
-
props:
|
3980
|
+
props: Ci,
|
3988
3981
|
setup() {
|
3989
|
-
const { t } =
|
3982
|
+
const { t } = hn();
|
3990
3983
|
return {
|
3991
3984
|
t
|
3992
3985
|
};
|
3993
3986
|
}
|
3994
3987
|
});
|
3995
|
-
function
|
3988
|
+
function hs(t) {
|
3996
3989
|
const e = t;
|
3997
3990
|
e.__i18n = e.__i18n || [], e.__i18n.push({
|
3998
3991
|
locale: "",
|
@@ -4161,7 +4154,7 @@ function gs(t) {
|
|
4161
4154
|
}
|
4162
4155
|
});
|
4163
4156
|
}
|
4164
|
-
const
|
4157
|
+
const Pi = Te({
|
4165
4158
|
active: {
|
4166
4159
|
type: [String, Array],
|
4167
4160
|
default: void 0
|
@@ -4171,15 +4164,15 @@ const Ni = Te({
|
|
4171
4164
|
default: null
|
4172
4165
|
},
|
4173
4166
|
nextIcon: {
|
4174
|
-
type:
|
4167
|
+
type: pt,
|
4175
4168
|
default: "$next"
|
4176
4169
|
},
|
4177
4170
|
prevIcon: {
|
4178
|
-
type:
|
4171
|
+
type: pt,
|
4179
4172
|
default: "$prev"
|
4180
4173
|
},
|
4181
4174
|
modeIcon: {
|
4182
|
-
type:
|
4175
|
+
type: pt,
|
4183
4176
|
default: "$subgroup"
|
4184
4177
|
},
|
4185
4178
|
text: String,
|
@@ -4187,9 +4180,9 @@ const Ni = Te({
|
|
4187
4180
|
type: String,
|
4188
4181
|
default: "month"
|
4189
4182
|
}
|
4190
|
-
}, "VDatePickerControls"),
|
4183
|
+
}, "VDatePickerControls"), gs = Me()({
|
4191
4184
|
name: "VDatePickerControls",
|
4192
|
-
props:
|
4185
|
+
props: Pi(),
|
4193
4186
|
emits: {
|
4194
4187
|
"click:year": () => !0,
|
4195
4188
|
"click:month": () => !0,
|
@@ -4214,7 +4207,7 @@ const Ni = Te({
|
|
4214
4207
|
function d() {
|
4215
4208
|
n("click:month");
|
4216
4209
|
}
|
4217
|
-
return
|
4210
|
+
return Ke(() => b("div", {
|
4218
4211
|
class: ["v-date-picker-controls"]
|
4219
4212
|
}, [b(ae, {
|
4220
4213
|
class: "v-date-picker-controls__month-btn",
|
@@ -4232,7 +4225,7 @@ const Ni = Te({
|
|
4232
4225
|
icon: t.modeIcon,
|
4233
4226
|
variant: "text",
|
4234
4227
|
onClick: c
|
4235
|
-
}, null), b(
|
4228
|
+
}, null), b(mr, null, null), b("div", {
|
4236
4229
|
class: "v-date-picker-controls__month"
|
4237
4230
|
}, [b(ae, {
|
4238
4231
|
"data-testid": "prev-month",
|
@@ -4248,15 +4241,15 @@ const Ni = Te({
|
|
4248
4241
|
onClick: l
|
4249
4242
|
}, null)])])), {};
|
4250
4243
|
}
|
4251
|
-
}),
|
4252
|
-
appendIcon:
|
4244
|
+
}), sd = Te({
|
4245
|
+
appendIcon: pt,
|
4253
4246
|
color: String,
|
4254
4247
|
header: String,
|
4255
4248
|
transition: String,
|
4256
|
-
onClick:
|
4257
|
-
}, "VDatePickerHeader"),
|
4249
|
+
onClick: Gi()
|
4250
|
+
}, "VDatePickerHeader"), ms = Me()({
|
4258
4251
|
name: "VDatePickerHeader",
|
4259
|
-
props:
|
4252
|
+
props: sd(),
|
4260
4253
|
emits: {
|
4261
4254
|
click: () => !0,
|
4262
4255
|
"click:append": () => !0
|
@@ -4269,14 +4262,14 @@ const Ni = Te({
|
|
4269
4262
|
const {
|
4270
4263
|
backgroundColorClasses: i,
|
4271
4264
|
backgroundColorStyles: r
|
4272
|
-
} =
|
4265
|
+
} = _s(t, "color");
|
4273
4266
|
function a() {
|
4274
4267
|
n("click");
|
4275
4268
|
}
|
4276
4269
|
function u() {
|
4277
4270
|
n("click:append");
|
4278
4271
|
}
|
4279
|
-
return
|
4272
|
+
return Ke(() => {
|
4280
4273
|
const l = !!(s.default || t.header), c = !!(s.append || t.appendIcon);
|
4281
4274
|
return b("div", {
|
4282
4275
|
class: ["v-date-picker-header", {
|
@@ -4287,7 +4280,7 @@ const Ni = Te({
|
|
4287
4280
|
}, [s.prepend && b("div", {
|
4288
4281
|
key: "prepend",
|
4289
4282
|
class: "v-date-picker-header__prepend"
|
4290
|
-
}, [s.prepend()]), l && b(
|
4283
|
+
}, [s.prepend()]), l && b(Ps, {
|
4291
4284
|
key: "content",
|
4292
4285
|
name: t.transition
|
4293
4286
|
}, {
|
@@ -4300,7 +4293,7 @@ const Ni = Te({
|
|
4300
4293
|
}
|
4301
4294
|
}), c && b("div", {
|
4302
4295
|
class: "v-date-picker-header__append"
|
4303
|
-
}, [s.append ? b(
|
4296
|
+
}, [s.append ? b(Mt, {
|
4304
4297
|
key: "append-defaults",
|
4305
4298
|
disabled: !t.appendIcon,
|
4306
4299
|
defaults: {
|
@@ -4322,7 +4315,7 @@ const Ni = Te({
|
|
4322
4315
|
}, null)])]);
|
4323
4316
|
}), {};
|
4324
4317
|
}
|
4325
|
-
}),
|
4318
|
+
}), id = Te({
|
4326
4319
|
allowedDates: [Array, Function],
|
4327
4320
|
disabled: {
|
4328
4321
|
type: Boolean,
|
@@ -4345,8 +4338,8 @@ const Ni = Te({
|
|
4345
4338
|
},
|
4346
4339
|
firstDayOfWeek: [Number, String]
|
4347
4340
|
}, "calendar");
|
4348
|
-
function
|
4349
|
-
const e =
|
4341
|
+
function rd(t) {
|
4342
|
+
const e = dt(), n = Le(t, "modelValue", [], (f) => vt(f)), s = U(() => t.displayValue ? e.date(t.displayValue) : n.value.length > 0 ? e.date(n.value[0]) : t.min ? e.date(t.min) : Array.isArray(t.allowedDates) ? e.date(t.allowedDates[0]) : e.date()), i = Le(t, "year", void 0, (f) => {
|
4350
4343
|
const m = f != null ? Number(f) : e.getYear(s.value);
|
4351
4344
|
return e.startOfYear(e.setYear(e.date(), m));
|
4352
4345
|
}, (f) => e.getYear(f)), r = Le(t, "month", void 0, (f) => {
|
@@ -4397,7 +4390,7 @@ function ld(t) {
|
|
4397
4390
|
}), h = U(() => {
|
4398
4391
|
const f = l.value.flat(), m = e.date();
|
4399
4392
|
return c(f, m);
|
4400
|
-
}), y = U(() => l.value.map((f) => f.length ?
|
4393
|
+
}), y = U(() => l.value.map((f) => f.length ? ji(e, f[0]) : null));
|
4401
4394
|
function g(f) {
|
4402
4395
|
if (t.disabled) return !0;
|
4403
4396
|
const m = e.date(f);
|
@@ -4414,7 +4407,7 @@ function ld(t) {
|
|
4414
4407
|
weekNumbers: y
|
4415
4408
|
};
|
4416
4409
|
}
|
4417
|
-
const
|
4410
|
+
const Ni = Te({
|
4418
4411
|
color: String,
|
4419
4412
|
hideWeekdays: Boolean,
|
4420
4413
|
multiple: [Boolean, Number, String],
|
@@ -4427,10 +4420,10 @@ const Li = Te({
|
|
4427
4420
|
type: String,
|
4428
4421
|
default: "picker-reverse-transition"
|
4429
4422
|
},
|
4430
|
-
...
|
4431
|
-
}, "VDatePickerMonth"),
|
4423
|
+
...at(id(), ["displayValue"])
|
4424
|
+
}, "VDatePickerMonth"), ps = Me()({
|
4432
4425
|
name: "VDatePickerMonth",
|
4433
|
-
props:
|
4426
|
+
props: Ni(),
|
4434
4427
|
emits: {
|
4435
4428
|
"update:modelValue": (t) => !0,
|
4436
4429
|
"update:month": (t) => !0,
|
@@ -4441,17 +4434,17 @@ const Li = Te({
|
|
4441
4434
|
emit: n,
|
4442
4435
|
slots: s
|
4443
4436
|
} = e;
|
4444
|
-
const i =
|
4437
|
+
const i = Xt(), {
|
4445
4438
|
daysInMonth: r,
|
4446
4439
|
model: a,
|
4447
4440
|
weekNumbers: u
|
4448
|
-
} =
|
4441
|
+
} = rd(t), l = dt(), c = yt(), d = yt(), h = yt(!1), y = U(() => h.value ? t.reverseTransition : t.transition);
|
4449
4442
|
t.multiple === "range" && a.value.length > 0 && (c.value = a.value[0], a.value.length > 1 && (d.value = a.value[a.value.length - 1]));
|
4450
4443
|
const g = U(() => {
|
4451
4444
|
const k = ["number", "string"].includes(typeof t.multiple) ? Number(t.multiple) : 1 / 0;
|
4452
4445
|
return a.value.length >= k;
|
4453
4446
|
});
|
4454
|
-
|
4447
|
+
Rs(r, (k, E) => {
|
4455
4448
|
E && (h.value = l.isBefore(k[0].date, E[0].date));
|
4456
4449
|
});
|
4457
4450
|
function f(k) {
|
@@ -4495,7 +4488,7 @@ const Li = Te({
|
|
4495
4488
|
class: "v-date-picker-month__day"
|
4496
4489
|
}, [je(" ")]), u.value.map((k) => b("div", {
|
4497
4490
|
class: ["v-date-picker-month__day", "v-date-picker-month__day--adjacent"]
|
4498
|
-
}, [k]))]), b(
|
4491
|
+
}, [k]))]), b(Ps, {
|
4499
4492
|
name: y.value
|
4500
4493
|
}, {
|
4501
4494
|
default: () => {
|
@@ -4523,7 +4516,7 @@ const Li = Te({
|
|
4523
4516
|
"v-date-picker-month__day--week-start": E.isWeekStart
|
4524
4517
|
}],
|
4525
4518
|
"data-v-date": E.isDisabled ? void 0 : E.isoDate
|
4526
|
-
}, [(t.showAdjacentMonths || !E.isAdjacent) && b(
|
4519
|
+
}, [(t.showAdjacentMonths || !E.isAdjacent) && b(Mt, {
|
4527
4520
|
defaults: {
|
4528
4521
|
VBtn: {
|
4529
4522
|
class: "v-date-picker-month__day-btn",
|
@@ -4546,16 +4539,16 @@ const Li = Te({
|
|
4546
4539
|
}
|
4547
4540
|
})]);
|
4548
4541
|
}
|
4549
|
-
}),
|
4542
|
+
}), Li = Te({
|
4550
4543
|
color: String,
|
4551
4544
|
height: [String, Number],
|
4552
4545
|
min: null,
|
4553
4546
|
max: null,
|
4554
4547
|
modelValue: Number,
|
4555
4548
|
year: Number
|
4556
|
-
}, "VDatePickerMonths"),
|
4549
|
+
}, "VDatePickerMonths"), vs = Me()({
|
4557
4550
|
name: "VDatePickerMonths",
|
4558
|
-
props:
|
4551
|
+
props: Li(),
|
4559
4552
|
emits: {
|
4560
4553
|
"update:modelValue": (t) => !0
|
4561
4554
|
},
|
@@ -4564,9 +4557,9 @@ const Li = Te({
|
|
4564
4557
|
emit: n,
|
4565
4558
|
slots: s
|
4566
4559
|
} = e;
|
4567
|
-
const i =
|
4560
|
+
const i = dt(), r = Le(t, "modelValue"), a = U(() => {
|
4568
4561
|
let u = i.startOfYear(i.date());
|
4569
|
-
return t.year && (u = i.setYear(u, t.year)),
|
4562
|
+
return t.year && (u = i.setYear(u, t.year)), Is(12).map((l) => {
|
4570
4563
|
const c = i.format(u, "monthShort"), d = !!(t.min && i.isAfter(i.startOfMonth(i.date(t.min)), u) || t.max && i.isAfter(u, i.startOfMonth(i.date(t.max))));
|
4571
4564
|
return u = i.getNextMonth(u), {
|
4572
4565
|
isDisabled: d,
|
@@ -4575,12 +4568,12 @@ const Li = Te({
|
|
4575
4568
|
};
|
4576
4569
|
});
|
4577
4570
|
});
|
4578
|
-
return
|
4571
|
+
return Ts(() => {
|
4579
4572
|
r.value = r.value ?? i.getMonth(i.date());
|
4580
|
-
}),
|
4573
|
+
}), Ke(() => b("div", {
|
4581
4574
|
class: "v-date-picker-months",
|
4582
4575
|
style: {
|
4583
|
-
height:
|
4576
|
+
height: As(t.height)
|
4584
4577
|
}
|
4585
4578
|
}, [b("div", {
|
4586
4579
|
class: "v-date-picker-months__content"
|
@@ -4611,15 +4604,15 @@ const Li = Te({
|
|
4611
4604
|
}, c), null);
|
4612
4605
|
})])])), {};
|
4613
4606
|
}
|
4614
|
-
}),
|
4607
|
+
}), wi = Te({
|
4615
4608
|
color: String,
|
4616
4609
|
height: [String, Number],
|
4617
4610
|
min: null,
|
4618
4611
|
max: null,
|
4619
4612
|
modelValue: Number
|
4620
|
-
}, "VDatePickerYears"),
|
4613
|
+
}, "VDatePickerYears"), ys = Me()({
|
4621
4614
|
name: "VDatePickerYears",
|
4622
|
-
props:
|
4615
|
+
props: wi(),
|
4623
4616
|
emits: {
|
4624
4617
|
"update:modelValue": (t) => !0
|
4625
4618
|
},
|
@@ -4628,12 +4621,12 @@ const Li = Te({
|
|
4628
4621
|
emit: n,
|
4629
4622
|
slots: s
|
4630
4623
|
} = e;
|
4631
|
-
const i =
|
4624
|
+
const i = dt(), r = Le(t, "modelValue"), a = U(() => {
|
4632
4625
|
const l = i.getYear(i.date());
|
4633
4626
|
let c = l - 100, d = l + 52;
|
4634
4627
|
t.min && (c = i.getYear(i.date(t.min))), t.max && (d = i.getYear(i.date(t.max)));
|
4635
4628
|
let h = i.startOfYear(i.date());
|
4636
|
-
return h = i.setYear(h, c),
|
4629
|
+
return h = i.setYear(h, c), Is(d - c + 1, c).map((y) => {
|
4637
4630
|
const g = i.format(h, "year");
|
4638
4631
|
return h = i.setYear(h, i.getYear(h) + 1), {
|
4639
4632
|
text: g,
|
@@ -4641,19 +4634,19 @@ const Li = Te({
|
|
4641
4634
|
};
|
4642
4635
|
});
|
4643
4636
|
});
|
4644
|
-
|
4637
|
+
Ts(() => {
|
4645
4638
|
r.value = r.value ?? i.getYear(i.date());
|
4646
4639
|
});
|
4647
|
-
const u =
|
4648
|
-
return
|
4640
|
+
const u = qi();
|
4641
|
+
return zi(async () => {
|
4649
4642
|
var l;
|
4650
|
-
await
|
4643
|
+
await Yi(), (l = u.el) == null || l.scrollIntoView({
|
4651
4644
|
block: "center"
|
4652
4645
|
});
|
4653
|
-
}),
|
4646
|
+
}), Ke(() => b("div", {
|
4654
4647
|
class: "v-date-picker-years",
|
4655
4648
|
style: {
|
4656
|
-
height:
|
4649
|
+
height: As(t.height)
|
4657
4650
|
}
|
4658
4651
|
}, [b("div", {
|
4659
4652
|
class: "v-date-picker-years__content"
|
@@ -4683,15 +4676,15 @@ const Li = Te({
|
|
4683
4676
|
}, d), null);
|
4684
4677
|
})])])), {};
|
4685
4678
|
}
|
4686
|
-
}),
|
4679
|
+
}), od = pr("v-picker-title"), Mi = Te({
|
4687
4680
|
bgColor: String,
|
4688
4681
|
landscape: Boolean,
|
4689
4682
|
title: String,
|
4690
4683
|
hideHeader: Boolean,
|
4691
|
-
...
|
4692
|
-
}, "VPicker"),
|
4684
|
+
...br()
|
4685
|
+
}, "VPicker"), bs = Me()({
|
4693
4686
|
name: "VPicker",
|
4694
|
-
props:
|
4687
|
+
props: Mi(),
|
4695
4688
|
setup(t, e) {
|
4696
4689
|
let {
|
4697
4690
|
slots: n
|
@@ -4699,10 +4692,10 @@ const Li = Te({
|
|
4699
4692
|
const {
|
4700
4693
|
backgroundColorClasses: s,
|
4701
4694
|
backgroundColorStyles: i
|
4702
|
-
} =
|
4703
|
-
return
|
4704
|
-
const r =
|
4705
|
-
return b(
|
4695
|
+
} = _s(Ki(t, "color"));
|
4696
|
+
return Ke(() => {
|
4697
|
+
const r = Dn.filterProps(t), a = !!(t.title || n.title);
|
4698
|
+
return b(Dn, re(r, {
|
4706
4699
|
color: t.bgColor,
|
4707
4700
|
class: ["v-picker", {
|
4708
4701
|
"v-picker--landscape": t.landscape,
|
@@ -4716,7 +4709,7 @@ const Li = Te({
|
|
4716
4709
|
key: "header",
|
4717
4710
|
class: [s.value],
|
4718
4711
|
style: [i.value]
|
4719
|
-
}, [a && b(
|
4712
|
+
}, [a && b(od, {
|
4720
4713
|
key: "picker-title"
|
4721
4714
|
}, {
|
4722
4715
|
default: () => {
|
@@ -4727,7 +4720,7 @@ const Li = Te({
|
|
4727
4720
|
class: "v-picker__header"
|
4728
4721
|
}, [n.header()])]), b("div", {
|
4729
4722
|
class: "v-picker__body"
|
4730
|
-
}, [(u = n.default) == null ? void 0 : u.call(n)]), n.actions && b(
|
4723
|
+
}, [(u = n.default) == null ? void 0 : u.call(n)]), n.actions && b(Mt, {
|
4731
4724
|
defaults: {
|
4732
4725
|
VBtn: {
|
4733
4726
|
slim: !0,
|
@@ -4743,7 +4736,7 @@ const Li = Te({
|
|
4743
4736
|
});
|
4744
4737
|
}), {};
|
4745
4738
|
}
|
4746
|
-
}),
|
4739
|
+
}), ad = Te({
|
4747
4740
|
// TODO: implement in v3.5
|
4748
4741
|
// calendarIcon: {
|
4749
4742
|
// type: String,
|
@@ -4769,19 +4762,19 @@ const Li = Te({
|
|
4769
4762
|
type: String,
|
4770
4763
|
default: "$vuetify.datePicker.header"
|
4771
4764
|
},
|
4772
|
-
...
|
4773
|
-
...
|
4765
|
+
...Pi(),
|
4766
|
+
...Ni({
|
4774
4767
|
weeksInMonth: "static"
|
4775
4768
|
}),
|
4776
|
-
...
|
4777
|
-
...
|
4778
|
-
|
4769
|
+
...at(Li(), ["modelValue"]),
|
4770
|
+
...at(wi(), ["modelValue"]),
|
4771
|
+
...Mi({
|
4779
4772
|
title: "$vuetify.datePicker.title"
|
4780
4773
|
}),
|
4781
4774
|
modelValue: null
|
4782
|
-
}, "VDatePicker"),
|
4775
|
+
}, "VDatePicker"), Es = Me()({
|
4783
4776
|
name: "VDatePicker",
|
4784
|
-
props:
|
4777
|
+
props: ad(),
|
4785
4778
|
emits: {
|
4786
4779
|
"update:modelValue": (t) => !0,
|
4787
4780
|
"update:month": (t) => !0,
|
@@ -4794,9 +4787,9 @@ const Li = Te({
|
|
4794
4787
|
emit: n,
|
4795
4788
|
slots: s
|
4796
4789
|
} = e;
|
4797
|
-
const i =
|
4790
|
+
const i = dt(), {
|
4798
4791
|
t: r
|
4799
|
-
} =
|
4792
|
+
} = Wi(), a = Le(t, "modelValue", void 0, (I) => vt(I), (I) => t.multiple ? I : I[0]), u = Le(t, "viewMode"), l = U(() => {
|
4800
4793
|
const I = i.date(t.min);
|
4801
4794
|
return t.min && i.isValid(I) ? I : null;
|
4802
4795
|
}), c = U(() => {
|
@@ -4807,7 +4800,7 @@ const Li = Te({
|
|
4807
4800
|
const I = i.date();
|
4808
4801
|
let V = I;
|
4809
4802
|
return (se = a.value) != null && se[0] ? V = i.date(a.value[0]) : l.value && i.isBefore(I, l.value) ? V = l.value : c.value && i.isAfter(I, c.value) && (V = c.value), V && i.isValid(V) ? V : I;
|
4810
|
-
}), h =
|
4803
|
+
}), h = Xt(Number(t.month ?? i.getMonth(i.startOfMonth(d.value)))), y = Xt(Number(t.year ?? i.getYear(i.startOfYear(i.setMonth(d.value, h.value))))), g = yt(!1), f = U(() => t.multiple && a.value.length > 1 ? r("$vuetify.datePicker.itemsSelected", a.value.length) : a.value[0] && i.isValid(a.value[0]) ? i.format(i.date(a.value[0]), "normalDateWithWeekday") : r(t.header)), m = U(() => {
|
4811
4804
|
let I = i.date();
|
4812
4805
|
return I = i.setDate(I, 1), I = i.setMonth(I, h.value), I = i.setYear(I, y.value), i.format(I, "monthAndYear");
|
4813
4806
|
}), v = U(() => `date-picker-header${g.value ? "-reverse" : ""}-transition`), k = U(() => {
|
@@ -4849,17 +4842,17 @@ const Li = Te({
|
|
4849
4842
|
function Ae(I) {
|
4850
4843
|
u.value === "year" && J(), n("update:year", I);
|
4851
4844
|
}
|
4852
|
-
return
|
4853
|
-
const se =
|
4845
|
+
return Rs(a, (I, V) => {
|
4846
|
+
const se = vt(V), Xe = vt(I);
|
4854
4847
|
if (!Xe.length) return;
|
4855
|
-
const
|
4856
|
-
$e !== h.value && (h.value = $e, he(h.value)), F !== y.value && (y.value = F, Ae(y.value)), g.value = i.isBefore(
|
4857
|
-
}),
|
4858
|
-
const I =
|
4848
|
+
const Vt = i.date(se[se.length - 1]), Je = i.date(Xe[Xe.length - 1]), $e = i.getMonth(Je), F = i.getYear(Je);
|
4849
|
+
$e !== h.value && (h.value = $e, he(h.value)), F !== y.value && (y.value = F, Ae(y.value)), g.value = i.isBefore(Vt, Je);
|
4850
|
+
}), Ke(() => {
|
4851
|
+
const I = bs.filterProps(t), V = gs.filterProps(t), se = ms.filterProps(t), Xe = ps.filterProps(t), Vt = at(vs.filterProps(t), ["modelValue"]), Je = at(ys.filterProps(t), ["modelValue"]), $e = {
|
4859
4852
|
header: f.value,
|
4860
4853
|
transition: v.value
|
4861
4854
|
};
|
4862
|
-
return b(
|
4855
|
+
return b(bs, re(I, {
|
4863
4856
|
class: ["v-date-picker", `v-date-picker--${u.value}`, {
|
4864
4857
|
"v-date-picker--show-week": t.showWeek
|
4865
4858
|
}, t.class],
|
@@ -4871,7 +4864,7 @@ const Li = Te({
|
|
4871
4864
|
class: "v-date-picker__title"
|
4872
4865
|
}, [r(t.title)]);
|
4873
4866
|
},
|
4874
|
-
header: () => s.header ? b(
|
4867
|
+
header: () => s.header ? b(Mt, {
|
4875
4868
|
defaults: {
|
4876
4869
|
VDatePickerHeader: {
|
4877
4870
|
...$e
|
@@ -4882,7 +4875,7 @@ const Li = Te({
|
|
4882
4875
|
var F;
|
4883
4876
|
return [(F = s.header) == null ? void 0 : F.call(s, $e)];
|
4884
4877
|
}
|
4885
|
-
}) : b(
|
4878
|
+
}) : b(ms, re({
|
4886
4879
|
key: "header"
|
4887
4880
|
}, se, $e, {
|
4888
4881
|
onClick: u.value !== "month" ? z : void 0
|
@@ -4890,32 +4883,32 @@ const Li = Te({
|
|
4890
4883
|
...s,
|
4891
4884
|
default: void 0
|
4892
4885
|
}),
|
4893
|
-
default: () => b(xe, null, [b(
|
4886
|
+
default: () => b(xe, null, [b(gs, re(V, {
|
4894
4887
|
disabled: k.value,
|
4895
4888
|
text: m.value,
|
4896
4889
|
"onClick:next": E,
|
4897
4890
|
"onClick:prev": P,
|
4898
4891
|
"onClick:month": G,
|
4899
4892
|
"onClick:year": J
|
4900
|
-
}), null), b(
|
4893
|
+
}), null), b(vr, {
|
4901
4894
|
hideOnLeave: !0
|
4902
4895
|
}, {
|
4903
|
-
default: () => [u.value === "months" ? b(
|
4896
|
+
default: () => [u.value === "months" ? b(vs, re({
|
4904
4897
|
key: "date-picker-months"
|
4905
|
-
},
|
4898
|
+
}, Vt, {
|
4906
4899
|
modelValue: h.value,
|
4907
4900
|
"onUpdate:modelValue": [(F) => h.value = F, he],
|
4908
4901
|
min: l.value,
|
4909
4902
|
max: c.value,
|
4910
4903
|
year: y.value
|
4911
|
-
}), null) : u.value === "year" ? b(
|
4904
|
+
}), null) : u.value === "year" ? b(ys, re({
|
4912
4905
|
key: "date-picker-years"
|
4913
4906
|
}, Je, {
|
4914
4907
|
modelValue: y.value,
|
4915
4908
|
"onUpdate:modelValue": [(F) => y.value = F, Ae],
|
4916
4909
|
min: l.value,
|
4917
4910
|
max: c.value
|
4918
|
-
}), null) : b(
|
4911
|
+
}), null) : b(ps, re({
|
4919
4912
|
key: "date-picker-month"
|
4920
4913
|
}, Xe, {
|
4921
4914
|
modelValue: a.value,
|
@@ -4932,17 +4925,17 @@ const Li = Te({
|
|
4932
4925
|
});
|
4933
4926
|
}), {};
|
4934
4927
|
}
|
4935
|
-
}),
|
4936
|
-
function
|
4928
|
+
}), ld = { class: "d-flex justify-end" };
|
4929
|
+
function ud(t, e, n, s, i, r) {
|
4937
4930
|
const a = oe("BPhoneInput"), u = oe("BSearchLocationInput");
|
4938
4931
|
return $(), pe("div", null, [
|
4939
|
-
b(
|
4932
|
+
b(Er, {
|
4940
4933
|
modelValue: t.isFormValid,
|
4941
4934
|
"onUpdate:modelValue": e[13] || (e[13] = (l) => t.isFormValid = l),
|
4942
4935
|
style: { gap: "8px", display: "flex", flexDirection: "column" }
|
4943
4936
|
}, {
|
4944
4937
|
default: _(() => [
|
4945
|
-
b(
|
4938
|
+
b(Ze, {
|
4946
4939
|
modelValue: t.formData.email,
|
4947
4940
|
"onUpdate:modelValue": e[0] || (e[0] = (l) => t.formData.email = l),
|
4948
4941
|
density: "compact",
|
@@ -4962,11 +4955,11 @@ function fd(t, e, n, s, i, r) {
|
|
4962
4955
|
"onUpdate:modelValue": e[1] || (e[1] = (l) => t.formData.phoneData = l),
|
4963
4956
|
class: "mt-0"
|
4964
4957
|
}, null, 8, ["modelValue"]),
|
4965
|
-
b(
|
4958
|
+
b(it, { class: "mt-0" }, {
|
4966
4959
|
default: _(() => [
|
4967
4960
|
b(Pe, null, {
|
4968
4961
|
default: _(() => [
|
4969
|
-
b(
|
4962
|
+
b(On, {
|
4970
4963
|
modelValue: t.menuStartDate,
|
4971
4964
|
"onUpdate:modelValue": e[4] || (e[4] = (l) => t.menuStartDate = l),
|
4972
4965
|
"close-on-content-click": !1,
|
@@ -4974,7 +4967,7 @@ function fd(t, e, n, s, i, r) {
|
|
4974
4967
|
transition: "scale-transition"
|
4975
4968
|
}, {
|
4976
4969
|
activator: _(({ props: l }) => [
|
4977
|
-
b(
|
4970
|
+
b(Ze, re({
|
4978
4971
|
"model-value": t.formatDate(t.formData.startDate),
|
4979
4972
|
density: "compact",
|
4980
4973
|
"hide-details": "",
|
@@ -4985,7 +4978,7 @@ function fd(t, e, n, s, i, r) {
|
|
4985
4978
|
}, l, { color: "primary" }), null, 16, ["model-value", "label"])
|
4986
4979
|
]),
|
4987
4980
|
default: _(() => [
|
4988
|
-
b(
|
4981
|
+
b(Es, {
|
4989
4982
|
modelValue: t.formData.startDate,
|
4990
4983
|
"onUpdate:modelValue": [
|
4991
4984
|
e[2] || (e[2] = (l) => t.formData.startDate = l),
|
@@ -5000,7 +4993,7 @@ function fd(t, e, n, s, i, r) {
|
|
5000
4993
|
}),
|
5001
4994
|
b(Pe, null, {
|
5002
4995
|
default: _(() => [
|
5003
|
-
b(
|
4996
|
+
b(On, {
|
5004
4997
|
modelValue: t.menuEndDate,
|
5005
4998
|
"onUpdate:modelValue": e[7] || (e[7] = (l) => t.menuEndDate = l),
|
5006
4999
|
"close-on-content-click": !1,
|
@@ -5008,7 +5001,7 @@ function fd(t, e, n, s, i, r) {
|
|
5008
5001
|
transition: "scale-transition"
|
5009
5002
|
}, {
|
5010
5003
|
activator: _(({ props: l }) => [
|
5011
|
-
b(
|
5004
|
+
b(Ze, re({
|
5012
5005
|
"model-value": t.formatDate(t.formData.endDate),
|
5013
5006
|
density: "compact",
|
5014
5007
|
"hide-details": "",
|
@@ -5019,7 +5012,7 @@ function fd(t, e, n, s, i, r) {
|
|
5019
5012
|
}, l, { color: "primary" }), null, 16, ["model-value", "label"])
|
5020
5013
|
]),
|
5021
5014
|
default: _(() => [
|
5022
|
-
b(
|
5015
|
+
b(Es, {
|
5023
5016
|
modelValue: t.formData.endDate,
|
5024
5017
|
"onUpdate:modelValue": [
|
5025
5018
|
e[5] || (e[5] = (l) => t.formData.endDate = l),
|
@@ -5035,11 +5028,11 @@ function fd(t, e, n, s, i, r) {
|
|
5035
5028
|
]),
|
5036
5029
|
_: 1
|
5037
5030
|
}),
|
5038
|
-
b(
|
5031
|
+
b(it, null, {
|
5039
5032
|
default: _(() => [
|
5040
5033
|
b(Pe, null, {
|
5041
5034
|
default: _(() => [
|
5042
|
-
b(
|
5035
|
+
b(Ze, {
|
5043
5036
|
modelValue: t.formData.adultCount,
|
5044
5037
|
"onUpdate:modelValue": e[8] || (e[8] = (l) => t.formData.adultCount = l),
|
5045
5038
|
density: "compact",
|
@@ -5057,7 +5050,7 @@ function fd(t, e, n, s, i, r) {
|
|
5057
5050
|
}),
|
5058
5051
|
b(Pe, null, {
|
5059
5052
|
default: _(() => [
|
5060
|
-
b(
|
5053
|
+
b(Ze, {
|
5061
5054
|
modelValue: t.formData.roomCount,
|
5062
5055
|
"onUpdate:modelValue": e[9] || (e[9] = (l) => t.formData.roomCount = l),
|
5063
5056
|
density: "compact",
|
@@ -5083,7 +5076,7 @@ function fd(t, e, n, s, i, r) {
|
|
5083
5076
|
variant: "outlined",
|
5084
5077
|
"with-details": ""
|
5085
5078
|
}, null, 8, ["modelValue"]),
|
5086
|
-
b(
|
5079
|
+
b(hr, {
|
5087
5080
|
modelValue: t.formData.specificRequest,
|
5088
5081
|
"onUpdate:modelValue": e[11] || (e[11] = (l) => t.formData.specificRequest = l),
|
5089
5082
|
density: "compact",
|
@@ -5091,7 +5084,7 @@ function fd(t, e, n, s, i, r) {
|
|
5091
5084
|
variant: "outlined",
|
5092
5085
|
color: "primary"
|
5093
5086
|
}, null, 8, ["modelValue", "label"]),
|
5094
|
-
|
5087
|
+
Jt("div", ld, [
|
5095
5088
|
b(ae, {
|
5096
5089
|
color: t.isSuccess ? "green" : "primary",
|
5097
5090
|
"data-cy": "submit-button",
|
@@ -5111,9 +5104,9 @@ function fd(t, e, n, s, i, r) {
|
|
5111
5104
|
}, 8, ["modelValue"])
|
5112
5105
|
]);
|
5113
5106
|
}
|
5114
|
-
typeof
|
5115
|
-
const
|
5116
|
-
...
|
5107
|
+
typeof hs == "function" && hs(_i);
|
5108
|
+
const cd = /* @__PURE__ */ gn(_i, [["render", ud]]), dd = {
|
5109
|
+
...Ci,
|
5117
5110
|
boilerplateSkeleton: {
|
5118
5111
|
type: Boolean
|
5119
5112
|
},
|
@@ -5130,11 +5123,11 @@ const hd = /* @__PURE__ */ mn(Pi, [["render", fd]]), gd = {
|
|
5130
5123
|
type: {
|
5131
5124
|
type: String
|
5132
5125
|
}
|
5133
|
-
},
|
5126
|
+
}, $i = fn({
|
5134
5127
|
components: {
|
5135
|
-
BErrorOverlay:
|
5136
|
-
ContactForm:
|
5137
|
-
HotelOfferItemLayout:
|
5128
|
+
BErrorOverlay: gr,
|
5129
|
+
ContactForm: cd,
|
5130
|
+
HotelOfferItemLayout: Cs
|
5138
5131
|
},
|
5139
5132
|
computed: {
|
5140
5133
|
wording() {
|
@@ -5203,11 +5196,11 @@ const hd = /* @__PURE__ */ mn(Pi, [["render", fd]]), gd = {
|
|
5203
5196
|
this.$emit("reset-filters");
|
5204
5197
|
}
|
5205
5198
|
},
|
5206
|
-
mixins: [
|
5199
|
+
mixins: [Os],
|
5207
5200
|
name: "HotelOfferListEmpty",
|
5208
|
-
props:
|
5201
|
+
props: dd,
|
5209
5202
|
setup() {
|
5210
|
-
const { t } =
|
5203
|
+
const { t } = hn();
|
5211
5204
|
return {
|
5212
5205
|
t
|
5213
5206
|
};
|
@@ -5221,7 +5214,7 @@ const hd = /* @__PURE__ */ mn(Pi, [["render", fd]]), gd = {
|
|
5221
5214
|
}
|
5222
5215
|
}
|
5223
5216
|
});
|
5224
|
-
function
|
5217
|
+
function Ss(t) {
|
5225
5218
|
const e = t;
|
5226
5219
|
e.__i18n = e.__i18n || [], e.__i18n.push({
|
5227
5220
|
locale: "",
|
@@ -5397,20 +5390,20 @@ function ks(t) {
|
|
5397
5390
|
}
|
5398
5391
|
});
|
5399
5392
|
}
|
5400
|
-
const
|
5401
|
-
function
|
5393
|
+
const fd = { class: "position-relative" };
|
5394
|
+
function hd(t, e, n, s, i, r) {
|
5402
5395
|
const a = oe("HotelOfferItemLayout"), u = oe("ContactForm"), l = oe("BErrorOverlay");
|
5403
|
-
return $(), pe("div",
|
5404
|
-
($(), pe(xe, null,
|
5396
|
+
return $(), pe("div", fd, [
|
5397
|
+
($(), pe(xe, null, Ds(6, (c) => ($(), pe(xe, { key: c }, [
|
5405
5398
|
b(a, {
|
5406
5399
|
boilerplate: t.boilerplateSkeleton,
|
5407
|
-
class:
|
5400
|
+
class: bt({
|
5408
5401
|
"mt-0": c === 1,
|
5409
5402
|
"mb-0": c === t.itemCount,
|
5410
5403
|
"mb-2": t.$breakpointService.xs
|
5411
5404
|
})
|
5412
5405
|
}, null, 8, ["boilerplate", "class"]),
|
5413
|
-
t.$breakpointService.xs ? Z("", !0) : ($(), Q(
|
5406
|
+
t.$breakpointService.xs ? Z("", !0) : ($(), Q(Zt, { key: 0 }))
|
5414
5407
|
], 64))), 64)),
|
5415
5408
|
t.typeData ? ($(), Q(l, {
|
5416
5409
|
key: 0,
|
@@ -5420,8 +5413,8 @@ function pd(t, e, n, s, i, r) {
|
|
5420
5413
|
je(He(t.wording.title), 1)
|
5421
5414
|
]),
|
5422
5415
|
description: _(() => [
|
5423
|
-
|
5424
|
-
|
5416
|
+
Jt("div", null, [
|
5417
|
+
Jt("p", null, He(t.wording.description), 1),
|
5425
5418
|
t.typeData !== "noResultsFiltered" && t.typeData !== "accommodationSuccess" ? ($(), Q(u, {
|
5426
5419
|
key: 0,
|
5427
5420
|
"adult-count": t.adultCount,
|
@@ -5449,22 +5442,22 @@ function pd(t, e, n, s, i, r) {
|
|
5449
5442
|
})) : Z("", !0)
|
5450
5443
|
]);
|
5451
5444
|
}
|
5452
|
-
typeof
|
5453
|
-
const
|
5445
|
+
typeof Ss == "function" && Ss($i);
|
5446
|
+
const gd = /* @__PURE__ */ gn($i, [["render", hd]]), Ui = fn({
|
5454
5447
|
components: {
|
5455
5448
|
BHotelOffersFilterBar: cr,
|
5456
|
-
BHotelSearchBar:
|
5449
|
+
BHotelSearchBar: kr,
|
5457
5450
|
HotelOfferItem: ur,
|
5458
|
-
HotelOfferItemLayout:
|
5459
|
-
HotelOfferListEmpty:
|
5460
|
-
HotelRoomOfferList:
|
5461
|
-
TermsAndConditions:
|
5451
|
+
HotelOfferItemLayout: Cs,
|
5452
|
+
HotelOfferListEmpty: gd,
|
5453
|
+
HotelRoomOfferList: Sr,
|
5454
|
+
TermsAndConditions: Tr
|
5462
5455
|
},
|
5463
5456
|
computed: {
|
5464
|
-
...
|
5457
|
+
...Qi(
|
5465
5458
|
Zi,
|
5466
|
-
|
5467
|
-
|
5459
|
+
Ar,
|
5460
|
+
dr
|
5468
5461
|
),
|
5469
5462
|
areFiltersActive: be("hotelOffers/areFiltersActive"),
|
5470
5463
|
displayFiltersMenu() {
|
@@ -5478,7 +5471,7 @@ const vd = /* @__PURE__ */ mn(Ui, [["render", pd]]), Bi = hn({
|
|
5478
5471
|
isPollingHotelOffers: be("hotelOffers/isPolling"),
|
5479
5472
|
isTopPicksSelected() {
|
5480
5473
|
var t;
|
5481
|
-
return ((t = this.filters.sort_by) == null ? void 0 : t.value) ===
|
5474
|
+
return ((t = this.filters.sort_by) == null ? void 0 : t.value) === Ji.TopPicks;
|
5482
5475
|
},
|
5483
5476
|
showErrorMessage() {
|
5484
5477
|
return this.hotelOfferRequest.hasError || this.hasErrorHotelOffers;
|
@@ -5521,23 +5514,23 @@ const vd = /* @__PURE__ */ mn(Ui, [["render", pd]]), Bi = hn({
|
|
5521
5514
|
}
|
5522
5515
|
},
|
5523
5516
|
mixins: [
|
5524
|
-
|
5517
|
+
Os,
|
5525
5518
|
lr,
|
5526
|
-
|
5519
|
+
Ir(
|
5527
5520
|
["bookingApiClient", "config.currency", "config.lang"],
|
5528
5521
|
"retrieveHotelOffers"
|
5529
5522
|
),
|
5530
5523
|
ir,
|
5531
|
-
|
5532
|
-
fallbackValue:
|
5524
|
+
Rr({
|
5525
|
+
fallbackValue: Ns,
|
5533
5526
|
propsName: "features"
|
5534
5527
|
}),
|
5535
|
-
|
5528
|
+
Or()
|
5536
5529
|
],
|
5537
5530
|
name: "HotelOfferList",
|
5538
|
-
props:
|
5531
|
+
props: Cr,
|
5539
5532
|
setup() {
|
5540
|
-
const { t } =
|
5533
|
+
const { t } = hn();
|
5541
5534
|
return {
|
5542
5535
|
t
|
5543
5536
|
};
|
@@ -5546,7 +5539,7 @@ const vd = /* @__PURE__ */ mn(Ui, [["render", pd]]), Bi = hn({
|
|
5546
5539
|
filters: {
|
5547
5540
|
deep: !0,
|
5548
5541
|
async handler(t, e) {
|
5549
|
-
|
5542
|
+
Xi(t, e) || await this.retrieveHotelOffers();
|
5550
5543
|
}
|
5551
5544
|
},
|
5552
5545
|
"hotelOfferRequest.id": {
|
@@ -5567,7 +5560,7 @@ const vd = /* @__PURE__ */ mn(Ui, [["render", pd]]), Bi = hn({
|
|
5567
5560
|
}
|
5568
5561
|
}
|
5569
5562
|
});
|
5570
|
-
function
|
5563
|
+
function ks(t) {
|
5571
5564
|
const e = t;
|
5572
5565
|
e.__i18n = e.__i18n || [], e.__i18n.push({
|
5573
5566
|
locale: "",
|
@@ -5610,16 +5603,16 @@ function Rs(t) {
|
|
5610
5603
|
}
|
5611
5604
|
});
|
5612
5605
|
}
|
5613
|
-
const
|
5606
|
+
const md = {
|
5614
5607
|
key: 0,
|
5615
5608
|
class: "mx-n2"
|
5616
|
-
},
|
5609
|
+
}, pd = {
|
5617
5610
|
key: 1,
|
5618
5611
|
class: "d-flex justify-center align-center py-3"
|
5619
5612
|
};
|
5620
|
-
function
|
5613
|
+
function vd(t, e, n, s, i, r) {
|
5621
5614
|
const a = oe("BHotelSearchBar"), u = oe("BHotelOffersFilterBar"), l = oe("HotelOfferListEmpty"), c = oe("HotelRoomOfferList"), d = oe("HotelOfferItem"), h = oe("TermsAndConditions");
|
5622
|
-
return $(), Q(
|
5615
|
+
return $(), Q(Dr, {
|
5623
5616
|
ref: "hotel-offer-list-container",
|
5624
5617
|
class: "pa-0 bg-white",
|
5625
5618
|
style: nr([{ "min-height": "500px" }, {
|
@@ -5630,9 +5623,9 @@ function Ed(t, e, n, s, i, r) {
|
|
5630
5623
|
}])
|
5631
5624
|
}, {
|
5632
5625
|
default: _(() => [
|
5633
|
-
t.parsedFeatures.HotelOfferSearchMenu ? ($(), Q(
|
5626
|
+
t.parsedFeatures.HotelOfferSearchMenu ? ($(), Q(it, {
|
5634
5627
|
key: 0,
|
5635
|
-
class:
|
5628
|
+
class: bt(["px-2 pt-4", t.$isCurrentBreakpointAboveOrEqual("md") ? "sticky" : ""]),
|
5636
5629
|
"no-gutters": ""
|
5637
5630
|
}, {
|
5638
5631
|
default: _(() => [
|
@@ -5652,23 +5645,23 @@ function Ed(t, e, n, s, i, r) {
|
|
5652
5645
|
]),
|
5653
5646
|
_: 1
|
5654
5647
|
}, 8, ["class"])) : Z("", !0),
|
5655
|
-
t.displayFiltersMenu && t.isBookingApiClientDefined ? ($(), Q(
|
5648
|
+
t.displayFiltersMenu && t.isBookingApiClientDefined ? ($(), Q(it, {
|
5656
5649
|
key: 1,
|
5657
|
-
class:
|
5650
|
+
class: bt(t.$isCurrentBreakpointAboveOrEqual("md") ? "sticky" : ""),
|
5658
5651
|
"no-gutters": ""
|
5659
5652
|
}, {
|
5660
5653
|
default: _(() => [
|
5661
5654
|
b(Pe, null, {
|
5662
5655
|
default: _(() => [
|
5663
5656
|
b(u),
|
5664
|
-
t.$breakpointService.xs ? Z("", !0) : ($(), Q(
|
5657
|
+
t.$breakpointService.xs ? Z("", !0) : ($(), Q(Zt, { key: 0 }))
|
5665
5658
|
]),
|
5666
5659
|
_: 1
|
5667
5660
|
})
|
5668
5661
|
]),
|
5669
5662
|
_: 1
|
5670
5663
|
}, 8, ["class"])) : Z("", !0),
|
5671
|
-
b(
|
5664
|
+
b(it, { "no-gutters": "" }, {
|
5672
5665
|
default: _(() => [
|
5673
5666
|
b(Pe, null, {
|
5674
5667
|
default: _(() => [
|
@@ -5688,17 +5681,17 @@ function Ed(t, e, n, s, i, r) {
|
|
5688
5681
|
type: "noResults",
|
5689
5682
|
onResetFilters: t.onResetFilters
|
5690
5683
|
}, null, 8, ["address", "adult-count", "check-in-date", "check-out-date", "latitude", "longitude", "room-count", "source-market", "onResetFilters"])) : ($(), pe(xe, { key: 3 }, [
|
5691
|
-
er(b(
|
5684
|
+
er(b(yr, {
|
5692
5685
|
color: "primary",
|
5693
5686
|
indeterminate: ""
|
5694
5687
|
}, null, 512), [
|
5695
5688
|
[tr, t.loadingBarEnabled && t.isPollingHotelOffers]
|
5696
5689
|
]),
|
5697
|
-
t.hotelOffers ? ($(!0), pe(xe, { key: 0 },
|
5690
|
+
t.hotelOffers ? ($(!0), pe(xe, { key: 0 }, Ds(t.hotelOffers, (y, g) => ($(), pe(xe, {
|
5698
5691
|
key: y.id
|
5699
5692
|
}, [
|
5700
5693
|
b(d, {
|
5701
|
-
class:
|
5694
|
+
class: bt(["pr-3", {
|
5702
5695
|
"mt-0": g === 0,
|
5703
5696
|
"mb-0": g === t.hotelOffers.length - 1
|
5704
5697
|
}]),
|
@@ -5711,7 +5704,7 @@ function Ed(t, e, n, s, i, r) {
|
|
5711
5704
|
default: _(() => {
|
5712
5705
|
var f;
|
5713
5706
|
return [
|
5714
|
-
(f = t.parsedFeatures.HotelOfferItem) != null && f.HotelRoomOfferList ? ($(), pe("div",
|
5707
|
+
(f = t.parsedFeatures.HotelOfferItem) != null && f.HotelRoomOfferList ? ($(), pe("div", md, [
|
5715
5708
|
b(c, {
|
5716
5709
|
"adult-count": t.hotelOfferRequest.adultCount,
|
5717
5710
|
"check-in-date": t.hotelOfferRequest.checkInDate,
|
@@ -5728,9 +5721,9 @@ function Ed(t, e, n, s, i, r) {
|
|
5728
5721
|
}),
|
5729
5722
|
_: 2
|
5730
5723
|
}, 1032, ["class", "features", "hotel-offer", "single-offer", "onMouseleave", "onMouseover"]),
|
5731
|
-
b(
|
5724
|
+
b(Zt)
|
5732
5725
|
], 64))), 128)) : Z("", !0),
|
5733
|
-
t.startingAfter ? ($(), pe("div",
|
5726
|
+
t.startingAfter ? ($(), pe("div", pd, [
|
5734
5727
|
b(ae, {
|
5735
5728
|
color: "primary",
|
5736
5729
|
variant: "flat",
|
@@ -5759,12 +5752,12 @@ function Ed(t, e, n, s, i, r) {
|
|
5759
5752
|
_: 1
|
5760
5753
|
}, 8, ["style"]);
|
5761
5754
|
}
|
5762
|
-
typeof
|
5763
|
-
const
|
5764
|
-
|
5755
|
+
typeof ks == "function" && ks(Ui);
|
5756
|
+
const xd = /* @__PURE__ */ gn(Ui, [["render", vd]]);
|
5757
|
+
Fi("css/revolugo.hotelofferlist.BkctzTMI.css");
|
5765
5758
|
export {
|
5766
|
-
|
5767
|
-
|
5768
|
-
|
5759
|
+
xd as H,
|
5760
|
+
Ns as a,
|
5761
|
+
Cr as h
|
5769
5762
|
};
|
5770
|
-
//# sourceMappingURL=revolugo.hotelofferlist.
|
5763
|
+
//# sourceMappingURL=revolugo.hotelofferlist.B3yjbXlQ.min.js.map
|