1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[281],{54090:function(e,t,s){s.d(t,{F:function(){return u}});var n=s(31549),a=s(44194),l=s(3308),c=s.n(l),r=s(47744),i=s(77608),o=s(4682),d=s(54581),m=e=>{let{page:t,provider:s=""}=e,{t:l}=(0,i.$G)("common");return(0,a.useEffect)(()=>{"welcome"===t?window.location.assign("/app/welcome"):"home"===t?window.location.assign("/app/home"):"consent-screen"===t?(0,r.signIn)(s,{callbackUrl:"".concat("https://www.kalendme.com","/app/home")},"prompt=consent"):window.location.assign(function(e){if(e){let t="".concat("https://www.kalendme.com").concat(e);return"/auth/signin?callbackUrl=".concat(encodeURIComponent(t))}return"/auth/signin"}(c().pathname))}),(0,n.jsxs)(o.bb,{children:[(0,n.jsx)(d.Z,{className:"text-center m-1",variant:"h4",children:l("welcome"===t?"redirect.welcome":"home"===t?"redirect.home":"consent-screen"===t?"redirect.consent-screen":"redirect.login")}),(0,n.jsx)(d.Z,{className:"text-center m-1",variant:"body1",children:l("redirect.subtitle")})]})},x=s(51836);let u=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=s=>{var a,l;return(null==s?void 0:s.session)?t||(0,x.U)(null==s?void 0:null===(a=s.session)||void 0===a?void 0:a.user)?t&&(0,x.U)(null==s?void 0:null===(l=s.session)||void 0===l?void 0:l.user)?(0,n.jsx)(m,{page:"home"}):(0,n.jsx)(e,{...s,session:s.session}):(0,n.jsx)(m,{page:"welcome"}):(0,n.jsx)(m,{page:"signin"})};return s.displayName="WithAuthComponent",s}},88809:function(e,t,s){s.d(t,{Z:function(){return a}});var n=s(31549),a=function(e){let{className:t="",label:s="",checked:a,onClick:l,disabled:c=!1}=e;return(0,n.jsxs)("label",{className:"cursor-pointer inline-flex items-center ".concat(t),children:[(0,n.jsx)("input",{disabled:c,type:"checkbox",className:"form-checkbox ".concat(c?"cursor-wait text-gray-500":"cursor-pointer text-primary-500"),checked:a,onChange:l}),(0,n.jsx)("span",{className:"ml-2 text-gray-700",children:s})]})}},2179:function(e,t,s){s.d(t,{k:function(){return j}});var n=s(31549),a=s(86365),l=s(53502),c=s(77179),r=s.n(c),i=s(77608),o=s(78747),d=s(88809),m=s(44194),x=s(13433),u=s(74452);let h=e=>{let{value:t,onChange:s,className:a="",isEndTime:l=!1,hasError:c=!1}=e,{t:r}=(0,i.$G)("common"),[d,h]=(0,m.useState)(!1),p=(()=>{let e=[];for(let t=0;t<24;t++)for(let s=0;s<60;s+=15){let n="".concat(t.toString().padStart(2,"0"),":").concat(s.toString().padStart(2,"0"));e.push({value:n,label:n,isSpecial:!1})}return l&&e.push({value:"24:00",label:"24:00",isSpecial:!0}),e})(),f=e=>{s(e),h(!1)},j=()=>{h(!1)};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("button",{type:"button",onClick:()=>h(!0),className:"\n w-full px-3 py-2 text-left bg-white border rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500\n ".concat(c?"border-red-500 ring-red-500":"border-gray-300","\n ").concat(a,"\n "),children:(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsx)("span",{className:"block truncate",children:"24:00"===t?(0,n.jsxs)("span",{className:"flex items-center",children:["24:00",(0,n.jsx)("span",{className:"ml-2 text-xs text-blue-600 bg-blue-50 px-2 py-0.5 rounded-full",children:r("timePicker.nextDay")})]}):t}),(0,n.jsx)(o.Ix0,{className:"h-5 w-5 text-gray-400"})]})}),(0,n.jsx)(x.u,{appear:!0,show:d,as:m.Fragment,children:(0,n.jsxs)(u.Vq,{as:"div",className:"relative z-50",onClose:j,children:[(0,n.jsx)(x.u.Child,{as:m.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,n.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),(0,n.jsx)("div",{className:"fixed inset-0 overflow-y-auto",children:(0,n.jsx)("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:(0,n.jsx)(x.u.Child,{as:m.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:(0,n.jsxs)(u.Vq.Panel,{className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,n.jsx)(u.Vq.Title,{as:"h3",className:"text-lg font-medium leading-6 text-gray-900",children:l?r("timePicker.selectEndTime"):r("timePicker.selectStartTime")}),(0,n.jsx)("button",{onClick:j,className:"text-gray-400 hover:text-gray-600 transition-colors",children:(0,n.jsx)(o.FU5,{
1className:"h-6 w-6"})})]}),(0,n.jsx)("div",{className:"max-h-80 overflow-y-auto",children:(0,n.jsx)("div",{className:"space-y-1",children:p.map(e=>(0,n.jsxs)("button",{type:"button",onClick:()=>f(e.value),className:"\n w-full text-left px-4 py-3 rounded-lg hover:bg-gray-50 transition-colors flex items-center justify-between\n ".concat(t===e.value?"bg-blue-50 text-blue-900 font-medium":"text-gray-700","\n ").concat(e.isSpecial?"border-t border-gray-200 mt-2 pt-4":"","\n "),children:[(0,n.jsx)("span",{className:"font-mono text-sm",children:e.label}),e.isSpecial&&(0,n.jsx)("div",{className:"flex items-center space-x-2",children:(0,n.jsx)("span",{className:"text-xs text-blue-600 bg-blue-100 px-2 py-1 rounded-full",children:r("timePicker.nextDay")})})]},e.value))})}),l&&(0,n.jsx)("div",{className:"mt-4 p-3 bg-blue-50 rounded-lg border border-blue-200",children:(0,n.jsxs)("div",{className:"text-sm text-blue-800",children:[(0,n.jsx)("div",{className:"font-medium",children:r("timePicker.midnightOption")}),(0,n.jsx)("div",{className:"text-xs mt-1 text-blue-600",children:r("timePicker.availabilityContinues")})]})})]})})})})]})})]})};var p=s(54581);let f=(e,t)=>{switch(t){case"0":return e("common:weekdays.sunday");case"1":return e("common:weekdays.monday");case"2":return e("common:weekdays.tuesday");case"3":return e("common:weekdays.wednesday");case"4":return e("common:weekdays.thursday");case"5":return e("common:weekdays.friday");case"6":return e("common:weekdays.saturday")}},j=e=>{let{weekAvailability:t,setWeekAvailability:s,className:c}=e,{t:m}=(0,i.$G)("home"),x=(e,n)=>{let a=r()(t);e?a[n]=[{start:"08:00",end:"18:00"}]:a[n]=[],s(a)},u=(e,n,a,l)=>{let c=r()(t);l?c[e][n].end=a:c[e][n].start=a,s(c)},j=e=>{let n=r()(t);n[e].push({start:"08:00",end:"18:00"}),s(n)},v=(e,n)=>{let a=r()(t);a[e].splice(n,1),s(a)},b=e=>t[e].length>0&&t[e].some(y)?"text-red-500":"",y=e=>"24:00"===e.end?!(0,a.Z)(e.start,"HH:mm",(0,l.Z)(0))||"24:00"===e.start:(0,a.Z)(e.start,"HH:mm",(0,l.Z)(0))>=(0,a.Z)(e.end,"HH:mm",(0,l.Z)(0)),g=e=>"24:00"===e.end?(0,n.jsxs)("div",{className:"text-xs text-blue-600 mt-1",children:["⨠",m("common:timePicker.availabilityExtends")]}):null;return(0,n.jsx)("div",{className:" ".concat(c),children:(0,n.jsx)("div",{className:"w-full",children:Object.entries(t).map(e=>{let[t,s]=e,a=0===s.length;return(0,n.jsx)("div",{className:"p-4 ".concat("6"!==t&&"border-b pb-4"," ").concat("0"!==t&&"pt-4"),children:(0,n.jsxs)("div",{className:"mb-2.5 flex flex-row space-x-2.5",children:[(0,n.jsxs)("div",{className:"w-full grid grid-cols-1 sm:grid-cols-6 flex-wrap",children:[(0,n.jsx)("div",{className:"sm:col-span-2",children:(0,n.jsxs)("div",{onClick:()=>x(a,t),className:"cursor-pointer font-bold flex flex-row",children:[(0,n.jsx)(d.Z,{checked:!a,onClick:()=>{}}),(0,n.jsx)(p.Z,{className:b(t),children:f(m,t)})]})}),!a&&(0,n.jsx)("div",{className:"mt-4 sm:col-span-4 sm:mt-0 flex flex-col space-y-3",children:s.map((e,s)=>{let a=y(e);return(0,n.jsxs)("div",{className:"flex flex-col",children:[(0,n.jsxs)("div",{className:"flex flex-row space-x-2.5 items-center",children:[(0,n.jsxs)("div",{className:"w-full flex flex-row space-x-1 items-center",children:[(0,n.jsx)(h,{value:e.start,onChange:e=>u(t,s,e,!1),className:"w-full",hasError:a}),(0,n.jsx)(p.Z,{className:"".concat(a?"text-red-500":"text-gray-500"," px-2"),children:"to"}),(0,n.jsx)(h,{value:e.end,onChange:e=>u(t,s,e,!0),className:"w-full",isEndTime:!0,hasError:a})]}),(0,n.jsx)(o.ZkW,{className:"cursor-pointer text-xl hover:text-primary-500 transition-all",onClick:()=>v(t,s)})]}),g(e),a&&(0,n.jsxs)("div",{className:"text-xs text-red-500 mt-1",children:["â ï¸ ",m("common:timePicker.startTimeBeforeEnd")]})]},"".concat(t,"-").concat(s,"-").concat(e.toString()))})})]}),(0,n.jsxs)("div",{className:"flex items-center justify-center",children:[a&&(0,n.jsx)(p.Z,{className:"text-gray-500 italic",children:m("availableHours.unavailable")}),!a&&(0,n.jsx)("div",{className:"w-full flex items-center justify-center",children:(0,n.jsx)(o.x06,{className:"cursor-pointer text-2xl hover:text-primary-500 transition-all",onClick:()=>j(t)})})]})]})},t)})})})}},51836:function(e,t,s){s.d(t,{U:function(){return n},n:function(){return a}});let n=e=>!!e.urlString&&!!e.timeZone&&!!e.weekAvailability&&!!e.language,a=(e,t)=>!!e&&e.some(e=>e.role===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.