@kushki/js 1.27.2 → 1.27.4-alpha.2
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/lib/libs/cardinal/prod.d.ts +3 -0
- package/lib/libs/cardinal/prod.js +246 -0
- package/lib/libs/cardinal/staging.d.ts +3 -0
- package/lib/libs/cardinal/staging.js +246 -0
- package/lib/service/CardService.js +6 -8
- package/package.json +4 -3
- package/lib/infrastructure/CardinalEnum.d.ts +0 -5
- package/lib/infrastructure/CardinalEnum.js +0 -8
- package/lib/infrastructure/DynamicImportUtils.d.ts +0 -5
- package/lib/infrastructure/DynamicImportUtils.js +0 -20
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.__esModule = true;
|
|
3
|
+
// istanbul ignore file
|
|
4
|
+
// tslint:disable
|
|
5
|
+
// @ts-nocheck
|
|
6
|
+
exports["default"] = !(function (e) {
|
|
7
|
+
function n(i) {
|
|
8
|
+
if (t[i])
|
|
9
|
+
return t[i].exports;
|
|
10
|
+
var o = (t[i] = { exports: {}, id: i, loaded: !1 });
|
|
11
|
+
return e[i].call(o.exports, o, o.exports, n), (o.loaded = !0), o.exports;
|
|
12
|
+
}
|
|
13
|
+
var i = window.songbirdLoader;
|
|
14
|
+
window.songbirdLoader = function (t, r) {
|
|
15
|
+
for (var s, u, a = 0, l = []; a < t.length; a++)
|
|
16
|
+
(u = t[a]), o[u] && l.push.apply(l, o[u]), (o[u] = 0);
|
|
17
|
+
for (s in r)
|
|
18
|
+
Object.prototype.hasOwnProperty.call(r, s) && (e[s] = r[s]);
|
|
19
|
+
for (i && i(t, r); l.length;)
|
|
20
|
+
l.shift().call(null, n);
|
|
21
|
+
};
|
|
22
|
+
var t = {}, o = { 8: 0 };
|
|
23
|
+
return ((n.e = function (e, i) {
|
|
24
|
+
if (0 === o[e])
|
|
25
|
+
return i.call(null, n);
|
|
26
|
+
if (void 0 !== o[e])
|
|
27
|
+
o[e].push(i);
|
|
28
|
+
else {
|
|
29
|
+
o[e] = [i];
|
|
30
|
+
var t = document.getElementsByTagName("head")[0], r = document.createElement("script");
|
|
31
|
+
(r.type = "text/javascript"),
|
|
32
|
+
(r.charset = "utf-8"),
|
|
33
|
+
(r.async = !0),
|
|
34
|
+
(r.crossOrigin = "anonymous"),
|
|
35
|
+
(r.src = n.p + "" + e + ".b109e0c6fd2a5b6b93b2.songbird.js"),
|
|
36
|
+
t.appendChild(r);
|
|
37
|
+
}
|
|
38
|
+
}),
|
|
39
|
+
(n.m = e),
|
|
40
|
+
(n.c = t),
|
|
41
|
+
(n.p =
|
|
42
|
+
"https://includes.ccdc02.com/cardinalcruise/v1/b109e0c6fd2a5b6b93b2/"),
|
|
43
|
+
n(0));
|
|
44
|
+
})({
|
|
45
|
+
0: function (e, n, i) {
|
|
46
|
+
e.exports = i(76);
|
|
47
|
+
},
|
|
48
|
+
5: function (e, n) {
|
|
49
|
+
var i;
|
|
50
|
+
try {
|
|
51
|
+
i = window;
|
|
52
|
+
}
|
|
53
|
+
catch (e) {
|
|
54
|
+
i = this;
|
|
55
|
+
}
|
|
56
|
+
e.exports = {
|
|
57
|
+
apiId: void 0,
|
|
58
|
+
bin: void 0,
|
|
59
|
+
deviceFingerprinting: {
|
|
60
|
+
shouldRunFingerprinting: !1,
|
|
61
|
+
urls: { base: void 0, browser: void 0, profileBin: void 0 }
|
|
62
|
+
},
|
|
63
|
+
farnsworthLabs: {},
|
|
64
|
+
formFields: {},
|
|
65
|
+
jwtOrderObject: void 0,
|
|
66
|
+
merchantJwt: void 0,
|
|
67
|
+
songbirdPostmessageValidation: !1,
|
|
68
|
+
message: void 0,
|
|
69
|
+
orgUnitId: void 0,
|
|
70
|
+
setup: { eventCompleted: !1, modulesLoaded: void 0 },
|
|
71
|
+
storage: {},
|
|
72
|
+
tid: void 0,
|
|
73
|
+
transactionFlow: void 0,
|
|
74
|
+
timers: { browserRender: null },
|
|
75
|
+
urls: { hostedFields: void 0, postMessageWhiteList: [] },
|
|
76
|
+
window: i
|
|
77
|
+
};
|
|
78
|
+
},
|
|
79
|
+
46: function (e, n) {
|
|
80
|
+
function i(e) {
|
|
81
|
+
(this.Namespace = e),
|
|
82
|
+
(this.logQueue = []),
|
|
83
|
+
(this.log = function (e, n) {
|
|
84
|
+
e || (e = "debug"), this.logQueue.push({ type: e, message: n });
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
(i.prototype.getLogQueue = function () {
|
|
88
|
+
return this.logQueue;
|
|
89
|
+
}),
|
|
90
|
+
(i.prototype.getNamespace = function () {
|
|
91
|
+
return this.Namespace;
|
|
92
|
+
}),
|
|
93
|
+
(i.prototype.trace = function (e) {
|
|
94
|
+
this.log("trace", e);
|
|
95
|
+
}),
|
|
96
|
+
(i.prototype.debug = function (e) {
|
|
97
|
+
this.log("debug", e);
|
|
98
|
+
}),
|
|
99
|
+
(i.prototype.info = function (e) {
|
|
100
|
+
this.log("info", e);
|
|
101
|
+
}),
|
|
102
|
+
(i.prototype.warn = function (e) {
|
|
103
|
+
this.log("warn", e);
|
|
104
|
+
}),
|
|
105
|
+
(i.prototype.error = function (e) {
|
|
106
|
+
this.log("error", e);
|
|
107
|
+
}),
|
|
108
|
+
(e.exports = i);
|
|
109
|
+
},
|
|
110
|
+
54: function (e, n, i) {
|
|
111
|
+
var t, o = i(5), r = i(46), s = new r("Base.Polyfiller"), u = { JSON: !1, performance: !1, bind: !1, filter: !1 }, a = {
|
|
112
|
+
polyfill: function (e) {
|
|
113
|
+
(t = e),
|
|
114
|
+
"JSON" in o.window
|
|
115
|
+
? ((u.JSON = !0), a.isFinished())
|
|
116
|
+
: (s.debug("Detected JSON missing, loading polyfill"),
|
|
117
|
+
i.e(0, function (e) {
|
|
118
|
+
i(97),
|
|
119
|
+
s.debug("JSON polyfill loaded"),
|
|
120
|
+
(u.JSON = !0),
|
|
121
|
+
a.isFinished();
|
|
122
|
+
})),
|
|
123
|
+
"performance" in o.window && "mark" in o.window.performance
|
|
124
|
+
? ((u.performance = !0), a.isFinished())
|
|
125
|
+
: (s.debug("Detected performance library missing in browser - loading polyfill"),
|
|
126
|
+
i.e(2, function (e) {
|
|
127
|
+
i(118),
|
|
128
|
+
s.debug("performance polyfill loaded"),
|
|
129
|
+
(u.performance = !0),
|
|
130
|
+
a.isFinished();
|
|
131
|
+
})),
|
|
132
|
+
Function.prototype.bind
|
|
133
|
+
? ((u.bind = !0), a.isFinished())
|
|
134
|
+
: (s.debug("Detected bind is missing - loading polyfill"),
|
|
135
|
+
i.e(0, function (e) {
|
|
136
|
+
i(119)(),
|
|
137
|
+
s.debug("bind polyfill loaded"),
|
|
138
|
+
(u.bind = !0),
|
|
139
|
+
a.isFinished();
|
|
140
|
+
})),
|
|
141
|
+
Array.prototype.filter
|
|
142
|
+
? ((u.filter = !0), a.isFinished())
|
|
143
|
+
: (s.debug("Detected filter is missing - loading polyfill"),
|
|
144
|
+
i.e(0, function (e) {
|
|
145
|
+
i(120)(),
|
|
146
|
+
s.debug("filter polyfill loaded"),
|
|
147
|
+
(u.filter = !0),
|
|
148
|
+
a.isFinished();
|
|
149
|
+
}));
|
|
150
|
+
},
|
|
151
|
+
isFinished: function () {
|
|
152
|
+
for (var e in u)
|
|
153
|
+
if (u.hasOwnProperty(e) && !u[e])
|
|
154
|
+
return !1;
|
|
155
|
+
t(s);
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
e.exports = a;
|
|
159
|
+
},
|
|
160
|
+
76: function (e, n, i) {
|
|
161
|
+
!(function (e, n) {
|
|
162
|
+
var t, o = [], r = [], s = [], u = [], a = [], l = [], p = [], c = [];
|
|
163
|
+
(t = {
|
|
164
|
+
configure: function (e) {
|
|
165
|
+
o.push({ name: e, arguments: arguments });
|
|
166
|
+
},
|
|
167
|
+
setup: function (e) {
|
|
168
|
+
l.push({ name: e, arguments: arguments });
|
|
169
|
+
},
|
|
170
|
+
start: function (e) {
|
|
171
|
+
p.push({ name: e, arguments: arguments });
|
|
172
|
+
},
|
|
173
|
+
"continue": function (e) {
|
|
174
|
+
r.push({ name: e, arguments: arguments });
|
|
175
|
+
},
|
|
176
|
+
on: function (e) {
|
|
177
|
+
a.push({ name: e, arguments: arguments });
|
|
178
|
+
},
|
|
179
|
+
trigger: function (e) {
|
|
180
|
+
c.push({ name: e, arguments: arguments });
|
|
181
|
+
},
|
|
182
|
+
off: function (e) {
|
|
183
|
+
u.push({ name: e, arguments: arguments });
|
|
184
|
+
},
|
|
185
|
+
complete: function (e) {
|
|
186
|
+
s.push({ name: e, arguments: arguments });
|
|
187
|
+
}
|
|
188
|
+
}),
|
|
189
|
+
(e.Cardinal = t),
|
|
190
|
+
(e.onerror !== n && null !== e.onerror) ||
|
|
191
|
+
(e.onerror = function () {
|
|
192
|
+
return !1;
|
|
193
|
+
}),
|
|
194
|
+
i(54).polyfill(function (s) {
|
|
195
|
+
i.e(1, function (u) {
|
|
196
|
+
var d = i(6), f = i(4).active, g = i(108), h = i(5), m = i(3), b = i(9), y = i(11), v = i(55), w = i(12), E = i(1), N = i(13), F = i(101), O = E.getLoggerInstance("Base.Main"), S = i(4).passive, L = i(7), x = i(100), C = {
|
|
197
|
+
configurationQueue: o,
|
|
198
|
+
onQueue: a,
|
|
199
|
+
startQueue: p,
|
|
200
|
+
continueQueue: r
|
|
201
|
+
};
|
|
202
|
+
E.addToLoggerCollection(s);
|
|
203
|
+
try {
|
|
204
|
+
L.on("error", function (e) {
|
|
205
|
+
f.publish("error.fatal").then(function () {
|
|
206
|
+
y.handleError(e, b.GENERAL.NUMBER, b.GENERAL.DESCRIPTION);
|
|
207
|
+
});
|
|
208
|
+
}),
|
|
209
|
+
O.info("Using Songbird.js v" + m.getSystemConfig().version),
|
|
210
|
+
F.init(),
|
|
211
|
+
(t.setup = d.partial(f.publish, "setup")),
|
|
212
|
+
(t.on = S.subscribe),
|
|
213
|
+
(t.start = function (e) {
|
|
214
|
+
(arguments[0] = "start." + e.toUpperCase()),
|
|
215
|
+
f.publish.apply(this, arguments);
|
|
216
|
+
}),
|
|
217
|
+
(t["continue"] = function (e) {
|
|
218
|
+
(arguments[0] = "continue." + e.toUpperCase()),
|
|
219
|
+
f.publish.apply(this, arguments);
|
|
220
|
+
}),
|
|
221
|
+
(t.complete = d.partial(f.publish, "payments.completed")),
|
|
222
|
+
(t.trigger = f.publish),
|
|
223
|
+
(t.off = S.removeEvent),
|
|
224
|
+
v.setupSubscriptions(),
|
|
225
|
+
(h.browser = g.getBrowserDetails()),
|
|
226
|
+
d.each(c, function (e) {
|
|
227
|
+
f.publish.apply(this, e.arguments);
|
|
228
|
+
}),
|
|
229
|
+
f.subscribe("setup", d.partial(x.processSetup, C)),
|
|
230
|
+
l.length > 0 &&
|
|
231
|
+
f.publish("setup", l[0].arguments[0], l[0].arguments[1]),
|
|
232
|
+
(h.namespace = t),
|
|
233
|
+
(h.window = e),
|
|
234
|
+
N.initialize(e),
|
|
235
|
+
N.captureTiming(w.getCurrentScript());
|
|
236
|
+
}
|
|
237
|
+
catch (e) {
|
|
238
|
+
O.error("Fatal Exception while processing: " +
|
|
239
|
+
(e.message !== n ? e.message : e)),
|
|
240
|
+
y.handleError(e, b.GENERAL.NUMBER, b.GENERAL.DESCRIPTION);
|
|
241
|
+
}
|
|
242
|
+
});
|
|
243
|
+
});
|
|
244
|
+
})(window);
|
|
245
|
+
}
|
|
246
|
+
});
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.__esModule = true;
|
|
3
|
+
// istanbul ignore file
|
|
4
|
+
// tslint:disable
|
|
5
|
+
// @ts-nocheck
|
|
6
|
+
exports["default"] = !(function (e) {
|
|
7
|
+
function n(i) {
|
|
8
|
+
if (t[i])
|
|
9
|
+
return t[i].exports;
|
|
10
|
+
var o = (t[i] = { exports: {}, id: i, loaded: !1 });
|
|
11
|
+
return e[i].call(o.exports, o, o.exports, n), (o.loaded = !0), o.exports;
|
|
12
|
+
}
|
|
13
|
+
var i = window.songbirdLoader;
|
|
14
|
+
window.songbirdLoader = function (t, r) {
|
|
15
|
+
for (var s, a, u = 0, l = []; u < t.length; u++)
|
|
16
|
+
(a = t[u]), o[a] && l.push.apply(l, o[a]), (o[a] = 0);
|
|
17
|
+
for (s in r)
|
|
18
|
+
Object.prototype.hasOwnProperty.call(r, s) && (e[s] = r[s]);
|
|
19
|
+
for (i && i(t, r); l.length;)
|
|
20
|
+
l.shift().call(null, n);
|
|
21
|
+
};
|
|
22
|
+
var t = {}, o = { 19: 0 };
|
|
23
|
+
return ((n.e = function (e, i) {
|
|
24
|
+
if (0 === o[e])
|
|
25
|
+
return i.call(null, n);
|
|
26
|
+
if (void 0 !== o[e])
|
|
27
|
+
o[e].push(i);
|
|
28
|
+
else {
|
|
29
|
+
o[e] = [i];
|
|
30
|
+
var t = document.getElementsByTagName("head")[0], r = document.createElement("script");
|
|
31
|
+
(r.type = "text/javascript"),
|
|
32
|
+
(r.charset = "utf-8"),
|
|
33
|
+
(r.async = !0),
|
|
34
|
+
(r.crossOrigin = "anonymous"),
|
|
35
|
+
(r.src = n.p + "" + e + ".0a125400b09de2105a63.songbird.js"),
|
|
36
|
+
t.appendChild(r);
|
|
37
|
+
}
|
|
38
|
+
}),
|
|
39
|
+
(n.m = e),
|
|
40
|
+
(n.c = t),
|
|
41
|
+
(n.p =
|
|
42
|
+
"https://includestest.ccdc02.com/cardinalcruise/v1/0a125400b09de2105a63/"),
|
|
43
|
+
n(0));
|
|
44
|
+
})([
|
|
45
|
+
function (e, n, i) {
|
|
46
|
+
e.exports = i(1);
|
|
47
|
+
},
|
|
48
|
+
function (e, n, i) {
|
|
49
|
+
!(function (e, n) {
|
|
50
|
+
var t, o = [], r = [], s = [], a = [], u = [], l = [], p = [], c = [];
|
|
51
|
+
(t = {
|
|
52
|
+
configure: function (e) {
|
|
53
|
+
o.push({ name: e, arguments: arguments });
|
|
54
|
+
},
|
|
55
|
+
setup: function (e) {
|
|
56
|
+
l.push({ name: e, arguments: arguments });
|
|
57
|
+
},
|
|
58
|
+
start: function (e) {
|
|
59
|
+
p.push({ name: e, arguments: arguments });
|
|
60
|
+
},
|
|
61
|
+
"continue": function (e) {
|
|
62
|
+
r.push({ name: e, arguments: arguments });
|
|
63
|
+
},
|
|
64
|
+
on: function (e) {
|
|
65
|
+
u.push({ name: e, arguments: arguments });
|
|
66
|
+
},
|
|
67
|
+
trigger: function (e) {
|
|
68
|
+
c.push({ name: e, arguments: arguments });
|
|
69
|
+
},
|
|
70
|
+
off: function (e) {
|
|
71
|
+
a.push({ name: e, arguments: arguments });
|
|
72
|
+
},
|
|
73
|
+
complete: function (e) {
|
|
74
|
+
s.push({ name: e, arguments: arguments });
|
|
75
|
+
}
|
|
76
|
+
}),
|
|
77
|
+
(e.Cardinal = t),
|
|
78
|
+
(e.onerror !== n && null !== e.onerror) ||
|
|
79
|
+
(e.onerror = function () {
|
|
80
|
+
return !1;
|
|
81
|
+
}),
|
|
82
|
+
i(2).polyfill(function (s) {
|
|
83
|
+
i.e(5, function (a) {
|
|
84
|
+
var d = i(12), f = i(14).active, g = i(23), h = i(3), m = i(24), b = i(31), y = i(32), v = i(58), w = i(67), E = i(15), N = i(63), F = i(113), O = E.getLoggerInstance("Base.Main"), S = i(14).passive, L = i(18), x = i(114), C = {
|
|
85
|
+
configurationQueue: o,
|
|
86
|
+
onQueue: u,
|
|
87
|
+
startQueue: p,
|
|
88
|
+
continueQueue: r
|
|
89
|
+
};
|
|
90
|
+
E.addToLoggerCollection(s);
|
|
91
|
+
try {
|
|
92
|
+
L.on("error", function (e) {
|
|
93
|
+
f.publish("error.fatal").then(function () {
|
|
94
|
+
y.handleError(e, b.GENERAL.NUMBER, b.GENERAL.DESCRIPTION);
|
|
95
|
+
});
|
|
96
|
+
}),
|
|
97
|
+
O.info("Using Songbird.js v" + m.getSystemConfig().version),
|
|
98
|
+
F.init(),
|
|
99
|
+
(t.setup = d.partial(f.publish, "setup")),
|
|
100
|
+
(t.on = S.subscribe),
|
|
101
|
+
(t.start = function (e) {
|
|
102
|
+
(arguments[0] = "start." + e.toUpperCase()),
|
|
103
|
+
f.publish.apply(this, arguments);
|
|
104
|
+
}),
|
|
105
|
+
(t["continue"] = function (e) {
|
|
106
|
+
(arguments[0] = "continue." + e.toUpperCase()),
|
|
107
|
+
f.publish.apply(this, arguments);
|
|
108
|
+
}),
|
|
109
|
+
(t.complete = d.partial(f.publish, "payments.completed")),
|
|
110
|
+
(t.trigger = f.publish),
|
|
111
|
+
(t.off = S.removeEvent),
|
|
112
|
+
v.setupSubscriptions(),
|
|
113
|
+
(h.browser = g.getBrowserDetails()),
|
|
114
|
+
d.each(c, function (e) {
|
|
115
|
+
f.publish.apply(this, e.arguments);
|
|
116
|
+
}),
|
|
117
|
+
f.subscribe("setup", d.partial(x.processSetup, C)),
|
|
118
|
+
l.length > 0 &&
|
|
119
|
+
f.publish("setup", l[0].arguments[0], l[0].arguments[1]),
|
|
120
|
+
(h.namespace = t),
|
|
121
|
+
(h.window = e),
|
|
122
|
+
N.initialize(e),
|
|
123
|
+
N.captureTiming(w.getCurrentScript());
|
|
124
|
+
}
|
|
125
|
+
catch (e) {
|
|
126
|
+
O.error("Fatal Exception while processing: " +
|
|
127
|
+
(e.message !== n ? e.message : e)),
|
|
128
|
+
y.handleError(e, b.GENERAL.NUMBER, b.GENERAL.DESCRIPTION);
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
})(window);
|
|
133
|
+
},
|
|
134
|
+
function (e, n, i) {
|
|
135
|
+
var t, o = i(3), r = i(4), s = new r("Base.Polyfiller"), a = { JSON: !1, performance: !1, bind: !1, filter: !1 }, u = {
|
|
136
|
+
polyfill: function (e) {
|
|
137
|
+
(t = e),
|
|
138
|
+
"JSON" in o.window
|
|
139
|
+
? ((a.JSON = !0), u.isFinished())
|
|
140
|
+
: (s.debug("Detected JSON missing, loading polyfill"),
|
|
141
|
+
i.e(1, function (e) {
|
|
142
|
+
i(5),
|
|
143
|
+
s.debug("JSON polyfill loaded"),
|
|
144
|
+
(a.JSON = !0),
|
|
145
|
+
u.isFinished();
|
|
146
|
+
})),
|
|
147
|
+
"performance" in o.window && "mark" in o.window.performance
|
|
148
|
+
? ((a.performance = !0), u.isFinished())
|
|
149
|
+
: (s.debug("Detected performance library missing in browser - loading polyfill"),
|
|
150
|
+
i.e(2, function (e) {
|
|
151
|
+
i(8),
|
|
152
|
+
s.debug("performance polyfill loaded"),
|
|
153
|
+
(a.performance = !0),
|
|
154
|
+
u.isFinished();
|
|
155
|
+
})),
|
|
156
|
+
Function.prototype.bind
|
|
157
|
+
? ((a.bind = !0), u.isFinished())
|
|
158
|
+
: (s.debug("Detected bind is missing - loading polyfill"),
|
|
159
|
+
i.e(3, function (e) {
|
|
160
|
+
i(10)(),
|
|
161
|
+
s.debug("bind polyfill loaded"),
|
|
162
|
+
(a.bind = !0),
|
|
163
|
+
u.isFinished();
|
|
164
|
+
})),
|
|
165
|
+
Array.prototype.filter
|
|
166
|
+
? ((a.filter = !0), u.isFinished())
|
|
167
|
+
: (s.debug("Detected filter is missing - loading polyfill"),
|
|
168
|
+
i.e(4, function (e) {
|
|
169
|
+
i(11)(),
|
|
170
|
+
s.debug("filter polyfill loaded"),
|
|
171
|
+
(a.filter = !0),
|
|
172
|
+
u.isFinished();
|
|
173
|
+
}));
|
|
174
|
+
},
|
|
175
|
+
isFinished: function () {
|
|
176
|
+
for (var e in a)
|
|
177
|
+
if (a.hasOwnProperty(e) && !a[e])
|
|
178
|
+
return !1;
|
|
179
|
+
t(s);
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
e.exports = u;
|
|
183
|
+
},
|
|
184
|
+
function (e, n) {
|
|
185
|
+
var i;
|
|
186
|
+
try {
|
|
187
|
+
i = window;
|
|
188
|
+
}
|
|
189
|
+
catch (e) {
|
|
190
|
+
i = this;
|
|
191
|
+
}
|
|
192
|
+
e.exports = {
|
|
193
|
+
apiId: void 0,
|
|
194
|
+
bin: void 0,
|
|
195
|
+
deviceFingerprinting: {
|
|
196
|
+
shouldRunFingerprinting: !1,
|
|
197
|
+
urls: { base: void 0, browser: void 0, profileBin: void 0 }
|
|
198
|
+
},
|
|
199
|
+
farnsworthLabs: {},
|
|
200
|
+
formFields: {},
|
|
201
|
+
jwtOrderObject: void 0,
|
|
202
|
+
merchantJwt: void 0,
|
|
203
|
+
songbirdPostmessageValidation: !1,
|
|
204
|
+
message: void 0,
|
|
205
|
+
orgUnitId: void 0,
|
|
206
|
+
setup: { eventCompleted: !1, modulesLoaded: void 0 },
|
|
207
|
+
storage: {},
|
|
208
|
+
tid: void 0,
|
|
209
|
+
transactionFlow: void 0,
|
|
210
|
+
timers: { browserRender: null },
|
|
211
|
+
urls: { hostedFields: void 0, postMessageWhiteList: [] },
|
|
212
|
+
window: i
|
|
213
|
+
};
|
|
214
|
+
},
|
|
215
|
+
function (e, n) {
|
|
216
|
+
function i(e) {
|
|
217
|
+
(this.Namespace = e),
|
|
218
|
+
(this.logQueue = []),
|
|
219
|
+
(this.log = function (e, n) {
|
|
220
|
+
e || (e = "debug"), this.logQueue.push({ type: e, message: n });
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
(i.prototype.getLogQueue = function () {
|
|
224
|
+
return this.logQueue;
|
|
225
|
+
}),
|
|
226
|
+
(i.prototype.getNamespace = function () {
|
|
227
|
+
return this.Namespace;
|
|
228
|
+
}),
|
|
229
|
+
(i.prototype.trace = function (e) {
|
|
230
|
+
this.log("trace", e);
|
|
231
|
+
}),
|
|
232
|
+
(i.prototype.debug = function (e) {
|
|
233
|
+
this.log("debug", e);
|
|
234
|
+
}),
|
|
235
|
+
(i.prototype.info = function (e) {
|
|
236
|
+
this.log("info", e);
|
|
237
|
+
}),
|
|
238
|
+
(i.prototype.warn = function (e) {
|
|
239
|
+
this.log("warn", e);
|
|
240
|
+
}),
|
|
241
|
+
(i.prototype.error = function (e) {
|
|
242
|
+
this.log("error", e);
|
|
243
|
+
}),
|
|
244
|
+
(e.exports = i);
|
|
245
|
+
},
|
|
246
|
+
]);
|
|
@@ -67,8 +67,6 @@ var cardinal_sandbox_js_1 = require("@kushki/cardinal-sandbox-js");
|
|
|
67
67
|
var Identifiers_1 = require("./../../lib/constant/Identifiers");
|
|
68
68
|
var dot = require("dot-object");
|
|
69
69
|
var KushkiError_1 = require("./../../lib/generic/KushkiError");
|
|
70
|
-
var CardinalEnum_1 = require("./../../lib/infrastructure/CardinalEnum");
|
|
71
|
-
var DynamicImportUtils_1 = require("./../../lib/infrastructure/DynamicImportUtils");
|
|
72
70
|
var ErrorEnum_1 = require("./../../lib/infrastructure/ErrorEnum");
|
|
73
71
|
var ThreeDSEnum_1 = require("./../../lib/infrastructure/ThreeDSEnum");
|
|
74
72
|
var inversify_1 = require("inversify");
|
|
@@ -208,19 +206,19 @@ var CardService = /** @class */ (function () {
|
|
|
208
206
|
return this._ccaSandbox(body, mid, isTest, regional, callback);
|
|
209
207
|
if (isTest) {
|
|
210
208
|
// tslint:disable-next-line:no-duplicate-string
|
|
211
|
-
|
|
209
|
+
Promise.resolve().then(function () { return require("./../../lib/libs/cardinal/staging"); }).then(function () {
|
|
212
210
|
CardService_1._ccaCardinal(body);
|
|
213
211
|
});
|
|
214
|
-
|
|
212
|
+
Promise.resolve().then(function () { return require("./../../lib/libs/cardinal/staging"); }).then(function () {
|
|
215
213
|
_this._completeCardinal(body.secureId, mid, isTest, regional, callback);
|
|
216
214
|
});
|
|
217
215
|
}
|
|
218
216
|
else {
|
|
219
217
|
// tslint:disable-next-line:no-duplicate-string
|
|
220
|
-
|
|
218
|
+
Promise.resolve().then(function () { return require("./../../lib/libs/cardinal/prod"); }).then(function () {
|
|
221
219
|
CardService_1._ccaCardinal(body);
|
|
222
220
|
});
|
|
223
|
-
|
|
221
|
+
Promise.resolve().then(function () { return require("./../../lib/libs/cardinal/prod"); }).then(function () {
|
|
224
222
|
_this._completeCardinal(body.secureId, mid, isTest, regional, callback);
|
|
225
223
|
});
|
|
226
224
|
}
|
|
@@ -288,11 +286,11 @@ var CardService = /** @class */ (function () {
|
|
|
288
286
|
var _this = this;
|
|
289
287
|
return rxjs_1.of(1).pipe(operators_1.switchMap(function () { return _this._gateway.cybersourceJwt(mid, isTest, regional); }), operators_1.map(function (jwt) {
|
|
290
288
|
if (isTest)
|
|
291
|
-
|
|
289
|
+
Promise.resolve().then(function () { return require("./../../lib/libs/cardinal/staging"); }).then(function () {
|
|
292
290
|
CardService_1._initCardinal(jwt, cardNumber);
|
|
293
291
|
});
|
|
294
292
|
else
|
|
295
|
-
|
|
293
|
+
Promise.resolve().then(function () { return require("./../../lib/libs/cardinal/prod"); }).then(function () {
|
|
296
294
|
CardService_1._initCardinal(jwt, cardNumber);
|
|
297
295
|
});
|
|
298
296
|
return jwt;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kushki/js",
|
|
3
|
-
"version": "1.27.2",
|
|
3
|
+
"version": "1.27.4-alpha.2",
|
|
4
4
|
"description": "kushki-js",
|
|
5
5
|
"main": "lib/lib.js",
|
|
6
6
|
"types": "lib/lib.d.ts",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"lint:format": "prettier --write \"./**/*.{ts,js,json,yml,yaml}\" \"./.{pull_review.kushkirc,lintstagedrc,nycrc,prettierrc}\"",
|
|
29
29
|
"sonar": "nyc report --reporter=lcov",
|
|
30
30
|
"test": "npm run test:unit && npm run test:coverage",
|
|
31
|
-
"test:unit": "mocha --opts ./mocha.opts src/**/*.ts src/*.ts",
|
|
32
|
-
"test:coverage": "nyc mocha --opts ./mocha.nyc.opts src/**/*.ts src/*.ts",
|
|
31
|
+
"test:unit": "mocha --opts ./mocha.opts src/**/*.ts src/*.ts --ignore src/libs/**/*.ts",
|
|
32
|
+
"test:coverage": "nyc mocha --opts ./mocha.nyc.opts src/**/*.ts src/*.ts --ignore src/libs/**/*.ts",
|
|
33
33
|
"test:watch": "mocha --watch --opts ./mocha.opts src/**/*.spec.ts",
|
|
34
34
|
"validate": "npm run lint && npm run test",
|
|
35
35
|
"build": "npm run build:npm && npm run build:cdn",
|
|
@@ -100,6 +100,7 @@
|
|
|
100
100
|
"acorn": "6.4.1",
|
|
101
101
|
"aws-amplify": "3.3.19",
|
|
102
102
|
"axios": "0.21.1",
|
|
103
|
+
"cardinal-commerce-songbird-staging": "^1.0.5",
|
|
103
104
|
"ci": "^2.1.1",
|
|
104
105
|
"dot-object": "2.1.4",
|
|
105
106
|
"inversify": "5.0.1",
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.__esModule = true;
|
|
3
|
-
exports.CardinalEnum = void 0;
|
|
4
|
-
var CardinalEnum;
|
|
5
|
-
(function (CardinalEnum) {
|
|
6
|
-
CardinalEnum["STAGING"] = "cardinal/staging";
|
|
7
|
-
CardinalEnum["PROD"] = "cardinal/prod";
|
|
8
|
-
})(CardinalEnum = exports.CardinalEnum || (exports.CardinalEnum = {}));
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.__esModule = true;
|
|
3
|
-
exports.DynamicImportUtils = void 0;
|
|
4
|
-
var CardinalEnum_1 = require("./../../lib/infrastructure/CardinalEnum");
|
|
5
|
-
var DynamicImportUtils = /** @class */ (function () {
|
|
6
|
-
function DynamicImportUtils() {
|
|
7
|
-
}
|
|
8
|
-
// istanbul ignore next
|
|
9
|
-
// tslint:disable-next-line
|
|
10
|
-
DynamicImportUtils["import"] = function (src) {
|
|
11
|
-
switch (src) {
|
|
12
|
-
case CardinalEnum_1.CardinalEnum.STAGING:
|
|
13
|
-
return Promise.resolve().then(function () { return require("../libs/cardinal/staging"); });
|
|
14
|
-
case CardinalEnum_1.CardinalEnum.PROD:
|
|
15
|
-
return Promise.resolve().then(function () { return require("../libs/cardinal/prod"); });
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
return DynamicImportUtils;
|
|
19
|
-
}());
|
|
20
|
-
exports.DynamicImportUtils = DynamicImportUtils;
|