From a4966c6f8b6b50d05ecbabd997b182f663081da9 Mon Sep 17 00:00:00 2001 From: roman makarov Date: Thu, 11 Apr 2024 13:53:36 +0400 Subject: [PATCH] fix [PAYMENTS-18763]: fix mobile window close handler --- CHANGELOG.md | 3 +++ dist/widget.js | 18 ++++++++++-------- dist/widget.min.js | 4 ++-- dist/widget.min.js.map | 2 +- package-lock.json | 2 +- package.json | 2 +- src/childwindow.js | 14 ++++++++------ 7 files changed, 26 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dbae7cf..84d8e14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 1.2.11 +- [fix] Fixed mobile window close handler (PS 4) + ## 1.2.10 - [feature] Add new event - error (PS 4) diff --git a/dist/widget.js b/dist/widget.js index 9d54eb6..71cb83b 100644 --- a/dist/widget.js +++ b/dist/widget.js @@ -405,16 +405,18 @@ module.exports = (function () { var that = this; var addHandlers = function () { - that.on('close', function handleClose() { + function closeChildWindow() { + that.off('close', closeChildWindow) + if (timer) { global.clearTimeout(timer); } if (that.childWindow) { that.childWindow.close(); } + } - that.off('close', handleClose) - }); + that.on('close', closeChildWindow); // Cross-window communication that.message = new PostMessage(that.childWindow); @@ -429,9 +431,9 @@ module.exports = (function () { that.message.on('status', function (event) { that.triggerEvent('status', event.detail); }); - that.on('close', function handleClose() { - that.message.off(); - that.off('close', handleClose); + that.message.on('close', function handleClose() { + closeChildWindow(); + that.message.off('close', handleClose); }); that.message.on('user-country', function (event) { that.triggerEvent('user-country', event.detail); @@ -1186,7 +1188,7 @@ module.exports = "

