"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8171],{97749:function(e,t,n){n.d(t,{Z:function(){return C}});var r=n(31461),a=n(7896),o=n(2784),i=n(99332);function c(e,t){const n=(0,a.Z)({},t);return Object.keys(e).forEach((r=>{if(r.toString().match(/^(components|slots)$/))n[r]=(0,a.Z)({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const o=e[r]||{},i=t[r];n[r]={},i&&Object.keys(i)?o&&Object.keys(o)?(n[r]=(0,a.Z)({},i),Object.keys(o).forEach((e=>{n[r][e]=c(o[e],i[e])}))):n[r]=i:n[r]=o}else void 0===n[r]&&(n[r]=e[r])})),n}var s=n(49863),u=n(408),l=n(65992),d=n(87742),f=n(35354),m=n(71626),p=n(38886),v=n(20411),h=n(51538);function g(e){return(0,h.ZP)("MuiButton",e)}var y=(0,v.Z)("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]);var D=o.createContext({});var E=o.createContext(void 0),S=n(52322);const b=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],T=e=>(0,a.Z)({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),A=(0,l.ZP)(m.Z,{shouldForwardProp:e=>(0,d.Z)(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${(0,p.Z)(n.color)}`],t[`size${(0,p.Z)(n.size)}`],t[`${n.variant}Size${(0,p.Z)(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})((({theme:e,ownerState:t})=>{var n,r;const o="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],i="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return(0,a.Z)({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":(0,a.Z)({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,u.Fq)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===t.variant&&"inherit"!==t.color&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,u.Fq)(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===t.variant&&"inherit"!==t.color&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,u.Fq)(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===t.variant&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:i,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},"contained"===t.variant&&"inherit"!==t.color&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":(0,a.Z)({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${y.focusVisible}`]:(0,a.Z)({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${y.disabled}`]:(0,a.Z)({color:(e.vars||e).palette.action.disabled},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"contained"===t.variant&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},"text"===t.variant&&{padding:"6px 8px"},"text"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main},"outlined"===t.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${(0,u.Fq)(e.palette[t.color].main,.5)}`},"contained"===t.variant&&{color:e.vars?e.vars.palette.text.primary:null==(n=(r=e.palette).getContrastText)?void 0:n.call(r,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:o,boxShadow:(e.vars||e).shadows[2]},"contained"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},"inherit"===t.color&&{color:"inherit",borderColor:"currentColor"},"small"===t.size&&"text"===t.variant&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"text"===t.variant&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"outlined"===t.variant&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"outlined"===t.variant&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"contained"===t.variant&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"contained"===t.variant&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})}),(({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${y.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${y.disabled}`]:{boxShadow:"none"}})),x=(0,l.ZP)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${(0,p.Z)(n.size)}`]]}})((({ownerState:e})=>(0,a.Z)({display:"inherit",marginRight:8,marginLeft:-4},"small"===e.size&&{marginLeft:-2},T(e)))),w=(0,l.ZP)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${(0,p.Z)(n.size)}`]]}})((({ownerState:e})=>(0,a.Z)({display:"inherit",marginRight:-4,marginLeft:8},"small"===e.size&&{marginRight:-2},T(e))));var C=o.forwardRef((function(e,t){const n=o.useContext(D),u=o.useContext(E),l=c(n,e),d=(0,f.i)({props:l,name:"MuiButton"}),{children:m,color:v="primary",component:h="button",className:y,disabled:T=!1,disableElevation:C=!1,disableFocusRipple:M=!1,endIcon:Z,focusVisibleClassName:I,fullWidth:N=!1,size:Y="medium",startIcon:k,type:U,variant:R="text"}=d,z=(0,r.Z)(d,b),_=(0,a.Z)({},d,{color:v,component:h,disabled:T,disableElevation:C,disableFocusRipple:M,fullWidth:N,size:Y,type:U,variant:R}),L=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,classes:c}=e,u={root:["root",i,`${i}${(0,p.Z)(t)}`,`size${(0,p.Z)(o)}`,`${i}Size${(0,p.Z)(o)}`,`color${(0,p.Z)(t)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${(0,p.Z)(o)}`],endIcon:["icon","endIcon",`iconSize${(0,p.Z)(o)}`]},l=(0,s.Z)(u,g,c);return(0,a.Z)({},c,l)})(_),O=k&&(0,S.jsx)(x,{className:L.startIcon,ownerState:_,children:k}),W=Z&&(0,S.jsx)(w,{className:L.endIcon,ownerState:_,children:Z}),H=u||"";return(0,S.jsxs)(A,(0,a.Z)({ownerState:_,className:(0,i.Z)(n.className,L.root,y,H),component:h,disabled:T,focusRipple:!M,focusVisibleClassName:(0,i.Z)(L.focusVisible,I),ref:t,type:U},z,{classes:L,children:[O,m,W]}))}))},21269:function(e,t){t.Z=function(e){return"string"===typeof e}},47746:function(e,t,n){n.d(t,{Z:function(){return i}});n(2784);var r=n(16933),a=n(49957),o=n(16912);function i(){const e=(0,r.Z)(a.Z);return e[o.Z]||e}},41958:function(e,t,n){var r,a;n.d(t,{k:function(){return a},p:function(){return r}}),function(e){e.ONE_TIME="ONE_TIME",e.DAILY="DAILY",e.WEEKDAYS="WEEKDAYS",e.WEEKENDS="WEEKENDS",e.WEEKLY="WEEKLY",e.DAYS_MONTHLY="DAYS_MONTHLY",e.DATES_MONTHLY="DATES_MONTHLY",e.YEARLY="YEARLY",e.PERIODIC="PERIODIC",e.CUSTOM_WEEKLY="CUSTOM_WEEKLY"}(r||(r={})),function(e){e.DAY="DAY",e.WEEK="WEEK",e.MONTH="MONTH",e.YEAR="YEAR"}(a||(a={}))},2816:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(95486),a=n(96170);function o(){var e=(0,a.Z)();return(0,r.Z)(e.breakpoints.down("sm"))}},6235:function(e,t,n){var r;n.d(t,{LY:function(){return i},Qc:function(){return u},Vb:function(){return s},Vh:function(){return l},Vx:function(){return f},ii:function(){return o},m:function(){return d},us:function(){return a}}),function(e){e.MONDAY="MONDAY",e.TUESDAY="TUESDAY",e.WEDNESDAY="WEDNESDAY",e.THURSDAY="THURSDAY",e.FRIDAY="FRIDAY",e.SATURDAY="SATURDAY",e.SUNDAY="SUNDAY"}(r||(r={}));var a={SUNDAY:0,MONDAY:1,TUESDAY:2,WEDNESDAY:3,THURSDAY:4,FRIDAY:5,SATURDAY:6},o=864e5,i=function(e){var t=e.getDay();return t===a[r.SUNDAY]||t===a[r.SATURDAY]},c=function(e){return a[e]},s=function(e,t){return 35-new Date(e,t,35).getDate()},u=function(e){var t=e.getTime();return t-t%o+1e3*(new Date).getTimezoneOffset()*60},l=function(e,t){var n=t?new Date(t.getTime()):new Date,r=c(e),a=n.getDate()+(7-n.getDay())+r;return n.setDate(a),n},d=function(e){return[r.SUNDAY,r.MONDAY,r.TUESDAY,r.WEDNESDAY,r.THURSDAY,r.FRIDAY,r.SATURDAY][e]},f=function(e,t,n){var r=c(n);return new Array(s(e,t)).fill(null).map((function(n,r){return new Date(e,t,r+1)})).filter((function(e){return e.getDay()===r}))}},86964:function(e,t,n){n.d(t,{Z:function(){return a}});var r="undefined"!==typeof document?document.createElement("div"):void 0;function a(e){return r?(r.innerHTML=e,r.textContent||r.innerText||""):e}},7629:function(e,t,n){n.d(t,{Z:function(){return A}});var r=n(89907),a=n(94828),o=n(80165),i=(0,r.ZP)("CustomerUISvgs/audio.svg"),c=(0,r.ZP)("CustomerUISvgs/doc.svg"),s=(0,r.ZP)("CustomerUISvgs/gif.svg"),u=(0,r.ZP)("CustomerUISvgs/pdf.svg"),l=(0,r.ZP)("CustomerUISvgs/xls.svg"),d=(0,r.ZP)("CustomerUISvgs/ppt.svg"),f=(0,r.ZP)("CustomerUISvgs/fallback.svg"),m=(0,r.ZP)("CustomerUISvgs/video.svg"),p=(0,r.ZP)("CustomerUISvgs/img.svg"),v=(0,r.ZP)("CustomerUISvgs/txt.svg"),h=/mp3|m4a|aac|flac|ogg|wav|webm|wma/,g=/doc|docx/,y=/gif/,D=/pdf/,E=/xls|xlsx/,S=/ppt|pptx/,b=/txt/,T=new RegExp(a.dH.join("|"));function A(e){var t=e.lastIndexOf(".");if(t<1)return null;var n=e.slice(t+1);return n.match(h)?i:n.match(g)?c:n.match(y)?s:n.match(D)?u:n.match(E)?l:n.match(S)?d:n.match(b)?v:(0,o.p3)(".".concat(n))?m:n.match(T)?p:f}},85620:function(e,t,n){var r=n(62230),a=n(52322),o=n(2784),i=n(12524),c=n.n(i),s=o.forwardRef((function(e,t){var n=e.className,o=e.children,i=e.direction,s=e.justify,u=e.alignItems,l=e.alignContent,d=e.wrap,f=e.style;return(0,a.jsx)("div",{className:c()(null!=n&&n),style:(0,r.Z)({display:"flex",flexDirection:i,justifyContent:s,alignItems:u,alignContent:l,flexWrap:d},f),ref:t,children:o})}));s.defaultProps={className:"",direction:"row",justify:"normal",alignItems:"normal",alignContent:"stretch",wrap:"wrap"},t.Z=s},13136:function(e,t,n){n.d(t,{Z:function(){return c}});var r=n(2784),a=n(44470),o=n(12951),i=function(e){return"undefined"!==typeof document&&localStorage.getItem(e)};function c(e){var t=e.id,n=e.title,c=void 0===n?"":n,s=e.subtitle,u=void 0===s?"":s,l=e.text,d=void 0===l?"":l,f=e.hidden,m=e.button,p=e.onlyShowOnce,v=(0,r.useContext)(a.a).editorActive,h=!v,g=(0,r.useState)(h),y=g[0],D=g[1],E=(0,r.useState)(!1),S=E[0],b=E[1],T=encodeURIComponent(t+c+u+d+JSON.stringify(m)),A=(!y||f||p&&i(T))&&!S;return(0,r.useEffect)((function(){var e=function(e){var a;if((null===e||void 0===e||null===(a=e.data)||void 0===a?void 0:a.popUpId)===t)switch(e.data.type){case o.ZP.OPEN_POP_UP:n();break;case o.ZP.CLOSE_POP_UP:r()}},n=function(){return b(!0)},r=function(){return b(!1)};return window.addEventListener("message",e),function(){return window.removeEventListener("message",e)}}),[t]),{hidePopUp:A,onClose:function(){if(!S&&(D(!1),p&&!i(T)&&!v))try{localStorage.setItem(T,"true")}catch(e){console.error("Failed to save cookie to local storage: ",e)}}}}},26362:function(e,t,n){function r(e){3===(e=e.replace(/^#/,"")).length&&(e=e.split("").map((function(e){return e+e})).join(""));var t=/^([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}function a(e,t){var n="0",r="0",a="0";return 4===(null===e||void 0===e?void 0:e.length)?(n="0x".concat(e[1]).concat(e[1]),r="0x".concat(e[2]).concat(e[2]),a="0x".concat(e[3]).concat(e[3])):7===(null===e||void 0===e?void 0:e.length)&&(n="0x".concat(e[1]).concat(e[2]),r="0x".concat(e[3]).concat(e[4]),a="0x".concat(e[5]).concat(e[6])),"rgba(".concat(+n,",").concat(+r,",").concat(+a,",").concat(t,")")}function o(e){var t=r(e);return t?function(e){var t=e.r/255,n=e.g/255,r=e.b/255,a=Math.max(t,n,r),o=Math.min(t,n,r),i=0,c=0,s=(a+o)/2;if(a!==o){var u=a-o;switch(c=s>.5?u/(2-a-o):u/(a+o),a){case t:i=(n-r)/u+(n<r?6:0);break;case n:i=(r-t)/u+2;break;case r:i=(t-n)/u+4}i/=6}return{h:Math.round(360*i),s:Math.round(100*c),l:Math.round(100*s)}}(t):null}function i(e){var t=e.h,n=e.s/100,r=e.l/100,a=(1-Math.abs(2*r-1))*n,o=t/60,i=a*(1-Math.abs(o%2-1)),c=0,s=0,u=0;o>=0&&o<1?(c=a,s=i,u=0):o>=1&&o<2?(c=i,s=a,u=0):o>=2&&o<3?(c=0,s=a,u=i):o>=3&&o<4?(c=0,s=i,u=a):o>=4&&o<5?(c=i,s=0,u=a):o>=5&&o<6&&(c=a,s=0,u=i);var l=r-a/2,d=Math.round(255*(c+l)),f=Math.round(255*(s+l)),m=Math.round(255*(u+l)),p=function(e){var t=e.toString(16);return 1===t.length?"0".concat(t):t};return"#".concat(p(d)).concat(p(f)).concat(p(m))}n.d(t,{a7:function(){return a},oo:function(){return r},rT:function(){return i},sE:function(){return o}})},4909:function(e,t,n){var r=n(67557),a=n(52322),o=(n(2784),n(73165)),i=n(12524),c=n.n(i),s=n(82888);t.Z=(0,o.Z)((function(e){return{container:{display:"inline-block",verticalAlign:"middle"},wrapper:{display:"flex",alignItems:"center",right:"inherit",width:"auto",cursor:"pointer"},hiddenCheckbox:{border:0,clip:"rect(0 0 0 0)",clippath:"inset(50%)",height:1,width:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap"},checkbox:{display:"inline-block",width:"16px",height:"16px",minWidth:"16px",borderRadius:"3px",transition:"all 150ms"},icon:{fill:"none",strokeWidth:"2px",visibility:"hidden"},checked:{backgroundColor:e.palette.secondary.main},visible:{visibility:"visible"},option:{marginLeft:"8px",float:"right"}}}),{withTheme:!0})((function(e){var t=e.classes,n=e.value,o=e.label,i=e.labelId,u=e.checked,l=e.borderColor,d=e.backgroundColor,f=void 0===d?"transparent":d,m=e.checkmarkColor,p=e.onChange,v=e.theme,h=e.disabled;return(0,a.jsx)("div",{className:t.container,children:(0,a.jsxs)("label",{className:t.wrapper,htmlFor:i,children:[(0,a.jsx)("input",{disabled:h,type:"checkbox",className:t.hiddenCheckbox,checked:u,id:i,onChange:function(e){return p(e,n)}}),(0,a.jsx)("div",{className:c()(t.checkbox,(0,r.Z)({},t.checked,!0===u)),style:{backgroundColor:u?v.palette.secondary.main:f,border:"1px solid ".concat(l||v.palette.secondary.main)},children:(0,a.jsx)("svg",{viewBox:"0 0 24 24",className:c()(t.icon,(0,r.Z)({},t.visible,!0===u)),style:{stroke:m||v.palette.primary.main},children:(0,a.jsx)("polyline",{points:"20 6 9 17 4 12"})})}),(0,a.jsx)("div",{className:t.option,children:(0,a.jsx)(s.default,{text:o})})]})})}))},76129:function(e,t,n){n.d(t,{Cq:function(){return h},Ld:function(){return g},c8:function(){return p},cE:function(){return A},fk:function(){return r},gg:function(){return m},vx:function(){return E},yK:function(){return T}});var r,a=n(62230),o=n(85244),i=n(17064),c=n(81541),s=n(41958),u=n(6235),l=n(2784),d=n(49368);!function(e){e.VIEWING_CALENDAR="VIEWING_CALENDAR",e.VIEWING_ACTIVITIES="VIEWING_ACTIVITIES",e.SELECTED_DATE_CHANGE="SELECTED_DATE_CHANGE",e.CALENDAR_DATE_CHANGE="CALENDAR_DATE_CHANGE",e.FILTER_BY_CATEGORIES="FILTER_BY_CATEGORIES",e.ACTIVITIES_UPDATED="ACTIVITIES_UPDATED",e.UPDATE_SELECTED_CATEGORIES="UPDATE_SELECTED_CATEGORIES"}(r||(r={}));var f=new Date(Date.now()),m=["January","February","March","April","May","June","July","August","September","October","November","December"],p=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],v=function(e,t,n,r){var i=new Date(e.time),c=new Date(i);return c.setHours(0,0,0),new Array(t).fill(null).map((function(t,c){return(0,o.Z)((0,a.Z)({},e),{kind:s.p.DAILY,time:new Date(n,r,c+1,i.getHours(),i.getMinutes()).getTime()})})).filter((function(e){return e.time>=c.getTime()}))},h=function(e,t,n){var r=(0,u.Vb)(t,n),i=e.map((function(e){return e.kind===s.p.DAILY?v(e,r,t,n):e.kind===s.p.WEEKLY?function(e,t,n){var r=new Date(e.time);r.setHours(0,0,0);var i=(0,u.Vx)(t,n,e.day).map((function(t){return(0,o.Z)((0,a.Z)({},e),{time:t.getTime()})}));return r.setHours(0,0,0,0),i.filter((function(e){return e.time>=r.getTime()}))}(e,t,n):e.kind===s.p.CUSTOM_WEEKLY?function(e,t,n,r){if(0===e.period)return[];var i=[],c=new Date(n,r,t,23,59,59),s=new Date(e.time);return s.setHours(0,0,0),e.days.forEach((function(t){var l=(0,u.Vh)(t,s);l.setHours(0,0,0),l.setDate(l.getDate()-7);do{l.getFullYear()===n&&l.getMonth()===r&&i.push((0,o.Z)((0,a.Z)({},e),{time:l.getTime()})),l.setTime(l.getTime()+7*e.period*u.ii)}while(l<=c)})),i.filter((function(e){return e.time>=s.getTime()}))}(e,r,t,n):e.kind===s.p.WEEKDAYS?function(e,t,n,r){return v(e,t,n,r).filter((function(e){return!(0,u.LY)(new Date(e.time))})).map((function(e){return(0,o.Z)((0,a.Z)({},e),{kind:s.p.WEEKDAYS})}))}(e,r,t,n):e.kind===s.p.WEEKENDS?function(e,t,n,r){return v(e,t,n,r).filter((function(e){return(0,u.LY)(new Date(e.time))})).map((function(e){return(0,o.Z)((0,a.Z)({},e),{kind:s.p.WEEKENDS})}))}(e,r,t,n):e.kind===s.p.DATES_MONTHLY?function(e,t,n,r){for(var i,c=null!==(i=e.period)&&void 0!==i?i:1,s=[],u=new Date(n,r,t,23,59,59),l=new Date(e.time);l.getMonth()!==u.getMonth()&&l<u;)l.setMonth(l.getMonth()+c);return l.getMonth()===u.getMonth()&&e.dates.forEach((function(i){if(i<=t){var c=new Date(e.time),u=new Date(n,r,i,c.getHours(),c.getMinutes());s.push((0,o.Z)((0,a.Z)({},e),{time:u.getTime()}))}})),s}(e,r,t,n):e.kind===s.p.DAYS_MONTHLY?function(e,t,n,r){if(0===e.period)return[];for(var i=[],c=new Date(n,r,t,23,59,59),s=new Date(e.time);s.getMonth()!==c.getMonth()&&s<c;){var l;s.setMonth(s.getMonth()+(null!==(l=e.period)&&void 0!==l?l:1))}return s.getMonth()===c.getMonth()&&e.weeks.forEach((function(c){var s=c.week%5*7;return c.days.forEach((function(c){var l=(0,u.Vh)(c,new Date(n,r,1)).getDate(),d=l>7?l%7+s:l+s;if(!(d>t)){var f=new Date(e.time);i.push((0,o.Z)((0,a.Z)({},e),{time:new Date(n,r,d,f.getHours(),f.getMinutes()).getTime()}))}}))})),i}(e,r,t,n):e.kind===s.p.PERIODIC?function(e,t,n,r){if(0===e.period)return[];var i=[],c=new Date(n,r,t,23,59,59),s=new Date(e.time);s.setHours(0,0,0);var l="year"===e.unit;do{s.getFullYear()===n&&s.getMonth()===r&&i.push((0,o.Z)((0,a.Z)({},e),{time:s.getTime()})),s.setTime(s.getTime()+e.period*(l?365:1)*u.ii)}while(s<c);return i}(e,r,t,n):e.kind===s.p.YEARLY?function(e,t,n){var r=e.month,i=e.date,c=new Date(e.time);return n!==r?null:(0,o.Z)((0,a.Z)({},e),{time:new Date(t,r,i,c.getHours(),c.getMinutes()).getTime()})}(e,t,n):function(e,t,n){var r=new Date(e.time);return r.getFullYear()===t&&r.getMonth()===n?e:null}(e,t,n)})).flat().filter(d.Z);return i},g=function(e,t){return e.filter((function(e){var n=new Date(e.time);return n.getFullYear()===t.getFullYear()&&n.getMonth()===t.getMonth()&&n.getDate()===t.getDate()}))},y=function(e,t,n){return e.filter((function(e){var r=new Date(e.time);return r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()&&(!t.length||t.find((function(t){return t.id===e.categoryId})))})).sort((function(e,t){return e.time-t.time}))},D={selectedDate:f,lastUpdatedDate:f,selectedCategories:[],activities:[],filteredActivities:[],isViewingCalendar:!1},E=function(e,t){return h(e,t.getFullYear(),t.getMonth())};function S(e){var t=E(e,D.lastUpdatedDate);return(0,o.Z)((0,a.Z)({},D),{activities:e,filteredActivities:g(t,D.lastUpdatedDate)})}function b(e,t){switch(t.type){case r.ACTIVITIES_UPDATED:var n=E(t.payload,e.lastUpdatedDate),i=e.isViewingCalendar?g(n,e.lastUpdatedDate):y(n,e.selectedCategories,e.lastUpdatedDate);return(0,o.Z)((0,a.Z)({},e),{activities:t.payload,filteredActivities:i});case r.VIEWING_CALENDAR:var s=e.lastUpdatedDate,u=E(e.activities,s);return(0,o.Z)((0,a.Z)({},e),{isViewingCalendar:!0,filteredActivities:g(u,s)});case r.VIEWING_ACTIVITIES:var l=E(e.activities,e.lastUpdatedDate);return(0,o.Z)((0,a.Z)({},e),{isViewingCalendar:!1,filteredActivities:y(l,e.selectedCategories,e.lastUpdatedDate)});case r.SELECTED_DATE_CHANGE:var d=E(e.activities,t.payload);e.selectedDate.getTime(),t.payload.getTime();return e.isViewingCalendar?(0,o.Z)((0,a.Z)({},e),{selectedDate:t.payload,lastUpdatedDate:t.payload,filteredActivities:g(d,t.payload)}):(0,o.Z)((0,a.Z)({},e),{selectedDate:t.payload,lastUpdatedDate:t.payload,filteredActivities:y(d,e.selectedCategories,t.payload)});case r.CALENDAR_DATE_CHANGE:if(e.isViewingCalendar)return(0,o.Z)((0,a.Z)({},e),{lastUpdatedDate:t.payload});var f=E(e.activities,t.payload),m=y(f,e.selectedCategories,t.payload);return(0,o.Z)((0,a.Z)({},e),{filteredActivities:m,lastUpdatedDate:t.payload});case r.UPDATE_SELECTED_CATEGORIES:var p=E(e.activities,e.lastUpdatedDate),v=e.selectedCategories.concat(t.payload),h=y(p,v,e.lastUpdatedDate);return(0,o.Z)((0,a.Z)({},e),{selectedCategories:v,filteredActivities:h});case r.FILTER_BY_CATEGORIES:var D=E(e.activities,e.lastUpdatedDate),S=t.payload,b=e.selectedCategories.find((function(e){return e.id===S.id}))?e.selectedCategories.filter((function(e){return e.id!==S.id})):(0,c.Z)(e.selectedCategories).concat([S]),T=y(D,b,e.lastUpdatedDate);return(0,o.Z)((0,a.Z)({},e),{selectedCategories:b,filteredActivities:T});default:throw new Error("Unsupported action type dispatched")}}function T(e){return(0,l.useReducer)(b,e,S)}var A=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:12,n=new Date,r=new Map,a=new Set,o=0;o<=t;o++){var s,u,l=new Date(n.getFullYear(),n.getMonth()+o,1),d=l.getFullYear(),f=l.getMonth(),m=h(e,d,f);if(m.forEach((function(e){return a.add(e.id)})),m.length>0)r.has("".concat(d,"-").concat(f))||r.set("".concat(d,"-").concat(f),[]),null===(u=r.get("".concat(d,"-").concat(f)))||void 0===u||(s=u).push.apply(s,(0,c.Z)(m))}e.filter((function(e){var t=e.id;return!a.has(t)})).forEach((function(e){var t,n=new Date(e.time).getFullYear(),a=new Date(e.time).getMonth();r.has("".concat(n,"-").concat(a))||r.set("".concat(n,"-").concat(a),[]),null===(t=r.get("".concat(n,"-").concat(a)))||void 0===t||t.push(e)}));var p=Array.from(r.entries()).map((function(e){var t=(0,i.Z)(e,2),n=t[0],r=t[1],a=(0,i.Z)(n.split("-").map(Number),2);return{year:a[0],month:a[1],activities:r}})).sort((function(e,t){return e.year!==t.year?e.year-t.year:e.month-t.month}));return p}},48116:function(e,t,n){var r;function a(e){return a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}!function(o){var i=arguments,c=function(){var e=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,t=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,n=/[^-+\dA-Z]/g;return function(r,a,o,m){if(1!==i.length||"string"!==f(r)||/\d/.test(r)||(a=r,r=void 0),(r=r||0===r?r:new Date)instanceof Date||(r=new Date(r)),isNaN(r))throw TypeError("Invalid date");var p=(a=String(c.masks[a]||a||c.masks.default)).slice(0,4);"UTC:"!==p&&"GMT:"!==p||(a=a.slice(4),o=!0,"GMT:"===p&&(m=!0));var v=function(){return o?"getUTC":"get"},h=function(){return r[v()+"Date"]()},g=function(){return r[v()+"Day"]()},y=function(){return r[v()+"Month"]()},D=function(){return r[v()+"FullYear"]()},E=function(){return r[v()+"Hours"]()},S=function(){return r[v()+"Minutes"]()},b=function(){return r[v()+"Seconds"]()},T=function(){return r[v()+"Milliseconds"]()},A=function(){return o?0:r.getTimezoneOffset()},x=function(){return l(r)},w={d:function(){return h()},dd:function(){return s(h())},ddd:function(){return c.i18n.dayNames[g()]},DDD:function(){return u({y:D(),m:y(),d:h(),_:v(),dayName:c.i18n.dayNames[g()],short:!0})},dddd:function(){return c.i18n.dayNames[g()+7]},DDDD:function(){return u({y:D(),m:y(),d:h(),_:v(),dayName:c.i18n.dayNames[g()+7]})},m:function(){return y()+1},mm:function(){return s(y()+1)},mmm:function(){return c.i18n.monthNames[y()]},mmmm:function(){return c.i18n.monthNames[y()+12]},yy:function(){return String(D()).slice(2)},yyyy:function(){return s(D(),4)},h:function(){return E()%12||12},hh:function(){return s(E()%12||12)},H:function(){return E()},HH:function(){return s(E())},M:function(){return S()},MM:function(){return s(S())},s:function(){return b()},ss:function(){return s(b())},l:function(){return s(T(),3)},L:function(){return s(Math.floor(T()/10))},t:function(){return E()<12?c.i18n.timeNames[0]:c.i18n.timeNames[1]},tt:function(){return E()<12?c.i18n.timeNames[2]:c.i18n.timeNames[3]},T:function(){return E()<12?c.i18n.timeNames[4]:c.i18n.timeNames[5]},TT:function(){return E()<12?c.i18n.timeNames[6]:c.i18n.timeNames[7]},Z:function(){return m?"GMT":o?"UTC":(String(r).match(t)||[""]).pop().replace(n,"").replace(/GMT\+0000/g,"UTC")},o:function(){return(A()>0?"-":"+")+s(100*Math.floor(Math.abs(A())/60)+Math.abs(A())%60,4)},p:function(){return(A()>0?"-":"+")+s(Math.floor(Math.abs(A())/60),2)+":"+s(Math.floor(Math.abs(A())%60),2)},S:function(){return["th","st","nd","rd"][h()%10>3?0:(h()%100-h()%10!=10)*h()%10]},W:function(){return x()},WW:function(){return s(x())},N:function(){return d(r)}};return a.replace(e,(function(e){return e in w?w[e]():e.slice(1,e.length-1)}))}}();c.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},c.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]};var s=function(e,t){for(e=String(e),t=t||2;e.length<t;)e="0"+e;return e},u=function(e){var t=e.y,n=e.m,r=e.d,a=e._,o=e.dayName,i=e.short,c=void 0!==i&&i,s=new Date,u=new Date;u.setDate(u[a+"Date"]()-1);var l=new Date;l.setDate(l[a+"Date"]()+1);return s[a+"FullYear"]()===t&&s[a+"Month"]()===n&&s[a+"Date"]()===r?c?"Tdy":"Today":u[a+"FullYear"]()===t&&u[a+"Month"]()===n&&u[a+"Date"]()===r?c?"Ysd":"Yesterday":l[a+"FullYear"]()===t&&l[a+"Month"]()===n&&l[a+"Date"]()===r?c?"Tmw":"Tomorrow":o},l=function(e){var t=new Date(e.getFullYear(),e.getMonth(),e.getDate());t.setDate(t.getDate()-(t.getDay()+6)%7+3);var n=new Date(t.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=t.getTimezoneOffset()-n.getTimezoneOffset();t.setHours(t.getHours()-r);var a=(t-n)/6048e5;return 1+Math.floor(a)},d=function(e){var t=e.getDay();return 0===t&&(t=7),t},f=function(e){return null===e?"null":void 0===e?"undefined":"object"!==a(e)?a(e):Array.isArray(e)?"array":{}.toString.call(e).slice(8,-1).toLowerCase()};void 0===(r=function(){return c}.call(t,n,t,e))||(e.exports=r)}(void 0)}}]);