// Module ID: 4316
// Function ID: 4317
// Dependencies: []
// Module 4316
let fn = () => {
let handler = function r(arg0, _exports22, firstResult) {
let fn;
let _exports = arg0;
dependencyMap = _exports22;
closure_2 = firstResult;
let tmp = typeof fn === "function";
if (typeof fn === "function") {
tmp = fn;
}
closure_3 = tmp;
let num = 0;
if (0 < firstResult.length) {
_exports = firstResult[num];
let _exports2 = _exports22[_exports];
while (!_exports2) {
if (arg0[_exports]) {
let obj = { exports: {} };
_exports22[_exports] = obj;
let first = arg0[_exports][0];
let call = first.call;
let _exports3 = obj.exports;
fn = (arg0) => {
closure_0 = tmp2;
let tmp3 = closure_2_1;
if (closure_2_1[closure_2_0[closure_1_0][1][arg0] || arg0]) {
tmp3 = tmp3[tmp2];
let _exports3 = tmp3.exports;
} else if (tmp[tmp2]) {
let obj = { exports: {} };
tmp3[tmp2] = obj;
let first = tmp[tmp2][0];
let call = first.call;
let _exports = obj.exports;
let fn = (arg0) => {
closure_0 = tmp2;
let tmp3 = closure_2_1;
if (closure_2_1[closure_2_0[closure_1_0][1][arg0] || arg0]) {
tmp3 = tmp3[tmp2];
let _exports3 = tmp3.exports;
} else if (tmp[tmp2]) {
let obj = { exports: {} };
tmp3[tmp2] = obj;
let first = tmp[tmp2][0];
let call = first.call;
let _exports = obj.exports;
let fn = (arg0) => {
closure_0 = tmp2;
let tmp3 = closure_2_1;
if (closure_2_1[closure_2_0[closure_1_0][1][arg0] || arg0]) {
tmp3 = tmp3[tmp2];
let _exports3 = tmp3.exports;
} else if (tmp[tmp2]) {
let obj = { exports: {} };
tmp3[tmp2] = obj;
let first = tmp[tmp2][0];
let call = first.call;
let _exports = obj.exports;
let fn = () => { ... };
let _exports2 = obj.exports;
let firstResult = closure_2_2;
if (typeof call !== "unknown") {
call(_exports, fn, obj, _exports2, tmp13, tmp, tmp3, firstResult);
}
} else {
let tmp4 = typeof closure_2_0 === "function";
if (typeof closure_2_0 === "function") {
tmp4 = closure_2_0;
}
if (tmp4) {
let tmp5Result = tmp4(tmp2, true);
} else if (closure_2_3) {
tmp5Result = tmp5(tmp2, true);
} else {
let _Error = Error;
let error = new Error("Cannot find module '" + tmp2 + "'");
error.code = "MODULE_NOT_FOUND";
throw error;
}
return tmp5Result;
}
firstResult = first(fn, obj, _exports2, tmp13, tmp, tmp3, firstResult);
};
let _exports2 = obj.exports;
let firstResult = closure_2_2;
if (typeof call !== "unknown") {
call(_exports, fn, obj, _exports2, tmp13, tmp, tmp3, firstResult);
}
} else {
let tmp4 = typeof closure_2_0 === "function";
if (typeof closure_2_0 === "function") {
tmp4 = closure_2_0;
}
if (tmp4) {
let tmp5Result = tmp4(tmp2, true);
} else if (closure_2_3) {
tmp5Result = tmp5(tmp2, true);
} else {
let _Error = Error;
let error = new Error("Cannot find module '" + tmp2 + "'");
error.code = "MODULE_NOT_FOUND";
throw error;
}
return tmp5Result;
}
firstResult = first(fn, obj, _exports2, tmp13, tmp, tmp3, firstResult);
};
let _exports2 = obj.exports;
let firstResult = closure_2_2;
if (typeof call !== "unknown") {
call(_exports, fn, obj, _exports2, tmp13, tmp, tmp3, firstResult);
}
} else {
let tmp4 = typeof closure_2_0 === "function";
if (typeof closure_2_0 === "function") {
tmp4 = closure_2_0;
}
if (tmp4) {
let tmp5Result = tmp4(tmp2, true);
} else if (closure_2_3) {
tmp5Result = tmp5(tmp2, true);
} else {
let _Error = Error;
let error = new Error("Cannot find module '" + tmp2 + "'");
error.code = "MODULE_NOT_FOUND";
throw error;
}
return tmp5Result;
}
firstResult = first(fn, obj, _exports2, tmp13, tmp, tmp3, firstResult);
};
_exports2 = obj.exports;
firstResult = _exports;
if (typeof call === "unknown") {
firstResult = first(fn, obj, _exports2, firstResult, arg0, _exports22, firstResult);
break;
} else {
let callResult = call(_exports3, fn, obj, _exports2, firstResult, arg0, _exports22, firstResult);
break;
}
break;
} else {
let tmp3 = typeof fn === "function";
if (typeof fn === "function") {
tmp3 = fn;
}
if (tmp3) {
let tmp3Result = tmp3(_exports, true);
} else if (tmp) {
fn = tmp(_exports, true);
} else {
let tmp4 = globalThis;
let _Error = Error;
let str = "Cannot find module '";
let tmp5 = new.target;
let str2 = "'";
let tmp6 = new.target;
let error = new Error("Cannot find module '" + _exports + "'");
let str3 = "MODULE_NOT_FOUND";
error.code = "MODULE_NOT_FOUND";
throw error;
}
num = num + 1;
}
_exports = _exports22[_exports].exports;
}
}
return function o(arg0, arg1) {
closure_0 = arg0;
if (!dependencyMap[arg0]) {
if (closure_0[arg0]) {
const obj = { exports: {} };
tmp[arg0] = obj;
const first = tmp2[arg0][0];
const call = first.call;
_exports = obj.exports;
const fn = (arg0) => {
closure_0 = tmp2;
let tmp3 = closure_2_1;
if (closure_2_1[closure_2_0[closure_1_0][1][arg0] || arg0]) {
tmp3 = tmp3[tmp2];
let _exports3 = tmp3.exports;
} else if (tmp[tmp2]) {
let obj = { exports: {} };
tmp3[tmp2] = obj;
let first = tmp[tmp2][0];
let call = first.call;
let _exports = obj.exports;
let fn = (arg0) => {
closure_0 = tmp2;
let tmp3 = closure_2_1;
if (closure_2_1[closure_2_0[closure_1_0][1][arg0] || arg0]) {
tmp3 = tmp3[tmp2];
let _exports3 = tmp3.exports;
} else if (tmp[tmp2]) {
let obj = { exports: {} };
tmp3[tmp2] = obj;
let first = tmp[tmp2][0];
let call = first.call;
let _exports = obj.exports;
let fn = () => { ... };
let _exports2 = obj.exports;
let firstResult = closure_2_2;
if (typeof call !== "unknown") {
call(_exports, fn, obj, _exports2, tmp13, tmp, tmp3, firstResult);
}
} else {
let tmp4 = typeof closure_2_0 === "function";
if (typeof closure_2_0 === "function") {
tmp4 = closure_2_0;
}
if (tmp4) {
let tmp5Result = tmp4(tmp2, true);
} else if (closure_2_3) {
tmp5Result = tmp5(tmp2, true);
} else {
let _Error = Error;
let error = new Error("Cannot find module '" + tmp2 + "'");
error.code = "MODULE_NOT_FOUND";
throw error;
}
return tmp5Result;
}
firstResult = first(fn, obj, _exports2, tmp13, tmp, tmp3, firstResult);
};
let _exports2 = obj.exports;
let firstResult = closure_2_2;
if (typeof call !== "unknown") {
call(_exports, fn, obj, _exports2, tmp13, tmp, tmp3, firstResult);
}
} else {
let tmp4 = typeof closure_2_0 === "function";
if (typeof closure_2_0 === "function") {
tmp4 = closure_2_0;
}
if (tmp4) {
let tmp5Result = tmp4(tmp2, true);
} else if (closure_2_3) {
tmp5Result = tmp5(tmp2, true);
} else {
let _Error = Error;
let error = new Error("Cannot find module '" + tmp2 + "'");
error.code = "MODULE_NOT_FOUND";
throw error;
}
return tmp5Result;
}
firstResult = first(fn, obj, _exports2, tmp13, tmp, tmp3, firstResult);
};
const _exports2 = obj.exports;
if (typeof call === "unknown") {
first(fn, obj, _exports2, tmp12, tmp2, tmp, tmp13);
} else {
call(_exports, fn, obj, _exports2, tmp12, tmp2, tmp, tmp13);
}
} else {
let tmp3 = typeof fn === "function";
if (typeof fn === "function") {
tmp3 = fn;
}
if (!arg1) {
if (tmp3) {
return tmp3(arg0, true);
}
}
if (closure_3) {
return tmp5(arg0, true);
} else {
const _Error = Error;
const error = new Error("Cannot find module '" + arg0 + "'");
error.code = "MODULE_NOT_FOUND";
throw error;
}
}
}
return dependencyMap[arg0].exports;
};
};
let obj = { 1: null, 2: null, 3: null, 4: null, 5: null, 6: null, 7: null, 8: null, 9: null, 10: null, 11: null, 12: null, 13: null, 14: null, 15: null, 16: null, 17: null, 18: null, 19: null, 20: null, 21: null, 22: null, 23: null, 24: null, 25: null, 26: null, 27: null, 28: null, 29: null, 30: null, 31: null, 32: null, 33: null, 34: null, 35: null, 36: null, 37: null, 38: null, 39: null, 40: null, 41: null, 42: null, 43: null, 44: null, 45: null, 46: null, 47: null, 48: null, 49: null, 50: null, 51: null, 52: null, 53: null, 54: null, 55: null, 56: null, 57: null, 58: null, 59: null, 60: null, 61: null, 62: null, 63: null, 64: null, 65: null, 66: null, 67: null, 68: null, 69: null, 70: null, 71: null, 72: null, 73: null, 74: null, 75: null, 76: null, 77: null, 78: null, 79: null, 80: null, 81: null, 82: null, 83: null, 84: null, 85: null, 86: null, 87: null, 88: null, 89: null, 90: null, 91: null, 92: null, 93: null, 94: null, 95: null, 96: null, 97: null, 98: null, 99: null, 100: null, 101: null, 102: null, 103: null, 104: null, 105: null, 106: null, 107: null, 108: null, 109: null, 110: null, 111: null, 112: null, 113: null, 114: null, 115: null, 116: null, 117: null, 118: null, 119: null, 120: null, 121: null, 122: null, 123: null, 124: null, 125: null, 126: null, 127: null, 128: null, 129: null, 130: null, 131: null, 132: null, 133: null, 134: null, 135: null, 136: null, 137: null, 138: null, 139: null, 140: null, 141: null, 142: null, 143: null, 144: null, 145: null, 146: null, 147: null, 148: null, 149: null, 150: null, 151: null, 152: null, 153: null, 154: null, 155: null, 156: null, 157: null, 158: null, 159: null, 160: null, 161: null, 162: null, 163: null, 164: null, 165: null, 166: null, 167: null, 168: null, 169: null, 170: null, 171: null, 172: null, 173: null, 174: null, 175: null, 176: null, 177: null, 178: null, 179: null, 180: null, 181: null, 182: null, 183: null, 184: null, 185: null, 186: null, 187: null, 188: null, 189: null, 190: null, 191: null, 192: null, 193: null, 194: null, 195: null, 196: null, 197: null, 198: null, 199: null, 200: null, 201: null, 202: null, 203: null, 204: null, 205: null, 206: null, 207: null, 208: null, 209: null, 210: null, 211: null, 212: null, 213: null, 214: null, 215: null, 216: null, 217: null, 218: null, 219: null, 220: null, 221: null, 222: null, 223: null, 224: null, 225: null, 226: null, 227: null, 228: null, 229: null, 230: null, 231: null, 232: null, 233: null, 234: null, 235: null, 236: null, 237: null, 238: null, 239: null, 240: null, 241: null, 242: null, 243: null, 244: null, 245: null, 246: null, 247: null, 248: null };
let items = [
(arg0, arg1, arg2) => {
function loadScript(forceScriptReload) {
closure_0 = forceScriptReload;
const json = JSON.stringify(forceScriptReload);
if (!forceScriptReload.forceScriptReload) {
if (closure_0[json]) {
return tmp3;
}
}
let element = ;
const tmp4 = forceScriptReload.dataAttributes || {};
closure_2 = tmp4;
let head = forceScriptReload.container;
if (!head) {
const _document = document;
head = document.head;
}
element.src = forceScriptReload.src;
element.id = forceScriptReload.id || "";
element.async = true;
if (forceScriptReload.type) {
const concat = "".concat;
let attr = element.setAttribute("type", "".concat(forceScriptReload.type));
}
if (forceScriptReload.crossorigin) {
const concat2 = "".concat;
const attr1 = element.setAttribute("crossorigin", "".concat(forceScriptReload.crossorigin));
}
const keys = Object.keys(tmp4);
const item = keys.forEach((item) => {
const combined = "data-".concat(item);
const attr = element.setAttribute(combined, "".concat(closure_2[item]));
});
const promise = new Promise((arg0, arg1) => {
closure_0 = arg0;
element = arg1;
const listener = element.addEventListener("load", () => {
closure_0(element);
});
const listener1 = element.addEventListener("error", () => {
const error = new Error("".concat(closure_0.src, " failed to load."));
closure_1(error);
});
const listener2 = element.addEventListener("abort", () => {
const error = new Error("".concat(closure_0.src, " has aborted."));
closure_1(error);
});
head.appendChild(element);
});
closure_0[json] = promise;
return promise;
}
closure_0 = {};
loadScript.clearCache = () => {
closure_0 = {};
};
module.exports = loadScript;
},
{}
];
obj[1] = items;
let items1 = [
(arg0, arg1, arg2) => {
module.exports = global("./dist/load-script");
},
{ "./dist/load-script": 1 }
];
obj[2] = items1;
let items2 = [
(arg0, arg1, arg2) => {
module.exports = function isAndroid(arg0) {
let userAgent = arg0;
if (!arg0) {
const _window = window;
userAgent = window.navigator.userAgent;
}
return /Android/i.test(userAgent);
};
},
{}
];
obj[3] = items2;
let items3 = [
(arg0, arg1, arg2) => {
module.exports = function isChromeOS(arg0) {
let userAgent = arg0;
if (!arg0) {
const _window = window;
userAgent = window.navigator.userAgent;
}
return /CrOS/i.test(userAgent);
};
},
{}
];
obj[4] = items3;
let items4 = [
(arg0, arg1, arg2) => {
closure_0 = global("./is-edge");
closure_1 = global("./is-samsung");
closure_2 = global("./is-duckduckgo");
closure_3 = global("./is-opera");
closure_4 = global("./is-silk");
module.exports = function isChrome(arg0) {
let userAgent = arg0;
if (!arg0) {
const _window = window;
userAgent = window.navigator.userAgent;
}
let tmp2 = -1 === userAgent.indexOf("Chrome");
if (tmp2) {
tmp2 = -1 === userAgent.indexOf("CriOS");
}
if (!tmp2) {
tmp2 = closure_0(userAgent);
}
if (!tmp2) {
tmp2 = closure_1(userAgent);
}
if (!tmp2) {
tmp2 = closure_2(userAgent);
}
if (!tmp2) {
tmp2 = closure_3(userAgent);
}
if (!tmp2) {
tmp2 = closure_4(userAgent);
}
return !tmp2;
};
},
{ "./is-duckduckgo": 6, "./is-edge": 7, "./is-opera": 16, "./is-samsung": 17, "./is-silk": 18 }
];
obj[5] = items4;
let items5 = [
(arg0, arg1, arg2) => {
module.exports = function isDuckDuckGo(arg0) {
let userAgent = arg0;
if (!arg0) {
const _window = window;
userAgent = window.navigator.userAgent;
}
return -1 !== userAgent.indexOf("DuckDuckGo/");
};
},
{}
];
obj[6] = items5;
let items6 = [
(arg0, arg1, arg2) => {
module.exports = function isEdge(arg0) {
let userAgent = arg0;
if (!arg0) {
const _window = window;
userAgent = window.navigator.userAgent;
}
let tmp2 = -1 !== userAgent.indexOf("Edge/");
if (!tmp2) {
tmp2 = -1 !== userAgent.indexOf("Edg/");
}
return tmp2;
};
},
{}
];
obj[7] = items6;
let items7 = [
(arg0, arg1, arg2) => {
module.exports = function isFirefox(arg0) {
let userAgent = arg0;
if (!arg0) {
const _window = window;
userAgent = window.navigator.userAgent;
}
return /Firefox/i.test(userAgent);
};
},
{}
];
obj[8] = items7;
const items8 = [
(arg0, arg1, arg2) => {
module.exports = function isIosFirefox(arg0) {
let userAgent = arg0;
if (!arg0) {
const _window = window;
userAgent = window.navigator.userAgent;
}
return /FxiOS/i.test(userAgent);
};
},
{}
];
obj[9] = items8;
const items9 = [
(arg0, arg1, arg2) => {
closure_0 = global("./is-ios");
module.exports = function isIosGoogleSearchApp(arg0) {
let userAgent = arg0;
if (!arg0) {
const _window = window;
userAgent = window.navigator.userAgent;
}
let isMatch = closure_0(userAgent);
if (isMatch) {
isMatch = /\bGSA\b/.test(userAgent);
const obj = /\bGSA\b/;
}
return isMatch;
};
},
{ "./is-ios": 14 }
];
obj[10] = items9;
const items10 = [
(arg0, arg1, arg2) => {
closure_0 = global("./is-ios");
closure_1 = global("./is-ios-firefox");
const re2 = /webkit/i;
module.exports = function isIosSafari(arg0) {
let userAgent = arg0;
if (!arg0) {
const _window = window;
userAgent = window.navigator.userAgent;
}
let isMatch = closure_0(userAgent);
if (isMatch) {
isMatch = re2.test(userAgent);
}
if (isMatch) {
isMatch = userAgent.indexOf("CriOS") <= -1;
}
if (isMatch) {
isMatch = !closure_1(userAgent);
}
if (isMatch) {
isMatch = userAgent.indexOf("FBAN") <= -1;
}
return isMatch;
};
},
{ "./is-ios": 14, "./is-ios-firefox": 9 }
];
obj[11] = items10;
const items11 = [
(arg0, arg1, arg2) => {
closure_0 = global("./is-ios");
closure_1 = global("./is-ios-google-search-app");
module.exports = function isIosWebview(arg0) {
let userAgent = arg0;
if (!arg0) {
const _window = window;
userAgent = window.navigator.userAgent;
}
let tmp2 = closure_0(userAgent);
if (tmp2) {
let isMatch = closure_1(userAgent);
if (!isMatch) {
isMatch = /.+AppleWebKit(?!.*Safari)/i.test(userAgent);
const obj = /.+AppleWebKit(?!.*Safari)/i;
}
tmp2 = isMatch;
}
return tmp2;
};
},
{ "./is-ios": 14, "./is-ios-google-search-app": 10 }
];
obj[12] = items11;
const items12 = [
(arg0, arg1, arg2) => {
closure_0 = global("./is-ios-webview");
module.exports = function isIosWKWebview(arg0, arg1) {
let visible = arg1;
if (undefined === arg1) {
const _window = window;
visible = window.statusbar.visible;
}
return closure_0(arg0) && visible;
};
},
{ "./is-ios-webview": 12 }
];
obj[13] = items12;
const items13 = [
(arg0, arg1, arg2) => {
closure_0 = global("./is-ipados");
module.exports = function isIos(arg0, arg1, arg2) {
let flag = arg1;
if (undefined === arg1) {
flag = true;
}
let userAgent = arg0;
if (!arg0) {
const _window = window;
userAgent = window.navigator.userAgent;
}
const isMatch = /iPhone|iPod|iPad/i.test(userAgent);
let tmp3 = isMatch;
if (flag) {
let tmp4 = isMatch;
if (!isMatch) {
tmp4 = closure_0(userAgent, arg2);
}
tmp3 = tmp4;
}
return tmp3;
};
},
{ "./is-ipados": 15 }
];
obj[14] = items13;
const items14 = [
(arg0, arg1, arg2) => {
module.exports = function isIpadOS(arg0, arg1) {
let userAgent = arg0;
if (!arg0) {
const _window = window;
userAgent = window.navigator.userAgent;
}
let _document = arg1;
if (!arg1) {
const _window2 = window;
_document = window.document;
}
let isMatch = /Mac|iPad/i.test(userAgent);
if (isMatch) {
isMatch = "ontouchend" in _document;
}
return isMatch;
};
},
{}
];
obj[15] = items14;
const items15 = [
(arg0, arg1, arg2) => {
module.exports = function isOpera(arg0) {
let userAgent = arg0;
if (!arg0) {
const _window = window;
userAgent = window.navigator.userAgent;
}
let tmp2 = -1 !== userAgent.indexOf("OPR/");
if (!tmp2) {
tmp2 = -1 !== userAgent.indexOf("Opera/");
}
if (!tmp2) {
tmp2 = -1 !== userAgent.indexOf("OPT/");
}
return tmp2;
};
},
{}
];
obj[16] = items15;
const items16 = [
(arg0, arg1, arg2) => {
module.exports = function isSamsungBrowser(arg0) {
let userAgent = arg0;
if (!arg0) {
const _window = window;
userAgent = window.navigator.userAgent;
}
return /SamsungBrowser/i.test(userAgent);
};
},
{}
];
obj[17] = items16;
const items17 = [
(arg0, arg1, arg2) => {
module.exports = function isSilk(arg0) {
let userAgent = arg0;
if (!arg0) {
const _window = window;
userAgent = window.navigator.userAgent;
}
return -1 !== userAgent.indexOf("Silk/");
};
},
{}
];
obj[18] = items17;
const items18 = [
(arg0, arg1, arg2) => {
closure_0 = global("./is-android");
closure_1 = global("./is-ios-firefox");
closure_2 = global("./is-ios-webview");
closure_3 = global("./is-chrome");
closure_4 = global("./is-samsung");
closure_5 = global("./is-duckduckgo");
module.exports = function supportsPopups(arg0) {
let userAgent = arg0;
if (!arg0) {
const _window = window;
userAgent = window.navigator.userAgent;
}
let tmp2 = closure_2(userAgent);
if (!tmp2) {
tmp2 = closure_1(userAgent);
}
if (!tmp2) {
let userAgent2 = userAgent;
if (!userAgent) {
const _window2 = window;
userAgent2 = window.navigator.userAgent;
}
let isMatch = closure_0(userAgent2);
if (isMatch) {
isMatch = /Version\/[\d.]+/i.test(userAgent2);
const obj = /Version\/[\d.]+/i;
}
if (isMatch) {
let userAgent1 = userAgent2;
if (!userAgent2) {
const _window3 = window;
userAgent1 = window.navigator.userAgent;
}
isMatch = userAgent1.indexOf("Opera Mini") <= -1;
}
if (isMatch) {
isMatch = !closure_5(userAgent2);
}
tmp2 = isMatch;
}
if (!tmp2) {
let userAgent3 = userAgent;
if (!userAgent) {
const _window4 = window;
userAgent3 = window.navigator.userAgent;
}
tmp2 = userAgent3.indexOf("Opera Mini") > -1;
}
if (!tmp2) {
let str3 = userAgent;
if (!userAgent) {
const _window5 = window;
str3 = window.navigator.userAgent;
}
const match = str3.match(/CriOS\/(\d+)\./);
let tmp13 = match;
if (tmp13) {
const _parseInt = parseInt;
tmp13 = parseInt(match[1], 10) < 48;
}
tmp2 = tmp13;
}
if (!tmp2) {
const tmp16 = closure_3(userAgent);
let isMatch1 = !tmp16;
if (!tmp16) {
isMatch1 = !closure_4(userAgent);
}
if (isMatch1) {
isMatch1 = /samsung/i.test(userAgent);
const obj2 = /samsung/i;
}
tmp2 = isMatch1;
}
return !tmp2;
};
},
{ "./is-android": 3, "./is-chrome": 5, "./is-duckduckgo": 6, "./is-ios-firefox": 9, "./is-ios-webview": 12, "./is-samsung": 17 }
];
obj[19] = items18;
const items19 = [
(arg0, arg1, arg2) => {
module.exports = global("./dist/is-android");
},
{ "./dist/is-android": 3 }
];
obj[20] = items19;
const items20 = [
(arg0, arg1, arg2) => {
module.exports = global("./dist/is-chrome-os");
},
{ "./dist/is-chrome-os": 4 }
];
obj[21] = items20;
const items21 = [
(arg0, arg1, arg2) => {
module.exports = global("./dist/is-chrome");
},
{ "./dist/is-chrome": 5 }
];
obj[22] = items21;
const items22 = [
(arg0, arg1, arg2) => {
module.exports = global("./dist/is-firefox");
},
{ "./dist/is-firefox": 8 }
];
obj[23] = items22;
const items23 = [
(arg0, arg1, arg2) => {
module.exports = global("./dist/is-ios-safari");
},
{ "./dist/is-ios-safari": 11 }
];
obj[24] = items23;
const items24 = [
(arg0, arg1, arg2) => {
module.exports = global("./dist/is-ios-webview");
},
{ "./dist/is-ios-webview": 12 }
];
obj[25] = items24;
const items25 = [
(arg0, arg1, arg2) => {
module.exports = global("./dist/is-ios-wkwebview");
},
{ "./dist/is-ios-wkwebview": 13 }
];
obj[26] = items25;
const items26 = [
(arg0, arg1, arg2) => {
module.exports = global("./dist/is-ios");
},
{ "./dist/is-ios": 14 }
];
obj[27] = items26;
const items27 = [
(arg0, arg1, arg2) => {
module.exports = global("./dist/is-samsung");
},
{ "./dist/is-samsung": 17 }
];
obj[28] = items27;
const items28 = [
(arg0, arg1, arg2) => {
module.exports = global("./dist/supports-popups");
},
{ "./dist/supports-popups": 19 }
];
obj[29] = items28;
const items29 = [
(arg0, arg1, arg2) => {
class EventEmitter {
constructor() {
this._events = {};
return;
}
on(arg0, arg1) {
_events = this._events;
if (this._events[global]) {
arr2 = _events[global];
arr1 = arr2.push(module);
} else {
items = [];
items[0] = module;
_events[global] = items;
}
return;
}
off(arg0, arg1) {
arr = this._events[global];
if (arr) {
tmp = module;
num = 1;
spliceResult = arr.splice(arr.indexOf(module), 1);
}
return;
}
_emit(arg0) {
items = [];
closure_0 = items;
num = 1;
if (1 < arguments.length) {
do {
items[num - 1] = arguments[num];
num = num + 1;
length = arguments.length;
} while (num < length);
}
arr2 = this._events[global];
if (arr2) {
item = arr2.forEach(() => { ... });
}
return;
}
hasListener(arg0) {
arr = this._events[global];
tmp = arr;
if (tmp) {
num = 0;
tmp = arr.length > 0;
}
return tmp;
}
static createChild(arg0) {
obj = { constructor: global };
global.prototype = Object.create(EventEmitter.prototype, obj);
return;
}
}
module.exports = EventEmitter;
},
{}
];
obj[30] = items29;
const items30 = [
(arg0, arg1, arg2) => {
let _Promise = null;
if (typeof Promise !== "undefined") {
_Promise = Promise;
}
class ExtendedPromise {
constructor(arg0) {
self = this;
self = this;
if (typeof global !== "function") {
obj = ExtendedPromise;
tmp = new.target;
tmp2 = new.target;
promise1 = new ExtendedPromise.Promise(() => { ... });
tmp4 = promise1;
self._promise = promise1;
obj1 = global;
if (!global) {
obj1 = {};
}
self._onResolve = obj1.onResolve || obj.defaultOnResolve;
self._onReject = obj1.onReject || obj.defaultOnReject;
if (obj.shouldCatchExceptions(obj1)) {
_promise = self._promise;
catchPromise = _promise.catch(/* F125844 */ function() { ... });
}
_resetStateResult = self._resetState();
} else {
tmp7 = ExtendedPromise;
tmp8 = new.target;
tmp9 = new.target;
tmp10 = global;
promise2 = new ExtendedPromise.Promise(global);
tmp12 = promise2;
self._promise = promise2;
}
return;
}
static defaultOnResolve(arg0) {
_Promise = ExtendedPromise.Promise;
return _Promise.resolve(global);
}
static defaultOnReject(arg0) {
_Promise = ExtendedPromise.Promise;
return _Promise.reject(global);
}
static setPromise(arg0) {
ExtendedPromise.Promise = global;
return;
}
static shouldCatchExceptions(arg0) {
_Boolean = Boolean;
if (global.hasOwnProperty("suppressUnhandledPromiseMessage")) {
_BooleanResult = _Boolean(global.suppressUnhandledPromiseMessage);
} else {
tmp = ExtendedPromise;
_BooleanResult = _Boolean(ExtendedPromise.suppressUnhandledPromiseMessage);
}
return _BooleanResult;
}
static all(arg0) {
_Promise = ExtendedPromise.Promise;
return _Promise.all(global);
}
static allSettled(arg0) {
_Promise = ExtendedPromise.Promise;
return _Promise.allSettled(global);
}
static race(arg0) {
_Promise = ExtendedPromise.Promise;
return _Promise.race(global);
}
static reject(arg0) {
_Promise = ExtendedPromise.Promise;
return _Promise.reject(global);
}
static resolve(arg0) {
_Promise = ExtendedPromise.Promise;
return _Promise.resolve(global);
}
then() {
items = [];
num = 0;
if (0 < arguments.length) {
do {
items[num] = arguments[num];
num = num + 1;
length = arguments.length;
} while (num < length);
}
_promise = this._promise;
then = _promise.then;
return then.apply(_promise, items);
}
catch() {
items = [];
num = 0;
if (0 < arguments.length) {
do {
items[num] = arguments[num];
num = num + 1;
length = arguments.length;
} while (num < length);
}
_promise = this._promise;
_catch = _promise.catch;
return _catch.apply(_promise, items);
}
resolve(arg0) {
self = this;
closure_0 = global;
self = this;
if (!this.isFulfilled) {
_setResolvedResult = self._setResolved();
tmp2 = ExtendedPromise;
_Promise = ExtendedPromise.Promise;
resolveResult = _Promise.resolve();
nextPromise = resolveResult.then(() => { ... });
nextPromise1 = nextPromise.then(() => { ... });
catchPromise = nextPromise1.catch(() => { ... });
}
return self;
}
reject(arg0) {
self = this;
closure_0 = global;
self = this;
if (!this.isFulfilled) {
_setRejectedResult = self._setRejected();
tmp2 = ExtendedPromise;
_Promise = ExtendedPromise.Promise;
resolveResult = _Promise.resolve();
nextPromise = resolveResult.then(() => { ... });
nextPromise1 = nextPromise.then(() => { ... });
catchPromise = nextPromise1.catch(() => { ... });
}
return self;
}
_resetState() {
return;
}
_setResolved() {
return;
}
_setRejected() {
return;
}
}
ExtendedPromise.Promise = _Promise;
module.exports = ExtendedPromise;
},
{}
];
obj[31] = items30;
const items31 = [
(arg0, arg1, arg2) => {
const attributes = global("./lib/set-attributes");
const defaultAttributes = global("./lib/default-attributes");
closure_2 = global("./lib/assign");
module.exports = function createFrame(arg0) {
let obj = arg0;
if (undefined === arg0) {
obj = {};
}
const element = ;
const obj2 = closure_2.assign({}, defaultAttributes.defaultAttributes, obj);
if (tmp4) {
closure_2.assign(element.style, obj2.style);
delete tmp[tmp2];
}
attributes.setAttributes(element, obj2);
if (!element.getAttribute("id")) {
element.id = element.name;
}
return element;
};
},
{ "./lib/assign": 33, "./lib/default-attributes": 34, "./lib/set-attributes": 35 }
];
obj[32] = items31;
const items32 = [
(arg0, arg1, arg2) => {
arg2.assign = function assign(arg0) {
let length;
closure_0 = arg0;
const items = [];
let num = 1;
if (1 < arguments.length) {
do {
items[num - 1] = arguments[num];
num = num + 1;
length = arguments.length;
} while (num < length);
}
let item = items.forEach((item) => {
if (typeof item === "object") {
const _Object = Object;
const keys = Object.keys(item);
item = keys.forEach((item) => {
item[item] = item[item];
});
}
});
return arg0;
};
},
{}
];
obj[33] = items32;
const items33 = [
(arg0, arg1, arg2) => {
arg2.defaultAttributes = { src: "about:blank", frameBorder: 0, allowtransparency: true, scrolling: "no" };
},
{}
];
obj[34] = items33;
const items34 = [
(arg0, arg1, arg2) => {
arg2.setAttributes = function setAttributes(removeAttribute, obj) {
for (const key10005 in arg1) {
if (!arg1.hasOwnProperty(key10005)) {
continue;
} else {
let tmp = arg1[key10005];
if (null == tmp) {
let removeAttributeResult = arg0.removeAttribute(key10005);
continue;
} else {
let attr = arg0.setAttribute(key10005, tmp);
continue;
}
continue;
}
continue;
}
};
},
{}
];
obj[35] = items34;
const items35 = [
(arg0, arg1, arg2) => {
module.exports = function uuid() {
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (arg0) => {
const tmp = 16 * Math.random() | 0;
let str = tmp;
if ("x" !== arg0) {
str = 3 & tmp | 8;
}
return str.toString(16);
});
};
},
{}
];
obj[36] = items35;
const items36 = [
(arg0, arg1, arg2) => {
arg2.deferred = function deferred(arg0) {
closure_0 = arg0;
return () => {
let length;
const items = [];
let num = 0;
if (0 < arguments.length) {
do {
items[num] = arguments[num];
num = num + 1;
length = arguments.length;
} while (num < length);
}
const timerId = setTimeout(() => {
try {
items.apply(undefined, items);
} catch (tmp4) {
const _console = console;
console.log("Error in callback function");
const _console2 = console;
console.log(tmp4);
}
}, 1);
};
};
},
{}
];
obj[37] = items36;
const items37 = [
(arg0, arg1, arg2) => {
arg2.once = function once(arg0) {
closure_0 = arg0;
c1 = false;
return () => {
let length;
const items = [];
let num = 0;
if (0 < arguments.length) {
do {
items[num] = arguments[num];
num = num + 1;
length = arguments.length;
} while (num < length);
}
if (!c1) {
c1 = true;
closure_0.apply(undefined, items);
}
};
};
},
{}
];
obj[38] = items37;
const items38 = [
(arg0, arg1, arg2) => {
arg2.promiseOrCallback = function promiseOrCallback(promise, onceResult) {
if (onceResult) {
promise.then((result) => onceResult(null, result)).catch((error) => onceResult(error));
} else {
return promise;
}
};
},
{}
];
obj[39] = items38;
const items39 = [
(arg0, arg1, arg2) => {
function wrapPromise(arg0) {
closure_0 = arg0;
return function() {
let length;
const items = [];
let num = 0;
if (0 < arguments.length) {
do {
items[num] = arguments[num];
num = num + 1;
length = arguments.length;
} while (num < length);
}
let onceResult;
if (typeof items[items.length - 1] === "function") {
onceResult = closure_1.once(closure_0.deferred(items.pop()));
}
return closure_2.promiseOrCallback(closure_0.apply(this, items), onceResult);
};
}
closure_0 = global("./lib/deferred");
closure_1 = global("./lib/once");
closure_2 = global("./lib/promise-or-callback");
wrapPromise.wrapPrototype = (arg0, arg1) => {
closure_0 = arg0;
let obj = arg1;
if (undefined === arg1) {
obj = {};
}
closure_1 = obj.ignoreMethods || [];
closure_2 = true === obj.transformPrivateMethods;
const ownPropertyNames = Object.getOwnPropertyNames(arg0.prototype);
const found = ownPropertyNames.filter((item) => {
let tmp = "constructor" !== item;
if (tmp) {
tmp = typeof closure_0.prototype[item] === "function";
}
let tmp4 = closure_2;
const index = closure_1.indexOf(item);
if (!tmp4) {
tmp4 = "_" !== item.charAt(0);
}
if (tmp) {
tmp = tmp4;
}
if (tmp) {
tmp = -1 === index;
}
return tmp;
});
const item = found.forEach((item) => {
closure_0 = closure_0.prototype[item];
closure_0.prototype[item] = function() {
let length;
const items = [];
let num = 0;
if (0 < arguments.length) {
do {
items[num] = arguments[num];
num = num + 1;
length = arguments.length;
} while (num < length);
}
let onceResult;
if (typeof items[items.length - 1] === "function") {
onceResult = closure_1.once(closure_0.deferred(items.pop()));
}
return closure_2.promiseOrCallback(closure_0.apply(this, items), onceResult);
};
});
return arg0;
};
module.exports = wrapPromise;
},
{ "./lib/deferred": 37, "./lib/once": 38, "./lib/promise-or-callback": 39 }
];
obj[40] = items39;
const items40 = [
function(arg0, arg1, obj) {
const fn = (arg0) => {
function loadScript$1(forceScriptReload) {
closure_0 = forceScriptReload;
const json = JSON.stringify(forceScriptReload);
if (!forceScriptReload.forceScriptReload) {
if (closure_0[json]) {
return tmp3;
}
}
let element = ;
const tmp4 = forceScriptReload.dataAttributes || {};
closure_2 = tmp4;
let head = forceScriptReload.container;
if (!head) {
const _document = document;
head = document.head;
}
element.src = forceScriptReload.src;
element.id = forceScriptReload.id || "";
element.async = true;
if (forceScriptReload.type) {
const concat = "".concat;
let attr = element.setAttribute("type", "".concat(forceScriptReload.type));
}
if (forceScriptReload.crossorigin) {
const concat2 = "".concat;
const attr1 = element.setAttribute("crossorigin", "".concat(forceScriptReload.crossorigin));
}
const keys = Object.keys(tmp4);
const item = keys.forEach((item) => {
const combined = "data-".concat(item);
const attr = element.setAttribute(combined, "".concat(closure_2[item]));
});
const promise = new Promise((arg0, arg1) => {
closure_0 = arg0;
element = arg1;
const listener = element.addEventListener("load", () => { ... });
const listener1 = element.addEventListener("error", () => { ... });
const listener2 = element.addEventListener("abort", () => { ... });
head.appendChild(element);
});
closure_0[json] = promise;
return promise;
}
function loadAXOScript(combined2, minified) {
let flag = minified;
if (undefined === minified) {
flag = true;
}
let amd = typeof define === "function";
if (typeof define === "function") {
const _window4 = window;
amd = window.define.amd;
}
if (amd) {
const _window = window;
let amd1 = typeof define2 === "function";
if (typeof define2 === "function") {
const _window5 = window;
amd1 = window.define.amd;
}
if (amd1) {
const _window2 = window;
amd1 = typeof window.requirejs === "function";
}
if (amd1) {
const _window3 = window;
amd1 = typeof window.requirejs.config === "function";
}
if (amd1) {
obj2 = { paths: null };
const obj3 = {};
obj3[fastlane] = combined2;
obj2.paths = obj3;
globalThis.requirejs.config(obj2);
}
const concat = "".concat;
const combined = "".concat(fastlane, "/");
const AXO_ASSET_NAME = obj2.AXO_ASSET_NAME;
closure_0 = combined.concat(flag ? AXO_ASSET_NAME.minified : AXO_ASSET_NAME.unminified);
const promise = new Promise((arg0, arg1) => {
const items = [closure_0];
const _module = window.require(items, arg0, arg1);
});
return promise;
} else {
const obj = { id: "axo-id", src: combined2, forceScriptReload: true };
return loadScript$1(obj);
}
}
let obj = {};
closure_0 = {};
loadScript$1.clearCache = () => {
closure_0 = {};
};
obj.loadScript = undefined;
loadScript$1 = undefined;
obj.loadStylesheet = undefined;
obj.loadScript = loadScript$1;
obj.loadStylesheet = function loadStylesheet(href) {
const element = document.querySelector("link[href=\"".concat(href.href, "\"]"));
if (element) {
return Promise.resolve(element);
} else {
const _document = document;
const element1 = ;
let head = href.container;
if (!head) {
const _document2 = document;
head = document.head;
}
const attr = element1.setAttribute("rel", "stylesheet");
const attr1 = element1.setAttribute("type", "text/css");
const attr2 = element1.setAttribute("href", href.href);
const attr3 = element1.setAttribute("id", href.id);
if (head.firstChild) {
head.insertBefore(element1, head.firstChild);
} else {
head.appendChild(element1);
}
return Promise.resolve(element1);
}
};
const fastlane = "fastlane";
let obj2 = { AXO_ASSET_NAME: { minified: "axo.min", unminified: "axo" }, AXO_ASSET_PATH: "connect-boba", LOCALE_PATH: "".concat("connect-boba", "/locales/"), CDNX_PROD: "https://www.paypalobjects.com" };
const BT = "BT";
const PPCP = "PPCP";
let obj3 = { client: "client", hostedFields: "hosted-fields" };
const obj4 = {};
const obj5 = { id: "client", module: "client", amdModule: null, script: null };
const obj6 = { unminified: null, minified: null };
let combined = "".concat("braintree", "/");
obj6.unminified = combined.concat(obj3.client);
let combined1 = "".concat("braintree", "/");
obj6.minified = combined1.concat(obj3.client, ".min");
obj5.amdModule = obj6;
obj5.script = { unminified: "".concat(obj3.client, ".js"), minified: "".concat(obj3.client, ".min.js") };
obj4.client = obj5;
const obj8 = { id: "hcf", module: "hostedFields", amdModule: null, script: null };
const obj9 = { unminified: null, minified: null };
let combined2 = "".concat("braintree", "/");
obj9.unminified = combined2.concat(obj3.hostedFields);
let combined3 = "".concat("braintree", "/");
obj9.minified = combined3.concat(obj3.hostedFields, ".min");
obj8.amdModule = obj9;
const obj7 = { unminified: "".concat(obj3.client, ".js"), minified: "".concat(obj3.client, ".min.js") };
({ concat, concat: concat2 } = "");
obj8.script = { unminified: "".concat(obj3.hostedFields, ".js"), minified: "".concat(obj3.hostedFields, ".min.js") };
obj4.hostedFields = obj8;
arg0.constants = obj2;
arg0.loadAxo = function loadAxo(arg0) {
const self = this;
const f125861 = () => {
let minified = () => { ... };
closure_5 = { label: 0, sent() { ... }, trys: [], ops: [] };
let obj = { next: () => { ... }, throw: () => { ... }, return: () => { ... } };
let btSdkVersion = 2;
if (typeof Symbol === "function") {
let _Symbol = Symbol;
obj[Symbol.iterator] = /* F125855 */ function() { ... };
}
return obj;
};
return new Promise((fn, arg1) => {
closure_0 = fn;
closure_1 = arg1;
function fulfilled() { ... }
let iter = fulfilled;
function rejected() { ... }
function step() { ... }
iter = iter.apply(closure_0, []);
const iter2 = iter.next();
value = iter2.value;
if (iter2.done) {
fn(value);
} else {
closure_0 = value;
let tmp4 = value;
if (!(value instanceof closure_1)) {
tmp4 = new tmp(() => { ... });
}
tmp4.then(fulfilled, rejected);
}
});
};
};
if (typeof obj === "object") {
if (undefined !== arg1) {
fn(obj);
}
}
let self = this;
if (typeof globalThis !== "undefined") {
self = globalThis;
}
obj = {};
self.loadAxo = obj;
fn(obj);
},
{}
];
obj[41] = items40;
const items41 = [
function(arg0, arg1, arg2) {
let fn = this;
if (this) {
fn = this.__assign;
}
if (!fn) {
fn = function() {
let tmp = Object.assign || ((arg0) => {
for (let num = 1; num < length; num = num + 1) {
let tmp = arguments[num];
for (const key10012 in tmp) {
let _Object = Object;
hasOwnProperty = Object.prototype.hasOwnProperty;
let call = hasOwnProperty.call;
if (typeof call === "unknown") {
let hasOwnPropertyResult = hasOwnProperty(key10012);
} else {
hasOwnPropertyResult = call(tmp, key10012);
}
if (!hasOwnPropertyResult) {
continue;
} else {
arg0[key10012] = tmp[key10012];
continue;
}
continue;
}
}
return arg0;
});
const self = this;
closure_0 = tmp;
const apply = tmp.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
};
}
function creditCardType(arg0) {
closure_0 = arg0;
items = [];
if (validInputType.isValidInputType(arg0)) {
if (0 === arg0.length) {
return closure_8.map((item) => {
let tmp = dependencyMap[item];
if (!tmp) {
tmp = items[item];
}
return closure_1_5.clone(tmp);
});
} else {
const item = closure_8.forEach((item) => {
let tmp = dependencyMap[item];
if (!tmp) {
tmp = items[item];
}
const result = closure_2.addMatchingCardsToResults(closure_0, tmp, items);
});
const findBestMatchResult = closure_4.findBestMatch(items);
if (findBestMatchResult) {
const items1 = [findBestMatchResult];
items = items1;
}
return items;
}
} else {
return items;
}
}
closure_0 = fn;
dependencyMap = global("./lib/card-types");
closure_2 = global("./lib/add-matching-cards-to-results");
const validInputType = global("./lib/is-valid-input-type");
closure_4 = global("./lib/find-best-match");
const globalResult = global("./lib/clone");
closure_5 = globalResult;
const dependencyMap2 = {};
const obj = { VISA: "visa", MASTERCARD: "mastercard", AMERICAN_EXPRESS: "american-express", DINERS_CLUB: "diners-club", DISCOVER: "discover", JCB: "jcb", UNIONPAY: "unionpay", MAESTRO: "maestro", ELO: "elo", MIR: "mir", HIPER: "hiper", HIPERCARD: "hipercard" };
let items = [, , , , , , , , , , , ];
({ VISA: arr[0], MASTERCARD: arr[1], AMERICAN_EXPRESS: arr[2], DINERS_CLUB: arr[3], DISCOVER: arr[4], JCB: arr[5], UNIONPAY: arr[6], MAESTRO: arr[7], ELO: arr[8], MIR: arr[9], HIPER: arr[10], HIPERCARD: arr[11] } = obj);
closure_8 = globalResult.clone(items);
creditCardType.getTypeInfo = (arg0) => {
let tmp = dependencyMap2[arg0];
if (!tmp) {
tmp = dependencyMap[arg0];
}
return globalResult.clone(tmp);
};
creditCardType.removeCard = (arg0) => {
const index = closure_8.indexOf(arg0);
if (-1 === index) {
const _Error = Error;
const error = new Error("\"" + arg0 + "\" is not a supported card type.");
throw error;
} else {
closure_8.splice(index, 1);
}
};
creditCardType.addCard = (type) => {
closure_6[type.type] = type;
if (-1 === closure_8.indexOf(type.type)) {
closure_8.push(type.type);
}
};
creditCardType.updateCard = (arg0, type) => {
let tmp = dependencyMap2[arg0];
if (!tmp) {
tmp = dependencyMap[arg0];
}
if (tmp) {
if (type.type) {
if (tmp.type !== type.type) {
const _Error2 = Error;
const error = new Error("Cannot overwrite type parameter.");
throw error;
}
}
const tmp11 = closure_0(closure_0({}, globalResult.clone(tmp)), type);
dependencyMap2[tmp11.type] = tmp11;
} else {
const _Error = Error;
const concat = "\"".concat;
const error1 = new Error("\"".concat(arg0, "\" is not a recognized type. Use `addCard` instead.'"));
throw error1;
}
};
creditCardType.changeOrder = (arg0, arg1) => {
const index = closure_8.indexOf(arg0);
if (-1 === index) {
const _Error = Error;
const error = new Error("\"" + arg0 + "\" is not a supported card type.");
throw error;
} else {
closure_8.splice(index, 1);
closure_8.splice(arg1, 0, arg0);
}
};
creditCardType.resetModifications = () => {
closure_8 = globalResult.clone(items);
closure_6 = {};
};
creditCardType.types = obj;
module.exports = creditCardType;
},
{ "./lib/add-matching-cards-to-results": 43, "./lib/card-types": 44, "./lib/clone": 45, "./lib/find-best-match": 46, "./lib/is-valid-input-type": 47 }
];
obj[42] = items41;
const items42 = [
(fn, arg1, arg2) => {
arg2.addMatchingCardsToResults = undefined;
closure_0 = fn("./clone");
closure_1 = fn("./matches");
arg2.addMatchingCardsToResults = function addMatchingCardsToResults(arg0, patterns, items) {
let num = 0;
if (0 < patterns.patterns.length) {
while (!closure_1.matches(arg0, patterns.patterns[num])) {
num = num + 1;
}
const cloneResult = closure_0.clone(patterns);
const _Array = Array;
const _String = String;
if (Array.isArray(patterns.patterns[num])) {
let length = _String(tmp[0]).length;
} else {
length = _String(tmp).length;
}
if (arg0.length >= length) {
cloneResult.matchStrength = length;
}
items.push(cloneResult);
}
};
},
{ "./clone": 45, "./matches": 48 }
];
obj[43] = items42;
const items43 = [
(arg0, arg1, arg2) => {
const obj = { visa: { niceType: "Visa", type: "visa", patterns: [4], gaps: [4, 8, 12], lengths: [16, 18, 19], code: { name: "CVV", size: 3 } }, mastercard: null, "american-express": { niceType: "American Express", type: "american-express", patterns: [34, 37], gaps: [4, 10], lengths: [15], code: { name: "CID", size: 4 } }, "diners-club": null, discover: null, jcb: null, unionpay: null, maestro: null, elo: null, mir: null, hiper: { niceType: "Hiper", type: "hiper", patterns: [637095, 63737423, 63743358, 637568, 637599, 637609, 637612], gaps: [4, 8, 12], lengths: [16], code: { name: "CVC", size: 3 } }, hipercard: { niceType: "Hipercard", type: "hipercard", patterns: [606282], gaps: [4, 8, 12], lengths: [16], code: { name: "CVC", size: 3 } } };
const obj2 = { niceType: "Mastercard", type: "mastercard", patterns: null, gaps: [4, 8, 12], lengths: [16], code: { name: "CVC", size: 3 } };
const items = [[51, 55], [2221, 2229], [223, 229], [23, 26], [270, 271], 2720];
obj2.patterns = items;
obj.mastercard = obj2;
const obj3 = { niceType: "Diners Club", type: "diners-club", patterns: null, gaps: [4, 10], lengths: [14, 16, 19], code: { name: "CVV", size: 3 } };
const items1 = [[300, 305], 36, 38, 39];
obj3.patterns = items1;
obj["diners-club"] = obj3;
const obj4 = { niceType: "Discover", type: "discover", patterns: null, gaps: [4, 8, 12], lengths: [16, 19], code: { name: "CID", size: 3 } };
const items2 = [6011, [644, 649], 65];
obj4.patterns = items2;
obj.discover = obj4;
const obj5 = { niceType: "JCB", type: "jcb", patterns: null, gaps: [4, 8, 12], lengths: [16, 17, 18, 19], code: { name: "CVV", size: 3 } };
const items3 = [2131, 1800, [3528, 3589]];
obj5.patterns = items3;
obj.jcb = obj5;
const obj6 = { niceType: "UnionPay", type: "unionpay", patterns: null, gaps: [4, 8, 12], lengths: [14, 15, 16, 17, 18, 19], code: { name: "CVN", size: 3 } };
const items4 = [620, [62100, 62182], [62184, 62187], [62185, 62197], [62200, 62205], [622010, 622999], 622018, [62207, 62209], [623, 626], 6270, 6272, 6276, [627700, 627779], [627781, 627799], [6282, 6289], 6291, 6292, 810, [8110, 8131], [8132, 8151], [8152, 8163], [8164, 8171]];
obj6.patterns = items4;
obj.unionpay = obj6;
const obj7 = { niceType: "Maestro", type: "maestro", patterns: null, gaps: [4, 8, 12], lengths: [12, 13, 14, 15, 16, 17, 18, 19], code: { name: "CVC", size: 3 } };
const items5 = [493698, [500000, 504174], [504176, 506698], [506779, 508999], [56, 59], 63, 67, 6];
obj7.patterns = items5;
obj.maestro = obj7;
const obj8 = { niceType: "Elo", type: "elo", patterns: null, gaps: [4, 8, 12], lengths: [16], code: { name: "CVE", size: 3 } };
const items6 = [401178, 401179, 438935, 457631, 457632, 431274, 451416, 457393, 504175, [506699, 506778], [509000, 509999], 627780, 636297, 636368, [650031, 650033], [650035, 650051], [650405, 650439], [650485, 650538], [650541, 650598], [650700, 650718], [650720, 650727], [650901, 650978], [651652, 651679], [655000, 655019], [655021, 655058]];
obj8.patterns = items6;
obj.elo = obj8;
const obj9 = { niceType: "Mir", type: "mir", patterns: null, gaps: [4, 8, 12], lengths: [16, 17, 18, 19], code: { name: "CVP2", size: 3 } };
const items7 = [[2200, 2204]];
obj9.patterns = items7;
obj.mir = obj9;
module.exports = obj;
},
{}
];
obj[44] = items43;
const items44 = [
(arg0, arg1, arg2) => {
arg2.clone = function clone(arg0) {
let parsed = null;
if (arg0) {
const _JSON = JSON;
const _JSON2 = JSON;
parsed = JSON.parse(JSON.stringify(arg0));
}
return parsed;
};
},
{}
];
obj[45] = items44;
const items45 = [
(arg0, arg1, arg2) => {
arg2.findBestMatch = function findBestMatch(arr) {
const length = arr.filter((matchStrength) => matchStrength.matchStrength).length;
let reduced = null;
if (tmp) {
reduced = arr.reduce((acc, matchStrength) => {
let tmp = acc;
let tmp2 = matchStrength;
if (acc) {
const _Number = Number;
const _Number2 = Number;
if (NumberResult < Number(matchStrength.matchStrength)) {
tmp = matchStrength;
}
tmp2 = tmp;
NumberResult = Number(tmp.matchStrength);
}
return tmp2;
});
}
return reduced;
};
},
{}
];
obj[46] = items45;
const items46 = [
(arg0, arg1, arg2) => {
arg2.isValidInputType = function isValidInputType(str) {
let tmp = typeof str === "string";
if (typeof str !== "string") {
const _String = String;
tmp = str instanceof String;
}
return tmp;
};
},
{}
];
obj[47] = items46;
const items47 = [
(arg0, arg1, arg2) => {
arg2.matches = function matches(str, arg1) {
if (Array.isArray(arg1)) {
const first = arg1[0];
const _String2 = String;
const substr = str.substr(0, String(first).length);
const _parseInt = parseInt;
const parsed = parseInt(substr, 10);
const _parseInt2 = parseInt;
const _String3 = String;
const _parseInt3 = parseInt;
const _String4 = String;
const parsed1 = parseInt(String(first).substr(0, substr.length), 10);
const str2 = String(first);
const str3 = String(arg1[1]);
let tmp2 = parsed >= parsed1 && parsed <= parseInt(String(arg1[1]).substr(0, substr.length), 10);
const tmp6 = parsed >= parsed1 && parsed <= parseInt(String(arg1[1]).substr(0, substr.length), 10);
} else {
const _String = String;
str = String(arg1);
const substr1 = str.substring(0, str.length);
tmp2 = substr1 === str.substring(0, str.length);
}
return tmp2;
};
},
{}
];
obj[48] = items47;
const items48 = [
(fn, arg1, arg2) => {
arg2.Framebus = undefined;
const Framebus = fn("./lib");
let _Promise = typeof window !== "undefined";
if (typeof window !== "undefined") {
let _window = window;
_Promise = window.Promise;
}
class Framebus {
constructor(arg0) {
obj = {};
obj1 = fn;
if (undefined === fn) {
obj1 = {};
}
obj.origin = obj1.origin || "*";
obj.channel = obj1.channel || "";
obj.verifyDomain = obj1.verifyDomain;
obj.targetFrames = obj1.targetFrames || [];
obj.limitBroadcastToFramesArray = Boolean(obj1.targetFrames);
obj.isDestroyed = false;
obj.listeners = [];
limitBroadcastToFramesArray = obj.verifyDomain;
if (!limitBroadcastToFramesArray) {
limitBroadcastToFramesArray = obj.limitBroadcastToFramesArray;
}
obj.hasAdditionalChecksForOnListeners = Boolean(limitBroadcastToFramesArray);
return;
}
static setPromise(arg0) {
Framebus.Promise = fn;
return;
}
static target(arg0) {
obj = fn;
obj1 = Object.create(Framebus.prototype);
obj3 = {};
if (undefined === fn) {
obj = {};
}
obj3.origin = obj.origin || "*";
obj3.channel = obj.channel || "";
obj3.verifyDomain = obj.verifyDomain;
obj3.targetFrames = obj.targetFrames || [];
obj3.limitBroadcastToFramesArray = Boolean(obj.targetFrames);
obj3.isDestroyed = false;
obj3.listeners = [];
limitBroadcastToFramesArray = obj3.verifyDomain;
if (!limitBroadcastToFramesArray) {
limitBroadcastToFramesArray = obj3.limitBroadcastToFramesArray;
}
obj3.hasAdditionalChecksForOnListeners = Boolean(limitBroadcastToFramesArray);
return obj3;
}
addTargetFrame(arg0) {
if (this.limitBroadcastToFramesArray) {
tmp2 = fn;
targetFrames = tmp.targetFrames;
arr1 = targetFrames.push(fn);
}
return;
}
include(arg0) {
tmp = null != fn;
if (tmp) {
tmp2 = null != fn.Window;
if (tmp2) {
flag = fn.constructor === fn.Window;
if (flag) {
tmp3 = Framebus;
childWindows = Framebus.childWindows;
arr1 = childWindows.push(fn);
flag = true;
}
tmp2 = flag;
}
tmp = tmp2;
}
return tmp;
}
target(arg0) {
return Framebus.target(fn);
}
emit(arg0, arg1, arg2) {
self = this;
if (this.isDestroyed) {
flag4 = false;
return false;
} else {
tmp = fn;
origin = self.origin;
namespaceEventResult = self.namespaceEvent(fn);
obj = origin;
if (origin.isntString(namespaceEventResult)) {
flag3 = false;
return false;
} else if (obj.isntString(origin)) {
flag2 = false;
return false;
} else {
tmp3 = arg1;
tmp4 = arg2;
tmp5 = arg1;
if (typeof arg1 === "function") {
tmp4 = arg1;
}
tmp6 = namespaceEventResult;
tmp7 = origin;
tmp8 = tmp5;
tmp9 = tmp4;
packagePayloadResult = obj.packagePayload(namespaceEventResult, origin, tmp5, tmp4);
closure_1 = packagePayloadResult;
flag = packagePayloadResult;
if (flag) {
if (self.limitBroadcastToFramesArray) {
result = self.targetFramesAsWindows();
item = result.forEach(() => { ... });
flag = true;
} else {
obj1 = { origin: null, frame: null };
obj1.origin = origin;
tmp11 = globalThis;
_window = window;
_self = window.top;
if (!_self) {
_window2 = window;
_self = window.self;
}
obj1.frame = _self;
broadcastResult = obj.broadcast(packagePayloadResult, obj1);
flag = true;
}
}
return flag;
}
}
}
emitAsPromise(arg0, arg1) {
closure_0 = fn;
closure_1 = arg1;
self = this;
promise = new Framebus.Promise(() => { ... });
return promise;
}
on(arg0, arg1) {
self = this;
closure_0 = arg1;
if (this.isDestroyed) {
flag2 = false;
return false;
} else {
tmp = fn;
origin = self.origin;
namespaceEventResult = self.namespaceEvent(fn);
tmp3 = Framebus;
result = Framebus.subscriptionArgsInvalid(namespaceEventResult, arg1, origin);
flag = !result;
if (!result) {
fn = arg1;
if (self.hasAdditionalChecksForOnListeners) {
fn = function d() { ... };
}
listeners = self.listeners;
obj = { eventName: null, handler: null, originalHandler: null };
obj.eventName = namespaceEventResult;
obj.handler = fn;
obj.originalHandler = arg1;
arr1 = listeners.push(obj);
obj1 = tmp3.subscribers[origin];
if (!obj1) {
obj1 = {};
}
tmp3.subscribers[origin] = obj1;
items = tmp3.subscribers[origin][namespaceEventResult];
if (!items) {
items = [];
}
tmp3.subscribers[origin][namespaceEventResult] = items;
arr3 = tmp3.subscribers[origin][namespaceEventResult];
arr4 = arr3.push(fn);
flag = true;
}
return flag;
}
}
off(arg0, arg1) {
self = this;
if (this.isDestroyed) {
flag5 = false;
return false;
} else {
tmp = arg1;
tmp2 = arg1;
if (self.verifyDomain) {
num = 0;
num2 = 1;
tmp3 = arg1;
tmp2 = arg1;
if (0 < self.listeners.length) {
do {
tmp4 = self.listeners[num];
tmp5 = num;
handler = tmp3;
if (tmp4.originalHandler === arg1) {
handler = tmp4.handler;
}
num = num + 1;
tmp3 = handler;
tmp2 = handler;
} while (num < self.listeners.length);
}
}
tmp6 = fn;
namespaceEventResult = self.namespaceEvent(fn);
origin = self.origin;
tmp8 = Framebus;
if (Framebus.subscriptionArgsInvalid(namespaceEventResult, tmp2, origin)) {
flag4 = false;
return false;
} else {
arr = tmp8.subscribers[origin] && tmp8.subscribers[origin][namespaceEventResult];
if (arr) {
num3 = 0;
num4 = 1;
if (0 < arr.length) {
tmp9 = num3;
while (arr[num3] !== tmp2) {
num3 = num3 + 1;
}
spliceResult = arr.splice(num3, 1);
flag3 = true;
return true;
}
flag2 = false;
return false;
} else {
flag = false;
return false;
}
}
}
}
teardown() {
self = this;
if (!this.isDestroyed) {
flag = true;
self.isDestroyed = true;
num = 0;
num2 = 1;
num3 = 0;
if (0 < self.listeners.length) {
do {
tmp = self.listeners[num3];
offResult = self.off(tmp.eventName, tmp.handler);
num3 = num3 + 1;
length = self.listeners.length;
} while (num3 < length);
}
self.listeners.length = 0;
}
return;
}
passesVerifyDomainCheck(arg0) {
self = this;
verifyDomain = this.verifyDomain;
checkOriginResult = !verifyDomain;
if (verifyDomain) {
tmp2 = fn;
checkOriginResult = self.checkOrigin(fn);
}
return checkOriginResult;
}
targetFramesAsWindows() {
if (this.limitBroadcastToFramesArray) {
targetFrames = this.targetFrames;
mapped = targetFrames.map(() => { ... });
found = mapped.filter(/* F125868 */ function() { ... });
} else {
found = [];
}
return found;
}
hasMatchingTargetFrame(arg0) {
self = this;
closure_0 = fn;
if (this.limitBroadcastToFramesArray) {
result = self.targetFramesAsWindows();
tmp = globalThis;
_Boolean = Boolean;
return Boolean(result.find(/* F125869 */ function() { ... }));
} else {
flag = true;
return true;
}
}
checkOrigin(arg0) {
url = document.createElement("a");
url.href = location.href;
if ("https:" === url.protocol) {
str4 = url.host;
str5 = "";
host = str4.replace(/:443$/, "");
} else {
str = "http:";
if ("http:" === url.protocol) {
str2 = url.host;
str3 = "";
host = str2.replace(/:80$/, "");
} else {
host = url.host;
}
}
tmp = `${url.protocol}//${host}` === fn;
if (!tmp) {
self = this;
verifyDomain = this.verifyDomain;
verifyDomainResult = !verifyDomain;
if (verifyDomain) {
verifyDomainResult = self.verifyDomain(fn);
}
tmp = verifyDomainResult;
}
return tmp;
}
namespaceEvent(arg0) {
combined1 = fn;
if (this.channel) {
str = "";
concat = "".concat;
str2 = ":";
combined = "".concat(tmp.channel, ":");
combined1 = combined.concat(fn);
}
return combined1;
}
}
Framebus.Promise = _Promise;
arg2.Framebus = Framebus;
},
{ "./lib": 57 }
];
obj[49] = items48;
const items49 = [
(arg0, arg1, arg2) => {
const globalResult = global("./lib");
globalResult.attach();
module.exports = global("./framebus").Framebus;
},
{ "./framebus": 49, "./lib": 57 }
];
obj[50] = items49;
const items50 = [
(fn, arg1, arg2) => {
arg2.attach = undefined;
arg2.detach = undefined;
closure_0 = fn("./");
c1 = false;
arg2.attach = function attach() {
let tmp = c1;
if (!c1) {
const _window = window;
tmp = typeof window === "undefined";
}
if (!tmp) {
c1 = true;
const _window2 = window;
const listener = window.addEventListener("message", closure_0.onMessage, false);
}
};
arg2.detach = function detach() {
c1 = false;
const removed = window.removeEventListener("message", closure_0.onMessage, false);
};
},
{ "./": 57 }
];
obj[51] = items50;
const items51 = [
(fn, arg1, arg2) => {
arg2.broadcastToChildWindows = undefined;
closure_0 = fn("./");
arg2.broadcastToChildWindows = function broadcastToChildWindows(data, origin, source) {
let diff = closure_0.childWindows.length - 1;
if (0 <= diff) {
do {
let obj = closure_0;
let tmp2 = closure_0.childWindows[diff];
if (tmp2.closed) {
let childWindows = obj.childWindows;
let spliceResult = childWindows.splice(diff, 1);
} else if (source !== tmp2) {
let obj2 = { origin, frame: tmp2.top };
let broadcastResult = obj.broadcast(data, obj2);
}
diff = diff - 1;
} while (0 <= diff);
}
};
},
{ "./": 57 }
];
obj[52] = items51;
const items52 = [
(fn, arg1, arg2) => {
arg2.broadcast = undefined;
closure_0 = fn("./");
function broadcast(packagePayloadResult, arg1) {
let num = 0;
({ origin, frame } = arg1);
try {
frame.postMessage(packagePayloadResult, origin);
let hasOpenerResult = closure_0.hasOpener(frame);
if (hasOpenerResult) {
const _window = window;
hasOpenerResult = frame.opener.top !== window.top;
}
if (hasOpenerResult) {
const obj = { origin, frame: frame.opener.top };
broadcast(packagePayloadResult, obj);
}
let tmp10 = tmp9;
if (frame.frames[num]) {
do {
let obj2 = { origin, frame: null };
obj2.frame = tmp10;
let tmp13 = broadcast(packagePayloadResult, obj2);
let sum = num + 1;
num = sum;
tmp10 = frame.frames[sum];
} while (tmp16);
}
} catch (err) {
}
}
arg2.broadcast = broadcast;
},
{ "./": 57 }
];
obj[53] = items52;
const items53 = [
(arg0, arg1, arg2) => {
arg2.prefix = undefined;
arg2.childWindows = undefined;
arg2.subscribers = undefined;
arg2.prefix = "/*framebus*/";
arg2.childWindows = [];
arg2.subscribers = {};
},
{}
];
obj[54] = items53;
const items54 = [
(fn, arg1, arg2) => {
arg2.dispatch = undefined;
closure_0 = fn("./");
arg2.dispatch = function dispatch(arg0, arg1, arg2, arg3, arg4) {
let length;
if (closure_0.subscribers[arg0]) {
if (tmp.subscribers[arg0][arg1]) {
const items = [];
if (arg2) {
items.push(arg2);
}
if (arg3) {
items.push(arg3);
}
let num = 0;
if (0 < tmp.subscribers[arg0][arg1].length) {
do {
let obj = closure_0.subscribers[arg0][arg1][num];
let applyResult = obj.apply(arg4, items);
num = num + 1;
length = closure_0.subscribers[arg0][arg1].length;
} while (num < length);
}
}
}
};
},
{ "./": 57 }
];
obj[55] = items54;
const items55 = [
(arg0, arg1, arg2) => {
arg2.hasOpener = function hasOpener(frame) {
let tmp = frame.top === frame;
if (tmp) {
let tmp3 = null != frame.opener;
if (tmp3) {
let tmp4 = frame.opener !== frame;
if (tmp4) {
tmp4 = true !== frame.opener.closed;
}
tmp3 = tmp4;
}
tmp = tmp3;
}
return tmp;
};
},
{}
];
obj[56] = items55;
const items56 = [
function(fn, arg1, arg2) {
const self = this;
let self2 = this;
if (this) {
self2 = self.__createBinding;
}
if (self2) {
fn = self;
if (self) {
fn = self.__exportStar;
}
if (!fn) {
fn = (obj, arg1) => {
for (const key10007 in arg0) {
let tmp6 = "default" === key10007;
if (tmp6) {
if (tmp6) {
continue;
} else {
let tmp4 = self2(arg1, arg0, key10007);
continue;
}
continue;
} else {
let _Object = Object;
hasOwnProperty = Object.prototype.hasOwnProperty;
let call = hasOwnProperty.call;
if (typeof call === "unknown") {
let hasOwnPropertyResult = hasOwnProperty(key10007);
} else {
hasOwnPropertyResult = call(arg1, key10007);
}
}
}
};
}
const _Object2 = Object;
fn(fn("./attach"), arg2);
fn(fn("./broadcast-to-child-windows"), arg2);
fn(fn("./broadcast"), arg2);
fn(fn("./constants"), arg2);
fn(fn("./dispatch"), arg2);
fn(fn("./has-opener"), arg2);
fn(fn("./is-not-string"), arg2);
fn(fn("./message"), arg2);
fn(fn("./package-payload"), arg2);
fn(fn("./send-message"), arg2);
fn(fn("./subscribe-replier"), arg2);
fn(fn("./subscription-args-invalid"), arg2);
fn(fn("./types"), arg2);
fn(fn("./unpack-payload"), arg2);
} else {
let _Object = Object;
}
},
{ "./attach": 51, "./broadcast": 53, "./broadcast-to-child-windows": 52, "./constants": 54, "./dispatch": 55, "./has-opener": 56, "./is-not-string": 58, "./message": 59, "./package-payload": 60, "./send-message": 61, "./subscribe-replier": 62, "./subscription-args-invalid": 63, "./types": 64, "./unpack-payload": 65 }
];
obj[57] = items56;
const items57 = [
(arg0, arg1, arg2) => {
arg2.isntString = function isntString(data) {
return typeof data !== "string";
};
},
{}
];
obj[58] = items57;
const items58 = [
(fn, arg1, arg2) => {
arg2.onMessage = undefined;
closure_0 = fn("./");
arg2.onMessage = function onMessage(data) {
if (!closure_0.isntString(data.data)) {
const unpackPayloadResult = obj.unpackPayload(data);
if (unpackPayloadResult) {
({ eventData, reply } = unpackPayloadResult);
obj.dispatch("*", unpackPayloadResult.event, eventData, reply, data);
obj.dispatch(data.origin, unpackPayloadResult.event, eventData, reply, data);
const result = obj.broadcastToChildWindows(data.data, unpackPayloadResult.origin, data.source);
}
}
};
},
{ "./": 57 }
];
obj[59] = items58;
const items59 = [
(fn, arg1, arg2) => {
arg2.packagePayload = undefined;
closure_0 = fn("./");
arg2.packagePayload = function packagePayload(namespaceEventResult, origin, eventData, fn) {
const obj = { event: namespaceEventResult, origin };
if (typeof fn === "function") {
obj.reply = closure_0.subscribeReplier(fn, origin);
}
obj.eventData = eventData;
try {
const _JSON = JSON;
return closure_0.prefix + JSON.stringify(obj);
} catch (tmp3) {
const _Error = Error;
const concat = "Could not stringify event: ".concat;
const error = new Error("Could not stringify event: ".concat(tmp3.message));
throw error;
}
};
},
{ "./": 57 }
];
obj[60] = items59;
const items60 = [
(arg0, arg1, arg2) => {
arg2.sendMessage = function sendMessage(postMessage, arg1, arg2) {
try {
postMessage.postMessage(arg1, arg2);
} catch (err) {
}
};
},
{}
];
obj[61] = items60;
const items61 = [
function(fn, arg1, arg2) {
fn = this;
if (this) {
fn = this.__importDefault;
}
if (!fn) {
fn = (__esModule) => {
if (!__esModule) {
const obj = { default: __esModule };
let tmp = obj;
} else {
tmp = __esModule;
}
return tmp;
};
}
arg2.subscribeReplier = undefined;
let Framebus = fn("../framebus");
closure_1 = fn(fn("@braintree/uuid"));
arg2.subscribeReplier = function subscribeReplier(fn, origin) {
Framebus = fn;
const defaultResult = origin.default();
closure_2 = defaultResult;
Framebus = Framebus.Framebus;
function replier(arg0, arg1) {
closure_0(arg0, arg1);
Framebus = closure_0.Framebus;
Framebus.target({ origin }).off(defaultResult, replier);
}
Framebus.target({ origin }).on(defaultResult, replier);
return defaultResult;
};
},
{ "../framebus": 49, "@braintree/uuid": 66 }
];
obj[62] = items61;
const items62 = [
(fn, arg1, arg2) => {
arg2.subscriptionArgsInvalid = undefined;
closure_0 = fn("./");
arg2.subscriptionArgsInvalid = function subscriptionArgsInvalid(namespaceEventResult, fn, origin) {
let isntStringResult1 = closure_0.isntString(namespaceEventResult);
if (!isntStringResult1) {
let isntStringResult = typeof fn !== "function";
if (typeof fn === "function") {
isntStringResult = closure_0.isntString(origin);
}
isntStringResult1 = isntStringResult;
}
return isntStringResult1;
};
},
{ "./": 57 }
];
obj[63] = items62;
const items63 = [
(arg0, arg1, arg2) => {
},
{}
];
obj[64] = items63;
const items64 = [
(fn, arg1, arg2) => {
arg2.unpackPayload = undefined;
closure_0 = fn("./");
arg2.unpackPayload = function unpackPayload(data) {
data = data.data;
if (data.slice(0, closure_0.prefix.length) !== closure_0.prefix) {
return false;
} else {
try {
const _JSON = JSON;
const data1 = data.data;
const parsed = JSON.parse(data1.slice(closure_0.prefix.length));
if (parsed.reply) {
({ origin: closure_0, source: closure_1 } = data);
const reply = parsed.reply;
parsed.reply = function reply(eventData) {
if (closure_1_1) {
const packagePayloadResult = closure_0.packagePayload(reply, closure_1_0, eventData);
if (packagePayloadResult) {
closure_1_1.postMessage(packagePayloadResult, tmp4);
}
tmp4 = closure_1_0;
}
};
}
return parsed;
} catch (err) {
return false;
}
}
};
},
{ "./": 57 }
];
obj[65] = items64;
const items65 = [
(arg0, arg1, arg2) => {
module.exports = function uuid() {
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (arg0) => {
const tmp = 16 * Math.random() | 0;
let str = tmp;
if ("x" !== arg0) {
str = 3 & tmp | 8;
}
return str.toString(16);
});
};
},
{}
];
obj[66] = items65;
const items66 = [
(fn, arg1, arg2) => {
arg2.isKitKatWebview = undefined;
arg2.isAndroidChrome = undefined;
arg2.isSamsungBrowser = undefined;
arg2.isIE9 = undefined;
arg2.isIos = undefined;
let userAgent = typeof window !== "undefined";
if (typeof window !== "undefined") {
const _window2 = window;
userAgent = window.navigator;
}
if (userAgent) {
const _window = window;
userAgent = window.navigator.userAgent;
}
closure_1 = fn("@braintree/browser-detection/is-android");
closure_2 = fn("@braintree/browser-detection/is-chrome-os");
closure_3 = fn("@braintree/browser-detection/is-chrome");
arg2.isIos = fn("@braintree/browser-detection/is-ios");
arg2.isIE9 = fn("@braintree/browser-detection/is-ie9");
const re4 = /Version\/\d\.\d* Chrome\/\d*\.0\.0\.0/;
arg2.isKitKatWebview = function isKitKatWebview(arg0) {
let tmp = arg0;
if (undefined === arg0) {
tmp = userAgent;
}
let isMatch = closure_1(tmp);
if (isMatch) {
isMatch = re4.test(tmp);
}
return isMatch;
};
arg2.isAndroidChrome = function isAndroidChrome(arg0) {
let tmp = arg0;
if (undefined === arg0) {
tmp = userAgent;
}
let tmp2 = closure_1(tmp);
if (!tmp2) {
tmp2 = closure_2(tmp);
}
if (tmp2) {
tmp2 = closure_3(tmp);
}
return tmp2;
};
arg2.isSamsungBrowser = function isSamsungBrowser(arg0) {
let arr = arg0;
if (undefined === arg0) {
arr = userAgent;
}
let isMatch = /SamsungBrowser/.test(arr);
if (!isMatch) {
const tmp3 = closure_3(arr);
let tmp4 = !tmp3;
if (!tmp3) {
tmp4 = arr.indexOf("Samsung") > -1;
}
isMatch = tmp4;
}
return isMatch;
};
},
{ "@braintree/browser-detection/is-android": 80, "@braintree/browser-detection/is-chrome": 82, "@braintree/browser-detection/is-chrome-os": 81, "@braintree/browser-detection/is-ie9": 83, "@braintree/browser-detection/is-ios": 84 }
];
obj[67] = items66;
const items67 = [
(arg0, arg1, arg2) => {
const samsungBrowser = global("./lib/device");
module.exports = function supportsInputFormatting() {
return !samsungBrowser.isSamsungBrowser();
};
},
{ "./lib/device": 67 }
];
obj[68] = items67;
const items68 = [
(arg0, arg1, arg2) => {
const first = arguments[4][3][0];
first(...arguments);
},
{ dup: 3 }
];
obj[69] = items68;
const items69 = [
(arg0, arg1, arg2) => {
const first = arguments[4][4][0];
first(...arguments);
},
{ dup: 4 }
];
obj[70] = items69;
const items70 = [
(arg0, arg1, arg2) => {
const first = arguments[4][5][0];
first(...arguments);
},
{ "./is-duckduckgo": 72, "./is-edge": 73, "./is-opera": 77, "./is-samsung": 78, "./is-silk": 79, dup: 5 }
];
obj[71] = items70;
const items71 = [
(arg0, arg1, arg2) => {
const first = arguments[4][6][0];
first(...arguments);
},
{ dup: 6 }
];
obj[72] = items71;
const items72 = [
(arg0, arg1, arg2) => {
const first = arguments[4][7][0];
first(...arguments);
},
{ dup: 7 }
];
obj[73] = items72;
const items73 = [
(arg0, arg1, arg2) => {
module.exports = function isIe9(arg0) {
let userAgent = arg0;
if (!arg0) {
const _window = window;
userAgent = window.navigator.userAgent;
}
return -1 !== userAgent.indexOf("MSIE 9");
};
},
{}
];
obj[74] = items73;
const items74 = [
(arg0, arg1, arg2) => {
const first = arguments[4][14][0];
first(...arguments);
},
{ "./is-ipados": 76, dup: 14 }
];
obj[75] = items74;
const items75 = [
(arg0, arg1, arg2) => {
const first = arguments[4][15][0];
first(...arguments);
},
{ dup: 15 }
];
obj[76] = items75;
const items76 = [
(arg0, arg1, arg2) => {
const first = arguments[4][16][0];
first(...arguments);
},
{ dup: 16 }
];
obj[77] = items76;
const items77 = [
(arg0, arg1, arg2) => {
const first = arguments[4][17][0];
first(...arguments);
},
{ dup: 17 }
];
obj[78] = items77;
const items78 = [
(arg0, arg1, arg2) => {
const first = arguments[4][18][0];
first(...arguments);
},
{ dup: 18 }
];
obj[79] = items78;
const items79 = [
(arg0, arg1, arg2) => {
const first = arguments[4][20][0];
first(...arguments);
},
{ "./dist/is-android": 69, dup: 20 }
];
obj[80] = items79;
const items80 = [
(arg0, arg1, arg2) => {
const first = arguments[4][21][0];
first(...arguments);
},
{ "./dist/is-chrome-os": 70, dup: 21 }
];
obj[81] = items80;
const items81 = [
(arg0, arg1, arg2) => {
const first = arguments[4][22][0];
first(...arguments);
},
{ "./dist/is-chrome": 71, dup: 22 }
];
obj[82] = items81;
const items82 = [
(arg0, arg1, arg2) => {
module.exports = global("./dist/is-ie9");
},
{ "./dist/is-ie9": 74 }
];
obj[83] = items82;
const items83 = [
(arg0, arg1, arg2) => {
const first = arguments[4][27][0];
first(...arguments);
},
{ "./dist/is-ios": 75, dup: 27 }
];
obj[84] = items83;
const items84 = [
(arg0, arg1, arg2) => {
module.exports = global("./dist/supports-input-formatting");
},
{ "./dist/supports-input-formatting": 68 }
];
obj[85] = items84;
const items85 = [
(arg0, arg1, arg2) => {
class AmericanExpress {
constructor(arg0) {
this._client = global.client;
return;
}
getRewardsBalance(arg0) {
nonce = global.nonce;
if (nonce) {
self = this;
tmp12 = assign;
obj1 = { _meta: null, paymentMethodNonce: null };
obj1._meta = { source: "american-express" };
obj1.paymentMethodNonce = nonce;
str = "nonce";
tmp13 = assign(obj1, global);
delete tmp2[tmp];
_client = this._client;
obj4 = { method: "get", endpoint: "payment_methods/amex_rewards_balance", data: null };
obj4.data = tmp13;
requestResult = _client.request(obj4);
catchPromise = requestResult.catch(() => { ... });
} else {
tmp3 = globalThis;
_Promise = Promise;
tmp4 = closure_0;
obj = { type: null, code: null, message: "getRewardsBalance must be called with a nonce." };
tmp5 = closure_1;
obj.type = closure_1.AMEX_NONCE_REQUIRED.type;
obj.code = closure_1.AMEX_NONCE_REQUIRED.code;
tmp6 = new.target;
tmp7 = new.target;
tmp8 = obj;
tmp9 = new closure_0(obj);
tmp10 = tmp9;
catchPromise = Promise.reject(tmp9);
}
return catchPromise;
}
getExpressCheckoutProfile(arg0) {
if (global.nonce) {
self = this;
_client = this._client;
obj1 = { method: "get", endpoint: null, data: null };
str = "payment_methods/amex_express_checkout_cards/";
obj1.endpoint = `payment_methods/amex_express_checkout_cards/${global.nonce}`;
obj4 = { _meta: null, paymentMethodNonce: null };
obj4._meta = { source: "american-express" };
obj4.paymentMethodNonce = global.nonce;
obj1.data = obj4;
requestResult = _client.request(obj1);
catchPromise = requestResult.catch(() => { ... });
} else {
tmp = globalThis;
_Promise = Promise;
tmp2 = closure_0;
obj = { type: null, code: null, message: "getExpressCheckoutProfile must be called with a nonce." };
tmp3 = closure_1;
obj.type = closure_1.AMEX_NONCE_REQUIRED.type;
obj.code = closure_1.AMEX_NONCE_REQUIRED.code;
tmp4 = new.target;
tmp5 = new.target;
tmp6 = obj;
tmp7 = new closure_0(obj);
tmp8 = tmp7;
catchPromise = Promise.reject(tmp7);
}
return catchPromise;
}
teardown() {
tmp = closure_4(this, closure_3(AmericanExpress.prototype));
return Promise.resolve();
}
}
closure_0 = global("../lib/braintree-error");
constants = global("./errors");
const assign = global("../lib/assign").assign;
closure_3 = global("../lib/methods");
closure_4 = global("../lib/convert-methods-to-error");
module.exports = global("@braintree/wrap-promise").wrapPrototype(AmericanExpress);
},
{ "../lib/assign": 140, "../lib/braintree-error": 143, "../lib/convert-methods-to-error": 146, "../lib/methods": 175, "./errors": 87, "@braintree/wrap-promise": 40 }
];
obj[86] = items85;
const items86 = [
(arg0, arg1, arg2) => {
const globalResult = global("../lib/braintree-error");
module.exports = { AMEX_NONCE_REQUIRED: { type: globalResult.types.MERCHANT, code: "AMEX_NONCE_REQUIRED" }, AMEX_NETWORK_ERROR: { type: globalResult.types.NETWORK, code: "AMEX_NETWORK_ERROR" } };
},
{ "../lib/braintree-error": 143 }
];
obj[87] = items86;
const items87 = [
(arg0, arg1, arg2) => {
closure_0 = global("./american-express");
closure_1 = global("../lib/basic-component-verification");
closure_2 = global("../lib/create-deferred-client");
closure_3 = global("../lib/create-assets-url");
module.exports = {
create: global("@braintree/wrap-promise")(function create(client) {
const obj = { name: "American Express", client: client.client, authorization: client.authorization };
const verifyResult = closure_1.verify({ name: "American Express", client: client.client, authorization: client.authorization });
return closure_1.verify({ name: "American Express", client: client.client, authorization: client.authorization }).then(() => closure_2.create({ authorization: client.authorization, client: client.client, debug: client.debug, assetsUrl: closure_3.create(client.authorization), name: "American Express" })).then((client) => {
closure_0.client = client;
return new closure_0(closure_0);
});
}),
VERSION: "3.112.1"
};
},
{ "../lib/basic-component-verification": 141, "../lib/create-assets-url": 148, "../lib/create-deferred-client": 150, "./american-express": 86, "@braintree/wrap-promise": 40 }
];
obj[88] = items87;
const items88 = [
(arg0, arg1, arg2) => {
class ApplePay {
constructor(arg0) {
obj = { _instantiatedWithClient: Boolean(!global.useDeferredClient), _client: global.client, _createPromise: global.createPromise };
if (obj._client) {
result = obj._setMerchantIdentifier();
}
return;
}
_waitForClient() {
self = this;
if (this._client) {
tmp2 = globalThis;
_Promise = Promise;
resolved = Promise.resolve();
} else {
_createPromise = self._createPromise;
fn = () => { ... };
resolved = _createPromise.then(fn.bind(self));
}
return resolved;
}
_setMerchantIdentifier() {
_client = this._client;
applePayWeb = _client.getConfiguration().gatewayConfiguration.applePayWeb;
if (applePayWeb) {
tmp = globalThis;
_Object = Object;
obj = { value: null, configurable: false, writable: false };
obj.value = applePayWeb.merchantIdentifier;
str = "merchantIdentifier";
definePropertyResult = Object.defineProperty(this, "merchantIdentifier", obj);
}
return;
}
createPaymentRequest(arg0) {
self = this;
closure_0 = global;
if (this._instantiatedWithClient) {
result = self._createPaymentRequestSynchronously(global);
} else {
_waitForClientResult = self._waitForClient();
fn = () => { ... };
result = _waitForClientResult.then(fn.bind(self));
}
return result;
}
_createPaymentRequestSynchronously(arg0) {
_client = this._client;
applePayWeb = _client.getConfiguration().gatewayConfiguration.applePayWeb;
obj = { countryCode: applePayWeb.countryCode, currencyCode: applePayWeb.currencyCode, merchantCapabilities: null, supportedNetworks: null };
tmp = applePayWeb.merchantCapabilities || ["supports3DS"];
obj.merchantCapabilities = tmp;
supportedNetworks = applePayWeb.supportedNetworks;
obj.supportedNetworks = supportedNetworks.map(/* F122089 */ function() { ... });
return Object.assign({}, obj, global);
}
performValidation(arg0) {
self = this;
closure_0 = global;
self = this;
if (global) {
if (global.validationURL) {
_waitForClientResult = self._waitForClient();
nextPromise = _waitForClientResult.then(() => { ... });
nextPromise1 = nextPromise.then(() => { ... });
catchPromise = nextPromise1.catch(() => { ... });
}
return catchPromise;
}
tmp = new closure_0(closure_2.APPLE_PAY_VALIDATION_URL_REQUIRED);
catchPromise = Promise.reject(tmp);
return;
}
tokenize(arg0) {
self = this;
closure_0 = global;
self = this;
if (global.token) {
_waitForClientResult = self._waitForClient();
nextPromise = _waitForClientResult.then(() => { ... });
nextPromise1 = nextPromise.then(() => { ... });
catchPromise = nextPromise1.catch(() => { ... });
} else {
tmp = globalThis;
_Promise = Promise;
tmp2 = closure_0;
tmp3 = closure_2;
tmp4 = new.target;
tmp5 = new.target;
tmp6 = new closure_0(closure_2.APPLE_PAY_PAYMENT_TOKEN_REQUIRED);
tmp7 = tmp6;
catchPromise = Promise.reject(tmp6);
}
return catchPromise;
}
teardown() {
tmp = closure_4(this, closure_3(ApplePay.prototype));
return Promise.resolve();
}
}
closure_0 = global("../lib/braintree-error");
closure_1 = global("../lib/analytics");
constants = global("./errors");
closure_3 = global("../lib/methods");
closure_4 = global("../lib/convert-methods-to-error");
module.exports = global("@braintree/wrap-promise").wrapPrototype(ApplePay);
},
{ "../lib/analytics": 138, "../lib/braintree-error": 143, "../lib/convert-methods-to-error": 146, "../lib/methods": 175, "./errors": 90, "@braintree/wrap-promise": 40 }
];
obj[89] = items88;
const items89 = [
(arg0, arg1, arg2) => {
const globalResult = global("../lib/braintree-error");
module.exports = { APPLE_PAY_NOT_ENABLED: { type: globalResult.types.MERCHANT, code: "APPLE_PAY_NOT_ENABLED", message: "Apple Pay is not enabled for this merchant." }, APPLE_PAY_VALIDATION_URL_REQUIRED: { type: globalResult.types.MERCHANT, code: "APPLE_PAY_VALIDATION_URL_REQUIRED", message: "performValidation must be called with a validationURL." }, APPLE_PAY_MERCHANT_VALIDATION_NETWORK: { type: globalResult.types.NETWORK, code: "APPLE_PAY_MERCHANT_VALIDATION_NETWORK", message: "A network error occurred when validating the Apple Pay merchant." }, APPLE_PAY_MERCHANT_VALIDATION_FAILED: { type: globalResult.types.MERCHANT, code: "APPLE_PAY_MERCHANT_VALIDATION_FAILED", message: "Make sure you have registered your domain name in the Braintree Control Panel." }, APPLE_PAY_PAYMENT_TOKEN_REQUIRED: { type: globalResult.types.MERCHANT, code: "APPLE_PAY_PAYMENT_TOKEN_REQUIRED", message: "tokenize must be called with a payment token." }, APPLE_PAY_TOKENIZATION: { type: globalResult.types.NETWORK, code: "APPLE_PAY_TOKENIZATION", message: "A network error occurred when processing the Apple Pay payment." } };
},
{ "../lib/braintree-error": 143 }
];
obj[90] = items89;
const items90 = [
(arg0, arg1, arg2) => {
closure_0 = global("./apple-pay");
closure_1 = global("../lib/analytics");
closure_2 = global("../lib/braintree-error");
closure_3 = global("../lib/basic-component-verification");
closure_4 = global("../lib/create-assets-url");
closure_5 = global("../lib/create-deferred-client");
closure_6 = global("./errors");
module.exports = {
create: global("@braintree/wrap-promise")(function create(client) {
return closure_3.verify({ name: "Apple Pay", client: client.client, authorization: client.authorization }).then(() => {
const obj = { authorization: client.authorization, client: client.client, debug: client.debug, assetsUrl: closure_4.create(client.authorization), name: "Apple Pay" };
const nextPromise = closure_5.create({ authorization: client.authorization, client: client.client, debug: client.debug, assetsUrl: closure_4.create(client.authorization), name: "Apple Pay" }).then((getConfiguration) => {
if (getConfiguration.getConfiguration().gatewayConfiguration.applePayWeb) {
closure_1_1.sendEvent(getConfiguration, "applepay.initialized");
let rejectResult = getConfiguration;
} else {
const tmp6 = new closure_1_2(constants.APPLE_PAY_NOT_ENABLED);
rejectResult = Promise.reject(tmp6);
}
return rejectResult;
});
client.createPromise = nextPromise;
const tmp = new client(client);
let nextPromise1 = tmp;
client = tmp;
if (!client.useDeferredClient) {
nextPromise1 = nextPromise.then((_client) => {
closure_0._client = _client;
return closure_0;
});
}
return nextPromise1;
});
}),
VERSION: "3.112.1"
};
},
{ "../lib/analytics": 138, "../lib/basic-component-verification": 141, "../lib/braintree-error": 143, "../lib/create-assets-url": 148, "../lib/create-deferred-client": 150, "./apple-pay": 89, "./errors": 90, "@braintree/wrap-promise": 40 }
];
obj[91] = items90;
const items91 = [
(arg0, arg1, arg2) => {
class Client {
constructor(arg0) {
obj = {};
obj1 = global;
if (!global) {
obj1 = {};
}
closure_0 = JSON.stringify(obj1);
gatewayConfiguration = obj1.gatewayConfiguration;
if (gatewayConfiguration) {
items = ["assetsUrl", "clientApiUrl", "configUrl"];
item = items.forEach((item) => {
if (item in gatewayConfiguration) {
if (!closure_3(tmp[item])) {
const obj = { type: constants.CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN.type, code: constants.CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN.code, message: `${item} property is on an invalid domain.` };
const tmp8 = new closure_4(obj);
throw tmp8;
}
}
});
obj.getConfiguration = () => JSON.parse(closure_0);
tmp8 = closure_2;
obj._request = closure_2;
obj._configuration = obj.getConfiguration();
str = "/v1/";
obj._clientApiBaseUrl = `${gatewayConfiguration.clientApiUrl}/v1/`;
if (gatewayConfiguration.graphQL) {
tmp9 = closure_3;
if (closure_3(gatewayConfiguration.graphQL.url)) {
tmp17 = gatewayConfiguration;
obj5 = { graphQL: null };
obj5.graphQL = gatewayConfiguration.graphQL;
tmp18 = new.target;
tmp19 = new.target;
tmp20 = obj5;
tmp21 = new gatewayConfiguration(obj5);
tmp22 = tmp21;
obj._graphQL = tmp21;
} else {
tmp10 = closure_4;
obj6 = { type: null, code: null, message: "graphQL.url property is on an invalid domain." };
tmp11 = closure_13;
obj6.type = closure_13.CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN.type;
obj6.code = closure_13.CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN.code;
tmp12 = new.target;
tmp13 = new.target;
tmp14 = obj6;
tmp15 = new closure_4(obj6);
tmp16 = tmp15;
throw tmp15;
}
}
return;
} else {
tmp = closure_4;
tmp2 = closure_13;
tmp3 = new.target;
tmp4 = new.target;
tmp5 = new closure_4(closure_13.CLIENT_MISSING_GATEWAY_CONFIGURATION);
tmp6 = tmp5;
throw tmp5;
}
}
static initialize(arg0) {
closure_0 = global;
tmp = closure_22[global.authorization];
if (tmp) {
tmp16 = closure_12;
str2 = "custom.client.load.cached";
sendEventResult = closure_12.sendEvent(tmp, "custom.client.load.cached");
return tmp;
} else {
try {
tmp2 = closure_7;
tmp3 = closure_7(global.authorization);
tmp4 = getConfiguration;
tmp5 = tmp3;
promise = getConfiguration(tmp3, global.sessionId);
nextPromise = promise.then((result) => {
if (authorization.debug) {
result.isDebug = true;
}
result.authorization = authorization.authorization;
obj = Object.create(Client.prototype);
new Client(result);
return obj;
});
tmp6 = closure_22;
closure_22[global.authorization] = nextPromise;
tmp7 = closure_12;
str = "custom.client.load.initialized";
sendEventResult1 = closure_12.sendEvent(nextPromise, "custom.client.load.initialized");
nextPromise1 = nextPromise.then((result) => {
closure_12.sendEvent(obj, "custom.client.load.succeeded");
return result;
});
return nextPromise1.catch((error) => {
delete tmp2[tmp];
return Promise.reject(error);
});
} catch (err) {
tmp9 = globalThis;
_Promise = Promise;
tmp10 = closure_4;
tmp11 = closure_13;
tmp12 = new.target;
tmp13 = new.target;
tmp14 = new closure_4(closure_13.CLIENT_INVALID_AUTHORIZATION);
tmp15 = tmp14;
return Promise.reject(tmp14);
}
}
return;
}
static clearCache() {
closure_22 = {};
return;
}
_findOrCreateFraudnetJSON(arg0) {
tmp = FRAUDNET_FNCLS;
element = document.querySelector(`script[fncls="${FRAUDNET_FNCLS}"]`);
if (!element) {
_document = document;
body = document.body;
_document2 = document;
str = "script";
appendChildResult = body.appendChild(document.createElement("script"));
str2 = "application/json";
appendChildResult.type = "application/json";
str3 = "fncls";
attr = appendChildResult.setAttribute("fncls", tmp);
element = appendChildResult;
}
configuration = this.getConfiguration();
obj1 = { rda_tenant: "bt_card", mid: configuration.gatewayConfiguration.merchantId };
closure_0 = obj1;
str4 = configuration.authorizationFingerprint;
if (str4) {
str5 = "&";
parts = str4.split("&");
item = parts.forEach((item) => {
const parts = item.split("=");
let tmp = "customer_id" === parts[0];
if (tmp) {
tmp = parts.length > 1;
}
if (tmp) {
obj.cid = parts[1];
}
});
}
obj4 = { f: global.substr(0, 32), fp: obj1, bu: false, s: FRAUDNET_SOURCE };
element.text = JSON.stringify(obj4);
return;
}
request(arg0, arg1) {
closure_0 = global;
closure_1 = module;
self = this;
promise = new Promise((arg0, arg1) => {
endpoint = arg0;
closure_1 = arg1;
let collectDeviceData = "payment_methods/credit_cards" === endpoint.endpoint;
if (collectDeviceData) {
collectDeviceData = str5.getConfiguration().gatewayConfiguration.creditCards.collectDeviceData;
}
closure_3 = Boolean(collectDeviceData);
let tmp3;
if ("graphQLApi" !== endpoint.api) {
let str = "options.method";
if (tmp.method) {
let str2;
if (!tmp.endpoint) {
str2 = "options.endpoint";
}
str = str2;
}
tmp3 = str;
}
if (tmp3) {
let obj3 = { type: constants.CLIENT_OPTION_REQUIRED.type, code: constants.CLIENT_OPTION_REQUIRED.code, message: `${tmp3} is required when making a request.` };
const tmp22 = new closure_1_4(obj3);
throw tmp22;
} else {
str5 = "clientApi";
if ("api" in tmp) {
str5 = tmp.api;
}
let obj = { method: tmp.method, graphQL: str5._graphQL, timeout: tmp.timeout, metadata: str5._configuration.analyticsMetadata };
if ("clientApi" === str5) {
let _clientApiBaseUrl = obj2._clientApiBaseUrl;
obj.data = closure_1_8.addMetadata(obj2._configuration, tmp.data);
} else if ("graphQLApi" !== str5) {
let obj4 = { type: constants.CLIENT_OPTION_INVALID.type, code: constants.CLIENT_OPTION_INVALID.code, message: "options.api is invalid." };
const tmp12 = new closure_1_4(obj4);
throw tmp12;
} else {
_clientApiBaseUrl = GRAPHQL_URLS[obj2._configuration.gatewayConfiguration.environment];
tmp.endpoint = "";
obj.method = "post";
const obj5 = { clientSdkMetadata: null };
const obj6 = { platform: obj2._configuration.analyticsMetadata.platform, source: obj2._configuration.analyticsMetadata.source, integration: obj2._configuration.analyticsMetadata.integration, sessionId: obj2._configuration.analyticsMetadata.sessionId, version };
obj5.clientSdkMetadata = obj6;
obj.data = assign(obj5, tmp.data);
const _configuration = obj2._configuration;
const obj7 = { Authorization: `Bearer ${_configuration.authorizationFingerprint || _configuration.authorization}`, "Braintree-Version": endpoint };
obj.headers = obj7;
const tmp4 = _configuration.authorizationFingerprint || _configuration.authorization;
}
obj.url = _clientApiBaseUrl + tmp.endpoint;
obj.sendAnalyticsEvent = function sendAnalyticsEvent() { ... };
str5._request(obj, () => { ... });
}
});
tmp = promise;
if (typeof module === "function") {
tmp2 = closure_9;
tmp3 = closure_10;
closure_1 = closure_9(closure_10(module));
nextPromise = promise.then((_httpStatus) => {
closure_1(null, _httpStatus, _httpStatus._httpStatus);
});
catchPromise = nextPromise.catch((error) => {
let httpStatus = error;
if (error) {
httpStatus = error.details;
}
if (httpStatus) {
httpStatus = error.details.httpStatus;
}
closure_1(error, null, httpStatus);
});
}
return tmp;
}
toJSON() {
return this.getConfiguration();
}
getVersion() {
return VERSION;
}
}
const BRAINTREE_VERSION = global("./constants").BRAINTREE_VERSION;
closure_1 = global("./request/graphql");
const _request = global("./request");
closure_3 = global("../lib/is-verified-domain");
closure_4 = global("../lib/braintree-error");
closure_5 = global("../lib/convert-to-braintree-error");
const getConfiguration = global("./get-configuration").getConfiguration;
closure_7 = global("../lib/create-authorization-data");
closure_8 = global("../lib/add-metadata");
closure_9 = global("../lib/once");
closure_10 = global("../lib/deferred");
const assign = global("../lib/assign").assign;
closure_12 = global("../lib/analytics");
constants = global("./errors");
const VERSION = global("../lib/constants").VERSION;
const GRAPHQL_URLS = global("../lib/constants").GRAPHQL_URLS;
closure_16 = global("../lib/methods");
closure_17 = global("../lib/convert-methods-to-error");
closure_18 = global("../lib/assets");
const FRAUDNET_FNCLS = global("../lib/constants").FRAUDNET_FNCLS;
const FRAUDNET_SOURCE = global("../lib/constants").FRAUDNET_SOURCE;
const FRAUDNET_URL = global("../lib/constants").FRAUDNET_URL;
closure_22 = {};
Client.prototype.teardown = global("@braintree/wrap-promise")(function() {
const authorization = this.getConfiguration().authorization;
delete tmp2[tmp];
closure_17(this, closure_16(Client.prototype));
return Promise.resolve();
});
module.exports = Client;
},
{ "../lib/add-metadata": 137, "../lib/analytics": 138, "../lib/assets": 139, "../lib/assign": 140, "../lib/braintree-error": 143, "../lib/constants": 145, "../lib/convert-methods-to-error": 146, "../lib/convert-to-braintree-error": 147, "../lib/create-authorization-data": 149, "../lib/deferred": 151, "../lib/is-verified-domain": 173, "../lib/methods": 175, "../lib/once": 176, "./constants": 93, "./errors": 94, "./get-configuration": 95, "./request": 108, "./request/graphql": 106, "@braintree/wrap-promise": 40 }
];
obj[92] = items91;
const items92 = [
(arg0, arg1, arg2) => {
module.exports = { BRAINTREE_VERSION: "2018-05-10" };
},
{}
];
obj[93] = items92;
const items93 = [
(arg0, arg1, arg2) => {
const globalResult = global("../lib/braintree-error");
module.exports = { CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN: { type: globalResult.types.MERCHANT, code: "CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN" }, CLIENT_OPTION_REQUIRED: { type: globalResult.types.MERCHANT, code: "CLIENT_OPTION_REQUIRED" }, CLIENT_OPTION_INVALID: { type: globalResult.types.MERCHANT, code: "CLIENT_OPTION_INVALID" }, CLIENT_MISSING_GATEWAY_CONFIGURATION: { type: globalResult.types.INTERNAL, code: "CLIENT_MISSING_GATEWAY_CONFIGURATION", message: "Missing gatewayConfiguration." }, CLIENT_INVALID_AUTHORIZATION: { type: globalResult.types.MERCHANT, code: "CLIENT_INVALID_AUTHORIZATION", message: "Authorization is invalid. Make sure your client token or tokenization key is valid." }, CLIENT_GATEWAY_NETWORK: { type: globalResult.types.NETWORK, code: "CLIENT_GATEWAY_NETWORK", message: "Cannot contact the gateway at this time." }, CLIENT_REQUEST_TIMEOUT: { type: globalResult.types.NETWORK, code: "CLIENT_REQUEST_TIMEOUT", message: "Request timed out waiting for a reply." }, CLIENT_REQUEST_ERROR: { type: globalResult.types.NETWORK, code: "CLIENT_REQUEST_ERROR", message: "There was a problem with your request." }, CLIENT_GRAPHQL_REQUEST_ERROR: { type: globalResult.types.NETWORK, code: "CLIENT_GRAPHQL_REQUEST_ERROR", message: "There was a problem with your request." }, CLIENT_RATE_LIMITED: { type: globalResult.types.MERCHANT, code: "CLIENT_RATE_LIMITED", message: "You are being rate-limited; please try again in a few minutes." }, CLIENT_AUTHORIZATION_INSUFFICIENT: { type: globalResult.types.MERCHANT, code: "CLIENT_AUTHORIZATION_INSUFFICIENT", message: "The authorization used has insufficient privileges." }, CLIENT_AUTHORIZATION_INVALID: { type: globalResult.types.MERCHANT, code: "CLIENT_AUTHORIZATION_INVALID", message: "Either the client token has expired and a new one should be generated or the tokenization key has been deactivated or deleted." } };
},
{ "../lib/braintree-error": 143 }
];
obj[94] = items93;
const items94 = [
(arg0, arg1, arg2) => {
closure_0 = global("../lib/braintree-error");
closure_1 = global("./request");
closure_2 = global("@braintree/uuid");
closure_3 = global("../lib/constants");
closure_4 = global("./errors");
closure_5 = global("./request/graphql");
const GRAPHQL_URLS = global("../lib/constants").GRAPHQL_URLS;
closure_7 = global("../lib/is-date-string-before-or-on");
const BRAINTREE_VERSION = global("./constants").BRAINTREE_VERSION;
const globalResult = global("@braintree/wrap-promise");
module.exports = {
getConfiguration: global("@braintree/wrap-promise")(function getConfiguration(arg0, sessionId) {
closure_0 = arg0;
return new Promise((arg0, arg1) => {
closure_0 = arg0;
sessionId = arg1;
let tmp = sessionId;
if (!sessionId) {
tmp = closure_2();
}
const metadata = { merchantAppId: window.location.host, platform: constants.PLATFORM, sdkVersion: constants.VERSION, source: constants.SOURCE, integration: constants.INTEGRATION, integrationType: constants.INTEGRATION, sessionId: tmp };
const attrs = closure_0.attrs;
attrs._meta = metadata;
attrs.braintreeLibraryVersion = constants.BRAINTREE_LIBRARY_VERSION;
attrs.configVersion = "3";
const request = { url: closure_0.configUrl, method: "GET", data: attrs };
if (attrs.authorizationFingerprint) {
if (tmp3.graphQL) {
if (closure_7(tmp3.graphQL.date, BRAINTREE_VERSION)) {
const obj2 = { graphQL: null };
let obj3 = { url: tmp3.graphQL.url, features: ["configuration"] };
obj2.graphQL = obj3;
const tmp17 = new closure_5(obj2);
request.graphQL = tmp17;
}
request.metadata = metadata;
}
sessionId(request, (originalError, gatewayConfiguration, arg2) => {
if (originalError) {
if (403 === arg2) {
let CLIENT_GATEWAY_NETWORK = constants2.CLIENT_AUTHORIZATION_INSUFFICIENT;
} else if (401 === arg2) {
CLIENT_GATEWAY_NETWORK = constants2.CLIENT_AUTHORIZATION_INVALID;
} else {
CLIENT_GATEWAY_NETWORK = constants2.CLIENT_GATEWAY_NETWORK;
}
const obj3 = { type: null, code: null, message: null, details: null };
({ type: obj2.type, code: obj2.code, message: obj2.message } = CLIENT_GATEWAY_NETWORK);
const obj5 = { originalError };
obj3.details = obj5;
const tmp15 = new closure_0(obj3);
closure_1(tmp15);
} else {
let str = "CLIENT_TOKEN";
if (attrs.tokenizationKey) {
str = "TOKENIZATION_KEY";
}
const analyticsMetadata = { authorizationType: str, authorizationFingerprint: attrs.authorizationFingerprint, analyticsMetadata: null, gatewayConfiguration: null };
analyticsMetadata.analyticsMetadata = analyticsMetadata;
analyticsMetadata.gatewayConfiguration = gatewayConfiguration;
closure_0(analyticsMetadata);
}
});
}
if (attrs.tokenizationKey) {
const obj4 = { graphQL: null };
let obj5 = { url: GRAPHQL_URLS[tmp3.environment], features: ["configuration"] };
obj4.graphQL = obj5;
const tmp9 = new closure_5(obj4);
request.graphQL = tmp9;
request.metadata = metadata;
}
});
})
};
},
{ "../lib/braintree-error": 143, "../lib/constants": 145, "../lib/is-date-string-before-or-on": 170, "./constants": 93, "./errors": 94, "./request": 108, "./request/graphql": 106, "@braintree/uuid": 36, "@braintree/wrap-promise": 40 }
];
obj[95] = items94;
const items95 = [
(arg0, arg1, arg2) => {
closure_0 = global("../lib/braintree-error");
closure_1 = global("./client");
constants = global("../lib/errors");
const globalResult = global("@braintree/wrap-promise");
module.exports = {
create: global("@braintree/wrap-promise")(function create(authorization) {
if (authorization.authorization) {
let initializeResult = closure_1.initialize(authorization);
} else {
const obj = { type: constants.INSTANTIATION_OPTION_REQUIRED.type, code: constants.INSTANTIATION_OPTION_REQUIRED.code, message: "options.authorization is required when instantiating a client." };
const tmp7 = new closure_0(obj);
initializeResult = Promise.reject(tmp7);
}
return initializeResult;
}),
VERSION: "3.112.1"
};
},
{ "../lib/braintree-error": 143, "../lib/errors": 154, "./client": 92, "@braintree/wrap-promise": 40 }
];
obj[96] = items95;
const items96 = [
(arg0, arg1, arg2) => {
function _requestWithRetry(url, sum, arg2) {
closure_0 = url;
assign = sum;
closure_2 = arg2;
({ graphQL, timeout } = url);
const requestObject = globalResult.getRequestObject();
closure_9 = arg2;
let isGraphQLRequestResult = graphQL;
if (graphQL) {
isGraphQLRequestResult = graphQL.isGraphQLRequest(url.url, url.data);
}
const BooleanResult = Boolean(isGraphQLRequestResult);
closure_10 = BooleanResult;
url.headers = assign({ "Content-Type": "application/json" }, url.headers);
if (BooleanResult) {
let obj2 = new headers(url);
} else {
obj2 = new data(url);
}
url = obj2.getUrl();
const body = obj2.getBody();
const method = obj2.getMethod();
headers = obj2.getHeaders();
let queryifyResult = url;
if ("GET" === method) {
queryifyResult = closure_0.queryify(url, body);
}
if (obj2) {
requestObject.onreadystatechange = () => {
if (4 === requestObject.readyState) {
if (0 === tmp4.status) {
if (BooleanResult) {
delete tmp2[tmp];
_requestWithRetry(closure_0, closure_1, closure_2);
}
}
data = determineStatusResult(tmp4.responseText);
closure_4 = obj2.adaptResponseBody(data);
determineStatusResult = obj2.determineStatus(tmp4.status, data);
if (determineStatusResult < 400) {
if (determineStatusResult >= 200) {
closure_9(null, closure_4, determineStatusResult);
}
}
if (BooleanResult) {
data = data.data;
let errorClass = !data;
if (!data) {
errorClass = tmp18.errors;
}
if (errorClass) {
errorClass = tmp18.errors[0];
}
if (errorClass) {
errorClass = tmp18.errors[0].extensions;
}
if (errorClass) {
errorClass = tmp18.errors[0].extensions.errorClass;
}
let tmp19 = "UNKNOWN" === errorClass;
if (!tmp19) {
tmp19 = "INTERNAL" === errorClass;
}
if (tmp19) {
delete tmp3[tmp2];
_requestWithRetry(closure_0, closure_1, closure_2);
}
}
if (closure_1 < 1) {
let tmp22 = !determineStatusResult;
if (determineStatusResult) {
tmp22 = 408 === tmp21;
}
if (tmp22) {
sum = closure_1 + 1;
closure_1 = sum;
_requestWithRetry(closure_0, sum, closure_2);
}
}
let str3 = closure_4;
if (!closure_4) {
str3 = "error";
}
let num5 = determineStatusResult;
if (!determineStatusResult) {
num5 = 500;
}
closure_9(str3, null, num5);
}
};
let queryifyResult1 = queryifyResult;
} else {
queryifyResult1 = queryifyResult;
if (url.headers) {
queryifyResult1 = closure_0.queryify(queryifyResult, headers);
}
requestObject.onload = () => {
closure_9(null, determineStatusResult(requestObject.responseText), requestObject.status);
};
requestObject.onerror = () => {
closure_9("error", null, 500);
};
requestObject.onprogress = () => {
};
requestObject.ontimeout = () => {
closure_9("timeout", null, -1);
};
}
try {
queryifyResult = requestObject.open(method, queryifyResult1, true);
} catch (tmp24) {
if (tmp4) {
delete tmp3[tmp];
requestObject(tmp3, assign, tmp2);
} else {
throw tmp24;
}
}
}
closure_0 = global("../../lib/querystring");
let assign = global("../../lib/assign").assign;
closure_2 = global("./prep-body");
closure_3 = global("./parse-body");
const globalResult = global("./xhr");
const isAvailable = globalResult.isAvailable;
closure_6 = global("./graphql/request");
closure_7 = global("./default-request");
module.exports = {
request(url, arg1) {
_requestWithRetry(url, 0, arg1);
}
};
},
{ "../../lib/assign": 140, "../../lib/querystring": 177, "./default-request": 98, "./graphql/request": 107, "./parse-body": 109, "./prep-body": 110, "./xhr": 111 }
];
obj[97] = items96;
const items97 = [
(arg0, arg1, arg2) => {
class DefaultRequest {
constructor(arg0) {
return;
}
getUrl() {
return this._url;
}
getBody() {
return this._data;
}
getMethod() {
return this._method;
}
getHeaders() {
return this._headers;
}
adaptResponseBody(arg0) {
return global;
}
determineStatus(arg0) {
return global;
}
}
module.exports = DefaultRequest;
},
{}
];
obj[98] = items97;
const items98 = [
(arg0, arg1, arg2) => {
closure_0 = global("./error");
const assign = global("../../../../lib/assign").assign;
closure_2 = { AMERICAN_EXPRESS: "American Express", DISCOVER: "Discover", INTERNATIONAL_MAESTRO: "Maestro", JCB: "JCB", MASTERCARD: "MasterCard", SOLO: "Solo", UK_MAESTRO: "UK Maestro", UNION_PAY: "UnionPay", VISA: "Visa", ELO: "Elo", HIPER: "Hiper", HIPERCARD: "Hipercard" };
closure_3 = { VISA: "visa", MASTERCARD: "mastercard", DISCOVER: "discover", AMERICAN_EXPRESS: "amex", INTERNATIONAL_MAESTRO: "maestro", ELO: "elo" };
closure_4 = { VISA: "Visa", MASTERCARD: "MasterCard", DISCOVER: "Discover", AMERICAN_EXPRESS: "American Express" };
closure_5 = { VISA: "visa", MASTERCARD: "mastercard", DISCOVER: "discover", AMERICAN_EXPRESS: "amex", INTERNATIONAL_MAESTRO: "maestro", ELO: "elo" };
closure_6 = { VISA: "visa", MASTERCARD: "master", DISCOVER: "discover", AMERICAN_EXPRESS: "amex", DINERS: "diners", INTERNATIONAL_MAESTRO: "maestro", JCB: "jcb" };
module.exports = function configurationResponseAdapter(data, _graphQL) {
if (data.data) {
if (!data.errors) {
const clientConfiguration = data.data.clientConfiguration;
const obj = { environment: clientConfiguration.environment.toLowerCase(), clientApiUrl: null, assetsUrl: null, analytics: null, merchantId: null, venmo: "off" };
({ clientApiUrl: obj.clientApiUrl, assetsUrl: obj.assetsUrl } = clientConfiguration);
const obj2 = { url: clientConfiguration.analyticsUrl };
obj.analytics = obj2;
obj.merchantId = clientConfiguration.merchantId;
if (clientConfiguration.supportedFeatures) {
const obj3 = { url: _graphQL._graphQL._config.url, features: null };
const supportedFeatures = clientConfiguration.supportedFeatures;
obj3.features = supportedFeatures.map((item) => item.toLowerCase());
obj.graphQL = obj3;
}
if (clientConfiguration.braintreeApi) {
obj.braintreeApi = clientConfiguration.braintreeApi;
}
if (clientConfiguration.applePayWeb) {
obj.applePayWeb = clientConfiguration.applePayWeb;
const supportedCardBrands = clientConfiguration.applePayWeb.supportedCardBrands;
closure_0 = closure_3;
obj.applePayWeb.supportedNetworks = supportedCardBrands.reduce((arr, item) => {
let combined = arr;
if (closure_0.hasOwnProperty(item)) {
combined = arr.concat(closure_0[item]);
}
return combined;
}, []);
const applePayWeb = obj.applePayWeb;
delete tmp2[tmp];
}
if (clientConfiguration.fastlane) {
obj.fastlane = clientConfiguration.fastlane;
}
if (clientConfiguration.ideal) {
obj.ideal = clientConfiguration.ideal;
}
if (clientConfiguration.kount) {
const obj4 = { kountMerchantId: clientConfiguration.kount.merchantId };
obj.kount = obj4;
}
if (clientConfiguration.creditCard) {
const challenges = clientConfiguration.creditCard.challenges;
obj.challenges = challenges.map((item) => item.toLowerCase());
const obj5 = { supportedCardTypes: null };
const supportedCardBrands1 = clientConfiguration.creditCard.supportedCardBrands;
closure_0 = closure_2;
obj5.supportedCardTypes = supportedCardBrands1.reduce((arr, item) => {
let combined = arr;
if (closure_0.hasOwnProperty(item)) {
combined = arr.concat(closure_0[item]);
}
return combined;
}, []);
obj.creditCards = obj5;
obj.threeDSecureEnabled = clientConfiguration.creditCard.threeDSecureEnabled;
obj.threeDSecure = clientConfiguration.creditCard.threeDSecure;
} else {
obj.challenges = [];
const obj6 = { supportedCardTypes: [] };
obj.creditCards = obj6;
obj.threeDSecureEnabled = false;
}
if (clientConfiguration.googlePay) {
const obj7 = { displayName: clientConfiguration.googlePay.displayName, enabled: true, environment: clientConfiguration.googlePay.environment.toLowerCase(), googleAuthorizationFingerprint: clientConfiguration.googlePay.googleAuthorization, paypalClientId: clientConfiguration.googlePay.paypalClientId, supportedNetworks: null };
const supportedCardBrands2 = clientConfiguration.googlePay.supportedCardBrands;
closure_0 = closure_5;
obj7.supportedNetworks = supportedCardBrands2.reduce((arr, item) => {
let combined = arr;
if (closure_0.hasOwnProperty(item)) {
combined = arr.concat(closure_0[item]);
}
return combined;
}, []);
obj.androidPay = obj7;
}
if (clientConfiguration.venmo) {
const obj8 = { merchantId: clientConfiguration.venmo.merchantId, accessToken: clientConfiguration.venmo.accessToken, environment: clientConfiguration.venmo.environment.toLowerCase(), enrichedCustomerDataEnabled: clientConfiguration.venmo.enrichedCustomerDataEnabled };
obj.payWithVenmo = obj8;
}
if (clientConfiguration.paypal) {
obj.paypalEnabled = true;
obj.paypal = assign({}, clientConfiguration.paypal);
obj.paypal.currencyIsoCode = obj.paypal.currencyCode;
obj.paypal.environment = obj.paypal.environment.toLowerCase();
const paypal = obj.paypal;
delete tmp2[tmp];
} else {
obj.paypalEnabled = false;
}
if (clientConfiguration.unionPay) {
const obj9 = { enabled: true, merchantAccountId: clientConfiguration.unionPay.merchantAccountId };
obj.unionPay = obj9;
}
if (clientConfiguration.visaCheckout) {
const obj10 = { apikey: clientConfiguration.visaCheckout.apiKey, encryptionKey: clientConfiguration.visaCheckout.encryptionKey, externalClientId: clientConfiguration.visaCheckout.externalClientId, supportedCardTypes: null };
const supportedCardBrands3 = clientConfiguration.visaCheckout.supportedCardBrands;
closure_0 = closure_4;
obj10.supportedCardTypes = supportedCardBrands3.reduce((arr, item) => {
let combined = arr;
if (closure_0.hasOwnProperty(item)) {
combined = arr.concat(closure_0[item]);
}
return combined;
}, []);
obj.visaCheckout = obj10;
}
if (clientConfiguration.masterpass) {
const obj11 = { merchantCheckoutId: clientConfiguration.masterpass.merchantCheckoutId, supportedNetworks: null };
const supportedCardBrands4 = clientConfiguration.masterpass.supportedCardBrands;
closure_0 = closure_6;
obj11.supportedNetworks = supportedCardBrands4.reduce((arr, item) => {
let combined = arr;
if (closure_0.hasOwnProperty(item)) {
combined = arr.concat(closure_0[item]);
}
return combined;
}, []);
obj.masterpass = obj11;
}
let tmp10 = obj;
if (clientConfiguration.usBankAccount) {
const obj12 = { routeId: clientConfiguration.usBankAccount.routeId, plaid: null };
const obj13 = { publicKey: clientConfiguration.usBankAccount.plaidPublicKey };
obj12.plaid = obj13;
obj.usBankAccount = obj12;
tmp10 = obj;
}
}
return tmp10;
}
tmp10 = closure_0(data);
};
},
{ "../../../../lib/assign": 140, "./error": 102 }
];
obj[99] = items98;
const items99 = [
(arg0, arg1, arg2) => {
closure_0 = global("./error");
closure_1 = { AMERICAN_EXPRESS: "American Express", DINERS: "Discover", DISCOVER: "Discover", ELO: "Elo", HIPER: "Hiper", HIPERCARD: "Hipercard", INTERNATIONAL_MAESTRO: "Maestro", JCB: "JCB", MASTERCARD: "MasterCard", UK_MAESTRO: "Maestro", UNION_PAY: "UnionPay", VISA: "Visa" };
closure_2 = { YES: "Yes", NO: "No", UNKNOWN: "Unknown" };
closure_3 = { PSDTWO: "psd2" };
module.exports = function creditCardTokenizationFastlaneResponseAdapter(data) {
if (data.data) {
if (!data.errors) {
const tokenizeCreditCardForPayPalConnect = data.data.tokenizeCreditCardForPayPalConnect;
const details = tokenizeCreditCardForPayPalConnect.paymentMethod.details;
let str2 = "";
if (details.last4) {
str2 = details.last4.substr(2, 4);
}
const binData = details.binData;
if (binData) {
const items = ["commercial", "debit", "durbinRegulated", "healthcare", "payroll", "prepaid"];
const item = items.forEach((item) => {
if (binData[item]) {
tmp[item] = closure_2[tmp[item]];
} else {
tmp[item] = "Unknown";
}
});
const items1 = ["issuingBank", "countryOfIssuance", "productId"];
const item1 = items1.forEach((item) => {
if (!binData[item]) {
tmp[item] = "Unknown";
}
});
}
const obj = { binData, consumed: false, description: null, nonce: null, details: null, type: "CreditCard", threeDSecureInfo: null };
let str4 = "";
if (str2) {
str4 = `ending in ${str2}`;
}
obj.description = str4;
obj.nonce = tokenizeCreditCardForPayPalConnect.paymentMethod.id;
const obj3 = { cardholderName: null, expirationMonth: null, expirationYear: null, bin: null, cardType: null, lastFour: null, lastTwo: null };
({ cardholderName: obj2.cardholderName, expirationMonth: obj2.expirationMonth, expirationYear: obj2.expirationYear } = details);
obj3.bin = details.bin || "";
obj3.cardType = closure_1[details.brandCode] || "Unknown";
const obj4 = { creditCards: null };
obj3.lastFour = details.last4 || "";
obj3.lastTwo = str2;
obj.details = obj3;
const items2 = [obj];
obj4.creditCards = items2;
let tmp5 = obj4;
if (tokenizeCreditCardForPayPalConnect.authenticationInsight) {
let formatted = closure_3[str6];
if (!formatted) {
formatted = str6.toLowerCase();
}
const obj7 = { regulationEnvironment: formatted };
obj4.creditCards[0].authenticationInsight = obj7;
tmp5 = obj4;
}
const tmp4 = details.last4 || "";
}
return tmp5;
}
tmp5 = binData(data);
};
},
{ "./error": 102 }
];
obj[100] = items99;
const items100 = [
(arg0, arg1, arg2) => {
closure_0 = global("./error");
closure_1 = { AMERICAN_EXPRESS: "American Express", DINERS: "Discover", DISCOVER: "Discover", ELO: "Elo", HIPER: "Hiper", HIPERCARD: "Hipercard", INTERNATIONAL_MAESTRO: "Maestro", JCB: "JCB", MASTERCARD: "MasterCard", UK_MAESTRO: "Maestro", UNION_PAY: "UnionPay", VISA: "Visa" };
closure_2 = { YES: "Yes", NO: "No", UNKNOWN: "Unknown" };
closure_3 = { PSDTWO: "psd2" };
module.exports = function creditCardTokenizationResponseAdapter(data) {
if (data.data) {
if (!data.errors) {
const tokenizeCreditCard = data.data.tokenizeCreditCard;
const creditCard = tokenizeCreditCard.creditCard;
let str2 = "";
if (creditCard.last4) {
str2 = creditCard.last4.substr(2, 4);
}
const binData = creditCard.binData;
if (binData) {
const items = ["commercial", "debit", "durbinRegulated", "healthcare", "payroll", "prepaid"];
const item = items.forEach((item) => {
if (binData[item]) {
tmp[item] = closure_2[tmp[item]];
} else {
tmp[item] = "Unknown";
}
});
const items1 = ["issuingBank", "countryOfIssuance", "productId"];
const item1 = items1.forEach((item) => {
if (!binData[item]) {
tmp[item] = "Unknown";
}
});
}
const obj = { binData, consumed: false, description: null, nonce: null, details: null, type: "CreditCard", threeDSecureInfo: null };
let str4 = "";
if (str2) {
str4 = `ending in ${str2}`;
}
obj.description = str4;
obj.nonce = tokenizeCreditCard.token;
const obj3 = { cardholderName: null, expirationMonth: null, expirationYear: null, bin: null, cardType: null, lastFour: null, lastTwo: null };
({ cardholderName: obj2.cardholderName, expirationMonth: obj2.expirationMonth, expirationYear: obj2.expirationYear } = creditCard);
obj3.bin = creditCard.bin || "";
obj3.cardType = closure_1[creditCard.brandCode] || "Unknown";
const obj4 = { creditCards: null };
obj3.lastFour = creditCard.last4 || "";
obj3.lastTwo = str2;
obj.details = obj3;
const items2 = [obj];
obj4.creditCards = items2;
let tmp5 = obj4;
if (tokenizeCreditCard.authenticationInsight) {
let formatted = closure_3[str6];
if (!formatted) {
formatted = str6.toLowerCase();
}
const obj7 = { regulationEnvironment: formatted };
obj4.creditCards[0].authenticationInsight = obj7;
tmp5 = obj4;
}
const tmp4 = creditCard.last4 || "";
}
return tmp5;
}
tmp5 = binData(data);
};
},
{ "./error": 102 }
];
obj[101] = items100;
const items101 = [
(arg0, arg1, arg2) => {
function addFieldError(arr, message, fieldErrors) {
const field = arr[0];
if (1 !== arr.length) {
const item = fieldErrors.forEach((field) => {
if (field.field === first1) {
closure_0 = field;
}
});
if (!obj2) {
obj2 = { field, fieldErrors: [] };
fieldErrors.push(obj2);
}
addFieldError(arr.slice(1), message, obj2.fieldErrors);
} else {
const obj = { code: tmp, field, message: message.message };
fieldErrors.push(obj);
}
}
module.exports = function errorResponseAdapter(errors) {
let message = errors;
const tmp = errors.errors && message.errors[0] && message.errors[0].extensions && message.errors[0].extensions.errorClass;
if ("VALIDATION" === tmp) {
errors = message.errors;
let items = [];
let item = errors.forEach((extensions) => {
if (tmp) {
const inputPath = extensions.extensions.inputPath;
const substr = inputPath.slice(1);
items = undefined;
const first = substr[0];
let first1 = first;
if (1 !== substr.length) {
const item = arr3.forEach((field) => {
if (field.field === first1) {
closure_0 = field;
}
});
if (!items) {
const obj2 = { field: first, fieldErrors: [] };
items = obj2;
arr3.push(items);
}
const substr1 = substr.slice(1);
const fieldErrors = items.fieldErrors;
items = undefined;
first1 = substr1[0];
if (1 !== substr1.length) {
const item1 = fieldErrors.forEach((field) => {
if (field.field === first1) {
closure_0 = field;
}
});
if (!items) {
const obj3 = { field: first1, fieldErrors: [] };
items = obj3;
fieldErrors.push(items);
}
addFieldError(substr1.slice(1), extensions, items.fieldErrors);
} else {
const obj4 = { code: tmp10, field: first1, message: extensions.message };
fieldErrors.push(obj4);
}
} else {
const obj = { code: tmp2, field: first, message: extensions.message };
arr3.push(obj);
}
}
});
if (0 === items.length) {
let obj2 = { error: null };
let obj3 = { message: null };
message = message.errors[0].message;
obj3.message = message;
obj2.error = obj3;
let obj4 = obj2;
} else {
obj4 = { error: null, fieldErrors: null };
const obj5 = { message: { creditCard: "Credit card is invalid" }[items[0].field] };
obj4.error = obj5;
obj4.fieldErrors = items;
}
} else {
let obj = { error: null, fieldErrors: null };
if (tmp) {
const obj6 = { message: message.errors[0].message };
obj.error = obj6;
obj.fieldErrors = [];
let tmp2 = obj;
} else {
obj.error = { message: "There was a problem serving your request" };
obj.fieldErrors = [];
tmp2 = obj;
}
return tmp2;
}
};
},
{}
];
obj[102] = items101;
const items102 = [
(arg0, arg1, arg2) => {
module.exports = function configuration() {
return { query: "query ClientConfiguration { clientConfiguration { analyticsUrl environment merchantId assetsUrl clientApiUrl creditCard { supportedCardBrands challenges threeDSecureEnabled threeDSecure { cardinalAuthenticationJWT } } applePayWeb { countryCode currencyCode merchantIdentifier supportedCardBrands } fastlane { enabled } googlePay { displayName supportedCardBrands environment googleAuthorization paypalClientId } ideal { routeId assetsUrl } kount { merchantId } masterpass { merchantCheckoutId supportedCardBrands } paypal { displayName clientId assetsUrl environment environmentNoNetwork unvettedMerchant braintreeClientId billingAgreementsEnabled merchantAccountId currencyCode payeeEmail } unionPay { merchantAccountId } usBankAccount { routeId plaidPublicKey } venmo { merchantId accessToken environment enrichedCustomerDataEnabled } visaCheckout { apiKey externalClientId supportedCardBrands } braintreeApi { accessToken url } supportedFeatures } }", operationName: "ClientConfiguration" };
};
},
{}
];
obj[103] = items102;
const items103 = [
(arg0, arg1, arg2) => {
const assign = global("../../../../lib/assign").assign;
module.exports = function creditCardForFastlaneTokenization(authenticationInsight) {
let merchantAccountId = authenticationInsight.authenticationInsight;
if (merchantAccountId) {
merchantAccountId = authenticationInsight.merchantAccountId;
}
const BooleanResult = Boolean(merchantAccountId);
let str = "mutation TokenizeCreditCardForPayPalConnect($input: TokenizeCreditCardForPayPalConnectInput!";
if (BooleanResult) {
str = "mutation TokenizeCreditCardForPayPalConnect($input: TokenizeCreditCardForPayPalConnectInput!, $authenticationInsightInput: AuthenticationInsightInput!";
}
const text = `${str}) { tokenizeCreditCardForPayPalConnect(input: $input) { clientMutationId paymentMethod { id details { ... on CreditCardDetails { bin brandCode last4 cardholderName expirationMonth expirationYear binData { prepaid healthcare debit durbinRegulated commercial payroll issuingBank countryOfIssuance productId } } } }`;
let text1 = text;
if (BooleanResult) {
text1 = `${str}) { tokenizeCreditCardForPayPalConnect(input: $input) { clientMutationId paymentMethod { id details { ... on CreditCardDetails { bin brandCode last4 cardholderName expirationMonth expirationYear binData { prepaid healthcare debit durbinRegulated commercial payroll issuingBank countryOfIssuance productId } } } } authenticationInsight(input: $authenticationInsightInput) { customerAuthenticationRegulationEnvironment }`;
}
const obj = { query: `${tmp3} } }`, variables: null, operationName: "TokenizeCreditCardForPayPalConnect" };
const creditCard = authenticationInsight.creditCard;
const tmp4 = creditCard.fastlane || {};
let termsAndConditionsVersion = "fastlane" in creditCard;
if (termsAndConditionsVersion) {
termsAndConditionsVersion = "termsAndConditionsVersion" in creditCard.fastlane;
}
if (termsAndConditionsVersion) {
termsAndConditionsVersion = creditCard.fastlane.termsAndConditionsVersion;
}
let hasBuyerConsent = "hasBuyerConsent" in tmp4;
if (hasBuyerConsent) {
hasBuyerConsent = tmp4.hasBuyerConsent;
}
const shippingAddress = creditCard.shippingAddress;
const creditCard2 = authenticationInsight.creditCard;
let billingAddress = creditCard2;
if (creditCard2) {
billingAddress = creditCard2.billingAddress;
}
let str4 = creditCard2;
if (creditCard2) {
str4 = creditCard2.expirationDate;
}
let tmp5 = creditCard2;
if (creditCard2) {
let expirationMonth = creditCard2.expirationMonth;
if (!expirationMonth) {
let trimmed = str4;
if (str4) {
trimmed = str4.split("/")[0].trim();
const str6 = str4.split("/")[0];
}
expirationMonth = trimmed;
}
tmp5 = expirationMonth;
}
let tmp7 = creditCard2;
if (creditCard2) {
let expirationYear = creditCard2.expirationYear;
if (!expirationYear) {
let trimmed1 = str4;
if (str4) {
trimmed1 = str4.split("/")[1].trim();
const str8 = str4.split("/")[1];
}
expirationYear = trimmed1;
}
tmp7 = expirationYear;
}
let number = creditCard2;
if (creditCard2) {
number = creditCard2.number;
}
const obj2 = { number, expirationMonth: tmp5, expirationYear: tmp7, cvv: null, cardholderName: null };
let cvv = creditCard2;
if (creditCard2) {
cvv = creditCard2.cvv;
}
obj2.cvv = cvv;
let cardholderName = creditCard2;
if (creditCard2) {
cardholderName = creditCard2.cardholderName;
}
const obj3 = { input: { creditCard: obj2, options: {} } };
obj2.cardholderName = cardholderName;
if (BooleanResult) {
const obj4 = { merchantAccountId: authenticationInsight.merchantAccountId };
obj3.authenticationInsightInput = obj4;
}
if (billingAddress) {
obj3.input.creditCard.billingAddress = billingAddress;
}
const input = obj3.input;
if (authenticationInsight.creditCard) {
if (authenticationInsight.creditCard.options) {
if (typeof authenticationInsight.creditCard.options.validate === "boolean") {
let flag = authenticationInsight.creditCard.options.validate;
}
if (typeof flag === "boolean") {
const obj5 = { validate: flag };
input.options = assign(obj5, input.options);
}
obj3.input = input;
const obj6 = { email: creditCard.email, optIn: hasBuyerConsent, phone: creditCard.phone, termsAndConditionsVersion };
const tmp10 = assign({}, obj3.input, obj6);
if ("authAssertion" in tmp4) {
tmp10.authAssertion = tmp4.authAssertion;
}
if (shippingAddress) {
tmp10.shippingAddress = shippingAddress;
}
const obj7 = { input: tmp10 };
obj.variables = obj7;
return obj;
}
}
if (!authenticationInsight.authorizationFingerprint) {
flag = true;
if (!authenticationInsight.authorizationFingerprint) {
if (authenticationInsight.tokenizationKey) {
flag = false;
}
}
} else {
flag = true;
}
};
},
{ "../../../../lib/assign": 140 }
];
obj[104] = items103;
const items104 = [
(arg0, arg1, arg2) => {
const assign = global("../../../../lib/assign").assign;
module.exports = function creditCardTokenization(authenticationInsight) {
let merchantAccountId = authenticationInsight.authenticationInsight;
if (merchantAccountId) {
merchantAccountId = authenticationInsight.merchantAccountId;
}
const BooleanResult = Boolean(merchantAccountId);
let str = "mutation TokenizeCreditCard($input: TokenizeCreditCardInput!";
if (BooleanResult) {
str = "mutation TokenizeCreditCard($input: TokenizeCreditCardInput!, $authenticationInsightInput: AuthenticationInsightInput!";
}
const text = `${str}) { tokenizeCreditCard(input: $input) { token creditCard { bin brandCode last4 cardholderName expirationMonth expirationYear binData { prepaid healthcare debit durbinRegulated commercial payroll issuingBank countryOfIssuance productId } } `;
let text1 = text;
if (BooleanResult) {
text1 = `${str}) { tokenizeCreditCard(input: $input) { token creditCard { bin brandCode last4 cardholderName expirationMonth expirationYear binData { prepaid healthcare debit durbinRegulated commercial payroll issuingBank countryOfIssuance productId } } authenticationInsight(input: $authenticationInsightInput) { customerAuthenticationRegulationEnvironment }`;
}
const obj = { query: `${tmp3} } }`, variables: null, operationName: "TokenizeCreditCard" };
const creditCard = authenticationInsight.creditCard;
let billingAddress = creditCard;
if (creditCard) {
billingAddress = creditCard.billingAddress;
}
let str3 = creditCard;
if (creditCard) {
str3 = creditCard.expirationDate;
}
let tmp4 = creditCard;
if (creditCard) {
let expirationMonth = creditCard.expirationMonth;
if (!expirationMonth) {
let trimmed = str3;
if (str3) {
trimmed = str3.split("/")[0].trim();
const str5 = str3.split("/")[0];
}
expirationMonth = trimmed;
}
tmp4 = expirationMonth;
}
let tmp6 = creditCard;
if (creditCard) {
let expirationYear = creditCard.expirationYear;
if (!expirationYear) {
let trimmed1 = str3;
if (str3) {
trimmed1 = str3.split("/")[1].trim();
const str7 = str3.split("/")[1];
}
expirationYear = trimmed1;
}
tmp6 = expirationYear;
}
let number = creditCard;
if (creditCard) {
number = creditCard.number;
}
const obj2 = { number, expirationMonth: tmp4, expirationYear: tmp6, cvv: null, cardholderName: null };
let cvv = creditCard;
if (creditCard) {
cvv = creditCard.cvv;
}
obj2.cvv = cvv;
let cardholderName = creditCard;
if (creditCard) {
cardholderName = creditCard.cardholderName;
}
const obj3 = { input: { creditCard: obj2, options: {} } };
obj2.cardholderName = cardholderName;
if (BooleanResult) {
const obj4 = { merchantAccountId: authenticationInsight.merchantAccountId };
obj3.authenticationInsightInput = obj4;
}
if (billingAddress) {
obj3.input.creditCard.billingAddress = billingAddress;
}
const input = obj3.input;
if (authenticationInsight.creditCard) {
if (authenticationInsight.creditCard.options) {
if (typeof authenticationInsight.creditCard.options.validate === "boolean") {
let flag = authenticationInsight.creditCard.options.validate;
}
if (typeof flag === "boolean") {
const obj5 = { validate: flag };
input.options = assign(obj5, input.options);
}
obj3.input = input;
obj.variables = obj3;
return obj;
}
}
if (!authenticationInsight.authorizationFingerprint) {
flag = true;
if (!authenticationInsight.authorizationFingerprint) {
if (authenticationInsight.tokenizationKey) {
flag = false;
}
}
} else {
flag = true;
}
};
},
{ "../../../../lib/assign": 140 }
];
obj[105] = items104;
const items105 = [
(arg0, arg1, arg2) => {
class GraphQL {
constructor(arg0) {
this._config = global.graphQL;
return;
}
getGraphQLEndpoint() {
return this._config.url;
}
isGraphQLRequest(arg0, arg1) {
clientApiPath = this.getClientApiPath(global);
closure_0 = clientApiPath;
_isGraphQLEnabledResult = this._isGraphQLEnabled();
tmp3 = !_isGraphQLEnabledResult;
if (_isGraphQLEnabledResult) {
tmp3 = !clientApiPath;
}
tmp4 = !tmp3;
if (!tmp3) {
tmp5 = module;
features = this._config.features;
closure_0 = module;
tmp7 = closure_1;
someResult = features.some(() => { ... });
someResult1 = closure_1.some(() => { ... });
tmp9 = !someResult1;
if (!someResult1) {
tmp9 = someResult;
}
tmp4 = tmp9;
}
return tmp4;
}
getClientApiPath(arg0) {
parts = global.split("/client_api/v1/");
first = undefined;
if (parts.length > 1) {
str = parts[1];
str2 = "?";
first = str.split("?")[0];
}
return first;
}
_isGraphQLEnabled() {
return Boolean(this._config);
}
}
closure_0 = { tokenize_credit_cards: "payment_methods/credit_cards", configuration: "configuration" };
closure_1 = ["creditCard.options.unionPayEnrollment"];
module.exports = GraphQL;
},
{}
];
obj[106] = items105;
const items106 = [
(arg0, arg1, arg2) => {
class GraphQLRequest {
constructor(arg0) {
obj = {};
graphQL = global.graphQL;
clientApiPath = graphQL.getClientApiPath(global.url);
({ graphQL: obj._graphQL, data: obj._data, method: obj._method, headers: obj._headers } = global);
obj._clientSdkMetadata = { source: global.metadata.source, integration: global.metadata.integration, sessionId: global.metadata.sessionId };
prototype = global.sendAnalyticsEvent;
if (!prototype) {
tmp2 = globalThis;
_Function = Function;
prototype = Function.prototype;
}
obj._sendAnalyticsEvent = prototype;
obj._generator = closure_8[clientApiPath];
obj._adapter = closure_9[clientApiPath];
_sendAnalyticsEventResult = obj._sendAnalyticsEvent("graphql.init");
return;
}
getUrl() {
_graphQL = this._graphQL;
return _graphQL.getGraphQLEndpoint();
}
getBody() {
_data = this._data;
obj = {};
closure_1 = obj;
keys = Object.keys(_data);
item = keys.forEach((item) => {
let tmp = closure_2_2(item);
if (typeof closure_1_0[item] === "object") {
closure_0 = tmp6;
obj = {};
let _Object = Object;
let keys = Object.keys(tmp6);
item = keys.forEach(() => { ... });
closure_1_1[tmp] = obj;
} else if (typeof tmp2[item] === "number") {
let _String = String;
closure_1_1[tmp] = String(tmp2[item]);
} else {
closure_1_1[tmp] = tmp2[item];
}
});
obj1 = { clientSdkMetadata: this._clientSdkMetadata };
return JSON.stringify(closure_1(obj1, this._generator(obj, closure_3(this._data.creditCard))));
}
getMethod() {
return "POST";
}
getHeaders() {
self = this;
_sendAnalyticsEvent = this._sendAnalyticsEvent;
if (this._data.authorizationFingerprint) {
str2 = "graphql.authorization-fingerprint";
_sendAnalyticsEventResult = _sendAnalyticsEvent("graphql.authorization-fingerprint");
tokenizationKey = self._data.authorizationFingerprint;
} else {
str = "graphql.tokenization-key";
_sendAnalyticsEventResult1 = _sendAnalyticsEvent("graphql.tokenization-key");
tokenizationKey = self._data.tokenizationKey;
}
obj = { Authorization: `Bearer ${tokenizationKey}`, "Braintree-Version": BRAINTREE_VERSION };
return assign({}, self._headers, obj);
}
adaptResponseBody(arg0) {
self = this;
tmp = "creditCard" in this._data;
if (tmp) {
tmp2 = closure_3;
tmp = closure_3(self._data.creditCard);
}
return this._adapter(global, self, tmp);
}
determineStatus(arg0, arg1) {
num = 200;
if (200 === global) {
tmp = module;
tmp2 = module.errors && module.errors[0] && module.errors[0].extensions && module.errors[0].extensions.errorClass;
if (!module.data) {
num3 = 422;
str = "VALIDATION";
if ("VALIDATION" !== tmp2) {
num4 = 403;
str2 = "AUTHORIZATION";
num5 = 403;
if ("AUTHORIZATION" !== tmp2) {
num6 = 401;
str3 = "AUTHENTICATION";
if ("AUTHENTICATION" !== tmp2) {
message = !tmp2;
if (!tmp2) {
message = module.errors[0].message;
}
num7 = 500;
if (message) {
num7 = 403;
}
num6 = num7;
}
num5 = num6;
}
num3 = num5;
}
num = num3;
}
num2 = num;
} else {
num2 = global;
if (!global) {
num2 = 500;
}
}
_sendAnalyticsEventResult = this._sendAnalyticsEvent(`graphql.status.${global}`);
_sendAnalyticsEventResult1 = this._sendAnalyticsEvent(`graphql.determinedStatus.${num2}`);
return num2;
}
}
const BRAINTREE_VERSION = global("../../constants").BRAINTREE_VERSION;
const assign = global("../../../lib/assign").assign;
closure_2 = global("../../../lib/snake-case-to-camel-case");
closure_3 = global("../../../lib/is-fastlane-checkout");
closure_4 = global("./generators/credit-card-tokenization");
closure_5 = global("./adapters/credit-card-tokenization");
closure_6 = global("./adapters/credit-card-tokenization-fastlane");
closure_7 = global("./generators/credit-card-for-fastlane-tokenization");
query = {
(arg0, arg1) => {
if (arg1) {
let tmp2 = closure_7(arg0);
} else {
tmp2 = closure_4(arg0);
}
return tmp2;
},
configuration: global("./generators/configuration")
};
let obj = {
(arg0, arg1, arg2) => {
if (arg2) {
let tmp2 = closure_6(arg0, arg1);
} else {
tmp2 = closure_5(arg0, arg1);
}
return tmp2;
},
configuration: global("./adapters/configuration")
};
module.exports = GraphQLRequest;
},
{ "../../../lib/assign": 140, "../../../lib/is-fastlane-checkout": 171, "../../../lib/snake-case-to-camel-case": 179, "../../constants": 93, "./adapters/configuration": 99, "./adapters/credit-card-tokenization": 101, "./adapters/credit-card-tokenization-fastlane": 100, "./generators/configuration": 103, "./generators/credit-card-for-fastlane-tokenization": 104, "./generators/credit-card-tokenization": 105 }
];
obj[107] = items106;
const items107 = [
(arg0, arg1, arg2) => {
closure_0 = global("../../lib/once");
closure_1 = global("./ajax-driver");
module.exports = (method, arg1) => {
let prototype = arg1;
if (!arg1) {
const _Function = Function;
prototype = Function.prototype;
}
let str = method.method;
if (!str) {
str = "GET";
}
method.method = str.toUpperCase();
let num = 60000;
if (null != method.timeout) {
num = method.timeout;
}
method.timeout = num;
method.data = method.data || {};
closure_1.request(method, closure_0(prototype));
};
},
{ "../../lib/once": 176, "./ajax-driver": 97 }
];
obj[108] = items107;
const items108 = [
(arg0, arg1, arg2) => {
module.exports = (arg0) => {
try {
const _JSON = JSON;
return JSON.parse(arg0);
} catch (err) {
}
};
},
{}
];
obj[109] = items108;
const items109 = [
(arg0, arg1, arg2) => {
module.exports = (str, str2) => {
if (typeof str !== "string") {
const _Error = Error;
const error = new Error("Method must be a string");
throw error;
} else {
let tmp2 = "get" !== str.toLowerCase();
if (tmp2) {
tmp2 = null != str2;
}
let tmp3 = str2;
if (tmp2) {
let json = str2;
if (typeof str2 !== "string") {
const _JSON = JSON;
json = JSON.stringify(str2);
}
tmp3 = json;
}
return tmp3;
}
};
},
{}
];
obj[110] = items109;
const items110 = [
(arg0, arg1, arg2) => {
let _XMLHttpRequest = typeof window !== "undefined";
if (typeof window !== "undefined") {
const _window2 = window;
_XMLHttpRequest = window.XMLHttpRequest;
}
if (_XMLHttpRequest) {
let _window = window;
let xMLHttpRequest = new window.XMLHttpRequest();
_XMLHttpRequest = "withCredentials" in xMLHttpRequest;
}
module.exports = {
isAvailable: _XMLHttpRequest,
getRequestObject() {
const _window = window;
if (_XMLHttpRequest) {
let xMLHttpRequest = new _window.XMLHttpRequest();
} else {
xMLHttpRequest = new _window.XDomainRequest();
}
return xMLHttpRequest;
}
};
},
{}
];
obj[111] = items110;
const items111 = [
(arg0, arg1, arg2) => {
const globalResult = global("../lib/braintree-error");
module.exports = { DATA_COLLECTOR_KOUNT_NOT_ENABLED: { type: globalResult.types.MERCHANT, code: "DATA_COLLECTOR_KOUNT_NOT_ENABLED", message: "Kount is not enabled for this merchant." }, DATA_COLLECTOR_KOUNT_ERROR: { type: globalResult.types.MERCHANT, code: "DATA_COLLECTOR_KOUNT_ERROR" }, DATA_COLLECTOR_REQUIRES_CREATE_OPTIONS: { type: globalResult.types.MERCHANT, code: "DATA_COLLECTOR_REQUIRES_CREATE_OPTIONS", message: "Data Collector must be created with Kount and/or PayPal." } };
},
{ "../lib/braintree-error": 143 }
];
obj[112] = items111;
const items112 = [
(arg0, arg1, arg2) => {
class Fraudnet {
constructor() {
return;
}
initialize(arg0) {
self = this;
self = this;
({ sessionId, environment } = global);
if (!sessionId) {
sessionId = global.clientSessionId;
}
self.sessionId = sessionId;
if (self.sessionId) {
str = self.sessionId;
num = 32;
num2 = 0;
self.sessionId = str.substring(0, 32);
}
if (!global.sessionId) {
c0 = self.sessionId;
}
date = new Date();
self._beaconId = `https://b.stats.paypal.com/counter.cgi?i=127.0.0.1&p=${tmp}&t=${obj.getTime() / 1000}&a=14`;
body = document.body;
({ sessionId: sessionId2, _beaconId } = self);
appendChildResult = body.appendChild(document.createElement("script"));
obj1 = { f: sessionId2, s: FRAUDNET_SOURCE, b: _beaconId };
if ("production" !== environment) {
flag = true;
obj1.sandbox = true;
}
appendChildResult.type = "application/json";
attr = appendChildResult.setAttribute("fncls", FRAUDNET_FNCLS);
appendChildResult.text = JSON.stringify(obj1);
self._parameterBlock = appendChildResult;
obj5 = { src: FRAUDNET_URL };
promise = loadScript(obj5);
nextPromise = promise.then((_thirdPartyBlock) => {
self._thirdPartyBlock = _thirdPartyBlock;
return self;
});
return nextPromise.catch(() => null);
}
teardown() {
element = document.querySelector("iframe[title=\"ppfniframe\"]");
parentNode = element;
if (element) {
parentNode = element.parentNode;
}
if (parentNode) {
parentNode2 = element.parentNode;
removeChildResult = parentNode2.removeChild(element);
}
element1 = document.querySelector("iframe[title=\"pbf\"]");
parentNode3 = element1;
if (element1) {
parentNode3 = element1.parentNode;
}
if (parentNode3) {
parentNode4 = element1.parentNode;
removeChildResult1 = parentNode4.removeChild(element1);
}
_parameterBlock = this._parameterBlock;
parentNode5 = _parameterBlock;
if (_parameterBlock) {
parentNode5 = _parameterBlock.parentNode;
}
if (parentNode5) {
parentNode6 = _parameterBlock.parentNode;
removeChildResult2 = parentNode6.removeChild(_parameterBlock);
}
_thirdPartyBlock = this._thirdPartyBlock;
parentNode7 = _thirdPartyBlock;
if (_thirdPartyBlock) {
parentNode7 = _thirdPartyBlock.parentNode;
}
if (parentNode7) {
parentNode8 = _thirdPartyBlock.parentNode;
removeChildResult3 = parentNode8.removeChild(_thirdPartyBlock);
}
return;
}
}
const FRAUDNET_FNCLS = global("../lib/constants").FRAUDNET_FNCLS;
const FRAUDNET_SOURCE = global("../lib/constants").FRAUDNET_SOURCE;
const FRAUDNET_URL = global("../lib/constants").FRAUDNET_URL;
const loadScript = global("../lib/assets").loadScript;
module.exports = {
setup(arg0) {
let obj = arg0;
if (!arg0) {
obj = {};
}
const obj2 = Object.create(Fraudnet.prototype);
if (!obj.sessionId) {
if (sessionId) {
obj2.sessionId = sessionId;
let resolved = Promise.resolve(obj2);
}
return resolved;
}
resolved = obj2.initialize(obj);
},
clearSessionIdCache() {
c0 = null;
}
};
},
{ "../lib/assets": 139, "../lib/constants": 145 }
];
obj[113] = items112;
const items113 = [
(arg0, arg1, arg2) => {
closure_0 = global("./kount");
closure_1 = global("./fraudnet");
closure_2 = global("../lib/braintree-error");
closure_3 = global("../lib/basic-component-verification");
closure_4 = global("../lib/create-deferred-client");
closure_5 = global("../lib/create-assets-url");
closure_6 = global("../lib/methods");
closure_7 = global("../lib/convert-methods-to-error");
const globalResult = global("@braintree/wrap-promise");
closure_9 = global("./errors");
module.exports = {
create: globalResult(function create(client) {
closure_2 = { _instances: [] };
return closure_3.verify({ name: "Data Collector", client: client.client, authorization: client.authorization }).then(() => {
closure_2._instantiatedWithAClient = !client.useDeferredClient;
let obj = { authorization: client.authorization, client: client.client, debug: client.debug, assetsUrl: closure_5.create(client.authorization), name: "Data Collector" };
const tmp = closure_2;
let obj2 = closure_4.create({ authorization: client.authorization, client: client.client, debug: client.debug, assetsUrl: closure_5.create(client.authorization), name: "Data Collector" });
const nextPromise = closure_4.create({ authorization: client.authorization, client: client.client, debug: client.debug, assetsUrl: closure_5.create(client.authorization), name: "Data Collector" }).then((getConfiguration) => {
const configuration = getConfiguration.getConfiguration();
if (true === closure_0.kount) {
if (configuration.gatewayConfiguration.kount) {
try {
const obj = { environment: configuration.gatewayConfiguration.environment, merchantId: configuration.gatewayConfiguration.kount.kountMerchantId };
const setupResult = closure_0.setup(obj);
let deviceData = setupResult.deviceData;
const _instances = closure_1_2._instances;
_instances.push(setupResult);
} catch (tmp8) {
const obj2 = { type: constants.DATA_COLLECTOR_KOUNT_ERROR.type, code: constants.DATA_COLLECTOR_KOUNT_ERROR.code, message: tmp8.message };
const tmp15 = new closure_2(obj2);
return Promise.reject(tmp15);
}
}
return Promise.resolve(getConfiguration);
}
deviceData = {};
});
closure_2._createPromise = closure_4.create({ authorization: client.authorization, client: client.client, debug: client.debug, assetsUrl: closure_5.create(client.authorization), name: "Data Collector" }).then((getConfiguration) => {
const configuration = getConfiguration.getConfiguration();
if (true === closure_0.kount) {
if (configuration.gatewayConfiguration.kount) {
try {
const obj = { environment: configuration.gatewayConfiguration.environment, merchantId: configuration.gatewayConfiguration.kount.kountMerchantId };
const setupResult = closure_0.setup(obj);
let deviceData = setupResult.deviceData;
const _instances = closure_1_2._instances;
_instances.push(setupResult);
} catch (tmp8) {
const obj2 = { type: constants.DATA_COLLECTOR_KOUNT_ERROR.type, code: constants.DATA_COLLECTOR_KOUNT_ERROR.code, message: tmp8.message };
const tmp15 = new closure_2(obj2);
return Promise.reject(tmp15);
}
}
return Promise.resolve(getConfiguration);
}
deviceData = {};
}).then((getConfiguration) => {
const configuration = getConfiguration.getConfiguration();
let correlationId = closure_0.riskCorrelationId;
if (!correlationId) {
correlationId = tmp3.clientMetadataId;
}
if (!correlationId) {
correlationId = tmp3.correlationId;
}
return closure_2_1.setup({ sessionId: correlationId, clientSessionId: configuration.analyticsMetadata.sessionId, environment: configuration.gatewayConfiguration.environment }).then(() => { ... });
}).then(() => {
let rejectResult = closure_1_2;
if (0 === closure_1_2._instances.length) {
const tmp10 = new closure_2(constants.DATA_COLLECTOR_REQUIRES_CREATE_OPTIONS);
rejectResult = Promise.reject(tmp10);
} else {
const _JSON = JSON;
rejectResult.deviceData = JSON.stringify(rawDeviceData);
rejectResult.rawDeviceData = rawDeviceData;
}
return rejectResult;
});
closure_2.teardown = globalResult(function teardown() {
return _instances._createPromise.then(() => { ... });
});
client = closure_2;
closure_2.getDeviceData = globalResult(function getDeviceData(arg0) {
let obj = arg0;
if (!arg0) {
obj = {};
}
return obj._createPromise.then(() => { ... });
});
let _createPromise = closure_2;
if (closure_2._instantiatedWithAClient) {
_createPromise = tmp._createPromise;
}
return _createPromise;
});
}),
VERSION: "3.112.1"
};
},
{ "../lib/basic-component-verification": 141, "../lib/braintree-error": 143, "../lib/convert-methods-to-error": 146, "../lib/create-assets-url": 148, "../lib/create-deferred-client": 150, "../lib/methods": 175, "./errors": 112, "./fraudnet": 113, "./kount": 115, "@braintree/wrap-promise": 40 }
];
obj[114] = items113;
const items114 = [
(arg0, arg1, arg2) => {
class Kount {
constructor(arg0) {
self = this;
obj = Kount;
cachedDeviceData = Kount.getCachedDeviceData(global.merchantId);
if (cachedDeviceData) {
self.deviceData = cachedDeviceData;
flag = true;
self._isCached = true;
return;
} else {
self._currentEnvironment = self._initializeEnvironment(global);
tmp2 = closure_0;
random = closure_0.random;
startCollectorsResult = random.startCollectors();
self._deviceSessionId = self._generateDeviceSessionId();
self.deviceData = self._getDeviceData();
setCachedDeviceDataResult = obj.setCachedDeviceData(global.merchantId, self.deviceData);
self._iframe = self._setupIFrame();
return;
}
}
static getCachedDeviceData(arg0) {
return closure_3[global];
}
static setCachedDeviceData(arg0, arg1) {
closure_3[global] = module;
return;
}
teardown() {
self = this;
if (!this._isCached) {
tmp = closure_0;
random = closure_0.random;
stopCollectorsResult = random.stopCollectors();
_removeIframeResult = self._removeIframe();
}
return;
}
_removeIframe() {
parentNode = this._iframe.parentNode;
removeChildResult = parentNode.removeChild(this._iframe);
return;
}
_getDeviceData() {
obj = { deviceSessionId: this._deviceSessionId, fraudMerchantId: this._currentEnvironment.id };
return closure_1(obj);
}
_generateDeviceSessionId() {
random = closure_0.random;
hex = closure_0.codec.hex;
return hex.fromBits(random.randomWords(4, 0));
}
_setupIFrame() {
self = this;
closure_0 = `?m=${this._currentEnvironment.id}&s=${this._deviceSessionId}`;
element = document.createElement("iframe");
closure_1 = element;
element.width = 1;
element.id = `braintreeDataFrame-${this._deviceSessionId}`;
element.height = 1;
element.frameBorder = 0;
element.scrolling = "no";
element.style.position = "fixed";
element.style.left = "-999999px";
element.style.top = "-999999px";
element.title = "Braintree-Kount-iframe";
attr = element.setAttribute("aria-hidden", "true");
body = document.body;
appendChildResult = body.appendChild(element);
timerId = setTimeout(() => {
element.src = `${self._currentEnvironment.url}/logo.htm${closure_0}`;
element.innerHTML = `
`;
}, 10);
return element;
}
_initializeEnvironment(arg0) {
tmp = closure_2[global.environment];
if (null == tmp) {
tmp2 = globalThis;
_Error = Error;
str = " is not a valid environment for kount.environment";
tmp3 = new.target;
tmp4 = new.target;
error = new Error(global.environment + " is not a valid environment for kount.environment");
tmp6 = error;
throw error;
} else {
obj = { url: null, name: null, id: null };
obj.url = tmp;
({ environment: obj.name, merchantId: obj.id } = global);
return obj;
}
}
}
handler = global("./vendor/sjcl");
closure_1 = global("../lib/camel-case-to-snake-case");
const environmentUrls = { development: "https://assets.qa.braintreepayments.com/data", qa: "https://assets.qa.braintreepayments.com/data", sandbox: "https://assets.braintreegateway.com/sandbox/data", production: "https://assets.braintreegateway.com/data" };
closure_3 = {};
module.exports = {
setup(arg0) {
let obj = arg0;
if (null == arg0) {
obj = {};
}
const obj3 = Object.create(Kount.prototype);
const cachedDeviceData = obj2.getCachedDeviceData(obj.merchantId);
if (cachedDeviceData) {
obj3.deviceData = cachedDeviceData;
obj3._isCached = true;
} else {
obj3._currentEnvironment = obj3._initializeEnvironment(obj);
const random = closure_0.random;
random.startCollectors();
obj3._deviceSessionId = obj3._generateDeviceSessionId();
obj3.deviceData = obj3._getDeviceData();
obj2.setCachedDeviceData(obj.merchantId, obj3.deviceData);
obj3._iframe = obj3._setupIFrame();
}
return obj3;
},
Kount,
environmentUrls
};
},
{ "../lib/camel-case-to-snake-case": 144, "./vendor/sjcl": 116 }
];
obj[115] = items114;
const items115 = [
(arg0, arg1, arg2) => {
function t(arg0, arg1, arg2) {
if (4 !== arg1.length) {
const invalid = new obj.exception.invalid("invalid aes block size");
throw invalid;
} else {
let num3 = 3;
if (arg2) {
num3 = 1;
}
let tmp3 = arg1[num3] ^ arr2[3];
const diff = arr2.length / 4 - 2;
const items = [0, 0, 0, 0];
[tmp5, tmp6, tmp7, tmp8, tmp9] = arg0.l[arg2];
let num10 = 4;
let num11 = 0;
let tmp10 = tmp2;
let tmp11 = tmp;
let tmp12 = tmp34;
let num12 = 4;
let tmp13 = tmp2;
let tmp14 = tmp;
let tmp15 = tmp34;
let tmp16 = tmp3;
if (0 < diff) {
do {
let tmp17 = tmp5[tmp12 >>> 24] ^ tmp6[tmp11 >> 16 & 255] ^ tmp7[tmp10 >> 8 & 255] ^ tmp8[255 & tmp3] ^ arr2[num10];
let tmp18 = tmp5[tmp11 >>> 24] ^ tmp6[tmp10 >> 16 & 255] ^ tmp7[tmp3 >> 8 & 255] ^ tmp8[255 & tmp12] ^ arr2[num10 + 1];
let tmp19 = tmp5[tmp10 >>> 24] ^ tmp6[tmp3 >> 16 & 255] ^ tmp7[tmp12 >> 8 & 255] ^ tmp8[255 & tmp11] ^ arr2[num10 + 2];
tmp3 = tmp5[tmp3 >>> 24] ^ tmp6[tmp12 >> 16 & 255] ^ tmp7[tmp11 >> 8 & 255] ^ tmp8[255 & tmp10] ^ arr2[num10 + 3];
num10 = num10 + 4;
num11 = num11 + 1;
tmp10 = tmp19;
tmp11 = tmp18;
tmp12 = tmp17;
num12 = num10;
tmp13 = tmp19;
tmp14 = tmp18;
tmp15 = tmp17;
tmp16 = tmp3;
} while (num11 < diff);
}
let num13 = 0;
do {
let tmp26 = num13;
let tmp20 = num12;
let tmp22 = tmp13;
let tmp23 = tmp14;
let tmp24 = tmp15;
if (arg2) {
tmp26 = 3 & -num13;
}
num12 = num12 + 1;
items[tmp26] = tmp9[tmp15 >>> 24] << 24 ^ tmp9[tmp14 >> 16 & 255] << 16 ^ tmp9[tmp13 >> 8 & 255] << 8 ^ tmp9[255 & tmp16] ^ arr2[tmp20];
num13 = num13 + 1;
tmp13 = tmp16;
tmp14 = tmp22;
tmp15 = tmp23;
tmp16 = tmp24;
} while (num13 < 4);
return items;
}
}
function u(u, arg1) {
let tmp11;
let tmp12;
let tmp13;
let tmp15;
let tmp16;
let tmp17;
let tmp21;
let tmp22;
u = u.u;
[tmp2, tmp3, tmp4, tmp5, tmp6, tmp7, tmp8, tmp9] = u;
let num = 0;
do {
tmp11 = tmp8;
tmp12 = tmp7;
tmp13 = tmp6;
tmp15 = tmp4;
tmp16 = tmp3;
tmp17 = tmp2;
if (num < 16) {
let tmp19 = arg1[num];
} else {
let tmp23 = arg1[num + 1 & 15];
let tmp24 = arg1[num + 14 & 15];
let tmp25 = 15 & num;
tmp19 = (tmp23 >>> 7 ^ tmp23 >>> 18 ^ tmp23 >>> 3 ^ tmp23 << 25 ^ tmp23 << 14) + (tmp24 >>> 17 ^ tmp24 >>> 19 ^ tmp24 >>> 10 ^ tmp24 << 15 ^ tmp24 << 13) + arg1[tmp25] + arg1[num + 9 & 15] | 0;
arg1[tmp25] = tmp19;
}
let sum = tmp19 + tmp9 + (tmp6 >>> 6 ^ tmp6 >>> 11 ^ tmp6 >>> 25 ^ tmp6 << 26 ^ tmp6 << 21 ^ tmp6 << 7) + (tmp8 ^ tmp6 & (tmp7 ^ tmp8)) + tmp[num];
tmp21 = tmp5 + sum | 0;
tmp22 = sum + (tmp2 & tmp3 ^ tmp4 & (tmp2 ^ tmp3)) + (tmp2 >>> 2 ^ tmp2 >>> 13 ^ tmp2 >>> 22 ^ tmp2 << 30 ^ tmp2 << 19 ^ tmp2 << 10) | 0;
num = num + 1;
tmp9 = tmp8;
tmp8 = tmp7;
tmp7 = tmp6;
tmp6 = tmp21;
tmp5 = tmp4;
tmp4 = tmp3;
tmp3 = tmp2;
tmp2 = tmp22;
} while (num < 64);
u[0] = u[0] + tmp22 | 0;
u[1] = u[1] + tmp17 | 0;
u[2] = u[2] + tmp16 | 0;
u[3] = u[3] + tmp15 | 0;
u[4] = u[4] + tmp21 | 0;
u[5] = u[5] + tmp13 | 0;
u[6] = u[6] + tmp12 | 0;
u[7] = u[7] + tmp11 | 0;
}
function C(addEntropy, arg1) {
if (typeof window !== "undefined") {
const _window3 = window;
if (window.performance) {
const _window = window;
if (typeof window.performance.now === "function") {
const _window2 = window;
const _performance = window.performance;
addEntropy.addEntropy(_performance.now(), 0, "loadtime");
}
}
}
addEntropy.addEntropy(new Date().valueOf(), 0, "loadtime");
}
function y(g) {
g.g[0] = g.g[0] + 1 | 0;
let num = 0;
if (!g.g[0]) {
const sum = num + 1;
while (sum < 4) {
g.g[sum] = g.g[sum] + 1 | 0;
num = sum;
if (g.g[sum]) {
break;
}
}
}
C = g.C;
g.g[0] = g.g[0] + 1 | 0;
let num2 = 0;
if (!g.g[0]) {
const sum1 = num2 + 1;
while (sum1 < 4) {
g.g[sum1] = g.g[sum1] + 1 | 0;
num2 = sum1;
if (g.g[sum1]) {
break;
}
}
}
const C2 = g.C;
g.b = C.encrypt(g.g).concat(C2.encrypt(g.g));
const aes = new obj.cipher.aes(g.b);
g.C = aes;
}
const exports = {
cipher: {},
hash: {},
keyexchange: {},
mode: {},
misc: {},
codec: {},
exception: {
corrupt(arg0) {
},
invalid(arg0) {
},
bug(arg0) {
},
notReady(arg0) {
}
}
};
exports.cipher.aes = function(arr) {
const self = this;
if (!this.l[0][0][0]) {
self.G();
}
if (4 !== arr.length) {
if (6 !== length) {
if (8 !== length) {
const invalid = new obj.exception.invalid("invalid aes key size");
throw invalid;
}
}
}
const substr = arr.slice(0);
const items = [substr, ];
const items1 = [];
items[1] = items1;
self.b = items;
let num3 = 1;
let sum = length;
let diff1 = length;
if (arr.length < 4 * arr.length + 28) {
do {
let tmp8 = substr[sum - 1];
let tmp9 = 0 == sum % length;
if (!tmp9) {
let tmp12 = tmp5;
if (tmp5) {
tmp12 = 4 == sum % length;
}
tmp9 = tmp12;
}
let tmp13 = num3;
let tmp14 = tmp8;
if (tmp9) {
let tmp15 = tmp2[tmp8 >>> 24] << 24 ^ tmp2[tmp8 >> 16 & 255] << 16 ^ tmp2[tmp8 >> 8 & 255] << 8 ^ tmp2[255 & tmp8];
let tmp16 = num3;
let tmp17 = tmp15;
if (0 == sum % length) {
tmp17 = tmp15 << 8 ^ tmp15 >>> 24 ^ num3 << 24;
tmp16 = num3 << 1 ^ 283 * (num3 >> 7);
}
tmp13 = tmp16;
tmp14 = tmp17;
}
substr[sum] = substr[sum - length] ^ tmp14;
sum = sum + 1;
num3 = tmp13;
diff1 = sum;
} while (sum < 4 * length + 28);
}
let num4 = 0;
while (diff1) {
let diff = diff1;
if (!(3 & num4)) {
diff = diff1 - 4;
}
let tmp21 = substr[diff];
let tmp22 = tmp21;
if (4 < diff1) {
tmp22 = tmp21;
if (num4 >= 4) {
tmp22 = tmp3[0][tmp2[tmp21 >>> 24]] ^ tmp3[1][tmp2[tmp21 >> 16 & 255]] ^ tmp3[2][tmp2[tmp21 >> 8 & 255]] ^ tmp3[3][tmp2[255 & tmp21]];
}
}
items1[num4] = tmp22;
num4 = num4 + 1;
diff1 = diff1 - 1;
}
};
let obj2 = {
encrypt(g) {
return t(this, g, 0);
},
decrypt(arg0) {
return t(this, arg0, 1);
},
l: null,
G() {
let tmp14;
const first = this.l[0];
const items = [];
const items1 = [];
let num = 0;
do {
let tmp4 = num << 1 ^ 283 * (num >> 7);
items[num] = tmp4;
items1[tmp4 ^ num] = num;
num = num + 1;
} while (num < 256);
let num2 = 0;
let num3 = 0;
let num4 = 0;
if (!first[4][0]) {
const tmp5 = num2 ^ num2 << 1 ^ num2 << 2 ^ num2 << 3 ^ num2 << 4;
tmp3[num3] = tmp5 >> 8 ^ 255 & tmp5 ^ 99;
tmp2[4][tmp5 >> 8 ^ 255 & tmp5 ^ 99] = num3;
let num5 = items[num3];
let tmp8 = 16843009 * items[tmp7] ^ 65537 * tmp7 ^ 257 * num5 ^ 16843008 * num3;
let tmp9 = 257 * items[tmp6] ^ 16843008 * tmp6;
let num6 = 0;
do {
do {
let tmp12 = tmp9 << 24 ^ tmp9 >>> 8;
first[num6][num3] = tmp12;
let tmp13 = tmp8 << 24 ^ tmp8 >>> 8;
tmp2[num6][tmp6] = tmp13;
num6 = num6 + 1;
tmp8 = tmp13;
tmp9 = tmp12;
} while (num6 < 4);
if (!num5) {
num5 = 1;
}
tmp14 = num3 ^ num5;
let tmp15 = items1[num2] || 1;
num2 = tmp15;
num3 = tmp14;
num4 = 0;
} while (!tmp3[tmp14]);
}
do {
let arr3 = first[num4];
first[num4] = arr3.slice(0);
let arr4 = tmp2[num4];
tmp2[num4] = arr4.slice(0);
num4 = num4 + 1;
} while (num4 < 5);
}
};
let items = [[], [], [], [], []];
let items1 = [items, ];
let items2 = [[], [], [], [], []];
items1[1] = items2;
obj2.l = items1;
exports.cipher.aes.prototype = obj2;
exports.bitArray = {
bitSlice(arr, arg1, arg2) {
const bitArray = obj.bitArray;
const substr = bitArray.M(arr.slice(arg1 / 32), 32 - (31 & arg1)).slice(1);
let clampResult = substr;
if (undefined !== arg2) {
const bitArray2 = obj.bitArray;
clampResult = bitArray2.clamp(substr, arg2 - arg1);
}
return clampResult;
},
extract(arg0, arg1, arg2) {
const rounded = Math.floor(-arg1 - arg2 & 31);
if (-32 & (arg1 + arg2 - 1 ^ arg1)) {
let tmp3 = tmp2 << 32 - rounded ^ arg0[arg1 / 32 + 1 | 0] >>> rounded;
} else {
tmp3 = tmp2 >>> rounded;
}
return tmp3 & (1 << arg2) - 1;
},
concat(arr, arg1) {
if (0 !== arr.length) {
if (0 !== arg1.length) {
const bitArray = obj.bitArray;
const partial = bitArray.getPartial(tmp);
if (32 === partial) {
let combined = arr.concat(arg1);
} else {
const bitArray2 = obj.bitArray;
combined = bitArray2.M(arg1, partial, tmp | 0, arr.slice(0, arr.length - 1));
const tmp4 = tmp | 0;
}
return combined;
}
}
return arr.concat(arg1);
},
bitLength(toBitsResult) {
let num = 0;
if (0 !== toBitsResult.length) {
const bitArray = obj.bitArray;
const diff = length - 1;
num = 32 * diff + bitArray.getPartial(toBitsResult[length - 1]);
}
return num;
},
clamp(arr, arg1) {
if (32 * arr.length < arg1) {
return arr;
} else {
const _Math = Math;
const substr = arr.slice(0, Math.ceil(arg1 / 32));
if (tmp) {
const bitArray = obj.bitArray;
const diff = length - 1;
substr[diff] = bitArray.partial(tmp5, substr[length - 1] & 2147483648 >> tmp5 - 1, 1);
}
return substr;
}
},
partial(arg0, arg1, arg2) {
if (32 === arg0) {
return arg1;
} else {
if (arg2) {
let tmp2 = arg1 | 0;
} else {
tmp2 = arg1 << 32 - arg0;
}
const sum = tmp2 + 1099511627776 * arg0;
}
},
getPartial(arr) {
return Math.round(arr / 1099511627776) || 32;
},
equal(toBitsResult, toBitsResult) {
let length;
({ bitArray, bitArray: bitArray2 } = obj);
if (bitLengthResult !== bitArray2.bitLength(toBitsResult)) {
return false;
} else {
let num3 = 0;
let num4 = 0;
let num5 = 0;
if (0 < toBitsResult.length) {
do {
num3 = num3 | toBitsResult[num4] ^ toBitsResult[num4];
num4 = num4 + 1;
num5 = num3;
length = toBitsResult.length;
} while (num4 < length);
}
return 0 === num5;
}
bitLengthResult = bitArray.bitLength(toBitsResult);
},
M(arr, arg1, arg2, arg3) {
let length;
let items = arg3;
if (undefined === arg3) {
items = [];
}
let diff = arg1;
let num = arg2;
let num2 = arg2;
let tmp2 = arg1;
if (32 <= arg1) {
do {
arr = items.push(num);
diff = diff - 32;
num = 0;
num2 = 0;
tmp2 = diff;
} while (32 <= diff);
}
if (0 === tmp2) {
return items.concat(arr);
} else {
let num3 = 0;
let tmp5 = num2;
let arr6 = num2;
if (0 < arr.length) {
do {
let arr5 = items.push(tmp5 | arr[num3] >>> tmp2);
tmp5 = arr[num3] << 32 - tmp2;
num3 = num3 + 1;
arr6 = tmp5;
length = arr.length;
} while (num3 < length);
}
let num4 = 0;
if (arr.length) {
num4 = arr[arr.length - 1];
}
const bitArray = obj.bitArray;
const partial = bitArray.getPartial(num4);
const bitArray2 = obj.bitArray;
if (32 >= tmp2 + partial) {
arr6 = items.pop();
}
items.push(bitArray2.partial(tmp2 + partial & 31, arr6, 1));
return items;
}
},
Y(arg0, arg1) {
const items = [arg0[0] ^ arg1[0], arg0[1] ^ arg1[1], arg0[2] ^ arg1[2], arg0[3] ^ arg1[3]];
return items;
},
byteswapM(arg0) {
let length;
let num = 0;
if (0 < arg0.length) {
do {
let tmp = arg0[num];
arg0[num] = tmp >>> 24 | tmp >>> 8 & 65280 | (65280 & tmp) << 8 | tmp << 24;
num = num + 1;
length = arg0.length;
} while (num < length);
}
return arg0;
}
};
exports.codec.utf8String = {
fromBits(toBitsResult) {
const bitArray = obj.bitArray;
const bitLengthResult = bitArray.bitLength(toBitsResult);
let str = "";
let str2 = "";
let num = 0;
if (0 < bitLengthResult / 8) {
do {
let tmp4 = tmp2;
if (!(3 & num)) {
tmp4 = toBitsResult[num / 4];
}
let _String = String;
str = str + String.fromCharCode(tmp4 >>> 8 >>> 8 >>> 8);
tmp2 = tmp4 << 8;
num = num + 1;
str2 = str;
} while (num < bitLengthResult / 8);
}
return decodeURIComponent(escape(str2));
},
toBits(arg0) {
const unescapeResult = unescape(encodeURIComponent(arg0));
const items = [];
let num = 0;
let num2 = 0;
let num3 = 0;
let num4 = 0;
if (0 < unescapeResult.length) {
do {
let tmp = num << 8 | unescapeResult.charCodeAt(num2);
let num5 = tmp;
if (!(3 & ~num2)) {
let arr = items.push(tmp);
num5 = 0;
}
num2 = num2 + 1;
num = num5;
num3 = num5;
num4 = num2;
} while (num2 < unescapeResult.length);
}
if (3 & num4) {
const bitArray = obj.bitArray;
items.push(bitArray.partial(8 * tmp4, num3));
}
return items;
}
};
exports.codec.hex = {
fromBits(toBitsResult) {
let length;
let str = "";
let num = 0;
let str2 = "";
if (0 < toBitsResult.length) {
do {
let str3 = 263882790666240 + (toBitsResult[num] | 0);
let str4 = str3.toString(16);
str = `${str4.substr(4)}`;
num = num + 1;
str2 = str;
length = toBitsResult.length;
} while (num < length);
}
const bitArray = obj.bitArray;
return str2.substr(0, bitArray.bitLength(toBitsResult) / 4);
},
toBits(str) {
let length;
const items = [];
const replaced = str.replace(/\s|0x/g, "");
let num = 0;
if (0 < `${arr2}00000000`.length) {
do {
let _parseInt = parseInt;
let arr = items.push(0 ^ parseInt(`${arr2}00000000`.substr(num, 8), 16));
num = num + 8;
length = `${arr2}00000000`.length;
} while (num < length);
}
const bitArray = obj.bitArray;
return bitArray.clamp(items, 4 * replaced.length);
}
};
exports.hash.sha256 = function(u) {
const self = this;
if (!this.b[0]) {
self.G();
}
if (u) {
u = u.u;
self.u = u.slice(0);
const o = u.o;
self.o = o.slice(0);
self.h = u.h;
} else {
self.reset();
}
};
exports.hash.sha256.hash = (arg0) => {
const sha256 = new obj.hash.sha256();
return sha256.update(arg0).finalize();
};
exports.hash.sha256.prototype = {
blockSize: 512,
reset() {
const K = this.K;
this.u = K.slice(0);
this.o = [];
this.h = 0;
return this;
},
update(toBitsResult) {
if (typeof toBitsResult === "string") {
const utf8String = obj.codec.utf8String;
toBitsResult = utf8String.toBits(toBitsResult);
}
const self = this;
const bitArray = obj.bitArray;
const combined = bitArray.concat(this.o, toBitsResult);
this.o = combined;
const h = this.h;
const bitArray2 = obj.bitArray;
const sum = h + bitArray2.bitLength(toBitsResult);
this.h = sum;
if (9007199254740991 < sum) {
const invalid = new tmp2.exception.invalid("Cannot hash more than 2^53 - 1 bits");
throw invalid;
} else {
const _Uint32Array2 = Uint32Array;
if (typeof Uint32Array !== "undefined") {
const _Uint32Array = Uint32Array;
const uint32Array = new Uint32Array(combined);
let diff = 512 + h - (512 + h & 511);
let num6 = 0;
let num7 = 0;
if (diff <= sum) {
do {
let sum1 = num6 + 1;
let tmp14 = u(self, uint32Array.subarray(16 * num6, 16 * sum1));
diff = diff + 512;
num6 = sum1;
num7 = sum1;
} while (diff <= sum);
}
combined.splice(0, 16 * num7);
} else {
let diff1 = 512 + h - (512 + h & 511);
if (diff1 <= sum) {
do {
let tmp5 = u(self, combined.splice(0, 16));
diff1 = diff1 + 512;
} while (diff1 <= sum);
}
}
return self;
}
tmp2 = obj;
},
finalize() {
let length;
let tmp4;
const self = this;
({ bitArray, bitArray: bitArray2 } = obj);
({ o, u } = this);
const items = [bitArray2.partial(1, 1)];
const combined = bitArray.concat(o, items);
let sum = combined.length + 2;
if (15 & sum) {
do {
let arr = combined.push(0);
let sum1 = sum + 1;
sum = sum1;
tmp4 = 15 & sum1;
} while (tmp4);
}
combined.push(Math.floor(self.h / 4294967296));
combined.push(self.h | 0);
if (combined.length) {
do {
let tmp8 = u(self, combined.splice(0, 16));
length = combined.length;
} while (length);
}
self.reset();
return u;
},
K: [],
b: [],
G() {
let sum1;
const self = this;
let num = 2;
let num2 = 0;
do {
let num3 = 2;
let flag = true;
if (4 <= num) {
flag = false;
while (0 !== num % num3) {
let sum = num3 + 1;
num3 = sum;
flag = true;
if (sum * sum > num) {
break;
}
}
}
sum1 = num2;
if (flag) {
if (num2 < 8) {
let _Math = Math;
let powResult = Math.pow(num, 0.5);
let _Math2 = Math;
self.K[num2] = 4294967296 * (powResult - Math.floor(powResult)) | 0;
}
let _Math3 = Math;
let powResult1 = Math.pow(num, 0.3333333333333333);
let _Math4 = Math;
self.b[num2] = 4294967296 * (powResult1 - Math.floor(powResult1)) | 0;
sum1 = num2 + 1;
}
num = num + 1;
num2 = sum1;
} while (sum1 < 64);
}
};
exports.prng = (D) => {
obj = {};
const sha256 = new obj.hash.sha256();
const items = [sha256];
obj.c = items;
obj.i = [0];
obj.H = 0;
obj.v = {};
obj.F = 0;
obj.J = {};
obj.T = 0;
obj.j = 0;
obj.f = 0;
obj.L = 0;
obj.b = [0, 0, 0, 0, 0, 0, 0, 0];
obj.g = [0, 0, 0, 0];
obj.C = undefined;
obj.D = D;
obj.s = false;
obj.B = { progress: {}, seeded: {} };
obj.S = 0;
obj.m = 0;
obj.w = 1;
obj.A = 2;
obj.O = 65536;
obj.I = [0, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024];
obj.P = 30000;
obj.N = 80;
};
exports.prng.prototype = {
randomWords(arg0, arg1) {
const self = this;
const isReadyResult = this.isReady(arg1);
if (isReadyResult === this.m) {
const notReady = new obj.exception.notReady("generator isn't seeded");
throw notReady;
} else {
if (isReadyResult & self.A) {
const items = [];
const _Date = Date;
const date = new Date();
const sum = date.valueOf() + self.P;
items[0] = sum;
self.L = sum;
let num5 = 0;
do {
let _Math = Math;
let arr = items.push(4294967296 * Math.random() | 0);
num5 = num5 + 1;
} while (num5 < 16);
let num6 = 0;
let tmp9 = items;
if (0 < self.c.length) {
const first = self.c[0];
const combined = items.concat(first.finalize());
const first1 = self.i[0];
self.i[0] = 0;
let tmp13 = first1;
let num7 = 0;
let obj3 = combined;
if (!tmp2) {
const sum1 = num7 + 1;
num6 = tmp13;
tmp9 = obj3;
while (sum1 < self.c.length) {
let obj4 = self.c[sum1];
let combined1 = obj3.concat(obj4.finalize());
let sum2 = tmp13 + self.i[sum1];
self.i[sum1] = 0;
tmp13 = sum2;
num7 = sum1;
obj3 = combined1;
if (tmp10) {
continue;
} else {
tmp13 = sum2;
num7 = sum1;
obj3 = combined1;
num6 = sum2;
tmp9 = combined1;
if (self.H & 1 << sum1) {
break;
}
}
continue;
}
} else {
tmp13 = first1;
num7 = 0;
obj3 = combined;
num6 = first1;
tmp9 = combined;
}
}
if (self.H >= 1 << self.c.length) {
const c = self.c;
const sha2561 = new obj.hash.sha256();
c.push(sha2561);
const i = self.i;
i.push(0);
}
self.f = self.f - num6;
if (num6 > self.j) {
self.j = num6;
}
self.H = self.H + 1;
const sha256 = obj.hash.sha256;
const b = self.b;
self.b = sha256.hash(b.concat(tmp9));
const aes = new obj.cipher.aes(self.b);
self.C = aes;
self.g[0] = self.g[0] + 1 | 0;
let num9 = 0;
if (!self.g[0]) {
const sum3 = num9 + 1;
while (sum3 < 4) {
self.g[sum3] = self.g[sum3] + 1 | 0;
num9 = sum3;
if (self.g[sum3]) {
break;
}
}
}
tmp2 = isReadyResult & self.w;
}
const items1 = [];
for (let num13 = 0; num13 < arg0; num13 = num13 + 4) {
if (0 === (num13 + 1) % self.O) {
let tmp35 = y(self);
}
self.g[0] = self.g[0] + 1 | 0;
let num14 = 0;
if (!self.g[0]) {
let sum4 = num14 + 1;
while (sum4 < 4) {
self.g[sum4] = self.g[sum4] + 1 | 0;
num14 = sum4;
if (self.g[sum4]) {
break;
}
}
}
C = self.C;
let encryptResult = C.encrypt(self.g);
let arr4 = items1.push(encryptResult[0], encryptResult[1], encryptResult[2], encryptResult[3]);
}
y(self);
return items1.slice(0, arg0);
}
},
setDefaultParanoia(D, arg1) {
if (0 === D) {
if ("Setting paranoia=0 will ruin your security; use it only for testing" !== arg1) {
const invalid = new obj.exception.invalid("Setting paranoia=0 will ruin your security; use it only for testing");
throw invalid;
}
}
this.D = D;
},
addEntropy(_performance, arg1, loadtime) {
let length2;
let length3;
let tmp16;
let str = loadtime;
if (!loadtime) {
str = "user";
}
const self = this;
const valueOfResult = new Date().valueOf();
let num = this.v[str];
let tmp3 = this.J[str];
const date = new Date();
if (undefined === tmp3) {
self.T = +self.T + 1;
self.J[str] = +self.T;
tmp3 = tmp4;
}
if (undefined === num) {
self.v[str] = 0;
num = 0;
}
self.v[str] = (self.v[str] + 1) % self.c.length;
if ("number" === typeof _performance) {
let num16 = arg1;
if (undefined === arg1) {
num16 = 1;
}
const items = [tmp3, , , , , , ];
self.F = +self.F + 1;
items[1] = +self.F;
items[2] = 1;
items[3] = num16;
items[4] = valueOfResult;
items[5] = 1;
let num3 = _performance | 0;
items[6] = num3;
self.c[num].update(items);
let num4 = 0;
let tmp9 = num16;
} else if ("object" === tmp5) {
const _Object = Object;
const call = toString.call;
const tmp10 = typeof call === "unknown" ? toString() : call(_performance);
if ("[object Uint32Array]" === tmp10) {
const items1 = [];
let num10 = 0;
num3 = 0;
let arr2 = items1;
if (0 < _performance.length) {
do {
let arr = items1.push(_performance[num10]);
let sum = num10 + 1;
num10 = sum;
num3 = 0;
arr2 = items1;
tmp16 = sum < _performance.length;
} while (tmp16);
}
} else {
let num6 = 0;
if ("[object Array]" !== tmp10) {
num6 = 1;
}
num3 = num6;
arr2 = _performance;
if (0 < _performance.length) {
let tmp13 = num6;
let num8 = 0;
arr2 = _performance;
num3 = num6;
if (!num6) {
while (true) {
let num7 = tmp13;
if (typeof _performance[num8] !== "number") {
num7 = 1;
}
let sum1 = num8 + 1;
num3 = num7;
arr2 = _performance;
if (sum1 >= _performance.length) {
break;
} else {
tmp13 = num7;
num8 = sum1;
num3 = num7;
arr2 = _performance;
if (num7) {
break;
}
}
}
}
}
}
tmp9 = arg1;
num4 = num3;
if (!num3) {
let num11 = arg1;
if (undefined === arg1) {
let num13 = 0;
let num14 = 0;
num11 = 0;
if (0 < arr2.length) {
do {
let tmp17 = arr2[num13];
let sum2 = num14;
let tmp20 = num14;
if (0 < tmp17) {
do {
sum2 = sum2 + 1;
tmp17 = tmp17 >>> 1;
tmp20 = sum2;
} while (0 < tmp17);
}
num13 = num13 + 1;
num14 = tmp20;
num11 = tmp20;
} while (num13 < arr2.length);
}
}
const items2 = [tmp3, , , , , ];
self.F = +self.F + 1;
items2[1] = +self.F;
items2[2] = 2;
items2[3] = num11;
items2[4] = valueOfResult;
items2[5] = arr2.length;
self.c[num].update(items2.concat(arr2));
tmp9 = num11;
num4 = num3;
}
} else {
num4 = 1;
tmp9 = arg1;
if ("string" === tmp5) {
let length = arg1;
if (undefined === arg1) {
length = _performance.length;
}
const items3 = [tmp3, , , , , ];
self.F = +self.F + 1;
items3[1] = +self.F;
num3 = 3;
items3[2] = 3;
items3[3] = length;
items3[4] = valueOfResult;
items3[5] = _performance.length;
self.c[num].update(items3);
self.c[num].update(_performance);
num4 = 0;
tmp9 = length;
}
}
if (num4) {
const bug = new obj.exception.bug("random: addEntropy only supports number, array of numbers or string");
throw bug;
} else {
const i = self.i;
i[num] = i[num] + tmp9;
self.f = self.f + tmp9;
if (isReadyResult === self.m) {
if (self.isReady() !== self.m) {
const _Math = Math;
const seeded = obj.random.B.seeded;
const items4 = [];
const bound = Math.max(self.j, self.f);
for (const key10119 in seeded) {
if (!seeded.hasOwnProperty(key10119)) {
continue;
} else {
let arr3 = items4.push(seeded[key10119]);
continue;
}
continue;
}
let num17 = 0;
if (0 < items4.length) {
do {
let tmp26 = items4[num17](bound);
num17 = num17 + 1;
length2 = items4.length;
} while (num17 < length2);
}
}
const progress = obj.random.B.progress;
const items5 = [];
const progress1 = self.getProgress();
for (const key10138 in progress) {
if (!progress.hasOwnProperty(key10138)) {
continue;
} else {
let arr4 = items5.push(progress[key10138]);
continue;
}
continue;
}
let num18 = 0;
if (0 < items5.length) {
do {
let tmp31 = items5[num18](progress1);
num18 = num18 + 1;
length3 = items5.length;
} while (num18 < length3);
}
}
}
isReadyResult = this.isReady();
},
isReady(arg0) {
w = this;
let D = arg0;
if (undefined === arg0) {
D = w.D;
}
if (w.j) {
if (w.j >= tmp) {
if (w.i[0] <= w.N) {
const w2 = w.w;
} else {
const _Date = Date;
const date = new Date();
}
({ A, w } = w);
}
}
if (w.f >= this.I[D]) {
let m = w.A | w.m;
} else {
m = w.m;
}
return m;
},
getProgress(arg0) {
const self = this;
let D = arg0;
if (!arg0) {
D = self.D;
}
let num = 1;
if (self.j < this.I[D]) {
num = 1;
if (self.f <= tmp) {
num = self.f / tmp;
}
}
return num;
},
startCollectors() {
const self = this;
if (!this.s) {
const a = { loadTimeCollector: null, mouseCollector: null, keyboardCollector: null, accelerometerCollector: null, touchCollector: null };
a.loadTimeCollector = () => {
const apply = closure_1.apply;
if (typeof apply === "unknown") {
HermesBuiltin.applyArguments(tmp2);
} else {
apply(tmp2, arguments);
}
};
a.mouseCollector = () => {
const apply = closure_1.apply;
if (typeof apply === "unknown") {
HermesBuiltin.applyArguments(tmp2);
} else {
apply(tmp2, arguments);
}
};
a.keyboardCollector = () => {
const apply = closure_1.apply;
if (typeof apply === "unknown") {
HermesBuiltin.applyArguments(tmp2);
} else {
apply(tmp2, arguments);
}
};
a.accelerometerCollector = () => {
const apply = closure_1.apply;
if (typeof apply === "unknown") {
HermesBuiltin.applyArguments(tmp2);
} else {
apply(tmp2, arguments);
}
};
const V = self.X;
a.touchCollector = () => {
const apply = closure_1.apply;
if (typeof apply === "unknown") {
HermesBuiltin.applyArguments(tmp2);
} else {
apply(tmp2, arguments);
}
};
self.a = a;
let listener4 = globalThis;
const _window = window;
if (window.addEventListener) {
const _window2 = listener4.window;
const listener = _window2.addEventListener("load", self.a.loadTimeCollector, false);
const _window3 = listener4.window;
const listener1 = _window3.addEventListener("mousemove", self.a.mouseCollector, false);
const _window4 = listener4.window;
const listener2 = _window4.addEventListener("keypress", self.a.keyboardCollector, false);
const _window5 = listener4.window;
const listener3 = _window5.addEventListener("devicemotion", self.a.accelerometerCollector, false);
const _window6 = listener4.window;
listener4 = _window6.addEventListener("touchmove", self.a.touchCollector, false);
} else {
const _document = document;
if (document.attachEvent) {
const _document2 = document;
document.attachEvent("onload", self.a.loadTimeCollector);
const _document3 = document;
document.attachEvent("onmousemove", self.a.mouseCollector);
const _document4 = document;
document.attachEvent("keypress", self.a.keyboardCollector);
} else {
const bug = new a.exception.bug("can't attach event");
throw bug;
}
}
self.s = true;
}
},
stopCollectors() {
const self = this;
if (this.s) {
let removed4 = globalThis;
const _window = window;
if (window.removeEventListener) {
const _window2 = removed4.window;
const removed = _window2.removeEventListener("load", self.a.loadTimeCollector, false);
const _window3 = removed4.window;
const removed1 = _window3.removeEventListener("mousemove", self.a.mouseCollector, false);
const _window4 = removed4.window;
const removed2 = _window4.removeEventListener("keypress", self.a.keyboardCollector, false);
const _window5 = removed4.window;
const removed3 = _window5.removeEventListener("devicemotion", self.a.accelerometerCollector, false);
const _window6 = removed4.window;
removed4 = _window6.removeEventListener("touchmove", self.a.touchCollector, false);
} else {
const _document = document;
if (document.detachEvent) {
const _document2 = document;
document.detachEvent("onload", self.a.loadTimeCollector);
const _document3 = document;
document.detachEvent("onmousemove", self.a.mouseCollector);
const _document4 = document;
document.detachEvent("keypress", self.a.keyboardCollector);
}
}
self.s = false;
}
},
addEventListener(arg0, arg1) {
this.S = +this.S + 1;
this.B[arg0][+this.S] = arg1;
},
removeEventListener(arg0, arg1) {
let length;
const items = [];
for (const key10008 in obj) {
let hasOwnPropertyResult = obj.hasOwnProperty(key10008);
if (hasOwnPropertyResult) {
hasOwnPropertyResult = obj[key10008] === arg1;
}
if (!hasOwnPropertyResult) {
continue;
} else {
let arr = items.push(key10008);
continue;
}
continue;
}
let num = 0;
if (0 < items.length) {
do {
delete tmp2[tmp];
num = num + 1;
length = items.length;
} while (num < length);
}
},
U() {
const self = this;
if (typeof window !== "undefined") {
const _window3 = window;
if (window.performance) {
const _window = window;
if (typeof window.performance.now === "function") {
const _window2 = window;
const _performance = window.performance;
self.addEntropy(_performance.now(), 1, "loadtime");
}
}
}
self.addEntropy(new Date().valueOf(), 1, "loadtime");
},
W(arg0) {
try {
let num = arg0.x;
if (!num) {
num = arg0.clientX;
}
if (!num) {
num = arg0.offsetX;
}
if (!num) {
num = 0;
}
let num2 = num;
let num3 = arg0.y;
if (!num3) {
num3 = arg0.clientY;
}
if (!num3) {
num3 = arg0.offsetY;
}
if (!num3) {
num3 = 0;
}
let num4 = num3;
let tmp3 = 0 != num2;
if (tmp3) {
tmp3 = 0 != num4;
}
const self = this;
if (tmp3) {
const items = [num2, num4];
self.addEntropy(items, 2, "mouse");
}
C(self, 0);
} catch (err) {
num2 = 0;
num4 = 0;
}
},
X(arg0) {
const self = this;
let clientX = tmp.pageX;
if (!clientX) {
clientX = tmp.clientX;
}
const items = [clientX, arg0.touches[0] || arg0.changedTouches[0].pageY || arg0.touches[0] || arg0.changedTouches[0].clientY];
this.addEntropy(items, 1, "touch");
if (typeof window !== "undefined") {
const _window3 = window;
if (window.performance) {
const _window = window;
if (typeof window.performance.now === "function") {
const _window2 = window;
const _performance = window.performance;
self.addEntropy(_performance.now(), 0, "loadtime");
}
}
}
self.addEntropy(new Date().valueOf(), 0, "loadtime");
},
V() {
const self = this;
if (typeof window !== "undefined") {
const _window3 = window;
if (window.performance) {
const _window = window;
if (typeof window.performance.now === "function") {
const _window2 = window;
const _performance = window.performance;
self.addEntropy(_performance.now(), 2, "loadtime");
}
}
}
self.addEntropy(new Date().valueOf(), 2, "loadtime");
},
R(accelerationIncludingGravity) {
const self = this;
if (window.orientation) {
const _window = window;
if (typeof orientation === "number") {
self.addEntropy(orientation, 1, "accelerometer");
}
}
if (accelerationIncludingGravity.accelerationIncludingGravity.x || accelerationIncludingGravity.accelerationIncludingGravity.y || accelerationIncludingGravity.accelerationIncludingGravity.z) {
self.addEntropy(tmp, 2, "accelerometer");
}
if (typeof window !== "undefined") {
const _window4 = window;
if (window.performance) {
const _window2 = window;
if (typeof window.performance.now === "function") {
const _window3 = window;
const _performance = window.performance;
self.addEntropy(_performance.now(), 0, "loadtime");
}
}
}
self.addEntropy(new Date().valueOf(), 0, "loadtime");
}
};
const prng = new exports.prng(6);
exports.random = prng;
try {
let _exports = undefined !== module;
if (_exports) {
_exports = module.exports;
}
if (!_exports) {
if (_exports) {
if (undefined.randomBytes) {
let _Uint32Array = Uint32Array;
const _Uint8Array = Uint8Array;
const uint8Array = new Uint8Array(undefined.randomBytes(128));
let uint32Array = new Uint32Array(uint8Array.buffer);
const random2 = exports.random;
random2.addEntropy(uint32Array, 1024, "crypto['randomBytes']");
}
let _exports2 = undefined !== module;
if (_exports2) {
_exports2 = module.exports;
}
if (_exports2) {
module.exports = exports;
}
}
let _window = window;
if (typeof window !== "undefined") {
let _Uint32Array2 = Uint32Array;
if (typeof Uint32Array !== "undefined") {
const _Uint32Array3 = Uint32Array;
const uint32Array1 = new Uint32Array(32);
const _window8 = window;
if (window.crypto) {
let _window2 = window;
if (window.crypto.getRandomValues) {
let _window6 = window;
const _crypto = window.crypto;
const randomValues = _crypto.getRandomValues(tmp31);
const random = exports.random;
random.addEntropy(tmp31, 1024, "crypto['getRandomValues']");
}
}
let _window3 = window;
if (window.msCrypto) {
let _window4 = window;
if (window.msCrypto.getRandomValues) {
let _window5 = window;
const randomValues1 = msCrypto.getRandomValues(tmp31);
}
}
}
}
} else {
try {
let globalResult = global("crypto");
} catch (err) {
globalResult = null;
}
}
} catch (tmp24) {
const _window7 = window;
let _console = typeof window !== "undefined";
if (typeof window !== "undefined") {
const _window9 = window;
_console = window.console;
}
if (_console) {
const _console2 = console;
console.log("There was an error collecting entropy from the browser:");
const _console3 = console;
console.log(tmp24);
}
}
},
{ crypto: "Array" }
];
obj[116] = items115;
const items116 = [
(arg0, arg1, arg2) => {
const obj = { FASTLANE_SDK_LOAD_ERROR: { type: global("../lib/braintree-error").types.MERCHANT, code: "FASTLANE_SDK_LOAD_ERROR" } };
module.exports = obj;
},
{ "../lib/braintree-error": 143 }
];
obj[117] = items116;
const items117 = [
(arg0, arg1, arg2) => {
closure_0 = global("../lib/braintree-error");
closure_1 = global("./errors");
const loadFastlane = global("../lib/assets").loadFastlane;
const assign = global("../lib/assign").assign;
module.exports = global("@braintree/wrap-promise")(function fastlane(arg0) {
closure_0 = arg0;
({ client, client: client2 } = arg0);
const configuration = client.getConfiguration();
let flag = true;
const version = client2.getVersion();
if ("production" !== configuration.gatewayConfiguration.environment) {
flag = false;
}
const promise = loadFastlane(assign({ platform: "BT", btSdkVersion: version, minified: flag }, arg0));
return loadFastlane(assign({ platform: "BT", btSdkVersion: version, minified: flag }, arg0)).then((metadata) => {
const platformOptions = { platform: "BT", authorization: closure_0.authorization, client: closure_0.client, deviceData: closure_0.deviceData };
delete tmp2[tmp];
delete tmp2[tmp];
delete tmp2[tmp];
delete tmp2[tmp];
delete tmp2[tmp];
return fastlane.create(assign({ platformOptions }, closure_0, metadata.metadata));
}).catch((error) => Promise.reject(new closure_0({ type: constants.FASTLANE_SDK_LOAD_ERROR.type, code: constants.FASTLANE_SDK_LOAD_ERROR.code, message: error.message })));
});
},
{ "../lib/assets": 139, "../lib/assign": 140, "../lib/braintree-error": 143, "./errors": 117, "@braintree/wrap-promise": 40 }
];
obj[118] = items117;
const items118 = [
(arg0, arg1, arg2) => {
closure_0 = global("../lib/basic-component-verification");
closure_1 = global("./fastlane");
closure_2 = global("../lib/create-assets-url");
closure_3 = global("../lib/create-deferred-client");
const assign = global("../lib/assign").assign;
const globalResult = global("@braintree/wrap-promise");
module.exports = {
create: global("@braintree/wrap-promise")(function create(client) {
const obj = { name: "fastlane", client: client.client, authorization: client.authorization };
const verifyResult = client.verify({ name: "fastlane", client: client.client, authorization: client.authorization });
return client.verify({ name: "fastlane", client: client.client, authorization: client.authorization }).then(() => closure_3.create({ authorization: client.authorization, client: client.client, assetsUrl: closure_2.create(client.authorization), name: "fastlane" })).then((client) => closure_1(assign({ client, deviceData: client.deviceData }, client)));
}),
VERSION: "3.112.1"
};
},
{ "../lib/assign": 140, "../lib/basic-component-verification": 141, "../lib/create-assets-url": 148, "../lib/create-deferred-client": 150, "./fastlane": 118, "@braintree/wrap-promise": 40 }
];
obj[119] = items118;
const items119 = [
(arg0, arg1, arg2) => {
const globalResult = global("../lib/braintree-error");
module.exports = { GOOGLE_PAYMENT_NOT_ENABLED: { type: globalResult.types.MERCHANT, code: "GOOGLE_PAYMENT_NOT_ENABLED", message: "Google Pay is not enabled for this merchant." }, GOOGLE_PAYMENT_GATEWAY_ERROR: { code: "GOOGLE_PAYMENT_GATEWAY_ERROR", message: "There was an error when tokenizing the Google Pay payment method.", type: globalResult.types.UNKNOWN }, GOOGLE_PAYMENT_UNSUPPORTED_VERSION: { code: "GOOGLE_PAYMENT_UNSUPPORTED_VERSION", type: globalResult.types.MERCHANT } };
},
{ "../lib/braintree-error": 143 }
];
obj[120] = items119;
const items120 = [
(arg0, arg1, arg2) => {
class GooglePayment {
constructor(arg0) {
obj = { _createPromise: global.createPromise, _client: global.client, _useDeferredClient: global.useDeferredClient, _googlePayVersion: tmp, _googleMerchantId: global.googleMerchantId };
tmp = global.googlePayVersion || 1;
if (obj._isUnsupportedGooglePayAPIVersion()) {
tmp2 = closure_5;
obj1 = { code: null, message: null, type: null };
tmp3 = closure_6;
obj1.code = closure_6.GOOGLE_PAYMENT_UNSUPPORTED_VERSION.code;
str = "The Braintree SDK does not support Google Pay version ";
str2 = ". Please upgrade the version of your Braintree SDK and contact support if this error persists.";
obj1.message = `The Braintree SDK does not support Google Pay version ${obj._googlePayVersion}. Please upgrade the version of your Braintree SDK and contact support if this error persists.`;
obj1.type = closure_6.GOOGLE_PAYMENT_UNSUPPORTED_VERSION.type;
tmp4 = new.target;
tmp5 = new.target;
tmp6 = obj1;
tmp7 = new closure_5(obj1);
tmp8 = tmp7;
throw tmp7;
} else {
return;
}
}
_waitForClient() {
self = this;
if (this._client) {
tmp2 = globalThis;
_Promise = Promise;
resolved = Promise.resolve();
} else {
_createPromise = self._createPromise;
fn = () => { ... };
resolved = _createPromise.then(fn.bind(self));
}
return resolved;
}
_isUnsupportedGooglePayAPIVersion() {
return !(this._googlePayVersion in closure_8);
}
_getDefaultConfig() {
self = this;
if (!this._defaultConfig) {
tmp = closure_4;
_client = self._client;
self._defaultConfig = closure_4(_client.getConfiguration(), self._googlePayVersion, self._googleMerchantId);
}
return self._defaultConfig;
}
_createV1PaymentDataRequest(arg0) {
_getDefaultConfigResult = this._getDefaultConfig();
tmp2 = global.cardRequirements && global.cardRequirements.allowedCardNetworks || _getDefaultConfigResult.cardRequirements.allowedCardNetworks;
tmp3 = assign({}, _getDefaultConfigResult, global);
tmp3.cardRequirements.allowedCardNetworks = tmp2;
return tmp3;
}
_createV2PaymentDataRequest(arg0) {
_getDefaultConfigResult = this._getDefaultConfig();
closure_0 = _getDefaultConfigResult;
if (global.allowedPaymentMethods) {
prop = global.allowedPaymentMethods;
item = prop.forEach(() => { ... });
}
return assign({}, _getDefaultConfigResult, global);
}
createPaymentDataRequest(arg0) {
self = this;
closure_0 = global;
if (this._useDeferredClient) {
_waitForClientResult = self._waitForClient();
fn = () => { ... };
nextPromise = _waitForClientResult.then(fn.bind(self));
} else {
nextPromise = self._createPaymentDataRequestSyncronously(global);
}
return nextPromise;
}
_createPaymentDataRequestSyncronously(arg0) {
self = this;
tmp = assign({}, global);
_googlePayVersion = this._googlePayVersion;
totalPrice = tmp.transactionInfo;
if (totalPrice) {
totalPrice = tmp.transactionInfo.totalPrice;
}
if (totalPrice) {
str = tmp.transactionInfo.totalPrice;
tmp.transactionInfo.totalPrice = str.toString();
}
sendEventResult = closure_0.sendEvent(self._createPromise, `google-payment.v${_googlePayVersion}.createPaymentDataRequest`);
return self[closure_8[_googlePayVersion]](tmp);
}
parseResponse(arg0) {
closure_0 = global;
self = this;
resolved = Promise.resolve();
nextPromise = resolved.then(() => { ... });
return nextPromise.catch(() => { ... });
}
teardown() {
tmp = closure_2(this, closure_7(GooglePayment.prototype));
return Promise.resolve();
}
}
handler = global("../lib/analytics");
const assign = global("../lib/assign").assign;
closure_2 = global("../lib/convert-methods-to-error");
closure_3 = global("../lib/find");
closure_4 = global("../lib/generate-google-pay-configuration");
closure_5 = global("../lib/braintree-error");
constants = global("./errors");
closure_7 = global("../lib/methods");
query = { 1: "_createV1PaymentDataRequest", 2: "_createV2PaymentDataRequest" };
module.exports = global("@braintree/wrap-promise").wrapPrototype(GooglePayment);
},
{ "../lib/analytics": 138, "../lib/assign": 140, "../lib/braintree-error": 143, "../lib/convert-methods-to-error": 146, "../lib/find": 156, "../lib/generate-google-pay-configuration": 168, "../lib/methods": 175, "./errors": 120, "@braintree/wrap-promise": 40 }
];
obj[121] = items120;
const items121 = [
(arg0, arg1, arg2) => {
closure_0 = global("./google-payment");
closure_1 = global("../lib/braintree-error");
closure_2 = global("../lib/create-assets-url");
closure_3 = global("../lib/create-deferred-client");
closure_4 = global("../lib/basic-component-verification");
closure_5 = global("./errors");
const globalResult = global("@braintree/wrap-promise");
module.exports = {
create: global("@braintree/wrap-promise")(function create(client) {
return closure_4.verify({ name: "Google Pay", client: client.client, authorization: client.authorization }).then(() => {
const obj = { authorization: client.authorization, client: client.client, debug: client.debug, assetsUrl: closure_1_2.create(client.authorization), name: "Google Pay" };
const nextPromise = closure_1_3.create({ authorization: client.authorization, client: client.client, debug: client.debug, assetsUrl: closure_1_2.create(client.authorization), name: "Google Pay" }).then((client) => {
let rejectResult = client;
closure_0.client = client;
if (!client.getConfiguration().gatewayConfiguration.androidPay) {
const tmp7 = new closure_2_1(constants.GOOGLE_PAYMENT_NOT_ENABLED);
rejectResult = Promise.reject(tmp7);
}
return rejectResult;
});
client.createPromise = nextPromise;
const tmp = new client(client);
let nextPromise1 = tmp;
client = tmp;
if (!client.useDeferredClient) {
nextPromise1 = nextPromise.then((_client) => {
closure_0._client = _client;
return closure_0;
});
}
return nextPromise1;
});
}),
VERSION: "3.112.1"
};
},
{ "../lib/basic-component-verification": 141, "../lib/braintree-error": 143, "../lib/create-assets-url": 148, "../lib/create-deferred-client": 150, "./errors": 120, "./google-payment": 121, "@braintree/wrap-promise": 40 }
];
obj[122] = items121;
const items122 = [
(arg0, arg1, arg2) => {
closure_0 = global("../../lib/braintree-error");
constants = global("../shared/errors");
const allowedAttributes = global("../shared/constants").allowedAttributes;
module.exports = function attributeValidationError(key10009, str) {
if (allowedAttributes.hasOwnProperty(key10009)) {
if (null == str) {
if (!tmp10) {
const obj2 = { type: constants.HOSTED_FIELDS_ATTRIBUTE_VALUE_NOT_ALLOWED.type, code: constants.HOSTED_FIELDS_ATTRIBUTE_VALUE_NOT_ALLOWED.code, message: `Value "${str}" is not allowed for "${key10009}" attribute.` };
let tmp7 = new closure_0(obj2);
}
} else if ("string" === tmp[key10009]) {
let tmp13 = typeof str === "string";
if (typeof str !== "string") {
tmp13 = typeof str === "number";
}
let flag = tmp13;
} else {
flag = false;
if ("boolean" === tmp[key10009]) {
const _String = String;
let tmp12 = "true" === String(str);
if (!tmp12) {
const _String2 = String;
tmp12 = "false" === String(str);
}
flag = tmp12;
}
}
} else {
const obj = { type: constants.HOSTED_FIELDS_ATTRIBUTE_NOT_SUPPORTED.type, code: constants.HOSTED_FIELDS_ATTRIBUTE_NOT_SUPPORTED.code, message: `The "${key10009}" attribute is not supported in Hosted Fields.` };
tmp7 = new closure_0(obj);
}
return tmp7;
};
},
{ "../../lib/braintree-error": 143, "../shared/constants": 131, "../shared/errors": 132 }
];
obj[123] = items122;
const items123 = [
(arg0, arg1, arg2) => {
constants = global("../shared/constants");
closure_1 = global("../../lib/use-min");
module.exports = function composeUrl(arg0, arg1, arg2) {
const text = `${arg0}/web/${closure_0.VERSION}`;
return text + "/html/hosted-fields-frame" + closure_1(arg2) + ".html#" + arg1;
};
},
{ "../../lib/use-min": 181, "../shared/constants": 131 }
];
obj[124] = items123;
const items124 = [
(arg0, arg1, arg2) => {
const navigationDirections = global("../shared/constants").navigationDirections;
closure_1 = global("../shared/browser-detection");
closure_2 = global("../shared/focus-intercept");
closure_3 = global("../shared/find-parent-tags");
closure_4 = ["INPUT", "SELECT", "TEXTAREA"];
closure_5 = ["hidden", "button", "reset", "submit", "checkbox", "radio", "file"];
module.exports = {
removeExtraFocusElements(elements, arg1) {
closure_0 = arg1;
const call = slice.call;
elements = elements.elements;
const arr = typeof call === "unknown" ? slice() : call(elements);
let num = 0;
let tmp = null;
if (0 < arr.length) {
while (true) {
let tmp2 = arr[num];
if (closure_1.hasSoftwareKeyboard()) {
let tmp7 = closure_4.indexOf(tmp2.tagName) > -1;
if (tmp7) {
tmp7 = closure_5.indexOf(tmp2.type) < 0;
}
let tmp5 = tmp7;
} else {
tmp5 = "hidden" !== tmp2.type;
}
tmp = tmp2;
if (tmp5) {
break;
} else {
let sum = num + 1;
num = sum;
tmp = null;
if (sum >= arr.length) {
break;
}
}
}
}
const items = [tmp, ];
const reversed = arr.reverse();
let num2 = 0;
let tmp10 = null;
if (0 < reversed.length) {
while (true) {
let tmp11 = reversed[num2];
if (closure_1.hasSoftwareKeyboard()) {
let tmp16 = closure_4.indexOf(tmp11.tagName) > -1;
if (tmp16) {
tmp16 = closure_5.indexOf(tmp11.type) < 0;
}
let tmp14 = tmp16;
} else {
tmp14 = "hidden" !== tmp11.type;
}
tmp10 = tmp11;
if (tmp14) {
break;
} else {
let sum1 = num2 + 1;
num2 = sum1;
tmp10 = null;
if (sum1 >= reversed.length) {
break;
}
}
}
}
items[1] = tmp10;
const item = items.forEach((getAttribute) => {
let matchFocusElementResult = getAttribute;
if (getAttribute) {
matchFocusElementResult = closure_2.matchFocusElement(getAttribute.getAttribute("id"));
}
if (matchFocusElementResult) {
closure_0(getAttribute.getAttribute("id"));
}
});
},
createFocusChangeHandler(arg0, arg1) {
closure_0 = arg0;
closure_1 = arg1;
return (direction) => {
const element = document.getElementById(`bt-${direction.field}-${direction.direction}-${closure_0}`);
if (element) {
const first = closure_3(element, "form")[0];
const _document = document;
if (document.forms.length >= 1) {
if (first) {
const slice = [].slice;
const call = slice.call;
const elements = first.elements;
const arr = typeof call === "unknown" ? slice() : call(elements);
const index = arr.indexOf(element);
direction = direction.direction;
if (navigationDirections.BACK === direction) {
const obj2 = {
checkIndexBounds(arg0) {
return arg0 < 0;
},
indexChange: -1
};
}
const obj3 = {
checkIndexBounds(arg0) {
return arg0 > length - 1;
},
indexChange: 1
};
}
}
const result = closure_1.onRemoveFocusIntercepts();
}
};
}
};
},
{ "../shared/browser-detection": 130, "../shared/constants": 131, "../shared/find-parent-tags": 133, "../shared/focus-intercept": 134 }
];
obj[125] = items124;
const items125 = [
(arg0, arg1, arg2) => {
const allowedStyles = global("../shared/constants").allowedStyles;
module.exports = function getStylesFromClass(str) {
const element = ;
const obj = {};
let substr = str;
if ("." === str[0]) {
substr = str.substring(1);
}
element.className = substr;
element.style.display = "none !important";
element.style.position = "fixed !important";
element.style.left = "-99999px !important";
element.style.top = "-99999px !important";
body.appendChild(element);
const computedStyle = window.getComputedStyle(element);
const item = allowedStyles.forEach((item) => {
if (closure_0[item]) {
obj[item] = tmp;
}
});
body2.removeChild(element);
return obj;
};
},
{ "../shared/constants": 131 }
];
obj[126] = items125;
const items126 = [
(arg0, arg1, arg2) => {
class HostedFields {
constructor(arg0) {
self = this;
closure_0 = global;
self = this;
obj = {};
closure_4 = obj;
closure_5 = {};
items = [];
closure_6 = items;
tmp = closure_13();
closure_7 = tmp;
sessionId = global.sessionId;
this._merchantConfigurationOptions = closure_0({}, global);
if (global.client) {
client = global.client;
configuration = client.getConfiguration(undefined, sessionId);
assetsUrl = configuration.gatewayConfiguration.assetsUrl;
isDebug = configuration.isDebug;
} else {
tmp2 = closure_1;
tmp4 = globalThis;
_Boolean = Boolean;
obj1 = closure_1.create(global.authorization);
isDebug = Boolean(global.isDebug);
assetsUrl = obj1;
}
obj7 = { client: global.client, authorization: global.authorization, debug: isDebug, assetsUrl, name: "Hosted Fields", sessionId };
self._clientPromise = closure_6.create(obj7);
closure_2 = closure_8(assetsUrl, tmp, isDebug);
if (global.fields) {
tmp6 = globalThis;
_Object = Object;
num = 0;
if (0 !== Object.keys(global.fields).length) {
tmp42 = closure_17;
call = closure_17.call;
if (typeof call === "unknown") {
tmp42Result = tmp42();
} else {
callResult = call(self);
}
self._injectedNodes = [];
tmp8 = self;
tmp9 = new.target;
tmp10 = new.target;
tmp11 = new self();
tmp12 = tmp11;
self._destructor = tmp11;
self._fields = obj;
obj8 = { fields: null, cards: null };
obj8.fields = {};
tmp13 = closure_26;
str = "";
obj8.cards = closure_26("");
self._state = obj8;
tmp14 = closure_5;
obj9 = { channel: null, verifyDomain: null, targetFrames: null };
obj9.channel = tmp;
tmp15 = closure_2;
obj9.verifyDomain = closure_2;
_window = window;
items1 = [];
items1[0] = window;
obj9.targetFrames = items1;
tmp16 = new.target;
tmp17 = new.target;
tmp18 = obj9;
tmp19 = new closure_5(obj9);
tmp20 = tmp19;
self._bus = tmp19;
_destructor = self._destructor;
result = _destructor.registerFunctionForTeardown(() => { ... });
tmp22 = closure_19;
sendEvent = closure_19.sendEvent;
_clientPromise = self._clientPromise;
if (global.client) {
str3 = "custom.hosted-fields.initialized";
sendEventResult = sendEvent(_clientPromise, "custom.hosted-fields.initialized");
} else {
str2 = "custom.hosted-fields.initialized.deferred-client";
sendEventResult1 = sendEvent(_clientPromise, "custom.hosted-fields.initialized.deferred-client");
}
_Object2 = Object;
keys = Object.keys(global.fields);
fn = () => { ... };
item = keys.forEach(fn.bind(self));
if (self._merchantConfigurationOptions.styles) {
_Object3 = Object;
keys1 = Object.keys(self._merchantConfigurationOptions.styles);
item1 = keys1.forEach(() => { ... });
}
_bus = self._bus;
tmp27 = events;
onResult = _bus.on(events.REMOVE_FOCUS_INTERCEPTS, () => { ... });
_bus2 = self._bus;
tmp29 = closure_28;
obj10 = { onRemoveFocusIntercepts: null, onTriggerInputFocus: null };
obj10.onRemoveFocusIntercepts = function onRemoveFocusIntercepts() { ... };
obj10.onTriggerInputFocus = function onTriggerInputFocus() { ... };
onResult1 = _bus2.on(events.TRIGGER_FOCUS_CHANGE, closure_28.createFocusChangeHandler(tmp, obj10));
_bus3 = self._bus;
onResult2 = _bus3.on(events.READY_FOR_CLIENT, () => { ... });
_bus4 = self._bus;
onResult3 = _bus4.on(events.CARD_FORM_ENTRY_HAS_BEGUN, () => { ... });
_bus5 = self._bus;
onResult4 = _bus5.on(events.BIN_AVAILABLE, () => { ... });
_setTimeout = setTimeout;
tmp34 = INTEGRATION_TIMEOUT_MS;
closure_1 = setTimeout(() => { ... }, INTEGRATION_TIMEOUT_MS);
_Promise = Promise;
allPromises = Promise.all(items);
nextPromise = allPromises.then(() => { ... });
_bus6 = self._bus;
onResult5 = _bus6.on(events.FRAME_READY, () => { ... });
_bus7 = self._bus;
closure_129_0 = obj;
fn2 = () => { ... };
onResult6 = _bus7.on(events.INPUT_EVENT, fn2.bind(self));
_destructor2 = self._destructor;
result1 = _destructor2.registerFunctionForTeardown(() => { ... });
_destructor3 = self._destructor;
result2 = _destructor3.registerFunctionForTeardown(() => { ... });
_destructor4 = self._destructor;
result3 = _destructor4.registerFunctionForTeardown(() => { ... });
return;
}
}
obj11 = { type: closure_25.INSTANTIATION_OPTION_REQUIRED.type, code: closure_25.INSTANTIATION_OPTION_REQUIRED.code, message: "options.fields is required when instantiating Hosted Fields." };
tmp41 = new closure_7(obj11);
throw tmp41;
}
_setupLabelFocus(arg0, arg1) {
closure_0 = global;
triggerFocus = function triggerFocus() { ... };
self = this;
obj = closure_23(module);
if (null != module.id) {
tmp11 = globalThis;
_Array2 = Array;
slice2 = Array.prototype.slice;
call2 = slice2.call;
_document2 = document;
str3 = "label[for=\"";
str4 = "\"]";
elements = document.querySelectorAll(`label[for="${module.id}"]`);
obj2 = typeof call2 === "unknown" ? slice2() : call2(elements);
closure_1 = obj2;
_document = document;
tmp = obj2;
if (obj === document) {
tmp5 = closure_14;
str = "label";
combined = obj2.concat(closure_14(module, "label"));
closure_1 = combined;
found = combined.filter(() => { ... });
closure_1 = found;
num = 0;
closure_2 = 0;
flag = false;
str2 = "click";
if (0 < found.length) {
do {
tmp6 = closure_2;
obj3 = found[closure_2];
listener = obj3.addEventListener("click", triggerFocus, false);
tmp8 = closure_2;
sum = closure_2 + 1;
closure_2 = sum;
length = found.length;
} while (sum < length);
}
_destructor = this._destructor;
result = _destructor.registerFunctionForTeardown(() => { ... });
} else {
_Array = Array;
slice = Array.prototype.slice;
call = slice.call;
elements1 = obj.querySelectorAll(`label[for="${module.id}"]`);
combined1 = obj2.concat(typeof call === "unknown" ? slice() : call(elements1));
closure_1 = combined1;
tmp4 = combined1;
}
}
return;
}
_getAnyFieldContainer() {
self = this;
keys = Object.keys(this._fields);
return keys.reduce(() => { ... }, null);
}
_cleanUpFocusIntercepts() {
self = this;
if (document.forms.length < 1) {
_bus2 = self._bus;
tmp7 = events;
emitResult = _bus2.emit(events.REMOVE_FOCUS_INTERCEPTS);
} else {
tmp = closure_14;
str = "form";
first = closure_14(self._getAnyFieldContainer(), "form")[0];
if (first) {
tmp5 = closure_28;
fn = () => { ... };
result = closure_28.removeExtraFocusElements(first, fn.bind(self));
} else {
_bus = self._bus;
tmp3 = events;
emitResult1 = _bus.emit(events.REMOVE_FOCUS_INTERCEPTS);
}
}
return;
}
_attachInvalidFieldContainersToError(arg0) {
closure_0 = global;
tmp = global.details && global.details.invalidFieldKeys;
if (tmp) {
num = 0;
tmp = global.details.invalidFieldKeys.length > 0;
}
if (tmp) {
self = this;
global.details.invalidFields = {};
invalidFieldKeys = global.details.invalidFieldKeys;
fn = () => { ... };
item = invalidFieldKeys.forEach(fn.bind(this));
}
return;
}
getChallenges() {
_clientPromise = this._clientPromise;
return _clientPromise.then(() => { ... });
}
getSupportedCardTypes() {
_clientPromise = this._clientPromise;
return _clientPromise.then(() => { ... });
}
teardown() {
self = this;
promise = new Promise(() => { ... });
return promise;
}
tokenize(arg0) {
closure_0 = global;
self = this;
if (!global) {
closure_0 = {};
}
promise = new Promise(() => { ... });
return promise;
}
addClass(arg0, arg1) {
if (allowedFields.hasOwnProperty(global)) {
_fields = this._fields;
self = this;
if (_fields.hasOwnProperty(global)) {
tmp12 = module;
_bus = self._bus;
tmp13 = events;
obj1 = { field: null, classname: null };
obj1.field = global;
obj1.classname = module;
emitResult = _bus.emit(events.ADD_CLASS, obj1);
} else {
tmp7 = closure_7;
obj4 = { type: null, code: null, message: null };
tmp8 = closure_11;
obj4.type = closure_11.HOSTED_FIELDS_FIELD_NOT_PRESENT.type;
obj4.code = closure_11.HOSTED_FIELDS_FIELD_NOT_PRESENT.code;
str3 = "Cannot add class to \"";
str4 = "\" field because it is not part of the current Hosted Fields options.";
obj4.message = `Cannot add class to "${global}" field because it is not part of the current Hosted Fields options.`;
tmp9 = new.target;
tmp10 = new.target;
tmp11 = obj4;
tmp6 = new closure_7(obj4);
}
} else {
tmp = closure_7;
obj = { type: null, code: null, message: null };
tmp2 = closure_11;
obj.type = closure_11.HOSTED_FIELDS_FIELD_INVALID.type;
obj.code = closure_11.HOSTED_FIELDS_FIELD_INVALID.code;
str = "\"";
str2 = "\" is not a valid field. You must use a valid field option when adding a class.";
obj.message = `"${global}" is not a valid field. You must use a valid field option when adding a class.`;
tmp3 = new.target;
tmp4 = new.target;
tmp5 = obj;
tmp6 = new closure_7(obj);
}
_Promise = Promise;
if (tmp6) {
rejectResult = _Promise.reject(tmp6);
} else {
rejectResult = _Promise.resolve();
}
return rejectResult;
}
removeClass(arg0, arg1) {
if (allowedFields.hasOwnProperty(global)) {
_fields = this._fields;
self = this;
if (_fields.hasOwnProperty(global)) {
tmp12 = module;
_bus = self._bus;
tmp13 = events;
obj1 = { field: null, classname: null };
obj1.field = global;
obj1.classname = module;
emitResult = _bus.emit(events.REMOVE_CLASS, obj1);
} else {
tmp7 = closure_7;
obj4 = { type: null, code: null, message: null };
tmp8 = closure_11;
obj4.type = closure_11.HOSTED_FIELDS_FIELD_NOT_PRESENT.type;
obj4.code = closure_11.HOSTED_FIELDS_FIELD_NOT_PRESENT.code;
str3 = "Cannot remove class from \"";
str4 = "\" field because it is not part of the current Hosted Fields options.";
obj4.message = `Cannot remove class from "${global}" field because it is not part of the current Hosted Fields options.`;
tmp9 = new.target;
tmp10 = new.target;
tmp11 = obj4;
tmp6 = new closure_7(obj4);
}
} else {
tmp = closure_7;
obj = { type: null, code: null, message: null };
tmp2 = closure_11;
obj.type = closure_11.HOSTED_FIELDS_FIELD_INVALID.type;
obj.code = closure_11.HOSTED_FIELDS_FIELD_INVALID.code;
str = "\"";
str2 = "\" is not a valid field. You must use a valid field option when removing a class.";
obj.message = `"${global}" is not a valid field. You must use a valid field option when removing a class.`;
tmp3 = new.target;
tmp4 = new.target;
tmp5 = obj;
tmp6 = new closure_7(obj);
}
_Promise = Promise;
if (tmp6) {
rejectResult = _Promise.reject(tmp6);
} else {
rejectResult = _Promise.resolve();
}
return rejectResult;
}
setAttribute(arg0) {
if (allowedFields.hasOwnProperty(global.field)) {
_fields = this._fields;
self = this;
if (_fields.hasOwnProperty(global.field)) {
tmp12 = closure_27;
tmp6 = closure_27(global.attribute, global.value);
if (!tmp6) {
_bus = self._bus;
tmp13 = events;
obj1 = { field: null, attribute: null, value: null };
({ field: obj3.field, attribute: obj3.attribute, value: obj3.value } = global);
emitResult = _bus.emit(events.SET_ATTRIBUTE, obj1);
}
} else {
tmp7 = closure_7;
obj4 = { type: null, code: null, message: null };
tmp8 = closure_11;
obj4.type = closure_11.HOSTED_FIELDS_FIELD_NOT_PRESENT.type;
obj4.code = closure_11.HOSTED_FIELDS_FIELD_NOT_PRESENT.code;
str3 = "Cannot set attribute for \"";
str4 = "\" field because it is not part of the current Hosted Fields options.";
obj4.message = `Cannot set attribute for "${global.field}" field because it is not part of the current Hosted Fields options.`;
tmp9 = new.target;
tmp10 = new.target;
tmp11 = obj4;
tmp6 = new closure_7(obj4);
}
} else {
tmp = closure_7;
obj = { type: null, code: null, message: null };
tmp2 = closure_11;
obj.type = closure_11.HOSTED_FIELDS_FIELD_INVALID.type;
obj.code = closure_11.HOSTED_FIELDS_FIELD_INVALID.code;
str = "\"";
str2 = "\" is not a valid field. You must use a valid field option when setting an attribute.";
obj.message = `"${global.field}" is not a valid field. You must use a valid field option when setting an attribute.`;
tmp3 = new.target;
tmp4 = new.target;
tmp5 = obj;
tmp6 = new closure_7(obj);
}
_Promise = Promise;
if (tmp6) {
rejectResult = _Promise.reject(tmp6);
} else {
rejectResult = _Promise.resolve();
}
return rejectResult;
}
setMonthOptions(arg0) {
closure_0 = global;
self = this;
fields = this._merchantConfigurationOptions.fields;
str = "Expiration month field must exist to use setMonthOptions.";
if (fields.expirationMonth) {
if (!fields.expirationMonth.select) {
str = "Expiration month field must be a select element.";
}
}
_Promise = Promise;
if (str) {
tmp4 = closure_7;
obj = { type: null, code: null, message: null };
tmp5 = closure_11;
obj.type = closure_11.HOSTED_FIELDS_FIELD_PROPERTY_INVALID.type;
obj.code = closure_11.HOSTED_FIELDS_FIELD_PROPERTY_INVALID.code;
obj.message = str;
tmp6 = new.target;
tmp7 = new.target;
tmp8 = obj;
tmp9 = new closure_7(obj);
tmp10 = tmp9;
rejectResult = _Promise.reject(tmp9);
} else {
tmp = new.target;
tmp2 = new.target;
rejectResult = new _Promise(() => { ... });
}
return rejectResult;
}
setMessage(arg0) {
_bus = this._bus;
obj = { field: global.field, message: global.message };
emitResult = _bus.emit(events.SET_MESSAGE, obj);
return;
}
removeAttribute(arg0) {
if (allowedFields.hasOwnProperty(global.field)) {
_fields = this._fields;
self = this;
if (_fields.hasOwnProperty(global.field)) {
tmp12 = closure_27;
tmp6 = closure_27(global.attribute);
if (!tmp6) {
_bus = self._bus;
tmp13 = events;
obj1 = { field: null, attribute: null };
({ field: obj3.field, attribute: obj3.attribute } = global);
emitResult = _bus.emit(events.REMOVE_ATTRIBUTE, obj1);
}
} else {
tmp7 = closure_7;
obj4 = { type: null, code: null, message: null };
tmp8 = closure_11;
obj4.type = closure_11.HOSTED_FIELDS_FIELD_NOT_PRESENT.type;
obj4.code = closure_11.HOSTED_FIELDS_FIELD_NOT_PRESENT.code;
str3 = "Cannot remove attribute for \"";
str4 = "\" field because it is not part of the current Hosted Fields options.";
obj4.message = `Cannot remove attribute for "${global.field}" field because it is not part of the current Hosted Fields options.`;
tmp9 = new.target;
tmp10 = new.target;
tmp11 = obj4;
tmp6 = new closure_7(obj4);
}
} else {
tmp = closure_7;
obj = { type: null, code: null, message: null };
tmp2 = closure_11;
obj.type = closure_11.HOSTED_FIELDS_FIELD_INVALID.type;
obj.code = closure_11.HOSTED_FIELDS_FIELD_INVALID.code;
str = "\"";
str2 = "\" is not a valid field. You must use a valid field option when removing an attribute.";
obj.message = `"${global.field}" is not a valid field. You must use a valid field option when removing an attribute.`;
tmp3 = new.target;
tmp4 = new.target;
tmp5 = obj;
tmp6 = new closure_7(obj);
}
_Promise = Promise;
if (tmp6) {
rejectResult = _Promise.reject(tmp6);
} else {
rejectResult = _Promise.resolve();
}
return rejectResult;
}
setPlaceholder(arg0, arg1) {
obj = { field: global, attribute: "placeholder", value: module };
return this.setAttribute(obj);
}
clear(arg0) {
if (allowedFields.hasOwnProperty(global)) {
_fields = this._fields;
self = this;
if (_fields.hasOwnProperty(global)) {
_bus = self._bus;
tmp12 = events;
obj1 = { field: null };
obj1.field = global;
emitResult = _bus.emit(events.CLEAR_FIELD, obj1);
} else {
tmp7 = closure_7;
obj4 = { type: null, code: null, message: null };
tmp8 = closure_11;
obj4.type = closure_11.HOSTED_FIELDS_FIELD_NOT_PRESENT.type;
obj4.code = closure_11.HOSTED_FIELDS_FIELD_NOT_PRESENT.code;
str3 = "Cannot clear \"";
str4 = "\" field because it is not part of the current Hosted Fields options.";
obj4.message = `Cannot clear "${global}" field because it is not part of the current Hosted Fields options.`;
tmp9 = new.target;
tmp10 = new.target;
tmp11 = obj4;
tmp6 = new closure_7(obj4);
}
} else {
tmp = closure_7;
obj = { type: null, code: null, message: null };
tmp2 = closure_11;
obj.type = closure_11.HOSTED_FIELDS_FIELD_INVALID.type;
obj.code = closure_11.HOSTED_FIELDS_FIELD_INVALID.code;
str = "\"";
str2 = "\" is not a valid field. You must use a valid field option when clearing a field.";
obj.message = `"${global}" is not a valid field. You must use a valid field option when clearing a field.`;
tmp3 = new.target;
tmp4 = new.target;
tmp5 = obj;
tmp6 = new closure_7(obj);
}
_Promise = Promise;
if (tmp6) {
rejectResult = _Promise.reject(tmp6);
} else {
rejectResult = _Promise.resolve();
}
return rejectResult;
}
focus(arg0) {
self = this;
tmp = this._fields[global];
closure_0 = tmp;
if (allowedFields.hasOwnProperty(global)) {
_fields = self._fields;
if (_fields.hasOwnProperty(global)) {
frameElement = tmp.frameElement;
focusResult = frameElement.focus();
_bus = self._bus;
tmp14 = events;
obj1 = { field: null };
obj1.field = global;
emitResult = _bus.emit(events.TRIGGER_INPUT_FOCUS, obj1);
tmp16 = closure_15;
if (closure_15.isIos()) {
tmp17 = globalThis;
_setTimeout = setTimeout;
num = 5;
timerId = setTimeout(() => { ... }, 5);
}
} else {
tmp8 = closure_7;
obj4 = { type: null, code: null, message: null };
tmp9 = closure_11;
obj4.type = closure_11.HOSTED_FIELDS_FIELD_NOT_PRESENT.type;
obj4.code = closure_11.HOSTED_FIELDS_FIELD_NOT_PRESENT.code;
str3 = "Cannot focus \"";
str4 = "\" field because it is not part of the current Hosted Fields options.";
obj4.message = `Cannot focus "${global}" field because it is not part of the current Hosted Fields options.`;
tmp10 = new.target;
tmp11 = new.target;
tmp12 = obj4;
tmp7 = new closure_7(obj4);
}
} else {
tmp2 = closure_7;
obj = { type: null, code: null, message: null };
tmp3 = closure_11;
obj.type = closure_11.HOSTED_FIELDS_FIELD_INVALID.type;
obj.code = closure_11.HOSTED_FIELDS_FIELD_INVALID.code;
str = "\"";
str2 = "\" is not a valid field. You must use a valid field option when focusing a field.";
obj.message = `"${global}" is not a valid field. You must use a valid field option when focusing a field.`;
tmp4 = new.target;
tmp5 = new.target;
tmp6 = obj;
tmp7 = new closure_7(obj);
}
_Promise = Promise;
if (tmp7) {
rejectResult = _Promise.reject(tmp7);
} else {
rejectResult = _Promise.resolve();
}
return rejectResult;
}
getState() {
return this._state;
}
}
let assign = global("../../lib/assign").assign;
closure_1 = global("../../lib/create-assets-url");
let verifyDomain = global("../../lib/is-verified-domain");
closure_3 = global("../../lib/destructor");
closure_4 = global("@braintree/iframer");
closure_5 = global("framebus");
closure_6 = global("../../lib/create-deferred-client");
closure_7 = global("../../lib/braintree-error");
query = global("./compose-url");
closure_9 = global("./get-styles-from-class");
const globalResult = global("../shared/constants");
closure_10 = globalResult;
global("../shared/errors");
const INTEGRATION_TIMEOUT_MS = global("../../lib/constants").INTEGRATION_TIMEOUT_MS;
closure_13 = global("@braintree/uuid");
closure_14 = global("../shared/find-parent-tags");
const ios = global("../shared/browser-detection");
const events = globalResult.events;
const globalResult1 = global("@braintree/event-emitter");
closure_18 = global("./inject-frame");
sendEvent = global("../../lib/analytics");
let allowedFields = globalResult.allowedFields;
closure_21 = global("../../lib/methods");
closure_22 = global("../../lib/shadow");
closure_23 = global("../../lib/find-root-node");
closure_24 = global("../../lib/convert-methods-to-error");
constants = global("../../lib/errors");
closure_26 = global("../shared/get-card-types");
closure_27 = global("./attribute-validation-error");
closure_28 = global("./focus-change");
const destroy = global("../shared/focus-intercept").destroy;
const child = globalResult1.createChild(HostedFields);
module.exports = global("@braintree/wrap-promise").wrapPrototype(HostedFields);
},
{ "../../lib/analytics": 138, "../../lib/assign": 140, "../../lib/braintree-error": 143, "../../lib/constants": 145, "../../lib/convert-methods-to-error": 146, "../../lib/create-assets-url": 148, "../../lib/create-deferred-client": 150, "../../lib/destructor": 152, "../../lib/errors": 154, "../../lib/find-root-node": 155, "../../lib/is-verified-domain": 173, "../../lib/methods": 175, "../../lib/shadow": 178, "../shared/browser-detection": 130, "../shared/constants": 131, "../shared/errors": 132, "../shared/find-parent-tags": 133, "../shared/focus-intercept": 134, "../shared/get-card-types": 135, "./attribute-validation-error": 123, "./compose-url": 124, "./focus-change": 125, "./get-styles-from-class": 126, "./inject-frame": 128, "@braintree/event-emitter": 30, "@braintree/iframer": 32, "@braintree/uuid": 36, "@braintree/wrap-promise": 40, framebus: 50 }
];
obj[127] = items126;
const items127 = [
(arg0, arg1, arg2) => {
closure_0 = global("../shared/focus-intercept");
const navigationDirections = global("../shared/constants").navigationDirections;
module.exports = function injectFrame(arg0, getAttribute, appendChild, arg3) {
const attr = getAttribute.getAttribute("type");
const element =