1import{b as r}from"./chunk-DDHtAA0h.js";const c="https://accounts.google.com/gsi/client",n=400,g="/google/login";let l=!1,t=[];const s=()=>{l=!0,t.forEach(o=>o()),t=[]},a=o=>{l?o():t.push(o)},d=o=>{r(g,"POST",JSON.stringify({userToken:o.credential,userId:"DEFAULT_GOOGLE_ID"}),e=>{e.status==="SUCCESS"?window.location.href=e.redirectUrl:i()},()=>i())},i=o=>{$("#globalMessages .global-error").hide();const e=ACC.messages.googleLoginError+"";$("#external-auth-error").text(e).show()},u=()=>{if($(document).width()>=1200)return n;const o=parseInt($(".login-inner").width(),10);return o<=400?o:n},h=()=>{a(()=>{if(typeof google!="object"){console.error("Cannot initiate google library");return}google.accounts.id.initialize({client_id:ACC.config.googleClientId,callback:d});const o=$("#j-google-login");o.length&&google.accounts.id.renderButton(o[0],{theme:"outline",size:"large",width:u(),text:"continue_with",logo_alignment:"center"})})},f=()=>{$(".j-logout-form").one("submit",o=>{o.preventDefault(),google.accounts.id.disableAutoSelect(),$(o.target).submit()})},p=()=>{const o=document.createElement("script");o.src=c,o.async=!0,o.defer=!0,o.onload=s,document.head.appendChild(o)},m=()=>{if(!ACC.config.googleClientId){$("#j-google-login").remove();return}f(),p(),h()};export{m as init};
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.