window.wallet={payOutRates:null,payInRates:null,address:null,transferProgress:0,availableBalance:0,locale:(window.currentLocale??navigator.language??navigator.userLanguage).split("-")[0].toLowerCase(),loadingHtml:e=>{const a=[];for(var t=0;t\n
\n
');return`
${a.join("")}
`},coinSimbol:"SRM",address:null,translate:{es:{"No main prepaid card active":"No hay tarjeta principal activa","Insufficient balance":"Saldo insuficiente","Invalid recipient account":"Cuenta de destinatario inválida","Invalid prepaid card":"Tarjeta prepago inválida", "The card is inactive. To reactivate it the minimum recharge is 50 SRM":"La tarjeta está inactiva. Para reactivarla la recarga mínima es de 50 SRM","Exchange Rate _RATE_":"Tipo de cambio _RATE_",withheld:"pago en revisión",cancelled:"cancelado",paid:"pagado",unpaid:"esperando pago",completed:"completado",refunded:"pago devuelto","The card is inactive. Please select the PowerUp Topup Option":"La tarjeta está inactiva. Por favor selecciona la opción de recarga extensora","Invalid prepaid card":"Tarjeta prepago inválida","Prepaid card inactived":"Tarjeta prepago inactiva","The minimum PowerUp Topup value is 5.00 SRM":"El valor mínimo de recarga extensora es de 5.00 SRM","Prepaid card was disabled":"Tarjeta desactivada","The amount must be greater than 0":"El monto debe ser mayor a 0","Prepaid card was disabled":"Tarjeta desactivada permanentemente","Invalid authorization code":"Código de autorización inválido", "Balance is not enough for this operation":"Balance is not enough for this operation","The card has fallen into scheduled activity, to reactivate it you must send a PowerUp Topup with 50 SRM minimum":"La tarjeta ha caído en actividad programada, para reactivarla debes enviar una recarga extensora de 50.00 SRM"},en:{"Es obligatorio tener configurado la capa de seguridad con doble factor para poder operar con tu wallet Remesita":"It is mandatory to have the security layer configured with double factor to be able to operate with your Remesita wallet","Ha ocurrido un error inesperado, inteéntelo luego.":"An unexpected error has occurred, try again later.","Escribe un código de cliente o un celular":"Enter a customer code or a phone number",Congelado:"Frozen","No tienes enlaces de pago generados":"You don't have any payment links generated","AGREGAR FONDOS":"ADD FUNDS","ENVIAR / EXTRAER":"SEND / WITHDRAW","ESCANEAR Y PAGAR":"SCAN AND PAY","Monto en _CURRENCY_":"Amount in _CURRENCY_", "visitado _N_ veces":"visited _N_ times","VALIDAR Y AUTORIZAR":"VALIDATE AND AUTHORIZE","El proveedor de servicio de tarjetas prepago se encuentra en mantenimiento, inténtalo luego.":"The prepaid card service provider is under maintenance, try again later.","Información para usuarios avanzados.":"Information for advanced users.","LINK DE PAGO":"PAYMENT LINK","AUTORIZAR Y PAGAR":"AUTHORIZE AND PAY","¿A dónde irá tu dinero?":"Where will your money go?","Seleccione el tipo de operación que vas a realizar":"Select the type of operation you are going to perform","A otra billetera Remesita":"To another Remesita wallet","La apertura del negocio ha sido denegado. Contacte con nuestro equipo de asistecia para más detalles.":"The opening of the business has been denied. Contact our support team for more details.","Envia dinero al instante":"Send money instantly",GRATIS:"FREE","El código de seguridad debe tener 6 dígitos":"The security code must have 6 digits", "Recargar tarjeta Prepago":"Top up Prepaid Card","Agrega fondos a tus tarjetas Prepago":"Add funds to your Prepaid cards","APLICAN CARGOS":"CHARGES APPLY","Cuenta bancaria":"Bank account","Envío internacional":"International shipping",CANCELAR:"CANCEL","Orden de pago _REFERENCE_":"Payment order _REFERENCE_","Tarjetas de regalo digital":"Digital gift cards","Shein, Neflix, Amazon, Google Play y mucho más":"Shein, Neflix, Amazon, Google Play and much more","Recarga tu Tarjeta Remesita":"Top up your Remesita Card","Tarjeta Física":"Physical Card","Tarjeta Digital":"Digital Card","Solicta una nueva tarjeta":"Request a new card","No tenemos disponibilidad de tarjetas digitales en este momento.":"We do not have availability of digital cards at this time.","¿Aún no tienes una tarjeta Remesita?":"Don't have a Remesita card yet?","¿Cuántos SRM quieres enviar a tu tarjeta?":"How many SRM do you want to send to your card?","Tu tarjeta recibirá":"Your card will receive", "¿Estás seguro que deseas enviar esta recarga a tu tarjeta?":"Are you sure you want to send this top-up to your card?","Tipo de cambio":"Exchange rate","La recarga fue instruida correctamente, en breve se reflejará en tu tarjeta":"The top-up was instructed correctly, it will soon be reflected on your card","EL saldo de Remesita es equivalente al Dolar. 1SRM = 1USD":"The balance of Remesita is equivalent to the Dollar. 1SRM = 1USD","MI BILLETERA REMESITA":"MY REMESITA WALLET","Nuestro equipo esta revisando la documentación del negocio, en breve recibirás una notificación":"Our team is reviewing the business documentation, you will soon receive a notification","Balance disponible":"Available balance","Enviando recarga a tarjeta":"Sending top-up to card","Comisión de Remesita":"Remesita commission","También conocida como ASP INTEGRA OPC.":"Also known as ASP INTEGRA OPC.","Recarga referenciada":"Referenced top-up","Deposita Efectivo":"Deposit Cash", "Recarga con Cripto":"Top up with Crypto","Cantidad que convertiremos":"Amount we will convert","Lo que recibirá tu tarjeta":"What your card will receive",Seleccionar:"Choice","Transfiere a otro Usuario":"Transfer to another User","Transferencia instantánea y gratuita":"Instant and free transfer","Concepto o Comentario":"Concept or Comment","Pago completado con éxito":"Payment completed successfully","¿Puedo pagar con mi Saldo Wallet?":"Can I pay with my Wallet Balance?","Por supuesto, ese es el valor de este servicio, podrás pagar con tu saldo Wallet.":"Of course, that is the value of this service, you can pay with your Wallet balance.","¿En qué tiendas puedo comprar?":"In what stores can I buy?","Estamos trabajando con Amazon, Shein, Temu y AliExpress y en el futuro iremos incorporando otras plataformas.":"We are working with Amazon, Shein, Temu and AliExpress and in the future we will be incorporating other platforms.", "¿Nececito tener una tarjeta Remesita?":"Do I need to have a Remesita card?","Si esto ocurre, recibirás el reembolso directamente en tu Wallet, incluso antes de que los fondos regresen a la cuenta de la empresa. Así tendrás dinero disponible de inmediato, sin tener que esperar ni lidiar con procesos de aclaración con la tienda o vendedor.":"If this happens, you will receive the refund directly in your Wallet, even before the funds return to the company's account. So you will have money available immediately, without having to wait or deal with clarification processes with the store or seller.","¿Que pasa si el vendedor rechaza la compra y devuelve los fondos?":"What if the seller rejects the purchase and returns the funds?","No es necesario tener una tarjeta remesita prepagada para comprar por medio del asistente digital.":"It is not necessary to have a prepaid remesita card to buy through the digital assistant.",Comentario:"Comment", "Comentario honesto entre 50 y 100 letras":"Honest comment between 50 and 100 letters","Desconecta las cuentas CLABEs de tus tarjetas enlazandola a tu Wallet.":"Disconnect the CLABE accounts of your cards by linking them to your Wallet.","Desconecta la cuenta CLABE de tu tarjeta enlazandola a tu Wallet.":"Disconnect the CLABE account of your card by linking it to your Wallet.",Opcional:"Optional","Pago cancelado":"Payment canceled","Transacción exitosa":"Successful transaction","Ha ocurrido un error inesperado, intentelo luego":"An unexpected error has occurred, try again later","Transferencia cancelada":"Transfer canceled","Si tu navegador no permitió abrir la ventana con la orden de pago puedes usar este botón.":"If your browser did not allow you to open the window with the payment order you can use this button.","Transferencia completada":"Transfer completed","Contactos frecuentes":"Frequent contacts","Total disponible en la Wallet":"Total available in the Wallet", "Bancos de México":"Mexican banks","Deja que realicemos la compra por ti en: _SHOPS_":"Let us make the purchase for you in: _SHOPS_","Si no eres un comprador experimentado o estás cansado de enfrentar problemas al comprar debido a tu ubicación, conectividad, uso de VPN o la aceptación de tu método de pago, este servicio es para ti.":"If you are not an experienced buyer or are tired of facing problems when buying due to your location, connectivity, use of VPN or the acceptance of your payment method, this service is for you.","También conocida como TRANSFER ú OPM.":"Also known as TRANSFER or OPM.","Aprende sobre la inactividad programada":"Learn about scheduled inactivity","Este tipo de recarga extiende la fecha en la que tu tarjeta cae en inactividad programada.":"This type of top-up extends the date on which your card falls into scheduled inactivity.","¿Qué beneficios tiene este servicio?":"What benefits does this service have?", "Puedes pagar con el saldo de tu Wallet":"You can pay with your Wallet balance","¿Para qué es la recarga Extensora?":"What is the PowerUp Topup for?","Solicitud de cuenta CLABE Mexicana":"Request for Mexican CLABE account","¿Qué institución prefieres?":"Which institution do you prefer?","Liquidez entre 30 min y 1 hora":"Liquidity between 30 min and 1 hour","Operativa Express":"Express operation","Tasa de rebote de pagos según Banxico":"Payment bounce rate according to Banxico","Operativa Tardada":"Delayed operation","Liquidez entre 4 y 24 horas":"Liquidity between 4 and 24 hours","Únete Hoy":"Join Today","Fondea con crypto":"Fund with crypto","Seleccione la moneda que deseas usar":"Select the currency you want to use","SUSCRIPCIÓN":"SUBSCRIPTION","3.00 SRM / MES":"3.00 SRM / MONTH","No eres tu, somos nosotros que tubimos un error de conexión con el servidor. Inténtalo luego!":"It's not you, it's us that we had a connection error with the server. Try again later!", "COMIENZA A COBRAR":"START CHARGING","Cobra como":"Charge as","El monto mínimo a recargar es de _MINIMUM_ MXN y máximo _MAXIMUM_ MXN.":"The minimum amount to top up is _MINIMUM_ MXN and maximum _MAXIMUM_ MXN.","Estás a punto de enviar una recarga de _TOPUP_AMOUNT_ MXN a tu tarjeta ${number} usando _TOPUP_QUOTATION_ _SRM_ del balance de tu Wallet.":"You are about to send a top-up of _TOPUP_AMOUNT_ MXN to your card ${number} using _TOPUP_QUOTATION_ _SRM_ from your Wallet balance.","Al proceder estarás aceptando los términos y condiciones.":"By proceeding you will be accepting the terms and conditions.","Términos y condiciones":"Terms and conditions","Nueva tarifa: _FIX_ _COIN_ fijo + _PERCENT_%":"New rate: _FIX_ _COIN_ fixed + _PERCENT_%","Estás a punto de desconectar de tus tarjetas las cuentas CLABE para enlazarlas a tu Wallet.":"You are about to disconnect the CLABE accounts from your cards to link them to your Wallet.","Generando CLABE":"Generating CLABE", aproximadamente:"approximately","Nueva tarifa: _FIX_ SRM fijo + _PERCENT_%":"New rate: _FIX_ SRM fixed + _PERCENT_%","Fees y límites según forma de pago":"Fees and limits according to payment method","Genera un link de pago, compártelo, y cuando sea pagado será recargada tu Wallet.":"Generate a payment link, share it, and when it is paid your Wallet will be recharged.","Transferencia SPEI":"SPEI Transfer","Recibe transferencias directas en MXN a tu cuenta CLABE dedicada":"Receive direct transfers in MXN to your dedicated CLABE account","Usar saldo de Tarjeta":"Use Card Balance","Recarga tu Wallet con balance de una tarjeta Remesita":"Top up your Wallet with a Remesita card balance","Este negocio está en revisión, aun no es posible generar enlaces de pago con esta identidad comercial":"This business is under review, it is not yet possible to generate payment links with this business identity","Registrar nuevo negocio":"Register new business", "Genera Links de Pago para _BUSINESS_
Usando nuestra API.":"Generate Payment Links for _BUSINESS_
Using our API.","Información para usuarios avanzados.":"Information for advanced users.","Monto a retirar de mi Wallet":"Amount to withdraw from my Wallet","Seleccione la el médio de pago referenciado":"Select the referenced payment method","Pago referenciado":"Referenced payment","Transfrencia referenciada":"Referenced transfer","Pasarelas de pago":"Payment gateways","El servicio para cobrar con Link de Pago se encuentra en mantenimiento, inténtalo luego.":"The service to charge with Payment Link is under maintenance, try again later.","Algo anda mal, no se pudo generar el enlace de pago, inténtelo luego.":"Something is wrong, the payment link could not be generated, try again later.","ABRIR ORDEN DE PAGO":"OPEN PAYMENT ORDER","Compartir vía Telegram":"Share via Telegram", "Los beneficios y programas de lealtad de las tiendas no se aplican cuando compras a través del asistente digital. Si una tienda ofrece algún beneficio, este se aplicará a nuestra cuenta empresarial y no a tu cuenta personal. Por ejemplo, en Temu, si el precio de un producto baja dentro de los 7 días posteriores a tu compra, el reembolso no estará disponible para ti.":"The benefits and loyalty programs of the stores do not apply when you buy through the digital assistant. If a store offers any benefit, it will be applied to our business account and not to your personal account. For example, in Temu, if the price of a product drops within 7 days of your purchase, the refund will not be available to you.","Compartir vía Email":"Share via Email","¿Podré beneficiarme de programas de lealtad?":"Can I benefit from loyalty programs?", "No se pueden usar cupones de descuento al hacer la compra porque no hay una forma de controlar o aplicar los cupones de manera automática.":"Discount coupons cannot be used when making the purchase because there is no way to control or apply the coupons automatically.","¿Podré aplicar cupones de descuento?":"Can I apply discount coupons?","Recarga tu wallet pagando con USDT o BITCOIN.":"Top up your wallet by paying with USDT or BITCOIN.","Compartir vía Whatsapp":"Share via Whatsapp","Recarga pagando con Zelle, Seis, Bizum, Paypal, Spei y otros métodos de pagos que requieren de una referencia.":"Top up by paying with Zelle, Seis, Bizum, Paypal, Spei and other payment methods that require a reference.",Copiado:"Copied","NÚMERO DE CUENTA CLABE":"CLABE ACCOUNT NUMBER","Este QR no es para pagar escaneando directamente desde la app de Remesita, sino para compartir el link de pago.":"This QR is not for paying by scanning directly from the Remesita app, but for sharing the payment link.", "Método de pago: _METHOD_.":"Payment method: _METHOD_.","Entiendo que si la cuenta queda en desuso por más de dos meses se desactivará automáticamente y no podré recuperarla.":"I understand that if the account is unused for more than 30 days it will be deactivated automatically and I will not be able to recover it.","Entiendo que la suscripción se cobrará en automático aplicando un cargo al primer pago que se reciba cada mes por esta cuenta.":"I understand that the subscription will be charged automatically by applying a charge to the first payment received each month for this account.","Entiendo que no podré solicitar un cambio o reembolso después de proceder con el pago.":"I understand that I will not be able to request a change or refund after proceeding with the payment.","La tasa cambio está garantizada solo por 5 min":"The exchange rate is guaranteed only for 5 min","Enlace de pago":"Payment link","Nuevo Contacto":"New Contact", "¿Quién será el receptor?":"Who will be the receiver?","Información técnica":"Technical information","Enviar recarga extensora":"Send a PowerUp Topup","Escribe el código de seguridad generado por tu aplicación de autenticación.":"Enter the security code generated by your authentication application.","Tarifa de operación":"Operation fee","Comisión Remesita _RATE_":"Remesita Commission _RATE_","Comisión Remesita":"Remesita Commission","Conversión antes de impuestos":"Conversion before taxes","Comisión del proveedor _RATE_":"Provider commission _RATE_","Tipo de cambio _RATE_":"Exchange rate _RATE_","Conversión después de impuestos":"Conversion after taxes","El valor debe estar entre _MIN_ y _MAX_ _CURRENCY_":"The value must be between _MIN_ and _MAX_ _CURRENCY_","Introduce los _CURRENCY_":"Enter the _CURRENCY_","Monto del pago vía _METHOD_":"Payment amount via _METHOD_","Tu wallet recibe":"Your wallet receives","Costo operacional":"Operational cost", "El balance de la wallet debe ser mayor a _AMOUNT_ _CURENCY_ para poder extender la vida de la tarjeta":"The wallet balance must be greater than _AMOUNT_ _CURENCY_ to extend the life of the card","Tarifa de extensión":"Extensor Fee","Mis últimos 10 enlaces de pago":"My last 10 payment links","Tarifa de operación _RATE_":"Operation fee _RATE_","Ups, algo anda mal":"Ups, something is wrong","Para registar un negocio debes iniciar session":"To register a business you must log in","TASAS DE CAMBIO":"EXCHANGE RATES","Podrá pagarse solo una vez.":"It can only be paid once.",Motivo:"Reason",Autorizando:"Authorizing","El pago ha sido autorizado con éxito":"The payment has been authorized successfully","Espere mientras procesamos el pago":"Wait while we process the payment","Por favor inténtalo nuevamente.":"Please try again.", "Un comprador experimentado hará el análisis de riesgos para evitar comprar a un vendedor fraudulento o de mala reputación.":"An experienced buyer will analyze the risks to avoid buying from a fraudulent or bad reputation seller.","Error al autorizar el pago":"Error authorizing payment","No necesitas tener cuenta de PayPal o cualquier otro metodo de pago.":"You don't need to have a PayPal account or any other payment method.","Mejores tiempos de entrega.":"Best delivery times.","Las cancelaciones o reembolsos de compra van a parar tu Wallet sin contratiempos.":"Cancellations or refunds of purchases will go to your Wallet without any problems.","Tus compras llegan directo a tu casillero WeShipyou.":"Your purchases go straight to your WeShipyou locker.","No tendrás que hacer verificaciones de titularidad ante la tienda.":"You will not have to verify ownership with the store.","La autorización ha fallado inténtelo nuevamente":"Authorization has failed, try again", "Escribe el código de autorización generado por tu app de autenticación":"Enter the authorization code generated by your authentication app","Registra una calificación de confianza para _NAME_!":"Register a trust rating for _NAME_!","Nos esforzamos en proteger este espacio de intrusos y defraudadores, implementando medidas rigurosas para salvaguardar tu privacidad y seguridad financiera.":"We strive to protect this space from intruders and fraudsters, implementing rigorous measures to safeguard your privacy and financial security.","Es importante que mantengamos este espacio respetuoso, enfocándonos en los temas designados para cada conversación.":"It is important that we keep this space respectful, focusing on the topics designated for each conversation.", "La comunidad oficial de Remesita en Telegram es un lugar para conectarnos y colaborar en el desarrollo del proyecto de manera responsable.":"The official Remesita community on Telegram is a place to connect and collaborate on the project in a responsible manner.","Si el pago difiere de la cotización o hay variaciones en las tasas de cambio, el valor a acreditar se recalculará automáticamente.":"If the payment differs from the quotation or there are variations in the exchange rates, the value to be credited will be recalculated automatically."}},loadTelegramCommunityStatus:()=>(window.wallet.telegramPromise||(window.wallet.telegramPromise=new Promise(((e,a)=>{$.ajax({type:"GET",url:window.wallet.createApiUrl("telegram/community/status"),success:a=>{window.wallet.telegramData=a,e(a),window.wallet.telegramPromise=!1},error:e=>{a(e),window.wallet.telegramPromise=!1}})}))),window.wallet.telegramPromise), loadPayOutRates:()=>(window.wallet.payOutRatesPromise||(window.wallet.payOutRatesPromise=new Promise(((e,a)=>{$.ajax({type:"GET",url:window.wallet.createApiUrl("wallet/payout/rates"),success:a=>{window.wallet.payOutRates=a,e(window.wallet.payOutRates),window.wallet.payOutRatesPromise=!1},error:e=>{a(e),window.wallet.payOutRatesPromise=!1}})}))),window.wallet.payOutRatesPromise),loadPayOutRatesInsights:e=>new Promise(((a,t)=>{$.ajax({type:"GET",url:window.wallet.createApiUrl(`wallet/payout/rate/${e}/insights`),success:a,error:e=>t(e)})})),loadPayInRates:e=>(window.wallet.payInRatesPromise||(window.wallet.payInRatesPromise=new Promise(((a,t)=>{null==window.wallet.payInRates||e?$.ajax({type:"GET",url:window.wallet.createApiUrl("wallet/payin/rates"),success:e=>{window.wallet.payInRatesPromise=!1,window.wallet.payInRates=e,a(window.wallet.payInRates)},error:e=>{window.wallet.payInRatesPromise=!1,t(e)}}):a(window.wallet.payInRates)}))),window.wallet.payInRatesPromise),broadCastBalance:()=>{ $.ajax({type:"POST",url:window.wallet.createApiUrl("wallet/broadcast/balance")})},fetchData:()=>new Promise(((e,a)=>{$.ajax({type:"GET",url:window.wallet.createApiUrl("wallet"),success:a=>{window.wallet.address=a?.address??null,a&&void 0!==a.availableBalance&&(window.wallet.availableBalance&&window.wallet.availableBalance!=Math.min(a.availableBalance,a.totalBalance)&&window.wallet.broadCastBalance(),window.wallet.availableBalance=Math.min(a.availableBalance,a.totalBalance)),window.wallet.freezeBalance=a?.freezeBalance??0,window.wallet.totalBalance=a?.totalBalance??0,e(a)},error:e=>a(e)})})),fetchWalletRecipients:()=>new Promise((e=>{$.ajax({type:"GET",url:window.wallet.createApiUrl("wallet/frequency-recipients"),success:a=>e(a),error:a=>e([])})})),fetchCurrencyRate:(e,a,t)=>new Promise(((n,o)=>{$.ajax({type:"GET",url:window.wallet.createApiUrl(`currency-rate/${e}/${a}/${t??1}`),success:e=>n(e),error:e=>o(e)})})),checkoutAutorizeWidget:(e,a)=>{ if(!document.querySelector('meta[property="paymesession"]'))return $(e).html('
Metatag with paymesession not found. Please contact customer support.
');$("#wallet-checkout-widget-container").remove(),void 0===window.wallet.widgetCheckoutAutorization&&(window.wallet.widgetCheckoutAutorization={});const t="_"+md5(e);window.wallet.widgetCheckoutAutorization[t]=()=>{if($("#wallet-authorize-slider").val()>=99){$("#wallet-authorize-slider").attr("disabled",!0),$("#wallet-authorize-slider-container").addClass("authorized"),window.wallet.transferProgress=2;const t=e=>{let t={success:!1,error:window.wallet.i18n(e&&e.error?e.error:"Error al autorizar el pago")};window.dispatchEvent(new CustomEvent("walletCheckoutResult",{bubbles:!0,detail:t})),"function"==typeof a&&a(t)};window.wallet.fetchData().then((()=>{window.dispatchEvent(new CustomEvent("walletCheckoutAutorized",{bubbles:!0})),$.ajax({type:"POST",url:"/wallet/authorization/init",dataType:"json", data:{session_id:$('meta[property="paymesession"]').attr("content"),business_id:$('meta[property="business_id"]').attr("content"),account:window.wallet.address},error:t,success:n=>{n.error&&n.error.length?(window.dispatchEvent(new CustomEvent("walletCheckoutResult",{bubbles:!0,detail:n})),"function"==typeof a&&a(n)):(window.walletAutorizationSession=n.paymentSession,window.walletAuthorizationToken=n.paymentAuthorizationToken,window._paymentAutorizationFlowValidateFn=()=>{if(6!=($("#method-authorization-code").val()??"").replace(/\s/gi,"").length)return!1;$("#method-authorization-validate-btn").attr("disabled",!0),$("#method-authorization-code").attr("disabled",!0),$("#method-authorization-code-indicator").removeClass("mdi-asterisk").addClass("mdi-refresh mdi-spin"),$.ajax({type:"POST",data:{session_id:$('meta[property="paymesession"]').attr("content"),business_id:$('meta[property="business_id"]').attr("content"),paymentSession:window.walletAutorizationSession, paymentAuthorizationToken:window.walletAuthorizationToken,code:($("#method-authorization-code").val()??"").replace(/\s/gi,""),account:window.wallet.address},url:"/wallet/authorization/validate",error:t,success:n=>{n&&/approved|processing|completed/.test(n.status??"")?($(e).html(` ${window.wallet.i18n("Espere mientras procesamos el pago")}...`),window.dispatchEvent(new CustomEvent("walletCheckoutResult",{bubbles:!0,detail:n})),"function"==typeof a&&a(n),window.wallet.loadPayOutRates(!0).then((()=>{}))):n.allows_retry?($("#method-authorization-help").html(' '+window.wallet.i18n(n.error??"La autorización ha fallado inténtelo nuevamente")).removeClass("text-muted").addClass("text-danger"),$("#method-authorization-code").val("").attr("disabled",!1),$("#method-authorization-validate-btn button").attr("disabled",!1), $("#method-authorization-code-indicator").addClass("mdi-asterisk").removeClass("mdi-refresh mdi-spin")):t(n)}})}, $(e).html(`\n
\n
\n ${window.wallet.i18n("Escribe el código de autorización generado por tu app de autenticación")}.\n
\n
\n
\n \n \n \n
\n \n
\n \n
\n
\n
\n \n
\n
\n `), $("#method-authorization-code").on("input",(()=>{$("#method-authorization-help").html("").addClass("text-muted").removeClass("text-danger"),$("#method-authorization-validate-btn").attr("disabled",6!=($("#method-authorization-code").val()??"").replace(/\s/gi,"").length)})),setTimeout((()=>$("#method-authorization-code").mask("0 0 0 0 0 0",{reverse:!0,placeholder:"* * * * * *"})),100))}})})).catch(t)}else{const e=setInterval((()=>{if(!$("#wallet-authorize-slider").length)return clearInterval(e);$("#wallet-authorize-slider").val(Math.max($("#wallet-authorize-slider").val()-10)),0==$("#wallet-authorize-slider").val()&&clearInterval(e)}),24)}}, $(e).html(`\n
\n
\n
\n ${window.wallet.i18n("AUTORIZAR Y PAGAR")}\n \n ${window.wallet.i18n("AUTORIZADO")}\n
\n
\n
`)},isIphone:()=>/iPhone/i.test(navigator.userAgent),fetchRecipientLockup:e=>(void 0===window.wallet._recipientLockupCached&&(window.wallet._recipientLockupCached={}),new Promise(((a,t)=>{ void 0!==window.wallet._recipientLockupCached[e]?a(window.wallet._recipientLockupCached[e]):$.ajax({type:"GET",url:window.wallet.createApiUrl(/[a-zA-Z]/gi.test(e)?`user/lookup-code/${e}`:`user/lookup-phone/${e}`),success:n=>{n.id&&n.id!=window.auth.user.id?(a(n),window.wallet._recipientLockupCached[e.trim()]=n):t()},error:e=>t(e)})}))),fetchBusiness:()=>new Promise(((e,a)=>{$.ajax({type:"GET",url:"/rest/v1/business",error:()=>a(),success:a=>e(a)})})),copyToClipboardInput:(e,a)=>{$(e).focus(),$(e).select(),document.execCommand("copy"),$(e).blur(),setTimeout((()=>$(e).blur()),100),$(a).html(` ${window.wallet.i18n("Copiado")}!`),setTimeout((()=>$(a).html("")),2e3)},shareLinkQR:e=>{ window.alertModal(window.wallet.i18n("ESCANEA EL QR"),`
\n
\n \n ${window.wallet.i18n("Este QR no es para pagar escaneando directamente desde la app de Remesita, sino para compartir el link de pago.")}\n
`,(()=>{}),null,window.wallet.i18n("CERRAR")),new QRCode("qrlinnkrender",{text:e,width:300,height:300,colorDark:"#005f75",colorLight:"#ffffff",correctLevel:QRCode.CorrectLevel.H})},doTransfer:(e,a,t)=>new Promise(((n,o)=>{if(window.wallet.transferRecipient){let l={amount:e,memo:a};$.ajax({type:"POST",url:window.wallet.createApiUrl(`wallet/transfer/${window.wallet.transferRecipient.wallet??window.wallet.transferRecipient.id}`),data:l,success:e=>{e.success?(n(e),t&&window.wallet.load()):o(e)},error:e=>o({success:!1,error:e})})}else o() })),formatMoney:(e,a,t,n)=>{a=isNaN(a=Math.abs(a))?2:a,t=void 0===t?".":t,n=void 0===n?",":n;var o=e<0?"-":"",l=String(parseInt(e=Math.abs(Number(e)||0).toFixed(a))),i=(i=l.length)>3?i%3:0;return o+(i?l.substr(0,i)+n:"")+l.substr(i).replace(/(\decSep{3})(?=\decSep)/g,"$1"+n)+(a?t+Math.abs(e-l).toFixed(a).slice(2):"")},getQuotationStyles:()=>({".quotation-details-container":{"margin-bottom":"10px"},".quotation-field-container label":{"padding-bottom":"0px"},".quotation-field-container input":{"font-weight":"bold","font-size":"1.4rem",color:"#fff"},".quotation-field-container span":{"font-family":"Nunito",color:"#fff"},".quotation-field-container label":{color:"#fff"},".quotation-field-container .quotation-input":{"background-color":"#2b5159"},".quotation-details-container":{"background-color":"#157489",color:"#fff","margin-bottom":"10px"},".quotation-details-container .view-more":{color:"#d1d1d1"},".quotation-details-container .view-less":{color:"#d1d1d1"}, ".quotation-field-container label":{color:"#fff"},".quotation-field-container.focused label":{color:"#8beaff"},".quotation-field-container.focused .quotation-input":{"background-color":"#2b5159"},".quotation-details-container ul ul":{color:"#c7e7f4"},".quotation-details-container hr":{"border-bottom":"1px dashed #92adb5"},".error-caption":{color:"#ff9c9c"}}),i18n:(e,a)=>{let t=window.wallet.translate[window.wallet.locale][e]??e;if(a)for(let e in a)t=t.replace(e,a[e]);return t},fetchAndPaginateTransactions:(e,a,t)=>{const n=md5(e+a+t);return window.wallet.transactionsPromises||(window.wallet.transactionsPromises={}),window.wallet.transactionsPromises[n]||(window.wallet.transactionsPromises[n]=new Promise(((o,l)=>{$.ajax({type:"GET",url:window.wallet.createApiUrl(`wallet/transactions/${e}/${a}?q=${t??""}`),success:e=>{o(e),window.wallet.transactionsPromises[n]=!1},error:e=>{l(e),window.wallet.transactionsPromises[n]=!1}})}))),window.wallet.transactionsPromises[n]}, fetchPaymentApprovalAwait:()=>(window.wallet.approvalAwaitPromise||(window.wallet.approvalAwaitPromise=new Promise(((e,a)=>{$.ajax({type:"GET",url:window.wallet.createApiUrl("wallet/payment-awaiting-approval"),success:a=>{e(a),window.wallet.approvalAwaitPromise=!1},error:e=>{a(e),window.wallet.approvalAwaitPromise=!1}})}))),window.wallet.approvalAwaitPromise),showTecnicBusinessModal:e=>{$("#tecnicBusinessModal").length||($("body").append(``),$("#tecnicBusinessModal").on("hidden.bs.modal",(e=>{$("body").css("overflow","auto"),$("#walletTopupChoiceModal").modal("show"), $(".tehcnic-header").hide(),$(".tehcnicmodal-btn").hide(),$(".tehcnic-box").animate({"margin-top":"-32px"}),$(".tehcnic-btn").show()})),$("#tecnicBusinessModal").on("show.bs.modal",(e=>{$("#walletTopupChoiceModal").modal("hide"),$("body").css("overflow","hidden")}))),$("#tecnicBusinessModalBody").html(window.wallet.loadingHtml(3)).load(`/business/${e}/integration/view`),$("#tecnicBusinessModal").modal("show"),window.wallet.onBackAction=()=>{$("#tecnicBusinessModal").modal("hide")}},businessRegistrationUI:()=>{ $("#starterBusinessModal").length||($("body").append(''), $("#starterBusinessModal").on("show.bs.modal",(function(e){if($(this),$(e.relatedTarget),$("#paymelinkModal").modal("hide"),$("#addChoiceModal").modal("hide"),$("body").append($("#starterBusinessModal")),$("#businessRequestIframe").attr("src","#").hide(),!window.auth||!window.auth.user||!window.auth.user.token||""==window.auth.user.token)return $("#starterBusinessModal").modal("hide"),window.alertModal(window.wallet.i18n("Ups, algo anda mal"),window.wallet.i18n("Para registar un negocio debes iniciar session")),!1;$("#businessRequestIframe").attr("src",`/registrar-negocio?applicantId=${window.auth?.user?.id??""}`).show()})),$("#starterBusinessModal").on("hide.bs.modal",(function(e){$("#businessRequestIframe").hide().attr("src",`/registrar-negocio?applicantId=${window.auth?.user?.id??""}`).show()}))),$("#starterBusinessModal").modal("show")},walletTopupByPaymentLinkWizard:(e,a,t,n)=>{ $("#wallet-topup-header").html(`
\n \n
${window.wallet.i18n("Cobra con link de pago")}
\n
`),void 0===e?($("#wallet-topup-choice-body").html(window.wallet.loadingHtml(3)),window.wallet.fetchBusiness().then((e=>{ $("#wallet-topup-choice-body").html(`
\n
\n \n
\n
\n
${window.wallet.i18n("Cobra como")}:
${window.auth.user.fullName}
${window.auth.user.email}
\n
\n
\n
`), e.forEach((e=>{ $("#wallet-topup-choice-body").append(`
\n
\n \n
\n
\n
${window.wallet.i18n("Cobra como")}:
${e.name}
${e.domain}
\n
\n
\n ${window.wallet.i18n("Nuestro equipo esta revisando la documentación del negocio, en breve recibirás una notificación.")}\n
\n
\n El negocio se encuentra desactivado.\n
\n
\n ${window.wallet.i18n("La apertura del negocio ha sido denegado. Contacte con nuestro equipo de asistecia para más detalles.")}\n
\n
\n
\n
${this.wallet.i18n("Información para usuarios avanzados.")}\n
\n \n \n
\n \n
`) })), e.length<2&&$("#wallet-topup-choice-body").append(`
\n
\n
\n
\n ${window.wallet.i18n("Registrar nuevo negocio")}\n
\n
\n
\n
`) })).catch((e=>{ window.auth&&window.auth.isConnected()?($("#wallet-topup-choice-body").html(`
\n
\n \n
\n
\n
${window.wallet.i18n("Cobra como")}:
${window.auth.user.fullName}
${window.auth.user.email}
\n
\n
\n
`), window.auth.refreshToken()):window.alertModal(window.wallet.i18n("Ups, algo anda mal!"),window.wallet.i18n("No eres tu, somos nosotros que tubimos un error de conexión con el servidor. Inténtalo luego!")),$("#paymentLingModalFooter").show() }))):($("#wallet-topup-header").html(`
\n \n
${window.wallet.i18n("Cobra con link de pago como")}:
${e}
\n \n
`),$("#wallet-topup-choice-body").html(window.wallet.loadingHtml(3)),window.wallet.loadPayInRates(!0).then((()=>{ $("#wallet-topup-choice-body").html(`
\n \n ${(()=>{const e=[];for(let a in window.wallet.payInRates)window.wallet.payInRates[a].enabled&&"WALLET"!=a&&e.push({...window.wallet.payInRates[a],method:a});return void 0===n?e:n(e)})().map((e=>(btoa(JSON.stringify(e)), `
\n \n
`))).join("")}\n
\n `), window.wallet.pLinkMethodChoiced=e=>{$("#plink-quotation").remove(),$("#plink-quotation").length||$("#plink-quotation-container").html(''),1!=window.wallet.payInRates[e].exchangeRate&&$("#plink-quotation-container").append(`
${window.wallet.i18n("La tasa cambio está garantizada solo por 5 min")}.
`), $("#plink-quotation-container").append(`
\n \n ${window.wallet.i18n("Comentario o Concepto")} (${window.wallet.i18n("Opcional")})\n
\n \n
\n \n \n \n
\n
\n \n
`), window.wallet.keyboardPositionListener("#plink-memo");const a={"Enter _CURRENCY_":window.wallet.i18n("Introduce los _CURRENCY_"),"Source amount on _CURRENCY_":window.wallet.i18n("Monto del pago vía _METHOD_",{_METHOD_:window.wallet.payInRates[e].label??e}),"Target amount on _CURRENCY_":window.wallet.i18n("Tu wallet recibe"),"Exchange Rate _RATE_":window.wallet.i18n("Exchange Rate _RATE_"),"Percentage Fee _RATE_":window.wallet.i18n("Comisión Remesita _RATE_"),"Percentage Fee":window.wallet.i18n("Comisión Remesita"),"Fixed Fee":window.wallet.i18n("Tarifa de operación"),"Conversion before taxes":window.wallet.i18n("Conversión antes de impuestos"),"Conversion after taxes":window.wallet.i18n("Conversión después de impuestos"),"Value must be between _MIN_ and _MAX_ _CURRENCY_":window.wallet.i18n("El valor debe estar entre _MIN_ y _MAX_ _CURRENCY_"),"Total commissions":window.wallet.i18n("Costo operacional"),"View more":"Ver detalle completo","View less":"Ocultar detalle", "Total conversion":"Cantidad convertida","Recipient amount":"Cantidad a recibir","The amount exceed the established limits":"Los datos introducidos no son válidos."};$("#plink-quotation").setupDQ({exchangeRate:window.wallet.payInRates[e].exchangeRate,fixedFees:{"Fixed Fee":window.wallet.payInRates[e].fix??0},percentageFees:{"Percentage Fee":(window.wallet.payInRates[e].percent??0)/100},minSource:"BTC"==window.wallet.payInRates[e].currency?parseFloat(window.wallet.payInRates[e].min):parseFloat(window.wallet.payInRates[e].min.toFixed(2)),maxSource:"BTC"==window.wallet.payInRates[e].currency?parseFloat(window.wallet.payInRates[e].max):parseFloat(window.wallet.payInRates[e].max.toFixed(2)),minTarget:2,maxTarget:1e7,sourceCurrency:window.wallet.payInRates[e].currency??"USD",targetCurrency:window.wallet.coinSimbol,target:5,feeApplyTo:"target",components:["source","details","target"],i18n:a,detailsCls:"animate bounceIn",styles:window.wallet.getQuotationStyles()}), document.querySelector("#plink-quotation").addEventListener("validation",(a=>{window.wallet.onQuotationValidate(a.detail),window.wallet.plinkData={paymentAmount:a.detail.sourceValue,recipientAmount:a.detail.targetValue,method:e,methodLabel:window.wallet.payInRates[e].label??e,exchangeRate:window.wallet.payInRates[e].exchangeRate,holderId:t},$("#plink-next-btn").attr("disabled",!1)})),window.wallet.onBackAction=()=>{$(".plink-method-choice").parent().fadeIn(),$("#plink-method-choice-title").show(),$("#plink-quotation-container").hide(),$("#wallet-topup-choice-footer").html(""),window.wallet.onBackAction=()=>window.wallet.showWalletTopupUI("PLINK")}, $("#wallet-topup-choice-footer").html(`
\n
\n \n
\n
`)}})),$("#wallet-topup-choice-footer").html(""))},gitfCardChoiceUI:e=>{window.wallet.onBackAction=()=>$("#walletPayoutModal").modal("hide"), $("#walletPayoutModalHeader").html(` \n
\n
\n ${e?window.wallet.i18n(e.label):window.wallet.i18n("Adquiere una Tarjeta de Regalo")}\n
\n ${e?window.wallet.i18n("Usa su balance Wallet"):window.wallet.i18n("Usa su balance para pagar directo en la tienda")}\n
\n \n `), window.wallet.onBackAction=()=>{window.wallet.onBackAction=()=>$("#walletPayoutModal").modal("hide"),$("#walletPayoutModalFooter").hide().html(""),window.wallet.showTransferChoiceModal()},$("#walletPayoutModalBody").html(window.wallet.loadingHtml(3)),$("#walletPayoutModalFooter").hide().html("");const a=()=>{window.wallet.onBackAction=()=>$("#walletPayoutModal").modal("hide"),$("#walletPayoutModal .modal-content").removeClass("bg-dark").addClass("bg-danger"), $("#walletPayoutModalBody").html(`
\n
\n
\n
\n \n
\n
\n
${window.wallet.i18n("Ups, lo sentimos")}
\n

${window.wallet.i18n("No tenemos disponibilidad de tarjetas digitales en este momento.")}

\n
\n
`)};$.ajax({type:"GET",url:window.wallet.createApiUrl("egiftcards"),dataType:"json",headers:{"response-include-errors":!0},error:a,success:e=>{e.length?($("#walletPayoutModalBody").html(""), e.forEach((e=>{ $("#walletPayoutModalBody").append(`\n
\n \n
\n `) })),window.wallet._checkoutGifCard=()=>{if($("#wallet-authorize-slider").val()>=99){$("#wallet-authorize-slider").attr("disabled",!0),$("#wallet-authorize-slider-container").addClass("authorized"),$("#close-gitfcard-checkout-container").remove(),$("#walletPayoutModalBody").html(window.wallet.loadingHtml(3));const e={sku:"GIFT_CARD",packageId:window.wallet.gifCardPackageChoiced,recipientAmount:window.wallet.gifCardPackageAmountChoiced,recipientRelationship:"YOURSELF",paymentMethod:"WALLET",recipientAccount:window.auth.user.email};$.ajax({type:"PUT",url:window.wallet.createApiUrl("operation/order"),dataType:"json",headers:{"response-include-errors":!0},data:e,error:()=>{$("#walletPayoutModalBody").html(window.wallet.lottieWithMessage("CANCELLED",window.wallet.i18n("Error generando la tarjeta digital, inténtelo luego"))), $("#walletPayoutModalFooter").show().html(`
\n
\n
`)},success:e=>{e.success?($("#walletPayoutModal .modal-content").removeClass("bg-dark").addClass("bg-success"),$("#walletPayoutModalBody").html(window.wallet.lottieWithMessage("SUCCESS",window.wallet.i18n("La orden fue creada con éxito, en breve se generara tu tarjeta de regalo digital")+`.
${e.reference??"----"}`)), $("#walletPayoutModalFooter").show().html(`
\n
\n
`),window.wallet.load()):($("#walletPayoutModalBody").html(window.wallet.lottieWithMessage("CANCELLED",window.wallet.i18n(e.error))),$("#walletPayoutModalFooter").show().html(`
\n
\n
`))}})}}, window.wallet._giftCardChoice=e=>{const a=$(e).data();$("#wallet-send-header").html(`\n
\n \n
\n \n ${window.wallet.i18n("Compra una Tarjeta de regalo")}\n \n
${a.name} (${a.currency})
\n
\n
`), $("#walletPayoutModalBody").html(`\n
\n
\n ${JSON.parse(atob(a.packages)).map((e=>`
\n \n
`)).join("")}\n
\n
\n \n
\n
\n
`), $("#walletPayoutModalFooter").show().html(`\n
\n \n
\n \n
\n
`) }):a()}})},runServiceShotCut:e=>{const a={};for(sku in window.wallet.payOutRates)window.wallet.payOutRates[sku].enabled&&(window.wallet.payOutRates[sku].shortcuts??[]).length&&window.wallet.payOutRates[sku].shortcuts.forEach(((e,t)=>{a[`${sku}_${t}`]={sku:sku,...window.wallet.payOutRates[sku],...e}}));const t=a[e];switch(t.group){case"transfer":case"delivery":window.wallet.internationalTransferUI(t);break;case"topup":window.wallet.phoneTopupUI(t);break;case"giftcard":window.wallet.gitfCardChoiceUI(t)}},showTransferChoiceModal:e=>{if(!window.auth.user.totp&&window.auth.showTOTPForceDialog)return $("#cashout-btn").html(''),window.auth.showTOTPForceDialog(window.wallet.i18n("Es obligatorio tener configurado la capa de seguridad con doble factor para poder operar con tu wallet Remesita"));const a=()=>{ $("#walletPayoutModalHeader").html(`
\n ${window.wallet.i18n("¿A dónde irá tu dinero?")}
\n ${window.wallet.i18n("Seleccione el tipo de operación que vas a realizar")}
`)},t=window.wallet._buildDarkModal("walletPayoutModal","md",(()=>{window.wallet.adaptativeModalHeigth("#walletPayoutModal","#walletPayoutModalBody"),a()}),(()=>$("#prepaid-card-topup-quotation").remove()));a(),$("#walletPayoutModalBody").html(window.wallet.loadingHtml(3)),window.wallet.loadPayOutRates().then((a=>{$("#cashout-btn").html('');const n=[];for(e in a)a[e].enabled&&(a[e].shortcuts??[]).length&&a[e].shortcuts.forEach(((a,t)=>{n.push({id:`${e}_${t}`,...a})})) ;if($("#walletPayoutModalBody").css("align-content","flex-start").html(`\n ${n.length?`
\n \n \n
`:""} \n ${n.map((e=>`
\n \n
`)).join("")}\n \n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
`), $("#walletPayoutModalFooter").hide().html(""),$("#walletPayoutModal .modal-content").addClass("bg-dark").removeClass("bg-success").removeClass("bg-danger"),t.modal("show"),$("#walletPayoutModal .modal-content").removeClass("animated fadeOut"),"undefined"!=e)switch(e){case"PREPAID_CARD":case"WALLET":window.wallet.topupCardChoiceUI()}})),window.wallet.onBackAction=()=>{$("#walletPayoutModal").modal("hide")},$("#wallet-topup-choice-footer").html(`
\n
\n \n
\n
`)},closeTransferChoiceModal:()=>{$("#walletPayoutModal .modal-content").addClass("animated fadeOut"),setTimeout((()=>$("#walletPayoutModal").modal("hide")),300)}, calcPrepaidCardRecipientQuotation:e=>{const a=parseFloat(e),t=window.wallet.payOutRates?.PREPAID_CARD?.fix??0,n=a*((window.wallet.payOutRates?.PREPAID_CARD?.percent??0)/100),o=a-(t+n);return{totalToConvert:o,amountPayOut:e,feeFix:t,feePercent:n,totalFees:t+n,exchangeRate:window.wallet.usd2mxn,recipientAmount:o*window.wallet.usd2mxn}},onCardTopupAmountInput:e=>{$("#wallet-card-topup-amount-max-overflow").hide(),parseFloat($(e).val())>parseFloat(window.wallet.availableBalance.toFixed(2))&&($("#wallet-card-topup-amount-max-overflow").show(),setTimeout((()=>$("#wallet-card-topup-amount-max-overflow").hide()),3e3)),$(e).val(Math.min(parseFloat($(e).val()),parseFloat(window.wallet.availableBalance.toFixed(2))));const a=window.wallet.calcPrepaidCardRecipientQuotation(parseFloat($(e).val())) ;$("#wallet-card-topup-amount-exchange").html(``), $("#wallet-card-topup-btn").attr("disabled",!$("#wallet-card-topup-amount").is(":valid")&&a.totalToConvert>0)},createApiUrl:e=>`https://${"dev"==$('meta[name="app-env"]').attr("content")?"dev.":""}remesita.com/rest/v1/${e}`,loadServiceDisclaimer:(e,a,t)=>{$(e).show().html(window.wallet.loadingHtml(1)),$.ajax({type:"GET",url:window.wallet.createApiUrl(`wallet/disclaimer/${a}/${t}`),success:a=>{$(e).show().html(``)},error:()=>$(e).hide()})},notImplementedYet:()=>{window.alertModal("Hey, maestro impaciente!","Esta funcionalidad está en un campamento de entrenamiento, levantando pesas de código, haciendo flexiones de diseño y corriendo maratones de pruebas. Pronto estará lista para la batalla!")},bussinessUnderReviewMessage:()=>{window.alertModal("Ups!","Este negocio está en revisión, aun no es posible generar enlaces de pago con esta identidad comercial.")},lottieWithMessage:(e,a,t)=>{switch(e){ case"SUCCESS":url="/assets/lotties/payment-success.json";break;case"CANCELLED":url="/assets/lotties/payment-cancelled.json";break;case"PROCESSING":url="/assets/lotties/payment-processing.json"}return`
\n \n
\n
${a}
`},importClabeFromCards:()=>{ const e=``;window.confirmModal(window.wallet.i18n("Estás a punto de desconectar de tus tarjetas las cuentas CLABE para enlazarlas a tu Wallet.")+`
${window.wallet.i18n("Términos y condiciones")}

${e}
${window.wallet.i18n("Al proceder estarás aceptando los términos y condiciones.")}`,(()=>{const e=()=>$("body").createFlashMessage({type:"fail",message:window.wallet.i18n("Ocurrió un error inesperado, inténtalo de nuevo"),closeable:!0,permanent:!1,position:"fixed",location:"bottom-left",duration:5e3});$.ajax({type:"POST",url:window.wallet.createApiUrl("wallet/import-clabe-from-cards"),dataType:"json",headers:{"response-include-errors":!0},error:e, success:a=>{a.success?window.wallet.showWalletTopupUI("SPEI",!0):e()}})}))},paymentLinkHistoryUI:()=>{ $("#paymentLinkHistoryModal").length||($("body").append(``), $("#walletTopupChoiceModal").on("hidden.bs.modal",(e=>{$("body").css("overflow","auto"),$("#plink-quotation").remove()})),$("#paymentLinkHistoryModal").on("show.bs.modal",(e=>{$("body").css("overflow","hidden"),window.wallet.onBackAction=()=>$("#paymentLinkHistoryModal").modal("hide"),window.wallet.adaptativeModalHeigth("#paymentLinkHistoryModal","#paymentLinkHistoryModalBody")}))),$("#paymentLinkHistoryModal").modal("show"),$("#paymentLinkHistoryModalBody").html(window.wallet.loadingHtml(3)),$.ajax({type:"GET",url:window.wallet.createApiUrl(`payment/${window.wallet.address}/links?pgSize=10`),headers:{"response-include-errors":!0},success:e=>{e&&e.length?$("#paymentLinkHistoryModalBody").html(e.map((e=>{let a="dark";switch(e.status){case"paid":a="warning";break;case"canceled":case"cancelled":a="danger";break;case"completed":a="info"} return``})).join("")):$("#paymentLinkHistoryModalBody").html(`

${window.wallet.i18n("No tienes enlaces de pago generados")}
`)},error:()=>{}})},removePlink:(e,a)=>{$(a).html('').attr("disabled",!0),$(`#plink-item-${e}`).css("text-decoration","line-through"),$.ajax({type:"DELETE",url:window.wallet.createApiUrl(`payment/-/link/${e}`),dataType:"json",headers:{"response-include-errors":!0},success:()=>$(`#plink-item-${e}`).remove(),error:()=>{$(`#plink-item-${e}`).css("text-decoration","none"),$(a).html('').attr("disabled",!1)}})},showDeprecateSpei:()=>{var e=new Date("2024-11-10"),a=new Date("2024-11-01"),t=new Date ;if(tCambios Importantes que afectan la forma cómo agregas fondos a tu wallet."+(a>t?'A partir del 1 de noviembre de 2024, la recarga de tu wallet se realizará exclusivamente a través de "pagos referenciados", lo que requerirá generar una orden previa. La opción de agregar dinero mediante la cuenta CLABE dedicada dejará de estar disponible.
Si tienes activado el pago automático desde PayPal, Airbnb, o cualquier otra cuenta, por favor detén esos pagos antes de esa fecha.
Después del 1 de noviembre no podremos devolver el dinero si intentas enviar pagos a las CLABES desactivadas.':'Desde el 1 de noviembre de 2024, no es posible agregar fondos a tu wallet usando la cuenta CLABE dedicada. Podras recargar tu wallet vía SPEI pero como "pago referenciado" generando una orden previa.
Si tienes activado el pago automático desde PayPal, Airbnb, o cualquier otra cuenta, por favor detén esos pagos antes de esa fecha.
Desde el 1 de noviembre no podemos revertir transferencias a las CLABEs desactivadas.')) },showWalletTopupUI:(e,a)=>{if(!window.auth.user.totp&&window.auth.showTOTPForceDialog)return window.auth.showTOTPForceDialog(window.wallet.i18n("Es obligatorio tener configurado la capa de seguridad con doble factor para poder operar con tu wallet Remesita")) ;$("#walletTopupChoiceModal").length||($("body").append(''), $("#walletTopupChoiceModal").on("hidden.bs.modal",(e=>{$("body").css("overflow","auto"),$("#plink-quotation").remove()})),$("#walletTopupChoiceModal").on("show.bs.modal",(e=>{$("body").css("overflow","hidden"),window.wallet.onBackAction=()=>$("#walletTopupChoiceModal").modal("hide"),window.wallet.adaptativeModalHeigth("#walletTopupChoiceModal","#wallet-topup-choice-body")}))),$("#wallet-topup-btn").attr("disabled",!0).html(''),window.wallet.loadPayInRates(a).then((()=>{var a=new Date("2024-11-10"),t=new Date("2024-11-01"),n=new Date;if($("#wallet-topup-btn").attr("disabled",!1).html(''), $("#wallet-topup-header").html(`
${window.wallet.i18n("¿Cómo quieres fondear tu Wallet?")}
\n ${window.wallet.i18n("Seleccione la forma de pago que usarás para recargar")}`), $("#wallet-topup-choice-body").html(`\n ${a>n?`
\n \n
`:""}\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n \x3c!--\n
\n \n
\n --\x3e\n `), $("#walletTopupChoiceModal .modal-content").addClass("bg-dark").removeClass("bg-success").removeClass("bg-danger"),$("#walletTopupChoiceModal").modal("show"),$("#walletTopupChoiceModal .modal-content").removeClass("animated fadeOut"),$("#walletTopupChoiceModal").removeClass("animated fadeOut"), $("#wallet-topup-choice-footer").html(`
\n
\n
\n
`),window.wallet.usd2mxn||window.wallet.fetchCurrencyRate("USD","MXN",1).then((e=>{window.wallet.usd2mxn=e.rate,$("#topup-wallet-from-card-usd2mxn").html(`1 SRM = ${window.wallet.usd2mxn} MXN`), $("#topup-wallet-from-clabe-usd2mxn").html(`1 SRM = ${window.wallet.usd2mxn} MXN`)})),void 0!==e)switch(e){case"PLINK":window.wallet.forceOpenPaymentLink=!1,window.wallet.walletTopupByPaymentLinkWizard();break;case"GATEWAYS":window.wallet.forceOpenPaymentLink=!0,window.wallet.walletTopupByPaymentLinkWizard(window.auth.user.fullName,window.auth.user.photoURL,window.auth.user.referCode,(e=>e.filter((e=>!e.isCrypto&&!e.isReferenced)))),$("#wallet-topup-header").html(`
\n \n
${window.wallet.i18n("Fondeo con pasarelas")}
\n
`);break;case"CASH": window.wallet.forceOpenPaymentLink=!0,window.wallet.walletTopupByPaymentLinkWizard(window.auth.user.fullName,window.auth.user.photoURL,window.auth.user.referCode,(e=>e.filter((e=>e.isCash)))),$("#wallet-topup-header").html(`
\n \n
${window.wallet.i18n("Deposita Efectivo")}
\n
`);break;case"REFERENCED":window.wallet.forceOpenPaymentLink=!0,window.wallet.walletTopupByPaymentLinkWizard(window.auth.user.fullName,window.auth.user.photoURL,window.auth.user.referCode,(e=>e.filter((e=>e.isReferenced)))), $("#wallet-topup-header").html(`
\n \n
${window.wallet.i18n("Pago referenciado")}
\n
`);break;case"CRYPTO":window.wallet.forceOpenPaymentLink=!0,window.wallet.walletTopupByPaymentLinkWizard(window.auth.user.fullName,window.auth.user.photoURL,window.auth.user.referCode,(e=>e.filter((e=>e.isCrypto)))), $("#wallet-topup-header").html(`
\n \n
${window.wallet.i18n("Fondea con crypto")}
\n
`);break;case"SPEI":window.wallet.forceOpenPaymentLink=!1, $("#wallet-topup-header").html(`
\n \n
\n
${window.wallet.i18n("Fondea tu wallet por transferencia SPEI")}
\n ${window.wallet.i18n("Seleccione la cuenta clabe que deseas usar")}\n
\n
`), $("#wallet-topup-choice-body").html(`
\n \n
`), $("#wallet-topup-choice-body").html(``), window.wallet.keyboardPositionListener("#clabe-details-bank"),window.wallet.keyboardPositionListener("#details-bank-alias"),window.wallet.keyboardPositionListener("#clabe-details-bank-alias"),window.wallet.topupChoiceClabeDetails=e=>{const a=window.wallet.payInRates.SPEI?.clabes[e];$("#wallet-topup-choice-footer").html(`
\n
\n
`) ;const t=`
${window.wallet.i18n("Compatibilidad")}:
`+("TRANSFER"==a.providerAlias?`
  • ✅ ${window.wallet.i18n("90% Bancos de México")}
  • ✅ FelixPago
  • ❌ Paypal
  • ❌ Wise
  • ❌ WesternUnion
  • ✅ Workana
  • ❌ Airbnb
  • ❌ Swift
  • ⚡️ ${window.wallet.i18n("Liquidez menos de 30min")}
    • `:`
      • ✅ ${window.wallet.i18n("95% Bancos de México")}
      • ❌ FelixPago
      • ✅ Paypal
      • ✅ Wise
      • ❌ WesternUnion
      • ✅ Airbnb
      • ✅ Workana
      • ❌ Swift
      • 🐢 ${window.wallet.i18n("Liquidez entre 1h a 24h")}
        • `);$("#clabe-details-container").show(),$(".clabe-item").hide(),$("#clabe-details-number").val(a.number),$("#clabe-details-bank").val(a.provider),$("#clabe-details-bank-alias").val(a.providerAlias),$("#wallet-topup-header small").remove(),$("#clabe-details-compatibility").html(`
          ${t}
          `), $("#clabe-details-reanudation").html(a.enabled?""!=a.expires&&null!=a.expires?`

          Esta cuenta CLABE expira ${moment(a.expires).fromNow()}

          Una vez inactiva se aplicará la tarifa de renovación del proveedor (3.00 SRM) a la primera transacción entrante que ocurra en el siguiente periodo de 30 días. Si no recibe fondos en ese tiempo será desactivada de forma permanente.
          `:"":'
          La cuenta CLABE está inactiva.
          - Aún podrás recibir transferencias antes de que termine el mes, y de esta manera se reanudará automáticamente aplicándose la tarifa de renovación del proveedor. (3.00 SRM).

          - Ten en cuenta que los fondos no llegarán si el pago no cubre la tarifa.

          - Después de 30 días sin renovación, se desactivará de forma permanente.
          '), $("#wallet-topup-header h5").html(window.wallet.i18n("Fondea tu wallet recibiendo una transferencia SPEI a esta cuenta CLABE Mexicana"))},(window.wallet.payInRates.SPEI?.clabes??[]).forEach(((e,a)=>{ $("#wallet-topup-choice-body").append(`
          \n \n
          `) })), window.wallet.payInRates.SPEI.allowImportFromCards>0&&$("#wallet-topup-choice-body").append(`
          \n \n
          `), $("#wallet-topup-choice-body").append(`
          \n \n
          `)}else setTimeout((()=>{window.wallet.onBackAction=()=>$("#walletTopupChoiceModal").modal("hide")}),500);window.wallet.navHandlerInit()}))}, adaptativeModalHeigth:(e,a)=>{setTimeout((()=>{const t=setInterval((()=>{let n=parseFloat($("body").height());if($(e).length&&$(e).is(":visible")){$(e).css("max-height",`${n}px`);let t=0;$(">div",$(a).parent()).each(((e,n)=>{$(n).attr("id")!=a.replace("#","")&&(t+=parseFloat($(n).height()))})),($(e).height()+10>n||$(a).height()+10>n||$(a).height()>$(e).height()-t)&&$(a).css("max-height",$(e).height()-(t+10)+"px")}else clearInterval(t)}),100)}),100)},confirmAnCreatePaymentLink:()=>{window.confirmModal(`
          \n
          ${window.wallet.i18n("Estás a punto de crear un enlace de pago con las siguientes condiciones:")}
          \n
            \n
          • ${window.wallet.i18n("Método de pago: _METHOD_.",{_METHOD_:window.wallet.plinkData.methodLabel })}
          • \n
          • ${window.wallet.i18n("Podrá pagarse solo una vez.")}
          • \n
          • ${window.wallet.i18n("Debe usarse antes de 30 días.")}
          • \n
          • ${window.wallet.i18n("Si el pago difiere de la cotización o hay variaciones en las tasas de cambio, el valor a acreditar se recalculará automáticamente.")}
          • \n
          • ${window.wallet.i18n("Tasa de cambio no garantizada.")}
          • \n
          \n
          `,(()=>{$("#wallet-topup-choice-body").html(window.wallet.loadingHtml(3)),$("#wallet-topup-choice-footer").html(""),$("#wallet-topup-header button").html(''),$.ajax({type:"GET",url:"https://api.remesita.com/rest/v1/health-check/payment-link",headers:{"response-include-errors":!0},error:()=>{ $("#wallet-topup-choice-body").html(`
          \n
          \n
          \n
          \n \n
          \n
          \n
          ${window.wallet.i18n("Ups, lo sentimos")}
          \n

          ${window.wallet.i18n("El servicio para cobrar con Link de Pago se encuentra en mantenimiento, inténtalo luego.")}

          \n
          \n
          `), $("#wallet-topup-choice-footer").html(`
          \n
          \n
          `),$("#wallet-topup-header button").remove()},success:e=>{$.ajax({type:"POST",headers:{"response-include-errors":!0},url:window.wallet.createApiUrl(`payment/link/${window.wallet.plinkData.holderId}`),data:{amount:window.wallet.plinkData.paymentAmount,memo:$("#recipientAmount").val()??"",recipient_account:window.wallet.address,sku:"WALLET_TOPUP",cutid:"",address:"",fee_assumed_by:"collector",link_expiration:"30 days",methods:[window.wallet.plinkData.method],domain:"pay.remesita.com",md5:md5(moment())},error:e=>{ $("#wallet-topup-choice-body").html(`
          \n
          \n
          \n
          \n \n
          \n
          \n
          ${window.wallet.i18n("Ups")}!
          \n

          ${window.wallet.i18n("Algo anda mal, no se pudo generar el enlace de pago, inténtelo luego.")}

          \n
          \n
          `), $("#wallet-topup-choice-footer").html(`
          \n
          \n
          `),$("#wallet-topup-header button").remove()},success:e=>{$("#wallet-topup-header button").remove(), window.wallet.i18n(e.error)?($("#wallet-topup-choice-body").html(`
          \n
          \n
          \n
          \n \n
          \n
          \n
          ${window.wallet.i18n("Ups")}!
          \n

          ${window.wallet.i18n(e.error)}

          \n
          \n
          `), $("#wallet-topup-choice-footer").html(`
          \n
          \n
          `),$("#wallet-topup-header button").remove()):window.wallet.forceOpenPaymentLink?(window.wallet.onBackAction=()=>$("#walletTopupChoiceModal").modal("hide"),$("#wallet-topup-header").html(`
          \n
          ${window.wallet.i18n("Orden de pago _REFERENCE_",{_REFERENCE_:e.reference })}
          \n \n
          `), $("#wallet-topup-choice-body").html(`
          \n ${window.wallet.i18n("Si tu navegador no permitió abrir la ventana con la orden de pago puedes usar este botón.")}\n
          \n \n
          `),$("#wallet-topup-choice-body form").submit(), $("#wallet-topup-choice-footer").html("")):($("#wallet-topup-choice-body").html(`
          \n \n
          \n ${window.wallet.i18n("Compartir")}:\n \n
          \n
          `), $("#wallet-topup-choice-footer").html(`
          \n
          \n
          `),window.wallet.keyboardPositionListener("#plink-link"))}})}})}))},showClabeIssueUI:e=>{ $("#waletClabeIssueModal").length||($("body").append(''), $("#waletClabeIssueModal").on("hidden.bs.modal",(e=>{$("body").css("overflow","auto")})),$("#waletClabeIssueModal").on("show.bs.modal",(e=>{$("body").css("overflow","hidden"),window.wallet.adaptativeModalHeigth("#waletClabeIssueModal","#wallet-clabe-request-body")}))),$("#wallet-clabe-request-header").html(`
          ${window.wallet.i18n("Solicitud de cuenta CLABE Mexicana")}
          \n
          ${window.wallet.i18n("¿Qué institución prefieres?")}
          `);const a="height: 35px;width: 100px;background-size: cover;border-radius: 20px; background-repeat: no-repeat;background-position: center;background-size: contain;" ;$("#wallet-clabe-request-body").html(`\n
          \n \n
          \n
          \n \n
          `), $("#wallet-clabe-request-footer").html(`
          \n
          \n
          `),void 0!==e&&$("#wallet-clabe-request-footer").prepend(`
          \n
          \n
          `),$("#waletClabeIssueModal").modal("show")},topupCardConfirmAndSend:()=>{ if(!window.wallet.quotation)return $("#wallet-card-topup-btn").attr("disabled",!0);const e=$("#card-topup-extensor").is(":checked"),a=window.wallet.currentCard?.number;window.confirmModal(`
          ${window.wallet.i18n(`Estás a punto de enviar una recarga de _TOPUP_AMOUNT_ MXN a tu tarjeta ${a} usando _TOPUP_QUOTATION_ _SRM_ del balance de tu Wallet.`,{_TOPUP_QUOTATION_:window.wallet.formatMoney(window.wallet.quotation?.sourceValue??0),_TOPUP_AMOUNT_:window.wallet.formatMoney(window.wallet.quotation?.targetValue??0),_SRM_:window.wallet.coinSimbol })}
          \n
          \n
          ${window.wallet.i18n("Aviso importante sobre pagos a WeShipYou:")}
          \n ${window.wallet.i18n("Los pagos del servicio de la paquetería no se estan procesando desde el saldo de la tarjeta sino desde el balance de la wallet. No es necesario recargar la tarjeta para pagar la paquetería.")}\n
          \n\n
          \n
          ${window.wallet.i18n("Aviso importante sobre la seguridad de tus fondos:")}
          \n ${window.wallet.i18n("Al realizar una recarga de su tarjeta prepagada, los fondos transferidos pasan a ser gestionados por el banco proveedor del servicio, en este caso _CUSTODIALBY_, por lo que ya no están bajo nuestra custodia directa. Le recomendamos recargar su tarjeta únicamente con el monto necesario para compras puntuales y no utilizarla como una cuenta de ahorros. Es importante considerar que revertir los fondos de la tarjeta puede tener un costo adicional.",{ _CUSTODIALBY_:window.wallet.currentCard.custodialInstitution??window.wallet.currentCard.issuer})}\n ${window.wallet.i18n("Por otro lado las fluctuaciones del tipo de cambio podrían afectar el valor de sus fondos, ya que la tarjeta se maneja en _CURRENCY_ y no en USD.",{_CURRENCY_:window.wallet.currentCard.currency})} \n ${window.wallet.i18n("Para mayor seguridad, sugerimos mantener sus fondos en la wallet y usar la tarjeta prepagada según sus necesidades específicas.")}\n
          `,(()=>{const t={amount:window.wallet.quotation.sourceValue,recipientAmount:window.wallet.quotation.targetValue,recipientCurrency:"MXN",sku:"PREPAID_CARD",recipientRelationship:"YOURSELF",recipientAccount:a,paymentMethod:"WALLET",extender:e?"y":"n"};$("#wallet-send-header").html(`
          ${window.wallet.i18n("Enviando recarga a tarjeta")}
          `), $("#walletPayoutModalBody").html(window.wallet.lottieWithMessage("PROCESSING",window.wallet.i18n("Procesando recarga"))),$("#walletPayoutModalFooter").hide().html(""),$.ajax({type:"PUT",url:window.wallet.createApiUrl("operation/order"),dataType:"json",headers:{"response-include-errors":!0},data:t,error:()=>{$("#walletPayoutModalBody").html(window.wallet.lottieWithMessage("CANCELLED",window.wallet.i18n("Error procesando la recarga, intentelo luego"))),$("#walletPayoutModalFooter").html(`
          \n
          \n
          `)},success:e=>{e.success?($("#walletPayoutModal .modal-content").removeClass("bg-dark").addClass("bg-success"), $("#walletPayoutModalBody").html(window.wallet.lottieWithMessage("SUCCESS",window.wallet.i18n("La recarga fue instruida correctamente, en breve se reflejará en tu tarjeta")+`.
          ${e.reference??"----"}`)),$("#walletPayoutModalFooter").html(`
          \n
          \n
          `),window.wallet.load()):($("#walletPayoutModalBody").html(window.wallet.lottieWithMessage("CANCELLED",window.wallet.i18n(e.error))), $("#walletPayoutModalFooter").html(`
          \n
          \n
          `))}})}),(()=>!1))},onTransferAmountInput:e=>{$("#wallet-transfer-amount-max-overflow").hide();let a=parseFloat($(e).val());a>parseFloat(window.wallet.availableBalance.toFixed(2))?($("#wallet-transfer-amount-max-overflow").show(),setTimeout((()=>$("#wallet-transfer-amount-max-overflow").hide()),3e3)):a<1?$(e).val(1):$(e).val().toString().split(".").length>1&&$(e).val().toString().split(".")[1].length>2&&$(e).val(a.toFixed(2)),$("#wallet-authorize-slider").attr("disabled",!$("#wallet-transfer-amount").is(":valid")||a<=0)},onTransferRecipientSearch:e=>{$(".wallet-transfer-recipient-data").html(""), window.wallet.transferRecipient=null,window.wallet._reactInput(),clearTimeout(window.wallet.recipientLockupTik),window.wallet.recipientLockupTik=setTimeout((()=>{const a=($(e).val()??"").trim().replace(/\s\s+/gi,"").trim();a.length&&($("#wallet-transfer-recipient-loading").html(''),window.wallet.fetchRecipientLockup(a).then((e=>window.wallet.setWalletTransferRecipient(e))).catch((()=>window.wallet._reactInput())))}),100)},setWalletTransferRecipient:e=>{window.wallet.transferRecipient=e,$("#wallet-transfer-recipient-loading").html(''), $("#wallet-transfer-recipient-data").html(`
          \n ${e.transactionalReputation?`
          ${e.name}
          #${e.code??""} | ${e.transactionalReputation??"?"}/5
          `:`
          ${e.name}
          #${e.code??""}
          `} \n
          \n `), $(".wallet-transfer-step1").hide(),$(".wallet-transfer-step2").show()},phoneTopupUI:e=>{$("#walletPayoutModalHeader").html(` \n
          \n
          ${e?window.wallet.i18n(e.label):window.wallet.i18n("Paga servicios")}
          \n
          \n \n `),$("#walletPayoutModalFooter").hide().html(""), $("#walletPayoutModalBody").html(`${window.wallet.loadingHtml(3)}`),$("remex-airtime-billpay").setupAirtimeBillpay({internalAutorization:!1,availableAmount:window.wallet.availableBalance,shortcut:e,onValidation:e=>{$("#walletPayoutModalFooter").hide().html("")},onCheckout:()=>{$("#walletPayoutModalFooter").html(`
          \n
          \n
          \n \n
          \n
          \n
          `).show()},onTermsAccepted:()=>{ $("#walletPayoutModalFooter").html(`
          \n
          \n
          \n ${window.wallet.i18n("AUTORIZAR")}\n \n ${window.wallet.i18n("AUTORIZADO")}\n
          \n
          \n
          `).show()},onCompleted:()=>{$("#walletPayoutModal .modal-content").removeClass("bg-dark").addClass("bg-success"), $("#walletPayoutModalFooter").show().html(`
          \n
          \n \n
          \n
          `).show(),window.wallet.load()},onError:()=>{$("#walletPayoutModal .modal-content").removeClass("bg-dark").addClass("bg-danger"), $("#walletPayoutModalFooter").show().html(`
          \n
          \n \n
          \n
          `).show()},onInitialized:()=>{$("#walletPayoutModal .modal-content").addClass("bg-dark").removeClass("bg-danger").removeClass("bg-success"),$("#walletPayoutModalFooter").hide().html(""),$("#walletPayoutModalBody .loading-container").remove(),$("#remex-airtime-billpay-container").fadeIn(),window.wallet.onBackAction=()=>{window.wallet.onBackAction=()=>$("#walletPayoutModal").modal("hide"),$("#walletPayoutModalFooter").hide().html(""),window.wallet.showTransferChoiceModal()}},onCountryChoiced:a=>{window.wallet.onBackAction=()=>{ e?($("#walletPayoutModal .modal-content").addClass("bg-dark").removeClass("bg-danger").removeClass("bg-success"),window.wallet.phoneTopupUI()):(window.wallet.onBackAction=()=>$("#walletPayoutModal").modal("hide"),$("#walletPayoutModalFooter").hide().html(""),window.wallet.showTransferChoiceModal())}}})},internationalTransferUI:e=>{ $("#walletPayoutModalHeader").html(` \n
          \n
          ${e?window.wallet.i18n(e.label):window.wallet.i18n("Transferencia Internacional")}
          \n
          \n \n `),$("#walletPayoutModalFooter").hide().html(""), $("#walletPayoutModalBody").html(`${window.wallet.loadingHtml(3)}`),$("remex-bank-transfer").setupBankTransfer({internalAutorization:!1,availableAmount:window.wallet.availableBalance,shortcut:e,onValidation:e=>{$("#walletPayoutModalFooter").hide().html("")},onCheckout:()=>{$("#walletPayoutModalFooter").show().html(`
          \n
          \n
          \n \n
          \n
          \n
          `)},onTermsAccepted:()=>{ $("#walletPayoutModalFooter").show().html(`
          \n
          \n
          \n ${window.wallet.i18n("AUTORIZAR")}\n \n ${window.wallet.i18n("AUTORIZADO")}\n
          \n
          \n
          `)},onCompleted:()=>{$("#walletPayoutModal .modal-content").removeClass("bg-dark").addClass("bg-success"), $("#walletPayoutModalFooter").show().html(`
          \n
          \n \n
          \n
          `),window.wallet.load()},onError:()=>{$("#walletPayoutModal .modal-content").removeClass("bg-dark").addClass("bg-danger"), $("#walletPayoutModalFooter").show().html(`
          \n
          \n \n
          \n
          `)},onInitialized:()=>{$("#walletPayoutModal .modal-content").addClass("bg-dark").removeClass("bg-danger").removeClass("bg-success"),$("#walletPayoutModalFooter").hide().html(""),$("#walletPayoutModalBody .loading-container").remove(),$("#remex-bank-transfer-container").fadeIn(),window.wallet.onBackAction=()=>{window.wallet.onBackAction=()=>$("#walletPayoutModal").modal("hide"),$("#walletPayoutModalFooter").hide().html(""),window.wallet.showTransferChoiceModal()}},onCountryChoiced:a=>{window.wallet.onBackAction=()=>{ $("#walletPayoutModal .modal-content").addClass("bg-dark").removeClass("bg-danger").removeClass("bg-success"),e?(window.wallet.onBackAction=()=>$("#walletPayoutModal").modal("hide"),$("#walletPayoutModalFooter").hide().html(""),window.wallet.showTransferChoiceModal()):window.wallet.internationalTransferUI()}}})},authorizeComponent:e=>{if($("#wallet-authorize-slider").val()>=99)$("#wallet-authorize-slider").attr("disabled",!0),$("#wallet-authorize-slider-container").addClass("authorized"),window.wallet.transferProgress=2,$("#recipient-choice-intent-btn").hide(),setTimeout((()=>{$("#wallet-authorize-slider-container").css("margin-bottom","56px"),$("#closeIfNotAutorize").hide(),e()}),500);else{const e=setInterval((()=>{if(!$("#wallet-authorize-slider").length)return clearInterval(e);$("#wallet-authorize-slider").val(Math.max($("#wallet-authorize-slider").val()-10)),0==$("#wallet-authorize-slider").val()&&clearInterval(e)}),24)}},walletTransferUI:()=>{ $("#walletPayoutModalBody").html(window.wallet.loadingHtml(3)),$("#walletPayoutModalFooter").hide().html(""), $("#walletPayoutModalHeader").html(` \n
          \n
          ${window.wallet.i18n("Transfiere a otro Usuario")}
          \n ${window.wallet.i18n("Transferencia instantánea y gratuita")}\n
          \n \n `),window.wallet.onBackAction=()=>{ window.wallet.onBackAction=()=>$("#walletPayoutModal").modal("hide"),$("#walletPayoutModalFooter").hide().html(""),window.wallet.showTransferChoiceModal()},window.wallet._reactInput=()=>$("#wallet-transfer-recipient-loading").html(($("#wallet-transfer-recipient").val()??"").trim().length>4?'':''),window.wallet.fetchWalletRecipients().then((e=>{ $("#walletPayoutModalBody").html(`
          \n
          \n \n ${window.wallet.i18n("Escribe un código de cliente o un celular")}
          ej: +535xxxxxx
          \n
          \n \n
          \n \n \n \n
          \n
          \n
          \n
          \n ${e.length?`
          ${window.wallet.i18n("¿Quién será el receptor?")}
          `:""}\n \n \n `), window.wallet.keyboardPositionListener("#wallet-transfer-recipient"),window.wallet.keyboardPositionListener("#wallet-transfer-amount"),window.wallet.keyboardPositionListener("#wallet-transfer-memo"),$("#walletPayoutModalFooter").show().html(`
          \n \n
          `)})), window.wallet.onBackAction=()=>{window.wallet.onBackAction=()=>$("#walletPayoutModal").modal("hide"),$("#walletPayoutModalFooter").hide().html(""),window.wallet.showTransferChoiceModal()}},srmRransferAuthorize:()=>{if($("#wallet-authorize-slider").val()>=99)$("#wallet-authorize-slider").attr("disabled",!0),$("#wallet-authorize-slider-container").addClass("authorized"),window.wallet.transferProgress=2,$("#recipient-choice-intent-btn").hide(),setTimeout((()=>{const e=parseFloat($("#wallet-transfer-amount").val()),a=$("#wallet-transfer-memo").val()??"";$("#wallet-authorize-slider-container").css("margin-bottom","56px"),$("#closeIfNotAutorize").hide(),window.wallet.doTransfer(e,a,!0).then((e=>{$("#walletPayoutModal .modal-content").removeClass("bg-dark").addClass("bg-success"), $("#walletPayoutModalFooter").show().html(``),$("#walletPayoutModalBody").html(`
          \n \n
          ${window.wallet.i18n("Transacción exitosa")}!
          \n
          `),$("#wallet-card-topup-header-sub").html(`${window.wallet.i18n("Transferencia completada")}. ID: REMTX${e.id}`),window.wallet.loadPayOutRates().then((()=>{}))})).catch((e=>{$("#walletPayoutModal .modal-content").removeClass("bg-dark").addClass("bg-danger"), $("#recipient-choice-intent-btn").show(),$("#walletPayoutModalFooter").show().html(``),$("#walletPayoutModalBody").html(`
          \n
          \n \n
          ${window.wallet.i18n(e.error??"Ha ocurrido un error inesperado, intentelo luego")}.
          \n
          \n
          `),$("#wallet-card-topup-header-sub").html(window.wallet.i18n("Transferencia cancelada")) }))}),500);else{const e=setInterval((()=>{if(!$("#wallet-authorize-slider").length)return clearInterval(e);$("#wallet-authorize-slider").val(Math.max($("#wallet-authorize-slider").val()-10)),0==$("#wallet-authorize-slider").val()&&clearInterval(e)}),24)}},onQuotationValidate:e=>{$("#wallet-card-topup-btn").attr("disabled",!e.success),window.wallet.quotation=e},clabeIssueCheckout:e=>{ const a=`
            \n
          • 1. ${window.wallet.i18n("Entiendo que la suscripción se cobrará en automático aplicando un cargo al primer pago que se reciba cada mes por esta cuenta.")}
          • \n
          • 2. ${window.wallet.i18n("Entiendo que si la cuenta queda en desuso por más de dos meses se desactivará automáticamente y no podré recuperarla.")}
          • \n
          • 3. ${window.wallet.i18n("Entiendo que no podré solicitar un cambio o reembolso después de proceder con el pago.")}
          • \n
          ` ;window.confirmModal(window.wallet.i18n("Estás a punto de pagar 3.00 SRM del saldo de tu Wallet por la suscripcion de una nueva cuenta CLABE de _INSTITUTION_").replace("SRM",window.wallet.coinSimbol).replace("_INSTITUTION_",e)+`.
          ${window.wallet.i18n("Términos y condiciones")}

          ${a}
          ${window.wallet.i18n("Al proceder estarás aceptando los términos y condiciones.")}`,(()=>{$("#waletClabeIssueModal").modal("hide");const a=e=>{$("body").deleteFlashMessages("info"),$("body").createFlashMessage({type:"fail",message:window.wallet.i18n(e??"Ocurrió un error inesperado, inténtalo de nuevo"),closeable:!0,permanent:!1,position:"fixed",location:"bottom-left",duration:5e3})};$("body").createFlashMessage({type:"info", message:`
          ${window.wallet.i18n("Generando CLABE")}
          `,closeable:!1,permanent:!0,position:"fixed",location:"bottom-left"}),$.ajax({type:"POST",url:window.wallet.createApiUrl(`wallet/issue-clabe/${e.replace(/\s/gi,"_")}`),dataType:"json",headers:{"response-include-errors":!0},error:a,success:e=>{$("body").deleteFlashMessages("info"),e.success?(window.wallet.showWalletTopupUI("SPEI",!0),window.wallet.fetchData().then((e=>{$("#wallet-amount").html(`${window.wallet.formatMoney(window.wallet.availableBalance).split(".")[0]}.${window.wallet.formatMoney(window.wallet.availableBalance).split(".")[1]??""} ${window.wallet.coinSimbol}`)}))):a(window.wallet.i18n(e.error))}})}),(()=>!1))},topupCardChoiceUI:()=>{ $("#prepaid-card-topup-quotation").remove(),$("#walletPayoutModalHeader").html(` \n
          \n
          ${window.wallet.i18n("Recarga tu Tarjeta Remesita")}
          \n ${window.wallet.i18n("Seleccione una tarjeta a recargar")}\n
          \n \n `),window.wallet.onBackAction=()=>{ window.wallet.onBackAction=()=>$("#walletPayoutModal").modal("hide"),$("#walletPayoutModalFooter").hide().html(""),window.wallet.showTransferChoiceModal()},$("#walletPayoutModalBody").html(window.wallet.loadingHtml(3)),$("#walletPayoutModalFooter").hide().html(""),window.wallet.fetchData().then((()=>{const e=()=>{window.wallet.onBackAction=()=>$("#walletPayoutModal").modal("hide"),$("#walletPayoutModal .modal-content").removeClass("bg-dark").addClass("bg-danger"),$("#wallet-card-topup-header-sub").remove(),setTimeout((()=>{ $("#walletPayoutModalBody").html(`
          \n
          \n
          \n
          \n \n
          \n
          \n
          ${window.wallet.i18n("Ups, lo sentimos")}
          \n

          ${window.wallet.i18n("El proveedor de servicio de tarjetas prepago se encuentra en mantenimiento, inténtalo luego.")}

          \n
          \n ${window.wallet.i18n("Puedes efectuar compras en linea usando el saldo de tu Wallet por médio de nuestro servicio de Compra Asistida con SRM.")}\n ${window.wallet.i18n("Aprende cómo se hace aquí")}\n
          \n
          \n
          `), $("#walletPayoutModalFooter").show().html(`
          \n
          \n
          `)}),500)};$.ajax({type:"GET",url:"/rest/v1/health-check/prepaidcard-topup",headers:{"response-include-errors":!0},error:e,success:a=>{a.success?$.ajax({type:"GET",url:window.wallet.createApiUrl("cards"),success:e=>{if(window.prepaidCards=e.total>0?e.items:[],window.wallet.currentCard=e.total>0?window.prepaidCards[0]:null, $("#walletPayoutModalBody").html(window.prepaidCards.map(((e,a)=>`
          \n
          \n \n
          \n
          `)).join("")), window.prepaidCards.length){window.wallet.usd2mxn||(window.wallet.usd2mxn=15),window.wallet.toptupCardQuotationUI=e=>{$("#wallet-card-topup-btn").attr("disabled",window.wallet.availableBalance<1);const t=$("#card-topup-extensor").is(":checked");$(".card-item-choice:visible").removeClass("powerup"),t&&$(".card-item-choice:visible").addClass("powerup");const n=t&&(window._prepaidCardExtenderFix??0)>0?{"Tarifa de operación":window.wallet.payOutRates?.PREPAID_CARD?.fix??0,"Tarifa de extensión":window._prepaidCardExtenderFix??3}:{"Tarifa de operación":window.wallet.payOutRates?.PREPAID_CARD?.fix??0},o={"Tarifa de operación _RATE_":(window.wallet.payOutRates?.PREPAID_CARD?.percent??0)/100+(t?window._prepaidCardExtenderPercent??0:0)};$("#prepaid-card-topup-quotation").setupDQ({exchangeRate:window.wallet.usd2mxn,fixedFees:n,percentageFees:o,minSource:t?3:Math.min(1,window.wallet.availableBalance),maxSource:window.wallet.availableBalance, minTarget:Math.min(1,window.wallet.availableBalance)*window.wallet.usd2mxn,maxTarget:Math.min(2e3,window.wallet.availableBalance)*window.wallet.usd2mxn,sourceCurrency:window.wallet.coinSimbol,targetCurrency:"MXN",source:t?Math.max(4,e):e,feeApplyTo:"source",components:["source","details"],i18n:a,detailsCls:"animate bounceIn",sourceCls:"animate bounceIn",styles:window.wallet.getQuotationStyles()}),t&&window.wallet.availableBalance<5&&($("body").createFlashMessage({type:"fail",message:window.wallet.i18n("El balance de la wallet debe ser mayor a _AMOUNT_ _CURENCY_ para poder extender la vida de la tarjeta",{_AMOUNT_:"5.00",_CURENCY_:window.wallet.coinSimbol}),closeable:!0,permanent:!1,position:"fixed",location:"bottom-left",duration:5e3}),setTimeout((()=>$("#card-topup-extensor").click()),10))}, $("#walletPayoutModalBody").append(`
          \n
          \n
          \n 👇
          ${window.wallet.i18n("Aprende sobre la inactividad programada")}\`)"> ${window.wallet.i18n("Enviar recarga extensora")}
          \n
          \n
          \n
          \n \n \n
          \n
          \n
          \n \n \n ${window.wallet.i18n("La tasa cambio está garantizada solo por 5 min")}. \n
          `) ;const a={"Enter _CURRENCY_":window.wallet.i18n("Introduce los _CURRENCY_"),"Source amount on _CURRENCY_":window.wallet.i18n("Monto a retirar de mi Wallet"),"Target amount on _CURRENCY_":window.wallet.i18n("Lo que recibirá tu tarjeta"),"Exchange Rate _RATE_":window.wallet.i18n("Tipo de cambio _RATE_"),"Percentage Fee _RATE_":window.wallet.i18n("Comisión del proveedor _RATE_"),"Fixed Fee":window.wallet.i18n("Tarifa de operación"),"Conversion before taxes":window.wallet.i18n("Conversión antes de impuestos"),"Conversion after taxes":window.wallet.i18n("Conversión después de impuestos"),"Value must be between _MIN_ and _MAX_ _CURRENCY_":window.wallet.i18n("El valor debe estar entre _MIN_ y _MAX_ _CURRENCY_"),"Total commissions":"Costo operacional","View more":"Ver detalle completo","View less":"Ocultar detalle","Total conversion":"Cantidad convertida","Recipient amount":"Lo que recibe la tarjeta","The amount exceed the established limits":"Los datos introducidos no son válidos."} ;document.querySelector("#prepaid-card-topup-quotation").addEventListener("validation",(e=>{window.wallet.onQuotationValidate(e.detail),$("#wallet-card-topup-limit-error").remove(),window.wallet.walletAmountUse=e.detail.sourceValue,e.detail.success?$("#wallet-card-topup-btn").show():$("#wallet-card-topup-btn").hide().before(`
          \n ${window.wallet.i18n("El monto mínimo a recargar es de _MINIMUM_ MXN y máximo _MAXIMUM_ MXN.",{_MINIMUM_:window.wallet.formatMoney(window.wallet.usd2mxn*Math.min(1,window.wallet.availableBalance)),_MAXIMUM_:window.wallet.formatMoney(Math.min(1e3,window.wallet.availableBalance)*window.wallet.usd2mxn)})}\n
          `)})), $("#walletPayoutModalFooter").show().html(`
          \n
          \n
          \n
          `),window.wallet.fetchCurrencyRate("USD","MXN",1).then((e=>{window.wallet.usd2mxn=e.rate, window.wallet.toptupCardQuotationUI(5),$("#wallet-card-topup-exchange-info").html(` ${window.wallet.i18n("Tipo de cambio")} 1 ${window.wallet.coinSimbol}= ${window.wallet.usd2mxn} MXN`)})) }else $("#walletPayoutModalBody").append(`
          ${window.wallet.i18n("¿Aún no tienes una tarjeta Remesita?")}
          \n
          \n \n
          `) }}):e()}})}))},sendTransactionalReview:(e,a)=>{$("#transactionRewviewModalFooter").html('
          ');const t={qualifiedCode:a,comment:$("#wallet_review_comment").val(),rate:$("#walet_rating_value").val(),motive:$("#wallet_review_motive").val()};$.ajax({type:"POST",url:window.wallet.createApiUrl(`wallet/transaction/${e}/review`),data:t,error:()=>{$(btn).attr("disabled",!1),$("#transactionRewviewModal").modal("hide"),window.alertModal("Ups!",window.wallet.i18n("Ha ocurrido un error inesperado, inteéntelo luego."))},success:function(a){if(a.success){$(`#wallet-teansaction-item${e}`).data("allowreview",!1);let a="";for(let e=1;e<=t.rate;e++)a+='';for(let e=t.rate;e<=5;e++)a+='';$(`#review-stars-${e}`).replaceWith(`${a}`), $("#transactionRewviewModalBody").html('
          \n

          ¡Gracias por tu calificación!

          \n

          Con esta simple acción estas contribuyendo a que el ecosistema se haga mas seguro para todos.

          \n
          '),$("#transactionRewviewModalFooter").html(`
          \n
          \n \n
          \n
          `)}else $("#transactionRewviewModal").modal("hide"),window.alertModal("Ups!",window.wallet.i18n(a.error??"Ha ocurrido un error inesperado, inteéntelo luego."))}})}, _buildDarkModal:(e,a,t,n)=>($(`#${e}`).length||($("body").append(``), $(`#${e}`).on("show.bs.modal",(a=>{$("body").css("overflow","hidden"),window.wallet.onBackAction=()=>$(`#${e}`).modal("hide"),"function"==typeof t&&t()})),$(`#${e}`).on("hidden.bs.modal",(e=>{$("body").css("overflow","auto"),"function"==typeof onSonHidehow&&n()}))),$(`#${e}`)),transactionRewviewUI:(e,a,t)=>{window.wallet._buildDarkModal("transactionRewviewModal","lg",(()=>{$("#walletDataModal").modal("hide"),$("#transactionRewviewModalHeader").remove(),window.wallet.onBackAction=()=>$("#transactionRewviewModal").modal("hide")}),(()=>{$("#walletDataModal").modal("show")})).modal("show"),$("#transactionRewviewModalBody").html(`\n
          \n
          \n
          ${window.wallet.i18n("Registra una calificación de confianza para _NAME_!",{_NAME_:a })}
          \n
          \n
          \n
          \n \n \n \n \n \n \n
          \n
          \n
          \n \n
          \n \n
          \n
          \n \n
          \n \n
          \n
          \n
          \n
          \n `), $("#transactionRewviewModalFooter").html(`
          \n
          \n \n
          \n
          \n \n
          \n
          `),$(".star-rating .mdi-star-outline",$("#transactionRewviewModalBody")).click((function(){var e=parseInt($(this).data("rating"))||1;$(".rating-value",$(this).parent()).val(e), $(".mdi-star",$(this).parent()).removeClass("mdi-star").addClass("mdi-star-outline");for(var a=1;a<=e;a++)$(`.mdi[data-rating="${a}"]`,$(this).parent()).removeClass("mdi-star-outline").addClass("mdi-star")})),$(".fa-star-o",$("#transactionRewviewModalBody")).mouseover((function(){$(this).prevAll().andSelf().addClass("hover")})).mouseout((function(){$(this).prevAll().andSelf().removeClass("hover")})),$("#wallet_review_comment").on("change keyup input blur",(()=>{setTimeout((()=>{$("#wallet_review_comment").val($("#wallet_review_comment").val().substring(0,200)),$("#wallet-review-send-btn").attr("disabled",($("#wallet_review_comment").val()??"").length<30)}),100)}))},showWalletMenu:()=>{const e=[];e.push({value:"transactions",label:` ${window.wallet.i18n("MIS TRANSACCIONES")}\n
          ${window.wallet.i18n("Todas las operaciones de tu wallet.")}`}),e.push({value:"limits", label:` ${window.wallet.i18n("MIS LÍMITES")}\n
          ${window.wallet.i18n("Conoce cual es el límite de extraccion para cada servicio.")}`}),window.wallet.freezeBalance>0&&e.push({value:"frozen",label:` ${window.wallet.i18n("SALDO CONGELADO")}\n
          ${window.wallet.i18n("Conoce cómo se manejan las retenciones y saldos congelados.")}`}),e.push({value:"preuathpay",label:` ${window.wallet.i18n("COMERCIOS AUTORIZADOS")}\n
          ${window.wallet.i18n("Administra quien está autorizado a cobrarte.")}`});const a=setInterval((()=>{$("#confirmationModalHeader").is(":visible")&&(clearInterval(a), $("#confirmationModalHeader").append(''))}),100);return window.choiceRowModal(`
          ${window.wallet.i18n("Opciones de la Wallet")}
          TR${window.wallet.address.replace(/-/g,"")}
          `,"",e,!1,(e=>{switch(e){case"transactions":case"limits":window.wallet.showWalletDetails(e);break;case"preuathpay":window.wallet.showPreauthorizationsUI();break;case"frozen": const a=window.wallet.i18n("Hay algunas razones por las que puedes tener balance congelado:"),t=[wallet.i18n("Algunas transacciones de ingreso a tu balance están sujetas a un proceso de revisión. Mientras no se confirmen o verifiquemos que no serán revertidas, el saldo aparecerá retenido o congelado. Posteriormente, será liberado y estará disponible para que puedas utilizarlo."),wallet.i18n("Las operaciones de intercambio P2P hacen que retengamos el saldo de forma temporal hasta que sean confirmadas por ambas partes. Este proceso se denomina arbitraje y garantiza que el intercambio de saldo en el mercado P2P de Remesita se realice de manera organizada y segura."),wallet.i18n("Al utilizar el servicio de compra asistida, es posible que un vendedor en alguna tienda realice un reembolso y cancele tu compra. Este reembolso podría procesarse rápidamente, pero a veces puede demorar más. En esos casos, hasta que el reembolso no se confirme definitivamente, verás un saldo retenido en tu balance."),wallet.i18n("Si has sido uno de los usuarios afectados por la falta de liquidez de nuestro anterior proveedor de tarjetas prepago y aún tienes saldo congelado en tu tarjeta, verás ese saldo retenido en tu balance hasta que Remesita logre liquidártelo de forma gradual. Lo ideal sería que esto no se prolongara, pero dependiendo de la liquidez de la empresa, se irá liberando poco a poco.")] ;window.alertModal("¿Que significa el saldo congelado?",`
          ${a}
            ${t.map((e=>`
          • ${e}
          • `)).join("")}
          `)}}),!1,!1,"",!0)},fetchPreautorizedMerchant:()=>new Promise(((e,a)=>$.ajax({type:"GET",url:window.wallet.createApiUrl("wallet/authorizations"),success:e}))),showPreauthorizationsUI:()=>{window.wallet._buildDarkModal("walletPreauthModal","lg",(()=>{ $("#walletPreauthModalHeader").html(`\n
          ${window.wallet.i18n("COMERCIOS QUE HE AUTORIZADO")}\n
          \n `),$("#walletPreauthModalBody").html(window.wallet.loadingHtml(3)),window.wallet.fetchPreautorizedMerchant().then((e=>{e.length?(moment.locale($("html").attr("lang")??"es"), $("#walletPreauthModalBody").html(`
          \n ${e.map((e=>``)).join("")}
          `), $("#walletPreauthModalBody button").click((function(e){e.preventDefault();const a=$(this).attr("merchant"),t=$(this).attr("aid");$(this).attr("nextpay"),window.choiceRowModal("Modificar autorización!",`¿Qué cambios quieres aplicar a la autorización que has concedido a ${a} para cobrarte desde su plataforma por medio de RemesitaPay©?
          `,[{value:"-1",label:"Este es un comercio confiable, no necesita doble aprobación."},{value:"1",label:"Dejar que me cobre sin doble aprobación solo en el próximo pago."},{value:"3",label:"Dejar que me cobre sin doble aprobación en los próximos 3 pagos."},{value:"5",label:"Dejar que me cobre sin doble aprobación en los próximos 5 pagos."},{value:"10",label:"Dejar que me cobre sin doble aprobación en los próximos 10 pagos."},{value:"0",label:'Quiero derogar la autorización para que deje de cobrarme.'}],!1,(e=>{$("#walletPreauthModal").modal("hide"),$.ajax({type:"POST", url:window.wallet.createApiUrl(`wallet/authorization/${t}/${e}`),success:()=>{$("#walletPreauthModal").modal("show")},error:()=>window.alertModal("Ups!","Ha ocurrido un error, no se han podido aplicar los cambios.",(()=>$("#walletPreauthModal").modal("show")))})}))}))):$("#walletPreauthModalBody").html(`
          \n
          ${window.wallet.i18n("No hay comercios autorizados")}
          \n
          `)})),$("#walletPreauthModalFooter").remove(),window.wallet.adaptativeModalHeigth("#walletPreauthModal","#walletPreauthModalBody")})).modal("show"),$("#walletPreauthModal").modal("show")},pg:1,pgSize:15,pgTotal:0,showWalletDetails:e=>{window.WalletCurrentTab=e??"transactions",$("#walletDataModalFooter").hide(), window.renderWalletTransactios=e=>{$("#wallet-paggination-container").hide(),$("#wallet-transaction-loading-indicator").addClass("mdi-spin mdi-refresh").removeClass("mdi-history"),1==window.wallet.pg&&$("#wallet-last-activity-list").length&&$("#wallet-last-activity-list").html(window.wallet.loadingHtml(Math.round($("#wallet-transactions-container").height()/120)).replace(/dark/g,"")),window.wallet.fetchData().then((a=>{window.wallet.fetchAndPaginateTransactions(window.wallet.pg,window.wallet.pgSize,e).then((e=>{if($("#wallet-transaction-loading-indicator").removeClass("mdi-spin mdi-refresh").addClass("mdi-history"),window.wallet.pgTotal=e.total,e.total){$("#wallet-last-activity-list").html(""),$("#wallet-paggination-container").show();var a=0,t=null;e.items.forEach((e=>{ const n="freezeMoney"==e?.meta?.walletOperation?"FRZ":"CREDIT"==e?.meta?.type||/ADD/.test(e.externalReference)?"CRD":"DBT",o="FRZ"==n?"#b2b2b2":"DBT"==n?"#7e8ed9":"#56c6e6",l="DBT"==n?e?.meta?.targetPicture??null:e?.meta?.sourcePicture??null,i="FRZ"==n?null:"DBT"==n?e?.meta?.targetName??null:e?.meta?.sourceName??null,s="CRD"==n&&"TRANSFER"==e.category&&e.meta?.sourceId&&!e.meta.reviewId,d=e?.meta?.note??"";if(++a<100){var r=!1;moment.locale($("html").attr("lang")??"es"),t!=moment(e.date).format("MMMM D, YYYY")&&(t=moment(e.date).format("MMMM D, YYYY"),r=!0);var c=e.memo.replace(/Orde(n|r):? (\w+)(\s|$)/gi,e.memo.indexOf("n por referido")<0&&!/a\starget/.test(e.memo)?'$2':"",e.memo);/a\starget/.test(c)||(c=c.replace(/(DPRM\d+)/gi,'$1')),/a\starget/.test(c)||(c=c.replace(/(SHPA\d+)/gi,'$1')) ;var w=e.amount.toString().replace(/(\.\d{2})(\d+)/,"$1");let a="";if(parseInt(e.meta.reviewRate??0)>0){for(let t=1;t<=parseInt(e.meta.reviewRate);t++)a+='';for(let t=parseInt(e.meta.reviewRate);t<5;t++)a+=''} $("#wallet-last-activity-list").append(`
          \n ${r?'
          '+t+"
          ":""}\n
          \n
          \n
          \n \n \n
          \n
          \n ${c}${null!=i?`
          ${"DBT"==n?"hacia ":"desde "}${i}`:""}
          ${e.category}
          \n
          \n ${w} ${window.wallet.coinSimbol}
          \n ${d.length?``:""}\n ${s?``:`${a}`}\n
          \n
          \n
          \n
          `), d.length&&$(`#note-${e.id}`).click((()=>window.alertModal("Comentario",`
          ${d}
          `))),$(`#wallet-teansaction-item${e.id}`).click((()=>{const a=(e,a)=>`
          ${e}: ${a}
          ` ;window.alertModal("Detalles de la transacción",`
          \n ${(e.meta.logoURL??e.meta.sourcePicture??"").length?`
          \n
          \n \n ${"TRANSFER"==e.category&&"DEBIT"==e.meta.type&&(e.meta.targetName??"").length?`
          ${e.meta.targetCode}
          `:""}\n ${"TRANSFER"==e.category&&"DEBIT"==e.meta.type&&(e.meta.targetName??"").length?`${e.meta.targetName}`:""}\n\n ${"TRANSFER"==e.category&&"CREDIT"==e.meta.type&&(e.meta.sourceName??"").length?`
          ${e.meta.sourceCode}
          `:""}\n ${"TRANSFER"==e.category&&"CREDIT"==e.meta.type&&(e.meta.sourceName??"").length?`${e.meta.sourceName}`:""}\n\n\n\n ${(e.meta?.merchant??"").length?`

          ${e.meta.merchant}

          `:""}\n ${(e.meta?.website??"").length?`${e.meta.website}`:""} \n
          \n
          `:""}\n ${(e.meta.logoURL??"").length?`
          `:""}\n ${"TRANSFER"==e.category&&"DEBIT"==e.meta.type&&(e.meta.targetPicture??"").length?`
          `:""}\n ${"TRANSFER"==e.category&&"CREDIT"==e.meta.type&&(e.meta.sourcePicture??"").length?`
          `:""}\n\n \n ${a("ID",e.externalReference)}\n ${a("FECHA",e.date)}\n ${a("ESTATUS",e.meta.status)}\n ${a("TIPO","FRZ"==n?"RETENTION":e.meta.type)}\n ${a("MONTO",w)}\n ${a("CATEGORIA",e.category)} \n ${!e.meta.headerURL&&(e.meta?.merchant??"").length?a("COMERCIO",e.meta.merchant):""}\n ${!e.meta.headerURL&&(e.meta?.website??"").length?a("WEB",e.meta.website):""} \n
          ${c}
          ${"DEBIT"==e.meta.type&&"PAYMENT"==e.category&&(e.meta.fee??0)>0&&"payer"==e.meta.fee_assumed_by?`${e.meta.fee_concept}. (${e.meta.fee} SRM)`:""}
          \n
          `) }))}}))}else 1==window.wallet.pg&&$("#wallet-paggination-container").hide(),$("#wallet-last-activity-list").html(`
          \n
          ${1==window.wallet.pg?window.wallet.i18n("No hay transacciones para mostrar"):window.wallet.i18n("No hay transacciones en esta página")}
          \n
          `)}));const t=`${window.wallet.formatMoney(window.wallet.availableBalance).split(".")[0]}.${window.wallet.formatMoney(window.wallet.availableBalance).split(".")[1]??""} ${window.wallet.coinSimbol}` ;t!=$("#wallet-balance").html()&&$("#wallet-balance").html(t),t!=$("#wallet-amount").html()&&$("#wallet-amount").html(t),$("#wallet-balance-frozen").html(`${window.wallet.formatMoney(window.wallet.freezeBalance)} SRM ${window.wallet.i18n("Congelado")}`),window.wallet.freezeBalance?$("#wallet-balance-frozen").show():$("#wallet-balance-frozen").hide(),window.wallet.loadLastActivity()})),setTimeout((()=>$('[data-toggle="tooltip"]').tooltip()),1e3)},window.renderLimits=()=>{""==$("#wallet-limits").html().trim()&&$("#wallet-limits").html(window.wallet.loadingHtml(Math.round($("#wallet-limits-container").height()/120)).replace(/dark/g,"")),window.wallet.loadPayOutRates().then((async e=>{ $("#wallet-limits").html(`
          \n
          \n
          \n La cantidad de SRM que puedes gastar depende del tipo de servicio y de tu nivel como cliente.
          Tu nivel actual es ${window.auth.user.level.name}.
          \n
          `);const a=new IntersectionObserver(((a,t)=>{a.forEach((async a=>{if(a.isIntersecting){const n=a.target,o=$(n).data("sku") ;let l=await window.wallet.loadPayOutRatesInsights(o),i=-1==e[o].maxDay?0:Math.min(100,100*l.dayAmountUsage/e[o].maxDay),s=-1==e[o].maxMonth?0:Math.min(100,100*l.monthAmountUsage/e[o].maxMonth) ;$(`#${o}limit-container`).html(`
          \n Límite por operación ${e[o].minAmount>0?"entre "+window.wallet.formatMoney(e[o].minAmount??0)+" SRM y ":"hasta "} ${window.wallet.formatMoney(-1==e[o].maxAmount?1e4:e[o].maxAmount)} SRM.\n
          \n
          \n
          \n ${-1==e[o].maxDay?` ∞ ${window.wallet.i18n("restantes")}${window.wallet.i18n("Sin límite diario")}`:`${Math.max(0,e[o].maxDay-l.dayAmountUsage).toFixed(2)} ${window.wallet.i18n("SRM restantes")}${window.wallet.formatMoney(e[o].maxDay??0)} ${window.wallet.i18n("SRM/día")}`}\n
          \n
          \n
          \n
          \n
          \n
          \n
          \n ${-1==e[o].maxMonth?` ∞ ${window.wallet.i18n("restantes")}${window.wallet.i18n("Sin límite diario")}`:`${Math.max(0,e[o].maxMonth-l.monthAmountUsage).toFixed(2)} ${window.wallet.i18n("SRM restantes")}${window.wallet.formatMoney(e[o].maxMonth??0)} ${window.wallet.i18n("SRM/mes")}`} \n
          \n
          \n
          \n
          \n
          \n
          =e[o].maxOrderDay-1||-1!=e[o].maxOrderMonth&&l.monthOrderUsage>=e[o].maxOrderMonth-1?'style="display:none"':""}>\n ${window.wallet.i18n("Otros límites")}\n
          \n
          =e[o].maxOrderDay-1||-1!=e[o].maxOrderMonth&&l.monthOrderUsage>=e[o].maxOrderMonth-1?"":'style="display:none"'}>\n
          \n ${window.wallet.i18n("Operaciones simultaneas")}: ${e[o].simultaneousOrders}\n
          \n
          \n ${window.wallet.i18n("Operaciones al día")}: ${l.dayOrderUsage}/${Math.max(l.dayOrderUsage,e[o].maxOrderDay)}\n
          \n
          \n ${window.wallet.i18n("Operaciones al mes")}: ${l.monthOrderUsage}/${Math.max(l.monthOrderUsage,e[o].maxOrderMonth)}\n
          \n
          `), t.unobserve(n)}}))}),{root:null,rootMargin:"0px",threshold:.1}) ;for(var t in e)e[t].enabled&&($("#wallet-limits").append(`
          \n
          \n
          ${e[t].label}\n ${(e[t].limitDescription??"").length?``:""}\n
          \n ${null!=e[t].subLabel&&""!=e[t].subLabel?` ${e[t].subLabel}`:""}\n
          \n ${window.wallet.loadingHtml(1).replace(/dark/g,"")}\n
          \n
          \n
          `), $(`#btn-limit-${t}`).length&&(e[t].limitDescription??"").length&&($(`#btn-limit-${t}`).data("limit_description",e[t].limitDescription),$(`#btn-limit-${t}`).data("lavel",e[t].label),$(`#btn-limit-${t}`).click((e=>{e.preventDefault();const a="BUTTON"==e.target.tagName.toUpperCase()?e.target:$(e.target).parent();window.alertModal(`${window.wallet.i18n("¿Cómo funcionan los límites del servicio _SERVICE_?",{_SERVICE_:$(a).data("lavel")})}`,`
          ${$(a).data("limit_description")}
          `)}))),a.observe(document.querySelector(`#${t}limit-container`)))}))},window.wallet._buildDarkModal("walletDataModal","lg",(()=>{$("#walletDataModalFooter").hide(), $("#walletDataModalHeader").html(`\n
          ${window.wallet.i18n("MI BILLETERA REMESITA")}\n
          \n `), $("#walletDataModalBody").html(` \n
          \n \n \n
          \n
          \n
          Historial de operaciones \n
          \n \n \n
          \n
          \n
          \n ${window.wallet.loadingHtml(Math.round($("#wallet-transactions-container").height()/120)).replace(/dark/g,"")}\n
          \n
          \n
          \n
          \n
          `), window.wallet.adaptativeModalHeigth("#walletDataModal","#walletDataModalBody"),setTimeout((()=>{"transactions"==window.WalletCurrentTab?$("#walletDataModalTabTansactionsBtn").click():$("#walletDataModalTabLimitsBtn").click()}),500)})).modal("show"),$("#walletDataModal").modal("show")},keyboardPositionListener:e=>{const a=document.querySelector(e);a&&(a.addEventListener("focus",(e=>{setTimeout((()=>{const a=e.target.getBoundingClientRect();window.scrollTo({top:a.top+window.pageYOffset-20,behavior:"smooth"})}),300)})),a.addEventListener("blur",(()=>{setTimeout((()=>{window.scrollTo({top:0,behavior:"smooth"})}),300)})))},refresh:()=>window.wallet.load(!0),load:e=>{const a=$(`#${$("#walletjs").attr("wrapperid")}`).length?$(`#${$("#walletjs").attr("wrapperid")}`):$("body"),t=()=>window.wallet.fetchData().then((e=>{if(window.auth.user.walletEnabled){$("#gift-redime").hide() ;const t="font-size: 30px !important;line-height: 0;padding: 0 !important;width: 68px;height: 68px;border: 1px solid #005f7540 !important;border-radius: 50%;",n="btn text-white border btn-lg mb-1 p-0 bg-info btn-circle shadow-sm no-select",o="font-size: 12px !important;",l="flex: 0 0 auto; width: 100px;text-align: center;";$("#wallet-section").addClass("v1"), $("#wallet-balance-container").length||$(a).html(`\n
          \n

          \n ${window.wallet.formatMoney(e.availableBalance).split(".")[0]}.${window.wallet.formatMoney(e.availableBalance).split(".")[1]??""} ${window.wallet.coinSimbol}\n ... \n

          \n \n
          \n
          \n
          \n \n
          ${window.wallet.i18n("AGREGAR FONDOS")}
          \n
          \n
          \n \n
          ${window.wallet.i18n("ENVIAR / EXTRAER")}
          \n
          \n \x3c!--
          \n \n
          ${window.wallet.i18n("COBRA CON LINK DE PAGO")}
          \n
          --\x3e\n
          \n \n
          ${window.wallet.i18n("INTERCAMBIO AVALADO")} (P2P)
          \n
          \n
          \n \n
          ${window.wallet.i18n("COMPRA ASISTIDA")}
          \n
          \n
          \n \n
          ${window.wallet.i18n("COMUNIDAD TELEGRAM")}
          \n
          \n
          \n \n
          ${window.wallet.i18n("TASAS DE CAMBIO")}
          \n
          \n
          \n
          \n
          \n \n `), $("#pay-and-request-container").length&&$("#pay-and-request-container").hide();const i=new IntersectionObserver(((e,a)=>{e.forEach((async e=>{if(e.isIntersecting){const a=e.target.getAttribute("fn");window.wallet[a]()}}))}),{root:null,rootMargin:"0px",threshold:.1});i.observe(document.querySelector("#wallet-payment-approval-container")),i.observe(document.querySelector("#wallet-last-activity-container"));const s=()=>{$("#telegram-join-btn-container").is(":visible")&&window.wallet.loadTelegramCommunityStatus().then((e=>{"kicked"==e.status?$("#telegram-kicked").show():$("#telegram-kicked").hide(), $("#telegram-join-btn-container button").off("click").on("click","not_joined"==e.status?window.wallet.joinTelegramCommunityIntent:"kicked"==e.status?()=>window.alertModal("Ups!","Lamentamos informarte que has sido excluido de nuestra comunidad de Telegram debido a una actividad que infringe nuestras normas comunitarias. La decisión fue tomada automáticamente por nuestro sistema de moderación y es definitiva"):()=>window.confirmModal("Ya eres un miembro activo de nuestra comunidad en Telegram. Esperamos que disfrutes de todos nuestros beneficios. Te pedimos que revises y cumplas nuestras normas comunitarias para mantener una interacción positiva. Recuerda que nuestro sistema de moderación automático supervisa el cumplimiento de estas directrices.",(()=>{window.open("https://t.me/c/1889885738/1/78527","_blank")}),null,!1,"Abrir Telegram","Cerrar"))}))};setTimeout(s,1e3),document.addEventListener("visibilitychange",(()=>{ document.hidden||($("#wallet-last-activity-container").is(":visible")&&window.wallet.loadLastActivity(),$("#wallet-payment-approval-container").is(":visible")&&window.wallet.loadApprovalAwait(),s())}))}const t=`${window.wallet.formatMoney(window.wallet.availableBalance).split(".")[0]}.${window.wallet.formatMoney(window.wallet.availableBalance).split(".")[1]??""} ${window.wallet.coinSimbol}`;t!=$("#wallet-balance").html()&&$("#wallet-balance").html(t),t!=$("#wallet-amount").html()&&$("#wallet-amount").html(t),$("#wallet-balance-frozen").html(`${window.wallet.formatMoney(window.wallet.freezeBalance)} SRM ${window.wallet.i18n("Congelado")}`),window.wallet.freezeBalance?$("#wallet-balance-frozen").show():$("#wallet-balance-frozen").hide(),window.wallet.address=e.address,window.wallet.loadPayOutRates(!0).then((e=>{})), window.wallet.loadPayInRates(!0).then((e=>{})),window.wallet.realtimeSuscriberInit(),window.wallet.navHandlerInit(),window.addEventListener("shpaInitFromExtension",(e=>{window.wallet.shpaEventTik&&clearTimeout(window.wallet.shpaEventTik),window.wallet.shpaEventTik=setTimeout((()=>window.wallet.shoppingAssistanceUI({...e.detail,importFromBrowserExtension:!0})),100)})),window.wallet.ready=!0}));e?t():(window.wallet.visibilityObserver||(window.wallet.visibilityObserver=new IntersectionObserver(((e,a)=>{e.forEach((async e=>{e.isIntersecting&&(t(),window.wallet.visibilityObserver.unobserve(e.target))}))}),{root:null,rootMargin:"0px",threshold:.1})),window.wallet.visibilityObserver.observe(a[0]))},p2pUI:()=>{if(!window.auth.user.totp&&window.auth.showTOTPForceDialog)return window.auth.showTOTPForceDialog(window.wallet.i18n("Es obligatorio tener configurado la capa de seguridad con doble factor para poder operar con tu wallet Remesita"));window.wallet._buildDarkModal("p2pModal","lg",(()=>{ $("#walletDataModal").modal("hide"),$("#p2pModal .modal-dialog").removeClass("modal-fullscreen"),$("#p2pModalHeader").html(`\n
          \n ${window.wallet.i18n("Intercambio Avalado (P2P)")} \n
          \n `),$("#p2pModalBody").html(`\n
          \n
          ${window.wallet.i18n("Preguntas frecuentes sobre el Intercambio Avalado P2P")}
          \n
          \n ${[{question:window.wallet.i18n("¿Que es intercambio Avalado P2P?"), answer:`

          ${window.wallet.i18n("Normalmente, en Remesita, dos usuarios pueden traspasarse saldo de forma gratuita y directa entre wallets. Aunque esta funcionalidad es muy utilizada, no es seguro intercambiar saldo para comprar o vender bienes o servicios con personas desconocidas, ya que frecuentemente pueden ocurrir estafas de diversos tipos.")}

          \n

          ${window.wallet.i18n("Por ello, Remesita ha lanzado un mercado de SRM donde puedes comprar o vender tu saldo de manera segura. En lugar de realizar transacciones directas entre dos personas, Remesita actúa como intermediario, arbitrando la transacción y ofreciendo al comprador un mecanismo de verificación que avala al vendedor. Esto te permite tomar decisiones informadas basadas en nuestro sistema de recomendación, reduciendo así el riesgo de enfrentar posibles estafas.")}

          `},{question:window.wallet.i18n("Cómo funciona al proceso de adbitraje?"), answer:`

          ${window.wallet.i18n("El arbitraje es el mecanismo mediante el cual la plataforma congela los fondos del vendedor, dejándolo sin acceso a los mismos hasta que la transacción sea confirmada. Quien confirmará la operación es el propio vendedor, certificando que ha recibido el pago o valor externo por el cual está intercambiando su saldo.")}

          \n

          ${window.wallet.i18n("Además, para operar en el intercambio avalado, todos los usuarios deben verificar su identidad con un documento que tenga legitimidad internacional. Esta barrera de entrada asegura que dentro de la plataforma exista un cierto índice de seguridad embebida, aumentando la confianza entre los usuarios y reduciendo el riesgo de fraudes.")}

          \n

          ${window.wallet.i18n("Si el vendedor no confirma su operación, no podrá continuar operando en la plataforma, lo que lo coloca en una posición de urgencia. Es decir, si tiene un trato abierto, no podrá abrir más tratos ni extraer sus fondos, ya que están siendo custodiados por la plataforma.")}

          \n

          ${window.wallet.i18n("Una vez que el vendedor confirma que ha recibido el pago externo, los fondos son liberados y transferidos a la cartera digital del comprador.")}

          \n

          ${window.wallet.i18n("Además de este mecanismo, el arbitraje incluye la resolución de disputas entre dos usuarios. En caso de conflicto, la plataforma solicita información adicional, como estados de cuenta, realiza un análisis profundo de la información y, si es necesario, lleva a cabo llamadas telefónicas para encontrar evidencia que permita emitir un fallo a favor del usuario que actúa conforme a las políticas establecidas.")}

          \n

          ${window.wallet.i18n("Por otro lado, se implementa una política robusta con reglas claras para asegurar que las operaciones se cierren en el menor tiempo posible, ofreciendo incentivos a los verificadores oportunos y amonestando a los morosos.")}

          ` },{question:window.wallet.i18n("¿Hay algun límite para operar?"),answer:window.wallet.i18n("Sí, los límites están determinados por el nivel de cliente, un mecanismo que Remesita ha implementado para otorgar mayores libertades a los usuarios que superan un umbral de riesgo precalculado en base a sus datos, su actividad operativa y sus reseñas. De esta manera, los usuarios con una mayor calificación tendrán límites operativos más altos a medida que la plataforma recopila información que le permite evaluar y calificar al usuario de manera más precisa.")},{question:window.wallet.i18n("Terminologías"), answer:`
            \n
          • ${window.wallet.i18n("P2P (Peer-to-Peer)")}: ${window.wallet.i18n("Modelo de transacción directa entre dos usuarios sin intermediarios. En Remesita, las transferencias de saldo P2P permiten a los usuarios enviar y recibir fondos directamente entre sus wallets de forma gratuita.")}
          • \n
          • ${window.wallet.i18n("Intercambio Avalado")}: ${window.wallet.i18n("Es el espacio dentro de Remesita donde los usuarios pueden comprar o vender su saldo de manera segura. Este mercado está respaldado por mecanismos de arbitraje que garantizan transacciones confiables.")}
          • \n
          • ${window.wallet.i18n("Peer")}: ${window.wallet.i18n('"Peer" se traduce como "par" en inglés. En el contexto de P2P (peer-to-peer), hace referencia a cada uno de los participantes en una operación, ya sea como vendedor o comprador de saldo. Es decir, en una transacción P2P, ambos peers interactúan directamente entre sí para intercambiar fondos sin la intermediación de una entidad central.')}
          • \n
          • ${window.wallet.i18n("Arbitraje")}: ${window.wallet.i18n("Mecanismo de seguridad que congela los fondos del vendedor durante una transacción hasta que ésta sea confirmada. Remesita actúa como intermediario, verificando que el vendedor haya recibido el pago externo antes de liberar los fondos al comprador.")}
          • \n
          • ${window.wallet.i18n("Saldo en Custodia o Congelado")}: ${window.wallet.i18n("Estado al que pasa la porción del balance del vendedor comprometida en un tratocon el fin de mantener y proteger los fondos de los usuarios durante el proceso de arbitraje, asegurando que no sean accesibles hasta que se cumplan las condiciones de la transacción.")}
          • \n
          • ${window.wallet.i18n("Seguridad Embebida")}: ${window.wallet.i18n("Nivel de seguridad integrado en la plataforma desde su diseño, incluyendo la verificación de identidad, arbitraje y políticas de operación que protegen a los usuarios contra fraudes y estafas.")}
          • \n
          • ${window.wallet.i18n("Reputación")}: ${window.wallet.i18n("Evaluación basada en las reseñas y el historial de transacciones de un usuario. Una buena reputación aumenta la confianza entre los usuarios y puede influir en los límites de operación asignados.")}
          • \n
          • ${window.wallet.i18n("Morosos")}: ${window.wallet.i18n("Usuarios que no cumplen con sus obligaciones de confirmación en una transacción. La plataforma aplica amonestaciones a los morosos para mantener la eficiencia y seguridad en las operaciones.")}
          • \n
          • ${window.wallet.i18n("Anuncio")}: ${window.wallet.i18n("Un anuncio es una oferta o contraoferta de venta o compra que se publica en la plataforma con el fin de que otro usuario, es decir, la contraparte, se aplique a la misma. Al hacerlo, se genera un trato entre las partes involucradas.")}
          • \n
          • ${window.wallet.i18n("Trato")}: ${window.wallet.i18n("Un trato es el acuerdo que se crea al aplicar a un anuncio o oferta previamente publicada. En el trato se establecen las condiciones y términos para cerrar el negocio. Un trato tiene una ventana de tiempo que debe cumplirse para que sea válido; de no ser confirmado por el vendedor y el comprador dentro de este plazo, será calificado como fallido y pasará a un proceso riguroso de arbitraje.")}
          • \n
          • ${window.wallet.i18n("KPIs (Indicadores Clave de Desempeño)")}: ${window.wallet.i18n("Los KPIs, o Key Performance Indicators en inglés, son indicadores que permiten tomar decisiones informadas. En Remesita, los KPIs son las métricas que ayudan a compradores y vendedores a decidir con quién realizar un trato.")}
          • \n
          • ${window.wallet.i18n("Longevidad")}: ${window.wallet.i18n("Tiempo que el usuario lleva en la plataforma.")}
          • \n
          • ${window.wallet.i18n("Tratos Cerrados")}: ${window.wallet.i18n("Número total de transacciones exitosas realizadas.")}
          • \n
          • ${window.wallet.i18n("Ventana de Tiempo")}: ${window.wallet.i18n("Tiempo desde que inicia hasta que es confirmado un trato.")}
          • \n
          • ${window.wallet.i18n("Reputación Transaccional")}: ${window.wallet.i18n("Evaluación basada en reseñas y desempeño.")}
          • \n
          • ${window.wallet.i18n("Tasa de Cambio Del Peer")}: ${window.wallet.i18n("Es el valor fijado por el vendedor o comprador en el anuncio, es una conficion ya preestablecida para la creacion de un trato.")}
          • \n
          • ${window.wallet.i18n("Insignias de Verificación")}: ${window.wallet.i18n("Distintivos que certifican la verificación y confiabilidad del usuario.")}
          • \n
          • ${window.wallet.i18n("La Voz del Contraparte")}: ${window.wallet.i18n("Texto generado con inteligencia artificial que resume la lista de reseñas del usuario, ofreciendo una visión general de la opinión de otros usuarios con los que han cerrado trato.")}
          • \n
          ` }].map(((e,a)=>`
          \n
          \n
          \n \n
          \n
          \n\n
          \n
          \n ${e.answer}\n
          \n
          \n
          `)).join("")}\n \x3c!----\x3e\n
          \n
          \n `), $("#p2pFaqsCheckbox").change((()=>{$("#p2pFaqsCheckbox").is(":checked")?localStorage.setItem("p2pFaqsCheckbox","true"):localStorage.removeItem("p2pFaqsCheckbox")})),localStorage.getItem("p2pFaqsCheckbox")?window.wallet.renderP2PComponent("#p2pModalBody"):$("#p2pModalFooter").show().html(`\n
          \n
          \n \n
          \n
          `)})).modal("show")},renderP2PComponent:(e,a)=>{ if("dev"!=document.querySelector('meta[name="app-env"]')?.getAttribute("content"))return $(e).html('
          \n
          ¡Aún estamos colocando ladrillos.
          Nos econtramos trabajando en el desarrollo de esta funcionalidad para ofrecerte una experiencia aún mejor en nuestra plataforma! Agradecemos enormemente tu paciencia y confianza mientras perfeccionamos cada detalle.
          ');const t="_"+Math.random().toString(36).substr(2,9);$(e).html(`
          `),$(`#${t}`).setupP2P({contanerClass:"p2p-container",onInitialized:()=>{$("#p2pModal .modal-dialog").addClass("modal-fullscreen"),$("#p2pModalFooter").hide()},overrideStyles:{}})},shoppingAssistanceUI:e=>{ if(!window.auth.user.totp&&window.auth.showTOTPForceDialog)return window.auth.showTOTPForceDialog(window.wallet.i18n("Es obligatorio tener configurado la capa de seguridad con doble factor para poder operar con tu wallet Remesita"));window.wallet._buildDarkModal("shoppingAssistanceModal","lg",(()=>{$("#walletDataModal").modal("hide"),$("#shoppingAssistanceModalHeader").html(`\n
          \n ${window.wallet.i18n("Compra asistida")} \n
          \n `), $("#shoppingAssistanceModalBody").html(`\n
          \n
          ${window.wallet.i18n("Deja que realicemos la compra por ti en: _SHOPS_",{_SHOPS_:'
          Amazon,Shein,Temu o Aliexpress.'})}
          \n
          \n ${window.wallet.i18n("Si no eres un comprador experimentado o estás cansado de enfrentar problemas al comprar debido a tu ubicación, conectividad, uso de VPN o la aceptación de tu método de pago, este servicio es para ti.")} \n
          \n
          \n
          ${window.wallet.i18n("Preguntas frecuentes sobre el Asistente Digital de Compras")}
          \n
          \n ${[{ question:window.wallet.i18n("¿Nececito tener una tarjeta Remesita?"),answer:window.wallet.i18n("No es necesario tener una tarjeta remesita prepagada para comprar por medio del asistente digital.")},{question:window.wallet.i18n("¿Puedo pagar con mi Saldo Wallet?"),answer:window.wallet.i18n("Por supuesto, ese es el valor de este servicio, podrás pagar con tu saldo Wallet.")},{question:window.wallet.i18n("¿En qué tiendas puedo comprar?"),answer:window.wallet.i18n("Estamos trabajando con Amazon, Shein, Temu y AliExpress y en el futuro iremos incorporando otras plataformas.")},{question:window.wallet.i18n("¿Que pasa si el vendedor rechaza la compra y devuelve los fondos?"),answer:window.wallet.i18n("Si esto ocurre, recibirás el reembolso directamente en tu Wallet, incluso antes de que los fondos regresen a la cuenta de la empresa. Así tendrás dinero disponible de inmediato, sin tener que esperar ni lidiar con procesos de aclaración con la tienda o vendedor.")},{ question:window.wallet.i18n("¿Podré aplicar cupones de descuento?"),answer:window.wallet.i18n("Si deseas aplicar un cupón, indícalo en las instrucciones del pedido. El cupón se aplicará al momento del pago, y cualquier descuento se reflejará en tu balance tras la confirmación de la compra. Ten en cuenta que la validez puede variar según los artículos.")},{question:window.wallet.i18n("¿Podré beneficiarme de programas de lealtad?"),answer:window.wallet.i18n("Los beneficios y programas de lealtad de las tiendas no se aplican cuando compras a través del asistente digital. Si una tienda ofrece algún beneficio, este se aplicará a nuestra cuenta empresarial y no a tu cuenta personal. Por ejemplo, en Temu, si el precio de un producto baja dentro de los 7 días posteriores a tu compra, el reembolso no estará disponible para ti.")},{question:window.wallet.i18n("¿Qué beneficios tiene este servicio?"), answer:`
            \n
          • ${window.wallet.i18n("Puedes pagar con el saldo de tu Wallet")}
          • \n
          • ${window.wallet.i18n("No necesitas tener cuenta de PayPal o cualquier otro metodo de pago.")}
          • \n
          • ${window.wallet.i18n("Las cancelaciones o reembolsos de compra van a parar tu Wallet sin contratiempos.")}
          • \n
          • ${window.wallet.i18n("Mejores tiempos de entrega.")}
          • \n
          • ${window.wallet.i18n("Tus compras llegan directo a tu casillero WeShipyou.")}
          • \n
          • ${window.wallet.i18n("No tendrás que hacer verificaciones de titularidad ante la tienda.")}
          • \n
          • ${window.wallet.i18n("Un comprador experimentado hará el análisis de riesgos para evitar comprar a un vendedor fraudulento o de mala reputación.")}
          • \n
          ` }].map(((e,a)=>`
          \n
          \n
          \n \n
          \n
          \n\n
          \n
          \n ${e.answer}\n
          \n
          \n
          `)).join("")}\n \n
          \n
          \n `), $("#shoppingAssistanceFaqsCheckbox").change((()=>{$("#shoppingAssistanceFaqsCheckbox").is(":checked")?localStorage.setItem("shoppingAssistanceFaqsCheckbox","true"):localStorage.removeItem("shoppingAssistanceFaqsCheckbox")})),localStorage.getItem("shoppingAssistanceFaqsCheckbox")?window.wallet.renderShoppingAssistance("#shoppingAssistanceModalBody",e??null):$("#shoppingAssistanceModalFooter").show().html(`\n
          \n
          \n \n
          \n
          `)})).modal("show"),void 0!==e&&window.wallet.renderShoppingAssistance("#shoppingAssistanceModalBody",e)}, renderShoppingAssistance:(e,a)=>{const t="_"+Math.random().toString(36).substr(2,9);$(e).html(``),$(`#${t}`).setupSHPA({contanerClass:"text-white p-2",startData:a??null,importFromBrowserExtension:a?.importFromBrowserExtension??!1,onStep:(e,a)=>{switch(e){case"start":case"paid":break;case"start_recipient_capture":const e=window.wallet.onBackAction;window.wallet.onBackAction=()=>{document.querySelector(`#${t}`).prev(),window.wallet.onBackAction=()=>e};break;case"shop_choiced":$("#shoppingAssistanceModalFooter").hide(),window.wallet.onBackAction=()=>{window.wallet.renderShoppingAssistance("#shoppingAssistanceModalBody"),$("#shoppingAssistanceModalFooter").show(), $("#shoppingAssistanceModalHeader").html(`\n
          ${window.wallet.i18n("Compra asistida")}
          \n `),window.wallet.onBackAction=()=>$("#shoppingAssistanceModal").modal("hide")}}},styles:{".shpa-item-label":{color:"#fff"},".shpa-item-container":{padding:"8px",border:"1px solid #43b6d7","border-radius":"5px","box-shadow":"#6da8b9 0px 0px 5px"},".shap-item-input":{border:"1px solid #43b6d7","background-color":"#133740 !important"},".shopping-assistance-container input":{color:"#fff"},".shopping-assistance-container select":{color:"#fff"},".shopping-assistance-container input::placeholder":{color:"#ccc"},".comerce-btn":{ color:"#fff !important","background-color":"#014c5d"},".shpa-item-instructions":{background:"#0000000d",color:"white"},".shpa-item-url-help":{color:"#ffb4b4"},".shpa-item-url-help":{color:"#ffffff",background:"#000000",padding:"10px",border:"1px solid #cccccc","margin-top":" -2px","border-bottom-left-radius":"6px","border-bottom-right-radius":"6px"}}}),document.querySelector(`#${t}`).addEventListener("paid",(e=>window.wallet.fetchData().then((e=>{const a=`${window.wallet.formatMoney(window.wallet.availableBalance).split(".")[0]}.${window.wallet.formatMoney(window.wallet.availableBalance).split(".")[1]??""} ${window.wallet.coinSimbol}`;a!=$("#wallet-balance").html()&&$("#wallet-balance").html(a),a!=$("#wallet-amount").html()&&$("#wallet-amount").html(a), $("#wallet-balance-frozen").html(`${window.wallet.formatMoney(window.wallet.freezeBalance)} SRM ${window.wallet.i18n("Congelado")}`),window.wallet.freezeBalance?$("#wallet-balance-frozen").show():$("#wallet-balance-frozen").hide()}))))},joinTelegramCommunityIntent:()=>{ $("#communityTelegramJoinModal").length||($("body").append(``), $("#communityTelegramJoinModal").on("hidden.bs.modal",(e=>{$("body").css("overflow","auto")})),$("#communityTelegramJoinModal").on("show.bs.modal",(e=>{$("body").css("overflow","hidden"),window.wallet.onBackAction=()=>$("#communityTelegramJoinModal").modal("hide")}))),$("#communityTelegramJoinModal").modal("show")},exchangeChartUI:()=>{ $("#exchaneRateChartModal").length||($("body").append(``), $("#exchaneRateChartModal").on("hidden.bs.modal",(e=>{$("body").css("overflow","auto")})),$("#exchaneRateChartModal").on("show.bs.modal",(e=>{$("body").css("overflow","hidden"),window.wallet.onBackAction=()=>$("#exchaneRateChartModal").modal("hide")}))),$("#exchaneRateChartModal").modal("show"),window.wallet._echangeCalculatorTo=e=>{$($("#exchanger-container").length?"#exchanger-container":"#exchaneRateChartModalBody").html(window.wallet.loadingHtml(3)),window.wallet.fetchCurrencyRate("USD",e,1).then((a=>{ $("#exchaneRateChartModalBody").html(`
          \n ${["MXN","USD","EUR","BTC","USDT","CAD"].map((a=>``)).join("")}
          \n
          \n \n \n
          El SRM (Saldo Remesita) tiene paridad con el USD (Dolar)
          `),$("#exchanger").setupDQ({exchangeRate:a.rate,fixedFees:null,percentageFees:null,minSource:0, maxSource:1e7,minTarget:0,maxTarget:1e7,sourceCurrency:"SRM",targetCurrency:e,source:1,feeApplyTo:"target",components:["source","target"],i18n:{"Enter _CURRENCY_":window.wallet.i18n("Introduce los _CURRENCY_"),"Source amount on _CURRENCY_":window.wallet.i18n("Monto en _CURRENCY_",{_CURRENCY_:"SRM"}),"Target amount on _CURRENCY_":window.wallet.i18n("Monto en _CURRENCY_",{_CURRENCY_:e}),"Exchange Rate _RATE_":window.wallet.i18n("Exchange Rate _CURRENCY_",{_CURRENCY_:e}),"Percentage Fee _RATE_":window.wallet.i18n("Comisión Remesita _RATE_"),"Total conversion":"Cantidad convertida","Recipient amount":"Cantidad convertida"},detailsCls:"animate bounceIn",styles:window.wallet.getQuotationStyles()})}))},window.wallet._echangeCalculatorTo("MXN")},loadApprovalAwait:()=>{const e=$("#wallet-payment-approval-container");e.length&&window.wallet.fetchPaymentApprovalAwait().then((a=>{a.length?(window.wallet.lastApproval=a[0], $(`#approval-container-${window.wallet.lastApproval.id}`).length||(e.html(`
          \n

          Tienes ${a.length} ${a.length>1?"autorizaciones":"autorización"} de pago ${a.length>1?"pendientes":"pendiente"}.

          \n \n
          `),$("button",e).click((()=>{const e=e=>$.ajax({type:"POST",url:`/authorization/${window.wallet.lastApproval.id}/${e}`,success:a=>{window.alertModal(a.success?"approve"==e?"Pago Autorizado":"Pago denegado":"Ups!",a.message),window.wallet.loadApprovalAwait()}}) ;window.confirmModal(`
          ${window.wallet.lastApproval.message}
          `,(()=>e("approve")),(()=>e("deny")))})),e.fadeIn())):e.html().length&&e.html("")}))},loadLastActivity:()=>{$("#wallet-last-activity-container").length&&window.wallet.fetchAndPaginateTransactions(1,2).then((e=>{if(window.wallet.pgTotal=e.total,e.total&&!$(`#lastactivitytransaction${e.items[0].id}`).length){const t=[`
          ${window.wallet.i18n("Actividad reciente")}
          `];var a=0;e.items.forEach((e=>{const n="freezeMoney"==e?.meta?.walletOperation?"FRZ":"CREDIT"==e?.meta?.type||/ADD/.test(e.externalReference)?"CRD":"DBT",o="FRZ"==n?"#b2b2b2":"DBT"==n?"#7e8ed9":"#56c6e6",l="DBT"==n?e?.meta?.targetPicture??null:e?.meta?.sourcePicture??null,i="FRZ"==n?null:"DBT"==n?e?.meta?.targetName??null:e?.meta?.sourceName??null;if(++a<100){moment.locale($("html").attr("lang")??"es") ;var s=e.memo.replace(/Orde(n|r):? (\w+)(\s|$)/gi,e.memo.indexOf("n por referido")<0&&!/a\starget/.test(e.memo)?'$2':"",e.memo);/a\starget/.test(s)||(s=s.replace(/(DPRM\d+)/gi,'$1')),/a\starget/.test(s)||(s=s.replace(/(SHPA\d+)/gi,'$1'));var d=e.amount.toString().replace(/(\.\d{2})(\d+)/,"$1");let a="";if(parseInt(e.meta.reviewRate??0)>0){for(let t=1;t<=parseInt(e.meta.reviewRate);t++)a+='';for(let t=parseInt(e.meta.reviewRate);t<5;t++)a+=''} t.push(`
          \n
          \n
          \n
          \n \n \n
          \n
          \n ${s}${null!=i?`
          ${"DBT"==n?"hacia ":"desde "}${i}`:""}
          ${e.category}
          \n
          \n ${d} ${window.wallet.coinSimbol}
          \n
          \n
          \n
          \n
          `), setTimeout((()=>{$(`#lastactivitytransaction${e.id}`).click((()=>{const a=(e,a)=>`
          ${e}: ${a}
          ` ;window.alertModal("Detalles de la transacción",`
          \n ${(e.meta.logoURL??e.meta.sourcePicture??"").length?`
          \n
          \n \n ${"TRANSFER"==e.category&&"DEBIT"==e.meta.type&&(e.meta.targetName??"").length?`
          ${e.meta.targetCode}
          `:""}\n ${"TRANSFER"==e.category&&"DEBIT"==e.meta.type&&(e.meta.targetName??"").length?`${e.meta.targetName}`:""}\n\n ${"TRANSFER"==e.category&&"CREDIT"==e.meta.type&&(e.meta.sourceName??"").length?`
          ${e.meta.sourceCode}
          `:""}\n ${"TRANSFER"==e.category&&"CREDIT"==e.meta.type&&(e.meta.sourceName??"").length?`${e.meta.sourceName}`:""}\n\n ${(e.meta?.merchant??"").length?`

          ${e.meta.merchant}

          `:""}\n ${(e.meta?.website??"").length?`${e.meta.website}`:""} \n
          \n
          `:""}\n ${(e.meta.logoURL??"").length?`
          `:""}\n ${"TRANSFER"==e.category&&"DEBIT"==e.meta.type&&(e.meta.targetPicture??"").length?`
          `:""}\n ${"TRANSFER"==e.category&&"CREDIT"==e.meta.type&&(e.meta.sourcePicture??"").length?`
          `:""}\n\n \n ${a("ID",e.externalReference)}\n ${a("FECHA",e.date)}\n ${a("ESTATUS",e.meta.status)}\n ${a("TIPO","FRZ"==n?"FREEZE":e.meta.type)}\n ${a("MONTO",d)}\n ${a("CATEGORIA",e.category)} \n ${!e.meta.headerURL&&(e.meta?.merchant??"").length?a("COMERCIO",e.meta.merchant):""}\n ${!e.meta.headerURL&&(e.meta?.website??"").length?a("WEB",e.meta.website):""} \n
          ${s}
          ${"DEBIT"==e.meta.type&&"PAYMENT"==e.category&&(e.meta.fee??0)>0&&"payer"==e.meta.fee_assumed_by?`${e.meta.fee_concept}. (${e.meta.fee} SRM)`:""}
          \n
          `) }))}),100)}})),$("#wallet-last-activity-container").html(t.join(""))}}))},realtimeSuscriberInit:()=>{setTimeout((()=>{if(void 0!==window.DeepstreamClient){if(void 0===window.realtime){const{DeepstreamClient:e}=window.DeepstreamClient;window.realtime={client:new e("dev"==$('meta[name="app-env"]').attr("content")?"wss://dev.remesita.com/deepstream":"wss://remesita.com/deepstream"),login:()=>new Promise(((e,a)=>{"OPEN"==window.realtime.client.getConnectionState()?e(!0):window.realtime.client.login({uid:window.auth.user.id},(t=>t?e(!0):a(!1)))}))}}window.realtime.login().then((()=>{const e=$('meta[name="app-env"]').attr("content"),a=`${e}/wallet/${window.wallet.address}`;window.wallet._dsRecord||(window.wallet._dsRecord=window.realtime.client.record.getRecord(a),window.wallet._dsRecord.subscribe("balance",(e=>{window.wallet.availableBalance=Math.min(e.availableBalance,e.totalBalance),window.wallet.freezeBalance=e?.freezeBalance??window.wallet.freezeBalance, window.wallet.totalBalance=e?.totalBalance??window.wallet.totalBalance;const a=`${window.wallet.formatMoney(window.wallet.availableBalance).split(".")[0]}.${window.wallet.formatMoney(window.wallet.availableBalance).split(".")[1]??""} ${window.wallet.coinSimbol}`;a!=$("#wallet-balance").html()&&$("#wallet-balance").html(a),a!=$("#wallet-amount").html()&&$("#wallet-amount").html(a),$("#wallet-balance-frozen").html(`${window.wallet.formatMoney(window.wallet.freezeBalance)} SRM ${window.wallet.i18n("Congelado")}`),window.wallet.freezeBalance?$("#wallet-balance-frozen").show():$("#wallet-balance-frozen").hide(),window.wallet.loadLastActivity()}))),window.wallet._paymentApprovalSuscribed||(window.realtime.client.event.subscribe(`${e}_payment_approval_await_${window.wallet.address}`,(e=>{ window.auth.isConnected()&&(window.confirmModal(`
          ${e.message}
          `,(()=>$.ajax({type:"POST",url:`/authorization/${e.id}/approve`,success:e=>{window.alertModal(e.success?"Aprobado":"Ups!",e.message),window.wallet.loadApprovalAwait()}})),(()=>$.ajax({type:"POST",url:`/authorization/${e.id}/deny`,success:e=>{window.alertModal(e.success?"Pago denegado":"Ups!",e.message),window.wallet.loadApprovalAwait()}}))),window.wallet.loadApprovalAwait())})),window.wallet._paymentApprovalSuscribed=!0)}))}}),10)},navHandlerInit:()=>{let e=0;history.replaceState({index:e},""),window.addEventListener("popstate",(function(a){const t=a.state?a.state.index:0;te&&window.wallet&&"function"==typeof window.wallet.onForwardAction&&window.wallet.onForwardAction(),e=t,history.pushState({index:e},"")})),history.pushState({index:++e},"")},onBackAction:()=>{},onForwardAction:function(){}}, void 0===window.waitDefinition&&(window.waitDefinition=e=>new Promise((a=>{const t=setInterval((()=>{void 0!==window[e]&&(clearInterval(t),a())}),250)})));const _inProd="dev"!=document.querySelector('meta[name="app-env"]')?.getAttribute("content"),_ds=_inProd?"":"?dc="+Math.random().toString(36).substr(2,9),cpl=document.querySelector('meta[name="x-cpl"]')?.getAttribute("content")||"1.0.0";var script;"undefined"==typeof md5&&((script=document.createElement("script")).src="/assets/js/md5.min.js",script.async=!0,document.head.appendChild(script)),void 0===$.fn.mask&&((script=document.createElement("script")).src="/assets/js/jquery.mask.min.js+_ds",script.async=!0,document.head.appendChild(script)),"undefined"==typeof QRCode&&((script=document.createElement("script")).src="/assets/js/qrcode.min.js",script.async=!0,document.head.appendChild(script)), "undefined"==typeof ShoppingAssistance&&((script=document.createElement("script")).src=`/cdn/${cpl}/microfronts/shopping-assistance/index${_inProd?".min":""}.js`,script.async=!0,document.head.appendChild(script)),"undefined"==typeof DynamicQuotation&&((script=document.createElement("script")).src=`/cdn/${cpl}/microfronts/dynamic-quotation/index${_inProd?".min":""}.js`,script.async=!0,document.head.appendChild(script)),"undefined"==typeof RemesitaBankTransfer&&((script=document.createElement("script")).src=`/cdn/${cpl}/microfronts/remex-bank-transfer/index${_inProd?".min":""}.js`,script.async=!0,script.onload=()=>{},document.head.appendChild(script)),"undefined"==typeof RemesitaAirtimeBillpay&&((script=document.createElement("script")).src=`/cdn/${cpl}/microfronts/remex-airtime-billpay/index${_inProd?".min":""}.js`,script.async=!0,script.onload=()=>{},document.head.appendChild(script)), "undefined"==typeof RemesitaP2P&&((script=document.createElement("script")).src=`/cdn/${cpl}/microfronts/remex-p2p/index${_inProd?".min":""}.js`,script.async=!0,script.onload=()=>{},document.head.appendChild(script)),"undefined"==typeof moment&&((script=document.createElement("script")).src="/assets/moment/moment-with-locales.min.js",script.async=!0,document.head.appendChild(script));