1import{e as re}from"./dRWvvzk9.js";import{m as y,b as w,a as m,c1 as le,d as V,y as N,e as s,n as k,S as G,t as P,Y as B,j as S,A as x,F as O,v as Y,q as I,R as ce,c as W,G as E,aX as K,K as L,aU as ie,L as q,W as Z,aY as de,H as ue,a7 as ve,b8 as me,V as X,w as j,P as R,au as he,aj as oe,a0 as J}from"./v2o05Z3A.js";import{a as fe,C as De}from"./Cf8y9ntY.js";import{C as ye,u as se,a as Q,v as _e}from"./CZ45u21C.js";const ge="TRACKING";function Nt(e){if(!Object.prototype.hasOwnProperty.call(e,"eventName"))throw new Error("eventName is required");return re.$emit(ge,e)}const Ft=(e,t=1,a=!1)=>{let n="";switch(e){case"available_language":n="event_languages";break;case"categories_tree":if(a){n=`category_pill_level_${t}`;break}n=`category_level_${t}`;break;case"feature":n="feature";break;case"service":n="service";break}return n},Bt=e=>e<10?`0${e}`:`${e}`,Tt=e=>{const[t="",a="",n=""]=e.split("-");return{year:parseInt(t),month:parseInt(a)-1,day:parseInt(n)}},Rt=(e,t,a)=>{const n=new Date(e);return new Intl.DateTimeFormat(t,a).format(n)};function Wt(e,t){let a;return function(...n){clearTimeout(a),a=setTimeout(()=>{e.apply(this,n)},t)}}const we={xmlns:"http://www.w3.org/2000/svg",class:"search_svg__tc-svg-icon",viewBox:"0 0 24 24"};function be(e,t){return m(),y("svg",we,[...t[0]||(t[0]=[w("path",{d:"M9.844 18.681a8.82 8.82 0 0 1-6.255-2.586C.14 12.646.14 7.035 3.59 3.587c3.449-3.45 9.06-3.45 12.509 0 3.448 3.448 3.448 9.06 0 12.508a8.82 8.82 0 0 1-6.255 2.586m0-15.919a7.06 7.06 0 0 0-5.007 2.071 7.09 7.09 0 0 0 0 10.015 7.09 7.09 0 0 0 10.014 0c2.76-2.76 2.76-7.254 0-10.015a7.06 7.06 0 0 0-5.007-2.07Z"},null,-1),w("path",{d:"M22.117 23a.88.88 0 0 1-.623-.258l-6.645-6.645a.882.882 0 0 1 1.247-1.247l6.645 6.644A.882.882 0 0 1 22.118 23zM7.53 8.56a.88.88 0 0 1-.881-.881c0-.234.093-.458.258-.624L9.01 4.952A.882.882 0 0 1 10.258 6.2L8.155 8.303a.88.88 0 0 1-.624.258Zm3.433 1.437a.88.88 0 0 1-.882-.882c0-.234.093-.458.258-.624l2.103-2.103a.882.882 0 0 1 1.248 1.248l-2.103 2.103a.88.88 0 0 1-.623.258z"},null,-1)])])}const At={render:be},Se={xmlns:"http://www.w3.org/2000/svg",class:"calendar_svg__tc-svg-icon",viewBox:"0 0 36 36"};function Me(e,t){return m(),y("svg",Se,[...t[0]||(t[0]=[w("path",{d:"M31.439 3.358h-4.506V2.27c0-.7-.562-1.27-1.256-1.27-.689 0-1.252.571-1.252 1.272V3.36H11.572V2.272c0-.701-.562-1.272-1.253-1.272-.693 0-1.255.571-1.255 1.272V3.36h-4.51C2.595 3.36 1 4.986 1 6.988v24.379C1 33.37 2.596 35 4.557 35h26.884C33.404 35 35 33.37 35 31.369V6.99c0-2.003-1.598-3.632-3.561-3.632m1.049 8.835v19.176c0 .568-.424 1.037-.963 1.085H4.555c-.579 0-1.049-.487-1.049-1.085V12.193zM3.508 6.99c0-.6.47-1.088 1.049-1.088l4.507.002v1.088c0 .7.562 1.271 1.255 1.271.69 0 1.253-.571 1.253-1.272V5.902h12.854V6.99c0 .701.562 1.272 1.252 1.272.692 0 1.256-.571 1.256-1.272V5.902h4.506c.58 0 1.051.489 1.051 1.088v2.662H3.508z"},null,-1)])])}const pe={render:Me},$e={xmlns:"http://www.w3.org/2000/svg",class:"chart-bar_svg__tc-svg-icon",viewBox:"0 0 36 36"};function ke(e,t){return m(),y("svg",$e,[...t[0]||(t[0]=[w("path",{d:"M7.375 11.625a3.19 3.19 0 0 1 3.188 3.188v17a3.188 3.188 0 0 1-6.376 0v-17a3.19 3.19 0 0 1 3.188-3.188M18 1a3.19 3.19 0 0 1 3.188 3.188v27.625a3.188 3.188 0 0 1-6.376-.001V4.188A3.19 3.19 0 0 1 18 1m10.625 19.125a3.19 3.19 0 0 1 3.188 3.188v8.5a3.189 3.189 0 0 1-6.376 0v-8.5a3.19 3.19 0 0 1 3.188-3.188"},null,-1)])])}const Ce={render:ke},z=le(),$={$emit:e=>{z.emit("tracking",e)},$on(e){z.on("tracking",e)},$off:e=>{z.off("tracking",e)}},Pe={class:"preview-selector"},Ie=V({__name:"PreviewSelector",props:{modelValue:{default:"month"}},emits:["update:modelValue"],setup(e,{emit:t}){const a=t,n=B("calendarStore"),o=S({get:()=>e.modelValue,set:l=>{$.$emit({eventName:"calendar_header",eventValue:"select_layout",eventAttribute:l==="month"?"specific_date":"whole_month"}),a("update:modelValue",l)}}),c=S(()=>n.state.i18n.specificDate),i=S(()=>n.state.i18n.wholeMonth);return(l,h)=>(m(),y("div",Pe,[w("button",{class:N(["preview-selector__btn",{"preview-selector__btn--selected":s(o)==="month"}]),onClick:h[0]||(h[0]=f=>o.value="month")},[k(s(pe),{class:"preview-selector__icon"}),G(" "+P(s(c)),1)],2),w("button",{class:N(["preview-selector__btn",{"preview-selector__btn--selected":s(o)==="year"}]),onClick:h[1]||(h[1]=f=>o.value="year")},[k(s(Ce),{class:"preview-selector__icon"}),G(" "+P(s(i)),1)],2)]))}}),Ve=Object.assign(x(Ie,[["__scopeId","data-v-2525023e"]]),{__name:"CalendarPreviewSelector"});function xe(e){const t=new Date(e);return t.setDate(1),t.setHours(0),t.setMinutes(0),t.setSeconds(0),t}function Oe(e){const t=new Date(e);return t.setMonth(t.getMonth()+1),t.setDate(0),t.setHours(23),t.setMinutes(59),t.setSeconds(59),t}const U={Sun:0,Mon:1,Tue:2,Wed:3,Thu:4,Fri:5,Sat:6};function Ye(e,t){const a=[...t];let n;for(let o=0;o<U[e];o++)n=a.shift(),a.push(n);return a}function Ne(e){return[0,6].map(a=>(a-U[e]+7)%7)}function ee(e,t){return(e.getDay()-U[t]+7)%7}function F(e,t){return!!(e&&t&&e.year===t.year&&e.month===t.month&&e.day===t.day)}function T(e,t){if(!e||!t)return!1;const a=new Date(e.year,e.month,e.day).getTime(),n=new Date(t.year,t.month,t.day).getTime();return a>=n}const Fe=({month:e,year:t},a)=>{const n=new Date(t,e),o=xe(n),c=Oe(n),i=Math.ceil((ee(o,a)+c.getDate())/7),l=new Date(o);l.setDate(-1*ee(l,a)+1);const h=Array.from({length:i},()=>[]);for(let f=0;f<i;f++)for(let M=0;M<7;M++)h[f][M]={day:l.getDate(),month:l.getMonth(),year:l.getFullYear()},l.setDate(l.getDate()+1);return h},te=({month:e,year:t})=>{const a=new Date(t,e-1);return{year:a.getFullYear(),month:a.getMonth()}},ae=({month:e,year:t})=>{const a=new Date(t,e+1);return{year:a.getFullYear(),month:a.getMonth()}},Be={class:"month-selector"},Te=["aria-label","disabled"],Re=["aria-label","value"],We=["value"],Ae=["aria-label","value"],Ee=["value"],Le=["aria-label","disabled"],je=V({__name:"MonthSelector",props:{yearSelector:{type:Boolean,default:!0}},setup(e){const t=B("calendarStore"),a=S(()=>t.state.currentMonthPreview),n=S(()=>{const d=t.state.i18n.months;return Array.from({length:12},(_,r)=>({id:r,name:d[r]}))}),o=S(()=>{const d=new Date().getFullYear();return t.state.allowPastDates?Array.from({length:10},(_,r)=>d+r-5):Array.from({length:5},(_,r)=>d+r)}),c=S(()=>te(a.value).year<o.value[0]),i=S(()=>ae(a.value).year>o.value[o.value.length-1]);function l(d){const _=new Date().setMonth(d);$.$emit({eventName:"calendar_specific_dates",eventValue:"month",eventAttribute:new Intl.DateTimeFormat("en-gb",{month:"long"}).format(_)}
1),t.actions.setCurrentMonthPreview?.(t,{month:d,year:a.value.year})}function h(d){$.$emit({eventName:"calendar_specific_dates",eventValue:"year",eventAttribute:d.toString()}),t.actions.setCurrentMonthPreview?.(t,{month:a.value.month,year:d})}function f(){$.$emit({eventName:"calendar_specific_dates",eventValue:"month_previous"}),t.actions.setCurrentMonthPreview?.(t,te(a.value))}function M(){$.$emit({eventName:"calendar_specific_dates",eventValue:"month_next"}),t.actions.setCurrentMonthPreview?.(t,ae(a.value))}return(d,_)=>(m(),y("div",Be,[w("button",{"aria-label":s(t).state.i18n.prevMonth,class:"month-selector__btn",disabled:s(c),"data-test":"prev-month-btn",onClick:f},[k(s(fe),{class:"month-selector__chevron"})],8,Te),w("select",{"aria-label":s(t).state.i18n.monthSelector,class:"month-selector__select month-selector__select--month","data-test":"month-selector",value:s(a).month,onChange:_[0]||(_[0]=r=>l(parseInt(r.target.value,10)))},[(m(!0),y(O,null,Y(s(n),r=>(m(),y("option",{key:r.name+r.id,"data-test":"option-month",value:r.id},P(r.name),9,We))),128))],40,Re),e.yearSelector?(m(),y("select",{key:0,"aria-label":s(t).state.i18n.yearSelector,class:"month-selector__select month-selector__select--year",value:s(a).year,"data-test":"year-selector",onChange:_[1]||(_[1]=r=>h(parseInt(r.target.value,10)))},[(m(!0),y(O,null,Y(s(o),r=>(m(),y("option",{key:r,"data-test":"option-year",value:r},P(r),9,Ee))),128))],40,Ae)):I("",!0),w("button",{"aria-label":s(t).state.i18n.nextMonth,class:"month-selector__btn",disabled:s(i),"data-test":"next-month-btn",onClick:M},[k(s(De),{class:"month-selector__chevron"})],8,Le)]))}}),ze=Object.assign(x(je,[["__scopeId","data-v-42444797"]]),{__name:"CalendarMonthPreviewComponentsMonthSelector"}),He=["aria-label","aria-disabled","disabled"],qe=V({__name:"DateCard",props:{date:{},isStartDate:{type:Boolean,default:!1},isEndDate:{type:Boolean,default:!1},isSelected:{type:Boolean,default:!1},isInSelectedRange:{type:Boolean,default:!1},isDifferentMonthDate:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1}},emits:["selected","mouseenter","mouseleave"],setup(e,{emit:t}){const a=t,n=B("calendarStore"),o=S(()=>{const c={weekday:"long",year:"numeric",month:"long",day:"numeric"},i=new Date(e.date.year,e.date.month,e.date.day),l=n.state.locale;let h="";return e.isStartDate?h=n.state.i18n.from:e.isEndDate&&(h=n.state.i18n.to),h?`${h} ${i.toLocaleDateString(l,c)}`:i.toLocaleDateString(l,c)});return(c,i)=>(m(),y("button",{tabindex:"0","data-test":"date-card","aria-label":s(o),"aria-disabled":e.isDisabled,class:N(["date-card",{"date-card--in-range":e.isInSelectedRange,"date-card--start":e.isStartDate,"date-card--end":e.isEndDate}]),disabled:e.isDisabled,onClick:i[0]||(i[0]=l=>a("selected")),onMouseenter:i[1]||(i[1]=l=>a("mouseenter")),onFocusin:i[2]||(i[2]=l=>a("mouseenter")),onMouseleave:i[3]||(i[3]=l=>a("mouseleave")),onFocusout:i[4]||(i[4]=l=>a("mouseleave"))},[w("div",{class:N(["date-card__value",{"date-card__value--selected":e.isSelected,"date-card__value--in-range":e.isInSelectedRange,"date-card__value--different-month":e.isDifferentMonthDate}])},P(e.date.day),3)],42,He))}}),Ue=Object.assign(x(qe,[["__scopeId","data-v-53050941"]]),{__name:"CalendarMonthPreviewComponentsDateCard"}),Ge={class:"month-preview__container"},Ke={class:"month-preview__header"},Ze=V({__name:"MonthPreview",props:{startDate:{},endDate:{},yearSelector:{type:Boolean,default:!0}},emits:["dateSelected"],setup(e,{emit:t}){const a=t,n=B("calendarStore"),o=E("startDate"),c=E(),i=new Date,l=S(()=>n.state.currentMonthPreview),h=S(()=>Fe({month:l.value.month,year:l.value.year},n.state.firstDayOfWeek)),f=S(()=>Ye(n.state.firstDayOfWeek,n.state.i18n.weekdaysShort)),M=S(()=>Ne(n.state.firstDayOfWeek));function d(D){const u={startDate:e.startDate,endDate:e.endDate};return u.startDate===void 0?(u.startDate=D,u.endDate=void 0):o.value==="startDate"||o.value==="endDate"&&T(e.startDate,D)?(u.startDate=D,T(u.startDate,u.endDate)&&(u.endDate=void 0)):o.value==="endDate"&&(u.endDate=D),u}function _(D){$.$emit({eventName:"calendar_specific_dates",eventValue:"day",eventAttribute:D.day.toString()}),n.state.rangeSelector?r(D):a("dateSelected",{startDate:D})}function r(D){const u=d(D),C=!F(e.startDate,u.startDate),b=!F(e.endDate,u.endDate);C?o.value="endDate":b&&(o.value="startDate"),a("dateSelected",u)}function g(D){const u=d(D);
1u.startDate&&u.endDate?c.value={startDate:u.startDate,endDate:u.endDate}:c.value=void 0}function v(D){const u=c.value?c.value.startDate:e.startDate,C=c.value?c.value.endDate:e.endDate;return T(D,u)&&T(C,D)}function p(D){return n.state.allowPastDates?!1:!T(D,{year:i.getFullYear(),month:i.getMonth(),day:i.getDate()})}return(D,u)=>(m(),y("div",null,[k(ze,{"year-selector":e.yearSelector},null,8,["year-selector"]),w("div",Ge,[w("div",Ke,[(m(!0),y(O,null,Y(s(f),(C,b)=>(m(),y("div",{key:b,class:N(["month-preview__weekday",{"month-preview__weekday--weekend":s(M).includes(b)}])},P(C),3))),128))]),w("div",{class:"month-preview__body",style:ce({height:`calc(${s(h).length} * min(var(--core-size-1200), (100vw - 2 * var(--padding-60)) / 7) + ${s(h).length-1} * var(--core-size-0100))`})},[(m(!0),y(O,null,Y(s(h),C=>(m(),y("div",{key:`week-${C[0].year}-${C[0].month}-${C[0].day}`,class:"month-preview__week"},[(m(!0),y(O,null,Y(C,b=>(m(),W(Ue,{key:`${b.year}-${b.month}-${b.day}`,class:"month-preview__day","is-in-selected-range":v(b),"is-selected":s(F)(e.startDate,b)||s(F)(e.endDate,b),"is-start-date":s(F)(s(c)?s(c).startDate:e.startDate,b),"is-end-date":s(F)(s(c)?s(c).endDate:e.endDate,b),"is-different-month-date":b.month!==s(l).month||b.year!==s(l).year,"is-disabled":p(b),date:b,onSelected:A=>_(b),onMouseenter:A=>g(b),onMouseleave:u[0]||(u[0]=A=>c.value=void 0)},null,8,["is-in-selected-range","is-selected","is-start-date","is-end-date","is-different-month-date","is-disabled","date","onSelected","onMouseenter"]))),128))]))),128))],4)])]))}}),Xe=Object.assign(x(Ze,[["__scopeId","data-v-01f4fd2a"]]),{__name:"CalendarMonthPreview"}),Je={class:"year-preview"},Qe={class:"year-preview__selector-wrapper"},et=["aria-label","value"],tt=["value"],at={class:"year-preview__months"},nt=["aria-label","disabled","onClick"],ot=V({__name:"YearPreview",props:{selectedMonth:{}},emits:["monthSelected"],setup(e,{emit:t}){const a=t,n=B("calendarStore"),o=new Date,c=S(()=>n.state.currentMonthPreview),i=S(()=>{const d=n.state.i18n.months;return Array.from({length:12},(_,r)=>({id:r,name:d[r]||"",disabled:h(r)}))}),l=S(()=>{const d=new Date().getFullYear();return n.state.allowPastDates?Array.from({length:10},(_,r)=>d+r-5):Array.from({length:5},(_,r)=>d+r)});function h(d){if(!n.state.allowPastDates){const _=n.state.currentMonthPreview.year;return o.getFullYear()<=_&&d<o.getMonth()}return!1}function f(d){$.$emit({eventName:"calendar_whole_month",eventValue:"year",eventAttribute:d.toString()}),n.actions.setCurrentMonthPreview?.(n,{month:c.value.month,year:d}),e.selectedMonth&&M(e.selectedMonth,d)}function M(d,_){if(d!==c.value.month){const g=new Date().setMonth(d);$.$emit({eventName:"calendar_whole_month",eventValue:"month",eventAttribute:new Intl.DateTimeFormat("en-gb",{month:"long"}).format(g)})}const r={month:d,year:_||c.value.year};a("monthSelected",r)}return(d,_)=>(m(),y("div",Je,[w("div",Qe,[w("select",{"aria-label":s(n).state.i18n.yearSelector,class:N(["year-preview__select","year-preview__select--year"]),value:s(c).year,"data-test":"year-selector",onChange:_[0]||(_[0]=r=>f(parseInt(r.target.value,10)))},[(m(!0),y(O,null,Y(s(l),r=>(m(),y("option",{key:r,value:r},P(r),9,tt))),128))],40,et)]),w("div",at,[(m(!0),y(O,null,Y(s(i),r=>(m(),y("button",{key:r.name+r.id,"aria-label":r.name,disabled:r.disabled,class:N(["year-preview__month-btn",{"year-preview__month-btn--selected":e.selectedMonth===r.id}]),onClick:g=>M(r.id)},P(r.name),11,nt))),128))])]))}}),st=Object.assign(x(ot,[["__scopeId","data-v-80fac370"]]),{__name:"CalendarYearPreview"}),rt={class:"calendar-footer"},lt=["disabled"],ct=["disabled"],it=V({__name:"Footer",props:{saveDisabled:{type:Boolean,default:!1}},emits:["clearDates","save"],setup(e,{emit:t}){const a=t,n=B("calendarStore"),o=S(()=>n.state.i18n.clearDatesCta),c=S(()=>n.state.i18n.selectDate||n.state.i18n.saveCta);function i(){$.$emit({eventName:"calendar_footer",eventValue:"clear_dates"}),a("clearDates")}function l(){$.$emit({eventName:"calendar_footer",eventValue:"save"}),a("save")}return(h,f)=>(m(),y("div",rt,[w("button",{class:"calendar-footer__clear-btn",disabled:e.saveDisabled,onClick:f[0]||(f[0]=M=>i())},P(s(o)),9,lt),w("button",{"data-test":"save-btn",disabled:e.saveDisabled,class:"calendar-footer__save-btn",onClick:f[1]||(f[1]=M=>l())},P(s(c)),9,ct)]))}}),dt=Object.assign(x(it,[["__scopeId","data-v-7c9eac6f"]]),{__name:"CalendarFooter"}),ut=e=>{const t=new Intl.DateTimeFormat(e,{month:"long"}),a=[],n=new Date(2e3,0,1);for(let o=0;o<12;o++)n.setMonth(o),a.push(t.format(n));return a},ne=(e,t)=>{const a=new Intl.DateTimeFormat(e,{weekday:t}),n=[],o=new Date(2e3,0,1);o.setDate(o.getDate()-o.getDay());for(let c=0;c<7;
1c++)n.push(a.format(o)),o.setDate(o.getDate()+1);return n},vt=(e,t)=>{const a=ut(e),n=ne(e,"short"),o=ne(e,"long");return{months:a,weekdaysShort:n,weekdaysLong:o,...t}},H={locale:"en",firstDayOfWeek:"Mon",allowPastDates:!1,rangeSelector:!1,wholeMonthSelector:!1,hideYearSelector:!1,translations:{saveCta:"Save",clearDatesCta:"Clear dates",nextMonth:"Next month",prevMonth:"Previous month",monthSelector:"Select month",yearSelector:"Select year",close:"Close",from:"From",to:"To",specificDate:"Specific date",wholeMonth:"Whole month",addDates:"addDates"}},mt=e=>({...H,...e,translations:e.translations?{...H.translations,...e.translations}:H.translations}),ht=function(e){const t=new Date,a=mt(e);return{state:{locale:a.locale,firstDayOfWeek:a.firstDayOfWeek,currentMonthPreview:{year:t.getFullYear(),month:t.getMonth()},allowPastDates:a.allowPastDates,rangeSelector:a.rangeSelector,i18n:vt(a.locale,a.translations)},actions:{setCurrentMonthPreview(o,{year:c,month:i}){o.state.currentMonthPreview.year=c,o.state.currentMonthPreview.month=i}}}},ft={class:"calendar"},Dt={class:"calendar__body"},yt=V({__name:"Calendar",props:{range:{default:()=>({})},date:{default:()=>({})},locale:{},firstDayOfWeek:{},translations:{},allowPastDates:{type:Boolean,default:!1},rangeSelector:{type:Boolean,default:!0},wholeMonthSelector:{type:Boolean,default:!1},hideYearSelector:{type:Boolean,default:!1}},emits:["rangeSelected","dateSelected","dateCleared"],setup(e,{emit:t}){const a=t,n=({rangeSelector:v,range:p,date:D})=>{const u={};return v?(p.from&&(u.startDate=p.from),p.to&&(u.endDate=p.to)):D&&(u.startDate=D),u},o={firstDayOfWeek:e.firstDayOfWeek,locale:e.locale,translations:e.translations,allowPastDates:e.allowPastDates,rangeSelector:e.rangeSelector,wholeMonthSelector:e.wholeMonthSelector,hideYearSelector:e.hideYearSelector};Object.keys(o).forEach(v=>{o[v]===void 0&&delete o[v]});const c=K(ht(o)),i=n({rangeSelector:e.rangeSelector,range:e.range,date:e.date});i.startDate&&i.startDate.year!=null&&i.startDate.month!=null&&c.actions.setCurrentMonthPreview(c,{year:i.startDate.year,month:i.startDate.month});const l=E(i),h=E("month"),f=K({selectedMonth:void 0});de("calendarStore",c);const M=S(()=>h.value==="year"&&f.selectedMonth===void 0?!0:!l.value.startDate);L(()=>e.range,v=>{l.value=n({rangeSelector:e.rangeSelector,range:v,date:e.date})},{deep:!0}),L(()=>e.date,v=>{l.value=n({rangeSelector:e.rangeSelector,range:e.range,date:v})},{deep:!0});function d(v){f.selectedMonth=void 0,l.value=v}function _(v){const p=new Date,D=new Date(v.year,v.month,1);!c.state.allowPastDates&&p.getFullYear()===v.year&&p.getMonth()===v.month&&D.setDate(p.getDate());const u=new Date(D);u.setMonth(u.getMonth()+1),u.setDate(0),l.value={startDate:{day:D.getDate(),month:D.getMonth(),year:D.getFullYear()},endDate:{day:u.getDate(),month:u.getMonth(),year:u.getFullYear()}},f.selectedMonth=v.month,c.actions.setCurrentMonthPreview(c,{month:v.month,year:v.year})}function r(){if(c.state.rangeSelector){if(!l.value.startDate){$.$emit({eventName:"calendar_range_selected",eventValue:"from",eventAttribute:void 0}),$.$emit({eventName:"calendar_range_selected",eventValue:"to",eventAttribute:void 0}),a("rangeSelected",void 0);return}const v={from:{...l.value.startDate},to:l.value.endDate?{...l.value.endDate}:{...l.value.startDate}};$.$emit({eventName:"calendar_range_selected",eventValue:"from",eventAttribute:`${v.from.day}-${v.from.month+1}-${v.from.year}`}),$.$emit({eventName:"calendar_range_selected",eventValue:"to",eventAttribute:`${v.to.day}-${v.to.month+1}-${v.to.year}`}),a("rangeSelected",v)}else{const v=l.value.startDate;if(!v){$.$emit({eventName:"calendar_date_selected",eventValue:void 0}),a("dateSelected",void 0);return}$.$emit({eventName:"calendar_date_selected",eventValue:`${v.day}-${v.month+1}-${v.year}`}),a("dateSelected",{...l.value.startDate})}}function g(){l.value={},f.selectedMonth=void 0,a("dateCleared")}return(v,p)=>{const D=Ve,u=Xe,C=st,b=dt;return m(),y("div",ft,[w("div",Dt,[e.wholeMonthSelector&&e.rangeSelector?(m(),W(D,{key:0,modelValue:s(h),"onUpdate:modelValue":p[0]||(p[0]=A=>ie(h)?h.value=A:null)},null,8,["modelValue"])):I("",!0),q(k(u,{"start-date":s(l).startDate,"end-date":s(l).endDate,"year-selector":!e.hideYearSelector,onDateSelected:d}
1,null,8,["start-date","end-date","year-selector"]),[[Z,s(h)==="month"]]),e.wholeMonthSelector?q((m(),W(C,{key:1,"selected-month":s(f).selectedMonth,onMonthSelected:_},null,8,["selected-month"])),[[Z,s(h)==="year"]]):I("",!0)]),k(b,{"save-disabled":s(M),onClearDates:g,onSave:r},null,8,["save-disabled"])])}}}),_t=Object.assign(x(yt,[["__scopeId","data-v-c3f89f57"]]),{__name:"Calendar"}),gt=["aria-labelledby"],wt=["id"],bt=["aria-label"],St={class:"drawer-panel__body"},Mt={key:0,class:"drawer-panel__footer"},pt=V({__name:"DrawerPanel",props:{open:{type:Boolean},overlay:{type:Boolean,default:!0},closeLabel:{default:"Close"}},emits:["update:open","close"],setup(e,{emit:t}){const a=he(),n=oe("panelRef"),o=e,c=t,{activate:i,deactivate:l}=se(n);function h(){c("update:open",!1),c("close")}function f(g){g.key==="Escape"&&h()}let M="";function d(){M=document.body.style.overflow,document.body.style.overflow="hidden",document.addEventListener("keydown",f),i()}function _(){document.body.style.overflow=M,document.removeEventListener("keydown",f),l()}function r(g){g?d():_()}return L(()=>o.open,r),ue(()=>{r(o.open)}),ve(()=>{_()}),(g,v)=>(m(),W(me,{to:"body"},[k(X,{name:"drawer-panel__animation--fade"},{default:j(()=>[e.open&&e.overlay?(m(),y("div",{key:0,class:"drawer-panel__overlay",onClick:h})):I("",!0)]),_:1}),k(X,{name:"drawer-panel__animation--slide"},{default:j(()=>[e.open?(m(),y("dialog",{key:0,ref_key:"panelRef",ref:n,class:"drawer-panel",open:"","aria-labelledby":s(a)},[w("div",{id:s(a),class:"drawer-panel__header"},[R(g.$slots,"header",{},void 0,!0),w("button",{class:"drawer-panel__close","aria-label":e.closeLabel,onClick:h},[k(s(ye))],8,bt)],8,wt),w("div",St,[R(g.$slots,"default",{},void 0,!0)]),g.$slots.footer?(m(),y("div",Mt,[R(g.$slots,"footer",{},void 0,!0)])):I("",!0)],8,gt)):I("",!0)]),_:3})]))}}),$t=Object.assign(x(pt,[["__scopeId","data-v-1aa2e517"]]),{__name:"CalendarDrawerPanel"}),kt={class:"calendar-selector"},Ct=["aria-expanded"],Pt={key:0},It=V({__name:"Selector",props:{open:{type:Boolean},mobile:{type:Boolean,default:!1},title:{default:void 0},range:{default:()=>({})},date:{default:void 0},locale:{default:void 0},firstDayOfWeek:{default:void 0},translations:{default:void 0},allowPastDates:{type:Boolean,default:!1},rangeSelector:{type:Boolean,default:!0},wholeMonthSelector:{type:Boolean,default:!1},hideYearSelector:{type:Boolean,default:!1}},emits:["update:open","range-selected","date-selected","date-cleared"],setup(e,{emit:t}){const a=e,n=t,o=S(()=>({range:a.range,date:a.date,locale:a.locale,firstDayOfWeek:a.firstDayOfWeek,translations:a.translations,allowPastDates:a.allowPastDates,rangeSelector:a.rangeSelector,wholeMonthSelector:a.wholeMonthSelector,hideYearSelector:a.hideYearSelector})),c=oe("dropdownRef"),{activate:i,deactivate:l}=se(c,{onEscape:f});L(()=>a.open,g=>{a.mobile||(g?i():l())});function h(){n("update:open",!a.open)}function f(){n("update:open",!1)}function M(){a.open&&!a.mobile&&f()}function d(g){n("range-selected",g),f()}function _(g){n("date-selected",g),f()}function r(){n("date-cleared")}return(g,v)=>{const p=_t,D=$t;return q((m(),y("div",kt,[w("button",{type:"button",class:"calendar-selector__trigger","aria-expanded":e.open,onClick:h},[R(g.$slots,"trigger",{isOpen:e.open},()=>[k(s(Q),{class:"calendar-selector__trigger-icon"}),e.title?(m(),y("span",Pt,P(e.title),1)):I("",!0)],!0)],8,Ct),e.open&&!e.mobile?(m(),y("dialog",{key:0,ref_key:"dropdownRef",ref:c,class:"calendar-selector__dropdown",open:""},[k(p,J(s(o),{onRangeSelected:d,onDateSelected:_,onDateCleared:r}),null,16)],512)):I("",!0),e.mobile?(m(),W(D,{key:1,open:e.open,"close-label":e.translations?.close,onClose:f},{header:j(()=>[R(g.$slots,"drawer-header",{},()=>[k(s(Q),{class:"calendar-selector__drawer-icon"}),w("span",null,P(e.translations?.selectDate),1)],!0)]),default:j(()=>[k(p,J(s(o),{onRangeSelected:d,onDateSelected:_,onDateCleared:r}),null,16)]),_:3},8,["open","close-label"])):I("",!0)])),[[s(_e),M]])}}}),Et=Object.assign(x(It,[["__scopeId","data-v-88d7d56c"]]),{__name:"CalendarSelector"}),Lt=e=>({saveCta:e("label.save"),clearDatesCta:e("label.clearDates"),nextMonth:e("label.nextMonth"),prevMonth:e("label.previousMonth"),monthSelector:e("label.salectMonth"),yearSelector:e("label.selectYear"),close:e("label.close"),from:e("date.from"),to:e("date.to"),specificDate:e("label.specificDate"),wholeMonth:e("label.wholeMonth"),addDates:e("label.add_dates"),selectDate:e("label.selectDate")});export{At as S,Et as _,Bt as a,Lt as c,Tt as f,Ft as g,Rt as i,Wt as s,Nt as t};
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.