"; },{}],13:[function(require,module,exports){ -module.exports = require('sassify')('.xpaystation-widget-lightbox{position:fixed;top:0;left:0;bottom:0;right:0;width:100%;height:100%;-webkit-animation:xpaystation-widget-lightbox-fadein 0.15s;animation:xpaystation-widget-lightbox-fadein 0.15s}.xpaystation-widget-lightbox-overlay{position:absolute;top:0;left:0;bottom:0;right:0;z-index:1}.xpaystation-widget-lightbox-content{position:relative;top:0;left:0;z-index:3}.xpaystation-widget-lightbox-content__hidden{visibility:hidden;z-index:-1}.xpaystation-widget-lightbox-content-iframe{width:100%;height:100%;border:0;background:transparent}.xpaystation-widget-lightbox-spinner{position:absolute;top:50%;left:50%;display:none;z-index:2;pointer-events:none}.xpaystation-widget-lightbox-spinner .spinner-xsolla{width:56px;height:55px;margin-top:-28px;margin-left:-26px}.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-x,.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-s,.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-o,.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-l,.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-a{-webkit-animation:xpaystation-widget-lightbox-bouncedelay 1s infinite ease-in-out;-webkit-animation-fill-mode:both;animation:xpaystation-widget-lightbox-bouncedelay 1s infinite ease-in-out;animation-fill-mode:both}.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-x{-webkit-animation-delay:0s;animation-delay:0s}.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-s{-webkit-animation-delay:.2s;animation-delay:.2s}.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-o{-webkit-animation-delay:.4s;animation-delay:.4s}.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-l{-webkit-animation-delay:.6s;animation-delay:.6s}.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-a{-webkit-animation-delay:.8s;animation-delay:.8s}.xpaystation-widget-lightbox-spinner .spinner-round{margin-top:-23px;margin-left:-23px;-webkit-animation:xpaystation-widget-lightbox-spin 3s infinite linear;animation:xpaystation-widget-lightbox-spin 3s infinite linear}.xpaystation-widget-lightbox-spinner .spinner-custom{-webkit-animation:xpaystation-widget-lightbox-spin infinite linear;animation:xpaystation-widget-lightbox-spin infinite linear}@-webkit-keyframes xpaystation-widget-lightbox-bouncedelay{0%,80%,100%{opacity:0}40%{opacity:1}}@keyframes xpaystation-widget-lightbox-bouncedelay{0%,80%,100%{opacity:0}40%{opacity:1}}@-webkit-keyframes xpaystation-widget-lightbox-fadein{from{opacity:0}to{opacity:1}}@keyframes xpaystation-widget-lightbox-fadein{from{opacity:0}to{opacity:1}}@-webkit-keyframes xpaystation-widget-lightbox-spin{from{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}@keyframes xpaystation-widget-lightbox-spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}} /*# sourceMappingURL=data:application/json;base64,ewoJInZlcnNpb24iOiAzLAoJImZpbGUiOiAibGlnaHRib3guc2NzcyIsCgkic291cmNlcyI6IFsKCQkibGlnaHRib3guc2NzcyIKCV0sCgkic291cmNlc0NvbnRlbnQiOiBbCgkJIiRsaWdodGJveC1wcmVmaXg6ICd4cGF5c3RhdGlvbi13aWRnZXQtbGlnaHRib3gnO1xuJGxpZ2h0Ym94LWNsYXNzOiAnLicgKyAkbGlnaHRib3gtcHJlZml4O1xuXG4jeyRsaWdodGJveC1jbGFzc30ge1xuICBwb3NpdGlvbjogZml4ZWQ7XG4gIHRvcDogMDtcbiAgbGVmdDogMDtcbiAgYm90dG9tOiAwO1xuICByaWdodDogMDtcbiAgd2lkdGg6IDEwMCU7XG4gIGhlaWdodDogMTAwJTtcbiAgLXdlYmtpdC1hbmltYXRpb246ICN7JGxpZ2h0Ym94LXByZWZpeH0tZmFkZWluIC4xNXM7XG4gIGFuaW1hdGlvbjogI3skbGlnaHRib3gtcHJlZml4fS1mYWRlaW4gLjE1cztcbn1cblxuI3skbGlnaHRib3gtY2xhc3N9LW92ZXJsYXkge1xuICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gIHRvcDowO1xuICBsZWZ0OiAwO1xuICBib3R0b206IDA7XG4gIHJpZ2h0OiAwO1xuICB6LWluZGV4OiAxO1xufVxuXG4jeyRsaWdodGJveC1jbGFz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0FBRyxPQUFPLENBQUUsQ0FBRyxFQUdwQixVQUFVLENBQVYsdUNBQVUsQ0FDUixBQUFBLEVBQUUsQ0FBRSxBQUFBLEdBQUcsQ0FBRSxBQUFBLElBQUksQ0FBRyxPQUFPLENBQUUsQ0FBRSxDQUMzQixBQUFBLEdBQUcsQ0FBRyxPQUFPLENBQUUsQ0FBRSxFQUduQixrQkFBa0IsQ0FBbEIsa0NBQWtCLENBQ2hCLEFBQUEsSUFBSSxDQUFHLE9BQU8sQ0FBRSxDQUFFLENBQ2xCLEFBQUEsRUFBRSxDQUFHLE9BQU8sQ0FBRSxDQUFFLEVBR2xCLFVBQVUsQ0FBVixrQ0FBVSxDQUNSLEFBQUEsSUFBSSxDQUFHLE9BQU8sQ0FBRSxDQUFFLENBQ2xCLEFBQUEsRUFBRSxDQUFHLE9BQU8sQ0FBRSxDQUFFLEVBR2xCLGtCQUFrQixDQUFsQixnQ0FBa0IsQ0FDaEIsQUFBQSxJQUFJLENBQUcsaUJBQWlCLENBQUUsWUFBTSxDQUNoQyxBQUFBLEVBQUUsQ0FBRyxpQkFBaUIsQ0FBRSxjQUFNLEVBR2hDLFVBQVUsQ0FBVixnQ0FBVSxDQUNSLEFBQUEsSUFBSSxDQUFHLFNBQVMsQ0FBRSxZQUFNLENBQ3hCLEFBQUEsRUFBRSxDQUFHLFNBQVMsQ0FBRSxjQUFNIiwKCSJuYW1lcyI6IFtdCn0= */');; +module.exports = require('sassify')('.xpaystation-widget-lightbox{position:fixed;top:0;left:0;bottom:0;right:0;width:100%;height:100%;-webkit-animation:xpaystation-widget-lightbox-fadein 0.15s;animation:xpaystation-widget-lightbox-fadein 0.15s}.xpaystation-widget-lightbox-overlay{position:absolute;top:0;left:0;bottom:0;right:0;z-index:1}.xpaystation-widget-lightbox-content{position:relative;top:0;left:0;z-index:3}.xpaystation-widget-lightbox-content__hidden{visibility:hidden;z-index:-1}.xpaystation-widget-lightbox-content-iframe{width:100%;height:100%;border:0;background:transparent}.xpaystation-widget-lightbox-spinner{position:absolute;top:50%;left:50%;display:none;z-index:2;pointer-events:none}.xpaystation-widget-lightbox-spinner .spinner-xsolla{width:56px;height:55px;margin-top:-28px;margin-left:-26px}.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-x,.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-s,.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-o,.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-l,.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-a{-webkit-animation:xpaystation-widget-lightbox-bouncedelay 1s infinite ease-in-out;-webkit-animation-fill-mode:both;animation:xpaystation-widget-lightbox-bouncedelay 1s infinite ease-in-out;animation-fill-mode:both}.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-x{-webkit-animation-delay:0s;animation-delay:0s}.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-s{-webkit-animation-delay:.2s;animation-delay:.2s}.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-o{-webkit-animation-delay:.4s;animation-delay:.4s}.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-l{-webkit-animation-delay:.6s;animation-delay:.6s}.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-a{-webkit-animation-delay:.8s;animation-delay:.8s}.xpaystation-widget-lightbox-spinner .spinner-round{margin-top:-23px;margin-left:-23px;-webkit-animation:xpaystation-widget-lightbox-spin 3s infinite linear;animation:xpaystation-widget-lightbox-spin 3s infinite linear}.xpaystation-widget-lightbox-spinner .spinner-custom{-webkit-animation:xpaystation-widget-lightbox-spin infinite linear;animation:xpaystation-widget-lightbox-spin infinite linear}@-webkit-keyframes xpaystation-widget-lightbox-bouncedelay{0%,80%,100%{opacity:0}40%{opacity:1}}@keyframes xpaystation-widget-lightbox-bouncedelay{0%,80%,100%{opacity:0}40%{opacity:1}}@-webkit-keyframes xpaystation-widget-lightbox-fadein{from{opacity:0}to{opacity:1}}@keyframes xpaystation-widget-lightbox-fadein{from{opacity:0}to{opacity:1}}@-webkit-keyframes xpaystation-widget-lightbox-spin{from{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}@keyframes xpaystation-widget-lightbox-spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}} /*# sourceMappingURL=data:application/json;base64,ewoJInZlcnNpb24iOiAzLAoJImZpbGUiOiAibGlnaHRib3guc2NzcyIsCgkic291cmNlcyI6IFsKCQkibGlnaHRib3guc2NzcyIKCV0sCgkic291cmNlc0NvbnRlbnQiOiBbCgkJIiRsaWdodGJveC1wcmVmaXg6ICd4cGF5c3RhdGlvbi13aWRnZXQtbGlnaHRib3gnO1xyXG4kbGlnaHRib3gtY2xhc3M6ICcuJyArICRsaWdodGJveC1wcmVmaXg7XHJcblxyXG4jeyRsaWdodGJveC1jbGFzc30ge1xyXG4gIHBvc2l0aW9uOiBmaXhlZDtcclxuICB0b3A6IDA7XHJcbiAgbGVmdDogMDtcclxuICBib3R0b206IDA7XHJcbiAgcmlnaHQ6IDA7XHJcbiAgd2lkdGg6IDEwMCU7XHJcbiAgaGVpZ2h0OiAxMDAlO1xyXG4gIC13ZWJraXQtYW5pbWF0aW9uOiAjeyRsaWdodGJveC1wcmVmaXh9LWZhZGVpbiAuMTVzO1xyXG4gIGFuaW1hdGlvbjogI3skbGlnaHRib3gtcHJlZml4fS1mYWRlaW4gLjE1cztcclxufVxyXG5cclxuI3skbGlnaHRib3gtY2xhc3N9LW92ZXJsYXkge1xyXG4gIHBvc2l0aW9uOiBhYnNvbHV0ZTtcclxuICB0b3A6MDtcclxuICBsZWZ0OiAwO1xyXG4gIGJvdHRvbTogMDtcclxuICByaWdodDogMDtcclxuICB6LWluZGV4OiAxO1xyXG59XHJcblxyXG4jeyRsaWdodGJveC1jbGFzc30tY29udGVudCB7XHJcbiAgcG9zaXRpb246IHJlbGF0aXZlO1xyXG4gIHRvcDog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0NBQXdCLENBQU0sUUFBUSxDQUFDLE1BQU0sQ0FDekQsQUFHSCxrQkFBa0IsQ0FBbEIsdUNBQWtCLENBQ2hCLEFBQUEsRUFBRSxDQUFFLEFBQUEsR0FBRyxDQUFFLEFBQUEsSUFBSSxDQUFHLE9BQU8sQ0FBRSxDQUFFLENBQzNCLEFBQUEsR0FBRyxDQUFHLE9BQU8sQ0FBRSxDQUFHLEVBR3BCLFVBQVUsQ0FBVix1Q0FBVSxDQUNSLEFBQUEsRUFBRSxDQUFFLEFBQUEsR0FBRyxDQUFFLEFBQUEsSUFBSSxDQUFHLE9BQU8sQ0FBRSxDQUFFLENBQzNCLEFBQUEsR0FBRyxDQUFHLE9BQU8sQ0FBRSxDQUFFLEVBR25CLGtCQUFrQixDQUFsQixrQ0FBa0IsQ0FDaEIsQUFBQSxJQUFJLENBQUcsT0FBTyxDQUFFLENBQUUsQ0FDbEIsQUFBQSxFQUFFLENBQUcsT0FBTyxDQUFFLENBQUUsRUFHbEIsVUFBVSxDQUFWLGtDQUFVLENBQ1IsQUFBQSxJQUFJLENBQUcsT0FBTyxDQUFFLENBQUUsQ0FDbEIsQUFBQSxFQUFFLENBQUcsT0FBTyxDQUFFLENBQUUsRUFHbEIsa0JBQWtCLENBQWxCLGdDQUFrQixDQUNoQixBQUFBLElBQUksQ0FBRyxpQkFBaUIsQ0FBRSxZQUFNLENBQ2hDLEFBQUEsRUFBRSxDQUFHLGlCQUFpQixDQUFFLGNBQU0sRUFHaEMsVUFBVSxDQUFWLGdDQUFVLENBQ1IsQUFBQSxJQUFJLENBQUcsU0FBUyxDQUFFLFlBQU0sQ0FDeEIsQUFBQSxFQUFFLENBQUcsU0FBUyxDQUFFLGNBQU0iLAoJIm5hbWVzIjogW10KfQ== */');; },{"sassify":2}],14:[function(require,module,exports){ module.exports = '1.2.10'; @@ -1866,4 +1868,4 @@ module.exports = (function () { },{"./app":3,"./helpers":7,"./polyfills":9}]},{},["main"])("main") }); -//# sourceMappingURL=data:application/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UV2ZW50KCdFdmVudCcpO1xuICAgICAgICAgICAgY2xpY2tFdmVudC5pbml0RXZlbnQoY2xpY2tFdmVudE5hbWUsIGZhbHNlLCB0cnVlKTtcblxuICAgICAgICAgICAgYm9keUVsZW1lbnQuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLCAoZnVuY3Rpb24oZXZlbnQpIHtcbiAgICAgICAgICAgICAgICBjbGlja0V2ZW50LnNvdXJjZUV2ZW50ID0gZXZlbnQ7XG4gICAgICAgICAgICAgICAgYm9keUVsZW1lbnQuZGlzcGF0Y2hFdmVudChjbGlja0V2ZW50KTtcbiAgICAgICAgICAgIH0pLmJpbmQodGhpcyksIGZhbHNlKTtcblxuICAgICAgICAgICAgYm9keUVsZW1lbnQuYWRkRXZlbnRMaXN0ZW5lcihjbGlja0V2ZW50TmFtZSwgaGFuZGxlQ2xpY2tFdmVudCk7XG4gICAgICAgICAgICB0aGlzLnRyaWdnZXJFdmVudChBcHAuZXZlbnRUeXBlcy5JTklUKTtcbiAgICAgICAgfVxuICAgICAgICByZWFkeShpbml0aWFsaXplLmJpbmQodGhpcywgb3B0aW9ucykpO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIE9wZW4gcGF5bWVudCBpbnRlcmZhY2UgKFBheVN0YXRpb24pXG4gICAgICovXG4gICAgQXBwLnByb3RvdHlwZS5vcGVuID0gZnVuY3Rpb24gKCkge1xuICAgICAgICB0aGlzLmNoZWNrQ29uZmlnKCk7XG4gICAgICAgIHRoaXMuY2hlY2tBcHAoKTtcblxuICAgICAgICB2YXIgdHJpZ2dlclNwbGl0U3RhdHVzID0gKGZ1bmN0aW9uIChkYXRhKSB7XG4gICAgICAgICAgICBzd2l0Y2ggKCgoZGF0YSB8fCB7fSkucGF5bWVudEluZm8gfHwge30pLnN0YXR1cykge1xuICAgICAgICAgICAgICAgIGNhc2UgJ2ludm9pY2UnOlxuICAgICAgICAgICAgICAgICAgICB0aGlzLnRyaWdnZXJFdmVudChBcHAuZXZlbnRUeXBlcy5TVEFUVVNfSU5WT0lDRSwgZGF0YSk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgJ2RlbGl2ZXJpbmcnOlxuICAgICAgICAgICAgICAgICAgICB0aGlzLnRyaWdnZXJFdmVudChBcHAuZXZlbnRUeXBlcy5TVEFUVVNfREVMSVZFUklORywgZGF0YSk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgJ3Ryb3VibGVkJzpcbiAgICAgICAgICAgICAgICAgICAgdGhpcy50cmlnZ2VyRXZlbnQoQXBwLmV2ZW50VHlwZXMuU1RBVFVTX1RST1VCTEVELCBkYXRhKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgY2FzZSAnZG9uZSc6XG4gICAgICAgICAgICAgICAgICAgIHRoaXMudHJpZ2dlckV2ZW50KEFwcC5ldmVudFR5cGVzLlNUQVRVU19ET05FLCBkYXRhKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pLmJpbmQodGhpcyk7XG5cbiAgICAgICAgdmFyIHVybCA9IHRoaXMuZ2V0UGF5bWVudFVybCgpO1xuICAgICAgICB2YXIgdGhhdCA9IHRoaXM7XG5cbiAgICAgICAgZnVuY3Rpb24gaGFuZGxlU3RhdHVzKGV2ZW50KSB7XG4gICAgICAgICAgICB2YXIgc3RhdHVzRGF0YSA9IGV2ZW50LmRldGFpbDtcbiAgICAgICAgICAgIHRoYXQudHJpZ2dlckV2ZW50KEFwcC5ldmVudFR5cGVzLlNUQVRVUywgc3RhdHVzRGF0YSk7XG4gICAgICAgICAgICB0cmlnZ2VyU3BsaXRTdGF0dXMoc3RhdHVzRGF0YSk7XG4gICAgICAgIH1cblxuICAgICAgICBmdW5jdGlvbiBoYW5kbGVVc2VyTG9jYWxlKGV2ZW50KSB7XG4gICAgICAgICAg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KSB7XG4gICAgICAgICAgICAgICAgdGhhdC5tZXNzYWdlLm9mZigpO1xuICAgICAgICAgICAgICAgIHRoYXQub2ZmKCdjbG9zZScsIGhhbmRsZUNsb3NlKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgdGhhdC5tZXNzYWdlLm9uKCd1c2VyLWNvdW50cnknLCBmdW5jdGlvbiAoZXZlbnQpIHtcbiAgICAgICAgICAgICAgICB0aGF0LnRyaWdnZXJFdmVudCgndXNlci1jb3VudHJ5JywgZXZlbnQuZGV0YWlsKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgdGhhdC5tZXNzYWdlLm9uKCdmY3AnLCBmdW5jdGlvbiAoZXZlbnQpIHtcbiAgICAgICAgICAgICAgICB0aGF0LnRyaWdnZXJFdmVudCgnZmNwJywgZXZlbnQuZGV0YWlsKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgdGhhdC5tZXNzYWdlLm9uKCdlcnJvcicsIGZ1bmN0aW9uIChldmVudCkge1xuICAgICAgICAgICAgICAgIHRoYXQudHJpZ2dlckV2ZW50KCdlcnJvcicsIGV2ZW50LmRldGFpbCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfTtcblxuICAgICAgICBzd2l0Y2ggKG9wdGlvbnMudGFyZ2V0KSB7XG4gICAgICAgICAgICBjYXNlICdfc2VsZic6XG4gICAgICAgICAgICAgICAgdGhpcy5jaGlsZFdpbmRvdyA9IGdsb2JhbC53aW5kb3c7XG4gICAgICAgICAgICAgICAgYWRkSGFuZGxlcnMoKTtcbiAgICAgICAgICAgICAgICB0aGlzLmNoaWxkV2luZG93LmxvY2F0aW9uLmhyZWYgPSB1cmw7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlICdfcGFyZW50JzpcbiAgICAgICAgICAgICAgICB0aGlzLmNoaWxkV2luZG93ID0gZ2xvYmFsLndpbmRvdy5wYXJlbnQ7XG4gICAgICAgICAgICAgICAgYWRkSGFuZGxlcnMoKTtcbiAgICAgICAgICAgICAgICB0aGlzLmNoaWxkV2luZG93LmxvY2F0aW9uLmhyZWYgPSB1cmw7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlICdfYmxhbmsnOlxuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICB0aGlzLmNoaWxkV2luZG93ID0gZ2xvYmFsLndpbmRvdy5vcGVuKHVybCk7XG4gICAgICAgICAgICAgICAgdGhpcy5jaGlsZFdpbmRvdy5mb2N1cygpO1xuICAgICAgICAgICAgICAgIGFkZEhhbmRsZXJzKCk7XG5cbiAgICAgICAgICAgICAgICB2YXIgY2hlY2tXaW5kb3cgPSAoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5jaGlsZFdpbmRvdykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuY2hpbGRXaW5kb3cuY2xvc2VkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy50cmlnZ2VyRXZlbnQoJ2Nsb3NlJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpbWVyID0gZ2xvYmFsLnNldFRpbWVvdXQoY2hlY2tXaW5kb3csIDEwMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KS5iaW5kKHRoaXMpO1xuICAgICAgICAgICAgICAgIHZhciB0aW1lciA9IGdsb2JhbC5zZXRUaW1lb3V0KGNoZWNrV2luZG93LCAxMDApO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy50cmlnZ2VyRXZlbnQoJ29wZW4nKTtcbiAgICB9O1xuXG4gICAgQ2hpbGRXaW5kb3cucHJvdG90eXBlLmNsb3NlID0gZnV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5KSB7XG4gICAgICByZXN1bHRba2V5WzBdXSA9IGtleVsxXTtcbiAgICB9XG4gIH1cbiAgcmV0dXJuIHJlc3VsdDtcbn1cblxuZnVuY3Rpb24gcGFyYW0oYSkge1xuICB2YXIgcyA9IFtdO1xuXG4gIHZhciBhZGQgPSBmdW5jdGlvbiAoaywgdikge1xuICAgICAgdiA9IHR5cGVvZiB2ID09PSAnZnVuY3Rpb24nID8gdigpIDogdjtcbiAgICAgIHYgPSB2ID09PSBudWxsID8gJycgOiB2ID09PSB1bmRlZmluZWQgPyAnJyA6IHY7XG4gICAgICBzW3MubGVuZ3RoXSA9IGVuY29kZVVSSUNvbXBvbmVudChrKSArICc9JyArIGVuY29kZVVSSUNvbXBvbmVudCh2KTtcbiAgfTtcblxuICB2YXIgYnVpbGRQYXJhbXMgPSBmdW5jdGlvbiAocHJlZml4LCBvYmopIHtcbiAgICAgIHZhciBpLCBsZW4sIGtleTtcblxuICAgICAgaWYgKHByZWZpeCkge1xuICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KG9iaikpIHtcbiAgICAgICAgICAgICAgZm9yIChpID0gMCwgbGVuID0gb2JqLmxlbmd0aDsgaSA8IGxlbjsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICBidWlsZFBhcmFtcyhcbiAgICAgICAgICAgICAgICAgICAgICBwcmVmaXggKyAnWycgKyAodHlwZW9mIG9ialtpXSA9PT0gJ29iamVjdCcgJiYgb2JqW2ldID8gaSA6ICcnKSArICddJyxcbiAgICAgICAgICAgICAgICAgICAgICBvYmpbaV1cbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGVsc2UgaWYgKFN0cmluZyhvYmopID09PSAnW29iamVjdCBPYmplY3RdJykge1xuICAgICAgICAgICAgICBmb3IgKGtleSBpbiBvYmopIHtcbiAgICAgICAgICAgICAgICAgIGJ1aWxkUGFyYW1zKHByZWZpeCArICdbJyArIGtleSArICddJywgb2JqW2tleV0pO1x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VxdWlyZSgnLi9zdHlsZXMvbGlnaHRib3guc2NzcycpO1xuICAgICAgICB0aGlzLmV2ZW50T2JqZWN0ID0gSGVscGVycy5hZGRFdmVudE9iamVjdCh0aGlzLCB3cmFwRXZlbnRJbk5hbWVzcGFjZSk7XG4gICAgICAgIHRoaXMub3B0aW9ucyA9IGlzTW9iaWxlID8gREVGQVVMVF9PUFRJT05TX01PQklMRSA6IERFRkFVTFRfT1BUSU9OUztcbiAgICAgICAgdGhpcy5tZXNzYWdlID0gbnVsbDtcbiAgICB9XG5cbiAgICB2YXIgQ0xBU1NfUFJFRklYID0gJ3hwYXlzdGF0aW9uLXdpZGdldC1saWdodGJveCc7XG4gICAgdmFyIENPTU1PTl9PUFRJT05TID0ge1xuICAgICAgICB6SW5kZXg6IDEwMDAsXG4gICAgICAgIG92ZXJsYXlPcGFjaXR5OiAnLjYnLFxuICAgICAgICBvdmVybGF5QmFja2dyb3VuZDogJyMwMDAwMDAnLFxuICAgICAgICBjb250ZW50QmFja2dyb3VuZDogJyNmZmZmZmYnLFxuICAgICAgICBjbG9zZUJ5S2V5Ym9hcmQ6IHRydWUsXG4gICAgICAgIGNsb3NlQnlDbGljazogdHJ1ZSxcbiAgICAgICAgbW9kYWw6IGZhbHNlLFxuICAgICAgICBzcGlubmVyOiAneHNvbGxhJyxcbiAgICAgICAgc3Bpbm5lckNvbG9yOiBudWxsLFxuICAgICAgICBzcGlubmVyVXJsOiBudWxsLFxuICAgICAgICBzcGlubmVyUm90YXRpb25QZXJpb2Q6IDBcbiAgICB9O1xuICAgIHZhciBERUZBVUxUX09QVElPTlMgPSBPYmplY3QuYXNzaWduKHt9LCBDT01NT05fT1BUSU9OUywge1xuICAgICAgICB3aWR0aDogbnVsbCxcbiAgICAgICAgaGVpZ2h0OiAnMTAwJScsXG4gICAgICAgIGNvbnRlbnRNYXJnaW46ICcxMHB4J1xuICAgIH0pO1xuICAgIHZhciBERUZBVUxUX09QVElPTlNfTU9CSUxFID0gT2JqZWN0L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jyk7XG4gICAgICAgICAgICBzcGlubmVyLmNsYXNzTmFtZSA9IHNldHRpbmdzLnByZWZpeCArICctc3Bpbm5lcic7XG4gICAgICAgICAgICBzcGlubmVyLmlubmVySFRNTCA9IHNldHRpbmdzLnNwaW5uZXI7XG5cbiAgICAgICAgICAgIGNvbnRlbnQuYXBwZW5kQ2hpbGQoaWZyYW1lKTtcblxuICAgICAgICAgICAgaG9zdC5hcHBlbmRDaGlsZChvdmVybGF5KTtcbiAgICAgICAgICAgIGhvc3QuYXBwZW5kQ2hpbGQoY29udGVudCk7XG4gICAgICAgICAgICBob3N0LmFwcGVuZENoaWxkKHNwaW5uZXIpO1xuXG4gICAgICAgICAgICByZXR1cm4gaG9zdDtcbiAgICAgICAgfTtcblxuICAgICAgICB2YXIgYm9keUVsZW1lbnQgPSBnbG9iYWwuZG9jdW1lbnQuYm9keTtcbiAgICAgICAgdmFyIGxpZ2h0Qm94RWxlbWVudCA9IHRlbXBsYXRlKHtcbiAgICAgICAgICAgIHByZWZpeDogQ0xBU1NfUFJFRklYLFxuICAgICAgICAgICAgdXJsOiB1cmwsXG4gICAgICAgICAgICBzcGlubmVyOiBzcGlubmVyXG4gICAgICAgIH0pO1xuICAgICAgICB2YXIgbGlnaHRCb3hPdmVybGF5RWxlbWVudCA9IGxpZ2h0Qm94RWxlbWVudC5xdWVyeVNlbGVjdG9yKCcuJyArIENMQVNTX1BSRUZJWCArICctb3ZlcmxheScpO1xuICAgICAgICB2YXIgbGlnaHRCb3hDb250ZW50RWxlbWVudCA9IGxpZ2h0Qm94RWxlbWVudC5xdWVyeVNlbGVjdG9yKCcuJyArIENMQVNTX1BSRUZJWCArICctY29udGVudCcpO1xuICAgICAgICB2YXIgbGlnaHRCb3hJZnJhbWVFbGVtZW50ID0gbGlnaHRCb3hDb250ZW50RWxlbWVudC5xdWVyeVNlbGVjdG9yKCcuJyArIENMQVNTX1BSRUZJWCArICctY29udGVudC1pZnJhbWUnKTtcbiAgICAgICAgdmFyIGxp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vbnMud2lkdGggOiBwc0RpbWVuc2lvbnMud2lkdGg7XG4gICAgICAgICAgICB2YXIgaGVpZ2h0ID0gb3B0aW9ucy5oZWlnaHQgPyBvcHRpb25zLmhlaWdodCA6IHBzRGltZW5zaW9ucy5oZWlnaHQ7XG5cbiAgICAgICAgICAgIGxpZ2h0Qm94Q29udGVudEVsZW1lbnQuc3R5bGUubGVmdCA9ICcwcHgnO1xuICAgICAgICAgICAgbGlnaHRCb3hDb250ZW50RWxlbWVudC5zdHlsZS50b3AgPSAnMHB4JztcbiAgICAgICAgICAgIGxpZ2h0Qm94Q29udGVudEVsZW1lbnQuc3R5bGUuYm9yZGVyUmFkaXVzID0gJzhweCc7XG4gICAgICAgICAgICBsaWdodEJveENvbnRlbnRFbGVtZW50LnN0eWxlLndpZHRoID0gd2l0aERlZmF1bHRQWFVuaXQod2lkdGgpO1xuICAgICAgICAgICAgbGlnaHRCb3hDb250ZW50RWxlbWVudC5zdHlsZS5oZWlnaHQgPSB3aXRoRGVmYXVsdFBYVW5pdChoZWlnaHQpO1xuXG4gICAgICAgICAgICB2YXIgY29udGFpbmVyV2lkdGggPSBsaWdodEJveEVsZW1lbnQuY2xpZW50V2lkdGgsXG4gICAgICAgICAgICAgICAgY29udGFpbmVySGVpZ2h0ID0gbGlnaHRCb3hFbGVtZW50LmNsaWVudEhlaWdodDtcblxuICAgICAgICAgICAgdmFyIGNvbnRlbnRXaWR0aCA9IG91dGVyV2lkdGgobGlnaHRCb3hDb250ZW50RWxlbWVudCksXG4gICAgICAgICAgICAgICAgY29udGVudEhlaWdodCA9IG91dGVySGVpZ2h0KGxpZ2h0Qm94Q29udGVudEVsZW1lbnQpO1xuXG4gICAgICAgICAgICB2YXIgaG9yTWFyZ2luID0gY29udGVudFdpZHRoIC0gbGlnaHRCb3hDb250ZW50RWxlbWVudC5vZmZzZXRXaWR0aCxcbiAgICAgICAgICAgICAgICB2ZXJ0TWFyZ2luID0gY29udGVudEhlaWdodCAtIGxpZ2h0Qm94Q29udGVudEVsZW1lbnQub2Zmc2V0SGVpZ2h0O1xuXG4gICAgICAgICAgICB2YXIgaG9yRGlmZiA9IGNvbnRhaW5lcldpZHRoIC0gY29udGVudFdpZHRoLFxuICAgICAgICAgICAgICAgIHZlcnREaWZmID0gY29udGFpbmVySGVpZ2h0IC0gY29udGVudEhlaWdodDtcblxuICAgICAgICAgICAgaWYgKGhvckRpZmYgPCAwKSB7XG4gICAgICAgICAgICAgICAgbGlnaHRCb3hDb250ZW50RWxlbWVudC5zdHlsZS53aWR0aCA9IGNvbnRhaW5lcldpZHRoIC0gaG9yTWFyZ2luICsgJ3B4JztcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgbGlnaHRCb3hDb250ZW50RWxlbWVudC5zdHlsZS5sZWZ0ID0gTWF0aC5yb3VuZChob3JEaWZmIC8gMikgKyAncHgnO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAodmVydERpZmYgPCAwKSB7XG4gICAgICAgICAgICAgICAgbGlnaHRCb3hDb250ZW50RWxlbWVudC5zdHlsZS5oZWlnaHQgPSBjb250YWluZXJIZWlnaHQgLSB2ZXJ0TWFyZ2luICsgJ3B4JztcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgbGlnaHRCb3hDb250ZW50RWxlbWVudC5zdHlsZS50b3AgPSBNYXRoLnJvdW5kKHZlcnREaWZmIC8gMikgKyAncHgnO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuXG4gICAgICAgIGlmIChvcHRpb25zLndpZHRoICYmIG9wdGlvbnMuaGVpZ2h0KSB7XG4gICAgICAgICAgICBsaWdodEJveFJlc2l6ZSA9IEhlbHBlcnMub25jZShsaWdodEJveFJlc2l6ZS5iaW5kKHRoaXMpKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1bmN0aW9uIG91dGVyV2lkdGgoZWwpIHtcbiAgICAgICAgICAgIHZhciB3aWR0aCA9IGVsLm9mZnNldFdpZHRoO1xuICAgICAgICAgICAgdmFyIHN0eWxlID0gZ2V0Q29tcHV0ZWRTdHlsZShlbCk7XG5cbiAgICAgICAgICAgIHdpZHRoICs9IHBhcnNlSW50KHN0eWxlLm1hcmdpbkxlZnQpICsgcGFyc2VJbnQoc3R5bGUubWFyZ2luUmlnaHQpO1xuICAgICAgICAgICAgcmV0dXJuIHdpZHRoO1xuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gb3V0ZXJIZWlnaHQoZWwpIHtcbiAgICAgICAgICAgIHZhciBoZWlnaHQgPSBlbC5vZmZzZXRIZWlnaHQ7XG4gICAgICAgICAgICB2YXIgc3R5bGUgPSBnZXRDb21wdXRlZFN0eWxlKGVsKTtcblxuICAgICAgICAgICAgaGVpZ2h0ICs9IHBhcnNlSW50KHN0eWxlLm1hcmdpblRvcCkgKyBwYXJzZUludChzdHlsZS5tYXJnaW5Cb3R0b20pO1xuICAgICAgICAgICAgcmV0dXJuIGhlaWdodDtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBib2R5U3R5bGVzO1xuICAgICAgICB2YXIgaGlkZVNjcm9sbGJhciA9IChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICBib2R5U3R5bGVzID0gSGVscGVycy56aXBPYmplY3QoWydvdmVyZmxvdycsICdwYWRkaW5nUmlnaHQnXS5tYXAoZnVuY3Rpb24gKGtleSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBba2V5LCBnZXRDb21wdXRlZFN0eWxlKGJvZHlFbGVtZW50KVtrZXldXTtcbiAgICAgICAgICAgIH0pKTtcblxuICAgICAgICAgICAgdmFyIGJvZHlQYWQgPSBwYXJzZUludCgoZ2V0Q29tcHV0ZWRTdHlsZShib2R5RWxlbWVudClbJ3BhZGRpbmdSaWdodCddIHx8IDApLCAxMCk7XG4gICAgICAgICAgICBib2R5RWxlbWVudC5zdHlsZS5vdmVyZmxvdyA9ICdoaWRkZW4nO1xuICAgICAgICAgICAgYm9keUVsZ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2ZSBhbmQgY3VzdG9tIHRpbWVvdXQgaXMgbm90IHByb3ZpZGVkXG4gICAgICAgICAgICBsb2FkVGltZXIgPSBnbG9iYWwuc2V0VGltZW91dChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgbGlnaHRCb3hSZXNpemUoKTtcbiAgICAgICAgICAgICAgICBzaG93Q29udGVudCgpO1xuICAgICAgICAgICAgfSwgdGltZW91dCk7XG4gICAgICAgICAgICBsaWdodEJveElmcmFtZUVsZW1lbnQucmVtb3ZlRXZlbnRMaXN0ZW5lcignbG9hZCcsIGhhbmRsZUxvYWQpO1xuXG4gICAgICAgIH0pO1xuXG4gICAgICAgIHZhciBpZnJhbWVXaW5kb3cgPSBsaWdodEJveElmcmFtZUVsZW1lbnQuY29udGVudFdpbmRvdyB8fCBsaWdodEJveElmcmFtZUVsZW1lbnQ7XG5cbiAgICAgICAgLy8gQ3Jvc3Mtd2luZG93IGNvbW11bmljYXRpb25cbiAgICAgICAgdGhpcy5tZXNzYWdlID0gbmV3IFBvc3RNZXNzYWdlKGlmcmFtZVdpbmRvdyk7XG4gICAgICAgIGlmIChvcHRpb25zLndpZHRoICYmIG9wdGlvbnMuaGVpZ2h0KSB7XG4gICAgICAgICAgICB0aGlzLm1lc3NhZ2Uub24oJ2RpbWVuc2lvbnMnLCAoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIGxpZ2h0Qm94UmVzaXplKCk7XG4gICAgICAgICAgICAgICAgc2hvd0NvbnRlbnQoKTtcbiAgICAgICAgICAgIH0pKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMubWVzc2FnZS5vbignZGltZW5zaW9ucycsIChmdW5jdGlvbiAoZXZlbnQpIHtcbiAgICAgICAgICAgICAgICB2YXIgZGF0YSA9IGV2ZW50LmRldGFpbDtcbiAgICAgICAgICAgICAgICBpZiAoZGF0YS5kaW1lbnNpb25zKSB7XG4gICAgICAgICAgICAgICAgICAgIHBzRGltZW5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ge1xuICAgICAgICB0aGlzLmV2ZW50T2JqZWN0ID0gSGVscGVycy5hZGRFdmVudE9iamVjdCh0aGlzLCB3cmFwRXZlbnRJbk5hbWVzcGFjZSk7XG4gICAgICAgIHRoaXMubGlua2VkV2luZG93ID0gd2luZG93O1xuXG4gICAgICAgIGdsb2JhbC53aW5kb3cuYWRkRXZlbnRMaXN0ZW5lciAmJiBnbG9iYWwud2luZG93LmFkZEV2ZW50TGlzdGVuZXIoXCJtZXNzYWdlXCIsIChmdW5jdGlvbiAoZXZlbnQpIHtcbiAgICAgICAgICAgIGlmIChldmVudC5zb3VyY2UgIT09IHRoaXMubGlua2VkV2luZG93KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgbWVzc2FnZSA9IHt9O1xuICAgICAgICAgICAgaWYgKHR5cGVvZiBldmVudC5kYXRhID09PSAnc3RyaW5nJyAmJiBnbG9iYWwuSlNPTiAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZSA9IGdsb2JhbC5KU09OLnBhcnNlKGV2ZW50LmRhdGEpO1xuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChtZXNzYWdlLmNvbW1hbmQpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmV2ZW50T2JqZWN0LnRyaWdnZXIobWVzc2FnZS5jb21tYW5kLCBtZXNzYWdlLmRhdGEpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KS5iaW5kKHRoaXMpKTtcbiAgICB9XG5cbiAgICAvKiogUHJpdmF0ZSBNZW1iZXJzICoqL1xuICAgIFBvc3RNZXNzYWdlLnByb3RvdHlwZS5ldmVudE9iamVjdCA9IG51bGw7XG4gICAgUG9zdE1lc3NhZ2UucHJvdG90eX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gICAgIGFjY2Vzc190b2tlbjogbnVsbCxcclxuICAgICAgICBhY2Nlc3NfZGF0YTogbnVsbCxcclxuICAgICAgICBzYW5kYm94OiBmYWxzZSxcclxuICAgICAgICBsaWdodGJveDoge30sXHJcbiAgICAgICAgY2hpbGRXaW5kb3c6IHt9LFxyXG4gICAgICAgIGhvc3Q6ICdzZWN1cmUueHNvbGxhLmNvbScsXHJcbiAgICAgICAgaWZyYW1lT25seTogZmFsc2VcclxuICAgIH07XHJcbiAgICB2YXIgU0FOREJPWF9QQVlTVEFUSU9OX1VSTCA9ICdodHRwczovL3NhbmRib3gtc2VjdXJlLnhzb2xsYS5jb20vcGF5c3RhdGlvbjIvPyc7XHJcbiAgICB2YXIgRVZFTlRfTkFNRVNQQUNFID0gJy54cGF5c3RhdGlvbi13aWRnZXQnO1xyXG4gICAgdmFyIEFUVFJfUFJFRklYID0gJ2RhdGEteHBheXN0YXRpb24td2lkZ2V0LW9wZW4nO1xyXG5cclxuICAgIC8qKiBQcml2YXRlIE1lbWJlcnMgKiovXHJcbiAgICBBcHAucHJvdG90eXBlLmNvbmZpZyA9IHt9O1xyXG4gICAgQXBwLnByb3RvdHlwZS5pc0luaXRpYXRlZCA9IGZhbHNlO1xyXG4gICAgQXBwLnByb3RvdHlwZS5ldmVudE9iamVjdCA9IEhlbHBlcnMuYWRkRXZlbnRPYmplY3QodGhpcyk7XHJcblxyXG4gICAgQXBwLnByb3RvdHlwZS5nZXRQYXltZW50VXJsID0gZnVuY3Rpb24gKCkge1xyXG4gICAgICAgIGlmICh0aGlzLmNvbmZpZy5wYXltZW50X3VybCkge1xyXG4gICAgICAgICAgICByZXR1cm4gdGhpcy5jb25maWcucGF5bWVudF91cmw7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBjb25zdCBxdWVyeSA9IHt9O1xyXG4gICAgICAgIGlmICh0aGlzLmNvbmZpZy5hY2Nlc3NfdG9rZW4pIHtcclxuICAgICAgICAgICAgcXVlcnkuYWNjZXNzX3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biAgICAgICAgICAgIH0pLmJpbmQodGhpcyksIGZhbHNlKTtcclxuXHJcbiAgICAgICAgICAgIGJvZHlFbGVtZW50LmFkZEV2ZW50TGlzdGVuZXIoY2xpY2tFdmVudE5hbWUsIGhhbmRsZUNsaWNrRXZlbnQpO1xyXG4gICAgICAgICAgICB0aGlzLnRyaWdnZXJFdmVudChBcHAuZXZlbnRUeXBlcy5JTklUKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgcmVhZHkoaW5pdGlhbGl6ZS5iaW5kKHRoaXMsIG9wdGlvbnMpKTtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIE9wZW4gcGF5bWVudCBpbnRlcmZhY2UgKFBheVN0YXRpb24pXHJcbiAgICAgKi9cclxuICAgIEFwcC5wcm90b3R5cGUub3BlbiA9IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICB0aGlzLmNoZWNrQ29uZmlnKCk7XHJcbiAgICAgICAgdGhpcy5jaGVja0FwcCgpO1xyXG5cclxuICAgICAgICB2YXIgdHJpZ2dlclNwbGl0U3RhdHVzID0gKGZ1bmN0aW9uIChkYXRhKSB7XHJcbiAgICAgICAgICAgIHN3aXRjaCAoKChkYXRhIHx8IHt9KS5wYXltZW50SW5mbyB8fCB7fSkuc3RhdHVzKSB7XHJcbiAgICAgICAgICAgICAgICBjYXNlICdpbnZvaWNlJzpcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLnRyaWdnZXJFdmVudChBcHAuZXZlbnRUeXBlcy5TVEFUVVNfSU5WT0lDRSwgZGF0YSk7XHJcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICBjYXNlICdkZWxpdmVyaW5nJzpcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLnRyaWdnZXJFdmVudChBcHAuZXZlbnRUeXBlcy5TVEFUVVNfREVMSVZFUklORywgZGF0YSk7XHJcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICBjYXNlICd0cm91YmxlZCc6XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy50cmlnZ2VyRXZlbnQoQXBwLmV2ZW50VHlwZXMuU1RBVFVTX1RST1VCTEVELCBkYXRhKTtcclxuICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgIGNhc2UgJ2RvbmUnOlxyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMudHJpZ2dlckV2ZW50KEFwcC5ldmVudFR5cGVzLlNUQVRVU19ET05FLCBkYXRhKTtcclxuICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pLmJpbmQodGhpcyk7XHJcblxyXG4gICAgICAgIHZhciB1cmwgPSB0aGlzLmdldFBheW1lbnRVcmwoKTtcclxuICAgICAgICB2YXIgdGhhdCA9IHRoaXM7XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIGhhbmRsZVN0YXR1cyhldmVudCkge1xyXG4gICAgICAgICAgICB2YXIgc3RhdHVzRGF0YSA9IGV2ZW50LmRldGFpbDtcclxuICAgICAgICAgICAgdGhhdC50cmlnZ2VyRXZlbnQoQXBwLmV2ZW50VHlwZXMuU1RBVFVTLCBzdGF0dXNEYXRhKTtcclxuICAgICAgICAgICAgdHJpZ2dlclNwbGl0U3RhdHVzKHN0YXR1c0RhdGEpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZnVuY3Rpb24gaGFuZGxlVXNlckxvY2FsZShldmVudCkge1xyXG4gICAgICAgICAgICB2YXIgdXNlckNvdW50cnkgPSB7XHJcbiAgICAgICAgICAgICAgICB1c2VyX2NvdW50cnk6IGV2ZW50LmRldGFpbC51c2VyX2NvdW50cnlcclxuICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgdGhhdC50cmlnZ2VyQ3VzdG9tRXZlbnQoQXBwLmV2ZW50VHlwZXMuVVNFUl9DT1VOVFJZLCB1c2VyQ291bnRyeSk7XHJc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2luZG93Lm9uKEFwcC5ldmVudFR5cGVzLkZDUCwgaGFuZGxlRmNwKTtcclxuICAgICAgICAgICAgY2hpbGRXaW5kb3cub24oQXBwLmV2ZW50VHlwZXMuRVJST1IsIGhhbmRsZUVycm9yKTtcclxuICAgICAgICAgICAgY2hpbGRXaW5kb3cub3Blbih1cmwsIHRoaXMuY29uZmlnLmNoaWxkV2luZG93KTtcclxuICAgICAgICAgICAgdGhhdC5jaGlsZFdpbmRvdyA9IGNoaWxkV2luZG93O1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIHZhciBsaWdodEJveCA9IG5ldyBMaWdodEJveCgobmV3IERldmljZSkuaXNNb2JpbGUoKSAmJiB0aGlzLmNvbmZpZy5pZnJhbWVPbmx5KTtcclxuICAgICAgICAgICAgbGlnaHRCb3gub24oJ29wZW4nLCBmdW5jdGlvbiBoYW5kbGVPcGVuKCkge1xyXG4gICAgICAgICAgICAgICAgdGhhdC5wb3N0TWVzc2FnZSA9IGxpZ2h0Qm94LmdldFBvc3RNZXNzYWdlKCk7XHJcbiAgICAgICAgICAgICAgICB0aGF0LnRyaWdnZXJFdmVudChBcHAuZXZlbnRUeXBlcy5PUEVOKTtcclxuICAgICAgICAgICAgICAgIHRoYXQudHJpZ2dlckV2ZW50KEFwcC5ldmVudFR5cGVzLk9QRU5fTElHSFRCT1gpO1xyXG4gICAgICAgICAgICAgICAgbGlnaHRCb3gub2ZmKCdvcGVuJywgaGFuZGxlT3Blbik7XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICBsaWdodEJveC5vbignbG9hZCcsIGZ1bmN0aW9uIGhhbmRsZUxvYWQoKSB7XHJcbiAgICAgICAgICAgICAgICB0aGF0LnRyaWdnZXJFdmVudChBcHAuZXZlbnRUeXBlcy5MT0FEKTtcclxuICAgICAgICAgICAgICAgIGxpZ2h0Qm94Lm9mZignbG9hZCcsIGhhbmRsZUxvYWQpO1xyXG4gICAgICAgICAgICB9KTtcclx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cbiAgICAgICAgICAgIHRoYXQubWVzc2FnZS5vbignc3RhdHVzJywgZnVuY3Rpb24gKGV2ZW50KSB7XHJcbiAgICAgICAgICAgICAgICB0aGF0LnRyaWdnZXJFdmVudCgnc3RhdHVzJywgZXZlbnQuZGV0YWlsKTtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIHRoYXQubWVzc2FnZS5vbignY2xvc2UnLCBmdW5jdGlvbiBoYW5kbGVDbG9zZSgpIHtcclxuICAgICAgICAgICAgICAgIGNsb3NlQ2hpbGRXaW5kb3coKTtcclxuICAgICAgICAgICAgICAgIHRoYXQubWVzc2FnZS5vZmYoJ2Nsb3NlJywgaGFuZGxlQ2xvc2UpO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgdGhhdC5tZXNzYWdlLm9uKCd1c2VyLWNvdW50cnknLCBmdW5jdGlvbiAoZXZlbnQpIHtcclxuICAgICAgICAgICAgICAgIHRoYXQudHJpZ2dlckV2ZW50KCd1c2VyLWNvdW50cnknLCBldmVudC5kZXRhaWwpO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgdGhhdC5tZXNzYWdlLm9uKCdmY3AnLCBmdW5jdGlvbiAoZXZlbnQpIHtcclxuICAgICAgICAgICAgICAgIHRoYXQudHJpZ2dlckV2ZW50KCdmY3AnLCBldmVudC5kZXRhaWwpO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgdGhhdC5tZXNzYWdlLm9uKCdlcnJvcicsIGZ1bmN0aW9uIChldmVudCkge1xyXG4gICAgICAgICAgICAgICAgdGhhdC50cmlnZ2VyRXZlbnQoJ2Vycm9yJywgZXZlbnQuZGV0YWlsKTtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfTtcclxuXHJcbiAgICAgICAgc3dpdGNoIChvcHRpb25zLnRhcmdldCkge1xyXG4gICAgICAgICAgICBjYXNlICdfc2VsZic6XHJcbiAgICAgICAgICAgICAgICB0aGlzLmNoaWxkV2luZG93ID0gZ2xvYmFsLndpbmRvdztcclxuICAgICAgICAgICAgICAgIGFkZEhhbmRsZXJzKCk7XHJcbiAgICAgICAgICAgICAgICB0aGlzLmNoaWxkV2luZG93LmxvY2F0aW9uLmhyZWYgPSB1cmw7XHJcbiAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgY2FzZSAnX3BhcmVudCc6XHJcbiAgICAgICAgICAgICAgICB0aGlzLmNoaWxkV2luZG93ID0gZ2xvYmFsLndpbmRvdy5wYXJlbnQ7XHJcbiAgICAgICAgICAgICAgICBhZGRIYW5kbGVycygpO1xyXG4gICAgICAgICAgICAgICAgdGhpcy5jaGlsZFdpbmRvdy5sb2NhdGlvbi5ocmVmID0gdXJsO1xyXG4gICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgIGNhc2UgJ19ibGFuayc6XHJcbiAgICAgICAgICAgIGRlZmF1bHQ6XHJcbiAgICAgICAgICAgICAgICB0aGlzLmNoaWxkV2luZG93ID0gZ2xvYmFsLndpbmRvdy5vcGVuKHVybCk7XHJcbiAgICAgICAgICAgICAgICB0aGlzLmNoaWxkV2luZG93LmZvY3VzKCk7XHJcbiAgICAgICAgICAgICAgICBhZGRIYW5kbGVycygpO1xyXG5cclxuICAgICAgICAgICAgICAgIHZhciBjaGVja1dpbmRvdyA9IChmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuY2hpbGRXaW5kb3cpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuY2hpbGRXaW5kb3cuY2xvc2VkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnRyaWdnZXJFdmVudCgnY2xvc2UnKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpbWVyID0gZ2xvYmFsLnNldFRpbWVvdXQoY2hlY2tXa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XG5cclxuICAgICAgaWYgKHByZWZpeCkge1xyXG4gICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkob2JqKSkge1xyXG4gICAgICAgICAgICAgIGZvciAoaSA9IDAsIGxlbiA9IG9iai5sZW5ndGg7IGkgPCBsZW47IGkrKykge1xyXG4gICAgICAgICAgICAgICAgICBidWlsZFBhcmFtcyhcclxuICAgICAgICAgICAgICAgICAgICAgIHByZWZpeCArICdbJyArICh0eXBlb2Ygb2JqW2ldID09PSAnb2JqZWN0JyAmJiBvYmpbaV0gPyBpIDogJycpICsgJ10nLFxyXG4gICAgICAgICAgICAgICAgICAgICAgb2JqW2ldXHJcbiAgICAgICAgICAgICAgICAgICk7XHJcbiAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgfSBlbHNlIGlmIChTdHJpbmcob2JqKSA9PT0gJ1tvYmplY3QgT2JqZWN0XScpIHtcclxuICAgICAgICAgICAgICBmb3IgKGtleSBpbiBvYmopIHtcclxuICAgICAgICAgICAgICAgICAgYnVpbGRQYXJhbXMocHJlZml4ICsgJ1snICsga2V5ICsgJ10nLCBvYmpba2V5XSk7XHJcbiAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICBhZGQocHJlZml4LCBvYmopO1xyXG4gICAgICAgICAgfVxyXG4gICAgICB9IGVsc2UgaWYgKEFycmF5LmlzQXJyYXkob2JqKSkge1xyXG4gICAgICAgICAgZm9yIChpID0gMCwgbGVuID0gb2JqLmxlbmd0aDsgaSA8IGxlbjsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgYWRkKG9ialtpXS5uYW1lLCBvYmpbaV0udmFsdWUpO1xyXG4gICAgICAgICAgfVxyXG4gICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgZm9yIChrZXkgaW4gb2JqKSB7XHJcbiAgICAgICAgICAgICAgYnVpbGRQYXJhbXMoa2V5LCBvYmpba2V5XSk7XHJcbiAgICAgICAgICB9XHJcbiAgICAgI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GUgPyBERUZBVUxUX09QVElPTlNfTU9CSUxFIDogREVGQVVMVF9PUFRJT05TO1xyXG4gICAgICAgIHRoaXMubWVzc2FnZSA9IG51bGw7XHJcbiAgICB9XHJcblxyXG4gICAgdmFyIENMQVNTX1BSRUZJWCA9ICd4cGF5c3RhdGlvbi13aWRnZXQtbGlnaHRib3gnO1xyXG4gICAgdmFyIENPTU1PTl9PUFRJT05TID0ge1xyXG4gICAgICAgIHpJbmRleDogMTAwMCxcclxuICAgICAgICBvdmVybGF5T3BhY2l0eTogJy42JyxcclxuICAgICAgICBvdmVybGF5QmFja2dyb3VuZDogJyMwMDAwMDAnLFxyXG4gICAgICAgIGNvbnRlbnRCYWNrZ3JvdW5kOiAnI2ZmZmZmZicsXHJcbiAgICAgICAgY2xvc2VCeUtleWJvYXJkOiB0cnVlLFxyXG4gICAgICAgIGNsb3NlQnlDbGljazogdHJ1ZSxcclxuICAgICAgICBtb2RhbDogZmFsc2UsXHJcbiAgICAgICAgc3Bpbm5lcjogJ3hzb2xsYScsXHJcbiAgICAgICAgc3Bpbm5lckNvbG9yOiBudWxsLFxyXG4gICAgICAgIHNwaW5uZXJVcmw6IG51bGwsXHJcbiAgICAgICAgc3Bpbm5lclJvdGF0aW9uUGVyaW9kOiAwXHJcbiAgICB9O1xyXG4gICAgdmFyIERFRkFVTFRfT1BUSU9OUyA9IE9iamVjdC5hc3NpZ24oe30sIENPTU1PTl9PUFRJT05TLCB7XHJcbiAgICAgICAgd2lkdGg6IG51bGwsXHJcbiAgICAgICAgaGVpZ2h0OiAnMTAwJScsXHJcbiAgICAgICAgY29udGVudE1hcmdpbjogJzEwcHgnXHJcbiAgICB9KTtcclxuICAgIHZhciBERUZBVUxUX09QVElPTlNfTU9CSUxFID0gT2JqZWN0LmFzc2lnbih7fSwgQ09NTU9OX09QVElPTlMsIHtcclxuICAgICAgICB3aWR0aDogJzEwMCUnLFxyXG4gICAgICAgIGhlaWdodDogJzEwMCUnLCBcclxuICAgICAgICBjb250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WN1c3RvbScpO1xyXG4gICAgICAgICAgICBzcGlubmVyQ3VzdG9tLnN0eWxlWyctd2Via2l0LWFuaW1hdGlvbi1kdXJhdGlvbiddID0gb3B0aW9ucy5zcGlubmVyUm90YXRpb25QZXJpb2QgKyAnczsnO1xyXG4gICAgICAgICAgICBzcGlubmVyQ3VzdG9tLnN0eWxlWydhbmltYXRpb24tZHVyYXRpb24nXSA9IG9wdGlvbnMuc3Bpbm5lclJvdGF0aW9uUGVyaW9kICsgJ3M7JztcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGlmIChvcHRpb25zLmNsb3NlQnlDbGljaykge1xyXG4gICAgICAgICAgICBsaWdodEJveE92ZXJsYXlFbGVtZW50LmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJywgKGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgIHRoaXMuY2xvc2VGcmFtZSgpO1xyXG4gICAgICAgICAgICB9KS5iaW5kKHRoaXMpKTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGJvZHlFbGVtZW50LmFwcGVuZENoaWxkKGxpZ2h0Qm94RWxlbWVudCk7XHJcblxyXG4gICAgICAgIGlmIChvcHRpb25zLmNsb3NlQnlLZXlib2FyZCkge1xyXG5cclxuICAgICAgICAgICAgYm9keUVsZW1lbnQuYWRkRXZlbnRMaXN0ZW5lcihoYW5kbGVLZXl1cEV2ZW50TmFtZSwgSGFuZGxlQm91bmRTcGVjaWZpY0tleXVwKTtcclxuXHJcbiAgICAgICAgICAgIGJvZHlFbGVtZW50LmFkZEV2ZW50TGlzdGVuZXIoJ2tleXVwJywgaGFuZGxlR2xvYmFsS2V5dXAsIGZhbHNlKTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHZhciBzaG93Q29udGVudCA9IEhlbHBlcnMub25jZSgoZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICBoaWRlU3Bpbm5lcihvcHRpb25zKTtcclxuICAgICAgICAgICAgbGlnaHRCb3hDb250ZW50RWxlbWVudC5jbGFzc0xpc3QucmVtb3ZlKENMQVNTX1BSRUZJWCArICctY29udGVudF9faGlkZGVuJyk7XHJcbiAgICAgICAgICAgIHRoaXMudHJpZ2dlckV2ZW50KCdsb2FkJyk7XHJcbiAgICAgICAgfSkuYmluZCh0aGlzKSk7XHJcblxyXG4gICAgICAgIHZhciBsaWdodEJveFJlc2l6ZSA9IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgdmFyIHdpZHRoID0gb3B0aW9ucy53aWR0aCA/IG9wdGlvbnMud2lkdGggOiBwc0RpbWVuc2lvbnMud2lkdGg7XHJcbiAgICAgICAgICAgIHZhciBoZWlnaHQgPSBvcHRpb25zLmhlaWdodCA/IG9wdGlvbnMuaGVpZ2h0IDogcHNEaW1lbnNpb25zLmhlaWdodDtcclxuXHJcbiAgICAgICAgICAgIGxpZ2h0Qm94Q29udGVudEVsZW1lbnQuc3R5bGUubGVmdCA9ICcwcHgnO1xyXG4gICAgICAgICAgICBsaWdodEJveENvbnRlbnRFbGVtZW50LnN0eWxlLnRvcCA9ICcwcHgnO1xyXG4gICAgICAgICAgICBsaWdodEJveENvbnRlbnRFbGVtZW50LnN0eWxlLmJvcmRlclJhZGl1cyA9ICc4cHgnO1xyXG4gICAgICAgICAgICBsaWdodEJveENvbnRlbnRFbGVtZW50LnN0eWxlLndpZHRoID0gd2l0aERlZmF1bHRQWFVuaXQod2lkdGgpO1xyXG4gICAgICAgICAgICBsaWdodEJveENvbnRlbnRFbGVtZW50LnN0eWxlLmhlaWdodCA9IHdpdGhEZWZhdWx0UFhVbml0KGhlaWdodCk7XHJcblxyXG4gICAgICAgICAgICB2YXIgY29udGFpbmVyV2lkdGggPSBsaWdodEJveEVsZW1lbnQuY2xpZW50V2lkdGgsXHJcbiAgICAgICAgICAgICAgICBjb250YWluZXJIZWlnaHQgPSBsaWdodEJveEVsZW1lbnQuY2xpZW50SGVpZ2h0O1xyXG5cclxuICAgICAgICAgICAgdmFyIGNvbnRlbnRXaWR0aCA9IG91dGVyV2lkdGgobGlnaHRCb3hDb250ZW50RWxlbWVudCksXHJcbiAgICAgICAgICAgICAgICBjb250ZW50SGVpZ2h0ID0gb3V0ZXJIZWlnaHQobGlnaHRCb3hDb250ZW50RWxlbWVudCk7XHJcblxyXG4gICAgICAgICAgICB2YXIgaG9yTWFyZ2luID0gY29udGVudFdpZHRoIC0gbGlnaHRCb3hDb250ZW50RWxlbWVudC5vZmZzZXRXaWR0aCxcclxuICAgICAgICAgICAgICAgIHZlcnRNYXJnaW4gPSBjb250ZW50SGVpZ2h0IC0gbGlnaHRCb3hDb250ZW50RWxlbWVudC5vZmZzZXRIZWlnaHQ7XHJcblxyXG4gICAgICAgICAgICB2YXIgaG9yRGlmZiA9IGNvbnRhaW5lcldpZHRoIC0gY29udGVudFdpZHRoLFxyXG4gICAgICAgICAgICAgICAgdmVydERpZmYgPSBjb250YWluZXJIZWlnaHQgLSBjb250ZW50SGVpZ2h0O1xyXG5cclxuICAgICAgICAgICAgaWYgKGhvckRpZmYgPCAwKSB7XHJcbiAgICAgICAgICAgICAgICBsaWdodEJveENvbnRlbnRFbGVtZW50LnN0eWxlLndpZHRoID0gY29udGFpbmVyV2lkdGggLSBob3JNYXJnaW4gKyAncHgnO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgbGlnaHRCb3hDb250ZW50RWxlbWVudC5zdHlsZS5sZWZ0ID0gTWF0aC5yb3VuZChob3JEaWZmIC8gMikgKyAncHgnO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICBpZiAodmVydERpZmYgPCAwKSB7XHJcbiAgICAgICAgICAgICAgICBsaWdodEJveENvbnRlbnRFbGVtZW50LnN0eWxlLmhlaWdodCA9IGNvbnRhaW5lckhlaWdodCAtIHZlcnRNYXJnaW4gKyAncHgnO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgbGlnaHRCb3hDb250ZW50RWxlbWVudC5zdHlsZS50b3AgPSBNYXRoLnJvdW5kKHZlcnREaWZmIC8gMikgKyAncHgnO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfTtcclxuXHJcbiAgICAgICAgaWYgKG9wdGlvbnMud2lkdGggJiYgb3B0aW9ucy5oZWlnaHQpIHtcclxuICAgICAgICAgICAgbGlnaHRCb3hSZXNpemUgPSBIZWxwZXJzLm9uY2UobGlnaHRCb3hSZXNpemUuYmluZCh0aGlzKSk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmdW5jdGlvbiBvdXRlcldpZHRoKGVsKSB7XHJcbiAgICAgICAgICAgIHZhciB3aWR0aCA9IGVsLm9mZnNldFdpZHRoO1xyXG4gICAgICAgICAgICB2YXIgc3R5bGUgPSBnZXRDb21wdXRlZFN0eWxlKGVsKTtcclxuXHJcbiAgICAgICAgICAgIHdpZHRoICs9IHBhcnNlSW50KHN0eWxlLm1hcmdpbkxlZnQpICsgcGFyc2VJbnQoc3R5bGUubWFyZ2luUmlnaHQpO1xyXG4gICAgICAgICAgICByZXR1cm4gd2lkdGg7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmdW5jdGlvbiBvdXRlckhlaWdodChlbCkge1xyXG4gICAgICAgICAgICB2YXIgaGVpZ2h0ID0gZWwub2Zmc2V0SGVpZ2h0O1xyXG4gICAgICAgICAgICB2YXIgc3R5bGUgPSBnZXRDb21wdXRlZFN0eWxlKGVsKTtcclxuXHJcbiAgICAgICAgICAgIGhlaWdodCArPSBwYXJzZUludChzdHlsZS5tYXJnaW5Ub3ApICsgcGFyc2VJbnQoc3R5bGUubWFyZ2luQm90dG9tKTtcclxuICAgICAgICAgICAgcmV0dXJuIGhlaWdodDtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHZhciBib2R5U3R5bGVzO1xyXG4gICAgICAgIHZhciBoaWRlU2Nyb2xsYmFyID0gKGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgYm9keVN0eWxlcyA9IEhlbHBlcnMuemlwT2JqZWN0KFsnb3ZlcmZsb3cnLCAncGFkZGluZ1JpZ2h0J10ubWFwKGZ1bmN0aW9uIChrZXkpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiBba2V5LCBnZXRDb21wdXRlZFN0eWxlKGJvZHlFbGVtZW50KVtrZXldXTtcclxuICAgICAgICAgICAgfSkpO1xyXG5cclxuICAgICAgICAgICAgdmFyIGJvZHlQYWQgPSBwYXJzZUludCgoZ2V0Q29tcHV0ZWRTdHlsZShib2R5RWxlbWVudClbJ3BhZGRpbmdSaWdodCddIHx8IDApLCAxMCk7XHJcbiAgICAgICAgICAgIGJvZHlFbGVtZW50LnN0eWxlLm92ZXJmbG93ID0gJ2hpZGRlbic7XHJcbiAgICAgICAgICAgIGJvZHlFbGVtZW50LnN0eWxlLnBhZGRpbmdSaWdodCA9IHdpdGhEZWZhdWx0UFhVbml0KGJvZHlQYWQgKyB0aGlzLm1lYXN1cmVTY3JvbGxiYXIoKSk7XHJcbiAgICAgICAgfSkuYmluZCh0aGlzKTtcclxuXHJcbiAgICAgICAgdmFyIHJlc2V0U2Nyb2xsYmFyID0gZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICBpZiAoYm9keVN0eWxlcykge1xyXG4gICAgICAgICAgICAgICAgT2JqZWN0LmtleXMoYm9keVN0eWxlcykuZm9yRWFjaChmdW5jdGlvbihrZXkpIHtcclxuICAgICAgICAgICAgICAgICAgICBib2R5RWxlbWVudC5zdHlsZVtrZXldID0gYm9keVN0eWxlc1trZXldO1xyXG4gICAgICAgICAgICAgICAgfSlcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH07XHJcblxyXG4gICAgICAgIHZhciBzaG93U3Bpbm5lciA9IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgbGlnaHRCb3hTcGlubmVyRWxlbWVudC5zdHlsZS5kaXNwbGF5ID0gJ2Jsb2NrJztcclxuICAgICAgICB9O1xyXG5cclx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IG5ldyBQb3N0TWVzc2FnZShpZnJhbWVXaW5kb3cpO1xyXG4gICAgICAgIGlmIChvcHRpb25zLndpZHRoICYmIG9wdGlvbnMuaGVpZ2h0KSB7XHJcbiAgICAgICAgICAgIHRoaXMubWVzc2FnZS5vbignZGltZW5zaW9ucycsIChmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICBsaWdodEJveFJlc2l6ZSgpO1xyXG4gICAgICAgICAgICAgICAgc2hvd0NvbnRlbnQoKTtcclxuICAgICAgICAgICAgfSkpO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIHRoaXMubWVzc2FnZS5vbignZGltZW5zaW9ucycsIChmdW5jdGlvbiAoZXZlbnQpIHtcclxuICAgICAgICAgICAgICAgIHZhciBkYXRhID0gZXZlbnQuZGV0YWlsO1xyXG4gICAgICAgICAgICAgICAgaWYgKGRhdGEuZGltZW5zaW9ucykge1xyXG4gICAgICAgICAgICAgICAgICAgIHBzRGltZW5zaW9ucyA9IEhlbHBlcnMuemlwT2JqZWN0KFsnd2lkdGgnLCAnaGVpZ2h0J10ubWFwKGZ1bmN0aW9uIChkaW0pIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFtkaW0sIE1hdGgubWF4KE1JTl9QU19ESU1FTlNJT05TW2RpbV0gfHwgMCwgZGF0YS5kaW1lbnNpb25zW2RpbV0gfHwgMCkgKyAncHgnXTtcclxuICAgICAgICAgICAgICAgICAgICB9KSk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGxpZ2h0Qm94UmVzaXplKCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBzaG93Q29udGVudCgpO1xyXG4gICAgICAgICAgICB9KSk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHRoaXMubWVzc2FnZS5vbignd2lkZ2V0LWRldGVjdGlvbicsIChmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIHRoaXMubWVzc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hZ2VcIiwgKGZ1bmN0aW9uIChldmVudCkge1xyXG4gICAgICAgICAgICBpZiAoZXZlbnQuc291cmNlICE9PSB0aGlzLmxpbmtlZFdpbmRvdykge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICB2YXIgbWVzc2FnZSA9IHt9O1xyXG4gICAgICAgICAgICBpZiAodHlwZW9mIGV2ZW50LmRhdGEgPT09ICdzdHJpbmcnICYmIGdsb2JhbC5KU09OICE9PSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIHRyeSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZSA9IGdsb2JhbC5KU09OLnBhcnNlKGV2ZW50LmRhdGEpO1xyXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICBpZiAobWVzc2FnZS5jb21tYW5kKSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLmV2ZW50T2JqZWN0LnRyaWdnZXIobWVzc2FnZS5jb21tYW5kLCBtZXNzYWdlLmRhdGEpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSkuYmluZCh0aGlzKSk7XHJcbiAgICB9XHJcblxyXG4gICAgLyoqIFByaXZhdGUgTWVtYmVycyAqKi9cclxuICAgIFBvc3RNZXNzYWdlLnByb3RvdHlwZS5ldmVudE9iamVjdCA9IG51bGw7XHJcbiAgICBQb3N0TWVzc2FnZS5wcm90b3R5cGUubGlua2VkV2luZG93ID0gbnVsbDtcclxuXHJcbiAgICAvKiogUHVibGljIE1lbWJlcnMgKiovXHJcbiAgICBQb3N0TWVzc2FnZS5wcm90b3R5cGUuc2VuZCA9IGZ1bmN0aW9uKGNvbW1hbmQsIGRhdGEsIHRhcmdldE9yaWdpbikge1xyXG4gICAgICAgIGlmIChkYXRhID09PSB1bmRlZmluZWQp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clxuXHJcbnBvbHlmaWxscy5hcHBseVBvbHlmaWxscygpO1xyXG5cclxudmFyIGluc3RhbmNlO1xyXG5cclxubW9kdWxlLmV4cG9ydHMgPSAoZnVuY3Rpb24gKCkge1xyXG4gICAgdmFyIGdldEluc3RhbmNlID0gZnVuY3Rpb24gKCkge1xyXG4gICAgICAgIGlmICghaW5zdGFuY2UpIHtcclxuICAgICAgICAgICAgaW5zdGFuY2UgPSBuZXcgQXBwKCk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHJldHVybiBpbnN0YW5jZTtcclxuICAgIH07XHJcblxyXG4gICAgcmV0dXJuIE9iamVjdC5hc3NpZ24oSGVscGVycy56aXBPYmplY3QoWydpbml0JywgJ29wZW4nLCAnY2xvc2UnLCAnb24nLCAnb2ZmJywgJ3NlbmRNZXNzYWdlJywgJ29uTWVzc2FnZSddLm1hcChmdW5jdGlvbiAobWV0aG9kTmFtZSkge1xyXG4gICAgICAgIHZhciBhcHAgPSBnZXRJbnN0YW5jZSgpO1xyXG4gICAgICAgIHJldHVybiBbbWV0aG9kTmFtZSwgZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICByZXR1cm4gYXBwW21ldGhvZE5hbWVdLmFwcGx5KGFwcCwgYXJndW1lbnRzKTtcclxuICAgICAgICB9XTtcclxuICAgIH0pKSwge1xyXG4gICAgICAgIGV2ZW50VHlwZXM6IEFwcC5ldmVudFR5cGVzLFxyXG4gICAgfSk7XHJcbn0pKCk7XHJcbiJdfQ== diff --git a/dist/widget.min.js b/dist/widget.min.js index 2d6eaf1..25feb1e 100644 --- a/dist/widget.min.js +++ b/dist/widget.min.js @@ -1,4 +1,4 @@ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.XPayStationWidget=e()}}(function(){var e;return function t(e,i,n){function s(r,a){if(!i[r]){if(!e[r]){var l="function"==typeof require&&require;if(!a&&l)return l(r,!0);if(o)return o(r,!0);var c=new Error("Cannot find module '"+r+"'");throw c.code="MODULE_NOT_FOUND",c}var d=i[r]={exports:{}};e[r][0].call(d.exports,function(t){var i=e[r][1][t];return s(i?i:t)},d,d.exports,t,e,i,n)}return i[r].exports}for(var o="function"==typeof require&&require,r=0;ro;o++)n(e+"["+("object"==typeof s[o]&&s[o]?o:"")+"]",s[o]);else if("[object Object]"===String(s))for(a in s)n(e+"["+a+"]",s[a]);else i(e,s);else if(Array.isArray(s))for(o=0,r=s.length;r>o;o++)i(s[o].name,s[o].value);else for(a in s)n(a,s[a]);return t};return n("",e).join("&")}function a(e){return function(){e(arguments),e=function(){}}}function l(e,t){function i(e){return/ /.test(e)}var n=function(e){return e},t=t||n,s=[];return{trigger:function(e,i){var n=t(e);try{var s=new CustomEvent(n,{detail:i})}catch(o){var s=document.createEvent("CustomEvent");s.initCustomEvent(n,!0,!0,i)}document.dispatchEvent(s)}.bind(e),on:function(e,n,o){function r(e,i,n){var o=t(e);document.addEventListener(o,i,n),s.push({name:o,handle:i,options:n})}if(i(e)){var a=e.split(" ");a.forEach(function(e){r(e,n,o)})}else r(e,n,o)}.bind(e),off:function(e,n,o){function r(e,i,n){var o=t(e);document.removeEventListener(o,i,n),s=s.filter(function(e){return e.name!==o})}const a=!e&&!n&&!o;if(a)return void s.forEach(function(e){document.removeEventListener(e.name,e.handle,e.options)});if(i(e)){var l=e.split(" ");l.forEach(function(e){r(e,n,o)})}else r(e,n,o)}.bind(e)}}t.exports={addEventObject:l,isEmpty:n,uniq:s,zipObject:o,param:r,once:a}},{}],8:[function(e,t,i){(function(i){var n=e("./version"),s=e("./helpers"),o=e("./postmessage");t.exports=function(){function t(t){e("./styles/lightbox.scss"),this.eventObject=s.addEventObject(this,r),this.options=t?d:c,this.message=null}function r(e){return t._NAMESPACE+"_"+e}var a="xpaystation-widget-lightbox",l={zIndex:1e3,overlayOpacity:".6",overlayBackground:"#000000",contentBackground:"#ffffff",closeByKeyboard:!0,closeByClick:!0,modal:!1,spinner:"xsolla",spinnerColor:null,spinnerUrl:null,spinnerRotationPeriod:0},c=Object.assign({},l,{width:null,height:"100%",contentMargin:"10px"}),d=Object.assign({},l,{width:"100%",height:"100%",contentMargin:"0px"}),p={xsolla:e("./spinners/xsolla.svg"),round:e("./spinners/round.svg"),none:" "},u={height:500,width:600},g=r("keyup"),h=r("resize"),f=function(e){var t=document.createEvent("Event");t.initEvent(g,!1,!0),t.sourceEvent=e,document.body.dispatchEvent(t)},Q=function(e){27==e.sourceEvent.which&&this.closeFrame()},x=function(){var e=document.createEvent("Event");e.initEvent(h,!1,!0),window.dispatchEvent(e)};return t.prototype.triggerEvent=function(){this.eventObject.trigger.apply(this.eventObject,arguments)},t.prototype.measureScrollbar=function(){var e=document.createElement("div");e.classList.add("scrollbar-measure"),e.setAttribute("style","position: absolute;top: -9999pxwidth: 50pxheight: 50pxoverflow: scroll"),document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t},t.prototype.openFrame=function(e,t){function r(e){var t="string"==typeof e&&String(parseFloat(e)).length===e.length;return t?e+"px":"number"==typeof e?e+"px":e}function l(e){var t=e.offsetWidth,i=getComputedStyle(e);return t+=parseInt(i.marginLeft)+parseInt(i.marginRight)}function c(e){var t=e.offsetHeight,i=getComputedStyle(e);return t+=parseInt(i.marginTop)+parseInt(i.marginBottom)}this.options=Object.assign({},this.options,t);var d=Q.bind(this);t=this.options;var m="custom"===t.spinner&&t.spinnerUrl?'':p[t.spinner]||Object.values(p)[0],B=function(e){var t=document.createElement("div");t.className=e.prefix;var i=document.createElement("div");i.className=e.prefix+"-overlay";var n=document.createElement("div");n.className=e.prefix+"-content "+e.prefix+"-content__hidden";var s=document.createElement("iframe");s.className=e.prefix+"-content-iframe",s.src=e.url,s.frameBorder="0",s.allowFullscreen=!0;var o=document.createElement("div");return o.className=e.prefix+"-spinner",o.innerHTML=e.spinner,n.appendChild(s),t.appendChild(i),t.appendChild(n),t.appendChild(o),t},b=i.document.body,v=B({prefix:a,url:e,spinner:m}),y=v.querySelector("."+a+"-overlay"),F=v.querySelector("."+a+"-content"),U=F.querySelector("."+a+"-content-iframe"),E=v.querySelector("."+a+"-spinner"),w={width:r(u.width),height:r(u.height)};if(v.style.zIndex=t.zIndex,y.style.opacity=t.overlayOpacity,y.style.backgroundColor=t.overlayBackground,F.style.backgroundColor=t.contentBackground,F.style.margin=r(t.contentMargin),F.style.width=t.width?r(t.width):"auto",F.style.height=t.height?r(t.height):"auto",t.spinnerColor&&(E.querySelector("path").style.fill=t.spinnerColor),"custom"===t.spinner){var L=E.querySelector(".spinner-custom");L.style["-webkit-animation-duration"]=t.spinnerRotationPeriod+"s;",L.style["animation-duration"]=t.spinnerRotationPeriod+"s;"}t.closeByClick&&y.addEventListener("click",function(){this.closeFrame()}.bind(this)),b.appendChild(v),t.closeByKeyboard&&(b.addEventListener(g,d),b.addEventListener("keyup",f,!1));var C=s.once(function(){D(t),F.classList.remove(a+"-content__hidden"),this.triggerEvent("load")}.bind(this)),N=function(){var e=t.width?t.width:w.width,i=t.height?t.height:w.height;F.style.left="0px",F.style.top="0px",F.style.borderRadius="8px",F.style.width=r(e),F.style.height=r(i);var n=v.clientWidth,s=v.clientHeight,o=l(F),a=c(F),d=o-F.offsetWidth,p=a-F.offsetHeight,u=n-o,g=s-a;0>u?F.style.width=n-d+"px":F.style.left=Math.round(u/2)+"px",0>g?F.style.height=s-p+"px":F.style.top=Math.round(g/2)+"px"};t.width&&t.height&&(N=s.once(N.bind(this)));var I,S,W=function(){I=s.zipObject(["overflow","paddingRight"].map(function(e){return[e,getComputedStyle(b)[e]]}));var e=parseInt(getComputedStyle(b).paddingRight||0,10);b.style.overflow="hidden",b.style.paddingRight=r(e+this.measureScrollbar())}.bind(this),R=function(){I&&Object.keys(I).forEach(function(e){b.style[e]=I[e]})},G=function(){E.style.display="block"},D=function(){E.style.display="none"};U.addEventListener("load",function k(e){var n=t.width&&t.height?1e3:t.resizeTimeout||3e4;S=i.setTimeout(function(){N(),C()},n),U.removeEventListener("load",k)});var O=U.contentWindow||U;this.message=new o(O),t.width&&t.height?this.message.on("dimensions",function(){N(),C()}):this.message.on("dimensions",function(e){var t=e.detail;t.dimensions&&(w=s.zipObject(["width","height"].map(function(e){return[e,Math.max(u[e]||0,t.dimensions[e]||0)+"px"]})),N()),C()}),this.message.on("widget-detection",function(){this.message.send("widget-detected",{version:n,lightBoxOptions:t})}.bind(this)),this.message.on("widget-close",function(){this.closeFrame()}.bind(this)),this.message.on("close",function(){this.closeFrame()}.bind(this)),this.message.on("status",function(e){this.triggerEvent("status",e.detail)}.bind(this)),this.message.on("user-country",function(e){this.triggerEvent("user-country",e.detail)}.bind(this)),this.message.on("fcp",function(e){this.triggerEvent("fcp",e.detail)}.bind(this)),this.message.on("error",function(e){this.triggerEvent("error",e.detail)}.bind(this)),window.addEventListener(h,N),window.addEventListener("resize",x);var A=this;this.on("close",function Z(e){A.message.off(),b.removeEventListener(g,d),b.removeEventListener("keyup",f),window.removeEventListener("resize",x),window.removeEventListener(h,N),v.parentNode.removeChild(v),R(),A.off("close",Z)}),G(),W(),this.triggerEvent("open")},t.prototype.closeFrame=function(){this.options.modal||this.triggerEvent("close")},t.prototype.close=function(){this.closeFrame()},t.prototype.on=function(){this.eventObject.on.apply(this.eventObject,arguments)},t.prototype.off=function(){this.eventObject.off.apply(this.eventObject,arguments)},t.prototype.getPostMessage=function(){return this.message},t._NAMESPACE=".xpaystation-widget-lightbox",t}()}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./helpers":7,"./postmessage":10,"./spinners/round.svg":11,"./spinners/xsolla.svg":12,"./styles/lightbox.scss":13,"./version":14}],9:[function(e,t,i){function n(){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){"use strict";if(null==e)throw new TypeError("Cannot convert first argument to object");for(var i=Object(e),n=1;nr;r++){var l=o[r],c=Object.getOwnPropertyDescriptor(s,l);void 0!==c&&c.enumerable&&(i[l]=s[l])}}return i}})}function s(){Array.prototype.forEach||(Array.prototype.forEach=function(e,t){var i,n;if(null==this)throw new TypeError(" this is null or not defined");var s=Object(this),o=s.length>>>0;if("function"!=typeof e)throw new TypeError(e+" is not a function");for(arguments.length>1&&(i=t),n=0;o>n;){var r;n in s&&(r=s[n],e.call(i,r,n,s)),n++}})}function o(){n(),s()}t.exports={applyPolyfills:o}},{}],10:[function(e,t,i){(function(i){var n=e("./helpers");t.exports=function(){function e(e){return t._NAMESPACE+"_"+e}function t(t){this.eventObject=n.addEventObject(this,e),this.linkedWindow=t,i.window.addEventListener&&i.window.addEventListener("message",function(e){if(e.source===this.linkedWindow){var t={};if("string"==typeof e.data&&void 0!==i.JSON)try{t=i.JSON.parse(e.data)}catch(n){}t.command&&this.eventObject.trigger(t.command,t.data)}}.bind(this))}return t.prototype.eventObject=null,t.prototype.linkedWindow=null,t.prototype.send=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n="*"),!this.linkedWindow||void 0===this.linkedWindow.postMessage||void 0===i.window.JSON)return!1;try{this.linkedWindow.postMessage(i.JSON.stringify({data:t,command:e}),n)}catch(s){}return!0},t.prototype.on=function(e,t,i){this.eventObject.on(e,t,i)},t.prototype.off=function(e,t,i){this.eventObject.off(e,t,i)},t._NAMESPACE="POST_MESSAGE",t}()}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./helpers":7}],11:[function(e,t,i){t.exports=''},{}],12:[function(e,t,i){t.exports=''},{}],13:[function(e,t,i){t.exports=e("sassify")(".xpaystation-widget-lightbox{position:fixed;top:0;left:0;bottom:0;right:0;width:100%;height:100%;-webkit-animation:xpaystation-widget-lightbox-fadein 0.15s;animation:xpaystation-widget-lightbox-fadein 0.15s}.xpaystation-widget-lightbox-overlay{position:absolute;top:0;left:0;bottom:0;right:0;z-index:1}.xpaystation-widget-lightbox-content{position:relative;top:0;left:0;z-index:3}.xpaystation-widget-lightbox-content__hidden{visibility:hidden;z-index:-1}.xpaystation-widget-lightbox-content-iframe{width:100%;height:100%;border:0;background:transparent}.xpaystation-widget-lightbox-spinner{position:absolute;top:50%;left:50%;display:none;z-index:2;pointer-events:none}.xpaystation-widget-lightbox-spinner .spinner-xsolla{width:56px;height:55px;margin-top:-28px;margin-left:-26px}.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-x,.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-s,.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-o,.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-l,.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-a{-webkit-animation:xpaystation-widget-lightbox-bouncedelay 1s infinite ease-in-out;-webkit-animation-fill-mode:both;animation:xpaystation-widget-lightbox-bouncedelay 1s infinite ease-in-out;animation-fill-mode:both}.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-x{-webkit-animation-delay:0s;animation-delay:0s}.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-s{-webkit-animation-delay:.2s;animation-delay:.2s}.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-o{-webkit-animation-delay:.4s;animation-delay:.4s}.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-l{-webkit-animation-delay:.6s;animation-delay:.6s}.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-a{-webkit-animation-delay:.8s;animation-delay:.8s}.xpaystation-widget-lightbox-spinner .spinner-round{margin-top:-23px;margin-left:-23px;-webkit-animation:xpaystation-widget-lightbox-spin 3s infinite linear;animation:xpaystation-widget-lightbox-spin 3s infinite linear}.xpaystation-widget-lightbox-spinner .spinner-custom{-webkit-animation:xpaystation-widget-lightbox-spin infinite linear;animation:xpaystation-widget-lightbox-spin infinite linear}@-webkit-keyframes xpaystation-widget-lightbox-bouncedelay{0%,80%,100%{opacity:0}40%{opacity:1}}@keyframes xpaystation-widget-lightbox-bouncedelay{0%,80%,100%{opacity:0}40%{opacity:1}}@-webkit-keyframes xpaystation-widget-lightbox-fadein{from{opacity:0}to{opacity:1}}@keyframes xpaystation-widget-lightbox-fadein{from{opacity:0}to{opacity:1}}@-webkit-keyframes xpaystation-widget-lightbox-spin{from{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}@keyframes xpaystation-widget-lightbox-spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}} /*# sourceMappingURL=data:application/json;base64,ewoJInZlcnNpb24iOiAzLAoJImZpbGUiOiAibGlnaHRib3guc2NzcyIsCgkic291cmNlcyI6IFsKCQkibGlnaHRib3guc2NzcyIKCV0sCgkic291cmNlc0NvbnRlbnQiOiBbCgkJIiRsaWdodGJveC1wcmVmaXg6ICd4cGF5c3RhdGlvbi13aWRnZXQtbGlnaHRib3gnO1xuJGxpZ2h0Ym94LWNsYXNzOiAnLicgKyAkbGlnaHRib3gtcHJlZml4O1xuXG4jeyRsaWdodGJveC1jbGFzc30ge1xuICBwb3NpdGlvbjogZml4ZWQ7XG4gIHRvcDogMDtcbiAgbGVmdDogMDtcbiAgYm90dG9tOiAwO1xuICByaWdodDogMDtcbiAgd2lkdGg6IDEwMCU7XG4gIGhlaWdodDogMTAwJTtcbiAgLXdlYmtpdC1hbmltYXRpb246ICN7JGxpZ2h0Ym94LXByZWZpeH0tZmFkZWluIC4xNXM7XG4gIGFuaW1hdGlvbjogI3skbGlnaHRib3gtcHJlZml4fS1mYWRlaW4gLjE1cztcbn1cblxuI3skbGlnaHRib3gtY2xhc3N9LW92ZXJsYXkge1xuICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gIHRvcDowO1xuICBsZWZ0OiAwO1xuICBib3R0b206IDA7XG4gIHJpZ2h0OiAwO1xuICB6LWluZGV4OiAxO1xufVxuXG4jeyRsaWdodGJveC1jbGFzc30tY29udGVudCB7XG4gIHB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0FBRyxFQUdwQixVQUFVLENBQVYsdUNBQVUsQ0FDUixBQUFBLEVBQUUsQ0FBRSxBQUFBLEdBQUcsQ0FBRSxBQUFBLElBQUksQ0FBRyxPQUFPLENBQUUsQ0FBRSxDQUMzQixBQUFBLEdBQUcsQ0FBRyxPQUFPLENBQUUsQ0FBRSxFQUduQixrQkFBa0IsQ0FBbEIsa0NBQWtCLENBQ2hCLEFBQUEsSUFBSSxDQUFHLE9BQU8sQ0FBRSxDQUFFLENBQ2xCLEFBQUEsRUFBRSxDQUFHLE9BQU8sQ0FBRSxDQUFFLEVBR2xCLFVBQVUsQ0FBVixrQ0FBVSxDQUNSLEFBQUEsSUFBSSxDQUFHLE9BQU8sQ0FBRSxDQUFFLENBQ2xCLEFBQUEsRUFBRSxDQUFHLE9BQU8sQ0FBRSxDQUFFLEVBR2xCLGtCQUFrQixDQUFsQixnQ0FBa0IsQ0FDaEIsQUFBQSxJQUFJLENBQUcsaUJBQWlCLENBQUUsWUFBTSxDQUNoQyxBQUFBLEVBQUUsQ0FBRyxpQkFBaUIsQ0FBRSxjQUFNLEVBR2hDLFVBQVUsQ0FBVixnQ0FBVSxDQUNSLEFBQUEsSUFBSSxDQUFHLFNBQVMsQ0FBRSxZQUFNLENBQ3hCLEFBQUEsRUFBRSxDQUFHLFNBQVMsQ0FBRSxjQUFNIiwKCSJuYW1lcyI6IFtdCn0= */"); +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.XPayStationWidget=e()}}(function(){var e;return function t(e,n,i){function s(r,a){if(!n[r]){if(!e[r]){var c="function"==typeof require&&require;if(!a&&c)return c(r,!0);if(o)return o(r,!0);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}var d=n[r]={exports:{}};e[r][0].call(d.exports,function(t){var n=e[r][1][t];return s(n?n:t)},d,d.exports,t,e,n,i)}return n[r].exports}for(var o="function"==typeof require&&require,r=0;ro;o++)i(e+"["+("object"==typeof s[o]&&s[o]?o:"")+"]",s[o]);else if("[object Object]"===String(s))for(a in s)i(e+"["+a+"]",s[a]);else n(e,s);else if(Array.isArray(s))for(o=0,r=s.length;r>o;o++)n(s[o].name,s[o].value);else for(a in s)i(a,s[a]);return t};return i("",e).join("&")}function a(e){return function(){e(arguments),e=function(){}}}function c(e,t){function n(e){return/ /.test(e)}var i=function(e){return e},t=t||i,s=[];return{trigger:function(e,n){var i=t(e);try{var s=new CustomEvent(i,{detail:n})}catch(o){var s=document.createEvent("CustomEvent");s.initCustomEvent(i,!0,!0,n)}document.dispatchEvent(s)}.bind(e),on:function(e,i,o){function r(e,n,i){var o=t(e);document.addEventListener(o,n,i),s.push({name:o,handle:n,options:i})}if(n(e)){var a=e.split(" ");a.forEach(function(e){r(e,i,o)})}else r(e,i,o)}.bind(e),off:function(e,i,o){function r(e,n,i){var o=t(e);document.removeEventListener(o,n,i),s=s.filter(function(e){return e.name!==o})}const a=!e&&!i&&!o;if(a)return void s.forEach(function(e){document.removeEventListener(e.name,e.handle,e.options)});if(n(e)){var c=e.split(" ");c.forEach(function(e){r(e,i,o)})}else r(e,i,o)}.bind(e)}}t.exports={addEventObject:c,isEmpty:i,uniq:s,zipObject:o,param:r,once:a}},{}],8:[function(e,t,n){(function(n){var i=e("./version"),s=e("./helpers"),o=e("./postmessage");t.exports=function(){function t(t){e("./styles/lightbox.scss"),this.eventObject=s.addEventObject(this,r),this.options=t?d:l,this.message=null}function r(e){return t._NAMESPACE+"_"+e}var a="xpaystation-widget-lightbox",c={zIndex:1e3,overlayOpacity:".6",overlayBackground:"#000000",contentBackground:"#ffffff",closeByKeyboard:!0,closeByClick:!0,modal:!1,spinner:"xsolla",spinnerColor:null,spinnerUrl:null,spinnerRotationPeriod:0},l=Object.assign({},c,{width:null,height:"100%",contentMargin:"10px"}),d=Object.assign({},c,{width:"100%",height:"100%",contentMargin:"0px"}),p={xsolla:e("./spinners/xsolla.svg"),round:e("./spinners/round.svg"),none:" "},u={height:500,width:600},g=r("keyup"),h=r("resize"),f=function(e){var t=document.createEvent("Event");t.initEvent(g,!1,!0),t.sourceEvent=e,document.body.dispatchEvent(t)},Q=function(e){27==e.sourceEvent.which&&this.closeFrame()},x=function(){var e=document.createEvent("Event");e.initEvent(h,!1,!0),window.dispatchEvent(e)};return t.prototype.triggerEvent=function(){this.eventObject.trigger.apply(this.eventObject,arguments)},t.prototype.measureScrollbar=function(){var e=document.createElement("div");e.classList.add("scrollbar-measure"),e.setAttribute("style","position: absolute;top: -9999pxwidth: 50pxheight: 50pxoverflow: scroll"),document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t},t.prototype.openFrame=function(e,t){function r(e){var t="string"==typeof e&&String(parseFloat(e)).length===e.length;return t?e+"px":"number"==typeof e?e+"px":e}function c(e){var t=e.offsetWidth,n=getComputedStyle(e);return t+=parseInt(n.marginLeft)+parseInt(n.marginRight)}function l(e){var t=e.offsetHeight,n=getComputedStyle(e);return t+=parseInt(n.marginTop)+parseInt(n.marginBottom)}this.options=Object.assign({},this.options,t);var d=Q.bind(this);t=this.options;var y="custom"===t.spinner&&t.spinnerUrl?'':p[t.spinner]||Object.values(p)[0],m=function(e){var t=document.createElement("div");t.className=e.prefix;var n=document.createElement("div");n.className=e.prefix+"-overlay";var i=document.createElement("div");i.className=e.prefix+"-content "+e.prefix+"-content__hidden";var s=document.createElement("iframe");s.className=e.prefix+"-content-iframe",s.src=e.url,s.frameBorder="0",s.allowFullscreen=!0;var o=document.createElement("div");return o.className=e.prefix+"-spinner",o.innerHTML=e.spinner,i.appendChild(s),t.appendChild(n),t.appendChild(i),t.appendChild(o),t},b=n.document.body,F=m({prefix:a,url:e,spinner:y}),v=F.querySelector("."+a+"-overlay"),U=F.querySelector("."+a+"-content"),B=U.querySelector("."+a+"-content-iframe"),E=F.querySelector("."+a+"-spinner"),w={width:r(u.width),height:r(u.height)};if(F.style.zIndex=t.zIndex,v.style.opacity=t.overlayOpacity,v.style.backgroundColor=t.overlayBackground,U.style.backgroundColor=t.contentBackground,U.style.margin=r(t.contentMargin),U.style.width=t.width?r(t.width):"auto",U.style.height=t.height?r(t.height):"auto",t.spinnerColor&&(E.querySelector("path").style.fill=t.spinnerColor),"custom"===t.spinner){var L=E.querySelector(".spinner-custom");L.style["-webkit-animation-duration"]=t.spinnerRotationPeriod+"s;",L.style["animation-duration"]=t.spinnerRotationPeriod+"s;"}t.closeByClick&&v.addEventListener("click",function(){this.closeFrame()}.bind(this)),b.appendChild(F),t.closeByKeyboard&&(b.addEventListener(g,d),b.addEventListener("keyup",f,!1));var C=s.once(function(){R(t),U.classList.remove(a+"-content__hidden"),this.triggerEvent("load")}.bind(this)),I=function(){var e=t.width?t.width:w.width,n=t.height?t.height:w.height;U.style.left="0px",U.style.top="0px",U.style.borderRadius="8px",U.style.width=r(e),U.style.height=r(n);var i=F.clientWidth,s=F.clientHeight,o=c(U),a=l(U),d=o-U.offsetWidth,p=a-U.offsetHeight,u=i-o,g=s-a;0>u?U.style.width=i-d+"px":U.style.left=Math.round(u/2)+"px",0>g?U.style.height=s-p+"px":U.style.top=Math.round(g/2)+"px"};t.width&&t.height&&(I=s.once(I.bind(this)));var N,W,S=function(){N=s.zipObject(["overflow","paddingRight"].map(function(e){return[e,getComputedStyle(b)[e]]}));var e=parseInt(getComputedStyle(b).paddingRight||0,10);b.style.overflow="hidden",b.style.paddingRight=r(e+this.measureScrollbar())}.bind(this),D=function(){N&&Object.keys(N).forEach(function(e){b.style[e]=N[e]})},G=function(){E.style.display="block"},R=function(){E.style.display="none"};B.addEventListener("load",function k(e){var i=t.width&&t.height?1e3:t.resizeTimeout||3e4;W=n.setTimeout(function(){I(),C()},i),B.removeEventListener("load",k)});var O=B.contentWindow||B;this.message=new o(O),t.width&&t.height?this.message.on("dimensions",function(){I(),C()}):this.message.on("dimensions",function(e){var t=e.detail;t.dimensions&&(w=s.zipObject(["width","height"].map(function(e){return[e,Math.max(u[e]||0,t.dimensions[e]||0)+"px"]})),I()),C()}),this.message.on("widget-detection",function(){this.message.send("widget-detected",{version:i,lightBoxOptions:t})}.bind(this)),this.message.on("widget-close",function(){this.closeFrame()}.bind(this)),this.message.on("close",function(){this.closeFrame()}.bind(this)),this.message.on("status",function(e){this.triggerEvent("status",e.detail)}.bind(this)),this.message.on("user-country",function(e){this.triggerEvent("user-country",e.detail)}.bind(this)),this.message.on("fcp",function(e){this.triggerEvent("fcp",e.detail)}.bind(this)),this.message.on("error",function(e){this.triggerEvent("error",e.detail)}.bind(this)),window.addEventListener(h,I),window.addEventListener("resize",x);var X=this;this.on("close",function A(e){X.message.off(),b.removeEventListener(g,d),b.removeEventListener("keyup",f),window.removeEventListener("resize",x),window.removeEventListener(h,I),F.parentNode.removeChild(F),D(),X.off("close",A)}),G(),S(),this.triggerEvent("open")},t.prototype.closeFrame=function(){this.options.modal||this.triggerEvent("close")},t.prototype.close=function(){this.closeFrame()},t.prototype.on=function(){this.eventObject.on.apply(this.eventObject,arguments)},t.prototype.off=function(){this.eventObject.off.apply(this.eventObject,arguments)},t.prototype.getPostMessage=function(){return this.message},t._NAMESPACE=".xpaystation-widget-lightbox",t}()}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./helpers":7,"./postmessage":10,"./spinners/round.svg":11,"./spinners/xsolla.svg":12,"./styles/lightbox.scss":13,"./version":14}],9:[function(e,t,n){function i(){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){"use strict";if(null==e)throw new TypeError("Cannot convert first argument to object");for(var n=Object(e),i=1;ir;r++){var c=o[r],l=Object.getOwnPropertyDescriptor(s,c);void 0!==l&&l.enumerable&&(n[c]=s[c])}}return n}})}function s(){Array.prototype.forEach||(Array.prototype.forEach=function(e,t){var n,i;if(null==this)throw new TypeError(" this is null or not defined");var s=Object(this),o=s.length>>>0;if("function"!=typeof e)throw new TypeError(e+" is not a function");for(arguments.length>1&&(n=t),i=0;o>i;){var r;i in s&&(r=s[i],e.call(n,r,i,s)),i++}})}function o(){i(),s()}t.exports={applyPolyfills:o}},{}],10:[function(e,t,n){(function(n){var i=e("./helpers");t.exports=function(){function e(e){return t._NAMESPACE+"_"+e}function t(t){this.eventObject=i.addEventObject(this,e),this.linkedWindow=t,n.window.addEventListener&&n.window.addEventListener("message",function(e){if(e.source===this.linkedWindow){var t={};if("string"==typeof e.data&&void 0!==n.JSON)try{t=n.JSON.parse(e.data)}catch(i){}t.command&&this.eventObject.trigger(t.command,t.data)}}.bind(this))}return t.prototype.eventObject=null,t.prototype.linkedWindow=null,t.prototype.send=function(e,t,i){if(void 0===t&&(t={}),void 0===i&&(i="*"),!this.linkedWindow||void 0===this.linkedWindow.postMessage||void 0===n.window.JSON)return!1;try{this.linkedWindow.postMessage(n.JSON.stringify({data:t,command:e}),i)}catch(s){}return!0},t.prototype.on=function(e,t,n){this.eventObject.on(e,t,n)},t.prototype.off=function(e,t,n){this.eventObject.off(e,t,n)},t._NAMESPACE="POST_MESSAGE",t}()}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./helpers":7}],11:[function(e,t,n){t.exports=''},{}],12:[function(e,t,n){t.exports=''},{}],13:[function(e,t,n){t.exports=e("sassify")(".xpaystation-widget-lightbox{position:fixed;top:0;left:0;bottom:0;right:0;width:100%;height:100%;-webkit-animation:xpaystation-widget-lightbox-fadein 0.15s;animation:xpaystation-widget-lightbox-fadein 0.15s}.xpaystation-widget-lightbox-overlay{position:absolute;top:0;left:0;bottom:0;right:0;z-index:1}.xpaystation-widget-lightbox-content{position:relative;top:0;left:0;z-index:3}.xpaystation-widget-lightbox-content__hidden{visibility:hidden;z-index:-1}.xpaystation-widget-lightbox-content-iframe{width:100%;height:100%;border:0;background:transparent}.xpaystation-widget-lightbox-spinner{position:absolute;top:50%;left:50%;display:none;z-index:2;pointer-events:none}.xpaystation-widget-lightbox-spinner .spinner-xsolla{width:56px;height:55px;margin-top:-28px;margin-left:-26px}.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-x,.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-s,.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-o,.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-l,.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-a{-webkit-animation:xpaystation-widget-lightbox-bouncedelay 1s infinite ease-in-out;-webkit-animation-fill-mode:both;animation:xpaystation-widget-lightbox-bouncedelay 1s infinite ease-in-out;animation-fill-mode:both}.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-x{-webkit-animation-delay:0s;animation-delay:0s}.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-s{-webkit-animation-delay:.2s;animation-delay:.2s}.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-o{-webkit-animation-delay:.4s;animation-delay:.4s}.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-l{-webkit-animation-delay:.6s;animation-delay:.6s}.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-a{-webkit-animation-delay:.8s;animation-delay:.8s}.xpaystation-widget-lightbox-spinner .spinner-round{margin-top:-23px;margin-left:-23px;-webkit-animation:xpaystation-widget-lightbox-spin 3s infinite linear;animation:xpaystation-widget-lightbox-spin 3s infinite linear}.xpaystation-widget-lightbox-spinner .spinner-custom{-webkit-animation:xpaystation-widget-lightbox-spin infinite linear;animation:xpaystation-widget-lightbox-spin infinite linear}@-webkit-keyframes xpaystation-widget-lightbox-bouncedelay{0%,80%,100%{opacity:0}40%{opacity:1}}@keyframes xpaystation-widget-lightbox-bouncedelay{0%,80%,100%{opacity:0}40%{opacity:1}}@-webkit-keyframes xpaystation-widget-lightbox-fadein{from{opacity:0}to{opacity:1}}@keyframes xpaystation-widget-lightbox-fadein{from{opacity:0}to{opacity:1}}@-webkit-keyframes xpaystation-widget-lightbox-spin{from{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}@keyframes xpaystation-widget-lightbox-spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}} /*# sourceMappingURL=data:application/json;base64,ewoJInZlcnNpb24iOiAzLAoJImZpbGUiOiAibGlnaHRib3guc2NzcyIsCgkic291cmNlcyI6IFsKCQkibGlnaHRib3guc2NzcyIKCV0sCgkic291cmNlc0NvbnRlbnQiOiBbCgkJIiRsaWdodGJveC1wcmVmaXg6ICd4cGF5c3RhdGlvbi13aWRnZXQtbGlnaHRib3gnO1xyXG4kbGlnaHRib3gtY2xhc3M6ICcuJyArICRsaWdodGJveC1wcmVmaXg7XHJcblxyXG4jeyRsaWdodGJveC1jbGFzc30ge1xyXG4gIHBvc2l0aW9uOiBmaXhlZDtcclxuICB0b3A6IDA7XHJcbiAgbGVmdDogMDtcclxuICBib3R0b206IDA7XHJcbiAgcmlnaHQ6IDA7XHJcbiAgd2lkdGg6IDEwMCU7XHJcbiAgaGVpZ2h0OiAxMDAlO1xyXG4gIC13ZWJraXQtYW5pbWF0aW9uOiAjeyRsaWdodGJveC1wcmVmaXh9LWZhZGVpbiAuMTVzO1xyXG4gIGFuaW1hdGlvbjogI3skbGlnaHRib3gtcHJlZml4fS1mYWRlaW4gLjE1cztcclxufVxyXG5cclxuI3skbGlnaHRib3gtY2xhc3N9LW92ZXJsYXkge1xyXG4gIHBvc2l0aW9uOiBhYnNvbHV0ZTtcclxuICB0b3A6MDtcclxuICBsZWZ0OiAwO1xyXG4gIGJvdHRvbTogMDtcclxuICByaWdodDogMDtcclxuICB6LWluZGV4OiAxO1xyXG59XHJcblxyXG4jeyRsaWdodGJveC1jbGFzc30tY29udGVudCB7XHJcbiAgcG9zaXRpb246IHJlbGF0aXZlO1xyXG4gIHRvcDogMDtcclxuICBsZWZ0OiAwO1xyXG4gIHotaW5kZXg6IDM7XHJ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HSCxrQkFBa0IsQ0FBbEIsdUNBQWtCLENBQ2hCLEFBQUEsRUFBRSxDQUFFLEFBQUEsR0FBRyxDQUFFLEFBQUEsSUFBSSxDQUFHLE9BQU8sQ0FBRSxDQUFFLENBQzNCLEFBQUEsR0FBRyxDQUFHLE9BQU8sQ0FBRSxDQUFHLEVBR3BCLFVBQVUsQ0FBVix1Q0FBVSxDQUNSLEFBQUEsRUFBRSxDQUFFLEFBQUEsR0FBRyxDQUFFLEFBQUEsSUFBSSxDQUFHLE9BQU8sQ0FBRSxDQUFFLENBQzNCLEFBQUEsR0FBRyxDQUFHLE9BQU8sQ0FBRSxDQUFFLEVBR25CLGtCQUFrQixDQUFsQixrQ0FBa0IsQ0FDaEIsQUFBQSxJQUFJLENBQUcsT0FBTyxDQUFFLENBQUUsQ0FDbEIsQUFBQSxFQUFFLENBQUcsT0FBTyxDQUFFLENBQUUsRUFHbEIsVUFBVSxDQUFWLGtDQUFVLENBQ1IsQUFBQSxJQUFJLENBQUcsT0FBTyxDQUFFLENBQUUsQ0FDbEIsQUFBQSxFQUFFLENBQUcsT0FBTyxDQUFFLENBQUUsRUFHbEIsa0JBQWtCLENBQWxCLGdDQUFrQixDQUNoQixBQUFBLElBQUksQ0FBRyxpQkFBaUIsQ0FBRSxZQUFNLENBQ2hDLEFBQUEsRUFBRSxDQUFHLGlCQUFpQixDQUFFLGNBQU0sRUFHaEMsVUFBVSxDQUFWLGdDQUFVLENBQ1IsQUFBQSxJQUFJLENBQUcsU0FBUyxDQUFFLFlBQU0sQ0FDeEIsQUFBQSxFQUFFLENBQUcsU0FBUyxDQUFFLGNBQU0iLAoJIm5hbWVzIjogW10KfQ== */"); -},{sassify:2}],14:[function(e,t,i){t.exports="1.2.10"},{}],bowser:[function(t,i,n){!function(t,n,s){"undefined"!=typeof i&&i.exports?i.exports=s():"function"==typeof e&&e.amd?e(n,s):t[n]=s()}(this,"bowser",function(){function e(e){function t(t){var i=e.match(t);return i&&i.length>1&&i[1]||""}function i(t){var i=e.match(t);return i&&i.length>1&&i[2]||""}function s(e){switch(e){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return void 0}}var o,a=t(/(ipod|iphone|ipad)/i).toLowerCase(),l=/like android/i.test(e),c=!l&&/android/i.test(e),d=/nexus\s*[0-6]\s*/i.test(e),p=!d&&/nexus\s*[0-9]+/i.test(e),u=/CrOS/.test(e),g=/silk/i.test(e),h=/sailfish/i.test(e),f=/tizen/i.test(e),Q=/(web|hpw)(o|0)s/i.test(e),x=/windows phone/i.test(e),m=(/SamsungBrowser/i.test(e),!x&&/windows/i.test(e)),B=!a&&!g&&/macintosh/i.test(e),b=!c&&!h&&!f&&!Q&&/linux/i.test(e),v=i(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),y=t(/version\/(\d+(\.\d+)?)/i),F=/tablet/i.test(e)&&!/tablet pc/i.test(e),U=!F&&/[^-]mobi/i.test(e),E=/xbox/i.test(e);/opera/i.test(e)?o={name:"Opera",opera:r,version:y||t(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(e)?o={name:"Opera",opera:r,version:t(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||y}:/SamsungBrowser/i.test(e)?o={name:"Samsung Internet for Android",samsungBrowser:r,version:y||t(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(e)?o={name:"NAVER Whale browser",whale:r,version:t(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(e)?o={name:"MZ Browser",mzbrowser:r,version:t(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(e)?o={name:"Opera Coast",coast:r,version:y||t(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(e)?o={name:"Focus",focus:r,version:t(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(e)?o={name:"Yandex Browser",yandexbrowser:r,version:y||t(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(e)?o={name:"UC Browser",ucbrowser:r,version:t(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(e)?o={name:"Maxthon",maxthon:r,version:t(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(e)?o={name:"Epiphany",epiphany:r,version:t(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(e)?o={name:"Puffin",puffin:r,version:t(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(e)?o={name:"Sleipnir",sleipnir:r,version:t(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(e)?o={name:"K-Meleon",kMeleon:r,version:t(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:x?(o={name:"Windows Phone",osname:"Windows Phone",windowsphone:r},v?(o.msedge=r,o.version=v):(o.msie=r,o.version=t(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(e)?o={name:"Internet Explorer",msie:r,version:t(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:u?o={name:"Chrome",osname:"Chrome OS",chromeos:r,chromeBook:r,chrome:r,version:t(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(e)?o={name:"Microsoft Edge",msedge:r,version:v}:/vivaldi/i.test(e)?o={name:"Vivaldi",vivaldi:r,version:t(/vivaldi\/(\d+(\.\d+)?)/i)||y}:h?o={name:"Sailfish",osname:"Sailfish OS",sailfish:r,version:t(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(e)?o={name:"SeaMonkey",seamonkey:r,version:t(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(e)?(o={name:"Firefox",firefox:r,version:t(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(e)&&(o.firefoxos=r,o.osname="Firefox OS")):g?o={name:"Amazon Silk",silk:r,version:t(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(e)?o={name:"PhantomJS",phantom:r,version:t(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(e)?o={name:"SlimerJS",slimer:r,version:t(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(e)||/rim\stablet/i.test(e)?o={name:"BlackBerry",osname:"BlackBerry OS",blackberry:r,version:y||t(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:Q?(o={name:"WebOS",osname:"WebOS",webos:r,version:y||t(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(e)&&(o.touchpad=r)):/bada/i.test(e)?o={name:"Bada",osname:"Bada",bada:r,version:t(/dolfin\/(\d+(\.\d+)?)/i)}:f?o={name:"Tizen",osname:"Tizen",tizen:r,version:t(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||y}:/qupzilla/i.test(e)?o={name:"QupZilla",qupzilla:r,version:t(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||y}:/chromium/i.test(e)?o={name:"Chromium",chromium:r,version:t(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||y}:/chrome|crios|crmo/i.test(e)?o={name:"Chrome",chrome:r,version:t(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:c?o={name:"Android",version:y}:/safari|applewebkit/i.test(e)?(o={name:"Safari",safari:r},y&&(o.version=y)):a?(o={name:"iphone"==a?"iPhone":"ipad"==a?"iPad":"iPod"},y&&(o.version=y)):o=/googlebot/i.test(e)?{name:"Googlebot",googlebot:r,version:t(/googlebot\/(\d+(\.\d+))/i)||y}:{name:t(/^(.*)\/(.*) /),version:i(/^(.*)\/(.*) /)},!o.msedge&&/(apple)?webkit/i.test(e)?(/(apple)?webkit\/537\.36/i.test(e)?(o.name=o.name||"Blink",o.blink=r):(o.name=o.name||"Webkit",o.webkit=r),!o.version&&y&&(o.version=y)):!o.opera&&/gecko\//i.test(e)&&(o.name=o.name||"Gecko",o.gecko=r,o.version=o.version||t(/gecko\/(\d+(\.\d+)?)/i)),o.windowsphone||!c&&!o.silk?!o.windowsphone&&a?(o[a]=r,o.ios=r,o.osname="iOS"):B?(o.mac=r,o.osname="macOS"):E?(o.xbox=r,o.osname="Xbox"):m?(o.windows=r,o.osname="Windows"):b&&(o.linux=r,o.osname="Linux"):(o.android=r,o.osname="Android");var w="";o.windows?w=s(t(/Windows ((NT|XP)( \d\d?.\d)?)/i)):o.windowsphone?w=t(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):o.mac?(w=t(/Mac OS X (\d+([_\.\s]\d+)*)/i),w=w.replace(/[_\s]/g,".")):a?(w=t(/os (\d+([_\s]\d+)*) like mac os x/i),w=w.replace(/[_\s]/g,".")):c?w=t(/android[ \/-](\d+(\.\d+)*)/i):o.webos?w=t(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):o.blackberry?w=t(/rim\stablet\sos\s(\d+(\.\d+)*)/i):o.bada?w=t(/bada\/(\d+(\.\d+)*)/i):o.tizen&&(w=t(/tizen[\/\s](\d+(\.\d+)*)/i)),w&&(o.osversion=w);var L=!o.windows&&w.split(".")[0];return F||p||"ipad"==a||c&&(3==L||L>=4&&!U)||o.silk?o.tablet=r:(U||"iphone"==a||"ipod"==a||c||d||o.blackberry||o.webos||o.bada)&&(o.mobile=r),o.msedge||o.msie&&o.version>=10||o.yandexbrowser&&o.version>=15||o.vivaldi&&o.version>=1||o.chrome&&o.version>=20||o.samsungBrowser&&o.version>=4||o.whale&&1===n([o.version,"1.0"])||o.mzbrowser&&1===n([o.version,"6.0"])||o.focus&&1===n([o.version,"1.0"])||o.firefox&&o.version>=20||o.safari&&o.version>=6||o.opera&&o.version>=10||o.ios&&o.osversion&&o.osversion.split(".")[0]>=6||o.blackberry&&o.version>=10.1||o.chromium&&o.version>=20?o.a=r:o.msie&&o.version<10||o.chrome&&o.version<20||o.firefox&&o.version<20||o.safari&&o.version<6||o.opera&&o.version<10||o.ios&&o.osversion&&o.osversion.split(".")[0]<6||o.chromium&&o.version<20?o.c=r:o.x=r,o}function t(e){return e.split(".").length}function i(e,t){var i,n=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(i=0;i=0;){if(s[0][n]>s[1][n])return 1;if(s[0][n]!==s[1][n])return-1;if(0===n)return 0}}function s(t,i,s){var o=a;"string"==typeof i&&(s=i,i=void 0),void 0===i&&(i=!1),s&&(o=e(s));var r=""+o.version;for(var l in t)if(t.hasOwnProperty(l)&&o[l]){if("string"!=typeof t[l])throw new Error("Browser version in the minVersion map should be a string: "+l+": "+String(t));return n([r,t[l]])<0}return i}function o(e,t,i){return!s(e,t,i)}var r=!0,a=e("undefined"!=typeof navigator?navigator.userAgent||"":"");return a.test=function(e){for(var t=0;t1&&n[1]||""}function n(t){var n=e.match(t);return n&&n.length>1&&n[2]||""}function s(e){switch(e){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return void 0}}var o,a=t(/(ipod|iphone|ipad)/i).toLowerCase(),c=/like android/i.test(e),l=!c&&/android/i.test(e),d=/nexus\s*[0-6]\s*/i.test(e),p=!d&&/nexus\s*[0-9]+/i.test(e),u=/CrOS/.test(e),g=/silk/i.test(e),h=/sailfish/i.test(e),f=/tizen/i.test(e),Q=/(web|hpw)(o|0)s/i.test(e),x=/windows phone/i.test(e),y=(/SamsungBrowser/i.test(e),!x&&/windows/i.test(e)),m=!a&&!g&&/macintosh/i.test(e),b=!l&&!h&&!f&&!Q&&/linux/i.test(e),F=n(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),v=t(/version\/(\d+(\.\d+)?)/i),U=/tablet/i.test(e)&&!/tablet pc/i.test(e),B=!U&&/[^-]mobi/i.test(e),E=/xbox/i.test(e);/opera/i.test(e)?o={name:"Opera",opera:r,version:v||t(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(e)?o={name:"Opera",opera:r,version:t(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||v}:/SamsungBrowser/i.test(e)?o={name:"Samsung Internet for Android",samsungBrowser:r,version:v||t(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(e)?o={name:"NAVER Whale browser",whale:r,version:t(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(e)?o={name:"MZ Browser",mzbrowser:r,version:t(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(e)?o={name:"Opera Coast",coast:r,version:v||t(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(e)?o={name:"Focus",focus:r,version:t(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(e)?o={name:"Yandex Browser",yandexbrowser:r,version:v||t(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(e)?o={name:"UC Browser",ucbrowser:r,version:t(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(e)?o={name:"Maxthon",maxthon:r,version:t(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(e)?o={name:"Epiphany",epiphany:r,version:t(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(e)?o={name:"Puffin",puffin:r,version:t(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(e)?o={name:"Sleipnir",sleipnir:r,version:t(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(e)?o={name:"K-Meleon",kMeleon:r,version:t(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:x?(o={name:"Windows Phone",osname:"Windows Phone",windowsphone:r},F?(o.msedge=r,o.version=F):(o.msie=r,o.version=t(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(e)?o={name:"Internet Explorer",msie:r,version:t(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:u?o={name:"Chrome",osname:"Chrome OS",chromeos:r,chromeBook:r,chrome:r,version:t(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(e)?o={name:"Microsoft Edge",msedge:r,version:F}:/vivaldi/i.test(e)?o={name:"Vivaldi",vivaldi:r,version:t(/vivaldi\/(\d+(\.\d+)?)/i)||v}:h?o={name:"Sailfish",osname:"Sailfish OS",sailfish:r,version:t(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(e)?o={name:"SeaMonkey",seamonkey:r,version:t(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(e)?(o={name:"Firefox",firefox:r,version:t(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(e)&&(o.firefoxos=r,o.osname="Firefox OS")):g?o={name:"Amazon Silk",silk:r,version:t(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(e)?o={name:"PhantomJS",phantom:r,version:t(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(e)?o={name:"SlimerJS",slimer:r,version:t(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(e)||/rim\stablet/i.test(e)?o={name:"BlackBerry",osname:"BlackBerry OS",blackberry:r,version:v||t(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:Q?(o={name:"WebOS",osname:"WebOS",webos:r,version:v||t(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(e)&&(o.touchpad=r)):/bada/i.test(e)?o={name:"Bada",osname:"Bada",bada:r,version:t(/dolfin\/(\d+(\.\d+)?)/i)}:f?o={name:"Tizen",osname:"Tizen",tizen:r,version:t(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||v}:/qupzilla/i.test(e)?o={name:"QupZilla",qupzilla:r,version:t(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||v}:/chromium/i.test(e)?o={name:"Chromium",chromium:r,version:t(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||v}:/chrome|crios|crmo/i.test(e)?o={name:"Chrome",chrome:r,version:t(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:l?o={name:"Android",version:v}:/safari|applewebkit/i.test(e)?(o={name:"Safari",safari:r},v&&(o.version=v)):a?(o={name:"iphone"==a?"iPhone":"ipad"==a?"iPad":"iPod"},v&&(o.version=v)):o=/googlebot/i.test(e)?{name:"Googlebot",googlebot:r,version:t(/googlebot\/(\d+(\.\d+))/i)||v}:{name:t(/^(.*)\/(.*) /),version:n(/^(.*)\/(.*) /)},!o.msedge&&/(apple)?webkit/i.test(e)?(/(apple)?webkit\/537\.36/i.test(e)?(o.name=o.name||"Blink",o.blink=r):(o.name=o.name||"Webkit",o.webkit=r),!o.version&&v&&(o.version=v)):!o.opera&&/gecko\//i.test(e)&&(o.name=o.name||"Gecko",o.gecko=r,o.version=o.version||t(/gecko\/(\d+(\.\d+)?)/i)),o.windowsphone||!l&&!o.silk?!o.windowsphone&&a?(o[a]=r,o.ios=r,o.osname="iOS"):m?(o.mac=r,o.osname="macOS"):E?(o.xbox=r,o.osname="Xbox"):y?(o.windows=r,o.osname="Windows"):b&&(o.linux=r,o.osname="Linux"):(o.android=r,o.osname="Android");var w="";o.windows?w=s(t(/Windows ((NT|XP)( \d\d?.\d)?)/i)):o.windowsphone?w=t(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):o.mac?(w=t(/Mac OS X (\d+([_\.\s]\d+)*)/i),w=w.replace(/[_\s]/g,".")):a?(w=t(/os (\d+([_\s]\d+)*) like mac os x/i),w=w.replace(/[_\s]/g,".")):l?w=t(/android[ \/-](\d+(\.\d+)*)/i):o.webos?w=t(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):o.blackberry?w=t(/rim\stablet\sos\s(\d+(\.\d+)*)/i):o.bada?w=t(/bada\/(\d+(\.\d+)*)/i):o.tizen&&(w=t(/tizen[\/\s](\d+(\.\d+)*)/i)),w&&(o.osversion=w);var L=!o.windows&&w.split(".")[0];return U||p||"ipad"==a||l&&(3==L||L>=4&&!B)||o.silk?o.tablet=r:(B||"iphone"==a||"ipod"==a||l||d||o.blackberry||o.webos||o.bada)&&(o.mobile=r),o.msedge||o.msie&&o.version>=10||o.yandexbrowser&&o.version>=15||o.vivaldi&&o.version>=1||o.chrome&&o.version>=20||o.samsungBrowser&&o.version>=4||o.whale&&1===i([o.version,"1.0"])||o.mzbrowser&&1===i([o.version,"6.0"])||o.focus&&1===i([o.version,"1.0"])||o.firefox&&o.version>=20||o.safari&&o.version>=6||o.opera&&o.version>=10||o.ios&&o.osversion&&o.osversion.split(".")[0]>=6||o.blackberry&&o.version>=10.1||o.chromium&&o.version>=20?o.a=r:o.msie&&o.version<10||o.chrome&&o.version<20||o.firefox&&o.version<20||o.safari&&o.version<6||o.opera&&o.version<10||o.ios&&o.osversion&&o.osversion.split(".")[0]<6||o.chromium&&o.version<20?o.c=r:o.x=r,o}function t(e){return e.split(".").length}function n(e,t){var n,i=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n=0;){if(s[0][i]>s[1][i])return 1;if(s[0][i]!==s[1][i])return-1;if(0===i)return 0}}function s(t,n,s){var o=a;"string"==typeof n&&(s=n,n=void 0),void 0===n&&(n=!1),s&&(o=e(s));var r=""+o.version;for(var c in t)if(t.hasOwnProperty(c)&&o[c]){if("string"!=typeof t[c])throw new Error("Browser version in the minVersion map should be a string: "+c+": "+String(t));return i([r,t[c]])<0}return n}function o(e,t,n){return!s(e,t,n)}var r=!0,a=e("undefined"!=typeof navigator?navigator.userAgent||"":"");return a.test=function(e){for(var t=0;t' : SPINNERS[options.spinner] || Object.values(SPINNERS)[0];\n\n var template = function (settings) {\n var host = document.createElement('div');\n host.className = settings.prefix;\n\n var overlay = document.createElement('div');\n overlay.className = settings.prefix + '-overlay';\n\n var content = document.createElement('div');\n content.className = settings.prefix + '-content' + ' ' + settings.prefix + '-content__hidden';\n\n var iframe = document.createElement('iframe');\n iframe.className = settings.prefix + '-content-iframe';\n iframe.src = settings.url;\n iframe.frameBorder = '0';\n iframe.allowFullscreen = true;\n\n var spinner = document.createElement('div');\n spinner.className = settings.prefix + '-spinner';\n spinner.innerHTML = settings.spinner;\n\n content.appendChild(iframe);\n\n host.appendChild(overlay);\n host.appendChild(content);\n host.appendChild(spinner);\n\n return host;\n };\n\n var bodyElement = global.document.body;\n var lightBoxElement = template({\n prefix: CLASS_PREFIX,\n url: url,\n spinner: spinner\n });\n var lightBoxOverlayElement = lightBoxElement.querySelector('.' + CLASS_PREFIX + '-overlay');\n var lightBoxContentElement = lightBoxElement.querySelector('.' + CLASS_PREFIX + '-content');\n var lightBoxIframeElement = lightBoxContentElement.querySelector('.' + CLASS_PREFIX + '-content-iframe');\n var lightBoxSpinnerElement = lightBoxElement.querySelector('.' + CLASS_PREFIX + '-spinner');\n\n var psDimensions = {\n width: withDefaultPXUnit(MIN_PS_DIMENSIONS.width),\n height: withDefaultPXUnit(MIN_PS_DIMENSIONS.height)\n };\n\n function withDefaultPXUnit(value) {\n var isStringWithoutUnit = typeof value === 'string' && String(parseFloat(value)).length === value.length;\n if (isStringWithoutUnit) {\n return value + 'px';\n }\n return typeof value === 'number' ? value + 'px' : value\n }\n\n lightBoxElement.style.zIndex = options.zIndex;\n\n lightBoxOverlayElement.style.opacity = options.overlayOpacity;\n lightBoxOverlayElement.style.backgroundColor = options.overlayBackground;\n\n lightBoxContentElement.style.backgroundColor = options.contentBackground;\n lightBoxContentElement.style.margin = withDefaultPXUnit(options.contentMargin);\n lightBoxContentElement.style.width = options.width ? withDefaultPXUnit(options.width) : 'auto';\n lightBoxContentElement.style.height = options.height ? withDefaultPXUnit(options.height) : 'auto';\n\n if (options.spinnerColor) {\n lightBoxSpinnerElement.querySelector('path').style.fill = options.spinnerColor;\n }\n\n if (options.spinner === 'custom') {\n var spinnerCustom = lightBoxSpinnerElement.querySelector('.spinner-custom');\n spinnerCustom.style['-webkit-animation-duration'] = options.spinnerRotationPeriod + 's;';\n spinnerCustom.style['animation-duration'] = options.spinnerRotationPeriod + 's;';\n }\n\n if (options.closeByClick) {\n lightBoxOverlayElement.addEventListener('click', (function () {\n this.closeFrame();\n }).bind(this));\n }\n\n bodyElement.appendChild(lightBoxElement);\n\n if (options.closeByKeyboard) {\n\n bodyElement.addEventListener(handleKeyupEventName, HandleBoundSpecificKeyup);\n\n bodyElement.addEventListener('keyup', handleGlobalKeyup, false);\n }\n\n var showContent = Helpers.once((function () {\n hideSpinner(options);\n lightBoxContentElement.classList.remove(CLASS_PREFIX + '-content__hidden');\n this.triggerEvent('load');\n }).bind(this));\n\n var lightBoxResize = function () {\n var width = options.width ? options.width : psDimensions.width;\n var height = options.height ? options.height : psDimensions.height;\n\n lightBoxContentElement.style.left = '0px';\n lightBoxContentElement.style.top = '0px';\n lightBoxContentElement.style.borderRadius = '8px';\n lightBoxContentElement.style.width = withDefaultPXUnit(width);\n lightBoxContentElement.style.height = withDefaultPXUnit(height);\n\n var containerWidth = lightBoxElement.clientWidth,\n containerHeight = lightBoxElement.clientHeight;\n\n var contentWidth = outerWidth(lightBoxContentElement),\n contentHeight = outerHeight(lightBoxContentElement);\n\n var horMargin = contentWidth - lightBoxContentElement.offsetWidth,\n vertMargin = contentHeight - lightBoxContentElement.offsetHeight;\n\n var horDiff = containerWidth - contentWidth,\n vertDiff = containerHeight - contentHeight;\n\n if (horDiff < 0) {\n lightBoxContentElement.style.width = containerWidth - horMargin + 'px';\n } else {\n lightBoxContentElement.style.left = Math.round(horDiff / 2) + 'px';\n }\n\n if (vertDiff < 0) {\n lightBoxContentElement.style.height = containerHeight - vertMargin + 'px';\n } else {\n lightBoxContentElement.style.top = Math.round(vertDiff / 2) + 'px';\n }\n };\n\n if (options.width && options.height) {\n lightBoxResize = Helpers.once(lightBoxResize.bind(this));\n }\n\n function outerWidth(el) {\n var width = el.offsetWidth;\n var style = getComputedStyle(el);\n\n width += parseInt(style.marginLeft) + parseInt(style.marginRight);\n return width;\n }\n\n function outerHeight(el) {\n var height = el.offsetHeight;\n var style = getComputedStyle(el);\n\n height += parseInt(style.marginTop) + parseInt(style.marginBottom);\n return height;\n }\n\n var bodyStyles;\n var hideScrollbar = (function () {\n bodyStyles = Helpers.zipObject(['overflow', 'paddingRight'].map(function (key) {\n return [key, getComputedStyle(bodyElement)[key]];\n }));\n\n var bodyPad = parseInt((getComputedStyle(bodyElement)['paddingRight'] || 0), 10);\n bodyElement.style.overflow = 'hidden';\n bodyElement.style.paddingRight = withDefaultPXUnit(bodyPad + this.measureScrollbar());\n }).bind(this);\n\n var resetScrollbar = function () {\n if (bodyStyles) {\n Object.keys(bodyStyles).forEach(function(key) {\n bodyElement.style[key] = bodyStyles[key];\n })\n }\n };\n\n var showSpinner = function () {\n lightBoxSpinnerElement.style.display = 'block';\n };\n\n var hideSpinner = function () {\n lightBoxSpinnerElement.style.display = 'none';\n };\n\n var loadTimer;\n lightBoxIframeElement.addEventListener('load', function handleLoad(event) {\n var timeout = !(options.width && options.height) ? (options.resizeTimeout || 30000) : 1000; // 30000 if psDimensions will not arrive and custom timeout is not provided\n loadTimer = global.setTimeout(function () {\n lightBoxResize();\n showContent();\n }, timeout);\n lightBoxIframeElement.removeEventListener('load', handleLoad);\n\n });\n\n var iframeWindow = lightBoxIframeElement.contentWindow || lightBoxIframeElement;\n\n // Cross-window communication\n this.message = new PostMessage(iframeWindow);\n if (options.width && options.height) {\n this.message.on('dimensions', (function () {\n lightBoxResize();\n showContent();\n }));\n } else {\n this.message.on('dimensions', (function (event) {\n var data = event.detail;\n if (data.dimensions) {\n psDimensions = Helpers.zipObject(['width', 'height'].map(function (dim) {\n return [dim, Math.max(MIN_PS_DIMENSIONS[dim] || 0, data.dimensions[dim] || 0) + 'px'];\n }));\n\n lightBoxResize();\n }\n showContent();\n }));\n }\n this.message.on('widget-detection', (function () {\n this.message.send('widget-detected', {version: version, lightBoxOptions: options});\n }).bind(this));\n this.message.on('widget-close', (function () {\n this.closeFrame();\n }).bind(this));\n this.message.on('close', (function () {\n this.closeFrame();\n }).bind(this));\n this.message.on('status', (function (event) {\n this.triggerEvent('status', event.detail);\n }).bind(this));\n this.message.on('user-country', (function (event) {\n this.triggerEvent('user-country', event.detail);\n }).bind(this));\n this.message.on('fcp', (function (event) {\n this.triggerEvent('fcp', event.detail);\n }).bind(this));\n this.message.on('error', (function (event) {\n this.triggerEvent('error', event.detail);\n }).bind(this));\n\n // Resize\n window.addEventListener(handleResizeEventName, lightBoxResize);\n window.addEventListener('resize', handleGlobalResize);\n\n // Clean up after close\n var that = this;\n this.on('close', function handleClose(event) {\n that.message.off();\n bodyElement.removeEventListener(handleKeyupEventName, HandleBoundSpecificKeyup)\n bodyElement.removeEventListener('keyup', handleGlobalKeyup);\n\n window.removeEventListener('resize', handleGlobalResize)\n\n window.removeEventListener(handleResizeEventName, lightBoxResize);\n lightBoxElement.parentNode.removeChild(lightBoxElement);\n resetScrollbar();\n that.off('close', handleClose);\n });\n\n showSpinner();\n hideScrollbar();\n this.triggerEvent('open');\n };\n\n LightBox.prototype.closeFrame = function () {\n if (!this.options.modal) {\n this.triggerEvent('close');\n }\n };\n\n LightBox.prototype.close = function () {\n this.closeFrame();\n };\n\n LightBox.prototype.on = function () {\n this.eventObject.on.apply(this.eventObject, arguments);\n };\n\n LightBox.prototype.off = function () {\n this.eventObject.off.apply(this.eventObject, arguments);\n };\n\n LightBox.prototype.getPostMessage = function () {\n return this.message;\n };\n\n LightBox._NAMESPACE = '.xpaystation-widget-lightbox';\n\n return LightBox;\n})();\n","function objectAssign() {\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign Polyfill\n Object.assign||Object.defineProperty(Object,\"assign\",{enumerable:!1,configurable:!0,writable:!0,value:function(e,r){\"use strict\";if(null==e)throw new TypeError(\"Cannot convert first argument to object\");for(var t=Object(e),n=1;n>>0;if(\"function\"!=typeof r)throw new TypeError(r+\" is not a function\");for(arguments.length>1&&(t=o),n=0;n\";\n","module.exports = \"\";\n","module.exports = require('sassify')('.xpaystation-widget-lightbox{position:fixed;top:0;left:0;bottom:0;right:0;width:100%;height:100%;-webkit-animation:xpaystation-widget-lightbox-fadein 0.15s;animation:xpaystation-widget-lightbox-fadein 0.15s}.xpaystation-widget-lightbox-overlay{position:absolute;top:0;left:0;bottom:0;right:0;z-index:1}.xpaystation-widget-lightbox-content{position:relative;top:0;left:0;z-index:3}.xpaystation-widget-lightbox-content__hidden{visibility:hidden;z-index:-1}.xpaystation-widget-lightbox-content-iframe{width:100%;height:100%;border:0;background:transparent}.xpaystation-widget-lightbox-spinner{position:absolute;top:50%;left:50%;display:none;z-index:2;pointer-events:none}.xpaystation-widget-lightbox-spinner .spinner-xsolla{width:56px;height:55px;margin-top:-28px;margin-left:-26px}.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-x,.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-s,.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-o,.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-l,.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-a{-webkit-animation:xpaystation-widget-lightbox-bouncedelay 1s infinite ease-in-out;-webkit-animation-fill-mode:both;animation:xpaystation-widget-lightbox-bouncedelay 1s infinite ease-in-out;animation-fill-mode:both}.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-x{-webkit-animation-delay:0s;animation-delay:0s}.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-s{-webkit-animation-delay:.2s;animation-delay:.2s}.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-o{-webkit-animation-delay:.4s;animation-delay:.4s}.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-l{-webkit-animation-delay:.6s;animation-delay:.6s}.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-a{-webkit-animation-delay:.8s;animation-delay:.8s}.xpaystation-widget-lightbox-spinner .spinner-round{margin-top:-23px;margin-left:-23px;-webkit-animation:xpaystation-widget-lightbox-spin 3s infinite linear;animation:xpaystation-widget-lightbox-spin 3s infinite linear}.xpaystation-widget-lightbox-spinner .spinner-custom{-webkit-animation:xpaystation-widget-lightbox-spin infinite linear;animation:xpaystation-widget-lightbox-spin infinite linear}@-webkit-keyframes xpaystation-widget-lightbox-bouncedelay{0%,80%,100%{opacity:0}40%{opacity:1}}@keyframes xpaystation-widget-lightbox-bouncedelay{0%,80%,100%{opacity:0}40%{opacity:1}}@-webkit-keyframes xpaystation-widget-lightbox-fadein{from{opacity:0}to{opacity:1}}@keyframes xpaystation-widget-lightbox-fadein{from{opacity:0}to{opacity:1}}@-webkit-keyframes xpaystation-widget-lightbox-spin{from{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}@keyframes xpaystation-widget-lightbox-spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}} /*# sourceMappingURL=data:application/json;base64,ewoJInZlcnNpb24iOiAzLAoJImZpbGUiOiAibGlnaHRib3guc2NzcyIsCgkic291cmNlcyI6IFsKCQkibGlnaHRib3guc2NzcyIKCV0sCgkic291cmNlc0NvbnRlbnQiOiBbCgkJIiRsaWdodGJveC1wcmVmaXg6ICd4cGF5c3RhdGlvbi13aWRnZXQtbGlnaHRib3gnO1xuJGxpZ2h0Ym94LWNsYXNzOiAnLicg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BQUFBLEVBQUUsQ0FBRyxpQkFBaUIsQ0FBRSxjQUFNLEVBR2hDLFVBQVUsQ0FBVixnQ0FBVSxDQUNSLEFBQUEsSUFBSSxDQUFHLFNBQVMsQ0FBRSxZQUFNLENBQ3hCLEFBQUEsRUFBRSxDQUFHLFNBQVMsQ0FBRSxjQUFNIiwKCSJuYW1lcyI6IFtdCn0= */');;","module.exports = '1.2.10';\n","/*!\n * Bowser - a browser detector\n * https://github.com/ded/bowser\n * MIT License | (c) Dustin Diaz 2015\n */\n\n!function (root, name, definition) {\n if (typeof module != 'undefined' && module.exports) module.exports = definition()\n else if (typeof define == 'function' && define.amd) define(name, definition)\n else root[name] = definition()\n}(this, 'bowser', function () {\n /**\n * See useragents.js for examples of navigator.userAgent\n */\n\n var t = true\n\n function detect(ua) {\n\n function getFirstMatch(regex) {\n var match = ua.match(regex);\n return (match && match.length > 1 && match[1]) || '';\n }\n\n function getSecondMatch(regex) {\n var match = ua.match(regex);\n return (match && match.length > 1 && match[2]) || '';\n }\n\n var iosdevice = getFirstMatch(/(ipod|iphone|ipad)/i).toLowerCase()\n , likeAndroid = /like android/i.test(ua)\n , android = !likeAndroid && /android/i.test(ua)\n , nexusMobile = /nexus\\s*[0-6]\\s*/i.test(ua)\n , nexusTablet = !nexusMobile && /nexus\\s*[0-9]+/i.test(ua)\n , chromeos = /CrOS/.test(ua)\n , silk = /silk/i.test(ua)\n , sailfish = /sailfish/i.test(ua)\n , tizen = /tizen/i.test(ua)\n , webos = /(web|hpw)(o|0)s/i.test(ua)\n , windowsphone = /windows phone/i.test(ua)\n , samsungBrowser = /SamsungBrowser/i.test(ua)\n , windows = !windowsphone && /windows/i.test(ua)\n , mac = !iosdevice && !silk && /macintosh/i.test(ua)\n , linux = !android && !sailfish && !tizen && !webos && /linux/i.test(ua)\n , edgeVersion = getSecondMatch(/edg([ea]|ios)\\/(\\d+(\\.\\d+)?)/i)\n , versionIdentifier = getFirstMatch(/version\\/(\\d+(\\.\\d+)?)/i)\n , tablet = /tablet/i.test(ua) && !/tablet pc/i.test(ua)\n , mobile = !tablet && /[^-]mobi/i.test(ua)\n , xbox = /xbox/i.test(ua)\n , result\n\n if (/opera/i.test(ua)) {\n // an old Opera\n result = {\n name: 'Opera'\n , opera: t\n , version: versionIdentifier || getFirstMatch(/(?:opera|opr|opios)[\\s\\/](\\d+(\\.\\d+)?)/i)\n }\n } else if (/opr\\/|opios/i.test(ua)) {\n // a new Opera\n result = {\n name: 'Opera'\n , opera: t\n , version: getFirstMatch(/(?:opr|opios)[\\s\\/](\\d+(\\.\\d+)?)/i) || versionIdentifier\n }\n }\n else if (/SamsungBrowser/i.test(ua)) {\n result = {\n name: 'Samsung Internet for Android'\n , samsungBrowser: t\n , version: versionIdentifier || getFirstMatch(/(?:SamsungBrowser)[\\s\\/](\\d+(\\.\\d+)?)/i)\n }\n }\n else if (/Whale/i.test(ua)) {\n result = {\n name: 'NAVER Whale browser'\n , whale: t\n , version: getFirstMatch(/(?:whale)[\\s\\/](\\d+(?:\\.\\d+)+)/i)\n }\n }\n else if (/MZBrowser/i.test(ua)) {\n result = {\n name: 'MZ Browser'\n , mzbrowser: t\n , version: getFirstMatch(/(?:MZBrowser)[\\s\\/](\\d+(?:\\.\\d+)+)/i)\n }\n }\n else if (/coast/i.test(ua)) {\n result = {\n name: 'Opera Coast'\n , coast: t\n , version: versionIdentifier || getFirstMatch(/(?:coast)[\\s\\/](\\d+(\\.\\d+)?)/i)\n }\n }\n else if (/focus/i.test(ua)) {\n result = {\n name: 'Focus'\n , focus: t\n , version: getFirstMatch(/(?:focus)[\\s\\/](\\d+(?:\\.\\d+)+)/i)\n }\n }\n else if (/yabrowser/i.test(ua)) {\n result = {\n name: 'Yandex Browser'\n , yandexbrowser: t\n , version: versionIdentifier || getFirstMatch(/(?:yabrowser)[\\s\\/](\\d+(\\.\\d+)?)/i)\n }\n }\n else if (/ucbrowser/i.test(ua)) {\n result = {\n name: 'UC Browser'\n , ucbrowser: t\n , version: getFirstMatch(/(?:ucbrowser)[\\s\\/](\\d+(?:\\.\\d+)+)/i)\n }\n }\n else if (/mxios/i.test(ua)) {\n result = {\n name: 'Maxthon'\n , maxthon: t\n , version: getFirstMatch(/(?:mxios)[\\s\\/](\\d+(?:\\.\\d+)+)/i)\n }\n }\n else if (/epiphany/i.test(ua)) {\n result = {\n name: 'Epiphany'\n , epiphany: t\n , version: getFirstMatch(/(?:epiphany)[\\s\\/](\\d+(?:\\.\\d+)+)/i)\n }\n }\n else if (/puffin/i.test(ua)) {\n result = {\n name: 'Puffin'\n , puffin: t\n , version: getFirstMatch(/(?:puffin)[\\s\\/](\\d+(?:\\.\\d+)?)/i)\n }\n }\n else if (/sleipnir/i.test(ua)) {\n result = {\n name: 'Sleipnir'\n , sleipnir: t\n , version: getFirstMatch(/(?:sleipnir)[\\s\\/](\\d+(?:\\.\\d+)+)/i)\n }\n }\n else if (/k-meleon/i.test(ua)) {\n result = {\n name: 'K-Meleon'\n , kMeleon: t\n , version: getFirstMatch(/(?:k-meleon)[\\s\\/](\\d+(?:\\.\\d+)+)/i)\n }\n }\n else if (windowsphone) {\n result = {\n name: 'Windows Phone'\n , osname: 'Windows Phone'\n , windowsphone: t\n }\n if (edgeVersion) {\n result.msedge = t\n result.version = edgeVersion\n }\n else {\n result.msie = t\n result.version = getFirstMatch(/iemobile\\/(\\d+(\\.\\d+)?)/i)\n }\n }\n else if (/msie|trident/i.test(ua)) {\n result = {\n name: 'Internet Explorer'\n , msie: t\n , version: getFirstMatch(/(?:msie |rv:)(\\d+(\\.\\d+)?)/i)\n }\n } else if (chromeos) {\n result = {\n name: 'Chrome'\n , osname: 'Chrome OS'\n , chromeos: t\n , chromeBook: t\n , chrome: t\n , version: getFirstMatch(/(?:chrome|crios|crmo)\\/(\\d+(\\.\\d+)?)/i)\n }\n } else if (/edg([ea]|ios)/i.test(ua)) {\n result = {\n name: 'Microsoft Edge'\n , msedge: t\n , version: edgeVersion\n }\n }\n else if (/vivaldi/i.test(ua)) {\n result = {\n name: 'Vivaldi'\n , vivaldi: t\n , version: getFirstMatch(/vivaldi\\/(\\d+(\\.\\d+)?)/i) || versionIdentifier\n }\n }\n else if (sailfish) {\n result = {\n name: 'Sailfish'\n , osname: 'Sailfish OS'\n , sailfish: t\n , version: getFirstMatch(/sailfish\\s?browser\\/(\\d+(\\.\\d+)?)/i)\n }\n }\n else if (/seamonkey\\//i.test(ua)) {\n result = {\n name: 'SeaMonkey'\n , seamonkey: t\n , version: getFirstMatch(/seamonkey\\/(\\d+(\\.\\d+)?)/i)\n }\n }\n else if (/firefox|iceweasel|fxios/i.test(ua)) {\n result = {\n name: 'Firefox'\n , firefox: t\n , version: getFirstMatch(/(?:firefox|iceweasel|fxios)[ \\/](\\d+(\\.\\d+)?)/i)\n }\n if (/\\((mobile|tablet);[^\\)]*rv:[\\d\\.]+\\)/i.test(ua)) {\n result.firefoxos = t\n result.osname = 'Firefox OS'\n }\n }\n else if (silk) {\n result = {\n name: 'Amazon Silk'\n , silk: t\n , version : getFirstMatch(/silk\\/(\\d+(\\.\\d+)?)/i)\n }\n }\n else if (/phantom/i.test(ua)) {\n result = {\n name: 'PhantomJS'\n , phantom: t\n , version: getFirstMatch(/phantomjs\\/(\\d+(\\.\\d+)?)/i)\n }\n }\n else if (/slimerjs/i.test(ua)) {\n result = {\n name: 'SlimerJS'\n , slimer: t\n , version: getFirstMatch(/slimerjs\\/(\\d+(\\.\\d+)?)/i)\n }\n }\n else if (/blackberry|\\bbb\\d+/i.test(ua) || /rim\\stablet/i.test(ua)) {\n result = {\n name: 'BlackBerry'\n , osname: 'BlackBerry OS'\n , blackberry: t\n , version: versionIdentifier || getFirstMatch(/blackberry[\\d]+\\/(\\d+(\\.\\d+)?)/i)\n }\n }\n else if (webos) {\n result = {\n name: 'WebOS'\n , osname: 'WebOS'\n , webos: t\n , version: versionIdentifier || getFirstMatch(/w(?:eb)?osbrowser\\/(\\d+(\\.\\d+)?)/i)\n };\n /touchpad\\//i.test(ua) && (result.touchpad = t)\n }\n else if (/bada/i.test(ua)) {\n result = {\n name: 'Bada'\n , osname: 'Bada'\n , bada: t\n , version: getFirstMatch(/dolfin\\/(\\d+(\\.\\d+)?)/i)\n };\n }\n else if (tizen) {\n result = {\n name: 'Tizen'\n , osname: 'Tizen'\n , tizen: t\n , version: getFirstMatch(/(?:tizen\\s?)?browser\\/(\\d+(\\.\\d+)?)/i) || versionIdentifier\n };\n }\n else if (/qupzilla/i.test(ua)) {\n result = {\n name: 'QupZilla'\n , qupzilla: t\n , version: getFirstMatch(/(?:qupzilla)[\\s\\/](\\d+(?:\\.\\d+)+)/i) || versionIdentifier\n }\n }\n else if (/chromium/i.test(ua)) {\n result = {\n name: 'Chromium'\n , chromium: t\n , version: getFirstMatch(/(?:chromium)[\\s\\/](\\d+(?:\\.\\d+)?)/i) || versionIdentifier\n }\n }\n else if (/chrome|crios|crmo/i.test(ua)) {\n result = {\n name: 'Chrome'\n , chrome: t\n , version: getFirstMatch(/(?:chrome|crios|crmo)\\/(\\d+(\\.\\d+)?)/i)\n }\n }\n else if (android) {\n result = {\n name: 'Android'\n , version: versionIdentifier\n }\n }\n else if (/safari|applewebkit/i.test(ua)) {\n result = {\n name: 'Safari'\n , safari: t\n }\n if (versionIdentifier) {\n result.version = versionIdentifier\n }\n }\n else if (iosdevice) {\n result = {\n name : iosdevice == 'iphone' ? 'iPhone' : iosdevice == 'ipad' ? 'iPad' : 'iPod'\n }\n // WTF: version is not part of user agent in web apps\n if (versionIdentifier) {\n result.version = versionIdentifier\n }\n }\n else if(/googlebot/i.test(ua)) {\n result = {\n name: 'Googlebot'\n , googlebot: t\n , version: getFirstMatch(/googlebot\\/(\\d+(\\.\\d+))/i) || versionIdentifier\n }\n }\n else {\n result = {\n name: getFirstMatch(/^(.*)\\/(.*) /),\n version: getSecondMatch(/^(.*)\\/(.*) /)\n };\n }\n\n // set webkit or gecko flag for browsers based on these engines\n if (!result.msedge && /(apple)?webkit/i.test(ua)) {\n if (/(apple)?webkit\\/537\\.36/i.test(ua)) {\n result.name = result.name || \"Blink\"\n result.blink = t\n } else {\n result.name = result.name || \"Webkit\"\n result.webkit = t\n }\n if (!result.version && versionIdentifier) {\n result.version = versionIdentifier\n }\n } else if (!result.opera && /gecko\\//i.test(ua)) {\n result.name = result.name || \"Gecko\"\n result.gecko = t\n result.version = result.version || getFirstMatch(/gecko\\/(\\d+(\\.\\d+)?)/i)\n }\n\n // set OS flags for platforms that have multiple browsers\n if (!result.windowsphone && (android || result.silk)) {\n result.android = t\n result.osname = 'Android'\n } else if (!result.windowsphone && iosdevice) {\n result[iosdevice] = t\n result.ios = t\n result.osname = 'iOS'\n } else if (mac) {\n result.mac = t\n result.osname = 'macOS'\n } else if (xbox) {\n result.xbox = t\n result.osname = 'Xbox'\n } else if (windows) {\n result.windows = t\n result.osname = 'Windows'\n } else if (linux) {\n result.linux = t\n result.osname = 'Linux'\n }\n\n function getWindowsVersion (s) {\n switch (s) {\n case 'NT': return 'NT'\n case 'XP': return 'XP'\n case 'NT 5.0': return '2000'\n case 'NT 5.1': return 'XP'\n case 'NT 5.2': return '2003'\n case 'NT 6.0': return 'Vista'\n case 'NT 6.1': return '7'\n case 'NT 6.2': return '8'\n case 'NT 6.3': return '8.1'\n case 'NT 10.0': return '10'\n default: return undefined\n }\n }\n\n // OS version extraction\n var osVersion = '';\n if (result.windows) {\n osVersion = getWindowsVersion(getFirstMatch(/Windows ((NT|XP)( \\d\\d?.\\d)?)/i))\n } else if (result.windowsphone) {\n osVersion = getFirstMatch(/windows phone (?:os)?\\s?(\\d+(\\.\\d+)*)/i);\n } else if (result.mac) {\n osVersion = getFirstMatch(/Mac OS X (\\d+([_\\.\\s]\\d+)*)/i);\n osVersion = osVersion.replace(/[_\\s]/g, '.');\n } else if (iosdevice) {\n osVersion = getFirstMatch(/os (\\d+([_\\s]\\d+)*) like mac os x/i);\n osVersion = osVersion.replace(/[_\\s]/g, '.');\n } else if (android) {\n osVersion = getFirstMatch(/android[ \\/-](\\d+(\\.\\d+)*)/i);\n } else if (result.webos) {\n osVersion = getFirstMatch(/(?:web|hpw)os\\/(\\d+(\\.\\d+)*)/i);\n } else if (result.blackberry) {\n osVersion = getFirstMatch(/rim\\stablet\\sos\\s(\\d+(\\.\\d+)*)/i);\n } else if (result.bada) {\n osVersion = getFirstMatch(/bada\\/(\\d+(\\.\\d+)*)/i);\n } else if (result.tizen) {\n osVersion = getFirstMatch(/tizen[\\/\\s](\\d+(\\.\\d+)*)/i);\n }\n if (osVersion) {\n result.osversion = osVersion;\n }\n\n // device type extraction\n var osMajorVersion = !result.windows && osVersion.split('.')[0];\n if (\n tablet\n || nexusTablet\n || iosdevice == 'ipad'\n || (android && (osMajorVersion == 3 || (osMajorVersion >= 4 && !mobile)))\n || result.silk\n ) {\n result.tablet = t\n } else if (\n mobile\n || iosdevice == 'iphone'\n || iosdevice == 'ipod'\n || android\n || nexusMobile\n || result.blackberry\n || result.webos\n || result.bada\n ) {\n result.mobile = t\n }\n\n // Graded Browser Support\n // http://developer.yahoo.com/yui/articles/gbs\n if (result.msedge ||\n (result.msie && result.version >= 10) ||\n (result.yandexbrowser && result.version >= 15) ||\n\t\t (result.vivaldi && result.version >= 1.0) ||\n (result.chrome && result.version >= 20) ||\n (result.samsungBrowser && result.version >= 4) ||\n (result.whale && compareVersions([result.version, '1.0']) === 1) ||\n (result.mzbrowser && compareVersions([result.version, '6.0']) === 1) ||\n (result.focus && compareVersions([result.version, '1.0']) === 1) ||\n (result.firefox && result.version >= 20.0) ||\n (result.safari && result.version >= 6) ||\n (result.opera && result.version >= 10.0) ||\n (result.ios && result.osversion && result.osversion.split(\".\")[0] >= 6) ||\n (result.blackberry && result.version >= 10.1)\n || (result.chromium && result.version >= 20)\n ) {\n result.a = t;\n }\n else if ((result.msie && result.version < 10) ||\n (result.chrome && result.version < 20) ||\n (result.firefox && result.version < 20.0) ||\n (result.safari && result.version < 6) ||\n (result.opera && result.version < 10.0) ||\n (result.ios && result.osversion && result.osversion.split(\".\")[0] < 6)\n || (result.chromium && result.version < 20)\n ) {\n result.c = t\n } else result.x = t\n\n return result\n }\n\n var bowser = detect(typeof navigator !== 'undefined' ? navigator.userAgent || '' : '')\n\n bowser.test = function (browserList) {\n for (var i = 0; i < browserList.length; ++i) {\n var browserItem = browserList[i];\n if (typeof browserItem=== 'string') {\n if (browserItem in bowser) {\n return true;\n }\n }\n }\n return false;\n }\n\n /**\n * Get version precisions count\n *\n * @example\n * getVersionPrecision(\"1.10.3\") // 3\n *\n * @param {string} version\n * @return {number}\n */\n function getVersionPrecision(version) {\n return version.split(\".\").length;\n }\n\n /**\n * Array::map polyfill\n *\n * @param {Array} arr\n * @param {Function} iterator\n * @return {Array}\n */\n function map(arr, iterator) {\n var result = [], i;\n if (Array.prototype.map) {\n return Array.prototype.map.call(arr, iterator);\n }\n for (i = 0; i < arr.length; i++) {\n result.push(iterator(arr[i]));\n }\n return result;\n }\n\n /**\n * Calculate browser version weight\n *\n * @example\n * compareVersions(['1.10.2.1', '1.8.2.1.90']) // 1\n * compareVersions(['1.010.2.1', '1.09.2.1.90']); // 1\n * compareVersions(['1.10.2.1', '1.10.2.1']); // 0\n * compareVersions(['1.10.2.1', '1.0800.2']); // -1\n *\n * @param {Array} versions versions to compare\n * @return {Number} comparison result\n */\n function compareVersions(versions) {\n // 1) get common precision for both versions, for example for \"10.0\" and \"9\" it should be 2\n var precision = Math.max(getVersionPrecision(versions[0]), getVersionPrecision(versions[1]));\n var chunks = map(versions, function (version) {\n var delta = precision - getVersionPrecision(version);\n\n // 2) \"9\" -> \"9.0\" (for precision = 2)\n version = version + new Array(delta + 1).join(\".0\");\n\n // 3) \"9.0\" -> [\"000000000\"\", \"000000009\"]\n return map(version.split(\".\"), function (chunk) {\n return new Array(20 - chunk.length).join(\"0\") + chunk;\n }).reverse();\n });\n\n // iterate in reverse order by reversed chunks array\n while (--precision >= 0) {\n // 4) compare: \"000000009\" > \"000000010\" = false (but \"9\" > \"10\" = true)\n if (chunks[0][precision] > chunks[1][precision]) {\n return 1;\n }\n else if (chunks[0][precision] === chunks[1][precision]) {\n if (precision === 0) {\n // all version chunks are same\n return 0;\n }\n }\n else {\n return -1;\n }\n }\n }\n\n /**\n * Check if browser is unsupported\n *\n * @example\n * bowser.isUnsupportedBrowser({\n * msie: \"10\",\n * firefox: \"23\",\n * chrome: \"29\",\n * safari: \"5.1\",\n * opera: \"16\",\n * phantom: \"534\"\n * });\n *\n * @param {Object} minVersions map of minimal version to browser\n * @param {Boolean} [strictMode = false] flag to return false if browser wasn't found in map\n * @param {String} [ua] user agent string\n * @return {Boolean}\n */\n function isUnsupportedBrowser(minVersions, strictMode, ua) {\n var _bowser = bowser;\n\n // make strictMode param optional with ua param usage\n if (typeof strictMode === 'string') {\n ua = strictMode;\n strictMode = void(0);\n }\n\n if (strictMode === void(0)) {\n strictMode = false;\n }\n if (ua) {\n _bowser = detect(ua);\n }\n\n var version = \"\" + _bowser.version;\n for (var browser in minVersions) {\n if (minVersions.hasOwnProperty(browser)) {\n if (_bowser[browser]) {\n if (typeof minVersions[browser] !== 'string') {\n throw new Error('Browser version in the minVersion map should be a string: ' + browser + ': ' + String(minVersions));\n }\n\n // browser version and min supported version.\n return compareVersions([version, minVersions[browser]]) < 0;\n }\n }\n }\n\n return strictMode; // not found\n }\n\n /**\n * Check if browser is supported\n *\n * @param {Object} minVersions map of minimal version to browser\n * @param {Boolean} [strictMode = false] flag to return false if browser wasn't found in map\n * @param {String} [ua] user agent string\n * @return {Boolean}\n */\n function check(minVersions, strictMode, ua) {\n return !isUnsupportedBrowser(minVersions, strictMode, ua);\n }\n\n bowser.isUnsupportedBrowser = isUnsupportedBrowser;\n bowser.compareVersions = compareVersions;\n bowser.check = check;\n\n /*\n * Set our detect method to the main bowser object so we can\n * reuse it to test other user agents.\n * This is needed to implement future tests.\n */\n bowser._detect = detect;\n\n /*\n * Set our detect public method to the main bowser object\n * This is needed to implement bowser in server side\n */\n bowser.detect = detect;\n return bowser\n});\n","var Helpers = require('./helpers')\nvar App = require('./app');\nvar polyfills = require('./polyfills');\n\npolyfills.applyPolyfills();\n\nvar instance;\n\nmodule.exports = (function () {\n var getInstance = function () {\n if (!instance) {\n instance = new App();\n }\n return instance;\n };\n\n return Object.assign(Helpers.zipObject(['init', 'open', 'close', 'on', 'off', 'sendMessage', 'onMessage'].map(function (methodName) {\n var app = getInstance();\n return [methodName, function () {\n return app[methodName].apply(app, arguments);\n }];\n })), {\n eventTypes: App.eventTypes,\n });\n})();\n"],"sourceRoot":"."} \ No newline at end of file +{"version":3,"sources":["node_modules/browser-pack/_prelude.js","node_modules/cssify/browser.js","widget.min.js","node_modules/sassify/lib/sassify-browser.js","src/app.js","src/childwindow.js","src/device.js","src/exception.js","src/helpers.js","src/lightbox.js","src/polyfills.js","src/postmessage.js","src/spinners/round.svg","src/spinners/xsolla.svg","src/styles/lightbox.scss","src/version.js","bower_components/bowser/src/bowser.js","src/main.js"],"names":["f","exports","module","define","amd","g","window","global","self","this","XPayStationWidget","e","t","n","r","s","o","u","a","require","i","Error","code","l","call","length",1,"css","customDocument","doc","document","createStyleSheet","sheet","cssText","ownerNode","head","getElementsByTagName","style","createElement","type","styleSheet","appendChild","createTextNode","byUrl","url","link","rel","href",2,"cssify",3,"Helpers","Exception","LightBox","ChildWindow","Device","ready","fn","readyState","addEventListener","App","config","Object","assign","DEFAULT_CONFIG","eventObject","addEventObject","isInitiated","postMessage","childWindow","eventTypes","INIT","OPEN","OPEN_WINDOW","OPEN_LIGHTBOX","LOAD","CLOSE","CLOSE_WINDOW","CLOSE_LIGHTBOX","STATUS","STATUS_INVOICE","STATUS_DELIVERING","STATUS_TROUBLED","STATUS_DONE","USER_COUNTRY","FCP","ERROR","access_token","access_data","sandbox","lightbox","host","iframeOnly","SANDBOX_PAYSTATION_URL","EVENT_NAMESPACE","ATTR_PREFIX","prototype","getPaymentUrl","payment_url","query","JSON","stringify","urlWithoutQueryParams","param","checkConfig","isEmpty","throwError","checkApp","undefined","message","triggerEvent","eventName","data","arguments","forEach","event","createEvent","initEvent","dispatchEvent","bind","trigger","triggerCustomEvent","CustomEvent","detail","initCustomEvent","init","options","initialize","bodyElement","body","clickEventName","handleClickEvent","targetElement","querySelector","sourceEvent","target","open","removeEventListener","clickEvent","handleStatus","statusData","that","triggerSplitStatus","handleUserLocale","userCountry","user_country","handleFcp","handleError","paymentInfo","status","isMobile","on","handleOpen","getPostMessage","off","handleLoad","handleClose","lightBox","openFrame","close","handler","handlerDecorator","sendMessage","command","send","apply","onMessage","./childwindow","./device","./exception","./helpers","./lightbox",4,"version","PostMessage","wrapEventInNamespace","_NAMESPACE","DEFAULT_OPTIONS","closed","location","addHandlers","closeChildWindow","timer","clearTimeout","handleWidgetDetection","childWindowOptions","parent","focus","checkWindow","setTimeout","./postmessage","./version",5,"bowser","mobile","tablet",6,"name","toString",7,"value","uniq","list","filter","x","indexOf","zipObject","props","values","index","result","Array","isArray","key","add","k","v","encodeURIComponent","buildParams","prefix","obj","len","String","join","once","context","isStringContainedSpace","str","test","dummyWrapper","eventsList","eventInNamespace","handle","addEvent","push","events","split","parsedEventName","removeEvent","offAllEvents",8,"DEFAULT_OPTIONS_MOBILE","CLASS_PREFIX","COMMON_OPTIONS","zIndex","overlayOpacity","overlayBackground","contentBackground","closeByKeyboard","closeByClick","modal","spinner","spinnerColor","spinnerUrl","spinnerRotationPeriod","width","height","contentMargin","SPINNERS","xsolla","round","none","MIN_PS_DIMENSIONS","handleKeyupEventName","handleResizeEventName","handleGlobalKeyup","handleSpecificKeyup","which","closeFrame","handleGlobalResize","resizeEvent","measureScrollbar","scrollDiv","classList","setAttribute","scrollbarWidth","offsetWidth","clientWidth","removeChild","withDefaultPXUnit","isStringWithoutUnit","parseFloat","outerWidth","el","getComputedStyle","parseInt","marginLeft","marginRight","outerHeight","offsetHeight","marginTop","marginBottom","HandleBoundSpecificKeyup","encodeURI","template","settings","className","overlay","content","iframe","src","frameBorder","allowFullscreen","innerHTML","lightBoxElement","lightBoxOverlayElement","lightBoxContentElement","lightBoxIframeElement","lightBoxSpinnerElement","psDimensions","opacity","backgroundColor","margin","fill","spinnerCustom","showContent","hideSpinner","remove","lightBoxResize","left","top","borderRadius","containerWidth","containerHeight","clientHeight","contentWidth","contentHeight","horMargin","vertMargin","horDiff","vertDiff","Math","bodyStyles","loadTimer","hideScrollbar","map","bodyPad","overflow","paddingRight","resetScrollbar","keys","showSpinner","display","timeout","resizeTimeout","iframeWindow","contentWindow","dimensions","dim","max","lightBoxOptions","parentNode","./spinners/round.svg","./spinners/xsolla.svg","./styles/lightbox.scss",9,"objectAssign","defineProperty","enumerable","configurable","writable","TypeError","c","b","getOwnPropertyDescriptor","arrayForEach","applyPolyfills",10,"linkedWindow","source","parse","targetOrigin",11,12,13,"sassify",14,"root","definition","detect","ua","getFirstMatch","regex","match","getSecondMatch","getWindowsVersion","iosdevice","toLowerCase","likeAndroid","android","nexusMobile","nexusTablet","chromeos","silk","sailfish","tizen","webos","windowsphone","windows","mac","linux","edgeVersion","versionIdentifier","xbox","opera","samsungBrowser","whale","mzbrowser","coast","yandexbrowser","ucbrowser","maxthon","epiphany","puffin","sleipnir","kMeleon","osname","msedge","msie","chromeBook","chrome","vivaldi","seamonkey","firefox","firefoxos","phantom","slimer","blackberry","touchpad","bada","qupzilla","chromium","safari","googlebot","blink","webkit","gecko","ios","osVersion","replace","osversion","osMajorVersion","compareVersions","getVersionPrecision","arr","iterator","versions","precision","chunks","delta","chunk","reverse","isUnsupportedBrowser","minVersions","strictMode","_bowser","browser","hasOwnProperty","check","navigator","userAgent","browserList","browserItem","_detect","main","polyfills","instance","getInstance","methodName","app","./app","./polyfills"],"mappings":"CAAA,SAAAA,GAAA,GAAA,gBAAAC,UAAA,mBAAAC,QAAAA,OAAAD,QAAAD,QAAA,IAAA,kBAAAG,SAAAA,OAAAC,IAAAD,UAAAH,OAAA,CAAA,GAAAK,EAAAA,GAAA,mBAAAC,QAAAA,OAAA,mBAAAC,QAAAA,OAAA,mBAAAC,MAAAA,KAAAC,KAAAJ,EAAAK,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BAGA3C,WAAAV,EAAAU,kBfqzDGgZ,QAAQ,EAAE5S,YAAY,EAAE6S,cAAc,SAAS,SAAS","file":"widget.min.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o' : SPINNERS[options.spinner] || Object.values(SPINNERS)[0];\r\n\r\n var template = function (settings) {\r\n var host = document.createElement('div');\r\n host.className = settings.prefix;\r\n\r\n var overlay = document.createElement('div');\r\n overlay.className = settings.prefix + '-overlay';\r\n\r\n var content = document.createElement('div');\r\n content.className = settings.prefix + '-content' + ' ' + settings.prefix + '-content__hidden';\r\n\r\n var iframe = document.createElement('iframe');\r\n iframe.className = settings.prefix + '-content-iframe';\r\n iframe.src = settings.url;\r\n iframe.frameBorder = '0';\r\n iframe.allowFullscreen = true;\r\n\r\n var spinner = document.createElement('div');\r\n spinner.className = settings.prefix + '-spinner';\r\n spinner.innerHTML = settings.spinner;\r\n\r\n content.appendChild(iframe);\r\n\r\n host.appendChild(overlay);\r\n host.appendChild(content);\r\n host.appendChild(spinner);\r\n\r\n return host;\r\n };\r\n\r\n var bodyElement = global.document.body;\r\n var lightBoxElement = template({\r\n prefix: CLASS_PREFIX,\r\n url: url,\r\n spinner: spinner\r\n });\r\n var lightBoxOverlayElement = lightBoxElement.querySelector('.' + CLASS_PREFIX + '-overlay');\r\n var lightBoxContentElement = lightBoxElement.querySelector('.' + CLASS_PREFIX + '-content');\r\n var lightBoxIframeElement = lightBoxContentElement.querySelector('.' + CLASS_PREFIX + '-content-iframe');\r\n var lightBoxSpinnerElement = lightBoxElement.querySelector('.' + CLASS_PREFIX + '-spinner');\r\n\r\n var psDimensions = {\r\n width: withDefaultPXUnit(MIN_PS_DIMENSIONS.width),\r\n height: withDefaultPXUnit(MIN_PS_DIMENSIONS.height)\r\n };\r\n\r\n function withDefaultPXUnit(value) {\r\n var isStringWithoutUnit = typeof value === 'string' && String(parseFloat(value)).length === value.length;\r\n if (isStringWithoutUnit) {\r\n return value + 'px';\r\n }\r\n return typeof value === 'number' ? value + 'px' : value\r\n }\r\n\r\n lightBoxElement.style.zIndex = options.zIndex;\r\n\r\n lightBoxOverlayElement.style.opacity = options.overlayOpacity;\r\n lightBoxOverlayElement.style.backgroundColor = options.overlayBackground;\r\n\r\n lightBoxContentElement.style.backgroundColor = options.contentBackground;\r\n lightBoxContentElement.style.margin = withDefaultPXUnit(options.contentMargin);\r\n lightBoxContentElement.style.width = options.width ? withDefaultPXUnit(options.width) : 'auto';\r\n lightBoxContentElement.style.height = options.height ? withDefaultPXUnit(options.height) : 'auto';\r\n\r\n if (options.spinnerColor) {\r\n lightBoxSpinnerElement.querySelector('path').style.fill = options.spinnerColor;\r\n }\r\n\r\n if (options.spinner === 'custom') {\r\n var spinnerCustom = lightBoxSpinnerElement.querySelector('.spinner-custom');\r\n spinnerCustom.style['-webkit-animation-duration'] = options.spinnerRotationPeriod + 's;';\r\n spinnerCustom.style['animation-duration'] = options.spinnerRotationPeriod + 's;';\r\n }\r\n\r\n if (options.closeByClick) {\r\n lightBoxOverlayElement.addEventListener('click', (function () {\r\n this.closeFrame();\r\n }).bind(this));\r\n }\r\n\r\n bodyElement.appendChild(lightBoxElement);\r\n\r\n if (options.closeByKeyboard) {\r\n\r\n bodyElement.addEventListener(handleKeyupEventName, HandleBoundSpecificKeyup);\r\n\r\n bodyElement.addEventListener('keyup', handleGlobalKeyup, false);\r\n }\r\n\r\n var showContent = Helpers.once((function () {\r\n hideSpinner(options);\r\n lightBoxContentElement.classList.remove(CLASS_PREFIX + '-content__hidden');\r\n this.triggerEvent('load');\r\n }).bind(this));\r\n\r\n var lightBoxResize = function () {\r\n var width = options.width ? options.width : psDimensions.width;\r\n var height = options.height ? options.height : psDimensions.height;\r\n\r\n lightBoxContentElement.style.left = '0px';\r\n lightBoxContentElement.style.top = '0px';\r\n lightBoxContentElement.style.borderRadius = '8px';\r\n lightBoxContentElement.style.width = withDefaultPXUnit(width);\r\n lightBoxContentElement.style.height = withDefaultPXUnit(height);\r\n\r\n var containerWidth = lightBoxElement.clientWidth,\r\n containerHeight = lightBoxElement.clientHeight;\r\n\r\n var contentWidth = outerWidth(lightBoxContentElement),\r\n contentHeight = outerHeight(lightBoxContentElement);\r\n\r\n var horMargin = contentWidth - lightBoxContentElement.offsetWidth,\r\n vertMargin = contentHeight - lightBoxContentElement.offsetHeight;\r\n\r\n var horDiff = containerWidth - contentWidth,\r\n vertDiff = containerHeight - contentHeight;\r\n\r\n if (horDiff < 0) {\r\n lightBoxContentElement.style.width = containerWidth - horMargin + 'px';\r\n } else {\r\n lightBoxContentElement.style.left = Math.round(horDiff / 2) + 'px';\r\n }\r\n\r\n if (vertDiff < 0) {\r\n lightBoxContentElement.style.height = containerHeight - vertMargin + 'px';\r\n } else {\r\n lightBoxContentElement.style.top = Math.round(vertDiff / 2) + 'px';\r\n }\r\n };\r\n\r\n if (options.width && options.height) {\r\n lightBoxResize = Helpers.once(lightBoxResize.bind(this));\r\n }\r\n\r\n function outerWidth(el) {\r\n var width = el.offsetWidth;\r\n var style = getComputedStyle(el);\r\n\r\n width += parseInt(style.marginLeft) + parseInt(style.marginRight);\r\n return width;\r\n }\r\n\r\n function outerHeight(el) {\r\n var height = el.offsetHeight;\r\n var style = getComputedStyle(el);\r\n\r\n height += parseInt(style.marginTop) + parseInt(style.marginBottom);\r\n return height;\r\n }\r\n\r\n var bodyStyles;\r\n var hideScrollbar = (function () {\r\n bodyStyles = Helpers.zipObject(['overflow', 'paddingRight'].map(function (key) {\r\n return [key, getComputedStyle(bodyElement)[key]];\r\n }));\r\n\r\n var bodyPad = parseInt((getComputedStyle(bodyElement)['paddingRight'] || 0), 10);\r\n bodyElement.style.overflow = 'hidden';\r\n bodyElement.style.paddingRight = withDefaultPXUnit(bodyPad + this.measureScrollbar());\r\n }).bind(this);\r\n\r\n var resetScrollbar = function () {\r\n if (bodyStyles) {\r\n Object.keys(bodyStyles).forEach(function(key) {\r\n bodyElement.style[key] = bodyStyles[key];\r\n })\r\n }\r\n };\r\n\r\n var showSpinner = function () {\r\n lightBoxSpinnerElement.style.display = 'block';\r\n };\r\n\r\n var hideSpinner = function () {\r\n lightBoxSpinnerElement.style.display = 'none';\r\n };\r\n\r\n var loadTimer;\r\n lightBoxIframeElement.addEventListener('load', function handleLoad(event) {\r\n var timeout = !(options.width && options.height) ? (options.resizeTimeout || 30000) : 1000; // 30000 if psDimensions will not arrive and custom timeout is not provided\r\n loadTimer = global.setTimeout(function () {\r\n lightBoxResize();\r\n showContent();\r\n }, timeout);\r\n lightBoxIframeElement.removeEventListener('load', handleLoad);\r\n\r\n });\r\n\r\n var iframeWindow = lightBoxIframeElement.contentWindow || lightBoxIframeElement;\r\n\r\n // Cross-window communication\r\n this.message = new PostMessage(iframeWindow);\r\n if (options.width && options.height) {\r\n this.message.on('dimensions', (function () {\r\n lightBoxResize();\r\n showContent();\r\n }));\r\n } else {\r\n this.message.on('dimensions', (function (event) {\r\n var data = event.detail;\r\n if (data.dimensions) {\r\n psDimensions = Helpers.zipObject(['width', 'height'].map(function (dim) {\r\n return [dim, Math.max(MIN_PS_DIMENSIONS[dim] || 0, data.dimensions[dim] || 0) + 'px'];\r\n }));\r\n\r\n lightBoxResize();\r\n }\r\n showContent();\r\n }));\r\n }\r\n this.message.on('widget-detection', (function () {\r\n this.message.send('widget-detected', {version: version, lightBoxOptions: options});\r\n }).bind(this));\r\n this.message.on('widget-close', (function () {\r\n this.closeFrame();\r\n }).bind(this));\r\n this.message.on('close', (function () {\r\n this.closeFrame();\r\n }).bind(this));\r\n this.message.on('status', (function (event) {\r\n this.triggerEvent('status', event.detail);\r\n }).bind(this));\r\n this.message.on('user-country', (function (event) {\r\n this.triggerEvent('user-country', event.detail);\r\n }).bind(this));\r\n this.message.on('fcp', (function (event) {\r\n this.triggerEvent('fcp', event.detail);\r\n }).bind(this));\r\n this.message.on('error', (function (event) {\r\n this.triggerEvent('error', event.detail);\r\n }).bind(this));\r\n\r\n // Resize\r\n window.addEventListener(handleResizeEventName, lightBoxResize);\r\n window.addEventListener('resize', handleGlobalResize);\r\n\r\n // Clean up after close\r\n var that = this;\r\n this.on('close', function handleClose(event) {\r\n that.message.off();\r\n bodyElement.removeEventListener(handleKeyupEventName, HandleBoundSpecificKeyup)\r\n bodyElement.removeEventListener('keyup', handleGlobalKeyup);\r\n\r\n window.removeEventListener('resize', handleGlobalResize)\r\n\r\n window.removeEventListener(handleResizeEventName, lightBoxResize);\r\n lightBoxElement.parentNode.removeChild(lightBoxElement);\r\n resetScrollbar();\r\n that.off('close', handleClose);\r\n });\r\n\r\n showSpinner();\r\n hideScrollbar();\r\n this.triggerEvent('open');\r\n };\r\n\r\n LightBox.prototype.closeFrame = function () {\r\n if (!this.options.modal) {\r\n this.triggerEvent('close');\r\n }\r\n };\r\n\r\n LightBox.prototype.close = function () {\r\n this.closeFrame();\r\n };\r\n\r\n LightBox.prototype.on = function () {\r\n this.eventObject.on.apply(this.eventObject, arguments);\r\n };\r\n\r\n LightBox.prototype.off = function () {\r\n this.eventObject.off.apply(this.eventObject, arguments);\r\n };\r\n\r\n LightBox.prototype.getPostMessage = function () {\r\n return this.message;\r\n };\r\n\r\n LightBox._NAMESPACE = '.xpaystation-widget-lightbox';\r\n\r\n return LightBox;\r\n})();\r\n","function objectAssign() {\r\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign Polyfill\r\n Object.assign||Object.defineProperty(Object,\"assign\",{enumerable:!1,configurable:!0,writable:!0,value:function(e,r){\"use strict\";if(null==e)throw new TypeError(\"Cannot convert first argument to object\");for(var t=Object(e),n=1;n>>0;if(\"function\"!=typeof r)throw new TypeError(r+\" is not a function\");for(arguments.length>1&&(t=o),n=0;n\";\n","module.exports = \"\";\n","module.exports = require('sassify')('.xpaystation-widget-lightbox{position:fixed;top:0;left:0;bottom:0;right:0;width:100%;height:100%;-webkit-animation:xpaystation-widget-lightbox-fadein 0.15s;animation:xpaystation-widget-lightbox-fadein 0.15s}.xpaystation-widget-lightbox-overlay{position:absolute;top:0;left:0;bottom:0;right:0;z-index:1}.xpaystation-widget-lightbox-content{position:relative;top:0;left:0;z-index:3}.xpaystation-widget-lightbox-content__hidden{visibility:hidden;z-index:-1}.xpaystation-widget-lightbox-content-iframe{width:100%;height:100%;border:0;background:transparent}.xpaystation-widget-lightbox-spinner{position:absolute;top:50%;left:50%;display:none;z-index:2;pointer-events:none}.xpaystation-widget-lightbox-spinner .spinner-xsolla{width:56px;height:55px;margin-top:-28px;margin-left:-26px}.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-x,.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-s,.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-o,.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-l,.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-a{-webkit-animation:xpaystation-widget-lightbox-bouncedelay 1s infinite ease-in-out;-webkit-animation-fill-mode:both;animation:xpaystation-widget-lightbox-bouncedelay 1s infinite ease-in-out;animation-fill-mode:both}.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-x{-webkit-animation-delay:0s;animation-delay:0s}.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-s{-webkit-animation-delay:.2s;animation-delay:.2s}.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-o{-webkit-animation-delay:.4s;animation-delay:.4s}.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-l{-webkit-animation-delay:.6s;animation-delay:.6s}.xpaystation-widget-lightbox-spinner .spinner-xsolla .spinner-xsolla-a{-webkit-animation-delay:.8s;animation-delay:.8s}.xpaystation-widget-lightbox-spinner .spinner-round{margin-top:-23px;margin-left:-23px;-webkit-animation:xpaystation-widget-lightbox-spin 3s infinite linear;animation:xpaystation-widget-lightbox-spin 3s infinite linear}.xpaystation-widget-lightbox-spinner .spinner-custom{-webkit-animation:xpaystation-widget-lightbox-spin infinite linear;animation:xpaystation-widget-lightbox-spin infinite linear}@-webkit-keyframes xpaystation-widget-lightbox-bouncedelay{0%,80%,100%{opacity:0}40%{opacity:1}}@keyframes xpaystation-widget-lightbox-bouncedelay{0%,80%,100%{opacity:0}40%{opacity:1}}@-webkit-keyframes xpaystation-widget-lightbox-fadein{from{opacity:0}to{opacity:1}}@keyframes xpaystation-widget-lightbox-fadein{from{opacity:0}to{opacity:1}}@-webkit-keyframes xpaystation-widget-lightbox-spin{from{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}@keyframes xpaystation-widget-lightbox-spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}} /*# sourceMappingURL=data:application/json;base64,ewoJInZlcnNpb24iOiAzLAoJImZpbGUiOiAibGlnaHRib3guc2NzcyIsCgkic291cmNlcyI6IFsKCQkibGlnaHRib3guc2NzcyIKCV0sCgkic291cmNlc0NvbnRlbnQiOiBbCgkJIiRsaWdodGJveC1wcmVmaXg6ICd4cGF5c3RhdGlvbi13aWRnZXQtbGlnaHRib3gnO1xyXG4kbGlnaHRib3gtY2xhc3M6ICcuJyArICRsaWdodGJveC1wcmVmaXg7XHJcblxyXG4jeyRsaWdodGJveC1jbGFzc30ge1xyXG4gIHBvc2l0aW9uOiBmaXhlZDtcclxuICB0b3A6IDA7XHJcbiAgbGVmdDogMDtcclxuICBib3R0b206IDA7XHJcbiAgcmlnaHQ6IDA7XHJcbiAgd2lkdGg6IDEwMCU7XHJcbiAgaGVpZ2h0OiAxMDAlO1xyXG4gIC13ZWJraXQtYW5pbWF0aW9uOiAjeyRsaWdodGJveC1wcmVmaXh9LWZhZG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aUIsQ0FBRSxZQUFNLENBQ2hDLEFBQUEsRUFBRSxDQUFHLGlCQUFpQixDQUFFLGNBQU0sRUFHaEMsVUFBVSxDQUFWLGdDQUFVLENBQ1IsQUFBQSxJQUFJLENBQUcsU0FBUyxDQUFFLFlBQU0sQ0FDeEIsQUFBQSxFQUFFLENBQUcsU0FBUyxDQUFFLGNBQU0iLAoJIm5hbWVzIjogW10KfQ== */');;","module.exports = '1.2.10';\r\n","/*!\n * Bowser - a browser detector\n * https://github.com/ded/bowser\n * MIT License | (c) Dustin Diaz 2015\n */\n\n!function (root, name, definition) {\n if (typeof module != 'undefined' && module.exports) module.exports = definition()\n else if (typeof define == 'function' && define.amd) define(name, definition)\n else root[name] = definition()\n}(this, 'bowser', function () {\n /**\n * See useragents.js for examples of navigator.userAgent\n */\n\n var t = true\n\n function detect(ua) {\n\n function getFirstMatch(regex) {\n var match = ua.match(regex);\n return (match && match.length > 1 && match[1]) || '';\n }\n\n function getSecondMatch(regex) {\n var match = ua.match(regex);\n return (match && match.length > 1 && match[2]) || '';\n }\n\n var iosdevice = getFirstMatch(/(ipod|iphone|ipad)/i).toLowerCase()\n , likeAndroid = /like android/i.test(ua)\n , android = !likeAndroid && /android/i.test(ua)\n , nexusMobile = /nexus\\s*[0-6]\\s*/i.test(ua)\n , nexusTablet = !nexusMobile && /nexus\\s*[0-9]+/i.test(ua)\n , chromeos = /CrOS/.test(ua)\n , silk = /silk/i.test(ua)\n , sailfish = /sailfish/i.test(ua)\n , tizen = /tizen/i.test(ua)\n , webos = /(web|hpw)(o|0)s/i.test(ua)\n , windowsphone = /windows phone/i.test(ua)\n , samsungBrowser = /SamsungBrowser/i.test(ua)\n , windows = !windowsphone && /windows/i.test(ua)\n , mac = !iosdevice && !silk && /macintosh/i.test(ua)\n , linux = !android && !sailfish && !tizen && !webos && /linux/i.test(ua)\n , edgeVersion = getSecondMatch(/edg([ea]|ios)\\/(\\d+(\\.\\d+)?)/i)\n , versionIdentifier = getFirstMatch(/version\\/(\\d+(\\.\\d+)?)/i)\n , tablet = /tablet/i.test(ua) && !/tablet pc/i.test(ua)\n , mobile = !tablet && /[^-]mobi/i.test(ua)\n , xbox = /xbox/i.test(ua)\n , result\n\n if (/opera/i.test(ua)) {\n // an old Opera\n result = {\n name: 'Opera'\n , opera: t\n , version: versionIdentifier || getFirstMatch(/(?:opera|opr|opios)[\\s\\/](\\d+(\\.\\d+)?)/i)\n }\n } else if (/opr\\/|opios/i.test(ua)) {\n // a new Opera\n result = {\n name: 'Opera'\n , opera: t\n , version: getFirstMatch(/(?:opr|opios)[\\s\\/](\\d+(\\.\\d+)?)/i) || versionIdentifier\n }\n }\n else if (/SamsungBrowser/i.test(ua)) {\n result = {\n name: 'Samsung Internet for Android'\n , samsungBrowser: t\n , version: versionIdentifier || getFirstMatch(/(?:SamsungBrowser)[\\s\\/](\\d+(\\.\\d+)?)/i)\n }\n }\n else if (/Whale/i.test(ua)) {\n result = {\n name: 'NAVER Whale browser'\n , whale: t\n , version: getFirstMatch(/(?:whale)[\\s\\/](\\d+(?:\\.\\d+)+)/i)\n }\n }\n else if (/MZBrowser/i.test(ua)) {\n result = {\n name: 'MZ Browser'\n , mzbrowser: t\n , version: getFirstMatch(/(?:MZBrowser)[\\s\\/](\\d+(?:\\.\\d+)+)/i)\n }\n }\n else if (/coast/i.test(ua)) {\n result = {\n name: 'Opera Coast'\n , coast: t\n , version: versionIdentifier || getFirstMatch(/(?:coast)[\\s\\/](\\d+(\\.\\d+)?)/i)\n }\n }\n else if (/focus/i.test(ua)) {\n result = {\n name: 'Focus'\n , focus: t\n , version: getFirstMatch(/(?:focus)[\\s\\/](\\d+(?:\\.\\d+)+)/i)\n }\n }\n else if (/yabrowser/i.test(ua)) {\n result = {\n name: 'Yandex Browser'\n , yandexbrowser: t\n , version: versionIdentifier || getFirstMatch(/(?:yabrowser)[\\s\\/](\\d+(\\.\\d+)?)/i)\n }\n }\n else if (/ucbrowser/i.test(ua)) {\n result = {\n name: 'UC Browser'\n , ucbrowser: t\n , version: getFirstMatch(/(?:ucbrowser)[\\s\\/](\\d+(?:\\.\\d+)+)/i)\n }\n }\n else if (/mxios/i.test(ua)) {\n result = {\n name: 'Maxthon'\n , maxthon: t\n , version: getFirstMatch(/(?:mxios)[\\s\\/](\\d+(?:\\.\\d+)+)/i)\n }\n }\n else if (/epiphany/i.test(ua)) {\n result = {\n name: 'Epiphany'\n , epiphany: t\n , version: getFirstMatch(/(?:epiphany)[\\s\\/](\\d+(?:\\.\\d+)+)/i)\n }\n }\n else if (/puffin/i.test(ua)) {\n result = {\n name: 'Puffin'\n , puffin: t\n , version: getFirstMatch(/(?:puffin)[\\s\\/](\\d+(?:\\.\\d+)?)/i)\n }\n }\n else if (/sleipnir/i.test(ua)) {\n result = {\n name: 'Sleipnir'\n , sleipnir: t\n , version: getFirstMatch(/(?:sleipnir)[\\s\\/](\\d+(?:\\.\\d+)+)/i)\n }\n }\n else if (/k-meleon/i.test(ua)) {\n result = {\n name: 'K-Meleon'\n , kMeleon: t\n , version: getFirstMatch(/(?:k-meleon)[\\s\\/](\\d+(?:\\.\\d+)+)/i)\n }\n }\n else if (windowsphone) {\n result = {\n name: 'Windows Phone'\n , osname: 'Windows Phone'\n , windowsphone: t\n }\n if (edgeVersion) {\n result.msedge = t\n result.version = edgeVersion\n }\n else {\n result.msie = t\n result.version = getFirstMatch(/iemobile\\/(\\d+(\\.\\d+)?)/i)\n }\n }\n else if (/msie|trident/i.test(ua)) {\n result = {\n name: 'Internet Explorer'\n , msie: t\n , version: getFirstMatch(/(?:msie |rv:)(\\d+(\\.\\d+)?)/i)\n }\n } else if (chromeos) {\n result = {\n name: 'Chrome'\n , osname: 'Chrome OS'\n , chromeos: t\n , chromeBook: t\n , chrome: t\n , version: getFirstMatch(/(?:chrome|crios|crmo)\\/(\\d+(\\.\\d+)?)/i)\n }\n } else if (/edg([ea]|ios)/i.test(ua)) {\n result = {\n name: 'Microsoft Edge'\n , msedge: t\n , version: edgeVersion\n }\n }\n else if (/vivaldi/i.test(ua)) {\n result = {\n name: 'Vivaldi'\n , vivaldi: t\n , version: getFirstMatch(/vivaldi\\/(\\d+(\\.\\d+)?)/i) || versionIdentifier\n }\n }\n else if (sailfish) {\n result = {\n name: 'Sailfish'\n , osname: 'Sailfish OS'\n , sailfish: t\n , version: getFirstMatch(/sailfish\\s?browser\\/(\\d+(\\.\\d+)?)/i)\n }\n }\n else if (/seamonkey\\//i.test(ua)) {\n result = {\n name: 'SeaMonkey'\n , seamonkey: t\n , version: getFirstMatch(/seamonkey\\/(\\d+(\\.\\d+)?)/i)\n }\n }\n else if (/firefox|iceweasel|fxios/i.test(ua)) {\n result = {\n name: 'Firefox'\n , firefox: t\n , version: getFirstMatch(/(?:firefox|iceweasel|fxios)[ \\/](\\d+(\\.\\d+)?)/i)\n }\n if (/\\((mobile|tablet);[^\\)]*rv:[\\d\\.]+\\)/i.test(ua)) {\n result.firefoxos = t\n result.osname = 'Firefox OS'\n }\n }\n else if (silk) {\n result = {\n name: 'Amazon Silk'\n , silk: t\n , version : getFirstMatch(/silk\\/(\\d+(\\.\\d+)?)/i)\n }\n }\n else if (/phantom/i.test(ua)) {\n result = {\n name: 'PhantomJS'\n , phantom: t\n , version: getFirstMatch(/phantomjs\\/(\\d+(\\.\\d+)?)/i)\n }\n }\n else if (/slimerjs/i.test(ua)) {\n result = {\n name: 'SlimerJS'\n , slimer: t\n , version: getFirstMatch(/slimerjs\\/(\\d+(\\.\\d+)?)/i)\n }\n }\n else if (/blackberry|\\bbb\\d+/i.test(ua) || /rim\\stablet/i.test(ua)) {\n result = {\n name: 'BlackBerry'\n , osname: 'BlackBerry OS'\n , blackberry: t\n , version: versionIdentifier || getFirstMatch(/blackberry[\\d]+\\/(\\d+(\\.\\d+)?)/i)\n }\n }\n else if (webos) {\n result = {\n name: 'WebOS'\n , osname: 'WebOS'\n , webos: t\n , version: versionIdentifier || getFirstMatch(/w(?:eb)?osbrowser\\/(\\d+(\\.\\d+)?)/i)\n };\n /touchpad\\//i.test(ua) && (result.touchpad = t)\n }\n else if (/bada/i.test(ua)) {\n result = {\n name: 'Bada'\n , osname: 'Bada'\n , bada: t\n , version: getFirstMatch(/dolfin\\/(\\d+(\\.\\d+)?)/i)\n };\n }\n else if (tizen) {\n result = {\n name: 'Tizen'\n , osname: 'Tizen'\n , tizen: t\n , version: getFirstMatch(/(?:tizen\\s?)?browser\\/(\\d+(\\.\\d+)?)/i) || versionIdentifier\n };\n }\n else if (/qupzilla/i.test(ua)) {\n result = {\n name: 'QupZilla'\n , qupzilla: t\n , version: getFirstMatch(/(?:qupzilla)[\\s\\/](\\d+(?:\\.\\d+)+)/i) || versionIdentifier\n }\n }\n else if (/chromium/i.test(ua)) {\n result = {\n name: 'Chromium'\n , chromium: t\n , version: getFirstMatch(/(?:chromium)[\\s\\/](\\d+(?:\\.\\d+)?)/i) || versionIdentifier\n }\n }\n else if (/chrome|crios|crmo/i.test(ua)) {\n result = {\n name: 'Chrome'\n , chrome: t\n , version: getFirstMatch(/(?:chrome|crios|crmo)\\/(\\d+(\\.\\d+)?)/i)\n }\n }\n else if (android) {\n result = {\n name: 'Android'\n , version: versionIdentifier\n }\n }\n else if (/safari|applewebkit/i.test(ua)) {\n result = {\n name: 'Safari'\n , safari: t\n }\n if (versionIdentifier) {\n result.version = versionIdentifier\n }\n }\n else if (iosdevice) {\n result = {\n name : iosdevice == 'iphone' ? 'iPhone' : iosdevice == 'ipad' ? 'iPad' : 'iPod'\n }\n // WTF: version is not part of user agent in web apps\n if (versionIdentifier) {\n result.version = versionIdentifier\n }\n }\n else if(/googlebot/i.test(ua)) {\n result = {\n name: 'Googlebot'\n , googlebot: t\n , version: getFirstMatch(/googlebot\\/(\\d+(\\.\\d+))/i) || versionIdentifier\n }\n }\n else {\n result = {\n name: getFirstMatch(/^(.*)\\/(.*) /),\n version: getSecondMatch(/^(.*)\\/(.*) /)\n };\n }\n\n // set webkit or gecko flag for browsers based on these engines\n if (!result.msedge && /(apple)?webkit/i.test(ua)) {\n if (/(apple)?webkit\\/537\\.36/i.test(ua)) {\n result.name = result.name || \"Blink\"\n result.blink = t\n } else {\n result.name = result.name || \"Webkit\"\n result.webkit = t\n }\n if (!result.version && versionIdentifier) {\n result.version = versionIdentifier\n }\n } else if (!result.opera && /gecko\\//i.test(ua)) {\n result.name = result.name || \"Gecko\"\n result.gecko = t\n result.version = result.version || getFirstMatch(/gecko\\/(\\d+(\\.\\d+)?)/i)\n }\n\n // set OS flags for platforms that have multiple browsers\n if (!result.windowsphone && (android || result.silk)) {\n result.android = t\n result.osname = 'Android'\n } else if (!result.windowsphone && iosdevice) {\n result[iosdevice] = t\n result.ios = t\n result.osname = 'iOS'\n } else if (mac) {\n result.mac = t\n result.osname = 'macOS'\n } else if (xbox) {\n result.xbox = t\n result.osname = 'Xbox'\n } else if (windows) {\n result.windows = t\n result.osname = 'Windows'\n } else if (linux) {\n result.linux = t\n result.osname = 'Linux'\n }\n\n function getWindowsVersion (s) {\n switch (s) {\n case 'NT': return 'NT'\n case 'XP': return 'XP'\n case 'NT 5.0': return '2000'\n case 'NT 5.1': return 'XP'\n case 'NT 5.2': return '2003'\n case 'NT 6.0': return 'Vista'\n case 'NT 6.1': return '7'\n case 'NT 6.2': return '8'\n case 'NT 6.3': return '8.1'\n case 'NT 10.0': return '10'\n default: return undefined\n }\n }\n\n // OS version extraction\n var osVersion = '';\n if (result.windows) {\n osVersion = getWindowsVersion(getFirstMatch(/Windows ((NT|XP)( \\d\\d?.\\d)?)/i))\n } else if (result.windowsphone) {\n osVersion = getFirstMatch(/windows phone (?:os)?\\s?(\\d+(\\.\\d+)*)/i);\n } else if (result.mac) {\n osVersion = getFirstMatch(/Mac OS X (\\d+([_\\.\\s]\\d+)*)/i);\n osVersion = osVersion.replace(/[_\\s]/g, '.');\n } else if (iosdevice) {\n osVersion = getFirstMatch(/os (\\d+([_\\s]\\d+)*) like mac os x/i);\n osVersion = osVersion.replace(/[_\\s]/g, '.');\n } else if (android) {\n osVersion = getFirstMatch(/android[ \\/-](\\d+(\\.\\d+)*)/i);\n } else if (result.webos) {\n osVersion = getFirstMatch(/(?:web|hpw)os\\/(\\d+(\\.\\d+)*)/i);\n } else if (result.blackberry) {\n osVersion = getFirstMatch(/rim\\stablet\\sos\\s(\\d+(\\.\\d+)*)/i);\n } else if (result.bada) {\n osVersion = getFirstMatch(/bada\\/(\\d+(\\.\\d+)*)/i);\n } else if (result.tizen) {\n osVersion = getFirstMatch(/tizen[\\/\\s](\\d+(\\.\\d+)*)/i);\n }\n if (osVersion) {\n result.osversion = osVersion;\n }\n\n // device type extraction\n var osMajorVersion = !result.windows && osVersion.split('.')[0];\n if (\n tablet\n || nexusTablet\n || iosdevice == 'ipad'\n || (android && (osMajorVersion == 3 || (osMajorVersion >= 4 && !mobile)))\n || result.silk\n ) {\n result.tablet = t\n } else if (\n mobile\n || iosdevice == 'iphone'\n || iosdevice == 'ipod'\n || android\n || nexusMobile\n || result.blackberry\n || result.webos\n || result.bada\n ) {\n result.mobile = t\n }\n\n // Graded Browser Support\n // http://developer.yahoo.com/yui/articles/gbs\n if (result.msedge ||\n (result.msie && result.version >= 10) ||\n (result.yandexbrowser && result.version >= 15) ||\n\t\t (result.vivaldi && result.version >= 1.0) ||\n (result.chrome && result.version >= 20) ||\n (result.samsungBrowser && result.version >= 4) ||\n (result.whale && compareVersions([result.version, '1.0']) === 1) ||\n (result.mzbrowser && compareVersions([result.version, '6.0']) === 1) ||\n (result.focus && compareVersions([result.version, '1.0']) === 1) ||\n (result.firefox && result.version >= 20.0) ||\n (result.safari && result.version >= 6) ||\n (result.opera && result.version >= 10.0) ||\n (result.ios && result.osversion && result.osversion.split(\".\")[0] >= 6) ||\n (result.blackberry && result.version >= 10.1)\n || (result.chromium && result.version >= 20)\n ) {\n result.a = t;\n }\n else if ((result.msie && result.version < 10) ||\n (result.chrome && result.version < 20) ||\n (result.firefox && result.version < 20.0) ||\n (result.safari && result.version < 6) ||\n (result.opera && result.version < 10.0) ||\n (result.ios && result.osversion && result.osversion.split(\".\")[0] < 6)\n || (result.chromium && result.version < 20)\n ) {\n result.c = t\n } else result.x = t\n\n return result\n }\n\n var bowser = detect(typeof navigator !== 'undefined' ? navigator.userAgent || '' : '')\n\n bowser.test = function (browserList) {\n for (var i = 0; i < browserList.length; ++i) {\n var browserItem = browserList[i];\n if (typeof browserItem=== 'string') {\n if (browserItem in bowser) {\n return true;\n }\n }\n }\n return false;\n }\n\n /**\n * Get version precisions count\n *\n * @example\n * getVersionPrecision(\"1.10.3\") // 3\n *\n * @param {string} version\n * @return {number}\n */\n function getVersionPrecision(version) {\n return version.split(\".\").length;\n }\n\n /**\n * Array::map polyfill\n *\n * @param {Array} arr\n * @param {Function} iterator\n * @return {Array}\n */\n function map(arr, iterator) {\n var result = [], i;\n if (Array.prototype.map) {\n return Array.prototype.map.call(arr, iterator);\n }\n for (i = 0; i < arr.length; i++) {\n result.push(iterator(arr[i]));\n }\n return result;\n }\n\n /**\n * Calculate browser version weight\n *\n * @example\n * compareVersions(['1.10.2.1', '1.8.2.1.90']) // 1\n * compareVersions(['1.010.2.1', '1.09.2.1.90']); // 1\n * compareVersions(['1.10.2.1', '1.10.2.1']); // 0\n * compareVersions(['1.10.2.1', '1.0800.2']); // -1\n *\n * @param {Array} versions versions to compare\n * @return {Number} comparison result\n */\n function compareVersions(versions) {\n // 1) get common precision for both versions, for example for \"10.0\" and \"9\" it should be 2\n var precision = Math.max(getVersionPrecision(versions[0]), getVersionPrecision(versions[1]));\n var chunks = map(versions, function (version) {\n var delta = precision - getVersionPrecision(version);\n\n // 2) \"9\" -> \"9.0\" (for precision = 2)\n version = version + new Array(delta + 1).join(\".0\");\n\n // 3) \"9.0\" -> [\"000000000\"\", \"000000009\"]\n return map(version.split(\".\"), function (chunk) {\n return new Array(20 - chunk.length).join(\"0\") + chunk;\n }).reverse();\n });\n\n // iterate in reverse order by reversed chunks array\n while (--precision >= 0) {\n // 4) compare: \"000000009\" > \"000000010\" = false (but \"9\" > \"10\" = true)\n if (chunks[0][precision] > chunks[1][precision]) {\n return 1;\n }\n else if (chunks[0][precision] === chunks[1][precision]) {\n if (precision === 0) {\n // all version chunks are same\n return 0;\n }\n }\n else {\n return -1;\n }\n }\n }\n\n /**\n * Check if browser is unsupported\n *\n * @example\n * bowser.isUnsupportedBrowser({\n * msie: \"10\",\n * firefox: \"23\",\n * chrome: \"29\",\n * safari: \"5.1\",\n * opera: \"16\",\n * phantom: \"534\"\n * });\n *\n * @param {Object} minVersions map of minimal version to browser\n * @param {Boolean} [strictMode = false] flag to return false if browser wasn't found in map\n * @param {String} [ua] user agent string\n * @return {Boolean}\n */\n function isUnsupportedBrowser(minVersions, strictMode, ua) {\n var _bowser = bowser;\n\n // make strictMode param optional with ua param usage\n if (typeof strictMode === 'string') {\n ua = strictMode;\n strictMode = void(0);\n }\n\n if (strictMode === void(0)) {\n strictMode = false;\n }\n if (ua) {\n _bowser = detect(ua);\n }\n\n var version = \"\" + _bowser.version;\n for (var browser in minVersions) {\n if (minVersions.hasOwnProperty(browser)) {\n if (_bowser[browser]) {\n if (typeof minVersions[browser] !== 'string') {\n throw new Error('Browser version in the minVersion map should be a string: ' + browser + ': ' + String(minVersions));\n }\n\n // browser version and min supported version.\n return compareVersions([version, minVersions[browser]]) < 0;\n }\n }\n }\n\n return strictMode; // not found\n }\n\n /**\n * Check if browser is supported\n *\n * @param {Object} minVersions map of minimal version to browser\n * @param {Boolean} [strictMode = false] flag to return false if browser wasn't found in map\n * @param {String} [ua] user agent string\n * @return {Boolean}\n */\n function check(minVersions, strictMode, ua) {\n return !isUnsupportedBrowser(minVersions, strictMode, ua);\n }\n\n bowser.isUnsupportedBrowser = isUnsupportedBrowser;\n bowser.compareVersions = compareVersions;\n bowser.check = check;\n\n /*\n * Set our detect method to the main bowser object so we can\n * reuse it to test other user agents.\n * This is needed to implement future tests.\n */\n bowser._detect = detect;\n\n /*\n * Set our detect public method to the main bowser object\n * This is needed to implement bowser in server side\n */\n bowser.detect = detect;\n return bowser\n});\n","var Helpers = require('./helpers')\r\nvar App = require('./app');\r\nvar polyfills = require('./polyfills');\r\n\r\npolyfills.applyPolyfills();\r\n\r\nvar instance;\r\n\r\nmodule.exports = (function () {\r\n var getInstance = function () {\r\n if (!instance) {\r\n instance = new App();\r\n }\r\n return instance;\r\n };\r\n\r\n return Object.assign(Helpers.zipObject(['init', 'open', 'close', 'on', 'off', 'sendMessage', 'onMessage'].map(function (methodName) {\r\n var app = getInstance();\r\n return [methodName, function () {\r\n return app[methodName].apply(app, arguments);\r\n }];\r\n })), {\r\n eventTypes: App.eventTypes,\r\n });\r\n})();\r\n"],"sourceRoot":"."} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index a26a641..f2a9fa8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "xsolla-paystation-widget", - "version": "1.2.9", + "version": "1.2.11", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 7b95b61..625c31d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xsolla-paystation-widget", - "version": "1.2.10", + "version": "1.2.11", "description": "PayStation 3 Integration Widget", "scripts": { "build": "gulp build", diff --git a/src/childwindow.js b/src/childwindow.js index c2d4278..92bf717 100644 --- a/src/childwindow.js +++ b/src/childwindow.js @@ -34,16 +34,18 @@ module.exports = (function () { var that = this; var addHandlers = function () { - that.on('close', function handleClose() { + function closeChildWindow() { + that.off('close', closeChildWindow) + if (timer) { global.clearTimeout(timer); } if (that.childWindow) { that.childWindow.close(); } + } - that.off('close', handleClose) - }); + that.on('close', closeChildWindow); // Cross-window communication that.message = new PostMessage(that.childWindow); @@ -58,9 +60,9 @@ module.exports = (function () { that.message.on('status', function (event) { that.triggerEvent('status', event.detail); }); - that.on('close', function handleClose() { - that.message.off(); - that.off('close', handleClose); + that.message.on('close', function handleClose() { + closeChildWindow(); + that.message.off('close', handleClose); }); that.message.on('user-country', function (event) { that.triggerEvent('user-country', event.detail);