1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4599],{44599:(e,t,l)=>{l.r(t),l.d(t,{default:()=>d});var s=l(95155),n=l(12115),a=l(18955),r=l(71177);let i=(e,t)=>{let l=e.replace(/\D/g,""),s=t?"?text=".concat(encodeURIComponent(t)):"";window.open("https://wa.me/".concat(l).concat(s),"_blank","noopener,noreferrer")},o=e=>{let{className:t}=e;return(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,"aria-hidden":"true",children:[(0,s.jsx)("path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0"}),(0,s.jsx)("circle",{cx:"12",cy:"10",r:"3"})]})},c=e=>{let{city:t,onClick:l}=e;return(0,s.jsxs)("button",{type:"button",onClick:l,className:"group w-full flex items-center gap-3 rounded-md border border-gray-200 bg-white px-3 py-2.5 text-left transition-all hover:border-emerald-400 hover:bg-emerald-50/40 focus:outline-none focus:ring-2 focus:ring-emerald-500/40","aria-label":"Contact ".concat(t.name," WhatsApp support"),children:[t.cover?(0,s.jsxs)("div",{className:"relative h-11 w-11 flex-shrink-0 overflow-hidden rounded-md bg-gray-100",children:[(0,s.jsx)("img",{src:t.cover,alt:t.name,className:"absolute inset-0 h-full w-full object-cover",loading:"lazy"}),(0,s.jsx)("div",{className:"absolute inset-0 ring-1 ring-inset ring-black/5 rounded-md"})]}):(0,s.jsx)("div",{className:"flex h-11 w-11 flex-shrink-0 items-center justify-center rounded-md bg-emerald-50 text-emerald-600",children:(0,s.jsx)(o,{className:"w-5 h-5"})}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("div",{className:"text-sm font-semibold text-gray-900 truncate",children:t.name}),(0,s.jsx)("div",{className:"text-xs text-gray-500 truncate tabular-nums",children:(e=>{if(!e)return"";let t=e.trim(),l=t.replace(/\D/g,"");if(l.length<7)return t;if(12===l.length&&l.startsWith("90"))return"+90 (".concat(l.slice(2,5),") ").concat(l.slice(5,8)," ").concat(l.slice(8,10)," ").concat(l.slice(10));if(11===l.length&&l.startsWith("0"))return"0 (".concat(l.slice(1,4),") ").concat(l.slice(4,7)," ").concat(l.slice(7,9)," ").concat(l.slice(9));if(l.length>10){let e=l.slice(0,l.length-10),t=l.slice(-10);return"+".concat(e," (").concat(t.slice(0,3),") ").concat(t.slice(3,6)," ").concat(t.slice(6,8)," ").concat(t.slice(8))}return t})(t.number)})]})]})};function d(e){let{isOpen:t,onClose:l}=e,o=(0,a.c3)("TalkToExpertModal"),{citiesWithCategories:d,tenantSettings:u}=(0,r.useGlobalContext)(),m=null==u?void 0:u.support,h=(null==m?void 0:m.showCityNumbers)!==!1,x=(null==m?void 0:m.whatsappEnabled)!==!1,p=((null==m?void 0:m.whatsappNumber)||"").trim(),g=((null==m?void 0:m.whatsappMessageTemplate)||"").trim()||void 0,f=h?(d||[]).map(e=>{let t=((null==e?void 0:e.defaultWhatsappNumber)||"").trim();return t?{id:(null==e?void 0:e._id)?String(e._id):null==e?void 0:e.id,slug:null==e?void 0:e.slug,key:null==e?void 0:e.key,name:(null==e?void 0:e.name)||(null==e?void 0:e.slug)||"",number:t,message:((null==e?void 0:e.defaultWhatsappMessageTemplate)||"").trim()||void 0,cover:null==e?void 0:e.cover}:null}).filter(Boolean):[],v=x&&p?{slug:"general",name:o("generalContact"),number:p,message:g}:null,b=[...v?[v]:[],...f];return((0,n.useEffect)(()=>{t&&1===b.length&&(i(b[0].number,b[0].message),l())},[t,b,l]),t&&x&&!(b.length<=1))?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"fixed inset-0 bg-black/50 z-50 transition-opacity duration-200",onClick:l}),(0,s.jsxs)("div",{role:"dialog","aria-labelledby":"modal-title","aria-describedby":"modal-description",className:"fixed top-[50%] left-[50%] z-50 w-full max-w-[calc(100%-2rem)] md:max-w-md translate-x-[-50%] translate-y-[-50%] rounded-lg border bg-white p-3 md:p-6 shadow-lg duration-200 max-md:mx-4 animate-in fade-in-0 zoom-in-95",style:{pointerEvents:"auto",marginLeft:"0px",marginRight:"0px"},children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:text-left rtl:text-right text-center pb-2",children:[(0,s.jsx)("div",{className:"mx-auto w-12 h-12 bg-[#25d366]/10 rounded-full flex items-center justify-center mb-3",children:(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"w-6 h-6 text-[#25d366]","aria-hidden":"true",children:(0,s.jsx)("path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719"})})}),(0,s.jsx)("h2",{id:"modal-title",className:"font-semibold text-xl max-md:text-lg",children:o("title")}),(0,s.jsx)("p",{id:"modal-description",className:"text-sm text-gray-600 mt-2",children:o("description")})]}),(0,s.jsx)("div",{className:"py-4 space-y-2 max-h-[60vh] overflow-y-auto",children:b.map(e=>(0,s.jsx)(c,{city:e,onClick:()=>{i(e.number,e.message),l()}},e.id||e.slug||e.name))}),(0,s.jsx)("div",{className:"text-center text-xs text-gray-500 pb-1 border-t pt-3",children:o("supportMessage")}),(0,s.jsxs)("button",{type:"button",onClick:l,className:"absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none p-1","aria-label":o("close"),children:[(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"w-4 h-4",children:[(0,s.jsx)("path",{d:"M18 6 6 18"}),(0,s.jsx)("path",{d:"m6 6 12 12"})]}),(0,s.jsx)("span",{className:"sr-only",children:o("close")})]})]})]}):null}}}]);
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.