@reservamos/browser-analytics 1.0.13 → 1.0.14
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/browser-analytics.cjs +3 -3
- package/dist/browser-analytics.cjs.map +1 -1
- package/dist/browser-analytics.d.ts +15 -1
- package/dist/browser-analytics.esm.js +231 -191
- package/dist/browser-analytics.esm.js.map +1 -1
- package/dist/browser-analytics.iife.js +3 -3
- package/dist/browser-analytics.iife.js.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +4 -0
- package/src/recommendations/deleteFrequentPassenger/deleteFrequentPassenger.ts +33 -0
- package/src/recommendations/deleteFrequentPassenger/deleteFrequentPassengerSchema.ts +16 -0
- package/src/recommendations/deleteFrequentPassenger/index.ts +6 -0
|
@@ -89,8 +89,8 @@ const ZodParsedType = util.arrayToEnum([
|
|
|
89
89
|
"set"
|
|
90
90
|
]);
|
|
91
91
|
const getParsedType = (data) => {
|
|
92
|
-
const
|
|
93
|
-
switch (
|
|
92
|
+
const t2 = typeof data;
|
|
93
|
+
switch (t2) {
|
|
94
94
|
case "undefined":
|
|
95
95
|
return ZodParsedType.undefined;
|
|
96
96
|
case "string":
|
|
@@ -3922,25 +3922,25 @@ const customEventSchema = z.record(
|
|
|
3922
3922
|
);
|
|
3923
3923
|
const eventNameSchema = z.string().min(1, "Event name is required");
|
|
3924
3924
|
var __assign = function() {
|
|
3925
|
-
__assign = Object.assign || function __assign2(
|
|
3925
|
+
__assign = Object.assign || function __assign2(t2) {
|
|
3926
3926
|
for (var s2, i = 1, n2 = arguments.length; i < n2; i++) {
|
|
3927
3927
|
s2 = arguments[i];
|
|
3928
|
-
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2))
|
|
3928
|
+
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2)) t2[p2] = s2[p2];
|
|
3929
3929
|
}
|
|
3930
|
-
return
|
|
3930
|
+
return t2;
|
|
3931
3931
|
};
|
|
3932
3932
|
return __assign.apply(this, arguments);
|
|
3933
3933
|
};
|
|
3934
3934
|
function __rest$1(s2, e) {
|
|
3935
|
-
var
|
|
3935
|
+
var t2 = {};
|
|
3936
3936
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e.indexOf(p2) < 0)
|
|
3937
|
-
|
|
3937
|
+
t2[p2] = s2[p2];
|
|
3938
3938
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function")
|
|
3939
3939
|
for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
3940
3940
|
if (e.indexOf(p2[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i]))
|
|
3941
|
-
|
|
3941
|
+
t2[p2[i]] = s2[p2[i]];
|
|
3942
3942
|
}
|
|
3943
|
-
return
|
|
3943
|
+
return t2;
|
|
3944
3944
|
}
|
|
3945
3945
|
function __awaiter$1(thisArg, _arguments, P2, generator) {
|
|
3946
3946
|
function adopt(value) {
|
|
@@ -3982,46 +3982,46 @@ typeof SuppressedError === "function" ? SuppressedError : function(error, suppre
|
|
|
3982
3982
|
var e = new Error(message);
|
|
3983
3983
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
3984
3984
|
};
|
|
3985
|
-
function r$2(e,
|
|
3986
|
-
return function(e2,
|
|
3987
|
-
return Object.prototype.hasOwnProperty.call(e2,
|
|
3988
|
-
}(e,
|
|
3985
|
+
function r$2(e, t2) {
|
|
3986
|
+
return function(e2, t3) {
|
|
3987
|
+
return Object.prototype.hasOwnProperty.call(e2, t3);
|
|
3988
|
+
}(e, t2) ? e[t2] : void 0;
|
|
3989
3989
|
}
|
|
3990
|
-
function o$
|
|
3991
|
-
var o2, i = document, a2 = "securitypolicyviolation", u3 = function(
|
|
3992
|
-
var n3 = new URL(e, location.href), r3 =
|
|
3993
|
-
r3 !== n3.href && r3 !== n3.protocol.slice(0, -1) && r3 !== n3.origin || (o2 =
|
|
3990
|
+
function o$2(e, t2, n2, r2) {
|
|
3991
|
+
var o2, i = document, a2 = "securitypolicyviolation", u3 = function(t3) {
|
|
3992
|
+
var n3 = new URL(e, location.href), r3 = t3.blockedURI;
|
|
3993
|
+
r3 !== n3.href && r3 !== n3.protocol.slice(0, -1) && r3 !== n3.origin || (o2 = t3, R2());
|
|
3994
3994
|
};
|
|
3995
3995
|
i.addEventListener(a2, u3);
|
|
3996
3996
|
var R2 = function() {
|
|
3997
3997
|
return i.removeEventListener(a2, u3);
|
|
3998
3998
|
};
|
|
3999
|
-
return Promise.resolve().then(
|
|
3999
|
+
return Promise.resolve().then(t2).then(function(e2) {
|
|
4000
4000
|
return R2(), e2;
|
|
4001
4001
|
}, function(e2) {
|
|
4002
4002
|
return new Promise(function(e3) {
|
|
4003
|
-
var
|
|
4004
|
-
|
|
4003
|
+
var t3 = new MessageChannel();
|
|
4004
|
+
t3.port1.onmessage = function() {
|
|
4005
4005
|
return e3();
|
|
4006
|
-
},
|
|
4006
|
+
}, t3.port2.postMessage(null);
|
|
4007
4007
|
}).then(function() {
|
|
4008
4008
|
if (R2(), o2) return n2(o2);
|
|
4009
4009
|
throw e2;
|
|
4010
4010
|
});
|
|
4011
4011
|
});
|
|
4012
4012
|
}
|
|
4013
|
-
var i$3 = { default: "endpoint" }, a$2 = { default: "tlsEndpoint" }, u$2 = "Client timeout", R = "Network connection error", c$3 = "Network request aborted", s$3 = "Response cannot be parsed", f$2 = "Blocked by CSP", l$2 = "The endpoint parameter is not a valid URL";
|
|
4013
|
+
var i$3 = { default: "endpoint" }, a$2 = { default: "tlsEndpoint" }, u$2 = "Client timeout", R$1 = "Network connection error", c$3 = "Network request aborted", s$3 = "Response cannot be parsed", f$2 = "Blocked by CSP", l$2 = "The endpoint parameter is not a valid URL";
|
|
4014
4014
|
function E$1(e) {
|
|
4015
|
-
for (var
|
|
4015
|
+
for (var t2 = "", n2 = 0; n2 < e.length; ++n2) if (n2 > 0) {
|
|
4016
4016
|
var r2 = e[n2].toLowerCase();
|
|
4017
|
-
r2 !== e[n2] ?
|
|
4018
|
-
} else
|
|
4019
|
-
return
|
|
4020
|
-
}
|
|
4021
|
-
var d$2 = /* @__PURE__ */ E$1("WrongRegion"), p$1 = /* @__PURE__ */ E$1("SubscriptionNotActive"), v = /* @__PURE__ */ E$1("UnsupportedVersion"), _$1 = /* @__PURE__ */ E$1("InstallationMethodRestricted"), O = /* @__PURE__ */ E$1("HostnameRestricted"), h = /* @__PURE__ */ E$1("IntegrationFailed"), I = "API key required", N = "API key not found", T = "API key expired", m$1 = "Request cannot be parsed", w$1 = "Request failed", A = "Request failed to process", P = "Too many requests, rate limit exceeded", y$
|
|
4022
|
-
function M(
|
|
4023
|
-
var r2, o2, i, a2, u3, R2, c2 = [], s2 = (r2 = function(
|
|
4024
|
-
var n3 = __spreadArray([],
|
|
4017
|
+
r2 !== e[n2] ? t2 += " ".concat(r2) : t2 += e[n2];
|
|
4018
|
+
} else t2 += e[n2].toUpperCase();
|
|
4019
|
+
return t2;
|
|
4020
|
+
}
|
|
4021
|
+
var d$2 = /* @__PURE__ */ E$1("WrongRegion"), p$1 = /* @__PURE__ */ E$1("SubscriptionNotActive"), v = /* @__PURE__ */ E$1("UnsupportedVersion"), _$1 = /* @__PURE__ */ E$1("InstallationMethodRestricted"), O = /* @__PURE__ */ E$1("HostnameRestricted"), h = /* @__PURE__ */ E$1("IntegrationFailed"), I = "API key required", N = "API key not found", T = "API key expired", m$1 = "Request cannot be parsed", w$1 = "Request failed", A = "Request failed to process", P = "Too many requests, rate limit exceeded", y$1 = "Not available for this origin", D = "Not available with restricted header", S = I, g$1 = N, L = T, U = "3.11.1", b = "Failed to load the JS script of the agent", C = "9319";
|
|
4022
|
+
function M(t2, n2) {
|
|
4023
|
+
var r2, o2, i, a2, u3, R2, c2 = [], s2 = (r2 = function(t3) {
|
|
4024
|
+
var n3 = __spreadArray([], t3, true);
|
|
4025
4025
|
return { current: function() {
|
|
4026
4026
|
return n3[0];
|
|
4027
4027
|
}, postpone: function() {
|
|
@@ -4030,12 +4030,12 @@ function M(t3, n2) {
|
|
|
4030
4030
|
}, exclude: function() {
|
|
4031
4031
|
n3.shift();
|
|
4032
4032
|
} };
|
|
4033
|
-
}(
|
|
4033
|
+
}(t2), a2 = 100, u3 = 3e3, R2 = 0, o2 = function() {
|
|
4034
4034
|
return Math.random() * Math.min(u3, a2 * Math.pow(2, R2++));
|
|
4035
|
-
}, i = /* @__PURE__ */ new Set(), [r2.current(), function(e,
|
|
4036
|
-
var n3, a3 =
|
|
4035
|
+
}, i = /* @__PURE__ */ new Set(), [r2.current(), function(e, t3) {
|
|
4036
|
+
var n3, a3 = t3 instanceof Error ? t3.message : "";
|
|
4037
4037
|
if (a3 === f$2 || a3 === l$2) r2.exclude(), n3 = 0;
|
|
4038
|
-
else if (a3 === C
|
|
4038
|
+
else if (a3 === C) r2.exclude();
|
|
4039
4039
|
else if (a3 === b) {
|
|
4040
4040
|
var u4 = Date.now() - e.getTime() < 50, R3 = r2.current();
|
|
4041
4041
|
R3 && u4 && !i.has(R3) && (i.add(R3), n3 = 0), r2.postpone();
|
|
@@ -4045,14 +4045,14 @@ function M(t3, n2) {
|
|
|
4045
4045
|
}]), E2 = s2[0], d2 = s2[1];
|
|
4046
4046
|
if (void 0 === E2) return Promise.reject(new TypeError("The list of script URL patterns is empty"));
|
|
4047
4047
|
var p2 = function(e) {
|
|
4048
|
-
var
|
|
4049
|
-
return c2.push({ url: e, startedAt:
|
|
4048
|
+
var t3 = /* @__PURE__ */ new Date(), r3 = function(n3) {
|
|
4049
|
+
return c2.push({ url: e, startedAt: t3, finishedAt: /* @__PURE__ */ new Date(), error: n3 });
|
|
4050
4050
|
}, o3 = n2(e);
|
|
4051
4051
|
return o3.then(function() {
|
|
4052
4052
|
return r3();
|
|
4053
4053
|
}, r3), o3.catch(function(e2) {
|
|
4054
4054
|
if (c2.length >= 5) throw e2;
|
|
4055
|
-
var n3 = d2(
|
|
4055
|
+
var n3 = d2(t3, e2);
|
|
4056
4056
|
if (!n3) throw e2;
|
|
4057
4057
|
var r4, o4 = n3[0], i2 = n3[1];
|
|
4058
4058
|
return (r4 = i2, new Promise(function(e3) {
|
|
@@ -4071,48 +4071,48 @@ function F(e) {
|
|
|
4071
4071
|
var o2;
|
|
4072
4072
|
e.scriptUrlPattern;
|
|
4073
4073
|
var i = e.token, a2 = e.apiKey, u3 = void 0 === a2 ? i : a2, R2 = __rest$1(e, ["scriptUrlPattern", "token", "apiKey"]), c2 = null !== (o2 = r$2(e, "scriptUrlPattern")) && void 0 !== o2 ? o2 : K, s2 = function() {
|
|
4074
|
-
var e2 = [],
|
|
4074
|
+
var e2 = [], t2 = function() {
|
|
4075
4075
|
e2.push({ time: /* @__PURE__ */ new Date(), state: document.visibilityState });
|
|
4076
|
-
}, n2 = function(e3,
|
|
4077
|
-
return e3.addEventListener(
|
|
4078
|
-
return e3.removeEventListener(
|
|
4076
|
+
}, n2 = function(e3, t3, n3, r2) {
|
|
4077
|
+
return e3.addEventListener(t3, n3, r2), function() {
|
|
4078
|
+
return e3.removeEventListener(t3, n3, r2);
|
|
4079
4079
|
};
|
|
4080
|
-
}(document, "visibilitychange",
|
|
4081
|
-
return
|
|
4080
|
+
}(document, "visibilitychange", t2);
|
|
4081
|
+
return t2(), [e2, n2];
|
|
4082
4082
|
}(), f2 = s2[0], l2 = s2[1];
|
|
4083
4083
|
return Promise.resolve().then(function() {
|
|
4084
4084
|
if (!u3 || "string" != typeof u3) throw new Error(I);
|
|
4085
|
-
var e2 = function(e3,
|
|
4085
|
+
var e2 = function(e3, t2) {
|
|
4086
4086
|
return (Array.isArray(e3) ? e3 : [e3]).map(function(e4) {
|
|
4087
|
-
return function(e5,
|
|
4087
|
+
return function(e5, t3) {
|
|
4088
4088
|
var n2 = encodeURIComponent;
|
|
4089
4089
|
return e5.replace(/<[^<>]+>/g, function(e6) {
|
|
4090
|
-
return "<version>" === e6 ? "3" : "<apiKey>" === e6 ? n2(
|
|
4090
|
+
return "<version>" === e6 ? "3" : "<apiKey>" === e6 ? n2(t3) : "<loaderVersion>" === e6 ? n2(U) : e6;
|
|
4091
4091
|
});
|
|
4092
|
-
}(String(e4),
|
|
4092
|
+
}(String(e4), t2);
|
|
4093
4093
|
});
|
|
4094
4094
|
}(c2, u3);
|
|
4095
4095
|
return M(e2, V);
|
|
4096
4096
|
}).catch(function(e2) {
|
|
4097
4097
|
throw l2(), function(e3) {
|
|
4098
|
-
if (e3 instanceof Error && e3.message === C
|
|
4098
|
+
if (e3 instanceof Error && e3.message === C) return new Error(b);
|
|
4099
4099
|
return e3;
|
|
4100
4100
|
}(e2);
|
|
4101
4101
|
}).then(function(e2) {
|
|
4102
|
-
var
|
|
4103
|
-
return l2(),
|
|
4102
|
+
var t2 = e2[0], r2 = e2[1];
|
|
4103
|
+
return l2(), t2.load(__assign(__assign({}, R2), { ldi: { attempts: r2, visibilityStates: f2 } }));
|
|
4104
4104
|
});
|
|
4105
4105
|
}
|
|
4106
4106
|
function V(e) {
|
|
4107
|
-
return o$
|
|
4107
|
+
return o$2(e, function() {
|
|
4108
4108
|
return function(e2) {
|
|
4109
|
-
return new Promise(function(
|
|
4109
|
+
return new Promise(function(t2, n2) {
|
|
4110
4110
|
if (function(e3) {
|
|
4111
4111
|
if (URL.prototype) try {
|
|
4112
4112
|
return new URL(e3, location.href), false;
|
|
4113
|
-
} catch (
|
|
4114
|
-
if (
|
|
4115
|
-
throw
|
|
4113
|
+
} catch (t3) {
|
|
4114
|
+
if (t3 instanceof Error && "TypeError" === t3.name) return true;
|
|
4115
|
+
throw t3;
|
|
4116
4116
|
}
|
|
4117
4117
|
}(e2)) throw new Error(l$2);
|
|
4118
4118
|
var r2 = document.createElement("script"), o2 = function() {
|
|
@@ -4120,7 +4120,7 @@ function V(e) {
|
|
|
4120
4120
|
return null === (e3 = r2.parentNode) || void 0 === e3 ? void 0 : e3.removeChild(r2);
|
|
4121
4121
|
}, i = document.head || document.getElementsByTagName("head")[0];
|
|
4122
4122
|
r2.onload = function() {
|
|
4123
|
-
o2(),
|
|
4123
|
+
o2(), t2();
|
|
4124
4124
|
}, r2.onerror = function() {
|
|
4125
4125
|
o2(), n2(new Error(b));
|
|
4126
4126
|
}, r2.async = true, r2.src = e2, i.appendChild(r2);
|
|
@@ -4131,14 +4131,14 @@ function V(e) {
|
|
|
4131
4131
|
}).then(k);
|
|
4132
4132
|
}
|
|
4133
4133
|
function k() {
|
|
4134
|
-
var e = window,
|
|
4135
|
-
if (function(e2,
|
|
4136
|
-
var n3, r2 = null === (n3 = Object.getOwnPropertyDescriptor) || void 0 === n3 ? void 0 : n3.call(Object, e2,
|
|
4137
|
-
(null == r2 ? void 0 : r2.configurable) ? delete e2[
|
|
4138
|
-
}(e,
|
|
4134
|
+
var e = window, t2 = "__fpjs_p_l_b", n2 = e[t2];
|
|
4135
|
+
if (function(e2, t3) {
|
|
4136
|
+
var n3, r2 = null === (n3 = Object.getOwnPropertyDescriptor) || void 0 === n3 ? void 0 : n3.call(Object, e2, t3);
|
|
4137
|
+
(null == r2 ? void 0 : r2.configurable) ? delete e2[t3] : r2 && !r2.writable || (e2[t3] = void 0);
|
|
4138
|
+
}(e, t2), "function" != typeof (null == n2 ? void 0 : n2.load)) throw new Error(C);
|
|
4139
4139
|
return n2;
|
|
4140
4140
|
}
|
|
4141
|
-
var G = { load: F, defaultScriptUrlPattern: B, ERROR_SCRIPT_LOAD_FAIL: b, ERROR_API_KEY_EXPIRED: T, ERROR_API_KEY_INVALID: N, ERROR_API_KEY_MISSING: I, ERROR_BAD_REQUEST_FORMAT: m$1, ERROR_BAD_RESPONSE_FORMAT: s$3, ERROR_CLIENT_TIMEOUT: u$2, ERROR_CSP_BLOCK: f$2, ERROR_FORBIDDEN_ENDPOINT: O, ERROR_FORBIDDEN_HEADER: D, ERROR_FORBIDDEN_ORIGIN: y$
|
|
4141
|
+
var G = { load: F, defaultScriptUrlPattern: B, ERROR_SCRIPT_LOAD_FAIL: b, ERROR_API_KEY_EXPIRED: T, ERROR_API_KEY_INVALID: N, ERROR_API_KEY_MISSING: I, ERROR_BAD_REQUEST_FORMAT: m$1, ERROR_BAD_RESPONSE_FORMAT: s$3, ERROR_CLIENT_TIMEOUT: u$2, ERROR_CSP_BLOCK: f$2, ERROR_FORBIDDEN_ENDPOINT: O, ERROR_FORBIDDEN_HEADER: D, ERROR_FORBIDDEN_ORIGIN: y$1, ERROR_GENERAL_SERVER_FAILURE: w$1, ERROR_INSTALLATION_METHOD_RESTRICTED: _$1, ERROR_INTEGRATION_FAILURE: h, ERROR_INVALID_ENDPOINT: l$2, ERROR_NETWORK_ABORT: c$3, ERROR_NETWORK_CONNECTION: R$1, ERROR_RATE_LIMIT: P, ERROR_SERVER_TIMEOUT: A, ERROR_SUBSCRIPTION_NOT_ACTIVE: p$1, ERROR_TOKEN_EXPIRED: L, ERROR_TOKEN_INVALID: g$1, ERROR_TOKEN_MISSING: S, ERROR_UNSUPPORTED_VERSION: v, ERROR_WRONG_REGION: d$2, defaultEndpoint: i$3, defaultTlsEndpoint: a$2 };
|
|
4142
4142
|
const FingerprintJSPro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4143
4143
|
__proto__: null,
|
|
4144
4144
|
ERROR_API_KEY_EXPIRED: T,
|
|
@@ -4150,19 +4150,19 @@ const FingerprintJSPro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
4150
4150
|
ERROR_CSP_BLOCK: f$2,
|
|
4151
4151
|
ERROR_FORBIDDEN_ENDPOINT: O,
|
|
4152
4152
|
ERROR_FORBIDDEN_HEADER: D,
|
|
4153
|
-
ERROR_FORBIDDEN_ORIGIN: y$
|
|
4153
|
+
ERROR_FORBIDDEN_ORIGIN: y$1,
|
|
4154
4154
|
ERROR_GENERAL_SERVER_FAILURE: w$1,
|
|
4155
4155
|
ERROR_INSTALLATION_METHOD_RESTRICTED: _$1,
|
|
4156
4156
|
ERROR_INTEGRATION_FAILURE: h,
|
|
4157
4157
|
ERROR_INVALID_ENDPOINT: l$2,
|
|
4158
4158
|
ERROR_NETWORK_ABORT: c$3,
|
|
4159
|
-
ERROR_NETWORK_CONNECTION: R,
|
|
4159
|
+
ERROR_NETWORK_CONNECTION: R$1,
|
|
4160
4160
|
ERROR_RATE_LIMIT: P,
|
|
4161
4161
|
ERROR_SCRIPT_LOAD_FAIL: b,
|
|
4162
4162
|
ERROR_SERVER_TIMEOUT: A,
|
|
4163
4163
|
ERROR_SUBSCRIPTION_NOT_ACTIVE: p$1,
|
|
4164
4164
|
ERROR_TOKEN_EXPIRED: L,
|
|
4165
|
-
ERROR_TOKEN_INVALID: g,
|
|
4165
|
+
ERROR_TOKEN_INVALID: g$1,
|
|
4166
4166
|
ERROR_TOKEN_MISSING: S,
|
|
4167
4167
|
ERROR_UNSUPPORTED_VERSION: v,
|
|
4168
4168
|
ERROR_WRONG_REGION: d$2,
|
|
@@ -4630,20 +4630,20 @@ const r$1 = {
|
|
|
4630
4630
|
purchase: "https://compras.reservamos.mx/api",
|
|
4631
4631
|
core: ""
|
|
4632
4632
|
}
|
|
4633
|
-
}, s$2 = "sandbox", a$1 = "v2", t$
|
|
4633
|
+
}, s$2 = "sandbox", a$1 = "v2", t$2 = "v1", n$1 = {
|
|
4634
4634
|
env: s$2,
|
|
4635
4635
|
headers: {},
|
|
4636
4636
|
searchUrl: r$1[s$2].search,
|
|
4637
4637
|
purchaseUrl: r$1[s$2].purchase,
|
|
4638
4638
|
coreUrl: r$1[s$2].core,
|
|
4639
4639
|
version: a$1,
|
|
4640
|
-
coreVersion: t$
|
|
4640
|
+
coreVersion: t$2,
|
|
4641
4641
|
apiKey: void 0,
|
|
4642
4642
|
userAuthToken: void 0,
|
|
4643
4643
|
withCredentials: false
|
|
4644
4644
|
};
|
|
4645
4645
|
let c$2 = Object.assign({}, n$1);
|
|
4646
|
-
const o = {
|
|
4646
|
+
const o$1 = {
|
|
4647
4647
|
// UNAUTHORIZED
|
|
4648
4648
|
1: {
|
|
4649
4649
|
code: 200,
|
|
@@ -4739,7 +4739,7 @@ const o = {
|
|
|
4739
4739
|
message: "Unknow Error"
|
|
4740
4740
|
}
|
|
4741
4741
|
}, i$2 = (e) => ({
|
|
4742
|
-
...o,
|
|
4742
|
+
...o$1,
|
|
4743
4743
|
...s$1,
|
|
4744
4744
|
...r,
|
|
4745
4745
|
...n(e),
|
|
@@ -4747,47 +4747,47 @@ const o = {
|
|
|
4747
4747
|
...d$1,
|
|
4748
4748
|
...c$1(e)
|
|
4749
4749
|
});
|
|
4750
|
-
|
|
4751
|
-
constructor(r2 = -100,
|
|
4752
|
-
super(
|
|
4750
|
+
class o extends Error {
|
|
4751
|
+
constructor(r2 = -100, s2 = "Unknown error", t2 = null) {
|
|
4752
|
+
super(s2), this.code = r2, this.details = t2, this.stack = new Error().stack;
|
|
4753
4753
|
}
|
|
4754
|
-
}
|
|
4755
|
-
function
|
|
4756
|
-
const
|
|
4757
|
-
if (
|
|
4754
|
+
}
|
|
4755
|
+
async function w(t2) {
|
|
4756
|
+
const e = [404, 422, 500], r2 = await t2.json();
|
|
4757
|
+
if (t2.ok)
|
|
4758
4758
|
return r2;
|
|
4759
|
-
if (
|
|
4760
|
-
switch (
|
|
4759
|
+
if (e.includes(t2.status))
|
|
4760
|
+
switch (t2.status) {
|
|
4761
4761
|
case 404:
|
|
4762
|
-
throw new
|
|
4762
|
+
throw new o(100, "Not found");
|
|
4763
4763
|
case 422:
|
|
4764
4764
|
return r2;
|
|
4765
4765
|
case 500:
|
|
4766
|
-
throw new
|
|
4766
|
+
throw new o(101, "Server error");
|
|
4767
4767
|
default:
|
|
4768
|
-
throw new
|
|
4768
|
+
throw new o();
|
|
4769
4769
|
}
|
|
4770
4770
|
else
|
|
4771
|
-
throw new
|
|
4771
|
+
throw new o(t2.status, r2.message || t2.statusText, r2);
|
|
4772
4772
|
}
|
|
4773
|
-
function
|
|
4774
|
-
if (
|
|
4775
|
-
const { code:
|
|
4776
|
-
throw n2 ? new
|
|
4773
|
+
function l$1(t2) {
|
|
4774
|
+
if (t2.errors instanceof Array) {
|
|
4775
|
+
const { code: e = -100, message: r2 = "Unknown error" } = t2.errors[0] || {}, n2 = i$2(r2)[e];
|
|
4776
|
+
throw n2 ? new o(n2.code, n2.message, t2.errors[0]) : new o(e, r2, t2.errors[0]);
|
|
4777
4777
|
} else
|
|
4778
|
-
return
|
|
4778
|
+
return t2;
|
|
4779
4779
|
}
|
|
4780
|
-
function y
|
|
4781
|
-
const r2 = Object.keys(Object.assign({}, ...
|
|
4780
|
+
function y(...t2) {
|
|
4781
|
+
const r2 = Object.keys(Object.assign({}, ...t2)).reduce(
|
|
4782
4782
|
(n2, o2) => ({
|
|
4783
4783
|
...n2,
|
|
4784
|
-
[o2]:
|
|
4784
|
+
[o2]: t2.map((a2) => o2 in a2 && a2[o2]).filter(Boolean)
|
|
4785
4785
|
}),
|
|
4786
4786
|
{}
|
|
4787
4787
|
);
|
|
4788
4788
|
return new Headers(r2);
|
|
4789
4789
|
}
|
|
4790
|
-
function c(
|
|
4790
|
+
function c(t2, e = {}, r2 = {}, n2) {
|
|
4791
4791
|
const {
|
|
4792
4792
|
apiKey: o2,
|
|
4793
4793
|
withCredentials: a2,
|
|
@@ -4798,21 +4798,21 @@ function c(e, t3 = {}, r2 = {}, n2) {
|
|
|
4798
4798
|
Authorization: `Token token=${r2.apiKey || o2}`,
|
|
4799
4799
|
"Content-Type": "application/json"
|
|
4800
4800
|
};
|
|
4801
|
-
return s2 && (u3.Authorization = `Token ${r2.apiKey || o2}, Bearer ${s2}`),
|
|
4801
|
+
return s2 && (u3.Authorization = `Token ${r2.apiKey || o2}, Bearer ${s2}`), e.headers = y(d2, u3), e.credentials = a2 ? "include" : "omit", typeof e.body != "string" && (e.body = JSON.stringify(e.body)), fetch(t2, e).then(w).then(l$1).catch(n2);
|
|
4802
4802
|
}
|
|
4803
|
-
function E(
|
|
4804
|
-
return c(
|
|
4803
|
+
function E(t2, e = {}, r2) {
|
|
4804
|
+
return c(t2, e, {}, r2);
|
|
4805
4805
|
}
|
|
4806
4806
|
let u$1 = class u {
|
|
4807
4807
|
constructor({
|
|
4808
4808
|
url: e,
|
|
4809
4809
|
watch: i,
|
|
4810
4810
|
expect: h2,
|
|
4811
|
-
maxRetries:
|
|
4811
|
+
maxRetries: t2 = 30,
|
|
4812
4812
|
interval: s2 = 2e3,
|
|
4813
4813
|
eachCall: c2 = null
|
|
4814
4814
|
}) {
|
|
4815
|
-
this.url = e, this.watch = i, this.expect = h2 instanceof Array ? h2 : [h2], this.interval = s2, this.maxRetries =
|
|
4815
|
+
this.url = e, this.watch = i, this.expect = h2 instanceof Array ? h2 : [h2], this.interval = s2, this.maxRetries = t2, this.eachCall = c2 && c2.bind(this), this.aborted = false, this.timers = [], this.execute = this.execute.bind(this), this.executeEachCall = this.executeEachCall.bind(this);
|
|
4816
4816
|
}
|
|
4817
4817
|
start() {
|
|
4818
4818
|
return this.execute(this.maxRetries);
|
|
@@ -4821,14 +4821,14 @@ let u$1 = class u {
|
|
|
4821
4821
|
this.aborted = true;
|
|
4822
4822
|
}
|
|
4823
4823
|
execute(e) {
|
|
4824
|
-
const i = (
|
|
4825
|
-
if (this.expect.includes(
|
|
4826
|
-
let s2 =
|
|
4827
|
-
e === 1 ? s2 = "retries_exceeded" : this.aborted && (s2 = "aborted"), this.timers.forEach(clearInterval), this.executeEachCall(s2,
|
|
4828
|
-
} else if (
|
|
4829
|
-
this.timers.forEach(clearInterval), this.executeEachCall("failed",
|
|
4824
|
+
const i = (t2) => {
|
|
4825
|
+
if (this.expect.includes(t2[this.watch]) || e === 1 || this.aborted) {
|
|
4826
|
+
let s2 = t2[this.watch];
|
|
4827
|
+
e === 1 ? s2 = "retries_exceeded" : this.aborted && (s2 = "aborted"), this.timers.forEach(clearInterval), this.executeEachCall(s2, t2);
|
|
4828
|
+
} else if (t2[this.watch] === "failed")
|
|
4829
|
+
this.timers.forEach(clearInterval), this.executeEachCall("failed", t2);
|
|
4830
4830
|
else {
|
|
4831
|
-
this.executeEachCall("pending",
|
|
4831
|
+
this.executeEachCall("pending", t2);
|
|
4832
4832
|
const s2 = window.setTimeout(
|
|
4833
4833
|
this.execute,
|
|
4834
4834
|
this.interval,
|
|
@@ -4836,74 +4836,87 @@ let u$1 = class u {
|
|
|
4836
4836
|
);
|
|
4837
4837
|
this.timers.push(s2);
|
|
4838
4838
|
}
|
|
4839
|
-
}, h2 = (
|
|
4839
|
+
}, h2 = (t2) => this.executeEachCall("error", t2);
|
|
4840
4840
|
return E(this.url, {}, h2).then(i);
|
|
4841
4841
|
}
|
|
4842
4842
|
executeEachCall(e, i) {
|
|
4843
4843
|
this.eachCall instanceof Function && this.eachCall({ status: e, payload: i }) && this.abort();
|
|
4844
4844
|
}
|
|
4845
4845
|
};
|
|
4846
|
-
function
|
|
4847
|
-
apiName:
|
|
4848
|
-
defaultApiVersion:
|
|
4846
|
+
function j({
|
|
4847
|
+
apiName: h2,
|
|
4848
|
+
defaultApiVersion: c2
|
|
4849
4849
|
}) {
|
|
4850
|
-
let
|
|
4850
|
+
let n2, i = {
|
|
4851
4851
|
"Content-Type": "application/json"
|
|
4852
|
-
},
|
|
4852
|
+
}, r2;
|
|
4853
4853
|
function f2(e) {
|
|
4854
|
-
|
|
4855
|
-
...
|
|
4854
|
+
n2 = e.baseUrl, i = {
|
|
4855
|
+
...i,
|
|
4856
4856
|
...e.defaultHeaders || {}
|
|
4857
4857
|
};
|
|
4858
4858
|
}
|
|
4859
4859
|
function p2(e) {
|
|
4860
|
-
|
|
4861
|
-
}
|
|
4862
|
-
function u3() {
|
|
4863
|
-
if (!o2)
|
|
4864
|
-
throw new Error(`Base URL is not set for ${d2} API.`);
|
|
4860
|
+
r2 = e;
|
|
4865
4861
|
}
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4862
|
+
function d2() {
|
|
4863
|
+
if (!n2)
|
|
4864
|
+
throw new Error(`Base URL is not set for ${h2} API.`);
|
|
4865
|
+
}
|
|
4866
|
+
const $ = { body: {} };
|
|
4867
|
+
async function y2(e, t2 = $) {
|
|
4868
|
+
d2();
|
|
4869
|
+
const { body: s2, headers: o2 = {}, apiVersion: a2 = c2 } = t2, u3 = `${n2}/${a2}/${e}`, l2 = {
|
|
4870
|
+
...i,
|
|
4871
|
+
...o2,
|
|
4872
|
+
...r2 ? { Authorization: r2 } : {}
|
|
4873
4873
|
};
|
|
4874
|
-
return (await fetch(
|
|
4874
|
+
return (await fetch(u3, {
|
|
4875
4875
|
method: "POST",
|
|
4876
4876
|
body: JSON.stringify(s2),
|
|
4877
|
-
headers:
|
|
4877
|
+
headers: l2
|
|
4878
4878
|
})).json();
|
|
4879
4879
|
}
|
|
4880
|
-
async function
|
|
4881
|
-
|
|
4882
|
-
const { headers: s2 = {}, apiVersion:
|
|
4883
|
-
return (await fetch(
|
|
4884
|
-
}
|
|
4885
|
-
function
|
|
4886
|
-
const
|
|
4887
|
-
url: `${
|
|
4888
|
-
watch:
|
|
4889
|
-
expect:
|
|
4890
|
-
eachCall:
|
|
4880
|
+
async function w2(e, t2 = {}) {
|
|
4881
|
+
d2();
|
|
4882
|
+
const { headers: s2 = {}, apiVersion: o2 = c2 } = t2, a2 = `${n2}/${o2}/${e}`;
|
|
4883
|
+
return (await fetch(a2, { headers: s2 })).json();
|
|
4884
|
+
}
|
|
4885
|
+
function H(e, t2) {
|
|
4886
|
+
const o2 = {
|
|
4887
|
+
url: `${n2}/${c2}/${e}`,
|
|
4888
|
+
watch: t2.watch,
|
|
4889
|
+
expect: t2.expect,
|
|
4890
|
+
eachCall: t2.onEachResponse
|
|
4891
|
+
};
|
|
4892
|
+
return new u$1(o2);
|
|
4893
|
+
}
|
|
4894
|
+
async function b2(e, t2 = {}) {
|
|
4895
|
+
d2();
|
|
4896
|
+
const { headers: s2 = {}, apiVersion: o2 = c2 } = t2, a2 = `${n2}/${o2}/${e}`, u3 = {
|
|
4897
|
+
...i,
|
|
4898
|
+
...s2,
|
|
4899
|
+
...r2 ? { Authorization: r2 } : {}
|
|
4891
4900
|
};
|
|
4892
|
-
return
|
|
4901
|
+
return (await fetch(a2, {
|
|
4902
|
+
method: "DELETE",
|
|
4903
|
+
headers: u3
|
|
4904
|
+
})).json();
|
|
4893
4905
|
}
|
|
4894
4906
|
return {
|
|
4895
|
-
get:
|
|
4896
|
-
post:
|
|
4907
|
+
get: w2,
|
|
4908
|
+
post: y2,
|
|
4909
|
+
delete: b2,
|
|
4897
4910
|
setAuthorizationHeader: p2,
|
|
4898
4911
|
setConfig: f2,
|
|
4899
|
-
poll:
|
|
4912
|
+
poll: H
|
|
4900
4913
|
};
|
|
4901
4914
|
}
|
|
4902
|
-
const t$1 =
|
|
4915
|
+
const t$1 = j({
|
|
4903
4916
|
apiName: "Core",
|
|
4904
4917
|
defaultApiVersion: "v1"
|
|
4905
4918
|
});
|
|
4906
|
-
async function
|
|
4919
|
+
async function t(o2) {
|
|
4907
4920
|
const { data: e } = await t$1.post(
|
|
4908
4921
|
"anonymous_profiles/identify",
|
|
4909
4922
|
{
|
|
@@ -4913,64 +4926,70 @@ async function t2(o2) {
|
|
|
4913
4926
|
return e;
|
|
4914
4927
|
}
|
|
4915
4928
|
const s = {
|
|
4916
|
-
createAnonymousProfile:
|
|
4929
|
+
createAnonymousProfile: t
|
|
4917
4930
|
};
|
|
4918
|
-
function
|
|
4931
|
+
function d({
|
|
4919
4932
|
searchId: e,
|
|
4920
|
-
userIdentifier:
|
|
4933
|
+
userIdentifier: t2
|
|
4921
4934
|
}) {
|
|
4922
4935
|
return t$1.get(
|
|
4923
|
-
`trip_recommendations/${e}/${
|
|
4936
|
+
`trip_recommendations/${e}/${t2}`
|
|
4924
4937
|
);
|
|
4925
4938
|
}
|
|
4926
|
-
function
|
|
4939
|
+
function i$1(e) {
|
|
4927
4940
|
return t$1.post("seat_recommendations", {
|
|
4928
4941
|
body: e
|
|
4929
4942
|
});
|
|
4930
4943
|
}
|
|
4931
4944
|
function p({
|
|
4932
4945
|
distinct_id: e,
|
|
4933
|
-
...
|
|
4946
|
+
...t2
|
|
4934
4947
|
}) {
|
|
4935
4948
|
return t$1.post(`seat_recommendations/${e}`, {
|
|
4936
|
-
body:
|
|
4949
|
+
body: t2
|
|
4937
4950
|
});
|
|
4938
4951
|
}
|
|
4939
|
-
function
|
|
4940
|
-
const { start:
|
|
4952
|
+
function u2(e, t2) {
|
|
4953
|
+
const { start: o2, onEachResponse: r2 } = t2, c2 = `profiles/${e}`, a2 = {
|
|
4941
4954
|
watch: "state",
|
|
4942
4955
|
expect: "finished",
|
|
4943
4956
|
onEachResponse: r2
|
|
4944
|
-
},
|
|
4945
|
-
return
|
|
4957
|
+
}, s2 = t$1.poll(c2, a2);
|
|
4958
|
+
return o2 && s2.start(), s2;
|
|
4946
4959
|
}
|
|
4947
|
-
async function
|
|
4960
|
+
async function m(e) {
|
|
4948
4961
|
return t$1.post("profiles", {
|
|
4949
4962
|
body: e
|
|
4950
4963
|
});
|
|
4951
4964
|
}
|
|
4952
|
-
async function
|
|
4965
|
+
async function l(e) {
|
|
4953
4966
|
return t$1.post("passengers", {
|
|
4954
4967
|
body: e
|
|
4955
4968
|
});
|
|
4956
4969
|
}
|
|
4957
|
-
async function
|
|
4970
|
+
async function f$1(e) {
|
|
4958
4971
|
return t$1.get(
|
|
4959
4972
|
`passengers/${e}`
|
|
4960
4973
|
);
|
|
4961
4974
|
}
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4975
|
+
async function g(e, t2) {
|
|
4976
|
+
return t$1.delete(
|
|
4977
|
+
`passengers/${e}/${t2}`
|
|
4978
|
+
);
|
|
4979
|
+
}
|
|
4980
|
+
const R = {
|
|
4981
|
+
getRecommendedTrips: d,
|
|
4982
|
+
createRecommendedPlaces: m,
|
|
4983
|
+
pollRecommendedPlaces: u2,
|
|
4984
|
+
createRecommendedSeats: i$1,
|
|
4967
4985
|
getRecommendedSeats: p,
|
|
4968
|
-
getFrequentPassengers:
|
|
4969
|
-
createFrequentPassengers:
|
|
4986
|
+
getFrequentPassengers: f$1,
|
|
4987
|
+
createFrequentPassengers: l,
|
|
4988
|
+
deleteFrequentPassenger: g
|
|
4970
4989
|
};
|
|
4971
4990
|
const f = {
|
|
4972
4991
|
setConfig: t$1.setConfig,
|
|
4973
|
-
recommendations:
|
|
4992
|
+
recommendations: R,
|
|
4974
4993
|
profiles: s
|
|
4975
4994
|
};
|
|
4976
4995
|
let environment;
|
|
@@ -8006,15 +8025,15 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
8006
8025
|
PERFORMANCE OF THIS SOFTWARE.
|
|
8007
8026
|
***************************************************************************** */
|
|
8008
8027
|
function __rest(s2, e) {
|
|
8009
|
-
var
|
|
8028
|
+
var t2 = {};
|
|
8010
8029
|
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e.indexOf(p2) < 0)
|
|
8011
|
-
|
|
8030
|
+
t2[p2] = s2[p2];
|
|
8012
8031
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function")
|
|
8013
8032
|
for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
8014
8033
|
if (e.indexOf(p2[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i]))
|
|
8015
|
-
|
|
8034
|
+
t2[p2[i]] = s2[p2[i]];
|
|
8016
8035
|
}
|
|
8017
|
-
return
|
|
8036
|
+
return t2;
|
|
8018
8037
|
}
|
|
8019
8038
|
function __awaiter(thisArg, _arguments, P2, generator) {
|
|
8020
8039
|
function adopt(value) {
|
|
@@ -9797,9 +9816,9 @@ _.UUID = /* @__PURE__ */ function() {
|
|
|
9797
9816
|
var UA = function() {
|
|
9798
9817
|
var ua = userAgent, i, ch, buffer = [], ret = 0;
|
|
9799
9818
|
function xor(result, byte_array) {
|
|
9800
|
-
var
|
|
9801
|
-
for (
|
|
9802
|
-
tmp |= buffer[
|
|
9819
|
+
var j2, tmp = 0;
|
|
9820
|
+
for (j2 = 0; j2 < byte_array.length; j2++) {
|
|
9821
|
+
tmp |= buffer[j2] << j2 * 8;
|
|
9803
9822
|
}
|
|
9804
9823
|
return result ^ tmp;
|
|
9805
9824
|
}
|
|
@@ -10082,7 +10101,7 @@ _.dom_query = /* @__PURE__ */ function() {
|
|
|
10082
10101
|
return [];
|
|
10083
10102
|
}
|
|
10084
10103
|
var tokens = selector.split(" ");
|
|
10085
|
-
var token, bits, tagName, found, foundCount, i,
|
|
10104
|
+
var token, bits, tagName, found, foundCount, i, j2, k2, elements, currentContextIndex;
|
|
10086
10105
|
var currentContext = [document$1];
|
|
10087
10106
|
for (i = 0; i < tokens.length; i++) {
|
|
10088
10107
|
token = tokens[i].replace(/^\s+/, "").replace(/\s+$/, "");
|
|
@@ -10106,11 +10125,11 @@ _.dom_query = /* @__PURE__ */ function() {
|
|
|
10106
10125
|
}
|
|
10107
10126
|
found = [];
|
|
10108
10127
|
foundCount = 0;
|
|
10109
|
-
for (
|
|
10128
|
+
for (j2 = 0; j2 < currentContext.length; j2++) {
|
|
10110
10129
|
if (tagName == "*") {
|
|
10111
|
-
elements = getAllChildren(currentContext[
|
|
10130
|
+
elements = getAllChildren(currentContext[j2]);
|
|
10112
10131
|
} else {
|
|
10113
|
-
elements = currentContext[
|
|
10132
|
+
elements = currentContext[j2].getElementsByTagName(tagName);
|
|
10114
10133
|
}
|
|
10115
10134
|
for (k2 = 0; k2 < elements.length; k2++) {
|
|
10116
10135
|
found[foundCount++] = elements[k2];
|
|
@@ -10118,10 +10137,10 @@ _.dom_query = /* @__PURE__ */ function() {
|
|
|
10118
10137
|
}
|
|
10119
10138
|
currentContext = [];
|
|
10120
10139
|
currentContextIndex = 0;
|
|
10121
|
-
for (
|
|
10122
|
-
if (found[
|
|
10123
|
-
hasClass(found[
|
|
10124
|
-
currentContext[currentContextIndex++] = found[
|
|
10140
|
+
for (j2 = 0; j2 < found.length; j2++) {
|
|
10141
|
+
if (found[j2].className && _.isString(found[j2].className) && // some SVG elements have classNames which are not strings
|
|
10142
|
+
hasClass(found[j2], className)) {
|
|
10143
|
+
currentContext[currentContextIndex++] = found[j2];
|
|
10125
10144
|
}
|
|
10126
10145
|
}
|
|
10127
10146
|
continue;
|
|
@@ -10137,11 +10156,11 @@ _.dom_query = /* @__PURE__ */ function() {
|
|
|
10137
10156
|
}
|
|
10138
10157
|
found = [];
|
|
10139
10158
|
foundCount = 0;
|
|
10140
|
-
for (
|
|
10159
|
+
for (j2 = 0; j2 < currentContext.length; j2++) {
|
|
10141
10160
|
if (tagName == "*") {
|
|
10142
|
-
elements = getAllChildren(currentContext[
|
|
10161
|
+
elements = getAllChildren(currentContext[j2]);
|
|
10143
10162
|
} else {
|
|
10144
|
-
elements = currentContext[
|
|
10163
|
+
elements = currentContext[j2].getElementsByTagName(tagName);
|
|
10145
10164
|
}
|
|
10146
10165
|
for (k2 = 0; k2 < elements.length; k2++) {
|
|
10147
10166
|
found[foundCount++] = elements[k2];
|
|
@@ -10188,9 +10207,9 @@ _.dom_query = /* @__PURE__ */ function() {
|
|
|
10188
10207
|
}
|
|
10189
10208
|
currentContext = [];
|
|
10190
10209
|
currentContextIndex = 0;
|
|
10191
|
-
for (
|
|
10192
|
-
if (checkFunction(found[
|
|
10193
|
-
currentContext[currentContextIndex++] = found[
|
|
10210
|
+
for (j2 = 0; j2 < found.length; j2++) {
|
|
10211
|
+
if (checkFunction(found[j2])) {
|
|
10212
|
+
currentContext[currentContextIndex++] = found[j2];
|
|
10194
10213
|
}
|
|
10195
10214
|
}
|
|
10196
10215
|
continue;
|
|
@@ -10198,8 +10217,8 @@ _.dom_query = /* @__PURE__ */ function() {
|
|
|
10198
10217
|
tagName = token;
|
|
10199
10218
|
found = [];
|
|
10200
10219
|
foundCount = 0;
|
|
10201
|
-
for (
|
|
10202
|
-
elements = currentContext[
|
|
10220
|
+
for (j2 = 0; j2 < currentContext.length; j2++) {
|
|
10221
|
+
elements = currentContext[j2].getElementsByTagName(tagName);
|
|
10203
10222
|
for (k2 = 0; k2 < elements.length; k2++) {
|
|
10204
10223
|
found[foundCount++] = elements[k2];
|
|
10205
10224
|
}
|
|
@@ -11843,7 +11862,7 @@ MixpanelPeople.prototype._flush = function(_set_callback, _add_callback, _append
|
|
|
11843
11862
|
_remove_callback(response, data);
|
|
11844
11863
|
}
|
|
11845
11864
|
};
|
|
11846
|
-
for (var
|
|
11865
|
+
for (var j2 = $remove_queue.length - 1; j2 >= 0; j2--) {
|
|
11847
11866
|
$remove_queue = this._mixpanel["persistence"].load_queue(REMOVE_ACTION);
|
|
11848
11867
|
$remove_item = $remove_queue.pop();
|
|
11849
11868
|
_this._mixpanel["persistence"].save();
|
|
@@ -13406,7 +13425,7 @@ function loadNoop(_src, onload) {
|
|
|
13406
13425
|
onload();
|
|
13407
13426
|
}
|
|
13408
13427
|
var mixpanel = init_as_module(loadNoop);
|
|
13409
|
-
const version = "1.0.
|
|
13428
|
+
const version = "1.0.14";
|
|
13410
13429
|
const MIXPANEL_DISTINCT_ID_CACHE_KEY = "mp_distinct_id";
|
|
13411
13430
|
function init$2(mixpanelToken, debug = false, proxyUrl) {
|
|
13412
13431
|
return new Promise((resolve) => {
|
|
@@ -14234,6 +14253,26 @@ async function createRecommendedSeats$1(payload) {
|
|
|
14234
14253
|
throw new Error(error instanceof Error ? error.message : String(error));
|
|
14235
14254
|
}
|
|
14236
14255
|
}
|
|
14256
|
+
const DeleteFrequentPassengerSchema = z.object({
|
|
14257
|
+
passengerId: z.string()
|
|
14258
|
+
}).refine((data) => data.passengerId, {
|
|
14259
|
+
message: "A 'passengerId' must be provided"
|
|
14260
|
+
});
|
|
14261
|
+
async function deleteFrequentPassengers(payload) {
|
|
14262
|
+
try {
|
|
14263
|
+
validatorService.validateProps(payload, DeleteFrequentPassengerSchema);
|
|
14264
|
+
const distinctId = mixpanelService.getMixpanelDistinctId();
|
|
14265
|
+
if (!distinctId) {
|
|
14266
|
+
throw new Error("No distinct ID found");
|
|
14267
|
+
}
|
|
14268
|
+
return await f.recommendations.deleteFrequentPassenger(
|
|
14269
|
+
distinctId,
|
|
14270
|
+
payload.passengerId
|
|
14271
|
+
);
|
|
14272
|
+
} catch (error) {
|
|
14273
|
+
throw new Error(error instanceof Error ? error.message : String(error));
|
|
14274
|
+
}
|
|
14275
|
+
}
|
|
14237
14276
|
async function getFrequentPassengers() {
|
|
14238
14277
|
try {
|
|
14239
14278
|
const distinctId = mixpanelService.getMixpanelDistinctId();
|
|
@@ -14349,7 +14388,8 @@ const analytics = {
|
|
|
14349
14388
|
getRecommendedSeats: createRecommendedSeats,
|
|
14350
14389
|
getRecommendedTrips,
|
|
14351
14390
|
createFrequentPassengers,
|
|
14352
|
-
getFrequentPassengers
|
|
14391
|
+
getFrequentPassengers,
|
|
14392
|
+
deleteFrequentPassenger: deleteFrequentPassengers
|
|
14353
14393
|
},
|
|
14354
14394
|
track: {
|
|
14355
14395
|
search: trackSearch,
|