PageSourceSearch

https://app.findalto.com/_next/static/chunks/pages/account/notifications-8b850d1f941628f1.js

js findalto.com collected 2026-10-06 05:39:02 UTC 14,702 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2769],{45843:function(e,t,i){"use strict";i.d(t,{Z:function(){return y}});var n=i(1048),o=i(32793),s=i(67294),r=i(90512),a=i(15463),c=i(94581),l=i(98216),u=i(21964),d=i(71657),m=i(90948),h=i(45154),p=i(22104);function f(e){return(0,p.Z)("MuiSwitch",e)}var g=(0,h.Z)("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),b=i(85893);const k=["className","color","edge","size","sx"],v=(0,m.ZP)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:i}=e;return[t.root,i.edge&&t[`edge${(0,l.Z)(i.edge)}`],t[`size${(0,l.Z)(i.size)}`]]}})((({ownerState:e})=>(0,o.Z)({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},"start"===e.edge&&{marginLeft:-8},"end"===e.edge&&{marginRight:-8},"small"===e.size&&{width:40,height:24,padding:7,[`& .${g.thumb}`]:{width:16,height:16},[`& .${g.switchBase}`]:{padding:4,[`&.${g.checked}`]:{transform:"translateX(16px)"}}}))),w=(0,m.ZP)(u.Z,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:i}=e;return[t.switchBase,{[`& .${g.input}`]:t.input},"default"!==i.color&&t[`color${(0,l.Z)(i.color)}`]]}})((({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${"light"===e.palette.mode?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${g.checked}`]:{transform:"translateX(20px)"},[`&.${g.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${"light"===e.palette.mode?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${g.checked} + .${g.track}`]:{opacity:.5},[`&.${g.disabled} + .${g.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:""+("light"===e.palette.mode?.12:.2)},[`& .${g.input}`]:{left:"-100%",width:"300%"}})),(({theme:e,ownerState:t})=>(0,o.Z)({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,c.Fq)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==t.color&&{[`&.${g.checked}`]:{color:(e.vars||e).palette[t.color].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,c.Fq)(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${g.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t.color}DisabledColor`]:`${"light"===e.palette.mode?(0,c.$n)(e.palette[t.color].main,.62):(0,c._j)(e.palette[t.color].main,.55)}`}},[`&.${g.checked} + .${g.track}`]:{backgroundColor:(e.vars||e).palette[t.color].main}}))),S=(0,m.ZP)("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})((({theme:e})=>({height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${"light"===e.palette.mode?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:""+("light"===e.palette.mode?.38:.3)}))),j=(0,m.ZP)("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})((({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})));var y=s.forwardRef((function(e,t){const i=(0,d.Z)({props:e,name:"MuiSwitch"}),{className:s,color:c="primary",edge:u=!1,size:m="medium",sx:h}=i,p=(0,n.Z)(i,k),g=(0,o.Z)({},i,{color:c,edge:u,size:m}),y=(e=>{const{classes:t,edge:i,size:n,color:s,checked:r,disabled:c}=e,u={root:["root",i&&`edge${(0,l.Z)(i)}`,`size${(0,l.Z)(n)}`],switchBase:["switchBase",`color${(0,l.Z)(s)}`,r&&"checked",c&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},d=(0,a.Z)(u,f,t);return(0,o.Z)({},t,d)})(g),x=(0,b.jsx)(j,{className:y.thumb,ownerState:g});return(0,b.jsxs)(v,{className:(0,r.Z)(y.root,s),sx:h,ownerState:g,children:[(0,b.jsx)(w,(0,o.Z)({type:"checkbox",icon:x,checkedIcon:x,ref:t,ownerState:g},p,{classes:(0,o.Z)({},y,{root:y.switchBase})})),(0,b.jsx)(S,{className:y.track,ownerState:g})]})}))},58893:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return Z}});var n,o=i(67720),s=i(36822),r=i(15861),a=i(59499),c=i(67294),l=i(86421),u=i(49945),d=i(13104),m=i(31812),h=i(28147),p=i(10694),f=i(83892),g=i(29565),b=i(50480),k=i(45843),v=i(85893);function w(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function S(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};
1t%2?w(Object(i),!0).forEach((function(t){(0,a.Z)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):w(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function j(e){var t=e.title,i=e.description,o=e.notificationSettings,a=e.onSettingsChanged,c=e.disableEmail;function l(e,t){var i={};switch(e){case n.EMAIL:i={email:t};break;case n.SMS:i={sms:t};break;case n.PUSH:i={push:t}}a(S(S({},o),i))}return(0,v.jsxs)(s.Z,{display:"flex",justifyContent:"space-between",mb:2,gap:5,children:[(0,v.jsxs)(s.Z,{children:[(0,v.jsx)(r.Z,{variant:"subtitle2",mb:.5,children:t}),(0,v.jsx)(r.Z,{variant:"body2",children:i})]}),(0,v.jsxs)(s.Z,{display:"flex",flexDirection:"column",children:[(0,v.jsx)(b.Z,{label:"Email",labelPlacement:"end",disabled:c,control:(0,v.jsx)(k.Z,{checked:o.email,onChange:function(e,t){l(n.EMAIL,t)}})}),(0,v.jsx)(b.Z,{label:"SMS",labelPlacement:"end",control:(0,v.jsx)(k.Z,{checked:o.sms,onChange:function(e,t){l(n.SMS,t)}})}),(0,v.jsx)(b.Z,{label:"Push",labelPlacement:"end",control:(0,v.jsx)(k.Z,{checked:o.push,onChange:function(e,t){l(n.PUSH,t)}})})]})]})}!function(e){e.EMAIL="EMAIL",e.SMS="SMS",e.PUSH="PUSH"}(n||(n={}));var y=i(97720);function x(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function R(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?x(Object(i),!0).forEach((function(t){(0,a.Z)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):x(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var C={newMessage:{email:!0,sms:!0,push:!0},bookingRequested:{email:!0,sms:!0,push:!0},bookingAccepted:{email:!0,sms:!0,push:!0},bookingRejected:{email:!0,sms:!0,push:!0},bookingCancelled:{email:!0,sms:!0,push:!0},bookingPaymentFailed:{email:!0,sms:!0,push:!0},bookingRefund:{email:!0,sms:!0,push:!0},newJob:{email:!0,sms:!0,push:!0},newJobInterest:{email:!0,sms:!0,push:!0},visitCheckInReminder:{email:!0,sms:!0,push:!0},visitCheckOutReminder:{email:!0,sms:!0,push:!0}};function Z(e){var t=e.user,i=(0,g.cV)(),n=(0,h.$D)(),a=n.userNotificationPreferencesLoading,b=n.userNotificationPreferences,k=n.userNotificationPreferencesError,w=(0,f.l)(),S=(0,c.useState)(C),x=S[0],Z=S[1],P=(0,c.useState)(!1),N=P[0],$=P[1];(0,c.useEffect)((function(){b.forEach((function(e){e.notificationType===d.XS.NewMessage&&Z((function(t){return R(R({},t),{},{newMessage:{email:e.email,sms:e.sms,push:e.push}})})),e.notificationType===d.XS.BookingRequested&&Z((function(t){return R(R({},t),{},{bookingRequested:{email:e.email,sms:e.sms,push:e.push}})})),e.notificationType===d.XS.BookingAccepted&&Z((function(t){return R(R({},t),{},{bookingAccepted:{email:e.email,sms:e.sms,push:e.push}})})),e.notificationType===d.XS.BookingRejected&&Z((function(t){return R(R({},t),{},{bookingRejected:{email:e.email,sms:e.sms,push:e.push}})})),e.notificationType===d.XS.BookingCancelled&&Z((function(t){return R(R({},t),{},{bookingCancelled:{email:e.email,sms:e.sms,push:e.push}})})),e.notificationType===d.XS.BookingPaymentFailed&&Z((function(t){return R(R({},t),{},{bookingPaymentFailed:{email:e.email,sms:e.sms,push:e.push}})})),e.notificationType===d.XS.BookingRefunded&&Z((function(t){return R(R({},t),{},{bookingRefund:{email:e.email,sms:e.sms,push:e.push}})})),e.notificationType===d.XS.NewJobPosted&&Z((function(t){return R(R({},t),{},{newJob:{email:e.email,sms:e.sms,push:e.push}})})),e.notificationType===d.XS.NewJobInterest&&Z((function(t){return R(R({},t),{},{newJobInterest:{email:e.email,sms:e.sms,push:e.push}})})),e.notificationType===d.XS.VisitCheckInReminder&&Z((function(t){return R(R({},t),{},{visitCheckInReminder:{email:e.email,sms:e.sms,push:e.push}})})),e.notificationType===d.XS.VisitCheckOutReminder&&Z((function(t){return R(R({},t),{},{visitCheckOutReminder:{email:e.email,sms:e.sms,push:e.push}})}))}))}),[b]);return(0,v.jsxs)(u.Z,{user:t,children:[(0,v.jsxs)(s.Z,{display:"flex",justifyContent:"space-between",children:[(0,v.jsx)(r.Z,{variant:"h3",children:"Notifications"}),!a&&!k&&(0,v.jsx)(m.Z,{loading:N,variant:"contained",onClick:function(){var e={userId:void 0,notificationPreferences:[{notificationType:d.XS.NewMessage,email:x.newMessage.email,sms:x.newMessage.sms,push:x.newMessage.push},{notificationType:d.XS.BookingRequested,email:x.bookingRequested.email,sms:x.bookingRequested.sms,push:x.bookingRequested.push},{notificationType:d.XS.BookingAccepted,email:x.bookingAccepted.email,sms:x.bookingAccepted.sms,push:x.bookingAccepted.push},{notificationType:d.XS.BookingRejected,email:x.bookingRejected.email,sms:x.bookingRejected.sms,push:x.bookingRejected.push},{notificationType:d.XS.BookingCancelled,email:x.bookingCancelled.email,sms:x.bookingCancelled.sms,push:x.bookingCancelled.push},{notificationType:d.XS.BookingPaymentFailed,email:x.bookingPaymentFailed.email,sms:x.bookingPaymentFailed.sms,push:x.bookingPaymentFailed.push},{notificationType:d.XS.BookingRefunded,email:x.bookingRefund.email,sms:x.bookingRefund.sms,push:x.bookingRefund.push},{notificationType:d.XS.NewJobPosted,email:x.newJob.email,sms:x.newJob.sms,push:x.newJob.push},{notificationType:d.XS.NewJobInterest,email:x.newJobInterest.email,sms:x.newJobInterest.sms,push:x.newJobInterest.push}
1,{notificationType:d.XS.VisitCheckInReminder,email:x.visitCheckInReminder.email,sms:x.visitCheckInReminder.sms,push:x.visitCheckInReminder.push},{notificationType:d.XS.VisitCheckOutReminder,email:x.visitCheckOutReminder.email,sms:x.visitCheckOutReminder.sms,push:x.visitCheckOutReminder.push}]};$(!0),w(e).then((function(){$(!1),i.success("Your preferences were updated.")})).catch((function(){i.error(p.XO.UNEXPECTED_ERROR_TRY_AGAIN),$(!1)}))},sx:O.saveButton,children:"Save"})]}),(0,v.jsx)(o.Z,{style:{margin:l.Z.spacing(2,0)}}),(0,v.jsx)(y.Z,{isLoading:a,isError:!!k,children:(0,v.jsx)(s.Z,{mt:3,display:"flex",flexDirection:"column",children:(0,v.jsxs)(s.Z,{children:[(0,v.jsx)(j,{title:"Message Notifications",description:"Notifications about new messages",notificationSettings:x.newMessage,onSettingsChanged:function(e){return Z((function(t){return R(R({},t),{},{newMessage:e})}))}}),(0,v.jsx)(o.Z,{sx:O.divider}),(0,v.jsx)(j,{title:"Requested Booking Notifications",description:"Notifications about new booking requests",notificationSettings:x.bookingRequested,onSettingsChanged:function(e){return Z((function(t){return R(R({},t),{},{bookingRequested:e})}))}}),(0,v.jsx)(o.Z,{sx:O.divider}),(0,v.jsx)(j,{title:"Accepted Booking Notifications",description:"Notifications about accepted bookings",notificationSettings:x.bookingAccepted,onSettingsChanged:function(e){return Z((function(t){return R(R({},t),{},{bookingAccepted:e})}))}}),(0,v.jsx)(o.Z,{sx:O.divider}),(0,v.jsx)(j,{title:"Rejected Booking Notifications",description:"Notifications about rejected bookings",notificationSettings:x.bookingRejected,onSettingsChanged:function(e){return Z((function(t){return R(R({},t),{},{bookingRejected:e})}))}}),(0,v.jsx)(o.Z,{sx:O.divider}),(0,v.jsx)(j,{title:"Cancelled Booking Notifications",description:"Notifications about cancelled bookings",notificationSettings:x.bookingCancelled,onSettingsChanged:function(e){return Z((function(t){return R(R({},t),{},{bookingCancelled:e})}))},disableEmail:!0}),(0,v.jsx)(o.Z,{sx:O.divider}),(0,v.jsx)(j,{title:"Failed Booking Payment Notifications",description:"Notifications about failed booking payments",notificationSettings:x.bookingPaymentFailed,onSettingsChanged:function(e){return Z((function(t){return R(R({},t),{},{bookingPaymentFailed:e})}))},disableEmail:!0}),(0,v.jsx)(o.Z,{sx:O.divider}),(0,v.jsx)(j,{title:"Refunded Booking Notifications",description:"Notifications about refunded bookings",notificationSettings:x.bookingRefund,onSettingsChanged:function(e){return Z((function(t){return R(R({},t),{},{bookingRefund:e})}))},disableEmail:!0}),(0,v.jsx)(o.Z,{sx:O.divider}),t.hasCaregiverProfile&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(j,{title:"New Job Request Notifications",description:"Notifications about new job requests",notificationSettings:x.newJob,onSettingsChanged:function(e){return Z((function(t){return R(R({},t),{},{newJob:e})}))}}),(0,v.jsx)(o.Z,{sx:O.divider}),(0,v.jsx)(j,{title:"Visit Check-in Reminders",description:"Reminders 30 minutes before your visit starts",notificationSettings:x.visitCheckInReminder,onSettingsChanged:function(e){return Z((function(t){return R(R({},t),{},{visitCheckInReminder:e})}))}}),(0,v.jsx)(o.Z,{sx:O.divider}),(0,v.jsx)(j,{title:"Visit Check-out Reminders",description:"Reminders to check out when your visit ends",notificationSettings:x.visitCheckOutReminder,onSettingsChanged:function(e){return Z((function(t){return R(R({},t),{},{visitCheckOutReminder:e})}))}}),(0,v.jsx)(o.Z,{sx:O.divider})]}),!t.hasCaregiverProfile&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(j,{title:"New Job Request Interest Notifications",description:"Notifications about new job interests in job you posted",notificationSettings:x.newJobInterest,onSettingsChanged:function(e){return Z((function(t){return R(R({},t),{},{newJobInterest:e})}))}}),(0,v.jsx)(o.Z,{sx:O.divider})]})]})})})]})}var O={divider:{margin:l.Z.spacing(3,0)},saveButton:{width:"150px"}}},22052:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/account/notifications",function(){return i(58893)}])}},function(e){e.O(0,[9774,2888,179],(function(){return t=22052,e(e.s=t);var t}));var t=e.O();_N_E=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.