PageSourceSearch

https://macros.gg/_build/assets/AssistantFab-DY9f2A26.js

js macros.gg collected 2026-10-02 01:56:48 UTC 3,103 bytes, 1 lines download raw bytes

1import{f as l,o as x,c as t,S as c,g as d,t as h,a as v,i as s,r as S,m as _,e as $}from"./web-DyhNhRah.js";import{x as C}from"./x-gjdzo3Rb.js";import{u as M}from"./AuthProvider-EU7t0KcJ.js";import{k as D}from"./keyboard-RPZaSRTT.js";import{M as E}from"./MomoMark-CS1tyKUz.js";import{u as H}from"./routing-DgxbRIRQ.js";import{A as N}from"./components-CDNoM-i_.js";import"./Icon-DOzbWna9.js";import"./auth-C8FBwjFQ.js";import"./createAsync-KplUdzUp.js";import"./apiFetch-DFvoe_0W.js";import"./preload-helper-ug3pwPZ1.js";var T=h('<span class="relative hidden items-center rounded-2xl border border-base-content/10 bg-base-200 px-3.5 py-2 text-sm font-medium shadow-md lg:flex"><!$><!/><span class="absolute -bottom-[5px] right-5 h-2.5 w-2.5 rotate-45 border-r border-b border-base-content/10 bg-base-200"></span><button type=button class="absolute -top-2 -right-2 flex h-5 w-5 cursor-pointer items-center justify-center rounded-full border border-base-content/10 bg-base-300 opacity-70 shadow hover:opacity-100"aria-label=Dismiss>'),W=h('<span class="btn btn-circle btn-rainbow-glow shadow-none! hover:shadow-none! hover:translate-y-0! border-[3px]! h-14 w-14">');const I=["Hit your protein yet? Ask me!","How's your week going? Ask me!","Weight trending right? Ask me!","Need meal ideas? Ask me!","Craving something? Ask me!","Calories left today? Ask me!","Stuck on your macros? Ask me!","On track today? Ask me!","Best day this week? Ask me!","Need a snack idea? Ask me!","Grocery list help? Ask me!","Want a quick tip? Ask me!"],u={breakfast:["What's for breakfast? Ask me!","Planning your day? Ask me!","How was yesterday? Ask me!"],lunch:["What's for lunch? Ask me!","How's your morning going? Ask me!"],dinner:["What's for dinner? Ask me!","Eating out tonight? Ask me!"],night:["How'd your day go? Ask me!","Late-night snack? Ask me!","Ready for tomorrow? Ask me!"]};function J(){const{user:o}=M(),r=H(),a=()=>{const e=parseInt(new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1,timeZone:o()?.timezone??"UTC"}).format(new Date),10);return e<11?"breakfast":e<15?"lunch":e<21?"dinner":"night"},[b,g]=l(null);x(()=>{const e=[...u[a()],...I];g(e[Math.floor(Math.random()*e.length)]);try{sessionStorage.getItem("momo-cta-dismissed")&&n(!0)}catch{}});const f=()=>b()??u[a()][0],[p,n]=l(!1);function k(e){e.preventDefault(),e.stopPropagation(),n(!0);try{sessionStorage.setItem("momo-cta-dismissed","1")}catch{}}return t(c,{get when(){return _(()=>!!(o()&&r.pathname!=="/assistant"&&r.pathname!=="/you"))()&&!D()},get children(){return t(N,{href:"/assistant",class:"fixed right-6 bottom-[calc(4.75rem+var(--safe-bottom))] lg:bottom-[calc(1.5rem+var(--safe-bottom))] z-40 flex flex-col items-end gap-2.5 transition-transform duration-150 hover:-translate-y-0.5","aria-label":"Ask Momo",get children(){return[t(c,{get when(){return!p()},get children(){var e=d(T),A=e.firstChild,[i,y]=v(A.nextSibling),w=i.nextSibling,m=w.nextSibling;return s(e,f,i,y),m.$$click=k,s(m,t(C,{class:"h-3 w-3"})),S(),e}}),(()=>{var e=d(W);return s(e,t(E,{class:"h-9 w-9"})),e})()]}})}})}$(["click"]);export{J as default};

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.