(window.webpackJsonp=window.webpackJsonp||[]).push([["i3qO"],{"Js+d":function(e,o,t){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.GoogleClient=void 0;o.GoogleClient={GAPI:"GAPI",GSI:"GSI"}},VwrD:function(e,o,t){"use strict";var n=t("TqRt");Object.defineProperty(o,"__esModule",{value:!0}),o.authorizeWithImplicitGrant=async function(e,o){const t=await s(c.GoogleClient.GSI);return new Promise(((n,i)=>{if(o.every((e=>p.includes(e))))return n();t.accounts.oauth2.initTokenClient({client_id:e,scope:o.join(" "),prompt:"",callback:e=>{var o,t;if(p=null!=(o=null==(t=e.scope)?void 0:t.split(" "))?o:[],e&&e.access_token)return n(e);i(new r.KAError("Failed to authorize with Google",r.Errors.Internal))}}).requestAccessToken()}))},o.loadGoogleClient=o.initCodeClient=void 0;var r=t("4PhQ"),i=function(e,o){if(!o&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u(o);if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=r?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(n,i,l):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(t("whzC")),l=n(t("cZZQ")),c=t("Js+d");function u(e){if("function"!=typeof WeakMap)return null;var o=new WeakMap,t=new WeakMap;return(u=function(e){return e?t:o})(e)}const a={GAPI:{script:i.safeLinkTo("https://apis.google.com/js/api:client.js"),module:"gapi"},GSI:{script:i.safeLinkTo("https://accounts.google.com/gsi/client"),module:"google"}};const s=(e=c.GoogleClient.GAPI)=>{const o=function(e){return e===c.GoogleClient.GAPI?a.GAPI:a.GSI}(e);return window[o.module]?Promise.resolve(window[o.module]):new Promise(((e,t)=>{var n;const r=document.createElement("script");r.src=o.script,r.onload=()=>{e(window[o.module])},r.onerror=e=>{t(e)},null==(n=document.body)||n.appendChild(r)}))};o.loadGoogleClient=s;let p=[];o.initCodeClient=(e,o=(()=>{}))=>s(c.GoogleClient.GSI).then((t=>t.accounts.oauth2.initCodeClient({client_id:"124072386181-eogtmmv0qose5ovudl946d83miv1ia89.apps.googleusercontent.com",scope:"openid email profile",prompt:"",callback:e,error_callback:e=>{const t=function(e){switch(e){case"popup_closed":return l.default.popupClosed;case"popup_failed_to_open":return l.default.popupBlocked;default:return l.default.unknownError}}(e.type);o(t)}}))).catch((e=>{throw new r.KAError(`Failed to load Google Auth API: ${e}`,r.Errors.Internal)}))}}]);
//# sourceMappingURL=../../sourcemaps/en/i3qO.ee3fc0d0e945ec934bbb.js.map