1import{c as Ue,j as e,L as Ke,u as ke,d as me,g as de,f as U,p as Fe,s as J,e as Ve,i as Se,h as We,k as Ge,r as f,B as O,X as k,l as qe,b as Ze,H as _e,o as ze,m as De}from"./main-Ci0NjZkw.js";import{A as D}from"./AdvertisementBanner-uZRH6FyW.js";import{u as Re}from"./useFeatureAccess-CBjSZMEr.js";import{C as Q}from"./clock-Bla7Whno.js";import{L}from"./lock-Bap4akUz.js";import{S as ee}from"./star-BKOPM3Rk.js";import{M as re}from"./map-pin-uyQBQLPH.js";import{B as se}from"./briefcase-o4eX7nNF.js";import{C as Ee}from"./crown-C7bTDVhX.js";import{D as Je,g as Ae}from"./DienstleisterCategoryIcon-DnzPYHgp.js";import{B as Ye}from"./badge-check-ISvWYBy6.js";import{e as ue,f as $e}from"./geocoding-CStM8m4T.js";import{D as Xe}from"./service-categories-DgnEjMW7.js";import{u as Qe}from"./useCurrentUsage-BRwe6uXC.js";import{P as er}from"./paw-print-CfTzuHY9.js";import{C as oe}from"./chevron-down-CIdTilbE.js";import"./external-link-BUCHLY6W.js";import"./camera-bIRSc4mu.js";import"./stethoscope-NdHd_hD1.js";import"./graduation-cap-ChMUOCJl.js";/** 2 * @license lucide-react v0.344.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const Pe=Ue("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);function rr({availabilityDay:r="",availabilityTime:g="",minRating:i="",radius:t="",maxPrice:u=100,showRelatedServices:a=!1,onAvailabilityDayChange:p,onAvailabilityTimeChange:h,onMinRatingChange:N,onRadiusChange:v,onMaxPriceChange:o,onShowRelatedServicesChange:b,showPriceFilter:n=!0,showAvailabilityFilter:C=!0,showServiceFilter:d=!0,className:m=""}){const{hasAdvancedFilters:w,subscription:R}=Re(),j=w(),K=(R==null?void 0:R.type)==="premium",T=[{value:"",label:"Alle Tage"},{value:"montag",label:"Montag"},{value:"dienstag",label:"Dienstag"},{value:"mittwoch",label:"Mittwoch"},{value:"donnerstag",label:"Donnerstag"},{value:"freitag",label:"Freitag"},{value:"samstag",label:"Samstag"},{value:"sonntag",label:"Sonntag"}],V=[{value:"",label:"Alle Zeiten"},{value:"morgens",label:"Morgens (6-12 Uhr)"},{value:"mittags",label:"Mittags (12-18 Uhr)"},{value:"abends",label:"Abends (18-22 Uhr)"},{value:"ganztags",label:"Ganztags verfügbar"}],P=[{value:"",label:"Alle Bewertungen"},{value:"4.5",label:"4.5+ Sterne"},{value:"4.0",label:"4.0+ Sterne"},{value:"3.5",label:"3.5+ Sterne"},{value:"3.0",label:"3.0+ Sterne"}],W=[{value:"",label:"Alle Entfernungen"},{value:"5",label:"Bis 5 km"},{value:"10",label:"Bis 10 km"},{value:"25",label:"Bis 25 km"},{value:"50",label:"Bis 50 km"}];return e.jsxs("div",{className:`space-y-6 ${m}`,children:[e.jsxs("div",{className:"space-y-4",children:[C&&e.jsxs("div",{className:"relative",children:[e.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:[e.jsx(Q,{className:"w-4 h-4 inline mr-1"}),"Verfügbarkeit Tag"]}),j?e.jsx("select",{className:"input",value:r,onChange:l=>p(l.target.value),children:T.map(l=>e.jsx("option",{value:l.value,children:l.label},l.value))}):e.jsxs("div",{className:"relative",children:[e.jsx("select",{className:"input opacity-50 cursor-not-allowed",disabled:!0,children:e.jsx("option",{children:"Alle Tage"})}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-white/80 rounded-lg",children:e.jsxs("div",{className:"flex items-center text-xs text-gray-600 bg-white px-2 py-1 rounded shadow-sm border",children:[e.jsx(L,{className:"w-3 h-3 mr-1"}),"Premium"]})})]})]}),C&&e.jsxs("div",{className:"relative",children:[e.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:[e.jsx(Q,{className:"w-4 h-4 inline mr-1"}),"Verfügbarkeit Zeit"]}),j?e.jsx("select",{className:"input",value:g,onChange:l=>h(l.target.value),children:V.map(l=>e.jsx("option",{value:l.value,children:l.label},l.value))}):e.jsxs("div",{className:"relative",children:[e.jsx("select",{className:"input opacity-50 cursor-not-allowed",disabled:!0,children:e.jsx("option",{children:"Alle Zeiten"})}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-white/80 rounded-lg",children:e.jsxs("div",{className:"flex items-center text-xs text-gray-600 bg-white px-2 py-1 rounded shadow-sm border",children:[e.jsx(L,{className:"w-3 h-3 mr-1"}),"Premium"]})})]})]}),e.jsxs("div",{className:"relative",children:[e.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:[e.jsx(ee,{className:"w-4 h-4 inline mr-1"}),"Mindestbewertung"]}),j?e.jsx("select",{className:"input",value:i,onChange:l=>N(l.target.value),children:P.map(l=>e.jsx("option",{value:l.value,children:l.label},l.value))}):e.jsxs("div",{className:"relative",children:[e.jsx("select",{className:"input op
6acity-50 cursor-not-allowed",disabled:!0,children:e.jsx("option",{children:"Alle Bewertungen"})}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-white/80 rounded-lg",children:e.jsxs("div",{className:"flex items-center text-xs text-gray-600 bg-white px-2 py-1 rounded shadow-sm border",children:[e.jsx(L,{className:"w-3 h-3 mr-1"}),"Premium"]})})]})]}),e.jsxs("div",{className:"relative",children:[e.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:[e.jsx(re,{className:"w-4 h-4 inline mr-1"}),"Umkreis"]}),j?e.jsx("select",{className:"input",value:t,onChange:l=>v(l.target.value),children:W.map(l=>e.jsx("option",{value:l.value,children:l.label},l.value))}):e.jsxs("div",{className:"relative",children:[e.jsx("select",{className:"input opacity-50 cursor-not-allowed",disabled:!0,children:e.jsx("option",{children:"Alle Entfernungen"})}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-white/80 rounded-lg",children:e.jsxs("div",{className:"flex items-center text-xs text-gray-600 bg-white px-2 py-1 rounded shadow-sm border",children:[e.jsx(L,{className:"w-3 h-3 mr-1"}),"Premium"]})})]})]})]}),n&&o&&e.jsxs("div",{className:"relative",children:[e.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:["Maximaler Stundensatz: â¬",u]}),j?e.jsx("input",{type:"range",min:"10",max:"100",step:"5",value:u,onChange:l=>o(parseInt(l.target.value)),className:"w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer slider"}):e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:"range",min:"10",max:"100",step:"5",value:100,disabled:!0,className:"w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-not-allowed opacity-50"}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsxs("div",{className:"flex items-center text-xs text-gray-600 bg-white px-2 py-1 rounded shadow-sm border",children:[e.jsx(L,{className:"w-3 h-3 mr-1"}),"Premium"]})})]}),e.jsxs("div",{className:"flex justify-between text-xs text-gray-500 mt-1",children:[e.jsx("span",{children:"â¬10"}),e.jsx("span",{children:"â¬100+"})]})]}),d&&b&&e.jsxs("div",{className:"relative",children:[e.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:[e.jsx(se,{className:"w-4 h-4 inline mr-1"}),"Zeige auch verwandte Dienstleister"]}),K?e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("input",{type:"checkbox",checked:a,onChange:l=>b(l.target.checked),className:"h-4 w-4 text-primary-600 focus:ring-primary-500 border-gray-300 rounded"}),e.jsx("span",{className:"text-sm text-gray-600",children:"Erweitere deine Suche um Tierärzte, Trainer und andere Dienstleister"})]}):e.jsxs("div",{className:"relative",children:[e.jsxs("div",{className:"flex items-center space-x-3 opacity-50",children:[e.jsx("input",{type:"checkbox",disabled:!0,className:"h-4 w-4 text-gray-400 border-gray-300 rounded cursor-not-allowed"}),e.jsx("span",{className:"text-sm text-gray-500",children:"Erweitere deine Suche um verwandte Dienstleister"})]}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-white/80 rounded-lg",children:e.jsxs("div",{className:"flex items-center text-xs text-gray-600 bg-white px-2 py-1 rounded shadow-sm border",children:[e.jsx(L,{className:"w-3 h-3 mr-1"}),"Premium"]})})]})]}),!j&&e.jsx("div",{className:"bg-gradient-to-r from-yellow-50 to-orange-50 border border-yellow-200 rounded-lg p-4",children:e.jsxs("div",{className:"flex items-start",children:[e.jsx(Ee,{className:"w-5 h-5 text-yellow-600 mr-3 mt-0.5 flex-shrink-0"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h3",{className:"text-sm font-medium text-yellow-800 mb-1",children:"Erweiterte Filter mit Premium"}),e.jsx("p",{className:"text-sm text-yellow-700 mb-3",children:"Nutze erweiterte Suchfilter für Verfügbarkeit, Bewertungen, Umkreis und Preise, um genau den richtigen Betreuer zu finden."}),e.jsxs(Ke,{to:"/mitgliedschaften",className:"inline-flex items-center px-3 py-1.5 bg-yellow-600 text-white text-sm font-medium rounded-md hover:bg-yellow-700 transition-colors",children:[e.jsx(Ee,{className:"w-4 h-4 mr-1"}),"Premium werden"]})]})]})})]})}function sr({dienstleister:r}){const g=ke(),i=()=>{g(`/dienstleister/${r.id}`)},t=()=>{const h=de(Array.isArray(r.services_with_categories)?r.services_with_categories:null);return h?`ab ${U(h.price)}${Fe(h.priceType)}`:r.hourly_rate&&r.hourly_rate>0?`ab ${U(r.hourly_rate)}/h`:"Preis auf Anfrage"},a=`${r.first_name||""} ${r.last_name||""}`.trim()||"Dienstleister",p=r.plz&&r.city?`${r.plz} ${r.city}`:r.city||"Standort nicht angegeben";return e.jsxs("div",{className:"bg-white rounded-lg shadow-sm border border-blue-200 hover:border-blue-300 transition-all duration-200 w-full max-w-sm h-full flex flex-col relative",children:[e.jsx("div",{className:"absolute top-2 right-2 z-10",children:e.jsxs("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-blue-100 text-blue-800",children:[e.jsx(se,{className:"w-3 h-3 mr-1"}),"Dienstleister"]})}),e.jsxs("div",{className:"p-4 flex-1 flex flex-col",children:[e.jsxs("div",{className:"flex items-start space-x-3 mb-3",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx("div",{className:"w-12 h-12 bg-gray-200 rounded-full flex items-center justify-center",children:r.profile_photo_url?e.jsx("img",{src:r.profile_photo_url,alt:a,className:"w-12 h-12 rounded-full object-cover"}):e.jsx("span",{className:"text-lg font-semibold text-gray-500",children:a.charAt(0).toUpperCase()})})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:"text-sm font-semibold text-gray-900 truncate",children:a}),r.kategorie_name&&e.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[r.kategorie_icon&&e.jsx(Je,{iconName:r.kategorie_icon,size:"sm",className:Ae(r.kategorie_name)}),e.jsx("p",{className:me("text-xs font-medium",Ae(r.kategorie_name)),children:r.kategorie_name})]}),e.jsxs("div",{className:"flex items-center text-xs text-gray-500 mb-1",children:[e.jsx(re,{className:"w-3 h-3 mr-1 flex-shrink-0"}),e.jsx("span",{className:"truncate",children:p})]}),r.rating&&e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx("div",{className:"flex",children:[...Array(5)].map((h,N)=>e.jsx(ee,{className:me("w-3 h-3",N<Math.floor(r.rating)?"text-yellow-400 fill-current":"text-gray-300")},N))}),e.jsxs("span",{className:"text-xs text-gray-600",children:[r.rating.toFixed(1)," (",r.review_count||0,")"]})]})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-1 mb-3",children:[r.is_verified&&e.jsxs("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-green-100 text-green-800",children:[e.jsx(Ye,{className:"w-3 h-3 mr-1"}),"Verifiziert"]}),r.premium_badge&&e.jsxs("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800",children:[e.jsx(ee,{className:"w-3 h-3 mr-1"}),"Premium"]}),r.notfall_bereitschaft&&e.jsxs("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-red-100 text-red-800",children:[e.jsx(Q,{className:"w-3 h-3 mr-1"}),"Notfall"]})]}
6),r.spezialisierungen&&r.spezialisierungen.length>0&&e.jsx("div",{className:"mb-3",children:e.jsxs("div",{className:"flex flex-wrap gap-1",children:[r.spezialisierungen.slice(0,2).map((h,N)=>e.jsx("span",{className:"px-2 py-1 bg-gray-100 text-gray-700 text-xs rounded",children:h},N)),r.spezialisierungen.length>2&&e.jsxs("span",{className:"px-2 py-1 bg-gray-100 text-gray-500 text-xs rounded",children:["+",r.spezialisierungen.length-2," weitere"]})]})}),r.bio&&e.jsx("p",{className:"text-xs text-gray-600 mb-3 line-clamp-2 flex-1",children:r.bio}),e.jsxs("div",{className:"flex items-center justify-between pt-3 border-t border-gray-100 mt-auto",children:[e.jsx("div",{className:"text-sm font-semibold text-gray-900",children:t()}),e.jsx("button",{onClick:i,className:"text-xs font-medium text-blue-600 hover:text-blue-800 transition-colors",children:"Profil ansehen"})]})]})]})}function tr(r){if(!r||Object.keys(r).length===0)return 0;console.log("ð Calculating best price from:",r);const g=Object.entries(r).filter(([t,u])=>t==="Anfahrkosten"?(console.log("ð Excluding travel costs from price calculation:",u),!1):u!==""&&u!==null&&u!==void 0).map(([t,u])=>{const a=typeof u=="string"?parseFloat(u):u;return isNaN(a)?0:a}).filter(t=>t>0),i=g.length>0?Math.min(...g):0;return console.log("ð Best price calculated:",i,"from prices (excluding travel costs):",g),i}function ar(r){const g=r.first_name||"",i=r.last_name||"",t=g&&i?`${g} ${i[0]}.`:r.full_name||"Unbekannt";let u=[];try{const m=r.services;m&&(Array.isArray(m)?u=m.filter(w=>typeof w=="string"):typeof m=="string"?u=JSON.parse(m).filter(w=>typeof w=="string"):typeof m=="object"&&(u=Object.values(m).filter(w=>typeof w=="string")))}catch(m){console.warn("â ï¸ Error parsing services:",m,"Original value:",r.services),u=[]}let a=[];try{r.animal_types&&Array.isArray(r.animal_types)&&(a=r.animal_types.filter(m=>typeof m=="string"))}catch(m){console.warn("â ï¸ Error parsing animal_types:",m,"Original value:",r.animal_types),a=[]}let p=[];try{r.services_with_categories&&(Array.isArray(r.services_with_categories)?p=r.services_with_categories:typeof r.services_with_categories=="string"&&(p=JSON.parse(r.services_with_categories)))}catch(m){console.warn("â ï¸ Error parsing services_with_categories:",m,"Original value:",r.services_with_categories),p=[]}let h={};try{r.prices&&typeof r.prices=="object"&&(h=r.prices)}catch(m){console.warn("â ï¸ Error parsing prices:",m,"Original value:",r.prices),h={}}const N=Ve(p),v={...h,...N};u.length===0&&p.length>0?u=p.map(m=>m.name).filter(Boolean).filter(m=>!Se(m)):u=u.filter(m=>!Se(m));const o=de(p),b=tr(v)||Number(r.hourly_rate)||0,n=(o==null?void 0:o.price)??b,C=We(r.travel_cost_config,p);return{id:r.id||"",userId:r.id||"",name:t,avatar:r.profile_photo_url||`https://ui-avatars.com/api/?name=${encodeURIComponent(g||"U")}&background=f3f4f6&color=374151`,location:r.city&&r.plz?`${r.city} ${r.plz}`:r.city||"Unbekannt",rating:Number(r.rating)||0,reviewCount:r.review_count||0,hourlyRate:n,prices:v,services:u,servicesWithCategories:p,animalTypes:a,bio:r.short_about_me||r.long_about_me||"Keine Beschreibung verfügbar.",verified:r.is_verified||!1,isCommercial:r.is_commercial||!1,short_term_available:r.short_term_available||!1,travelCostConfig:C}}async function ir(r){var g;try{let i=null;const t=r!=null&&r.radius?parseFloat(r.radius):NaN;if(Number.isFinite(t)&&t>0&&((g=r==null?void 0:r.location)==null?void 0:g.trim())&&ue(r.location))try{const o=await $e(J,r.location,t);i=o.length>0?o:null}catch(o){console.error("â search_nearby_plzs / geocache:",o),i=null}let a=J.from("caretaker_search_view").select("*");if(i&&i.length>0)a=a.in("plz",i);else if(r!=null&&r.location){const v=r.location.toLowerCase();a=a.or(`city.ilike.%${v}%,plz.ilike.%${v}%`)}if(r!=null&&r.petType&&r.petType!==""){const o={Hund:"Hunde",Katze:"Katzen",Kleintier:"Kleintiere",Vogel:"Vögel",Reptil:"Reptilien",Sonstiges:"Sonstige"}[r.petType]||r.petType;a=a.contains("animal_types",[o])}if(r!=null&&r.service&&r.service!==""&&(a=a.contains("services",[r.service])),r!=null&&r.serviceCategory&&r.serviceCategory,r!=null&&r.minRating&&r.minRating!==""){const v=parseFloat(r.minRating);a=a.gte("rating",v)}
6r!=null&&r.verified&&(a=a.eq("is_verified",!0)),r!=null&&r.commercial&&(a=a.eq("is_commercial",!0)),r!=null&&r.shortTermAvailable&&(a=a.eq("short_term_available",!0)),a=a.eq("approval_status","approved");const{data:p,error:h}=await a;if(h)throw console.error("â Error searching caretakers:",h),h;return!p||p.length===0?(console.log("â ï¸ No caretakers found"),[]):p.map(v=>ar(v))}catch(i){throw console.error("â Exception in searchCaretakers:",i),i}}const lr={Hundesitting:["Hundetrainer","Hundephysiotherapeut","Tierfotograf"],Katzensitting:["Tierarzt","Tierfotograf","Ernährungsberater"],"Gassi gehen":["Hundetrainer","Hundephysiotherapeut"],"Tierbetreuung zu Hause":["Tierarzt","Ernährungsberater","Tierfotograf"],Ãbernachtungsbetreuung:["Tierarzt","Ernährungsberater"],Tierpflege:["Tierfriseur","Tierarzt","Ernährungsberater"],Training:["Hundetrainer","Verhaltenstherapeut"],"Medizinische Betreuung":["Tierarzt","Hundephysiotherapeut","Ernährungsberater"],Notfallbetreuung:["Tierarzt","Hundetrainer"],Tierarztbesuche:["Tierarzt","Hundephysiotherapeut"],Fellpflege:["Tierfriseur","Tierarzt"],Fütterung:["Ernährungsberater","Tierarzt"],Spielzeit:["Hundetrainer","Tierfotograf"],Sozialisierung:["Hundetrainer","Verhaltenstherapeut"],Welpenbetreuung:["Hundetrainer","Tierarzt","Ernährungsberater"],Seniorenbetreuung:["Tierarzt","Hundephysiotherapeut","Ernährungsberater"]},nr={Hund:["Hundetrainer","Hundephysiotherapeut","Tierfriseur","Tierarzt","Ernährungsberater","Tierfotograf","Verhaltenstherapeut"],Katze:["Tierarzt","Ernährungsberater","Tierfotograf","Verhaltenstherapeut"],Kleintier:["Tierarzt","Ernährungsberater","Tierfotograf"],Vogel:["Tierarzt","Ernährungsberater"],Reptil:["Tierarzt","Ernährungsberater"],Fisch:["Tierarzt","Ernährungsberater"],Pferd:["Tierarzt","Ernährungsberater","Tierfotograf","Hundephysiotherapeut"],Nutztier:["Tierarzt","Ernährungsberater"]},cr={Betreuung:["Tierarzt","Ernährungsberater","Tierfotograf"],Pflege:["Tierfriseur","Tierarzt","Ernährungsberater"],Training:["Hundetrainer","Verhaltenstherapeut"],Medizin:["Tierarzt","Hundephysiotherapeut","Ernährungsberater"],Ernährung:["Ernährungsberater","Tierarzt"],Verhalten:["Hundetrainer","Verhaltenstherapeut","Tierarzt"],Notfall:["Tierarzt","Hundetrainer"],Wellness:["Tierfriseur","Hundephysiotherapeut","Tierfotograf"]};function or(r){const g=new Set;if(r.service){const i=lr[r.service];i&&i.forEach(t=>g.add(t))}if(r.petType){const i=nr[r.petType];i&&i.forEach(t=>g.add(t))}if(r.serviceCategory){const i=cr[r.serviceCategory];i&&i.forEach(t=>g.add(t))}return g.size===0?["Tierarzt","Hundetrainer","Tierfriseur","Ernährungsberater"]:Array.from(g)}async function mr(r){var g,i;try{console.log("ð Cross-Search: Searching for related Dienstleister with filters:",r);const t=or(r);if(console.log("ð Related categories:",t),t.length===0)return[];const{data:u,error:a}=await J.from("dienstleister_kategorien").select("id, name").in("name",t).eq("is_active",!0);if(a)return console.error("Error loading categories:",a),[];const p=(u||[]).map(d=>d.id);if(p.length===0)return[];let h=J.from("dienstleister_search_view").select("*").eq("user_type","dienstleister").in("kategorie_id",p).order("premium_badge",{ascending:!1}).order("rating",{ascending:!1}),N=null;const v=r.radius?parseFloat(r.radius):NaN;if(Number.isFinite(v)&&v>0&&((g=r.location)==null?void 0:g.trim())&&ue(r.location))try{const m=await $e(J,r.location,v);N=m.length>0?m:null}catch(m){console.error("Cross-Search search_nearby_plzs:",m),N=null}if(N&&N.length>0?h=h.in("plz",N):(i=r.location)!=null&&i.trim()&&(h=h.or(`plz.ilike.%${r.location}%,city.ilike.%${r.location}%`)),r.minRating){const d=parseFloat(r.minRating);isNaN(d)||(h=h.gte("rating",d))}const{data:b,error:n}=await h.limit(10);if(n)return console.error("Error searching Dienstleister:",n),[];let C=b||[];return r.maxPrice&&r.maxPrice<100&&(C=C.filter(d=>d.hourly_rate?d.hourly_rate<=r.maxPrice:!0)),console.log(`â
Cross-Search: Found ${C.length} related Dienstleister`),C}catch(t){return console.error("Error in cross-search:",t),[]}}function kr(){var Ne,we,Ce,Te;const[r,g]=Ge(),{contactLimit:i,subscription:t}
6=Re(),{currentUsage:u}=Qe("contact_request"),a=f.useRef(!0),p=r.get("location")||"",h=r.get("petType")||"",N=r.get("service")||"",v=r.getAll("availabilityDay"),o=r.get("availabilityTime")||"",b=parseInt(r.get("maxPrice")||"100"),[n,C]=f.useState(p),[d,m]=f.useState(h),[w,R]=f.useState(N),[j,K]=f.useState(r.get("serviceCategory")||""),[T,V]=f.useState(v),[P,W]=f.useState(o),[l,te]=f.useState(r.get("minRating")||""),[z,ae]=f.useState(r.get("radius")||""),[S,ie]=f.useState(b),[$,he]=f.useState(r.get("showRelatedServices")==="true"),[G,le]=f.useState([]),[ne,ge]=f.useState([]),[q,xe]=f.useState(!0),[H,B]=f.useState(null),[He,Y]=f.useState(!1),[pe,Be]=f.useState(0),[ce,Me]=f.useState(!1),fe=[{value:"",label:"Alle Tiere"},{value:"Hund",label:"Hund"},{value:"Katze",label:"Katze"},{value:"Kleintier",label:"Kleintier"},{value:"Vogel",label:"Vogel"},{value:"Reptil",label:"Reptil"},{value:"Sonstiges",label:"Sonstiges"}],be=[{value:"",label:"Alle Services"},{value:"Gassi-Service",label:"Gassi-Service"},{value:"Haustierbetreuung",label:"Haustierbetreuung"},{value:"Ãbernachtung",label:"Ãbernachtung"},{value:"Kurzbesuche",label:"Kurzbesuche"},{value:"Haussitting",label:"Haussitting"},{value:"Katzenbetreuung",label:"Katzenbetreuung"},{value:"Hundetagesbetreuung",label:"Hundetagesbetreuung"},{value:"Kleintierbetreuung",label:"Kleintierbetreuung"}],ye=[{value:"",label:"Alle Kategorien"},...Xe.map(s=>({value:s.id.toString(),label:s.name}))],Ie=[{value:"",label:"Alle Zeiten"},{value:"morgens",label:"Morgens (6-12 Uhr)"},{value:"mittags",label:"Mittags (12-18 Uhr)"},{value:"abends",label:"Abends (18-22 Uhr)"},{value:"ganztags",label:"Ganztags verfügbar"}],Le=s=>({montag:"Montag",dienstag:"Dienstag",mittwoch:"Mittwoch",donnerstag:"Donnerstag",freitag:"Freitag",samstag:"Samstag",sonntag:"Sonntag"})[s]||s,X=async()=>{xe(!0),B(null),Y(!1);try{const s={};n.trim()&&(s.location=n.trim()),d&&(s.petType=d),w&&(s.service=w),j&&(s.serviceCategory=j),l&&(s.minRating=l),z&&(s.radius=z),S<100&&(s.maxPrice=S);let c=[];try{c=await ir(s),c&&Array.isArray(c)?console.log("â
Using real data from service"):(console.log("â ï¸ Service returned invalid data, setting to empty array"),c=[])}catch(x){console.error("â Service error:",x),console.log("â ï¸ Service failed, showing empty results"),c=[]}const Oe=!!(n.trim()&&z?ue(n.trim()):null);if(n.trim()&&c&&!Oe){const x=n.trim().toLowerCase();c=c.filter(A=>{var y;const _=((y=A.location)==null?void 0:y.toLowerCase())||"";return _==="unbekannt"||_==="unknown"||_===""||_==="n/a"||_==="nicht angegeben"||_==="ort nicht angegeben"||/^\d{5}$/.test(n.trim())&&!/\d{5}/.test(_)?!1:_.includes(x)||x.includes(_)})}(T.length>0||P)&&c&&(c=c.filter(()=>
6!0)),j&&c&&(console.log("ð·ï¸ Applying service category filter:",j),console.log("ð·ï¸ DEBUG: Checking servicesWithCategories for all caretakers:"),c.forEach(x=>{console.log(` - ${x.name}: servicesWithCategories=`,x.servicesWithCategories)}),c=c.filter(x=>{if(x.servicesWithCategories&&Array.isArray(x.servicesWithCategories)){const A=x.servicesWithCategories.some(_=>_.category_id===parseInt(j));return console.log(`ð·ï¸ ${x.name}: has category ${j} = ${A}`),A}return console.log(`ð·ï¸ ${x.name}: no servicesWithCategories data`),!1}),console.log(`ð·ï¸ After service category filter: ${c.length} caretakers`)),S<100&&c&&c.length>0&&(c=c.filter(x=>{let A=0;if(x.servicesWithCategories&&Array.isArray(x.servicesWithCategories)){const I=x.servicesWithCategories.filter(y=>y.price&&y.price!==""&&y.price!==null&&y.price!==void 0&&y.name!=="Anfahrkosten").map(y=>{const F=typeof y.price=="string"?parseFloat(y.price):y.price;return isNaN(F)?0:F}).filter(y=>y>0);I.length>0&&(A=Math.min(...I))}if(A===0&&x.prices&&Object.keys(x.prices).length>0){const I=Object.entries(x.prices).filter(([y,F])=>y==="Anfahrkosten"?!1:F!==""&&F!==null&&F!==void 0).map(([,y])=>{const F=typeof y=="string"?parseFloat(y):y;return isNaN(F)?0:F}).filter(y=>y>0);I.length>0&&(A=Math.min(...I))}return A===0&&x.hourlyRate&&(A=x.hourlyRate),A<=S}),c.length===0&&console.log("ð° No caretakers found within price range â¬"+S)),le(c||[]);let Z=[];if($)try{const x={location:s.location,radius:z||void 0,petType:s.petType,service:s.service,serviceCategory:s.serviceCategory,minRating:s.minRating,maxPrice:s.maxPrice};Z=await mr(x),console.log(`ð Cross-Search: Found ${Z.length} related Dienstleister`)}catch(x){console.error("â Cross-Search error:",x)}ge(Z),Be(((c==null?void 0:c.length)||0)+Z.length),(!c||c.length===0)&&Z.length===0?(Y(!0),B(null)):(Y(!1),B(null));const E=new URLSearchParams;n.trim()&&E.set("location",n.trim()),d&&E.set("petType",d),w&&E.set("service",w),j&&E.set("serviceCategory",j),T.length>0&&T.forEach(x=>E.append("availabilityDay",x)),P&&E.set("availabilityTime",P),l&&E.set("minRating",l),z&&E.set("radius",z),S<100&&E.set("maxPrice",S.toString()),$&&E.set("showRelatedServices","true"),g(E)}catch(s){console.error("ð¨ Unexpected error:",s),s instanceof Error&&(s.message.includes("network")||s.message.includes("fetch")||s.message.includes("Failed to fetch"))?(B("Unerwarteter Fehler beim Suchen. Bitte versuche es erneut."),le([])):(B(null),le([]))}finally{xe(!1)}};f.useEffect(()=>{X()},[]),f.useEffect(()=>{if(a.current){a.current=!1;return}const s=setTimeout(()=>{X()},300);return()=>clearTimeout(s)},[n,d,w,j,T,P,l,z,S,$]);const ve=()=>{m(""),R(""),K(""),V([]),W(""),te(""),ae(""),ie(100),he(!1),C(""),Y(!1),B(null),ge([])},je=d||w||j||T.length>0||P||l||z||S<100||$||n.trim();return e.jsx("div",{className:"bg-gray-50 min-h-screen",children:e.jsx("div",{className:"container-custom py-8",children:e.jsxs("div",{className:"flex flex-col lg:flex-row gap-8",children:[e.jsxs("div",{className:"w-full lg:w-80 flex-shrink-0",children:[e.jsx("div",{className:"mb-6",children:e.jsx(D,{placement:"search_filter_box",targetingOptions:{petTypes:d?[d]:void 0,location:n||void 0,subscriptionType:(t==null?void 0:t.type)==="premium"?"premium":"free"}})}),e.jsxs("div",{className:"bg-white rounded-xl p-6 shadow-sm sticky top-8",children:[e.jsx("h2",{className:"text-lg font-semibold mb-6",children:"Filter"}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Standort"}),e.jsxs("div",{className:"relative",children:[e.jsx(re,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400"}),e.jsx("input",{type:"text",placeholder:"PLZ oder Stadt",className:"w-full pl-9 pr-4 py-2.5 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-transparent text-sm",value:n,onChange:s=>C(s.target.value)})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Tierart"}),e.jsxs("div",{className:"relative",children:[e.jsx(er,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400"}),e.jsx("select",{value:d,onChange:s=>m(s.target.value),className:"w-full pl-9 pr-8 py-2.5 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-transparent text-sm appearance-none bg-white",children:fe.map(s=>e.jsx("option",{value:s.value,children:s.label},s.value))}),e.jsx(oe,{className:"absolute right-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400 pointer-events-none"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Service"}),e.jsxs("div",{className:"relative",children:[e.jsx(se,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400"}),e.jsx("select",{value:w,onChange:s=>R(s.target.value),className:"w-full pl-9 pr-8 py-2.5 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-transparent text-sm appearance-none bg-white",children:be.map(s=>e.jsx("option",{value:s.value,children:s.label},s.value))}),e.jsx(oe,{className:"absolute right-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400 pointer-events-none"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Kategorie"}),e.jsxs("div",{className:"relative",children:[e.jsx(Pe,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400"}),e.jsx("select",{value:j,onChange:s=>K(s.target.value),className:"w-full pl-9 pr-8 py-2.5 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-transparent text-sm appearance-none bg-white",children:ye.map(s=>e.jsx("option",{value:s.value,children:s.label},s.value))}),e.jsx(oe,{className:"absolute right-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400 pointer-events-none"})]})]}),e.jsx("div",{children:e.jsxs(O,{variant:"outline",size:"sm",onClick:()=>Me(!ce),className:me("w-full",ce&&"bg-primary-50 border-primary-300 text-primary-700"),children:[e.jsx(Pe,{className:"h-4 w-4 mr-2"}),"Erweiterte Filter"]})}),ce&&e.jsx("div",{className:"border-t pt-6",children:e.jsx(rr,{availabilityDay:T.join(","),availabilityTime:P,minRating:l,radius:z,maxPrice:S,showRelatedServices:$,onAvailabilityDayChange:s=>V(s?s.split(",").filter(c=>c):[]),onAvailabilityTimeChange:W,onMinRatingChange:te,onRadiusChange:ae,onMaxPriceChange:ie,onShowRelatedServicesChange:he,showPriceFilter:!0,showAvailabilityFilter:!0,showServiceFilter:!0})}),je&&e.jsx("div",{className:"border-t pt-6",children:e.jsxs(O,{variant:"ghost",size:"sm",onClick:ve,className:"text-gray-600 hover:text-gray-900 w-full",children:[e.jsx(k,{className:"h-4 w-4 mr-2"}),"Alle Filter zurücksetzen"]})}),je&&e.jsxs("div",{className:"border-t pt-6",children:[e.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-3",children:"Aktive Filter:"}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[n.trim()&&e.jsxs("div",{className:"flex items-center bg-primary-100 text-primary-800 px-3 py-1 rounded-full text-sm",children:["ð ",n.trim(),e.jsx("button",{onClick:()=>C(""),className:"ml-2 hover:text-primary-900",children:e.jsx(k,{className:"h-3 w-3"})})]}),d&&e.jsxs("div",{className:"flex items-center bg-primary-100 text-primary-800 px-3 py-1 rounded-full text-sm",children:["ð¾ ",(Ne=fe.find(s=>
6s.value===d))==null?void 0:Ne.label,e.jsx("button",{onClick:()=>m(""),className:"ml-2 hover:text-primary-900",children:e.jsx(k,{className:"h-3 w-3"})})]}),w&&e.jsxs("div",{className:"flex items-center bg-primary-100 text-primary-800 px-3 py-1 rounded-full text-sm",children:["ð¼ ",(we=be.find(s=>s.value===w))==null?void 0:we.label,e.jsx("button",{onClick:()=>R(""),className:"ml-2 hover:text-primary-900",children:e.jsx(k,{className:"h-3 w-3"})})]}),j&&e.jsxs("div",{className:"flex items-center bg-primary-100 text-primary-800 px-3 py-1 rounded-full text-sm",children:["ð·ï¸ ",((Ce=ye.find(s=>s.value===j))==null?void 0:Ce.label)||j,e.jsx("button",{onClick:()=>K(""),className:"ml-2 hover:text-primary-900",children:e.jsx(k,{className:"h-3 w-3"})})]}),T.length>0&&e.jsxs("div",{className:"flex items-center bg-primary-100 text-primary-800 px-3 py-1 rounded-full text-sm",children:["ð ",T.length===1?Le(T[0]):`${T.length} Tage ausgewählt`,e.jsx("button",{onClick:()=>V([]),className:"ml-2 hover:text-primary-900",children:e.jsx(k,{className:"h-3 w-3"})})]}),P&&e.jsxs("div",{className:"flex items-center bg-primary-100 text-primary-800 px-3 py-1 rounded-full text-sm",children:["â° ",(Te=Ie.find(s=>s.value===P))==null?void 0:Te.label,e.jsx("button",{onClick:()=>W(""),className:"ml-2 hover:text-primary-900",children:e.jsx(k,{className:"h-3 w-3"})})]}),l&&e.jsxs("div",{className:"flex items-center bg-primary-100 text-primary-800 px-3 py-1 rounded-full text-sm",children:["â ",l,"+ Sterne",e.jsx("button",{onClick:()=>te(""),className:"ml-2 hover:text-primary-900",children:e.jsx(k,{className:"h-3 w-3"})})]}),z&&e.jsxs("div",{className:"flex items-center bg-primary-100 text-primary-800 px-3 py-1 rounded-full text-sm",children:["ð ",z," km Umkreis",e.jsx("button",{onClick:()=>ae(""),className:"ml-2 hover:text-primary-900",children:e.jsx(k,{className:"h-3 w-3"})})]}),S<100&&e.jsxs("div",{className:"flex items-center bg-primary-100 text-primary-800 px-3 py-1 rounded-full text-sm",children:["ð° Max. ",U(S)," (günstigste Leistung)",e.jsx("button",{onClick:()=>ie(100),className:"ml-2 hover:text-primary-900",children:e.jsx(k,{className:"h-3 w-3"})})]})]})]})]})]})]}),e.jsxs("div",{className:"flex-1",children:[t&&t.user_type==="owner"&&e.jsx("div",{className:"mb-4",children:e.jsx("div",{className:"inline-flex items-center gap-2 bg-white rounded-lg border border-gray-200 px-3 py-2 text-sm shadow-sm",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-blue-500"}),e.jsx("span",{className:"font-medium text-gray-700",children:"Kontaktanfragen:"}),e.jsxs("span",{className:"text-gray-900 font-semibold",children:[u,"/",i]})]})})}),e.jsx("div",{className:"mb-6",children:e.jsx(D,{placement:"search_filters",targetingOptions:{petTypes:d?[d]:void 0,location:n||void 0,subscriptionType:(t==null?void 0:t.type)==="premium"?"premium":"free"}})}),e.jsx("div",{className:"flex justify-between items-center mb-6",children:e.jsx("div",{children:q?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-primary-600"}),e.jsx("span",{className:"text-gray-600",children:"Suche läuft..."})]}):H?e.jsx("p",{className:"text-red-600",children:H}):e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Tierbetreuer in allen Orten"}),e.jsxs("p",{className:"text-gray-600",children:[pe," ","Betreuer verfügbar",n&&` in ${n}`]})]})})}),q&&e.jsx("div",{className:"flex justify-center py-12",children:e.jsx(qe,{})}),H&&!q&&e.jsxs("div",{className:"text-center py-12",children:[e.jsx("p",{className:"text-red-600 mb-4",children:H}),e.jsx(O,{onClick:X,children:"Erneut versuchen"})]}),!q&&!H&&He&&e.jsxs("div",{className:"text-center py-12",children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("div",{className:"text-6xl mb-4",children:"ðâð¦º"}),e.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"Wuff! Keine Betreuer gefunden"}),e.jsx("p",{className:"text-gray-600 mb-4",children:"Auch unser bester Spürhund konnte keine passenden Tierbetreuer aufspüren!"}),e.jsx("p",{className:"text-gray-500 text-sm",children:n&&`Für "${n}" haben wir leider keine passenden Betreuer.`})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-center",children:[e.jsx(O,{onClick:ve,variant:"outline",children:"Filter zurücksetzen"}),e.jsx(O,{onClick:X,children:"Erneut suchen"})]})]}),!q&&!H&&(G.length>0||$&&ne.length>0)&&e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:(()=>{const s=[];return G.forEach((c,M)=>{s.push(e.jsx(dr,{caretaker:c}
6,`caretaker-${c.id}`)),(M+1)%5===0&&s.push(e.jsx(D,{placement:"search_results",targetingOptions:{petTypes:d?[d]:void 0,location:n||void 0,subscriptionType:(t==null?void 0:t.type)==="premium"?"premium":"free"}},`ad-caretaker-${M}`))}),$&&ne.length>0&&(G.length>0&&s.push(e.jsx("div",{className:"col-span-full",children:e.jsxs("div",{className:"flex items-center my-6",children:[e.jsx("div",{className:"flex-1 border-t border-gray-300"}),e.jsx("div",{className:"px-4 text-sm font-medium text-gray-600 bg-gray-50 rounded-full",children:"Verwandte Dienstleister"}),e.jsx("div",{className:"flex-1 border-t border-gray-300"})]})},"related-header")),ne.forEach((c,M)=>{s.push(e.jsx(sr,{dienstleister:c},`dienstleister-${c.id}`)),(M+1)%5===0&&s.push(e.jsx(D,{placement:"search_results",targetingOptions:{petTypes:d?[d]:void 0,location:n||void 0,subscriptionType:(t==null?void 0:t.type)==="premium"?"premium":"free"}},`ad-dienstleister-${M}`))})),(G.length<5||G.length%5!==0)&&s.push(e.jsx(D,{placement:"search_results",targetingOptions:{petTypes:d?[d]:void 0,location:n||void 0,subscriptionType:(t==null?void 0:t.type)==="premium"?"premium":"free"}},"ad-end")),s})()})]})]})})})}function dr({caretaker:r}){const g=ke(),{user:i}=Ze(),[t,u]=f.useState(!1),[a,p]=f.useState(!1),h=o=>{o&&o.stopPropagation(),g(`/betreuer/${r.id}`)};f.useEffect(()=>{(async()=>{if(!(!i||!r.id))try{const{isFavorite:b}=await ze.isFavorite(i.id,r.id);u(b)}catch(b){console.error("Error fetching favorite status:",b)}})()},[i,r.id]);const N=async o=>{if(o.stopPropagation(),!i){g("/anmelden?redirect="+encodeURIComponent(`/betreuer/${r.id}`));return}p(!0);try{const{isFavorite:b,error:n}=await ze.toggleFavorite(i.id,r.id);if(n){console.error("Fehler beim Aktualisieren der Favoriten:",n);return}u(b)}catch(b){console.error("Unerwarteter Fehler beim Favorisieren:",b)}finally{p(!1)}},v=o=>{const b=de(o.servicesWithCategories);if(b)return`ab ${U(b.price)}${Fe(b.priceType)}`;if(o.prices&&Object.keys(o.prices).length>0){const n=De(o.prices);if(n>0)return`ab ${U(n)}/h`}return o.hourlyRate&&o.hourlyRate>0?`ab ${U(o.hourlyRate)}/h`:e.jsx("span",{title:"Preis auf Anfrage",className:"cursor-help border-b border-dotted border-current",children:"a. A."})};return e.jsx("div",{className:"card group hover:border-primary-200 transition-all duration-200 w-full max-w-sm h-full flex flex-col cursor-pointer",onClick:h,children:e.jsxs("div",{className:"relative flex flex-col h-full",children:[e.jsxs("div",{className:"relative w-full aspect-square",children:[e.jsx("img",{src:r.avatar,alt:r.name,className:"w-full h-full object-cover object-center rounded-t-xl",onError:o=>{const b=o.target;b.src=`https://ui-avatars.com/api/?name=${encodeURIComponent(r.name)}&background=f3f4f6&color=374151&size=400`}}),e.jsx("div",{className:"absolute top-2 right-2 z-10",children:i&&e.jsx("button",{onClick:N,disabled:a,className:"bg-white/90 backdrop-blur-sm rounded-full p-1.5 shadow-md hover:bg-white transition-colors disabled:opacity-50",title:t?"Aus Favoriten entfernen":"Zu Favoriten hinzufügen",children:a?e.jsx("div",{className:"w-4 h-4 border-2 border-primary-300 border-t-primary-600 rounded-full animate-spin"}):t?e.jsx(_e,{className:"h-4 w-4 text-primary-500 fill-primary-500"}):e.jsx(_e,{className:"h-4 w-4 text-gray-600 hover:text-primary-500"})})}),e.jsxs("div",{className:"absolute top-4 left-0 flex flex-col gap-2 items-start z-10",children:[r.verified&&e.jsx("div",{className:"bg-primary-500 text-white text-xs font-medium px-3 py-1 rounded-r-lg shadow-md flex items-center",children:"Verifiziert"}),r.isCommercial&&e.jsxs("div",{className:"bg-gradient-to-r from-purple-600 to-purple-700 text-white text-xs font-bold px-3 py-1 rounded-r-lg shadow-md flex items-center",children:[e.jsx(se,{className:"h-3 w-3 mr-1"})," Pro"]}),r.short_term_available&&e.jsxs("div",{className:"bg-gradient-to-r from-green-500 to-green-600 text-white text-xs font-semibold px-3 py-1 rounded-r-lg shadow-md flex items-center",children:[e.jsx(Q,{className:"h-3 w-3 mr-1"})," Kurzfristig"]})]})]}),e.jsxs("div",{className:"p-5 bg-white rounded-b-xl flex flex-col flex-1",children:[e.jsxs("div",{className:"flex justify-between items-start mb-3",children:[e.jsxs("div",{className:"flex-1 min-w-0 mr-3",children:[e.jsx("h3",{className:"font-semibold text-base group-hover:text-primary-600 transition-colors truncate",title:r.name,children:r.name}),e.jsxs("p",{className:"text-gray-600 text-xs flex items-center truncate",title:r.location,children:[e.jsx(re,{className:"h-3 w-3 mr-1 flex-shrink-0"}),e.jsx("span",{className:"truncate",children:r.location})]})]}),e.jsxs("div",{className:"flex items-center flex-shrink-0",children:[e.jsx(ee,{className:"h-4 w-4 text-yellow-500 fill-yellow-500 mr-1"}),e.jsx("span",{className:"font-medium text-sm",children:r.rating>0?r.rating.toFixed(1):"â"}),e.jsxs("span",{className:"text-gray-500 text-xs ml-1",children:["(",r.reviewCount,")"]})]})]}),e.jsx("p",{className:"text-gray-700 text-sm mb-4 line-clamp-3 leading-relaxed flex-1",children:r.bio}),e.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[r.services.slice(0,3).map(o=>e.jsx("span",{className:"text-xs font-medium bg-gray-100 text-gray-800 px-2 py-1 rounded-full",children:o},o)),r.services.length>3&&e.jsxs("span",{className:"text-xs font-medium bg-gray-100 text-gray-800 px-2 py-1 rounded-full",children:["+",r.services.length-3]})]}),e.jsxs("div",{className:"mt-auto space-y-3",children:[e.jsx("p",{className:"font-semibold text-primary-600 text-sm text-center",children:v(r)}),e.jsx(O,{variant:"primary",size:"sm",className:"w-full",onClick:h,children:"Profil ansehen"})]})]})]})})}export{kr as default};
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.