{"version":3,"file":"Initialize_chat.CFBp3gFl.mjs","names":["createRoot","ChatAssistant"],"sources":["https:/framerusercontent.com/modules/3r5UMwPs1dV9W8mrHNyz/iI4He4N5PGQ6V7nFWWsC/Initialize_chat.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";import{createRoot}from\"react-dom/client\";import{createClient}from\"@supabase/supabase-js\";import ChatAssistant from\"https://framerusercontent.com/modules/5LW1dh5rNisoAJFvrili/nx8HnCF0wKkINuHnsyoG/ChatAssistant.js\";const supabase=createClient(\"https://bukgytxjsomvglxcsphw.supabase.co\",\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImJ1a2d5dHhqc29tdmdseGNzcGh3Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NDU5NDU1NjQsImV4cCI6MjA2MTUyMTU2NH0.-LXzYsE-eDVyYrNnTZT1UKf3fCXTaHEGioiblbrDA7o\");export function GlobalChat(){useEffect(()=>{const renderChatIfLoggedIn=async()=>{const{data:{session}}=await supabase.auth.getSession();const user=session?.user;if(!user)return;// ⛔️ no login - no chat\nif(document.getElementById(\"chat-assistant-container\"))return;const container=document.createElement(\"div\");container.id=\"chat-assistant-container\";container.style.position=\"fixed\";container.style.bottom=\"24px\";container.style.right=\"24px\";container.style.zIndex=\"9999\";container.style.maxWidth=\"600px\";container.style.width=\"90vw\";document.body.appendChild(container);const root=createRoot(container);root.render(/*#__PURE__*/_jsx(ChatAssistant,{}));};renderChatIfLoggedIn();return()=>{const el=document.getElementById(\"chat-assistant-container\");if(el)el.remove();};},[]);return null;}\nexport const __FramerMetadata__ = {\"exports\":{\"GlobalChat\":{\"type\":\"reactComponent\",\"name\":\"GlobalChat\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"+UAAwjB,SAAgB,GAAY,CACtB,OADuB,MAAc,CAAC,IAAM,EAAqB,SAAS,CAAC,GAAK,CAAC,KAAK,CAAC,UAAQ,CAAC,CAAC,MAAM,EAAS,KAAK,aAAmB,EAAK,GAAS,KACptB,GAD4tB,CAAC,GAC1tB,SAAS,eAAe,4BAA4B,OAAO,IAAM,EAAU,SAAS,cAAc,OAAO,EAAU,GAAG,2BAA2B,EAAU,MAAM,SAAS,QAAQ,EAAU,MAAM,OAAO,OAAO,EAAU,MAAM,MAAM,OAAO,EAAU,MAAM,OAAO,OAAO,EAAU,MAAM,SAAS,QAAQ,EAAU,MAAM,MAAM,OAAO,SAAS,KAAK,YAAY,GAAW,IAAM,EAAKA,EAAW,GAAW,EAAK,OAAoB,EAAKC,EAAc,EAAE,EAAI,EAAwB,OAAvB,QAAiC,CAAC,IAAM,EAAG,SAAS,eAAe,4BAA+B,GAAG,EAAG,QAAU,CAAE,EAAC,EAAE,EAAS,IAAM,qCADxS,EAAS,EAAa,2CAA2C"}