PageSourceSearch

https://www.prettylitter.com/_nuxt/useNavbar.b373351c.js

js prettylitter.com collected 2026-10-02 03:55:25 UTC 3,821 bytes, 1 lines download raw bytes

1import{k as o,an as C,i as E,j as O,R as W,A as t,G as y,T as B,a3 as q}from"./entry.4fe30dff.js";import{u as S}from"./useEvent.52f40f70.js";import{i as A}from"./loyaltyConstants.ecbd4bb6.js";const M=()=>{const r=o(0);return S(window,"scroll",l=>{r.value=window.scrollY}),r},Y=C("navbar",{state:()=>({promoButton:"",testValue:"persisted state testing"}),persist:!0}),z=(r,l)=>{let s;return function(){const u=arguments,i=this;s||(r.apply(i,u),s=!0,setTimeout(()=>s=!1,l))}},U=()=>{const r=E(),l=M(),s=O().public,u=Y(),i=W(),v=o(null),n=o(!1),d=o(!1),g=o(null),p=o(!1),f=o(!1),m=o(!1),H=t(()=>i.pdpRedesignActive),T=t(()=>(i.getConvertTest("hp_redesign_may_2026")||"").startsWith("variation")),w=t(()=>i.getConvertTest("home_nav_test")||""),_=t(()=>w.value.startsWith("variation")),a=t(()=>i.getConvertTest("hp_nav_test")||""),P=t(()=>a.value==="variation_1"||a.value==="variation_2"),R=t(()=>a.value==="variation_1"||a.value==="variation_2"),h=t(()=>A(s.store)),I=t(()=>a.value==="variation_2"&&h.value),c=t(()=>{switch(s.store){case"ca":return"https://myaccount.prettylitter.ca";case"mx":return"https://micuenta.prettylitter.com.mx/";default:return s.localizeLanguage=="es-MX"?"https://es.myaccount.prettylitter.com":"https://myaccount.prettylitter.com"}}),L=t(()=>{if(s.store==="mx")return[{id:"reviews",text:"Reviews",href:"/reviews#reviews",classes:"lg:inline-block"},{id:"faq",text:"FAQ",href:"/faq",classes:"lg:inline-block"},{id:"login-mobile",text:"Log In",externalHref:c.value,classes:"lg:hidden"}];{if(H.value||T.value)return[{id:"shop",text:"Shop",href:"/products/one-bag-of-prettylitter",classes:"lg:inline-block"},{id:"how-it-works",text:"How it Works",href:"/how-prettylitter-works",classes:"lg:inline-block"},{id:"our-story",text:"Our Story",href:"/about-us",classes:"lg:inline-block"},{id:"reviews",text:"Reviews",href:"/reviews",classes:"lg:inline-block"},...h.value?[{id:"vip-purrks",text:"VIP Purrks",href:"/vip",classes:"lg:inline-block"}]:[],{id:"login-mobile",text:"Log In",externalHref:c.value,classes:"lg:hidden"}];const e=[{id:"reviews",text:"Reviews",href:"/reviews#reviews",classes:"lg:inline-block"},{id:"faq",text:"FAQ",href:"/faq",classes:"lg:inline-block"},{id:"shop",text:"Shop",href:"/products/one-bag-of-prettylitter",classes:"lg:inline-block"},..._.value?[{id:"our-story",text:"Our Story",href:"/about-us",classes:"lg:inline-block"},{id:"how-it-works",text:"How it Works",href:"/how-it-works",classes:"lg:inline-block"}]:[],...w.value==="variation_2"&&h.value?[{id:"vip-purrks",text:"VIP Purrks",href:"/vip",classes:"lg:inline-block"}]:[]];return P.value&&e.push({text:"How it Works",href:"/how-prettylitter-works",classes:"lg:inline-block"}),R.value&&e.push({text:"Our Story",href:"/about-us",classes:"lg:inline-block"}),I.value&&e.push({text:"VIP Purrks",href:"/vip",classes:"lg:inline-block"}),e.push({id:"login-mobile",text:"Log In",externalHref:c.value,classes:"lg:hidden"}),e}}),V=t(()=>s.localize||s.store!=="us"),b=e=>{n.value=!n.value,e!=null&&e.currentTarget&&(e.currentTarget.ariaExpanded=n.value)};S(document,"keyup",e=>{e.key.toLowerCase()==="escape"&&n.value&&b()});const k=()=>{const e=document.getElementById("global-top-nav");e&&(v.value=e.offsetTop,g.value=e.getBoundingClientRect().bottom)};y(()=>{m.value=!0,k()}),B(l,()=>{k(),u.promoButton&&(l.value-480>v.value?d.value=!0:d.value=!1)});{const x=z(()=>{f.value=window.scrollY>200;const N=(document.body.scrollHeight-window.innerHeight)/11;p.value=window.scrollY>N},25);y(()=>{window.addEventListener("scroll",x)}),q(()=>{window.removeEventListener("scroll",x)})}return{isHomepage:["/","/pages/home"].includes(r.path),localize:V,toggleNavbar:b,baseFromTop:v,mobileNavOffset:g,scrollPosition:l,showPromoButton:d,menuItems:L,isNavbarReady:m,showMenu:n,accountLink:c,isHeaderTranslated:p,isScrolled:f}};export{U as u};

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.