(()=>{var t={20:t=>{t.exports=class{constructor(t={}){this.options=t,this.el=this.create(),this.styles=this.createStyles()}create(){const t=document.createElement("button");return t.setAttribute("type","submit"),t.className="mercadopago-button",t.textContent=this.options.label||"Pagar",t.setAttribute("formmethod","post"),t}createStyles(){let t=`\n      .mercadopago-button {\n        padding: 0 ${24/14}em;\n        font-family: "Helvetica Neue", Arial, sans-serif;\n        font-size: 0.875em;\n        line-height: ${38/14};\n        background: #009ee3;\n        border-radius: ${4/14}em;\n        color: #fff;\n        cursor: pointer;\n        border: 0;\n      }\n    `;"wallet"===this.options.type&&(t+=`\n        .mercadopago-button {\n          position: relative;\n          padding-left: ${68/14}em;          \n          padding-right: ${32/14}em;          \n          white-space: nowrap;\n          height: ${38/14}em;\n        }\n\n        .mercadopago-button::before {\n          background-image: url("http://static.mlstatic.com/org-img/mercadopago/wallet_mp_icon.svg");\n          background-size: ${34/14}em ${34/14}em;\n          width: ${34/14}em;\n          height: ${34/14}em;\n          position: absolute;\n          top: ${2/14}em;\n          left: ${2/14}em;\n          content: "";\n        }\n      `);const e=document.createElement("style");return e.setAttribute("type","text/css"),e.innerHTML=t,e}render(t){const e=t.childNodes;0===t.childNodes.length?t.appendChild(this.el):t.insertBefore(this.el,e[e.length-1].nextSibling),document.head.appendChild(this.styles)}}},498:t=>{t.exports={toUrl:t=>Object.keys(t).map((e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`)).join("&"),toCSS:t=>{let e="";return void 0!==t&&"object"==typeof t&&Object.keys(t).forEach((n=>{Object.prototype.hasOwnProperty.call(t,n)&&(e+=`${n}:${t[n]};`)})),e}}},336:t=>{t.exports={bind:(t,e,n)=>{if(t)return t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent(`on${e}`,n)}}},65:t=>{t.exports=document.currentScript||document.scripts[document.scripts.length-1]},153:t=>{const e=["button-label","open","deeplink-prefix"];t.exports=t=>{const n={};return[].forEach.call(t.attributes,(t=>{const o=t.name.match(/^data-(.+)$/);o&&-1===e.indexOf(o[1])&&(n[o[1]]=t.value)})),n},t.exports.BLACKLIST_DATA=e}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var i=e[o]={exports:{}};return t[o](i,i.exports,n),i.exports}(()=>{const t=n(498),e=n(65),o=n(153),r=n(336),i=n(20),a=e.parentNode,s=new i({label:e.getAttribute("data-button-label"),type:e.getAttribute("data-button-type")}),c=o(e);let l="";a&&a.action&&a.action.match(window.location.origin)&&(l=a.action),c.action=l;const d=a.getElementsByTagName("input");for(let t=0;t<d.length;t++){const e=d[t];e.getAttribute("type")&&e.getAttribute("name")&&"hidden"===e.getAttribute("type").toLowerCase()&&(c[e.getAttribute("name")]=e.value)}const p=`https://5ngBhbnb7vTw.br/checkout/v1/redirect/?${t.toUrl(c)}&from-widget=true`;r.bind(s.el,"click",(t=>{t.preventDefault();const n=window.MobileWebKit&&window.MobileWebKit.navigation,o=e.getAttribute("data-deeplink-prefix");if(n&&o&&(t=>!!String(t).match(/^(mercadopago|meli):\/\/(.*)/g))(o)){const t=`${o}?url=${encodeURIComponent(`${p}`)}`;window.MobileWebKit.navigation.push(t,{replace:!0})}else window.location.href=p})),s.render(a)})()})();