PageSourceSearch

https://parkcityutah.ai/assets/AuthorPage-41BvrI4s.js

js parkcityutah.ai collected 2026-10-05 13:31:47 UTC 8,171 bytes, 10 lines download raw bytes

1import{b0 as G,r as c,j as e,aX as N,bg as B,b5 as v,p as y,a3 as U,a as K,b as _,s as A,t as u,F as h,B as f,o as g,H as Y,U as z,C as p,c as j,M as D,ay as O,a7 as Q}from"./index-PtGACUVf.js";import{s as V}from"./index-B7zIXwd5.js";import{S as m}from"./skeleton-DaIvcz7V.js";import{T as W}from"./twitter-DkYBYRfU.js";import{F as X}from"./file-text-C2KosKJ2.js";function J(){return V.useSyncExternalStore(Z,()=>!0,()=>!1)}function Z(){return()=>{}}var w="Avatar",[ee,oe]=G(w),[se,L]=ee(w),C=c.forwardRef((t,s)=>{const{__scopeAvatar:a,...o}=t,[n,i]=c.useState("idle");return e.jsx(se,{scope:a,imageLoadingStatus:n,onImageLoadingStatusChange:i,children:e.jsx(N.span,{...o,ref:s})})});C.displayName=w;var k="AvatarImage",E=c.forwardRef((t,s)=>{const{__scopeAvatar:a,src:o,onLoadingStatusChange:n=()=>{},...i}=t,d=L(k,a),r=ae(o,i),l=B(x=>{n(x),d.onImageLoadingStatusChange(x)});return v(()=>{r!=="idle"&&l(r)},[r,l]),r==="loaded"?e.jsx(N.img,{...i,ref:s,src:o}):null});E.displayName=k;var R="AvatarFallback",I=c.forwardRef((t,s)=>{const{__scopeAvatar:a,delayMs:o,...n}=t,i=L(R,a),[d,r]=c.useState(o===void 0);return c.useEffect(()=>{if(o!==void 0){const l=window.setTimeout(()=>r(!0),o);return()=>window.clearTimeout(l)}},[o]),d&&i.imageLoadingStatus!=="loaded"?e.jsx(N.span,{...n,ref:s}):null});I.displayName=R;function S(t,s){return t?s?(t.src!==s&&(t.src=s),t.complete&&t.naturalWidth>0?"loaded":"loading"):"error":"idle"}function ae(t,{referrerPolicy:s,crossOrigin:a}){const o=J(),n=c.useRef(null),i=o?(n.current||(n.current=new window.Image),n.current):null,[d,r]=c.useState(()=>S(i,t));return v(()=>{r(S(i,t))},[i,t]),v(()=>{const l=H=>()=>{r(H)};if(!i)return;const x=l("loaded"),b=l("error");return i.addEventListener("load",x),i.addEventListener("error",b),s&&(i.referrerPolicy=s),typeof a=="string"&&(i.crossOrigin=a),()=>{i.removeEventListener("load",x),i.removeEventListener("error",b)}},[i,a,s]),d}var F=C,M=E,T=I;const $=c.forwardRef(({className:t,...s},a)=>e.jsx(F,{ref:a,className:y("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",t),...s}));$.displayName=F.displayName;const P=c.forwardRef(({className:t,...s},a)=>e.jsx(M,{ref:a,className:y("aspect-square h-full w-full",t),...s}));P.displayName=M.displayName;const q=c.forwardRef(({className:t,...s},a)=>e.jsx(T,{ref:a,className:y("flex h-full w-full items-center justify-center rounded-full bg-muted",t),...s}));q.displayName=T.displayName;function ce(){const{authorSlug:t}=U(),{city:s}=K(),{data:a,isLoading:o}=_({queryKey:["author",t],queryFn:async()=>{const{data:r,error:l}=await A.from("authors").select("*").eq("slug",t).maybeSingle();if(l)throw l;return r},enabled:!!t}),{data:n,isLoading:i}=_({queryKey:["city-authors",a==null?void 0:a.id],queryFn:async()=>{const{data:r,error:l}=await A.from("city_authors").select(`
2          city_id,
3          is_primary,
4          cities (
5            id,
6            name,
7            slug,
8            hero_image_url
9          )
10        `).eq("author_id",a.id);if(l)throw l;return r},enabled:!!(a!=null&&a.id)});if(o)return e.jsxs("div",{className:"min-h-screen flex flex-col bg-background",children:[e.jsx(u,{}),e.jsx("main",{className:"flex-grow container mx-auto px-4 py-12",children:e.jsxs("div",{className:"max-w-4xl mx-auto space-y-8",children:[e.jsxs("div",{className:"flex items-center gap-6",children:[e.jsx(m,{className:"h-24 w-24 rounded-full"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(m,{className:"h-8 w-48"}),e.jsx(m,{className:"h-4 w-64"})]})]}),e.jsx(m,{className:"h-40 w-full"})]})}),e.jsx(h,{cityName:(s==null?void 0:s.name)||"",citySlug:(s==null?void 0:s.slug)||""})]});if(!a)return e.jsxs("div",{className:"min-h-screen flex flex-col bg-background",children:[e.jsx(u,{}),e.jsx("main",{className:"flex-grow container mx-auto px-4 py-12",children:e.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[e.jsx("h1",{className:"text-2xl font-bold text-foreground mb-4",children:"Author Not Found"}),e.jsx("p",{className:"text-muted-foreground mb-6",children:"The author you're looking for doesn't exist."}),e.jsx(f,{asChild:!0,children:e.jsx(g,{to:"/",children:"Return Home"})})]})}),e.jsx(h,{cityName:(s==null?void 0:s.name)||"",citySlug:(s==null?void 0:s.slug)||""})]});const d=a.name.split(" ").map(r=>r[0]).join("").toUpperCase();return e.jsxs("div",{className:"min-h-screen flex flex-col bg-background",children:[e.jsxs(Y,{children:[e.jsxs("title",{children:[a.name," | Local Expert"]}),e.jsx("meta",{name:"description",content:a.bio_short})]}),e.jsx(u,{}),e.jsx("main",{className:"flex-grow container mx-auto px-4 py-12",children:e.jsxs("div",{className:"max-w-4xl mx-auto 
10space-y-10",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row items-center sm:items-start gap-6",children:[e.jsxs($,{className:"h-28 w-28 border-4 border-primary/20",children:[e.jsx(P,{src:a.avatar_url||void 0,alt:a.name}),e.jsx(q,{className:"text-2xl bg-primary/10 text-primary",children:d||e.jsx(z,{className:"h-12 w-12"})})]}),e.jsxs("div",{className:"text-center sm:text-left",children:[e.jsx("h1",{className:"text-3xl font-bold text-foreground mb-2",children:a.name}),e.jsx("p",{className:"text-lg text-muted-foreground mb-4",children:a.bio_short}),e.jsxs("div",{className:"flex gap-3 justify-center sm:justify-start",children:[a.social_twitter&&e.jsx(f,{variant:"outline",size:"sm",asChild:!0,children:e.jsxs("a",{href:`https://twitter.com/${a.social_twitter}`,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(W,{className:"h-4 w-4 mr-2"}),"Twitter"]})}),a.social_bluesky&&e.jsx(f,{variant:"outline",size:"sm",asChild:!0,children:e.jsx("a",{href:`https://bsky.app/profile/${a.social_bluesky}`,target:"_blank",rel:"noopener noreferrer",children:"Bluesky"})})]})]})]}),a.bio_full&&e.jsx(p,{children:e.jsxs(j,{className:"p-6",children:[e.jsx("h2",{className:"text-xl font-semibold text-foreground mb-4",children:"About"}),e.jsx("p",{className:"text-muted-foreground leading-relaxed whitespace-pre-line",children:a.bio_full})]})}),i?e.jsxs("div",{className:"space-y-4",children:[e.jsx(m,{className:"h-6 w-40"}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:[1,2,3].map(r=>e.jsx(m,{className:"h-24"},r))})]}):n&&n.length>0?e.jsxs("div",{children:[e.jsxs("h2",{className:"text-xl font-semibold text-foreground mb-4 flex items-center gap-2",children:[e.jsx(D,{className:"h-5 w-5 text-primary"}),"Markets I Cover"]}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:n.map(r=>e.jsx(g,{to:`/?city=${r.cities.slug}`,className:"group",children:e.jsxs(p,{className:"overflow-hidden hover:shadow-md transition-shadow",children:[r.cities.hero_image_url&&e.jsx("div",{className:"h-24 overflow-hidden",children:e.jsx("img",{src:r.cities.hero_image_url,alt:r.cities.name,className:"w-full h-full object-cover group-hover:scale-105 transition-transform"})}),e.jsxs(j,{className:"p-4",children:[e.jsx("h3",{className:"font-medium text-foreground group-hover:text-primary transition-colors",children:r.cities.name}),r.is_primary&&e.jsx("span",{className:"text-xs text-primary font-medium",children:"Primary Market"})]})]})},r.city_id))})]}):null,n&&n.length>0&&e.jsxs("div",{children:[e.jsxs("h2",{className:"text-xl font-semibold text-foreground mb-4 flex items-center gap-2",children:[e.jsx(X,{className:"h-5 w-5 text-primary"}),"Recent Guides"]}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:n.slice(0,3).flatMap(r=>O.slice(0,4).map(l=>e.jsx(g,{to:`/${l}?city=${r.cities.slug}`,className:"group",children:e.jsx(p,{className:"hover:shadow-sm transition-shadow",children:e.jsxs(j,{className:"p-4 flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-foreground group-hover:text-primary transition-colors",children:Q[l]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:r.cities.name})]}),e.jsx("span",{className:"text-muted-foreground group-hover:text-primary transition-colors",children:"→"})]})})},`${r.city_id}-${l}`)))})]})]})}),e.jsx(h,{cityName:(s==null?void 0:s.name)||"",citySlug:(s==null?void 0:s.slug)||""})]})}export{ce 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.