@paydock/client-sdk 1.104.6-beta → 1.104.9-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/README.md +58 -59
  2. package/bundles/index.cjs +71 -44
  3. package/bundles/index.cjs.d.ts +12 -12
  4. package/bundles/index.cjs.map +1 -1
  5. package/bundles/index.mjs +71 -44
  6. package/bundles/index.mjs.d.ts +12 -12
  7. package/bundles/index.mjs.map +1 -1
  8. package/bundles/types/api/api-service-internal.d.ts +1 -1
  9. package/bundles/types/api/api-service-internal.d.ts.map +1 -1
  10. package/bundles/types/components/wallet-background.d.ts +2 -1
  11. package/bundles/types/components/wallet-background.d.ts.map +1 -1
  12. package/bundles/types/helper/element-id.d.ts +5 -0
  13. package/bundles/types/helper/element-id.d.ts.map +1 -0
  14. package/bundles/types/secure-remote-commerce/click-to-pay-secure-remote-commerce.d.ts +31 -0
  15. package/bundles/types/secure-remote-commerce/click-to-pay-secure-remote-commerce.d.ts.map +1 -0
  16. package/bundles/types/secure-remote-commerce/index.d.ts +4 -4
  17. package/bundles/types/secure-remote-commerce/index.d.ts.map +1 -1
  18. package/bundles/types/secure-remote-commerce/interfaces.d.ts +4 -4
  19. package/bundles/types/secure-remote-commerce/interfaces.d.ts.map +1 -1
  20. package/bundles/types/secure-remote-commerce/providers/mastercard-src/index.d.ts +1 -1
  21. package/bundles/types/secure-remote-commerce/providers/mastercard-src/mastercard-src.d.ts +4 -4
  22. package/bundles/types/secure-remote-commerce/providers/mastercard-src/mastercard-src.d.ts.map +1 -1
  23. package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts +3 -3
  24. package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts.map +1 -1
  25. package/bundles/types/wallet-buttons/flypay-v2.wallet-service.d.ts +1 -1
  26. package/bundles/types/wallet-buttons/flypay-v2.wallet-service.d.ts.map +1 -1
  27. package/bundles/types/wallet-buttons/helpers/flypay-v2.helper.d.ts +5 -3
  28. package/bundles/types/wallet-buttons/helpers/flypay-v2.helper.d.ts.map +1 -1
  29. package/bundles/widget.umd.js +71 -44
  30. package/bundles/widget.umd.js.d.ts +12 -12
  31. package/bundles/widget.umd.js.map +1 -1
  32. package/bundles/widget.umd.js.min.d.ts +12 -12
  33. package/bundles/widget.umd.min.js +1 -1
  34. package/bundles/widget.umd.min.js.map +1 -1
  35. package/docs/{secure-remote-commerce-examples.md → click-to-pay-examples.md} +18 -19
  36. package/docs/{secure-remote-commerce.md → click-to-pay.md} +40 -40
  37. package/docs/html/layout.html +3 -3
  38. package/package.json +45 -45
  39. package/slate.md +18 -19
  40. package/bundles/types/secure-remote-commerce/mastercard-secure-remote-commerce.d.ts +0 -31
  41. package/bundles/types/secure-remote-commerce/mastercard-secure-remote-commerce.d.ts.map +0 -1
package/bundles/index.mjs CHANGED
@@ -683,7 +683,7 @@ SDK.headerKeys = Object.freeze({
683
683
  version: 'x-sdk-version',
684
684
  type: 'x-sdk-type'
685
685
  });
686
- SDK._version = 'v1.104.6-beta';
686
+ SDK._version = 'v1.104.9-beta';
687
687
 
688
688
  var API_AUTH_TYPE;
