PageSourceSearch

https://bienetre-connect.fr/assets/Search-o7hJL9VG.js

js bienetre-connect.fr collected 2026-10-09 22:00:54 UTC 42,240 bytes, 22 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/PractitionerMap-D5xnL780.js","assets/shield-check-B4bOhH5m.js","assets/main-Dww2uteL.js","assets/main-D7Azziq3.css","assets/leaflet-BChUUBGG.js","assets/leaflet-Dgihpmma.css","assets/card-CTsF48jq.js","assets/listingLinks-BXj6FxpY.js","assets/Popup-C9lVW7uL.js","assets/hooks-CAgUkFux.js","assets/PractitionerMap-3yaWYNWa.css","assets/NoResultsEmailCapture-BUHRcidg.js","assets/entry-standard-CSk4ffYh.js","assets/bell-DcdRk_2b.js","assets/mail-BaeOzDR3.js","assets/loader-circle-B8OoRwLc.js"])))=>i.map(i=>d[i]);
2var gt=Object.defineProperty;var mt=(d,r,n)=>r in d?gt(d,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):d[r]=n;var Me=(d,r,n)=>mt(d,typeof r!="symbol"?r+"":r,n);import{_ as et}from"./main-Dww2uteL.js";import{s as Y,r as L,w as ft,o as yt,j as p,m as Qe}from"./shield-check-B4bOhH5m.js";import{S as xt}from"./SEOHead-CoelFdAX.js";import{f as vt,g as St}from"./practitionerHighlightStatus-DsLitrz7.js";import{c as me,g as Ve,a as Ge}from"./locationSearch-CwxbZbdW.js";import{V as wt}from"./VirtualizedSearchResults-klM-ZwWS.js";import{S as _t}from"./SearchBar-CYM1S3yC.js";import{b as Ye}from"./entry-standard-CSk4ffYh.js";import{g as Je,t as bt}from"./imageUtils-BBWPxVvL.js";import{P as Lt,a as Ct,b as fe,c as Nt,d as Fe,e as Ze,f as Rt}from"./pagination-CK-7lVl8.js";import"./publicMedia-DsdXLuIw.js";import"./SearchResultItem-DfUYFEO7.js";import"./badge-DDlORjf3.js";import"./card-CTsF48jq.js";import"./ImageCarousel-S7_W0tEo.js";import"./carousel--gjqHtOJ.js";import"./arrow-left-DqfiAIsa.js";import"./arrow-right-CvPUcPws.js";import"./image-BjZKKys_.js";import"./play-irNBgNkS.js";import"./chevron-left-CGqWo3G8.js";import"./default-practitioner-image-BdtoANXj.js";import"./youtube-CUFkUgj6.js";import"./listingLinks-BXj6FxpY.js";import"./star-957qu7ee.js";import"./clock-DwPFL5EK.js";import"./button-fixed-Je_VkC_d.js";import"./LocationAutocomplete-9gG6dAIQ.js";import"./loader-circle-B8OoRwLc.js";import"./navigation-wN3DSxzb.js";import"./trash-2-BFU13Ma5.js";import"./ellipsis-D1teTs68.js";const Pt=d=>{const r=d.match(/(Chrome|Firefox|Safari|Edge|Opera|MSIE|Trident)[\/\s]?(\d+)/i),n=r?`${r[1]}/${r[2]}`:"Unknown",e=d.match(/\(([^)]+)\)/),t=e?e[1].split(";")[0].trim():"Unknown";return`${n} (${t})`},$t=async d=>{try{let r=sessionStorage.getItem("search_session_id");r||(r=crypto.randomUUID(),sessionStorage.setItem("search_session_id",r));const{data:{user:n}}=await Y.auth.getUser(),{error:e}=await Y.from("search_logs").insert({search_type:d.searchType,query_text:d.queryText||null,specialty:d.specialty||null,location:d.location||null,latitude:d.latitude||null,longitude:d.longitude||null,radius_km:d.radiusKm||null,results_count:d.resultsCount||null,user_id:(n==null?void 0:n.id)||null,session_id:r,user_agent:Pt(navigator.userAgent),referrer:document.referrer||null});e&&console.warn("Failed to log search:",e.message)}catch(r){console.warn("Search logging error:",r)}},Tt=(d,r,n,e)=>{const t=!!d&&d.trim().length>0,s=!!r&&r.trim().length>0,o=!!n&&n.trim().length>0||e;return(t||s)&&o?"combined":o?"location":s?"specialty":"general"};class jt{constructor(r){Me(this,"items");Me(this,"baseRadius",15);this.items=r}fuzzyMatch(r,n){const e={sophrologie:["sophrologue","sophrolog"],psychologie:["psychologue","psycholog","psy"],ostéopathie:["ostéopathe","osteopath","ostéo"],kinésithérapie:["kinésithérapeute","kiné","kinesi","physiothérapeute"],nutrition:["nutritionniste","diététicien","dieteticien"],hypnose:["hypnothérapeute","hypnotiseur"],naturopathie:["naturopathe"],acupuncture:["acupuncteur"],réflexologie:["réflexologue","reflexologue"],massage:["masseur","masseuse","massothérapeute"],magnétisme:["magnétiseur","magnétiseuse","thérapeute énergétique","énergéticien"],énergétique:["énergéticien","thérapeute énergétique","magnétiseur"],homéopathie:["homéopathe"],shiatsu:["praticien shiatsu","thérapeute shiatsu"],reiki:["maître reiki","praticien reiki"],coaching:["coach","accompagnateur"],développement:["coach développement personnel","thérapeute"],art:["art-thérapeute","créativité"],yoga:["professeur yoga","yogathérapeute"]};for(const[t,s]of Object.entries(e))if(r.includes(t))return s.some(o=>n.includes(o)||o.includes(n));return Math.abs(r.length-n.length)<=2?this.levenshteinDistance(r,n)<=2:!1}levenshteinDistance(r,n){const e=Array(n.length+1).fill(null).map(()=>Array(r.length+1).fill(null));for(let t=0;t<=r.length;t++)e[0][t]=t;for(let t=0;t<=n.length;t++)e[t][0]=t;for(let t=1;t<=n.length;t++)for(let s=1;s<=r.length;s++){const o=r[s-1]===n[t-1]?0:1;e[t][s]=Math.min(e[t][s-1]+1,e[t-1][s]+1,e[t-1][s-1]+o)}return e[n.length][r.length]}async search(r,n,e){if(console.log("🎯 Starting optimized practitioner search:",{locationKeywords:r,other
2Keywords:n,userLocation:e,totalItems:this.items.length}),n.length>0){console.log("👤 PRIORITÉ ABSOLUE: Recherche par nom de praticien");const a=await this.searchByPractitionerName(n);if(a.results.length>0)return console.log(`✅ ${a.results.length} praticiens trouvés par nom - ARRÊT DE LA RECHERCHE`),a;console.log("❌ Aucun praticien trouvé par nom")}if(n.length>0){console.log("🎯 PRIORITÉ 2: Recherche par spécialité/pratique");const a=await this.searchBySpecialty(n);if(a.results.length>=3)return console.log(`✅ ${a.results.length} praticiens trouvés par spécialité - RÉSULTATS SUFFISANTS`),a;a.results.length>0&&console.log(`⚠️ Seulement ${a.results.length} praticiens trouvés par spécialité - CONTINUER LA RECHERCHE`)}let t=null,s=null;const o=async(a,x)=>(console.log(`📍 Recherche géographique (${x}) - rayon ${this.baseRadius}km`),t=a,s=await this.searchByUserLocation(a,n,this.baseRadius),s.results.length>0?(console.log(`✅ ${s.results.length} praticiens trouvés (${x}) dans un rayon de ${this.baseRadius}km`),!0):(console.log(`❌ Aucun praticien trouvé (${x}) dans un rayon de ${this.baseRadius}km`),!1));if(e&&r.length===0&&await o(e,"localisation utilisateur")&&s)return s;if(r.length>0){console.log("📍 PRIORITÉ 3: Recherche géographique");let a=null;for(const x of r)try{const l=await this.geocodeLocation(x);if(l){a=l,console.log("✅ Géocodage réussi:",x,"→",l);break}}catch(l){console.warn("❌ Échec géocodage:",x,l)}if(a&&await o(a,`mot-clé localisation: ${a.city||a.address||"inconnu"}`)&&s)return console.log("✅ PRIORITÉ 3 Réussie: Résultats géographiques"),s;if(!t&&e&&await o(e,"fallback localisation utilisateur")&&s)return s}if(t&&(!s||s.results.length===0)){console.log("🔍 Aucun résultat à 15km - tentative avec rayon élargi");const a=await this.searchWithExpandedRadius(t,n);if(a.results.length>0)return console.log("✅ Résultats trouvés après élargissement du rayon"),a}return console.log("🔄 PRIORITÉ 4: Recherche combinée flexible - TOUJOURS RETOURNER DES RÉSULTATS"),await this.searchCombinedFlexible(n,e)}async searchByPractitionerName(r){let n=[];return this.items.forEach(e=>{let t=0,s=[];r.forEach(o=>{var a,x,l,j,I,N,C;const m=o.toLowerCase();if(((a=e.practitionerFirstName)==null?void 0:a.toLowerCase())===m?(t+=300,s.push(`Exact first name: ${o}`)):(x=e.practitionerFirstName)!=null&&x.toLowerCase().includes(m)&&(t+=250,s.push(`First name contains: ${o}`)),((l=e.practitionerLastName)==null?void 0:l.toLowerCase())===m?(t+=300,s.push(`Exact last name: ${o}`)):(j=e.practitionerLastName)!=null&&j.toLowerCase().includes(m)&&(t+=250,s.push(`Last name contains: ${o}`)),(I=e.practitionerName)!=null&&I.toLowerCase().includes(m)&&(t+=200,s.push(`Full name match: ${o}`)),e.practitionerFirstName){const y=e.practitionerFirstName.toLowerCase(),T=this.levenshteinDistance(y,m);T===1?(t+=180,s.push(`Fuzzy first name (1 char diff): ${o}`)):T===2&&y.length>4&&(t+=120,s.push(`Fuzzy first name (2 chars diff): ${o}`))}if(e.practitionerLastName){const y=e.practitionerLastName.toLowerCase(),T=this.levenshteinDistance(y,m);T===1?(t+=180,s.push(`Fuzzy last name (1 char diff): ${o}`)):T===2&&y.length>4&&(t+=120,s.push(`Fuzzy last name (2 chars diff): ${o}`))}o.length>=3&&((N=e.practitionerFirstName)!=null&&N.toLowerCase().startsWith(m)&&(t+=160,s.push(`First name starts with: ${o}`)),(C=e.practitionerLastName)!=null&&C.toLowerCase().startsWith(m)&&(t+=160,s.push(`Last name starts with: ${o}`)))}),t>0&&n.push({...e,relevanceScore:t,matchType:"name_match",matchDetails:s})}),n.sort((e,t)=>t.relevanceScore-e.relevanceScore),console.log(`👤 Name search found ${n.length} practitioners`),{results:n,phase:"name_search",resultCount:n.length}}async searchBySpecialty(r){let n=[];return this.items.forEach(e=>{let t=0,s=[];r.forEach(o=>{var a,x,l;const m=o.toLowerCase();(e.specialties||[]).forEach(j=>{const I=j.toLowerCase();I.includes(m)||m.includes(I)?(t+=120,s.push(`Exact specialty match: ${j}`)):this.fuzzyMatch(I,m)&&(t+=100,s.push(`Fuzzy specialty match: ${j}`))}),((a=e.practice)!=null&&a.toLowerCase().includes(m)||(x=e.main_practice)!=null&&x.toLowerCase().includes(m))&&(t+=110,s.push(`Practice match: ${o}
2`)),(e.motifs||[]).forEach(j=>{(j.toLowerCase().includes(m)||m.includes(j.toLowerCase()))&&(t+=90,s.push(`Motif match: ${j}`))}),(l=e.title)!=null&&l.toLowerCase().includes(m)&&(t+=80,s.push(`Title match: ${o}`))}),t>0&&n.push({...e,relevanceScore:t,matchType:"specialty_match",matchDetails:s})}),n.sort((e,t)=>t.relevanceScore-e.relevanceScore),{results:n,phase:"specialty_search",resultCount:n.length}}async searchCombinedFlexible(r,n){let e=[];return this.items.forEach(t=>{let s=5,o=["Available practitioner"];if(r.length>0){const m=[t.title,t.practice,t.main_practice,...t.specialties||[],...t.motifs||[],...t.tags||[],t.practitionerName,t.practitionerFirstName,t.practitionerLastName].filter(Boolean).join(" ").toLowerCase();r.forEach(a=>{var j,I;const x=a.toLowerCase();if(m.includes(x)&&(s+=50,o.push(`Exact content match: ${a}`)),a.length>=4){const N=a.substring(0,3),C=a.substring(0,4);m.includes(C)?(s+=25,o.push(`4-char partial: ${C}`)):m.includes(N)&&(s+=15,o.push(`3-char partial: ${N}`))}((j=t.practitionerFirstName)!=null&&j.toLowerCase().includes(x)||(I=t.practitionerLastName)!=null&&I.toLowerCase().includes(x))&&(s+=40,o.push(`Name partial match: ${a}`)),m.split(/\s+/).forEach(N=>{(N.includes(x)||x.includes(N))&&(s+=10)})})}if(n&&t.latitude&&t.longitude){const m=me(n.lat,n.lng,t.latitude,t.longitude);if(m<=100){const a=Math.max(0,(100-m)/100*30);s+=a,o.push(`Within ${Math.round(m)}km`)}}e.push({...t,relevanceScore:s,matchType:"fallback",matchDetails:o})}),e.sort((t,s)=>s.relevanceScore-t.relevanceScore),console.log(`🔄 Combined flexible search: ${e.length} practitioners available`),{results:e,phase:"combined_flexible",resultCount:e.length}}async strictLocationAndKeywordSearch(r,n,e){console.log("🎯 Recherche stricte: Géographique + Mots-clés",{location:`${r.city||"Unknown"} (${r.lat}, ${r.lng})`,keywords:n,radiusKm:e});let t=[];const s=this.items.filter(o=>!o.latitude||!o.longitude?!1:me(r.lat,r.lng,o.latitude,o.longitude)<=e);return console.log(`📍 ${s.length} fiches trouvées dans un rayon de ${e}km`),n.length>0?s.forEach(o=>{const m=me(r.lat,r.lng,o.latitude,o.longitude);let a=0,x=[`Dans rayon ${e}km`];const l=[o.title,...o.specialties||[],...o.motifs||[],o.practitionerName].filter(Boolean).join(" ").toLowerCase();let j=0;n.forEach(N=>{var T,E,X;const C=N.toLowerCase();let y=!1;l.includes(C)?(a+=100,x.push(`Exact match: ${N}`),y=!0):(T=o.practitionerName)!=null&&T.toLowerCase().includes(C)||(E=o.practitionerFirstName)!=null&&E.toLowerCase().includes(C)||(X=o.practitionerLastName)!=null&&X.toLowerCase().includes(C)?(a+=120,x.push(`Practitioner name match: ${N}`),y=!0):(o.specialties||[]).some(B=>this.fuzzyMatch(B.toLowerCase(),C))?(a+=90,x.push(`Fuzzy specialty match: ${N}`),y=!0):(o.specialties||[]).some(B=>B.toLowerCase().includes(C)||C.includes(B.toLowerCase()))&&(a+=85,x.push(`Partial specialty match: ${N}`),y=!0),y&&j++});const I=n.length>0?j/n.length:1;if(I>=.25||a>0){const N=Math.max(0,(e-m)/e*25),C=I*50,y=a+N+C;t.push({...o,distance:m,relevanceScore:y,matchType:"location_exact",matchDetails:x})}}):t=s.map(o=>{const m=me(r.lat,r.lng,o.latitude,o.longitude),a=Math.max(0,(e-m)/e*50);return{...o,distance:m,relevanceScore:50+a,matchType:"location_exact",matchDetails:[`Dans rayon ${e}km`]}}),t.sort((o,m)=>o.relevanceScore!==m.relevanceScore?m.relevanceScore-o.relevanceScore:o.distance!==void 0&&m.distance!==void 0?o.distance-m.distance:0),console.log(`🎯 Recherche stricte terminée: ${t.length} résultats finaux`),n.length>0&&console.log(`✅ Toutes les fiches contiennent: ${n.join(" + ")}`),{results:t,phase:"location_priority",resultCount:t.length,searchRadius:e}}async searchByUserLocation(r,n,e){let t=[];return this.items.forEach(s=>{if(!s.latitude||!s.longitude)return;const o=me(r.lat,r.lng,s.latitude,s.longitude);if(o<=e){let m=0,a=[`Within ${e}km of user location`];const x=[s.title,s.practice,s.main_practice,...s.specialties||[],...s.motifs||[],...s.tags||[],s.practitionerName,s.practitionerFirstName,s.practitionerLastName].filter(Boolean).join(" ").toLowerCase();n.forEach(N=>{var E,X,B,ce,K,le;const C=N.toLowerCase();let y=0,T="";(E=s.practitionerFirstName)!=null&&E.toLowerCase().includes(C)||(X=s.practitionerLastName)!=null&&X.toLowerCase().includes(C)||(B=s.practitionerName)!=null&&B.toLowerCase().includes(C)?(y=150,T="practitioner name"):(s.specialties||[]).some(H=>H.toLowerCase().includes(C)||C.includes(H.toLowerCase())||this.fuzzyMatch(H.toLowerCase(),C))?(y=120,T="specialty"):(ce=s.practice)!=null&&ce.toLowerCase().includes(C)||(K=s.main_practice)!=null&&K.toLowerCase().includes(C)?(y=110,T="practice"):(le=s.title)!=null&&le.toLowerCase().includes(C)?(y=90,T="title"):(s.motifs||[]).some(H=>H.toLowerCase().includes(C)||C.includes(H.toLowerCase()))?(y=80,T="motif"):(s.tags||[]).some(H=>H.toLowerCase().includes(C)||C.includes(H.toLowerCase()))?(y=70,T="tag"):x.includes(C)&&(y=50,T="general content"),y>0&&(m+=y,a.push(`${T} match: ${N}`))});const l=75,j=Math.max(0,(e-o)/e*25),I=l+j+m;
2t.push({...s,distance:o,relevanceScore:I,matchType:"location_nearby",matchDetails:a})}}),t.sort((s,o)=>o.relevanceScore-s.relevanceScore),{results:t,phase:"keyword_filter",resultCount:t.length,searchRadius:e}}async searchWithExpandedRadius(r,n){const e=[30,50,100];for(const t of e){console.log(`🔍 Essai avec rayon élargi: ${t}km`);const s=await this.searchByUserLocation(r,n,t);if(s.results.length>=3)return console.log(`✅ ${s.results.length} résultats trouvés avec rayon ${t}km`),{...s,phase:"expanded_radius",searchRadius:t}}return{results:[],phase:"expanded_radius",resultCount:0,searchRadius:100}}async searchByKeywordsOnly(r){let n=[];return r.length===0?n=this.items.map(e=>({...e,relevanceScore:25,matchType:"fallback",matchDetails:["No specific criteria - showing all practitioners"]})):this.items.forEach(e=>{let t=0,s=[];const o=[e.title,e.practice,e.main_practice,...e.specialties||[],...e.motifs||[],...e.tags||[],e.practitionerName,e.practitionerFirstName,e.practitionerLastName].filter(Boolean).join(" ").toLowerCase();r.forEach(m=>{var j,I,N,C,y,T;const a=m.toLowerCase();let x=0,l="";(j=e.practitionerFirstName)!=null&&j.toLowerCase().includes(a)||(I=e.practitionerLastName)!=null&&I.toLowerCase().includes(a)||(N=e.practitionerName)!=null&&N.toLowerCase().includes(a)?(x=100,l="practitioner name"):(e.specialties||[]).some(E=>E.toLowerCase().includes(a)||a.includes(E.toLowerCase())||this.fuzzyMatch(E.toLowerCase(),a))?(x=85,l="specialty"):(C=e.practice)!=null&&C.toLowerCase().includes(a)||(y=e.main_practice)!=null&&y.toLowerCase().includes(a)?(x=75,l="practice"):(T=e.title)!=null&&T.toLowerCase().includes(a)?(x=65,l="title"):(e.motifs||[]).some(E=>E.toLowerCase().includes(a)||a.includes(E.toLowerCase()))?(x=60,l="motif"):(e.tags||[]).some(E=>E.toLowerCase().includes(a)||a.includes(E.toLowerCase()))?(x=55,l="tag"):o.includes(a)&&(x=30,l="general content"),x>0&&(t+=x,s.push(`${l} match: ${m}`))}),(t>0||r.length===0)&&n.push({...e,relevanceScore:Math.max(t,10),matchType:"keyword_match",matchDetails:s.length>0?s:["Available practitioner"]})}),n.sort((e,t)=>t.relevanceScore-e.relevanceScore),{results:n,phase:"keyword_only",resultCount:n.length}}async geocodeLocation(r){var n,e,t,s,o;try{const m=encodeURIComponent(`${r}, France`),a=await fetch(`https://nominatim.openstreetmap.org/search?format=json&q=${m}&limit=1&countrycodes=fr&addressdetails=1`);if(!a.ok)return console.error("Erreur lors du géocodage:",a.statusText),null;const x=await a.json();if(x&&x.length>0){const l=x[0];return{lat:parseFloat(l.lat),lng:parseFloat(l.lon),city:((n=l.address)==null?void 0:n.city)||((e=l.address)==null?void 0:e.town)||((t=l.address)==null?void 0:t.village)||l.display_name.split(",")[0],address:l.display_name,postalCode:(s=l.address)==null?void 0:s.postcode,country:(o=l.address)==null?void 0:o.country}}return null}catch(m){return console.error("Erreur lors du géocodage:",m),null}}}async function tt(d,r={}){const{city:n,limit:e=50}=r;if(!d.trim())return[];try{const{data:t,error:s}=await Y.rpc("search_listings_fts",{search_query:d.trim(),search_city:n||null,search_limit:e});return s?(console.error("FTS search error:",s),[]):t||[]}catch(t){return console.error("FTS search exception:",t),[]}}async function Et(d,r={}){const{centerLat:n,centerLng:e,radiusKm:t=50,limit:s=50}=r;if(!d.trim())return[];try{const{data:o,error:m}=await Y.rpc("search_listings_fts_with_location",{search_query:d.trim(),center_lat:n??null,center_lng:e??null,radius_km:t,search_limit:s});return m?(console.error("FTS with location search error:",m),await tt(d,r)):o||[]}catch(o){return console.error("FTS with location search exception:",o),[]}}const qe={stress:["anxiété","tension","angoisse","nervosité","pression","burn-out","burnout"],dos:["lombaire","dorsale","colonne","vertébrale","rachis","lombalgie","sciatique"],massage:["massothérapie","modelage","relaxation","massage bien-être"],douleur:["mal","souffrance","algique","douleurs","chronique"],sommeil:["insomnie","dormir","repos","fatigue","troubles du sommeil"],poids:["minceur","maigrir","obésité","surpoids","régime","amincissement"],grossesse:["enceinte","maternité","prénatal","postnatal","périnatal","post-partum"],enfant:["enfants","bébé","pédiatrique","adolescent","jeune","nourrisson"],senior:["âgé","retraité","vieillissement","personnes âgées","3ème âge"],sport:["sportif","athlète","performance","récupération","préparation physique"],émotion:["émotionnel","émotions","sentiment","affectif","gestion des émotions"],trauma:["traumatisme","choc","ptsd","traumatique","stress post-traumatique"],dépression:["déprime","tristesse","mélancolie","burn-out","épuisement"],confiance:["estime","assertivité","affirmation","estime de soi"],relation:["couple","famille","relationnel","communication","conjugal"],kinésiologie:["kinésiologue","kinésio","kinesio","kinesiologie"],ostéopathie:["ostéopathe","ostéo","osteopathe","osteopathie"],naturopathie:["naturopathe","naturo","naturopathique"],sophrologie:["sophrologue","sophro","relaxation dynamique"],hypnose:["hypnothérapeute","hypnothérapie","hypnotique","hypnose ericksonienne"],acupuncture:["acupuncteur","médecine chinoise","acupression","MTC"],yoga:["yogathérapie","yogathérapeute","hatha yoga","yoga thérapeutique"],méditation:["pleine conscience","mindfulness","méditer","relaxation"],reflexologie:["réflexologue","réflexologie","reflexologie plantaire"],reiki:["énergéticien","soins énergétiques","énergie","rééquilibrage"],magnétisme:["magnétiseur","magnetiseur","magnetisme","soins magnétiques","passes magnétiques"],shiatsu:["massage shiatsu","shiatsu-ki","acupression","digipuncture","do-in"],aromathérapie:["aromatherapeute","huiles essentielles","aromatherapie","aromatologie"],ayurveda:["ayurvédique","médecine ayurvédique","ayurvedique","massage ayurvédique"],chiropractie:["chiropracteur","chiropraxie","chiropraticien","chiropracteur"],énergétique:["soins énergétiques","energeticien","énergéticien","soin energetique","rééquilibrage énergétique"],lithothérapie:["pierres","cristaux","cristallothérapie","minéraux"],EFT:["emotional freedom technique","technique de libération émotionnelle","tapping"],PNL:["programmation neuro-linguistique","neuro-linguistique"],EMDR:["désensibilisation","mouvements oculaires","traumatisme"],"access bars":["access consciousness","bars","access"],psychothérapie:["psychothérapeute","psychotherapeute","thérapie","psy"],fasciathérapie:["fasciathérapeute","fascias","fascia"],chromothérapie:["couleurs","thérapie par les couleurs","chromotherapie"]};function Xe(d){const r=d.toLowerCase().split(/\s+/).filter(e=>e.length>1),n=new Set(r);for(const e of r){qe[e]&&qe[e].forEach(t=>n.add(t.toLowerCase()));for(const[t,s]of Object.entries(qe))(e.includes(t)||t.includes(e))&&s.forEac
2h(o=>n.add(o.toLowerCase()))}return Array.from(n)}const Mt=d=>{if(!d||!/^\d+$/.test(d))return 1;const r=Number.parseInt(d,10);return Number.isSafeInteger(r)&&r>0?r:1},Ke=(d,r)=>{const n=new URLSearchParams(d);r<=1?n.delete("page"):n.set("page",String(r));const e=n.toString();return`/rechercher${e?`?${e}`:""}`},Ft=d=>{const r=new URLSearchParams(d);return r.delete("page"),r.toString().length>0},qt=L.lazy(()=>et(()=>import("./PractitionerMap-D5xnL780.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]))),At=L.lazy(()=>et(()=>import("./NoResultsEmailCapture-BUHRcidg.js"),__vite__mapDeps([11,1,2,3,12,13,14,15]))),Ss=()=>{const[d,r]=ft(),[n,e]=L.useState([]),[t,s]=L.useState(!0),[o,m]=L.useState(null),[a,x]=L.useState({distance:25,sessionTypes:[],priceRange:[0,500],practices:[]}),[l,j]=L.useState(null),[I,N]=L.useState(null),C=Mt(d.get("page")),[y,T]=L.useState(C),[E,X]=L.useState(0),[B,ce]=L.useState([]),[K,le]=L.useState([]),[H,ye]=L.useState([]),[It,Ae]=L.useState(),[zt,Ie]=L.useState(null),[Ut,ue]=L.useState(null),ve=L.useRef(null),ze=L.useRef(null),[Se,st]=L.useState(0),[we,at]=L.useState(!1),[_e,Ue]=L.useState(!1),be=20;yt();const ke=L.useRef(null),ee=L.useCallback(u=>{const h=ke.current;(!h||h.lat!==u.lat||h.lng!==u.lng||h.label!==u.label)&&(j(u),ke.current=u)},[]),D=d.get("specialty")||"",U=d.get("location")||"",O=d.get("q")||"",Q=d.get("lat"),V=d.get("lng"),he=d.get("practice")||"",Le=[d.get("session_type"),d.get("sessionTypes")].filter(u=>!!(u&&u.trim().length>0)).join(","),te=d.get("patient_gender")||"",ie=d.get("audience")||"";L.useEffect(()=>{x(u=>({...u,practices:he?[he]:[]}))},[he]),L.useEffect(()=>{const u=Le?Array.from(new Set(Le.split(",").map(h=>h.trim()).filter(h=>h==="in-person"||h==="virtual"||h==="both"))):[];x(h=>{const w=h.sessionTypes.length===u.length,g=w?u.every(R=>h.sessionTypes.includes(R)):!1;return w&&g?h:{...h,sessionTypes:u}})},[Le]),L.useEffect(()=>{if(Q&&V){const u={lat:parseFloat(Q),lng:parseFloat(V),label:U||void 0};ee(u),N(u)}},[Q,V,U,ee]);const De=L.useCallback(async(u,h)=>{e([]),ce([]),X(0),T(1),ye([]),ue(null),Ie(null),s(!0);const w=new URLSearchParams(d);if(u?w.set("q",u):w.delete("q"),w.delete("page"),h){w.set("location",h);try{const g=await Ve(h);g&&(N(g),ee(g),w.set("lat",g.lat.toString()),w.set("lng",g.lng.toString()))}catch(g){console.error("Erreur lors du géocodage:",g)}}else w.delete("location"),w.delete("lat"),w.delete("lng"),N(null);r(w)},[d,r,ee]),rt=L.useCallback(u=>{const h=u.label||"Position actuelle",w={lat:u.lat,lng:u.lng,label:h};ee(w),N(w);const g=new URLSearchParams(d);g.set("lat",u.lat.toString()),g.set("lng",u.lng.toString()),g.set("location",h),g.delete("page"),r(g)},[d,r,ee]);L.useEffect(()=>{T(C)},[C]),L.useEffect(()=>{const u=()=>{ve.current&&st(ve.current.offsetHeight),typeof window<"u"&&at(window.innerWidth>=1280)};return u(),window.addEventListener("resize",u),()=>window.removeEventListener("resize",u)},[]);const Ce=Se&&we?`calc(100vh - ${Se}px)`:"100vh",pe=we?Ce:"600px",it=we?{position:"sticky",top:Se||0,height:Ce,maxHeight:Ce,width:"100%"}:{height:pe};L.useEffect(()=>{if(_e)return;const u=ze.current;if(!u)return;if(typeof IntersectionObserver>"u"){Ue(!0);return}const h=new IntersectionObserver(([w])=>{w!=null&&w.isIntersecting&&(Ue(!0),h.disconnect())},{rootMargin:"360px 0px"});return h.observe(u),()=>h.disconnect()},[_e,t]),L.useEffect(()=>{(async()=>{console.log("🔍 Starting search with params:",{specialty:D,location:U,query:O}),s(!0),m(null),le([]);try{const h=O.trim(),w=h?Date.now():void 0;let g=null,R=[],M=[],k=null,G=!1;if(h){g=Ge(h),Ie(g),R=Xe(h);const c=Q&&V||(l==null?void 0:l.lat)&&(l==null?void 0:l.lng),i=Q?parseFloat(Q):l==null?void 0:l.lat,v=V?parseFloat(V):l==null?void 0:l.lng;G=!!(c&&i&&v),G&&i&&v?M=await Et(h,{centerLat:i,centerLng:v,radiusKm:a.distance||50,limit:1e3}):M=await tt(h,{city:g.isLocationQuery?g.locationKeywords.join(" "):void 0,limit:1e3}),M.length>0&&(k=M.map(P=>P.id))}const ne=c=>{let i=c;if(k&&k.length>0&&(i=i.in("id",k)),D&&(i=i.contains("specialties",[D])),he&&(i=i.contains("specialties",[he])),a.sessionTypes.length>0){const b=a.sessionTypes.filter(f=>f==="in-person"||f==="virtual"||f==="both");b.length>0&&(b.includes("both")||b.includes("in-person")&&b.includes("virtual")?i=i.or(`session_type.in.(${b.join(",")}),session_type.eq.both`):i=i.in("session_type",b))}
2if(a.priceRange[0]>0&&(i=i.gte("price",a.priceRange[0])),a.priceRange[1]<500&&(i=i.lte("price",a.priceRange[1])),ie){const b=ie==="adult-senior"?["adulte","adults","senior","seniors","personne agee","personnes agees","3eme age","troisieme age","retraite"]:["enfant","enfants","jeun","ado","adolesc","bebe","bébé","nourrisson","petite enfance"];i=i.overlaps("target_audiences",b)}if(te==="female"||te==="male"){const b=te==="female"?["femme","femin"]:["homme","mascul"];i=i.overlaps("target_audiences",b)}const v=Q!==null&&V!==null,P=typeof(l==null?void 0:l.lat)=="number"&&typeof(l==null?void 0:l.lng)=="number";return U&&!v&&!P&&(i=i.ilike("city",`%${U}%`)),i},ae=1e3;let A=[],J=null;for(let c=0;c<20;c++){const i=c*ae,v=i+ae-1,{data:P,error:b}=await ne(Y.from("listings").select(`
3                id,
4                slug,
5                title,
6                description,
7                practice,
8                specialties,
9                motifs,
10                tags,
11                target_audiences,
12                city,
13                address,
14                postal_code,
15                price,
16                duration,
17                session_type,
18                latitude,
19                longitude,
20                practitioner_id,
21                images
22              `).eq("status","published").order("created_at",{ascending:!1})).range(i,v);if(b){J=b;break}const f=P||[];if(A=A.concat(f),f.length<ae)break}if(J)throw J;if(A.length>0){const c=[...new Set(A.map(i=>i.practitioner_id).filter(Boolean))];if(c.length>0){const{data:i}=await Y.from("users").select("id").in("id",c).eq("shadow_banned",!0),v=new Set((i||[]).map(P=>P.id));v.size>0&&(A=A.filter(P=>!v.has(P.practitioner_id)))}}const ge=h?[]:A.filter(c=>c.latitude!=null&&c.longitude!=null);console.log("📋 Retrieved",(A==null?void 0:A.length)||0,"listings");let xe={},Re={},Oe={},He={},Pe={};if(A&&A.length>0){const c=[...new Set(A.map(_=>_.practitioner_id))],i=A.map(_=>_.id),v=Y.from("practitioner_profiles").select("id, user_id, presentation_video_url").in("user_id",c).then(_=>_,_=>({error:_})),P=v.then(async _=>{if(_!=null&&_.error||!Array.isArray(_==null?void 0:_.data))return{data:[]};const $=_.data.map(oe=>oe.id).filter(Boolean);if($.length===0)return{data:[]};const{data:W,error:re}=await Y.from("practitioner_google_locations").select("practitioner_id, average_rating, total_reviews").in("practitioner_id",$).eq("sync_enabled",!0).gt("total_reviews",0);return re?{data:[]}:{data:W||[]}}),[b,f,S,z,Z]=await Promise.all([Y.from("public_practitioners").select("id, first_name, last_name, email, address, main_practice, siret, phone, profile_image_url, avatar_url, slug").in("id",c).then(_=>_,_=>({error:_})),v,vt(c).catch(()=>({})),Y.from("reviews").select("listing_id, rating").in("listing_id",i).eq("status","approved").then(_=>_,_=>({error:_})),P]);if(!(b!=null&&b.error)&&(b!=null&&b.data)&&(xe=b.data.reduce((_,$)=>(_[$.id]=$,_),{})),!(f!=null&&f.error)&&(f!=null&&f.data)&&(Re=f.data.reduce((_,$)=>(_[$.user_id]=$,_),{})),He=S||{},!(z!=null&&z.error)&&Array.isArray(z==null?void 0:z.data)&&z.data.length>0){const _={};z.data.forEach($=>{_[$.listing_id]||(_[$.listing_id]=[]),_[$.listing_id].push($.rating)}),Object.entries(_).forEach(([$,W])=>{const re=W.reduce((oe,Te)=>oe+Te,0)/W.length;Pe[$]={average_rating:re,total_reviews:W.length}})}const $e=Array.isArray(Z==null?void 0:Z.data)?Z.data:[];if($e.length>0){const _={};Object.entries(Re).forEach(([$,W])=>{W.id&&(_[W.id]=$)}),Oe=$e.reduce(($,W)=>{const re=_[W.practitioner_id];if(!re)return $;const oe=Number(W.total_reviews)||0,Te=Number(W.average_rating)||0,je=$[re]||{average_rating:null,total_reviews:0},Ee=je.total_reviews+oe,dt=(je.average_rating||0)*je.total_reviews;return $[re]={average_rating:Ee>0?(dt+Te*oe)/Ee:null,total_reviews:Ee},$},{})}}if(!h){const c=(ge||[]).map(i=>{const v=xe[i.practitioner_id];return{id:i.id,name:i.title||"Praticien",specialty:i.title||"Praticien",latitude:i.latitude,longitude:i.longitude,sessionType:i.session_type==="both"?"both":i.session_type==="virtual"?"virtual":"in-person",address:[i.address,i.city,i.postal_code].filter(
22Boolean).join(", "),slug:i.slug,practitionerSlug:(v==null?void 0:v.slug)||void 0,imageUrl:v?Je(v):void 0}});le(c)}const ut=c=>{const i=v=>/^\d{4,6}$/.test(v.trim());if(typeof c.city=="string"){const v=c.city.trim();if(v!==""&&!i(v))return v}if(typeof c.address=="string"&&c.address.trim()){const v=c.address.split(",").map(P=>P.trim()).filter(Boolean);for(const P of v){const b=P.match(/^\d{4,6}\s+(.+)$/);if(b&&b[1])return b[1].trim();if(v.indexOf(P)>0&&!i(P)&&!/^\d/.test(P))return P}}return"Non spécifié"};let F=(A||[]).map(c=>{var S,z,Z;const i=xe[c.practitioner_id],v=Oe[c.practitioner_id],P=(i==null?void 0:i.first_name)||"",b=(i==null?void 0:i.last_name)||"";let f=`${P} ${b}`.trim();return(!f||f.length<2)&&(f=c.title||"Praticien"),{id:c.id,slug:c.slug||"",title:c.title||"Service de bien-être",description:c.description||"",practice:c.practice||"",main_practice:(i==null?void 0:i.main_practice)||"",motifs:Array.isArray(c.motifs)?c.motifs:[],tags:Array.isArray(c.tags)?c.tags:[],target_audiences:Array.isArray(c.target_audiences)?c.target_audiences:[],practitionerName:f,practitionerFirstName:P,practitionerLastName:b,practitionerImage:i?Je(i):"",specialties:Array.isArray(c.specialties)?c.specialties:[],location:ut(c),address:c.address||(i==null?void 0:i.address)||"",postal_code:c.postal_code||"",city:c.city||"Non spécifié",price:c.price||0,duration:c.duration,rating:0,reviewCount:0,sessionType:c.session_type==="both"?"both":c.session_type==="virtual"?"virtual":"in-person",latitude:c.latitude,longitude:c.longitude,images:bt(Array.isArray(c.images)?c.images:[]),thumbnailUrl:"",practitionerId:c.practitioner_id,practitionerSlug:(i==null?void 0:i.slug)||void 0,practitionerEmail:(i==null?void 0:i.email)||"",practitionerPhone:(i==null?void 0:i.phone)||"",practitionerSiret:(i==null?void 0:i.siret)||"",presentationVideoUrl:((S=Re[c.practitioner_id])==null?void 0:S.presentation_video_url)||"",googleRating:v!=null&&v.average_rating?Number(v.average_rating):void 0,googleReviewCount:(v==null?void 0:v.total_reviews)||void 0,platformRating:v||(z=Pe[c.id])==null?void 0:z.average_rating,platformReviewCount:v||(Z=Pe[c.id])==null?void 0:Z.total_reviews,isPremium:He[c.practitioner_id]||!1}});if(h){const c=g??Ge(h),i=R.length>0?R:Xe(h),v=M;if(v.length>0){const b=new Set(v.map(S=>S.id)),f=new Map(v.map(S=>[S.id,S.rank]));F=F.filter(S=>b.has(S.id)).sort((S,z)=>{if(S.isPremium&&!z.isPremium)return-1;if(!S.isPremium&&z.isPremium)return 1;if(G){const _=S.latitude!=null&&S.longitude!=null,$=z.latitude!=null&&z.longitude!=null;if(_&&!$)return-1;if(!_&&$)return 1}const Z=f.get(S.id)||0;return(f.get(z.id)||0)-Z}),console.log(`✅ FTS prioritized ${F.length} results`),ue(null)}else{console.log("🔄 FTS returned no results, trying enriched term matching");const b=i.map(f=>f.toLowerCase());F=F.filter(f=>{const S=[f.title,f.practice,f.main_practice,f.description,f.location,f.city,f.practitionerName,f.practitionerFirstName,f.practitionerLastName,...f.specialties||[],...f.motifs||[],...f.tags||[]].filter(Boolean).join(" ").toLowerCase();return b.some(z=>S.includes(z))}).sort((f,S)=>f.isPremium&&!S.isPremium?-1:!f.isPremium&&S.isPremium?1:0),console.log(`✅ Enriched term matching found ${F.length} results`),ue(null)}if(c.isLocationQuery&&c.locationKeywords.length>0){const b=c.locationKeywords.join(" ");try{const f=await Ve(b);if(f){console.log("🗺️ Centrage automatique de la carte sur:",f),N(f),ee(f);const S=new URLSearchParams(d);S.set("lat",f.lat.toString()),S.set("lng",f.lng.toString()),r(S)}}catch(f){console.error("Erreur lors du géocodage automatique:",f)}}const P=Date.now();if(Ae(w?P-w:void 0),console.log(`🎯 Optimized search completed in ${w?P-w:0}ms:`,{resultCount:F.length,usedFTS:v.length>0}),F.length<3){const b=[...new Set([...F.flatMap(S=>S.specialties||[]),...F.map(S=>S.location).filter(Boolean),...F.map(S=>S.address).filter(Boolean),...F.map(S=>S.practitionerName).flatMap(S=>S.split(" ")),...F.map(S=>S.title).flatMap(S=>S.split(" "))])].filter(S=>S&&S.length>2),f=St(O,b);ye(f.slice(0,3)),console.log("💡 Generated suggestions due to low results:",f)}else ye([])}else if(l){console.log("🗺️ Applying location-only filter");const i=await new jt(F).search([],[],l);ue(i),F=i.results}else ue(null),Ae(void 0),ye([]);const ht=c=>c.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase(),We=(c,i)=>!c||c.length===0?!1:c.some(v=>{const P=ht(String(v));return i.some(b=>P.includes(b))});if(ie){const c=ie==="adult-senior"?["adulte","adults","senior","seniors","personne agee","personnes agees","3eme age","troisieme age","retraite"]:["enfant","enfants","jeun","ado","adolesc","bebe","bébé","nourrisson","petite enfance"];F=F.filter(i=>
22We(i.target_audiences,c)),console.log(`🎯 Applied audience filter (${ie}) →`,F.length,"results")}if(te==="female"||te==="male"){const c=te==="female"?["femme","femin"]:["homme","mascul"];F=F.filter(i=>We(i.target_audiences,c)),console.log(`🔎 Applied patient gender filter (${te}) →`,F.length,"results")}ce(F);const pt=Tt(O,D,U,!!(Q&&V));$t({searchType:pt,queryText:O||null,specialty:D||null,location:U||null,latitude:Q?parseFloat(Q):null,longitude:V?parseFloat(V):null,radiusKm:a.distance||null,resultsCount:F.length})}catch(h){console.error("❌ Search error:",h),m("Une erreur est survenue lors de la recherche. Veuillez réessayer.")}finally{s(!1)}})()},[D,U,O,l,ee,te,ie]),L.useEffect(()=>{let u=[...B];if(a.practices.length>0&&(u=u.filter(R=>R.specialties.some(M=>a.practices.includes(M)))),a.sessionTypes.length>0&&(u=u.filter(R=>R.sessionType==="both"?!0:a.sessionTypes.includes(R.sessionType))),(a.priceRange[0]>0||a.priceRange[1]<500)&&(u=u.filter(R=>R.price>=a.priceRange[0]&&R.price<=a.priceRange[1])),l&&a.distance){const R=(M,k,G,ne)=>{const A=(G-M)*Math.PI/180,J=(ne-k)*Math.PI/180,ge=Math.sin(A/2)*Math.sin(A/2)+Math.cos(M*Math.PI/180)*Math.cos(G*Math.PI/180)*Math.sin(J/2)*Math.sin(J/2);return 6371*(2*Math.atan2(Math.sqrt(ge),Math.sqrt(1-ge)))};u=u.filter(M=>!M.latitude||!M.longitude?!0:R(l.lat,l.lng,M.latitude,M.longitude)<=a.distance).sort((M,k)=>{if(M.latitude&&M.longitude&&k.latitude&&k.longitude){const G=R(l.lat,l.lng,M.latitude,M.longitude),ne=R(l.lat,l.lng,k.latitude,k.longitude);return G-ne}return 0})}X(u.length);const h=(y-1)*be,w=h+be,g=u.slice(h,w);console.log("✅ Search completed with",u.length,"total results,",g.length,"on current page"),e(g)},[a,y,B,l]);const q=Math.ceil(E/be),se=L.useCallback(u=>{const h=Math.max(1,q>0?Math.min(u,q):u),w=new URLSearchParams(d);h===1?w.delete("page"):w.set("page",String(h)),r(w),T(h),window.scrollTo({top:0,behavior:"smooth"})},[d,r,q]);L.useEffect(()=>{!t&&q>0&&y>q&&se(q)},[y,se,t,q]);const Ne=L.useMemo(()=>{let h=[...K.length>0?K:B.map(g=>({id:g.id,name:g.practitionerName,specialty:g.specialties[0]||"Pratique non spécifiée",latitude:g.latitude,longitude:g.longitude,sessionType:g.sessionType,address:g.address,slug:g.slug,practitionerSlug:g.practitionerSlug,imageUrl:g.practitionerImage}))];if(a.practices.length>0&&(h=h.filter(g=>g.specialty&&a.practices.some(R=>g.specialty.toLowerCase().includes(R.toLowerCase())))),a.sessionTypes.length>0&&(h=h.filter(g=>g.sessionType==="both"?!0:a.sessionTypes.includes(g.sessionType))),K.length===0&&(a.priceRange[0]>0||a.priceRange[1]<500)&&(h=h.filter(g=>g.price>=a.priceRange[0]&&g.price<=a.priceRange[1])),l&&a.distance){const g=(R,M,k,G)=>{const ae=(k-R)*Math.PI/180,A=(G-M)*Math.PI/180,J=Math.sin(ae/2)*Math.sin(ae/2)+Math.cos(R*Math.PI/180)*Math.cos(k*Math.PI/180)*Math.sin(A/2)*Math.sin(A/2);return 6371*(2*Math.atan2(Math.sqrt(J),Math.sqrt(1-J)))};h=h.filter(R=>!R.latitude||!R.longitude?!0:g(l.lat,l.lng,R.latitude,R.longitude)<=a.distance)}const w=h.filter(g=>g.latitude&&g.longitude&&!isNaN(g.latitude)&&!isNaN(g.longitude)&&g.latitude>=-90&&g.latitude<=90&&g.longitude>=-180&&g.longitude<=180);return console.log(`📍 Carte: ${w.length}/${h.length} praticiens avec coordonnées valides (total: ${K.length||B.length})`),w},[B,K,a,l]);if(t)return p.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] py-12",children:[p.jsx(Ye,{size:"lg"}),p.jsx("p",{className:"text-muted-foreground mt-4",children:"Recherche en cours..."})]});if(o)return p.jsx("div",{className:"py-12",children:p.jsxs("div",{className:"text-center",children:[p.jsx("p",{className:"text-destructive mb-4",children:o}),p.jsx(Qe,{onClick:()=>window.location.reload(),variant:"outline",children:"Réessayer"})]})});const nt=y>1?` – Page ${y}`:"",ot=O||D||U?`${O||D||"Praticiens"}${U?` à ${U}`:""} | Bien-être Connect`:`Recherche praticiens bien-être${nt} | Bien-être Connect`,ct=O||D||U?`Trouvez ${O||D||"votre praticien bien-être"}${U?` à ${U}`:" près de chez vous"}. ${E} praticien${E>1?"s":""} disponible${E>1?"s":""} sur Bien-être Connect.`:"Recherchez parmi plus de 500 praticiens bien-être vérifiés en France. Naturopathes, sophrologues, hypnothérapeutes et plus.",Be=Ft(d)||a.distance!==25||a.sessionTypes.length>0||a.priceRange[0]!==0||a.priceRange[1]!==500||a.practices.length>0,lt=Be?"https://bienetre-connect.fr/rechercher":`https://bienetre-connect.fr${Ke(new URLSearchParams,y)}`,de=u=>Ke(d,u);return p.jsxs("div",{className:"min-h-screen bg-[#fff9ef]",children:[p.jsx(xt,{title:ot,metaDescription:ct,seoFocusKeyword:O||D||"praticien bien-être",canonicalUrl:lt,type:"website",noindex:Be}),p.jsx("div",{ref:ve,className:"sticky top-16 z-40",children:p.jsx("div",{className:"bg-gradient-to-b from-patient-primary/10 via-patient-primary/5 to-transparent pt-6 pb-8",children:p.jsx("div",{className:"w-[95%] mx-auto px-3 sm:px-4",children:p.jsx("div",{className:"w-full lg:max-w-3xl mx-auto",children:p.jsx("div",{className:"bg-white rounded-2xl shadow-lg p-4 border border-slate-100",children:p.jsx(_t,{onSearch:De,onLocationSearch:rt,placeholder:"Rechercher une pratique, un praticien...",initialQuery:O,initialLocation:U,className:"w-full"})})})})})}),p.jsxs("div",{className:"w-[95%] mx-auto px-3 sm:px-4 py-6",children:[p.jsxs("div",{className:"mb-8",children:[p.jsx("h1",{className:"text-3xl font-bold mb-4",children:"Résultats de recherche"}),p.jsxs("p",{className:"text-muted-foreground",children:[E," résultat",E>1?"s":""," trouvé",E>1?"s":"",D&&` pour "${D}"`,U&&` à ${U}`,q>1&&p.jsxs("span",{className:"ml-2",children:["- Page ",y," sur ",q]})]})]}),p.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-8 items-start",children:[p.jsxs("div",{className:"space-y-4",children:[p.jsx(wt,{results:n}),n.length===0&&p.jsxs("div",{className:"text-center py-12 space-y-6",children:[p.jsx("p",{className:"text-muted-foreground",children:"Aucun praticien disponible pour le moment avec ces critères — mais de nouveaux profils arrivent très bientôt 🌿"}),p.jsx(L.Suspense,{fallback:p.jsx("div",{className:"h-24 rounded-2xl bg-white/70 border border-slate-100"}),children:p.jsx(At,{searchQuery:O||D,location:U,className:"max-w-md mx-auto"})}),H.length>0&&p.jsxs("div",{className:"mt-6",children:[p.jsx("p",{className:"text-sm font-medium text-muted-foreground mb-3",children:"Peut-être cherchiez-vous :"}),p.jsx("div",{className:"flex flex-wrap gap-2 justify-center",children:H.map((u,h)=>p.jsx(Qe,{variant:"outline",size:"sm",onClick:()=>De(u),className:"text-xs",children:u},h))})]})]}),q>1&&p.jsx("div",{className:"mt-8",children:p.jsx(Lt,{children:p.jsxs(Ct,{children:[p.jsx(fe,{children:p.jsx(Nt,{href:de(Math.max(1,y-1)),onClick:u=>{u.preventDefault(),y>1&&se(y-1)},className:y<=1?"pointer-events-none opacity-50":""})}),y>2&&p.jsxs(p.Fragment,{children:[p.jsx(fe,{children:p.jsx(Fe,{href:de(1),onClick:u=>{u.preventDefault(),se(1)},children:"1"})}),y>3&&p.jsx(Ze,{})]}),Array.from({length:Math.min(3,q)},(u,h)=>{const w=Math.max(1,Math.min(q-2,y-1))+h;return w>q?null:p.jsx(fe,{children:p.jsx(Fe,{href:de(w),onClick:g=>{g.preventDefault(),se(w)},isActive:y===w,children:w})},w)}),y<q-1&&p.jsxs(p.Fragment,{children:[y<q-2&&p.jsx(Ze,{}),p.jsx(fe,{children:p.jsx(Fe,{href:de(q),onClick:u=>{u.preventDefault(),se(q)},children:q})})]}),p.jsx(fe,{children:p.jsx(Rt,{href:de(Math.min(q,y+1)),onClick:u=>{u.preventDefault(),y<q&&se(y+1)},className:y>=q?"pointer-events-none opacity-50":""})})]})})})]}),p.jsx("div",{ref:ze,className:"xl:sticky",style:it,children:Ne.length>0&&_e?p.jsx(L.Suspense,{fallback:p.jsx("div",{className:"bg-muted rounded-lg flex items-center justify-center",style:{height:pe},children:p.jsx(Ye,{size:"sm"})}),children:p.jsx(qt,{practitioners:Ne,height:pe,mapCenter:I})}):Ne.length>0?p.jsx("div",{className:"bg-muted rounded-lg flex items-center justify-center",style:{height:pe},children:p.jsx("p",{className:"text-muted-foreground",children:"Chargement de la carte..."})}):p.jsx("div",{className:"bg-muted rounded-lg flex items-center justify-center",style:{height:pe},children:p.jsx("p",{className:"text-muted-foreground",children:"Aucune localisation disponible"})})})]})]})]})};export{Ss 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.