1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,75379,e=>{"use strict";e.s(["formatCount",0,function(e){return e>=1e6?`${(e/1e6).toFixed(1).replace(/\.0$/,"")}m`:e>=1e3?`${(e/1e3).toFixed(1).replace(/\.0$/,"")}k`:String(e)}])},33383,e=>{"use strict";var t=e.i(63645),r=e.i(49521),i=e.i(31471),n=e.i(11795);async function o(e,t,r,i){if(r){let{error:r}=await i.from("likes").upsert({user_id:t,post_id:e},{onConflict:"user_id,post_id"});if(r)throw r;let{data:n}=await i.from("posts").select("author_id").eq("id",e).single();n&&n.author_id!==t&&await i.from("notifications").insert({type:"like",actor_id:t,target_user_id:n.author_id,post_id:e})}else{let{error:r}=await i.from("likes").delete().eq("user_id",t).eq("post_id",e);if(r)throw r}}async function s(e,t,r,i){if(r){let{error:r}=await i.from("comment_likes").upsert({user_id:t,comment_id:e},{onConflict:"user_id,comment_id"});if(r)throw r;let{data:n}=await i.from("comments").select("author_id, post_id").eq("id",e).single();n&&n.author_id!==t&&await i.from("notifications").insert({type:"like",actor_id:t,target_user_id:n.author_id,comment_id:e,post_id:n.post_id})}else{let{error:r}=await i.from("comment_likes").delete().eq("user_id",t).eq("comment_id",e);if(r)throw r}}var a=e.i(75379);e.s(["LikeButton",0,function({targetId:e,targetType:l,initialCount:d,initialLiked:c,userId:u,iconSize:m="text-[20px]",textSize:f="text-sm"}){let[p,h]=(0,r.useState)(c),[g,w]=(0,r.useState)(d),[y,b]=(0,r.useTransition)(),x=(0,i.useRouter)();async function v(){if(!u)return void x.push("/auth/login");let t=!p;h(t),w(e=>Math.max(0,e+(t?1:-1))),b(async()=>{try{let r=(0,n.createClient)();"post"===l?await o(e,u,t,r):await s(e,u,t,r)}catch{h(!t),w(e=>e+(t?-1:1))}})}return(0,r.useEffect)(()=>{w(d)},[d]),(0,r.useEffect)(()=>{h(c)},[c]),(0,t.jsxs)("button",{onClick:v,disabled:y,className:`flex items-center gap-1 transition-colors ${p?"text-primary":"text-foreground-muted hover:text-primary"}`,children:[(0,t.jsx)("span",{className:`material-symbols-outlined ${m}`,style:p?{fontVariationSettings:"'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24"}:void 0,children:"favorite"}),(0,t.jsx)("span",{className:`${f} font-medium`,children:(0,a.formatCount)(g)})]})}],33383)},30841,73227,89013,e=>{"use strict";var t=e.i(49521);function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e}).apply(this,arguments)}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,i)}return r}function n(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach(function(t){var i,n,o;i=e,n=t,o=r[t],n in i?Object.defineProperty(i,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):i[n]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}class o extends t.default.Component{constructor(e){let t;super(e),this.reCalculateColumnCount=this.reCalculateColumnCount.bind(this),this.reCalculateColumnCountDebounce=this.reCalculateColumnCountDebounce.bind(this),t=this.props.breakpointCols&&this.props.breakpointCols.default?this.props.breakpointCols.default:parseInt(this.props.breakpointCols)||2,this.state={columnCount:t}}componentDidMount(){this.reCalculateColumnCount(),window&&window.addEventListener("resize",this.reCalculateColumnCountDebounce)}componentDidUpdate(){this.reCalculateColumnCount()}componentWillUnmount(){window&&window.removeEventListener("resize",this.reCalculateColumnCountDebounce)}reCalculateColumnCountDebounce(){window&&window.requestAnimationFrame?(window.cancelAnimationFrame&&window.cancelAnimationFrame(this._lastRecalculateAnimationFrame),this._lastRecalculateAnimationFrame=window.requestAnimationFrame(()=>{this.reCalculateColumnCount()}
1)):this.reCalculateColumnCount()}reCalculateColumnCount(){let e=window&&window.innerWidth||1/0,t=this.props.breakpointCols;"object"!=typeof t&&(t={default:parseInt(t)||2});let r=1/0,i=t.default||2;for(let n in t){let o=parseInt(n);o>0&&e<=o&&o<r&&(r=o,i=t[n])}i=Math.max(1,parseInt(i)||1),this.state.columnCount!==i&&this.setState({columnCount:i})}itemsInColumns(){let e=this.state.columnCount,r=Array(e),i=t.default.Children.toArray(this.props.children);for(let t=0;t<i.length;t++){let n=t%e;r[n]||(r[n]=[]),r[n].push(i[t])}return r}renderColumns(){let{column:e,columnAttrs:i={},columnClassName:o}=this.props,s=this.itemsInColumns(),a=`${100/s.length}%`,l=o;l&&"string"!=typeof l&&(this.logDeprecated('The property "columnClassName" requires a string'),void 0===l&&(l="my-masonry-grid_column"));let d=n(n(n({},e),i),{},{style:n(n({},i.style),{},{width:a}),className:l});return s.map((e,i)=>t.default.createElement("div",r({},d,{key:i}),e))}logDeprecated(e){console.error("[Masonry]",e)}render(){let e=this.props,{children:i,breakpointCols:n,columnClassName:o,columnAttrs:s,column:a,className:l}=e,d=function(e,t){if(null==e)return{};var r,i,n=function(e,t){if(null==e)return{};var r,i,n={},o=Object.keys(e);for(i=0;i<o.length;i++)r=o[i],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,["children","breakpointCols","columnClassName","columnAttrs","column","className"]),c=l;return"string"!=typeof l&&(this.logDeprecated('The property "className" requires a string'),void 0===l&&(c="my-masonry-grid")),t.default.createElement("div",r({},d,{className:c}),this.renderColumns())}}o.defaultProps={breakpointCols:void 0,className:void 0,columnClassName:void 0,children:void 0,columnAttrs:void 0,column:void 0},e.s(["default",0,o],30841),e.i(17210);var s=e.i(63645),a=e.i(42908),l=e.i(63266),d=e.i(33383);let c=()=>new URLSearchParams(window.location.search).has("perf");function u(e,t){c()&&console.log(`[HOME] ${e}`,{t:Math.round(performance.now()),...t})}let m=!1,f=null,p=0,h=new Map,g=[],w=!1,y=!1;function b(e,t,r,i,n){if(!c())return;let o=n.currentTarget,s={w:o.clientWidth,h:o.clientHeight},a={w:o.naturalWidth,h:o.naturalHeight};w?(window.homePerfSession?.firstVisiblePostIds??[]).includes(String(e))&&u("image loaded",{postId:String(e),priority:t,rendered:s,natural:a,dbDims:r&&i?{w:r,h:i}:"missing",missingDbDims:!r||!i}):g.push({postId:String(e),priority:t,dbWidth:r,dbHeight:i,rendered:s,natural:a})}function x(e){if(!e)return"(null)";let t=e.tagName?.toLowerCase()??"?",r=e.id?`#${e.id}`:"",i=e.className?`.${String(e.className).trim().split(/\s+/).slice(0,2).join(".")}`:"",n=e.getAttribute?.("data-post-id"),o=e.getAttribute?.("data-card-index"),s=n?` [post=${n}${o?`,idx=${o}`:""}]`:"",a=e.src?` src="${e.src.slice(0,60)}"`:"";return`${t}${r}${i}${s}${a}`}c()&&(window.homePerfSession={lcpFinal:null,clsTotal:0,clsTopSources:[],firstVisiblePostIds:[]}),e.s(["initPerfObserver",0,function(){if(!c()||m||(m=!0,"u"<typeof PerformanceObserver))return;"u">typeof document&&document.fonts?.ready&&document.fonts.ready.then(()=>{u("fonts ready",{fontsReadyAt:Math.round(f=performance.now())})});let e=null;try{new PerformanceObserver(t=>{for(let r of t.getEntries()){let t=r.element,i=t?.getAttribute?.("data-post-id"),n=t?.getAttribute?.("data-card-index"),o=t?.getAttribute?.("data-had-priority")==="true";e={t_lcp:Math.round(r.startTime),size:r.size,url:r.url,renderTime:r.renderTime?Math.round(r.renderTime):void 0,loadTime:r.loadTime?Math.round(r.loadTime):void 0,element:t?x(t):void 0,postId:i,cardIndex:n,hadPriority:o}}}).observe({type:"largest-contentful-paint",buffered:!0})}catch{}let t=()=>{e&&window.homePerfSession&&(window.homePerfSession.lcpFinal=e,u("LCP (final)",e),e=null),window.homePerfSession&&(window.homePerfSession.clsTotal=p,window.homePerfSession.clsTopSources=Array.from(h.entries()).map(([e,t])=>({selector:e,count:t})).sort((e,t)=>t.count-e.count).slice(0,3),u("session summary",{clsTotal:p.toFixed(4),topShifters:window.homePerfSession.clsTopSources,lcpElement:window.homePerfSession.lcpFinal?.element,lcpPostId:window.homePerfSession.lcpFinal?.postId,lcpHadPriority:window.homePerfSession.lcpFinal?.hadPriority,firstVisiblePostIds:window.homePerfSession.firstVisiblePostIds}))};document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&t()},{once:!0}),window.addEventListener("pagehide",t,{once:!0});try{new PerformanceObserver(e=>{for(let t of e.getEntries()){if(t.hadRecentInput||!t.value||t.value<.001)continue;p+=t.value;let e=f?t.startTime<f?"before-fonts":"after-fonts":"before-fonts",r=(t.sources??[]).map(e=>{let t=e.node,r=t?x(t):void 0,i=t?.classList?.contains("masonry-grid_column"),n=t?.getAttribute?.("data-post-id"),o=t?.getAttribute?.("data-card-index");return r&&h.set(r,(h.get(r)||0)+1),{node:r,isMasonryCol:i,postId:n,cardIndex:o,delta:e.currentRect&&e.previousRect?{dy:Math.round(e.currentRect.top-e.previousRect.top),dx:Math.round(e.currentRect.left-e.previousRect.left)}:void 0}});
1u("CLS shift",{value:t.value.toFixed(4),phase:e,clsTotal:p.toFixed(4),sources:r})}}).observe({type:"layout-shift",buffered:!0})}catch{}try{new PerformanceObserver(e=>{for(let t of e.getEntries())u("paint",{name:t.name,t:Math.round(t.startTime)})}).observe({type:"paint",buffered:!0})}catch{}},"logImageLoad",0,b,"observeInitialViewport",0,function(e){if(!c()||y)return;y=!0;let t=e.querySelectorAll("article[data-post-id]"),r=[],i=new IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting){let t=e.target.getAttribute("data-post-id");t&&!r.includes(t)&&r.push(t)}})},{threshold:.1});t.forEach(e=>i.observe(e)),setTimeout(()=>{i.disconnect(),window.homePerfSession&&(window.homePerfSession.firstVisiblePostIds=r),w=!0,g.forEach(e=>{r.includes(e.postId)&&u("image loaded",{postId:e.postId,priority:e.priority,rendered:e.rendered,natural:e.natural,dbDims:e.dbWidth&&e.dbHeight?{w:e.dbWidth,h:e.dbHeight}:"missing",missingDbDims:!e.dbWidth||!e.dbHeight})}),g.length=0,u("initial viewport cards",{count:r.length,postIds:r})},1200)},"perfLog",0,u,"resetHomePerfSession",0,function(){c()&&(f=null,p=0,h.clear(),g.length=0,w=!1,y=!1,window.homePerfSession&&(window.homePerfSession.lcpFinal=null,window.homePerfSession.clsTotal=0,window.homePerfSession.clsTopSources=[],window.homePerfSession.firstVisiblePostIds=[]))},"sampleMasonryStability",0,function(e){if(!c())return;let t=e.getBoundingClientRect().height,r=e.querySelectorAll(".masonry-grid_column").length,i=0,n=()=>{i++;let o=e.getBoundingClientRect().height,s=e.querySelectorAll(".masonry-grid_column"),a=s.length;if(a!==r&&(u("masonry column count changed",{prevCount:r,newCount:a,frame:i}),r=a),Math.abs(o-t)>1){let e=Array.from(s).map(e=>Math.round(e.getBoundingClientRect().top));u("masonry reflow",{prevH:Math.round(t),newH:Math.round(o),delta:Math.round(o-t),frame:i,colCount:a,colTops:e}),t=o}i<60?requestAnimationFrame(n):u("masonry stable (sampling done)",{finalH:Math.round(o),frames:i,colCount:a})};requestAnimationFrame(n)}],73227),e.s(["PostCard",0,function({post:e,priority:t=!1,cardIndex:r,userId:i=null}){let n=e.imagePath?`https://sbwparwbyqsmwhadgpkq.supabase.co/storage/v1/object/public/${e.imagePath}`:null;return(0,s.jsxs)("article",{className:"bg-surface-card dark:bg-[#1e1e1e] rounded-2xl overflow-hidden flex flex-col shadow-sm hover:shadow-md transition-shadow duration-300","data-post-id":e.id,"data-card-index":r,"data-has-image":!!n,children:[(0,s.jsx)(a.default,{href:`/posts/${e.slug}`,children:n?(0,s.jsx)("div",{style:{aspectRatio:e.imageWidth&&e.imageHeight?`${e.imageWidth} / ${e.imageHeight}`:"4 / 3",position:"relative"},children:(0,s.jsx)(l.default,{src:n,alt:e.imageAlt??e.caption.slice(0,80),width:e.imageWidth??1200,height:e.imageHeight??900,className:"w-full h-full object-cover",sizes:"(max-width: 640px) 100vw, (max-width: 1024px) 45vw, (max-width: 1280px) 30vw, 22vw",priority:t,loading:t?void 0:"lazy",fetchPriority:t?"high":void 0,"data-post-id":e.id,"data-card-index":r,"data-had-priority":t?"true":"false",onLoad:r=>b(e.id,t,e.imageWidth,e.imageHeight,r)})}):(0,s.jsx)("div",{className:"aspect-[4/3] w-full bg-surface-secondary dark:bg-[#2a2a2a] flex items-center justify-center",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[32px] text-foreground-muted",children:"image"})})}),(0,s.jsxs)("div",{className:"p-4 flex-1 flex flex-col",children:[(0,s.jsx)(a.default,{href:`/posts/${e.slug}`,children:(0,s.jsx)("h3",{className:"font-bold text-sm text-foreground line-clamp-2 hover:text-primary transition-colors",children:(e.title??e.caption.split("\n")[0])||"Untitled"})}),e.locationName&&e.locationSlug&&(0,s.jsxs)(a.default,{href:`/locations/${e.locationSlug}`,className:"mt-1.5 text-[0.65rem] text-foreground-muted hover:text-primary transition-colors truncate",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px] align-middle mr-0.5",children:"location_on"}),e.locationName]}),(0,s.jsxs)("div",{className:"mt-auto pt-3 flex items-center justify-between",children:[(0,s.jsxs)(a.default,{href:`/users/${e.username}`,className:"flex items-center gap-1.5 min-w-0",children:[e.avatarUrl?(0,s.jsx)(l.default,{src:e.avatarUrl,alt:e.username,width:20,height:20,className:"rounded-full flex-shrink-0"}):(0,s.jsx)("div",{className:"w-5 h-5 rounded-full bg-surface-secondary dark:bg-[#2a2a2a] flex items-center justify-center flex-shrink-0",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px] text-foreground-muted",children:"person"})}),(0,s.jsx)("span",{className:"text-[0.7rem] text-foreground-muted truncate hover:text-foreground transition-colors",children:e.displayName??e.username})]}),(0,s.jsx)("div",{className:"flex items-center gap-1 flex-shrink-0",children:(0,s.jsx)(d.LikeButton,{targetId:e.id,targetType:"post",initialCount:e.likeCount,initialLiked:e.initialLiked,userId:i,iconSize:"text-[14px]",textSize:"text-[0.7rem]"})})]})]})]})}],89013)},71391,e=>{"use strict";var t=e.i(63645),r=e.i(49521),i=e.i(30841),n=e.i(89013),o=e.i(11795);function s(e){return{id:e.id,authorId:e.author_id,title:e.title??null,caption:e.caption,slug:e.slug,postType:e.post_type??"RR",locationId:e.location_id,likeCount:e.like_count,commentCount:e.comment_count,createdAt:e.created_at,
1score:Number(e.score),username:e.username,displayName:e.display_name,avatarUrl:e.avatar_url,imagePath:e.image_path,imageAlt:e.image_alt,imageWidth:e.image_width,imageHeight:e.image_height,locationName:e.location_name,locationSlug:e.location_slug,initialLiked:e.viewer_liked??!1}}async function a(e){var t,r;let i,n,a=(0,o.createClient)(),{data:{user:l}}=await a.auth.getUser(),{data:d,error:c}=await a.rpc("get_feed",{p_viewer_id:l?.id??null,p_cursor_score:e.score,p_cursor_created_at:e.createdAt,p_cursor_id:e.id,p_limit:20,p_ref_time:e.refTime});if(c)throw c;return t=d??[],r=e.refTime,n=20===(i=t.map(s)).length?{score:i[i.length-1].score,createdAt:i[i.length-1].createdAt,id:i[i.length-1].id,refTime:r}:null,{posts:i,nextCursor:n}}var l=e.i(73227);let d={default:4,1280:4,1024:3,640:2,0:1};e.s(["MasonryFeed",0,function({initialPosts:e,initialCursor:o,userId:s=null}){let[c,u]=(0,r.useState)(e),[m,f]=(0,r.useState)(o),[p,h]=(0,r.useState)(!1),g=(0,r.useRef)(null),w=(0,r.useRef)(null);(0,r.useEffect)(()=>{(0,l.resetHomePerfSession)(),(0,l.perfLog)("MasonryFeed mounted",{postCount:e.length}),(0,l.initPerfObserver)()},[]),(0,r.useEffect)(()=>{w.current&&((0,l.perfLog)("initial client render committed",{postCount:c.length}),(0,l.sampleMasonryStability)(w.current),(0,l.observeInitialViewport)(w.current))},[]),(0,r.useEffect)(()=>{try{sessionStorage.setItem("feedSlugs",JSON.stringify(c.map(e=>e.slug)))}catch{}},[c]);let y=(0,r.useCallback)(async()=>{if(m&&!p){h(!0);try{let{posts:e,nextCursor:t}=await a(m);u(t=>[...t,...e]),f(t)}catch(e){console.error("Failed to load more posts:",e)}finally{h(!1)}}},[m,p]);if((0,r.useEffect)(()=>{let e=g.current;if(!e||!m)return;let t=new IntersectionObserver(e=>{e[0].isIntersecting&&y()},{rootMargin:"200px"});return t.observe(e),()=>t.disconnect()},[m,y]),0===c.length)return(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-32 text-center",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-[48px] text-foreground-muted mb-4",children:"explore"}),(0,t.jsx)("p",{className:"text-foreground-muted text-sm",children:"No posts yet. Be the first to share something."})]});let b=c.findIndex(e=>!!e.imagePath);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{ref:w,children:(0,t.jsx)(i.default,{breakpointCols:d,className:"masonry-grid",columnClassName:"masonry-grid_column",children:c.map((e,r)=>(0,t.jsx)(n.PostCard,{post:e,cardIndex:r,priority:r===b,userId:s},e.id))})}),(0,t.jsx)("div",{ref:g,children:p&&(0,t.jsxs)("div",{className:"mt-20 mb-10 flex flex-col items-center justify-center",children:[(0,t.jsx)("div",{className:"w-8 h-8 border-2 border-gray-200 dark:border-gray-700 border-t-primary rounded-full animate-spin mb-4"}),(0,t.jsx)("span",{className:"text-[0.65rem] text-foreground-muted uppercase tracking-widest font-bold",children:"Fetching more curators..."})]})})]})}],71391)},5903,e=>{"use strict";var t=e.i(63645),r=e.i(49521),i=e.i(31471);e.s(["SearchBar",0,function(){let[e,n]=(0,r.useState)(""),o=(0,i.useRouter)();return(0,t.jsxs)("form",{onSubmit:function(t){t.preventDefault(),e.trim()?o.push(`/search?q=${encodeURIComponent(e.trim())}`):o.push("/search")},className:"relative",children:[(0,t.jsx)("span",{className:"absolute left-4 top-1/2 -translate-y-1/2 material-symbols-outlined text-[18px] text-foreground-muted pointer-events-none",children:"search"}),(0,t.jsx)("input",{type:"text",value:e,onChange:e=>n(e.target.value),placeholder:"Search posts and people...",className:"w-full rounded-full bg-surface-secondary dark:bg-[#2a2a2a] pl-11 pr-4 py-2.5 text-sm text-foreground placeholder:text-foreground-muted focus:outline-none focus:ring-2 focus:ring-primary"})]})}])}]);
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.