PageSourceSearch

https://app.supernormalpets.com/_next/static/chunks/092664a0bab9231c.js?dpl=dpl_3QjvxXXrPwizXxEszf34Y3UsJfw7

js supernormalpets.com collected 2026-09-24 12:22:24 UTC 82,124 bytes, 8 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="9787e3cb-a79b-bc20-77a7-c02e1fd01a08")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,910245,e=>{"use strict";var t=e.i(843476),r=e.i(749525),a=e.i(659544),s=e.i(948148);function l({isOpen:e,email:l}){let i=(0,s.useTranslations)("modals.pawTagMigration");return(0,t.jsx)(r.default,{isOpen:e,onClose:()=>{},dismissible:!1,children:(0,t.jsxs)("div",{className:"p-6 max-w-[400px]",children:[(0,t.jsx)("div",{className:"mb-4 flex justify-start",children:(0,t.jsx)("img",{src:"/images/pawtag-supernormal-logo.svg",alt:"PawTag x Supernormal Logo",style:{width:"184px",height:"auto"}})}),(0,t.jsx)("h2",{className:"text-bodymd text-dark-black !font-[700] mb-2 text-left",children:i("title")}),(0,t.jsx)("p",{className:"text-bodymd text-gray-600 mb-8 text-left",children:i("description")}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(a.default,{variant:"primary",size:"lg",onClick:()=>{window.location.href=`/pawtag/login?email=${encodeURIComponent(l)}`},className:"w-full sm:w-auto",children:i("cta")})})]})})}e.s(["default",()=>l])},653962,e=>{"use strict";var t=e.i(843476),r=e.i(749525),a=e.i(659544),s=e.i(948148);function l({isOpen:e,onClose:l,onGetStarted:i}){let n=(0,s.useTranslations)("modals.pawTagWelcome");return(0,t.jsx)(r.default,{isOpen:e,onClose:l,children:(0,t.jsxs)("div",{className:"p-6 max-w-[400px]",children:[(0,t.jsx)("button",{onClick:l,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 transition-colors","aria-label":"Close modal",children:(0,t.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,t.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),(0,t.jsx)("div",{className:"mb-4 flex justify-start",children:(0,t.jsx)("img",{src:"/images/pawtag-supernormal-logo.svg",alt:"PawTag x Supernormal Logo",style:{width:"184px",height:"auto"}})}),(0,t.jsx)("h2",{className:"text-bodymd text-dark-black !font-[700] mb-2 text-left",children:n("title")}),(0,t.jsx)("p",{className:"text-bodymd text-gray-600 mb-8 text-left",children:n("description")}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(a.default,{variant:"primary",size:"lg",onClick:i,className:"w-full sm:w-auto",children:n("cta")})})]})})}e.s(["default",()=>l])},749525,e=>{"use strict";var t=e.i(843476),r=e.i(271645);function a({isOpen:e,onClose:a,children:s,className:l="",dismissible:i=!0,mobileBottomAligned:n=!1,zIndex:o=110}){return((0,r.useEffect)(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset"}),[e]),(0,r.useEffect)(()=>{let t=e=>{"Escape"===e.key&&i&&a()};return e&&document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[e,a,i]),e)?n?(0,t.jsxs)("div",{className:"fixed inset-0 overflow-y-auto",style:{zIndex:o},children:[(0,t.jsx)("div",{className:"fixed inset-0 bg-dark-overlay/70 transition-opacity",onClick:i?a:void 0}),(0,t.jsx)("div",{className:"min-h-full flex items-end justify-center lg:items-center p-4 pt-20 lg:pt-4 pb-20 lg:pb-4",children:(0,t.jsx)("div",{className:`modal-content relative bg-grey-bg rounded-[16px] shadow-xl max-w-[400px] w-full my-4 lg:my-8 ${l}`,children:s})})]}):(0,t.jsxs)("div",{className:"fixed inset-0 overflow-y-auto",style:{zIndex:o},children:[(0,t.jsx)("div",{className:"fixed inset-0 bg-dark-overlay/70 transition-opacity",onClick:i?a:void 0}),(0,t.jsx)("div",{className:"min-h-full flex items-center justify-center p-4",children:(0,t.jsx)("div",{className:`modal-content relative bg-grey-bg rounded-[16px] shadow-xl max-w-[400px] w-full ${l}`,children:s})})]}):null}e.s(["default",()=>a])},358594,e=>{"use strict";var t=e.i(843476),r=e.i(975157);let a={xs:"h-3 w-3 border-2",sm:"h-[18px] w-[18px] border-2",md:"h-5 w-5 border-2",lg:"h-8 w-8 border-4"};function s({size:e="sm",className:s}){return(0,t.jsx)("span",{className:(0,r.cn)("inline-block rounded-full border-forest border-t-green animate-spin",a[e],s)})}e.s(["default",()=>s])},659544,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(522016),s=e.i(975157),l=e.i(358594);let i=r.default.forwardRef(({size:e="md",variant:r="primary",disabled:i=!1,isLoading:n=!1,children:o,className:c,href:d,...u},m)=>{let p={primary:{base:"border border-forest !bg-forest !text-brand-600",shadow:"shadow-none",hover:"hover:shadow-[0_0_0_1px_rgba(10,13,18,0.22)_inset,0_-3px_0_0_rgba(10,13,18,0.08)_inset,0_2px_4px_0_rgba(10,13,18,0.08)]",focus:"focus:ring-orange/50"},secondary:{base:"border border-grey !text-forest bg-white",shadow:"shadow-none",hover:"hover:shadow-[0_0_0_1px_rgba(10,13,18,0.22)_inset,0_-3px_0_0_rgba(10,13,18,0.08)_inset,0_2px_4px_0_rgba(10,13,18,0.08)]",focus:"focus:ring-gray-700/50"}
2,transparent:{base:"border border-gray-300 !text-hard-green bg-transparent",shadow:"shadow-none",hover:"hover:shadow-[0_0_0_1px_rgba(10,13,18,0.22)_inset,0_-3px_0_0_rgba(10,13,18,0.08)_inset,0_2px_4px_0_rgba(10,13,18,0.08)]",focus:"focus:ring-gray-700/50"},error:{base:"bg-white !text-hard-green",shadow:"shadow-[0_0_0_1px_rgba(10,13,18,0.18)_inset,0_-2px_0_0_rgba(10,13,18,0.05)_inset,0_1px_2px_0_rgba(10,13,18,0.05)]",hover:"hover:shadow-[0_0_0_1px_rgba(10,13,18,0.22)_inset,0_-3px_0_0_rgba(10,13,18,0.08)_inset,0_2px_4px_0_rgba(10,13,18,0.08)]",focus:"focus:ring-gray-700/50"},danger:{base:"bg-white text-error-600 border border-error-200",shadow:"shadow-none",hover:"hover:bg-error-50",focus:"focus:ring-error-600/50"},destructive:{base:"bg-error-600 !text-white border-error-600",shadow:"shadow-none",hover:"hover:bg-error-700",focus:"focus:ring-error-600/50"}},h=(0,s.cn)(n?"inline-flex items-center justify-center rounded-full border-2 font-bold transition-all duration-200 ease-in-out focus:outline-none":"inline-flex items-center justify-center rounded-full border-2 font-bold transition-all duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-offset-2",{sm:"px-[13px] py-[7px] text-sm !font-bold gap-1",md:"px-[17px] py-[9px] text-md !font-bold gap-1.5",lg:"px-[16px] py-[10px] text-labelmd !font-bold gap-[6px]",xl:"px-[18px] py-[11px] !font-bold text-labelmd gap-1.5"}[e],p[r].base,p[r].shadow,!i&&p[r].hover,!i&&"hover:scale-[1.02]",!i&&"active:shadow-[0_0_0_1px_rgba(10,13,18,0.25)_inset,0_-1px_0_0_rgba(10,13,18,0.03)_inset,0_1px_1px_0_rgba(10,13,18,0.03)] active:scale-[0.98]",i&&"opacity-60 cursor-not-allowed pointer-events-none",n&&"cursor-not-allowed pointer-events-none",p[r].focus,c),f=(0,t.jsx)(l.default,{size:"sm",className:"mr-1"}),x=(0,t.jsxs)(t.Fragment,{children:[n&&f,o]});if(d&&!i){let{target:e,...r}=u;return(0,t.jsx)(a.default,{href:d,target:e||"_blank",className:h,ref:m,...r,children:x})}return(0,t.jsx)("button",{ref:m,disabled:i,className:h,...u,children:x})});i.displayName="Button",e.s(["default",0,i])},40040,157662,e=>{"use strict";var t=e.i(843476),r=e.i(271645);function a({label:e}){return(0,t.jsx)("label",{className:"block text-bodysm !font-bold text-hard-green-700 mb-1.5",children:e.split("*").map((e,a,s)=>(0,t.jsxs)(r.default.Fragment,{children:[e,a<s.length-1&&(0,t.jsx)("span",{className:"required-asterisk",children:"*"})]},a))})}function s({error:e}){return(0,t.jsx)("p",{className:"mt-1.5 text-bodysm text-error-600",children:e})}e.s(["default",()=>a],40040),e.s(["default",()=>s],157662)},636817,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(657688),s=e.i(975157),l=e.i(40040),i=e.i(157662);let n=r.default.forwardRef(({label:e,error:r,disabled:n=!1,className:o,prefixIcon:c,...d},u)=>{let m=(0,s.cn)("flex w-full items-center rounded-lg border transition-all duration-200 ease-in-out",c?"pl-[38px] py-[9px]":"px-[14px] py-[9px]",r?"pr-[38px]":"pr-[14px]","text-bodymd text-forest placeholder:text-bodymd placeholder:text-gray-400","border-grey bg-white",!r&&"shadow-[0_1px_2px_0_rgba(10,13,18,0.05)]","focus:outline-none",!r&&"focus:ring-2 focus:ring-orange/20 focus:border-orange",!n&&!r&&"hover:border-gray400",r&&"!border-error-500 focus:!border-error-500 focus:ring-2 focus:ring-error-500/20 !shadow-[0_0_0_1px_var(--color-error-500),0_1px_2px_0_rgba(10,13,18,0.05)]",n&&"bg-gray-50 text-gray-400 cursor-not-allowed border-gray200 placeholder:text-gray300");return(0,t.jsxs)("div",{className:"w-full",children:[e&&(0,t.jsx)(l.default,{label:e}),(0,t.jsxs)("div",{className:"relative",children:[c&&(0,t.jsx)("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none flex items-center",children:c?"string"==typeof c||"object"==typeof c&&"src"in c?(0,t.jsx)(a.default,{src:c,alt:"",width:20,height:20}):c:null}),(0,t.jsx)("input",{ref:u,disabled:n,className:(0,s.cn)(m,o),...d}),r&&(0,t.jsx)("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none flex items-center",children:(0,t.jsx)(a.default,{src:"/icons/alert-circle-icon.svg",alt:"",width:16,height:16})})]}),r&&(0,t.jsx)(i.default,{error:r})]})});n.displayName="Input",e.s(["default",0,n])},924284,e=>{"use strict";var t=e.i(843476);function r({checked:e,onChange:r,disabled:a=!1,className:s,id:l,ariaLabel:i}){return(0,t.jsx)("button",{id:l,type:"button",role:"switch","aria-checked":e,"aria-label":i,disabled:a,onClick:()=>{a||r(!e)},onKeyDown:t=>{a||(" "===t.key||"Enter"===t.key)&&(t.preventDefault(),r(!e))},className:`!min-w-10 !min-h-5 relative inline-flex items-center rounded-full transition-colors focus:outline-none ${e?"bg-orange":"bg-gray-300"} ${a?"opacity-50 cursor-not-allowed":"cursor-pointer"} ${s??""}`,style:{width:36,height:20},children:(0,t.jsx)("span",{className:`pointer-events-none inline-block rounded-full bg-white shadow transition-transform transform ${e?"translate-x-[22px]":"translate-x-[2px]"}`,style:{width:16,height:16}})})}e.s(["default",()=>r])},992159,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(174080),s=e.i(948148),l=e.i(636817),i=e.i(576859);function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}var o=function(e){var t=(0,r.useRef)(e);return t.current=e,t},c=function(e,t){var r;return function(){for(var a=this,s=arguments.length,l=Array(s),i=0;i<s;i++)l[i]=arguments[i];null!==r&&(clearTimeout(r),r=null),r=setTimeout(function(){return e.apply(a,l)},t)}},d=function(e){var t=void 0===e?{}:e,a=t.requestOptions,s=t.debounce,l=t.cache,i=void 0===l?86400:l,d=t.cacheKey,u=void 0===d?"upa":d,m=t.googleMaps,p=t.callbackName,h=t.defaultValue,f=t.initOnMount,x=void 0===f||f,g=(0,r.useState)(!1),b=g[0],y=g[1],v=(0,r.useState)(void 0===h?"":h),j=v[0],w=v[1],_=(0,r.useState)({loading:!1,status:"",data:[]}),N=_[0],k=_[1],C=(0,r.useRef)(),S=o(a),T=o(m),L=(0,r.useCallback)(function(){if(!C.current){var e,t=window.google,r=T.current,a=(null==r?void 0:r.places)||(null==t||null==(e=t.maps)?void 0:e.places);if(!a)return void console.error("💡 use-places-autocomplete: Google Maps Places API library must be loaded. See: https://github.com/wellyshen/use-places-autocomplete#load-the-library");
2C.current=new a.AutocompleteService,y(!0)}},[T]),P=(0,r.useCallback)(function(){k({loading:!1,status:"",data:[]})},[]),E=(0,r.useCallback)(function(e){void 0===e&&(e=u);try{sessionStorage.removeItem(e)}catch(e){}},[u]),A=(0,r.useCallback)(c(function(e){if(!e)return void P();k(function(e){return n({},e,{loading:!0})});var t,r={};try{r=JSON.parse(sessionStorage.getItem(u)||"{}")}catch(e){}i&&(r=Object.keys(r).reduce(function(e,t){return r[t].maxAge-Date.now()>=0&&(e[t]=r[t]),e},{}))[e]?k({loading:!1,status:"OK",data:r[e].data}):null==(t=C.current)||t.getPlacePredictions(n({},S.current,{input:e}),function(t,a){if(k({loading:!1,status:a,data:t||[]}),i&&"OK"===a){r[e]={data:t,maxAge:Date.now()+1e3*i};try{sessionStorage.setItem(u,JSON.stringify(r))}catch(e){}}})},void 0===s?200:s),[i,u,P,S]),M=(0,r.useCallback)(function(e,t){void 0===t&&(t=!0),w(e),C.current&&t&&A(e)},[A]);return(0,r.useEffect)(function(){if(!x)return function(){return null};var e=window.google;return T.current||null!=e&&e.maps||!p?L():window[p]=L,function(){window[p]&&delete window[p]}},[p,T,L,x]),{ready:b,value:j,suggestions:N,setValue:M,clearSuggestions:P,clearCache:E,init:L}},u=function(e){var t=new window.google.maps.Geocoder;return new Promise(function(r,a){t.geocode(e,function(t,s){"OK"!==s&&a(s),!e.address&&e.componentRestrictions&&(console.error("💡 use-places-autocomplete: Please provide an address when using getGeocode() with the componentRestrictions."),r(t)),r(t)})})};function m({label:e,placeholder:n,value:o,onChange:c,error:m,disabled:p=!1,countryCode:h,sessionToken:f,required:x=!1,className:g=""}){let b=(0,s.useTranslations)("common.address"),y=e??b("label"),v=n??b("placeholder"),{isLoaded:j,loadError:w}=(0,i.useGoogleMaps)(),[_,N]=(0,r.useState)(-1),[k,C]=(0,r.useState)(!1),[S,T]=(0,r.useState)(!1),[L,P]=(0,r.useState)(!1),E=(0,r.useRef)(null),A=(0,r.useRef)(null),M=(0,r.useRef)(null),{ready:D,value:I,suggestions:{status:B,data:O},setValue:F,clearSuggestions:U}=d({requestOptions:{componentRestrictions:h?{country:h.toLowerCase()}:void 0,sessionToken:f,types:["address"]},debounce:300,initOnMount:j,cache:86400});(0,r.useEffect)(()=>{T(!0)},[]),(0,r.useEffect)(()=>{h&&U()},[h,U]),(0,r.useEffect)(()=>{o!==I&&F(o,!1)},[o,I,F]),(0,r.useEffect)(()=>{L||C("OK"===B&&O.length>0),N(-1)},[B,O,L]),(0,r.useEffect)(()=>{let e=e=>{M.current&&!M.current.contains(e.target)&&A.current&&!A.current.contains(e.target)&&(C(!1),U())};if(k)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[k,U]),(0,r.useEffect)(()=>{if(!k||!M.current)return;let e=M.current,t=e.getBoundingClientRect(),r=()=>{let r=e.getBoundingClientRect();(Math.abs(r.top-t.top)>20||Math.abs(r.left-t.left)>20)&&(C(!1),U())};return window.addEventListener("scroll",r,!0),()=>window.removeEventListener("scroll",r,!0)},[k,U]);let R=async e=>{let t=e.description;F(t,!1),P(!0),U(),C(!1);try{let e=(await u({address:t}))[0];if(e){let r,a,s=(r=e.address_components||[],a={formattedAddress:e.formatted_address||""},r.forEach(e=>{let t=e.types;t.includes("street_number")&&(a.streetNumber=e.long_name),t.includes("route")&&(a.route=e.long_name),t.includes("locality")&&(a.locality=e.long_name),t.includes("administrative_area_level_1")&&(a.administrativeArea=e.long_name),t.includes("postal_code")&&(a.postalCode=e.long_name),t.includes("country")&&(a.country=e.short_name)}),e.geometry?.location&&(a.latitude=e.geometry.location.lat(),a.longitude=e.geometry.location.lng()),a);c(t,s)}else c(t)}catch(e){console.error("Error fetching place details:",e),c(t)}finally{P(!1)}};if((0,r.useEffect)(()=>{if(_>=0&&A.current){let e=A.current.children[_];e&&e.scrollIntoView({block:"nearest",behavior:"auto"})}},[_]),w)return(0,t.jsxs)("div",{className:g,children:[(0,t.jsx)(l.default,{ref:E,label:y,placeholder:v,value:o,onChange:e=>c(e.target.value),error:m||b("lookupUnavailableShort"),disabled:p,required:x}),(0,t.jsx)("p",{className:"mt-1 text-bodyxs text-gray-500",children:b("autocompleteUnavailable")})]});let z=p||!D||!j;return(0,t.jsxs)("div",{ref:M,className:`relative ${g}`,children:[(0,t.jsx)(l.default,{prefixIcon:"/images/location-icon.svg",ref:E,label:y,placeholder:v,value:I,onChange:e=>{let t=e.target.value;F(t),c(t),P(!1),C(!0)},onKeyDown:e=>{if(k&&0!==O.length)switch(e.key){case"ArrowDown":e.preventDefault(),N(e=>e<O.length-1?e+1:e);break;case"ArrowUp":e.preventDefault(),N(e=>e>0?e-1:-1);break;case"Enter":e.preventDefault(),_>=0&&O[_]&&R(O[_]);break;case"Escape":e.preventDefault(),C(!1),U();break;case"Tab":C(!1),U()}},error:m,disabled:z,required:x,autoComplete:"off",role:"combobox","aria-autocomplete":"list","aria-expanded":k,"aria-controls":"address-suggestions","aria-activedescendant":_>=0?`suggestion-${_}`:void 0}),!D&&!w&&(0,t.jsx)("p",{className:"mt-1 text-bodyxs text-gray-500",children:b("loadingLookup")}),(()=>{if(!k||!S)return null;let e=(()=>
2{if(!M.current)return{};let e=M.current.getBoundingClientRect(),t=window.innerHeight,r=t-e.bottom,a=e.top,s=r<200&&a>r;return{position:"fixed",top:s?void 0:e.bottom+4,bottom:s?t-e.top+4:void 0,left:e.left,width:e.width,maxHeight:s?Math.min(a-20,300):Math.min(r-20,300)}})(),r=(0,t.jsx)("div",{ref:A,style:e,className:"bg-white border border-gray-300 rounded-lg shadow-xl overflow-y-auto z-[9999]",role:"listbox","aria-label":b("suggestionsAriaLabel"),children:O.map((e,r)=>(0,t.jsxs)("button",{type:"button",className:`w-full text-left px-4 py-3 text-bodymd border-b border-gray-100 last:border-b-0 transition-colors ${r===_?"bg-brand-100 text-hard-green":"text-gray-900 hover:bg-gray-50"}`,onClick:()=>R(e),onMouseMove:()=>{_!==r&&N(r)},role:"option","aria-selected":r===_,children:[(0,t.jsx)("div",{className:"font-medium",children:e.structured_formatting.main_text}),e.structured_formatting.secondary_text&&(0,t.jsx)("div",{className:"text-bodysm text-gray-600 mt-0.5",children:e.structured_formatting.secondary_text})]},e.place_id))});return(0,a.createPortal)(r,document.body)})()]})}e.s(["default",()=>m],992159)},547611,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(749525),s=e.i(659544),l=e.i(343933),i=e.i(948148);function n({isOpen:e,onClose:n,onConfirm:o,petId:c,petName:d}){let u=(0,i.useTranslations)("modals.markAsFound"),[m,p]=(0,r.useState)(!1),h=async()=>{p(!0);try{await o()}finally{p(!1)}};return(0,t.jsx)(a.default,{isOpen:e,onClose:n,children:(0,t.jsxs)("div",{className:"p-6 max-w-[400px]",children:[(0,t.jsx)(l.default,{onClick:n}),(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"52",height:"52",viewBox:"0 0 52 52",fill:"none",children:[(0,t.jsxs)("g",{filter:"url(#filter0_dii_mark_as_found)",children:[(0,t.jsx)("rect",{x:"2",y:"1",width:"48",height:"48",rx:"10",fill:"white"}),(0,t.jsx)("rect",{x:"2.5",y:"1.5",width:"47",height:"47",rx:"9.5",stroke:"#D5D7DA"}),(0,t.jsx)("image",{x:"14",y:"13",width:"24",height:"24",href:"/icons/smile-icon.svg"})]}),(0,t.jsx)("defs",{children:(0,t.jsxs)("filter",{id:"filter0_dii_mark_as_found",x:"0",y:"0",width:"52",height:"52",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,t.jsx)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,t.jsx)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,t.jsx)("feOffset",{dy:"1"}),(0,t.jsx)("feGaussianBlur",{stdDeviation:"1"}),(0,t.jsx)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.0392157 0 0 0 0 0.0509804 0 0 0 0 0.0705882 0 0 0 0.05 0"}),(0,t.jsx)("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_9248_15021"}),(0,t.jsx)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_9248_15021",result:"shape"}),(0,t.jsx)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,t.jsx)("feOffset",{dy:"-2"}),(0,t.jsx)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,t.jsx)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.0392157 0 0 0 0 0.0496732 0 0 0 0 0.0705882 0 0 0 0.05 0"}),(0,t.jsx)("feBlend",{mode:"normal",in2:"shape",result:"effect2_innerShadow_9248_15021"}),(0,t.jsx)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,t.jsx)("feMorphology",{radius:"1",operator:"erode",in:"SourceAlpha",result:"effect3_innerShadow_9248_15021"}),(0,t.jsx)("feOffset",{}),(0,t.jsx)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,t.jsx)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.0392157 0 0 0 0 0.0496732 0 0 0 0 0.0705882 0 0 0 0.18 0"}),(0,t.jsx)("feBlend",{mode:"normal",in2:"effect2_innerShadow_9248_15021",result:"effect3_innerShadow_9248_15021"})]})})]})}),(0,t.jsx)("h2",{className:"text-bodymd text-dark-black !font-[700] mb-4",children:(0,t.jsx)("strong",{children:u("title",{petName:d})})}),(0,t.jsx)("p",{className:"text-bodymd text-gray-600 mb-8",children:u("description",{petName:d})}),(0,t.jsxs)("div",{className:"flex gap-3 justify-end",children:[(0,t.jsx)(s.default,{variant:"secondary",size:"lg",onClick:n,disabled:m,children:u("cancel")}),(0,t.jsx)(s.default,{variant:"primary",size:"lg",onClick:h,disabled:m,children:u(m?"marking":"confirm")})]})]})})}e.s(["default",()=>n])},658804,e=>{"use strict";
2var t=e.i(843476),r=e.i(271645),a=e.i(749525),s=e.i(659544),l=e.i(657688),i=e.i(992159),n=e.i(734382),o=e.i(576859),c=e.i(948148);let d={width:"100%",height:"300px",borderRadius:"12px"},u={lat:51.505,lng:-.09},m={GB:{lat:54.5,lng:-2},US:{lat:39.8,lng:-98.5},CA:{lat:56.1,lng:-106.3},AU:{lat:-25.2,lng:133.7},DE:{lat:51.1,lng:10.4},FR:{lat:46.2,lng:2.2},ES:{lat:40.4,lng:-3.7},IT:{lat:41.8,lng:12.5},NL:{lat:52.1,lng:5.2},BE:{lat:50.5,lng:4.4},IE:{lat:53.4,lng:-8.2},NZ:{lat:-40.9,lng:174.8}};function p({isOpen:e,onClose:p,onConfirm:h,petId:f,petName:x,userCountry:g="GB"}){let b=(0,c.useTranslations)("modals.reportMissing"),{isLoaded:y}=(0,o.useGoogleMaps)(),[v,j]=(0,r.useState)(!1),[w,_]=(0,r.useState)(""),[N,k]=(0,r.useState)(null),[C,S]=(0,r.useState)(m[g]||u),[T,L]=(0,r.useState)(null),[P,E]=(0,r.useState)("");(0,r.useEffect)(()=>{e&&(_(""),k(null),S(m[g]||u),L(null),E(""))},[e,g]);let A=(0,r.useCallback)((e,t)=>{if(_(e),E(""),t&&t.latitude&&t.longitude){let e={lat:t.latitude,lng:t.longitude};k(e),S(e),L(t)}},[]),M=(0,r.useCallback)(e=>{if(e.latLng){let t={lat:e.latLng.lat(),lng:e.latLng.lng()};k(t),E(""),y&&window.google&&new google.maps.Geocoder().geocode({location:t},(e,r)=>{"OK"===r&&e&&e[0]&&(_(e[0].formatted_address),L({formattedAddress:e[0].formatted_address,latitude:t.lat,longitude:t.lng}))})}},[y]),D=(0,r.useCallback)(e=>{if(e.latLng){let t={lat:e.latLng.lat(),lng:e.latLng.lng()};k(t),E(""),y&&window.google&&new google.maps.Geocoder().geocode({location:t},(e,r)=>{"OK"===r&&e&&e[0]&&(_(e[0].formatted_address),L({formattedAddress:e[0].formatted_address,latitude:t.lat,longitude:t.lng}))})}},[y]),I=async()=>{let e=w.trim();if(!e)return void E(b("errorRequired"));if(!/[a-zA-Z0-9]/.test(e))return void E(b("errorInvalid"));if(!N||!T?.formattedAddress)return void E(b("errorNoMarker"));j(!0);try{await h({address:T.formattedAddress,latitude:N.lat,longitude:N.lng})}finally{j(!1)}};return(0,t.jsx)(a.default,{isOpen:e,onClose:p,children:(0,t.jsxs)("div",{className:"p-6 max-w-[512px]",children:[(0,t.jsx)("button",{onClick:p,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 transition-colors","aria-label":"Close modal",children:(0,t.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,t.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(l.default,{src:"/images/dashboardicons/reporticon.svg",alt:"Report",width:48,height:48})}),(0,t.jsx)("h2",{className:"text-bodymd text-dark-black !font-[700] mb-2",children:b("title",{petName:x})}),(0,t.jsx)("p",{className:"text-bodymd text-gray-600 mb-6",children:b("description")}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsxs)("label",{className:"block mb-2",style:{fontFamily:"DM Sans",fontWeight:700,fontSize:"14px",lineHeight:"20px",color:"#44403C"},children:[b("addressLabel"),(0,t.jsx)("span",{className:"text-red-500 ml-1",children:"*"})]}),(0,t.jsx)(i.default,{label:"",placeholder:b("addressPlaceholder"),value:w,onChange:A,countryCode:g,className:"w-full",error:P})]}),y&&(0,t.jsx)("div",{className:"mb-2 border border-gray-200 rounded-xl overflow-hidden",children:(0,t.jsx)(n.GoogleMap,{mapContainerStyle:d,center:C,zoom:N?15:6,onClick:M,options:{streetViewControl:!1,mapTypeControl:!1,fullscreenControl:!1},children:N&&(0,t.jsx)(n.Marker,{position:N,draggable:!0,onDragEnd:D})})}),(0,t.jsx)("p",{className:"text-bodysm text-gray-500 mb-6",children:b("mapHelperText")}),(0,t.jsxs)("div",{className:"flex gap-3 justify-end",children:[(0,t.jsx)(s.default,{variant:"secondary",size:"lg",onClick:p,disabled:v,children:b("cancel")}),(0,t.jsx)(s.default,{variant:"destructive",size:"lg",onClick:I,disabled:v,children:v?b("reporting"):b("confirm")})]})]})})}e.s(["default",()=>p])},234129,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(948148),s=e.i(226443);e.i(659619);var l=e.i(545828);function i({isOpen:e,onClose:i,petName:n}){let o=(0,a.useTranslations)("modals.contactAppPromo"),c=(0,r.useCallback)(e=>{(0,l.track)("contact_app_promo_shown",{platform:e})},[]),d=(0,r.useCallback)((e,t)=>{(0,l.track)("contact_app_promo_clicked",{store:e,platform:t})},[]),u=(0,r.useCallback)(({platform:e,storeClicked:t})=>{t||(0,l.track)("contact_app_promo_dismissed",{platform:e}),i()},[i]);return e?(0,t.jsx)(s.default,{petName:n,eyebrow:o("eyebrow"),title:n?o("titleWithPet",{petName:n}):o("title"),body:n?o("bodyWithPet",{petName:n}):o("body"),dismissLabel:o("backToContacts"),qrCampaign:"first_contact_added",onShown:c,onStoreClick:d,onDismiss:u}):null}e.s(["default",()=>i])},582567,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(948148),s=e.i(226443);e.i(659619);var l=e.i(545828);function i({isOpen:e,onClose:i,petName:n}
2){let o=(0,a.useTranslations)("modals.mobileAppPromo"),c=(0,r.useCallback)(e=>{(0,l.track)("app_promo_modal_shown",{platform:e})},[]),d=(0,r.useCallback)((e,t)=>{(0,l.track)("app_promo_modal_clicked",{store:e,platform:t})},[]),u=(0,r.useCallback)(({platform:e,storeClicked:t})=>{t||(0,l.track)("app_promo_modal_dismissed",{platform:e}),i()},[i]);return e?(0,t.jsx)(s.default,{petName:n,dismissLabel:o("continueInBrowser"),qrCampaign:"existing_user_promo",onShown:c,onStoreClick:d,onDismiss:u}):null}e.s(["default",()=>i])},207225,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(948148),s=e.i(749525),l=e.i(659544),i=e.i(343933);function n({isOpen:e,onClose:n,onConfirm:o,petName:c,description:d}){let u=(0,a.useTranslations)("modals.deletePet"),m=(0,a.useTranslations)("common.actions"),[p,h]=(0,r.useState)(!1),f=async()=>{h(!0);try{await o()}finally{h(!1)}};return(0,t.jsx)(s.default,{isOpen:e,onClose:n,className:"!max-w-[420px]",children:(0,t.jsxs)("div",{className:"p-6",children:[(0,t.jsx)(i.default,{onClick:n}),(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)("div",{className:"w-12 h-12 rounded-full bg-[#FEE4E2] flex items-center justify-center",children:(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M9 3H15M3 6H21M19 6L18.2987 16.5193C18.1935 18.0975 18.1409 18.8867 17.8 19.485C17.4999 20.0118 17.0472 20.4353 16.5017 20.6997C15.882 21 15.0911 21 13.5093 21H10.4907C8.90891 21 8.11803 21 7.49834 20.6997C6.95276 20.4353 6.50009 20.0118 6.19998 19.485C5.85911 18.8867 5.8065 18.0975 5.70129 16.5193L5 6M10 10.5V15.5M14 10.5V15.5",stroke:"#D92D20",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})}),(0,t.jsx)("h2",{className:"text-bodymd text-dark-black !font-[700] mb-2",children:u("title")}),(0,t.jsx)("p",{className:"text-bodymd text-gray-600 mb-8",children:d||u("defaultDescription",{petName:c})}),(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)(l.default,{variant:"secondary",size:"lg",onClick:n,disabled:p,className:"flex-1",children:m("cancel")}),(0,t.jsx)(l.default,{variant:"destructive",size:"lg",onClick:f,disabled:p,className:"flex-1",children:p?u("deleting"):m("delete")})]})]})})}e.s(["default",()=>n])},343933,e=>{"use strict";var t=e.i(843476);e.s(["default",0,({onClick:e,disabled:r})=>(0,t.jsx)("button",{className:"absolute top-3 right-3 cursor-pointer",onClick:e,disabled:r,"aria-label":"Close",type:"button",children:(0,t.jsx)("svg",{width:"44",height:"44",viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M28 16L16 28M16 16L28 28",stroke:"#A9A29D",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})])},493663,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(948148),s=e.i(749525),l=e.i(659544),i=e.i(343933);function n({isOpen:e,onClose:n,onConfirm:o,petId:c}){let d=(0,a.useTranslations)("modals.deleteLastPet"),u=(0,a.useTranslations)("common.actions"),[m,p]=(0,r.useState)(!1),h=async()=>{p(!0);try{await o()}finally{p(!1)}};return(0,t.jsx)(s.default,{isOpen:e,onClose:n,className:"!max-w-[420px]",children:(0,t.jsxs)("div",{className:"p-6 ",children:[(0,t.jsx)(i.default,{onClick:n}),(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)("div",{className:"w-12 h-12 rounded-full bg-[#FEE4E2] flex items-center justify-center",children:(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M9 3H15M3 6H21M19 6L18.2987 16.5193C18.1935 18.0975 18.1409 18.8867 17.8 19.485C17.4999 20.0118 17.0472 20.4353 16.5017 20.6997C15.882 21 15.0911 21 13.5093 21H10.4907C8.90891 21 8.11803 21 7.49834 20.6997C6.95276 20.4353 6.50009 20.0118 6.19998 19.485C5.85911 18.8867 5.8065 18.0975 5.70129 16.5193L5 6M10 10.5V15.5M14 10.5V15.5",stroke:"#D92D20",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})}),(0,t.jsx)("h2",{className:"text-bodymd text-dark-black !font-[700] mb-2",children:d("title")}),(0,t.jsx)("p",{className:"text-bodymd text-gray-600 mb-8",children:d("description")}),(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)(l.default,{variant:"secondary",size:"lg",onClick:n,disabled:m,className:"flex-1",children:d("noThanks")}),(0,t.jsx)(l.default,{variant:"destructive",size:"lg",onClick:h,disabled:m,className:"flex-1",children:m?d("deleting"):u("delete")})]})]})})}e.s(["default",()=>n])},781860,e=>{"use strict";
2var t=e.i(843476),r=e.i(948148),a=e.i(749525),s=e.i(659544);e.i(659619);var l=e.i(545828);function i({isOpen:e,onClose:i,onOrderTag:n,surface:o="unknown"}){let c=(0,r.useTranslations)("modals.orderTag");return(0,t.jsx)(a.default,{isOpen:e,onClose:i,className:"!max-w-[420px]",children:(0,t.jsxs)("div",{className:"p-6",children:[(0,t.jsx)("button",{onClick:i,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 transition-colors","aria-label":"Close modal",children:(0,t.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,t.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)("div",{className:"w-12 h-12 rounded-full bg-brand-100 flex items-center justify-center",children:(0,t.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("path",{d:"M8 8H8.01M3 11.1716V6.2C3 5.07989 3 4.51984 3.21799 4.09202C3.40973 3.71569 3.71569 3.40973 4.09202 3.21799C4.51984 3 5.07989 3 6.2 3H11.1716C11.702 3 11.9672 3 12.2166 3.06306C12.4381 3.11896 12.6505 3.20864 12.8462 3.32873C13.0659 3.46471 13.2557 3.65453 13.6353 4.03418L20.0342 10.4331C20.7026 11.1014 21.0368 11.4356 21.179 11.8164C21.3048 12.1532 21.3048 12.5202 21.179 12.857C21.0368 13.2378 20.7026 13.572 20.0342 14.2404L14.2404 20.0342C13.572 20.7026 13.2378 21.0368 12.857 21.179C12.5202 21.3048 12.1532 21.3048 11.8164 21.179C11.4356 21.0368 11.1014 20.7026 10.4331 20.0342L4.03418 13.6353C3.65453 13.2557 3.46471 13.0659 3.32873 12.8462C3.20864 12.6505 3.11896 12.4381 3.06306 12.2166C3 11.9672 3 11.702 3 11.1716Z",stroke:"#0F5527",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,t.jsx)("circle",{cx:"8",cy:"8",r:"1.5",fill:"#0F5527"})]})})}),(0,t.jsx)("h2",{className:"text-bodymd text-dark-black !font-[700] mb-2",children:c("title")}),(0,t.jsx)("p",{className:"text-bodymd text-gray-600 mb-8",children:c("description")}),(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)(s.default,{variant:"secondary",size:"lg",onClick:i,className:"flex-1",children:c("noThanks")}),(0,t.jsx)(s.default,{variant:"primary",size:"lg",onClick:()=>{(0,l.track)("tag_ordered",{surface:o}),window.open("https://supernormalpets.com/products/supernormal-qr-lifetime-tracking-pet-tag","_blank"),n()},className:"flex-1",children:c("orderButton")})]})]})})}e.s(["default",()=>i])},846945,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(749525),s=e.i(659544),l=e.i(343933),i=e.i(948148);function n({isOpen:e,onClose:n,onKeepOriginal:o,onMoveDate:c,daysLate:d}){let u=(0,i.useTranslations)("modals.moveTaskDate"),[m,p]=(0,r.useState)(!1),h=async()=>{p(!0);try{await o(),n()}finally{p(!1)}},f=async()=>{p(!0);try{await c(d),n()}finally{p(!1)}};return(0,t.jsx)(a.default,{isOpen:e,onClose:n,className:"!max-w-[424px]",children:(0,t.jsxs)("div",{className:"p-6",children:[(0,t.jsx)(l.default,{onClick:n,disabled:m}),(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"52",height:"52",viewBox:"0 0 52 52",fill:"none",children:[(0,t.jsxs)("g",{filter:"url(#filter0_dii_9321_9015)",children:[(0,t.jsx)("rect",{x:"2",y:"1",width:"48",height:"48",rx:"10",fill:"white"}),(0,t.jsx)("rect",{x:"2.5",y:"1.5",width:"47",height:"47",rx:"9.5",stroke:"#D5D7DA"}),(0,t.jsx)("path",{d:"M21.5 25L24.5 28L30.5 22M36 25C36 30.5228 31.5228 35 26 35C20.4772 35 16 30.5228 16 25C16 19.4772 20.4772 15 26 15C31.5228 15 36 19.4772 36 25Z",stroke:"#465C4A",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),(0,t.jsx)("defs",{children:(0,t.jsxs)("filter",{id:"filter0_dii_9321_9015",x:"0",y:"0",width:"52",height:"52",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,t.jsx)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,t.jsx)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,t.jsx)("feOffset",{dy:"1"}),(0,t.jsx)("feGaussianBlur",{stdDeviation:"1"}),(0,t.jsx)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.0392157 0 0 0 0 0.0509804 0 0 0 0 0.0705882 0 0 0 0.05 0"}
2),(0,t.jsx)("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_9321_9015"}),(0,t.jsx)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_9321_9015",result:"shape"}),(0,t.jsx)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,t.jsx)("feOffset",{dy:"-2"}),(0,t.jsx)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,t.jsx)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.0392157 0 0 0 0 0.0496732 0 0 0 0 0.0705882 0 0 0 0.05 0"}),(0,t.jsx)("feBlend",{mode:"normal",in2:"shape",result:"effect2_innerShadow_9321_9015"}),(0,t.jsx)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,t.jsx)("feMorphology",{radius:"1",operator:"erode",in:"SourceAlpha",result:"effect3_innerShadow_9321_9015"}),(0,t.jsx)("feOffset",{}),(0,t.jsx)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,t.jsx)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.0392157 0 0 0 0 0.0496732 0 0 0 0 0.0705882 0 0 0 0.18 0"}),(0,t.jsx)("feBlend",{mode:"normal",in2:"effect2_innerShadow_9321_9015",result:"effect3_innerShadow_9321_9015"})]})})]})}),(0,t.jsx)("h2",{className:"text-bodymd text-dark-black !font-[700] mb-2",children:u("title")}),(0,t.jsx)("p",{className:"text-bodymd text-gray-600 mb-6",children:u("description",{daysLate:d})}),(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)(s.default,{variant:"secondary",size:"lg",onClick:h,disabled:m,className:"flex-1",children:u("keepOriginal")}),(0,t.jsx)(s.default,{variant:"primary",size:"lg",onClick:f,disabled:m,className:"flex-1",children:u("moveDate")})]})]})})}e.s(["default",()=>n])},285012,e=>{"use strict";var t=e.i(95187);let r=(0,t.createServerReference)("0047764e0f21ac2bbb2c69e95bb2df1550e83df0b0",t.callServer,void 0,t.findSourceMapURL,"markMobileAppPromoSeen");e.s(["markMobileAppPromoSeen",()=>r])},950693,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(948148),s=e.i(749525),l=e.i(659544),i=e.i(924284),n=e.i(226443);e.i(659619);var o=e.i(545828),c=e.i(285012);async function d(){try{await fetch("/api/community/posts/mine",{method:"DELETE",credentials:"include"})}catch{}}function u({isOpen:e,onClose:u,pets:m}){let p=(0,a.useTranslations)("modals.welcome"),h=(0,a.useTranslations)("modals.mobileAppPromo"),[f,x]=(0,r.useState)(!0),[g,b]=(0,r.useState)(!0),[y,v]=(0,r.useState)(!1);(0,r.useEffect)(()=>{e&&"false"===sessionStorage.getItem("onboarding_pet_detected")&&b(!1)},[e]),(0,r.useEffect)(()=>{e||v(!1)},[e]);let j=m[0]?.profilePhotoUrl??null,w=m.filter(e=>e.profilePhotoUrl),_=m[0]?.firstName??"",N=(()=>{if(0===m.length)return"";if(1===m.length)return m[0].firstName;if(2===m.length)return`${m[0].firstName} and ${m[1].firstName}`;let e=m.slice(0,-1).map(e=>e.firstName).join(", "),t=m[m.length-1].firstName;return`${e}, and ${t}`})(),k=()=>{!f&&j&&d(),sessionStorage.removeItem("onboarding_pet_detected"),v(!0)},C=(0,r.useCallback)(e=>{(0,o.track)("onboarding_app_promo_shown",{platform:e}),(0,c.markMobileAppPromoSeen)()},[]),S=(0,r.useCallback)((e,t)=>{(0,o.track)("onboarding_app_promo_clicked",{store:e,platform:t})},[]),T=(0,r.useCallback)(({platform:e,storeClicked:t})=>{t||(0,o.track)("onboarding_app_promo_dismissed",{platform:e}),u()},[u]);return e?y?(0,t.jsx)(n.default,{petName:_||null,dismissLabel:h("continueToDashboard"),qrCampaign:"onboarding_welcome",onShown:C,onStoreClick:S,onDismiss:T}):(0,t.jsxs)(s.default,{isOpen:e,onClose:k,className:"!max-w-[420px] !bg-white overflow-hidden",children:[(0,t.jsx)("button",{"aria-label":"Close",onClick:k,className:"absolute top-4 right-4 w-9 h-9 rounded-full flex items-center justify-center text-gray-400 hover:text-gray900 hover:bg-grey-bg transition-colors duration-200 ease-in-out",children:(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"square",children:(0,t.jsx)("path",{d:"M6 6l12 12M18 6L6 18"})})}),(0,t.jsxs)("div",{className:"px-8 pt-8 pb-7 flex flex-col gap-4",children:[w.length>0?(0,t.jsx)("div",{className:"flex gap-3",children:w.map(e=>(0,t.jsx)("img",{src:e.profilePhotoUrl,alt:e.firstName,className:"w-12 h-12 rounded-full object-cover border border-gray200 shadow-sm"},e.id))}):(0,t.jsx)("div",{className:"w-12 h-12 rounded-full bg-green flex items-center justify-center",children:(0,t.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",className:"stroke-forest",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("circle",{cx:"6",cy:"9.5",r:"1.6"}),(0,t.jsx)("circle",{cx:"18",cy:"9.5",r:"1.6"}),(0,t.jsx)("circle",{cx:"9.5",cy:"6",r:"1.6"}),(0,t.jsx)("circle",{cx:"14.5",cy:"6",r:"1.6"}),(0,t.jsx)("path",{d:"M12 11c-2.6 0-4.8 2.2-4.8 4.4 0 1.5 1.1 2.6 2.5 2.6 1 0 1.6-.5 2.3-.5s1.3.5 2.3.5c1.4 0 2.5-1.1 2.5-2.6C16.8 13.2 14.6 11 12 11z"})]})}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("h1",{className:"text-headingmd text-gray900",children:N?p("titleWithPets",{petNames:N}):p("title")}),(0,t.jsx)("p",{className:"text-[15px] leading-[22px] text-gray-600",children:_?p("bodyWithPet",{petName:_}):p("body")})]}),j&&g&&(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4 p-4 bg-[#F9F8F7] rounded-xl border border-gray200",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("p",{className:"text-bodysm !font-bold text-hard-green-700",children:p("sharePhotoTitle")}),(0,t.jsx)("p",{className:"text-bodysm text-gray-500 mt-0.5",children:p("sharePhotoDesc")})]}),(0,t.jsx)(i.default,{checked:f,onChange:x,ariaLabel:"Share pet photo to community w
2all"})]}),(0,t.jsx)(l.default,{variant:"primary",size:"lg",onClick:k,className:"w-full mt-1 h-12",children:_?p("primaryButtonWithPet",{petName:_}):p("primaryButton")}),(0,t.jsx)("button",{onClick:k,className:"h-11 -mt-2 rounded-full text-sm font-medium text-gray-600 hover:bg-grey-bg transition-colors duration-200 ease-in-out",children:p("laterButton")})]})]}):null}e.s(["default",()=>u])},179869,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(948148),s=e.i(749525),l=e.i(659544),i=e.i(636817),n=e.i(603622),o=e.i(657688),c=e.i(457619),d=e.i(704670),u=e.i(651344),m=e.i(690791),p=e.i(234913);e.i(659619);var h=e.i(545828);function f({isOpen:e,onClose:f,onSuccess:x,zIndex:g}){let b=(0,a.useTranslations)("modals.addNewPet"),y=(0,a.useTranslations)("common.actions"),v=(0,r.useMemo)(()=>[{value:"dog",label:b("petTypes.dog")},{value:"cat",label:b("petTypes.cat")},{value:"bird",label:b("petTypes.bird")},{value:"fish",label:b("petTypes.fish")},{value:"rabbit",label:b("petTypes.rabbit")},{value:"hamster",label:b("petTypes.hamster")},{value:"guinea_pig",label:b("petTypes.guineaPig")},{value:"ferret",label:b("petTypes.ferret")},{value:"reptile",label:b("petTypes.reptile")},{value:"horse",label:b("petTypes.horse")},{value:"other",label:b("petTypes.other")}],[b]),[j,w]=(0,r.useState)({firstName:"",petType:""}),[_,N]=(0,r.useState)(!1),[k,C]=(0,r.useState)(null),[S,T]=(0,r.useState)(null),[L,P]=(0,r.useState)(!1),[E,A]=(0,r.useState)(!1),[M,D]=(0,r.useState)(null),[I,B]=(0,r.useState)(null),[O,F]=(0,r.useState)(!1),{pets:U}=(0,p.useAppContext)(),R=e=>{let t=e.target.files?.[0];if(!t)return;let r=(0,d.validateImageFile)(t);if(!r.valid)return void D(r.error||"Invalid image file");C(t);let a=new FileReader;a.onloadend=()=>{T(a.result)},a.readAsDataURL(t),D(null)},z=async e=>{if(e.preventDefault(),D(null),!j.firstName.trim())return void D(b("firstNameRequired"));if(!j.petType)return void D(b("selectPetType"));P(!0);try{let e,t,r=(e=j.firstName.toLowerCase().replace(/[^a-z0-9]/g,"").substring(0,30),t=Math.random().toString(36).substring(2,6),`${e}-${t}`),a=null;if(k){A(!0);try{let e=await (0,d.uploadImage)(k,"PET_AVATARS");if("error"in e)throw Error(e.error);a=e.url}catch(e){D(`Failed to upload image: ${e.message}`),A(!1),P(!1);return}A(!1)}let s=await fetch("/api/pets",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({firstName:j.firstName.trim(),petType:j.petType,profileUrl:r,profilePhotoUrl:a})});if(!s.ok){let e=await s.json();throw Error(e.error||"Failed to create pet")}let l=await s.json();if(l.pet&&l.pet.id){if(B(l.pet.id),l.requiresUpgrade){console.log("[AddNewPetModal] Pet created but requires upgrade. Pet ID:",l.pet.id),P(!1),F(!0);return}(0,h.track)("pet_profile_created",{pet_type:j.petType,has_photo:!!k,type_source:"manual",pet_index:U.length+1}),await x(l.pet.id,j.firstName.trim()),$()}else await x(),$()}catch(e){D(e.message||"Failed to add pet. Please try again.")}finally{P(!1)}},$=()=>{L||(w({firstName:"",petType:""}),C(null),T(null),D(null),F(!1),B(null),f())};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(c.default,{isOpen:O,variant:"petLimit",onClose:async()=>{if(F(!1),I){try{await fetch(`/api/pets/${I}`,{method:"DELETE"}),console.log("[AddNewPetModal] Deleted pending pet after upgrade cancellation:",I)}
2catch(e){console.error("[AddNewPetModal] Failed to delete pending pet:",e)}B(null)}},quantity:U.length+1,zIndex:g?g+10:120}),(0,t.jsx)(s.default,{isOpen:e&&!O,onClose:$,className:"!w-full !max-w-[688px]",mobileBottomAligned:!0,zIndex:g,children:(0,t.jsxs)("form",{onSubmit:z,className:"p-6",children:[(0,t.jsxs)("div",{className:"mb-5",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-[2px]",children:[(0,t.jsx)("h2",{className:"text-bodymd text-dark-black !font-[700]",children:b("title")}),(0,t.jsx)("button",{type:"button",onClick:$,disabled:L,className:"text-gray-400 hover:text-gray-600 transition-colors",children:(0,t.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,t.jsx)("p",{className:"text-bodymd text-gray-600",children:b("description")})]}),(0,t.jsx)("div",{className:"h-px bg-[#E7E5E4] -mx-6 mt-5 mb-5",style:{width:"calc(100% + 3rem)"}}),(0,t.jsxs)("div",{className:"space-y-5 mb-5",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[(0,t.jsx)(i.default,{label:b("petFirstNameLabel"),name:"firstName",type:"text",value:j.firstName,onChange:e=>{let{name:t,value:r}=e.target;w(e=>({...e,[t]:r})),D(null)},placeholder:b("petFirstNamePlaceholder"),required:!0,disabled:L}),(0,t.jsx)(n.default,{label:b("petTypeLabel"),placeholder:b("petTypePlaceholder"),options:v,value:j.petType,onChange:e=>{w(t=>({...t,petType:e})),D(null)},disabled:L})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-bold text-hard-green mb-2",children:b("photoLabel")}),(0,t.jsxs)("div",{className:"flex gap-3 md:gap-5",children:[(0,t.jsx)("div",{className:"addPetProfilePic flex-1 md:w-[252px] md:max-w-none md:flex-none",children:(0,t.jsxs)("div",{className:"w-full h-[150px] md:w-[252px] md:h-[252px] rounded-xl overflow-hidden bg-[#F4F2F1] flex items-center justify-center relative border border-gray200",children:[S?(0,t.jsx)("img",{src:S,alt:"Pet preview",className:"w-full h-full object-cover"}):(0,t.jsx)(o.default,{src:"/icons/avatar-icon.svg",alt:"Default avatar",width:32,height:32,className:"opacity-70"}),(E||L)&&(0,t.jsx)("div",{className:"absolute inset-0 bg-black bg-opacity-50 flex items-center justify-center",children:(0,t.jsx)("div",{className:"w-5 h-5 border-2 border-white border-t-transparent rounded-full animate-spin"})})]})}),(0,t.jsx)("div",{className:"flex-1",children:(0,t.jsx)(u.default,{id:"photo-upload",uploading:E,disabled:L,onChange:R,onDragOver:e=>{e.preventDefault()},onDrop:e=>{e.preventDefault();let t=e.dataTransfer.files?.[0];t&&R({target:{files:[t]}})},className:"h-[150px] md:h-[252px] !rounded-xl"})})]})]})]}),M&&(0,t.jsx)("div",{className:"mb-4 p-3 bg-red-50 border border-red-200 rounded-lg",children:(0,t.jsx)("p",{className:"text-bodysm text-red-700",children:M})}
2),(0,t.jsx)("div",{className:"h-px bg-[#E7E5E4] mt-5 mb-5",style:{width:"calc(100%)"}}),(0,t.jsx)(m.ToggleRight,{checked:_,onChange:()=>{N(!_)},title:b("useSameDetailsTitle"),description:b("useSameDetailsDesc")}),(0,t.jsx)("div",{className:"h-px bg-[#E7E5E4] -mx-6 mt-8 mb-5 md:mb-6",style:{width:"calc(100% + 3rem)"}}),(0,t.jsxs)("div",{className:"flex flex-col-reverse sm:flex-row  gap-3 justify-end",children:[(0,t.jsx)(l.default,{type:"button",variant:"secondary",size:"xl",onClick:$,disabled:L,children:y("cancel")}),(0,t.jsx)(l.default,{type:"submit",variant:"primary",size:"xl",disabled:L||E||!j.firstName.trim()||!j.petType,children:L||E?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),E?b("uploading"):b("creating")]}):b("confirm")})]})]})})]})}e.s(["default",()=>f])},690791,e=>{"use strict";var t=e.i(843476),r=e.i(975157);function a({checked:e,onChange:a,title:s,description:l,disabled:i}){return(0,t.jsxs)("div",{className:"flex gap-3 w-full items-start",children:[(0,t.jsxs)("label",{className:"relative inline-flex cursor-pointer",children:[(0,t.jsx)("input",{type:"checkbox",checked:e,onChange:e=>a(e.target.checked),disabled:i,className:"sr-only"}),(0,t.jsx)("div",{className:(0,r.cn)(" w-[44px] h-[24px] rounded-full transition-colors duration-200  relative ",e?"bg-[var(--color-orange)]":"bg-[var(--color-gray-300)]",i&&"opacity-50 cursor-not-allowed"),children:(0,t.jsx)("span",{className:(0,r.cn)(`
3                      absolute top-[2px] left-[2px]
4                      w-[20px] h-[20px] rounded-full bg-white
5                      transition-transform duration-200
6                      `,e&&"translate-x-[20px]")})})]}),(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsxs)("p",{className:"text-bodymd !font-bold text-hard-green-500 mb-0.5",children:[" ",s," "]}),l&&(0,t.jsxs)("p",{className:"text-bodymd text-gray600",children:[" ",l," "]})]})]})}e.s(["ToggleRight",()=>a])},704670,e=>{"use strict";var t=e.i(748103);let r={PET_AVATARS:"pet-avatars",PET_PHOTOS:"pet-photos",CHAT_ATTACHMENTS:"chat-attachments",COMMUNITY_POSTS:"community-posts",PET_BIOMETRICS:"pet-biometrics",DASHBOARD_ANNOUNCEMENTS:"dashboard-announcements"},a=["image/jpeg","image/png","image/webp","image/gif"],s=[...a,"application/pdf","video/mp4","video/quicktime"];function l(e){return a.includes(e.type)?e.size>0x1900000?{valid:!1,error:"File size must be less than 25MB."}:{valid:!0}:{valid:!1,error:"Invalid file type. Only JPEG, PNG, WebP, and GIF images are allowed."}}function i(e){return s.includes(e.type)?e.size>0x3200000?{valid:!1,error:"File size must be less than 50MB."}:{valid:!0}:{valid:!1,error:"Invalid file type. Only images (JPEG, PNG, WebP, GIF), PDFs, and videos (MP4, MOV) are allowed."}}async function n(e,a){let s=Date.now();try{let i;console.log("[uploadImage] Starting upload process...",{fileName:e.name,fileSize:e.size,fileType:e.type,bucket:a});let n=l(e);if(!n.valid)return console.log("[uploadImage] Validation failed:",n.error),{error:n.error};console.log("[uploadImage] File validation passed"),console.log("[uploadImage] Fetching session...");let o=Date.now(),c=null,d=null;try{let e=await t.supabase.auth.getSession(),r=Date.now()-o;if(c=e.data?.session?.user?.id??null,console.log("[uploadImage] Session fetched:",{userId:c??"NOT AUTHENTICATED",timeMs:r,hasSession:!!e.data?.session,sessionExpiresAt:e.data?.session?.expires_at}),!c)return console.error("[uploadImage] NO USER ID - session data:",{session:e.data?.session,error:e.error}),{error:"Not authenticated. Please refresh the page and try again.",details:{reason:"no_user_id",sessionResult:e}}}catch(e){return d=e,console.error("[uploadImage] Session fetch failed:",e),{error:"Authentication error. Please refresh the page and try again.",details:{reason:"session_error",error:d}}}let u=Date.now(),m=Math.random().toString(36).substring(2,15),p=e.name.split(".").pop(),h=`${c}/${u}-${m}.${p}`,f=r[a];console.log("[uploadImage] Upload details:",{bucket:f,filePath:h,fileType:e.type,fileSize:e.size,userId:c}),console.log("[uploadImage] Starting storage upload...");let x=Date.now();try{i=await t.supabase.storage.from(f).upload(h,e,{cacheControl:"3600",upsert:!1});let r=Date.now()-x;console.log("[uploadImage] Upload completed:",{timeMs:r,hasError:!!i.error,hasData:!!i.data})}catch(t){let e=Date.now()-x;return console.error("[uploadImage] Upload exception:",{error:t,timeMs:e,message:t instanceof Error?t.message:"Unknown error"}),{error:"Network error during upload. Please check your connection.",details:{reason:"upload_exception",error:t,timeMs:e}}}if(i.error){console.error("[uploadImage] Upload error from Supabase:",{error:i.error,message:i.error.message,fullError:JSON.stringify(i.error,null,2)});return{error:i.error.message?.includes("row-level security")?"Permission denied. Please refresh and try again.":i.error.message?.includes("already exists")?"File already exists. Please try again.":i.error.message?.includes("401")||i.error.message?.includes("Unauthorized")?"Session expired. Please refresh the page.":`Upload failed: ${i.error.message}`,details:{reason:"supabase_error",error:i.error}}}let g=i.data;console.log("[uploadImage] Upload successful:",g),console.log("[uploadImage] Getting public URL...");let{data:{publicUrl:b}}=t.supabase.storage.from(f).getPublicUrl(g.path),y=Date.now()-s;return console.log("[uploadImage] Upload complete!",{publicUrl:b,totalTimeMs:y,path:g.path}),{url:b,path:g.path}}catch(t){let e=Date.now()-s;return console.error("[uploadImage] Unexpected error:",{error:t,message:t instanceof Error?t.message:"Unknown error",stack:t instanceof Error?t.stack:void 0,timeMs:e}),{error:"An unexpected error occurred during upload.",details:{reason:"unexpected_error",error:t instanceof Error?t.message:String(t),timeMs:e}}}}async function o(e,t){try{for(let t of e){let e=l(t);if(!e.valid)return{error:e.error}}let r=e.map(e=>n(e,t)),a=await Promise.all(r),s=a.filter(e=>"error"in e);if(s.length>0)return{error:s[0].error};let i=a.map(e=>"url"in e?e.url:""),o=a.map(e=>"path"in e?e.path:"");return{urls:i,paths:o}}catch(e){return console.error("Unexpected upload error:",e),{error:"An unexpected error occurred during upload."}}}async function c(e,a){try{let s=u(e);if(!s)return{success:!1,error:"Invalid image URL."};let l=r[a],{error:i}=await t.supabase.storage.from(l).remove([s]);if(i)return console.error("Delete error:",i),{success:!1,error:"Failed to delete image."};return{success:!0}}catch(e){return console.error("Unexpected delete error:",e),{success:!1,error:"An unexpected error occurred during deleti
6on."}}}async function d(e,a){try{let s=r[a],l=e.map(u).filter(Boolean);if(0===l.length)return{success:!1,error:"No valid image URLs provided."};let{error:i}=await t.supabase.storage.from(s).remove(l);if(i)return console.error("Delete error:",i),{success:!1,error:"Failed to delete images."};return{success:!0}}catch(e){return console.error("Unexpected delete error:",e),{success:!1,error:"An unexpected error occurred during deletion."}}}function u(e){try{let t=new URL(e).pathname.split("/object/public/");if(2!==t.length)return null;return t[1].split("/").slice(1).join("/")}catch(e){return console.error("Error extracting path from URL:",e),null}}function m(e,a){let s=r[a],{data:{publicUrl:l}}=t.supabase.storage.from(s).getPublicUrl(e);return l}function p(e,t={}){try{let r=new URL(e);if(!r.pathname.includes("/storage/v1/object/public/"))return e;let a=r.pathname.split("/storage/v1/object/public/");if(2!==a.length)return e;let[s,...l]=a[1].split("/"),i=l.join("/"),n=`${r.protocol}//${r.host}/storage/v1/render/image/public/${s}/${i}`,o=new URLSearchParams;t.width&&o.append("width",t.width.toString()),t.height&&o.append("height",t.height.toString()),t.quality&&o.append("quality",t.quality.toString()),t.resize&&o.append("resize",t.resize);let c=o.toString();return c?`${n}?${c}`:n}catch(t){return console.error("Error generating optimized image URL:",t),e}}async function h(e,a){try{let s=i(e);if(!s.valid)return{error:s.error};let{data:{user:l}}=await t.supabase.auth.getUser();if(!l)return{error:"You must be logged in to upload files."};let n=Date.now(),o=Math.random().toString(36).substring(2,15),c=e.name.split(".").pop(),d=`${a}/${l.id}/${n}-${o}.${c}`,u=r.CHAT_ATTACHMENTS,{data:m,error:p}=await t.supabase.storage.from(u).upload(d,e,{cacheControl:"3600",upsert:!1});if(p)return console.error("[Upload Debug] Upload error:",p),{error:`Failed to upload file: ${p.message}`};let{data:{publicUrl:h}}=t.supabase.storage.from(u).getPublicUrl(m.path);return{url:h,path:m.path,type:e.type}}catch(e){return console.error("Unexpected upload error:",e),{error:"An unexpected error occurred during upload."}}}async function f(e,a,s){try{let{data:{user:l}}=await t.supabase.auth.getUser();if(!l)return{error:"Not authenticated."};let i="image/png"===e.type?"png":"jpg",n=`${l.id}/${a}/${Date.now()}-${s}.${i}`,{data:o,error:c}=await t.supabase.storage.from(r.PET_BIOMETRICS).upload(n,e,{cacheControl:"3600",upsert:!1,contentType:e.type||"image/jpeg"});if(c)return{error:c.message};return{path:o.path}}catch(e){return{error:e instanceof Error?e.message:"Upload failed."}}}function x(e){return a.includes(e)}function g(e){return x(e)?"image":"application/pdf"===e?"pdf":e.startsWith("video/")?"video":"unknown"}e.s(["STORAGE_BUCKETS",0,r,"deleteImage",()=>c,"deleteMultipleImages",()=>d,"getFileTypeCategory",()=>g,"getOptimizedImageUrl",()=>p,"getPublicUrl",()=>m,"isImageType",()=>x,"uploadChatAttachment",()=>h,"uploadImage",()=>n,"uploadMultipleImages",()=>o,"uploadPetBiometricPhoto",()=>f,"validateChatAttachment",()=>i,"validateImageFile",()=>l])},651344,e=>{"use strict";var t=e.i(843476),r=e.i(657688),a=e.i(948148);function s({id:e,uploading:s,disabled:l=!1,multiple:i=!1,onChange:n,customText:o,showSubText:c=!1,subText:d,className:u="",iconSize:m=24,onDragOver:p,onDrop:h}){let f=(0,a.useTranslations)("imageUpload"),x=s?f("uploading"):o||f("clickToUpload");return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("input",{type:"file",accept:"image/*",multiple:i,onChange:n,className:"hidden",id:e,disabled:l||s}),(0,t.jsx)("label",{htmlFor:e,className:`p-2 block border border-gray200 rounded-lg flex items-center justify-center text-center hover:border-gray-400 transition-colors relative ${l||s?"opacity-50 pointer-events-none cursor-not-allowed":"cursor-pointer"} ${u}`,onDragOver:e=>{e.preventDefault(),e.stopPropagation(),p?.(e)},onDrop:t=>{if(t.preventDefault(),t.stopPropagation(),l||s)return;let r=t.dataTransfer?.files;if(r&&r.length>0){let t=document.getElementById(e);if(t){let e=new DataTransfer;Array.from(r).forEach(t=>{t.type.startsWith("image/")&&e.items.add(t)}),t.files=e.files;let a=new Event("change",{bubbles:!0});t.dispatchEvent(a)}}h?.(t)},children:(0,t.jsxs)("div",{className:"flex flex-col items-center",children:[(0,t.jsx)("div",{className:"w-10 h-10 border border-gray200 rounded-lg flex items-center justify-center mb-3",children:(0,t.jsx)(r.default,{src:"/icons/upload-icon.svg",alt:"Upload",width:20,height:20})}),(0,t.jsxs)("p",{className:"text-sm",children:[(0,t.jsx)("span",{className:"text-orange text-bodysm",style:{fontWeight:700},children:x}),!s&&!l&&(0,t.jsxs)("span",{className:"text-gray600 text-bodysm",children:[" ",f("orDragAndDrop")]})]}),c&&d&&(0,t.jsx)("p",{className:"text-bodyxs text-gray600 mt-1",children:d})]})})]})}e.s(["default",()=>s])},457619,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(618566),s=e.i(948148),l=e.i(749525),i=e.i(279567),n=e.i(234913),o=e.i(774175),c=e.i(707138),d=e.i(898886);e.i(659619);var u=e.i(998749),m=e.i(545828),p=e.i(773243),h=e.i(529710),f=e.i(969765),x=e.i(659544),g=e.i(829336),b=e.i(602178);let y={contacts:{feature:"contacts",trigger:"limit_reached"},contactsOverAllowance:{feature:"contacts",trigger:"limit_reached",gateId:"contacts_over_allowance"},reminders:{feature:"tasks",trigger:"hard_gate"},routine:{feature:"tasks",trigger:"hard_gate",gateId:"routine"},community:{feature:"community",trigger:"feature_action"},healthRecords:{feature:"health_records",trigger:"hard_gate"},familySharing:{feature:"family_sharing",trigger:"hard_gate"},scanHistory:{feature:"scan_history",trigger:"hard_gate"},locationSharing:{feature:"location_sharing",trigger:"hard_gate"},petLimit:{feature:"pet_limit",trigger:"limit_reached"},novaVet:{feature:"nova_vet",trigger:"hard_gate"},miloTrainer:{feature:"milo_trainer",trigger:"hard_gate"},inspectorCredits:{feature:"health_inspector",trigger:"limit_reached",gateId:"inspector_credits"},inspector:{feature:"health_inspector",trigger:"hard_gate"},customQr:{feature:"qr_tags",trigger:"feature_action",gateId:"custom_qr"},superId:{feature:"qr_tags",trigger:"feature_action",gateId:"superid"}},v={contacts:e=>e.contactLimit===1/0,contactsOverAllowance:e=>e.contactLimit===1/0,reminders:e=>e.reminders,routine:e=>e.reminders,community:e=>e.communityInteractions,healthRecords:e=>e.healthRecords,scanHistory:e=>e.scanHistory,locationSharing:e=>e.locationSharing,familySharing:e=>e.familySharing,petLimit:(e,t)=>
6t<e.petLimit,novaVet:e=>e.aiFeatureAccess,miloTrainer:e=>e.aiFeatureAccess,inspector:e=>e.aiFeatureAccess,inspectorCredits:()=>!1,customQr:e=>e.customQrTags,superId:e=>e.customQrTags};function j({isOpen:e,onClose:j,variant:w,description:_,quantity:N,onBack:k,dismissible:C=!0,zIndex:S,returnPath:T}){let L=(0,s.useTranslations)("modals.upgradeToCare"),P=(0,s.useTranslations)("plans.care"),E=(0,a.useRouter)(),{pets:A,activePet:M,subscription:D,subscriptionStatus:I}=(0,n.useAppContext)(),{data:B}=(0,o.useCarePrices)(),[O,F]=(0,r.useState)("annual"),[U,R]=(0,r.useState)(!1),z=B?.prices??[],$=(0,g.resolveCareCurrency)(z,B?.userCurrency),W=(0,b.snapPetStep)(N??A.length),[q,G]=(0,r.useState)(W);(0,r.useEffect)(()=>{e&&G(W)},[e]);let H=q>=b.PET_CAP,V=q>=b.MAX_PETS,{getPlanPrice:K}=(0,c.usePlanPricing)({prices:z,currency:$,billingCycle:O,quantity:q}),J=K(g.PAID),Q=(0,r.useMemo)(()=>(0,g.careAnnualSaving)(z,q,$),[z,q,$]),Z=null==J.amount?null:"annual"===O?J.amount/12:J.amount,Y=null==Z?"—":(0,h.formatPrice)(Z,$),X=null==J.amount,ee=v[w](I.capabilities,A.length),et=y[w],{trackDismissed:er,trackCtaClicked:ea}=(0,d.usePaywallTracking)({isOpen:e,isSuppressed:ee,feature:et.feature,trigger:et.trigger,currentTier:(0,u.analyticsPlanTier)(D),requiredTier:g.PAID,gateId:et.gateId??w});if((0,r.useEffect)(()=>{z.length>0&&!Q&&"annual"===O&&F("monthly")},[z.length]),ee)return null;let es=async()=>{if(ea(),!J.priceId||!M)return void E.push("/plan");R(!0),(0,m.track)("plan_selected",{plan:g.PAID,billing_cycle:O,surface:"upgrade_modal",price:J.amount??void 0});try{let e=T??`${window.location.pathname}${window.location.search}`,t=await (0,p.createCheckoutSession)([{petId:M.id,priceId:J.priceId}],{success:"/plan?session_id={CHECKOUT_SESSION_ID}",cancel:e},void 0,q);if(t.error||!t.url)throw Error(t.error||"No checkout URL");window.location.href=t.url}catch(e){console.error("[UpgradeToCareModal] Checkout error:",e),(0,f.showToast)({title:e instanceof Error?e.message:L("checkoutFailed"),type:"error"}),R(!1)}};return(0,t.jsx)(l.default,{isOpen:e,onClose:C?j:()=>{},dismissible:C,className:"!max-w-[420px]",zIndex:S,children:(0,t.jsxs)("div",{className:"max-w-[420px] p-6",children:[C?(0,t.jsx)(i.default,{onClose:j,children:(0,t.jsx)(g.Pill,{className:"bg-lilac-50 text-lilac-950",children:P("careName")})}):(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(g.Pill,{className:"bg-lilac-50 text-lilac-950",children:P("careName")})}),(0,t.jsx)("h2",{className:"mb-1.5 text-[16px] !font-bold text-dark-black",children:L(`${w}.title`)}),(0,t.jsx)("p",{className:"text-bodymd text-gray-600",children:_||L(`${w}.description`)}),(0,t.jsxs)("div",{className:"mt-5 rounded-2xl border border-light-grey bg-white p-5",children:[(0,t.jsxs)("div",{className:"flex items-baseline gap-[7px]",children:[(0,t.jsx)("span",{className:"font-bricolage text-[40px] font-semibold leading-none tracking-[-0.035em] tabular-nums text-dark-black",children:Y}),(0,t.jsx)("span",{className:"pb-[3px] text-sm text-gray-500",children:P("perMonth")})]}),(0,t.jsx)("p",{className:"mt-1.5 min-h-5 text-[13px] text-gray-500",children:"annual"===O&&null!=J.amount?(0,t.jsxs)(t.Fragment,{children:[P("billedYearly",{total:(0,h.formatPrice)(J.amount,$)})," ",Q&&(0,t.jsx)("b",{className:"font-semibold text-brand-950",children:P("youSave",{amount:(0,h.formatPrice)(Q.amount,$)})})]}):P("billedMonthly")}),(0,t.jsx)(g.CycleSwitch,{value:O,onChange:F,savePercent:Q?.percent??null,labels:{monthly:P("cycleMonthly"),annual:P("cycleYearly"),save:e=>P("savePercent",{percent:e})}}),(0,t.jsx)(g.PetStepper,{pets:q,max:b.MAX_PETS,onChange:G,label:V?P("unlimitedPets"):P("petCount",{count:q}),unlimited:V,note:V?P("unlimitedNote"):H?P("capReached"):P("capExplainer"),noteTone:H?"good":"muted",decreaseLabel:P("removePet"),increaseLabel:P("addPet")}),(0,t.jsx)(g.Divider,{}),(0,t.jsx)(g.SummaryHeading,{children:P("everythingInFreePlus")}),(0,t.jsx)(g.SummaryGroups,{groups:P.raw("careSummaryGroups").slice(0,2)})]}),(0,t.jsxs)("div",{className:"mt-5 flex flex-col-reverse gap-3 min-[400px]:flex-row min-[400px]:justify-end",children:[(0,t.jsx)(x.default,{type:"button",variant:"secondary",size:"lg",onClick:()=>{er(),k&&k(),j()},className:"w-full min-[400px]:w-auto",children:L("back")}),(0,t.jsx)(x.default,{type:"button",variant:"primary",size:"lg",onClick:es,disabled:U||X,isLoading:U,className:"w-full min-[400px]:w-auto",children:U?P("processing"):L("cta")})]}),(0,t.jsx)("p",{className:"mt-2.5 text-center text-[12.5px] text-gray-500",children:L("finePrint")})]})})}e.s(["default",()=>j])},309127,e=>{"use strict";var t=e.i(843476),r=e.i(975157);function a({children:e,className:a}){return(0,t.jsx)("div",{className:(0,r.cn)("md:flex gap-3",a),children:e})}e.s(["default",()=>a])},645127,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(657688),s=e.i(948148),l=e.i(749525),i=e.i(6
659544),n=e.i(636817),o=e.i(603622),c=e.i(358594);function d({isOpen:e,onClose:n,onAccept:o,onDecline:d,isLoading:u=!1,isDeclining:m=!1,lifetimePrice:p="£39.99"}){let h=(0,s.useTranslations)("modals.lifetimeOffer"),f=(0,s.useTranslations)("common.actions"),[x,g]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(e){g(!0);let e=setTimeout(()=>g(!1),3e3);return()=>clearTimeout(e)}},[e]),(0,t.jsx)(l.default,{isOpen:e,onClose:n,dismissible:!u&&!m,className:"max-w-[480px] w-full",children:(0,t.jsxs)("div",{className:"p-6",children:[(0,t.jsx)("button",{onClick:n,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 transition-colors","aria-label":"Close modal",disabled:u||m,children:(0,t.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,t.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),(0,t.jsx)("div",{className:"mb-4 flex justify-start",children:(0,t.jsx)("div",{className:"w-12 h-12 rounded-[10px] border border-[#D7D3D0] bg-white flex items-center justify-center",children:(0,t.jsx)(a.default,{src:"/icons/gift-icon.svg",alt:"Gift",width:24,height:24})})}),(0,t.jsx)("h2",{className:"mb-2 !font-bold text-dark-black",style:{fontFamily:"var(--font-dm-sans), DM Sans, sans-serif",fontSize:"16px",lineHeight:"24px",letterSpacing:"0%"},children:h("title")}),(0,t.jsx)("p",{className:"text-bodymd mb-6 text-hard-green-700",children:h("description1")}),(0,t.jsx)("p",{className:"text-bodymd mb-6 text-hard-green-700",children:h("description2")}),(0,t.jsxs)("div",{className:"border border-[#E7E5E4] rounded-xl p-4 flex gap-3 mb-6",children:[(0,t.jsx)("div",{className:"flex-shrink-0 mt-0.5",children:(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M8.00016 5.33337V8.00004M8.00016 10.6667H8.00683M14.6668 8.00004C14.6668 11.6819 11.6821 14.6667 8.00016 14.6667C4.31826 14.6667 1.3335 11.6819 1.3335 8.00004C1.3335 4.31814 4.31826 1.33337 8.00016 1.33337C11.6821 1.33337 14.6668 4.31814 14.6668 8.00004Z",stroke:"#F59E0B",strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"})})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{style:{fontWeight:700,fontSize:"14px",lineHeight:"20px",color:"#1C1917"},children:h("warningTitle")}),(0,t.jsx)("p",{className:"text-bodysm text-hard-green mt-0.5",children:h("warningDesc")})]})]}),(0,t.jsxs)("div",{className:"border-t border-b border-gray-200 py-6 text-center mb-6",children:[(0,t.jsx)("div",{style:{fontFamily:"var(--font-bricolage-grotesque), Bricolage Grotesque, sans-serif",fontWeight:600,fontSize:"clamp(36px, 5vw, 48px)",lineHeight:"1.25",letterSpacing:"-0.04em",textAlign:"center",color:"#1C1917"},children:h("oneOff",{price:p})}),(0,t.jsx)("div",{style:{fontFamily:"var(--font-bricolage-grotesque), Bricolage Grotesque, sans-serif",fontWeight:600,fontSize:"clamp(36px, 5vw, 48px)",lineHeight:"1.25",letterSpacing:"-0.04em",textAlign:"center",color:"#1C1917",marginTop:"-8px"},children:h("noSubscription")})]}),(0,t.jsxs)("div",{className:"flex flex-col min-[431px]:flex-row gap-3 min-[431px]:justify-end",children:[(0,t.jsx)(i.default,{variant:"secondary",onClick:d,className:"w-full min-[431px]:w-auto order-2 min-[431px]:order-1 !border-0 shadow-none hover:shadow-none",disabled:u||x||m,isLoading:m,children:m?"":x?(0,t.jsx)(c.default,{size:"sm"}):h("noThanks")}),(0,t.jsx)(i.default,{variant:"primary",onClick:o,className:"w-full min-[431px]:w-auto order-1 min-[431px]:order-2",isLoading:u,disabled:u||m,children:u?"":f("confirm")})]})]})})}var u=e.i(95187);let m=(0,u.createServerReference)("7e95f3e8053835c4b5c7da475f75c1c63a6ecfbb5d",u.callServer,void 0,u.findSourceMapURL,"cancelSubscription"),p=(0,u.createServerReference)("707a9058e9e9deabd7ec0f3b6594b3c5506d082714",u.callServer,void 0,u.findSourceMapURL,"applyRetentionDiscount"),h=(0,u.createServerReference)("7018ece2cf7c2250cc395a8311be8a16b13969df62",u.callServer,void 0,u.findSourceMapURL,"applyHalfPriceDiscount"),f=(0,u.createServerReference)("70caae9cb75f0055cb7f2e68ae92210f60e3f44b4f",u.callServer,void 0,u.findSourceMapURL,"createLifetimeCheckoutSession"),x=(0,u.createServerReference)("0081d7c69c73974d607647839522dcb840c9a47db4",u.callServer,void 0,u.findSourceMapURL,"getLifetimePrice
6s");var g=e.i(969765),b=e.i(975157),y=e.i(529710),v=e.i(19477);e.i(659619);var j=e.i(545828),w=e.i(998749),_=e.i(234913);let N=["offer","half_price_offer","final_offer"];function k({isOpen:e,onClose:c,subscriptionId:u,provider:k="stripe",petName:C,onCancelSuccess:S,deletePetContext:T=!1,onProceedToDelete:L,currentPeriodEnd:P,status:E,onFreeTag:A,surface:M="unknown"}){let D=(0,s.useTranslations)("modals.cancelSubscription"),I=(0,s.useTranslations)("common.actions"),{userProfile:B,subscription:O}=(0,_.useAppContext)(),[F,U]=(0,r.useState)("reason"),[R,z]=(0,r.useState)(""),[$,W]=(0,r.useState)(""),[q,G]=(0,r.useState)(""),[H,V]=(0,r.useState)(!1),[K,J]=(0,r.useState)(null),[Q,Z]=(0,r.useState)(null),[Y,X]=(0,r.useState)("£19.99"),[ee,et]=(0,r.useState)("GBP"),er=(0,r.useRef)(!1),ea=(0,r.useRef)(new Set),es=(0,r.useRef)(!1);(0,r.useEffect)(()=>{if(!e){er.current=!1,ea.current=new Set,es.current=!1;return}er.current||(er.current=!0,(0,j.track)("cancellation_flow_started",{plan_tier:(0,w.analyticsPlanTier)(O),surface:M}))},[e,O,M]),(0,r.useEffect)(()=>{e&&N.includes(F)&&(ea.current.has(F)||(ea.current.add(F),(0,j.track)("cancellation_offer_shown",{offer:F})))},[e,F]);let el=()=>{es.current||(0,j.track)("cancellation_abandoned",{last_step:F}),c()};(0,r.useEffect)(()=>{async function t(){try{let{userCurrency:e,prices:t}=await x();et(e);let r=t.filter(e=>e.productName?.toLowerCase().includes("lifetime")||"prod_Tw0Wawym7vBQpS"===e.product).filter(t=>t.currency===e.toLowerCase()),a=r.find(e=>e.isDefaultPrice)??r[0];a&&a.amount&&(Z(a.id),X((0,y.formatPrice)(a.amount,e)))}catch(e){console.error("Failed to fetch lifetime prices:",e)}}e&&t()},[e]);let ei=[{value:"lost_tag",label:D("reasons.lostTag")},{value:"engraved_tag",label:D("reasons.engravedTag")},{value:"cant_afford",label:D("reasons.cantAfford")},{value:"other",label:D("reasons.other")}],en=()=>
6{if(R)switch(R){case"lost_tag":es.current=!0,c(),A?.();break;case"engraved_tag":case"cant_afford":case"other":U("offer")}},eo=async()=>{V(!0);try{let e=await m(u,R,$||void 0,k);if(e.success){let t="cancelAt"in e&&e.cancelAt?new Date(e.cancelAt):new Date;J(t),U("confirm_downgrade"),es.current=!0,(0,j.track)("subscription_cancelled",{reason:R,has_other_reason:!!$,plan_tier:(0,w.analyticsPlanTier)(O),provider:k}),(0,v.trackCancelSubscription)(u,C,"other"===R?$:R),"analytics"in e&&e.analytics&&(0,v.trackSubscriptionCancelled)(e.analytics),S?.()}else{let t="error"in e?e.error:"Failed to cancel subscription";(0,g.showToast)({title:t||D("failedToCancel"),type:"error"})}}catch(e){(0,g.showToast)({title:D("unexpectedError"),type:"error"})}finally{V(!1)}},ec=async()=>{V(!0);try{let e=await p(u,k);if("alreadyCancelled"in e&&e.alreadyCancelled){J(null),U("confirm_downgrade"),es.current=!0,S?.();return}let t="error"in e?e.error:void 0;"success"in e&&e.success?(es.current=!0,(0,j.track)("cancellation_offer_accepted",{offer:"offer"}),(0,g.showToast)({title:D("discountApplied"),description:D("discountAppliedDesc"),type:"success"}),S?.(),c()):((0,g.showToast)({title:t||D("failedToApplyOffer"),type:"error"}),t?.includes("already been applied")&&setTimeout(()=>c(),2e3))}catch(e){(0,g.showToast)({title:D("unexpectedError"),type:"error"})}finally{V(!1)}},ed=async()=>{V(!0);try{let e=await h(u,k);if("alreadyCancelled"in e&&e.alreadyCancelled){J(null),U("confirm_downgrade"),es.current=!0,S?.();return}let t="error"in e?e.error:void 0;"success"in e&&e.success?(es.current=!0,(0,j.track)("cancellation_offer_accepted",{offer:"half_price_offer"}),(0,g.showToast)({title:D("discountApplied"),description:D("discountAppliedDesc"),type:"success"}),S?.(),c()):((0,g.showToast)({title:t||D("failedToApplyOffer"),type:"error"}),t?.includes("already been applied")&&setTimeout(()=>c(),2e3))}catch(e){(0,g.showToast)({title:D("unexpectedError"),type:"error"})}finally{V(!1)}},eu=async()=>{if(!Q)return void(0,g.showToast)({title:D("lifetimePricingError"),description:D("lifetimePricingErrorDesc"),type:"error"});V(!0);try{let e=await f(Q,{success:"/?payment_success=true",cancel:"/?payment_cancelled=true"});e.error?(0,g.showToast)({title:e.error,type:"error"}):e.url&&(es.current=!0,(0,j.track)("cancellation_offer_accepted",{offer:"final_offer"}),window.location.href=e.url)}catch(e){(0,g.showToast)({title:D("unexpectedError"),type:"error"})}finally{V(!1)}};return e||"reason"===F||setTimeout(()=>{U("reason"),z(""),W(""),G("")},300),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.default,{isOpen:e&&"final_offer"!==F,onClose:el,children:(()=>{switch(F){case"reason":return(0,t.jsxs)("div",{className:"p-6 max-w-[400px]",children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-4",children:[(0,t.jsx)("div",{className:"",children:(0,t.jsx)(a.default,{src:"/images/dashboardicons/sadface.svg",width:48,height:48,alt:"Sad face"})}),(0,t.jsx)("button",{onClick:el,className:"text-gray-400 hover:text-gray-600",children:(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),(0,t.jsx)("h2",{className:"text-bodymd !font-bold text-dark-black mb-2",children:D("reasonForCancelling")}),(0,t.jsx)("p",{className:"text-bodymd text-hard-green mb-6",children:D("reasonPlaceholder")}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(o.default,{label:D("reasonSelectLabel"),placeholder:D("reasonSelectPlaceholder"),options:ei,value:R,onChange:z}),"other"===R&&(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-bodysm !font-bold text-hard-green-700 mb-1.5",children:[D("otherReasonLabel")," ",(0,t.jsx)("span",{className:"required-asterisk",children:"*"})]}),(0,t.jsx)("textarea",{value:$,onChange:e=>W(e.target.value),placeholder:D("otherReasonPlaceholder"),className:(0,b.cn)("flex w-full rounded-lg border border-gray300 bg-white px-[14px] py-[10px] text-bodymd text-forest placeholder:text-gray400 shadow-[0_1px_2px_0_rgba(10,13,18,0.05)] focus:outline-none focus:ring-2 focus:ring-orange/20 focu
6s:border-orange transition-all duration-200 ease-in-out","min-h-[100px] resize-none")})]})]}),(0,t.jsxs)("div",{className:"flex gap-3 mt-8",children:[(0,t.jsx)(i.default,{variant:"secondary",onClick:el,className:"flex-1",children:I("cancel")}),(0,t.jsx)(i.default,{variant:"primary",onClick:en,disabled:!R||"other"===R&&!$,className:"flex-1",children:I("continue")})]})]});case"offer":return(0,t.jsxs)("div",{className:"p-6 max-w-[480px]",children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-4",children:[(0,t.jsx)("div",{className:"",children:(0,t.jsx)(a.default,{src:"/images/dashboardicons/monthsfreetrue.svg",width:48,height:48,alt:"Offer"})}),(0,t.jsx)("button",{onClick:el,className:"text-gray-400 hover:text-gray-600",children:(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),(0,t.jsx)("h2",{className:"text-bodymd !font-bold text-dark-black mb-2",children:D("keepSubscriptionTitle")}),(0,t.jsx)("p",{className:"text-bodymd text-hard-green mb-4",children:D("keepSubscriptionDesc")}),(0,t.jsx)("p",{className:"text-bodymd text-hard-green mb-6",children:D("keepSubscriptionDesc2")}),(0,t.jsx)("div",{className:"border-t border-b border-gray-200 py-8 text-center mb-8",children:(0,t.jsx)("span",{style:{fontFamily:"var(--font-bricolage-grotesque), Bricolage Grotesque, sans-serif",fontWeight:600,color:"#44403C"},className:"text-[32px] md:text-[48px] leading-tight tracking-[-0.02em] md:tracking-[-0.04em]",children:D("twoMonthsFree")})}),(0,t.jsxs)("div",{className:"flex gap-3 justify-end",children:[(0,t.jsx)(i.default,{variant:"secondary",onClick:()=>U("half_price_offer"),disabled:H,className:"!border-0 shadow-none hover:shadow-none",children:D("noThanks")}),(0,t.jsx)(i.default,{variant:"primary",onClick:ec,disabled:H,children:H?D("applying"):I("confirm")})]})]});case"half_price_offer":return(0,t.jsxs)("div",{className:"p-6 max-w-[480px]",children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-4",children:[(0,t.jsx)("div",{className:"w-12 h-12 rounded-[10px] border border-[#D7D3D0] bg-white flex items-center justify-center",children:(0,t.jsx)(a.default,{src:"/icons/sale-icon.svg",width:24,height:24,alt:"Sale"})}),(0,t.jsx)("button",{onClick:el,className:"text-gray-400 hover:text-gray-600",children:(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),(0,t.jsx)("h2",{className:"text-bodymd !font-bold text-dark-black mb-2",children:D("halfPriceTitle")}),(0,t.jsx)("p",{className:"text-bodymd text-hard-green mb-4",children:D("halfPriceDesc")}),(0,t.jsx)("p",{className:"text-bodymd text-hard-green mb-6",children:D("halfPriceDesc2")}),(0,t.jsx)("div",{className:"border-t border-b border-gray-200 py-8 text-center mb-8",children:(0,t.jsx)("span",{style:{fontFamily:"var(--font-bricolage-grotesque), Bricolage Grotesque, sans-serif",fontWeight:600,color:"#44403C",whiteSpace:"pre-line"},className:"text-[32px] md:text-[48px] leading-tight tracking-[-0.02em] md:tracking-[-0.04em]",children:D("halfPriceBadge")})}),(0,t.jsxs)("div",{className:"flex gap-3 justify-end",children:[(0,t.jsx)(i.default,{variant:"secondary",onClick:()=>U("final_offer"),disabled:H,className:"!border-0 shadow-none hover:shadow-none",children:D("noThanks")}),(0,t.jsx)(i.default,{variant:"primary",onClick:ed,disabled:H,children:H?D("halfPriceApplying"):I("confirm")})]})]});case"final_offer":return null;case"confirm_email":let e=q.toLowerCase().trim()===B?.email?.toLowerCase().trim();return(0,t.jsxs)("div",{className:"p-6 max-w-[400px]",children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-4",children:[(0,t.jsx)("div",{className:"",children:(0,t.jsx)(a.default,{src:"/images/dashboardicons/sadface.svg",width:48,height:48,alt:"Sad face"})}),(0,t.jsx)("button",{onClick:el,className:"text-gray-400 hover:text-gray-600",children:(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),(0,t.jsx)("h2",{className:"text-bodymd !font-bold text-dark-black mb-2",children:D("confirmEmailTitle")}),(0,t.jsx)("p",{className:"text-bodymd text-hard-green mb-6",children:D("confirmEmailDescription")}),(0,t.jsx)(n.default,{label:D("confirmEmailLabel"),type:"email",value:q,onChange:e=>G(e.target.value),placeholder:D("confirmEmailPlaceholder"),error:q.length>0&&!e?D("confirmEmailError"):void 0}),(0,t.jsxs)("div",{className:"flex gap-3 mt-8",children:[(0,t.jsx)(i.default,{variant:"secondary",onClick:el,className:"flex-1",children:D("keepPlan")}),(0,t.jsx)(i.default,{variant:"primary",onClick:eo,disabled:!e||H,className:"flex-1",children:H?D("cancellingBtn"):D("cancelPlanBtn")})]})]});case"confirm_downgrade":return(0,t.jsxs)("div",{className:"p-6 max-w-[400px]",children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-4",children:[(0,t.jsx)("div",{className:"",children:(0,t.jsx)(a.default,{src:"/images/dashboardicons/paymentcheck.svg",width:48,height:48,alt:"Check"})}),(0,t.jsx)("button",{onClick:el,className:"text-gray-400 hover:text-gray-600",children:(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),(0,t.jsx)("h2",{className:"text-bodymd !font-bold text-dark-black mb-2",children:T?D("subscriptionCancelledTitle"):D("downgradedToFreeTitle")}),(0,t.jsx)("p",{className:"text-bodymd text-hard-green mb-6",children:T?(0,t.jsxs)(t.Fragment,{children:[D("subscriptionCancelledDesc"),(0,t.jsx)("br",{}),D("planBenefitsEnd",{date:K?K.toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric"}):""}),(0,t.jsx)("br",{}),(0,t.jsx)("br",{}),D("proceedToDelete",{petName:C})]}):null===K?(0,t.jsx)(t.Fragment,{children:D("profileDowngraded")}):(0,t.jsxs)(t.Fragment,{children:[D("profileScheduledDowngrade"),(0,t.jsx)("br",{}),D("planBenefitsEnd",{date:K.toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric"})})]})}),T?(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)(i.default,{variant:"secondary",onClick:el,className:"flex-1",children:I("cancel")}),(0,t.jsx)(i.default,{variant:"primary",onClick:()=>{L?.(),c()},className:"flex-1",children:D("proceedToDeleteBtn")})]}):(0,t.jsx)(i.default,{variant:"primary",onClick:el,className:"w-full",children:I("close")})]})}})()}),(0,t.jsx)(d,{isOpen:e&&"final_offer"===F,onClose:el,onAccept:eu,onDecline:()=>U("confirm_email"),isLoading:H,lifetimePrice:Y})]})}e.s(["default",()=>
6k],645127)}]);
7
8//# debugId=9787e3cb-a79b-bc20-77a7-c02e1fd01a08

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.