689
689
  (function (API_AUTH_TYPE) {
@@ -1502,7 +1502,7 @@ var ApiServiceInternal = /*#__PURE__*/function () {
1502
1502
  var CARD_SCHEME_SERVICE;
1503
1503
  (function (CARD_SCHEME_SERVICE) {
1504
1504
  CARD_SCHEME_SERVICE["VISA_SRC"] = "VisaSRC";
1505
- CARD_SCHEME_SERVICE["MASTERCARD_SRC"] = "MastercardSRCClickToPay";
1505
+ CARD_SCHEME_SERVICE["MASTERCARD_SRC"] = "ClickToPay";
1506
1506
  })(CARD_SCHEME_SERVICE || (CARD_SCHEME_SERVICE = {}));
1507
1507
 
1508
1508
  var ApiInternal = /*#__PURE__*/function (_ApiBase) {
@@ -5425,14 +5425,14 @@ var HtmlPaymentSourceWidget = /*#__PURE__*/function (_PaymentSourceWidget) {
5425
5425
  }(PaymentSourceWidget);
5426
5426
 
5427
5427
  /**
5428
- * List of available event's name in the SRC checkout lifecycle
5428
+ * List of available event's name in the Click To Pay checkout lifecycle
5429
5429
  * @enum EVENT
5430
5430
  *
5431
5431
  * @type {object}
5432
5432
  * @param {string} IFRAME_LOADED=iframeLoaded Initial event sent when IFrame is initially loaded.
5433
5433
  * @param {string} CHECKOUT_READY=checkoutReady Event sent when checkout is loaded and ready to be used by customer. Leverage alongside [showCheckout](#SRC+showCheckout) and [hideCheckout](#SRC+hideCheckout).
5434
- * @param {string} CHECKOUT_POPUP_OPEN=checkoutPopupOpen Event sent when SRC Checkout flow is started, regardless of embedded or windowed mode.
5435
- * @param {string} CHECKOUT_POPUP_CLOSE=checkoutPopupClose Event sent when SRC Checkout flow is closed, regardless of embedded or windowed mode.
5434
+ * @param {string} CHECKOUT_POPUP_OPEN=checkoutPopupOpen Event sent when Click To Pay checkout flow is started, regardless of embedded or windowed mode.
5435
+ * @param {string} CHECKOUT_POPUP_CLOSE=checkoutPopupClose Event sent when Click To Pay checkout flow is closed, regardless of embedded or windowed mode.
5436
5436
  * @param {string} CHECKOUT_COMPLETED=checkoutCompleted Event sent on successful checkout by customer. Check [data](#EventDataCheckoutCompletedData) for more information.
5437
5437
  * @param {string} CHECKOUT_ERROR=checkoutError Event sent on error checkout by customer. Check [data](#EventData) for more information.
5438
5438
  */
@@ -5469,9 +5469,9 @@ var STYLE = {
5469
5469
  ENABLE_SRC_POPUP: 'enable_src_popup'
5470
5470
  };
5471
5471
 
5472
- var MastercardSRC = /*#__PURE__*/function () {
5473
- function MastercardSRC(iframe_selector, service_id, public_key, meta, eventEmitter, autoResize, env, alias) {
5474
- _classCallCheck(this, MastercardSRC);
5472
+ var ClickToPaySRC = /*#__PURE__*/function () {
5473
+ function ClickToPaySRC(iframe_selector, service_id, public_key, meta, eventEmitter, autoResize, env, alias) {
5474
+ _classCallCheck(this, ClickToPaySRC);
5475
5475
  this.meta = meta;
5476
5476
  this.eventEmitter = eventEmitter;
5477
5477
  this.autoResize = autoResize;
@@ -5494,7 +5494,7 @@ var MastercardSRC = /*#__PURE__*/function () {
5494
5494
  this.iFrameEvent = new IFrameEvent(window);
5495
5495
  this.setupIFrameEvents();
5496
5496
  }
5497
- return _createClass(MastercardSRC, [{
5497
+ return _createClass(ClickToPaySRC, [{
5498
5498
  key: "setupIFrameEvents",
5499
5499
  value: function setupIFrameEvents() {
5500
5500
  var _this = this;
@@ -5527,7 +5527,7 @@ var MastercardSRC = /*#__PURE__*/function () {
5527
5527
  value: function load() {
5528
5528
  var _this2 = this;
5529
5529
  this.iFrame.load(this.link.getUrl(), {
5530
- title: 'Mastercard SRC checkout'
5530
+ title: 'Click To Pay checkout'
5531
5531
  });
5532
5532
  var iframeElement = this.iFrame.getElement();
5533
5533
  this.iFrame.setStyle('width', '100%');
@@ -5625,7 +5625,7 @@ var SRC = /*#__PURE__*/function () {
5625
5625
  _this.meta.customizations = _this.style; // assign the style on the start of the widget
5626
5626
  switch (type) {
5627
5627
  case CARD_SCHEME_SERVICE.MASTERCARD_SRC:
5628
- _this.provider = new MastercardSRC(_this.iframe_selector, _this.service_id, _this.public_key_or_access_token, _this.meta, _this.eventEmitter, _this.autoResize, _this.env, _this.alias);
5628
+ _this.provider = new ClickToPaySRC(_this.iframe_selector, _this.service_id, _this.public_key_or_access_token, _this.meta, _this.eventEmitter, _this.autoResize, _this.env, _this.alias);
5629
5629
  break;
5630
5630
  }
5631
5631
  if (_this.provider) _this.provider.load();
@@ -5738,26 +5738,26 @@ var SRC = /*#__PURE__*/function () {
5738
5738
  }();
5739
5739
 
5740
5740
  /**
5741
- * Class MastercardSRCClickToPay include methods for interacting with the MastercardSRC checkout and Manual Card option
5741
+ * Class ClickToPay include methods for interacting with the ClickToPay checkout and Manual Card option
5742
5742
  *
5743
5743
  * @extends SRC
5744
5744
  *
5745
5745
  * @constructor
5746
5746
  *
5747
- * @param {string} iframe_selector - Selector of html element. Container for SRC checkout iFrame.
5747
+ * @param {string} iframe_selector - Selector of html element. Container for Click To Pay checkout iFrame.
5748
5748
  * @param {string} service_id - Card Scheme Service ID
5749
5749
  * @param {string} public_key_or_access_token - Paydock public key or Access Token
5750
- * @param {IMastercardSRCMeta} meta - Data that configures the SRC checkout
5750
+ * @param {IClickToPayMeta} meta - Data that configures the Click To Pay checkout
5751
5751
  * @example
5752
- * var mastercardSRC = new MastercardSRCClickToPay('#checkoutIframe', 'service_id', 'public_key', {});
5752
+ * var mastercardSRC = new ClickToPay('#checkoutIframe', 'service_id', 'public_key', {});
5753
5753
  *
5754
5754
  */
5755
- var MastercardSRCClickToPay = /*#__PURE__*/function (_SRC) {
5755
+ var ClickToPay = /*#__PURE__*/function (_SRC) {
5756
5756
  /** @constructs */ // constructs added for correct parse classes jsdoc2md
5757
- function MastercardSRCClickToPay(iframe_selector, service_id, public_key_or_access_token, meta) {
5757
+ function ClickToPay(iframe_selector, service_id, public_key_or_access_token, meta) {
5758
5758
  var _this;
5759
- _classCallCheck(this, MastercardSRCClickToPay);
5760
- _this = _callSuper(this, MastercardSRCClickToPay, [iframe_selector, service_id, public_key_or_access_token, meta]);
5759
+ _classCallCheck(this, ClickToPay);
5760
+ _this = _callSuper(this, ClickToPay, [iframe_selector, service_id, public_key_or_access_token, meta]);
5761
5761
  _this.iframe_selector = iframe_selector;
5762
5762
  _this.service_id = service_id;
5763
5763
  _this.public_key_or_access_token = public_key_or_access_token;
@@ -5765,16 +5765,16 @@ var MastercardSRCClickToPay = /*#__PURE__*/function (_SRC) {
5765
5765
  return _this;
5766
5766
  }
5767
5767
  /**
5768
- * The final method after configuring the SRC to start the load process of SRC checkout
5768
+ * The final method after configuring the SRC to start the load process of Click To Pay checkout
5769
5769
  *
5770
5770
  */
5771
- _inherits(MastercardSRCClickToPay, _SRC);
5772
- return _createClass(MastercardSRCClickToPay, [{
5771
+ _inherits(ClickToPay, _SRC);
5772
+ return _createClass(ClickToPay, [{
5773
5773
  key: "load",
5774
5774
  value: function load() {
5775
5775
  if (this.provider) return;
5776
5776
  this.meta.customizations = this.style;
5777
- this.provider = new MastercardSRC(this.iframe_selector, this.service_id, this.public_key_or_access_token, this.meta, this.eventEmitter, this.autoResize, this.env, this.alias);
5777
+ this.provider = new ClickToPaySRC(this.iframe_selector, this.service_id, this.public_key_or_access_token, this.meta, this.eventEmitter, this.autoResize, this.env, this.alias);
5778
5778
  this.provider.load();
5779
5779
  }
5780
5780
  }]);
@@ -6036,16 +6036,18 @@ var WalletTrigger = /*#__PURE__*/function (_Trigger) {
6036
6036
  }]);
6037
6037
  }(Trigger);
6038
6038
 
6039
- var TEMPLATE = "\n <div class=\"checkout-container\">\n <div class=\"checkout-bg-logo\"></div>\n <a href=\"#\" data-close>Close</a>\n </div>\n";
6040
- var STYLES = "\n .checkout-bg-logo {\n display: block;\n background: url({{url}}) no-repeat;\n width: 100px;\n height: 50px;\n margin: 0 auto;\n border-radius: 10px;\n background-size: contain;\n }\n\n .checkout-overlay {\n z-index: 2147483647;\n }\n\n .checkout-container [data-close] {\n opacity: 1;\n }\n .checkout-container [data-close]:before,\n .checkout-container [data-close]:after {\n background-color: #fff;\n }\n";
6039
+ var TEMPLATE = "\n <div class=\"checkout-container\">\n <div class=\"checkout-bg-logo\"></div>\n <a href=\"#\" data-continue>Continue</a>\n <a href=\"#\" data-close>Close</a>\n </div>\n";
6040
+ var STYLES = "\n .checkout-bg-logo {\n display: block;\n background: url({{url}}) no-repeat;\n width: 100px;\n height: 50px;\n margin: 0 auto;\n border-radius: 10px;\n background-size: contain;\n }\n [data-continue] {\n margin-top: 24px;\n display: block;\n font-family: Helvetica, sans-serif;\n text-decoration: none;\n color: #fff !important;\n border: 1px solid white;\n width: 100px;\n border-radius: 16px;\n padding: 5px;\n }\n [data-continue]:hover {\n background-color: #f2f2f2;\n border: none;\n color: rgba(0, 0, 0, 0.7) !important;\n }\n .checkout-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n }\n\n .checkout-overlay {\n z-index: 2147483647;\n }\n\n .checkout-container [data-close] {\n opacity: 1;\n }\n .checkout-container [data-close]:before,\n .checkout-container [data-close]:after {\n background-color: #fff;\n }\n";
6041
6041
  var WalletBackground = /*#__PURE__*/function (_Background) {
6042
6042
  function WalletBackground(bgImageUrl) {
6043
6043
  var _this;
6044
6044
  var hideCloseButton = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
6045
+ var hideContinueButton = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
6045
6046
  _classCallCheck(this, WalletBackground);
6046
6047
  _this = _callSuper(this, WalletBackground);
6047
6048
  _this.bgImageUrl = bgImageUrl;
6048
6049
  _this.hideCloseButton = hideCloseButton;
6050
+ _this.hideContinueButton = hideContinueButton;
6049
6051
  _this.imageStyle = null;
6050
6052
  return _this;
6051
6053
  }
@@ -6070,6 +6072,7 @@ var WalletBackground = /*#__PURE__*/function (_Background) {
6070
6072
  var body = document.body || document.getElementsByTagName("body")[0];
6071
6073
  var template = String(TEMPLATE);
6072
6074
  if (this.hideCloseButton === true) template = template.replace('<a href="#" data-close>Close</a>', '');
6075
+ if (this.hideContinueButton === true) template = template.replace('<a href="#" data-continue>Continue</a>', '');
6073
6076
  this.overlay = document.createElement("div");
6074
6077
  this.overlay.classList.add("checkout-overlay");
6075
6078
  this.overlay.setAttribute("checkout-overlay", " ");
@@ -7972,14 +7975,31 @@ var Checkout = class {
7972
7975
  }
7973
7976
  };
7974
7977
 
7975
- function getFlypayV2Button() {
7976
- return "\n <div id=\"loading-overlay\"></div>\n <div class=\"flypay-v2-checkout-btn__wrapper\">\n <svg viewBox=\"0 0 384 48\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_34013_168361)\">\n <rect width=\"384\" height=\"48\" rx=\"24\" fill=\"#212121\"/>\n <path d=\"M134.985 24.6006H132.387V29H129.847V16.7646H135.176C136.404 16.7646 137.384 17.0801 138.114 17.7109C138.845 18.3418 139.21 19.3185 139.21 20.6411C139.21 22.0854 138.845 23.1064 138.114 23.7041C137.384 24.3018 136.341 24.6006 134.985 24.6006ZM136.18 22.0522C136.512 21.759 136.678 21.2941 136.678 20.6577C136.678 20.0213 136.509 19.5675 136.172 19.2964C135.84 19.0252 135.372 18.8896 134.769 18.8896H132.387V22.4922H134.769C135.372 22.4922 135.843 22.3455 136.18 22.0522ZM141.277 20.9316C141.902 20.1348 142.976 19.7363 144.498 19.7363C145.488 19.7363 146.368 19.9328 147.137 20.3257C147.906 20.7186 148.291 21.4601 148.291 22.5503V26.7007C148.291 26.9884 148.297 27.3371 148.308 27.7466C148.324 28.0565 148.371 28.2668 148.449 28.3774C148.526 28.4881 148.642 28.5794 148.797 28.6514V29H146.224C146.152 28.8174 146.102 28.6458 146.075 28.4854C146.047 28.3249 146.025 28.1423 146.008 27.9375C145.682 28.2917 145.306 28.5933 144.879 28.8423C144.37 29.1356 143.795 29.2822 143.153 29.2822C142.334 29.2822 141.656 29.0498 141.119 28.585C140.588 28.1146 140.322 27.4505 140.322 26.5928C140.322 25.4805 140.751 24.6753 141.609 24.1772C142.079 23.9061 142.771 23.7124 143.684 23.5962L144.489 23.4966C144.926 23.4412 145.239 23.3721 145.427 23.2891C145.765 23.1452 145.934 22.9211 145.934 22.6167C145.934 22.2459 145.804 21.9914 145.543 21.853C145.289 21.7091 144.913 21.6372 144.415 21.6372C143.856 21.6372 143.46 21.7756 143.228 22.0522C143.062 22.257 142.951 22.5337 142.896 22.8823H140.613C140.663 22.091 140.884 21.4408 141.277 20.9316ZM143.037 27.29C143.258 27.4727 143.529 27.564 143.85 27.564C144.359 27.564 144.827 27.4146 145.253 27.1157C145.685 26.8169 145.909 26.2718 145.925 25.4805V24.6006C145.776 24.6947 145.624 24.7721 145.469 24.833C145.319 24.8883 145.112 24.9409 144.846 24.9907L144.315 25.0903C143.817 25.1789 143.46 25.2868 143.244 25.4141C142.879 25.6299 142.696 25.9647 142.696 26.4185C142.696 26.8224 142.81 27.113 143.037 27.29ZM154.077 26.626L155.944 19.9521H158.459L155.355 28.8506C154.757 30.5661 154.284 31.6286 153.936 32.0381C153.587 32.4531 152.89 32.6606 151.844 32.6606C151.633 32.6606 151.465 32.6579 151.337 32.6523C151.21 32.6523 151.019 32.644 150.765 32.6274V30.7349L151.063 30.7515C151.296 30.7625 151.517 30.7542 151.728 30.7266C151.938 30.6989 152.115 30.6353 152.259 30.5356C152.397 30.4416 152.524 30.2451 152.641 29.9463C152.762 29.6475 152.812 29.4648 152.79 29.3984L149.47 19.9521H152.101L154.077 26.626ZM171.458 29L170.039 22.4092L168.603 29H166.146L163.606 19.9521H166.146L167.557 26.4434L168.86 19.9521H171.259L172.637 26.4683L174.048 19.9521H176.514L173.891 29H171.458ZM180.257 19.9521V29H177.858V19.9521H180.257ZM180.257 16.6899V18.873H177.858V16.6899H180.257ZM186.699 27.3149V29.083L185.578 29.1245C184.46 29.1632 183.697 28.9696 183.287 28.5435C183.021 28.2723 182.889 27.8545 182.889 27.29V21.7202H181.627V20.0352H182.889V17.5117H185.229V20.0352H186.699V21.7202H185.229V26.5015C185.229 26.8722 185.277 27.1047 185.371 27.1987C185.465 27.2873 185.752 27.3315 186.234 27.3315C186.306 27.3315 186.381 27.3315 186.458 27.3315C186.541 27.326 186.621 27.3205 186.699 27.3149ZM196.394 23.6875V29H193.979V23.4966C193.979 23.0096 193.896 22.6167 193.729 22.3179C193.514 21.8973 193.104 21.687 192.501 21.687C191.876 21.687 191.4 21.8973 191.073 22.3179C190.752 22.7329 190.592 23.3278 190.592 24.1025V29H188.234V16.8062H190.592V21.1309C190.935 20.6051 191.331 20.2399 191.779 20.0352C192.233 19.8249 192.708 19.7197 193.207 19.7197C193.765 19.7197 194.272 19.8166 194.726 20.0103C195.185 20.2039 195.561 20.5 195.854 20.8984C196.104 21.236 196.256 21.5846 196.311 21.9443C196.366 22.2985 196.394 22.8796 196.394 23.6875Z\" fill=\"white\"/>\n <path d=\"M231.702 14.0094C231.71 13.9026 231.673 13.7973 231.601 13.7164C231.529 13.6354 231.428 13.5852 231.318 13.5766C231.296 13.5734 231.272 13.5734 231.25 13.5766H217.787C217.679 13.5725 217.573 13.6092 217.492 13.6791C217.411 13.749 217.362 13.8467 217.353 13.9517C217.344 14.0567 217.378 14.1609 217.446 14.2424C217.515 14.324 217.613 14.3765 217.72 14.3891C217.743 14.3924 217.767 14.3924 217.79 14.3891H231.256C231.367 14.396 231.476 14.3599 231.56 14.2888C231.643 14.2177 231.694 14.1172 231.702 14.0094V14.0094Z\" fill=\"white\"/>\n <path d=\"M226.501 35.2805C226.497 35.3338 226.503 35.3874 226.52 35.4382C226.537 35.4891 226.564 35.5362 226.6 35.5769C226.635 35.6176 226.679 35.6511 226.728 35.6754C226.776 35.6997 226.83 35.7144 226.884 35.7186H240.409C240.52 35.7272 240.629 35.6927 240.714 35.6227C240.798 35.5528 240.85 35.453 240.859 35.3454C240.868 35.2378 240.832 35.1312 240.761 35.049C240.689 34.9668 240.586 34.9158 240.476 34.9072H226.945C226.836 34.8998 226.728 34.9348 226.644 35.0047C226.561 35.0746 226.51 35.1738 226.501 35.2805Z\" fill=\"white\"/>\n <path d=\"M248.245 30.3548L251.02 19.1664C251.211 18.3788 251.052 17.6345 250.576 17.0708C250.109 16.5299 249.402 16.2227 248.578 16.2227H215.233C215.126 16.228 215.025 16.2733 214.951 16.3491C214.877 16.4249 214.836 16.5254 214.836 16.63C214.836 16.7345 214.877 16.8351 214.951 16.9108C215.025 16.9866 215.126 17.0319 215.233 17.0373H248.579C249.134 17.0373 249.597 17.2309 249.894 17.5782C250.203 17.9417 250.304 18.4437 250.172 18.9846L247.397 30.1731C247.112 31.3447 245.867 32.2989 244.622 32.2989H223.787C223.73 32.2961 223.674 32.3045 223.62 32.3237C223.567 32.3428 223.519 32.3724 223.477 32.4105C223.436 32.4486 223.403 32.4945 223.381 32.5453C223.359 32.5961 223.347 32.6509 223.347 32.7062C223.347 32.7616 223.359 32.8163 223.381 32.8671C223.403 32.918 223.436 32.9638 223.477 33.0019C223.519 33.0401 223.567 33.0696 223.62 33.0888C223.674 33.108 223.73 33.1164 223.787 33.1135H244.619C246.249 33.1157 247.876 31.8759 248.245 30.3548Z\" fill=\"white\"/>\n <path d=\"M213.705 16.2227L211.328 16.7625V28.9657H213.715V16.2227H213.705Z\" fill=\"white\"/>\n <path d=\"M218.82 29.0569C219.368 29.0431 219.909 28.9313 220.416 28.7269V30.2112C220.416 31.61 219.6 31.9908 218.89 31.9908H218.3V34.3406H218.896C221.322 34.3406 222.826 32.7579 222.826 30.2112V20.3945L220.416 20.9355V24.9762C220.416 26.0872 219.879 26.7071 218.823 26.7071C217.768 26.7071 217.231 26.0894 217.231 24.9762V20.3978L214.82 20.9387V24.9794C214.817 27.3822 216.427 29.0569 218.82 29.0569Z\" fill=\"white\"/>\n <path d=\"M206.282 22.6056H209.279V20.4765H206.282V20.4667H206.264C206.272 19.2951 207.062 18.3409 208.655 18.3409H210.542V16.2227H208.655C205.366 16.2227 203.906 18.1202 203.898 20.4635V28.9657H206.282V22.6056Z\" fill=\"white\"/>\n <path d=\"M226.233 28.9713L226.93 26.3749H228.558C229.111 26.3815 229.663 26.3086 230.195 26.1585C230.671 26.0264 231.117 25.806 231.508 25.5094C231.877 25.2255 232.178 24.8662 232.39 24.4568C232.613 24.0151 232.725 23.5276 232.715 23.0352C232.715 22.3017 232.493 21.7154 232.049 21.2761C231.742 20.9673 231.36 20.7386 230.939 20.6108C230.43 20.4649 229.901 20.3963 229.371 20.4074H226.652L224.352 28.9605H226.23L226.233 28.9713ZM229.302 22.1124C229.541 22.1057 229.778 22.1367 230.006 22.2044C230.186 22.2621 230.348 22.3612 230.48 22.4932C230.574 22.587 230.647 22.6982 230.695 22.8201C230.744 22.942 230.767 23.0722 230.762 23.2029C230.773 23.4234 230.726 23.6428 230.626 23.8407C230.525 24.0385 230.375 24.2081 230.188 24.3334C229.804 24.5985 229.3 24.7305 228.669 24.7305H227.386L228.084 22.1156H229.305L229.302 22.1124Z\" fill=\"white\"/>\n <path d=\"M230.516 28.9656H232.546L233.843 27.0475H237.462L237.731 28.9656H239.665L238.306 20.3477H236.498L230.516 28.9656ZM236.85 22.5752L237.239 25.4031H234.965L236.85 22.5752Z\" fill=\"white\"/>\n <path d=\"M241.671 25.5911L240.765 28.9632H242.651L243.518 25.761L248.204 20.4102H248.201H245.929L242.992 23.9543L241.989 20.4102H239.898L241.671 25.5911Z\" fill=\"white\"/>\n </g>\n <defs>\n <clipPath id=\"clip0_34013_168361\">\n <rect width=\"384\" height=\"48\" rx=\"24\" fill=\"white\"/>\n </clipPath>\n </defs>\n </svg>\n </div>\n ";
7978
+ function getFlypayV2Button(widgetId) {
7979
+ return getButtonWithClassNames('paydock-flypay-button', widgetId);
7977
7980
  }
7978
- function getDisabledFlypayV2Button() {
7979
- return "\n <div id=\"loading-overlay\"></div>\n <div class=\"flypay-v2-checkout-btn-disabled\">\n <svg viewBox=\"0 0 384 48\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_34032_180021)\">\n <rect x=\"0.5\" y=\"0.5\" width=\"383\" height=\"47\" rx=\"23.5\" stroke=\"#212121\"/>\n <path d=\"M134.985 24.6006H132.387V29H129.847V16.7646H135.176C136.404 16.7646 137.384 17.0801 138.114 17.7109C138.845 18.3418 139.21 19.3185 139.21 20.6411C139.21 22.0854 138.845 23.1064 138.114 23.7041C137.384 24.3018 136.341 24.6006 134.985 24.6006ZM136.18 22.0522C136.512 21.759 136.678 21.2941 136.678 20.6577C136.678 20.0213 136.509 19.5675 136.172 19.2964C135.84 19.0252 135.372 18.8896 134.769 18.8896H132.387V22.4922H134.769C135.372 22.4922 135.843 22.3455 136.18 22.0522ZM141.277 20.9316C141.902 20.1348 142.976 19.7363 144.498 19.7363C145.488 19.7363 146.368 19.9328 147.137 20.3257C147.906 20.7186 148.291 21.4601 148.291 22.5503V26.7007C148.291 26.9884 148.297 27.3371 148.308 27.7466C148.324 28.0565 148.371 28.2668 148.449 28.3774C148.526 28.4881 148.642 28.5794 148.797 28.6514V29H146.224C146.152 28.8174 146.102 28.6458 146.075 28.4854C146.047 28.3249 146.025 28.1423 146.008 27.9375C145.682 28.2917 145.306 28.5933 144.879 28.8423C144.37 29.1356 143.795 29.2822 143.153 29.2822C142.334 29.2822 141.656 29.0498 141.119 28.585C140.588 28.1146 140.322 27.4505 140.322 26.5928C140.322 25.4805 140.751 24.6753 141.609 24.1772C142.079 23.9061 142.771 23.7124 143.684 23.5962L144.489 23.4966C144.926 23.4412 145.239 23.3721 145.427 23.2891C145.765 23.1452 145.934 22.9211 145.934 22.6167C145.934 22.2459 145.804 21.9914 145.543 21.853C145.289 21.7091 144.913 21.6372 144.415 21.6372C143.856 21.6372 143.46 21.7756 143.228 22.0522C143.062 22.257 142.951 22.5337 142.896 22.8823H140.613C140.663 22.091 140.884 21.4408 141.277 20.9316ZM143.037 27.29C143.258 27.4727 143.529 27.564 143.85 27.564C144.359 27.564 144.827 27.4146 145.253 27.1157C145.685 26.8169 145.909 26.2718 145.925 25.4805V24.6006C145.776 24.6947 145.624 24.7721 145.469 24.833C145.319 24.8883 145.112 24.9409 144.846 24.9907L144.315 25.0903C143.817 25.1789 143.46 25.2868 143.244 25.4141C142.879 25.6299 142.696 25.9647 142.696 26.4185C142.696 26.8224 142.81 27.113 143.037 27.29ZM154.077 26.626L155.944 19.9521H158.459L155.355 28.8506C154.757 30.5661 154.284 31.6286 153.936 32.0381C153.587 32.4531 152.89 32.6606 151.844 32.6606C151.633 32.6606 151.465 32.6579 151.337 32.6523C151.21 32.6523 151.019 32.644 150.765 32.6274V30.7349L151.063 30.7515C151.296 30.7625 151.517 30.7542 151.728 30.7266C151.938 30.6989 152.115 30.6353 152.259 30.5356C152.397 30.4416 152.524 30.2451 152.641 29.9463C152.762 29.6475 152.812 29.4648 152.79 29.3984L149.47 19.9521H152.101L154.077 26.626ZM171.458 29L170.039 22.4092L168.603 29H166.146L163.606 19.9521H166.146L167.557 26.4434L168.86 19.9521H171.259L172.637 26.4683L174.048 19.9521H176.514L173.891 29H171.458ZM180.257 19.9521V29H177.858V19.9521H180.257ZM180.257 16.6899V18.873H177.858V16.6899H180.257ZM186.699 27.3149V29.083L185.578 29.1245C184.46 29.1632 183.697 28.9696 183.287 28.5435C183.021 28.2723 182.889 27.8545 182.889 27.29V21.7202H181.627V20.0352H182.889V17.5117H185.229V20.0352H186.699V21.7202H185.229V26.5015C185.229 26.8722 185.277 27.1047 185.371 27.1987C185.465 27.2873 185.752 27.3315 186.234 27.3315C186.306 27.3315 186.381 27.3315 186.458 27.3315C186.541 27.326 186.621 27.3205 186.699 27.3149ZM196.394 23.6875V29H193.979V23.4966C193.979 23.0096 193.896 22.6167 193.729 22.3179C193.514 21.8973 193.104 21.687 192.501 21.687C191.876 21.687 191.4 21.8973 191.073 22.3179C190.752 22.7329 190.592 23.3278 190.592 24.1025V29H188.234V16.8062H190.592V21.1309C190.935 20.6051 191.331 20.2399 191.779 20.0352C192.233 19.8249 192.708 19.7197 193.207 19.7197C193.765 19.7197 194.272 19.8166 194.726 20.0103C195.185 20.2039 195.561 20.5 195.854 20.8984C196.104 21.236 196.256 21.5846 196.311 21.9443C196.366 22.2985 196.394 22.8796 196.394 23.6875Z\" fill=\"#212121\"/>\n <path d=\"M231.702 14.0094C231.71 13.9026 231.673 13.7973 231.601 13.7164C231.529 13.6354 231.428 13.5852 231.318 13.5766C231.296 13.5734 231.272 13.5734 231.25 13.5766H217.787C217.679 13.5725 217.573 13.6092 217.492 13.6791C217.411 13.749 217.362 13.8467 217.353 13.9517C217.344 14.0567 217.378 14.1609 217.446 14.2424C217.515 14.324 217.613 14.3765 217.72 14.3891C217.743 14.3924 217.767 14.3924 217.79 14.3891H231.256C231.367 14.396 231.476 14.3599 231.56 14.2888C231.643 14.2177 231.694 14.1172 231.702 14.0094V14.0094Z\" fill=\"#212121\"/>\n <path d=\"M226.501 35.2805C226.497 35.3338 226.503 35.3874 226.52 35.4382C226.537 35.4891 226.564 35.5362 226.6 35.5769C226.635 35.6176 226.679 35.6511 226.728 35.6754C226.776 35.6997 226.83 35.7144 226.884 35.7186H240.409C240.52 35.7272 240.629 35.6927 240.714 35.6227C240.798 35.5528 240.85 35.453 240.859 35.3454C240.868 35.2378 240.832 35.1312 240.761 35.049C240.689 34.9668 240.586 34.9158 240.476 34.9072H226.945C226.836 34.8998 226.728 34.9348 226.644 35.0047C226.561 35.0746 226.51 35.1738 226.501 35.2805Z\" fill=\"#212121\"/>\n <path d=\"M248.245 30.3548L251.02 19.1664C251.211 18.3788 251.052 17.6345 250.576 17.0708C250.109 16.5299 249.402 16.2227 248.578 16.2227H215.233C215.126 16.228 215.025 16.2733 214.951 16.3491C214.877 16.4249 214.836 16.5254 214.836 16.63C214.836 16.7345 214.877 16.8351 214.951 16.9108C215.025 16.9866 215.126 17.0319 215.233 17.0373H248.579C249.134 17.0373 249.597 17.2309 249.894 17.5782C250.203 17.9417 250.304 18.4437 250.172 18.9846L247.397 30.1731C247.112 31.3447 245.867 32.2989 244.622 32.2989H223.787C223.73 32.2961 223.674 32.3045 223.62 32.3237C223.567 32.3428 223.519 32.3724 223.477 32.4105C223.436 32.4486 223.403 32.4945 223.381 32.5453C223.359 32.5961 223.347 32.6509 223.347 32.7062C223.347 32.7616 223.359 32.8163 223.381 32.8671C223.403 32.918 223.436 32.9638 223.477 33.0019C223.519 33.0401 223.567 33.0696 223.62 33.0888C223.674 33.108 223.73 33.1164 223.787 33.1135H244.619C246.249 33.1157 247.876 31.8759 248.245 30.3548Z\" fill=\"#212121\"/>\n <path d=\"M213.705 16.2227L211.328 16.7625V28.9657H213.715V16.2227H213.705Z\" fill=\"#212121\"/>\n <path d=\"M218.82 29.0569C219.368 29.0431 219.909 28.9313 220.416 28.7269V30.2112C220.416 31.61 219.6 31.9908 218.89 31.9908H218.3V34.3406H218.896C221.322 34.3406 222.826 32.7579 222.826 30.2112V20.3945L220.416 20.9355V24.9762C220.416 26.0872 219.879 26.7071 218.823 26.7071C217.768 26.7071 217.231 26.0894 217.231 24.9762V20.3978L214.82 20.9387V24.9794C214.817 27.3822 216.427 29.0569 218.82 29.0569Z\" fill=\"#212121\"/>\n <path d=\"M206.282 22.6056H209.279V20.4765H206.282V20.4667H206.264C206.272 19.2951 207.062 18.3409 208.655 18.3409H210.542V16.2227H208.655C205.366 16.2227 203.906 18.1202 203.898 20.4635V28.9657H206.282V22.6056Z\" fill=\"#212121\"/>\n <path d=\"M226.233 28.9713L226.93 26.3749H228.558C229.111 26.3815 229.663 26.3086 230.195 26.1585C230.671 26.0264 231.117 25.806 231.508 25.5094C231.877 25.2255 232.178 24.8662 232.39 24.4568C232.613 24.0151 232.725 23.5276 232.715 23.0352C232.715 22.3017 232.493 21.7154 232.049 21.2761C231.742 20.9673 231.36 20.7386 230.939 20.6108C230.43 20.4649 229.901 20.3963 229.371 20.4074H226.652L224.352 28.9605H226.23L226.233 28.9713ZM229.302 22.1124C229.541 22.1057 229.778 22.1367 230.006 22.2044C230.186 22.2621 230.348 22.3612 230.48 22.4932C230.574 22.587 230.647 22.6982 230.695 22.8201C230.744 22.942 230.767 23.0722 230.762 23.2029C230.773 23.4234 230.726 23.6428 230.626 23.8407C230.525 24.0385 230.375 24.2081 230.188 24.3334C229.804 24.5985 229.3 24.7305 228.669 24.7305H227.386L228.084 22.1156H229.305L229.302 22.1124Z\" fill=\"#212121\"/>\n <path d=\"M230.516 28.9656H232.546L233.843 27.0475H237.462L237.731 28.9656H239.665L238.306 20.3477H236.498L230.516 28.9656ZM236.85 22.5752L237.239 25.4031H234.965L236.85 22.5752Z\" fill=\"#212121\"/>\n <path d=\"M241.671 25.5911L240.765 28.9632H242.651L243.518 25.761L248.204 20.4102H248.201H245.929L242.992 23.9543L241.989 20.4102H239.898L241.671 25.5911Z\" fill=\"#212121\"/>\n </g>\n <defs>\n <clipPath id=\"clip0_34032_180021\">\n <rect width=\"384\" height=\"48\" rx=\"24\" fill=\"white\"/>\n </clipPath>\n </defs>\n </svg>\n </div>\n ";
7981
+ function getDisabledFlypayV2Button(widgetId) {
7982
+ return getButtonWithClassNames('paydock-flypay-button paydock-flypay-button__disabled', widgetId);
7980
7983
  }
7981
- function createFlypayV2ButtonStyle(containerId) {
7982
- return "\n ".concat(containerId, " {\n position: relative;\n }\n\n #loading-overlay {\n position: absolute;\n height: 100%;\n width: 100%;\n background: rgba(255, 255, 255, 0.7);\n display: none;\n justify-content: center;\n align-items: center;\n cursor: not-allowed; /* Make it look not clickable */\n }\n\n #loading-overlay::after {\n content: \"\";\n height: 60%;\n aspect-ratio: 1 / 1;\n display: inline-block;\n border: 4px solid #ccc;\n border-top-color: #333;\n border-radius: 50%;\n\n /* Vendor prefixes for animation property */\n -webkit-animation: spin 1s infinite linear;\n -moz-animation: spin 1s infinite linear;\n -o-animation: spin 1s infinite linear;\n animation: spin 1s infinite linear;\n }\n\n @-webkit-keyframes spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n }\n\n @-moz-keyframes spin {\n 0% {\n -moz-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -moz-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n }\n\n @-o-keyframes spin {\n 0% {\n -o-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -o-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n }\n\n @keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n\n .flypay-v2-checkout-btn {\n width: 100%;\n height: fit-content;\n border: none; /* Remove borders */\n background: transparent; /* Make the button background transparent */\n cursor: pointer; /* Make it look clickable */\n outline: none; /* Remove focus outline */\n padding: 0; /* Remove any default padding */\n }\n\n .flypay-v2-checkout-btn-disabled {\n width: 100%;\n height: fit-content;\n border: none; /* Remove borders */\n background: transparent; /* Make the button background transparent */\n cursor: not-allowed; /* Make it look not clickable */\n outline: none; /* Remove focus outline */\n padding: 0; /* Remove any default padding */\n }\n ");
7984
+ function getWidgetClassName(widgetId) {
7985
+ return "flypay-v2-checkout-btn__wrapper__".concat(widgetId);
7986
+ }
7987
+ function getOverlayId(widgetId) {
7988
+ return "".concat(widgetId, "-loading-overlay");
7989
+ }
7990
+ function createFlypayV2ButtonStyle(widgetId) {
7991
+ var widgetClassName = getWidgetClassName(widgetId);
7992
+ return "\n .".concat(widgetClassName, " {\n position: relative;\n height: 100%;\n width: 100%;\n border: none; /* Remove borders */\n background: transparent; /* Make the button background transparent */\n cursor: pointer; /* Make it look clickable */\n outline: none; /* Remove focus outline */\n padding: 0; /* Remove any default padding */\n }\n\n .").concat(widgetClassName, " .paydock-flypay-button {\n background-color: #212121;\n border-radius: 9999px;\n width: 100%; /* set hard pixel dimensions here for a button with intrinsic dimensions */\n height: 100%; /* and leave the 100% settings for the Coles use case (enabled by extra param object flag) */\n display: grid;\n grid-template-columns: 20% 1fr 20%;\n grid-template-rows: 20% 1fr 20%;\n grid-template-areas:\n \". . .\"\n \". center .\"\n \". . .\";\n box-sizing: border-box;\n }\n \n .").concat(widgetClassName, " .paydock-flypay-button:hover {\n background-color: #3d3d3d;\n }\n \n .").concat(widgetClassName, " .paydock-flypay-button:focus-visible {\n outline-color: transparent;\n box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #2670ee;\n outline-color: transparent;\n }\n \n .").concat(widgetClassName, " .paydock-flypay-button:active {\n background-color: #6f6f6f;\n }\n \n .").concat(widgetClassName, " .paydock-flypay-button:disabled,\n .").concat(widgetClassName, " .paydock-flypay-button__disabled {\n opacity: 25%;\n cursor: not-allowed;\n }\n \n #").concat(widgetId, "-loading-overlay {\n position: absolute;\n height: 100%;\n width: 100%;\n background: rgba(255, 255, 255, 0.7);\n display: none;\n justify-content: center;\n align-items: center;\n cursor: not-allowed; /* Make it look not clickable */ \n }\n \n #").concat(widgetId, "-loading-overlay::after {\n content: \"\";\n height: 60%;\n aspect-ratio: 1 / 1;\n display: inline-block;\n border: 4px solid #ccc;\n border-top-color: #333;\n border-radius: 50%;\n /* Vendor prefixes for animation property */\n -webkit-animation: spin 1s infinite linear;\n -moz-animation: spin 1s infinite linear;\n -o-animation: spin 1s infinite linear;\n animation: spin 1s infinite linear;\n }\n \n @-webkit-keyframes spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); \n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n }\n \n @-moz-keyframes spin {\n 0% {\n -moz-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -moz-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n }\n \n @-o-keyframes spin {\n 0% {\n -o-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -o-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n }\n \n @keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n } \n ");
7993
+ }
7994
+ function getButtonWithClassNames(classNames, containerId) {
7995
+ return "\n <div id=\"".concat(containerId, "-loading-overlay\"></div>\n <div class=\"").concat(classNames, "\" tabindex=\"0\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 125.2 21\" data-name=\"pay-with-flypay\"\n style=\"grid-area: center; width: 100%; height: 100%\"\n fill=\"none\"\n >\n <path\n fill=\"#fff\"\n d=\"M89 .5a.5.5 0 0 1 .5-.5h15a.5.5 0 0 1 0 1h-15a.5.5 0 0 1-.5-.5ZM98 22.5a.5.5 0 0 1 .5-.5h15a.5.5 0 0 1 0 1h-15a.5.5 0 0 1-.5-.5ZM87 3.5a.5.5 0 0 1 .5-.5H121c.758 0 1.42.031 1.974.133.553.102 1.044.284 1.421.618.78.694.849 1.829.598 3.331-.258 1.552-1.025 3.843-1.711 5.715a100.003 100.003 0 0 1-1.211 3.128l-.081.198-.021.051v.001c-.531 1.583-1.345 2.557-2.269 3.126-.92.566-1.898.699-2.7.699H96.5a.5.5 0 1 1 0-1v.5-.5H117c.698 0 1.47-.117 2.175-.55.697-.43 1.382-1.2 1.851-2.608l.005-.017.008-.018.006-.016.021-.05.079-.194a94.823 94.823 0 0 0 1.198-3.094c.689-1.878 1.422-4.087 1.664-5.535.249-1.498.068-2.113-.277-2.42-.186-.165-.476-.296-.938-.381C122.33 4.03 121.742 4 121 4H87.5a.5.5 0 0 1-.5-.5ZM76.512 9.512h3.157V7.34h-3.157v-.01h-.02c.01-1.196.841-2.17 2.52-2.17H81V3h-1.988C75.547 3 74.008 4.936 74 7.326V16h2.512V9.512ZM82 3.55 84.987 3H85v13h-3V3.55Z\"\n />\n <path\n fill=\"#fff\"\n d=\"M91.592 15.365a4.557 4.557 0 0 1-1.595.33c-2.391 0-4-1.68-3.997-4.092V7.546l2.41-.543V11.6c0 1.118.536 1.738 1.59 1.738 1.055 0 1.592-.622 1.592-1.738V7.543L94 7v9.855C94 19.41 92.497 21 90.073 21h-.596v-2.359h.59c.71 0 1.525-.641 1.525-1.786v-1.49Z\"\n />\n <path\n fill=\"#fff\"\n fill-rule=\"evenodd\"\n d=\"M2.54 11.6h2.598c1.356 0 2.399-.299 3.129-.896.731-.598 1.096-1.62 1.096-3.063 0-1.323-.365-2.3-1.096-2.93-.73-.631-1.71-.947-2.938-.947H0V16h2.54v-4.4Zm4.291-3.943c0 .637-.166 1.102-.498 1.395-.337.293-.808.44-1.411.44H2.54V5.889h2.382c.603 0 1.071.136 1.403.407.337.271.506.725.506 1.361ZM14.651 6.736c-1.522 0-2.596.398-3.221 1.195-.393.51-.614 1.16-.664 1.95h2.283c.055-.348.166-.624.332-.83.232-.276.628-.414 1.187-.414.498 0 .874.072 1.128.216.261.138.391.392.391.763 0 .305-.169.529-.507.673-.188.083-.501.152-.938.207l-.805.1c-.913.116-1.605.31-2.075.58-.858.499-1.287 1.304-1.287 2.416 0 .858.266 1.522.797 1.993.537.464 1.215.697 2.034.697.642 0 1.217-.147 1.726-.44a4.83 4.83 0 0 0 1.129-.905c.017.205.039.388.067.548.027.16.077.332.149.515h2.573v-.349a.843.843 0 0 1-.348-.274c-.078-.11-.125-.32-.141-.63-.011-.41-.017-.759-.017-1.047V9.55c0-1.09-.385-1.832-1.154-2.225-.769-.393-1.649-.59-2.639-.59Zm-.648 7.828c-.321 0-.592-.092-.813-.274-.227-.177-.341-.468-.341-.872 0-.454.183-.788.548-1.004.216-.128.573-.236 1.071-.324l.531-.1c.266-.05.473-.102.623-.157.155-.061.307-.139.456-.233v.88c-.016.791-.24 1.336-.672 1.635a2.39 2.39 0 0 1-1.403.449Z\"\n clip-rule=\"evenodd\"\n />\n <path\n fill=\"#fff\"\n d=\"m26.097 6.952-1.867 6.674-1.976-6.674h-2.631l3.32 9.446c.022.066-.028.25-.149.548-.117.299-.244.495-.382.59-.144.099-.321.162-.531.19a3.752 3.752 0 0 1-.665.025l-.298-.017v1.893c.254.017.445.025.572.025.128.005.296.008.507.008 1.046 0 1.743-.207 2.092-.622.348-.41.821-1.472 1.419-3.188l3.104-8.898h-2.515ZM40.192 9.409l1.419 6.59h2.433l2.623-9.047h-2.466l-1.411 6.516-1.378-6.516h-2.399l-1.303 6.491-1.411-6.491h-2.54L36.299 16h2.457l1.436-6.591ZM50.41 16V6.952h-2.399V16h2.399ZM50.41 5.873V3.689h-2.399v2.184h2.399ZM56.852 16.083v-1.768l-.241.016h-.224c-.482 0-.769-.044-.863-.133-.094-.094-.142-.326-.142-.697V8.72h1.47V7.035h-1.47V4.51h-2.34v2.524H51.78V8.72h1.262v5.57c0 .564.132.982.398 1.253.41.426 1.173.62 2.291.581l1.121-.041ZM66.547 16v-5.313c0-.808-.028-1.389-.083-1.743a2.347 2.347 0 0 0-.457-1.046 2.656 2.656 0 0 0-1.128-.888 3.836 3.836 0 0 0-1.519-.29c-.499 0-.974.104-1.428.315-.448.204-.844.57-1.187 1.095V3.806h-2.358V16h2.358v-4.898c0-.775.16-1.37.481-1.785.327-.42.803-.63 1.428-.63.603 0 1.013.21 1.228.63.167.3.25.692.25 1.18V16h2.415Z\"\n />\n <path\n fill=\"#fff\"\n fill-rule=\"evenodd\"\n d=\"M103 16h1.997l1.276-2.003h3.56l.265 2.003H112l-1.337-9h-1.778L103 16Zm6.231-6.674.383 2.954h-2.237l1.854-2.954ZM98.02 16l.754-2.72h1.752a6.36 6.36 0 0 0 1.762-.228c.512-.139.992-.37 1.412-.683.398-.299.721-.677.95-1.107.24-.465.36-.978.349-1.496 0-.772-.239-1.389-.716-1.85a2.871 2.871 0 0 0-1.195-.7A5.816 5.816 0 0 0 101.401 7h-2.926L96 16h2.02Zm3.307-7.205c.257-.007.512.026.757.097.194.06.368.165.51.304.101.098.18.215.232.344a.977.977 0 0 1 .072.402c.012.232-.039.463-.147.671-.108.209-.27.387-.471.519-.413.279-.955.418-1.635.418h-1.38l.751-2.752h1.314l-.003-.003Z\"\n clip-rule=\"evenodd\"\n />\n <path\n fill=\"#fff\"\n d=\"m113.439 16 .982-3.548L112.5 7h2.266l1.087 3.73L119.112 7h2.388l-5.078 5.63-.939 3.37h-2.044Z\"\n />\n </svg>\n </div>\n ");
7996
+ }
7997
+
7998
+ /**
7999
+ * Generate a unique id compatible with HTML element id
8000
+ */
8001
+ function getUniqueId() {
8002
+ return Math.random().toString(36).replace(/[^a-z]+/g, '').substr(2, 10);
7983
8003
  }
7984
8004
 
7985
8005
  var FlypayV2WalletService = /*#__PURE__*/function (_WalletService) {
@@ -7987,10 +8007,15 @@ var FlypayV2WalletService = /*#__PURE__*/function (_WalletService) {
7987
8007
  var _this;
7988
8008
  _classCallCheck(this, FlypayV2WalletService);
7989
8009
  _this = _callSuper(this, FlypayV2WalletService, [publicKey, meta]);
8010
+ // Unique id for the widget in order to avoid conflicts with other widgets on the same page
8011
+ // Also, used as the id for the button element
8012
+ _this.widgetId = getUniqueId();
7990
8013
  _this.onFlypayV2ButtonClick = function () {
7991
8014
  var setLoadingOverlayDisplay = function setLoadingOverlayDisplay(displayStyle) {
7992
- var loadingOverlay = document.getElementById('loading-overlay');
7993
- if (loadingOverlay) loadingOverlay.style.display = displayStyle;
8015
+ var loadingOverlay = document.getElementById(getOverlayId(_this.widgetId));
8016
+ if (loadingOverlay) {
8017
+ loadingOverlay.style.display = displayStyle;
8018
+ }
7994
8019
  };
7995
8020
  _this.disable();
7996
8021
  setLoadingOverlayDisplay('flex');
@@ -8039,7 +8064,6 @@ var FlypayV2WalletService = /*#__PURE__*/function (_WalletService) {
8039
8064
  return _createClass(FlypayV2WalletService, [{
8040
8065
  key: "load",
8041
8066
  value: function load(container) {
8042
- this.containerId = container.getSelector();
8043
8067
  this.mount(container);
8044
8068
  }
8045
8069
  }, {
@@ -8051,19 +8075,19 @@ var FlypayV2WalletService = /*#__PURE__*/function (_WalletService) {
8051
8075
  }, {
8052
8076
  key: "enable",
8053
8077
  value: function enable() {
8054
- var button = document.getElementById('flypay-v2-button');
8078
+ var button = document.getElementById(this.widgetId);
8055
8079
  if (button) {
8056
8080
  button.disabled = false;
8057
- this.flypayV2Button.innerHTML = getFlypayV2Button();
8081
+ this.flypayV2Button.innerHTML = getFlypayV2Button(this.widgetId);
8058
8082
  }
8059
8083
  }
8060
8084
  }, {
8061
8085
  key: "disable",
8062
8086
  value: function disable() {
8063
- var button = document.getElementById('flypay-v2-button');
8087
+ var button = document.getElementById(this.widgetId);
8064
8088
  if (button) {
8065
8089
  button.disabled = true;
8066
- this.flypayV2Button.innerHTML = getDisabledFlypayV2Button();
8090
+ this.flypayV2Button.innerHTML = getDisabledFlypayV2Button(this.widgetId);
8067
8091
  }
8068
8092
  }
8069
8093
  }, {
@@ -8077,14 +8101,14 @@ var FlypayV2WalletService = /*#__PURE__*/function (_WalletService) {
8077
8101
  key: "getButton",
8078
8102
  value: function getButton() {
8079
8103
  var style = document.createElement('style');
8080
- style.innerHTML = createFlypayV2ButtonStyle(this.containerId);
8104
+ style.innerHTML = createFlypayV2ButtonStyle(this.widgetId);
8081
8105
  document.head.appendChild(style);
8082
8106
  this.flypayV2Button = document.createElement('button');
8083
- this.flypayV2Button.classList.add('flypay-v2-checkout-btn');
8107
+ this.flypayV2Button.classList.add(getWidgetClassName(this.widgetId));
8084
8108
  this.flypayV2Button.setAttribute('type', 'button');
8085
8109
  this.flypayV2Button.setAttribute('aria-label', 'Pay with flypay');
8086
- this.flypayV2Button.setAttribute('id', 'flypay-v2-button');
8087
- this.flypayV2Button.innerHTML = getFlypayV2Button();
8110
+ this.flypayV2Button.setAttribute('id', this.widgetId);
8111
+ this.flypayV2Button.innerHTML = getFlypayV2Button(this.widgetId);
8088
8112
  return this.flypayV2Button;
8089
8113
  }
8090
8114
  }, {
@@ -8181,7 +8205,7 @@ var FlypayV2WalletService = /*#__PURE__*/function (_WalletService) {
8181
8205
  key: "initBackground",
8182
8206
  value: function initBackground() {
8183
8207
  var _this5 = this;
8184
- var bg = new WalletBackground(this.link.getNetUrl() + FLYPAY_LOGO_LINK);
8208
+ var bg = new WalletBackground(this.link.getNetUrl() + FLYPAY_LOGO_LINK, false, false);
8185
8209
  bg.setBackdropTitle("");
8186
8210
  bg.setBackdropDescription("");
8187
8211
  bg.onTrigger(TRIGGER$2.CLOSE, function () {
@@ -8190,6 +8214,9 @@ var FlypayV2WalletService = /*#__PURE__*/function (_WalletService) {
8190
8214
  (_a = _this5.background) === null || _a === void 0 ? void 0 : _a.clear();
8191
8215
  _this5.enable();
8192
8216
  });
8217
+ bg.onTrigger(TRIGGER$2.FOCUS, function () {
8218
+ return _this5.checkout.open();
8219
+ });
8193
8220
  return bg;
8194
8221
  }
8195
8222
  }]);
@@ -10420,5 +10447,5 @@ var HtmlWidget = /*#__PURE__*/function (_HtmlMultiWidget) {
10420
10447
  }]);
10421
10448
  }(HtmlMultiWidget);
10422
10449
 
10423
- export { AfterpayCheckoutButton, Api, CHECKOUT_BUTTON_EVENT, Canvas3ds, Configuration, ELEMENT, EVENT$2 as EVENT, Builder$1 as ExternalCheckoutBuilder, Checker as ExternalCheckoutChecker, FORM_FIELD, HtmlMultiWidget, HtmlPaymentSourceWidget, HtmlWidget, MastercardSRCClickToPay, MultiWidget, PAYMENT_TYPE, PURPOSE, Builder as PaymentSourceBuilder, PaymentSourceWidget, PaypalCheckoutButton, STYLABLE_ELEMENT, STYLABLE_ELEMENT_STATE, STYLE$2 as STYLE, SUPPORTED_CARD_TYPES, TEXT, TRIGGER$1 as TRIGGER, TYPE, VAULT_DISPLAY_STYLE, VaultDisplayWidget, WalletButtons, ZipmoneyCheckoutButton };
10450
+ export { AfterpayCheckoutButton, Api, CHECKOUT_BUTTON_EVENT, Canvas3ds, ClickToPay, Configuration, ELEMENT, EVENT$2 as EVENT, Builder$1 as ExternalCheckoutBuilder, Checker as ExternalCheckoutChecker, FORM_FIELD, HtmlMultiWidget, HtmlPaymentSourceWidget, HtmlWidget, MultiWidget, PAYMENT_TYPE, PURPOSE, Builder as PaymentSourceBuilder, PaymentSourceWidget, PaypalCheckoutButton, STYLABLE_ELEMENT, STYLABLE_ELEMENT_STATE, STYLE$2 as STYLE, SUPPORTED_CARD_TYPES, TEXT, TRIGGER$1 as TRIGGER, TYPE, VAULT_DISPLAY_STYLE, VaultDisplayWidget, WalletButtons, ZipmoneyCheckoutButton };
10424
10451
  //# sourceMappingURL=index.mjs.map
@@ -1676,7 +1676,7 @@ interface Customer {
1676
1676
  first_name?: string;
1677
1677
  last_name?: string;
1678
1678
  }
1679
- interface IMastercardSRCMeta extends IBaseSRCMeta {
1679
+ interface IClickToPayMeta extends IBaseSRCMeta {
1680
1680
  dpa_data?: IBaseSRCMeta['dpa_data'] & {
1681
1681
  dpa_address?: string;
1682
1682
  dpa_email_address?: string;
@@ -1845,7 +1845,7 @@ declare abstract class SRC {
1845
1845
  protected iframe_selector: string;
1846
1846
  protected service_id: string;
1847
1847
  protected public_key_or_access_token: string;
1848
- protected meta: IMastercardSRCMeta;
1848
+ protected meta: IClickToPayMeta;
1849
1849
  protected eventEmitter: EventEmitter;
1850
1850
  protected env: string;
1851
1851
  protected alias?: string;
@@ -1853,7 +1853,7 @@ declare abstract class SRC {
1853
1853
  protected provider: SRCProvider;
1854
1854
  protected autoResize: boolean;
1855
1855
  protected style: IStyles;
1856
- constructor(iframe_selector: string, service_id: string, public_key_or_access_token: string, meta: IMastercardSRCMeta);
1856
+ constructor(iframe_selector: string, service_id: string, public_key_or_access_token: string, meta: IClickToPayMeta);
1857
1857
  /**
1858
1858
  * Object contain styles for widget - call before `.load()`.
1859
1859
  *
@@ -1923,28 +1923,28 @@ declare abstract class SRC {
1923
1923
  }
1924
1924
 
1925
1925
  /**
1926
- * Class MastercardSRCClickToPay include methods for interacting with the MastercardSRC checkout and Manual Card option
1926
+ * Class ClickToPay include methods for interacting with the ClickToPay checkout and Manual Card option
1927
1927
  *
1928
1928
  * @extends SRC
1929
1929
  *
1930
1930
  * @constructor
1931
1931
  *
1932
- * @param {string} iframe_selector - Selector of html element. Container for SRC checkout iFrame.
1932
+ * @param {string} iframe_selector - Selector of html element. Container for Click To Pay checkout iFrame.
1933
1933
  * @param {string} service_id - Card Scheme Service ID
1934
1934
  * @param {string} public_key_or_access_token - Paydock public key or Access Token
1935
- * @param {IMastercardSRCMeta} meta - Data that configures the SRC checkout
1935
+ * @param {IClickToPayMeta} meta - Data that configures the Click To Pay checkout
1936
1936
  * @example
1937
- * var mastercardSRC = new MastercardSRCClickToPay('#checkoutIframe', 'service_id', 'public_key', {});
1937
+ * var mastercardSRC = new ClickToPay('#checkoutIframe', 'service_id', 'public_key', {});
1938
1938
  *
1939
1939
  */
1940
- declare class MastercardSRCClickToPay extends SRC {
1940
+ declare class ClickToPay extends SRC {
1941
1941
  protected iframe_selector: string;
1942
1942
  protected service_id: string;
1943
1943
  protected public_key_or_access_token: string;
1944
- protected meta: IMastercardSRCMeta;
1945
- /** @constructs */ constructor(iframe_selector: string, service_id: string, public_key_or_access_token: string, meta: IMastercardSRCMeta);
1944
+ protected meta: IClickToPayMeta;
1945
+ /** @constructs */ constructor(iframe_selector: string, service_id: string, public_key_or_access_token: string, meta: IClickToPayMeta);
1946
1946
  /**
1947
- * The final method after configuring the SRC to start the load process of SRC checkout
1947
+ * The final method after configuring the SRC to start the load process of Click To Pay checkout
1948
1948
  *
1949
1949
  */
1950
1950
  load(): void;
@@ -3203,4 +3203,4 @@ declare class HtmlWidget extends HtmlMultiWidget {
3203
3203
  setGiftCardScheme(giftCardScheme: any, processingNetwork: any): void;
3204
3204
  }
3205
3205
 
3206
- export { AfterpayCheckoutButton, Api, CHECKOUT_BUTTON_EVENT, Canvas3ds, Configuration, ELEMENT, EVENT, Builder$1 as ExternalCheckoutBuilder, Checker as ExternalCheckoutChecker, FORM_FIELD, HtmlMultiWidget, HtmlPaymentSourceWidget, HtmlWidget, type ICheckout, type IDetails, type IElementStyleInput, type IEventCheckoutFinishData, type IPayPalMeta, type IStyles$1 as IStyles, type ITexts, MastercardSRCClickToPay, MultiWidget, PAYMENT_TYPE, PURPOSE, Builder as PaymentSourceBuilder, PaymentSourceWidget, PaypalCheckoutButton, STYLABLE_ELEMENT, STYLABLE_ELEMENT_STATE, STYLE, SUPPORTED_CARD_TYPES, TEXT, TRIGGER, TYPE, VAULT_DISPLAY_STYLE, type VaultDisplayStyle, VaultDisplayWidget, WalletButtons, ZipmoneyCheckoutButton };
3206
+ export { AfterpayCheckoutButton, Api, CHECKOUT_BUTTON_EVENT, Canvas3ds, ClickToPay, Configuration, ELEMENT, EVENT, Builder$1 as ExternalCheckoutBuilder, Checker as ExternalCheckoutChecker, FORM_FIELD, HtmlMultiWidget, HtmlPaymentSourceWidget, HtmlWidget, type ICheckout, type IDetails, type IElementStyleInput, type IEventCheckoutFinishData, type IPayPalMeta, type IStyles$1 as IStyles, type ITexts, MultiWidget, PAYMENT_TYPE, PURPOSE, Builder as PaymentSourceBuilder, PaymentSourceWidget, PaypalCheckoutButton, STYLABLE_ELEMENT, STYLABLE_ELEMENT_STATE, STYLE, SUPPORTED_CARD_TYPES, TEXT, TRIGGER, TYPE, VAULT_DISPLAY_STYLE, type VaultDisplayStyle, VaultDisplayWidget, WalletButtons, ZipmoneyCheckoutButton };