@malga-checkout/core
Version:
Core components for Malga Checkout
19 lines • 69.9 kB
JavaScript
import{r as o,c as t,h as c,H as a,F as e}from"./p-b48ba462.js";import{c as n,a as i,g as r}from"./p-3e8ff66b.js";import{Z as l}from"./p-db1a9ee9.js";import{f as u}from"./p-b28f21d9.js";import{p as s,a as h}from"./p-5e7ae5c5.js";import"./p-c6a7b0e7.js";function m(o,t,c){return l(t?"dialogs.common.clipboardClicked":o?"dialogs.common.clipboard":"dialogs.common.clipboardDescription",c)}const d=r(n((function(o){
/*!
* clipboard.js v2.0.8
* https://clipboardjs.com/
*
* Licensed MIT © Zeno Rocha
*/
var t;t=function(){return function(){var o={134:function(o,t,c){c.d(t,{default:function(){return b}});var a=c(279),e=c.n(a),n=c(370),i=c.n(n),r=c(817),l=c.n(r);function u(o){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(o)}function s(o,t){for(var c=0;c<t.length;c++){var a=t[c];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(o,a.key,a)}}var h=function(){function o(t){!function(o,t){if(!(o instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),this.resolveOptions(t),this.initSelection()}var t,c;return t=o,(c=[{key:"resolveOptions",value:function(){var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action=o.action,this.container=o.container,this.emitter=o.emitter,this.target=o.target,this.text=o.text,this.trigger=o.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"createFakeElement",value:function(){var o="rtl"===document.documentElement.getAttribute("dir");this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[o?"right":"left"]="-9999px";var t=window.pageYOffset||document.documentElement.scrollTop;return this.fakeElem.style.top="".concat(t,"px"),this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.fakeElem}},{key:"selectFake",value:function(){var o=this,t=this.createFakeElement();this.fakeHandlerCallback=function(){return o.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.container.appendChild(t),this.selectedText=l()(t),this.copyText(),this.removeFake()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=l()(this.target),this.copyText()}},{key:"copyText",value:function(){var o;try{o=document.execCommand(this.action)}catch(t){o=!1}this.handleResult(o)}},{key:"handleResult",value:function(o){this.emitter.emit(o?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),document.activeElement.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=o,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(o){if(void 0!==o){if(!o||"object"!==u(o)||1!==o.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&o.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(o.hasAttribute("readonly")||o.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=o}},get:function(){return this._target}}])&&s(t.prototype,c),o}();function m(o){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(o)}function d(o,t){for(var c=0;c<t.length;c++){var a=t[c];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(o,a.key,a)}}function g(o,t){return(g=Object.setPrototypeOf||function(o,t){return o.__proto__=t,o})(o,t)}function p(o,t){return!t||"object"!==m(t)&&"function"!=typeof t?function(o){if(void 0===o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(o):t}function k(o){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}function f(o,t){var c="data-clipboard-".concat(o);if(t.hasAttribute(c))return t.getAttribute(c)}var b=function(o){!function(o,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(t&&t.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),t&&g(o,t)}(l,o);var t,c,a,e,n,r=(e=l,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(o){return!1}}(),function(){var o,t=k(e);if(n){var c=k(this).constructor;o=Reflect.construct(t,arguments,c)}else o=t.apply(this,arguments);return p(this,o)});function l(o,t){var c;return function(o,t){if(!(o instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(c=r.call(this)).resolveOptions(t),c.listenClick(o),c}return t=l,a=[{key:"isSupported",value:function(){var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof o?[o]:o,c=!!document.queryCommandSupported;return t.forEach((function(o){c=c&&!!document.queryCommandSupported(o)})),c}}],(c=[{key:"resolveOptions",value:function(){var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof o.action?o.action:this.defaultAction,this.target="function"==typeof o.target?o.target:this.defaultTarget,this.text="function"==typeof o.text?o.text:this.defaultText,this.container="object"===m(o.container)?o.container:document.body}},{key:"listenClick",value:function(o){var t=this;this.listener=i()(o,"click",(function(o){return t.onClick(o)}))}},{key:"onClick",value:function(o){var t=o.delegateTarget||o.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new h({action:this.action(t),target:this.target(t),text:this.text(t),container:this.container,trigger:t,emitter:this})}},{key:"defaultAction",value:function(o){return f("action",o)}},{key:"defaultTarget",value:function(o){var t=f("target",o);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(o){return f("text",o)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}])&&d(t.prototype,c),a&&d(t,a),l}(e())},828:function(o){if("undefined"!=typeof Element&&!Element.prototype.matches){var t=Element.prototype;t.matches=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}o.exports=function(o,t){for(;o&&9!==o.nodeType;){if("function"==typeof o.matches&&o.matches(t))return o;o=o.parentNode}}},438:function(o,t,c){var a=c(828);function e(o,t,c,a,e){var i=n.apply(this,arguments);return o.addEventListener(c,i,e),{destroy:function(){o.removeEventListener(c,i,e)}}}function n(o,t,c,e){return function(c){c.delegateTarget=a(c.target,t),c.delegateTarget&&e.call(o,c)}}o.exports=function(o,t,c,a,n){return"function"==typeof o.addEventListener?e.apply(null,arguments):"function"==typeof c?e.bind(null,document).apply(null,arguments):("string"==typeof o&&(o=document.querySelectorAll(o)),Array.prototype.map.call(o,(function(o){return e(o,t,c,a,n)})))}},879:function(o,t){t.node=function(o){return void 0!==o&&o instanceof HTMLElement&&1===o.nodeType},t.nodeList=function(o){var c=Object.prototype.toString.call(o);return void 0!==o&&("[object NodeList]"===c||"[object HTMLCollection]"===c)&&"length"in o&&(0===o.length||t.node(o[0]))},t.string=function(o){return"string"==typeof o||o instanceof String},t.fn=function(o){return"[object Function]"===Object.prototype.toString.call(o)}},370:function(o,t,c){var a=c(879),e=c(438);o.exports=function(o,t,c){if(!o&&!t&&!c)throw new Error("Missing required arguments");if(!a.string(t))throw new TypeError("Second argument must be a String");if(!a.fn(c))throw new TypeError("Third argument must be a Function");if(a.node(o))return function(o,t,c){return o.addEventListener(t,c),{destroy:function(){o.removeEventListener(t,c)}}}(o,t,c);if(a.nodeList(o))return function(o,t,c){return Array.prototype.forEach.call(o,(function(o){o.addEventListener(t,c)})),{destroy:function(){Array.prototype.forEach.call(o,(function(o){o.removeEventListener(t,c)}))}}}(o,t,c);if(a.string(o))return function(o,t,c){return e(document.body,o,t,c)}(o,t,c);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},817:function(o){o.exports=function(o){var t;if("SELECT"===o.nodeName)o.focus(),t=o.value;else if("INPUT"===o.nodeName||"TEXTAREA"===o.nodeName){var c=o.hasAttribute("readonly");c||o.setAttribute("readonly",""),o.select(),o.setSelectionRange(0,o.value.length),c||o.removeAttribute("readonly"),t=o.value}else{o.hasAttribute("contenteditable")&&o.focus();var a=window.getSelection(),e=document.createRange();e.selectNodeContents(o),a.removeAllRanges(),a.addRange(e),t=a.toString()}return t}},279:function(o){function t(){}t.prototype={on:function(o,t,c){var a=this.e||(this.e={});return(a[o]||(a[o]=[])).push({fn:t,ctx:c}),this},once:function(o,t,c){var a=this;function e(){a.off(o,e),t.apply(c,arguments)}return e._=t,this.on(o,e,c)},emit:function(o){for(var t=[].slice.call(arguments,1),c=((this.e||(this.e={}))[o]||[]).slice(),a=0,e=c.length;a<e;a++)c[a].fn.apply(c[a].ctx,t);return this},off:function(o,t){var c=this.e||(this.e={}),a=c[o],e=[];if(a&&t)for(var n=0,i=a.length;n<i;n++)a[n].fn!==t&&a[n].fn._!==t&&e.push(a[n]);return e.length?c[o]=e:delete c[o],this}},o.exports=t,o.exports.TinyEmitter=t}},t={};function c(a){if(t[a])return t[a].exports;var e=t[a]={exports:{}};return o[a](e,e.exports,c),e.exports}return c.n=function(o){var t=o&&o.__esModule?function(){return o.default}:function(){return o};return c.d(t,{a:t}),t},c.d=function(o,t){for(var a in t)c.o(t,a)&&!c.o(o,a)&&Object.defineProperty(o,a,{enumerable:!0,get:t[a]})},c.o=function(o,t){return Object.prototype.hasOwnProperty.call(o,t)},c(134)}().default},o.exports=t()}))),g=class{constructor(c){o(this,c),this.clicked=t(this,"clicked",7),this.focused=t(this,"focused",7),this.blured=t(this,"blured",7),this.disabled=!1,this.type="button",this.onClick=()=>{this.isLoading||this.disabled||this.clicked.emit()},this.onFocus=()=>{this.focused.emit()},this.onBlur=()=>{this.blured.emit()},this.handleDynamicClipboardAttribute=()=>this.clipboardContent?{"data-clipboard-text":this.clipboardContent}:{}}componentDidLoad(){this.clipboardContent&&new d("#clipboard")}render(){return c(a,{style:{pointerEvents:this.disabled?"none":void 0},"aria-disabled":this.disabled?"true":null},c("button",Object.assign({disabled:this.disabled,type:this.type,id:this.clipboardContent?"clipboard":"",class:{"checkout-button__native":!0,"checkout-button__native--full-width":this.fullWidth,[this.customClass]:!!this.customClass},onClick:this.onClick,onFocus:this.onFocus,onBlur:this.onBlur},this.handleDynamicClipboardAttribute()),(!!this.icon||this.isLoading)&&c("checkout-icon",{icon:this.isLoading?"spinner":this.icon,class:this.isLoading?"icon icon-loading":"icon"}),this.isLoading?l("common.processing",this.locale):this.label))}};g.style='@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap"); :root{--malga-checkout-color-page-background:#eef2f6;--malga-checkout-color-brand-accent-light:#79DBD4;--malga-checkout-color-brand-accent-normal:#39BFAD;--malga-checkout-color-brand-clean:#C3F4EF;--malga-checkout-color-brand-light:#79DBD4;--malga-checkout-color-brand-normal:#39BFAD;--malga-checkout-color-brand-middle:#2FAC9B;--malga-checkout-color-brand-dark:#147F70;--malga-checkout-color-grey-light:#666666;--malga-checkout-color-grey-normal:#4D4D4D;--malga-checkout-color-grey-middle:#333333;--malga-checkout-color-grey-dark:#1A1A1A;--malga-checkout-color-grey-darkness:#000000;--malga-checkout-color-accent-light:#ffffff;--malga-checkout-color-accent-normal:#F1F1F1;--malga-checkout-color-accent-middle:#CBCBCB;--malga-checkout-color-warning-light:#FFF8E6;--malga-checkout-color-warning-normal:#F9DF8D;--malga-checkout-color-warning-middle:#FFA400;--malga-checkout-color-warning-dark:#ED3A3D;--malga-checkout-color-modal-success:#00AE42;--malga-checkout-color-modal-error:#ED3A3D;--malga-checkout-color-modal-neutral:#4D4D4D;--malga-checkout-color-disabled:#F9F9F9;--malga-checkout-color-modal-action-button-error:#000000;--malga-checkout-color-modal-action-button-error-hover:#333333;--malga-checkout-color-modal-action-button-success:#000000;--malga-checkout-color-modal-action-button-success-hover:#333333;--malga-checkout-color-modal-action-button-success-font-color:#ffffff;--malga-checkout-color-modal-action-button-error-font-color:#ffffff;--malga-checkout-typography-family:"Inter", sans-serif;--malga-checkout-spacing-xxs:4px;--malga-checkout-spacing-xs:8px;--malga-checkout-spacing-sm:16px;--malga-checkout-spacing-default:24px;--malga-checkout-spacing-md:32px;--malga-checkout-spacing-lg:48px;--malga-checkout-spacing-xlg:64px;--malga-checkout-spacing-xxlg:96px;--malga-checkout-size-min-width:250px;--malga-checkout-border-radius-default:4px;--malga-checkout-border-radius-md:6px;--malga-checkout-border-radius-lg:20px;--malga-checkout-transition-slow:0.3s;--malga-checkout-transition-default:0.5s}.checkout-button__native{font-family:var(--malga-checkout-typography-family);font-size:14px;font-style:normal;font-weight:bold;text-transform:uppercase}.checkout-button__native{font-family:var(--malga-checkout-typography-family);padding:0;margin:0;box-sizing:border-box}.checkout-button__native{display:flex;align-items:center;justify-content:center}.checkout-button__container--full-width{width:100%}.checkout-button__native{transition:background var(--malga-checkout-transition-default) ease;display:flex;flex-direction:row;align-items:center;justify-content:center;cursor:pointer;outline:none;height:40px;padding:0 var(--malga-checkout-spacing-sm);border:0;border-radius:var(--malga-checkout-border-radius-default);background:var(--malga-checkout-color-brand-middle);letter-spacing:1.25px;text-align:center;color:var(--malga-checkout-color-accent-light)}.checkout-button__native:hover{background:var(--malga-checkout-color-brand-normal)}.checkout-button__native:focus{border:2px solid var(--malga-checkout-color-brand-accent-light)}.checkout-button__native:disabled{background:var(--malga-checkout-color-accent-normal);color:var(--malga-checkout-color-accent-middle);cursor:not-allowed}.checkout-button__native:disabled>.icon{color:var(--malga-checkout-color-accent-middle)}.checkout-button__native>checkout-icon>i>svg{color:css(--malga-checkout-color-accent-light)}.checkout-button__native>.icon{height:var(--malga-checkout-spacing-sm);width:var(--malga-checkout-spacing-sm);display:flex;align-items:center;justify-content:center;margin-right:10px;margin-top:3px}.checkout-button__native>.icon-loading{animation:spin 1.5s linear infinite}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.checkout-button__native--full-width{width:100%}';const p=class{constructor(t){o(this,t)}componentDidLoad(){new d("#clipboard")}render(){return c(a,{class:{"checkout-clipboard-button__container":!0}},c("button",{id:"clipboard",class:{"checkout-clipboard-button__button":!0},"data-clipboard-text":this.clipboardContent},c("checkout-icon",{icon:"clipboard"}),c("checkout-typography",{tag:"span",variation:"label",content:this.label})))}};
/*!
* canvas-circular-countdown
* Draw a configurable circular canvas countdown timer
*
* @version v1.5.0
* @author George Raptis <georapbox@gmail.com>
* @homepage https://github.com/georapbox/canvas-circular-countdown#readme
* @repository git+https://github.com/georapbox/canvas-circular-countdown.git
* @license MIT
*/
function k(o){return(k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(o)}function f(o,t){if(!(o instanceof t))throw new TypeError("Cannot call a class as a function")}function b(o,t){for(var c=0;c<t.length;c++){var a=t[c];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(o,a.key,a)}}function y(o,t,c){return t&&b(o.prototype,t),c&&b(o,c),o}function x(o,t,c){return t in o?Object.defineProperty(o,t,{value:c,enumerable:!0,configurable:!0,writable:!0}):o[t]=c,o}function v(o,t){var c=Object.keys(o);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(o);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(o,t).enumerable}))),c.push.apply(c,a)}return c}function _(o){for(var t=1;t<arguments.length;t++){var c=null!=arguments[t]?arguments[t]:{};t%2?v(Object(c),!0).forEach((function(t){x(o,t,c[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(c)):v(Object(c)).forEach((function(t){Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(c,t))}))}return o}function w(){return window.performance?window.performance.now():Date.now?Date.now():(new Date).getTime()}function F(o){!1!==o._started&&(o._time=o._time+w()-o._now,o.stop().start(),"function"==typeof o._callback&&o._callback(o))}p.style='@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap"); :root{--malga-checkout-color-page-background:#eef2f6;--malga-checkout-color-brand-accent-light:#79DBD4;--malga-checkout-color-brand-accent-normal:#39BFAD;--malga-checkout-color-brand-clean:#C3F4EF;--malga-checkout-color-brand-light:#79DBD4;--malga-checkout-color-brand-normal:#39BFAD;--malga-checkout-color-brand-middle:#2FAC9B;--malga-checkout-color-brand-dark:#147F70;--malga-checkout-color-grey-light:#666666;--malga-checkout-color-grey-normal:#4D4D4D;--malga-checkout-color-grey-middle:#333333;--malga-checkout-color-grey-dark:#1A1A1A;--malga-checkout-color-grey-darkness:#000000;--malga-checkout-color-accent-light:#ffffff;--malga-checkout-color-accent-normal:#F1F1F1;--malga-checkout-color-accent-middle:#CBCBCB;--malga-checkout-color-warning-light:#FFF8E6;--malga-checkout-color-warning-normal:#F9DF8D;--malga-checkout-color-warning-middle:#FFA400;--malga-checkout-color-warning-dark:#ED3A3D;--malga-checkout-color-modal-success:#00AE42;--malga-checkout-color-modal-error:#ED3A3D;--malga-checkout-color-modal-neutral:#4D4D4D;--malga-checkout-color-disabled:#F9F9F9;--malga-checkout-color-modal-action-button-error:#000000;--malga-checkout-color-modal-action-button-error-hover:#333333;--malga-checkout-color-modal-action-button-success:#000000;--malga-checkout-color-modal-action-button-success-hover:#333333;--malga-checkout-color-modal-action-button-success-font-color:#ffffff;--malga-checkout-color-modal-action-button-error-font-color:#ffffff;--malga-checkout-typography-family:"Inter", sans-serif;--malga-checkout-spacing-xxs:4px;--malga-checkout-spacing-xs:8px;--malga-checkout-spacing-sm:16px;--malga-checkout-spacing-default:24px;--malga-checkout-spacing-md:32px;--malga-checkout-spacing-lg:48px;--malga-checkout-spacing-xlg:64px;--malga-checkout-spacing-xxlg:96px;--malga-checkout-size-min-width:250px;--malga-checkout-border-radius-default:4px;--malga-checkout-border-radius-md:6px;--malga-checkout-border-radius-lg:20px;--malga-checkout-transition-slow:0.3s;--malga-checkout-transition-default:0.5s}.checkout-clipboard-button__container{display:block;width:100%}.checkout-clipboard-button__button{display:flex;flex-direction:row;align-items:center;border:none;background:transparent;cursor:pointer;margin:0;padding:0}.checkout-clipboard-button__button>checkout-icon{margin-right:var(--malga-checkout-spacing-xs)}.checkout-clipboard-button__button>checkout-typography{text-align:start}.checkout-clipboard-button__button>checkout-typography>span{color:var(--malga-checkout-color-grey-normal)}';var D=function(){function o(t,c){f(this,o),this._started=!1,this._now=0,this._time=0,this._duration=t,this._callback=c,t<0&&(this._duration=0),t&&"function"!=typeof t||(this._duration=0,this._callback=t)}return y(o,[{key:"time",value:function(){return{remaining:Math.max(0,this._duration-this._time),elapsed:this._time}}},{key:"start",value:function(o){return o&&this.reset(!0),this._started||Number(this._duration)&&this._time>this._duration||(this._started=!0,this._now=w(),window.requestAnimationFrame(F.bind(this,this))),this}},{key:"stop",value:function(){return this._started=!1,this}},{key:"reset",value:function(o){return o&&this.stop(),this._time=0,this}},{key:"isRunning",value:function(){return this._started}}]),o}();function A(o,t){var c=t.options,a=1.5*Math.PI,e=a+o/50*Math.PI,n=Math.ceil(o),i=c.radius<0?0:c.radius,r=c.radius-c.progressBarOffset-c.progressBarWidth/2;r=r<0?0:r;var l=i,u=i;if(t._ctx.save(),t._ctx.clearRect(0,0,t._canvas.width,t._canvas.height),t._ctx.beginPath(),t._ctx.arc(l,u,i,0,2*Math.PI,!1),t._ctx.fillStyle=c.circleBackgroundColor,t._ctx.fill(),c.progressBarWidth&&(t._ctx.beginPath(),t._ctx.arc(l,u,r,a,4*Math.PI,!1),t._ctx.lineWidth=c.progressBarWidth,t._ctx.strokeStyle=c.emptyProgressBarBackgroundColor,t._ctx.stroke()),c.progressBarWidth&&(t._ctx.beginPath(),t._ctx.arc(l,u,r,a,e,!1),t._ctx.lineWidth=c.progressBarWidth,t._ctx.strokeStyle="function"==typeof c.filledProgressBarBackgroundColor?c.filledProgressBarBackgroundColor(n,t._timer.time()):c.filledProgressBarBackgroundColor,t._ctx.stroke()),"function"==typeof c.showCaption?c.showCaption(n,t._timer.time()):c.showCaption){t._ctx.fillStyle="function"==typeof c.captionColor?c.captionColor(n,t._timer.time()):c.captionColor,t._ctx.font="function"==typeof c.captionFont?c.captionFont(n,t._timer.time()):c.captionFont,t._ctx.textBaseline="middle",t._ctx.textAlign="center";var s="".concat(n,"%");if("string"==typeof c.captionText?s=c.captionText:"function"==typeof c.captionText&&(s=c.captionText(n,t._timer.time())),t._ctx.fillText(s,l,u),t._ctx.restore(),"function"==typeof c.draw){var h=2*c.radius;t._ctx.beginPath(),c.draw(t._ctx,{percentage:n,time:t._timer.time(),width:h,height:h})}}}function B(o){var t=o.getContext("2d"),c=window.devicePixelRatio||1,a=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1,e=c/a;if(c!==a){var n=o.width,i=o.height;o.width=Math.round(n*e),o.height=Math.round(i*e),o.style.width=n+"px",o.style.height=i+"px",t.scale(e,e)}return t}function C(o,t,c){if("number"!=typeof o||"number"!=typeof t||"number"!=typeof c)throw new TypeError('"normalise" expects numbers as arguments');return(o-t)/(c-t)}var E=function(){function o(t,c,a){var e=this;if(f(this,o),"function"==typeof c&&(a=c,c={}),this.options=_(_({},{duration:6e4,radius:150,progressBarWidth:15,progressBarOffset:5,circleBackgroundColor:"#ffffff",emptyProgressBarBackgroundColor:"#dddddd",filledProgressBarBackgroundColor:"#00bfeb",showCaption:!0,captionColor:"#343a40",captionFont:"20px sans-serif"}),c),"number"!=typeof this.options.duration)throw new TypeError("Expected a number for duration, instead got ".concat(k(this.options.duration)));if("CANVAS"===t.nodeName)this._canvas=t;else{var n=document.createElement("canvas");t.appendChild(n),this._canvas=n}var i=function(o){var t=100*C(o.time().remaining,0,e.options.duration);A(t,e),"function"==typeof a&&a(Math.ceil(t),o.time(),e)},r="number"==typeof this.options.throttle&&!Number.isNaN(this.options.throttle)&&this.options.throttle<=this.options.duration;this._timer=new D(this.options.duration,r?function(o,t){var c,a;if("function"!=typeof o)throw new TypeError("Expected a function for first argument");return function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];a?(clearTimeout(c),c=setTimeout((function(){Date.now()-a>=t&&(o.apply(void 0,n),a=Date.now())}),t-(Date.now()-a)||0)):(o.apply(void 0,n),a=Date.now())}}(i,this.options.throttle):i),this._canvas.width=2*this.options.radius,this._canvas.height=2*this.options.radius,this._ctx=B(this._canvas),A(100,this)}return y(o,[{key:"style",value:function(){var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{delete o.duration}catch(o){}var t=_({},this.options);this.options=_(_({duration:this.options.duration},t),o);var c=100*C(this._timer.time().remaining,0,this.options.duration);return this._canvas.width=2*this.options.radius,this._canvas.height=2*this.options.radius,this._ctx=B(this._canvas),A(c,this),this}},{key:"start",value:function(){return 0===this.options.duration||this._timer.start(!1),this}},{key:"stop",value:function(){return this._timer.stop(),this}},{key:"reset",value:function(){return this._timer.reset(!0),A(100,this),this}}]),o}(),j=n((function(o,t){!function(o){function t(o,t){var c=Object.keys(o);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(o);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(o,t).enumerable}))),c.push.apply(c,a)}return c}function c(o){for(var c=1;c<arguments.length;c++){var a=null!=arguments[c]?arguments[c]:{};c%2?t(Object(a),!0).forEach((function(t){e(o,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(a)):t(Object(a)).forEach((function(t){Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(a,t))}))}return o}function a(o){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(o)}function e(o,t,c){return t in o?Object.defineProperty(o,t,{value:c,enumerable:!0,configurable:!0,writable:!0}):o[t]=c,o}function n(o,t,c){var a,e="";if((o="number"==typeof o?String(o):o).length>t)return o;for(a=0;a<t;a+=1)e+=String(c);return(e+o).slice(-e.length)}function i(){this.reset()}function r(){this.events={}}i.prototype.toString=function(){var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["hours","minutes","seconds"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:":",c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;o=o||["hours","minutes","seconds"],t=t||":",c=c||2;var a,e=[];for(a=0;a<o.length;a+=1)void 0!==this[o[a]]&&e.push("secondTenths"===o[a]?this[o[a]]:n(this[o[a]],c,"0"));return e.join(t)},i.prototype.reset=function(){this.secondTenths=0,this.seconds=0,this.minutes=0,this.hours=0,this.days=0},r.prototype.on=function(o,t){var c=this;return Array.isArray(this.events[o])||(this.events[o]=[]),this.events[o].push(t),function(){return c.removeListener(o,t)}},r.prototype.removeListener=function(o,t){if(Array.isArray(this.events[o])){var c=this.events[o].indexOf(t);c>-1&&this.events[o].splice(c,1)}},r.prototype.removeAllListeners=function(o){o?Array.isArray(this.events[o])&&(this.events[o]=[]):this.events={}},r.prototype.emit=function(o){for(var t=this,c=arguments.length,a=new Array(c>1?c-1:0),e=1;e<c;e++)a[e-1]=arguments[e];Array.isArray(this.events[o])&&this.events[o].forEach((function(o){return o.apply(t,a)}))};var l=10,u=60,s=60,h=24,m="secondTenths",d="seconds",g="minutes",p="hours",k="days",f=[m,d,g,p,k],b={secondTenths:100,seconds:1e3,minutes:6e4,hours:36e5,days:864e5},y={secondTenths:l,seconds:u,minutes:s,hours:h};function x(o,t){return(o%t+t)%t}function v(){var o,t,e,n,v,_,w,F,D,A,B=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},C=new i,E=new i,j=new r,O=!1,S=!1,I={},T={detail:{timer:this}};function M(o,t){var c=y[o];E[o]=t,C[o]=o===k?Math.abs(t):x(t>=0?t:c-x(t,c),c)}function L(o){return U(o,k)}function z(o){return U(o,p)}function P(o){return U(o,g)}function q(o){return U(o,d)}function R(o){return U(o,m)}function U(o,t){var c=E[t];return M(t,ao(o,b[t])),E[t]!==c}function N(){H(),K()}function H(){clearInterval(o),o=void 0,O=!1,S=!1}function V(o){fo()?(D=Y(),_=eo(v.target)):Z(o),W()}function W(){var c=b[t];J(X(Date.now()))||(o=setInterval($,c),O=!0,S=!1)}function Y(){return X(Date.now())-E.secondTenths*b.secondTenths*e}function $(){var o=X(Date.now());G(Q()),n(T.detail.timer),J(o)&&(ro(),po("targetAchieved",T))}function Q(){var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:X(Date.now()),t=e>0?o-D:D-o,c={};return c.secondTenths=R(t),c.seconds=q(t),c.minutes=P(t),c.hours=z(t),c.days=L(t),c}function X(o){return Math.floor(o/b[t])*b[t]}function G(o){o.secondTenths&&po("secondTenthsUpdated",T),o.seconds&&po("secondsUpdated",T),o.minutes&&po("minutesUpdated",T),o.hours&&po("hoursUpdated",T),o.days&&po("daysUpdated",T)}function J(o){return _ instanceof Array&&o>=A}function K(){C.reset(),E.reset()}function Z(o){t=oo((o=o||{}).precision),n="function"==typeof o.callback?o.callback:function(){},e=1==(F=!0===o.countdown)?-1:1,"object"===a(o.startValues)?no(o.startValues):w=null,D=Y(),Q(),"object"===a(o.target)?_=eo(o.target):F?(o.target={seconds:0},_=eo(o.target)):_=null,I={precision:t,callback:n,countdown:"object"===a(o)&&!0===o.countdown,target:_,startValues:w},v=o}function oo(o){if(!to(o="string"==typeof o?o:d))throw new Error("Error in precision parameter: ".concat(o," is not a valid value"));return o}function to(o){return f.indexOf(o)>=0}function co(o){var t;if("object"===a(o))if(o instanceof Array){if(5!==o.length)throw new Error("Array size not valid");t=o}else{for(var c in o)if(f.indexOf(c)<0)throw new Error("Error in startValues or target parameter: ".concat(c," is not a valid input value"));t=[o.secondTenths||0,o.seconds||0,o.minutes||0,o.hours||0,o.days||0]}var e=(t=t.map((function(o){return parseInt(o,10)})))[0],n=t[1]+ao(e,l),i=t[2]+ao(n,u),r=t[3]+ao(i,s),m=t[4]+ao(r,h);return t[0]=e%l,t[1]=n%u,t[2]=i%s,t[3]=r%h,t[4]=m,t}function ao(o,t){var c=o/t;return c<0?Math.ceil(c):Math.floor(c)}function eo(o){if(o){var t=io(_=co(o));return A=D+t.secondTenths*b.secondTenths*e,_}}function no(o){w=co(o),C.secondTenths=w[0],C.seconds=w[1],C.minutes=w[2],C.hours=w[3],C.days=w[4],E=io(w,E)}function io(o,t){var c=t||{};return c.days=o[4],c.hours=c.days*h+o[3],c.minutes=c.hours*s+o[2],c.seconds=c.minutes*u+o[1],c.secondTenths=c.seconds*l+o[[0]],c}function ro(){N(),po("stopped",T)}function lo(){N(),V(v),po("reset",T)}function uo(){var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o=c(c({},B),o),ko()||(V(o),po("started",T))}function so(){H(),S=!0,po("paused",T)}function ho(o,t){j.on(o,t)}function mo(o,t){j.removeListener(o,t)}function go(o){j.removeAllListeners(o)}function po(o,t){j.emit(o,t)}function ko(){return O}function fo(){return S}function bo(){return C}function yo(){return E}function xo(){return I}Z(B),void 0!==this&&(this.start=uo,this.pause=so,this.stop=ro,this.reset=lo,this.isRunning=ko,this.isPaused=fo,this.getTimeValues=bo,this.getTotalTimeValues=yo,this.getConfig=xo,this.addEventListener=ho,this.on=ho,this.removeEventListener=mo,this.removeAllEventListeners=go,this.off=mo)}o.Timer=v,o.default=v,Object.defineProperty(o,"__esModule",{value:!0})}(t)}));const O=class{constructor(c){o(this,c),this.countdownFinished=t(this,"countdownFinished",7),this.timer=new j.Timer,this.filledProgressBarColor="#2FAC9B",this.emptyProgressBarColor="#D8DFF0",this.startCountdown=()=>{this.timer.start({countdown:!0,startValues:{seconds:this.expirationTime}}),this.countdown=this.timer.getTimeValues().toString()},this.renderCountdownText=()=>{const[o,t,c]=this.countdown.split(":");return"00"===o?`${t}:${c}`:this.countdown}}componentWillLoad(){this.expirationTime&&this.startCountdown()}componentDidLoad(){this.expirationTime&&new E(this.countdownRef,{duration:1e3*this.expirationTime,radius:45,emptyProgressBarBackgroundColor:this.emptyProgressBarColor,filledProgressBarBackgroundColor:this.filledProgressBarColor,progressBarWidth:4,progressBarOffset:1,showCaption:!1},((o,t)=>{0===t.remaining&&this.countdownFinished.emit(),this.countdown=this.timer.getTimeValues().toString()})).start()}render(){return c(a,{class:{"checkout-countdown__container":!0}},c("canvas",{ref:o=>this.countdownRef=o}),c("checkout-typography",{tag:"span",variation:"header6",styles:{color:this.filledProgressBarColor,fontWeight:"500"},content:this.renderCountdownText()}))}};O.style='@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap"); :root{--malga-checkout-color-page-background:#eef2f6;--malga-checkout-color-brand-accent-light:#79DBD4;--malga-checkout-color-brand-accent-normal:#39BFAD;--malga-checkout-color-brand-clean:#C3F4EF;--malga-checkout-color-brand-light:#79DBD4;--malga-checkout-color-brand-normal:#39BFAD;--malga-checkout-color-brand-middle:#2FAC9B;--malga-checkout-color-brand-dark:#147F70;--malga-checkout-color-grey-light:#666666;--malga-checkout-color-grey-normal:#4D4D4D;--malga-checkout-color-grey-middle:#333333;--malga-checkout-color-grey-dark:#1A1A1A;--malga-checkout-color-grey-darkness:#000000;--malga-checkout-color-accent-light:#ffffff;--malga-checkout-color-accent-normal:#F1F1F1;--malga-checkout-color-accent-middle:#CBCBCB;--malga-checkout-color-warning-light:#FFF8E6;--malga-checkout-color-warning-normal:#F9DF8D;--malga-checkout-color-warning-middle:#FFA400;--malga-checkout-color-warning-dark:#ED3A3D;--malga-checkout-color-modal-success:#00AE42;--malga-checkout-color-modal-error:#ED3A3D;--malga-checkout-color-modal-neutral:#4D4D4D;--malga-checkout-color-disabled:#F9F9F9;--malga-checkout-color-modal-action-button-error:#000000;--malga-checkout-color-modal-action-button-error-hover:#333333;--malga-checkout-color-modal-action-button-success:#000000;--malga-checkout-color-modal-action-button-success-hover:#333333;--malga-checkout-color-modal-action-button-success-font-color:#ffffff;--malga-checkout-color-modal-action-button-error-font-color:#ffffff;--malga-checkout-typography-family:"Inter", sans-serif;--malga-checkout-spacing-xxs:4px;--malga-checkout-spacing-xs:8px;--malga-checkout-spacing-sm:16px;--malga-checkout-spacing-default:24px;--malga-checkout-spacing-md:32px;--malga-checkout-spacing-lg:48px;--malga-checkout-spacing-xlg:64px;--malga-checkout-spacing-xxlg:96px;--malga-checkout-size-min-width:250px;--malga-checkout-border-radius-default:4px;--malga-checkout-border-radius-md:6px;--malga-checkout-border-radius-lg:20px;--malga-checkout-transition-slow:0.3s;--malga-checkout-transition-default:0.5s}.checkout-countdown__container{display:flex;justify-content:center;align-items:center;position:relative}.checkout-countdown__container>checkout-typography{position:absolute;text-align:center}';const S=class{constructor(c){o(this,c),this.successButtonClicked=t(this,"successButtonClicked",7),this.errorButtonClicked=t(this,"errorButtonClicked",7),this.pixCountdownIsFinished=t(this,"pixCountdownIsFinished",7)}render(){return this.open?c(a,{class:{"checkout-modal__container":!0}},c("div",{class:{"checkout-modal__content":!0}},"success"===this.mode&&c("checkout-modal-success",{locale:this.locale,hasSuccessRedirectUrl:this.hasSuccessRedirectUrl,successDescription:this.successDescription,successActionButtonLabel:this.successActionButtonLabel,onSuccessActionButtonClicked:()=>this.successButtonClicked.emit()}),"error"===this.mode&&c("checkout-modal-error",{locale:this.locale,errorTitle:this.errorTitle,errorSubtitle:this.errorSubtitle,errorDescription:this.errorDescription,errorActionButtonLabel:this.errorActionButtonLabel,onErrorActionButtonClicked:()=>this.errorButtonClicked.emit()}),"pix"===this.mode&&c("checkout-modal-pix",{locale:this.locale,hasSuccessRedirectUrl:this.hasSuccessRedirectUrl,isSession:this.isSession,currency:this.currency,qrCodeIdentificator:this.paymentCode,qrCodeImageUrl:this.paymentImageUrl,amount:this.amount,expirationTime:this.expirationTime,actionButtonLabel:this.actionButtonLabel,countdownFilledProgressBarColor:this.pixFilledProgressBarColor,countdownEmptyProgressBarColor:this.pixEmptyProgressBarColor,importantMessages:this.pixImportantMessages,waitingPaymentMessage:this.pixWaitingPaymentMessage,onCountdownIsFinished:()=>this.pixCountdownIsFinished.emit(),onPixActionButtonIsClicked:()=>this.successButtonClicked.emit()}),"boleto"===this.mode&&c("checkout-modal-boleto",{locale:this.locale,hasSuccessRedirectUrl:this.hasSuccessRedirectUrl,isSession:this.isSession,currency:this.currency,boletoCode:this.paymentCode,boletoImageUrl:this.paymentImageUrl,amount:this.amount,expirationDate:this.expirationDate,waitingPaymentMessage:this.boletoWaitingPaymentMessage,actionButtonLabel:this.actionButtonLabel,onBoletoActionButtonIsClicked:()=>this.successButtonClicked.emit()}))):null}};S.style='@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap"); :root{--malga-checkout-color-page-background:#eef2f6;--malga-checkout-color-brand-accent-light:#79DBD4;--malga-checkout-color-brand-accent-normal:#39BFAD;--malga-checkout-color-brand-clean:#C3F4EF;--malga-checkout-color-brand-light:#79DBD4;--malga-checkout-color-brand-normal:#39BFAD;--malga-checkout-color-brand-middle:#2FAC9B;--malga-checkout-color-brand-dark:#147F70;--malga-checkout-color-grey-light:#666666;--malga-checkout-color-grey-normal:#4D4D4D;--malga-checkout-color-grey-middle:#333333;--malga-checkout-color-grey-dark:#1A1A1A;--malga-checkout-color-grey-darkness:#000000;--malga-checkout-color-accent-light:#ffffff;--malga-checkout-color-accent-normal:#F1F1F1;--malga-checkout-color-accent-middle:#CBCBCB;--malga-checkout-color-warning-light:#FFF8E6;--malga-checkout-color-warning-normal:#F9DF8D;--malga-checkout-color-warning-middle:#FFA400;--malga-checkout-color-warning-dark:#ED3A3D;--malga-checkout-color-modal-success:#00AE42;--malga-checkout-color-modal-error:#ED3A3D;--malga-checkout-color-modal-neutral:#4D4D4D;--malga-checkout-color-disabled:#F9F9F9;--malga-checkout-color-modal-action-button-error:#000000;--malga-checkout-color-modal-action-button-error-hover:#333333;--malga-checkout-color-modal-action-button-success:#000000;--malga-checkout-color-modal-action-button-success-hover:#333333;--malga-checkout-color-modal-action-button-success-font-color:#ffffff;--malga-checkout-color-modal-action-button-error-font-color:#ffffff;--malga-checkout-typography-family:"Inter", sans-serif;--malga-checkout-spacing-xxs:4px;--malga-checkout-spacing-xs:8px;--malga-checkout-spacing-sm:16px;--malga-checkout-spacing-default:24px;--malga-checkout-spacing-md:32px;--malga-checkout-spacing-lg:48px;--malga-checkout-spacing-xlg:64px;--malga-checkout-spacing-xxlg:96px;--malga-checkout-size-min-width:250px;--malga-checkout-border-radius-default:4px;--malga-checkout-border-radius-md:6px;--malga-checkout-border-radius-lg:20px;--malga-checkout-transition-slow:0.3s;--malga-checkout-transition-default:0.5s}.checkout-modal__container{display:flex;width:100%;height:100%;position:fixed;top:0;left:0;z-index:30;background:var(--malga-checkout-color-accent-light);overflow:auto}@media (min-width: 768px){.checkout-modal__container{overflow:hidden;justify-content:center;align-items:center;background:rgba(29, 31, 42, 0.8);transition:background 0.5s ease}}.checkout-modal__content{display:flex;align-items:center;justify-content:center;width:100%;height:100%;animation:moveUp 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards}@keyframes moveUp{0%{transform:translateY(100%)}100%{transform:translateY(0px)}}';const I=class{constructor(c){o(this,c),this.boletoActionButtonIsClicked=t(this,"boletoActionButtonIsClicked",7),this.clipboardIsClicked=!1,this.getExpirationDateFormatted=()=>{const[o,t,c]=s(this.expirationDate),a=new Date(o,t,c);return h(a)},this.handleClickClipboard=()=>{this.clipboardIsClicked||(this.clipboardIsClicked=!0)}}render(){return c(a,{class:{"checkout-modal-boleto__container":!0}},c("header",{class:{"checkout-modal-boleto__header":!0}},c("checkout-icon",{icon:"checkLarge"}),c("checkout-typography",{tag:"h3",variation:"header5",color:"white",content:this.waitingPaymentMessage||l("dialogs.boleto.waitingPaymentMessage",this.locale)})),c("section",{class:{"checkout-modal-boleto__content":!0}},c("span",{class:{"checkout-modal-boleto__content--header-detail":!0}}),c("checkout-typography",{tag:"h4",variation:"header6",content:l("dialogs.boleto.title",this.locale)}),c("checkout-typography",{tag:"h5",variation:"field",content:l("dialogs.boleto.subtitle",this.locale)}),c("div",{class:{"checkout-modal-boleto__bar-code-informations":!0}},c("checkout-typography",{tag:"p",variation:"field",content:this.boletoCode}),c("checkout-clipboard-button",{label:m(!1,this.clipboardIsClicked,this.locale),clipboardContent:this.boletoCode,onClick:()=>this.handleClickClipboard()})),c("div",{class:{"checkout-modal-boleto__clipboard-button-mobile":!0}},c("checkout-button",{label:m(!0,this.clipboardIsClicked,this.locale),clipboardContent:this.boletoCode,onClicked:()=>this.handleClickClipboard()})),c("div",{class:{"checkout-modal-boleto__payment-informations":!0}},c("p",null,c("strong",null,l("dialogs.boleto.amount",this.locale)," "),u(this.amount,this.currency)),c("p",null,c("strong",null,l("dialogs.boleto.expirationDate",this.locale)," "),this.getExpirationDateFormatted())),c("div",{class:{"checkout-modal-boleto__informations":!0}},c("checkout-typography",{tag:"h5",color:"darkness",variation:"field",content:l("dialogs.boleto.importantMessage",this.locale)}),c("ul",null,!this.isSession&&c("li",null,l("dialogs.boleto.importantMessageDefault",this.locale)),c("li",null,l("dialogs.boleto.importantMessageFirst",this.locale,{expirationDate:this.getExpirationDateFormatted()})))),c("div",{class:{"checkout-modal-boleto__action-button":!0}},c("a",{href:this.boletoImageUrl,target:"_blank"},c("checkout-typography",{tag:"span",color:"white",variation:"button",content:l("dialogs.boleto.showBoleto",this.locale)}),c("checkout-icon",{icon:"newTab"})),!!this.hasSuccessRedirectUrl&&c("checkout-button",{label:this.actionButtonLabel||l("dialogs.common.actionButtonLabel",this.locale),onClicked:()=>this.boletoActionButtonIsClicked.emit()}))))}};I.style='@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap"); :root{--malga-checkout-color-page-background:#eef2f6;--malga-checkout-color-brand-accent-light:#79DBD4;--malga-checkout-color-brand-accent-normal:#39BFAD;--malga-checkout-color-brand-clean:#C3F4EF;--malga-checkout-color-brand-light:#79DBD4;--malga-checkout-color-brand-normal:#39BFAD;--malga-checkout-color-brand-middle:#2FAC9B;--malga-checkout-color-brand-dark:#147F70;--malga-checkout-color-grey-light:#666666;--malga-checkout-color-grey-normal:#4D4D4D;--malga-checkout-color-grey-middle:#333333;--malga-checkout-color-grey-dark:#1A1A1A;--malga-checkout-color-grey-darkness:#000000;--malga-checkout-color-accent-light:#ffffff;--malga-checkout-color-accent-normal:#F1F1F1;--malga-checkout-color-accent-middle:#CBCBCB;--malga-checkout-color-warning-light:#FFF8E6;--malga-checkout-color-warning-normal:#F9DF8D;--malga-checkout-color-warning-middle:#FFA400;--malga-checkout-color-warning-dark:#ED3A3D;--malga-checkout-color-modal-success:#00AE42;--malga-checkout-color-modal-error:#ED3A3D;--malga-checkout-color-modal-neutral:#4D4D4D;--malga-checkout-color-disabled:#F9F9F9;--malga-checkout-color-modal-action-button-error:#000000;--malga-checkout-color-modal-action-button-error-hover:#333333;--malga-checkout-color-modal-action-button-success:#000000;--malga-checkout-color-modal-action-button-success-hover:#333333;--malga-checkout-color-modal-action-button-success-font-color:#ffffff;--malga-checkout-color-modal-action-button-error-font-color:#ffffff;--malga-checkout-typography-family:"Inter", sans-serif;--malga-checkout-spacing-xxs:4px;--malga-checkout-spacing-xs:8px;--malga-checkout-spacing-sm:16px;--malga-checkout-spacing-default:24px;--malga-checkout-spacing-md:32px;--malga-checkout-spacing-lg:48px;--malga-checkout-spacing-xlg:64px;--malga-checkout-spacing-xxlg:96px;--malga-checkout-size-min-width:250px;--malga-checkout-border-radius-default:4px;--malga-checkout-border-radius-md:6px;--malga-checkout-border-radius-lg:20px;--malga-checkout-transition-slow:0.3s;--malga-checkout-transition-default:0.5s}.checkout-modal-boleto__informations>ul>li,.checkout-modal-boleto__payment-informations>p{font-family:var(--malga-checkout-typography-family);font-size:16px;font-style:normal;font-weight:normal}.checkout-modal-boleto__action-button>a{font-family:var(--malga-checkout-typography-family);padding:0;margin:0;box-sizing:border-box}.checkout-modal-boleto__action-button>a{display:flex;align-items:center;justify-content:center}.checkout-modal-boleto__container{display:flex;flex-direction:column;width:100%;height:100%;overflow:auto}@media (min-width: 768px){.checkout-modal-boleto__container{width:585px;height:auto}}.checkout-modal-boleto__header{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;padding:var(--malga-checkout-spacing-default) 0 var(--malga-checkout-spacing-md) 0;background:var(--malga-checkout-color-modal-neutral)}@media (min-width: 768px){.checkout-modal-boleto__header{flex-direction:row;height:170px;padding:0;border-radius:var(--malga-checkout-border-radius-lg) var(--malga-checkout-border-radius-lg) 0 0}}.checkout-modal-boleto__header>checkout-icon{display:none}@media (min-width: 768px){.checkout-modal-boleto__header>checkout-icon{display:block;margin-right:var(--malga-checkout-spacing-default);margin-bottom:0}}.checkout-modal-boleto__header>checkout-typography>h3{width:300px;text-align:center}@media (min-width: 768px){.checkout-modal-boleto__header>checkout-typography>h3{width:auto;text-align:start}}.checkout-modal-boleto__content{display:flex;flex-direction:column;height:100%;padding:var(--malga-checkout-spacing-md) var(--malga-checkout-spacing-default);background:var(--malga-checkout-color-accent-light);position:relative}@media (min-width: 768px){.checkout-modal-boleto__content{max-height:500px;overflow:auto;border-radius:0 0 var(--malga-checkout-border-radius-lg) var(--malga-checkout-border-radius-lg)}}.checkout-modal-boleto__content>checkout-typography>h4{color:var(--malga-checkout-color-grey-middle);text-align:center}.checkout-modal-boleto__content>checkout-typography>h5{color:var(--malga-checkout-color-grey-darkness);font-weight:400;text-align:center;margin-top:23px;margin-bottom:26px}.checkout-modal-boleto__content--header-detail{position:absolute;display:block;height:10px;width:100%;background:var(--malga-checkout-color-accent-light);border-radius:20px 20px 0 0;top:-10px;left:0px}@media (min-width: 768px){.checkout-modal-boleto__content--header-detail{display:none}}.checkout-modal-boleto__bar-code-informations{display:flex;flex-direction:column;align-items:center;padding:var(--malga-checkout-spacing-sm);border-radius:var(--malga-checkout-border-radius-md);background:var(--malga-checkout-color-accent-normal);margin-bottom:var(--malga-checkout-spacing-md)}.checkout-modal-boleto__bar-code-informations>checkout-typography>p{display:block;white-space:nowrap;overflow:hidden;width:260px;display:block;text-overflow:ellipsis;font-weight:bold;text-align:center;margin-bottom:var(--malga-checkout-spacing-xs);font-family:"Roboto Mono", monospace;font-size:13px;letter-spacing:0.5px}@media (min-width: 768px){.checkout-modal-boleto__bar-code-informations>checkout-typography>p{font-size:16px;width:500px}}.checkout-modal-boleto__bar-code-informations>checkout-clipboard-button{display:none}@media (min-width: 768px){.checkout-modal-boleto__bar-code-informations>checkout-clipboard-button{display:flex;justify-content:center;align-items:center}}.checkout-modal-boleto__clipboard-button-mobile{display:flex;justify-content:center;margin-bottom:var(--malga-checkout-spacing-md)}@media (min-width: 768px){.checkout-modal-boleto__clipboard-button-mobile{display:none}}.checkout-modal-boleto__payment-informations{margin-bottom:var(--malga-checkout-spacing-default)}.checkout-modal-boleto__payment-informations>p{padding:0;margin:0;line-height:24px;color:var(--malga-checkout-color-grey-darkness)}.checkout-modal-boleto__payment-informations>p>strong{font-weight:bold}.checkout-modal-boleto__informations>checkout-typography>h5{font-weight:bold;text-align:center;margin-bottom:var(--malga-checkout-spacing-default)}.checkout-modal-boleto__informations>ul>li{color:var(--malga-checkout-color-grey-darkness);padding:0;margin:0;margin-bottom:var(--malga-checkout-spacing-default)}.checkout-modal-boleto__informations>ul{padding:0 var(--malga-checkout-spacing-default)}.checkout-modal-boleto__action-button{display:flex;justify-content:center;align-items:center;margin-top:var(--malga-checkout-spacing-sm);padding-bottom:var(--malga-checkout-spacing-sm)}.checkout-modal-boleto__action-button>a{transition:background var(--malga-checkout-transition-default) ease;flex-direction:row;cursor:pointer;outline:none;height:45px;padding:0 var(--malga-checkout-spacing-sm);border:0;border-radius:var(--malga-checkout-border-radius-default);background:var(--malga-checkout-color-brand-middle);letter-spacing:1.25px;text-align:center;text-decoration:none;color:var(--malga-checkout-color-accent-light);margin-right:var(--malga-checkout-spacing-sm)}.checkout-modal-boleto__action-button>a>checkout-typography{margin-right:var(--malga-checkout-spacing-xs)}.checkout-modal-boleto__action-button>a:hover{background:var(--malga-checkout-color-brand