admin08077/Githubgemini
0
1const s="555179712981-36hlicm802genhfo9iq1ufnp1n8cikt9.apps.googleusercontent.com";let i=!1;const n=()=>new Promise((e,t)=>{if(window.gapi){window.gapi.load("client",e);return}const o=document.createElement("script");o.src="https://apis.google.com/js/api.js",o.onload=()=>window.gapi.load("client",e),o.onerror=t,document.body.appendChild(o)}),a=async()=>{if(i)return!0;try{await n(),await window.gapi.client.init({apiKey:void 0,clientId:s,discoveryDocs:["https://www.googleapis.com/discovery/v1/apis/gmail/v1/rest","https://docs.googleapis.com/$discovery/rest?version=v1","https://www.googleapis.com/discovery/v1/apis/drive/v3/rest","https://iam.googleapis.com/$discovery/rest?version=v1"]});const e=sessionStorage.getItem("google_access_token");return e?(window.gapi.client.setToken({access_token:e}),i=!0,!0):(console.error("GAPI: Access token not found. User may need to sign in again."),!1)}catch(e){return console.error("GAPI client initialization failed:",e),i=!1,!1}};export{a as e};2//# sourceMappingURL=googleApiService-B4BzT3uR.js.map3 