HEX
Server: LiteSpeed
System: Linux us-phx-web1284.main-hosting.eu 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: u300739242 (300739242)
PHP: 8.2.30
Disabled: system, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
Upload Files
File: //proc/thread-self/cwd/wp-content/plugins/woocommerce-mercadopago/build/custom.block.js
(()=>{"use strict";var e={20:(e,t,s)=>{var a=s(609),c=Symbol.for("react.element"),n=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,o=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,r={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,s){var a,n={},l=null,m=null;for(a in void 0!==s&&(l=""+s),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(m=t.ref),t)i.call(t,a)&&!r.hasOwnProperty(a)&&(n[a]=t[a]);if(e&&e.defaultProps)for(a in t=e.defaultProps)void 0===n[a]&&(n[a]=t[a]);return{$$typeof:c,type:e,key:l,ref:m,props:n,_owner:o.current}}t.Fragment=n,t.jsx=l,t.jsxs=l},609:e=>{e.exports=window.React},848:(e,t,s)=>{e.exports=s(20)}},t={};const s=window.wc.wcBlocksRegistry,a=window.wc.wcSettings,c=window.wp.element,n=window.wp.htmlEntities,i="mercadopago_blocks_update_cart";var o=function s(a){var c=t[a];if(void 0!==c)return c.exports;var n=t[a]={exports:{}};return e[a](n,n.exports,s),n.exports}(848);const r=({labelMessage:e,helperInvalid:t,helperEmpty:s,helperWrong:a,inputName:c,hiddenId:n,inputDataCheckout:i,selectId:r,selectName:l,selectDataCheckout:m,flagError:d,documents:p,validate:u})=>(0,o.jsx)("div",{className:"mp-checkout-ticket-input-document",children:(0,o.jsx)("input-document",{"label-message":e,"helper-invalid":t,"helper-empty":s,"helper-wrong":a,"input-name":c,"hidden-id":n,"input-data-checkout":i,"select-id":r,"select-name":l,"select-data-checkout":m,"flag-error":d,documents:p,validate:u})}),l=({isVisible:e,message:t,inputId:s,id:a,dataMain:c})=>(0,o.jsx)("input-helper",{isVisible:e,message:t,"input-id":s,id:a,"data-main":c}),m=({isOptinal:e,message:t,forId:s})=>(0,o.jsx)("input-label",{isOptinal:e,message:t,for:s}),d=({methods:e})=>(0,o.jsx)("payment-methods",{methods:e}),p=({description:e,linkText:t,linkSrc:s,checkoutClass:a="pro"})=>(0,o.jsx)("div",{className:`mp-checkout-${a}-terms-and-conditions`,children:(0,o.jsx)("terms-and-conditions",{description:e,"link-text":t,"link-src":s})}),u=({title:e,description:t,linkText:s,linkSrc:a})=>(0,o.jsx)("div",{className:"mp-test-mode-container",children:(0,o.jsx)("test-mode",{title:e,description:t,"link-text":s,"link-src":a})}),h=({text:e,imgSrc:t,id:s})=>(0,o.jsxs)("div",{id:s,className:"row-image-select",children:[(0,o.jsx)("img",{src:t}),(0,o.jsx)("p",{children:e})]});var _;const x="mp_checkout_blocks",k="woo-mercado-pago-custom",y=(0,a.getSetting)("woo-mercado-pago-custom_data",{}),j=(0,n.decodeEntities)(y.title)||"Checkout Custom",v=()=>{const e=(0,n.decodeEntities)(y?.params?.fee_title||""),t=`${j} ${e}`;return(0,o.jsx)(h,{text:t,imgSrc:y.params.checkout_blocks_row_image_src})},g=e=>{(e=>{const{extensionCartUpdate:t}=wc.blocksCheckout,{eventRegistration:s,emitResponse:a}=e,{onPaymentSetup:n}=s;(0,c.useEffect)((()=>{((e,t)=>{e({namespace:i,data:{action:"add",gateway:t}})})(t,k);const e=n((()=>({type:a.responseTypes.SUCCESS})));return()=>(((e,t)=>{e({namespace:i,data:{action:"remove",gateway:t}})})(t,k),e())}),[n])})(e);const{test_mode:t,test_mode_title:s,test_mode_description:a,test_mode_link_text:n,test_mode_link_src:h,wallet_button:_,wallet_button_image:j,wallet_button_title:v,wallet_button_description:g,available_payments_title_icon:f,available_payments_title:b,available_payments_image:N,payment_methods_items:w,payment_methods_promotion_link:S,payment_methods_promotion_text:C,site_id:E,card_form_title:I,card_number_input_label:T,card_number_input_helper:R,card_holder_name_input_label:M,card_holder_name_input_helper:O,card_expiration_input_label:F,card_expiration_input_helper:P,card_security_code_input_label:U,card_security_code_input_helper:D,card_document_input_label:L,card_input_document_helper_invalid:V,card_input_document_helper_empty:B,card_input_document_helper_wrong:$,card_installments_title:A,card_issuer_input_label:q,card_installments_input_helper:Y,terms_and_conditions_description:H,terms_and_conditions_link_text:W,terms_and_conditions_link_src:K,amount:z,currency_ratio:Q,message_error_amount:G}=y.params;if(null==z)return(0,o.jsx)(o.Fragment,{children:(0,o.jsx)("p",{className:"alert-message",children:G})});const J=(0,c.useRef)(null),[X,Z]=(0,c.useState)("custom"),{eventRegistration:ee,emitResponse:te,onSubmit:se}=e,{onPaymentSetup:ae,onCheckoutSuccess:ce,onCheckoutFail:ne}=ee;return window.mpFormId="blocks_checkout_form",window.mpCheckoutForm=document.querySelector(".wc-block-components-form.wc-block-checkout__form"),jQuery(window.mpCheckoutForm).prop("id",mpFormId),(0,c.useEffect)((()=>{var t,s;t=e.billing.cartTotal.value,s=e.billing.currency,cardFormMounted&&cardForm.unmount(),initCardForm(function(e,t){if(!Number.isInteger(e)||"object"!=typeof t)throw new Error("Invalid input");const s=(e/Math.pow(10,t.minorUnit)).toFixed(t.minorUnit).split(".");return`${s[0]}.${s[1]}`}(t,s))}),[e.billing.cartTotal.value]),(0,c.useEffect)((()=>{const e=ae((async()=>{const e=document.querySelector("#form-checkout__cardholderName"),t=document.querySelector("#mp-card-holder-name-helper");var s;if(""==e.value&&((s=t)&&s.style&&(s.style.display="flex")),"wallet_button"!==document.querySelector("#mp_checkout_type").value)try{if(!CheckoutPage.validateInputsCreateToken())return{type:te.responseTypes.ERROR};{const e=await cardForm.createCardToken();document.querySelector("#cardTokenId").value=e.token}}catch(e){console.warn("Token creation error: ",e)}const a=J.current,c={};return a.childNodes.forEach((e=>{"INPUT"===e.tagName&&e.name&&(c[e.name]=e.value)})),Z("custom"),{type:te.responseTypes.SUCCESS,meta:{paymentMethodData:c}}}));return()=>e()}),[ae,te.responseTypes.ERROR,te.responseTypes.SUCCESS]),(0,c.useEffect)((()=>{const e=ce((async e=>{const t=e.processingResponse,s=e.processingResponse.paymentDetails;if(s.three_ds_flow){const e=new Promise(((e,t)=>{window.addEventListener("completed_3ds",(s=>{s.detail.error&&(console.log("rejecting with "+s.detail.error),t(s.detail.error)),e()}))}));return load3DSFlow(s.last_four_digits),await e.then((()=>({type:te.responseTypes.SUCCESS}))).catch((e=>({type:te.responseTypes.FAIL,message:e,messageContext:te.noticeContexts.PAYMENTS})))}return sendMetric("MP_CUSTOM_BLOCKS_SUCCESS",t.paymentStatus,x),{type:te.responseTypes.SUCCESS}}));return()=>e()}),[ce]),(0,c.useEffect)((()=>{const e=ne((e=>{const t=e.processingResponse;return sendMetric("MP_CUSTOM_BLOCKS_ERROR",t.paymentStatus,x),{type:te.responseTypes.FAIL,messageContext:te.noticeContexts.PAYMENTS,message:t.paymentDetails.message}}));return()=>e()}),[ne]),(0,o.jsxs)("div",{children:[(0,o.jsx)("div",{className:"mp-checkout-custom-load",children:(0,o.jsx)("div",{className:"spinner-card-form"})}),(0,o.jsx)("div",{className:"mp-checkout-container",children:(0,o.jsxs)("div",{className:"mp-checkout-custom-container",children:[t?(0,o.jsx)(u,{title:s,description:a,linkText:n,linkSrc:h}):null,"yes"===_?(0,o.jsxs)("div",{className:"mp-wallet-button-container",children:[(0,o.jsx)("div",{className:"mp-wallet-button-title",children:(0,o.jsx)("span",{children:v})}),(0,o.jsx)("div",{className:"mp-wallet-button-description",children:g}),(0,o.jsx)("div",{className:"mp-wallet-button-button",children:(0,o.jsx)("button",{id:"mp-wallet-button",type:"button",onClick:e=>{e.preventDefault(),Z("wallet_button"),se()},children:(0,o.jsx)("img",{src:j})})})]}):null,(0,o.jsxs)("div",{id:"mp-custom-checkout-form-container",children:[(0,o.jsxs)("div",{className:"mp-checkout-custom-available-payments",children:[(0,o.jsxs)("div",{className:"mp-checkout-custom-available-payments-header",onClick:()=>{const e=document.getElementsByClassName("mp-checkout-custom-available-payments")[0],t=e.getElementsByClassName("mp-checkout-custom-available-payments-header")[0].getElementsByClassName("mp-checkout-custom-available-payments-collapsible")[0],s=e.getElementsByClassName("mp-checkout-custom-available-payments-content")[0];if(s.style.maxHeight)t.src=y.params.available_payments_chevron_down,s.style.maxHeight=null,s.style.padding="0px";else{let e=s.scrollHeight+15+"px";t.src=y.params.available_payments_chevron_up,s.style.setProperty("max-height",e,"important"),s.style.setProperty("padding","24px 0px 0px","important")}},children:[(0,o.jsxs)("div",{className:"mp-checkout-custom-available-payments-title",children:[(0,o.jsx)("img",{src:f,className:"mp-icon"}),(0,o.jsx)("p",{className:"mp-checkout-custom-available-payments-text",children:b})]}),(0,o.jsx)("img",{src:N,className:"mp-checkout-custom-available-payments-collapsible"})]}),(0,o.jsxs)("div",{className:"mp-checkout-custom-available-payments-content",children:[(0,o.jsx)(d,{methods:w}),"MLA"===E?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{id:"mp_promotion_link",children:" | "}),(0,o.jsx)("a",{href:S,id:"mp_checkout_link",className:"mp-checkout-link mp-pl-10",target:"_blank",children:C})]}):null,(0,o.jsx)("hr",{})]})]}),(0,o.jsxs)("div",{className:"mp-checkout-custom-card-form",children:[(0,o.jsx)("p",{className:"mp-checkout-custom-card-form-title",children:I}),(0,o.jsxs)("div",{className:"mp-checkout-custom-card-row",children:[(0,o.jsx)(m,{isOptinal:!1,message:T,forId:"mp-card-number"}),(0,o.jsx)("div",{className:"mp-checkout-custom-card-input",id:"form-checkout__cardNumber-container"}),(0,o.jsx)(l,{isVisible:!1,message:R,inputId:"mp-card-number-helper"})]}),(0,o.jsxs)("div",{className:"mp-checkout-custom-card-row",id:"mp-card-holder-div",children:[(0,o.jsx)(m,{message:M,isOptinal:!1}),(0,o.jsx)("input",{className:"mp-checkout-custom-card-input mp-card-holder-name",placeholder:"Ex.: María López",id:"form-checkout__cardholderName",name:"mp-card-holder-name","data-checkout":"cardholderName"}),(0,o.jsx)(l,{isVisible:!1,message:O,inputId:"mp-card-holder-name-helper",dataMain:"mp-card-holder-name"})]}),(0,o.jsxs)("div",{className:"mp-checkout-custom-card-row mp-checkout-custom-dual-column-row",children:[(0,o.jsxs)("div",{className:"mp-checkout-custom-card-column",children:[(0,o.jsx)(m,{message:F,isOptinal:!1}),(0,o.jsx)("div",{id:"form-checkout__expirationDate-container",className:"mp-checkout-custom-card-input mp-checkout-custom-left-card-input"}),(0,o.jsx)(l,{isVisible:!1,message:P,inputId:"mp-expiration-date-helper"})]}),(0,o.jsxs)("div",{className:"mp-checkout-custom-card-column",children:[(0,o.jsx)(m,{message:U,isOptinal:!1}),(0,o.jsx)("div",{id:"form-checkout__securityCode-container",className:"mp-checkout-custom-card-input"}),(0,o.jsx)("p",{id:"mp-security-code-info",className:"mp-checkout-custom-info-text"}),(0,o.jsx)(l,{isVisible:!1,message:D,inputId:"mp-security-code-helper"})]})]}),(0,o.jsx)("div",{id:"mp-doc-div",className:"mp-checkout-custom-input-document",style:{display:"none"},children:(0,o.jsx)(r,{labelMessage:L,helperInvalid:V,helperEmpty:B,helperWrong:$,inputName:"identificationNumber",hiddenId:"form-checkout__identificationNumber",inputDataCheckout:"docNumber",selectId:"form-checkout__identificationType",selectName:"identificationType",selectDataCheckout:"docType",flagError:"docNumberError"})})]}),(0,o.jsxs)("div",{id:"mp-checkout-custom-installments",className:"mp-checkout-custom-installments-display-none",children:[(0,o.jsx)("p",{className:"mp-checkout-custom-card-form-title",children:A}),(0,o.jsxs)("div",{id:"mp-checkout-custom-issuers-container",className:"mp-checkout-custom-issuers-container",children:[(0,o.jsx)("div",{className:"mp-checkout-custom-card-row",children:(0,o.jsx)(m,{isOptinal:!1,message:q,forId:"mp-issuer"})}),(0,o.jsx)("div",{className:"mp-input-select-input",children:(0,o.jsx)("select",{name:"issuer",id:"form-checkout__issuer",className:"mp-input-select-select"})})]}),(0,o.jsx)("div",{id:"mp-checkout-custom-installments-container",className:"mp-checkout-custom-installments-container"}),(0,o.jsx)(l,{isVisible:!1,message:Y,inputId:"mp-installments-helper"}),(0,o.jsx)("select",{style:{display:"none"},"data-checkout":"installments",name:"installments",id:"form-checkout__installments",className:"mp-input-select-select"}),(0,o.jsxs)("div",{id:"mp-checkout-custom-box-input-tax-cft",children:[(0,o.jsx)("div",{id:"mp-checkout-custom-box-input-tax-tea",children:(0,o.jsx)("div",{id:"mp-checkout-custom-tax-tea-text"})}),(0,o.jsx)("div",{id:"mp-checkout-custom-tax-cft-text"})]})]}),(0,o.jsx)("div",{className:"mp-checkout-custom-terms-and-conditions",children:(0,o.jsx)(p,{description:H,linkText:W,linkSrc:K,checkoutClass:"custom"})})]})]})}),(0,o.jsxs)("div",{ref:J,id:"mercadopago-utilities",style:{display:"none"},children:[(0,o.jsx)("input",{type:"hidden",id:"cardTokenId",name:"mercadopago_custom[token]"}),(0,o.jsx)("input",{type:"hidden",id:"mpCardSessionId",name:"mercadopago_custom[session_id]"}),(0,o.jsx)("input",{type:"hidden",id:"cardExpirationYear","data-checkout":"cardExpirationYear"}),(0,o.jsx)("input",{type:"hidden",id:"cardExpirationMonth","data-checkout":"cardExpirationMonth"}),(0,o.jsx)("input",{type:"hidden",id:"cardInstallments",name:"mercadopago_custom[installments]"}),(0,o.jsx)("input",{type:"hidden",id:"paymentMethodId",name:"mercadopago_custom[payment_method_id]"}),(0,o.jsx)("input",{type:"hidden",id:"mp-amount",defaultValue:z,name:"mercadopago_custom[amount]"}),(0,o.jsx)("input",{type:"hidden",id:"currency_ratio",defaultValue:Q,name:"mercadopago_custom[currency_ratio]"}),(0,o.jsx)("input",{type:"hidden",id:"mp_checkout_type",name:"mercadopago_custom[checkout_type]",value:X})]})]})},f={name:k,label:(0,o.jsx)(v,{}),content:(0,o.jsx)(g,{}),edit:(0,o.jsx)(g,{}),canMakePayment:()=>!0,ariaLabel:j,supports:{features:null!==(_=y?.supports)&&void 0!==_?_:[]}};(0,s.registerPaymentMethod)(f)})();