1function g(){const e=document.querySelector('meta[name="csrf-token"]');return e?e.content:""}function h(){window.showAuthSpinner&&window.showAuthSpinner()}function p(){window.hideAuthSpinner&&window.hideAuthSpinner()}function t(e="Ðе ÑдалоÑÑ Ð²Ð¾Ð¹Ñи. ÐожалÑйÑÑа, попÑобÑйÑе позже."){p(),typeof Livewire<"u"?(Livewire.dispatch("authFailed"),Livewire.dispatch("showNotification",{message:e,type:"danger"})):alert(e)}function k(e){e.csrf_token&&window.updateCsrfToken&&window.updateCsrfToken(e.csrf_token),window.authSuccess&&window.authSuccess()}async function u(e,n,o,w={}){try{const i=await(await fetch(e,{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-TOKEN":g()},body:JSON.stringify(n)})).json();return i.success?(w.skipSuccessHandler||k(i),{success:!0,result:i}):(t(i.message||o),{success:!1,result:i})}catch(d){return t(o),{success:!1,error:d}}}function s(e,n=""){return window.AppConfig?.[e]??n}function m(e){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e):e()}function S(e,n){document.addEventListener("shown",function(o){o.target.id===e&&setTimeout(n,100)})}let c=null;async function r(e){await u("/member/oauth/google/verify-token",{id_token:e,redirect_url:window.location.href})}async function y(e){const{success:n,result:o}=await u("/member/oauth/google/exchange-code",{code:e},void 0,{skipSuccessHandler:!0});n&&o.id_token&&await r(o.id_token)}function C(e){e.credential?r(e.credential):t()}function l(e){c||(c=google.accounts.oauth2.initCodeClient({client_id:e,scope:"openid email profile",callback:n=>{n.code?y(n.code):t()}}))}function a(){const e=s("googleClientId"),n=s("isAuthenticated",!1);if(!e){console.warn("[GoogleAuth] Client ID not configured");return}if(!window.google||!google.accounts){setTimeout(a,200);return}google.accounts.id.initialize({client_id:e,callback:C,auto_select:!1,cancel_on_tap_outside:!1,itp_support:!0}),n||google.accounts.id.prompt(),l(e)}window.handleCustomGoogleLogin=async function(){if(h(),!c&&typeof window.loadGoogleGsi=="function"){try{await window.loadGoogleGsi()}catch{t();return}const e=s("googleClientId");e&&window.google?.accounts&&l(e)}c?c.requestCode():t()};function f(){m(()=>{if(typeof window.loadGoogleGsi=="function"){window.loadGoogleGsi().then(a).catch(()=>{});return}a()})}f();const _=Object.freeze(Object.defineProperty({__proto__:null,initGoogleAuthModule:f},Symbol.toStringTag,{value:"Module"}));export{t as a,S as b,g as c,k as d,_ as e,s as g,p as h,m as o,u as p,h as s};
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.