1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},a=(new e.Error).stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="9a9eae67-b31a-406f-99de-687400fbb8e3",e._sentryDebugIdIdentifier="sentry-dbid-9a9eae67-b31a-406f-99de-687400fbb8e3")}()}catch(e){}!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];if(null!=t)for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}return e}({},e._sentryModuleMetadata[(new e.Error).stack],{"_sentryBundlerPluginAppKey:pawshake-seo-application-key":!0})}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[38026,97554],{26117:function(e,a,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard",function(){return t(96347)}])},96347:function(e,a,t){"use strict";t.r(a),t.d(a,{__N_SSP:function(){return ap},default:function(){return ax}});var r,s,i,n,o=t(5311),l=t(13714),c=t(87680),d=t(21433),u=t(66840),m=t(45156),h=t(34749),f=t(17946),b=t(78684),g=t(23968),p=t(65639),x=t(46006),v=t(79217),j=t(80777),y=t(7909),w=t(81271),z=t(53503),N=t(87927),k=t(59285),S=t(81369);let P=e=>e.flatMap(e=>{let a=C(e.dashboardNotificationData);if(void 0===a)return[];let t=D(e.dashboardNotificationType);return void 0===t?[]:{...e,action:{href:a,label:t.label,icon:t.icon}}}),A=S.z.enum(["notification","profile","message"]),D=e=>{switch(e){case"bookingWasReviewed":return{label:"features:features.notifications.actions.messageNotRead",icon:A.enum.profile};case"bookingWasDiscounted":case"bookingDiscountWasRemoved":case"bookingWasRescheduled":return{label:"features:features.notifications.actions.messageNotRead",icon:A.enum.notification};case"bookingCanBeReviewed":return{label:"features:features.notifications.actions.leaveFeedback",icon:A.enum.profile};case"bookingWasRequested":return{label:"features:features.notifications.actions.enquiryReceived",icon:A.enum.notification};case"bookingWasPaidForByPetOwner":return{label:"features:features.notifications.actions.bookingAwaitingConfirmation",icon:A.enum.notification};case"bookingWasAccepted":return{label:"features:features.notifications.actions.bookingConfirmed",icon:A.enum.notification};case"bookingWasDeclined":return{label:"features:features.notifications.actions.bookingDeclined",icon:A.enum.notification};case"poorPicture":return{label:"features:features.notifications.actions.poorPicture",icon:A.enum.notification};case"poorGallery":return{label:"features:features.notifications.actions.poorGallery",icon:A.enum.notification};case"poorGalleryMiscellaneous":return{label:"features:features.notifications.actions.poorGalleryMiscellaneous",icon:A.enum.notification};case"poorGallerySittersHome":return{label:"features:features.notifications.actions.poorGallerySittersHome",icon:A.enum.notification};case"poorDescriptionServicesAtOwnersHome":return{label:"features:features.notifications.actions.poorDescriptionServicesAtOwnersHome",icon:A.enum.notification};case"poorDescriptionMissingInfoAboutSitter":return{label:"features:features.notifications.actions.poorDescriptionMissingInfoAboutSitter",icon:A.enum.notification};case"poorDescriptionShowsContactDetails":return{label:"features:features.notifications.actions.poorDescriptionShowsContactDetails",icon:A.enum.notification};case"poorDescriptionServicesAtSittersHome":return{label:"features:features.notifications.actions.poorDescriptionServicesAtSittersHome",icon:A.enum.notification};case"poorDescriptionMiscellaneous":return{label:"features:features.notifications.actions.poorDescriptionMiscellaneous",icon:A.enum.notification};case"poorDescriptionWrongLanguage":return{label:"features:features.notifications.actions.poorDescriptionWrongLanguage",icon:A.enum.notification};case"userSentAsset":return{label:"features:features.notifications.actions.petPhotoNotViewed",icon:A.enum.message};case"userSentTextMessage":return{label:"features:features.notifications.actions.messageNotRead",icon:A.enum.message};default:return}},C=e=>{let{targetScreen:a,conversationId:t,sitterId:r}=e;return"conversationScreen"===a&&void 0!==t?"/conversation/detail?conversationId=".concat(t):"sitterReviewsScreen"===a&&void 0!==r?"/sitter/".concat(r,"#reviews"):"profilePictureScreen"===a?"/profile/aboutMe":"profileGalleryScreen"===a?"/profile/sitterListing/profileGallery":"profileDescriptionScreen"===a?"/profile/sitterListing/description":void 0},U=e=>{switch(e){case"notification":return(0,o.jsx)(g.W,{className:"aspect-square w-lg"});case"profile":return(0,o.jsx)(g.fa,{className:"aspect-square w-lg"});case"message":return(0,o.jsx)(g.X,{className:"aspect-square w-lg"})}};var R=t(47165),F=t(98168),E=t(99274),T=t(27962),B=t(87755),L=t(88037),I=t(68670),O=t(18454),_=t(52939);(r=i||(i={}
1)).NotSupported="copy-to-clipboard/not-supported",r.Failed="copy-to-clipboard/failed";class q extends _.Gp{}let M=(e,a)=>({copyToClipboard:(0,u.useCallback)(async t=>{var r;if(!(null===(r=navigator)||void 0===r?void 0:r.clipboard)){O.k.warn("Clipboard not supported");let e=new q({name:"copy-to-clipboard/not-supported"});return a&&a(e),!1}try{return await navigator.clipboard.writeText(t),e&&e(),!0}catch(t){O.k.warn("Copy failed",{error:t});let e=new q({name:"copy-to-clipboard/failed",additionalLogs:{error:t}});return a&&a(e),!1}},[])});var W=t(56170),Z=t(96523),K=t(5578),V=t(39308),Y=t.n(V),G=t(23433);let H=e=>{if(!e||!Array.isArray(e))return[];let a=[];return e.forEach(e=>{let t=eN.safeParse(e);t.success&&a.push(t.data)}),a};var $=t(79543),X=t(29480),Q=t(34932),J=t(99861);let ee=e=>{let a=new Date,t=new Date(a.getFullYear(),a.getMonth(),a.getDate()),r=new Date(e),s=new Date(r.getFullYear(),r.getMonth(),r.getDate()),i=(0,$.Z)(r,(0,X.Z)(a,-12)),n=(0,Q.Z)(t,s);return{numberOfDaysSinceLastUpdate:n<0?0:n,lastUpdatedOn:e,hideUpdateButtons:i,isFuture:(0,$.Z)(s,t)}},ea=(e,a)=>{let t=new Date,r=new Date(t.getFullYear(),t.getMonth(),t.getDate()),s=(0,E.I$)(e),i=[],n=Object.keys(a);for(let e=0;e<n.length;e++){let t=new Date(n[e]);s.find(e=>e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate())&&i.push({displayedDay:t.getDate(),isAvailable:"available"===a[n[e]].availability,hasBookings:a[n[e]].numberOfConfirmedBookings>0,isPast:(0,J.Z)(t,r),isToday:t.getDate()===r.getDate()})}return i};var et=t(34095);S.z.object({isPublished:S.z.boolean(),isPenalised:S.z.boolean(),isBlocked:S.z.boolean(),isOnHoliday:S.z.boolean(),isInactive:S.z.boolean()});let er=S.z.string(),es="fetch-most-recent-availability-update",ei=async e=>{try{let a=await et.hi.get({url:"/dashboard/calendar/most-recent-availability-update",user:e}),t=await a.json();return er.parse(t)}catch(e){O.k.error("dashboard.api.tsx - fetchMostRecentAvailabilityUpdate - try/catch",{error:e});return}},en=()=>{let{user:e}=(0,G.f)();return(0,W.a)({queryKey:[es],queryFn:()=>ei(e)})},eo=S.z.object({targetScreen:S.z.string(),conversationId:S.z.string().optional(),sitterId:S.z.string().optional()}),el=S.z.object({dashboardNotificationId:S.z.string(),dashboardNotificationType:S.z.string(),dashboardNotificationMessage:S.z.string(),dashboardNotificationData:eo,dashboardNotificationRecipient:S.z.string(),createdOn:S.z.string(),manualDismissable:S.z.boolean()}),ec=S.z.array(el),ed="fetch-dashboard-notifications",eu=async e=>{try{let a=await et.hi.get({url:"/dashboard/notifications",user:e}),t=await a.json(),r=ec.parse(t);return P(r)}catch(e){O.k.error("dashboard.api.tsx - fetchDashboardNotifications - try/catch",{error:e});return}},em=()=>{let{user:e}=(0,G.f)();return(0,W.a)({queryKey:[ed],queryFn:()=>eu(e)})},eh=()=>{let{user:e}=(0,G.f)(),a=(0,Z.NL)();return(0,K.D)({mutationFn:a=>ef(e,a),onSuccess:async()=>{a.invalidateQueries({queryKey:[ed]})}})},ef=async(e,a)=>{try{return await et.hi.dispatchCommand({commandName:"Pawshake.Notifications.DashboardNotifications.DismissDashboardNotification.ManualDismissDashboardNotification",user:e,payload:{dashboardNotificationId:a}})}catch(e){throw O.k.error("dashboard.api.tsx - removeDashboardNotification - Error",{error:e}),e}},eb=()=>{let{user:e}=(0,G.f)(),{locale:a}=(0,b.bU)();return(0,W.a)({queryKey:["fetch-sitter-flyer",a],queryFn:()=>eg(e,a),enabled:!1,retry:!1})},eg=async(e,a)=>{try{let t=await et.hi.get({url:"/sitter/marketing/flyer/".concat(a),user:e}),r=await t.blob();return Y().saveAs(r,"my-pawshake-flyer.pdf"),Promise.resolve({})}catch(e){O.k.error("dashboard.api.tsx - fetchSitterFlyer - try/catch",{error:e});return}},ep=()=>{let{user:e}=(0,G.f)(),{locale:a}=(0,b.bU)();return(0,W.a)({queryKey:["fetch-sitter-bussines-card",a],queryFn:()=>ex(e,a),enabled:!1,retry:!1})},ex=async(e,a)=>{try{let t=await et.hi.get({url:"/sitter/marketing/business-card/".concat(a),user:e}),r=await t.blob();return Y().saveAs(r,"my-pawshake-business-card.pdf"),Promise.resolve({})}catch(e){O.k.error("dashboard.api.tsx - fetchSitterBusinessCard - try/catch",{error:e});return}},ev=()=>{let{user:e}=(0,G.f)();return(0,K.D)({mutationFn:a=>{let{from:t,to:r}=a;return ej(e,t,r)}})},ej=async(e,a,t)=>{try{let r=await et.hi.get({url:"/sitter/tax-report/".concat((0,E.DB)(a),"/").concat((0,E.DB)(t)),user:e}),s=await r.blob(),i="my-pawshake-booking-overview-".concat((0,E.xr)(a),"-").concat((0,E.xr)(t),".pdf");return Y().saveAs(s,i),Promise.resolve()}catch(e){throw O.k.error("dashboard.api.tsx - fetchSitterBusinessCard - try/catch",{error:e}),e}};(s=n||(n={})).UPDATE_PROFILE_PIC="UPDATE_PROFILE_PIC",s.UPDATE_CALENDAR="UPDATE_CALENDAR",s.UPDATE_STRIPE_REQUIREMENTS="UPDATE_STRIPE_REQUIREMENTS";let ey=S.z.object({key:S.z.literal("UPDATE_PROFILE_PIC"),metadata:S.z.object({})}),ew=S.z.object({key:S.z.literal("UPDATE_CALENDAR"),metadata:S.z.object({lastUpdatedOn:S.z.string().datetime({offset:!0})})}),ez=S.z.object({key:S.z.literal("UPDATE_STRIPE_REQUIREMENTS"),metadata:S.z.object({deadline:S.z.string().datetime({offset:!0})})}),eN=S.z.discriminatedUnion("key",[ey,ew,ez]);S.z.array(eN);let ek="fetch-user-actions",eS=async e=>{try{let a=await et.hi.get({url:"/users/required-actions",user:e,config:{baseUrl:"https://api.production.pawshake.io"}}),t=await a.json();return H(t)}catch(e){O.k.error("dashboard.api.tsx - fetchUserActions - try/catch",{error:e});return}},eP=()=>{let{user:e}=(0,G.f)();return(0,W.a)({queryKey:[ek],queryFn:()=>eS(e)})},eA=S.z.object({type:S.z.string(),verified:S.z.boolean(),title:S.z.string()}),eD=S.z.object({title:S.z.string(),description:S.z.string(),steps:S.z.array(eA)}),eC=async e=>{try{let a=await et.hi.get({url:"/dashboard/minimum-profile-requirements",user:e}),t=await a.json();return eD.parse(t)}catch(e){O.k.error("dashboard.api.tsx - fetchMinimumProfileRequirements - try/catch",{error:e});return}},eU=()=>{let{user:e}=(0,G.f)();return(0,W.a)({queryKey:["fetch-minimum-profile-requirements"],queryFn:()=>eC(e)})},eR=S.z.object({numberOfConfirmedBookings:S.z.number(),availability:S.z.string(),hasDateSpecificAvailableSlots:S.z.boolean()}),eF=S.z.record(eR),eE="fetch-availability-summary",eT=async(e,a,t)=>{try{let r=await et.hi.get({url:"/dashboard/calendar/availability-summary/".concat(a.getFullYear(),"/").concat(a.getMonth()+1),user:t}),s=await r.json(),i=eF.parse(s);return ea(e,i)}catch(e){O.k.error("dashboard.api.tsx - fetchAvailabilitySummary - try/catch",{error:e});return}},eB=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,{user:a}=(0,G.f)(),{locale:t}=(0,b.bU)();return(0,W.a)({queryKey:[eE],queryFn:()=>eT(t,e,a)})},eL=e=>{let{user:a}=(0,G.f)(),t=(0,Z.NL)();return(0,K.D)({mutationFn:()=>eI(a),onSuccess:async()=>{t.invalidateQueries({queryKey:[es]}),t.invalidateQueries({queryKey:[eE]}),t.invalidateQueries({queryKey:[ek]}),e()}})},eI=async e=>{try{return await et.hi.dispatchCommand({commandName:"Pawshake.Sitter.Availability.AvailabilityConfirmation.WriteModel.ConfirmAvailability",user:e})}catch(e){throw O.k.error("dashboard.api.tsx - confirmAvailability - Error",{error:e}),e}},eO=S.z.object({referralLink:S.z.string().url()}),e_=async e=>{try{let a=await et.hi.get({url:"/v1/referrals/link",user:e,config:{baseUrl:"https://api.production.pawshake.io"}}),t=await a.json();return eO.parse(t)}catch(e){O.k.error("dashboard.api.tsx - fetchReferral - try/catch",{error:e});return}},eq=()=>{let{user:e}=(0,G.f)();return(0,W.a)({queryKey:["fetch-referral-link"],queryFn:()=>e_(e)})};var eM=t(23417),eW=t(82415),eZ=t(76696),eK=t(90272),eV=t(7404);let eY=[{range:"week",relative:"current"},{range:"week",relative:"previous"},{range:"month",relative:"current"},{range:"month",relative:"previous"},{range:"quarter",relative:"current"},{range:"quarter",relative:"previous"},{range:"year",relative:"current"},{range:"year",relative:"previous"}],eG=(e,a,t)=>{let r=new Date;switch(e){case"week":{let e="current"===a?r:new Date(r.getTime()-6048e5),s=(0,E.BJ)(t);return{start:(0,eK.Z)(e,{locale:s}),end:(0,eV.Z)(e,{locale:s})}}case"month":{let e="current"===a?r.getMonth():r.getMonth()-1;return{start:new Date(r.getFullYear(),e,1),end:new Date(r.getFullYear(),e+1,0)}}case"quarter":{let e=Math.floor(r.getMonth()/3);if("current"===a)return{start:new Date(r.getFullYear(),3*e,1),end:new Date(r.getFullYear(),3*e+3,0)};{let a=e-1,t=r.getFullYear();return a<0&&(a=3,t-=1),{start:new Date(t,3*a,1),end:new Date(t,3*a+3,0)}}}case"year":{let e="current"===a?r.getFullYear():r.getFullYear()-1;
1return{start:new Date(e,0,1),end:new Date(e,12,0)}}}};var eH=t(67197),e$=t(46409),eX=t(41830);let eQ=e=>{switch(e.type){case"phoneNumber":return{href:"/profile/sms-verification",icon:g.ba,label:"features:features.dashboard.minimumProfileRequirements.verifyPhone"};case"profilePicture":return{href:"/profile/about-me",icon:g.K,label:"features:features.dashboard.minimumProfileRequirements.uploadProfilePicture"};case"address":return{href:"/profile/address",icon:g.H,label:"features:features.dashboard.minimumProfileRequirements.address"};default:return}},eJ=e=>{let{sitterStatus:a,sitterId:t}=e,{t:r}=(0,l.Z)("features"),{locale:s}=(0,b.bU)(),i=(0,eX.gb)(a),n=i.zendeskArticle?eW._j.zendesk.article(s,i.zendeskArticle):void 0;return(0,o.jsx)(z.a,{colorScheme:"info",children:(0,o.jsxs)(y.a,{className:"w-full flex-col justify-between md:flex-row",children:[(0,o.jsxs)(y.a,{className:"flex-col gap-sm",children:[(0,o.jsxs)(y.a,{className:"gap-sm",children:[r("features.dashboard.profile.stateLabel"),(0,o.jsx)(e$.a,{variant:"solid",colorScheme:i.color,className:"w-fit",children:r("".concat(i.label,".label")).toUpperCase()})]}),(0,o.jsx)("small",{className:"max-w-screen-sm text-info-600",children:(0,o.jsx)(h.Z,{i18nKey:"".concat(i.label,".tooltip"),components:{zendeskLink:(0,o.jsx)(B.F,{"data-test-id":"profileStatusWidget.zendeskLink",href:null!=n?n:"",target:"_blank",rel:"noreferrer"})}})})]}),t&&(0,o.jsx)("div",{className:"mt w-fit shrink-0 md:mt-0",children:(0,o.jsx)(B.F,{"data-test-id":"profileBanner.viewProfile",href:"/sitter/".concat(t),target:"_blank",children:(0,o.jsxs)(y.a,{className:"-mt-sm h-xl items-center gap-sm",children:[r("features.dashboard.profile.link"),(0,o.jsx)(g.v,{className:"h w"})]})})})]})})},e0=()=>{let{t:e}=(0,l.Z)("features"),{data:a}=eU();return(0,o.jsxs)(I.$,{className:"border border-info-100 bg-info-50 shadow lg:mb-0",title:e("features.dashboard.minimumProfileRequirements.title"),children:[(0,o.jsx)("p",{children:e("features.dashboard.minimumProfileRequirements.description")}),(0,o.jsx)(y.a,{className:"flex-col gap lg:flex-row lg:gap-0",children:null==a?void 0:a.steps.map((t,r)=>{let s=eQ(t);return s?(0,o.jsx)("div",{className:"flex-1",children:(0,o.jsx)(B.F,{variant:"ghost",className:"font-normal","data-test-id":"MinimumProfileRequirementsBanner.".concat(t.type),href:s.href,passHref:!0,children:(0,o.jsxs)("div",{className:(0,j.b)("relative rounded p-sm hover:bg-gray-50",{"pr-xl lg:pr-sm":!0===t.verified}),children:[(0,o.jsx)("div",{className:(0,j.b)("absolute left-[1.75rem] top-0 w-xxs bg-primary lg:left-0 lg:top-xl",{"h-full lg:h-xxs lg:w-full":0!==r&&r!==a.steps.length-1,"top-1/2 h-full lg:left-1/2 lg:h-xxs lg:w-full":0===r,"-top-lg h-full lg:left-0 lg:h-xxs lg:w-1/2":r===a.steps.length-1})}),(0,o.jsxs)(y.a,{className:"items-center gap lg:flex-col",children:[(0,o.jsx)("div",{className:"relative",children:(0,o.jsx)(N.c,{className:(0,j.b)("size-xl border-2 border-primary bg-info-50 lg:h-2xl lg:w-2xl",{"bg-primary":!0===t.verified}),children:!1===t.verified?(0,o.jsx)(s.icon,{className:"aspect-square w text-primary-dark lg:w-lg"}):(0,o.jsx)(g.j,{className:"aspect-square w text-onDark lg:w-lg"})})}),e(s.label)]})]})})},r):null})})]})};var e1=t(54294),e7=t(89476),e2=t(28522);let e4=(e,a,t)=>{switch(e){case"bookingRate":case"reviewRate":return{title:"features:features.statistics.".concat(e,".title"),description:"features:features.statistics.".concat(e,".description"),value:null!==a?(0,e2.rl)(100*a,t):"-"};case"responseTimeInSeconds":return{title:"features:features.statistics.".concat(e,".title"),description:"features:features.statistics.".concat(e,".description"),value:null!==a?(0,e2.xh)(a,t):"-"};case"cancellations":case"uniqueClients":case"repeatClients":return{title:"features:features.statistics.".concat(e,".title"),description:"features:features.statistics.".concat(e,".description"),value:null!==a?a:"-"};default:return}};var e5=t(52696);let e3=S.z.object({bookingRate:S.z.number().nullable(),reviewRate:S.z.number().nullable(),responseTimeInSeconds:S.z.number().nullable(),repeatBookings:S.z.number().nullable(),cancellations:S.z.number().nullable(),uniqueClients:S.z.number().nullable(),uniquePets:S.z.number().nullable(),repeatClients:S.z.number().nullable()}),e9=S.z.object({profileViews:S.z.number().nullable(),serviceStatistics:S.z.object({petBoarding:e3,doggyDayCare:e3,dogWalking:e3,homeVisits:e3,sleepover:e3}),overallStatistics:e3,zendeskArticleIds:S.z.object({bookingRate:S.z.number(),reviewRate:S.z.number(),responseTimeInSeconds:S.z.number(),repeatBookings:S.z.number(),cancellations:S.z.number(),uniqueClients:S.z.number(),uniquePets:S.z.number(),repeatClients:S.z.number(),profileViews:S.z.number()})}),e8=async e=>{try{let a=await et.hi.get({url:"/dashboard/sitter-statistics",user:e}),t=await a.json();return e9.parse(t)}catch(e){O.k.error("statistics.api.tsx - fetchSitterStatistics - try/catch",{error:e});return}},e6=()=>{let{user:e}=(0,G.f)();return(0,W.a)({queryKey:["fetch-sitter-statistics-notifications"],queryFn:()=>e8(e),refetchInterval:10*e5.EB})};var ae=t(15457);let aa=()=>{let e="overall",{t:a}=(0,l.Z)("features"),{data:t}=e6(),[r,s]=(0,u.useState)(e);if(!t)return null;let i=Object.keys(t.serviceStatistics),n="overall"===r?t.overallStatistics:t.serviceStatistics[r];return(0,o.jsxs)(I.$,{className:"overflow-y-auto lg:col-span-2",children:[(0,o.jsxs)("div",{children:[(0,o.jsxs)(y.a,{className:"items-center justify-between",children:[(0,o.jsx)("h2",{className:"mb-sm",children:a("features.statistics.title")}),(0,o.jsx)("h2",{className:"mb-sm",children:"".concat(t.profileViews," ").concat(a("features.statistics.profileViews.title"))})]}),(0,o.jsx)("p",{className:"mb-0 mt-xs text-light",children:a("features.statistics.description")})]}),(0,o.jsxs)(e1.a,{value:r,onValueChange:s,children:[(0,o.jsx)("div",{className:"grid gap md:grid-cols-2 lg:grid-cols-3",children:(0,o.jsx)(e1.a.Trigger,{children:(0,o.jsx)(e1.a.Value,{})})}),(0,o.jsxs)(e1.a.Content,{children:[(0,o.jsx)(e1.a.Item,{icon:g.C,value:e,children:(0,o.jsx)(y.a,{className:"items-center justify-center gap space-y-0",children:(0,o.jsx)("div",{children:a("features.statistics.overall")})})}),i.map(e=>{let t=(0,ae.Sj)(e);return(0,o.jsx)(e1.a.Item,{icon:t.serviceIcon,value:e,children:(0,o.jsx)(y.a,{className:"items-center justify-center gap space-y-0",children:(0,o.jsx)("div",{children:a(t.label)})})},e)})]})]}),(0,o.jsx)(at,{statistics:n})]})},at=e=>{let{statistics:a}=e,{locale:t}=(0,b.bU)(),{t:r}=(0,l.Z)("common");return(0,o.jsx)("div",{className:"grid grid-cols-2 gap lg:grid-cols-3",children:Object.keys(a).map((e,s)=>{let i=a[e],n=e4(e,i,t);return n?(0,o.jsxs)(e7.a,{children:[(0,o.jsx)(e7.a.Header,{children:(0,o.jsx)(e7.a.Title,{className:"flex items-center justify-between text-base",children:r(n.title)})}),(0,o.jsxs)(e7.a.Content,{className:"flex-col",children:[(0,o.jsx)("div",{className:"display2",children:n.value}),(0,o.jsx)("small",{children:r(n.description)})]})]},e):null})})},ar=()=>{let{t:e}=(0,l.Z)("features"),{data:a}=eP();return a&&0!==a.length?(0,o.jsx)(I.$,{className:"max-h-[640px] overflow-y-auto",title:e("features.dashboard.neededActions.title"),children:(0,o.jsx)(y.a,{className:"flex-col gap",children:null==a?void 0:a.map(e=>(0,o.jsx)(u.Fragment,{children:as(e)},e.key))})}):(0,o.jsx)(I.$,{className:"max-h-[640px] overflow-y-auto",title:e("features.dashboard.neededActions.title"),children:(0,o.jsx)(z.a,{colorScheme:"info",children:e("features.dashboard.neededActions.empty")})})},as=e=>{switch(e.key){case n.UPDATE_CALENDAR:return(0,o.jsx)(ai,{userAction:e});case n.UPDATE_STRIPE_REQUIREMENTS:return(0,o.jsx)(an,{userAction:e});case n.UPDATE_PROFILE_PIC:return(0,o.jsx)(ao,{userAction:e})}},ai=e=>{let{t:a}=(0,l.Z)("features"),{locale:t}=(0,b.bU)(),{userAction:r}=e,s=new Date(r.metadata.lastUpdatedOn),i=(Date.now()-s.getTime())/864e5;return(0,o.jsxs)(B.F,{variant:"ghost",className:"group flex items-start gap rounded border border-card p font-normal hover:border-transparent hover:bg-darker hover:no-underline hover:outline hover:outline-2 hover:outline-gray-400",href:eW._j.profile.availability,"data-test-id":"updateCalendarUserActionWidget.action",children:[(0,o.jsx)(N.b,{className:"size-xl shrink-0 rounded bg-orange-50",children:(0,o.jsx)(g.i,{className:"aspect-square w-lg text-warning"})}),(0,o.jsxs)(y.a,{className:"flex-col items-stretch gap-sm self-stretch",children:[(0,o.jsx)("div",{children:a("features.dashboard.neededActions.updateCalendar.description")}),(0,o.jsx)("small",{className:(0,j.b)({"text-warning":i>10&&i<=30,"text-error":i>30}),children:a("features.dashboard.availability.lastUpdated",{relativeDate:(0,E.BK)(s,t)})}),(0,o.jsx)("div",{className:"mt-sm font-bold text-primary group-hover:underline",children:a("features.dashboard.neededActions.updateCalendar.action")})]})]})},an=e=>{let{t:a}=(0,l.Z)("features"),{userAction:t}=e,r=new Date(t.metadata.deadline);return(0,o.jsxs)(B.F,{variant:"ghost",className:"group flex items-start gap rounded border border-card p font-normal hover:border-transparent hover:bg-darker hover:no-underline hover:outline hover:outline-2 hover:outline-gray-400",href:eW._j.profilePaymentInformation,"data-test-id":"updateStripeUserActionWidget.action",children:[(0,o.jsx)(N.b,{className:"size-xl shrink-0 rounded bg-orange-50",children:(0,o.jsx)(p.k,{className:"aspect-square w-lg text-warning"})}),(0,o.jsxs)(y.a,{className:"flex-col items-stretch gap-sm self-stretch",children:[(0,o.jsx)("div",{children:a("features.dashboard.neededActions.updateStripe.description")}),(0,o.jsx)("small",{className:"text-error",children:a("features.dashboard.neededActions.updateStripe.deadline",{deadline:(0,E.oN)(r)})}),(0,o.jsx)("b",{className:"mt-sm text-primary group-hover:underline",children:a("features.dashboard.neededActions.updateStripe.action")})]})]})},ao=e=>{let{t:a}=(0,l.Z)("features");return(0,o.jsxs)(B.F,{variant:"ghost",className:"group flex items-start gap rounded border border-card p font-normal hover:border-transparent hover:bg-darker hover:no-underline hover:outline hover:outline-2 hover:outline-gray-400",href:eW._j.profile.aboutMe.index,"data-test-id":"updateProfilePicUserActionWidget.action",children:[(0,o.jsx)(N.b,{className:"size-xl shrink-0 rounded bg-orange-50",children:(0,o.jsx)(g.fa,{className:"aspect-square w-lg text-warning"})}),(0,o.jsxs)(y.a,{className:"flex-col items-stretch gap-sm self-stretch",children:[(0,o.jsx)("div",{children:a("features.dashboard.neededActions.updateProfilePic.description")}),(0,o.jsx)("div",{className:"font-bold text-primary group-hover:underline",children:a("features.dashboard.neededActions.updateProfilePic.action")})]})]})},al=e=>{let{sitterStatus:a,userInfo:t}=e,{isSitter:r,meetsMinimumProfileRequirements:s}=t,{language:i}=(0,b.bU)(),n=(null==a?void 0:a.isPublished)&&"en"===i;return(0,o.jsxs)(o.Fragment,{children:[!1===s&&(0,o.jsx)(e0,{}),r&&(0,o.jsx)(eJ,{sitterStatus:a,sitterId:t.sitterId}),!r&&(0,o.jsxs)("div",{className:"grid grid-cols-1 gap-sm md:gap lg:grid-cols-2",children:[(0,o.jsx)(au,{}),(0,o.jsx)(ar,{}),(0,o.jsx)(eH.o,{compactMode:!0}),(0,o.jsx)(eH.Y,{compactMode:!0}),(0,o.jsx)(ab,{}),(0,o.jsx)(R.n,{className:"lg:col-span-2"})]}),r&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"grid grid-cols-1 gap md:-mb-sm lg:grid-cols-3",children:[(0,o.jsx)(ac,{}),(0,o.jsx)(ar,{})]}),(0,o.jsxs)("div",{className:"grid grid-cols-1 gap lg:grid-cols-2",children:[(0,o.jsx)(au,{className:(0,j.b)({"lg:col-span-2":!1===n})}),n&&(0,o.jsx)(am,{}),(0,o.jsx)(ab,{}),(0,o.jsx)(aa,{}),(0,o.jsx)(af,{})]})]})]})},ac=()=>{let{t:e}=(0,l.Z)("features"),{locale:a}=(0,b.bU)(),{data:t}=en(),{mutate:r,isPending:s}=eL(()=>{f.Am.success(e("features.dashboard.availability.toast.success"))});if(!t)return null;let i=ee(t),n=new Date(i.lastUpdatedOn);return(0,o.jsxs)(I.$,{className:"max-h-[640px] overflow-y-auto lg:col-span-2",title:e("features.dashboard.availability.title"),url:"/profile/availability",urlButtonText:e("features.dashboard.availability.openCalendar"),children:[(0,o.jsx)(ad,{numberOfDaysSinceLastUpdate:i.numberOfDaysSinceLastUpdate}),(0,o.jsxs)(y.a,{className:"flex-col gap-xs",children:[(0,o.jsx)(ah,{}),(0,o.jsxs)(y.a,{className:"items-center justify-end gap-xs self-center",children:[(0,o.jsx)(g.h,{className:"h w text-light"}),(0,o.jsx)("small",{className:"grow text-center",children:e("features.dashboard.availability.bookingThisDay")})]})]}),(0,o.jsx)(T.i,{}),(0,o.jsxs)(y.a,{className:"flex-wrap justify-between gap",children:[(0,o.jsxs)(y.a,{className:"flex-col",children:[!1===i.hideUpd
1ateButtons&&(0,o.jsx)("div",{children:e("features.dashboard.availability.isCorrect")}),(0,o.jsxs)(y.a,{className:"items-center gap-xs",children:[(0,o.jsx)(g.z,{className:"h w text-green-600"}),(0,o.jsxs)("small",{children:[!1===i.isFuture&&e("features.dashboard.availability.lastUpdated",{relativeDate:(0,E.BK)(n,a)}),!0===i.isFuture&&e("features.dashboard.availability.upToDate")]})]})]}),(0,o.jsx)(y.a,{className:"items-center gap-sm",children:!1===i.hideUpdateButtons&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(w.d,{variant:"outline",colorScheme:"default",onClick:()=>r(),isLoading:s,size:"sm","data-test-id":"availabilityWidget.yes",children:e("common:generic.yes")}),(0,o.jsx)(w.d,{variant:"outline",colorScheme:"default",size:"sm","data-test-id":"availabilityWidget.noButton",asChild:!0,children:(0,o.jsx)(B.F,{variant:"ghost",href:"/profile/availability","data-test-id":"availabilityWidget.no",children:e("features.dashboard.availability.updateNow")})})]})})]})]})},ad=e=>{let{numberOfDaysSinceLastUpdate:a}=e;return a>30?(0,o.jsx)(z.a,{colorScheme:"danger",children:(0,o.jsx)("div",{children:(0,o.jsx)(h.Z,{i18nKey:"features:features.dashboard.availability.30days",components:eM.v})})}):a>10?(0,o.jsx)(z.a,{colorScheme:"warning",children:(0,o.jsx)("div",{children:(0,o.jsx)(h.Z,{i18nKey:"features:features.dashboard.availability.10days",components:eM.v})})}):(0,o.jsx)("div",{children:(0,o.jsx)(h.Z,{i18nKey:"features:features.dashboard.availability.intro",components:eM.v})})},au=e=>{let{className:a=""}=e,{t}=(0,l.Z)("features"),{data:r}=em(),{mutate:s}=eh();return r&&0!==r.length?(0,o.jsx)(I.$,{className:(0,j.b)("max-h-[520px] overflow-y-auto",a),title:t("features.dashboard.notifications.title"),children:(0,o.jsx)(y.a,{className:"flex-col gap",children:null==r?void 0:r.map(e=>(0,o.jsxs)(y.a,{className:"items-center gap-xs",children:[(0,o.jsxs)(B.F,{variant:"ghost",parentClassName:"flex-1",className:"group flex w-full flex-1 gap rounded border border-card p font-normal hover:border-transparent hover:bg-darker hover:no-underline hover:outline hover:outline-2 hover:outline-gray-400","data-test-id":"notificationsWidget.".concat(e.dashboardNotificationData.targetScreen),href:e.action.href,children:[(0,o.jsx)(N.b,{className:"size-xl shrink-0 rounded bg-darker",children:U(e.action.icon)}),(0,o.jsxs)(y.a,{className:"flex-col gap-xs",children:[(0,o.jsx)("span",{children:e.dashboardNotificationMessage}),(0,o.jsx)("span",{className:"font-bold text-primary group-hover:underline",children:t(e.action.label)})]})]}),e.manualDismissable&&(0,o.jsx)(w.e,{variant:"ghost",colorScheme:"default",size:"sm",className:"-mr-sm","data-test-id":"notificationsWidget.close",ariaLabel:t("common:generic.close"),icon:p.h,onClick:()=>s(e.dashboardNotificationId)})]},e.dashboardNotificationId))})}):(0,o.jsx)(I.$,{className:(0,j.b)("max-h-[480px] overflow-y-auto",a),title:t("features.dashboard.notifications.title"),children:(0,o.jsx)(z.a,{colorScheme:"info",children:t("features.dashboard.notifications.empty")})})},am=()=>{let{t:e}=(0,l.Z)("features"),{locale:a}=(0,b.bU)(),{refetch:t,isFetching:r,isError:s}=eb(),{refetch:i,isFetching:n,isError:c}=ep();return(0,u.useEffect)(()=>{(!0===s||!0===c)&&f.Am.error(e("common:errors.general"))},[s,c]),(0,o.jsx)(I.$,{className:"overflow-y-auto",title:e("features.dashboard.promoteProfile.title"),children:(0,o.jsxs)(y.a,{className:"flex-col gap-lg",children:[(0,o.jsxs)("div",{children:[e("features.dashboard.promoteProfile.text1"),(0,o.jsx)("br",{}),e("features.dashboard.promoteProfile.text2")]}),(0,o.jsxs)(y.a,{className:"flex-row justify-center gap-lg px py-sm text-center",children:[(0,o.jsxs)(w.d,{"data-test-id":"promoteProfile.downloadFlyer",variant:"outline",colorScheme:"default",buttonClassName:"group flex-1 border-card hover:border-transparent hover:outline hover:outline-2 hover:outline-gray-400",className:"h-full flex-col justify-start p",onClick:()=>t(),isLoading:r,children:[(0,o.jsx)(x.e,{className:"!size-2xl transition-transform duration-200 group-hover:scale-110"}),e("features.dashboard.promoteProfile.downloadFlyer")]}),(0,o.jsxs)(w.d,{"data-test-id":"promoteProfile.downloadBusinessCard",variant:"outline",colorScheme:"default",buttonClassName:"group flex-1 border-card hover:border-transparent hover:outline hover:outline-2 hover:outline-gray-400",className:"flex-col justify-start p",onClick:()=>i(),isLoading:n,children:[(0,o.jsx)(x.d,{className:"!size-2xl transition-transform duration-200 group-hover:scale-110"}),e("features.dashboard.promoteProfile.downloadBusinessCard")]})]}),(0,o.jsx)("div",{children:(0,o.jsx)(h.Z,{i18nKey:"features:features.dashboard.promoteProfile.text3",components:{link:(0,o.jsx)(B.F,{"data-test-id":"PromoteProfileWidget.text3",href:eW._j.zendesk.article
1(a,eZ.Hf.promoteProfile),target:"_blank"})}})})]})})},ah=()=>{let e=new Date,{locale:a}=(0,b.bU)(),t=(0,E.tu)({locale:a}),{data:r=[]}=eB(e);return(0,o.jsxs)("div",{children:[(0,o.jsx)("small",{className:"grid grid-cols-7 grid-rows-[1.5rem] gap-1 font-bold",children:t.map((e,a)=>(0,o.jsx)(N.a,{className:"",children:e},a))}),(0,o.jsx)("div",{className:"grid grid-cols-7 grid-rows-[repeat(3,3rem)] gap-1 overflow-hidden rounded border border-card bg-gray-200",children:r.map((e,a)=>{let t="";return t=e.isPast?"isPast":e.isAvailable?"isAvailable":"isUnavailable",(0,o.jsx)(N.a,{className:(0,j.b)("relative",{"bg-dark text":!0===e.isPast,"bg-green-600 text-onDark":!1===e.isPast&&!0===e.isAvailable,"bg-red-400 text-onDark":!1===e.isPast&&!1===e.isAvailable}),"data-test-id":"availabilityWidget.day.".concat(t),children:(0,o.jsxs)(N.a,{className:(0,j.b)({"opacity-20":!0===e.isPast,"relative aspect-square w-xl p-sm font-bold after:absolute after:left-0 after:top-0 after:h-full after:w-full after:rounded-full after:border":!0===e.isToday,"after:border-green-500":!0===e.isToday&&!0===e.isAvailable,"after:border-red-300":!0===e.isToday&&!1===e.isAvailable}),children:[(0,o.jsx)("span",{className:(0,j.b)({}),children:e.displayedDay}),!0===e.hasBookings&&(0,o.jsx)(g.h,{className:"absolute bottom-0 h w text"})]})},a)})})]})},af=()=>{let{t:e}=(0,l.Z)("features"),{locale:a}=(0,b.bU)(),t=new Date,[r,s]=(0,u.useState)(),[i,n]=(0,u.useState)(),[c,d]=(0,u.useState)(t),[h,x]=(0,u.useState)(!1),[z,S]=(0,u.useState)("defined"),{mutate:P,isPending:A,isError:D}=ev(),C=(e,t)=>{let r=eG(e,t,a);s({from:r.start,to:r.end}),x(!1)},U=e=>{if(!e){i&&i.from&&n({from:i.from,to:void 0});return}n(e)},R=()=>{s(i)};(0,u.useEffect)(()=>{!0===D&&f.Am.error(e("common:errors.general"))},[D]);let O=(null==r?void 0:r.from)!==void 0&&void 0!==r.to?"".concat((0,E.oN)(r.from,a,"PP")," - ").concat((0,E.oN)(r.to,a,"PP")):e("features.dashboard.downloadBookingOverview.placeholder");return(0,o.jsxs)(I.$,{className:"gap-lg lg:col-span-2 lg:flex-row",children:[(0,o.jsxs)(y.a,{className:"flex-1 flex-col gap",children:[(0,o.jsx)("h2",{className:"mb-sm",children:e("features.dashboard.downloadBookingOverview.title")}),(0,o.jsx)("p",{children:e("features.dashboard.downloadBookingOverview.description")}),(0,o.jsxs)(y.a,{className:"flex-col gap-xs",children:[(0,o.jsx)(L.G,{className:"w-[calc(var(--radix-popover-trigger-width))] overflow-hidden max-md:px lg:p-sm",trigger:(0,o.jsx)(k.a,{rightIcon:g.i,placeholder:e("features.dashboard.downloadBookingOverview.placeholder"),isValid:!1===h,value:O,className:(0,j.b)("[&>input]:text-left",{"text-sm text-light [&>input]:italic":void 0===r})}),children:r=>{let{setOpen:s}=r;return(0,o.jsxs)(y.a,{className:(0,j.b)({"-ml-[100vw] w-[calc(200%+2rem)] gap-[2rem] transition-all md:-ml-[calc(var(--radix-popover-trigger-width))] lg:w-[calc(200%+1rem)] lg:gap-[1rem]":"custom"===z}),children:[(0,o.jsxs)(y.a,{className:"w-full flex-col gap-xs",children:[eY.map(a=>(0,o.jsx)(w.d,{variant:"ghost",colorScheme:"default",buttonClassName:"font-normal justify-start","data-test-id":"dashboard.bookingOverview.range.".concat(a.range,".").concat(a.relative),onClick:()=>{C(a.range,a.relative),S("defined"),s(!1)},children:e("features.dashboard.bookingOverview.ranges.".concat(a.range,".").concat(a.relative))},"booking-range-".concat(a.range,"-").concat(a.relative))),(0,o.jsx)(T.i,{}),(0,o.jsxs)(w.d,{variant:"ghost",colorScheme:"default",className:"w-full justify-between text-left",buttonClassName:"font-normal justify-stretch","data-test-id":"dashboard.bookingOverview.range.custom",onClick:()=>S("custom"),children:[(0,o.jsx)("span",{className:"w-full",children:e("features.dashboard.bookingOverview.ranges.custom")}),(0,o.jsx)(v.g,{})]})]}),"custom"===z&&(0,o.jsxs)(y.a,{className:"w-full flex-col",children:[(0,o.jsxs)(w.d,{buttonClassName:"w-fit",variant:"ghost",colorScheme:"default",ariaLabel:"Go back",size:"sm","data-test-id":"dashboardContainer.bookingOverview.datePicker.goBackButton",onClick:()=>S("defined"),children:[(0,o.jsx)(v.b,{}),e("common:generic.navigation.goBack")]}),(0,o.jsx)(N.a,{className:"h-full",children:(0,o.jsx)(m._W,{locale:(0,E.BJ)(a),numberOfMonths:1,mode:F.Y.enum.Range,selected:i,onSelect:U,month:c,onMonthChange:d,toMonth:t})}),(0,o.jsxs)(y.a,{className:"mt-xs justify-between gap-sm border-card max-md:border-t max-md:pt",children:[(0,o.jsxs)(y.a,{className:"items-center gap-xs",children:[(0,o.jsx)(w.d,{variant:"outline",colorScheme:"default","data-test-id":"dashboard.bookingOverview.datePicker.clearButton",onClick:()=>n(void 0),children:e("search:dates.clear")}),(0,o.jsx)(w.d,{variant:"ghost",colorScheme:"default","data-test-id":"dashboard.bookingOverview.datePicker.todayButton",onClick:()=>d(t),children:e("common:components.datePicker.today.cta")})]}),(0,o.jsx)(w.d,{"data-test-id":"dashboard.bookingOverview.datePicker.applyButton",onClick:()=>{s(!1),R()},children:e("search:dates.apply")})]})]})]})}}),h&&(0,o.jsxs)("small",{className:"flex items-center gap-sm text-error",children:[(0,o.jsx)(g.y,{className:"size shrink-0"}),e("features.dashboard.downloadBookingOverview.errors.required")]})]}),(0,o.jsxs)(w.d,{"data-test-id":"dashboardContainer.bookingOverview.download",onClick:()=>
1{if(!(null==r?void 0:r.from)||!r.to){x(!0);return}P({from:r.from,to:r.to})},isLoading:A,children:[e("features.dashboard.downloadBookingOverview.download"),(0,o.jsx)(p.i,{})]})]}),(0,o.jsx)(T.i,{direction:"vertical",className:"h-full max-lg:hidden"}),(0,o.jsx)(T.i,{direction:"horizontal",className:"lg:hidden"}),(0,o.jsxs)(y.a,{className:"flex-1 flex-col justify-between gap",children:[(0,o.jsxs)(y.a,{className:"flex-1 flex-col gap",children:[(0,o.jsx)("h2",{className:"mb-sm",children:e("features.dashboard.bookingOverview.tax.title")}),(0,o.jsx)("p",{children:e("features.dashboard.bookingOverview.tax.description")})]}),(0,o.jsxs)(B.F,{variant:"ghost",colorScheme:"default",href:{pathname:eW._j.profile.sitterListing.tax,query:{view:"reports"}},"data-test-id":"dashboard.bookingOverview.tax.link",parentClassName:"py-xs hover:underline",className:"flex items-center gap-sm",children:[(0,o.jsx)(N.c,{className:"size-[2rem] items-center bg-image",children:(0,o.jsx)(g.r,{className:"size shrink-0"})}),e("features.dashboard.bookingOverview.tax.cta"),(0,o.jsx)(v.c,{className:"size"})]})]})]})},ab=()=>{let{t:e}=(0,l.Z)("common"),{data:a}=eq(),[t,r]=(0,u.useState)(!1),{copyToClipboard:s}=M(()=>{f.Am.success(e("components.clipboard.copied.full")),r(!0)},a=>{if(a instanceof q){if(a.name===i.NotSupported){f.Am.error(e("components.clipboard.notSupported"));return}if(a.name===i.Failed){f.Am.error(e("components.clipboard.failed"));return}}f.Am.error(e("components.clipboard.notSupported"))});return((0,u.useEffect)(()=>{if(!0===t){let e=setTimeout(()=>{r(!1)},1e3);return()=>clearTimeout(e)}},[t]),a)?(0,o.jsx)(I.$,{className:"overflow-y-auto p-0 lg:col-span-2 lg:p-0",children:(0,o.jsxs)(y.a,{className:"group flex-col gap-xl p !pt-xl lg:flex-row lg:p-xl",children:[(0,o.jsx)(y.a,{className:"items-center justify-center px-xl lg:pt-0",children:(0,o.jsx)(x.l,{className:"aspect-square h-4xl transition-transform duration-200 group-hover:scale-110"})}),(0,o.jsxs)(y.a,{className:"flex-1 flex-col items-center gap-lg",children:[(0,o.jsxs)(y.a,{className:"flex-col items-center gap",children:[(0,o.jsx)("h3",{children:e("features:features.dashboard.referral.title")}),(0,o.jsx)("div",{children:e("features:features.dashboard.referral.subtitle")})]}),(0,o.jsxs)(y.a,{className:"flex-col items-center justify-center gap-lg self-stretch rounded-lg bg-brand-50 p-lg pb lg:gap-xl lg:p-xl lg:pb-lg",children:[(0,o.jsx)("h3",{className:"break-all text-center",children:a.referralLink}),(0,o.jsxs)(w.d,{"data-test-id":"referralWidget.clickToCopy",colorScheme:"brand",variant:"ghost",onClick:()=>s(a.referralLink),children:[!0===t?(0,o.jsx)(g.j,{}):(0,o.jsx)(p.g,{}),!0===t&&e("components.clipboard.copied.short"),!1===t&&e("components.clipboard.cta")]})]})]})]})}):null};var ag=t(17365),ap=!0,ax=(0,d.Y)()(e=>{let{userInfo:a}=e,{t}=(0,l.Z)("common");return(0,o.jsx)(c.Wn,{rootProps:{title:t("pages.titles.dashboard")},headerProps:{},userInfo:a,activeLabel:ag.m.Dashboard,children:(0,o.jsx)(al,{...e})})})},68670:function(e,a,t){"use strict";t.d(a,{$:function(){return l}});var r=t(5311),s=t(13714),i=t(7909),n=t(80777),o=t(87755);let l=e=>{let{className:a="",children:t,title:l,url:c,urlButtonText:d}=e,{t:u}=(0,s.Z)("common");return(0,r.jsxs)(i.a,{className:(0,n.b)("flex-col gap rounded-lg bg p md:p-lg",{relative:void 0!==c},a),children:[l&&(0,r.jsx)("h2",{className:"mb-sm",children:l}),(0,r.jsx)("div",{className:"absolute right top-[.875rem] md:right-lg md:top-lg",children:c&&(0,r.jsx)(o.F,{variant:"solid",href:c,className:"h-[2rem] min-h-0 border border-gray-700 bg-transparent text-gray-700 hover:bg-gray-100 active:bg-gray-200","data-test-id":"widget.viewAll[".concat(c,"]"),children:d||u("generic.viewAll")})}),t]})}},67197:function(e,a,t){"use strict";t.d(a,{o:function(){return q},Y:function(){return M}});var r=t(5311),s=t(66840),i=t(13714),n=t(23968),o=t(53503),l=t(7909),c=t(80777),d=t(46409),u=t(82004),m=t(99274),h=t(27962),f=t(87755),b=t(68670),g=t(81271),p=t(95595);let x=(e,a)=>{var t,s;if(!1===e.enabled)return null;switch(e.type){case"link":return(0,r.jsx)(f.F,{className:"w-fit shrink-0",variant:"solid",colorScheme:null!==(t=e.colorScheme)&&void 0!==t?t:"brand","data-test-id":e["data-test-id"],href:e.href,children:e.label});case"button":return(0,r.jsxs)(g.d,{"data-test-id":e["data-test-id"],onClick:e.onClick,children:[e.icon&&(0,r.jsx)(e.icon,{}),e.label]});case"icon-button":return(0,r.jsx)(g.e,{variant:"ghost",colorScheme:null!==(s=e.colorScheme)&&void 0!==s?s:"default",icon:e.icon,"data-test-id":e["data-test-id"],ariaLabel:e.label,onClick:e.onClick})}},v=e=>{let{actions:a,isLoading:t}=e;return 0===a.length?null:(0,r.jsxs)(l.a,{className:"items-center gap-xs",children:[(0,r.jsx)("div",{className:"hidden md:flex",children:x(a[0],0)}),(0,r.jsxs)(p.a,{children:[(0,r.jsx)(p.a.Trigger,{asChild:!0,children:(0,r.jsx)(g.e,{variant:"ghost",colorScheme:"default","data-test-id":"",icon:n.t,ariaLabel:"",isLoading:t})}),(0,r.jsx)(p.a.Content,{children:a.map((e,a)=>{var t,s;if(!1===e.enabled)return null;switch(e.type){case"link":return(0,r.jsx)(f.F,{variant:"ghost",colorScheme:null!==(t=e.colorScheme)&&void 0!==t?t:"default",className:(0,
1c.b)("font-normal hover:no-underline",{"md:hidden":0===a}),href:e.href,"data-test-id":e["data-test-id"],children:(0,r.jsxs)(p.a.Item,{className:"gap",children:[e.icon&&(0,r.jsx)(e.icon,{className:"h w"}),e.label]})},"menu-link-".concat(e.label));case"button":case"icon-button":return(0,r.jsxs)(p.a.Item,{colorScheme:null!==(s=e.colorScheme)&&void 0!==s?s:"default",className:"gap","data-test-id":e["data-test-id"],onClick:e.onClick,children:[e.icon&&(0,r.jsx)(e.icon,{className:"h w"}),e.label]},"menu-item-".concat(e.label))}})})]})]})};var j=t(78684),y=t(56170),w=t(96523),z=t(5578),N=t(23433),k=t(18454),S=t(81369),P=t(15457),A=t(34095),D=t(686);let C=S.z.object({name:P.Ew,basePrice:S.z.number(),additionalCostTitle:S.z.literal("additionalPetPrice").optional(),additionalPetPrice:S.z.number().optional()}),U=S.z.object({userId:S.z.string(),sitterId:S.z.string(),firstName:S.z.string(),profileImageUrl:S.z.string().url(),canBeContactedOrBooked:S.z.boolean()}),R=U.extend({lastBookedOn:S.z.string(),lastBookedService:P.Ew,bookableServiceRates:S.z.array(C)}),F=U.extend({bookableServiceRates:S.z.array(C)}),E=S.z.object({favouriteSitters:S.z.array(F),recentSitters:S.z.array(R)}),T="fetch-favourite-sitters",B=async e=>{try{let a=await A.hi.get({url:"/users/sitters-info",user:e,config:{baseUrl:"https://api.production.pawshake.io"}}),t=await a.json();return E.parse(t)}catch(e){return k.k.error("dashboard.api.tsx - useFavouriteAndRecentSitters - try/catch",{error:e}),{favouriteSitters:[],recentSitters:[]}}},L=()=>{let{user:e}=(0,N.f)();return(0,y.a)({queryKey:[T],queryFn:()=>B(e)})},I=()=>{let{user:e}=(0,N.f)(),a=(0,w.NL)();return(0,z.D)({mutationFn:a=>(0,D.F)(e,a),onSuccess:()=>{a.invalidateQueries({queryKey:[T]})}})};var O=t(82415),_=t(41830);let q=e=>{var a;let{t}=(0,i.Z)("features"),{compactMode:n=!1}=e,{data:c}=L(),d=null!==(a=null==c?void 0:c.favouriteSitters)&&void 0!==a?a:[],u=0===d.length,m=n?d.slice(0,5):d;return!0===u?(0,r.jsx)(b.$,{title:t("features.dashboard.sitters.favourites.title"),children:(0,r.jsx)(o.a,{colorScheme:"info",children:(0,r.jsxs)(l.a,{className:"flex-col gap-sm",children:[t("features.dashboard.sitters.favourites.empty"),(0,r.jsx)(f.F,{parentClassName:"w-fit",className:"w-fit",variant:"solid",colorScheme:"brand",href:O._j.home,"data-test-id":"dashboard.favouriteSitters.searchLink",children:t("features.dashboard.sitters.actions.search")})]})})}):(0,r.jsx)(b.$,{title:t("features.dashboard.sitters.favourites.title"),url:n?O._j.dashboard.favourites:void 0,children:(0,r.jsx)("div",{className:"mt grid grid-cols-1 gap md:grid-cols-1",children:m.map((e,a)=>(0,r.jsxs)(s.Fragment,{children:[(0,r.jsx)(W,{favouriteSitter:e}),a!==m.length-1&&(0,r.jsx)(h.i,{})]},"favourite-".concat(e.sitterId)))})})},M=e=>{var a;let{t}=(0,i.Z)("features"),{compactMode:n=!1}=e,{data:c}=L(),d=null!==(a=null==c?void 0:c.recentSitters)&&void 0!==a?a:[],u=0===d.length,m=n?d.slice(0,5):d;return!0===u?(0,r.jsx)(b.$,{title:t("features.dashboard.sitters.recents.title"),children:(0,r.jsx)(o.a,{colorScheme:"info",children:(0,r.jsxs)(l.a,{className:"flex-col gap-sm",children:[t("features.dashboard.sitters.recents.empty"),(0,r.jsx)(f.F,{parentClassName:"w-fit",className:"w-fit",variant:"solid",colorScheme:"brand",href:O._j.home,"data-test-id":"dashboard.recentSitters.searchLink",children:t("features.dashboard.sitters.actions.search")})]})})}):(0,r.jsx)(b.$,{title:t("features.dashboard.sitters.recents.title"),url:n?O._j.dashboard.favourites:void 0,children:(0,r.jsx)("div",{className:"mt grid grid-cols-1 gap md:grid-cols-1",children:m.map((e,a)=>(0,r.jsxs)(s.Fragment,{children:[(0,r.jsx)(Z,{recentSitter:e}),a!==m.length-1&&(0,r.jsx)(h.i,{})]},"recent-".concat(e.sitterId)))})})},W=e=>{let{favouriteSitter:a}=e,{mutate:t,isPending:s}=I(),{t:o}=(0,i.Z)("features"),m=[{type:"link",href:"/sitter/".concat((0,_.Xc)(a.sitterId),"/request-booking"),icon:n.i,label:o("features.dashboard.sitters.actions.book"),enabled:a.canBeContactedOrBooked,"data-test-id":"dashboard.favouriteSitters.bookNow"},{type:"link",href:"/sitter/".concat((0,_.Xc)(a.sitterId)),icon:n.fa,label:o("features.dashboard.sitters.actions.viewProfile"),enabled:a.canBeContactedOrBooked,"data-test-id":"dashboard.favouriteSitters.viewProfileLink"},{type:"icon-button",icon:n.x,label:o("features.favourites.remove"),colorScheme:"danger",enabled:!0,"data-test-id":"dashboard.favouriteSitters.menu.removeFavourite",onClick:()=>t({sitterId:a.sitterId,isFavorite:!1})}];return(0,r.jsxs)(l.a,{className:"items-center gap",children:[(0,r.jsxs)(f.F,{parentClassName:(0,
1c.b)("flex-1",{"pointer-events-none":!1===a.canBeContactedOrBooked}),variant:"ghost",className:"group -m-sm flex items-center gap rounded p-sm hover:bg-darker hover:no-underline md:items-center","data-test-id":"dashboard.favouriteSitters.viewProfileLink",href:"/sitter/".concat(a.sitterId),children:[(0,r.jsx)(u.C_,{avatarUrl:a.profileImageUrl,name:a.firstName,size:"xl"}),(0,r.jsx)(l.a,{className:"flex-1 flex-col items-start gap md:flex-row md:items-center",children:(0,r.jsx)(l.a,{className:"flex-1 flex-col gap-xs",children:(0,r.jsxs)(l.a,{className:"flex-wrap gap-sm",children:[(0,r.jsx)("span",{className:"group-hover:underline",children:a.firstName}),!a.canBeContactedOrBooked&&(0,r.jsx)(d.a,{colorScheme:"danger",children:o("features.dashboard.sitters.inactive")})]})})})]}),(0,r.jsx)(v,{actions:m,isLoading:s})]})},Z=e=>{let{recentSitter:a}=e,{t}=(0,i.Z)("features"),{locale:s}=(0,j.bU)(),o=[{type:"link",href:"/sitter/".concat((0,_.Xc)(a.sitterId),"/request-booking"),icon:n.i,label:t("features.dashboard.sitters.actions.rebook"),enabled:a.canBeContactedOrBooked,"data-test-id":"dashboard.recentSitters.bookNow"},{type:"link",href:"/sitter/".concat((0,_.Xc)(a.sitterId)),icon:n.fa,label:t("features.dashboard.sitters.actions.viewProfile"),enabled:a.canBeContactedOrBooked,"data-test-id":"dashboard.recentSitters.viewProfileLink"}];return(0,r.jsxs)(l.a,{className:"items-center gap",children:[(0,r.jsxs)(f.F,{parentClassName:(0,c.b)("flex-1",{"pointer-events-none":!1===a.canBeContactedOrBooked}),variant:"ghost",className:"group -m-sm flex items-start gap rounded p-sm hover:bg-darker hover:no-underline md:items-center","data-test-id":"dashboard.recentSitters.viewProfileLink",href:"/sitter/".concat(a.sitterId),children:[(0,r.jsx)(u.C_,{avatarUrl:a.profileImageUrl,name:a.firstName,size:"xl"}),(0,r.jsx)(l.a,{className:"flex-1 flex-col items-center gap md:flex-row",children:(0,r.jsxs)(l.a,{className:"flex-1 flex-col gap-xs",children:[(0,r.jsxs)(l.a,{className:"flex-wrap gap-sm",children:[(0,r.jsx)("span",{className:"group-hover:underline",children:a.firstName}),!a.canBeContactedOrBooked&&(0,r.jsx)(d.a,{colorScheme:"danger",children:t("features.dashboard.sitters.inactive")})]}),(0,r.jsx)("small",{className:"font-normal",children:t("features.dashboard.sitters.recents.lastBooked",{date:new Date(a.lastBookedOn).toLocaleString(s,m.AW),service:t("common:services.base.".concat(a.lastBookedService,".title"))})})]})})]}),(0,r.jsx)(v,{actions:o,isLoading:!1})]})}},17365:function(e,a,t){"use strict";t.d(a,{Y:function(){return o},m:function(){return s}});var r,s,i=t(82415);(r=s||(s={})).Dashboard="dashboard",r.Messages="inbox",r.Calendar="calendar",r.Account="account.index",r.FavouriteAndRecentSitters="favouriteAndRecentSitters",r.Review="review";let n=[{label:"dashboard",href:i._j.dashboard.index,sitterOnly:!1},{label:"inbox",href:i._j.inbox.index,sitterOnly:!1},{label:"calendar",href:i._j.profile.availability,sitterOnly:!0},{label:"account.index",href:i._j.account.index,sitterOnly:!1},{label:"favouriteAndRecentSitters",href:i._j.dashboard.favourites,sitterOnly:!1},{label:"review",href:i._j.dashboard.feedback,sitterOnly:!1}],o=e=>{let{isSitter:a}=e;return{tabs:a?n:n.filter(e=>!e.sitterOnly)}}},21991:function(e,a,t){"use strict";t.d(a,{p:function(){return o}});var r=t(13714),s=t(17946),i=t(52939),n=t(8950);let o=()=>{let{t:e}=(0,r.Z)("common");return{handleApiError:a=>{if(a instanceof i.rP)switch(a.error.code){case"verificationCode.tooManyAttempts":case"verificationCode.dailyLimitReached":s.Am.error(e("common:errors.toasts.tooManyRequests"));return;default:return}switch(a instanceof i.Gp?a.name:a.message){case n.XE.FetchFailed:s.Am.error(e("common:errors.general"));break;case n.XE.ResponseNotOk:break;case n.XE.TimeOut:s.Am.error(e("common:errors.toasts.timeout"));break;case n.XE.TooManyRequests:s.Am.error(e("common:errors.toasts.tooManyRequests"));break;default:s.Am.error(e("common:errors.general"))}}}}},87680:function(e,a,t){"use strict";t.d(a,{LN:function(){return D},FZ:function(){return C},OF:function(){return U},p:function(){return R},Wn:function(){return F},UQ:function(){return B},TX:function(){return I},oy:function(){return L},mU:function(){return O},Vp:function(){return T}});var r=t(5311),s=t(61876),i=t(66840),n=t(91723),o=t(13714),l=t(18967),c=t(23968),d=t(99924),u=t(7909),m=t(80777),h=t(46409),f=t(88456),b=t(22425),g=t(14593),p=t(89086),x=t(87755),v=t(30963),j=t.n(v),y=t(12794),w=t(78684);let z=()=>{let{language:e}=(0,w.bU)();return(0,s.useRouter)().pathname.includes("/conversation")?null:(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(j(),{src:"https://static.zdassets.com/ekr/snippet.js?key=0ec0c38d-e352-4a4d-b528-fb437bf71c76",onLoad:()=>{window.zE&&(window.zE("webWidget","setLocale","".concat(e)),window.zESettings={webWidget:{zIndex:100,color:{theme:"#112fa2",launcher:y.Z.brand.dark,launcherText:y.Z.white,button:y.Z.brand.dark,resultLists:y.Z.text.default,header:y.Z.brand.default,articleLinks:y.Z.brand.default}}})},strategy:"lazyOnload",id:"ze-snippet"})})};var N=t(17365),k=t(82415),S=t(97554),P=t(41830);let A=e=>{if(!1===e.isMarketing){let{rootProps:a,headerProps:t,children:s}=e,{title:i}=a,{canGoBack:o,backUrl:c,titleElement:d,headerActions:u}=t;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.PB,{noindex:!0,title:(0,S.pz)(i)}),(0,r.jsxs)("div",{className:"grid min-h-[100dvh] grid-rows-[auto_1fr_auto]",children:[(0,r.jsx)(l.Z,{canGoBack:o,canGoBackUrl:c,actions:u,children:d}),s,(0,r.jsx)(b.$,{compactMode:!0})]}),(0,r.jsx)(z,{})]})}return(0,r.jsx)(r.Fragment,{children:"Marketing layout"})},D=e=>{let{rootProps:a,headerProps:t,navigationProps:n,children:o,heading:l,subheading:d,navigationClassName:h,containerClassName:b,headingClassName:g,subheadingClassName:p}=e,{referer:x,backUrl:v,routes:j}=n,y=(0,s.useRouter)(),w=void 0!==v||(0,k.p6)(x),z=0===j.filter(e=>!e.label||0===e.label.length).length;return(0,r.jsx)(A,{isMarketing:!1,rootProps:a,headerProps:{...t,backUrl:v,canGoBack:!(0,k.Cr)(y.pathname)},children:(0,r.jsxs)(u.a,{className:(0,m.b)("h-auto w-full flex-col gap-lg bg pt md:pt-sm",{"pt-lg":0===j.length},h),children:[z&&(0,r.jsx)(u.a,{className:"container max-md:hidden md:min-
1h-xl md:items-center md:justify-between md:gap",children:(0,r.jsx)(f.O,{className:(0,m.b)({"-ml-xs":w}),routes:[{icon:c.H,href:k._j.home},...j],canGoBack:w,backUrl:v})}),l&&(0,r.jsx)(r.Fragment,{children:(0,i.isValidElement)(l)?l:(0,r.jsx)("div",{className:(0,m.b)("container max-md:hidden",{pb:void 0===d},g),children:(0,r.jsx)("h2",{className:"h1",children:l})})}),d&&(0,r.jsx)("div",{className:(0,m.b)("container pb md:-mt-sm",p),children:d}),(0,r.jsx)(u.a,{className:(0,m.b)("container max-w-[100vw] flex-col gap-lg pb lg:pb-lg",b),children:o})]})})},C=e=>(0,r.jsx)(D,{...e,containerClassName:(0,m.b)("gap-xl !px-0 !pb-0 max-md:flex-1",e.containerClassName)}),U=e=>{let{children:a,className:t}=e;return(0,r.jsx)("div",{className:(0,m.b)("container flex flex-col gap-lg",t),children:a})},R=e=>{let{children:a,className:t}=e;return(0,r.jsx)("div",{className:(0,m.b)("row-start-2 row-end-3 gap-sm border-t border-card bg-dark max-md:p md:mx md:bg md:py-xl lg:mx-lg",t),children:a})},F=e=>{let{rootProps:a,headerProps:t,children:s,userInfo:i,activeLabel:n,containerClassName:o}=e;return(0,r.jsx)(A,{isMarketing:!1,rootProps:a,headerProps:t,children:(0,r.jsxs)("div",{className:"h-auto w-full bg-dark",children:[(0,r.jsx)(E,{userInfo:i,activeLabel:n}),(0,r.jsx)(u.a,{className:(0,m.b)("container flex-col gap pb-2xl pt md:gap-lg md:pt-lg",o),children:s})]})})},E=e=>{let{userInfo:a,activeLabel:t}=e,{userName:s,isSitter:i}=a,{t:n}=(0,o.Z)("common"),{tabs:l}=(0,N.Y)({isSitter:i});return(0,r.jsx)("div",{className:"border-b border-card bg",children:(0,r.jsxs)(u.a,{className:"container hidden flex-col gap-xl pt-xl md:flex",children:[(0,r.jsx)("h1",{children:n((0,P.vt)(),{firstName:s})}),(0,r.jsx)(p.ZP,{...g.iterablePlacements.dashboardBanner}),(0,r.jsx)(u.a,{className:"items-center",children:l.map(e=>(0,r.jsx)(x.F,{className:(0,m.b)("relative flex min-h-xl items-center rounded-t px font-normal after:absolute after:bottom-0 after:left-0 after:h-xxs after:w-full hover:bg-gray-100 hover:no-underline active:bg-gray-200",{"text-primary after:bg-primary hover:bg-brand-50 active:bg-brand-100":e.label===t}),variant:"ghost","data-test-id":"profileTabs.".concat(e.label,"Link"),href:e.href,useAtag:e.label===N.m.Messages,children:(0,r.jsxs)(u.a,{className:"gap-sm",children:[n("pages.titles.".concat(e.label)),!0===e.isNew&&(0,r.jsx)(h.a,{variant:"solid",colorScheme:"danger",className:"w-fit bg-gradient-to-b from-red-300 to-red-500 shadow",children:n("generic.new").toUpperCase()})]})},"tab-".concat(e.label)))})]})})},T=e=>{let{title:a,children:t,caption:s,className:i,captionClassName:o,canGoBack:l,footer:c,footerClassName:h,routes:b}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.PB,{noindex:!0,title:(0,S.pz)(a)}),(0,r.jsxs)(u.a,{className:(0,m.b)("relative z-[0] h-fit min-h-screen w-full flex-col items-center gap-lg bg md:gap md:bg-brand-50",{"md:pt-xl":!b}),children:[(0,r.jsx)(d.a,{className:"fixed -z-[1] h-screen min-w-full opacity-40 max-md:hidden"}),b&&(0,r.jsx)(f.O,{className:"mt-lg w-full max-md:px md:max-w-screen-sm",routes:b,canGoBack:l}),(0,r.jsxs)(u.a,{className:(0,m.b)("w-full flex-col overflow-hidden p max-md:flex-1 md:max-w-screen-sm md:rounded-lg md:bg-white md:p-xl md:shadow",{"grid grid-rows-[1fr_auto] md:p-0":void 0!==c},i),children:[(0,r.jsx)("div",{className:(0,m.b)({"md:p-xl":void 0!==c}),children:t}),c&&(0,r.jsx)("div",{className:(0,m.b)("row-start-2 row-end-3 border-t border-card bg-dark p",h),children:c})]}),s&&(0,r.jsx)(u.a,{className:(0,m.b)("w-full md:max-w-screen-sm",o),children:s})]})]})},B=e=>{let{title:a,routes:t,children:s}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.PB,{noindex:!0,title:(0,S.pz)(a)}),(0,r.jsxs)(u.a,{className:(0,m.b)("relative z-[0] h-fit min-h-[100svh] w-full flex-col items-center gap-lg bg md:gap md:bg-brand-50 md:pb-xl",{"md:pt-xl":!t}),children:[(0,r.jsx)(d.a,{className:"fixed -z-[1] h-screen min-w-full opacity-40 max-md:hidden"}),t&&(0,r.jsx)(f.O,{className:(0,m.b)("mt-lg w-full max-md:px md:max-w-screen-sm",{"max-md:-mb-xs max-md:mt-[1.25rem]":t.length>3}),routes:t}),s]})]})},L=e=>{let{children:a,className:t}=e;return(0,r.jsx)("div",{className:(0,m.b)("grid w-full grid-rows-[1fr_auto] max-md:flex-1 md:max-w-screen-sm md:rounded-lg md:bg-white md:shadow",t),children:a})},I=e=>{let{children:a,className:t}=e;return(0,r.jsx)("div",{className:(0,m.b)("w-full p pt-0 md:p-xl",t),children:a})},O=e=>{let{children:a,className:t}=e;return(0,r.jsx)("div",{className:(0,m.b)("row-start-2 row-end-3 border-t border-card bg-dark p md:rounded-b-lg md:px-xl",t),children:a})}},7014:function(e,a,t){"use strict";t.d(a,{Pj:function(){return y},UR:function(){return N},VC:function(){return m},cJ:function(){return g},qj:function(){return v},sX:function(){return h}});
1var r=t(81369),s=t(83658),i=t(90449),n=t(73783),o=t(15457),l=t(92876),c=t(75589),d=t(12447),u=t(65845);let m=r.z.enum(["awayMode","repeatClientsOnly"]),h=r.z.enum(["none","youngerThanThree","youngerThanTen","olderThanTen"]),f=r.z.enum(["puppy","young","adult","senior"]),b=r.z.enum(["small","medium","large","giant"]);r.z.enum(["male","female"]);let g=r.z.enum(["house","farm","apartment"]),p=r.z.enum(["small","medium","large","none"]),x=r.z.enum(["hasExperienceAsAnimalWelfareVolunteer","hasExperienceWithBehaviouralProblems","hasExperienceWithRescuingPets","isFamiliarWithDogTrainingTechniques","has247Supervision","hasEmergencyTransport","canAdministerOralMedications","canAdministerInjectedMedications","canAdministerFirstAidAndPetCPR","grooming"]),v=r.z.enum(["offLeashWalkingArea","urban","forest","beach","cityPark","countrySide"]),j=r.z.enum(["english","french","dutch","german","italian","japanese","chinese","spanish","portuguese","danish","swedish","norwegian","finnish","russian","maori","other"]),y=r.z.enum(["lessThan1","lessThan5","moreThan5","moreThan10","moreThan20"]),w=r.z.object({service:o.Ew.describe("Bookable service"),baseRate:r.z.number().describe("Base rate amount in cents"),additionalRate:r.z.number().nullable().describe("Additional cost rate in cents"),currency:r.z.string().describe("Currency"),unit:c.o.describe("Unit of the service"),travelConstraints:i.o_.nullable()}),z=r.z.object({locale:r.z.string().describe("Locale"),url:r.z.string().describe("The url of the search page"),placeName:r.z.string().describe("The translated name of the place in the given locale"),service:o.Ew.describe("The bookable service")}),N=r.z.enum(["home","petsitting","city","sitter"]),k=r.z.object({key:N,value:r.z.string().nullable(),url:r.z.string()}).describe("Breadcrumb object"),S=r.z.object({service:o.Ew.describe("Value-added service"),vasTypes:r.z.array(o.VA).describe("Array of value-added service types")}),P=r.z.object({petId:r.z.string().describe("Pet ID"),name:r.z.string().describe("Pet name"),imageUrl:r.z.string().nullable().describe("Pet image URL"),breed:r.z.string().nullable().describe("Pet breed"),species:u.UD,gender:d.Y.nullable()}),A=r.z.object({userId:r.z.string().describe("User ID with Pawshake World Region Prefix"),sitterId:r.z.string().describe("Sitter ID"),headline:r.z.string().describe("Headline of the sitter"),firstName:r.z.string().describe("First Name"),profileImage:r.z.string().describe("URL of the profile image"),galleryImages:r.z.array(r.z.object({medium:r.z.string().describe("Medium image URL"),large:r.z.string().describe("Large image URL")})).describe("Array of gallery image URLs"),description:r.z.string().describe("Profile description"),locale:r.z.string().describe("Locale"),isFavourite:r.z.boolean().describe("Whether the user is a favorite of the sitter"),actions:r.z.object({canBeContacted:r.z.boolean().describe("Whether the sitter can be contacted"),unableToContactReason:m.nullable().catch(null).describe("Reason for inability to contact")}),metadata:r.z.object({metaDescription:r.z.string().describe("Meta description"),alternativeProfileUrls:r.z.array(r.z.object({locale:r.z.string().describe("Locale"),url:r.z.string().describe("URL")})).describe("Alternative profile URLs"),sharingUrl:r.z.string().describe("Sharing URL"),searchPageUrls:r.z.array(z).describe("Search page URLs"),canonicalUrl:r.z.string().describe("Canonical URL"),fallbackSearchPageUrl:r.z.string().describe("Fallback url for search page")}),services:r.z.object({cancellationPolicy:s.No.catch(s.No.Enum.flexible).describe("Cancellation policy"),highlightedService:o.Ew.describe("Highlighted service"),rates:r.z.array(w).describe("Array of service rates"),acceptedPets:r.z.object({dogs:r.z.object({puppies:r.z.boolean().describe("Whether puppies are accepted"),ages:r.z.array(f).describe("Array of accepted pet ages").nullable(),sizes:r.z.array(b).describe("Array of accepted pet sizes").nullable()}).nullable(),cats:r.z.boolean().describe("Whether cats are accepted"),smallAnimals:r.z.boolean().describe("Whether small animals are accepted"),ferrets:r.z.boolean().describe("Whether ferrets are accepted")})}),statistics:r.z.object({reviewCount:r.z.number().describe("Number of reviews"),profileViewCount:r.z.number().describe("Number of profile views"),sitterSince:r.z.string().describe("Date since the sitter started"),lastActiveInMins:r.z.number().nullable().describe("Last active time in minutes"),averageResponseTimeInMins:r.z.number().nullable().describe("Average response time in minutes"),lastBookedOn:r.z.string().nullable().describe("Last booked date"),favoriteCount:r.z.number().describe("Number of times favorited"),lastContactedOn:r.z.string().nullable().describe("Last contacted date"),hasRecentlyUpdatedCalendar:r.z.boolean().describe("Whether the calendar has been recently updated"),rating:r.z.object({overallAverage:r.z.number().describe("The global, average rating"),value:r.z.number().describe("The average value rating"),accuracy:r.z.number().describe("The average accuracy rating"),communication:r.z.number().describe("The average communication rating"),profileCorrectness:r.z.number().describe("The average profile correctness rating"),animalTreatment:r.z.number().describe("The average animal treatment rating")}).nullable().describe("Rating numbers for the sitter. Will be null if there are no reviews left for the user"),isNewSitter:r.z.boolean().describe("Whether the sitter is new"),recurringGuests:r.z.number().describe("Number of recurring guests")}),verificationState:r.z.object({policeVerified:r.z.boolean().describe("Whether the sitter is police verified"),emailVerified:r.z.boolean().describe("Whether the email is verified"),smsVerified:r.z.boolean().describe("Whether the SMS is verified"),googleVerified:r.z.boolean().describe("Whether the Google account is verified (currently mapped to Facebook verification)"),stripeVerified:r.z.boolean().describe("Whether the Stripe account is verified")}),sitterHome:r.z.object({placeName:r.z.string().describe("Name of the place"),staticMapUrl:r.z.string().nullable().catch(null).describe("Signed URL of the static map image"),location:r.z.object({lat:r.z.number().describe("Latitude of the location"),lng:r.z.number().describe("Longitude of the location")}),livesWith:r.z.object({pets:r.z.array(P).describe("Array of pets the sitter lives with"),children:h.catch(h.Enum.none).describe("What children the sitter lives with")}),homeFeatures:r.z.object({homeType:g.catch(g.Enum.house).describe("Type of home"),fullyFencedBackyard:r.z.boolean().describe("Whether there is a fully fenced backyard"),outdoorAreaSize:p.catch(p.Enum.none).describe("Size of the outdoor area"),hasEmergencyTransport:r.z.boolean().describe("Whether emergency transport is available"),has247Supervision:r.z.boolean().describe("Whether 24/7 supervision is available")}),areaFeatures:r.z.object({nearbyWalkingAreas:(0,l.Hb)(v).describe("Array of nearby walking areas")})}),about:r.z.object({spokenLanguages:(0,l.Hb)(j).describe("Array of spoken languages"),yearsOfExperience:y.nullable().catch(null).describe("Years of experience"),experiences:(0,l.Hb)(x).describe("Array of experiences")}),sitterNameSlug:r.z.string().describe("Slug of the sitter name"),vas:r.z.array(S).describe("Array of value-ad
1ded services"),breadcrumbs:r.z.array(k).describe("Array of breadcrumbs"),verification:n.Ux.optional().catch({status:n.NN.Enum.unverified})}),D=r.z.enum(["sitter","redirect"]);r.z.discriminatedUnion("type",[r.z.object({type:r.z.literal(D.Enum.sitter),sitterDetail:A}),r.z.object({type:r.z.literal(D.Enum.redirect),url:r.z.string()})])},83658:function(e,a,t){"use strict";t.d(a,{No:function(){return l},Ot:function(){return m},TO:function(){return v},hD:function(){return c},uW:function(){return g}});var r=t(56170),s=t(81369),i=t(75589),n=t(15457),o=t(34095);let l=s.z.enum(["flexible","moderate"]),c=s.z.enum(["pickUpDropOff","travelExpense","otherPerBooking","otherPerServiceUnit"]),d=s.z.enum(["baseRate","additionalRate","adjustedBaseRate","adjustedAdditionalRate"]),u=s.z.object({value:s.z.number(),currency:s.z.string()}),m=s.z.object({items:s.z.object({pets:s.z.array(s.z.object({petNames:s.z.array(s.z.string()),prices:s.z.array(s.z.object({unitRate:s.z.number(),total:s.z.number(),currency:s.z.string(),type:d,dates:s.z.array(s.z.string()),amountOfUnits:s.z.number()})),total:u})),extraServices:s.z.string(),vas:s.z.array(s.z.object({type:c,applicableTo:n.Y2,description:s.z.string().nullable(),total:u,prices:s.z.array(s.z.object({unitRate:s.z.number(),total:s.z.number(),currency:s.z.string(),type:c,dates:s.z.array(s.z.string()),amountOfUnits:s.z.number()}))}))}),amount:s.z.number(),unit:i.o,discount:s.z.object({percentage:s.z.number(),value:s.z.number(),currency:s.z.string()}).nullable(),subtotal:u,total:u,sitterPayout:u,contribution:u,totalWithFees:u,ownerFee:s.z.object({price:u,info:s.z.object({fallback:s.z.string()})}).nullish()}),h=s.z.object({type:l,deadline:s.z.string()}),f=s.z.object({priceBreakdown:m,cancellationPolicy:h}),b=async(e,a,t,r)=>{try{let s=await o.hi.post({url:"/sitter/".concat(e,"/booking-simulations"),payload:{service:a,dates:t,numberOfPets:r}}),i=await s.json();return f.parse(i)}catch(e){throw console.error("sitter.api.tsx - fetchSimulateBookingPrice - try/catch",{error:e}),e}},g=(e,a,t,s)=>(0,r.a)({queryKey:["fetch-simulation-booking-price",e,a,t,s],queryFn:()=>b(e,a,t,s),retry:!1,enabled:!!t&&t.length>0}),p=s.z.object({cancellationPolicy:l}),x=async(e,a)=>{try{let t=await o.hi.get({url:"/sitter/".concat(e,"/cancellation-policy?service=").concat(a)}),r=await t.json();return p.parse(r)}catch(e){throw console.error("sitter.api.tsx - fetchSitterServiceCancellationPolicy - try/catch",{error:e}),e}},v=(e,a)=>(0,r.a)({queryKey:["fetch-sitter-service-cancellation-policy",e,a],queryFn:()=>x(e,a)})},23417:function(e,a,t){"use strict";t.d(a,{v:function(){return s}});var r=t(5311);let s={b:(0,r.jsx)("b",{}),i:(0,r.jsx)("i",{}),u:(0,r.jsx)("u",{}),br:(0,r.jsx)("br",{}),p:(0,r.jsx)("p",{}),ul:(0,r.jsx)("ul",{className:"ml-lg list-disc"}),li:(0,r.jsx)("li",{}),ol:(0,r.jsx)("ol",{className:"ml-lg list-decimal"})}},97554:function(e,a,t){"use strict";t.d(a,{G$:function(){return c},UP:function(){return u},pz:function(){return l}});var r=t(23968),s=t(7014),i=t(17298),n=t(82415),o=t(15457);let l=function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return e?a?"".concat(e.trim()," | ").concat(a):"".concat(null==e?void 0:e.trim()," | Pawshake"):i.pB},c=(e,a,t,r)=>{let s=d(a,t,r);return s?s.text:e},d=(e,a,t)=>{if(0===a.length)return;let r=a.find(a=>a.service===e&&a.locale===t);if(r)return{title:"features:features.sitterDetail.metaData.petSitterInLocation",text:r.placeName,href:r.url}},u=(e,a,t)=>({routes:e.map(e=>{switch(e.key){case s.UR.Enum.home:return{icon:r.H,href:n._j.home};case s.UR.Enum.petsitting:return{label:t((0,o.Sj)(o.Ew.Values.petSitting).label),href:e.url};case s.UR.Enum.city:case s.UR.Enum.sitter:var a;return{label:null!==(a=e.value)&&void 0!==a?a:"",href:e.url}}}),jsonLd:{"@context":"http://schema.org/","@type":"BreadcrumbList",itemListElement:e.map((e,r)=>{var i,n;switch(e.key){case s.UR.Enum.home:return{"@type":"ListItem",name:t("pages.titles.home"),position:r+1,description:t("static.seo.homeDescription"),item:{"@type":"Thing","@id":e.url}};case s.UR.Enum.petsitting:{let a=(0,o.Sj)(o.Ew.Values.petSitting);return{"@type":"ListItem",name:t(a.label),position:r+1,description:t("".concat(a.description,".asOwner")),item:{"@type":"Thing","@id":e.url}}}case s.UR.Enum.city:return{"@type":"ListItem",name:null!==(i=e.value)&&void 0!==i?i:"",position:r+1,description:t("static.seo.petSittingLocation",{location:e.value}),item:{"@type":"Thing","@id":e.url}};case s.UR.Enum.sitter:return{"@type":"ListItem",name:null!==(n=e.value)&&void 0!==n?n:"",position:r+1,description:a,item:{"@type":"Thing","@id":e.url}}}})}})}},function(e){e.O(0,[47929,56503,79556,39544,92546,98133,65608,84693,7477,33115,12883,17508,55710,39338,93841,91723,14212,17946,54294,67034,36798,42293,27396,22425,77407,47165,92888,49774,40179],function(){return e(e.s=26117)}),_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.