choco-one-click-payment 1.1.39 → 1.1.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.choco-one-click-widget{position:fixed;top:0;left:0;right:0;bottom:0;z-index:999999;font-family:Sirius,sans-serif;--choco-widget-accent-color: #2F2F2F;pointer-events:none}.choco-one-click-widget--embedded{position:static;top:auto;left:auto;right:auto;bottom:auto;z-index:auto;pointer-events:auto;min-height:1px}.choco-one-click-widget--embedded .choco-widget-bottom-bar{position:static;box-shadow:none;border-radius:24px}.choco-one-click-widget--embedded .choco-widget-payment-sheet{position:fixed}.choco-one-click-widget *{box-sizing:border-box;font-family:Sirius,sans-serif}.choco-one-click-widget .choco-widget-bottom-bar{opacity:0;transform:translateY(16px)}.choco-one-click-widget .choco-widget-balance-section,.choco-one-click-widget .choco-widget-payment-info{opacity:0;transform:translateY(8px)}.choco-one-click-widget--visible .choco-widget-bottom-bar,.choco-one-click-widget--visible .choco-widget-balance-section,.choco-one-click-widget--visible .choco-widget-payment-info{opacity:1;transform:translateY(0)}.choco-widget-bottom-bar{position:absolute;bottom:0;left:0;right:0;background:#fff;border-radius:24px 24px 0 0;padding:16px;box-shadow:0 -4px 20px #0000001a;transition:transform .24s cubic-bezier(.4,0,.2,1),opacity .2s ease;pointer-events:auto}.choco-widget-payment-info{display:flex;flex-direction:column;gap:12px;align-items:stretch;transition:transform .22s ease,opacity .2s ease}.choco-widget-payment-info-main{display:flex;gap:12px;align-items:center}.choco-widget-payment-method{gap:12px;background:#f1f2f7;border-radius:16px;padding:5px 8px;cursor:pointer;transition:background .2s ease;border:none;font-family:inherit;text-align:left;width:100%;position:relative;height:46px}.choco-widget-payment-method:disabled{cursor:not-allowed;pointer-events:none;opacity:.5}.choco-widget-payment-method.google_pay,.choco-widget-payment-method.apple_pay{max-width:140px}.choco-widget-method-icon-placeholder{font-size:24px}.choco-widget-method-details{flex:1}.choco-widget-method-label{font-size:14px;color:#000}.choco-widget-method-value{font-size:14px;font-weight:600;color:#000;display:flex;align-items:center;gap:4px}.choco-widget-method-icon-wrapper svg{display:block;width:100%;max-width:29px;max-height:18px;margin-top:2px}.choco-widget-method-icon-wrapper:empty{display:none}.choco-widget-method-icon-wrapper.google_pay svg{height:17px;max-width:35px;border:1px solid #3C4043;padding:3px 4px 2px;border-radius:8px}.choco-widget-method-name{font-size:14px;font-weight:700}.choco-widget-method-name.google_pay,.choco-widget-method-name.apple_pay{display:none}.choco-widget-method-chevron{position:absolute;right:5px;top:0;bottom:0;margin:auto 0;width:24px;height:24px}.choco-widget-pay-button{background:var(--choco-widget-accent-color);color:#fff;border:none;border-radius:16px;height:46px;padding:0 16px;font-size:16px;font-weight:600;cursor:pointer;transition:all .2s ease;white-space:nowrap;width:100%;overflow:hidden}.choco-widget-pay-button--loading{cursor:not-allowed;pointer-events:none;position:relative}.choco-widget-pay-button--loading:before{content:"";display:block;width:16px;height:16px;border:2px solid #ffffff;border-top:2px solid transparent;border-radius:50%;animation:choco-spin 1s linear infinite;position:absolute;left:0;right:0;margin:0 auto;z-index:2}.choco-widget-pay-button--loading:after{content:"";display:block;width:100%;height:100%;background:#2f2f2f;position:absolute;left:0;top:0}.choco-widget-pay-button:disabled{opacity:.5;pointer-events:none}.choco-widget-pay-button--hidden{display:none}.choco-widget-google-pay-amount{min-width:124px;height:46px;display:flex;flex-direction:column;justify-content:center;text-align:right;width:100%}.choco-widget-google-pay-amount--hidden{display:none}.choco-widget-google-pay-amount-label{font-size:20px;font-weight:700;line-height:24px;color:#1d1d1d}.choco-widget-google-pay-amount-value{font-size:14px;line-height:18px;color:#1d1d1d;white-space:nowrap;opacity:.5}.choco-widget-google-pay-amount-value--hidden{display:none}.choco-widget-google-pay-amount-value-number{text-decoration:line-through}.choco-widget-google-pay-row--hidden{display:none}.choco-widget-wallet-blocked{pointer-events:none;opacity:.6}.choco-widget-google-pay-button-slot{width:100%}.choco-widget-google-pay-button-slot>button{width:100%!important;height:52px;min-height:52px;border-radius:12px!important;font-size:16px!important}.choco-widget-apple-pay-row--hidden{display:none}.choco-widget-apple-pay-button-slot{width:100%}.choco-widget-apple-pay-button-wrapper{position:relative;width:100%;height:52px}.choco-widget-apple-pay-button{width:100%;height:52px;min-height:52px;border:0;border-radius:12px;cursor:pointer;background:#000;color:#fff;font-size:16px;display:flex;align-items:center;justify-content:center;gap:8px;padding:0 16px}.choco-widget-apple-pay-button--native{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:52px;opacity:.01;z-index:2}.choco-widget-apple-pay-button-overlay{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;gap:8px;background:#000;border-radius:12px;pointer-events:none;z-index:1}.choco-widget-apple-pay-button-text{font-size:16px;line-height:20px;font-weight:600;color:#fff}.choco-widget-apple-pay-button-icon{display:inline-flex;align-items:center;justify-content:center}.choco-widget-payment-sheet{position:absolute;bottom:0;left:0;right:0;top:0;background:#00000080;display:flex;align-items:flex-end;opacity:0;pointer-events:none;transition:opacity .3s ease}.choco-widget-payment-sheet--open{opacity:1;pointer-events:auto}.choco-widget-payment-sheet--open .choco-widget-sheet-content{transform:translateY(0)}.choco-widget-sheet-content{background:#fff;border-radius:24px 24px 0 0;width:100%;max-height:70vh;overflow-y:auto;transform:translateY(100%);transition:transform .3s cubic-bezier(.4,0,.2,1);padding:8px 16px 16px;position:relative;will-change:transform}.choco-widget-sheet-content--dragging{transition:none}.choco-widget-sheet-grabber{flex-shrink:0;display:flex;align-items:center;justify-content:center;cursor:grab;touch-action:none;margin-bottom:8px;-webkit-user-select:none;user-select:none}.choco-widget-sheet-grabber:active{cursor:grabbing}.choco-widget-sheet-grabber:before{content:"";width:72px;height:6px;background:#e5e5e7;border-radius:42px}.choco-widget-sheet-content{-webkit-overflow-scrolling:touch;overscroll-behavior:contain}.choco-widget-sheet-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;position:relative}.choco-widget-sheet-title{font-size:20px;font-weight:700;color:#000;margin:0;flex:1;text-align:center}.choco-widget-payment-sheet--edit .choco-widget-sheet-title{padding-left:30px}.choco-widget-payment-sheet--no-cards .choco-widget-sheet-title{padding-right:30px}.choco-widget-payment-sheet--delete-confirm .choco-widget-sheet-title{padding:0}.choco-widget-sheet-button{background:none;border:none;width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0}.choco-widget-sheet-button svg{color:#000}.choco-widget-sheet-delete-confirm{display:none;padding-top:16px}.choco-widget-payment-sheet--delete-confirm .choco-widget-payment-methods,.choco-widget-payment-sheet--delete-confirm .choco-widget-cashback-section{display:none!important}.choco-widget-payment-sheet--delete-confirm .choco-widget-sheet-delete-confirm{display:block}.choco-widget-sheet-delete-confirm-text{margin:0 0 24px;font-size:16px;line-height:1.4;color:#242424;text-align:center}.choco-widget-sheet-delete-confirm-actions{display:flex;gap:12px}.choco-widget-delete-confirm-btn{flex:1;padding:14px 20px;font-size:16px;font-weight:600;font-family:inherit;border-radius:16px;border:none;cursor:pointer;transition:background .2s ease,opacity .2s ease}.choco-widget-delete-confirm-btn--cancel{background:#f1f2f7;color:#242424}.choco-widget-delete-confirm-btn--delete{background:var(--choco-widget-accent-color);color:#fff}.choco-widget-delete-confirm-btn--loading{cursor:not-allowed;pointer-events:none;position:relative}.choco-widget-sheet-delete-confirm-actions.choco-widget-sheet-delete-confirm-actions--loading .choco-widget-delete-confirm-btn{pointer-events:none;cursor:not-allowed;opacity:.7}.choco-widget-delete-confirm-btn--delete.choco-widget-delete-confirm-btn--loading:before{content:"";display:block;width:16px;height:16px;border:2px solid #ffffff;border-top:2px solid transparent;border-radius:50%;animation:choco-spin 1s linear infinite;position:absolute;left:0;right:0;margin:0 auto;z-index:2}.choco-widget-delete-confirm-btn--delete.choco-widget-delete-confirm-btn--loading:after{content:"";display:block;width:100%;height:100%;background:#cc3434;position:absolute;left:0;top:0;border-radius:16px}.choco-widget-add-card-sheet{align-items:stretch}.choco-widget-add-card-sheet .choco-widget-add-card-sheet-content{max-height:none;height:100%;display:flex;flex-direction:column;transform:none;border-radius:0;padding:0}.choco-widget-add-card-sheet--open .choco-widget-add-card-sheet-content{transform:none}.choco-widget-add-card-sheet .choco-widget-sheet-header{flex-shrink:0;margin-bottom:0;padding:12px 0;border-bottom:1px solid #eee}.choco-widget-add-card-iframe-wrapper{flex:1;min-height:0;background:#fff}.choco-widget-add-card-iframe{width:100%;height:100%;border:none;display:block}.choco-widget-balance-section{margin-bottom:12px;padding:12px 8px;background:#f1f2f7;border-radius:12px;transition:transform .22s ease,opacity .2s ease}.choco-widget-balance-section.disabled{opacity:.5;pointer-events:none}.choco-widget-balance-toggle{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;padding:4px 0}.choco-widget-balance-toggle:last-child{margin-bottom:0}.choco-widget-balance-toggle--disabled{opacity:.5;pointer-events:none}.choco-widget-balance-info{display:flex;align-items:center;gap:12px}.choco-widget-balance-text{display:flex;flex-direction:column}.choco-widget-balance-label-wrapper{display:flex;align-items:center;gap:8px}.choco-widget-balance-label{font-size:16px;font-weight:500}.choco-widget-balance-sublabel{font-size:12px;color:#767485;margin-top:2px}.choco-widget-balance-icon{width:22px;height:22px}.choco-widget-balance-amount{font-size:16px;font-weight:500;color:#000;white-space:nowrap}.choco-widget-toggle{position:relative;display:inline-block;width:42px;height:26px}.choco-widget-toggle input{opacity:0;width:0;height:0}.choco-widget-toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#d4d3df;transition:.3s;border-radius:28px}.choco-widget-toggle-slider:before{position:absolute;content:"";height:22px;width:22px;left:2px;bottom:0;top:0;margin:auto;background-color:#fff;transition:.3s;border-radius:50%}.choco-widget-toggle input:checked+.choco-widget-toggle-slider{background-color:var(--choco-widget-accent-color)}.choco-widget-toggle input:checked+.choco-widget-toggle-slider:before{transform:translate(16px)}.choco-widget-cashback-section{margin-top:20px;padding-top:20px;border-top:1px solid #f0f0f0}.choco-widget-cashback-info{display:flex;align-items:center;gap:8px;padding:12px 16px;background:#fff5ee;border-radius:12px;font-size:14px;color:#ff6b00}.choco-widget-cashback-icon{font-size:20px}.choco-widget-cashback-text strong{font-weight:700}.choco-widget-payment-methods{display:flex;flex-direction:column;gap:8px}.choco-widget-method-item{display:flex;align-items:center;gap:12px;padding:10px 0;cursor:pointer;transition:all .2s ease;border:2px solid transparent;width:100%;border:0;background:none;text-align:left;font-family:inherit;font-size:inherit}.choco-widget-method-item-icon-wrapper{width:37px}.choco-widget-method-item-icon-wrapper svg{display:block;width:100%;max-width:29px;height:29px;margin:0 auto}.choco-widget-method-item-icon-wrapper.google_pay{outline:1px solid #3C4043;padding:3px 5px 2px;border-radius:15px}.choco-widget-method-item-icon-wrapper.google_pay svg{height:15px;max-width:29px}.choco-widget-method-item-label{flex:1;font-size:16px;color:#000}.choco-widget-method-item-check,.choco-widget-method-item-trash-btn{flex-shrink:0;display:flex;align-items:center;justify-content:center;padding:6px;margin:-6px 0 -6px 6px;background:none;border:none;cursor:pointer;border-radius:8px;-webkit-tap-highlight-color:transparent}.choco-widget-method-item-check{height:30px;width:30px}.choco-widget-method-item-trash-btn:hover{background:#cc343414}.choco-widget-method-item-trash{flex-shrink:0;width:20px;height:20px}.choco-widget-bottom-bar-prerender{position:absolute;bottom:0;left:0;right:0;background:#fff;border-radius:24px 24px 0 0;box-shadow:0 -4px 20px #0000001a;transition:transform .3s cubic-bezier(.4,0,.2,1);height:78px}.choco-widget-payment-loading{width:30px;height:30px;animation:choco-spin 1s linear infinite;border:3px solid var(--choco-widget-accent-color);border-top:3px solid transparent;border-radius:50%;position:absolute;top:0;bottom:0;left:0;right:0;margin:auto}@keyframes choco-spin{to{transform:rotate(360deg)}}@keyframes choco-fade-in{0%{opacity:0;transform:translate(-50%,-50%) scale(.9)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}@media(max-width:768px){.choco-widget-bottom-bar{padding:16px 16px 20px}.choco-widget-sheet-content{max-height:80vh}.choco-widget-sheet-title{font-size:18px}.choco-widget-method-item-label{font-size:17px}}@media(max-width:768px)and (min-height:812px){.choco-widget-bottom-bar,.choco-widget-sheet-content{padding-bottom:calc(20px + env(safe-area-inset-bottom,20px))}}@supports (padding: env(safe-area-inset-bottom)){.choco-widget-bottom-bar{padding-bottom:calc(16px + env(safe-area-inset-bottom))}.choco-widget-sheet-content{padding-bottom:calc(20px + env(safe-area-inset-bottom))}}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.choco-one-click-widget{position:fixed;top:0;left:0;right:0;bottom:0;z-index:999999;font-family:Sirius,sans-serif;--choco-widget-accent-color: #2F2F2F;pointer-events:none}.choco-one-click-widget--embedded{position:static;top:auto;left:auto;right:auto;bottom:auto;z-index:auto;pointer-events:auto;min-height:1px}.choco-one-click-widget--embedded .choco-widget-bottom-bar{position:static;box-shadow:none;border-radius:24px}.choco-one-click-widget--embedded .choco-widget-payment-sheet{position:fixed}.choco-one-click-widget *{box-sizing:border-box;font-family:Sirius,sans-serif}.choco-one-click-widget .choco-widget-bottom-bar{opacity:0;transform:translateY(16px)}.choco-one-click-widget .choco-widget-balance-section,.choco-one-click-widget .choco-widget-payment-info{opacity:0;transform:translateY(8px)}.choco-one-click-widget--visible .choco-widget-bottom-bar,.choco-one-click-widget--visible .choco-widget-balance-section,.choco-one-click-widget--visible .choco-widget-payment-info{opacity:1;transform:translateY(0)}.choco-widget-bottom-bar{position:absolute;bottom:0;left:0;right:0;background:#fff;border-radius:24px 24px 0 0;padding:16px;box-shadow:0 -4px 20px #0000001a;transition:transform .24s cubic-bezier(.4,0,.2,1),opacity .2s ease;pointer-events:auto}.choco-widget-payment-info{display:flex;flex-direction:column;gap:12px;align-items:stretch;transition:transform .22s ease,opacity .2s ease}.choco-widget-payment-info-main{display:flex;gap:12px;align-items:center}.choco-widget-payment-method{gap:12px;background:#f1f2f7;border-radius:16px;padding:5px 8px;cursor:pointer;transition:background .2s ease;border:none;font-family:inherit;text-align:left;width:100%;position:relative;height:46px}.choco-widget-payment-method:disabled{cursor:not-allowed;pointer-events:none;opacity:.5}.choco-widget-payment-method.google_pay,.choco-widget-payment-method.apple_pay{max-width:140px}.choco-widget-method-icon-placeholder{font-size:24px}.choco-widget-method-details{flex:1}.choco-widget-method-label{font-size:14px;color:#000}.choco-widget-method-value{font-size:14px;font-weight:600;color:#000;display:flex;align-items:center;gap:4px}.choco-widget-method-icon-wrapper svg{display:block;width:100%;max-width:29px;max-height:18px;margin-top:2px}.choco-widget-method-icon-wrapper:empty{display:none}.choco-widget-method-icon-wrapper.google_pay svg{height:17px;max-width:35px;border:1px solid #3C4043;padding:3px 4px 2px;border-radius:8px}.choco-widget-method-name{font-size:14px;font-weight:700}.choco-widget-method-name.google_pay,.choco-widget-method-name.apple_pay{display:none}.choco-widget-method-chevron{position:absolute;right:5px;top:0;bottom:0;margin:auto 0;width:24px;height:24px}.choco-widget-freedom-card-btn{width:100%;padding:13px;background:linear-gradient(to right,#17678d,#00ca82);border:none;border-radius:16px;font-size:16px;font-weight:700;font-family:inherit;color:#fff;cursor:pointer}.choco-widget-freedom-card-btn:disabled{opacity:.5;pointer-events:none}.choco-widget-pay-button{background:var(--choco-widget-accent-color);color:#fff;border:none;border-radius:16px;height:46px;padding:0 16px;font-size:16px;font-weight:600;cursor:pointer;transition:all .2s ease;white-space:nowrap;width:100%;overflow:hidden}.choco-widget-pay-button--loading{cursor:not-allowed;pointer-events:none;position:relative}.choco-widget-pay-button--loading:before{content:"";display:block;width:16px;height:16px;border:2px solid #ffffff;border-top:2px solid transparent;border-radius:50%;animation:choco-spin 1s linear infinite;position:absolute;left:0;right:0;margin:0 auto;z-index:2}.choco-widget-pay-button--loading:after{content:"";display:block;width:100%;height:100%;background:#2f2f2f;position:absolute;left:0;top:0}.choco-widget-pay-button:disabled{opacity:.5;pointer-events:none}.choco-widget-pay-button--hidden{display:none}.choco-widget-google-pay-amount{min-width:124px;height:46px;display:flex;flex-direction:column;justify-content:center;text-align:right;width:100%}.choco-widget-google-pay-amount--hidden{display:none}.choco-widget-google-pay-amount-label{font-size:20px;font-weight:700;line-height:24px;color:#1d1d1d}.choco-widget-google-pay-amount-value{font-size:14px;line-height:18px;color:#1d1d1d;white-space:nowrap;opacity:.5}.choco-widget-google-pay-amount-value--hidden{display:none}.choco-widget-google-pay-amount-value-number{text-decoration:line-through}.choco-widget-google-pay-row--hidden{display:none}.choco-widget-wallet-blocked{pointer-events:none;opacity:.6}.choco-widget-google-pay-button-slot{width:100%}.choco-widget-google-pay-button-slot>button{width:100%!important;height:52px;min-height:52px;border-radius:12px!important;font-size:16px!important}.choco-widget-apple-pay-row--hidden{display:none}.choco-widget-apple-pay-button-slot{width:100%}.choco-widget-apple-pay-button-wrapper{position:relative;width:100%;height:52px}.choco-widget-apple-pay-button{width:100%;height:52px;min-height:52px;border:0;border-radius:12px;cursor:pointer;background:#000;color:#fff;font-size:16px;display:flex;align-items:center;justify-content:center;gap:8px;padding:0 16px}.choco-widget-apple-pay-button--native{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:52px;opacity:.01;z-index:2}.choco-widget-apple-pay-button-overlay{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;gap:8px;background:#000;border-radius:12px;pointer-events:none;z-index:1}.choco-widget-apple-pay-button-text{font-size:16px;line-height:20px;font-weight:600;color:#fff}.choco-widget-apple-pay-button-icon{display:inline-flex;align-items:center;justify-content:center}.choco-widget-payment-sheet{position:absolute;bottom:0;left:0;right:0;top:0;background:#00000080;display:flex;align-items:flex-end;opacity:0;pointer-events:none;transition:opacity .3s ease}.choco-widget-payment-sheet--open{opacity:1;pointer-events:auto}.choco-widget-payment-sheet--open .choco-widget-sheet-content{transform:translateY(0)}.choco-widget-sheet-content{background:#fff;border-radius:24px 24px 0 0;width:100%;max-height:70vh;overflow-y:auto;transform:translateY(100%);transition:transform .3s cubic-bezier(.4,0,.2,1);padding:8px 16px 16px;position:relative;will-change:transform}.choco-widget-sheet-content--dragging{transition:none}.choco-widget-sheet-grabber{flex-shrink:0;display:flex;align-items:center;justify-content:center;cursor:grab;touch-action:none;margin-bottom:8px;-webkit-user-select:none;user-select:none}.choco-widget-sheet-grabber:active{cursor:grabbing}.choco-widget-sheet-grabber:before{content:"";width:72px;height:6px;background:#e5e5e7;border-radius:42px}.choco-widget-sheet-content{-webkit-overflow-scrolling:touch;overscroll-behavior:contain}.choco-widget-sheet-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;position:relative}.choco-widget-sheet-title{font-size:20px;font-weight:700;color:#000;margin:0;flex:1;text-align:center}.choco-widget-payment-sheet--edit .choco-widget-sheet-title{padding-left:30px}.choco-widget-payment-sheet--no-cards .choco-widget-sheet-title{padding-right:30px}.choco-widget-payment-sheet--delete-confirm .choco-widget-sheet-title{padding:0}.choco-widget-sheet-button{background:none;border:none;width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0}.choco-widget-sheet-button svg{color:#000}.choco-widget-sheet-delete-confirm{display:none;padding-top:16px}.choco-widget-payment-sheet--delete-confirm .choco-widget-payment-methods,.choco-widget-payment-sheet--delete-confirm .choco-widget-cashback-section{display:none!important}.choco-widget-payment-sheet--delete-confirm .choco-widget-sheet-delete-confirm{display:block}.choco-widget-sheet-delete-confirm-text{margin:0 0 24px;font-size:16px;line-height:1.4;color:#242424;text-align:center}.choco-widget-sheet-delete-confirm-actions{display:flex;gap:12px}.choco-widget-delete-confirm-btn{flex:1;padding:14px 20px;font-size:16px;font-weight:600;font-family:inherit;border-radius:16px;border:none;cursor:pointer;transition:background .2s ease,opacity .2s ease}.choco-widget-delete-confirm-btn--cancel{background:#f1f2f7;color:#242424}.choco-widget-delete-confirm-btn--delete{background:var(--choco-widget-accent-color);color:#fff}.choco-widget-delete-confirm-btn--loading{cursor:not-allowed;pointer-events:none;position:relative}.choco-widget-sheet-delete-confirm-actions.choco-widget-sheet-delete-confirm-actions--loading .choco-widget-delete-confirm-btn{pointer-events:none;cursor:not-allowed;opacity:.7}.choco-widget-delete-confirm-btn--delete.choco-widget-delete-confirm-btn--loading:before{content:"";display:block;width:16px;height:16px;border:2px solid #ffffff;border-top:2px solid transparent;border-radius:50%;animation:choco-spin 1s linear infinite;position:absolute;left:0;right:0;margin:0 auto;z-index:2}.choco-widget-delete-confirm-btn--delete.choco-widget-delete-confirm-btn--loading:after{content:"";display:block;width:100%;height:100%;background:#cc3434;position:absolute;left:0;top:0;border-radius:16px}.choco-widget-add-card-sheet{align-items:stretch}.choco-widget-add-card-sheet .choco-widget-add-card-sheet-content{max-height:none;height:100%;display:flex;flex-direction:column;transform:none;border-radius:0;padding:0}.choco-widget-add-card-sheet--open .choco-widget-add-card-sheet-content{transform:none}.choco-widget-add-card-sheet .choco-widget-sheet-header{flex-shrink:0;margin-bottom:0;padding:12px 0;border-bottom:1px solid #eee}.choco-widget-add-card-iframe-wrapper{flex:1;min-height:0;background:#fff}.choco-widget-add-card-iframe{width:100%;height:100%;border:none;display:block}.choco-widget-balance-section{margin-bottom:12px;padding:12px 8px;background:#f1f2f7;border-radius:12px;transition:transform .22s ease,opacity .2s ease}.choco-widget-balance-section.disabled{opacity:.5;pointer-events:none}.choco-widget-balance-toggle{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;padding:4px 0}.choco-widget-balance-toggle:last-child{margin-bottom:0}.choco-widget-balance-toggle--disabled{opacity:.5;pointer-events:none}.choco-widget-balance-info{display:flex;align-items:center;gap:12px}.choco-widget-balance-text{display:flex;flex-direction:column}.choco-widget-balance-label-wrapper{display:flex;align-items:center;gap:8px}.choco-widget-balance-label{font-size:16px;font-weight:500}.choco-widget-balance-sublabel{font-size:12px;color:#767485;margin-top:2px}.choco-widget-balance-icon{width:22px;height:22px}.choco-widget-balance-amount{font-size:16px;font-weight:500;color:#000;white-space:nowrap}.choco-widget-toggle{position:relative;display:inline-block;width:42px;height:26px}.choco-widget-toggle input{opacity:0;width:0;height:0}.choco-widget-toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#d4d3df;transition:.3s;border-radius:28px}.choco-widget-toggle-slider:before{position:absolute;content:"";height:22px;width:22px;left:2px;bottom:0;top:0;margin:auto;background-color:#fff;transition:.3s;border-radius:50%}.choco-widget-toggle input:checked+.choco-widget-toggle-slider{background-color:var(--choco-widget-accent-color)}.choco-widget-toggle input:checked+.choco-widget-toggle-slider:before{transform:translate(16px)}.choco-widget-cashback-section{margin-top:20px;padding-top:20px;border-top:1px solid #f0f0f0}.choco-widget-cashback-info{display:flex;align-items:center;gap:8px;padding:12px 16px;background:#fff5ee;border-radius:12px;font-size:14px;color:#ff6b00}.choco-widget-cashback-icon{font-size:20px}.choco-widget-cashback-text strong{font-weight:700}.choco-widget-payment-methods{display:flex;flex-direction:column;gap:8px}.choco-widget-method-item{display:flex;align-items:center;gap:12px;padding:10px 0;cursor:pointer;transition:all .2s ease;border:2px solid transparent;width:100%;border:0;background:none;text-align:left;font-family:inherit;font-size:inherit}.choco-widget-method-item-icon-wrapper{width:37px}.choco-widget-method-item-icon-wrapper svg{display:block;width:100%;max-width:29px;height:29px;margin:0 auto}.choco-widget-method-item-icon-wrapper.google_pay{outline:1px solid #3C4043;padding:3px 5px 2px;border-radius:15px}.choco-widget-method-item-icon-wrapper.google_pay svg{height:15px;max-width:29px}.choco-widget-method-item-label{flex:1;font-size:16px;color:#000}.choco-widget-method-item-check,.choco-widget-method-item-trash-btn{flex-shrink:0;display:flex;align-items:center;justify-content:center;padding:6px;margin:-6px 0 -6px 6px;background:none;border:none;cursor:pointer;border-radius:8px;-webkit-tap-highlight-color:transparent}.choco-widget-method-item-check{height:30px;width:30px}.choco-widget-method-item-trash-btn:hover{background:#cc343414}.choco-widget-method-item-trash{flex-shrink:0;width:20px;height:20px}.choco-widget-bottom-bar-prerender{position:absolute;bottom:0;left:0;right:0;background:#fff;border-radius:24px 24px 0 0;box-shadow:0 -4px 20px #0000001a;transition:transform .3s cubic-bezier(.4,0,.2,1);height:78px}.choco-widget-payment-loading{width:30px;height:30px;animation:choco-spin 1s linear infinite;border:3px solid var(--choco-widget-accent-color);border-top:3px solid transparent;border-radius:50%;position:absolute;top:0;bottom:0;left:0;right:0;margin:auto}@keyframes choco-spin{to{transform:rotate(360deg)}}@keyframes choco-fade-in{0%{opacity:0;transform:translate(-50%,-50%) scale(.9)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}@media(max-width:768px){.choco-widget-bottom-bar{padding:16px 16px 20px}.choco-widget-sheet-content{max-height:80vh}.choco-widget-sheet-title{font-size:18px}.choco-widget-method-item-label{font-size:17px}}@media(max-width:768px)and (min-height:812px){.choco-widget-bottom-bar,.choco-widget-sheet-content{padding-bottom:calc(20px + env(safe-area-inset-bottom,20px))}}@supports (padding: env(safe-area-inset-bottom)){.choco-widget-bottom-bar{padding-bottom:calc(16px + env(safe-area-inset-bottom))}.choco-widget-sheet-content{padding-bottom:calc(20px + env(safe-area-inset-bottom))}}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
2
  const bt = {
3
3
  ru: {
4
4
  paymentMethod: "Способ оплаты",
@@ -237,40 +237,40 @@ function wt() {
237
237
  Object.defineProperty(l, "__esModule", {
238
238
  value: !0
239
239
  }), l.Centrifuge = void 0;
240
- var C = S(f(187)), k = S(f(471)), _ = f(147), b = f(853);
240
+ var C = S(f(187)), v = S(f(471)), T = f(147), b = f(853);
241
241
  function S(g) {
242
242
  return g && g.__esModule ? g : { default: g };
243
243
  }
244
- function T(g) {
244
+ function L(g) {
245
245
  "@babel/helpers - typeof";
246
- return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? T = function(p) {
246
+ return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? L = function(p) {
247
247
  return typeof p;
248
- } : T = function(p) {
248
+ } : L = function(p) {
249
249
  return p && typeof Symbol == "function" && p.constructor === Symbol && p !== Symbol.prototype ? "symbol" : typeof p;
250
- }, T(g);
250
+ }, L(g);
251
251
  }
252
252
  function I(g, h) {
253
253
  if (!(g instanceof h))
254
254
  throw new TypeError("Cannot call a class as a function");
255
255
  }
256
- function w(g, h) {
256
+ function _(g, h) {
257
257
  for (var p = 0; p < h.length; p++) {
258
258
  var A = h[p];
259
259
  A.enumerable = A.enumerable || !1, A.configurable = !0, "value" in A && (A.writable = !0), Object.defineProperty(g, A.key, A);
260
260
  }
261
261
  }
262
- function B(g, h, p) {
263
- return h && w(g.prototype, h), g;
262
+ function k(g, h, p) {
263
+ return h && _(g.prototype, h), g;
264
264
  }
265
- function v(g, h) {
265
+ function B(g, h) {
266
266
  if (typeof h != "function" && h !== null)
267
267
  throw new TypeError("Super expression must either be null or a function");
268
- g.prototype = Object.create(h && h.prototype, { constructor: { value: g, writable: !0, configurable: !0 } }), h && L(g, h);
268
+ g.prototype = Object.create(h && h.prototype, { constructor: { value: g, writable: !0, configurable: !0 } }), h && w(g, h);
269
269
  }
270
- function L(g, h) {
271
- return L = Object.setPrototypeOf || function(A, n) {
270
+ function w(g, h) {
271
+ return w = Object.setPrototypeOf || function(A, n) {
272
272
  return A.__proto__ = n, A;
273
- }, L(g, h);
273
+ }, w(g, h);
274
274
  }
275
275
  function O(g) {
276
276
  var h = q();
@@ -285,7 +285,7 @@ function wt() {
285
285
  };
286
286
  }
287
287
  function F(g, h) {
288
- if (h && (T(h) === "object" || typeof h == "function"))
288
+ if (h && (L(h) === "object" || typeof h == "function"))
289
289
  return h;
290
290
  if (h !== void 0)
291
291
  throw new TypeError("Derived constructors may only return object or undefined");
@@ -312,7 +312,7 @@ function wt() {
312
312
  }, J(g);
313
313
  }
314
314
  var x = "timeout", M = "connection closed", m = /* @__PURE__ */ (function(g) {
315
- v(p, g);
315
+ B(p, g);
316
316
  var h = O(p);
317
317
  function p(A, n) {
318
318
  var r;
@@ -351,7 +351,7 @@ function wt() {
351
351
  disableWithCredentials: !1
352
352
  }, r._configure(n), r;
353
353
  }
354
- return B(p, [{
354
+ return k(p, [{
355
355
  key: "setToken",
356
356
  value: function(n) {
357
357
  this._token = n;
@@ -437,7 +437,7 @@ function wt() {
437
437
  }, {
438
438
  key: "_websocketSupported",
439
439
  value: function() {
440
- return this._config.websocket !== null ? !0 : !(typeof WebSocket != "function" && (typeof WebSocket > "u" ? "undefined" : T(WebSocket)) !== "object");
440
+ return this._config.websocket !== null ? !0 : !(typeof WebSocket != "function" && (typeof WebSocket > "u" ? "undefined" : L(WebSocket)) !== "object");
441
441
  }
442
442
  }, {
443
443
  key: "_setFormat",
@@ -445,7 +445,7 @@ function wt() {
445
445
  if (!this._formatOverride(n)) {
446
446
  if (n === "protobuf")
447
447
  throw new Error("not implemented by JSON only Centrifuge client – use client with Protobuf");
448
- this._binary = !1, this._methodType = _.JsonMethodType, this._pushType = _.JsonPushType, this._encoder = new _.JsonEncoder(), this._decoder = new _.JsonDecoder();
448
+ this._binary = !1, this._methodType = T.JsonMethodType, this._pushType = T.JsonPushType, this._encoder = new T.JsonEncoder(), this._decoder = new T.JsonDecoder();
449
449
  }
450
450
  }
451
451
  }, {
@@ -1474,12 +1474,12 @@ function wt() {
1474
1474
  var ke = D.data.channels[W];
1475
1475
  ke.channel && (le[ke.channel] = ke.token);
1476
1476
  }
1477
- var xe = !1;
1478
- n._isBatching || (n.startBatching(), xe = !0);
1479
- for (var Fe in c)
1480
- if (c.hasOwnProperty(Fe)) {
1477
+ var Fe = !1;
1478
+ n._isBatching || (n.startBatching(), Fe = !0);
1479
+ for (var xe in c)
1480
+ if (c.hasOwnProperty(xe)) {
1481
1481
  var mt = (function() {
1482
- var z = c[Fe], Je = le[z];
1482
+ var z = c[xe], Je = le[z];
1483
1483
  if (Je) {
1484
1484
  var oe = {
1485
1485
  method: n._methodType.SUBSCRIBE,
@@ -1513,7 +1513,7 @@ function wt() {
1513
1513
  })();
1514
1514
  if (mt === "continue") continue;
1515
1515
  }
1516
- xe && n.stopBatching();
1516
+ Fe && n.stopBatching();
1517
1517
  }
1518
1518
  };
1519
1519
  if (this._config.onPrivateSubscribe !== null)
@@ -1536,7 +1536,7 @@ function wt() {
1536
1536
  var d = this._getSub(n);
1537
1537
  if (d !== null)
1538
1538
  return d._setEvents(r), d._isUnsubscribed() && d.subscribe(c), d;
1539
- var y = new k.default(this, n, r);
1539
+ var y = new v.default(this, n, r);
1540
1540
  return this._subs[n] = y, y.subscribe(c), y;
1541
1541
  }
1542
1542
  }]), p;
@@ -1551,8 +1551,8 @@ function wt() {
1551
1551
  Object.defineProperty(l, "__esModule", {
1552
1552
  value: !0
1553
1553
  }), l.default = void 0;
1554
- var C = f(382), k = C.Centrifuge;
1555
- l.default = k, a.exports = l.default;
1554
+ var C = f(382), v = C.Centrifuge;
1555
+ l.default = v, a.exports = l.default;
1556
1556
  })
1557
1557
  ),
1558
1558
  /***/
@@ -1562,20 +1562,20 @@ function wt() {
1562
1562
  Object.defineProperty(l, "__esModule", {
1563
1563
  value: !0
1564
1564
  }), l.JsonPushType = l.JsonMethodType = l.JsonEncoder = l.JsonDecoder = void 0;
1565
- function f(I, w) {
1566
- if (!(I instanceof w))
1565
+ function f(I, _) {
1566
+ if (!(I instanceof _))
1567
1567
  throw new TypeError("Cannot call a class as a function");
1568
1568
  }
1569
- function C(I, w) {
1570
- for (var B = 0; B < w.length; B++) {
1571
- var v = w[B];
1572
- v.enumerable = v.enumerable || !1, v.configurable = !0, "value" in v && (v.writable = !0), Object.defineProperty(I, v.key, v);
1569
+ function C(I, _) {
1570
+ for (var k = 0; k < _.length; k++) {
1571
+ var B = _[k];
1572
+ B.enumerable = B.enumerable || !1, B.configurable = !0, "value" in B && (B.writable = !0), Object.defineProperty(I, B.key, B);
1573
1573
  }
1574
1574
  }
1575
- function k(I, w, B) {
1576
- return w && C(I.prototype, w), I;
1575
+ function v(I, _, k) {
1576
+ return _ && C(I.prototype, _), I;
1577
1577
  }
1578
- var _ = {
1578
+ var T = {
1579
1579
  CONNECT: 0,
1580
1580
  SUBSCRIBE: 1,
1581
1581
  UNSUBSCRIBE: 2,
@@ -1589,7 +1589,7 @@ function wt() {
1589
1589
  REFRESH: 10,
1590
1590
  SUB_REFRESH: 11
1591
1591
  };
1592
- l.JsonMethodType = _;
1592
+ l.JsonMethodType = T;
1593
1593
  var b = {
1594
1594
  PUBLICATION: 0,
1595
1595
  JOIN: 1,
@@ -1603,49 +1603,49 @@ function wt() {
1603
1603
  function I() {
1604
1604
  f(this, I);
1605
1605
  }
1606
- return k(I, [{
1606
+ return v(I, [{
1607
1607
  key: "encodeCommands",
1608
- value: function(B) {
1609
- return B.map(function(v) {
1610
- return JSON.stringify(v);
1608
+ value: function(k) {
1609
+ return k.map(function(B) {
1610
+ return JSON.stringify(B);
1611
1611
  }).join(`
1612
1612
  `);
1613
1613
  }
1614
1614
  }]), I;
1615
1615
  })();
1616
1616
  l.JsonEncoder = S;
1617
- var T = /* @__PURE__ */ (function() {
1617
+ var L = /* @__PURE__ */ (function() {
1618
1618
  function I() {
1619
1619
  f(this, I);
1620
1620
  }
1621
- return k(I, [{
1621
+ return v(I, [{
1622
1622
  key: "decodeReplies",
1623
- value: function(B) {
1624
- return B.split(`
1625
- `).filter(function(v) {
1626
- return v !== "";
1627
- }).map(function(v) {
1628
- return JSON.parse(v);
1623
+ value: function(k) {
1624
+ return k.split(`
1625
+ `).filter(function(B) {
1626
+ return B !== "";
1627
+ }).map(function(B) {
1628
+ return JSON.parse(B);
1629
1629
  });
1630
1630
  }
1631
1631
  }, {
1632
1632
  key: "decodeCommandResult",
1633
- value: function(B, v) {
1634
- return v;
1633
+ value: function(k, B) {
1634
+ return B;
1635
1635
  }
1636
1636
  }, {
1637
1637
  key: "decodePush",
1638
- value: function(B) {
1639
- return B;
1638
+ value: function(k) {
1639
+ return k;
1640
1640
  }
1641
1641
  }, {
1642
1642
  key: "decodePushData",
1643
- value: function(B, v) {
1644
- return v;
1643
+ value: function(k, B) {
1644
+ return B;
1645
1645
  }
1646
1646
  }]), I;
1647
1647
  })();
1648
- l.JsonDecoder = T;
1648
+ l.JsonDecoder = L;
1649
1649
  })
1650
1650
  ),
1651
1651
  /***/
@@ -1663,7 +1663,7 @@ function wt() {
1663
1663
  Object.defineProperty(l, "__esModule", {
1664
1664
  value: !0
1665
1665
  }), l.default = void 0;
1666
- var k = b(f(187)), _ = f(853);
1666
+ var v = b(f(187)), T = f(853);
1667
1667
  function b(h) {
1668
1668
  return h && h.__esModule ? h : { default: h };
1669
1669
  }
@@ -1671,26 +1671,26 @@ function wt() {
1671
1671
  if (!(h instanceof p))
1672
1672
  throw new TypeError("Cannot call a class as a function");
1673
1673
  }
1674
- function T(h, p) {
1674
+ function L(h, p) {
1675
1675
  for (var A = 0; A < p.length; A++) {
1676
1676
  var n = p[A];
1677
1677
  n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(h, n.key, n);
1678
1678
  }
1679
1679
  }
1680
1680
  function I(h, p, A) {
1681
- return p && T(h.prototype, p), h;
1681
+ return p && L(h.prototype, p), h;
1682
1682
  }
1683
- function w(h, p) {
1683
+ function _(h, p) {
1684
1684
  if (typeof p != "function" && p !== null)
1685
1685
  throw new TypeError("Super expression must either be null or a function");
1686
- h.prototype = Object.create(p && p.prototype, { constructor: { value: h, writable: !0, configurable: !0 } }), p && B(h, p);
1686
+ h.prototype = Object.create(p && p.prototype, { constructor: { value: h, writable: !0, configurable: !0 } }), p && k(h, p);
1687
1687
  }
1688
- function B(h, p) {
1689
- return B = Object.setPrototypeOf || function(n, r) {
1688
+ function k(h, p) {
1689
+ return k = Object.setPrototypeOf || function(n, r) {
1690
1690
  return n.__proto__ = r, n;
1691
- }, B(h, p);
1691
+ }, k(h, p);
1692
1692
  }
1693
- function v(h) {
1693
+ function B(h) {
1694
1694
  var p = F();
1695
1695
  return function() {
1696
1696
  var n = N(h), r;
@@ -1699,10 +1699,10 @@ function wt() {
1699
1699
  r = Reflect.construct(n, arguments, c);
1700
1700
  } else
1701
1701
  r = n.apply(this, arguments);
1702
- return L(this, r);
1702
+ return w(this, r);
1703
1703
  };
1704
1704
  }
1705
- function L(h, p) {
1705
+ function w(h, p) {
1706
1706
  if (p && (C(p) === "object" || typeof p == "function"))
1707
1707
  return p;
1708
1708
  if (p !== void 0)
@@ -1730,8 +1730,8 @@ function wt() {
1730
1730
  }, N(h);
1731
1731
  }
1732
1732
  var q = 0, J = 1, x = 2, M = 3, m = 4, g = /* @__PURE__ */ (function(h) {
1733
- w(A, h);
1734
- var p = v(A);
1733
+ _(A, h);
1734
+ var p = B(A);
1735
1735
  function A(n, r, c) {
1736
1736
  var d;
1737
1737
  return S(this, A), d = p.call(this), d.channel = r, d._centrifuge = n, d._status = q, d._error = null, d._isResubscribe = !1, d._ready = !1, d._subscriptionPromise = null, d._noResubscribe = !1, d._recoverable = !1, d._recover = !1, d._setEvents(c), d._initializePromise(), d._promises = {}, d._promiseId = 0, d._subscribeData = null, d.on("error", function(y) {
@@ -1771,7 +1771,7 @@ function wt() {
1771
1771
  key: "_setEvents",
1772
1772
  value: function(r) {
1773
1773
  if (r) {
1774
- if ((0, _.isFunction)(r))
1774
+ if ((0, T.isFunction)(r))
1775
1775
  this.on("publish", r);
1776
1776
  else if (Object.prototype.toString.call(r) === Object.prototype.toString.call({}))
1777
1777
  for (var c = ["publish", "join", "leave", "unsubscribe", "subscribe", "error"], d = 0, y = c.length; d < y; d++) {
@@ -1953,7 +1953,7 @@ function wt() {
1953
1953
  });
1954
1954
  }
1955
1955
  }]), A;
1956
- })(k.default);
1956
+ })(v.default);
1957
1957
  l.default = g, a.exports = l.default;
1958
1958
  })
1959
1959
  ),
@@ -1963,29 +1963,29 @@ function wt() {
1963
1963
  (function(a, l, f) {
1964
1964
  Object.defineProperty(l, "__esModule", {
1965
1965
  value: !0
1966
- }), l.backoff = b, l.errorExists = S, l.extend = T, l.isFunction = k, l.log = _, l.startsWith = C;
1967
- function C(I, w) {
1968
- return I.lastIndexOf(w, 0) === 0;
1966
+ }), l.backoff = b, l.errorExists = S, l.extend = L, l.isFunction = v, l.log = T, l.startsWith = C;
1967
+ function C(I, _) {
1968
+ return I.lastIndexOf(_, 0) === 0;
1969
1969
  }
1970
- function k(I) {
1970
+ function v(I) {
1971
1971
  return I == null ? !1 : typeof I == "function";
1972
1972
  }
1973
- function _(I, w) {
1973
+ function T(I, _) {
1974
1974
  if (f.g.console) {
1975
- var B = f.g.console[I];
1976
- k(B) && B.apply(f.g.console, w);
1975
+ var k = f.g.console[I];
1976
+ v(k) && k.apply(f.g.console, _);
1977
1977
  }
1978
1978
  }
1979
- function b(I, w, B) {
1980
- var v = 0.5 * Math.random(), L = Math.min(B, w * Math.pow(2, I + 1));
1981
- return Math.floor((1 - v) * L);
1979
+ function b(I, _, k) {
1980
+ var B = 0.5 * Math.random(), w = Math.min(k, _ * Math.pow(2, I + 1));
1981
+ return Math.floor((1 - B) * w);
1982
1982
  }
1983
1983
  function S(I) {
1984
1984
  return "error" in I && I.error !== null;
1985
1985
  }
1986
- function T(I, w) {
1987
- for (var B in w)
1988
- w.hasOwnProperty(B) && (I[B] = w[B]);
1986
+ function L(I, _) {
1987
+ for (var k in _)
1988
+ _.hasOwnProperty(k) && (I[k] = _[k]);
1989
1989
  return I;
1990
1990
  }
1991
1991
  })
@@ -2002,10 +2002,10 @@ function wt() {
2002
2002
  } : C = function(g) {
2003
2003
  return Object.getOwnPropertyNames(g);
2004
2004
  };
2005
- function k(m) {
2005
+ function v(m) {
2006
2006
  console && console.warn && console.warn(m);
2007
2007
  }
2008
- var _ = Number.isNaN || function(g) {
2008
+ var T = Number.isNaN || function(g) {
2009
2009
  return g !== g;
2010
2010
  };
2011
2011
  function b() {
@@ -2013,7 +2013,7 @@ function wt() {
2013
2013
  }
2014
2014
  a.exports = b, a.exports.once = J, b.EventEmitter = b, b.prototype._events = void 0, b.prototype._eventsCount = 0, b.prototype._maxListeners = void 0;
2015
2015
  var S = 10;
2016
- function T(m) {
2016
+ function L(m) {
2017
2017
  if (typeof m != "function")
2018
2018
  throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof m);
2019
2019
  }
@@ -2023,14 +2023,14 @@ function wt() {
2023
2023
  return S;
2024
2024
  },
2025
2025
  set: function(m) {
2026
- if (typeof m != "number" || m < 0 || _(m))
2026
+ if (typeof m != "number" || m < 0 || T(m))
2027
2027
  throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + m + ".");
2028
2028
  S = m;
2029
2029
  }
2030
2030
  }), b.init = function() {
2031
2031
  (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
2032
2032
  }, b.prototype.setMaxListeners = function(g) {
2033
- if (typeof g != "number" || g < 0 || _(g))
2033
+ if (typeof g != "number" || g < 0 || T(g))
2034
2034
  throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + g + ".");
2035
2035
  return this._maxListeners = g, this;
2036
2036
  };
@@ -2063,9 +2063,9 @@ function wt() {
2063
2063
  f(E[p], this, h);
2064
2064
  return !0;
2065
2065
  };
2066
- function w(m, g, h, p) {
2066
+ function _(m, g, h, p) {
2067
2067
  var A, n, r;
2068
- if (T(h), n = m._events, n === void 0 ? (n = m._events = /* @__PURE__ */ Object.create(null), m._eventsCount = 0) : (n.newListener !== void 0 && (m.emit(
2068
+ if (L(h), n = m._events, n === void 0 ? (n = m._events = /* @__PURE__ */ Object.create(null), m._eventsCount = 0) : (n.newListener !== void 0 && (m.emit(
2069
2069
  "newListener",
2070
2070
  g,
2071
2071
  h.listener ? h.listener : h
@@ -2074,30 +2074,30 @@ function wt() {
2074
2074
  else if (typeof r == "function" ? r = n[g] = p ? [h, r] : [r, h] : p ? r.unshift(h) : r.push(h), A = I(m), A > 0 && r.length > A && !r.warned) {
2075
2075
  r.warned = !0;
2076
2076
  var c = new Error("Possible EventEmitter memory leak detected. " + r.length + " " + String(g) + " listeners added. Use emitter.setMaxListeners() to increase limit");
2077
- c.name = "MaxListenersExceededWarning", c.emitter = m, c.type = g, c.count = r.length, k(c);
2077
+ c.name = "MaxListenersExceededWarning", c.emitter = m, c.type = g, c.count = r.length, v(c);
2078
2078
  }
2079
2079
  return m;
2080
2080
  }
2081
2081
  b.prototype.addListener = function(g, h) {
2082
- return w(this, g, h, !1);
2082
+ return _(this, g, h, !1);
2083
2083
  }, b.prototype.on = b.prototype.addListener, b.prototype.prependListener = function(g, h) {
2084
- return w(this, g, h, !0);
2084
+ return _(this, g, h, !0);
2085
2085
  };
2086
- function B() {
2086
+ function k() {
2087
2087
  if (!this.fired)
2088
2088
  return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
2089
2089
  }
2090
- function v(m, g, h) {
2091
- var p = { fired: !1, wrapFn: void 0, target: m, type: g, listener: h }, A = B.bind(p);
2090
+ function B(m, g, h) {
2091
+ var p = { fired: !1, wrapFn: void 0, target: m, type: g, listener: h }, A = k.bind(p);
2092
2092
  return A.listener = h, p.wrapFn = A, A;
2093
2093
  }
2094
2094
  b.prototype.once = function(g, h) {
2095
- return T(h), this.on(g, v(this, g, h)), this;
2095
+ return L(h), this.on(g, B(this, g, h)), this;
2096
2096
  }, b.prototype.prependOnceListener = function(g, h) {
2097
- return T(h), this.prependListener(g, v(this, g, h)), this;
2097
+ return L(h), this.prependListener(g, B(this, g, h)), this;
2098
2098
  }, b.prototype.removeListener = function(g, h) {
2099
2099
  var p, A, n, r, c;
2100
- if (T(h), A = this._events, A === void 0)
2100
+ if (L(h), A = this._events, A === void 0)
2101
2101
  return this;
2102
2102
  if (p = A[g], p === void 0)
2103
2103
  return this;
@@ -2133,7 +2133,7 @@ function wt() {
2133
2133
  this.removeListener(g, h[A]);
2134
2134
  return this;
2135
2135
  };
2136
- function L(m, g, h) {
2136
+ function w(m, g, h) {
2137
2137
  var p = m._events;
2138
2138
  if (p === void 0)
2139
2139
  return [];
@@ -2141,9 +2141,9 @@ function wt() {
2141
2141
  return A === void 0 ? [] : typeof A == "function" ? h ? [A.listener || A] : [A] : h ? q(A) : F(A, A.length);
2142
2142
  }
2143
2143
  b.prototype.listeners = function(g) {
2144
- return L(this, g, !0);
2144
+ return w(this, g, !0);
2145
2145
  }, b.prototype.rawListeners = function(g) {
2146
- return L(this, g, !1);
2146
+ return w(this, g, !1);
2147
2147
  }, b.listenerCount = function(m, g) {
2148
2148
  return typeof m.listenerCount == "function" ? m.listenerCount(g) : O.call(m, g);
2149
2149
  }, b.prototype.listenerCount = O;
@@ -2314,9 +2314,9 @@ function Rt(e) {
2314
2314
  };
2315
2315
  }
2316
2316
  function Ot(e, t, o = {}) {
2317
- var w, B, v, L;
2318
- const i = [], s = (w = e == null ? void 0 : e.kaspi) == null ? void 0 : w.data, u = ((B = e == null ? void 0 : e.cards_v2) == null ? void 0 : B.data) || [], a = ((L = (v = e == null ? void 0 : e.payment_methods) == null ? void 0 : v.data) == null ? void 0 : L.attributes) || {}, l = K(a.payment_method_kaspi), f = K(a.payment_method_card), C = typeof window < "u" && window.self === window.top, _ = Xe() === "ios", b = !!(o != null && o.onlyKaspiAvailable), S = !!(o != null && o.disableKaspi);
2319
- return s != null && s.isKaspiOnly && l && !S ? [ee] : b ? s != null && s.isAvailable && l && !S ? [ee] : [] : (K(a.payment_method_apple_pay) && !me("apple_pay") && (Ce() && C || ye() || _ || st() === 16) && i.push(it), s != null && s.isAvailable && l && !S && i.push(ee), f && u.filter((O) => !O.isExpired).forEach((O) => {
2317
+ var _, k, B, w;
2318
+ const i = [], s = (_ = e == null ? void 0 : e.kaspi) == null ? void 0 : _.data, u = ((k = e == null ? void 0 : e.cards_v2) == null ? void 0 : k.data) || [], a = ((w = (B = e == null ? void 0 : e.payment_methods) == null ? void 0 : B.data) == null ? void 0 : w.attributes) || {}, l = K(a.payment_method_kaspi), f = K(a.payment_method_card), C = typeof window < "u" && window.self === window.top, T = Xe() === "ios", b = !!(o != null && o.onlyKaspiAvailable), S = !!(o != null && o.disableKaspi);
2319
+ return s != null && s.isKaspiOnly && l && !S ? [ee] : b ? s != null && s.isAvailable && l && !S ? [ee] : [] : (K(a.payment_method_apple_pay) && !me("apple_pay") && (Ce() && C || ye() || T || st() === 16) && i.push(it), s != null && s.isAvailable && l && !S && i.push(ee), f && u.filter((O) => !O.isExpired).forEach((O) => {
2320
2320
  i.push({
2321
2321
  iconType: ge(O.attributes.mask),
2322
2322
  type: "card",
@@ -2332,50 +2332,50 @@ function Ot(e, t, o = {}) {
2332
2332
  }), i);
2333
2333
  }
2334
2334
  function Re(e, t = {}) {
2335
- var I, w, B, v;
2336
- const o = (I = e == null ? void 0 : e.kaspi) == null ? void 0 : I.data, i = ((w = e == null ? void 0 : e.cards_v2) == null ? void 0 : w.data) || [], s = ((v = (B = e == null ? void 0 : e.payment_methods) == null ? void 0 : B.data) == null ? void 0 : v.attributes) || {}, u = K(s.payment_method_kaspi), a = K(s.payment_method_card), l = !!(t != null && t.disableKaspi), f = typeof window < "u" && window.self === window.top, k = Xe() === "ios", _ = K(s.payment_method_apple_pay) && !me("apple_pay") && (Ce() && f || ye() || k || st() === 16), b = K(s.payment_method_google_pay) && !me("google_pay") && !(t != null && t.disableGooglePay) && !Ce() && !ye();
2335
+ var I, _, k, B;
2336
+ const o = (I = e == null ? void 0 : e.kaspi) == null ? void 0 : I.data, i = ((_ = e == null ? void 0 : e.cards_v2) == null ? void 0 : _.data) || [], s = ((B = (k = e == null ? void 0 : e.payment_methods) == null ? void 0 : k.data) == null ? void 0 : B.attributes) || {}, u = K(s.payment_method_kaspi), a = K(s.payment_method_card), l = !!(t != null && t.disableKaspi), f = typeof window < "u" && window.self === window.top, v = Xe() === "ios", T = K(s.payment_method_apple_pay) && !me("apple_pay") && (Ce() && f || ye() || v || st() === 16), b = K(s.payment_method_google_pay) && !me("google_pay") && !(t != null && t.disableGooglePay) && !Ce() && !ye();
2337
2337
  if (o != null && o.isKaspiOnly && u && !l || t != null && t.onlyKaspiAvailable && (o != null && o.isAvailable) && u && !l)
2338
2338
  return ee;
2339
2339
  const S = Rt(e);
2340
2340
  if ((S == null ? void 0 : S.type) === "kaspi_pay" && (o != null && o.isAvailable) && u && !l)
2341
2341
  return ee;
2342
- if ((S == null ? void 0 : S.type) === "apple_pay" && _) return it;
2342
+ if ((S == null ? void 0 : S.type) === "apple_pay" && T) return it;
2343
2343
  if ((S == null ? void 0 : S.type) === "google_pay" && b) return at;
2344
2344
  if ((S == null ? void 0 : S.type) === "new_card" && K(s.payment_method_new_card))
2345
2345
  return { iconType: "new_card", type: "new_card", label: "Оплата новой картой" };
2346
2346
  if ((S == null ? void 0 : S.type) === "card" && a) {
2347
- const L = S.cardId != null ? i.find((O) => !O.isExpired && String(O.id) === S.cardId) : null;
2348
- if (L)
2347
+ const w = S.cardId != null ? i.find((O) => !O.isExpired && String(O.id) === S.cardId) : null;
2348
+ if (w)
2349
2349
  return {
2350
- iconType: ge(L.attributes.mask),
2350
+ iconType: ge(w.attributes.mask),
2351
2351
  type: "card",
2352
- cardId: L.id,
2353
- label: `•••• ${L.attributes.mask.slice(-4)}`,
2354
- cardType: L.type
2352
+ cardId: w.id,
2353
+ label: `•••• ${w.attributes.mask.slice(-4)}`,
2354
+ cardType: w.type
2355
2355
  };
2356
2356
  }
2357
2357
  if (a) {
2358
- const L = i.find((O) => {
2358
+ const w = i.find((O) => {
2359
2359
  var F;
2360
2360
  return ((F = O.attributes) == null ? void 0 : F.isDefault) && !O.isExpired;
2361
2361
  });
2362
- if (L)
2362
+ if (w)
2363
2363
  return {
2364
- iconType: ge(L.attributes.mask),
2364
+ iconType: ge(w.attributes.mask),
2365
2365
  type: "card",
2366
- cardId: L.id,
2367
- label: `•••• ${L.attributes.mask.slice(-4)}`,
2368
- cardType: L.type
2366
+ cardId: w.id,
2367
+ label: `•••• ${w.attributes.mask.slice(-4)}`,
2368
+ cardType: w.type
2369
2369
  };
2370
2370
  }
2371
2371
  if (o != null && o.isAvailable && u && !l) return ee;
2372
- const T = a ? i.find((L) => !L.isExpired) : null;
2373
- return T ? {
2374
- iconType: ge(T.attributes.mask),
2372
+ const L = a ? i.find((w) => !w.isExpired) : null;
2373
+ return L ? {
2374
+ iconType: ge(L.attributes.mask),
2375
2375
  type: "card",
2376
- cardId: T.id,
2377
- label: `••••${T.attributes.mask.slice(-4)}`,
2378
- cardType: T.type
2376
+ cardId: L.id,
2377
+ label: `••••${L.attributes.mask.slice(-4)}`,
2378
+ cardType: L.type
2379
2379
  } : null;
2380
2380
  }
2381
2381
  function ct(e) {
@@ -2434,7 +2434,8 @@ function Qe(e, t, o, i, s) {
2434
2434
  payment_method: t,
2435
2435
  ...e.backlink && { backlink: e.backlink },
2436
2436
  ...i && { use_balance: !0 },
2437
- ...s && { voucher: s }
2437
+ ...s && { voucher: s },
2438
+ ...e.isFridge && { is_fridge: !0 }
2438
2439
  };
2439
2440
  }
2440
2441
  async function Se(e, t, o, i, s) {
@@ -2452,7 +2453,7 @@ async function Se(e, t, o, i, s) {
2452
2453
  return u.ok || await Z(u, s), u.json();
2453
2454
  }
2454
2455
  async function Nt(e, t, o) {
2455
- var l, f, C, k;
2456
+ var l, f, C, v;
2456
2457
  const i = await fetch(`${e}/api/v2/oauth2/tokens`, {
2457
2458
  method: "POST",
2458
2459
  headers: {
@@ -2467,12 +2468,12 @@ async function Nt(e, t, o) {
2467
2468
  })
2468
2469
  });
2469
2470
  i.ok || await Z(i, "Не удалось авторизоваться через track_id");
2470
- const s = await i.json(), u = (s == null ? void 0 : s.access_token) ?? ((f = (l = s == null ? void 0 : s.data) == null ? void 0 : l.attributes) == null ? void 0 : f.access_token), a = (s == null ? void 0 : s.refresh_token) ?? ((k = (C = s == null ? void 0 : s.data) == null ? void 0 : C.attributes) == null ? void 0 : k.refresh_token) ?? null;
2471
+ const s = await i.json(), u = (s == null ? void 0 : s.access_token) ?? ((f = (l = s == null ? void 0 : s.data) == null ? void 0 : l.attributes) == null ? void 0 : f.access_token), a = (s == null ? void 0 : s.refresh_token) ?? ((v = (C = s == null ? void 0 : s.data) == null ? void 0 : C.attributes) == null ? void 0 : v.refresh_token) ?? null;
2471
2472
  if (!u) throw new Error("В ответе отсутствует access_token");
2472
2473
  return { access_token: u, refresh_token: a };
2473
2474
  }
2474
2475
  async function Dt(e, t, o) {
2475
- var l, f, C, k;
2476
+ var l, f, C, v;
2476
2477
  const i = await fetch(`${e}/api/v2/oauth2/tokens`, {
2477
2478
  method: "POST",
2478
2479
  headers: { "Content-Type": "application/json" },
@@ -2483,7 +2484,7 @@ async function Dt(e, t, o) {
2483
2484
  })
2484
2485
  });
2485
2486
  i.ok || await Z(i, "Не удалось обновить токен по refresh_token");
2486
- const s = await i.json(), u = (s == null ? void 0 : s.access_token) ?? ((f = (l = s == null ? void 0 : s.data) == null ? void 0 : l.attributes) == null ? void 0 : f.access_token), a = (s == null ? void 0 : s.refresh_token) ?? ((k = (C = s == null ? void 0 : s.data) == null ? void 0 : C.attributes) == null ? void 0 : k.refresh_token) ?? null;
2487
+ const s = await i.json(), u = (s == null ? void 0 : s.access_token) ?? ((f = (l = s == null ? void 0 : s.data) == null ? void 0 : l.attributes) == null ? void 0 : f.access_token), a = (s == null ? void 0 : s.refresh_token) ?? ((v = (C = s == null ? void 0 : s.data) == null ? void 0 : C.attributes) == null ? void 0 : v.refresh_token) ?? null;
2487
2488
  if (!u) throw new Error("В ответе отсутствует access_token");
2488
2489
  return { access_token: u, refresh_token: a };
2489
2490
  }
@@ -2562,7 +2563,7 @@ async function $e(e, t, o, i, s = {}) {
2562
2563
  "Ошибка создания заказа"
2563
2564
  );
2564
2565
  }
2565
- async function xt(e, t, o, i = {}) {
2566
+ async function Ft(e, t, o, i = {}) {
2566
2567
  const { checkoutAmount: s, checkoutPaymentMethod: u, useBalanceFlag: a, voucher: l } = Ie(
2567
2568
  t,
2568
2569
  { type: "new_card" },
@@ -2576,7 +2577,7 @@ async function xt(e, t, o, i = {}) {
2576
2577
  "Ошибка создания заказа для новой карты"
2577
2578
  );
2578
2579
  }
2579
- async function Ft(e, t) {
2580
+ async function xt(e, t) {
2580
2581
  const o = await fetch(
2581
2582
  `${e}/loyalty/v6/coupons/by_terminal/${t.terminalId}/at_payment?order_pay_amount=${t.amount}`,
2582
2583
  {
@@ -2661,6 +2662,7 @@ function jt(e) {
2661
2662
  onPayWithGooglePay: typeof e.onPayWithGooglePay == "function" ? e.onPayWithGooglePay : null,
2662
2663
  onUserEvent: typeof e.onUserEvent == "function" ? e.onUserEvent : null,
2663
2664
  onBeforeCheckout: typeof e.onBeforeCheckout == "function" ? e.onBeforeCheckout : null,
2665
+ onFreedomLink: typeof e.onFreedomLink == "function" ? e.onFreedomLink : null,
2664
2666
  idempotencyKey: e.idempotencyKey,
2665
2667
  locale: e.locale || "ru",
2666
2668
  containerSelector: typeof e.containerSelector == "string" ? e.containerSelector.trim() : "",
@@ -2669,6 +2671,7 @@ function jt(e) {
2669
2671
  disableKaspi: !!e.disableKaspi,
2670
2672
  disableGooglePay: !!e.disableGooglePay,
2671
2673
  isNativeAndroid: !!e.isNativeAndroid,
2674
+ isFridge: !!e.isFridge,
2672
2675
  bonuses: s
2673
2676
  };
2674
2677
  }
@@ -2917,34 +2920,45 @@ function cn(e) {
2917
2920
  balanceFormatted: l,
2918
2921
  useBalance: f,
2919
2922
  bonuses: C,
2920
- useBonuses: k,
2921
- coupon: _,
2923
+ useBonuses: v,
2924
+ coupon: T,
2922
2925
  useCoupon: b,
2923
2926
  couponDisabled: S,
2924
- cashbackFormatted: T,
2927
+ cashbackFormatted: L,
2925
2928
  disabled: I,
2926
- paymentMethodDisabled: w = !1,
2927
- loading: B,
2928
- t: v,
2929
- currency: L
2930
- } = e, O = (s == null ? void 0 : s.label) ?? v("selectMethod"), F = Ee(s), N = ut(u, a), q = sn(l, f, C, k, _, b, S, v, L), J = an(T, v), x = (a == null ? void 0 : a.type) === "google_pay", M = (a == null ? void 0 : a.type) === "apple_pay", m = x || M;
2929
+ paymentMethodDisabled: _ = !1,
2930
+ loading: k,
2931
+ showFreedomBtn: B,
2932
+ t: w,
2933
+ currency: O
2934
+ } = e, F = (s == null ? void 0 : s.label) ?? w("selectMethod"), N = Ee(s), q = ut(u, a), J = sn(l, f, C, v, T, b, S, w, O), x = an(L, w), M = (a == null ? void 0 : a.type) === "google_pay", m = (a == null ? void 0 : a.type) === "apple_pay", g = M || m;
2931
2935
  return `
2932
- <div class="choco-widget-bottom-bar" role="region" aria-label="${v("paymentMethod")}">
2933
- ${q}
2936
+ <div class="choco-widget-bottom-bar" role="region" aria-label="${w("paymentMethod")}">
2937
+ ${J}
2934
2938
  <div class="choco-widget-payment-info">
2939
+ ${B ? `
2940
+ <button
2941
+ class="choco-widget-freedom-card-btn"
2942
+ data-action="freedom-card"
2943
+ type="button"
2944
+ ${I || k ? "disabled" : ""}
2945
+ >
2946
+ карта Freedom
2947
+ </button>
2948
+ ` : ""}
2935
2949
  <div class="choco-widget-payment-info-main">
2936
2950
  <button
2937
2951
  class="choco-widget-payment-method ${(s == null ? void 0 : s.type) || ""}"
2938
2952
  data-action="change-method"
2939
- aria-label="${v("paymentMethod")}: ${O}"
2953
+ aria-label="${w("paymentMethod")}: ${F}"
2940
2954
  type="button"
2941
- ${w || I || B ? "disabled" : ""}
2955
+ ${_ || I || k ? "disabled" : ""}
2942
2956
  >
2943
- <div class="choco-widget-method-label">${v("paymentMethod")}</div>
2957
+ <div class="choco-widget-method-label">${w("paymentMethod")}</div>
2944
2958
  <div class="choco-widget-method-value">
2945
- <div class="choco-widget-method-icon-wrapper ${s == null ? void 0 : s.type}" aria-hidden="true">${F}</div>
2959
+ <div class="choco-widget-method-icon-wrapper ${s == null ? void 0 : s.type}" aria-hidden="true">${N}</div>
2946
2960
  <div class="choco-widget-method-details">
2947
- <div class="choco-widget-method-name ${s == null ? void 0 : s.type}">${O}</div>
2961
+ <div class="choco-widget-method-name ${s == null ? void 0 : s.type}">${F}</div>
2948
2962
  <div class="choco-widget-method-chevron">
2949
2963
  <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2950
2964
  <path d="M8 10L12 14L16 10" stroke="#242424" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
@@ -2953,24 +2967,24 @@ function cn(e) {
2953
2967
  </div>
2954
2968
  </div>
2955
2969
  </button>
2956
- <div class="choco-widget-google-pay-amount ${m ? "" : "choco-widget-google-pay-amount--hidden"}" aria-live="polite">
2957
- <div class="choco-widget-google-pay-amount-label">${v("total")} ${t}</div>
2958
- ${i ? `<div class="choco-widget-google-pay-amount-value">${v("instead")} <span class="choco-widget-google-pay-amount-value-number">${o || ""}</span></div>` : ""}
2970
+ <div class="choco-widget-google-pay-amount ${g ? "" : "choco-widget-google-pay-amount--hidden"}" aria-live="polite">
2971
+ <div class="choco-widget-google-pay-amount-label">${w("total")} ${t}</div>
2972
+ ${i ? `<div class="choco-widget-google-pay-amount-value">${w("instead")} <span class="choco-widget-google-pay-amount-value-number">${o || ""}</span></div>` : ""}
2959
2973
  </div>
2960
2974
  <button
2961
- class="choco-widget-pay-button ${B ? "choco-widget-pay-button--loading" : ""} ${m ? "choco-widget-pay-button--hidden" : ""}"
2975
+ class="choco-widget-pay-button ${k ? "choco-widget-pay-button--loading" : ""} ${g ? "choco-widget-pay-button--hidden" : ""}"
2962
2976
  data-action="pay"
2963
- aria-label="${v("pay")} ${t}"
2977
+ aria-label="${w("pay")} ${t}"
2964
2978
  type="button"
2965
- ${I || B ? "disabled" : ""}
2979
+ ${I || k ? "disabled" : ""}
2966
2980
  >
2967
- ${v("pay")} ${t}
2981
+ ${w("pay")} ${t}
2968
2982
  </button>
2969
2983
  </div>
2970
- <div class="choco-widget-google-pay-row ${x ? "" : "choco-widget-google-pay-row--hidden"}">
2984
+ <div class="choco-widget-google-pay-row ${M ? "" : "choco-widget-google-pay-row--hidden"}">
2971
2985
  <div class="choco-widget-google-pay-button-slot" data-action="google-pay-button-slot"></div>
2972
2986
  </div>
2973
- <div class="choco-widget-apple-pay-row ${M ? "" : "choco-widget-apple-pay-row--hidden"}">
2987
+ <div class="choco-widget-apple-pay-row ${m ? "" : "choco-widget-apple-pay-row--hidden"}">
2974
2988
  <div class="choco-widget-apple-pay-button-slot" data-action="apple-pay-button-slot"></div>
2975
2989
  </div>
2976
2990
  </div>
@@ -2996,7 +3010,7 @@ function cn(e) {
2996
3010
  <path d="M15 18L9 12L15 6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
2997
3011
  </svg>
2998
3012
  </button>
2999
- <h3 class="choco-widget-sheet-title" id="choco-sheet-title">${v("paymentMethods")}</h3>
3013
+ <h3 class="choco-widget-sheet-title" id="choco-sheet-title">${w("paymentMethods")}</h3>
3000
3014
  <button
3001
3015
  class="choco-widget-sheet-button choco-widget-sheet-button--edit"
3002
3016
  data-action="edit-sheet"
@@ -3011,7 +3025,7 @@ function cn(e) {
3011
3025
  <button
3012
3026
  class="choco-widget-sheet-button choco-widget-sheet-button--previous"
3013
3027
  data-action="previous-sheet"
3014
- aria-label="${v("back")}"
3028
+ aria-label="${w("back")}"
3015
3029
  type="button"
3016
3030
  style="display: none;"
3017
3031
  >
@@ -3022,25 +3036,25 @@ function cn(e) {
3022
3036
  </button>
3023
3037
  </div>
3024
3038
  <div class="choco-widget-payment-methods" role="list">
3025
- ${N}
3039
+ ${q}
3026
3040
  </div>
3027
3041
  <div class="choco-widget-sheet-delete-confirm" data-delete-confirm="content" aria-hidden="true">
3028
3042
  <div class="choco-widget-sheet-delete-confirm-actions">
3029
- <button type="button" class="choco-widget-delete-confirm-btn choco-widget-delete-confirm-btn--cancel" data-action="confirm-delete-cancel">${v("cancel")}</button>
3030
- <button type="button" class="choco-widget-delete-confirm-btn choco-widget-delete-confirm-btn--delete" data-action="confirm-delete-submit">${v("delete")}</button>
3043
+ <button type="button" class="choco-widget-delete-confirm-btn choco-widget-delete-confirm-btn--cancel" data-action="confirm-delete-cancel">${w("cancel")}</button>
3044
+ <button type="button" class="choco-widget-delete-confirm-btn choco-widget-delete-confirm-btn--delete" data-action="confirm-delete-submit">${w("delete")}</button>
3031
3045
  </div>
3032
3046
  </div>
3033
- ${J}
3047
+ ${x}
3034
3048
  </div>
3035
3049
  </div>
3036
3050
 
3037
3051
  <div class="choco-widget-add-card-sheet choco-widget-payment-sheet" data-sheet="add-card" aria-hidden="true" style="display: none;">
3038
3052
  <div class="choco-widget-sheet-content choco-widget-add-card-sheet-content">
3039
3053
  <div class="choco-widget-sheet-header">
3040
- <h3 class="choco-widget-sheet-title">${v("addCard")}</h3>
3054
+ <h3 class="choco-widget-sheet-title">${w("addCard")}</h3>
3041
3055
  </div>
3042
3056
  <div class="choco-widget-add-card-iframe-wrapper">
3043
- <iframe id="choco-widget-add-card-iframe" class="choco-widget-add-card-iframe" title="${v("addCard")}" sandbox="allow-forms allow-modals allow-orientation-lock allow-pointer-lock allow-popups allow-popups-to-escape-sandbox allow-presentation allow-same-origin allow-scripts"></iframe>
3057
+ <iframe id="choco-widget-add-card-iframe" class="choco-widget-add-card-iframe" title="${w("addCard")}" sandbox="allow-forms allow-modals allow-orientation-lock allow-pointer-lock allow-popups allow-popups-to-escape-sandbox allow-presentation allow-same-origin allow-scripts"></iframe>
3044
3058
  </div>
3045
3059
  </div>
3046
3060
  </div>
@@ -3078,10 +3092,10 @@ function hn(e) {
3078
3092
  lt(e) && (e.container.style.setProperty("--choco-widget-accent-color", e.config.color), e.container.innerHTML = An());
3079
3093
  }
3080
3094
  function fn(e) {
3081
- var k, _, b, S, T;
3095
+ var v, T, b, S, L;
3082
3096
  if (e._destroyed || !lt(e)) return;
3083
3097
  e.container.style.setProperty("--choco-widget-accent-color", e.config.color), e.container.classList.remove("choco-one-click-widget--visible");
3084
- const t = e.getAvailablePaymentMethods(), o = (k = e.checkoutContext) == null ? void 0 : k.data, i = e.config.currency || "KZT", s = (S = (b = (_ = o == null ? void 0 : o.balance) == null ? void 0 : _.data) == null ? void 0 : b.money) == null ? void 0 : S[i], u = s > 0 ? V(s, e.config.locale, e.config.currency) : null, a = (T = o == null ? void 0 : o.cashback) == null ? void 0 : T.data, l = (a == null ? void 0 : a.cashbackAmount) > 0 ? V(a.cashbackAmount, e.config.locale, e.config.currency) : null, f = e._getPayableAmount(), C = f < e.config.amount;
3098
+ const t = e.getAvailablePaymentMethods(), o = (v = e.checkoutContext) == null ? void 0 : v.data, i = e.config.currency || "KZT", s = (S = (b = (T = o == null ? void 0 : o.balance) == null ? void 0 : T.data) == null ? void 0 : b.money) == null ? void 0 : S[i], u = s > 0 ? V(s, e.config.locale, e.config.currency) : null, a = (L = o == null ? void 0 : o.cashback) == null ? void 0 : L.data, l = (a == null ? void 0 : a.cashbackAmount) > 0 ? V(a.cashbackAmount, e.config.locale, e.config.currency) : null, f = e._getPayableAmount(), C = f < e.config.amount;
3085
3099
  e.container.innerHTML = cn({
3086
3100
  amountFormatted: V(f, e.config.locale, e.config.currency),
3087
3101
  originalAmountFormatted: V(
@@ -3104,7 +3118,8 @@ function fn(e) {
3104
3118
  disabled: e.disabled,
3105
3119
  paymentMethodDisabled: e.paymentMethodDisabled,
3106
3120
  loading: e.loading,
3107
- t: (I, w) => e.t(I, w),
3121
+ showFreedomBtn: !e.config.isFridge && e.config.onFreedomLink !== null,
3122
+ t: (I, _) => e.t(I, _),
3108
3123
  currency: i
3109
3124
  }), e._attachEventListeners(), e.isOpen = !0, e._emitUserEvent("one_click_pay_cta_rendered", {
3110
3125
  terminal_id: e.config.terminalId,
@@ -3153,15 +3168,15 @@ function dt(e) {
3153
3168
  t && e.selectedPaymentMethod && (t.className = `choco-widget-payment-method ${e.selectedPaymentMethod.type}`), o && e.selectedPaymentMethod && (o.className = `choco-widget-method-name ${e.selectedPaymentMethod.type}`, o.textContent = e.selectedPaymentMethod.label), i && e.selectedPaymentMethod && (i.className = `choco-widget-method-icon-wrapper ${e.selectedPaymentMethod.type}`, i.innerHTML = ln(e.selectedPaymentMethod)), ht(e);
3154
3169
  }
3155
3170
  function pe(e) {
3156
- var k, _, b, S, T;
3157
- const t = (k = e.container) == null ? void 0 : k.querySelector(".choco-widget-pay-button"), o = (_ = e.container) == null ? void 0 : _.querySelector(
3171
+ var v, T, b, S, L;
3172
+ const t = (v = e.container) == null ? void 0 : v.querySelector(".choco-widget-pay-button"), o = (T = e.container) == null ? void 0 : T.querySelector(
3158
3173
  ".choco-widget-google-pay-amount"
3159
3174
  ), i = (b = e.container) == null ? void 0 : b.querySelector(
3160
3175
  ".choco-widget-google-pay-amount-label"
3161
3176
  );
3162
3177
  let s = (S = e.container) == null ? void 0 : S.querySelector(
3163
3178
  ".choco-widget-google-pay-amount-value"
3164
- ), u = (T = e.container) == null ? void 0 : T.querySelector(
3179
+ ), u = (L = e.container) == null ? void 0 : L.querySelector(
3165
3180
  ".choco-widget-google-pay-amount-value-number"
3166
3181
  );
3167
3182
  const a = e._getPayableAmount(), l = V(a, e.config.locale, e.config.currency), f = a < e.config.amount, C = V(
@@ -3178,8 +3193,8 @@ function pe(e) {
3178
3193
  )), u ? u.textContent = C : s && (s.textContent = `${e.t("instead")} ${C}`);
3179
3194
  }
3180
3195
  function ht(e) {
3181
- var f, C, k, _, b, S, T, I, w, B;
3182
- const t = ((f = e.selectedPaymentMethod) == null ? void 0 : f.type) === "google_pay", o = ((C = e.selectedPaymentMethod) == null ? void 0 : C.type) === "apple_pay", i = t || o, s = (k = e.container) == null ? void 0 : k.querySelector(".choco-widget-pay-button"), u = (_ = e.container) == null ? void 0 : _.querySelector(
3196
+ var f, C, v, T, b, S, L, I, _, k;
3197
+ const t = ((f = e.selectedPaymentMethod) == null ? void 0 : f.type) === "google_pay", o = ((C = e.selectedPaymentMethod) == null ? void 0 : C.type) === "apple_pay", i = t || o, s = (v = e.container) == null ? void 0 : v.querySelector(".choco-widget-pay-button"), u = (T = e.container) == null ? void 0 : T.querySelector(
3183
3198
  ".choco-widget-google-pay-amount"
3184
3199
  ), a = (b = e.container) == null ? void 0 : b.querySelector(".choco-widget-google-pay-row"), l = (S = e.container) == null ? void 0 : S.querySelector(".choco-widget-apple-pay-row");
3185
3200
  if (s == null || s.classList.toggle("choco-widget-pay-button--hidden", i), u == null || u.classList.toggle(
@@ -3187,29 +3202,29 @@ function ht(e) {
3187
3202
  !i
3188
3203
  ), a == null || a.classList.toggle("choco-widget-google-pay-row--hidden", !t), l == null || l.classList.toggle("choco-widget-apple-pay-row--hidden", !o), t) {
3189
3204
  gn(e);
3190
- const v = (T = e.container) == null ? void 0 : T.querySelector(
3205
+ const B = (L = e.container) == null ? void 0 : L.querySelector(
3191
3206
  '[data-action="apple-pay-button-slot"]'
3192
3207
  );
3193
- v && (v.innerHTML = "");
3208
+ B && (B.innerHTML = "");
3194
3209
  } else if (o) {
3195
3210
  e._googlePayButtonRenderVersion += 1;
3196
- const v = (I = e.container) == null ? void 0 : I.querySelector(
3211
+ const B = (I = e.container) == null ? void 0 : I.querySelector(
3197
3212
  '[data-action="google-pay-button-slot"]'
3198
3213
  );
3199
- v && (v.innerHTML = ""), pn(e);
3214
+ B && (B.innerHTML = ""), pn(e);
3200
3215
  } else {
3201
3216
  e._googlePayButtonRenderVersion += 1;
3202
- const v = (w = e.container) == null ? void 0 : w.querySelector(
3217
+ const B = (_ = e.container) == null ? void 0 : _.querySelector(
3203
3218
  '[data-action="google-pay-button-slot"]'
3204
- ), L = (B = e.container) == null ? void 0 : B.querySelector(
3219
+ ), w = (k = e.container) == null ? void 0 : k.querySelector(
3205
3220
  '[data-action="apple-pay-button-slot"]'
3206
3221
  );
3207
- v && (v.innerHTML = ""), L && (L.innerHTML = "");
3222
+ B && (B.innerHTML = ""), w && (w.innerHTML = "");
3208
3223
  }
3209
3224
  pe(e), Y(e);
3210
3225
  }
3211
3226
  async function gn(e) {
3212
- var a, l, f, C, k;
3227
+ var a, l, f, C, v;
3213
3228
  const t = (a = e.container) == null ? void 0 : a.querySelector(
3214
3229
  '[data-action="google-pay-button-slot"]'
3215
3230
  );
@@ -3222,7 +3237,7 @@ async function gn(e) {
3222
3237
  return;
3223
3238
  }
3224
3239
  if (o !== e._googlePayButtonRenderVersion) return;
3225
- if (!((k = (C = (f = window.google) == null ? void 0 : f.payments) == null ? void 0 : C.api) != null && k.PaymentsClient)) {
3240
+ if (!((v = (C = (f = window.google) == null ? void 0 : f.payments) == null ? void 0 : C.api) != null && v.PaymentsClient)) {
3226
3241
  e.config.onError({ attributes: { message: e.t("errorGooglePayUnsupported") } });
3227
3242
  return;
3228
3243
  }
@@ -3235,8 +3250,8 @@ async function gn(e) {
3235
3250
  buttonLocale: e.config.locale || "ru",
3236
3251
  buttonSizeMode: "fill"
3237
3252
  });
3238
- u.classList.add("choco-widget-google-pay-button"), u.style.setProperty("width", "100%", "important"), u.style.setProperty("height", "52px", "important"), u.style.setProperty("min-height", "52px", "important"), u.style.setProperty("border-radius", "12px", "important"), u.style.setProperty("font-size", "16px", "important"), u.style.setProperty("font-weight", "bold", "important"), u.querySelectorAll("*").forEach((_) => {
3239
- _.style.setProperty("border-radius", "12px", "important"), _.style.setProperty("font-weight", "bold", "important"), _.style.setProperty("font-size", "16px", "important");
3253
+ u.classList.add("choco-widget-google-pay-button"), u.style.setProperty("width", "100%", "important"), u.style.setProperty("height", "52px", "important"), u.style.setProperty("min-height", "52px", "important"), u.style.setProperty("border-radius", "12px", "important"), u.style.setProperty("font-size", "16px", "important"), u.style.setProperty("font-weight", "bold", "important"), u.querySelectorAll("*").forEach((T) => {
3254
+ T.style.setProperty("border-radius", "12px", "important"), T.style.setProperty("font-weight", "bold", "important"), T.style.setProperty("font-size", "16px", "important");
3240
3255
  }), t.appendChild(u), Y(e);
3241
3256
  }
3242
3257
  function pn(e) {
@@ -3281,31 +3296,31 @@ function ne(e) {
3281
3296
  e.loading = !0, Y(e);
3282
3297
  }
3283
3298
  function j(e) {
3284
- var _, b, S, T, I, w, B, v;
3299
+ var T, b, S, L, I, _, k, B;
3285
3300
  e.loading = !1;
3286
- const t = (_ = e.container) == null ? void 0 : _.querySelector(".choco-widget-payment-method"), o = (b = e.container) == null ? void 0 : b.querySelector(".choco-widget-pay-button"), i = (S = e.container) == null ? void 0 : S.querySelector(
3301
+ const t = (T = e.container) == null ? void 0 : T.querySelector(".choco-widget-payment-method"), o = (b = e.container) == null ? void 0 : b.querySelector(".choco-widget-pay-button"), i = (S = e.container) == null ? void 0 : S.querySelector(
3287
3302
  ".choco-widget-google-pay-button-slot button"
3288
- ), s = (T = e.container) == null ? void 0 : T.querySelector(
3303
+ ), s = (L = e.container) == null ? void 0 : L.querySelector(
3289
3304
  ".choco-widget-apple-pay-button-slot button"
3290
3305
  ), u = (I = e.container) == null ? void 0 : I.querySelector(
3291
3306
  ".choco-widget-google-pay-amount"
3292
- ), a = (w = e.container) == null ? void 0 : w.querySelector(".choco-widget-google-pay-row"), l = (B = e.container) == null ? void 0 : B.querySelector(".choco-widget-apple-pay-row"), f = (v = e.container) == null ? void 0 : v.querySelector(
3307
+ ), a = (_ = e.container) == null ? void 0 : _.querySelector(".choco-widget-google-pay-row"), l = (k = e.container) == null ? void 0 : k.querySelector(".choco-widget-apple-pay-row"), f = (B = e.container) == null ? void 0 : B.querySelector(
3293
3308
  ".choco-widget-balance-section"
3294
- ), C = e._isInteractionBlocked(), k = e.paymentMethodDisabled || C;
3295
- t && (t.disabled = k), o && (o.disabled = C, o.classList.remove("choco-widget-pay-button--loading")), i && (i.disabled = C), s && (s.disabled = C), u == null || u.classList.toggle("choco-widget-wallet-blocked", C), u == null || u.setAttribute("aria-disabled", String(C)), a == null || a.classList.toggle("choco-widget-wallet-blocked", C), a == null || a.setAttribute("aria-disabled", String(C)), l == null || l.classList.toggle("choco-widget-wallet-blocked", C), l == null || l.setAttribute("aria-disabled", String(C)), f == null || f.classList.remove("disabled");
3309
+ ), C = e._isInteractionBlocked(), v = e.paymentMethodDisabled || C;
3310
+ t && (t.disabled = v), o && (o.disabled = C, o.classList.remove("choco-widget-pay-button--loading")), i && (i.disabled = C), s && (s.disabled = C), u == null || u.classList.toggle("choco-widget-wallet-blocked", C), u == null || u.setAttribute("aria-disabled", String(C)), a == null || a.classList.toggle("choco-widget-wallet-blocked", C), a == null || a.setAttribute("aria-disabled", String(C)), l == null || l.classList.toggle("choco-widget-wallet-blocked", C), l == null || l.setAttribute("aria-disabled", String(C)), f == null || f.classList.remove("disabled");
3296
3311
  }
3297
3312
  function Y(e) {
3298
- var _, b, S, T, I, w, B, v;
3299
- const t = (_ = e.container) == null ? void 0 : _.querySelector(".choco-widget-payment-method"), o = (b = e.container) == null ? void 0 : b.querySelector(".choco-widget-pay-button"), i = (S = e.container) == null ? void 0 : S.querySelector(
3313
+ var b, S, L, I, _, k, B, w, O;
3314
+ const t = (b = e.container) == null ? void 0 : b.querySelector(".choco-widget-payment-method"), o = (S = e.container) == null ? void 0 : S.querySelector(".choco-widget-pay-button"), i = (L = e.container) == null ? void 0 : L.querySelector(".choco-widget-freedom-card-btn"), s = (I = e.container) == null ? void 0 : I.querySelector(
3300
3315
  ".choco-widget-google-pay-button-slot button"
3301
- ), s = (T = e.container) == null ? void 0 : T.querySelector(
3316
+ ), u = (_ = e.container) == null ? void 0 : _.querySelector(
3302
3317
  ".choco-widget-apple-pay-button-slot button"
3303
- ), u = (I = e.container) == null ? void 0 : I.querySelector(
3318
+ ), a = (k = e.container) == null ? void 0 : k.querySelector(
3304
3319
  ".choco-widget-google-pay-amount"
3305
- ), a = (w = e.container) == null ? void 0 : w.querySelector(".choco-widget-google-pay-row"), l = (B = e.container) == null ? void 0 : B.querySelector(".choco-widget-apple-pay-row"), f = (v = e.container) == null ? void 0 : v.querySelector(
3320
+ ), l = (B = e.container) == null ? void 0 : B.querySelector(".choco-widget-google-pay-row"), f = (w = e.container) == null ? void 0 : w.querySelector(".choco-widget-apple-pay-row"), C = (O = e.container) == null ? void 0 : O.querySelector(
3306
3321
  ".choco-widget-balance-section"
3307
- ), C = e._isInteractionBlocked(), k = e.paymentMethodDisabled || C;
3308
- f == null || f.classList.toggle("disabled", C), t && (t.disabled = k), o && (o.disabled = C, o.classList.toggle("choco-widget-pay-button--loading", e.loading)), i && (i.disabled = C), s && (s.disabled = C), u == null || u.classList.toggle("choco-widget-wallet-blocked", C), u == null || u.setAttribute("aria-disabled", String(C)), a == null || a.classList.toggle("choco-widget-wallet-blocked", C), a == null || a.setAttribute("aria-disabled", String(C)), l == null || l.classList.toggle("choco-widget-wallet-blocked", C), l == null || l.setAttribute("aria-disabled", String(C));
3322
+ ), v = e._isInteractionBlocked(), T = e.paymentMethodDisabled || v;
3323
+ C == null || C.classList.toggle("disabled", v), t && (t.disabled = T), o && (o.disabled = v, o.classList.toggle("choco-widget-pay-button--loading", e.loading)), i && (i.disabled = v), s && (s.disabled = v), u && (u.disabled = v), a == null || a.classList.toggle("choco-widget-wallet-blocked", v), a == null || a.setAttribute("aria-disabled", String(v)), l == null || l.classList.toggle("choco-widget-wallet-blocked", v), l == null || l.setAttribute("aria-disabled", String(v)), f == null || f.classList.toggle("choco-widget-wallet-blocked", v), f == null || f.setAttribute("aria-disabled", String(v));
3309
3324
  }
3310
3325
  function ft(e) {
3311
3326
  var o;
@@ -3572,12 +3587,12 @@ async function vn(e) {
3572
3587
  await rt(e);
3573
3588
  const l = (a == null ? void 0 : a.id) ?? ((i = a == null ? void 0 : a.data) == null ? void 0 : i.id);
3574
3589
  if (l && ce(e, String(l)), ((s = e.selectedPaymentMethod) == null ? void 0 : s.type) === "kaspi_pay") {
3575
- const f = (a == null ? void 0 : a.attributes) || ((u = a == null ? void 0 : a.data) == null ? void 0 : u.attributes) || {}, C = f.action_link || f.action_url, k = f.action_url_type || f.action_type || "redirect";
3590
+ const f = (a == null ? void 0 : a.attributes) || ((u = a == null ? void 0 : a.data) == null ? void 0 : u.attributes) || {}, C = f.action_link || f.action_url, v = f.action_url_type || f.action_type || "redirect";
3576
3591
  if (C)
3577
3592
  return typeof e.config.onKaspiLink == "function" ? (e.config.onKaspiLink({
3578
3593
  action_link: C,
3579
3594
  action_url: C,
3580
- action_type: k,
3595
+ action_type: v,
3581
3596
  event: a
3582
3597
  }), a) : (window.location.href = C, a);
3583
3598
  }
@@ -3602,7 +3617,7 @@ async function rt(e) {
3602
3617
  async function Bn(e, t) {
3603
3618
  ne(e), e.waitingForNewCardAction = !0, e._setNewCardActionTimeout();
3604
3619
  try {
3605
- await xt(
3620
+ await Ft(
3606
3621
  e.apiUrl,
3607
3622
  e._getApiConfig(),
3608
3623
  e.deviceId,
@@ -3646,8 +3661,8 @@ async function In(e, t) {
3646
3661
  e.apiUrl,
3647
3662
  e._getApiConfig(),
3648
3663
  u.validationURL
3649
- ), C = ((l = (a = f == null ? void 0 : f.data) == null ? void 0 : a.attributes) == null ? void 0 : l.session) || f, k = JSON.parse(atob(C));
3650
- s.completeMerchantValidation(k);
3664
+ ), C = ((l = (a = f == null ? void 0 : f.data) == null ? void 0 : a.attributes) == null ? void 0 : l.session) || f, v = JSON.parse(atob(C));
3665
+ s.completeMerchantValidation(v);
3651
3666
  } catch (f) {
3652
3667
  console.error("Apple Pay session error:", f), s.abort(), e.config.onError({ attributes: { message: e.t("errorApplePayInit") } });
3653
3668
  }
@@ -3680,8 +3695,8 @@ async function In(e, t) {
3680
3695
  }, s.begin();
3681
3696
  }
3682
3697
  async function Qn(e, t) {
3683
- var w, B, v, L, O, F;
3684
- const o = (w = e.checkoutContext) == null ? void 0 : w.data, i = ((v = (B = o == null ? void 0 : o.payment_methods) == null ? void 0 : B.data) == null ? void 0 : v.attributes) || {}, s = i.google_pay_settings || {};
3698
+ var _, k, B, w, O, F;
3699
+ const o = (_ = e.checkoutContext) == null ? void 0 : _.data, i = ((B = (k = o == null ? void 0 : o.payment_methods) == null ? void 0 : k.data) == null ? void 0 : B.attributes) || {}, s = i.google_pay_settings || {};
3685
3700
  if (!(i.payment_method_google_pay === "enabled" || i.payment_method_google_pay === !0)) {
3686
3701
  e.config.onError({ attributes: { message: e.t("errorGooglePayUnsupported") } });
3687
3702
  return;
@@ -3693,8 +3708,8 @@ async function Qn(e, t) {
3693
3708
  });
3694
3709
  return;
3695
3710
  }
3696
- const f = e.config.environment === "production", C = (s == null ? void 0 : s.merchant_name) || "Choco", k = s == null ? void 0 : s.google_merchant_id;
3697
- if (f && !k) {
3711
+ const f = e.config.environment === "production", C = (s == null ? void 0 : s.merchant_name) || "Choco", v = s == null ? void 0 : s.google_merchant_id;
3712
+ if (f && !v) {
3698
3713
  e.config.onError({
3699
3714
  attributes: { message: e.t("errorGooglePaySettingsUnavailable") }
3700
3715
  });
@@ -3704,7 +3719,7 @@ async function Qn(e, t) {
3704
3719
  await Sn(e, t, { gateway: a, gatewayMerchantId: l });
3705
3720
  return;
3706
3721
  }
3707
- const _ = Number(e._getCheckoutAmount()).toFixed(2);
3722
+ const T = Number(e._getCheckoutAmount()).toFixed(2);
3708
3723
  try {
3709
3724
  await e._loadGooglePaySdk();
3710
3725
  } catch (N) {
@@ -3729,18 +3744,18 @@ async function Qn(e, t) {
3729
3744
  parameters: { gateway: a, gatewayMerchantId: l }
3730
3745
  }
3731
3746
  }
3732
- ], T = {
3747
+ ], L = {
3733
3748
  apiVersion: 2,
3734
3749
  apiVersionMinor: 0,
3735
3750
  allowedPaymentMethods: S,
3736
3751
  transactionInfo: {
3737
3752
  totalPriceStatus: "FINAL",
3738
3753
  totalPriceLabel: "Итого",
3739
- totalPrice: _,
3754
+ totalPrice: T,
3740
3755
  currencyCode: e.config.currency,
3741
3756
  countryCode: e.config.currency === "GEL" ? "GE" : "KZ"
3742
3757
  },
3743
- merchantInfo: f ? { merchantId: k, merchantName: C } : { merchantName: C }
3758
+ merchantInfo: f ? { merchantId: v, merchantName: C } : { merchantName: C }
3744
3759
  }, I = new b.payments.api.PaymentsClient({
3745
3760
  environment: f ? "PRODUCTION" : "TEST"
3746
3761
  });
@@ -3755,7 +3770,7 @@ async function Qn(e, t) {
3755
3770
  return;
3756
3771
  }
3757
3772
  ne(e);
3758
- const q = await I.loadPaymentData(T), J = (O = (L = q == null ? void 0 : q.paymentMethodData) == null ? void 0 : L.tokenizationData) == null ? void 0 : O.token;
3773
+ const q = await I.loadPaymentData(L), J = (O = (w = q == null ? void 0 : q.paymentMethodData) == null ? void 0 : w.tokenizationData) == null ? void 0 : O.token;
3759
3774
  if (!J) throw new Error(e.t("errorGooglePayPayment"));
3760
3775
  const x = JSON.parse(J), M = await At(
3761
3776
  e.apiUrl,
@@ -3802,25 +3817,27 @@ async function Sn(e, t, o) {
3802
3817
  }
3803
3818
  }
3804
3819
  function Pn(e) {
3805
- var a, l, f, C, k, _, b, S, T, I, w;
3820
+ var a, l, f, C, v, T, b, S, L, I, _, k;
3806
3821
  const t = e.container;
3807
- (a = t.querySelector('[data-action="pay"]')) == null || a.addEventListener("click", () => e.handlePayment()), (l = t.querySelector('[data-action="change-method"]')) == null || l.addEventListener("click", () => ft(e)), t.querySelectorAll('[data-action="close"]').forEach((B) => B.addEventListener("click", () => e.close())), (f = t.querySelector('[data-action="close-sheet"]')) == null || f.addEventListener("click", () => {
3822
+ (a = t.querySelector('[data-action="freedom-card"]')) == null || a.addEventListener("click", () => {
3823
+ e.config.onFreedomLink && e.config.onFreedomLink();
3824
+ }), (l = t.querySelector('[data-action="pay"]')) == null || l.addEventListener("click", () => e.handlePayment()), (f = t.querySelector('[data-action="change-method"]')) == null || f.addEventListener("click", () => ft(e)), t.querySelectorAll('[data-action="close"]').forEach((B) => B.addEventListener("click", () => e.close())), (C = t.querySelector('[data-action="close-sheet"]')) == null || C.addEventListener("click", () => {
3808
3825
  e._pendingDeleteMethod ? ve(e) : G(e);
3809
- }), (C = t.querySelector('[data-action="edit-sheet"]')) == null || C.addEventListener("click", () => {
3826
+ }), (v = t.querySelector('[data-action="edit-sheet"]')) == null || v.addEventListener("click", () => {
3810
3827
  e.isPaymentSheetEditMode = !0, Ae(e), ue(e);
3811
- }), (k = t.querySelector('[data-action="previous-sheet"]')) == null || k.addEventListener("click", () => {
3828
+ }), (T = t.querySelector('[data-action="previous-sheet"]')) == null || T.addEventListener("click", () => {
3812
3829
  e.isPaymentSheetEditMode = !1, Ae(e), ue(e);
3813
- }), (_ = t.querySelector('[data-action="close-add-card"]')) == null || _.addEventListener("click", () => ae(e)), (b = t.querySelector('[data-action="confirm-delete-cancel"]')) == null || b.addEventListener("click", () => ve(e)), (S = t.querySelector('[data-action="confirm-delete-submit"]')) == null || S.addEventListener("click", () => {
3830
+ }), (b = t.querySelector('[data-action="close-add-card"]')) == null || b.addEventListener("click", () => ae(e)), (S = t.querySelector('[data-action="confirm-delete-cancel"]')) == null || S.addEventListener("click", () => ve(e)), (L = t.querySelector('[data-action="confirm-delete-submit"]')) == null || L.addEventListener("click", () => {
3814
3831
  if (e._pendingDeleteMethod) {
3815
3832
  const B = e._pendingDeleteMethod;
3816
3833
  De(e, !0), bn(e, B).then(() => G(e)).finally(() => De(e, !1));
3817
3834
  }
3818
3835
  }), t.querySelectorAll(".choco-widget-method-item").forEach((B) => {
3819
- B.addEventListener("click", (v) => {
3820
- const L = JSON.parse(
3821
- v.currentTarget.getAttribute("data-method") || "{}"
3836
+ B.addEventListener("click", (w) => {
3837
+ const O = JSON.parse(
3838
+ w.currentTarget.getAttribute("data-method") || "{}"
3822
3839
  );
3823
- gt(e, L);
3840
+ gt(e, O);
3824
3841
  });
3825
3842
  });
3826
3843
  const o = t.querySelector('[data-sheet="payment"]');
@@ -3828,15 +3845,15 @@ function Pn(e) {
3828
3845
  B.target === o && G(e);
3829
3846
  }), wn(e, o));
3830
3847
  const i = t.querySelector('[data-action="toggle-balance"]');
3831
- i && ((T = i.querySelector("input[type='checkbox']")) == null || T.addEventListener("change", (B) => {
3848
+ i && ((I = i.querySelector("input[type='checkbox']")) == null || I.addEventListener("change", (B) => {
3832
3849
  e.useBalance = B.target.checked, tt(e), e._updatePayButtonAmount();
3833
3850
  }));
3834
3851
  const s = t.querySelector('[data-action="toggle-bonuses"]');
3835
- s && ((I = s.querySelector("input[type='checkbox']")) == null || I.addEventListener("change", (B) => {
3852
+ s && ((_ = s.querySelector("input[type='checkbox']")) == null || _.addEventListener("change", (B) => {
3836
3853
  e.useBonuses = B.target.checked, e.config.onAppliedBonus(e.useBonuses), tt(e), e._updatePayButtonAmount();
3837
3854
  }));
3838
3855
  const u = t.querySelector('[data-action="toggle-coupon"]');
3839
- u && ((w = u.querySelector("input[type='checkbox']")) == null || w.addEventListener("change", (B) => {
3856
+ u && ((k = u.querySelector("input[type='checkbox']")) == null || k.addEventListener("change", (B) => {
3840
3857
  e.useCoupon = B.target.checked, e._updatePayButtonAmount();
3841
3858
  })), document.removeEventListener("keydown", e._boundKeyDown), document.addEventListener("keydown", e._boundKeyDown), ht(e);
3842
3859
  }
@@ -3851,17 +3868,17 @@ function wn(e, t) {
3851
3868
  let u = 0, a = 0;
3852
3869
  const l = (C) => {
3853
3870
  a = C.clientY;
3854
- const k = Math.max(0, a - u);
3855
- i.style.transform = `translateY(${k}px)`;
3871
+ const v = Math.max(0, a - u);
3872
+ i.style.transform = `translateY(${v}px)`;
3856
3873
  }, f = (C) => {
3857
3874
  o.releasePointerCapture(C.pointerId), o.removeEventListener("pointermove", l), o.removeEventListener("pointerup", f), o.removeEventListener("pointercancel", f);
3858
- const k = Math.max(0, a - u);
3859
- if (i.classList.remove("choco-widget-sheet-content--dragging"), k >= s) {
3875
+ const v = Math.max(0, a - u);
3876
+ if (i.classList.remove("choco-widget-sheet-content--dragging"), v >= s) {
3860
3877
  i.style.transform = "translateY(100%)";
3861
- const _ = () => {
3862
- i.removeEventListener("transitionend", _), i.style.transform = "", G(e);
3878
+ const T = () => {
3879
+ i.removeEventListener("transitionend", T), i.style.transform = "", G(e);
3863
3880
  };
3864
- i.addEventListener("transitionend", _);
3881
+ i.addEventListener("transitionend", T);
3865
3882
  } else
3866
3883
  i.style.transform = "";
3867
3884
  };
@@ -3932,7 +3949,7 @@ class ie {
3932
3949
  return Number.isFinite(t) && t > 0 ? t : 0;
3933
3950
  }
3934
3951
  _getPaymentBreakdown() {
3935
- const t = this.config.amount, o = this._getBalanceAmount(), i = this.useBalance ? Math.min(o, t) : 0, s = t - i, u = this.useBalance && i >= t, a = this.useBonuses ? this._getAvailableBonus() : 0, l = Math.max(s - a, 0), f = this._getCouponDiscount(), C = Math.max(l - f, 0), k = this.useBalance ? t : C, _ = this.useBalance && !u, S = this.useCoupon && this.selectedCoupon && !this._isCouponDisabled() ? {
3952
+ const t = this.config.amount, o = this._getBalanceAmount(), i = this.useBalance ? Math.min(o, t) : 0, s = t - i, u = this.useBalance && i >= t, a = this.useBonuses ? this._getAvailableBonus() : 0, l = Math.max(s - a, 0), f = this._getCouponDiscount(), C = Math.max(l - f, 0), v = this.useBalance ? t : C, T = this.useBalance && !u, S = this.useCoupon && this.selectedCoupon && !this._isCouponDisabled() ? {
3936
3953
  id: this.selectedCoupon.voucher_id,
3937
3954
  template_id: this.selectedCoupon.template_id,
3938
3955
  type: this.selectedCoupon.type
@@ -3940,9 +3957,9 @@ class ie {
3940
3957
  return {
3941
3958
  payableAmount: C,
3942
3959
  checkoutOptions: {
3943
- checkoutAmount: k,
3960
+ checkoutAmount: v,
3944
3961
  forceBalanceMethod: u,
3945
- useBalance: _,
3962
+ useBalance: T,
3946
3963
  voucher: S
3947
3964
  }
3948
3965
  };
@@ -4074,7 +4091,7 @@ class ie {
4074
4091
  }
4075
4092
  async _fetchCoupons() {
4076
4093
  try {
4077
- const t = await Ft(this.apiUrl, this._getApiConfig()), i = (Array.isArray(t) ? t : Array.isArray(t == null ? void 0 : t.data) ? t.data : []).filter((s) => Number(s.reward_amount) > 0).sort((s, u) => s.sort_weight - u.sort_weight);
4094
+ const t = await xt(this.apiUrl, this._getApiConfig()), i = (Array.isArray(t) ? t : Array.isArray(t == null ? void 0 : t.data) ? t.data : []).filter((s) => Number(s.reward_amount) > 0).sort((s, u) => s.sort_weight - u.sort_weight);
4078
4095
  this.selectedCoupon = i.length > 0 ? i[0] : null, this.useCoupon = !1;
4079
4096
  } catch {
4080
4097
  this.selectedCoupon = null, this.useCoupon = !1;
@@ -4264,6 +4281,10 @@ class ie {
4264
4281
  if (typeof t != "function") throw new Error("onUserEvent callback must be a function");
4265
4282
  this.config.onUserEvent = t;
4266
4283
  }
4284
+ async onFreedomLink(t) {
4285
+ if (typeof t != "function") throw new Error("onFreedomLink callback must be a function");
4286
+ this.config.onFreedomLink = t;
4287
+ }
4267
4288
  async onAppliedBonus(t) {
4268
4289
  if (typeof t != "function")
4269
4290
  throw new Error("onAppliedBonus callback must be a function");