(function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};return b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{enumerable:!0,get:d})},b.r=function(a){'undefined'!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:'Module'}),Object.defineProperty(a,'__esModule',{value:!0})},b.t=function(a,c){if(1&c&&(a=b(a)),8&c)return a;if(4&c&&'object'==typeof a&&a&&a.__esModule)return a;var d=Object.create(null);if(b.r(d),Object.defineProperty(d,'default',{enumerable:!0,value:a}),2&c&&'string'!=typeof a)for(var e in a)b.d(d,e,function(b){return a[b]}.bind(null,e));return d},b.n=function(a){var c=a&&a.__esModule?function(){return a['default']}:function(){return a};return b.d(c,'a',c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p='public',b(b.s=375)})({375:function(){function a(a){a.onclick=function(){c.requestAccessToken()}}function b(a){var b=$('#btngoogle').data('tipo-validacao-social');$.ajax({url:'index.php?route=account/login/socialLogin',type:'post',data:{origemLogin:'google',tokenloginsocial:a.access_token,tipo_validacao_social:b},dataType:'json',success:function(a){'vincular'==b?a.warning_login_vinculado?notificationMsg(a.warning_login_vinculado,'warning'):a.login_vinculado?($('.divgoogleconnect').addClass('hidden'),$('.divgoogledisconnect').removeClass('hidden'),notificationMsg($('#btngoogle').data('text-google-vinculado'),'success')):($('.divgoogleconnect').removeClass('hidden'),$('.divgoogledisconnect').addClass('hidden'),notificationMsg($('#btngoogle').data('text-google-desvinculado'),'success')):a.login?-1==window.location.href.indexOf('route=checkout/checkout')?document.formlogin.submit():location.reload():(notificationMsg(a.warning,'warning'),$('input[name=\'email\']').val(a.emailRedeSocial),$('input[name=\'firstname\']').val(a.primeiroNomeRedeSocial),$('input[name=\'lastname\']').val(a.sobrenomeRedeSocial))}})}var c;window.loadGoogleLogin=function(){c=google.accounts.oauth2.initTokenClient({client_id:$('#btngoogle').data('google-id'),scope:'openid profile email',callback:b}),a(document.getElementById('btngoogle'))},window.googleUnlink=function(){$.ajax({url:'index.php?route=account/account/unlink_social_media_access',type:'post',dataType:'json',data:{ajax:!0,redesocial:'google'}}).done(function(a){a.result?($('.divgoogleconnect').removeClass('hidden'),$('.divgoogledisconnect').addClass('hidden'),notificationMsg($('#btngoogledisconnect').data('text-google-desvinculado'),'success')):(console.log('Ocorreu um problema ao desvincular a conta!'),notificationMsg('Ocorreu um erro ao fazer o desvinculo dos dados do Google!','warning'))}).fail(function(a){console.log('error'),console.log(a)})}}});