PageSourceSearch

https://www.greentabs.xyz/_next/static/chunks/839-a08351f24f04a5d2.js

js greentabs.xyz collected 2026-10-02 02:11:25 UTC 12,379 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[839],{1839:function(e,t,r){r.r(t),r.d(t,{default:function(){return F}});var n=r(7437),a=r(1396),s=r.n(a),o=r(6691),i=r.n(o),d=r(4033),l=r(2265),c=r(2749),m=r(7702),u=r(7502),f=r(7158),x=r(2442),h=r(6369),p=r(1628);let g=u.fC,v=u.xz;u.ZA,u.Uv,u.Tr,u.Ee;let b=l.forwardRef((e,t)=>{let{className:r,inset:a,children:s,...o}=e;return(0,n.jsxs)(u.fF,{ref:t,className:(0,p.cn)("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",a&&"pl-8",r),...o,children:[s,(0,n.jsx)(f.Z,{className:"ml-auto"})]})});b.displayName=u.fF.displayName;let j=l.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,n.jsx)(u.tu,{ref:t,className:(0,p.cn)("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",r),...a})});j.displayName=u.tu.displayName;let k=l.forwardRef((e,t)=>{let{className:r,sideOffset:a=4,...s}=e;return(0,n.jsx)(u.Uv,{children:(0,n.jsx)(u.VY,{ref:t,sideOffset:a,className:(0,p.cn)("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",r),...s})})});k.displayName=u.VY.displayName;let w=l.forwardRef((e,t)=>{let{className:r,inset:a,...s}=e;return(0,n.jsx)(u.ck,{ref:t,className:(0,p.cn)("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",a&&"pl-8",r),...s})});w.displayName=u.ck.displayName;let N=l.forwardRef((e,t)=>{let{className:r,children:a,checked:s,...o}=e;return(0,n.jsxs)(u.oC,{ref:t,className:(0,p.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",r),checked:s,...o,children:[(0,n.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,n.jsx)(u.wU,{children:(0,n.jsx)(x.Z,{className:"h-4 w-4"})})}),a]})});N.displayName=u.oC.displayName;let y=l.forwardRef((e,t)=>{let{className:r,children:a,...s}=e;return(0,n.jsxs)(u.Rk,{ref:t,className:(0,p.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",r),...s,children:[(0,n.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,n.jsx)(u.wU,{children:(0,n.jsx)(h.Z,{className:"h-2 w-2 fill-current"})})}),a]})});y.displayName=u.Rk.displayName;let z=l.forwardRef((e,t)=>{let{className:r,inset:a,...s}=e;return(0,n.jsx)(u.__,{ref:t,className:(0,p.cn)("px-2 py-1.5 text-sm font-semibold",a&&"pl-8",r),...s})});z.displayName=u.__.displayName;let C=l.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,n.jsx)(u.Z0,{ref:t,className:(0,p.cn)("-mx-1 my-1 h-px bg-muted",r),...a})});C.displayName=u.Z0.displayName;var E=r(1350),L=r(7256),_=r(6061);let R=(0,_.j)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),W=l.forwardRef((e,t)=>
1{let{className:r,variant:a,size:s,asChild:o=!1,...i}=e,d=o?L.g7:"button";return(0,n.jsx)(d,{className:(0,p.cn)(R({variant:a,size:s,className:r})),ref:t,...i})});function Z(){let{theme:e,setTheme:t}=(0,E.F)();return(0,n.jsxs)(W,{variant:"ghost",size:"icon",onClick:()=>t("light"===e?"dark":"light"),className:"w-9 h-9 rounded-full",children:[(0,n.jsx)("span",{className:"material-symbols-outlined",children:"light"===e?"dark_mode":"light_mode"}),(0,n.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}function F(){var e,t,r,a,o,u,f,x;let h=(0,d.usePathname)()||"/",[p,b]=(0,l.useState)(!1),{data:j}=(0,c.useSession)();function N(e){let{href:t,children:r}=e,a=h===t;return(0,n.jsx)(s(),{href:t,"aria-current":a?"page":void 0,className:"text-sm font-medium transition-colors "+(a?"text-zinc-900 dark:text-zinc-50":"text-zinc-600 hover:text-emerald-500 dark:text-zinc-400 dark:hover:text-emerald-400"),children:r})}return(0,l.useEffect)(()=>{b(!1)},[h]),(0,l.useEffect)(()=>{if(p){let e=document.documentElement.style.overflow;return document.documentElement.style.overflow="hidden",()=>{document.documentElement.style.overflow=e||""}}}
1,[p]),(0,l.useEffect)(()=>{function e(e){"Escape"===e.key&&b(!1)}if(p)return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[p]),(0,n.jsxs)("header",{className:"sticky top-0 left-0 right-0 z-30 bg-white/90 dark:bg-black/90 border-b border-black/5 dark:border-white/10 min-w-full lg:min-w-1/2 font-sans",children:[(0,n.jsx)("div",{className:"mx-auto w-full max-w-5xl px-4 sm:px-16",children:(0,n.jsxs)("div",{className:"flex h-14 items-center",children:[(0,n.jsxs)(s(),{href:"/",className:"flex items-center gap-2 flex-shrink-0",children:[(0,n.jsx)(i(),{src:"/images/leaf.png",alt:"GreenTabs icon",width:16,height:16,className:"dark:brightness-100"}),(0,n.jsx)("span",{className:"hidden font-medium sm:inline-block",children:"GreenTabs"})]}),(0,n.jsxs)("nav",{className:"hidden md:flex items-center ml-auto gap-8",children:[(0,n.jsx)(N,{href:"/",children:"Home"}),(0,n.jsx)(N,{href:"/leaderboards",children:"Leaderboards"}),(0,n.jsx)(N,{href:"/about",children:"About"}),(0,n.jsx)(N,{href:"/contact",children:"Contact"}),(0,n.jsx)(Z,{}),j?(0,n.jsxs)(g,{children:[(0,n.jsx)(v,{className:"focus:outline-none",children:(0,n.jsx)(m.qE,{className:"h-8 w-8 cursor-pointer hover:opacity-80 transition-opacity",children:(null===(e=j.user)||void 0===e?void 0:e.image)?(0,n.jsx)(m.F$,{src:j.user.image,alt:(null===(t=j.user)||void 0===t?void 0:t.email)||"Profile picture"}):(0,n.jsx)(m.Q5,{className:"bg-emerald-500 text-white",children:(null===(o=j.user)||void 0===o?void 0:null===(a=o.email)||void 0===a?void 0:null===(r=a[0])||void 0===r?void 0:r.toUpperCase())||"?"})})}),(0,n.jsxs)(k,{align:"end",className:"w-40 font-sans",children:[(0,n.jsx)(w,{asChild:!0,children:(0,n.jsx)(s(),{href:"/profile",className:"cursor-pointer",children:"Profile"})}),(0,n.jsx)(w,{onClick:()=>(0,c.signOut)(),className:"cursor-pointer",children:"Sign out"})]})]}):(0,n.jsx)(s(),{href:"/auth/login",className:"px-4 py-2 bg-white text-black rounded-md font-medium hover:bg-gray-100 transition-colors border border-gray-200",children:"Sign in"})]}),(0,n.jsxs)("button",{type:"button","aria-label":"Toggle menu","aria-controls":"mobile-menu","aria-expanded":p,onClick:()=>b(e=>!e),className:"ml-auto md:hidden inline-flex h-10 w-10 items-center justify-center rounded-md text-zinc-700 hover:bg-black/5 dark:text-zinc-200",children:[(0,n.jsx)("span",{className:"sr-only",children:"Open menu"}),p?(0,n.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M6 6L18 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M6 18L18 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}):(0,n.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M3 6H21",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M3 12H21",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M3 18H21",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})]})]})}),(0,n.jsx)("div",{id:"mobile-menu",className:"md:hidden ".concat(p?"block":"hidden"," border-t border-black/5 dark:border-white/10 bg-white/95 dark:bg-black/95"),children:(0,n.jsx)("div",{className:"mx-auto max-w-3xl px-4 py-4 sm:px-16",children:(0,n.jsxs)("nav",{className:"flex flex-col gap-3",children:[(0,n.jsx)(s(),{href:"/",onClick:()=>b(!1),className:"px-2 py-2 text-base font-medium text-zinc-800 dark:text-zinc-50",children:"Home"}),(0,n.jsx)(s(),{href:"/leaderboards",onClick:()=>b(!1),className:"px-2 py-2 text-base font-medium text-zinc-700 hover:text-emerald-500 dark:text-zinc-400 dark:hover:text-emerald-400 transition-colors",children:"Leaderboards"}),(0,n.jsx)(s(),{href:"/about",onClick:()=>b(!1),className:"px-2 py-2 text-base font-medium text-zinc-700 hover:text-emerald-500 dark:text-zinc-400 dark:hover:text-emerald-400 transition-colors",children:"About"}),(0,n.jsx)(s(),{href:"/contact",onClick:()=>b(!1),className:"px-2 py-2 text-base font-medium text-zinc-700 hover:text-emerald-500 dark:text-zinc-400 dark:hover:text-emerald-400 transition-colors",children:"Contact"}),j?(0,n.jsxs)(s(),{href:"/profile",onClick:()=>b(!1),className:"flex items-center gap-3 px-2 py-2 text-base font-medium text-zinc-700 hover:text-emerald-500 dark:text-zinc-400 dark:hover:text-emerald-400 transition-colors",children:[(null===(u=j.user)||void 0===u?void 0:u.image)?(0,n.jsx)(i(),{src:j.user.image,alt:"Profile picture",width:32,height:32,className:"rounded-full"}):(0,n.jsx)("div",{className:"w-8 h-8 rounded-full bg-emerald-500 flex items-center justify-center text-white",children:(null===(x=j.user)||void 0===x?void 0:null===(f=x.email)||void 0===f?void 0:f[0])||"?"}),(0,n.jsx)("span",{children:"Profile"})]}):(0,n.jsx)(s(),{href:"/auth/login",onClick:()=>b(!1),className:"px-2 py-2 text-base font-medium text-zinc-700 hover:text-emerald-500 dark:text-zinc-400 dark:hover:text-emerald-400 transition-colors",children:"Sign in"})]})})})]})}W.displayName="Button"},7702:function(e,t,r){r.d(t,{F$:function(){return d},Q5:function(){return l},qE:function(){return i}});var n=r(7437),a=r(2265),s=r(1027),o=r(1628);let i=a.forwardRef((e,t)=>
1{let{className:r,...a}=e;return(0,n.jsx)(s.fC,{ref:t,className:(0,o.cn)("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",r),...a})});i.displayName=s.fC.displayName;let d=a.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,n.jsx)(s.Ee,{ref:t,className:(0,o.cn)("aspect-square h-full w-full",r),...a})});d.displayName=s.Ee.displayName;let l=a.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,n.jsx)(s.NY,{ref:t,className:(0,o.cn)("flex h-full w-full items-center justify-center rounded-full bg-muted",r),...a})});l.displayName=s.NY.displayName},1628:function(e,t,r){r.d(t,{cn:function(){return s}});var n=r(7042),a=r(4769);function s(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,a.m6)((0,n.W)(t))}}}]);

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.