PageSourceSearch

https://www.eucatur.com.br/assets/Logout-QNPp9z_3.js

js eucatur.com.br collected 2026-10-02 13:11:29 UTC 10,722 bytes, 1 lines download raw bytes

1import{aF as m,P as _,cW as g,as as u,at as l,au as f,q as r,t as p,cX as d,cY as h,cZ as i}from"./index-BMwF3ZB-.js";const y={data(){return{merchant_id:"301545",api_url:"https://api.nethone.io/v1/events",api_user_name:"eucatur_intgr-WQIS22",api_password:"IGaqX2sbcYMush9wtgPluBuzpKYyjzWIQogbtbcn3FTtCYsnu8ykkJPIVEQJ5fTMrjrrA2zy9R"}},methods:{async sendEventToMangoPay(e){const s=btoa(`${this.api_user_name}:${this.api_password}`);try{const t=await fetch(this.api_url,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Basic ${s}`},body:JSON.stringify(e)});console.log(`Evento ${e.type} enviado com sucesso para MangoPay!`,t.data)}catch(t){console.error(`Erro ao enviar evento para MangoPay ${e.type}:`,t.response?.data||t?.message||t)}},setEventRegisterMangoPay(){const e=this.person?.addresses?.length?this.person?.addresses[0]:{},s={event_type:"register",timestamp:new Date().toISOString(),user_id:this.person.id,user_reference:this.person.id,profiling_reference:"48h",data:{user_reference:this.person.id,name:this.person.name,phone_number:this.person.phone,email:this.person.mail,gender:this.person.gender,country:e?.country,city:e?.city,neighbourhood:e?.neighborhood,postal_code:e?.zip_code,street:e?.address,document_type:this.person.cpf?"cpf":"rg",date_of_birth:this.person.birth_date,document_number:this.person.cpf?this.person.cpf:this.person.rg}};this.sendEventToMangoPay(s)},setEventLoginMangoPay(){const e=this.person?.addresses?.length?this.person?.addresses[0]:{},s={event_type:"login",timestamp:new Date().toISOString(),user_id:this.person.id,user_reference:this.person.id,profiling_reference:"48h",data:{user_reference:this.person.id,name:this.person.name,phone_number:this.person.phone,email:this.person.mail,gender:this.person.gender,country:e?.country,city:e?.city,neighbourhood:e?.neighborhood,postal_code:e?.zip_code,street:e?.address,document_type:this.person.cpf?"cpf":"rg",date_of_birth:this.person.birth_date,document_number:this.person.cpf?this.person.cpf:this.person.rg}};this.sendEventToMangoPay(s)},setEventLogoutMangoPay(){if(!this.person.id)return;const e=_.getItem(g),s={type:"logout",timestamp:new Date().toISOString(),user_reference:String(this.person.id),profiling_reference:e,data:{document_type:this.person.cpf?"cpf":"rg",document_number:this.person.cpf?this.person.cpf:this.person.rg}};this.sendEventToMangoPay(s)},setEventPasswordChangeRequestedMangoPay(){const e=this.person?.addresses?.length?this.person?.addresses[0]:{},s={event_type:"password_change_requested",timestamp:new Date().toISOString(),user_id:this.person.id,user_reference:this.person.id,profiling_reference:"48h",data:{user_reference:this.person.id,name:this.person.name,phone_number:this.person.phone,email:this.person.mail,gender:this.person.gender,country:e?.country,city:e?.city,neighbourhood:e?.neighborhood,postal_code:e?.zip_code,street:e?.address,document_type:this.person.cpf?"cpf":"rg",date_of_birth:this.person.birth_date,document_number:this.person.cpf?this.person.cpf:this.person.rg}};this.sendEventToMangoPay(s)},setEventPasswordChangedMangoPay(){const e=this.person?.addresses?.length?this.person?.addresses[0]:{},s={event_type:"password_changed",timestamp:new Date().toISOString(),user_id:this.person.id,user_reference:this.person.id,profiling_reference:"48h",data:{user_reference:this.person.id,name:this.person.name,phone_number:this.person.phone,email:this.person.mail,gender:this.person.gender,country:e?.country,city:e?.city,neighbourhood:e?.neighborhood,postal_code:e?.zip_code,street:e?.address,document_type:this.person.cpf?"cpf":"rg",date_of_birth:this.person.birth_date,document_number:this.person.cpf?this.person.cpf:this.person.rg}};this.sendEventToMangoPay(s)},setEventCancelledAccountMangoPay(){const e=this.person?.addresses?.length?this.person?.addresses[0]:{},s={event_type:"cancelled_account",timestamp:new Date().toISOString(),user_id:this.person.id,user_reference:this.person.id,profiling_reference:"48h",data:{user_reference:this.person.id,name:this.person.name,phone_number:this.person.phone,email:this.person.mail,gender:this.person.gender,country:e?.country,city:e?.city,neighbourhood:e?.neighborhood,postal_code:e?.zip_code,street:e?.address,document_type:this.person.cpf?"cpf":"rg",date_of_birth:this.person.birth_date,document_number:this.person.cpf?this.person.cpf:this.person.rg}};this.sendEventToMangoPay(s)},setEventChangeSettingsOfNotificationStatusMangoPay(){const e=this.person?.addresses?.length?this.person?.addresses[0]:{},s={event_type:"change_settings_of_notification_status",timestamp:new Date().toISOString(),user_id:this.person.id,user_reference:this.person.id,profiling_reference:"48h",data:{user_reference:this.person.id,name:this.person.name,phone_number:this.person.phone,email:this.person.mail,gender:this.person.gender,country:e?.country,city:e?.city,neighbourhood:e?.neighborhood,postal_code:e?.zip_code,street:e?.address,document_type:this.person.cpf?"cpf":"rg",date_of_birth:this.person.birth_date,document_number:this.person.cpf?this.person.cpf:this.person.rg}};this.sendEventToMangoPay(s)},setEventDeliveryAddressChangedMangoPay(){const e=this.person?.addresses?.length?this.person?.addresses[0]:{},s={event_type:"delivery_address_changed",timestamp:new Date().toISOString(),user_id:this.person.id,user_reference:this.person.id,profiling_reference:"48h",data:{user_reference:this.person.id,name:this.person.name,phone_number:this.person.phone,email:this.person.mail,gender:this.person.gender,country:e?.country,city:e?.city,neighbourhood:e?.neighborhood,postal_code:e?.zip_code,street:e?.address,document_type:this.person.cpf?"cpf":"rg",date_of_birth:this.person.birth_date,document_number:this.person.cpf?this.person.cpf:this.person.rg}};this.sendEventToMangoPay(s)},setEventEmailChangeMangoPay(){const e=this.person?.addresses?.length?this.person?.addresses[0]:{},s={event_type:"email_change",timestamp:new Date().toISOString(),user_id:this.person.id,user_reference:this.person.id,profiling_reference:"48h",data:{user_reference:this.person.id,name:this.person.name,phone_number:this.person.phone,email:this.person.mail,gender:this.person.gender,country:e?.country,city:e?.city,neighbourhood:e?.neighborhood,postal_code:e?.zip_code,street:e?.address,document_type:this.person.cpf?"cpf":"rg",date_of_birth:this.person.birth_date,document_number:this.person.cpf?this.person.cpf:this.person.rg}};this.sendEventToMangoPay(s)},setEventPhoneNumberChangedMangoPay(){const e=this.person?.addresses?.length?this.person?.addresses[0]:{},s={event_type:"phone_number_changed",timestamp:new Date().toISOString(),user_id:this.person.id,user_reference:this.person.id,profiling_reference:"48h",data:{user_reference:this.person.id,name:this.person.name,phone_number:this.person.phone,email:this.person.mail,gender:this.person.gender,country:e?.country,city:e?.city,neighbourhood:e?.neighborhood,postal_code:e?.zip_code,street:e?.address,document_type:this.person.cpf?"cpf":"rg",date_of_birth:this.person.birth_date,document_number:this.person.cpf?this.person.cpf:this.person.rg}};this.sendEventToMangoPay(s)},setEventSearchMangoPay(){const e={event_type:"search",timestamp:new Date().toISOString(),user_id:this.person.id,user_reference:this.person.id,profiling_reference:"48h",data:{}};this.sendEventToMangoPay(e)},setEventItemAddedToCartMangoPay(){const e={event_type:"item_added_to_cart",timestamp:new Date().toISOString(),user_id:this.person.id,user_reference:this.person.id,profiling_reference:"48h",data:{}};this.sendEventToMangoPay(e)},setEventItemRemovedFromCartMangoPay(){const e={event_type:"item_removed_from_cart",timestamp:new Date().toISOString(),user_id:this.person.id,user_reference:this.person.id,profiling_reference:"48h",data:{}};this.sendEventToMangoPay(e)},setEventOrderCancelledMangoPay(){const e={event_type:"order_cancelled",timestamp:new Date().toISOString(),user_id:this.person.id,user_reference:this.person.id,profiling_reference:"48h",data:{}};this.sendEventToMangoPay(e)},setEventOrderCreatedMangoPay(){const e={event_type:"order_created",timestamp:new Date().toISOString(),user_id:this.person.id,user_reference:this.person.id,profiling_reference:"48h",data:{}};this.sendEventToMangoPay(e)},setEventOrderRequestedMangoPay(){const e={event_type:"order_requested",timestamp:new Date().toISOString(),user_id:this.person.id,user_reference:this.person.id,profiling_reference:"48h",data:{}};this.sendEventToMangoPay(e)}},computed:{...m("person",{person:"person"})}},b={name:"LogoutPag",mixins:[y],mounted(){this.$store.commit("person/setPerson",null),this.$store.commit("person/setToken",null),this.$store.commit("person/setTokenSite",null),this.$store.dispatch("sale/clearSales"),this.$store.dispatch("seatUpgrade/clearUpgrades"),this.$store.dispatch("cart/clearCouponDiscount"),this.$store.dispatch("cart/clearCredits"),this.$store.commit("sale/setInstallment",null),this.$store.dispatch("cart/clearAppointments"),this.$store.commit("cart/clearServiceCharge"),this.$store.commit("person/clearCreditCard"),this.$store.commit("person/clearAddress"),this.$store.commit("person/setHasPersonLogged",!1),this.$store.commit("benefits/clearBenefits"),this.$store.commit("person/clearPassengers"),r.remove(p),r.remove(d),r.remove(h),window.firebase&&window.firebase.auth().signOut(),this.logout(),r.remove(i),this.$router.push("/")},methods:{logout(){const e=r.getItem(i);if(!e)return;const s="https://sso.eumais.com.br/auth/realms/eumais_account/protocol/openid-connect/logout",t={client_id:"account-eucatur",client_secret:"51835861-275b-4ea6-ab27-5cf467014777",refresh_token:e};let n=[];for(let o in t){const a=encodeURIComponent(o),c=encodeURIComponent(t[o]);n.push(a+"="+c)}n=n.join("&"),fetch(s,{method:"POST",body:n,headers:{Accept:"*/*","Content-type":"application/x-www-form-urlencoded"}}).catch(o=>console.log("err",o))},prepareToLogoute(){this.$store.commit("person/setPerson",null),this.$store.commit("person/setToken",null),this.$store.commit("person/setTokenSite",null),this.$store.dispatch("sale/clearSales"),this.$store.dispatch("cart/clearCouponDiscount"),this.$store.dispatch("cart/clearCredits"),this.$store.commit("sale/setInstallment",null),this.$store.dispatch("cart/clearAppointments"),this.$store.commit("cart/clearServiceCharge"),this.$store.commit("person/clearCreditCard"),this.$store.commit("person/clearAddress"),this.$store.commit("person/setHasPersonLogged",!1),this.$store.commit("benefits/clearBenefits"),this.$store.commit("person/clearPassengers"),r.remove(p),r.remove(d),r.remove(h),window.firebase&&window.firebase.auth().signOut(),r.remove(i),this.$router.push("/")}}};function v(e,s,t,n,o,a){return f(),l("div")}const S=u(b,[["render",v]]);export{S as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.