PageSourceSearch

https://junglebosstours.com/_nuxt/CalendarTour.dbafed1e.js

js junglebosstours.com collected 2026-10-02 20:08:13 UTC 4,489 bytes, 1 lines download raw bytes

1import E from"./ArrowSlider.78d69bcd.js";import H from"./CalendarPerson.fe785f31.js";import{c as K,r as M,K as z,o as P,q as v,e as p,f as n,t as y,h as u,M as W,N as m,Y as A,j as T,F as Y,i as j,n as R,l as G}from"./entry.3e24fff4.js";import{n as B,p as I,t as J}from"./date.6fe628c6.js";const Q={class:"space-y-4"},U={class:"flex items-center justify-between"},X={class:"gap-x-1 text-gray-900 title-3"},Z={class:"flex items-center gap-x-3"},ee={class:"grid grid-cols-7 mt-4 font-sans font-medium text-center gap-x-2"},ae={class:"grid grid-cols-7 text-gray-500"},te=["onClick"],ne={key:0,class:"w-fit gap-x-[3px] flex mx-auto"},oe={class:"text-gray-700 body-3"},se={class:"flex gap-x-2"},le={class:"text-gray-700 body-3"},re={__name:"CalendarTour",props:{modelValue:Object,tourRezdy:Array},emits:["update:modelValue","updateCalendar","chooseTime"],setup(L,{emit:S}){const{locale:$}=K(),i=L,f=S,x=new Date,_=new Date(x.getMonth()+1+"/"+x.getDate()+"/"+x.getFullYear()),l=M(i.modelValue),s=M(i.modelValue??_),C=$.value==="he",N=C?["ראשון","שני","שלישי","רביעי","חמישי","שישי","שבת"]:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],b=M([]),O=(t,a)=>{l.value=t.date,D(a),f("update:modelValue",l.value)},q=t=>{var a;return!!(t&&(t==null?void 0:t.getTime())===((a=l==null?void 0:l.value)==null?void 0:a.getTime()))};z(()=>s.value,()=>{V(),k(),f("update:modelValue",null)}),z(()=>i.tourRezdy,()=>{var t;if(!i.modelValue||!l.value){for(const a of b.value)if(a.date&&r(a.date.getTime()).seatsAvailable>0&&a.date.getTime()>_.getTime()){l.value=a.date,D(r(a.date.getTime())),f("update:modelValue",l.value);return}}else D(r((t=l.value)==null?void 0:t.getTime()))},{deep:!0});const k=()=>{const t=new Date(b.value.find(o=>o.number!==null).date),a=new Date(b.value.slice(-1)[0].date);f("updateCalendar",{start:`${t.getFullYear()}-${t.getMonth()+1}-${t.getDate()} 00:00:00`,end:`${a.getFullYear()}-${a.getMonth()+1}-${a.getDate()+1} 00:00:00`})},r=t=>{const a=B(I(t));if(!i.tourRezdy)return!1;for(const o of i.tourRezdy){const c=I(o.startTimeLocal);if(B(c).getTime()===a.getTime())return{available:!0,...o}}return{available:!1}},D=t=>{f("chooseTime",t)};P(()=>{V(),(!l.value||!i.tourRezdy)&&k()});const F=t=>{let a=t?s.value.getMonth()+2:s.value.getMonth(),o=s.value.getFullYear();a>12&&(a=1,o++),a<1&&(a=12,o--),s.value=new Date(a+"/"+s.value.getDate()+"/"+o)};function V(){const t=s.value.getFullYear(),a=s.value.getMonth(),o=new Date(t,a+1,0).getDate(),c=new Date(t,a,1).getDay();let g=[];for(let d=0;d<o;d++){const e={number:d+1,date:new Date(`${a+1}/${d+1}/${t}`)};g=[...g,e]}const h=C?c:c===0?c+6:c-1;for(let d=0;d<h;d++)g=[{number:null,date:null},...g];b.value=g}return(t,a)=>{var g,h,d;const o=E,c=H;return v(),p("div",Q,[n("div",U,[n("div",X,y(u(J)(u(s),u($),!1)),1),n("div",Z,[W(n("button",{class:"btn-slider !w-8 !h-8",onClick:a[0]||(a[0]=A(e=>F(!1),["prevent"]))},[n("span",null,[T(o)])],512),[[m,new Date(`${((g=u(s))==null?void 0:g.getMonth())+1}/${(h=u(s))==null?void 0:h.getDate()}/${(d=u(s))==null?void 0:d.getFullYear()}`).getTime()>u(_).getTime()]]),n("button",{class:"btn-slider !w-8 !h-8",onClick:a[1]||(a[1]=A(e=>F(!0),["prevent"]))},[n("span",null,[T(o,{class:"rotate-180"})])])])]),n("div",null,[n("ul",ee,[(v(!0),p(Y,null,j(u(N),(e,w)=>(v(),p("li",{key:w,class:"h-6 text-gray-900 label-1"},y(e),1))),128))]),n("div",ae,[(v(!0),p(Y,null,j(u(b),(e,w)=>(v(),p("div",{key:w},[n("div",{class:R(["relative flex flex-col justify-between text-center text-gray-400 duration-300 ease-in-out border border-gray-100 cursor-pointer aspect-1 lg:hover:bg-primary-50 label-1",{"bg-primary-50 border border-primary ":(e==null?void 0:e.date)&&q(e==null?void 0:e.date),"opacity-50 pointer-events-none":!(e!=null&&e.number)||(e==null?void 0:e.date)&&(!r(e==null?void 0:e.date.getTime()).available||r(e==null?void 0:e.date.getTime()).seatsAvailable<=0||(e==null?void 0:e.date.getTime())<u(_).getTime()-3600*24)}]),onClick:de=>O(e,r(e==null?void 0:e.date.getTime()))},[n("div",{class:R({"text-gray-900":e!=null&&e.date?r(e==null?void 0:e.date.getTime()).available:!1})},y(e==null?void 0:e.number),3),e!=null&&e.date&&r(e==null?void 0:e.date.getTime()).available&&r(e==null?void 0:e.date.getTime()).seatsAvailable>=0?(v(),p("div",ne,[T(c),n("span",oe,y((e==null?void 0:e.date)&&r(e==null?void 0:e.date.getTime()).seatsAvailable),1)])):G("",!0)],10,te)]))),128))])]),n("div",se,[T(c),n("div",le,y(t.$t("tour-detail.body.availability")),1)])])}}},ve=re;export{ve 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.