PageSourceSearch

https://en.japantravel.com/build/assets/Top-Ba8TxrLh.js

js japantravel.com collected 2026-09-24 17:21:14 UTC 6,874 bytes, 1 lines download raw bytes

1import{a1 as B,l as c,s as H,z as S,v as e,N as C,x,E as I,A as R,u as v,B as z,r as h,w as M,p as _,F as T,y as N,q as P,S as O,U as A,C as U,f as q,H as D}from"./vendor-vue-DgKPkTzM.js";import{N as j,P as K,A as W}from"./vendor-swiper-CmTBkzXo.js";import{u as X}from"./links-lgUQVf6P.js";import"./vendor-icons-C07lCRXW.js";import"./vendor-Dtr_Mrnh.js";const G={class:"relative aspect-[16/11] w-full max-w-[95px]"},J=["alt"],Q={class:"absolute -right-3 top-5 flex size-[25px] rotate-45 items-center justify-center bg-[#f1f1f1] transition-all group-hover:bg-primary group-hover:text-white rounded-[5px]"},Y={class:"-rotate-45 text-sm font-semibold rounded-[5px]"},Z={class:"text-sm text-[#656565] mt-2"},ee={class:"mr-2"},te={class:""},se={__name:"TopTenItem",props:{imageUrl:{type:String,required:!0},title:{type:String,required:!0},description:{type:String,required:!0},rank:{type:Number,required:!0},to:{type:String,required:!1},template:{type:String,default:"default",validator:r=>["default","destinations","event"].includes(r)},prefacture:{type:String,required:!1},event_date:{type:Object,required:!1},event_general_price:{type:Number,required:!1}},setup(r){const n=r,t={title:"text-sm line-clamp-1",desc:"mt-0.5 text-sm text-gray-500"},i=h({});n.template==="destinations"&&(i.value={title:"text-xl/[24px] font-semibold line-clamp-1"}),n.template==="event"&&(i.value={title:"!text-sm/[18px] font-semibold line-clamp-2",desc:"mt-0.5 text-sm text-gray-500 line-clamp-1"});const b={...t,...i.value};return(E,m)=>{const p=B("lazy");return c(),H(v(z),{href:r.to,class:"group flex h-[65px] w-full cursor-pointer items-start gap-8 bg-cover mx-0"},{default:S(()=>{var g,f;return[e("div",G,[C(e("img",{class:"h-full w-full object-cover rounded-[4px]",loading:"lazy",alt:r.title||"Event",width:"95",height:"65"},null,8,J),[[p,r.imageUrl]]),e("div",Q,[e("div",Y,x(r.rank),1)])]),e("div",null,[e("p",{class:I(b.title)},x(r.title),3),e("p",{class:I([b.desc,n.template==="event"?"hidden":"block"])},x(r.description),3),e("div",Z,[e("span",ee,[m[0]||(m[0]=e("i",{class:"fal fa-map-marker-alt mr-1"},null,-1)),R(" "+x(r.prefacture),1)]),e("span",te,[m[1]||(m[1]=e("i",{class:"fal fa-calendar mr-1"},null,-1)),e("span",null,x((f=(g=r.event_date)==null?void 0:g.information)==null?void 0:f.end),1)])])])]}),_:1},8,["href"])}}},ae={key:0,class:"bg-[#F5F8FA] w-full"},le={class:"mx-4 pt-[24px] pb-[24px] md:pt-[72px] md:pb-[68px] md:mx-8 xl:mx-auto xl:w-container"},re={class:"grid grid-cols-1 md:grid-cols-3 gap-5"},ne={key:1,class:"bg-[#F5F8FA] w-full"},ie={class:"relative mx-4 pt-[24px] pb-[24px] md:pt-[72px] md:pb-[68px] md:mx-8 xl:mx-auto xl:w-container"},oe={class:"flex flex-col sm:flex-row sm:items-center gap-4 sm:gap-0 mb-4 md:mb-8"},de={class:"text-[24px]/[24px] md:text-[32px]/[32px] font-bold text-[#000000]"},ue={class:"flex flex-row flex-wrap gap-2 sm:gap-0"},me=["onClick"],pe={class:"w-max"},ce={class:"top-events-slider relative py-0"},ve={class:"absolute right-1.5 top-[-64px] hidden md:block"},ge={__name:"Top",setup(r){const{t:n}=X(),t=D(),i=h([]),b=h(null),E=h(null),m=h("week"),p=h([{name:n("EVENT_FILTER_THIS_WEEK"),value:"week"},{name:n("EVENT_FILTER_THIS_MONTH"),value:"month"},{name:n("EVENT_FILTER_NEXT_3_MONTHS"),value:"3month"}]),g=l=>{var s,o,a,d,u,w,y,k;switch(m.value=l.value,l.value){case"week":i.value=((o=(s=t==null?void 0:t.props)==null?void 0:s.week)==null?void 0:o.items)||[];break;case"month":i.value=((d=(a=t==null?void 0:t.props)==null?void 0:a.month)==null?void 0:d.items)||[];break;case"3month":i.value=((w=(u=t==null?void 0:t.props)==null?void 0:u.threeMonths)==null?void 0:w.items)||[];break;default:i.value=((k=(y=t==null?void 0:t.props)==null?void 0:y.week)==null?void 0:k.items)||[];break}},f=l=>{const s=p.value.findIndex(o=>o.value===l);s>-1&&p.value.splice(s,1)},L=()=>{var s,o,a,d,u,w,y,k,F;p.value=[{name:n("EVENT_FILTER_THIS_WEEK"),value:"week"},{name:n("EVENT_FILTER_THIS_MONTH"),value:"month"},{name:n("EVENT_FILTER_NEXT_3_MONTHS"),value:"3month"}];const l=3;(((a=(o=(s=t==null?void 0:t.props)==null?void 0:s.week)==null?void 0:o.items)==null?void 0:a.length)??0)<l&&f("week"),(((w=(u=(d=t==null?void 0:t.props)==null?void 0:d.month)==null?void 0:u.items)==null?void 0:w.length)??0)<l&&f("month"),(((F=(k=(y=t==null?void 0:t.props)==null?void 0:y.threeMonths)==null?void 0:k.items)==null?void 0:F.length)??0)<l&&f("3month"),p.value.length>0?g(p.value[0]):(m.value="",i.value=[])},V=q(()=>{var l;return((l=t==null?void 0:t.props)==null?void 0:l.week)!=null}),$=q(()=>!V.value);return M(V,l=>{l&&L()},{immediate:!0}),(l,s)=>{var o;return $.value?(c(),_("div",ae,[e("div",le,[s[1]||(s[1]=e("div",{class:"h-8 bg-gray-200 rounded w-48 mb-8 animate-pulse"},null,-1)),e("div",re,[(c(),_(T,null,N(3,a=>e("div",{key:a,class:"rounded-lg overflow-hidden"},[...s[0]||(s[0]=[e("div",{class:"h-[200px] bg-gray-200 animate-pulse rounded-[4px]"},null,-1),e("div",{class:"pt-3"},[e("div",{class:"h-4 bg-gray-200 rounded w-3/4 mb-2 animate-pulse"}),e("div",{class:"h-4 bg-gray-200 rounded w-1/2 animate-pulse"})],-1)])])),64))])])])):((o=i.value)==null?void 0:o.length)>0?(c(),_("div",ne,[e("div",ie,[e("div",oe,[e("p",de,x(v(n)("EVENT_TOP_EVENTS_TITLE")),1),s[2]||(s[2]=e("div",{class:"hidden sm:block w-[1px] h-[32px] bg-black ml-4"},null,-1)),e("div",ue,[(c(!0),_(T,null,N(p.value,(a,d)=>(c(),_("p",{key:d,class:I(["flex cursor-pointer flex-nowrap items-center rounded-[4px] px-1 sm:px-2 md:px-4 text-base md:text-lg font-semibold text-black hover:text-primary",{"text-primary":m.value===a.value}]),onClick:u=>g(a)},[e("span",pe,x(a.name),1)],10,me))),128))])]),e("div",ce,[P(v(A),{modules:[v(j),v(K),v(W)],"space-between":20,pagination:{clickable:!0},navigation:{nextEl:b.value,prevEl:E.value},breakpoints:{490:{slidesPerView:1.2,spaceBetween:15},767:{slidesPerView:2.2,spaceBetween:20},991:{slidesPerView:3.2,spaceBetween:25}}},{default:S(()=>[(c(!0),_(T,null,N(i.value,(a,d)=>(c(),H(v(O),{key:d},{default:S(()=>{var u;
1return[P(se,{imageUrl:a.thumbnail,title:a.title,description:a.description||"",to:a.url,rank:d+1,prefacture:(u=a.prefecture)==null?void 0:u.name,event_date:a.event_date,event_general_price:a.event_general_price,template:"event"},null,8,["imageUrl","title","description","to","rank","prefacture","event_date","event_general_price"])]}),_:2},1024))),128))]),_:1},8,["modules","navigation"]),e("div",ve,[e("button",{ref_key:"navPrev",ref:E,"aria-label":"Previous slide",class:"mr-5 rounded-full border border-primary px-2 py-[7px] text-primary hover:bg-primary hover:text-white"},[...s[3]||(s[3]=[e("i",{class:"far fa-arrow-left"},null,-1)])],512),e("button",{ref_key:"navNext",ref:b,"aria-label":"Next slide",class:"rounded-full border border-primary px-2 py-[7px] text-primary hover:bg-primary hover:text-white"},[...s[4]||(s[4]=[e("i",{class:"far fa-arrow-right"},null,-1)])],512)])])])])):U("",!0)}}};export{ge 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.