1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ba430b45-3062-4d14-a9a3-254d51531e32",e._sentryDebugIdIdentifier="sentry-dbid-ba430b45-3062-4d14-a9a3-254d51531e32")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3574],{45326:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/habits",function(){return n(1158)}])},36412:function(e,t,n){"use strict";n.d(t,{l:function(){return p}});var a=n(24246),i=n(31545),s=n(941),r=n(5777),o=n(69008),l=n(38944),c=n(27378),d=n(73382);let u=(0,o.Z)(e=>({root:{fontWeight:e.typography.fontWeightRegular},info:{backgroundColor:"var(--rai-color-background-sunken)",color:"var(--rai-color-text-subtle)","& svg":{opacity:.5}},success:{backgroundColor:e.colors.success.light,color:e.colors.success.dark,"& svg":{color:e.colors.success.main}},error:{backgroundColor:e.palette.error.light,color:e.palette.error.dark,"& svg":{color:e.palette.error.main}},warning:{backgroundColor:e.palette.warning.light,color:e.palette.warning.dark,"& svg":{color:e.palette.warning.main}},icon:{marginLeft:e.spacing(),width:e.spacing(2),height:e.spacing(2)},iconLarge:{marginLeft:0,width:e.spacing(3),height:e.spacing(3),display:"flex"}}),{classNamePrefix:"AssignmentStatus"}),p=e=>{let{className:t,classes:n,status:o,type:p,disableTooltip:m,noAlertTitle:h,AlertProps:_,ChipProps:g}=e,f=u({classes:n}),{icon:b,description:x,label:v,severity:N="info"}=o,E=(0,l.Z)(t,f.root,{[f.info]:"info"===N,[f.error]:"error"===N,[f.success]:"success"===N,[f.warning]:"warning"===N});return b=(0,c.cloneElement)(b,{className:(0,l.Z)(f.icon,{[f.iconLarge]:"alert"===p})}),"alert"===p?(0,a.jsxs)(r.Z,{className:E,severity:N,icon:b,..._,children:[!h&&(0,a.jsx)(i.Z,{children:v}),x]}):(0,a.jsx)(d.u,{disabled:!x||!!m,title:x||"",interactive:!0,children:(0,a.jsx)(s.Z,{color:N,size:"small",className:E,icon:b,label:v,...g})})}},11577:function(e,t,n){"use strict";n.d(t,{f:function(){return p}});var a=n(24246),i=n(14856),s=n(93850),r=n(35744),o=n(38944),l=n(27378),c=n(55249),d=n.n(c),u=n(34661);let p=e=>{let{className:t,classes:n,id:c,icon:p,title:m,description:h,descriptionVariant:_="body1",selected:g,selectable:f,graphic:b,disableRipple:x,onClick:v}=e,N=(0,r.E)(d(),n||{});return(0,a.jsxs)(u.l,{className:(0,o.Z)(N.root,t),classes:{content:N.content,selected:N.selected},selected:g,onClick:()=>v(c),disableRipple:x,children:[f&&(0,a.jsx)(i.Z,{className:(0,o.Z)(N.checkIcon,{[N["checkIcon--showCheckIcon"]]:!!g})}),(0,a.jsxs)("div",{children:[!!p&&(0,l.createElement)(p,{className:N.icon}),!!m&&(0,a.jsx)(s.Z,{component:"div",className:(0,o.Z)(N.title,{[N["title--selected"]]:g}),variant:"h6",children:m}),!!h&&(0,a.jsx)(s.Z,{component:"div",className:N.description,variant:_,children:h})]}),!!b&&(0,a.jsx)("div",{className:N.graphicCont,children:b})]})}},34661:function(e,t,n){"use strict";n.d(t,{l:function(){return u}});var a=n(24246),i=n(1451),s=n(60189),r=n(35744),o=n(38944),l=n(27378),c=n(49597),d=n.n(c);let u=(0,l.forwardRef)((e,t)=>{let{className:n,classes:l,selected:c,disabled:u,footer:p,disableRipple:m,onClick:h,children:_,...g}=e,f=(0,r.E)(d(),l||{});return(0,a.jsxs)(i.ZP,{disabled:u,className:(0,o.Z)(f.root,c&&f.selected,n),component:u?"div":s.Z,onClick:u?void 0:h,disableRipple:m,ref:t,...g,children:[(0,a.jsx)("div",{className:f.content,children:_}),!!p&&(0,a.jsx)("div",{className:(0,o.Z)(f.footer,{[f["footer--selected"]]:c}),children:p})]})})},51756:function(e,t,n){"use strict";n.d(t,{B:function(){return f}});var a=n(24246),i=n(93850),s=n(24080),r=n(35744),o=n(38944),l=n(27378),c=n(9715),d=n(14284),u=n.n(d),p=n(1125),m=n.n(p),h=n(73382);let _=e=>{let{className:t,classes:n,TooltipProps:i,icon:s,tooltipContent:c,thinking:d,active:u=!0}=e,p=(0,r.E)(m(),n||{}),{disabled:_,classes:{tooltip:g="",...f}={},...b}=i||{};return u?(0,a.jsx)(h.u,{title:c,disabled:d||_,classes:{tooltip:(0,o.Z)(g,p.ttContent),...f},...b,children:(0,l.cloneElement)(s,{className:(0,o.Z)(s.props.className,p.root,t,{[p.thinking]:d})})}):(0,a.jsx)(a.Fragment,{})};_.displayName="IconIndicator";var g=n(43205);let f=e=>{let{className:t,classes:n,objectName:d,TooltipProps:p,thinking:m,onClear:h,...f}=e,b=(0,r.E)(u(),n||{}),[x,v]=(0,l.useState)(!1),N=(0,l.useCallback)(async()=>{v(!0),await h(),v(!1)}
1,[h]);return(0,a.jsx)(_,{className:(0,o.Z)(b.root,t),thinking:x||m,tooltipContent:(0,a.jsxs)(a.Fragment,{children:[" ",(0,a.jsxs)(i.Z,{variant:"inherit",children:["We've flagged this ",d," because it may not schedule the way you'd expect."," "]}),(0,a.jsxs)(g.r,{underline:"always",onClick:N,children:["Reset ",d]})]}),icon:(0,a.jsx)(s.Z,{className:b.icon,children:(0,a.jsx)(c.Z,{})}),TooltipProps:{interactive:!0,enterDelay:0,...p},...f})};f.displayName="ClearTPEIndicator"},55932:function(e,t,n){"use strict";n.d(t,{j:function(){return f}});var a=n(24246),i=n(98895),s=n(72645),r=n(66443),o=n(93850),l=n(60189),c=n(35744),d=n(90628),u=n(38944),p=n(71854),m=n.n(p),h=n(43205),_=n(73382),g=n(53396);let f=e=>{let{className:t,classes:n,loading:p,event:f,...b}=e,x=(0,c.E)(m(),n||{}),{format:v}=(0,i.$0)(),N=null==f?void 0:f.onlineMeetingUrl;return p||(null==f?void 0:f.eventStart)?(0,a.jsxs)("div",{className:(0,u.Z)(x.root,t),children:[(0,a.jsx)(_.u,{title:p?"":"Open in calendar",disabled:p,children:(0,a.jsxs)(h.r,{className:(0,u.Z)(x.next),href:(null==f?void 0:f.key)&&"".concat((0,d.V0)(),"/events/view/").concat(f.key),target:"reclaim-google",onClick:e=>{e.stopPropagation()},...b,children:[p&&(0,a.jsx)(r.Z,{variant:"rectangular",width:"100%",height:22,style:{marginLeft:20}}),!p&&f&&f.eventStart&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.Z,{className:x.next__label,component:"span",variant:"body2",children:"Next:"}),(0,a.jsx)(o.Z,{variant:"inherit",component:"span",children:v(f.eventStart,"DATE_TIME_DISPLAY_FORMAT")})]})]})}),!p&&(N?(0,a.jsx)(g.R,{className:x.joinBtn,meetingUrl:N,variant:"outlined"}):(0,a.jsx)(l.Z,{component:"a",variant:"outlined",size:"small",href:(null==f?void 0:f.key)&&"".concat((0,d.V0)(),"/events/view/").concat(f.key),target:"_blank",endIcon:(0,a.jsx)(s.Z,{className:x.openBtnIcon}),rel:"noreferrer",onClick:e=>{e.stopPropagation()},children:"Open"}))]}):null};f.displayName="GenericCardEventFooter"},541:function(e,t,n){"use strict";n.d(t,{r:function(){return c}});var a=n(24246),i=n(85007),s=n(35744),r=n(38944),o=n(12754),l=n.n(o);let c=e=>{let{className:t,classes:n,children:o,...c}=e,d=(0,s.E)(l(),n||{});return(0,a.jsx)(i.Z,{className:(0,r.Z)(d.root,t),...c,children:o})};c.displayName="GenericCardList"},30931:function(e,t,n){"use strict";n.d(t,{u:function(){return m}});var a=n(24246),i=n(41014),s=n(56773),r=n(93850),o=n(35744),l=n(38944),c=n(27378),d=n(48698),u=n.n(d),p=n(94807);let m=e=>{let{className:t,classes:n,actions:d,title:m,details:h,footer:_,icon:g,showChip:f,disabled:b,statusMeta:x,children:v,variant:N="traditional",footerVariant:E="default",onClick:j,...C}=e,y=(0,o.E)(u(),n||{});return(0,a.jsxs)(s.Z,{className:(0,l.Z)(y.root,t,{[y["root--noActions"]]:!d,[y["root--disabled"]]:b}),onClick:j,...C,children:[!!(0,c.isValidElement)(d)&&(0,c.cloneElement)(d,{className:y.actions}),g&&(0,a.jsx)("div",{className:y.iconWrap,children:(0,c.cloneElement)(g,{className:(0,l.Z)(g.props.className,y.iconWrap_icon)})}),m&&(0,a.jsx)(r.Z,{variant:"h5",className:y.title,children:m}),(0,a.jsxs)("div",{className:(0,l.Z)(y.content,{[y["content--natural"]]:"natural"===N}),children:[h&&(0,a.jsx)(a.Fragment,{children:"traditional"===N?(0,a.jsx)("div",{className:y.details,children:h.filter(e=>!!e).map((e,t)=>(0,a.jsxs)("div",{className:y.details__item,children:[(0,a.jsx)("span",{className:y.details__item__title,children:e.label}),(0,a.jsx)("span",{className:y.details__item__value,children:e.content})]},t))}):(0,a.jsx)("div",{children:h.filter(e=>!!e).map((e,t)=>(0,a.jsxs)("span",{children:[e.label," ",e.content," "]},t))})}),v,!!f&&!!x&&!x.neverShowChip&&(0,a.jsx)(p.b,{color:x.type,icon:(0,a.jsx)(i.Z,{}),size:"small",label:x.label})]}),_&&(0,a.jsx)("div",{className:(0,l.Z)(y.footer,{[y["footer--info"]]:"info"===E}),children:_})]})}},53396:function(e,t,n){"use strict";n.d(t,{R:function(){return h}});var a=n(24246),i=n(10178),s=n(84446),r=n(10931),o=n(60189),l=n(35744),c=n(92024),d=n(38944),u=n(43205),p=n(81471),m=n.n(p);let h=e=>{var t;let{className:n,classes:p,meetingUrl:h,calIdToAppendAsAuthGmail:_,...g}=e,f=(0,l.E)(m(),p||{}),{connectedCalendars:b}=(0,s.v)(),x=null==b?void 0:null===(t=b.find(e=>e.id===_))||void 0===t?void 0:t.name;return(0,a.jsx)(o.Z,{component:u.r,className:(0,d.Z)(f.root,n),size:"small",startIcon:(0,a.jsx)(r.Z,{className:f.icon}),href:x&&(0,c.Jh)(x)&&(0,i.aT)(h)?"".concat(h,"?authuser=").concat(x):h,color:"primary",variant:"contained",underline:"none",...g,children:"Join"})}},12633:function(e,t,n){"use strict";n.d(t,{N:function(){return o}});var a=n(24246),i=n(27378),s=n(97481),r=n(51756);let o=e=>{let{habit:t,...n}=e,{dispatch:o}=(0,s.t)(),l=(0,i.useCallback)(async()=>{await o(t.id,s.n.ClearTPE)},[t.id,o]);return(0,a.jsx)(r.B,{objectName:"habit",onClear:l,active:t.adjusted,...n})}},33264:function(e,t,n){"use strict";n.d(t,{k:function(){return _}});var a=n(24246),i=n(69008),s=n(22741),r=n(38944),o=n(23647),l=n(27378),c=n(57290),d=n(98895),u=n(28868),p=n(52723),m=n(15648);let h=(0,i.Z)(e=>({root:{}}),{classNamePrefix:"HabitHoursDisplay"}),_=e=>{let{className:t,classes:n,habit:i}=e,_=h({classes:n}),{format:g}=(0,d.$0)(),{timeSchemes:f,loading:b}=(0,c.eb)(),x=(0,l.useMemo)(()=>(0,u.xO)(i,f||[]),[i,f]),v=(0,l.useMemo)(()=>x&&"ONE_OFF"===i.timePolicyType&&(0,p.bc)(x),[x,i.timePolicyType]),N=(0,l.useMemo)(()=>
1{if(v&&x){let e=(0,s.NJ)(x.dayHours).find(()=>!0);if(!e)return"Unknown hours";{let t=(0,o.Z)(e.intervals[0].start,"HH:mm:ss",new Date),n=(0,o.Z)(e.intervals[0].end,"HH:mm:ss",new Date);return"".concat(g(t,"TIME_DISPLAY_FORMAT")," - ").concat(g(n,"TIME_DISPLAY_FORMAT"))}}if("ONE_OFF"===i.timePolicyType)return"Custom hours";{let e=(0,u.zo)(i,f||[]);return(null==e?void 0:e.title)||"Unknown hours"}},[i,x,v,f,g]),E=!v&&!!x&&!b;return(0,a.jsx)(m.i,{className:(0,r.Z)(_.root,t),label:N,loading:b,timePolicy:E?x:void 0})}},90533:function(e,t,n){"use strict";n.d(t,{v:function(){return f}});var a=n(24246),i=n(28868),s=n(57290),r=n(98895),o=n(36238),l=n(52723),c=n(27378),d=n(60202);let u={DURATION_OVERLAP:{icon:(0,a.jsx)(d.Z,{size:12}),label:"Needs attention",description:"Based on the configured hours we may have difficulty scheduling this Habit consistently. Please select a shorter duration or add more available hours.",severity:"warning"},IDEAL_TIME:{icon:(0,a.jsx)(d.Z,{size:12}),label:"Needs attention",description:"The ideal time of day you've configured does not have any overlap with the selected hours.",severity:"warning"}},p=(e,t)=>{let{format:n}=(0,r.$0)(),{timeSchemes:a,loading:d}=(0,s.eb)();return(0,c.useMemo)(()=>{if(!e.timePolicyType||d||!a)return;let s=(0,i.xO)(e,a);if(s){if(e.idealTime&&(!t||"IDEAL_TIME"===t)){let t=(0,o.TD)(e.idealTime);if(t){let e=n(t,"TIME_FORMAT");if(!(0,l.Ni)(s,e))return"IDEAL_TIME"}}if(e.durationMin&&(!t||"DURATION_OVERLAP"===t)){let t=e.timesPerPeriod||1,n=(0,l.sR)(s,6e4*e.durationMin);if(t>1?t>n:!n)return"DURATION_OVERLAP"}}},[e,d,a,t,n])};var m=n(69008),h=n(38944),_=n(36412);let g=(0,m.Z)(()=>({root:{}}),{classNamePrefix:"HabitStatus"}),f=e=>{let{className:t,classes:n,habit:i,type:s,targetStatus:r}=e,o=g({classes:n}),l=p(i,r);return l?(0,a.jsx)(_.l,{className:(0,h.Z)(t,o.root),status:u[l],type:s,noAlertTitle:!0}):(0,a.jsx)(a.Fragment,{})}},27945:function(e,t,n){"use strict";n.d(t,{r:function(){return _}});var a=n(24246),i=n(56990),s=n(35744),r=n(38944),o=n(95295),l=n.n(o),c=n(28238),d=n(71774),u=n(43205),p=n(71305),m=n(76264),h=n(90628);let _=e=>{let{className:t,classes:n,mode:o,oneOnOneOrHabitId:_}=e,g=(0,s.E)(l(),n||{}),{convertToSmartSeries:f}=function(e){let{sendNotification:t}=(0,p.z)();return{convertToSmartSeries:(0,m.T)(async n=>{try{"meeting"===e?await c.T.oneOnOnes.migrateToSmartMeeting(n):await c.T.habits.migrateToSmartHabit(n),t({type:"success",message:(0,a.jsxs)(a.Fragment,{children:["Converting your ","meeting"===e?"1:1 to a Smart Meeting":"Habit to a new v2 Habit",". It should appear shortly"," ",(0,a.jsx)(u.r,{variant:"link",href:"meeting"===e?(0,h.fh)():(0,h.su)(),component:u.r,children:"here"}),". This ","meeting"===e?"1:1":"v1 Habit"," will be disabled."]})})}catch(n){t({type:"error",message:(0,a.jsxs)(a.Fragment,{children:["Failed to convert to ","meeting"===e?"Smart Meeting":"v2 Habit",". If this problem persists please"," ",(0,a.jsx)(d.u,{variant:"link",lead:"I'm having trouble converting my ".concat("meeting"===e?"1:1 to a Smart Meeting":"Habit to a new v2 Habit","..."),children:"contact support"}),"."]})})}})}}(o);return(0,a.jsxs)(i.Z,{onClick:async e=>{e.stopPropagation(),await f(_)},className:(0,r.Z)(g.root,t),variant:"outlined",color:"primary",size:"small",children:["Convert to ","meeting"===o?"Smart Meeting":"Habit v2"]})};_.displayName="ConvertToSmartSeriesButton"},60706:function(e,t,n){"use strict";n.d(t,{b:function(){return u}});var a=n(24246),i=n(43205),s=n(93850),r=n(35744),o=n(90628),l=n(38944),c=n(60886),d=n.n(c);let u=e=>{let{className:t,classes:n,type:c}=e,u=(0,r.E)(d(),n||{});return(0,a.jsxs)("div",{className:(0,l.Z)(u.root,t),children:[(0,a.jsx)(s.Z,{variant:"body1",className:u.root__text,children:"habits"===c?"Get the free Habits 2.0 upgrade & unlock more Habit templates, any repeating frequency, multiple calendars, & dependencies.":"Want to use Smart 1:1s for team meetings & unlock upgraded features? Try Smart Meetings for free."}),(0,a.jsx)(i.r,{fontSize:"medium",href:"habits"===c?(0,o.su)():(0,o.fh)({optIn:!0}),className:u.root__link,children:"Let's do it!"})]})};u.displayName="SmartSeriesBannerCTA"},15648:function(e,t,n){"use strict";n.d(t,{i:function(){return u}});var a=n(24246),i=n(66443),s=n(93850),r=n(69008),o=n(38944),l=n(89499),c=n(91935);let d=(0,r.Z)(e=>({root:{},skeleton:{display:"inline-block"},helptip:{marginLeft:e.spacing(.25),padding:2},content:{display:"flex",flexDirection:"row",alignItems:"center"}}),{classNamePrefix:"GenericHoursDisplay"}),u=e=>{let{className:t,classes:n,label:r,loading:u,timePolicy:p}=e,m=d({classes:n});return(0,a.jsx)("div",{className:(0,o.Z)(m.root,t),children:u?(0,a.jsx)(i.Z,{className:m.skeleton,children:(0,a.jsx)(s.Z,{variant:"inherit",children:"Time policy name here"})}):(0,a.jsxs)("div",{className:m.content,children:[r,!!p&&(0,a.jsx)(l.S,{className:m.helptip,variant:"info",title:(0,a.jsx)(c.u,{policy:p})})]})})}},60282:function(e,t,n){"use strict";n.d(t,{GM:function(){return l},N0:function(){return o},_z:function(){return u},k9:function(){return s},lj:function(){return d},nd:function(){return p},sU:function(){return r}});var a=n(30632),i=n(21436);let s={ACCOUNTING_AND_FINANCE:{label:"Finance",noun:"Finance professional",nounPlural:"Finance professionals"},DESIGN:{label:"Design",noun:"Designer",nounPlural:"Designers"},ENGINEERING:{label:"Engineering",noun:"Engineer",nounPlural:"Engineers"},EXECUTIVE_ASSISTANT:{label:"Executive Assistant / Admin",noun:"Admin",nounPlural:"Admins"}
1,FOUNDER:{label:"Founder / C-Suite",noun:"Founder / Executive",nounPlural:"Founders / Executives"},HR:{label:"HR",noun:"HR professional",nounPlural:"HR professionals"},IT_SECURITY:{label:"IT / Security",noun:"IT / Security professional",nounPlural:"IT / Security professionals"},MARKETING:{label:"Marketing",noun:"Marketer",nounPlural:"Marketers"},OPERATIONS:{label:"Operations",noun:"Operations professional",nounPlural:"Operations professionals"},PRODUCT:{label:"Product",noun:"Product professional",nounPlural:"Product professionals"},SALES:{label:"Sales",noun:"Salesperson",nounPlural:"Salespeople"},SUPPORT:{label:"Support",noun:"Support rep",nounPlural:"Support reps"}},r={EXEC:{label:"Exec"},MANAGER:{label:"Manager"},NON_MANAGER:{label:"Non-manager",formTitle:e=>{let{department:t,plural:n}=e;return"OTHER"===t?void 0:(0,a._6)(n?2:1,s[t].noun,s[t].nounPlural)}},CONSULTANT:{label:"Consultant"},STUDENT:{label:"Student"}},o=[{id:"WORK",title:"Team/company use"},{id:"SOLO_WORK",title:"Personal use for work"},{id:"PERSONAL",title:"Just personal use"}],l=(0,i.$d)()(["EXEC","MANAGER","NON_MANAGER","CONSULTANT","STUDENT"]),c=(0,i.$d)()(["PRODUCT","ENGINEERING","SUPPORT","MARKETING","SALES","DESIGN","HR","OPERATIONS","ACCOUNTING_AND_FINANCE","FOUNDER","EXECUTIVE_ASSISTANT","IT_SECURITY"]);[...c];let d=l.map(e=>({id:e,title:r[e].label})),u={value:void 0,label:"Select department",disabled:!0},p=c.map(e=>({id:e,title:s[e].label}))},67672:function(e,t,n){"use strict";n.d(t,{F:function(){return u}});var a=n(24246),i=n(66443),s=n(93850),r=n(27378),o=n(28868),l=n(53733),c=n(57290),d=n(54541);let u=e=>{let{timeSchemes:t,loading:n,error:u}=(0,c.eb)(),p=(0,r.useMemo)(()=>(0,o.xO)(e,t||[]),[e,t]),m=(0,l.O)(p),h=(0,d.Z)();return(0,r.useMemo)(()=>n&&!u?(0,a.jsx)(i.Z,{style:{marginLeft:2},children:(0,a.jsx)(s.Z,{variant:"inherit",children:"Loading..."})}):m.length&&e?(0,o.Rh)(e,m,h):"Unknown hours",[n,u,m,h,e])}},6054:function(e,t,n){"use strict";n.d(t,{$:function(){return l}});var a=n(28868),i=n(28238),s=n(88966),r=n(27378),o=n(51044);let l=()=>{let[e,t]=(0,r.useState)(!1),n=(0,r.useCallback)(()=>(t(!0),(0,o.zG)(i.T.habits.listAndWatch$$(),(0,o.UI)(e=>(t(!1),e)))),[]),l=(0,s.m)(n,[]);return{habits:(0,r.useMemo)(()=>l?l.sort(a.JP):l,[l]),loading:e}}},1158:function(e,t,n){"use strict";n.r(t),n.d(t,{DailyHabits:function(){return eN},default:function(){return eE}});var a=n(24246),i=n(28868),s=n(541),r=n(85599),o=n(55932),l=n(30931),c=n(27945),d=n(94001),u=n(57791),p=n(86922),m=n(75938),h=n(35744),_=n(76264),g=n(90628),f=n(38944),b=n(27378),x=n(67672),v=n(38727),N=n(12633),E=n(10570),j=n(33264),C=n(57682),y=n.n(C),T=n(90533);let I=e=>{let{className:t,classes:n,habit:s}=e,r=(0,h.E)(y(),n||{}),{user:C}=(0,p.ec)(),I=(0,v.ED)(),k=(0,x.F)(s),{events:S,loading:A}=(0,d.j)(s.id,"habit"),Z=(0,b.useMemo)(()=>(0,i.jn)(s),[s]),w=(0,b.useMemo)(()=>(0,m.Us)(S),[S]),R=(0,_.T)(()=>I.push((0,g.F_)(s.id)));return(0,a.jsxs)(l.u,{className:(0,f.Z)(r.root,t),onClick:R,actions:(0,a.jsx)(E.H,{habit:s,showPlayActions:!0,showEdit:!0,showDisabledIndicator:!0}),title:s.title,details:[{label:"Duration",content:Z},{label:"Schedule",content:(0,a.jsxs)("div",{className:r.scheduling,children:[k,(0,a.jsx)(N.N,{habit:s,className:r.scheduling__indicator})]})},{label:"Hours",content:(0,a.jsx)(j.k,{habit:s})}],footer:s.enabled&&(0,a.jsx)(o.j,{event:w,loading:A}),children:[(0,a.jsx)(T.v,{habit:s,type:"chip"}),!!(0,u.un)(C)&&(0,a.jsx)(c.r,{mode:"habit",oneOnOneOrHabitId:s.id})]})};var k=n(30236),S=n(41817),A=n(40307),Z=n(83893),w=n.n(Z);let R=e=>{let{className:t,classes:n,habits:i,highlights:s}=e,r=(0,h.E)(w(),n||{}),o=(0,b.useRef)(null),{ref:l,breakpoint:c}=(0,S.f)({ref:o});return(0,a.jsx)("div",{ref:l,className:(0,f.Z)(r.root,t),children:i.map(e=>(0,a.jsx)(A.E,{className:r.habit,habit:e,highlighted:null==s?void 0:s[e.id].highlighted,breakpoint:c},e.id))})};var P=n(60706),O=n(75699),L=n(6054),H=n(90684),M=n(68365),D=n(44346),F=n(25747),U=n(60189),G=n(30279),B=n(30550),W=n(93850),V=n(69008),z=n(77670),q=n(26687),X=n(941),J=n(66443),Y=n(60282),K=n(23384),$=n(36497),Q=n(71305),ee=n(28238),et=n(59865),en=n(35974),ea=n(92024),ei=n(27521),es=n(11577),er=n(57809),eo=n(53733);let el=(0,V.Z)(()=>({root:{}}),{classNamePrefix:"HabitTemplateDescription"}),ec=e=>{let{className:t,classes:n,template:s}=e,r=el({classes:n}),o=(0,eo.O)(s.oneOffPolicy||{dayHours:[]}),l=(0,b.useMemo)(()=>(0,i.Rh)(s,o),[s,o]);return(0,a.jsx)("div",{className:(0,f.Z)(r.root,t),children:(0,a.jsxs)("div",{children:[(0,i.jn)(s)," ",l]})})},ed=(0,V.Z)(e=>({root:{padding:e.spacing(0,1)},templateHeader:{margin:e.spacing(3,0),position:"relative",[e.breakpoints.up("md")]:{dis
1play:"flex",justifyContent:"space-between",alignItems:"start",gap:e.spacing(3)}},chips:{display:"flex",gap:e.spacing(),flexWrap:"wrap",marginBottom:e.spacing(2),[e.breakpoints.up("sm")]:{marginBottom:0}},selected:{backgroundColor:e.colors.black,color:e.colors.white,"&.MuiChip-clickable.MuiChip-outlined:focus":{backgroundColor:e.colors.black}},search:{[e.breakpoints.up("sm")]:{marginRight:e.spacing(-1),marginTop:e.spacing(-.75),paddingRight:0,position:"absolute",right:0,top:e.spacing(-10)},[e.breakpoints.up("md")]:{position:"relative",right:"auto",top:"auto"}},cards:{display:"flex",gap:e.spacing(1),flexWrap:"wrap",[e.breakpoints.up("sm")]:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)"},[e.breakpoints.up("md")]:{gridTemplateColumns:"repeat(3, 1fr)"},[e.breakpoints.up("lg")]:{gridTemplateColumns:"repeat(4, 1fr)"}},card:{}}),{classNamePrefix:"HabitTemplates"}),eu=Y.nd.filter(e=>"OTHER"!==e.id),ep=e=>{let{className:t,classes:n}=e,s=ed({classes:n}),r=(0,v.ED)(),o=r.query.department||"ALL",{sendNotification:l}=(0,Q.z)(),{disableAdd:c}=(0,K.W)("MAX_HABITS"),[d,u]=(0,b.useState)(o),[p,m]=(0,b.useState)(""),h="STUDENT"===d?d:void 0,g="STUDENT"===d||"ALL"===d||"PERSONAL"===d?void 0:d,[x,N]=(0,$.Z)(async()=>{try{return await ee.T.habits.getHabitTemplates(h,g)||[]}catch(e){throw l({message:"Failed to load Habit templates. Please contact support if this problem persists.",type:"error"}),Error(e)}},[h,g,l]),[E]=(0,en.Rx)(x||[],e=>e.displayTitle,p),j=(0,b.useMemo)(()=>"PERSONAL"===d?E.filter(e=>e.original.eventCategory===et.Oh.Personal):E,[E,d]),C=(0,_.T)(e=>{c?l({message:(0,a.jsxs)(a.Fragment,{children:["You've reached your subscription's limit of Habits."," ",(0,a.jsx)(ei.u,{variant:"text",color:"inherit",referrer:"entitlement",entitlement:"MAX_HABITS",children:"See plans"})]}),type:"error"}):r.push({pathname:"/habits/[id]/edit",query:{preset:e}},"/habits/new/edit?preset=".concat(e))}),y=(0,_.T)(e=>{m(e.target.value)}),T=(0,_.T)(e=>{u(e),r.push({query:{...r.query,department:e}})});return(0,a.jsxs)("div",{className:(0,f.Z)(s.root,t),children:[(0,a.jsxs)("div",{className:s.templateHeader,children:[(0,a.jsxs)("div",{className:s.chips,children:[(0,a.jsx)(X.Z,{className:(0,f.Z)({[s.selected]:"ALL"===d}),variant:"outlined",onClick:()=>T("ALL"),label:"All"}),eu.map(e=>(0,a.jsx)(X.Z,{className:(0,f.Z)({[s.selected]:d===e.id}),variant:"outlined",onClick:()=>T(e.id),label:e.title},e.id)),(0,a.jsx)(X.Z,{className:(0,f.Z)({[s.selected]:"STUDENT"===d}),variant:"outlined",onClick:()=>T("STUDENT"),label:"Student"}),(0,a.jsx)(X.Z,{className:(0,f.Z)({[s.selected]:"PERSONAL"===d}),variant:"outlined",onClick:()=>T("PERSONAL"),label:"Personal"})]}),(0,a.jsx)(er.t,{icon:(0,a.jsx)(q.Z,{}),value:p,onChange:y,IconButtonProps:{color:"primary"},placeholder:"Search templates...",size:"small",className:s.search})]}),(0,a.jsx)("div",{className:s.cards,children:N?(0,a.jsx)(a.Fragment,{children:Array.from(Array(10).keys()).map(e=>(0,a.jsx)(J.Z,{variant:"rectangular",width:"100%",height:150},e))}):null==j?void 0:j.map(e=>{let{original:t}=e;return(0,a.jsx)(a.Fragment,{children:!!t&&(0,a.jsx)(es.f,{className:s.card,title:(0,ea.qm)(t.displayTitle).textWithoutLeadingEmoji,description:(0,a.jsx)(ec,{template:t}),descriptionVariant:"body2",id:t.name,icon:(0,i.K0)(t.name),onClick:C},t.name)})})})]})};var em=n(43205),eh=n(92736),e_=n(55695),eg=n(14875),ef=n(73217),eb=n(81382),ex=n(40062);let ev=(0,V.Z)(e=>({wrapper:{display:"flex",flex:1,margin:"0 auto",maxWidth:"86rem",padding:e.spacing(0,0,6),width:"100%",[e.breakpoints.up("sm")]:{padding:e.spacing(0,3,6)},[e.breakpoints.up("md")]:{padding:e.spacing(0,6,6)}},columns:{display:"flex",flexDirection:"row",alignItems:"stretch",width:"100%",flex:1,minWidth:0},listCol:{flex:1,position:"relative",minWidth:0},tabsRoot:{},footer:{color:e.palette.text.secondary,fontWeight:e.typography.fontWeightMedium,margin:e.spacing(3,0),[e.breakpoints.up("sm")]:{margin:e.spacing(5,"auto"),textAlign:"center"}},slackWrapper:{display:"flex",justifyContent:"center"},slackButton:{display:"block",marginTop:e.spacing(1),transform:"none",transition:"transform .2s ease","&:hover":{transform:"scale(1.05)"}},newBtn:{width:"100%",[e.breakpoints.up("sm")]:{width:"auto"}},containerListOrCard:{display:"flex",flexDirection:"column",gap:e.spacing(2)},mainActions:{display:"flex",gap:e.spacing(),[e.breakpoints.down("sm")]:{bottom:e.spacing(),justifyContent:"center",left:0,margin:"0 auto",position:"fixed",right:0,zIndex:1}},tabsActions:{[e.breakpoints.up("sm")]:{margin:e.spacing(0,0,-5.5,"auto")}}}
1),{classNamePrefix:"Habits"}),eN=()=>{var e,t,n,o;let l=ev(),c=(0,v.ED)(),{user:d}=(0,p.ec)(),{primaryCalendar:m}=(0,eb.H)(),[h]=(0,M.Q)("HABITS"),{habits:f,loading:x}=(0,L.$)(),{Pagination:N,highlights:E,pagedResults:j,searchTerm:C,setSearchTerm:y}=(0,H.z)({data:f||[],searchProp:"title"}),T=(0,b.useMemo)(()=>[...j].sort(i.JP),[j]),S=c.query.view||"all",A=(0,_.T)(e=>{c.push((0,g.MX)(e))}),Z=(0,b.useCallback)(()=>{(null==c?void 0:c.isReady)&&c.push({pathname:"/habits/[id]/edit"},"/habits/new/edit")},[c]),w=(0,a.jsx)("div",{className:l.mainActions,children:(0,a.jsx)(z.N,{entitlement:"MAX_HABITS",mode:"add",children:e=>{let{disabled:t}=e;return(0,a.jsx)(U.Z,{className:l.newBtn,startIcon:(0,a.jsx)(D.Z,{fontSize:"small"}),variant:"contained",color:"primary",size:"small",disabled:t,onClick:Z,children:"New Habit"})}})});return(0,a.jsxs)(ex.L,{title:"Habits",children:[!(0,u.un)(d)&&!!(0,u.Q4)(d)&&(0,a.jsx)(P.b,{type:"habits"}),(0,a.jsx)(eg.TB,{config:[{group:"FEATURES",quest:"HABITS_OVERVIEW_2",step:"GET_STARTED"},{group:"FEATURES",quest:"HABITS_OVERVIEW_2",step:"WHAT_ARE_HABITS"},{group:"FEATURES",quest:"HABITS_OVERVIEW_2",step:"NOT_RECURRING_EVENTS"},{group:"FEATURES",quest:"HABITS_OVERVIEW_2",step:"FREE_BUSY"},{group:"FEATURES",quest:"HABITS_OVERVIEW_2",step:"VIEW_EXISTING"}],hideOrb:!0,popperPlacement:"center"}),(0,a.jsx)(eg.TB,{config:[{group:"FEATURES",quest:"HABITS_OVERVIEW_2",step:"CREATE_NEW"}],hideOrb:!0,popperPlacement:"center",onShow:()=>A("templates")}),(0,a.jsxs)(G.Z,{className:l.wrapper,children:[(x||!m)&&(0,a.jsx)(eh.g,{}),!x&&(0,a.jsx)(G.Z,{className:l.columns,children:(0,a.jsxs)(G.Z,{className:l.listCol,children:[(0,a.jsx)(ef.m,{classes:{root:l.tabsRoot,tabsActions:l.tabsActions},value:S,onChange:e=>A(e),rightContent:w,tabs:[{label:"All Habits",value:"all"},{label:"Templates",value:"templates"}]}),"all"===S&&m&&(null==f?void 0:f.length)?(0,a.jsxs)("div",{className:l.containerListOrCard,children:[(0,a.jsx)(k.j,{onSearchChange:y,searchValue:C,resourceType:"HABITS",helpDocHref:O.DV,helpSubType:"HABITS"}),"GRID"===h?(0,a.jsx)(s.r,{children:T.map(e=>(0,a.jsx)(I,{habit:e},e.id))}):(0,a.jsx)(R,{highlights:E,habits:T}),(0,a.jsx)(N,{})]}):"all"!==S||!m||(null==f?void 0:f.length)?"templates"===S?(0,a.jsx)(ep,{}):void 0:(0,a.jsx)(r.Q,{type:"corn",align:"center",icon:(0,a.jsx)(F.Z,{}),title:"Nothing to see here!",message:"Start adding Habits to auto-block time for your routines."}),(0,a.jsx)(G.Z,{className:l.footer,children:(0,a.jsxs)(B.Z,{mdDown:!0,children:[(0,a.jsx)(W.Z,{variant:"body2",children:"Habits work best with Slack"}),(0,a.jsxs)("div",{className:l.slackWrapper,children:[!(null==d?void 0:null===(t=d.features)||void 0===t?void 0:null===(e=t.slackSettings)||void 0===e?void 0:e.enabled)&&(0,a.jsx)(em.r,{className:l.slackButton,href:"".concat(ee.T.client.baseUrl,"/slack/add"),target:"_self",children:(0,a.jsx)("img",{alt:"Add to Slack",height:"40",width:"139",src:"https://platform.slack-edge.com/img/add_to_slack.png",srcSet:"https://platform.slack-edge.com/img/add_to_slack.png 1x, https://platform.slack-edge.com/img/[email protected] 2x"})}),(null==d?void 0:null===(o=d.features)||void 0===o?void 0:null===(n=o.slackSettings)||void 0===n?void 0:n.enabled)&&(0,a.jsx)(U.Z,{variant:"outlined",color:"primary",component:em.r,href:"https://slack.com/app_redirect?app=".concat("ARSJUP4R0"),target:"reclaim-slack",rel:"noopener",children:"Open in Slack"})]})]})})]})})]}),(0,a.jsx)(B.Z,{smUp:!0,children:w})]})};var eE=(0,e_.I)(eN,e=>{let{user:t}=e;return(0,u.g4)(t)},e=>{let{user:t}=e;return(0,u.un)(t)?(0,g.su)():(0,g.MX)()})},55249:function(e){e.exports={icon:"ChoiceCard_icon__Zo3n4",title:"ChoiceCard_title__hoC2P","title--selected":"ChoiceCard_title--selected__ZPRa0",description:"ChoiceCard_description__zny9l",checkIcon:"ChoiceCard_checkIcon__ZRvd3","checkIcon--showCheckIcon":"ChoiceCard_checkIcon--showCheckIcon__8Cri7",content:"ChoiceCard_content__Ty5yv",graphicCont:"ChoiceCard_graphicCont__bQCn7"}},49597:function(e){e.exports={root:"ChoiceCardWrapper_root__5N8zP",selected:"ChoiceCardWrapper_selected__FCrz4",content:"ChoiceCardWrapper_content__YuBc0",footer
1:"ChoiceCardWrapper_footer__yAtIl","footer--selected":"ChoiceCardWrapper_footer--selected__Ng2pE"}},14284:function(e){e.exports={icon:"ClearTPEIndicator_icon__bMzK7"}},71854:function(e){e.exports={root:"GenericCardEventFooter_root__Dbs9V",next:"GenericCardEventFooter_next__4LtxT",next__label:"GenericCardEventFooter_next__label__AU8ez",joinBtn:"GenericCardEventFooter_joinBtn___otOd",openBtnIcon:"GenericCardEventFooter_openBtnIcon__2_UE5"}},12754:function(e){e.exports={root:"GenericCardList_root__Za0g5"}},48698:function(e){e.exports={root:"GenericListItemCard_root__cJaj5","root--noActions":"GenericListItemCard_root--noActions__ehoLA",actions:"GenericListItemCard_actions__Q4kp8","root--disabled":"GenericListItemCard_root--disabled___pljK",content:"GenericListItemCard_content__uRV0C",details:"GenericListItemCard_details__yZoCb",iconWrap:"GenericListItemCard_iconWrap__NNro_",title:"GenericListItemCard_title__zaFgz",iconWrap__icon:"GenericListItemCard_iconWrap__icon__s31O5","content--natural":"GenericListItemCard_content--natural__rkNvm",details__item:"GenericListItemCard_details__item__vc2RC",details__item__title:"GenericListItemCard_details__item__title__Vmyn3",footer:"GenericListItemCard_footer__7AClP","footer--info":"GenericListItemCard_footer--info__NbWKc"}},1125:function(e){e.exports={root:"IconIndicator_root__5BYwm",thinking:"IconIndicator_thinking__R_uUE",opacity_pulse_keyframes__0_5__0_15:"IconIndicator_opacity_pulse_keyframes__0_5__0_15__v7Scg",ttContent:"IconIndicator_ttContent__Pl46n"}},81471:function(e){e.exports={root:"JoinMeetingButton_root__fphxY",icon:"JoinMeetingButton_icon__2EoLj"}},57682:function(e){e.exports={scheduling:"HabitListItemCard_scheduling__zKXek",scheduling__indicator:"HabitListItemCard_scheduling__indicator__Emty3"}},83893:function(e){e.exports={root:"HabitsListView_root__vOc4e",habit:"HabitsListView_habit__c2fo_"}},95295:function(){},60886:function(e){e.exports={root:"SmartSeriesBannerCTA_root__S5aNv",root__link:"SmartSeriesBannerCTA_root__link__d1Ek7"}},60202:function(e,t,n){"use strict";var a,i=n(27378);function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(null,arguments)}var r=i.forwardRef(function(e,t){return i.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",ref:t},e),a||(a=i.createElement("path",{d:"M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0zM12 9v4m0 4h.01"})))});t.Z=r}},function(e){e.O(0,[9774,4661,1283,9923,8017,2045,7689,4564,5429,9518,4983,4527,1514,6805,2395,5240,714,543,9740,3004,1643,8332,6436,8751,2209,2864,8539,3002,3487,2888,179],function(){return e(e.s=45326)}),_N_E=e.O()}]);
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.