1import{_ as j}from"./Empty-CEL3UfQu.js";import{j as E,k as W,_ as G,p as o,v as t,G as J,J as Y,E as w,x as u,u as p,C as f,r as $,f as g,l,q as v,z as R,B as T,F as P,y as C,s as O,A as L,I as M,H as X}from"./vendor-vue-DgKPkTzM.js";import{u as I,_ as q,i as H}from"./links-lgUQVf6P.js";import{A as V}from"./WhereToEat-D6UXIU0i.js";import{h as D}from"./Button-Df9jM5Z5.js";import{_ as K,G as Q}from"./MapboxStaticImage-Brwq8OPS.js";import"./Header-DwCdz99P.js";import"./SearchContent-DgMA3K7g.js";import"./vendor-Dtr_Mrnh.js";import"./PrintMasthead-DE4PsQQv.js";import"./ContactUsModal-f-SX_b5A.js";import"./Modal-BFzDhMFV.js";import"./useStickySidebar-CHuyMixU.js";import"./SeoHead-DSvtBmVa.js";import"./vendor-icons-C07lCRXW.js";import"./vendor-swiper-CmTBkzXo.js";import"./PostCardSkeleton.vue_vue_type_script_setup_true_lang-soaK3uGf.js";import"./useBookmarks-DfGwopMX.js";import"./MapNative-B0MEvcba.js";import"./app-BXTTJdGA.js";const Z={key:0},ee=["innerHTML"],te=["aria-expanded"],se=5,le=300,z="profile-bio-text",ae=E({__name:"ProfileBio",props:{html:{}},setup(e){const s=e,{t:n}=I(),a=$(null),i=$(!1),r=$(!1),d=$(null),c=$(!1),x=g(()=>!!s.html&&s.html.trim()!==""),h=g(()=>!i.value&&!c.value);let _=null,k;function m(){const b=a.value;!b||i.value||c.value||(r.value=b.scrollHeight>b.clientHeight+1)}function A(){const b=a.value,y=(b==null?void 0:b.getBoundingClientRect().height)??0;i.value=!i.value,b&&(c.value=!0,d.value=`${y}px`,requestAnimationFrame(()=>{d.value=`${i.value?b.scrollHeight:se*N(b)}px`}),clearTimeout(k),k=setTimeout(S,le+50))}function N(b){const y=parseFloat(getComputedStyle(b).lineHeight);return Number.isFinite(y)&&y>0?y:24}function S(){clearTimeout(k),c.value=!1,d.value=null,m()}return W(()=>{m(),typeof ResizeObserver<"u"&&a.value&&(_=new ResizeObserver(()=>m()),_.observe(a.value))}),G(()=>{clearTimeout(k),_==null||_.disconnect(),_=null}),(b,y)=>x.value?(l(),o("div",Z,[t("div",{id:z,ref_key:"bioEl",ref:a,"data-testid":"profile-bio",class:w(["profile-bio mt-4 overflow-hidden text-left text-[15px] leading-relaxed text-[#404040] transition-[max-height] duration-300 ease-in-out motion-reduce:transition-none",{"profile-bio--clamped":h.value}]),style:Y(d.value?{maxHeight:d.value}:void 0),innerHTML:e.html,onTransitionend:J(S,["self"])},null,46,ee),r.value?(l(),o("button",{key:0,"data-testid":"profile-bio-toggle",class:"mt-2 text-[15px] text-primary hover:underline","aria-expanded":i.value,"aria-controls":z,onClick:A},u(i.value?p(n)("POI_DESCRIPTION_HIDE"):p(n)("POI_DESCRIPTION_EXPAND")),9,te)):f("",!0)])):f("",!0)}}),oe=q(ae,[["__scopeId","data-v-d1ee3c05"]]),re=E({__name:"IconXTwitter",props:{size:{default:"w-[15px]"}},setup(e){return(s,n)=>(l(),o("svg",{class:w(e.size),viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[...n[0]||(n[0]=[t("path",{d:"M14.095479,10.316482L22.286354,1h-1.940718l-7.115352,8.087682L7.551414,1H1l8.589488,12.231093L1,23h1.940717 l7.509372-8.542861L16.448587,23H23L14.095479,10.316482z M11.436522,13.338465l-0.871624-1.218704l-6.924311-9.68815h2.981339 l5.58978,7.82155l0.867949,1.218704l7.26506,10.166271h-2.981339L11.436522,13.338465z"},null,-1)])],2))}}),ie={class:"mx-auto w-full max-w-[400px] border border-[#e9e9e9] bg-white px-5 pb-6 pt-8 text-center","data-testid":"profile-card"},ne=["src","alt"],ce={key:1,class:"mx-auto flex size-[152px] items-center justify-center rounded-full bg-[#f5f8fa] text-[80px] text-[#c9c9c9]"},ue={class:"mt-4 line-clamp-2 text-[20px] font-bold leading-[30px] md:text-[24px]"},de={key:2,class:"mt-2 text-[16px] font-normal text-[#757575]"},pe={class:"mt-5 flex items-center justify-between gap-3 border-t border-[#e9e9e9] pt-4"},me={class:"text-[22px] font-semibold"},fe={class:"ml-1.5 text-[13px] uppercase tracking-wide text-[#757575]"},he={key:0,class:"-mr-2 flex shrink-0 items-center"},_e=["href","aria-label"],xe=E({__name:"ProfileCard",props:{user:{},articlesCount:{}},setup(e){const s=e,{t:n}=I(),a=g(()=>[{key:"website",icon:"fas fa-globe"},{key:"facebook",icon:"fab fa-facebook-f"},{key:"twitter",icon:"fab fa-twitter"},{key:"youtube",icon:"fab fa-youtube"},{key:"instagram",icon:"fab fa-instagram"}].map(r=>{var d;return{...r,url:(d=s.user.social)==null?void 0:d[r.key]}}).filter(r=>!!r.url)),i=g(()=>`/profile/${(s.user.username??"").replace(/\./g,"-")}/${s.user.id}/articles`);return(r,d)=>(l(),o("section",ie,[e.user.profile_photo?(l(),o("img",{key:0,src:e.user.profile_photo,alt:e.user.fullname??"",class:"mx-auto
1size-[152px] rounded-full object-cover",width:"152",height:"152"},null,8,ne)):(l(),o("div",ce,[...d[0]||(d[0]=[t("i",{class:"fas fa-user"},null,-1)])])),t("h1",ue,u(e.user.fullname),1),e.user.username?(l(),o("h2",de," @"+u(e.user.username),1)):f("",!0),v(oe,{html:e.user.bio},null,8,["html"]),t("div",pe,[v(p(T),{href:i.value,class:"text-left hover:text-primary","data-testid":"profile-posts-stat"},{default:R(()=>[t("span",me,u(e.articlesCount),1),t("span",fe,u(p(n)("USER_PROFILE_POSTS")),1)]),_:1},8,["href"]),a.value.length?(l(),o("ul",he,[(l(!0),o(P,null,C(a.value,c=>(l(),o("li",{key:c.key},[t("a",{href:c.url,target:"_blank",rel:"noopener noreferrer",class:"flex size-11 items-center justify-center text-[18px] text-[#757575] hover:text-primary","aria-label":c.key},[c.key==="twitter"?(l(),O(re,{key:0,size:"w-[17px]"})):(l(),o("i",{key:1,class:w(c.icon)},null,2))],8,_e)]))),128))])):f("",!0)])]))}}),be={class:"bg-white px-5 py-16 text-center","data-testid":"profile-empty-state"},ve={class:"text-2xl font-semibold"},ge={class:"mx-auto mt-3 max-w-[560px] text-[15px] text-[#666]"},ye={href:"/",class:"mt-5 inline-block border border-[#c9c9c9] px-6 py-2 text-[15px] hover:border-primary hover:text-primary"},ke=E({__name:"ProfileEmptyState",setup(e){const{t:s}=I();return(n,a)=>(l(),o("section",be,[t("h2",ve,u(p(s)("USER_PROFILE_NO_ACTIVITY_AVAILABLE_YET")),1),t("p",ge,u(p(s)("USER_PROFILE_START_BROWSING")),1),t("a",ye,u(p(s)("USER_PROFILE_BROWSE_JAPAN_TRAVEL")),1)]))}}),$e={key:0,"data-testid":"profile-gallery"},Ee={class:"border-b border-[#e9e9e9] pb-2 text-2xl font-semibold"},Re={class:"relative mt-4 overflow-hidden"},Ie=["src","alt"],we={class:"absolute inset-x-0 bottom-0 bg-black/55 p-3 text-white"},Le={class:"line-clamp-2 text-[16px] font-medium"},Pe={key:0,class:"mt-1 text-[13px]"},Oe=E({__name:"ProfileGallery",props:{articles:{}},setup(e){const s=e,{t:n}=I(),a=$(0),i=g(()=>s.articles.filter(x=>x.gallery_image||x.thumbnail)),r=g(()=>i.value[a.value]??null),d=g(()=>i.value.length>1),c=x=>{const h=i.value.length;h!==0&&(a.value=(a.value+x+h)%h)};return(x,h)=>i.value.length?(l(),o("section",$e,[t("h2",Ee,u(p(n)("USER_PROFILEBOX_GALLERY")),1),t("div",Re,[r.value?(l(),O(p(T),{key:0,href:r.value.url,"data-testid":"profile-gallery-slide"},{default:R(()=>{var _;return[t("img",{src:r.value.gallery_image??r.value.thumbnail??"",alt:r.value.title,class:"aspect-[3/2] w-full object-cover",loading:"lazy"},null,8,Ie),t("div",we,[t("h3",Le,u(r.value.title),1),(_=r.value.prefecture)!=null&&_.name?(l(),o("p",Pe,[h[2]||(h[2]=t("i",{class:"fas fa-map-marker-alt mr-1"},null,-1)),L(u(r.value.prefecture.name),1)])):f("",!0)])]}),_:1},8,["href"])):f("",!0),d.value?(l(),o(P,{key:1},[t("button",{type:"button",class:"absolute left-2 top-1/2 -translate-y-1/2 rounded-full bg-black/45 px-3 py-2 text-white hover:bg-black/70","aria-label":"Previous","data-testid":"profile-gallery-prev",onClick:h[0]||(h[0]=_=>c(-1))},[...h[3]||(h[3]=[t("i",{class:"fas fa-chevron-left"},null,-1)])]),t("button",{type:"button",class:"absolute right-2 top-1/2 -translate-y-1/2 rounded-full bg-black/45 px-3 py-2 text-white hover:bg-black/70","aria-label":"Next","data-testid":"profile-gallery-next",onClick:h[1]||(h[1]=_=>c(1))},[...h[4]||(h[4]=[t("i",{class:"fas fa-chevron-right"},null,-1)])])],64)):f("",!0)])])):f("",!0)}}),Se=["disabled"],B="block w-full bg-primary px-4 py-[13px] text-center text-[16px] text-white transition-colors duration-300 hover:bg-primary-hover focus:bg-primary-hover",F=E({__name:"ProfileViewAllButton",props:{href:{},disabled:{type:Boolean}},emits:["click"],setup(e){return(s,n)=>e.href?(l(),O(p(T),{key:0,href:e.href,class:w(B)},{default:R(()=>[M(s.$slots,"default")]),_:3},8,["href"])):(l(),o("button",{key:1,type:"button",class:w([B,"disabled:opacity-50"]),disabled:e.disabled,onClick:n[0]||(n[0]=a=>s.$emit("click"))},[M(s.$slots,"default")],10,Se))}}),Te={key:0,"data-testid":"profile-liked"},Ce={class:"border-b border-[#e9e9e9] pb-2 text-2xl font-semibold"},Ae={key:0,class:"mt-4"},Ne=E({__name:"ProfileLiked",props:{block:{},userId:{},firstName:{}},setup(e){const s=e,{t:n}=I(),a=$([...s.block.items]),i=$(!1),r=g(()=>a.value.length<s.block.total),d=async()=>
1{if(!(i.value||!r.value)){i.value=!0;try{const c=await D.get(`/api/profile/${s.userId}/liked?offset=${a.value.length}`);a.value=[...a.value,...(c==null?void 0:c.items)??[]]}catch{}finally{i.value=!1}}};return(c,x)=>a.value.length?(l(),o("section",Te,[t("h2",Ce,u(p(n)("USER_PROFILE_LIKED_BY",{name:e.firstName})),1),(l(!0),o(P,null,C(a.value,h=>(l(),o("div",{key:h.id,class:"border-b border-[#e9e9e9]","data-testid":"profile-liked-row"},[v(V,{"article-card":h,template:"search",bookmark:p(H)(h.type)},null,8,["article-card","bookmark"])]))),128)),r.value?(l(),o("div",Ae,[v(F,{disabled:i.value,"data-testid":"profile-liked-more",onClick:d},{default:R(()=>[L(u(p(n)("PROFILE_VIEW_ALL_LIKED_ARTICLE")),1)]),_:1},8,["disabled"])])):f("",!0)])):f("",!0)}}),Ue={key:0,"data-testid":"profile-map"},Fe={class:"border-b border-[#e9e9e9] pb-2 text-2xl font-semibold"},Me=E({__name:"ProfileMap",props:{map:{},firstName:{}},setup(e){const s=e,{t:n}=I(),a=$(!1),i=g(()=>{var r,d,c;return(((d=(r=s.map)==null?void 0:r.all)==null?void 0:d.length)??0)>0&&!!((c=s.map)!=null&&c.center)});return(r,d)=>i.value?(l(),o("section",Ue,[t("h2",Fe,u(p(n)("USER_PROFILE_MAP_TITLE",{name:e.firstName})),1),t("div",{class:"mt-4 aspect-[3/2] w-full cursor-pointer",onClick:d[0]||(d[0]=c=>a.value=!0)},[v(K,{lat:e.map.center.lat,lng:e.map.center.lng,zoom:e.map.zoom,markers:e.map.static,width:600,height:400,"data-testid":"profile-map-static"},null,8,["lat","lng","zoom","markers"])]),v(Q,{open:a.value,"onUpdate:open":d[1]||(d[1]=c=>a.value=c),markers:e.map.all,center:e.map.center,zoom:e.map.zoom},null,8,["open","markers","center","zoom"])])):f("",!0)}}),ze={key:0,"data-testid":"profile-reports"},Be={class:"flex items-baseline justify-between border-b border-[#e9e9e9] pb-2"},He={class:"text-2xl font-semibold"},Ve={class:"flex gap-4 text-[15px]"},De={class:"mt-4"},je=E({__name:"ProfileReports",props:{popular:{},latest:{},articlesUrl:{}},setup(e){const s=e,{t:n}=I(),a=$("popular"),i=g(()=>a.value==="popular"?s.popular.slice(0,4):s.latest.slice(0,4)),r=g(()=>s.popular.length>0||s.latest.length>0);return(d,c)=>r.value?(l(),o("section",ze,[t("div",Be,[t("h2",He,u(p(n)("USER_PROFILE_REPORTS")),1),t("ul",Ve,[t("li",null,[t("button",{type:"button",class:w(a.value==="popular"?"font-semibold text-[#404040]":"text-[#757575]"),"data-testid":"profile-tab-popular",onClick:c[0]||(c[0]=x=>a.value="popular")},u(p(n)("USER_PROFILE_POPULAR")),3)]),t("li",null,[t("button",{type:"button",class:w(a.value==="latest"?"font-semibold text-[#404040]":"text-[#757575]"),"data-testid":"profile-tab-latest",onClick:c[1]||(c[1]=x=>a.value="latest")},u(p(n)("USER_PROFILE_LATEST")),3)])])]),t("div",null,[(l(!0),o(P,null,C(i.value,x=>(l(),o("div",{key:x.id,class:"border-b border-[#e9e9e9]","data-testid":"profile-report-row"},[v(V,{"article-card":x,template:"search",bookmark:p(H)(x.type)},null,8,["article-card","bookmark"])]))),128))]),t("div",De,[v(F,{href:e.articlesUrl,"data-testid":"profile-view-all-articles"},{default:R(()=>[L(u(p(n)("USER_PROFILE_VIEW_ALL_ARTICLES")),1)]),_:1},8,["href"])])])):f("",!0)}}),We={key:0,"data-testid":"profile-reviews"},Ge={class:"border-b border-[#e9e9e9] pb-2 text-2xl font-semibold"},Je=["src","alt"],Ye={class:"min-w-0"},Xe={key:0,class:"block text-[12px] uppercase leading-none tracking-wide text-[#757575]"},qe={class:"mt-1 text-[18px] font-bold leading-snug"},Ke={class:"mt-1 flex items-center gap-2"},Qe=["aria-label"],Ze={key:0,class:"text-[13px] text-[#757575]"},et={class:"mt-2 text-[15px] italic text-[#404040]"},tt={key:1,class:"mt-2 text-[13px] text-[#757575]"},st={key:0,class:"mt-4"},lt=E({__name:"ProfileReviews",props:{block:{},userId:{}},setup(e){const s=e,{t:n}=I(),a=$([...s.block.items]),i=$(!1),r=g(()=>a.value.length<s.block.total),d=async()=>{if(!(i.value||!r.value)){i.value=!0;try{const _=await D.get(`/api/profile/${s.userId}/reviews?offset=${a.value.length}`);a.value=[...a.value,...(_==null?void 0:_.items)??[]]}catch{}finally{i.value=!1}}},c=_=>Array.from({length:5},(k,m)=>m<Math.round(_)),x=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],h=_=>{if(!_)return"";const k=new Date(_);return Number.isNaN(k.getTime())?"":`${x[k.getUTCMonth()]} ${k.getUTCDate()}, ${k.getUTCFullYear()}`};return(_,k)=>a.value.length?(l(),o("section",We,[t("h2",Ge,u(p(n)("USER_PROFILE_SPOT_REVIEW")),1),(l(!0),o(P,null,C(a.value,m=>{var A,N,S,b;return l(),o("div",{key:m.id,class:"flex gap-4 border-b border-[#e9e9e9] py-4","data-testid":"profile-review-row"},[(A=m.place)!=null&&A.url?(l(),O(p(T),{key:0,href:m.place.url,class:"shrink-0"},{default:R(()=>{var y,U;return[(y=m.place)!=null&&y.thumbnail?(l(),o("img",{key:0,src:m.place.thumbnail,alt:((U=m.place)==null?void 0:U.title)??"",class:"size-[115px] object-cover",loading:"lazy"},null,8,Je)):f("",!0)]}),_:2},1032,["href"])):f("",!0),t("div",Ye,[(N=m.place)!=null&&N.category?(l(),o("span",Xe,u(m.place.category),1)):f("",!0),t("h3",qe,[(S=m.place)!=null&&S.url?(l(),O(p(T),{key:0,href:m.place.url,class:"hover:text-primary"},{default:R(()=>{var y;return[L(u((y=m.place)==null?void 0:y.title),1)]}),_:2},1032,["href"])):f("",!0)]),t("div",Ke,[t("span",{class:"text-[13px] text-[#f5a623]","aria-label":`${m.rating} out of 5`},[(l(!0),o(P,null,C(c(m.rating),(y,U)=>(l(),o("i",{key:U,class:w(y?"fas fa-star":"far fa-star")},null,2))),128))],8,Qe),m.posted_at?(l(),o("time",Ze,u(h(m.posted_at)),1)):f("",!0)]),t("p",et,"â"+u(m.comment)+"â",1),(b=m.place)!=null&&b.prefecture?(l(),o("p",tt,[k[0]||(k[0]=t("i",{class:"fas fa-map-marker-alt mr-1"},null,-1)),L(u(m.place.prefecture),1)])):f("",!0)])])}),128)),r.value?(l(),o("div",st,[v(F,{disabled:i.value,"data-testid":"profile-reviews-more",onClick:d},{default:R(()=>[L(u(p(n)("PROFILE_VIEW_ALL_REVIEW")),1)]),_:1},8,["disabled"])])):f("",!0)])):f("",!0)}}),at={key:0,class:"bg-white px-5 py-10 text-center","data-testid":"profile-signup-cta"},ot={class:"text-2xl font-semibold"},rt={class:"mx-auto mt-3 max-w-[640px] text-[15px] text-[#666]"},it={href:"/about/community",class:"ml-1 underline hover:text-primary"},nt={href:"/register",class:"mt-5 inline-block bg-primary px-6 py-3 text-[15px] font-medium text-white hover:opacity-90"},ct=E({__name:"ProfileSignupCta",setup(e){const{t:s}=I(),n=X(),a=g(()=>{var i,r;return!!((r=(i=n.props)==null?void 0:i.auth)!=null&&r.user)});return(i,r)=>a.value?f("",!0):(l(),o("section",at,[t("h2",ot,u(p(s)("USER_PROFILE_BECOME_AN_INFLUENCER")),1),t("p",rt,[L(u(p(s)("USER_PROFILE_SHARE_EXPERIENCE"))+" ",1),t("a",it,u(p(s)("USER_PROFILE_READ_MORE")),1)]),t("a",nt,u(p(s)("USER_PROFILE_START_WRITING_NOW")),1)]))}}),ut={key:0},dt=["srcset"],pt=["src"],mt={class:"flex flex-col items-center"},ft={class:"xl:w-container w-full px-4 xl:px-0"},ht={class:"flex flex-col gap-8 py-8 md:flex-row md:items-start"},_t={class:"w-full md:w-[292.5px] md:shrink-0"},xt={class:"flex min-w-0 flex-1 flex-col gap-10"},bt={class:"grid grid-cols-1 gap-8 md:grid-cols-2"},zt=E({__name:"Profile",props:{user:{},articlesCount:{},popular:{},latest:{},map:{},reviews:{},liked:{},schema:{}},setup(e){const s=e,n=g(()=>(s.user.fullname??s.user.username??"").split(" ")[0]),a=g(()=>`/profile/${(s.user.username??"").replace(/\./g,"-")}/${s.user.id}/articles`),i=g(()=>s.popular.length>0||s.latest.length>0||s.liked.items.length>0||s.reviews.total>0);return(r,d)=>(l(),O(j,{schema:e.schema,background:"white"},{default:R(()=>[e.user.cover_photo?(l(),o("picture",ut,[e.user.cover_photo_mobile?(l(),o("source",{key:0,media:"(max-width: 767px)",srcset:e.user.cover_photo_mobile,width:"450",height:"150"},null,8,dt)):f("",!0),t("img",{src:e.user.cover_photo,alt:"",class:"h-[150px] w-full object-cover md:h-[300px]",width:"1320",height:"300","data-testid":"profile-banner"},null,8,pt)])):f("",!0),t("div",mt,[t("div",ft,[t("div",ht,[t("aside",_t,[v(xe,{user:e.user,"articles-count":e.articlesCount},null,8,["user","articles-count"])]),t("div",xt,[i.value?(l(),o(P,{key:1},[v(je,{popular:e.popular,latest:e.latest,"articles-url":a.value},null,8,["popular","latest","articles-url"]),t("div",bt,[v(Oe,{articles:e.popular},null,8,["articles"]),v(Me,{map:e.map,"first-name":n.value},null,8,["map","first-name"])]),v(lt,{block:e.reviews,"user-id":e.user.id},null,8,["block","user-id"]),v(Ne,{block:e.liked,"user-id":e.user.id,"first-name":n.value},null,8,["block","user-id","first-name"])],64)):(l(),O(ke,{key:0}))])])]),v(ct)])]),_:1},8,["schema"]))}});
1export{zt 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.