PageSourceSearch

https://barbersnetwork.com/_next/static/chunks/5845d9e6f2dfddfe.js

js barbersnetwork.com collected 2026-10-02 01:24:17 UTC 25,874 bytes, 4 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]="c9886cf4-94b6-06b7-be5e-377852705b83")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,447941,e=>{"use strict";let t=(0,e.i(625792).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",()=>t],447941)},835279,e=>{"use strict";var t=e.i(139906);function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var s in l)Object.prototype.hasOwnProperty.call(l,s)&&(e[s]=l[s])}return e}).apply(this,arguments)}var s=function(e){var l=(0,t.useRef)(e);return l.current=e,l},a=function(e,t){var l;return function(){for(var s=this,a=arguments.length,r=Array(a),n=0;n<a;n++)r[n]=arguments[n];null!==l&&(clearTimeout(l),l=null),l=setTimeout(function(){return e.apply(s,r)},t)}},r=function(e){var r=void 0===e?{}:e,n=r.requestOptions,o=r.debounce,i=r.cache,d=void 0===i?86400:i,c=r.cacheKey,u=void 0===c?"upa":c,p=r.googleMaps,x=r.callbackName,m=r.defaultValue,h=r.initOnMount,f=void 0===h||h,g=(0,t.useState)(!1),y=g[0],_=g[1],b=(0,t.useState)(void 0===m?"":m),v=b[0],j=b[1],w=(0,t.useState)({loading:!1,status:"",data:[]}),S=w[0],N=w[1],F=(0,t.useRef)(),k=s(n),A=s(p),C=(0,t.useCallback)(function(){if(!F.current){var e,t=window.google,l=A.current,s=(null==l?void 0:l.places)||(null==t||null==(e=t.maps)?void 0:e.places);if(!s)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");F.current=new s.AutocompleteService,_(!0)}},[A]),z=(0,t.useCallback)(function(){N({loading:!1,status:"",data:[]})},[]),E=(0,t.useCallback)(function(e){void 0===e&&(e=u);try{sessionStorage.removeItem(e)}catch(e){}},[u]),B=(0,t.useCallback)(a(function(e){if(!e)return void z();N(function(e){return l({},e,{loading:!0})});var t,s={};try{s=JSON.parse(sessionStorage.getItem(u)||"{}")}catch(e){}d&&(s=Object.keys(s).reduce(function(e,t){return s[t].maxAge-Date.now()>=0&&(e[t]=s[t]),e},{}))[e]?N({loading:!1,status:"OK",data:s[e].data}):null==(t=F.current)||t.getPlacePredictions(l({},k.current,{input:e}),function(t,l){if(N({loading:!1,status:l,data:t||[]}),d&&"OK"===l){s[e]={data:t,maxAge:Date.now()+1e3*d};try{sessionStorage.setItem(u,JSON.stringify(s))}catch(e){}}})},void 0===o?200:o),[d,u,z,k]),L=(0,t.useCallback)(function(e,t){void 0===t&&(t=!0),j(e),F.current&&t&&B(e)},[B]);return(0,t.useEffect)(function(){if(!f)return function(){return null};var e=window.google;return A.current||null!=e&&e.maps||!x?C():window[x]=C,function(){window[x]&&delete window[x]}},[x,A,C,f]),{ready:y,value:v,suggestions:S,setValue:L,clearSuggestions:z,clearCache:E,init:C}},n=function(e){var t=new window.google.maps.Geocoder;return new Promise(function(l,s){t.geocode(e,function(t,a){"OK"!==a&&s(a),!e.address&&e.componentRestrictions&&(console.error("💡 use-places-autocomplete: Please provide an address when using getGeocode() with the componentRestrictions."),l(t)),l(t)})})},o=function(e){var t=e.geometry.location,l=t.lat,s=t.lng;return{lat:l(),lng:s()}};e.s(["default",()=>r,"getGeocode",()=>n,"getLatLng",()=>o])},609984,e=>{"use strict";let t=(0,e.i(625792).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",()=>t],609984)},936377,980781,e=>{"use strict";var t=e.i(280331),l=e.i(139906),s=e.i(423280);e.i(674817);var a=e.i(46268),a=a,r=e.i(732540),r=r,n=e.i(277167),n=n,o=e.i(264844),o=o,i=e.i(447941),d=e.i(464627),c=e.i(584724),u=e.i(609984),p=e.i(835279),x=e.i(209032),m=e.i(144710),h=e.i(10468),f=e.i(412711),g=e.i(364032),y=e.i(137414);let _=["address_line_1","address_line_2","city","state","zip_code","country","building_and_floor","landmark","type","zip_place_id","city_place_id","county_place_id","state_place_id","country_place_id"];function b(e){let t={...e};for(let e of _)e in t&&null===t[e]&&(t[e]="");return t}let v=async(e=1,t=10)=>(await y.default.get("/auth/customer-address/",{params:{page:e,limit:t}})).data,j=async e=>(await y.default.post("/auth/customer-address/",b(e))).data,w=async(e,t)=>(await y.default.patch(`/auth/customer-address/${e}/`,b(t))).data,S=async e=>{await y.default.delete(`/auth/customer-address/${e}/`)};var N=e.i(131217),F=e.i(397286),k=e.i(538036);let A=async()=>{let e=await y.default.get("/address-label/",{skipAuthRefresh:!0});return e.data?.results??[]};var C=e.i(540031),z=e.i(945994);let E=(e=!0)=>(0,N.useQuery)({queryKey:["address-labels"],queryFn:()=>A(),staleTime:18e5,gcTime:36e5,enabled:e});e.s(["useAddressLabels",0,E,"useAddresses",0,(e=1,t=10)=>(0,N.useQuery)({queryKey:["addresses",e,t],queryFn:()=>v(e,t)}),"useCreateAddress",0,()=>{let e=(0,k.useQueryClient)();return(0,F.useMutation)({mutationFn:e=>j(e),onSuccess:()=>
2{e.invalidateQueries({queryKey:["addresses"]}),C.toast.success(z.strings.address.saveSuccess)},onError:()=>{C.toast.error(z.strings.address.saveFailed)}})},"useDeleteAddress",0,()=>{let e=(0,k.useQueryClient)();return(0,F.useMutation)({mutationFn:e=>S(e),onSuccess:()=>{e.invalidateQueries({queryKey:["addresses"]}),C.toast.success(z.strings.address.deleteSuccess)},onError:()=>{C.toast.error(z.strings.address.deleteFailed)}})},"useUpdateAddress",0,()=>{let e=(0,k.useQueryClient)();return(0,F.useMutation)({mutationFn:({id:e,payload:t})=>w(e,t),onSuccess:()=>{e.invalidateQueries({queryKey:["addresses"]}),C.toast.success(z.strings.address.updateSuccess)},onError:()=>{C.toast.error(z.strings.address.updateFailed)}})}],980781);var B=e.i(781432),L=e.i(899696);let T={width:"100%",height:"100%"},O={disableDefaultUI:!0,zoomControl:!1};function M({isOpen:e,onClose:y,onConfirm:_,initialAddress:b="",initialAddressLine1:S="",initialAddressLine2:N="",initialCity:F=null,initialState:k=null,initialZipCode:A=null,initialCountry:M=null,initialLat:$=37.3382,initialLng:R=-121.8863,initialType:P,initialDynamicValues:K,startInEditStep:q=!1,embedded:G=!1,persistOnConfirm:Q=!0,showSavedAddresses:D=!0,onKeepCurrentAddress:H}){let{navigateTo:I}=(0,x.useAppNavigation)(),U=(0,m.useGoogleMapsLoaded)(),[Y,J]=(0,l.useState)(!1),V=(0,l.useRef)(null),X=(0,l.useRef)(null),{setLocation:Z,setTimezone:W,label:ee,address_line_2:et,address_line_1:el,city:es,state:ea,zip_code:er,country:en}=(0,f.useLocationStore)(),[eo,ei]=(0,l.useState)("select"),{accessToken:ed}=(0,f.useAuthStore)(),[ec,eu]=(0,l.useState)([]),[ep,ex]=(0,l.useState)(!1),[em,eh]=(0,l.useState)({address:b,id:"",address_line_1:S,address_line_2:N,city:F,state:k,zip_code:A,country:M,lat:$,lng:R,zip_place_id:null,city_place_id:null,county_place_id:null,state_place_id:null,country_place_id:null}),{data:ef,isLoading:eg}=E(e),ey=ef??[],[e_,eb]=(0,l.useState)(""),ev=ey.find(e=>e.key===e_)??null,[ej,ew]=(0,l.useState)({}),[eS,eN]=(0,l.useState)({}),[eF,ek]=(0,l.useState)(320),[eA,eC]=(0,l.useState)(!1),[ez,eE]=(0,l.useState)(!1),[eB,eL]=(0,l.useState)(!1),eT=(0,l.useCallback)(async()=>{if(ed&&D&&!ep){ex(!0);try{let e=await v(1,20);eu(e.results)}catch(e){console.error("Failed to fetch addresses:",e)}finally{ex(!1)}}},[ed,D]);(0,l.useEffect)(()=>{let t=!0;return e&&ed&&D&&t&&eT(),()=>{t=!1}},[e,!!ed,D]);let eO=(0,l.useRef)(0),eM=(0,l.useRef)(0),{value:e$,suggestions:{status:eR,data:eP},setValue:eK,clearSuggestions:eq,init:eG}=(0,p.default)({initOnMount:!1,debounce:300});(0,l.useEffect)(()=>{U&&e&&eG()},[U,e,eG]),(0,l.useEffect)(()=>{if(e){document.activeElement instanceof HTMLElement&&document.activeElement.blur();let e=setTimeout(()=>{J(!0),eh({address:b||"",id:"",address_line_1:S||(G?"":el)||"",address_line_2:N||(G?"":et)||"",city:F??(G?null:es),state:k??(G?null:ea),zip_code:A??(G?null:er),country:M??(G?null:en),lat:$,lng:R,zip_place_id:null,city_place_id:null,county_place_id:null,state_place_id:null,country_place_id:null});let e=!!H&&!!(S||F||b);ei(q?"edit":ed||e?"select":"edit"),ew(K?{...K}:{}),eN({}),eb(""),ek(320),eK("",!1),eq()},10);return G||(document.body.style.overflow="hidden"),()=>{clearTimeout(e),document.body.style.overflow=""}}{let e=setTimeout(()=>J(!1),300);return document.body.style.overflow="",()=>clearTimeout(e)}},[e]),(0,l.useEffect)(()=>{e&&0!==ey.length&&eb(e=>{if(e&&ey.some(t=>t.key===e))return e;let t=(P??ee??"").toString().trim().toLowerCase();return(ey.find(e=>e.key.toLowerCase()===t||e.label.toLowerCase()===t)??ey[0]).key})},[e,ey.length,e_]);let eQ=async e=>{eK(e,!1),eq();try{let t=await (0,p.getGeocode)({address:e}),{lat:l,lng:s}=await (0,p.getLatLng)(t[0]),{addressLine1:a,subpremise:r,city:n,state:o,zipCode:i,country:d,zipPlaceId:c,cityPlaceId:u,countyPlaceId:x,statePlaceId:m,countryPlaceId:h}=(0,L.parseAddressFromResults)(t);eh({address:e,id:"",address_line_1:a,address_line_2:r,city:n,state:o,zip_code:i,country:d,lat:l,lng:s,zip_place_id:c,city_place_id:u,county_place_id:x,state_place_id:m,country_place_id:h}),V.current?.panTo({lat:l,lng:s}),ek(320)}catch(e){console.error(e)}},eD=async()=>
2{if(!V.current)return;let e=V.current.getCenter();if(!e)return;let t=e.lat(),l=e.lng();try{let e=await (0,p.getGeocode)({location:{lat:t,lng:l}});if(e[0]){let{addressLine1:s,subpremise:a,city:r,state:n,zipCode:o,country:i,zipPlaceId:d,cityPlaceId:c,countyPlaceId:u,statePlaceId:p,countryPlaceId:x}=(0,L.parseAddressFromResults)(e);eh({address:e[0].formatted_address,id:"",address_line_1:s,address_line_2:a,city:r,state:n,zip_code:o,country:i,lat:t,lng:l,zip_place_id:d,city_place_id:c,county_place_id:u,state_place_id:p,country_place_id:x})}}catch(e){console.error(e)}},eH=()=>{ew({}),eN({}),G&&eh({address:"",id:"",address_line_1:"",address_line_2:"",city:null,state:null,zip_code:null,country:null,lat:$,lng:R,zip_place_id:null,city_place_id:null,county_place_id:null,state_place_id:null,country_place_id:null})},eI=async()=>{if(eB)return;let e=ev?.fields??[],t={};if(e.forEach(e=>{e.is_required&&!(ej[e.key]??"").trim()&&(t[e.key]=B.componentStrings.locationSheet.requiredFieldError(e.label))}),Object.keys(t).length>0)return void eN(t);let l=ev?.key||e_||ey[0]?.key||"",s={};e.forEach(e=>{s[e.key]=(ej[e.key]??"").trim()});let a=(0,L.deriveAddressLineFromFormatted)(em.address,em.city)||em.address_line_1||em.city||"";if(ed&&Q&&em.lat&&em.lng){eL(!0);try{await j({address_line_1:a,address_line_2:"",city:em.city,state:em.state,zip_code:em.zip_code,country:em.country,latitude:parseFloat(em.lat.toFixed(6)),longitude:parseFloat(em.lng.toFixed(6)),zip_place_id:em.zip_place_id,city_place_id:em.city_place_id,county_place_id:em.county_place_id,state_place_id:em.state_place_id,country_place_id:em.country_place_id,type:l,dynamic_values:s,is_primary:!0}),C.toast.success(z.strings.address.saveSuccess)}catch(e){console.error("Failed to save address:",e),C.toast.error(z.strings.address.saveFailed)}finally{eL(!1)}}Z(em.address,a,"",em.city,em.state,em.zip_code,em.country,em.lat,em.lng,l,"",s,em.city_place_id),em.lat&&em.lng&&(0,g.fetchTimezoneFromCoords)(em.lat,em.lng).then(e=>{e&&W(e)}),_(em.address,a,"",em.city,em.state,em.zip_code,em.country,em.lat,em.lng,"","",l,s),y()};if((0,l.useCallback)(e=>{eO.current=e.touches[0].clientY,eM.current=eF},[eF]),(0,l.useCallback)(e=>{let t=e.touches[0].clientY-eO.current;ek(Math.min(420,Math.max(100,eM.current+t)))},[ek]),!G&&!e&&!Y)return null;let eU=!!H&&!!(S||F||b),eY=e=>(e??"").trim().toLowerCase(),eJ=ec.filter(e=>!eU||eY(e.address_line_1)!==eY(S)||eY(e.city)!==eY(F)),eV=G?"w-full h-[50px] border-[1.5px] border-[#EAE8E2] rounded-[14px] px-4 text-[15px] text-[#141414] outline-none focus:border-[#132041] focus:shadow-[0_0_0_4px_#EEF1F8] transition-all placeholder:text-[#A8A6A0]":"w-full h-[42px] border border-[#E2E8F0] rounded-[10px] px-4 text-[13px] text-[#141414] outline-none focus:border-[#141414] transition-colors placeholder:text-[#CBD5E1]",eX=G?"block text-[13px] font-extrabold text-[#141414] mb-[7px]":"block text-[12px] font-semibold text-[#141414] mb-1";return(0,t.jsx)("div",{className:G?"relative w-full flex flex-col":`fixed inset-0 z-[60] flex flex-col transition-transform duration-300 ease-out ${e?"translate-y-0":"translate-y-full"} lg:items-center lg:justify-center lg:bg-black/50 lg:backdrop-blur-sm`,children:(0,t.jsx)("div",{className:G?"relative bg-white w-full flex flex-col":"relative bg-white w-full h-full flex flex-col overflow-hidden lg:w-[640px] lg:h-[90vh] lg:rounded-2xl lg:shadow-2xl",children:"select"===eo?(0,t.jsxs)("div",{className:G?"flex flex-col":"flex-1 flex flex-col h-full overflow-hidden",children:[!G&&(0,t.jsx)("div",{className:"w-12 h-1.5 bg-[#F1F5F9] rounded-full mx-auto my-3 shrink-0"}),(0,t.jsxs)("div",{className:`shrink-0 ${G?"pt-2":""}`,children:[!G&&(0,t.jsxs)("div",{className:"px-5 mb-5 flex items-center gap-3",children:[(0,t.jsx)("button",{onClick:y,className:"w-10 h-10 flex items-center justify-center shrink-0 rounded-full hover:bg-gray-100",children:(0,t.jsx)(s.default,{src:a.default,alt:B.componentStrings.locationSheet.backAlt})}),(0,t.jsx)("h2",{className:"text-[20px] font-bold text-[#141414] font-manrope",children:B.componentStrings.locationSheet.selectYourLocationHeading})]}),(0,t.jsxs)("div",{className:`px-5 flex gap-2.5 ${G?"mb-5":"mb-6"}`,children:[(0,t.jsxs)("button",{onClick:()=>{navigator.geolocation&&!ez&&(eE(!0),navigator.geolocation.getCurrentPosition(async({coords:{latitude:e,longitude:t}})=>{try{let l=await (0,p.getGeocode)({location:{lat:e,lng:t}});if(!l[0])return;let{addressLine1:s,subpremise:a,city:r,state:n,zipCode:o,country:i,cityPlaceId:d}
2=(0,L.parseAddressFromResults)(l),c=l[0].formatted_address;Z(c,s,a,r,n,o,i,e,t,"Home","",{},d??null),(0,g.fetchTimezoneFromCoords)(e,t).then(e=>{e&&W(e)}),_(c,s,a,r,n,o,i,e,t,a,"","Home",{}),y()}catch(e){console.error(e)}finally{eE(!1)}},e=>{console.error(e),eE(!1)}))},disabled:ez,className:`flex-1 border-[1.5px] flex items-center justify-center gap-2 text-center font-bold hover:bg-gray-50 transition-colors leading-tight disabled:opacity-60 disabled:cursor-not-allowed ${G?"h-[42px] px-3 text-[12.5px] lg:text-[14px] border-[#132041] rounded-full text-[#132041]":"h-[50px] px-4 text-[14px] border-[#141414] rounded-[8px] text-[#141414]"}`,children:[ez&&(0,t.jsx)("span",{className:`inline-block w-4 h-4 border-2 border-t-transparent rounded-full animate-spin ${G?"border-[#132041]":"border-[#141414]"}`}),B.componentStrings.locationSheet.useCurrentLocationButton]}),(0,t.jsx)("button",{onClick:()=>{eH(),ei("edit")},className:`flex-1 border-[1.5px] flex items-center justify-center text-center font-bold hover:bg-gray-50 transition-colors leading-tight ${G?"h-[42px] px-3 text-[12.5px] lg:text-[14px] border-[#132041] rounded-full text-[#132041]":"h-[50px] px-4 text-[14px] border-[#141414] rounded-[8px] text-[#141414]"}`,children:B.componentStrings.locationSheet.addNewAddressButton})]}),eU&&(0,t.jsx)("div",{className:"px-5 mb-1",children:(0,t.jsxs)("button",{onClick:H,className:"w-full text-left p-4 rounded-xl border-[1.5px] border-[#132041] bg-[#F7F9FF] hover:bg-[#EEF1F8] transition-colors",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,t.jsx)(d.MapPin,{size:16,className:"text-[#132041] shrink-0"}),(0,t.jsx)("h4",{className:"text-[15px] font-bold text-[#141414]",children:B.componentStrings.locationSheet.selectedAddressHeading})]}),(0,t.jsx)("p",{className:"text-[13px] text-[#64748B] leading-tight",children:[S,F,k].filter(Boolean).join(", ")||b})]})})]}),D&&(0,t.jsx)("div",{className:G?"px-5 pb-4":"flex-1 overflow-y-auto px-5 pb-8",children:ep?(0,t.jsx)("div",{className:"space-y-4 pt-2",children:[1,2,3].map(e=>(0,t.jsx)("div",{className:"h-[80px] w-full bg-gray-50 animate-pulse rounded-xl"},e))}):eJ.length>0?(0,t.jsx)("div",{className:"space-y-3 pt-2",children:eJ.map(e=>{let l=e.is_primary;return(0,t.jsx)("div",{onClick:()=>{let t,l,s;return e.is_primary||(eu(t=>t.map(t=>({...t,is_primary:t.id===e.id}))),w(e.id,{is_primary:!0}).catch(e=>{console.error("Failed to set address as primary:",e),eu(ec)})),Z(t=[e.address_line_1,e.city,[e.state,e.zip_code].filter(Boolean).join(" ")].filter(Boolean).join(", "),e.address_line_1,e.address_line_2||e.building_and_floor||"",e.city,e.state,e.zip_code,e.country,parseFloat(e.latitude||"0"),parseFloat(e.longitude||"0"),e.type||"Other",e.landmark||"",e.dynamic_values??{},e.city_place_id??null),l=parseFloat(e.latitude||"0"),s=parseFloat(e.longitude||"0"),void(l&&s&&(0,g.fetchTimezoneFromCoords)(l,s).then(e=>{e&&W(e)}),_(t,e.address_line_1,e.address_line_2||e.building_and_floor||"",e.city,e.state,e.zip_code,e.country,parseFloat(e.latitude||"0"),parseFloat(e.longitude||"0"),e.address_line_2||e.building_and_floor||"",e.landmark||"",e.type||"Other",e.dynamic_values??{}),y())},className:`group relative p-4 rounded-xl border transition-all cursor-pointer ${l&&!G?"border-[#141414] bg-[#FBFBFB]":"border-[#F1F5F9] hover:border-gray-300"}`,children:(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("h4",{className:"text-[15px] font-bold text-[#141414] capitalize",children:e.type||B.componentStrings.locationSheet.otherTypeFallback}),l&&!G&&(0,t.jsx)("span",{className:"px-2 py-0.5 bg-[#E8F5E9] text-[#2E7D32] text-[10px] font-bold rounded-md",children:B.componentStrings.locationSheet.selectedBadge})]}),(0,t.jsxs)("p",{className:"text-[13px] text-[#64748B] leading-tight truncate",children:[e.address_line_1,", ",e.city]})]})},e.id)})}):eU?null:(0,t.jsxs)("div",{className:"flex-1 flex flex-col items-center justify-center min-h-[300px]",children:[(0,t.jsx)("p",{className:"text-[16px] font-medium text-[#94A3B8] font-manrope",children:B.componentStrings.locationSheet.noSavedAddressesText}),!ed&&(0,t.jsx)("button",{onClick:()=>{y(),I("/login")},className:"mt-4 text-[14px] font-bold text-[#132041] underline underline-offset-4",children:B.componentStrings.locationSheet.loginToSeeAddressesButton})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:G?"relative z-20 px-5 pt-1":"absolute left-0 right-0 z-20 pointer-events-none",children:[(0,t.jsxs)("div",{className:G?"flex items-center gap-2 pointer-events-auto":"flex items-center gap-2 bg-[white]/70 p-2 px-3 pointer-events-auto",children:[(!G||ed&&!q)&&(0,t.jsx)("button",{onClick:()=>{ed&&!q?ei("select"):G||y()},"aria-label":B.componentStrings.locationSheet.backAlt,className:G?"w-10 h-10 flex items-center justify-center shrink-0 rounded-full text-[#141414] hover:bg-[#F1F5F9] transition-colors":"w-9 h-9 flex items-center justify-center shrink-0",children:G?(0,t.jsx)(u.ChevronLeft,{size:22}):(0,t.jsx)(s.default,{src:a.default,alt:B.componentStrings.locationSheet.backAlt})}),(0,t.jsxs)("div",{className:"flex-1 relative pointer-events-auto",children:[(0,t.jsx)("div",{className:"absolute left-4 top-1/2 -translate-y-1/2",children:(0,t.jsx)(i.Search,{size:18,className:G?"text-[#A8A6A0]":"text-[#141414]"})}),(0,t.jsx)("input",{ref:X,type:"text",placeholder:B.componentStrings.locationSheet.searchPlaceholder,className:G?"h-[50px] w-full rounded-[14px] border-[1.5px] border-[#
2EAE8E2] bg-[#FAFAFA] pl-11 pr-11 text-[15px] text-[#141414] placeholder:text-[#A8A6A0] focus:bg-white focus:border-[#132041] outline-none font-manrope transition-colors":"h-[50px] w-full rounded-[14px] border-none bg-white pl-11 pr-11 text-[15px] text-[#141414] placeholder:text-[#94A3B8] focus:ring-1 focus:ring-[#132041] outline-none font-manrope shadow-sm",value:e$,onChange:e=>eK(e.target.value),onFocus:()=>eC(!0),onBlur:()=>eC(!1)}),e$&&(0,t.jsx)("button",{type:"button",onClick:()=>{eK(""),eq(),X.current?.focus()},"aria-label":"Clear search",className:"absolute right-3 top-1/2 -translate-y-1/2 w-7 h-7 flex items-center justify-center rounded-full text-[#A8A6A0] hover:bg-[#F1F5F9] transition-colors",children:(0,t.jsx)(c.X,{size:18})})]})]}),e$&&"OK"===eR&&eP.length>0&&(0,t.jsx)("div",{className:`bg-white rounded-[16px] shadow-xl overflow-hidden pointer-events-auto max-h-[400px] overflow-y-auto ${G?"mt-2 border border-[#EAE8E2]":"mx-3 mt-2"}`,children:eP.map(({place_id:e,description:l,structured_formatting:s})=>(0,t.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 hover:bg-gray-50 cursor-pointer border-b border-[#F1F5F9] last:border-none",onClick:()=>eQ(l),children:[(0,t.jsx)(d.MapPin,{size:18,className:"text-[#94A3B8] shrink-0 mt-1"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("p",{className:"text-[15px] font-bold text-[#141414] truncate",children:s?.main_text||l.split(",")[0]}),(0,t.jsx)("p",{className:"text-[12px] text-[#94A3B8] truncate",children:l})]})]},e))})]}),(0,t.jsxs)("div",{className:G?"relative bg-gray-100 h-[240px] rounded-[16px] overflow-hidden mt-3 mx-5 border border-[#EAE8E2]":"relative bg-gray-100 flex-1 min-h-0",children:[U?(0,t.jsx)(h.GoogleMap,{mapContainerStyle:T,center:{lat:em.lat,lng:em.lng},zoom:15,onLoad:e=>{V.current=e},onDragEnd:eD,options:O}):(0,t.jsx)("div",{className:"w-full h-full flex items-center justify-center text-gray-400",children:B.componentStrings.locationSheet.loadingMapText}),(0,t.jsx)("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-[40px] pointer-events-none z-10",children:(0,t.jsx)(s.default,{src:r.default,alt:B.componentStrings.locationSheet.locationAlt,width:25,height:25})}),(0,t.jsx)("button",{onClick:()=>{navigator.geolocation&&navigator.geolocation.getCurrentPosition(async({coords:{latitude:e,longitude:t}})=>{try{ei("edit"),eH();let l=await (0,p.getGeocode)({location:{lat:e,lng:t}});if(l[0]){let{addressLine1:s,subpremise:a,city:r,state:n,zipCode:o,country:i,zipPlaceId:d,cityPlaceId:c,countyPlaceId:u,statePlaceId:p,countryPlaceId:x}=(0,L.parseAddressFromResults)(l),m=l[0].formatted_address;eh({address:m,id:"",address_line_1:s,address_line_2:a,city:r,state:n,zip_code:o,country:i,lat:e,lng:t,zip_place_id:d,city_place_id:c,county_place_id:u,state_place_id:p,country_place_id:x}),V.current?.panTo({lat:e,lng:t})}}catch(e){console.error(e)}})},className:"absolute bottom-4 right-4 bg-white rounded-full shadow-lg flex items-center justify-center hover:bg-gray-50 z-20",children:(0,t.jsx)(s.default,{src:n.default,alt:B.componentStrings.locationSheet.currentLocationAlt})})]}),!eA&&(0,t.jsx)("div",{className:G?"bg-white":"flex-shrink-0 overflow-y-auto bg-white max-h-[50%]",children:(0,t.jsxs)("div",{className:"px-5 pb-5 pt-4",children:[(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-0.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(s.default,{src:o.default,alt:B.componentStrings.locationSheet.locationAlt,width:16,height:16,style:{filter:"brightness(0.06)"}}),(0,t.jsx)("h4",{className:"text-[15px] font-bold text-[#141414] truncate max-w-[220px]",children:em.city||em.address.split(",")[0]})]}),(0,t.jsx)("button",{onClick:()=>X.current?.focus(),className:"text-[13px] font-bold text-[#132041]",children:B.componentStrings.locationSheet.changeButton})]}),(0,t.jsx)("p",{className:"text-[12px] text-[#64748B] font-medium leading-tight",children:em.address||[em.address_line_1,em.address_line_2,em.city,em.state,em.zip_code].filter(Boolean).join(", ")})]}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)("label",{className:eX,children:B.componentStrings.locationSheet.saveAsLabel}),eg&&0===ey.length?(0,t.jsx)("div",{className:"flex gap-2 mt-1.5",children:[1,2,3].map(e=>(0,t.jsx)("div",{className:`${G?"h-[38px] w-[86px]":"h-[36px] w-[80px]"} bg-[#F1F5F9] rounded-full animate-pulse`},e))}):(0,t.jsx)("div",{className:"flex gap-2 mt-1.5 flex-wrap",children:ey.map(e=>(0,t.jsx)("button",{onClick:()=>{eb(e.key),eN({})},className:G?`px-[18px] h-[38px] rounded-full border-[1.5px] text-[13.5px] font-bold transition-colors ${e_===e.key?"bg-[#132041] border-[#132041] text-white":"bg-white border-[#
2EAE8E2] text-[#353330]"}`:`px-5 h-[36px] rounded-[10px] text-[13px] font-semibold transition-colors ${e_===e.key?"bg-[#141414] text-white":"bg-[#F1F5F9] text-[#64748B]"}`,children:e.label},e.key))})]}),(ev?.fields??[]).map(e=>{let l=eS[e.key];return(0,t.jsxs)("div",{className:"mb-2.5",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-[7px]",children:[(0,t.jsx)("label",{className:`${eX} !mb-0`,children:e.label}),!e.is_required&&(0,t.jsx)("span",{className:G?"text-[12px] text-[#A8A6A0] font-medium":"text-[11px] text-[#94A3B8] font-medium",children:B.componentStrings.locationSheet.optionalTag})]}),(0,t.jsx)("input",{type:"text",inputMode:"number"===e.field_type?"numeric":"text",value:ej[e.key]??"",onChange:t=>{var l,s;let a;return l=t.target.value,s=e.field_type,a="number"===s?l.replace(/[^0-9]/g,""):"alphanumeric"===s?l.replace(/[^a-zA-Z0-9]/g,""):l,void(ew(t=>({...t,[e.key]:a})),eN(t=>{if(!t[e.key])return t;let l={...t};return delete l[e.key],l}))},placeholder:e.placeholder,className:`${eV} ${l?"!border-[#BA2128]":""}`}),l&&(0,t.jsx)("p",{className:"mt-1 text-[12px] text-[#BA2128] font-medium",children:l})]},e.key)}),(0,t.jsxs)("button",{onClick:eI,disabled:eB||!(em.lat&&em.lng),className:G?"w-full h-[54px] bg-[#132041] text-white rounded-full font-extrabold text-[15.5px] shadow-[0_6px_16px_rgba(19,32,65,0.25)] hover:bg-[#0F1A36] transition-colors disabled:opacity-50 disabled:cursor-not-allowed":"w-full h-[50px] bg-[#141414] text-white rounded-[14px] font-bold text-[15px] hover:bg-black transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[eB&&(0,t.jsx)("span",{className:"inline-block w-4 h-4 mr-2 border-2 border-white border-t-transparent rounded-full animate-spin align-[-2px]"}),B.componentStrings.locationSheet.confirmLocationButton]})]})})]})})})}e.s(["LocationBottomSheet",()=>M],936377)}]);
3
4//# debugId=c9886cf4-94b6-06b7-be5e-377852705b83

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.