(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0cd9f538"],{1712:function(e,t,a){"use strict";a("3306")},"1dfa":function(e,t,a){},3306:function(e,t,a){},3888:function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var i=a("bee2"),n=a("d4ec"),s=a("8f33"),r=a("262e"),c=a("ade3"),o=a("9d56"),l=function(e){function t(){return Object(n["a"])(this,t),Object(s["a"])(this,t,arguments)}return Object(r["a"])(t,e),Object(i["a"])(t)}(o["a"]);Object(c["a"])(l,"resource","/user-meta")},"3f6b":function(e,t,a){"use strict";a("1dfa")},c8cd:function(e,t,a){e.exports=a.p+"img/logo.8c67a5f8.svg"},cdc3:function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e._self._c;return t("b-container",{staticClass:"bg-login full-height",attrs:{id:"content-verification",fluid:""}},[t("b-row",{staticClass:"full-height"},[t("b-col",{staticClass:"left-side d-none d-md-block",class:{heaven:e.isHeaven},attrs:{cols:"12",md:"6"}}),t("b-col",{staticClass:"right-side px-3 d-flex justify-content-center align-item-center",attrs:{cols:"12",md:"6"}},[e.loading?e._e():t("div",{staticClass:"inner-wrapper",attrs:{"data-anima":"right"}},[t("span",{staticClass:"logo mb-5"},[e.isHeaven?t("img",{attrs:{src:a("c8cd")}}):t("img",{attrs:{src:a("cf053")}})]),t("span",[t("div",{attrs:{"data-anima":"top"}},[t("p",{staticClass:"text"},[e._v(" "+e._s(e.$t("views.seller.verification.text1"))+" ")])]),t("b-row",{staticClass:"mt-4"},[t("b-overlay",{staticClass:"btn-acoes",attrs:{show:e.loading,rounded:"",opacity:"0.6","spinner-small":"","spinner-variant":"primary"}},[t("BaseButton",{attrs:{variant:"black"},on:{click:function(t){return e.onSubmit()}}},[e._v(e._s(e.$t("views.seller.verification.send_new_verification_link")))]),t("a",{staticClass:"logout",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.logout.apply(null,arguments)}}},[e._v(e._s(e.$t("views.seller.verification.access_another_account")))])],1)],1),t("b-row",{staticClass:"mt-5"},[t("a",{staticClass:"links-help",attrs:{href:e.isHeaven?"en"===e.$i18n.locale?"https://heaven.me/heaven-privacy-policy/":"es"===e.$i18n.locale?"https://heaven.me/heaven-politica-de-privacidad/":"https://heaven.me/heaven-politica-de-privacidade/":"https://greenn.com.br/politica-de-privacidade-greenn/",target:"_blank"}},[e._v(" "+e._s(e.$t("views.seller.verification.privacy_policy"))+" ")])])],1)]),e.loading?t("div",{staticClass:"py-4 d-flex justify-content-center align-items-center"},[t("b-spinner",{attrs:{variant:"dark",label:"Spinning"}}),t("p",{staticClass:"recupera-senha-text ml-4"},[e._v(e._s(e.$t("views.seller.verification.processing")))])],1):e._e()])],1)],1)},n=[],s=a("c7eb"),r=a("1da1"),c=(a("99af"),a("14d9"),a("fb6a"),a("e9c4"),a("d3b7"),a("ac1f"),a("841c"),a("a78e")),o=a.n(c),l=a("85ab"),u=a("bee2"),d=a("d4ec"),f=a("8f33"),h=a("262e"),p=a("ade3"),v=a("9d56"),g=function(e){function t(){return Object(d["a"])(this,t),Object(f["a"])(this,t,arguments)}return Object(h["a"])(t,e),Object(u["a"])(t)}(v["a"]);Object(p["a"])(g,"resource","/email-verification");var m=a("3888"),b=g.build(),w=m["a"].build(),y={name:"Verificação",data:function(){return{email:"",success:!0,loading:!1,hash:null,interval:null,user:{},userLogged:{}}},mixins:[l["a"]],computed:{isHeaven:function(){return this.$store.getters["getIsHeaven"]}},methods:{getUser:function(){var e=this;this.$store.dispatch("userRequest").then((function(t){e.user=t,e.email=e.user.email}))},logout:function(){this.$store.dispatch("logoutRequest").catch((function(e){}))},onSubmit:function(){var e=this;this.loading=!0;var t={email:this.$store.getters.getProfile.email};b.create(t).then((function(t){t.success&&e.$bvToast.toast(e.$t("views.seller.verification.new_verification_link_sent"),{title:e.$t("views.seller.verification.verification"),variant:"success",autoHideDelay:5e3,appendToast:!0})})).catch((function(e){console.error(e)})).finally((function(){e.loading=!1}))},verificaDados:function(){var e=this;return Object(r["a"])(Object(s["a"])().mark((function t(){return Object(s["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$store.dispatch("userRequest");case 2:e.userLogged=t.sent,e.$store.dispatch("emailVerification",e.userLogged.type).then((function(t){t?e.$router.push("/dashboard".concat(window.location.search)):e.loading=!1})).catch((function(t){console.error(t),e.loading=!1}));case 4:case"end":return t.stop()}}),t)})))()},getHash:function(){var e=this;this.loading=!0;var t={id:this.$route.params.hash};b.update(t).then((function(t){if(e.$store.getters.isAuthenticated)if(t.success)e.$store.state.user=t.user,o.a.set("user",JSON.stringify(t.user),{expires:365}),localStorage.setItem("user",JSON.stringify(t.user)),clearInterval(e.interval),window.location.reload();else{if(e.$store.getters.verifyEmail)return void e.$router.push("/dashboard".concat(window.location.search)).catch();e.verificaDados()}else if(t.success){clearInterval(e.interval);var a="Bearer "+t.access_token;o.a.set("access_token",a,{expires:365}),e.$store.state.auth.access_token=a,e.$store.state.user=t.user,o.a.set("user",JSON.stringify(t.user),{expires:365}),localStorage.setItem("user",JSON.stringify(t.user)),window.location.reload()}})).catch((function(t){console.error(t),e.verificaDados()}))},initVerify:function(){if(this.$route.params.hash)this.getHash();else{if(this.$store.getters.verifyEmail)return void this.$router.push("/dashboard".concat(window.location.search)).catch();this.verificaDados()}},pollData:function(){var e=this;this.interval=setInterval((function(){e.initVerify()}),1e4)},addMeta:function(){var e={meta_key:"onboarding",meta_value:0};w.create(e)},fetchMetas:function(){var e=this;if(this.$store.state.isAuthenticated){var t={id:"onboarding"};w.read(t).then((function(t){"undefined"==typeof t.meta_value&&e.addMeta()}))}},installTags:function(){var e=document.createElement("script");function t(){dataLayer.push(arguments)}e.setAttribute("src","https://www.googletagmanager.com/gtag/js?id=AW-11221195320"),e.async=!0,document.head.appendChild(e),window.dataLayer=window.dataLayer||[],t("js",new Date),t("config","AW-11221195320"),t("event","conversion",{send_to:"AW-11221195320/mkFhCLKXrdoCENjVm78C"});var a=document.createElement("script");a.innerHTML="\n      (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':\n        new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],\n        j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=\n        'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);\n        })(window,document,'script','dataLayer','GTM-TRVTZVCJ');\n      ",document.head.appendChild(a);var i=document.createElement("noscript");i.innerHTML='\n        <iframe src="https://www.googletagmanager.com/ns.html?id=GTM-TRVTZVCJ"\n        height="0" width="0" style="display:none;visibility:hidden"></iframe>\n      ',document.body.prepend(i),function(e,t,a){e.TiktokAnalyticsObject=a;var i=e[a]=e[a]||[];i.methods=["page","track","identify","instances","debug","on","off","once","ready","alias","group","enableCookie","disableCookie"],i.setAndDefer=function(e,t){e[t]=function(){e.push([t].concat(Array.prototype.slice.call(arguments,0)))}};for(var n=0;n<i.methods.length;n++)i.setAndDefer(i,i.methods[n]);i.instance=function(e){for(var t=i._i[e]||[],a=0;a<i.methods.length;a++)i.setAndDefer(t,i.methods[a]);return t},i.load=function(e,t){var n="https://analytics.tiktok.com/i18n/pixel/events.js";i._i=i._i||{},i._i[e]=[],i._i[e]._u=n,i._t=i._t||{},i._t[e]=+new Date,i._o=i._o||{},i._o[e]=t||{};var s=document.createElement("script");s.type="text/javascript",s.async=!0,s.src=n+"?sdkid="+e+"&lib="+a;var r=document.getElementsByTagName("script")[0];r.parentNode.insertBefore(s,r)},i.load("C5O60ULO3VNUQLVLNK00"),i.page()}(window,document,"ttq")}},mounted:function(){this.loading=!0,this.installTags(),this.fetchMetas(),this.initVerify(),this.pollData(),this.getUser();var e=document.getElementById("1WZET722PJibpmL_crisp");if(null===e)window.$crisp=[],this.crispWitUser(),this.appendScriptCrisp();else{var t=document.querySelector(".crisp-client");t.style.display="block",this.crispWitUser(!1)}},created:function(){var e=this;return Object(r["a"])(Object(s["a"])().mark((function t(){return Object(s["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$store.dispatch("userRequest");case 2:e.userLogged=t.sent;case 3:case"end":return t.stop()}}),t)})))()},beforeDestroy:function(){clearInterval(this.interval)}},_=y,j=(a("3f6b"),a("1712"),a("2877")),$=Object(j["a"])(_,i,n,!1,null,"09d4e88f",null);t["default"]=$.exports},cf053:function(e,t,a){e.exports=a.p+"img/logo.6880cf15.png"}}]);
//# sourceMappingURL=chunk-0cd9f538-1d894738.js.map