1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MemberDirectory-CBK817Xi.js","assets/index-BKQfK9e1.js","assets/ui-vendor-CealJQWJ.js","assets/react-vendor-BkH0-HFx.js","assets/query-vendor-i3MONKX8.js","assets/index-B5IHc3Xd.css","assets/client-D7ttkOWR.js","assets/label-Bk7pDRvE.js","assets/OnlineDot-D0JrMEGB.js","assets/list-fFsNpYgV.js","assets/search-BGnoQldQ.js","assets/user-42xh-59x.js","assets/briefcase-CxZ3luD1.js","assets/map-pin-CyZz0GDR.js","assets/globe-Chk2-p2a.js","assets/mail-DHyBiGXS.js","assets/dialog-DrGg5xAH.js","assets/textarea-D9Zn1_Y_.js","assets/heart-CalacmmH.js","assets/youtube-BfLwWNsD.js","assets/instagram-M5vYJV3H.js","assets/linkedin-DrWaO6Gu.js","assets/mic-BhOSE2Bt.js","assets/facebook-G28mw5wA.js","assets/sparkles-lXDTb017.js","assets/chevron-left-ByZco1Be.js","assets/chevron-right-CUu3XkPG.js","assets/circle-help-CzoQ9HR1.js","assets/log-out-DSoxjm8M.js","assets/credit-card-DA7-JA_f.js","assets/check-D0C5L6R8.js","assets/triangle-alert-DWb30wk2.js","assets/megaphone-D8LQ-JKB.js","assets/star-C1ARtSKw.js","assets/message-square-D-uBphLB.js","assets/lightbulb-CN25p8CA.js","assets/headphones-CE1GKH8J.js","assets/gift-BanTgYQR.js","assets/smartphone-CNYhOLIW.js","assets/send-djag2WS2.js","assets/award-Cg6UgyHj.js","assets/house-ewSKpfIc.js","assets/book-open-X-38VHQY.js","assets/video-B3FTYXTc.js","assets/file-text-B4_yRgub.js","assets/bot-oYjaIzfG.js","assets/users-Dfc8Yycb.js","assets/eye-CyaJYd3C.js","assets/MentorDirectory-CaMyDQ_S.js","assets/calendar-_TqM36xc.js","assets/external-link-BkDPFotq.js","assets/MemberMap-DFuzDkzz.js","assets/ProfileVisitorsPage-BwT_LFam.js","assets/MemberFAQ-i_zOEoGv.js","assets/accordion-C1Dz_roJ.js","assets/MemberProfile-BHt8CIyK.js","assets/progress-Czo-uf1B.js","assets/switch-CgNd5l7o.js","assets/select-BKEFF2FD.js","assets/chevron-up-Xr6cDF87.js","assets/pencil-BZLC8F-k.js","assets/upload-DOGrXQUr.js","assets/trash-2-B2PFkUhJ.js","assets/plus-DqmBkR-_.js","assets/square-Bgicf_Sq.js","assets/ProfileQRCode-Ckco2-xk.js","assets/index-DtqE7TWa.js","assets/download-7UJh-jjn.js","assets/share-2-DOjBqlrG.js","assets/copy-Drjruuj-.js","assets/image-CMbNr6b8.js","assets/eye-off-BEVx7mQU.js","assets/circle-CrBdOaq0.js","assets/package-C6lKa3al.js","assets/zap-CJnMeFoR.js","assets/podcast-D2d1Ynrm.js","assets/ContentArea-D9bRMVRg.js","assets/circle-check-DcUQer6E.js","assets/circle-x-DtIV0AMB.js","assets/rocket-DPPx-LXS.js","assets/folder-open-b3ePlANY.js","assets/play-C_92zjsq.js","assets/lock-CywKr3av.js","assets/arrow-left-EpXCNUtL.js","assets/MembershipUpgrade-Duvnb54U.js","assets/membership-tiers-D-aLU7v1.js","assets/crown-ClZw00FZ.js","assets/ClubRules-BmIcnIS-.js","assets/circle-check-big-yt3JJImJ.js","assets/shield-check-D24IgxT1.js","assets/MemberTermine-BK2P3dAS.js","assets/clock-CnydhJzp.js","assets/thumbs-up-kV2Mfyq1.js","assets/MemberGruppen-DP8TcrHC.js","assets/format-message-BOfUKEOG.js","assets/chart-column-atJXw5WN.js","assets/VoiceMessagePlayer-CsGuIyFB.js","assets/use-mobile-CCtDWX_c.js","assets/reply-nbLcgUlR.js","assets/flag-C3Joq72l.js","assets/loader-circle-UrgXdL1Z.js","assets/image-plus-Cktiw_42.js","assets/MemberWerben-DaRZv6p9.js","assets/euro-f0S7m02r.js","assets/MemberInbox-BWK-1E51.js","assets/check-check-CzcKudc8.js","assets/MemberBulletin-Cbb6KPwf.js","assets/MemberDetailView-DayMsr9F.js","assets/shield-cUrwIRpZ.js","assets/ReviewBadge-BW9uZnAk.js","assets/sticky-note-CHt5ZqJK.js","assets/save-Cy3DME4I.js","assets/PwaInstallGuide-wYLMLqXv.js","assets/ellipsis-vertical-ClQslOZU.js","assets/ProfileVisitors-BnyGfFNl.js","assets/MemberMarktplatz-XN4Md0cV.js","assets/DashboardHome-hCOFhmy0.js","assets/compass-Cwm_O5NX.js","assets/shopping-bag-oOD928ig.js","assets/arrow-right-zmBWZ2TJ.js","assets/FelixCoach-C0EigrzX.js","assets/coach-business-Xr74FnsA.js","assets/CoachProgress-BLzkPx96.js","assets/proxy-jnRaCSkQ.js","assets/flame-Co0uerXj.js","assets/trending-up-D5-ZbhRQ.js","assets/target-C1KOJgbK.js","assets/MindsetCoach-C4xW1qir.js","assets/coach-mindset-C
1HeFsV42.js","assets/index-BvwLCwyq.js","assets/CoachSelector-Qlo-S66f.js","assets/AudioCoursePlayer-BfWyws7j.js","assets/volume-2-De0fIcA9.js","assets/AudioCourseAdmin-DkpAJBai.js","assets/BroadcastSender-DDvAkGql.js","assets/card-CeOg34rx.js","assets/MemberTools-B9SkLKIS.js","assets/checkbox-C30aq_a7.js","assets/MemberBuecher-znQDXGOf.js","assets/NotificationsPage-CT7DGvAY.js","assets/notification-sound-BjNwraF4.js"])))=>i.map(i=>d[i]); 2import{e as q,n as Qr,B as J,j as L,o as en,P as tn,q as Et,v as Pt,w as rn,X as we,_ as M,x as nn,y as sn,z as on,D as an,M as Mt,C as Rt}from"./index-BKQfK9e1.js";import{c as ln,a as cn,b as dn,j as r,f as ue,u as me,l as un,P as _e,m as hn,n as mn,o as Yt}from"./ui-vendor-CealJQWJ.js";import{h as pn,r as l,d as fn,g as gn}from"./react-vendor-BkH0-HFx.js";import{supabase as P}from"./client-D7ttkOWR.js";import{D as Je,a as Qe,b as Xt,c as Jt,d as xn,e as bn}from"./dialog-DrGg5xAH.js";import{L as Ze,I as $e}from"./label-Bk7pDRvE.js";import{T as yn}from"./textarea-D9Zn1_Y_.js";import{M as gt}from"./mail-DHyBiGXS.js";import{U as et}from"./user-42xh-59x.js";import{B as vn}from"./briefcase-CxZ3luD1.js";import{H as Qt}from"./heart-CalacmmH.js";import{G as wn}from"./globe-Chk2-p2a.js";import{M as Ye}from"./map-pin-CyZz0GDR.js";import{Y as _n}from"./youtube-BfLwWNsD.js";import{I as Sn}from"./instagram-M5vYJV3H.js";import{L as kn}from"./linkedin-DrWaO6Gu.js";import{M as jn}from"./mic-BhOSE2Bt.js";import{F as Nn}from"./facebook-G28mw5wA.js";import{S as Cn}from"./sparkles-lXDTb017.js";import{C as er}from"./chevron-left-ByZco1Be.js";import{C as Ie}from"./chevron-right-CUu3XkPG.js";import{C as tr}from"./circle-help-CzoQ9HR1.js";import{B as tt,L as En}from"./log-out-DSoxjm8M.js";import{C as rr}from"./credit-card-DA7-JA_f.js";import{C as Pn}from"./check-D0C5L6R8.js";import{T as zt}from"./triangle-alert-DWb30wk2.js";import{M as Mn}from"./megaphone-D8LQ-JKB.js";import{S as nr}from"./star-C1ARtSKw.js";import{M as rt}from"./message-square-D-uBphLB.js";import{L as Rn}from"./lightbulb-CN25p8CA.js";import{H as ir}from"./headphones-CE1GKH8J.js";import{G as sr}from"./gift-BanTgYQR.js";import{S as or}from"./smartphone-CNYhOLIW.js";import{S as Dt}from"./send-djag2WS2.js";import{A as ar}from"./award-Cg6UgyHj.js";import{H as zn}from"./house-ewSKpfIc.js";import{B as Xe}from"./book-open-X-38VHQY.js";import{V as Dn}from"./video-B3FTYXTc.js";import{F as An}from"./file-text-B4_yRgub.js";import{B as Tn}from"./bot-oYjaIzfG.js";import{U as In}from"./users-Dfc8Yycb.js";import{E as Bn}from"./eye-CyaJYd3C.js";/** 3 * @license lucide-react v0.462.0 - ISC 4 * 5 * This source code is licensed under the ISC license. 6 * See the LICENSE file in the root directory of this source tree. 7 */const On=q("BellRing",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}]]);/** 8 * @license lucide-react v0.462.0 - ISC 9 * 10 * This source code is licensed under the ISC license. 11 * See the LICENSE file in the root directory of this source tree. 12 */const lr=q("Cake",[["path",{d:"M20 21v-8a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8",key:"1w3rig"}],["path",{d:"M4 16s.5-1 2-1 2.5 2 4 2 2.5-2 4-2 2.5 2 4 2 2-1 2-1",key:"n2jgmb"}],["path",{d:"M2 21h20",key:"1nyx9w"}],["path",{d:"M7 8v3",key:"1qtyvj"}],["path",{d:"M12 8v3",key:"hwp4zt"}],["path",{d:"M17 8v3",key:"1i6e5u"}],["path",{d:"M7 4h.01",key:"1bh4kh"}],["path",{d:"M12 4h.01",key:"1ujb9j"}],["path",{d:"M17 4h.01",key:"1upcoc"}]]);/** 13 * @license lucide-react v0.462.0 - ISC 14 * 15 * This source code is licensed under the ISC license. 16 * See the LICENSE file in the root directory of this source tree. 17 */const nt=q("CalendarDays",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);/** 18 * @license lucide-react v0.462.0 - ISC 19 * 20 * This source code is licensed under the ISC license. 21 * See the LICENSE file in the root directory of this source tree.
22 */const Ln=q("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/** 23 * @license lucide-react v0.462.0 - ISC 24 * 25 * This source code is licensed under the ISC license. 26 * See the LICENSE file in the root directory of this source tree. 27 */const cr=q("ClipboardList",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);/** 28 * @license lucide-react v0.462.0 - ISC 29 * 30 * This source code is licensed under the ISC license. 31 * See the LICENSE file in the root directory of this source tree. 32 */const Wn=q("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/** 33 * @license lucide-react v0.462.0 - ISC 34 * 35 * This source code is licensed under the ISC license. 36 * See the LICENSE file in the root directory of this source tree. 37 */const Vn=q("Music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);/** 38 * @license lucide-react v0.462.0 - ISC 39 * 40 * This source code is licensed under the ISC license. 41 * See the LICENSE file in the root directory of this source tree. 42 */const Fn=q("ScrollText",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/** 43 * @license lucide-react v0.462.0 - ISC 44 * 45 * This source code is licensed under the ISC license. 46 * See the LICENSE file in the root directory of this source tree. 47 */const Hn=q("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** 48 * @license lucide-react v0.462.0 - ISC 49 * 50 * This source code is licensed under the ISC license. 51 * See the LICENSE file in the root directory of this source tree. 52 */const Un=q("Store",[["path",{d:"m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7",key:"ztvudi"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["path",{d:"M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4",key:"2ebpfo"}],["path",{d:"M2 7h20",key:"1fcdvo"}],["path",{d:"M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7",key:"6c3vgh"}]]);/** 53 * @license lucide-react v0.462.0 - ISC 54 * 55 * This source code is licensed under the ISC license. 56 * See the LICENSE file in the root directory of this source tree. 57 */const dr=q("UserCog",[["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m21.7 16.4-.9-.3",key:"12j9ji"}],["path",{d:"m15.2 13.9-.9-.3",key:"1fdjdi"}],["path",{d:"m16.6 18.7.3-.9",key:"heedtr"}],["path",{d:"m19.1 12.2.3-.9",key:"1af3ki"}],["path",{d:"m19.6 18.7-.4-1",key:"1x9vze"}],["path",{d:"m16.8 12.3-.4-1",key:"vqeiwj"}],["path",{d:"m14.3 16.6 1-.4",key:"1qlj63"}],["path",{d:"m20.7 13.8 1-.4",key:"1v5t8k"}]]);/** 58 * @license lucide-react v0.462.0 - ISC 59 * 60 * This source code is licensed under the ISC license. 61 * See the LICENSE file in the root directory of this source tree. 62 */const Kn=q("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/** 63 * @license lucide-react v0.462.0 - ISC 64 * 65 * This source code is licensed under the ISC license. 66 * See the LICENSE file in the root directory of this source tree. 67 */const qn=q("ZoomIn",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);/** 68 * @license lucide-react v0.462.0 - ISC 69 * 70 * This source code is licensed under the ISC license. 71 * See the LICENSE file in the root directory of this source tree. 72 */const Gn=q("ZoomOut",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),Zn=[[1e3,9999,"Sachsen / Thüringen / Brandenburg"],[1e4,14999,"Berlin"],[15e3,19999,"Brandenburg / Mecklenburg-Vorpommern"],[2e4,27999,"Hamburg / Sc
72hleswig-Holstein / Niedersachsen"],[28e3,29999,"Bremen / Niedersachsen"],[3e4,31999,"Niedersachsen"],[32e3,33999,"Nordrhein-Westfalen"],[34e3,36999,"Hessen"],[37e3,37999,"Niedersachsen"],[38e3,39999,"Niedersachsen / Sachsen-Anhalt"],[4e4,47999,"Nordrhein-Westfalen"],[48e3,48999,"Nordrhein-Westfalen"],[49e3,49999,"Niedersachsen"],[5e4,53999,"Nordrhein-Westfalen"],[54e3,56999,"Rheinland-Pfalz"],[57e3,59999,"Nordrhein-Westfalen"],[6e4,63999,"Hessen"],[64e3,65999,"Hessen"],[66e3,66999,"Saarland"],[67e3,69999,"Rheinland-Pfalz / Baden-Württemberg"],[7e4,76999,"Baden-Württemberg"],[77e3,79999,"Baden-Württemberg"],[8e4,87999,"Bayern"],[88e3,89999,"Baden-Württemberg / Bayern"],[9e4,96999,"Bayern"],[97e3,97999,"Bayern"],[98e3,99999,"Thüringen"]],De={berlin:"Berlin",hamburg:"Hamburg / Schleswig-Holstein / Niedersachsen",münchen:"Bayern",munich:"Bayern",köln:"Nordrhein-Westfalen",frankfurt:"Hessen",düsseldorf:"Nordrhein-Westfalen",stuttgart:"Baden-Württemberg",dortmund:"Nordrhein-Westfalen",essen:"Nordrhein-Westfalen",leipzig:"Sachsen / Thüringen / Brandenburg",bremen:"Bremen / Niedersachsen",dresden:"Sachsen / Thüringen / Brandenburg",hannover:"Niedersachsen",nürnberg:"Bayern",duisburg:"Nordrhein-Westfalen",bochum:"Nordrhein-Westfalen",wuppertal:"Nordrhein-Westfalen",bielefeld:"Nordrhein-Westfalen",bonn:"Nordrhein-Westfalen",münster:"Nordrhein-Westfalen",karlsruhe:"Baden-Württemberg",mannheim:"Baden-Württemberg",augsburg:"Bayern",mainz:"Rheinland-Pfalz",kiel:"Hamburg / Schleswig-Holstein / Niedersachsen",wiesbaden:"Hessen",rostock:"Brandenburg / Mecklenburg-Vorpommern",potsdam:"Berlin",freiburg:"Baden-Württemberg",erfurt:"Thüringen",magdeburg:"Niedersachsen / Sachsen-Anhalt",saarbrücken:"Saarland",schwerin:"Brandenburg / Mecklenburg-Vorpommern",lübeck:"Hamburg / Schleswig-Holstein / Niedersachsen",braunschweig:"Niedersachsen",chemnitz:"Sachsen / Thüringen / Brandenburg",kassel:"Hessen",aachen:"Nordrhein-Westfalen",krefeld:"Nordrhein-Westfalen",hagen:"Nordrhein-Westfalen",regensburg:"Bayern",heidelberg:"Baden-Württemberg",trier:"Rheinland-Pfalz",ulm:"Baden-Württemberg",oldenburg:"Niedersachsen",osnabrück:"Niedersachsen",wolfsburg:"Niedersachsen",göttingen:"Niedersachsen",heilbronn:"Baden-Württemberg",ingolstadt:"Bayern",würzburg:"Bayern",konstanz:"Baden-Württemberg",bamberg:"Bayern",bayreuth:"Bayern"};function uo(i,o){if(i){const e=parseInt(i.replace(/\D/g,""),10);if(!isNaN(e)){for(const[n,a,t]of Zn)if(e>=n&&e<=a)return t}}if(o){const e=o.toLowerCase().trim();if(De[e])return De[e];const n=e.split(/[\s,\/]/)[0];if(n&&De[n])return De[n]}return null}const $n=["Deutschland","Ãsterreich","Schweiz","Liechtenstein","Luxemburg","Niederlande","Belgien","Frankreich","Italien","Spanien","Portugal","GroÃbritannien","Irland","Dänemark","Schweden","Norwegen","Finnland","Polen","Tschechien","Ungarn","Rumänien","Bulgarien","Griechenland","Kroatien","Serbien","Türkei","USA","Kanada","Vereinigte Arabische Emirate","Sonstiges"];var it=function(i,o){return it=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])},it(i,o)};function Yn(i,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");it(i,o);function e(){this.constructor=i}i.prototype=o===null?Object.create(o):(e.prototype=o.prototype,new e)}var F=function(){return F=Object.assign||function(o){for(var e,n=1,a=arguments.length;n<a;n++){e=arguments[n];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(o[t]=e[t])}return o},F.apply(this,arguments)};var At=!1,ne,st,ot,Be,Oe,ur,Le,at,lt,ct,hr,dt,ut,mr,pr;function K(){if(!At){At=!0;var i=navigator.userAgent,o=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Ice
72weasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(i),e=/(Mac OS X)|(Windows)|(Linux)/.exec(i);if(dt=/\b(iPhone|iP[ao]d)/.exec(i),ut=/\b(iP[ao]d)/.exec(i),ct=/Android/i.exec(i),mr=/FBAN\/\w+;/i.exec(i),pr=/Mobile/i.exec(i),hr=!!/Win64/.exec(i),o){ne=o[1]?parseFloat(o[1]):o[5]?parseFloat(o[5]):NaN,ne&&document&&document.documentMode&&(ne=document.documentMode);var n=/(?:Trident\/(\d+.\d+))/.exec(i);ur=n?parseFloat(n[1])+4:ne,st=o[2]?parseFloat(o[2]):NaN,ot=o[3]?parseFloat(o[3]):NaN,Be=o[4]?parseFloat(o[4]):NaN,Be?(o=/(?:Chrome\/(\d+\.\d+))/.exec(i),Oe=o&&o[1]?parseFloat(o[1]):NaN):Oe=NaN}else ne=st=ot=Oe=Be=NaN;if(e){if(e[1]){var a=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(i);Le=a?parseFloat(a[1].replace("_",".")):!0}else Le=!1;at=!!e[2],lt=!!e[3]}else Le=at=lt=!1}}var ht={ie:function(){return K()||ne},ieCompatibilityMode:function(){return K()||ur>ne},ie64:function(){return ht.ie()&&hr},firefox:function(){return K()||st},opera:function(){return K()||ot},webkit:function(){return K()||Be},safari:function(){return ht.webkit()},chrome:function(){return K()||Oe},windows:function(){return K()||at},osx:function(){return K()||Le},linux:function(){return K()||lt},iphone:function(){return K()||dt},mobile:function(){return K()||dt||ut||ct||pr},nativeApp:function(){return K()||mr},android:function(){return K()||ct},ipad:function(){return K()||ut}},Xn=ht,Ae=!!(typeof window<"u"&&window.document&&window.document.createElement),Jn={canUseDOM:Ae,canUseWorkers:typeof Worker<"u",canUseEventListeners:Ae&&!!(window.addEventListener||window.attachEvent),canUseViewport:Ae&&!!window.screen,isInWorker:!Ae},Qn=Jn,fr=Qn,gr;fr.canUseDOM&&(gr=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);/** 73 * Checks if an event is supported in the current execution environment. 74 * 75 * NOTE: This will not work correctly for non-generic events such as `change`, 76 * `reset`, `load`, `error`, and `select`. 77 * 78 * Borrows from Modernizr. 79 * 80 * @param {string} eventNameSuffix Event name, e.g. "click". 81 * @param {?boolean} capture Check if the capture phase is supported. 82 * @return {boolean} True if the event is supported. 83 * @internal 84 * @license Modernizr 3.0.0pre (Custom Build) | MIT 85 */function ei(i,o){if(!fr.canUseDOM||o&&!("addEventListener"in document))return!1;var e="on"+i,n=e in document;if(!n){var a=document.createElement("div");a.setAttribute(e,"return;"),n=typeof a[e]=="function"}return!n&&gr&&i==="wheel"&&(n=document.implementation.hasFeature("Events.wheel","3.0")),n}var ti=ei,ri=Xn,ni=ti,Tt=10,It=40,Bt=800;function xr(i){var o=0,e=0,n=0,a=0;return"detail"in i&&(e=i.detail),"wheelDelta"in i&&(e=-i.wheelDelta/120),"wheelDeltaY"in i&&(e=-i.wheelDeltaY/120),"wheelDeltaX"in i&&(o=-i.wheelDeltaX/120),"axis"in i&&i.axis===i.HORIZONTAL_AXIS&&(o=e,e=0),n=o*Tt,a=e*Tt,"deltaY"in i&&(a=i.deltaY),"deltaX"in i&&(n=i.deltaX),(n||a)&&i.deltaMode&&(i.deltaMode==1?(n*=It,a*=It):(n*=Bt,a*=Bt)),n&&!o&&(o=n<1?-1:1),a&&!e&&(e=a<1?-1:1),{spinX:o,spinY:e,pixelX:n,pixelY:a}}xr.getEventType=function(){return ri.firefox()?"DOMMouseScroll":ni("wheel")?"wheel":"mousewheel"};var ii=xr,si=ii;const oi=pn(si);function ai(i,o,e,n,a,t){t===void 0&&(t=0);var c=he(i,o,t),d=c.width,h=c.height,p=Math.min(d,e),w=Math.min(h,n);return p>w*a?{width:w*a,height:w}:{width:p,height:p/a}}function li(i){return i.width>i.height?i.width/i.naturalWidth:i.height/i.naturalHeight}function ye(i,o,e,n,a){a===void 0&&(a=0);var t=he(o.width,o.height,a),c=t.width,d=t.height;return{x:Ot(i.x,c,e.width,n),y:Ot(i.y,d,e.height,n)}}function Ot(i,o,e,n){var a=Math.abs(o*n/2-e/2);return We(i,-a,a)}function Lt(i,o){return Math.sqrt(Math.pow(i.y-o.y,2)+Math.pow(i.x-o.x,2))}function Wt(i,o){return Math.atan2(o.y-i.y,o.x-i.x)*180/Math.PI}function ci(i,o,e,n,a,t,c){t===void 0&&(t=0),c===void 0&&(c=!0);var d=c?di:ui,h=he(o.width,o.height,t),p=he(o.naturalWidth,o.naturalHeight,t),w={x:d(100,((h.width-e.width/a)/2-i.x/a)/h.width*100),y:d(100,((h.height-e.height/a)/2-i.y/a)/h.height*100),width:d(100,e.width/h.width*100/a),height:d(100,e.height/h.height*100/a)},b=Math.round(d(p.width,w.width*p.width/100)),x=Math.round(d(p.height,w.height*p.height/100)),y=p.width>=p.height*n,f=y?{width:Math.round(x*n),height:x}:{width:b,height:Math.round(b/n)},u=F(F({},f),{x:Math.round(d(p.width-f.width,w.x*p.width/100)),y:Math.round(d(p.height-f.height,w.y*p.height/100))});return{croppedAreaPercentages:w,croppedAreaPixels:u}}function di(i,o){return Math.min(i,Math.max(0,o))}function ui(i,o){return o}function hi(i,o,e,n,a,t){var c=he(o.width,o.height,e),d=We(n.width/c.width*(100/i.width),a,t),h={x:d*c.width/2-n.width/2-c.width*d*(i.x/100),y:d*c.height/2-n.height/2-c.height*d*(i.y/100)};return{crop:h,zoom:d}}function mi(i,o,e){var n=li(o);return e.height>e.width?e.height/(i.height*n):e.width/(i.width*n)}function pi(i,o,e,n,a,t){e===void 0&&(e=0);
85var c=he(o.naturalWidth,o.naturalHeight,e),d=We(mi(i,o,n),a,t),h=n.height>n.width?n.height/i.height:n.width/i.width,p={x:((c.width-i.width)/2-i.x)*h,y:((c.height-i.height)/2-i.y)*h};return{crop:p,zoom:d}}function Vt(i,o){return{x:(o.x+i.x)/2,y:(o.y+i.y)/2}}function fi(i){return i*Math.PI/180}function he(i,o,e){var n=fi(e);return{width:Math.abs(Math.cos(n)*i)+Math.abs(Math.sin(n)*o),height:Math.abs(Math.sin(n)*i)+Math.abs(Math.cos(n)*o)}}function We(i,o,e){return Math.min(Math.max(i,o),e)}function Te(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return i.filter(function(e){return typeof e=="string"&&e.length>0}).join(" ").trim()}var gi=`.reactEasyCrop_Container { 86 position: absolute; 87 top: 0; 88 left: 0; 89 right: 0; 90 bottom: 0; 91 overflow: hidden; 92 user-select: none; 93 touch-action: none; 94 cursor: move; 95 display: flex; 96 justify-content: center; 97 align-items: center; 98} 99 100.reactEasyCrop_Image, 101.reactEasyCrop_Video { 102 will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */ 103} 104 105.reactEasyCrop_Contain { 106 max-width: 100%; 107 max-height: 100%; 108 margin: auto; 109 position: absolute; 110 top: 0; 111 bottom: 0; 112 left: 0; 113 right: 0; 114} 115.reactEasyCrop_Cover_Horizontal { 116 width: 100%; 117 height: auto; 118} 119.reactEasyCrop_Cover_Vertical { 120 width: auto; 121 height: 100%; 122} 123 124.reactEasyCrop_CropArea { 125 position: absolute; 126 left: 50%; 127 top: 50%; 128 transform: translate(-50%, -50%); 129 border: 1px solid rgba(255, 255, 255, 0.5); 130 box-sizing: border-box; 131 box-shadow: 0 0 0 9999em; 132 color: rgba(0, 0, 0, 0.5); 133 overflow: hidden; 134} 135 136.reactEasyCrop_CropAreaRound { 137 border-radius: 50%; 138} 139 140.reactEasyCrop_CropAreaGrid::before { 141 content: ' '; 142 box-sizing: border-box; 143 position: absolute; 144 border: 1px solid rgba(255, 255, 255, 0.5); 145 top: 0; 146 bottom: 0; 147 left: 33.33%; 148 right: 33.33%; 149 border-top: 0; 150 border-bottom: 0; 151} 152 153.reactEasyCrop_CropAreaGrid::after { 154 content: ' '; 155 box-sizing: border-box; 156 position: absolute; 157 border: 1px solid rgba(255, 255, 255, 0.5); 158 top: 33.33%; 159 bottom: 33.33%; 160 left: 0; 161 right: 0; 162 border-left: 0; 163 border-right: 0; 164} 165`,xi=1,bi=3,yi=1,vi=function(i){Yn(o,i);function o(){var e=i!==null&&i.apply(this,arguments)||this;return e.cropperRef=l.createRef(),e.imageRef=l.createRef(),e.videoRef=l.createRef(),e.containerPosition={x:0,y:0},e.containerRef=null,e.styleRef=null,e.containerRect=null,e.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},e.dragStartPosition={x:0,y:0},e.dragStartCrop={x:0,y:0},e.gestureZoomStart=0,e.gestureRotationStart=0,e.isTouching=!1,e.lastPinchDistance=0,e.lastPinchRotation=0,e.rafDragTimeout=null,e.rafPinchTimeout=null,e.wheelTimer=null,e.currentDoc=typeof document<"u"?document:null,e.currentWindow=typeof window<"u"?window:null,e.resizeObserver=null,e.previousCropSize=null,e.isInitialized=!1,e.state={cropSize:null,hasWheelJustStarted:!1,mediaObjectFit:void 0},e.initResizeObserver=function(){if(!(typeof window.ResizeObserver>"u"||!e.containerRef)){var n=!0;e.resizeObserver=new window.ResizeObserver(function(a){if(n){n=!1;return}e.computeSizes()}),e.resizeObserver.observe(e.containerRef)}},e.preventZoomSafari=function(n){return n.preventDefault()},e.cleanEvents=function(){e.currentDoc&&(e.currentDoc.removeEventListener("mousemove",e.onMouseMove),e.currentDoc.removeEventListener("mouseup",e.onDragStopped),e.currentDoc.removeEventListener("touchmove",e.onTouchMove),e.currentDoc.removeEventListener("touchend",e.onDragStopped),e.currentDoc.removeEventListener("gesturechange",e.onGestureChange),e.currentDoc.removeEventListener("gestureend",e.onGestureEnd),e.currentDoc.removeEventListener("scroll",e.onScroll))},e.clearScrollEvent=function(){e.containerRef&&e.containerRef.removeEventListener("wheel",e.onWheel),e.wheelTimer&&clearTimeout(e.wheelTimer)},e.onMediaLoad=function(){var n=e.computeSizes();n&&(e.previousCropSize=n,e.emitCropData(),e.setInitialCrop(n),e.isInitialized=!0),e.props.onMediaLoaded&&e.props.onMediaLoaded(e.mediaSize)},e.setInitialCrop=function(n){if(e.props.initialCroppedAreaPercentages){var a=hi(e.props.initialCroppedAreaPercentages,e.mediaSize,e.props.rotation,n,e.props.minZoom,e.props.maxZoom),t=a.crop,c=a.zoom;e.props.onCropChange(t),e.props.onZoomChange&&e.props.onZoomChange(c)}else if(e.props.initialCroppedAreaPixels){var d=pi(e.props.initialCroppedAreaPixels,e.mediaSize,e.props.rotation,n,e.props.minZoom,e.props.maxZoom),t=d.crop,c=d.zoom;e.props.onCropChange(t),e.props.onZoomChange&&e.props.onZoomChange(c)}},e.computeSizes=function(){var n,a,t,c,d,h,p=e.imageRef.current||e.videoRef.current;if(p&&e.containerRef){e.containerRect=e.containerRef.getBoundingClientRect(),e.saveContainerPosition();var w=e.containerRect.width/e.containerRect.height,b=((n=e.imageRef.current)===null||n===void 0?void 0:n.naturalWi
165dth)||((a=e.videoRef.current)===null||a===void 0?void 0:a.videoWidth)||0,x=((t=e.imageRef.current)===null||t===void 0?void 0:t.naturalHeight)||((c=e.videoRef.current)===null||c===void 0?void 0:c.videoHeight)||0,y=p.offsetWidth<b||p.offsetHeight<x,f=b/x,u=void 0;if(y)switch(e.state.mediaObjectFit){default:case"contain":u=w>f?{width:e.containerRect.height*f,height:e.containerRect.height}:{width:e.containerRect.width,height:e.containerRect.width/f};break;case"horizontal-cover":u={width:e.containerRect.width,height:e.containerRect.width/f};break;case"vertical-cover":u={width:e.containerRect.height*f,height:e.containerRect.height};break}else u={width:p.offsetWidth,height:p.offsetHeight};e.mediaSize=F(F({},u),{naturalWidth:b,naturalHeight:x}),e.props.setMediaSize&&e.props.setMediaSize(e.mediaSize);var S=e.props.cropSize?e.props.cropSize:ai(e.mediaSize.width,e.mediaSize.height,e.containerRect.width,e.containerRect.height,e.props.aspect,e.props.rotation);return(((d=e.state.cropSize)===null||d===void 0?void 0:d.height)!==S.height||((h=e.state.cropSize)===null||h===void 0?void 0:h.width)!==S.width)&&e.props.onCropSizeChange&&e.props.onCropSizeChange(S),e.setState({cropSize:S},e.recomputeCropPosition),e.props.setCropSize&&e.props.setCropSize(S),S}},e.saveContainerPosition=function(){if(e.containerRef){var n=e.containerRef.getBoundingClientRect();e.containerPosition={x:n.left,y:n.top}}},e.onMouseDown=function(n){e.currentDoc&&(n.preventDefault(),e.currentDoc.addEventListener("mousemove",e.onMouseMove),e.currentDoc.addEventListener("mouseup",e.onDragStopped),e.saveContainerPosition(),e.onDragStart(o.getMousePoint(n)))},e.onMouseMove=function(n){return e.onDrag(o.getMousePoint(n))},e.onScroll=function(n){e.currentDoc&&(n.preventDefault(),e.saveContainerPosition())},e.onTouchStart=function(n){e.currentDoc&&(e.isTouching=!0,!(e.props.onTouchRequest&&!e.props.onTouchRequest(n))&&(e.currentDoc.addEventListener("touchmove",e.onTouchMove,{passive:!1}),e.currentDoc.addEventListener("touchend",e.onDragStopped),e.saveContainerPosition(),n.touches.length===2?e.onPinchStart(n):n.touches.length===1&&e.onDragStart(o.getTouchPoint(n.touches[0]))))},e.onTouchMove=function(n){n.preventDefault(),n.touches.length===2?e.onPinchMove(n):n.touches.length===1&&e.onDrag(o.getTouchPoint(n.touches[0]))},e.onGestureStart=function(n){e.currentDoc&&(n.preventDefault(),e.currentDoc.addEventListener("gesturechange",e.onGestureChange),e.currentDoc.addEventListener("gestureend",e.onGestureEnd),e.gestureZoomStart=e.props.zoom,e.gestureRotationStart=e.props.rotation)},e.onGestureChange=function(n){if(n.preventDefault(),!e.isTouching){var a=o.getMousePoint(n),t=e.gestureZoomStart-1+n.scale;if(e.setNewZoom(t,a,{shouldUpdatePosition:!0}),e.props.onRotationChange){var c=e.gestureRotationStart+n.rotation;e.props.onRotationChange(c)}}},e.onGestureEnd=function(n){e.cleanEvents()},e.onDragStart=function(n){var a,t,c=n.x,d=n.y;e.dragStartPosition={x:c,y:d},e.dragStartCrop=F({},e.props.crop),(t=(a=e.props).onInteractionStart)===null||t===void 0||t.call(a)},e.onDrag=function(n){var a=n.x,t=n.y;e.currentWindow&&(e.rafDragTimeout&&e.currentWindow.cancelAnimationFrame(e.rafDragTimeout),e.rafDragTimeout=e.currentWindow.requestAnimationFrame(function(){if(e.state.cropSize&&!(a===void 0||t===void 0)){var c=a-e.dragStartPosition.x,d=t-e.dragStartPosition.y,h={x:e.dragStartCrop.x+c,y:e.dragStartCrop.y+d},p=e.props.restrictPosition?ye(h,e.mediaSize,e.state.cropSize,e.props.zoom,e.props.rotation):h;e.props.onCropChange(p)}}))},e.onDragStopped=function(){var n,a;e.isTouching=!1,e.cleanEvents(),e.emitCropData(),(a=(n=e.props).onInteractionEnd)===null||a===void 0||a.call(n)},e.onWheel=function(n){if(e.currentWindow&&!(e.props.onWheelRequest&&!e.props.onWheelRequest(n))){n.preventDefault();var a=o.getMousePoint(n),t=oi(n).pixelY,c=e.props.zoom-t*e.props.zoomSpeed/200;e.setNewZoom(c,a,{shouldUpdatePosition:!0}),e.state.hasWheelJustStarted||e.setState({hasWheelJustStarted:!0},function(){var d,h;return(h=(d=e.props).onInteractionStart)===null||h===void 0?void 0:h.call(d)}),e.wheelTimer&&clearTimeout(e.wheelTimer),e.wheelTimer=e.currentWindow.setTimeout(function(){return e.setState({hasWheelJustStarted:!1},function(){var d,h;
165return(h=(d=e.props).onInteractionEnd)===null||h===void 0?void 0:h.call(d)})},250)}},e.getPointOnContainer=function(n,a){var t=n.x,c=n.y;if(!e.containerRect)throw new Error("The Cropper is not mounted");return{x:e.containerRect.width/2-(t-a.x),y:e.containerRect.height/2-(c-a.y)}},e.getPointOnMedia=function(n){var a=n.x,t=n.y,c=e.props,d=c.crop,h=c.zoom;return{x:(a+d.x)/h,y:(t+d.y)/h}},e.setNewZoom=function(n,a,t){var c=t===void 0?{}:t,d=c.shouldUpdatePosition,h=d===void 0?!0:d;if(!(!e.state.cropSize||!e.props.onZoomChange)){var p=We(n,e.props.minZoom,e.props.maxZoom);if(h){var w=e.getPointOnContainer(a,e.containerPosition),b=e.getPointOnMedia(w),x={x:b.x*p-w.x,y:b.y*p-w.y},y=e.props.restrictPosition?ye(x,e.mediaSize,e.state.cropSize,p,e.props.rotation):x;e.props.onCropChange(y)}e.props.onZoomChange(p)}},e.getCropData=function(){if(!e.state.cropSize)return null;var n=e.props.restrictPosition?ye(e.props.crop,e.mediaSize,e.state.cropSize,e.props.zoom,e.props.rotation):e.props.crop;return ci(n,e.mediaSize,e.state.cropSize,e.getAspect(),e.props.zoom,e.props.rotation,e.props.restrictPosition)},e.emitCropData=function(){var n=e.getCropData();if(n){var a=n.croppedAreaPercentages,t=n.croppedAreaPixels;e.props.onCropComplete&&e.props.onCropComplete(a,t),e.props.onCropAreaChange&&e.props.onCropAreaChange(a,t)}},e.emitCropAreaChange=function(){var n=e.getCropData();if(n){var a=n.croppedAreaPercentages,t=n.croppedAreaPixels;e.props.onCropAreaChange&&e.props.onCropAreaChange(a,t)}},e.recomputeCropPosition=function(){var n,a;if(e.state.cropSize){var t=e.props.crop;if(e.isInitialized&&(!((n=e.previousCropSize)===null||n===void 0)&&n.width)&&(!((a=e.previousCropSize)===null||a===void 0)&&a.height)){var c=Math.abs(e.previousCropSize.width-e.state.cropSize.width)>1e-6||Math.abs(e.previousCropSize.height-e.state.cropSize.height)>1e-6;if(c){var d=e.state.cropSize.width/e.previousCropSize.width,h=e.state.cropSize.height/e.previousCropSize.height;t={x:e.props.crop.x*d,y:e.props.crop.y*h}}}var p=e.props.restrictPosition?ye(t,e.mediaSize,e.state.cropSize,e.props.zoom,e.props.rotation):t;e.previousCropSize=e.state.cropSize,e.props.onCropChange(p),e.emitCropData()}},e.onKeyDown=function(n){var a,t,c=e.props,d=c.crop,h=c.onCropChange,p=c.keyboardStep,w=c.zoom,b=c.rotation,x=p;if(e.state.cropSize){n.shiftKey&&(x*=.2);var y=F({},d);switch(n.key){case"ArrowUp":y.y-=x,n.preventDefault();break;case"ArrowDown":y.y+=x,n.preventDefault();break;case"ArrowLeft":y.x-=x,n.preventDefault();break;case"ArrowRight":y.x+=x,n.preventDefault();break;default:return}e.props.restrictPosition&&(y=ye(y,e.mediaSize,e.state.cropSize,w,b)),n.repeat||(t=(a=e.props).onInteractionStart)===null||t===void 0||t.call(a),h(y)}},e.onKeyUp=function(n){var a,t;switch(n.key){case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":n.preventDefault();break;default:return}e.emitCropData(),(t=(a=e.props).onInteractionEnd)===null||t===void 0||t.call(a)},e}return o.prototype.componentDidMount=function(){!this.currentDoc||!this.currentWindow||(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),typeof window.ResizeObserver>"u"&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.currentDoc.addEventListener("scroll",this.onScroll),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=gi,this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef),this.props.setCropperRef&&this.props.setCropperRef(this.cropperRef))},o.prototype.componentWillUnmount=function(){var e,n;!this.currentDoc||!this.currentWindow||(typeof window.ResizeObserver>"u"&&this.currentWindow.removeEventListener("resize",this.computeSizes),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&((n=this.styleRef.parentNode)===null||n===void 0||n.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},o.prototype.componentDidUpdate=function(e){var n,a,t,c,d,h,p,w,b;e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect?this.computeSizes():e.objectFit!==this.props.objectFit?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():((n=e.cropSize)===null||n===void 0?void 0:n.height)!==((a=this.props.cropSize)===null||a===void 0?void 0:a.height)||((t=e.cropSize)===null||t===void 0?void 0:t.width)!==((c=this.props.cropSize)===null||c===void 0?void 0:c.width)?this.computeSizes():(((d=e.crop)===null||d===void 0?void 0:d.x)!==((h=this.props.crop)===null||h===void 0?void 0:h.x)||((p=e.crop)===null||p===void 0?void 0:p.y)!==((w=this.props.crop)===null||w===void 0?void 0:w.y))&&this.emitCropAreaChange(),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),e.video!==this.props.video&&((b=this.videoRef.current)===null||b===void 0||b.load());var x=this.getObjectFit();x!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:x},this.computeSizes)},o.prototype.getAspect=function(){var e=this.props,n=e.cropSize,a=e.aspect;return n?n.width/n.height:a},o.prototype.getObjectFit=function(){var e,n,a,t;if(this.props.objectFit==="cover"){var c=this.imageRef.current||this.videoRef.current;if(c&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var d=this.containerRect.width/this.containerRect.height,h=((e=this.imageRef.current)===null||e===void 0?void 0:e.naturalWi
165dth)||((n=this.videoRef.current)===null||n===void 0?void 0:n.videoWidth)||0,p=((a=this.imageRef.current)===null||a===void 0?void 0:a.naturalHeight)||((t=this.videoRef.current)===null||t===void 0?void 0:t.videoHeight)||0,w=h/p;return w<d?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},o.prototype.onPinchStart=function(e){var n=o.getTouchPoint(e.touches[0]),a=o.getTouchPoint(e.touches[1]);this.lastPinchDistance=Lt(n,a),this.lastPinchRotation=Wt(n,a),this.onDragStart(Vt(n,a))},o.prototype.onPinchMove=function(e){var n=this;if(!(!this.currentDoc||!this.currentWindow)){var a=o.getTouchPoint(e.touches[0]),t=o.getTouchPoint(e.touches[1]),c=Vt(a,t);this.onDrag(c),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var d=Lt(a,t),h=n.props.zoom*(d/n.lastPinchDistance);n.setNewZoom(h,c,{shouldUpdatePosition:!1}),n.lastPinchDistance=d;var p=Wt(a,t),w=n.props.rotation+(p-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(w),n.lastPinchRotation=p})}},o.prototype.render=function(){var e=this,n,a=this.props,t=a.image,c=a.video,d=a.mediaProps,h=a.cropperProps,p=a.transform,w=a.crop,b=w.x,x=w.y,y=a.rotation,f=a.zoom,u=a.cropShape,S=a.showGrid,v=a.roundCropAreaPixels,R=a.style,E=R.containerStyle,z=R.cropAreaStyle,W=R.mediaStyle,U=a.classes,_=U.containerClassName,k=U.cropAreaClassName,A=U.mediaClassName,N=(n=this.state.mediaObjectFit)!==null&&n!==void 0?n:this.getObjectFit();return l.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(T){return e.containerRef=T},"data-testid":"container",style:E,className:Te("reactEasyCrop_Container",_)},t?l.createElement("img",F({alt:"",className:Te("reactEasyCrop_Image",N==="contain"&&"reactEasyCrop_Contain",N==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",N==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",A)},d,{src:t,ref:this.imageRef,style:F(F({},W),{transform:p||"translate(".concat(b,"px, ").concat(x,"px) rotate(").concat(y,"deg) scale(").concat(f,")")}),onLoad:this.onMediaLoad})):c&&l.createElement("video",F({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:Te("reactEasyCrop_Video",N==="contain"&&"reactEasyCrop_Contain",N==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",N==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",A)},d,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:F(F({},W),{transform:p||"translate(".concat(b,"px, ").concat(x,"px) rotate(").concat(y,"deg) scale(").concat(f,")")}),controls:!1}),(Array.isArray(c)?c:[{src:c}]).map(function(O){return l.createElement("source",F({key:O.src},O))})),this.state.cropSize&&l.createElement("div",F({ref:this.cropperRef,style:F(F({},z),{width:v?Math.round(this.state.cropSize.width):this.state.cropSize.width,height:v?Math.round(this.state.cropSize.height):this.state.cropSize.height}),tabIndex:0,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,"data-testid":"cropper",className:Te("reactEasyCrop_CropArea",u==="round"&&"reactEasyCrop_CropAreaRound",S&&"reactEasyCrop_CropAreaGrid",k)},h)))},o.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:bi,minZoom:xi,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},cropperProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0,keyboardStep:yi},o.getMousePoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},o.getTouchPoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},o}(l.Component),br=["PageUp","PageDown"],yr=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],vr={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},pe="Slider",[mt,wi,_i]=ln(pe),[wr,ho]=cn(pe,[_i]),[Si,Ve]=wr(pe),_r=l.forwardRef((i,o)=>{const{name:e,min:n=0,max:a=100,step:t=1,orientation:c="horizontal",disabled:d=!1,minStepsBetweenThumbs:h=0,defaultValue:p=[n],value:w,onValueChange:b=()=>{},onValueCommit:x=()=>{},inverted:y=!1,form:f,...u}=i,S=l.useRef(new Set),v=l.useRef(0),E=c==="horizontal"?ki:ji,[z=[],W]=dn({prop:w,defaultProp:p,onChange:O=>{var $;($=[...S.current][v.current])==null||$.focus(),b(O)}}),U=l.useRef(z);function _(O){const T=Mi(z,O);N(O,T)}function k(O){N(O,v.current)}function A(){const O=U.current[v.current];z[v.current]!==O&&x(z)}function N(O,T,{commit:$}={commit:!1}){const se=Ai(t),fe=Ti(Math.round((O-n)/t)*t+n,se),Q=Yt(fe,[n,a]);W((H=[])=>{const X=Ei(H,Q,T);if(Di(X,h*t)){v.current=X.indexOf(Q);const G=String(X)!==String(H);return G&&$&&x(X),G?X:H}else return H})}return r.jsx(Si,{scope:i.__scopeSlider,name:e,disabled:d,min:n,max:a,valueIndexToChangeRef:v,thumbs:S.current,values:z,orientation:c,form:f,children:r.jsx(mt.Provider,{scope:i.__scopeSlider,children:r.jsx(mt.Slot,{scope:i.__scopeSlider,children:r.jsx(E,{"aria-disabled":d,"data-disabled":d?"":void 0,...u,ref:o,onPointerDown:ue(u.onPointerDown,()=>{d||(U.current=z)}),min:n,max:a,inverted:y,onSlideStart:d?void 0:_,onSlideMove:d?void 0:k,onSlideEnd:d?void 0:A,onHomeKeyDown:()=>!d&&N(n,0,{commit:!0}),onEndKeyDown:()=>!d&&N(a,z.length-1,{commit:!0}),onStepKeyDown:({event:O,direction:T})=>
165{if(!d){const fe=br.includes(O.key)||O.shiftKey&&yr.includes(O.key)?10:1,Q=v.current,H=z[Q],X=t*fe*T;N(H+X,Q,{commit:!0})}}})})})})});_r.displayName=pe;var[Sr,kr]=wr(pe,{startEdge:"left",endEdge:"right",size:"width",direction:1}),ki=l.forwardRef((i,o)=>{const{min:e,max:n,dir:a,inverted:t,onSlideStart:c,onSlideMove:d,onSlideEnd:h,onStepKeyDown:p,...w}=i,[b,x]=l.useState(null),y=me(o,E=>x(E)),f=l.useRef(void 0),u=un(a),S=u==="ltr",v=S&&!t||!S&&t;function R(E){const z=f.current||b.getBoundingClientRect(),W=[0,z.width],_=xt(W,v?[e,n]:[n,e]);return f.current=z,_(E-z.left)}return r.jsx(Sr,{scope:i.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:r.jsx(jr,{dir:u,"data-orientation":"horizontal",...w,ref:y,style:{...w.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:E=>{const z=R(E.clientX);c==null||c(z)},onSlideMove:E=>{const z=R(E.clientX);d==null||d(z)},onSlideEnd:()=>{f.current=void 0,h==null||h()},onStepKeyDown:E=>{const W=vr[v?"from-left":"from-right"].includes(E.key);p==null||p({event:E,direction:W?-1:1})}})})}),ji=l.forwardRef((i,o)=>{const{min:e,max:n,inverted:a,onSlideStart:t,onSlideMove:c,onSlideEnd:d,onStepKeyDown:h,...p}=i,w=l.useRef(null),b=me(o,w),x=l.useRef(void 0),y=!a;function f(u){const S=x.current||w.current.getBoundingClientRect(),v=[0,S.height],E=xt(v,y?[n,e]:[e,n]);return x.current=S,E(u-S.top)}return r.jsx(Sr,{scope:i.__scopeSlider,startEdge:y?"bottom":"top",endEdge:y?"top":"bottom",size:"height",direction:y?1:-1,children:r.jsx(jr,{"data-orientation":"vertical",...p,ref:b,style:{...p.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:u=>{const S=f(u.clientY);t==null||t(S)},onSlideMove:u=>{const S=f(u.clientY);c==null||c(S)},onSlideEnd:()=>{x.current=void 0,d==null||d()},onStepKeyDown:u=>{const v=vr[y?"from-bottom":"from-top"].includes(u.key);h==null||h({event:u,direction:v?-1:1})}})})}),jr=l.forwardRef((i,o)=>{const{__scopeSlider:e,onSlideStart:n,onSlideMove:a,onSlideEnd:t,onHomeKeyDown:c,onEndKeyDown:d,onStepKeyDown:h,...p}=i,w=Ve(pe,e);return r.jsx(_e.span,{...p,ref:o,onKeyDown:ue(i.onKeyDown,b=>{b.key==="Home"?(c(b),b.preventDefault()):b.key==="End"?(d(b),b.preventDefault()):br.concat(yr).includes(b.key)&&(h(b),b.preventDefault())}),onPointerDown:ue(i.onPointerDown,b=>{const x=b.target;x.setPointerCapture(b.pointerId),b.preventDefault(),w.thumbs.has(x)?x.focus():n(b)}),onPointerMove:ue(i.onPointerMove,b=>{b.target.hasPointerCapture(b.pointerId)&&a(b)}),onPointerUp:ue(i.onPointerUp,b=>{const x=b.target;x.hasPointerCapture(b.pointerId)&&(x.releasePointerCapture(b.pointerId),t(b))})})}),Nr="SliderTrack",Cr=l.forwardRef((i,o)=>{const{__scopeSlider:e,...n}=i,a=Ve(Nr,e);return r.jsx(_e.span,{"data-disabled":a.disabled?"":void 0,"data-orientation":a.orientation,...n,ref:o})});Cr.displayName=Nr;var pt="SliderRange",Er=l.forwardRef((i,o)=>{const{__scopeSlider:e,...n}=i,a=Ve(pt,e),t=kr(pt,e),c=l.useRef(null),d=me(o,c),h=a.values.length,p=a.values.map(x=>Rr(x,a.min,a.max)),w=h>1?Math.min(...p):0,b=100-Math.max(...p);return r.jsx(_e.span,{"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,...n,ref:d,style:{...i.style,[t.startEdge]:w+"%",[t.endEdge]:b+"%"}})});Er.displayName=pt;var ft="SliderThumb",Pr=l.forwardRef((i,o)=>{const e=wi(i.__scopeSlider),[n,a]=l.useState(null),t=me(o,d=>a(d)),c=l.useMemo(()=>n?e().findIndex(d=>d.ref.current===n):-1,[e,n]);return r.jsx(Ni,{...i,ref:t,index:c})}),Ni=l.forwardRef((i,o)=>{const{__scopeSlider:e,index:n,name:a,...t}=i,c=Ve(ft,e),d=kr(ft,e),[h,p]=l.useState(null),w=me(o,R=>p(R)),b=h?c.form||!!h.closest("form"):!0,x=hn(h),y=c.values[n],f=y===void 0?0:Rr(y,c.min,c.max),u=Pi(n,c.values.length),S=x==null?void 0:x[d.size],v=S?Ri(S,f,d.direction):0;return l.useEffect(()=>{if(h)return c.thumbs.add(h),()=>{c.thumbs.delete(h)}},[h,c.thumbs]),r.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[d.startEdge]:`calc(${f}% + ${v}px)`},children:[r.jsx(mt.ItemSlot,{scope:i.__scopeSlider,children:r.jsx(_e.span,{role:"slider","aria-label":i["aria-label"]||u,"aria-valuemin":c.min,"aria-valuenow":y,"aria-valuemax":c.max,"aria-orientation":c.orientation,"data-orientation":c.orientation,"data-disabled":c.disabled?"":void 0,tabIndex:c.disabled?void 0:0,...t,ref:w,style:y===void 0?{display:"none"}:i.style,onFocus:ue(i.onFocus,()=>{c.valueIndexToChangeRef.current=n})})}),b&&r.jsx(Mr,{name:a??(c.name?c.name+(c.values.length>1?"[]":""):void 0),form:c.form,value:y},n)]})});
165Pr.displayName=ft;var Ci="RadioBubbleInput",Mr=l.forwardRef(({__scopeSlider:i,value:o,...e},n)=>{const a=l.useRef(null),t=me(a,n),c=mn(o);return l.useEffect(()=>{const d=a.current;if(!d)return;const h=window.HTMLInputElement.prototype,w=Object.getOwnPropertyDescriptor(h,"value").set;if(c!==o&&w){const b=new Event("input",{bubbles:!0});w.call(d,o),d.dispatchEvent(b)}},[c,o]),r.jsx(_e.input,{style:{display:"none"},...e,ref:t,defaultValue:o})});Mr.displayName=Ci;function Ei(i=[],o,e){const n=[...i];return n[e]=o,n.sort((a,t)=>a-t)}function Rr(i,o,e){const t=100/(e-o)*(i-o);return Yt(t,[0,100])}function Pi(i,o){return o>2?`Value ${i+1} of ${o}`:o===2?["Minimum","Maximum"][i]:void 0}function Mi(i,o){if(i.length===1)return 0;const e=i.map(a=>Math.abs(a-o)),n=Math.min(...e);return e.indexOf(n)}function Ri(i,o,e){const n=i/2,t=xt([0,50],[0,n]);return(n-t(o)*e)*e}function zi(i){return i.slice(0,-1).map((o,e)=>i[e+1]-o)}function Di(i,o){if(o>0){const e=zi(i);return Math.min(...e)>=o}return!0}function xt(i,o){return e=>{if(i[0]===i[1]||o[0]===o[1])return o[0];const n=(o[1]-o[0])/(i[1]-i[0]);return o[0]+n*(e-i[0])}}function Ai(i){return(String(i).split(".")[1]||"").length}function Ti(i,o){const e=Math.pow(10,o);return Math.round(i*e)/e}var zr=_r,Ii=Cr,Bi=Er,Oi=Pr;const Dr=l.forwardRef(({className:i,...o},e)=>r.jsxs(zr,{ref:e,className:Qr("relative flex w-full touch-none select-none items-center",i),...o,children:[r.jsx(Ii,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:r.jsx(Bi,{className:"absolute h-full bg-primary"})}),r.jsx(Oi,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));Dr.displayName=zr.displayName;async function Li(i,o){const e=new Image;e.crossOrigin="anonymous",await new Promise((c,d)=>{e.onload=()=>c(),e.onerror=d,e.src=i});const n=document.createElement("canvas"),a=Math.min(o.width,o.height);n.width=a,n.height=a;const t=n.getContext("2d");return t.beginPath(),t.arc(a/2,a/2,a/2,0,Math.PI*2),t.closePath(),t.clip(),t.drawImage(e,o.x,o.y,o.width,o.height,0,0,a,a),new Promise(c=>{n.toBlob(d=>c(d),"image/png",1)})}const Wi=({imageSrc:i,open:o,onClose:e,onCropComplete:n})=>{const[a,t]=l.useState({x:0,y:0}),[c,d]=l.useState(1),[h,p]=l.useState(null),w=l.useCallback(f=>{t(f)},[]),b=l.useCallback(f=>{d(f)},[]),x=l.useCallback((f,u)=>{p(u)},[]),y=async()=>{if(!h)return;const f=await Li(i,h);n(f)};return r.jsx(Je,{open:o,onOpenChange:f=>!f&&e(),children:r.jsxs(Qe,{className:"sm:max-w-md",children:[r.jsx(Xt,{children:r.jsx(Jt,{className:"font-heading",children:"Bild zuschneiden"})}),r.jsx("div",{className:"relative w-full aspect-square bg-black rounded-lg overflow-hidden",children:r.jsx(vi,{image:i,crop:a,zoom:c,aspect:1,cropShape:"round",showGrid:!1,onCropChange:w,onZoomChange:b,onCropComplete:x})}),r.jsxs("div",{className:"flex items-center gap-3 px-2",children:[r.jsx(Gn,{className:"h-4 w-4 text-muted-foreground flex-shrink-0"}),r.jsx(Dr,{value:[c],min:1,max:3,step:.05,onValueChange:f=>d(f[0]),className:"flex-1"}),r.jsx(qn,{className:"h-4 w-4 text-muted-foreground flex-shrink-0"})]}),r.jsxs(xn,{className:"gap-2",children:[r.jsx(J,{variant:"outline",onClick:e,children:"Abbrechen"}),r.jsx(J,{onClick:y,className:"bg-[hsl(104,46%,48%)] hover:bg-[hsl(104,46%,40%)] text-white",children:"Ãbernehmen"})]})]})})};async function Vi(i,o={}){const{maxDimension:e=1200,quality:n=.82,mimeType:a="image/jpeg"}=o;if(!i.type.startsWith("image/")||i.type==="image/gif"||i.type==="image/svg+xml"||i.size<100*1024)return i;try{const t=await new Promise((y,f)=>{const u=new FileReader;u.onload=()=>y(u.result),u.onerror=f,u.readAsDataURL(i)}),c=await new Promise((y,f)=>{const u=new Image;u.onload=()=>y(u),u.onerror=f,u.src=t});let{width:d,height:h}=c;(d>e||h>e)&&(d>=h?(h=Math.round(h*e/d),d=e):(d=Math.round(d*e/h),h=e));const p=document.createElement("canvas");p.width=d,p.height=h;const w=p.getContext("2d");if(!w)return i;w.drawImage(c,0,0,d,h);const b=await new Promise(y=>p.toBlob(y,a,n));if(!b||b.size>=i.size)return i;const x=i.name.replace(/\.[^.]+$/,"")+".jpg";return new File([b],x,{type:a,lastModified:Date.now()})}catch(t){return console.warn("Image compression failed, using original:",t),i}}const Fi=({userId:i,email:o,fullName:e,onComplete:n})=>{const a=e?e.trim().split(/\s+/):[],[t,c]=l.useState({first_name:a[0]||"",last_name:a.slice(1).join(" ")||"",business_description:"",interests:"",website:"",city:"",postal_code:"",country:"Deutschland",phone:"",birthday:"",social_youtube:"",social_instagram:"",social_linkedin:"",social_tiktok:"",social_podcast:"",social_facebook:""}),[d,h]=l.useState(null),[p,w]=l.useState(null),[b,x]=l.useState(null),[y,f]=l.useState(!1),[u,S]=l.useState(!1),v=l.useRef(null),R=_=>{var A;
165const k=(A=_.target.files)==null?void 0:A[0];if(k){if(k.size>5*1024*1024){L.error("Bild zu groÃ",{description:"Maximal 5 MB."});return}x(URL.createObjectURL(k)),f(!0),v.current&&(v.current.value="")}},E=_=>{const k=new File([_],"avatar.png",{type:"image/png"});h(k),w(URL.createObjectURL(_)),f(!1)},z=async _=>{if(_.preventDefault(),console.log("[ProfileSetup] Submit clicked",{first_name:t.first_name,last_name:t.last_name,hasAvatar:!!d}),!t.first_name.trim()||!t.last_name.trim()){console.log("[ProfileSetup] Validation failed - missing name"),L.error("Bitte gib deinen Vor- und Nachnamen ein.");return}S(!0);try{let k=null;if(d){const N=await Vi(d,{maxDimension:800,quality:.85}),O=N.name.split(".").pop(),T=`${i}/avatar.${O}`,{error:$}=await P.storage.from("avatars").upload(T,N,{upsert:!0,contentType:N.type});if($){console.error("Avatar upload error:",$),L.error("Fehler beim Hochladen des Fotos."),S(!1);return}const{data:se}=P.storage.from("avatars").getPublicUrl(T);k=se.publicUrl}const{error:A}=await P.from("profiles").update({first_name:t.first_name.trim(),last_name:t.last_name.trim(),full_name:`${t.first_name.trim()} ${t.last_name.trim()}`,business_description:t.business_description.trim()||null,interests:t.interests.trim()||null,website:t.website.trim()||null,city:t.city.trim()||null,postal_code:t.postal_code.trim()||null,country:t.country||"Deutschland",phone:t.phone.trim()||null,birthday:t.birthday||null,social_youtube:t.social_youtube.trim()||null,social_instagram:t.social_instagram.trim()||null,social_linkedin:t.social_linkedin.trim()||null,social_tiktok:t.social_tiktok.trim()||null,social_podcast:t.social_podcast.trim()||null,social_facebook:t.social_facebook.trim()||null,profile_completed:!0,...k?{avatar_url:k}:{},...(()=>{const N=en();return N?{signup_referrer:N.referrer||null,signup_landing_page:N.landing_page||null,signup_utm_source:N.utm_source||null,signup_utm_medium:N.utm_medium||null,signup_utm_campaign:N.utm_campaign||null,signup_utm_term:N.utm_term||null,signup_utm_content:N.utm_content||null,signup_gclid:N.gclid||null}:{}})()}).eq("id",i);A?(console.error("[ProfileSetup] Profile update error:",A),L.error("Fehler beim Speichern des Profils: "+(A.message||"Unbekannter Fehler"))):(console.log("[ProfileSetup] Profile saved successfully"),L.success("Profil gespeichert!"),n())}catch(k){console.error("[ProfileSetup] Unexpected error saving profile:",k),L.error("Ein unerwarteter Fehler ist aufgetreten. Bitte versuche es erneut.")}finally{S(!1)}},W=[{key:"first_name",label:"Vorname",icon:et,placeholder:"Max",required:!0},{key:"last_name",label:"Nachname",icon:et,placeholder:"Mustermann",required:!0},{key:"business_description",label:"Mein Business",icon:vn,placeholder:"Beschreibe kurz, was du machst...",textarea:!0},{key:"interests",label:"Interessen neben meinem Business",icon:Qt,placeholder:"z.B. Reisen, Kochen, Sport, Kunst...",textarea:!0},{key:"website",label:"Website",icon:wn,placeholder:"https://deine-website.de"},{key:"country",label:"Land",icon:Ye,placeholder:"",isCountrySelect:!0},{key:"city",label:"Ort",icon:Ye,placeholder:"z.B. Berlin"},{key:"postal_code",label:"PLZ",icon:Ye,placeholder:"z.B. 10115"},{key:"phone",label:"Telefon",icon:tn,placeholder:"+49 ..."},{key:"birthday",label:"Geburtstag",icon:lr,placeholder:"",inputType:"date"}],U=[{key:"social_youtube",label:"YouTube",icon:_n,placeholder:"https://youtube.com/@dein-kanal",hint:"Mit YouTube-URL werden deine letzten 3 Videos auf deinem öffentlichen Profil gezeigt."},{key:"social_instagram",label:"Instagram",icon:Sn,placeholder:"https://instagram.com/dein-profil"},{key:"social_linkedin",label:"LinkedIn",icon:kn,placeholder:"https://linkedin.com/in/dein-profil"},{key:"social_tiktok",label:"TikTok",icon:Vn,placeholder:"https://tiktok.com/@dein-profil"},{key:"social_podcast",label:"Podcast",icon:jn,placeholder:"RSS-Feed-URL deines Podcasts",hint:"Für Auto-Anzeige der letzten Episoden bitte RSS-Feed-URL eintragen (kein Spotify-/Apple-Link)."},{key:"social_facebook",label:"Facebook",icon:Nn,placeholder:"https://facebook.com/dein-profil"}];return r.jsxs(r.Fragment,{children:[b&&r.jsx(Wi,{imageSrc:b,open:y,onClose:()=>f(!1),onCropComplete:E}),r.jsx("div",{className:"min-h-screen bg-white flex items-center justify-center px-4 py-12",children:r.jsxs("div",{className:"w-full max-w-lg",children:[r.jsxs("div",{className:"text-center mb-8",children:[r.jsx("h1",{className:"text-3xl font-heading uppercase text-black",children:"Willkommen im Club!"}),r.jsx("h2",{className:"text-lg font-heading uppercase text-black mt-1",children:"Erstelle jetzt dein Profil"}),r.jsx("p",{className:"text-gray-600 font-body mt-3 leading-relaxed max-w-md mx-auto",children:"Dein Profil ist deine Visitenkarte im Business Club One. Andere Member können dich so finden, mehr über dein Business erfahren und sich direkt mit dir vernetzen. Je vollständiger dein Profil, desto besser wirst du sichtbar."})]}),r.jsxs("form",{onSubmit:z,className:"space-y-6",children:[r.jsxs("div",{className:"flex flex-col items-center gap-3",children:[r.jsx("button",{type:"button",onClick:()=>{var _;return(_=v.current)==null?void 0:_.click()},className:"relative w-28 h-28 rounded-full overflow-hidden bg-gray-100 border-2 border-dashed border-gray-300 hover:border-[hsl(104,46%,48%)] transition-colors group",children:p?r.jsx("img",{src:p,alt:"Avatar",className:"w-full h-full object-cover"}):r.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[r.jsx(Ln,{className:"h-6 w-6 text-gray-400 group-hover:text-[hsl(104,46%,48%)]"}),r.jsx("span",{className:"text-xs text-gray-400 mt-1 font-body",children:"Foto"})]})}),r.jsx("input",{ref:v,type:"file",accept:"image/*",onChange:R,className:"hidden"}),r.jsx("span",{className:"text-xs text-gray-500 font-body text-center leading-snug",children:"JPG oder PNG · max. 5 MB · Gesicht gut erkennbar · wird rund zugeschnitten"}),r.jsx("span",{className:"text-xs text-amber-600 font-body text-center",children:"Hinweis: Ohne Profilbild wirst du im Mitglieder-Verzeichnis nicht angezeigt."})]}),W.map(_=>r.jsxs("div",{className:"space-y-2",children:[r.jsxs(Ze,{htmlFor:_.key,className:"text-black font-body flex items-center gap-2",children:[r.jsx(_.icon,{className:"h-4 w-4 text-gray-500"}),_.label,_.required&&r.jsx("span",{className:"text-red-500",children:"*"})]}),_.isCountrySelect?r.jsx("select",{id:_.key,value:t[_.key],onChange:k=>c(A=>({...A,[_.key]:k.target.value})),className:"w-full px-3 py-2 rounded-md border border-gray-300 bg-white text-sm font-body text-black focus:outline-none focus:ring-2 focus:ring-[hsl(104,46%,48%)]/30",children:$n.map(k=>r.jsx("option",{value:k,children:k},k))}):_.textarea?r.jsx(yn,{id:_.key,placeholder:_.placeholder,value:t[_.key],onChange:k=>c(A=>({...A,[_.key]:k.target.value})),className:"bg-white border-gray-300 text-black font-body min-h-[100px]",maxLength:500}):r.jsx($e,{id:_.key,type:_.inputType||"text",placeholder:_.placeholder,value:t[_.key],onChange:k=>c(A=>({...A,[_.key]:k.target.value})),className:"bg-white border-gray-300 text-black font-body",required:_.required})]},_.key)),r.jsxs("div",{className:"pt-4 border-t border-gray-200",children:[r.jsx("p",{className:"text-sm font-heading uppercase text-black mb-4",children:"Social Media (optional)"}),r.jsx("div",{className:"space-y-4",children:U.map(_=>r.jsxs("div",{className:"space-y-1",children:[r.jsxs(Ze,{htmlFor:_.key,className:"text-black font-body flex items-center gap-2 text-sm",children:[r.jsx(_.icon,{className:"h-4 w-4 text-gray-500"}),_.label]}),r.jsx($e,{id:_.key,placeholder:_.placeholder,value:t[_.key],onChange:k=>c(A=>({...A,[_.key]:k.target.value})),className:"bg-white border-gray-300 text-black font-body"}),_.hint&&r.jsx("p",{className:"text-[11px] text-gray-500 font-body leading-snug",children:_.hint})]},_.key))})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsxs(Ze,{className:"text-black font-body flex items-center gap-2",children:[r.jsx(gt,{className:"h-4 w-4 text-gray-500"}),"E-Mail Adresse"]}),r.jsx($e,{value:o,disabled:!0,className:"bg-gray-50 border-gray-200 text-gray-500 font-body"})]}),r.jsx(J,{type:"submit",disabled:u,className:"w-full bg-[hsl(104,46%,48%)] text-white hover:bg-[hsl(104,46%,42%)] font-body font-bold text-lg py-6",children:u?"Wird gespeichert...":"Profil speichern & loslegen"}),r.jsx("button",{type:"button",onClick:n,className:"w-full text-center text-sm text-gray-400 hover:text-gray-600 font-body transition-colors",children:"Später ausfüllen"})]})]})})]})};function Hi(i){const o=l.useRef(null);l.useEffect(()=>{if(!i)return;const e=()=>{P.from("profiles").update({last_seen:new Date().toISOString()}).eq("id",i).then(()=>{})};e(),o.current=setInterval(e,6e4);const n=()=>{document.visibilityState==="visible"&&e()};
165return document.addEventListener("visibilitychange",n),()=>{o.current&&clearInterval(o.current),document.removeEventListener("visibilitychange",n)}},[i])}function mo(i){return i?Date.now()-new Date(i).getTime()<5*60*1e3:!1}const Ft="BMzOQ4h6cNCV6yg6Nd4LIGs9R0a_FipnacrgrfRNmlPO823cJOFUuuOdZ44XSvoR9pNBMuKO9dB33Yh8Y0I6g5Y";function Ht(i){const o="=".repeat((4-i.length%4)%4),e=(i+o).replace(/-/g,"+").replace(/_/g,"/"),n=atob(e),a=new Uint8Array(n.length);for(let t=0;t<n.length;++t)a[t]=n.charCodeAt(t);return a.buffer.slice(0)}function Ui(i){const[o,e]=l.useState(!1),[n,a]=l.useState(null),[t,c]=l.useState(!1),[d,h]=l.useState(!1),p=l.useCallback(async y=>{if(!i)return!0;const f=y.toJSON(),{error:u}=await P.from("push_subscriptions").upsert({user_id:i,endpoint:f.endpoint,p256dh:f.keys.p256dh,auth:f.keys.auth},{onConflict:"user_id,endpoint"});return u?(console.error("Error saving subscription:",u),!1):!0},[i]),w=l.useCallback(async()=>{try{const y=await Et();let f=y?await y.pushManager.getSubscription():null;if(!f&&y&&i&&typeof Notification<"u"&&Notification.permission==="granted"){const{data:u}=await P.from("push_subscriptions").select("id").eq("user_id",i).limit(1).maybeSingle();if(u)try{f=await y.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:Ht(Ft)}),await P.from("push_subscriptions").delete().eq("user_id",i)}catch(S){console.warn("Auto-resubscribe failed:",S)}}c(!!f),f&&await p(f)}catch(y){console.error("Error checking push subscription:",y),c(!1)}},[p,i]);l.useEffect(()=>{const y=/iPad|iPhone|iPod/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,f=window.matchMedia("(display-mode: standalone)").matches||navigator.standalone===!0,u=typeof window<"u"&&window.isSecureContext&&!Pt()&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&(!y||f);e(u),a(u?null:y&&!f?"ios-not-installed":Pt()?"preview":window.isSecureContext?"browser":"insecure"),u&&i?w():c(!1)},[i,w]);const b=l.useCallback(async()=>{var y;if(!i)return{ok:!1,reason:"no-user"};if(!o)return{ok:!1,reason:n??"browser"};h(!0);try{const f=await Notification.requestPermission();if(f!=="granted")return h(!1),{ok:!1,reason:f==="denied"?"denied":"dismissed"};const u=await Et();if(!u)return h(!1),{ok:!1,reason:"sw-failed"};const S=Ht(Ft);let v=await u.pushManager.getSubscription();if(v){const E=(y=v.options)==null?void 0:y.applicationServerKey;if(!(E&&new Uint8Array(E).toString()===new Uint8Array(S).toString())){try{await v.unsubscribe()}catch{}v=null}}if(!v)try{v=await u.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:S})}catch(E){const z=await u.pushManager.getSubscription();if(z)try{await z.unsubscribe()}catch{}try{v=await u.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:S})}catch(W){return console.error("Push subscribe failed:",W??E),h(!1),{ok:!1,reason:"subscribe-failed"}}}return await p(v)?(c(!0),h(!1),{ok:!0}):(h(!1),{ok:!1,reason:"save-failed"})}catch(f){return console.error("Push subscription error:",f),h(!1),{ok:!1,reason:"unknown"}}},[i,o,n,p]),x=l.useCallback(async()=>{if(i){h(!0);try{const y=await rn();if(y){const f=await y.pushManager.getSubscription();f&&(await f.unsubscribe(),await P.from("push_subscriptions").delete().eq("user_id",i).eq("endpoint",f.endpoint))}c(!1)}catch(y){console.error("Push unsubscribe error:",y)}h(!1)}},[i]);return{isSupported:o,unsupportedReason:n,isSubscribed:t,isLoading:d,subscribe:b,unsubscribe:x}}const re=[{target:"tour-dashboard",title:"ð Dein Dashboard",description:"Hier siehst du auf einen Blick aktuelle Events, neue Mitglieder und den Member Spotlight.",position:"bottom"},{target:"tour-inbox",title:"âï¸ Nachrichten",description:"Schreibe private Nachrichten an andere Mitglieder. Ungelesene Nachrichten werden dir hier angezeigt.",position:"bottom"},{target:"tour-termine",title:"ð
Termine",description:"Alle Live-Coaching-Sessions, Workshops und Events findest du hier. Verpasse keinen Termin!",position:"bottom"},{target:"tour-inhalte",title:"ð Content",description:"Videos, Audiokurse, Bücher und Tools â hier findest du alle Lerninhalte des Clubs.",position:"bottom"}
165,{target:"tour-community",title:"ð¬ Community",description:"Die gesamte Kommunikation läuft über unsere WhatsApp-Gruppe. Hier findest du auch das Mitgliederverzeichnis, Mentoren und den Marktplatz.",position:"bottom"},{target:"tour-werben",title:"ð Member werben",description:"Empfehle den Club weiter und erhalte attraktive Provisionen für jede erfolgreiche Empfehlung.",position:"bottom"},{target:"tour-membership",title:"ð³ Membership",description:"Verwalte dein Abo, upgrade auf Premium und erhalte Zugang zu exklusiven Inhalten.",position:"bottom"},{target:"tour-profile",title:"ð¤ Dein Profil",description:"Gestalte dein Profil mit Foto, Beschreibung und Social-Media-Links â so finden dich andere Mitglieder.",position:"bottom"},{target:"tour-header-help",title:"â Hilfe & Support",description:"Hast du Fragen? Klicke hier, um uns jederzeit eine Nachricht zu schicken. Wir helfen dir gerne!",position:"bottom"}],ie="starter-guide-completed",Ki=({onComplete:i})=>{const[o,e]=l.useState(0),[n,a]=l.useState({}),[t,c]=l.useState({}),[d,h]=l.useState("top"),[p,w]=l.useState(!1),b=l.useRef(null),x=re[o],y=l.useCallback(()=>{if(!x)return;const v=document.querySelector(`[data-tour="${x.target}"]`);if(!v){o<re.length-1&&e(O=>O+1);return}const R=v.getBoundingClientRect(),E=320,z=180,W=12,U=16;v.scrollIntoView({behavior:"smooth",block:"nearest"});let _=0,k=0,A="top";x.position==="bottom"||R.bottom+z+W<window.innerHeight?(_=R.bottom+W,k=R.left+R.width/2-E/2,A="top"):(_=R.top-z-W,k=R.left+R.width/2-E/2,A="bottom"),k<U&&(k=U),k+E>window.innerWidth-U&&(k=window.innerWidth-U-E);const N=Math.min(Math.max(R.left+R.width/2-k-8,16),E-32);a({position:"fixed",top:`${_}px`,left:`${k}px`,width:`${E}px`,zIndex:10001}),c({left:`${N}px`}),h(A),w(!0)},[x,o]);l.useEffect(()=>{const v=setTimeout(y,300);return window.addEventListener("resize",y),()=>{clearTimeout(v),window.removeEventListener("resize",y)}},[y]),l.useEffect(()=>{if(!x)return;const v=document.querySelector(`[data-tour="${x.target}"]`);return v&&(v.style.position=v.style.position||"relative",v.style.zIndex="10000",v.style.boxShadow="0 0 0 4px hsl(104 46% 48% / 0.5), 0 0 20px hsl(104 46% 48% / 0.2)",v.style.borderRadius=v.style.borderRadius||"8px",v.style.transition="box-shadow 0.3s ease"),()=>{v&&(v.style.zIndex="",v.style.boxShadow="",v.style.transition="")}},[x]);const f=()=>{o<re.length-1?(w(!1),e(v=>v+1)):S()},u=()=>{o>0&&(w(!1),e(v=>v-1))},S=()=>{localStorage.setItem(ie,"1"),i()};return x?r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"fixed inset-0 bg-black/50 z-[9999] transition-opacity duration-300",style:{opacity:p?1:0},onClick:S}),r.jsx("div",{ref:b,style:{...n,opacity:p?1:0,transform:p?"translateY(0)":"translateY(8px)"},className:"transition-all duration-300 ease-out",children:r.jsxs("div",{className:"bg-card border border-border rounded-xl shadow-2xl overflow-hidden",children:[d==="top"&&r.jsx("div",{className:"absolute -top-2 w-4 h-4 bg-card border-l border-t border-border rotate-45",style:t}),d==="bottom"&&r.jsx("div",{className:"absolute -bottom-2 w-4 h-4 bg-card border-r border-b border-border rotate-45",style:t}),r.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border bg-muted/50",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Cn,{className:"h-4 w-4 text-primary"}),r.jsxs("span",{className:"text-xs font-body text-muted-foreground",children:["Schritt ",o+1," von ",re.length]})]}),r.jsx("button",{onClick:S,className:"p-1 text-muted-foreground hover:text-foreground transition-colors",title:"Tour beenden",children:r.jsx(we,{className:"h-4 w-4"})})]}),r.jsxs("div",{className:"px-4 py-4",children:[r.jsx("h4",{className:"font-heading text-base text-foreground mb-1.5",children:x.title}),r.jsx("p",{className:"text-sm font-body text-muted-foreground leading-relaxed",children:x.description})]}),r.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-t border-border bg-muted/30",children:[r.jsx("div",{className:"flex gap-1",children:re.map((v,R)=>r.jsx("div",{className:`w-2 h-2 rounded-full transition-colors ${R===o?"bg-primary":R<o?"bg-primary/40":"bg-border"}`},R))}),r.jsxs("div",{className:"flex gap-2",children:[o>0&&r.jsxs(J,{variant:"ghost",size:"sm",onClick:u,className:"text-xs font-body h-8 px-3",children:[r.jsx(er,{className:"h-3 w-3 mr-1"}),"Zurück"]}),r.jsxs(J,{size:"sm",onClick:f,className:"text-xs font-body h-8 px-4",children:[o===re.length-1?"Fertig!":"Weiter",o<re.length-1&&r.jsx(Ie,{className:"h-3 w-3 ml-1"})]})]})]})]})})]}):null},qi=Object.freeze(Object.defineProperty({__proto__:null,STARTER_GUIDE_KEY:ie,default:Ki},Symbol.toStringTag,{value:"Module"})),Ut=l.lazy(()=>M(()=>import("./MemberDirectory-CBK817Xi.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47]))),Gi=l.lazy(()=>M(()=>import("./MentorDirectory-CaMyDQ_S.js"),__vite__mapDeps([48,2,3,6,1,4,5,11,13,15,49,50])));l.lazy(()=>M(()=>import("./MemberMap-DFuzDkzz.js"),__vite__mapDeps([51,1,2,3,4,5,6,31,11,13])));const Zi=l.lazy(()=>M(()=>import("./ProfileVisitorsPage-BwT_LFam.js"),__vite__mapDeps([52,2,3,6,47,1,4,5,11]))),$i=l.lazy(()=>M(()=>import("./MemberFAQ-i_zOEoGv.js"),__vite__mapDeps([53,2,3,54,1,4,5]))),Yi=l.lazy(()=>M(()=>import("./MemberProfile-BHt8CIyK.js"),__vite__mapDeps([55,2,3,6,1,4,5,7,17,56,57,58,59,30,60,61,62,63,33,10,39,16,43,64,65,66,67,68,69,70,11,12,47,71,18,13,15,14,72,20,49,73,74,27,19,21,75,23,22,24,25,26,28,29,31,32,34,35,36,37,38,40,41,42,44,45,46]))),Kt=l.lazy(()=>M(()=>import("./ContentArea-D9bRMVRg.js"),__vite__mapDeps([76,2,3,6,1,4,5,77,78,27,73,79,42,80,81,82,26,43,36,67,44,50,83]))),Xi=l.lazy(()=>M(()=>import("./MembershipUpgrade-Duvnb54U.js"),__vite__mapDeps([84,2,3,6,85,1,4,5,50,30,79,86,16,7,17,15,11,12,18,14,13,19,20,21,22,23,24,25,26,27,28,29,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47]))),Ji=l.lazy(()=>M(()=>import("./ClubRules-BmIcnIS-.js"),__vite__mapDeps([87,2,3,88,1,4,5,31,32,46,35,18,89,6,16,7,17,15,11,12,14,13,19,20,21,22,23,24,25,26,27,28,29,30,33,34,36,37,38,39,40,41,42,43,44,45,47]))),Qi=l.lazy(()=>M(()=>import("./MemberTermine-BK2P3dAS.js"),__vite__mapDeps([90,2,3,6,1,4,5,49,43,91,50,92,35,39]))),es=l.lazy(()=>M(()=>import("./MemberGruppen-DP8TcrHC.js"),__vite__mapDeps([93,1,2,3,4,5,6,16,94,7,95,62,63,77,96,97,83,10,46,22,30,98,60,18,99,100,39,101,64,17,15,11,12,14,13,19,20,21,23,24,25,26,27,28,29,31,32,33,34,35,36,37,38,40,41,42,43,44,45,47]))),ts=l.lazy(()=>M(()=>import("./MemberWerben-DaRZv6p9.js"),__vite__mapDeps([102,2,3,6,1,4,5,85,37,30,69,46,103,70,67])
165)),rs=l.lazy(()=>M(()=>import("./MemberInbox-BWK-1E51.js"),__vite__mapDeps([104,1,2,3,4,5,94,6,17,7,8,96,97,105,63,10,11,15,83,22,30,98,60,62,18,99,100,39,64,70,16,12,14,13,19,20,21,23,24,25,26,27,28,29,31,32,33,34,35,36,37,38,40,41,42,43,44,45,46,47]))),ns=l.lazy(()=>M(()=>import("./MemberBulletin-Cbb6KPwf.js"),__vite__mapDeps([106,2,3,6,1,4,5,7,17,94,63,101,62,11,34,91,59,39,16,15,12,18,14,13,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,40,41,42,43,44,45,46,47]))),is=l.lazy(()=>M(()=>import("./MemberDetailView-DayMsr9F.js"),__vite__mapDeps([107,2,3,16,1,4,5,6,17,8,33,39,60,62,108,109,40,19,20,21,75,23,83,11,13,34,18,14,50,15,43,110,111,7,12,22,24,25,26,27,28,29,30,31,32,35,36,37,38,41,42,44,45,46,47]))),ss=l.lazy(()=>M(()=>import("./index-BKQfK9e1.js").then(i=>i.T),__vite__mapDeps([1,2,3,4,5]))),os=l.lazy(()=>M(()=>import("./PwaInstallGuide-wYLMLqXv.js"),__vite__mapDeps([112,2,3,68,1,4,5,113,38])));l.lazy(()=>M(()=>import("./ProfileVisitors-BnyGfFNl.js"),__vite__mapDeps([114,2,3,6,47,1,4,5,11])));const as=l.lazy(()=>M(()=>import("./MemberMarktplatz-XN4Md0cV.js"),__vite__mapDeps([115,2,3,6,1,4,5,7,16,58,59,30,10,24,50,34,17,15,11,12,18,14,13,19,20,21,22,23,25,26,27,28,29,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47]))),ls=l.lazy(()=>M(()=>import("./DashboardHome-hCOFhmy0.js"),__vite__mapDeps([116,1,2,3,4,5,35,117,46,33,43,13,118,47,38,6,15,82,30,24,119,12,11,42,40,29,16,7,17,18,14,19,20,21,22,23,25,26,27,28,31,32,34,36,37,39,41,44,45]))),cs=l.lazy(()=>M(()=>import("./FelixCoach-C0EigrzX.js"),__vite__mapDeps([120,2,3,121,1,4,5,17,6,122,63,34,62,123,124,125,41,24,101,39,126,22,44,49,46,35]))),ds=l.lazy(()=>M(()=>import("./MindsetCoach-C4xW1qir.js"),__vite__mapDeps([127,2,3,1,4,5,17,6,128,122,63,34,62,123,124,125,41,129,18,101,39,117,35,33]))),us=l.lazy(()=>M(()=>import("./CoachSelector-Qlo-S66f.js"),__vite__mapDeps([130,2,3,121,128,123,82,1,4,5,37]))),hs=l.lazy(()=>M(()=>import("./AudioCoursePlayer-BfWyws7j.js"),__vite__mapDeps([131,2,3,6,83,1,4,5,132,36,81,26]))),ms=l.lazy(()=>M(()=>import("./AudioCourseAdmin-DkpAJBai.js"),__vite__mapDeps([133,1,2,3,4,5,6,7,17,56,83,100,24,88,36,26,62,111,132,47,63,71,81]))),ps=l.lazy(()=>M(()=>import("./BroadcastSender-DDvAkGql.js"),__vite__mapDeps([134,2,3,1,4,5,7,17,135,58,59,30,6,31,100,39]))),fs=l.lazy(()=>M(()=>import("./MemberTools-B9SkLKIS.js"),__vite__mapDeps([136,2,3,1,4,5,7,58,59,30,137,6,83,100,10,88,78,31,35,108,119,70,45,44,50,67,82]))),gs=l.lazy(()=>M(()=>import("./MemberBuecher-znQDXGOf.js"),__vite__mapDeps([138,2,3,1,4,5,26,42,67,82,79]))),xs=l.lazy(()=>M(()=>import("./NotificationsPage-CT7DGvAY.js"),__vite__mapDeps([139,2,3,6,7,1,4,5,57,140,28,132,34,18,32,49,35,46,33,37,99,16,17,15,11,12,14,13,19,20,21,22,23,24,25,26,27,29,30,31,36,38,39,40,41,42,43,44,45,47]))),ve="whatsapp-welcome-seen",bs="https://chat.whatsapp.com/D5JN3SEUweb4nsIZuK4klt",ys=l.lazy(()=>M(()=>Promise.resolve().then(()=>qi),void 0)),Ar=["[email protected]","[email protected]","[email protected]","[email protected]","[email protected]"],qt=(i,o,e,n,a)=>{const t=o||e||i==="elite";n&&Ar.includes(n.toLowerCase());const c=[{id:"dashboard",label:"Dashboard",icon:zn},{id:"inbox",label:"Nachrichten",icon:gt},{id:"termine",label:"Termine",icon:nt},{id:"content",label:"Content",icon:Xe,highlight:!0,groupKey:"inhalte",children:[{id:"kurse",label:"Kurse",icon:Xe,highlight:!0},{id:"content",label:"Videos",icon:Dn,highlight:!0},{id:"audiokurse",label:"Audios",icon:ir,highlight:!0},{id:"buecher",label:"Bücher",icon:Xe,highlight:!0},{id:"tools",label:"Tools & PDFs",icon:An,highlight:!0}]},{id:"coach",label:"Felix Coach",icon:Tn,highlight:!0},{id:"gruppen",label:"Community",icon:rt,highlight:!0},{id:"members",label:"Mitglieder",icon:In},{id:"mentors",label:"Mentoren",icon:ar},{id:"bulletin",label:"Schwarzes Brett",icon:cr},{id:"marktplatz",label:"Marktplatz",icon:Un},{id:"visitors",label:"Profilbesucher",icon:Bn},{id:"werben",label:"Member werben",icon:sr},{id:"upgrade",label:"Membership",icon:rr},{id:"mehr",label:"Mehr",icon:Wn,groupKey:"mehr",children:[{id:"rules",label:"Club Regeln",icon:Fn},{id:"app-install",label:"App installieren",icon:or},{id:"notifications",label:"Benachrichtigungen",icon:tt},{id:"faq",label:"FAQ",icon:tr},{id:"kontakt",label:"Kontakt",icon:Dt}]},{id:"profile",label:"Profil",icon:dr}];if(t&&c.splice(c.length-1,0,{id:"felix-dm",label:"Felix direkt schreiben",icon:nr,highlight:!0}),o||e){const d=c.find(h=>h.id==="mehr");d!=null&&d.children&&d.children.push({id:"broadcast",label:"Broadcast E-Mail",icon:Dt})}return c},Gt=()=>r.jsx("div",{className:"flex items-center justify-center py-20",children:r.jsx("div",{className:"w-8 h-8 border-2 border-[hsl(104,46%,48%)] border-t-transparent roun
165ded-full animate-spin"})}),vs=({referralCount:i,isWhitelisted:o,isPaidTier:e})=>{const[n,a]=l.useState(null),t=o||e?2:Math.max(1,i);return n==="business"?r.jsx(cs,{onBack:()=>a(null)}):n==="mindset"&&t>=2?r.jsx(ds,{onBack:()=>a(null)}):r.jsx(us,{onSelect:a,unlockedCoaches:t})},Zt=(i=new Date)=>{const o=String(i.getMonth()+1).padStart(2,"0"),e=String(i.getDate()).padStart(2,"0");return`bday_dismissed_${o}-${e}`},Tr=(i=new Date)=>{const o=String(i.getMonth()+1).padStart(2,"0"),e=String(i.getDate()).padStart(2,"0");return`bday_dismissed_members_${o}-${e}`},$t=()=>{try{const i=localStorage.getItem(Tr());return i?JSON.parse(i):[]}catch{return[]}},ws=()=>{const i=fn(),[o,e]=gn(),[n,a]=l.useState(null),[t,c]=l.useState(null),[d,h]=l.useState(!0),[p,w]=l.useState(!1),[b,x]=l.useState(null),f=o.get("section")||"dashboard",u=l.useCallback(s=>{e({section:s},{replace:!1})},[e]),[S,v]=l.useState(!1),[R,E]=l.useState(!1),[z,W]=l.useState(null),[U,_]=l.useState(!1),[k,A]=l.useState(0),[N,O]=l.useState(0),[T,$]=l.useState(0),[se,fe]=l.useState(0),[Q,H]=l.useState(0),[X,G]=l.useState(void 0),[oe,Y]=l.useState(null),[Se,ae]=l.useState({community:!0});l.useEffect(()=>{const s=["gruppen","members","mentors","bulletin","marktplatz","visitors"],m=["content","kurse","tools","audiokurse","buecher"],j=["rules","app-install","notifications","faq","kontakt"];s.includes(f)?ae(g=>({...g,community:!0})):m.includes(f)?ae(g=>({...g,inhalte:!0})):j.includes(f)&&ae(g=>({...g,mehr:!0}))},[f]);const[ee,bt]=l.useState(0),[ke,je]=l.useState([]),[Ir,yt]=l.useState(!1),[Ne,ge]=l.useState(!1),[le,Ce]=l.useState([]),[Br,Or]=l.useState(()=>!localStorage.getItem("pwa-banner-dismissed")),[Lr,Ee]=l.useState(!1),[Fe,vt]=l.useState(""),[wt,_t]=l.useState(!1),[Pe,te]=l.useState(!1),[Wr,xe]=l.useState("default"),[Vr,ce]=l.useState(!1),[Fr,be]=l.useState(!1),[Hr,St]=l.useState(0),He=l.useRef(null),Ue=l.useRef(null),Ur=l.useCallback(()=>{localStorage.setItem(Zt(),"true"),yt(!0),je([])},[]),kt=l.useCallback(s=>{const m=$t();m.includes(s)||(m.push(s),localStorage.setItem(Tr(),JSON.stringify(m))),je(j=>j.filter(g=>g.id!==s))},[]),{resolvedTheme:Ke,setTheme:Kr}=nn();Hi((n==null?void 0:n.id)||null);const{isSupported:qr,unsupportedReason:jt,isSubscribed:Me,isLoading:Nt,subscribe:Gr,unsubscribe:Zr}=Ui((n==null?void 0:n.id)||null);l.useEffect(()=>{const s=m=>{Pe&&He.current&&!He.current.contains(m.target)&&te(!1),Ne&&Ue.current&&!Ue.current.contains(m.target)&&ge(!1)};return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[Pe,Ne]),l.useEffect(()=>{document.title="Business Club One - Community","Notification"in window?xe(Notification.permission):xe("unsupported")},[]);const qe=async s=>{const{data:m}=await P.from("profiles").select("*").eq("id",s).single();return c(m),m},de=l.useCallback(async(s=!1)=>{try{const m="sub-check-cache";if(!s)try{const C=sessionStorage.getItem(m);if(C){const{data:I,ts:B}=JSON.parse(C);if(Date.now()-B<3e5){I!=null&&I.tier&&c(Z=>Z&&{...Z,membership_tier:I.tier}),I!=null&&I.subscription_end&&W(I.subscription_end),_(!!(I!=null&&I.payment_warning));return}}}catch{}const{data:g,error:D}=await P.functions.invoke("check-subscription");if(D){console.error("Subscription check error:",D);return}try{sessionStorage.setItem(m,JSON.stringify({data:g,ts:Date.now()}))}catch{}g!=null&&g.tier&&c(C=>C&&{...C,membership_tier:g.tier}),g!=null&&g.subscription_end&&W(g.subscription_end),_(!!(g!=null&&g.payment_warning))}catch(m){console.error("Subscription check failed:",m)}},[]);l.useEffect(()=>{let s=!1,m=!1;const{data:{subscription:j}}=P.auth.onAuthStateChange((g,D)=>{if(!s){if(g==="INITIAL_SESSION"||g==="SIGNED_IN"||g==="TOKEN_REFRESHED")D!=null&&D.user&&(m=!0,a(D.user),qe(D.user.id).then(C=>{s||(C&&!C.profile_completed?w(!0):C&&C.profile_completed&&(localStorage.getItem(ve)?localStorage.getItem(ie)||setTimeout(()=>ce(!0),1500):setTimeout(()=>be(!0),1500)),h(!1))}).catch(()=>{s||h(!1)}));else if(g==="SIGNED_OUT"){if(!m)return;setTimeout(()=>{s||P.auth.getSession().then(({data:{session:C}})=>{s||C||i("/community")})},800)}}});return P.auth.getSession().then(({data:{session:g}})=>{s||g||(h(!1),i("/community"))}),()=>{s=!0,j.unsubscribe()}},[i]),l.useEffect(()=>{n&&P.from("referrals").select("id, membership_tier").eq("referrer_id",n.id).eq("status","completed").then(({data:s})=>{if(!s){St(0);return}const m=s.some(j=>j.membership_tier==="premium"||j.membership_tier==="elite");St(m?Math.max(s.length,2):s.length)})},[n]),l.useEffect(()=>{if(!n)return;de();const s=setInterval(()=>de(!0),3e5);return()=>clearInterval(s)},[n,de]),l.useEffect(()=>{if(!n)return;const s=async()=>{const{count:j}=await P.from("messages").select("*",{count:"exact",head:!0}).eq("receiver_id",n.id).eq("is_read",!1);A(j||0)};s();const m=P.channel("unread-badge").on("postgres_changes",{event:"*",schema:"public",table:"messages"},()=>s()).subscribe();return()=>{P.removeChannel(m)}},[n]),l.useEffect(()=>{if(!n||!t)return;const s=setTimeout(async()=>{const m=t.last_seen;if(!m){$(0);return}const{count:j}=await P.from("profiles").select("*",{count:"exact",head:!0}
165).not("full_name","is",null).ilike("full_name","% %").eq("profile_completed",!0).gt("created_at",m).neq("id",n.id);$(j||0)},2e3);return()=>clearTimeout(s)},[n,t]),l.useEffect(()=>{!n||!(t!=null&&t.is_owner)||(async()=>{const{count:s}=await P.from("profiles").select("*",{count:"exact",head:!0}).eq("profile_completed",!0);fe(s||0)})()},[n,t==null?void 0:t.is_owner]),l.useEffect(()=>{if(!n)return;const m=localStorage.getItem("marktplatz-last-seen"),j=async()=>{let D=P.from("marketplace_listings").select("*",{count:"exact",head:!0});m&&(D=D.gt("created_at",m));const{count:C}=await D;O(C||0)};j();const g=P.channel("marktplatz-badge").on("postgres_changes",{event:"INSERT",schema:"public",table:"marketplace_listings"},()=>j()).subscribe();return()=>{P.removeChannel(g)}},[n]),l.useEffect(()=>{f==="marktplatz"&&(localStorage.setItem("marktplatz-last-seen",new Date().toISOString()),O(0))},[f]);const Ct=["light","premium","elite"];l.useEffect(()=>{if(!(n!=null&&n.id)||!t)return;const s=t.is_owner||t.is_team?"elite":t.membership_tier||"light",m=Ct.indexOf(s);(async()=>{const{data:j}=await P.from("groups").select("id, min_tier, is_beirat");if(!j)return;const g=j.filter(V=>t.is_owner||t.is_team?!0:V.is_beirat?!!t.is_beirat:m>=Ct.indexOf(V.min_tier)),D="3f936414-0887-4aaf-9c82-753509e190a0",C=g.filter(V=>V.id!==D);if(C.length===0){bt(0);return}const{data:I}=await P.from("group_last_read").select("group_id, last_read_at").eq("user_id",n.id),B=new Map;I==null||I.forEach(V=>B.set(V.group_id,V.last_read_at));let Z=0;await Promise.all(C.map(async V=>{const ze=B.get(V.id);if(!ze)return;const{count:Ge}=await P.from("group_messages").select("id",{count:"exact",head:!0}).eq("group_id",V.id).gt("created_at",ze).neq("user_id",n.id);Ge&&Ge>0&&(Z+=Ge)})),bt(Z)})()},[n==null?void 0:n.id,t==null?void 0:t.membership_tier,t==null?void 0:t.is_owner,t==null?void 0:t.is_team,f]),l.useEffect(()=>{o.get("upgrade")==="success"&&(L.success("Upgrade erfolgreich! Dein Status wird aktualisiert."),de())},[o,de]),l.useEffect(()=>{if(!n||!t)return;const s=new Date,m=String(s.getMonth()+1).padStart(2,"0"),j=String(s.getDate()).padStart(2,"0");t.birthday&&t.birthday.slice(5)===`${m}-${j}`&&L("ð Happy Birthday!",{description:`Alles Gute zum Geburtstag, ${t.full_name||"du"}! ðð¥³`,duration:8e3});const g=Zt(s),D=localStorage.getItem(g)==="true";if(yt(D),D){je([]);return}const C=D?null:setTimeout(async()=>{const{data:I}=await P.from("profiles").select("id, full_name, birthday").not("birthday","is",null).neq("id",n.id);if(I){const B=$t(),Z=I.filter(V=>V.birthday.slice(5)===`${m}-${j}`&&!B.includes(V.id)).map(V=>({id:V.id,full_name:V.full_name||"Mitglied"}));je(Z)}},3e3);return()=>{C&&clearTimeout(C)}},[n,t]),l.useEffect(()=>{if(!n)return;const s=async()=>{const{data:j}=await P.from("notifications").select("*").eq("user_id",n.id).eq("is_read",!1).not("type","in",'("private_message","new_tip","tip_comment")').order("created_at",{ascending:!1}).limit(20);Ce(j||[])};s();const m=P.channel("notifications-bell").on("postgres_changes",{event:"INSERT",schema:"public",table:"notifications",filter:`user_id=eq.${n.id}`},async()=>{if(s(),typeof document<"u"&&document.visibilityState==="visible")try{const{data:j}=await P.from("notification_preferences").select("sound_enabled").eq("user_id",n.id).maybeSingle();if(!j||j.sound_enabled!==!1){const{playNotificationSound:g}=await M(async()=>{const{playNotificationSound:D}=await import("./notification-sound-BjNwraF4.js");return{playNotificationSound:D}},[]);g()}}catch{const{playNotificationSound:j}=await M(async()=>{const{playNotificationSound:g}=await import("./notification-sound-BjNwraF4.js");return{playNotificationSound:g}},[]);j()}}).subscribe();return()=>{P.removeChannel(m)}},[n]),l.useEffect(()=>{const s=()=>{typeof document<"u"&&document.visibilityState==="hidden"||M(async()=>{const{syncAppBadgeFromState:m}=await import("./app-badge-DcnwSfbh.js");return{syncAppBadgeFromState:m}},[]).then(({syncAppBadgeFromState:m})=>m(le.length+k)).catch(()=>{})};return s(),window.addEventListener("focus",s),document.addEventListener("visibilitychange",s),(
165)=>{window.removeEventListener("focus",s),document.removeEventListener("visibilitychange",s)}},[le.length,k]);const $r=async()=>{if(n){if(le.length>0){const{error:s}=await P.from("notifications").update({is_read:!0}).eq("user_id",n.id).eq("is_read",!1);s||Ce([])}(ke.length>0||!Ir)&&Ur(),ge(!1)}},Re=ke.length+le.length,Yr=async()=>{await P.auth.signOut(),L.success("Erfolgreich ausgeloggt"),i("/community")};if(d)return r.jsx(Gt,{});if(p)return r.jsx(Fi,{userId:n.id,email:n.email||"",fullName:(t==null?void 0:t.full_name)||"",onComplete:async()=>{w(!1),await qe(n.id),localStorage.getItem(ve)?localStorage.getItem(ie)||setTimeout(()=>ce(!0),500):setTimeout(()=>be(!0),500)}});const Xr=(s,m,j,g)=>{if(m)return r.jsx("span",{className:"text-xs font-body font-bold px-3 py-1 rounded-full uppercase tracking-wider border bg-amber-100 text-amber-900 border-amber-400",children:"â
Owner"});if(j)return r.jsx("span",{className:"text-xs font-body font-bold px-3 py-1 rounded-full uppercase tracking-wider border bg-sky-100 text-sky-800 border-sky-400",children:"â
Team"});if(g)return r.jsx("span",{className:"text-xs font-body font-bold px-3 py-1 rounded-full uppercase tracking-wider border bg-blue-100 text-blue-700 border-blue-200",children:"Mentor"});const D={elite:"bg-yellow-100 text-yellow-800 border-yellow-300",premium:"bg-[hsl(104,46%,48%)]/10 text-[hsl(104,46%,48%)] border-[hsl(104,46%,48%)]/30"};return r.jsx("span",{className:`text-xs font-body font-bold px-3 py-1 rounded-full uppercase tracking-wider border ${D[s]||"bg-muted text-muted-foreground border-border"}`,children:s})},Jr=()=>{switch(f){case"dashboard":return r.jsx(ls,{profile:t,user:n,unreadMessages:k,memberCount:T,totalMemberCount:t!=null&&t.is_owner?se:void 0,setActiveSection:s=>{s==="gruppen"&&(G(void 0),H(m=>m+1)),u(s),E(!1)},setSelectedMemberId:x});case"members":return r.jsx(Ut,{onSelectMember:s=>{x(s.id),u("member-detail")},onSelectMemberById:s=>{x(s),u("member-detail")},onMessageMember:(s,m)=>{Y({id:s,name:m}),u("inbox")}});case"members-online":return r.jsx(Ut,{initialOnlineFilter:!0,onSelectMember:s=>{x(s.id),u("member-detail")},onSelectMemberById:s=>{x(s),u("member-detail")},onMessageMember:(s,m)=>{Y({id:s,name:m}),u("inbox")}});case"mentors":{const s=(t==null?void 0:t.membership_tier)||"light";return(t==null?void 0:t.is_owner)||(t==null?void 0:t.is_team)||s==="premium"||s==="elite"?r.jsx(Gi,{}):r.jsxs("div",{className:"text-center py-16",children:[r.jsx(ar,{className:"h-12 w-12 mx-auto text-muted-foreground mb-4"}),r.jsx("h2",{className:"text-xl font-heading uppercase text-foreground mb-2",children:"Mentoren â Exklusiv für Premium & Elite"}),r.jsx("p",{className:"text-muted-foreground font-body mb-6 max-w-md mx-auto",children:"Unsere Experten-Mentoren stehen dir ab dem Premium-Tarif zur Verfügung. Upgrade jetzt, um Zugang zu erhalten."}),r.jsx(J,{onClick:()=>u("upgrade"),className:"bg-[hsl(104,46%,48%)] hover:bg-[hsl(104,46%,38%)] text-white font-body font-bold",children:"Jetzt upgraden"})]})}case"broadcast":return t!=null&&t.is_owner||t!=null&&t.is_team?r.jsx(ps,{}):r.jsx("div",{className:"text-center py-16 text-muted-foreground",children:"Nur für Admins."});case"content":return r.jsx(Kt,{mode:"videos",userId:n.id,membershipTier:(t==null?void 0:t.membership_tier)||"light",isOwner:(t==null?void 0:t.is_owner)||(t==null?void 0:t.is_team),onNavigate:s=>u(s)});case"kurse":return r.jsx(Kt,{mode:"kurse",userId:n.id,membershipTier:(t==null?void 0:t.membership_tier)||"light",isOwner:(t==null?void 0:t.is_owner)||(t==null?void 0:t.is_team),onNavigate:s=>u(s)});case"tools":return r.jsx(fs,{membershipTier:(t==null?void 0:t.membership_tier)||"light",onNavigate:s=>u(s),onNavigateToMember:s=>{x(s),u("member-detail")}});case"audiokurse":return t!=null&&t.is_owner||t!=null&&t.is_team?r.jsx(ms,{userId:n.id,membershipTier:(t==null?void 0:t.membership_tier)||"light",onNavigate:s=>u(s)}):r.jsx(hs,{userId:n.id,membershipTier:(t==null?void 0:t.membership_tier)||"light",isOwner:(t==null?void 0:t.is_owner)||(t==null?void 0:t.is_team),onNavigate:s=>u(s)});case"buecher":return r.jsx(gs,{membershipTier:(t==null?void 0:t.membership_tier)||"light",isOwner:(t==null?void 0:t.is_owner)||(t==null?void 0:t.is_team),onNavigate:s=>u(s)});case"upgrade":return r.jsx(Xi,{currentTier:(t==null?void 0:t.membership_tier)||"light",subscriptionEnd:z,onSubscriptionCheck:de});case"rules":return r.jsx(Ji,{});case"termine":{const s=(t==null?void 0:t.membership_tier)||"light";return(t==null?void 0:t.is_owner)||(t==null?void 0:t.is_team)||s==="premium"||s==="elite"?r.jsx(Qi,{}):r.jsxs("div",{className:"text-center py-16",children:[r.jsx(nt,{className:"h-12 w-12 mx-auto text-muted-foreground mb-4"}),r.jsx("h2",{className:"text-xl font-heading uppercase text-foreground mb-2",children:"Termine â Exklusiv für Premium & Elite"}),r.jsx("p",{className:"text-muted-foreground font-body mb-6 max-w-md mx-auto",children:"Live-Coaching-Sessions und Termine stehen dir ab dem Premium-Tarif zur Verfügung."}),r.jsx(J,{onClick:()=>u("upgrade"),className:"bg-[hsl(104,46%,48%)] hover:bg-[hsl(104,46%,38%)] text-white font-body font-bold",children:"Jetzt upgraden"})]})}case"gruppen":return r.jsx(es,{membershipTier:(t==null?void 0:t.membership_tier)||"light",isOwner:(t==null?void 0:t.is_owner)||(t==null?void 0:t.is_team),isBeirat:t==null?void 0:t.is_beirat,onNavigateToUpgrade:()=>u("upgrade"),initialGroupName:X},Q);case"werben":return r.jsx(ts,{});case"inbox":return r.jsx(rs,{userId:n.id,initialReceiverId:oe==null?void 0:oe.id,initialReceiverName:oe==null?void 0:oe.name,onUnreadCountChange:A,membershipTier:t==null?void 0:t.membership_tier,onViewProfile:s=>{x(s),u("member-detail")}});case"bulletin":return r.jsx(ns,{userId:n.id,isOwner:(t==null?void 0:t.is_owner)||(t==null?void 0:t.is_team),membershipTier:t==null?void 0:t.membership_tier,onMessageMember:(s,m)=>{Y({id:s,name:m}),u("inbox")},onViewProfile:s=>{x(s),u("member-detail")},onNavigate:s=>u(s)});case"marktplatz":return r.jsx(as,{userId:n.id,membershipTier:t==null?void 0:t.membership_tier,isOwner:(t==null?void 0:t.is_owner)||(t==null?void 0:t.is_team),onMessageMember:(s,m)=>{Y({id:s,name:m}),u("inbox")},onSelectMember:s=>{x(s),u("member-detail")},onEditProfile:()=>u("profile")});case"visitors":return r.jsx(Zi,{userId:n.id,onViewProfile:s=>{x(s),u("member-detail")}});case"faq":return r.jsx($i,{});case"notifications":return r.jsx(xs,{userId:n.id});case"kontakt":return r.jsxs("div",{children:[r.jsxs("div",{className:"mb-8",children:[r.jsx("h2",{className:"text-2xl font-heading uppercase text-foreground mb-2",children:"Kontakt"}),r.jsx("p",{className:"text-muted-foreground font-body",children:"Schreib uns eine Nachricht."})]}),r.jsx(ss,{page:"Memberbereich"})]});
165case"profile":return r.jsx(Yi,{profile:t,userId:n.id,onUpdate:()=>qe(n.id)});case"member-detail":return b?r.jsx(is,{memberId:b,onBack:()=>u("members"),onMessage:(s,m)=>{Y({id:s,name:m}),u("inbox")}}):null;case"app-install":return r.jsx(os,{});case"coach":return r.jsx(vs,{referralCount:Hr,isWhitelisted:Ar.includes(((t==null?void 0:t.email)||"").toLowerCase()),isPaidTier:(t==null?void 0:t.is_owner)||(t==null?void 0:t.is_team)||(t==null?void 0:t.membership_tier)==="premium"||(t==null?void 0:t.membership_tier)==="elite"});default:return null}};return r.jsxs("div",{className:"min-h-screen bg-muted flex flex-col",children:[r.jsx("header",{className:"border-b border-border bg-card sticky top-0 z-50",style:{paddingTop:"env(safe-area-inset-top)"},children:r.jsxs("div",{className:"px-4 sm:px-6 lg:px-8 h-16 flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("button",{onClick:()=>E(!R),className:"lg:hidden p-2 text-muted-foreground hover:text-foreground",children:r.jsx(sn,{className:"h-5 w-5"})}),r.jsx("img",{src:"/images/felix-logo-square.png",alt:"Felix Thönnessen",className:"h-12 w-auto cursor-pointer",onClick:()=>{u("dashboard"),E(!1)}})]}),r.jsxs("div",{className:"flex items-center gap-4",children:[(t==null?void 0:t.membership_tier)&&Xr(t.membership_tier,t==null?void 0:t.is_owner,t==null?void 0:t.is_team,t==null?void 0:t.is_mentor),r.jsxs("button",{onClick:()=>{Y(null),u("inbox")},className:"relative p-2 text-muted-foreground hover:text-foreground transition-colors",title:"Nachrichten",children:[r.jsx(gt,{className:"h-5 w-5"}),k>0&&r.jsx("span",{className:"absolute -top-0.5 -right-0.5 bg-red-500 text-white text-[10px] font-bold rounded-full w-4 h-4 flex items-center justify-center",children:k>9?"9+":k})]}),r.jsx("div",{className:"relative","data-tour":"tour-header-help",children:r.jsx("button",{onClick:()=>{Ee(!0),te(!1)},className:"relative p-2 text-muted-foreground hover:text-foreground transition-colors",title:"Hilfe & Support",children:r.jsx(tr,{className:"h-5 w-5"})})}),r.jsxs("div",{className:"relative",ref:He,children:[r.jsx("button",{onClick:()=>{te(!Pe),Ee(!1)},className:"relative p-2 text-muted-foreground hover:text-foreground transition-colors",title:"Einstellungen",children:r.jsx(Hn,{className:"h-5 w-5"})}),Pe&&r.jsxs("div",{className:"absolute right-0 top-full mt-2 w-64 bg-card border border-border rounded-lg shadow-lg z-50 py-2",children:[r.jsxs("button",{onClick:()=>{te(!1),u("profile")},className:"w-full flex items-center gap-3 px-4 py-3 text-sm font-body text-foreground hover:bg-muted transition-colors",children:[r.jsx(dr,{className:"h-4 w-4 text-muted-foreground"}),"Profil bearbeiten"]}),r.jsxs("button",{onClick:()=>{te(!1),u("notifications")},className:"w-full flex items-center gap-3 px-4 py-3 text-sm font-body text-foreground hover:bg-muted transition-colors",children:[r.jsx(tt,{className:"h-4 w-4 text-muted-foreground"}),"Benachrichtigungen"]}),r.jsxs("button",{onClick:()=>{te(!1),u("upgrade")},className:"w-full flex items-center gap-3 px-4 py-3 text-sm font-body text-foreground hover:bg-muted transition-colors",children:[r.jsx(rr,{className:"h-4 w-4 text-muted-foreground"}),"Abo verwalten"]}),r.jsx("div",{className:"border-t border-border my-1"}),r.jsxs("div",{className:`w-full flex items-center gap-3 px-4 py-3 text-sm font-body text-foreground transition-colors ${Nt?"opacity-60":"hover:bg-muted cursor-pointer"}`,onClick:async()=>{if(Nt)return;if(!qr){jt==="ios-not-installed"?L.error("Auf dem iPhone musst du die App zuerst zum Home-Bildschirm hinzufügen (Teilen-Symbol > Zum Home-Bildschirm) und sie von dort öffnen.",{duration:8e3}):jt==="preview"?L.error("Push funktioniert nur in der echten App, nicht in der Vorschau."):L.error("Dein Browser unterstützt keine Push-Benachrichtigungen. Nutze Chrome, Safari oder die installierte App.");return}if(Me){await Zr(),xe("default"),L.success("Push-Benachrichtigungen deaktiviert.");return}if(Wr==="denied"){L.error("Push wurde blockiert. Bitte erlaube Benachrichtigungen in den Einstellungen deines Browsers bzw. deines Handys für diese Seite.",{duration:8e3});return}const s=await Gr();s.ok?(xe("granted"),L.success("Push-Benachrichtigungen aktiviert! ð")):s.reason==="denied"?(xe("denied"),L.error("Du hast Benachrichtigungen abgelehnt. Erlaube sie in den Einstellungen deines Browsers bzw. Handys für diese Seite.",{duration:8e3}
165)):s.reason==="dismissed"?L.error("Die Nachfrage wurde geschlossen. Tippe erneut und wähle âErlaubenâ."):s.reason==="sw-failed"?L.error("Technisches Problem beim Start. Bitte Seite neu laden und nochmal versuchen."):s.reason==="save-failed"?L.error("Konnte nicht gespeichert werden. Bitte später erneut versuchen."):L.error("Push konnte nicht aktiviert werden. Bitte App schlieÃen, neu öffnen und nochmal versuchen.",{duration:8e3})},role:"button","aria-pressed":Me,children:[r.jsx(On,{className:"h-4 w-4 text-muted-foreground"}),r.jsx("span",{className:"flex-1 text-left",children:"Push-Benachrichtigungen"}),r.jsx("span",{className:`relative inline-flex h-5 w-9 flex-shrink-0 items-center rounded-full transition-colors ${Me?"bg-green-500":"bg-muted-foreground/30"}`,"aria-hidden":"true",children:r.jsx("span",{className:`inline-block h-4 w-4 transform rounded-full bg-white shadow transition-transform ${Me?"translate-x-4":"translate-x-0.5"}`})})]}),r.jsx("div",{className:"border-t border-border my-1"}),r.jsxs("button",{onClick:()=>{Kr(Ke==="dark"?"light":"dark")},className:"w-full flex items-center gap-3 px-4 py-3 text-sm font-body text-foreground hover:bg-muted transition-colors",children:[Ke==="dark"?r.jsx(on,{className:"h-4 w-4 text-muted-foreground"}):r.jsx(an,{className:"h-4 w-4 text-muted-foreground"}),r.jsx("span",{className:"flex-1 text-left",children:Ke==="dark"?"Light Mode":"Dark Mode"})]})]})]}),r.jsxs("div",{className:"relative",ref:Ue,children:[r.jsxs("button",{onClick:()=>{ge(!Ne),te(!1)},className:"relative p-2 text-muted-foreground hover:text-foreground transition-colors",title:"Benachrichtigungen",children:[r.jsx(tt,{className:"h-5 w-5"}),Re>0&&r.jsx("span",{className:"absolute -top-0.5 -right-0.5 bg-red-500 text-white text-[10px] font-bold rounded-full w-4 h-4 flex items-center justify-center",children:Re>9?"9+":Re})]}),Ne&&r.jsxs("div",{className:"absolute right-0 top-full mt-2 w-80 bg-card border border-border rounded-lg shadow-lg z-50 max-h-96 overflow-y-auto",children:[r.jsxs("div",{className:"p-3 border-b border-border flex items-center justify-between",children:[r.jsx("h4",{className:"font-heading text-sm uppercase text-foreground",children:"Benachrichtigungen"}),Re>0&&r.jsxs("button",{onClick:$r,className:"text-xs text-muted-foreground hover:text-foreground font-body flex items-center gap-1",children:[r.jsx(Pn,{className:"h-3 w-3"})," Alle gelesen"]})]}),r.jsx("div",{className:"divide-y divide-border",children:ke.length===0&&le.length===0?r.jsx("p",{className:"text-xs text-muted-foreground font-body p-4 text-center",children:"Keine neuen Benachrichtigungen."}):r.jsxs(r.Fragment,{children:[ke.map(s=>r.jsxs("div",{className:"flex items-center gap-3 p-3 hover:bg-muted",children:[r.jsx(lr,{className:"h-4 w-4 text-yellow-500 flex-shrink-0"}),r.jsxs("span",{className:"text-sm font-body text-foreground flex-1 cursor-pointer min-w-0 truncate",onClick:()=>{kt(s.id),ge(!1),Y({id:s.id,name:s.full_name}),u("inbox")},children:[s.full_name," hat heute Geburtstag! ð"]}),r.jsx("button",{onClick:m=>{m.stopPropagation(),kt(s.id)},className:"text-muted-foreground hover:text-foreground p-1 flex-shrink-0","aria-label":"Als gelesen markieren",children:r.jsx(we,{className:"h-3.5 w-3.5"})})]},`bday-${s.id}`)),le.map(s=>r.jsxs("div",{className:"flex items-center gap-3 p-3 hover:bg-muted",children:[s.type==="new_member"?r.jsx(Kn,{className:"h-4 w-4 text-green-500 flex-shrink-0"}):s.type==="new_termin"||s.type==="event_reminder"?r.jsx(nt,{className:"h-4 w-4 text-blue-500 flex-shrink-0"}):s.type==="report"?r.jsx(zt,{className:"h-4 w-4 text-orange-500 flex-shrink-0"}):s.type==="announcement"?r.jsx(Mn,{className:"h-4 w-4 text-[hsl(104,46%,48%)] flex-shrink-0"}):s.type==="bulletin"?r.jsx(cr,{className:"h-4 w-4 text-amber-500 flex-shrink-0"}):s.type==="review"?r.jsx(nr,{className:"h-4 w-4 text-amber-400 flex-shrink-0"}):s.type==="mention"||s.type==="tip_comment"?r.jsx(rt,{className:"h-4 w-4 text-[hsl(104,46%,48%)] flex-shrink-0"}):s.type==="new_tip"?r.jsx(Rn,{className:"h-4 w-4 text-amber-500 flex-shrink-0"}):s.type==="new_course"?r.jsx(ir,{className:"h-4 w-4 text-[hsl(104,46%,48%)] flex-shrink-0"}):s.type==="private_message"?r.jsx(rt,{className:"h-4 w-4 text-blue-500 flex-shrink-0"}):s.type==="referral"?r.jsx(sr,{className:"h-4 w-4 text-[hsl(104,46%,48%)] flex-shrink-0"}):r.jsx(Qt,{className:"h-4 w-4 text-red-400 flex-shrink-0"}),r.jsxs("div",{className:"min-w-0 flex-1 cursor-pointer",onClick:async()=>
165{if(ge(!1),await P.from("notifications").update({is_read:!0}).eq("id",s.id),Ce(m=>m.filter(j=>j.id!==s.id)),s.type==="new_member"&&s.related_user_id)x(s.related_user_id),u("member-detail");else if(s.type==="new_termin"||s.type==="event_reminder")u("termine");else if(s.type==="announcement")G("Ankündigung"),H(m=>m+1),u("gruppen");else if(s.type==="like")G(s.title||void 0),H(m=>m+1),u("gruppen");else if(s.type==="bulletin")u("bulletin");else if(s.type==="referral")u("werben");else if(s.type==="report")G(void 0),H(m=>m+1),u("gruppen");else if(s.type==="review")x(n.id),u("member-detail");else if(s.type==="new_course")u("audiokurse");else if(s.type==="private_message"){if(s.related_user_id){const{data:m}=await P.from("profiles").select("full_name").eq("id",s.related_user_id).maybeSingle();Y({id:s.related_user_id,name:(m==null?void 0:m.full_name)||"Member"})}u("inbox")}else if(s.type==="mention"){const m=typeof s.title=="string"?s.title:"";if(m.startsWith("Antwort in ")){const j=m.replace(/^Antwort in\s+/,"").trim();G(j||void 0),H(g=>g+1),u("gruppen")}else m.toLowerCase().includes("schwarz")?u("bulletin"):(G(void 0),H(j=>j+1),u("gruppen"))}},children:[r.jsx("span",{className:"text-sm font-body text-foreground block truncate",children:s.message}),r.jsx("span",{className:"text-[10px] text-muted-foreground font-body",children:new Date(s.created_at).toLocaleDateString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"})})]}),r.jsx("button",{onClick:async m=>{m.stopPropagation(),await P.from("notifications").update({is_read:!0}).eq("id",s.id),Ce(j=>j.filter(g=>g.id!==s.id))},className:"text-muted-foreground hover:text-foreground p-1 flex-shrink-0","aria-label":"Als gelesen markieren",children:r.jsx(we,{className:"h-3.5 w-3.5"})})]},s.id))]})})]})]}),r.jsxs("button",{onClick:()=>u("profile"),className:"hidden sm:flex items-center gap-2 text-sm text-muted-foreground font-body hover:text-foreground transition-colors cursor-pointer",children:[r.jsx(et,{className:"h-4 w-4"}),(t==null?void 0:t.full_name)||(n==null?void 0:n.email)]}),r.jsxs(J,{variant:"ghost",size:"sm",onClick:Yr,className:"text-muted-foreground hover:text-foreground font-body",children:[r.jsx(En,{className:"h-4 w-4 mr-2"}),r.jsx("span",{className:"hidden sm:inline",children:"Logout"})]})]})]})}),r.jsx(Je,{open:Lr,onOpenChange:Ee,children:r.jsxs(Qe,{className:"w-[calc(100vw-2rem)] max-w-md rounded-lg border border-border bg-background p-0 shadow-lg sm:p-0",children:[r.jsxs(Xt,{className:"border-b border-border px-5 py-4 text-left",children:[r.jsx(Jt,{className:"font-heading text-sm uppercase text-foreground",children:"Hilfe & Support"}),r.jsx(bn,{className:"font-body text-xs text-muted-foreground",children:"Du hast eine Frage oder ein Problem? Schreib uns â wir helfen dir gerne!"})]}),r.jsxs("form",{onSubmit:async s=>{if(s.preventDefault(),!!Fe.trim()){_t(!0);try{const{error:m}=await P.functions.invoke("send-contact-email",{body:{name:(t==null?void 0:t.full_name)||(n==null?void 0:n.email)||"Member",email:(t==null?void 0:t.email)||(n==null?void 0:n.email),nachricht:Fe.trim(),page:"Memberbereich â Hilfe-Button"}});if(m)throw m;L.success("Nachricht gesendet!",{description:"Wir melden uns bei dir."}),vt(""),Ee(!1)}catch(m){console.error("Help message error:",m),L.error("Fehler beim Senden. Bitte versuche es später erneut.")}finally{_t(!1)}}},className:"space-y-4 px-5 py-5",children:[r.jsx("textarea",{value:Fe,onChange:s=>vt(s.target.value),placeholder:"Deine Nachricht...",className:"min-h-32 w-full resize-none rounded-lg border border-input bg-background p-3 text-sm font-body text-foreground focus:outline-none focus:ring-1 focus:ring-ring",rows:5,required:!0}),r.jsx(J,{type:"submit",disabled:wt,className:"w-full font-body font-bold text-sm",children:wt?"Wird gesendet...":"Absenden"})]})]})}),r.jsx(Je,{open:Fr,onOpenChange:s=>{be(s),s||(localStorage.setItem(ve,"1"),localStorage.getItem(ie)||setTimeout(()=>ce(!0),500))},children:r.jsx(Qe,{className:"w-[calc(100vw-2rem)] max-w-md rounded-2xl border-0 p-0 shadow-2xl overflow-hidden sm:p-0",children:r.jsxs("div",{className:"relative bg-gradient-to-br from-[#075E54] via-[#128C7E] to-[#25D366] px-7 py-9 flex flex-col items-center text-center text-white",children:[r.jsx("button",{onClick:()=>{be(!1),localStorage.setItem(ve,"1"),localStorage.getItem(ie)||setTimeout(()=>ce(!0),500)},className:"absolute top-3 right-3 p-1.5 text-white/70 hover:text-white transition-colors",title:"SchlieÃen",children:r.jsx(we,{className:"h-5 w-5"})}),r.jsxs("div",{className:"absolute inset-0 opacity-10 pointer-events-none",children:[r.jsx("div",{className:"absolute top-8 left-8 w-14 h-9 rounded-xl bg-white"}),r.jsx("div",{className:"absolute top-16 right-10 w-20 h-11 rounded-xl bg-white"}),r.jsx("div",{className:"absolute bottom-20 left-12 w-24 h-9 rounded-xl bg-white"})]}),r.jsxs("div",{className:"relative flex flex-col items-center",children:[r.jsx("div",{className:"w-20 h-20 rounded-full bg-white/15 backdrop-blur-sm flex items-center justify-center mb-5 shadow-lg ring-1 ring-white/20",children:r.jsx(Mt,{className:"h-10 w-10 text-white",strokeWidth:2.2})}),r.jsx("h2",{className:"font-heading uppercase text-3xl tracking-tight mb-2 drop-shadow-sm",children:"WhatsApp Community"}),r.jsx("p",{className:"font-body text-sm leading-relaxed text-white/90 max-w-xs mb-6",children:"Die gesamte Kommunikation im Business Club One läuft über unsere WhatsApp-Gruppe. Tritt jetzt bei und ver
165netze dich mit der Community!"}),r.jsxs("a",{href:bs,target:"_blank",rel:"noopener noreferrer",onClick:()=>{be(!1),localStorage.setItem(ve,"1"),localStorage.getItem(ie)||setTimeout(()=>ce(!0),500)},className:"inline-flex items-center justify-center gap-2 rounded-full bg-white px-7 py-3.5 font-heading text-sm uppercase tracking-wide text-[#075E54] hover:bg-white/90 active:scale-95 transition-all shadow-md mb-3",children:[r.jsx(Mt,{className:"h-4 w-4"}),"Zur WhatsApp-Gruppe"]}),r.jsx("p",{className:"mt-1 text-[11px] uppercase tracking-wider text-white/60 font-heading",children:"Jetzt beitreten"})]})]})})}),U&&r.jsxs("div",{className:"bg-destructive/10 border-b border-destructive/30 text-destructive px-4 py-3 flex items-center justify-between gap-4",children:[r.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[r.jsx(zt,{className:"h-5 w-5 flex-shrink-0"}),r.jsxs("p",{className:"text-sm font-body",children:[r.jsx("span",{className:"font-bold",children:"Zahlungsproblem:"})," ","Deine letzte Zahlung konnte nicht eingezogen werden. Bitte aktualisiere deine Zahlungsmethode, um deinen Zugang nicht zu verlieren."]})]}),r.jsx("button",{onClick:()=>u("upgrade"),className:"text-xs font-body font-bold bg-destructive text-destructive-foreground px-3 py-1.5 rounded hover:opacity-90 transition-opacity flex-shrink-0",children:"Zahlungsdaten ändern"})]}),Br&&r.jsxs("div",{className:"bg-black text-white px-4 py-3 flex items-center justify-between gap-4",children:[r.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[r.jsx(or,{className:"h-5 w-5 flex-shrink-0 text-[hsl(104,46%,48%)]"}),r.jsxs("p",{className:"text-sm font-body truncate",children:[r.jsx("span",{className:"hidden sm:inline",children:"Installiere die App auf deinem Handy für schnellen Zugriff!"}),r.jsx("span",{className:"sm:hidden",children:"App auf dem Handy installieren!"})]})]}),r.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[r.jsx("button",{onClick:()=>u("app-install"),className:"text-xs font-body font-bold bg-[hsl(104,46%,48%)] text-white px-3 py-1.5 rounded hover:bg-[hsl(104,46%,38%)] transition-colors",children:"So geht's"}),r.jsx("button",{onClick:()=>{localStorage.setItem("pwa-banner-dismissed","1"),Or(!1)},className:"p-1 text-muted-foreground hover:text-white transition-colors",children:r.jsx(we,{className:"h-4 w-4"})})]})]}),r.jsxs("div",{className:"flex flex-1",children:[r.jsxs("aside",{className:`hidden lg:flex flex-col border-r border-border bg-card transition-all ${S?"w-16":"w-56"}`,children:[r.jsx("nav",{className:"flex-1 pt-6 pb-4",children:qt((t==null?void 0:t.membership_tier)||"light",t==null?void 0:t.is_owner,t==null?void 0:t.is_team,t==null?void 0:t.email).map(s=>{if(s.children&&s.groupKey){const g=s.groupKey,D=!!Se[g],C=s.children.some(B=>f===B.id),I=g==="community"?ee:0;return r.jsxs("div",{children:[r.jsxs("button",{"data-tour":g==="inhalte"?"tour-inhalte":g==="community"?"tour-community":void 0,onClick:()=>{S?(v(!1),ae(B=>({...B,[g]:!0}))):ae(B=>({...B,[g]:!B[g]}))},className:`w-full flex items-center gap-3 px-4 py-2.5 text-left transition-colors ${g==="community"?"bg-[hsl(104,46%,48%)]/10 text-[hsl(104,46%,68%)] ring-1 ring-[hsl(104,46%,48%)]/30 rounded-md mx-1 hover:bg-[hsl(104,46%,48%)]/20":C?"bg-primary/10 text-primary":"text-muted-foreground hover:bg-muted hover:text-foreground"}`,title:s.label,children:[r.jsx(s.icon,{className:`h-5 w-5 flex-shrink-0 ${g==="community"?"text-[hsl(104,46%,68%)]":""}`}),!S&&r.jsxs(r.Fragment,{children:[r.jsx("span",{className:`font-body text-xs font-semibold uppercase tracking-wider ${g==="community"?"text-[hsl(104,46%,68%)]":""}`,children:s.label}),g==="community"&&!D&&r.jsxs("span",{className:"ml-auto mr-1 inline-flex items-center gap-1 bg-[#25D366] text-white text-[10px] font-bold rounded-full px-2 py-0.5 flex-shrink-0 shadow-sm",children:[r.jsx("svg",{viewBox:"0 0 24 24",className:"h-2.5 w-2.5 fill-current","aria-hidden":"true",children:r.jsx("path",{d:"M.057 24l1.687-6.163a11.867 11.867 0 01-1.587-5.946C.16 5.335 5.495 0 12.05 0a11.817 11.817 0 018.413 3.488 11.824 11.824 0 013.48 8.414c-.003 6.557-5.338 11.892-11.893 11.892a11.9 11.9 0 01-5.688-1.448L.057 24zm6.597-3.807c1.676.995 3.276 1.591 5.392 1.592 5.448 0 9.886-4.434 9.889-9.885.002-5.462-4.415-9.89-9.881-9.892-5.452 0-9.887 4.434-9.889 9.884a9.86 9.86 0 001.51 5.26l-.999 3.648 3.978-1.044zm11.387-5.464c-.074-.124-.272-.198-.57-.347-.297-.149-1.758-.868-2.031-.967-.272-.099-.47-.149-.669.149-.198.297-.768.967-.941 1.165-.173.198-.347.223-.644.074-.297-.149-1.255-.462-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.297-.347.446-.521.151-.172.2-.296.3-.495.099-.198.05-.372-.025-.521-.075-.148-.669-1.611-.916-2.206-.242-.579-.487-.501-.669-.51l-.57-.01c-.198 0-.52.074-.792.372s-1.04 1.016-1.04 2.479 1.065 2.876 1.213 3.074c.149.198 2.095 3.2 5.076 4.487.709.306 1.263.489 1.694.626.712.226 1.36.194 1.872.118.571-.085 1.758-.719 2.006-1.413.248-.695.248-1.29.173-1.414z"})}),"WhatsApp"]}),I>0&&!D&&g!=="community"&&r.jsx("span",{className:"ml-auto mr-1 bg-red-500 text-white text-[10px] font-bold rounded-full w-5 h-5 flex items-center justify-center flex-shrink-0",children:I>99?"99+":I}),D?r.jsx(Rt,{className:"h-3.5 w-3.5 ml-auto text-muted-foreground"}):g!=="community"?r.jsx(Ie,{className:"h-3.5 w-3.5 ml-auto text-muted-foreground"}):null]})]}),D&&!S&&s.children.map(B=>{const Z=f===B.id,V=B.highlight&&!Z;return r.jsxs("button",{onClick:()=>{B.id==="gruppen"&&(G(void 0),H(ze=>ze+1)),u(B.id)},className:`w-full flex items-center gap-3 pl-10 pr-4 py-2 text-left transition-colors ${Z?"bg-primary/10 text-primary border-r-2 border-primary":V?"text-primary font-bold hover:bg-primary/5":"text-muted-foreground hover:bg-muted hover:text-foreground"}`,children:[r.jsx(B.icon,{className:"h-4 w-4 flex-shrink-0"}),r.jsx("span",{className:"font-body text-sm",children:B.label}),B.id==="gruppen"&&ee>0&&r.jsx("span",{className:"ml-auto bg-red-500 text-white text-[10px] font-bold rounded-full w-5 h-5 flex items-center justify-center flex-shrink-0",children:ee>99?"99+":ee}),B.id==="members"&&T>0&&r.jsx("span",{className:"ml-auto bg-primary text-white text-[10px] font-bold rounded-full w-5 h-5 flex items-center justify-center flex-shrink-0",children:T>9?"9+":T}),B.id==="marktplatz"&&N>0&&r.jsx("span",{className:"ml-auto bg-primary text-white text-[10px] font-bold rounded-full w-5 h-5 flex items-center justify-center flex-shrink-0",children:N>9?"9+":N})]},B.id)})]},s.id)}const m=f===s.id,j=s.highlight&&!m;return r.jsxs("button",{"data-tour":s.id==="dashboard"?"tour-dashboard":s.id==="inbox"?"tour-inbox":s.id==="termine"?"tour-termine":s.id==="werben"?"tour-werben":s.id==="upgrade"?"tour-membership":s.id==="profile"?"tour-profile":void 0,onClick:()=>
165{if(s.id==="inbox"&&Y(null),s.id==="gruppen"&&(G(void 0),H(g=>g+1)),s.id==="felix-dm"){P.from("profiles").select("id, full_name").eq("is_owner",!0).single().then(({data:g})=>{g&&(Y({id:g.id,name:g.full_name||"Felix"}),u("inbox"))});return}u(s.id)},className:`w-full flex items-center gap-3 px-4 py-3 text-left transition-colors relative ${s.id==="gruppen"?"bg-[hsl(104,46%,48%)]/10 text-[hsl(104,46%,68%)] ring-1 ring-[hsl(104,46%,48%)]/30 rounded-md mx-1 hover:bg-[hsl(104,46%,48%)]/20":m?"bg-primary/10 text-primary border-r-2 border-primary":j?"text-primary font-bold hover:bg-primary/5":"text-muted-foreground hover:bg-muted hover:text-foreground"}`,title:s.label,children:[r.jsx(s.icon,{className:"h-5 w-5 flex-shrink-0"}),!S&&r.jsx("span",{className:"font-body text-sm",children:s.label}),s.id==="gruppen"&&!S&&r.jsxs("span",{className:"ml-auto inline-flex items-center gap-1 bg-[#25D366] text-white text-[10px] font-bold rounded-full px-2 py-0.5 flex-shrink-0 shadow-sm",children:[r.jsx("svg",{viewBox:"0 0 24 24",className:"h-2.5 w-2.5 fill-current","aria-hidden":"true",children:r.jsx("path",{d:"M.057 24l1.687-6.163a11.867 11.867 0 01-1.587-5.946C.16 5.335 5.495 0 12.05 0a11.817 11.817 0 018.413 3.488 11.824 11.824 0 013.48 8.414c-.003 6.557-5.338 11.892-11.893 11.892a11.9 11.9 0 01-5.688-1.448L.057 24zm6.597-3.807c1.676.995 3.276 1.591 5.392 1.592 5.448 0 9.886-4.434 9.889-9.885.002-5.462-4.415-9.89-9.881-9.892-5.452 0-9.887 4.434-9.889 9.884a9.86 9.86 0 001.51 5.26l-.999 3.648 3.978-1.044zm11.387-5.464c-.074-.124-.272-.198-.57-.347-.297-.149-1.758-.868-2.031-.967-.272-.099-.47-.149-.669.149-.198.297-.768.967-.941 1.165-.173.198-.347.223-.644.074-.297-.149-1.255-.462-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.297-.347.446-.521.151-.172.2-.296.3-.495.099-.198.05-.372-.025-.521-.075-.148-.669-1.611-.916-2.206-.242-.579-.487-.501-.669-.51l-.57-.01c-.198 0-.52.074-.792.372s-1.04 1.016-1.04 2.479 1.065 2.876 1.213 3.074c.149.198 2.095 3.2 5.076 4.487.709.306 1.263.489 1.694.626.712.226 1.36.194 1.872.118.571-.085 1.758-.719 2.006-1.413.248-.695.248-1.29.173-1.414z"})}),"WhatsApp"]}),s.id==="inbox"&&k>0&&r.jsx("span",{className:"ml-auto bg-red-500 text-white text-[10px] font-bold rounded-full w-5 h-5 flex items-center justify-center flex-shrink-0",children:k>9?"9+":k}),s.id==="members"&&T>0&&r.jsx("span",{className:"ml-auto bg-primary text-white text-[10px] font-bold rounded-full w-5 h-5 flex items-center justify-center flex-shrink-0",children:T>9?"9+":T}),s.id==="marktplatz"&&N>0&&r.jsx("span",{className:"ml-auto bg-primary text-white text-[10px] font-bold rounded-full w-5 h-5 flex items-center justify-center flex-shrink-0",children:N>9?"9+":N})]},s.id)})}),r.jsx("div",{className:"border-t border-border p-2",children:r.jsx("button",{onClick:()=>v(!S),className:"w-full flex items-center justify-center p-2 text-muted-foreground hover:text-foreground transition-colors",children:S?r.jsx(Ie,{className:"h-4 w-4"}):r.jsx(er,{className:"h-4 w-4"})})})]}),R&&r.jsxs("div",{className:"fixed inset-0 z-40 lg:hidden",style:{top:"calc(4rem + env(safe-area-inset-top, 0px))"},children:[r.jsx("div",{className:"absolute inset-0 bg-black/30",onClick:()=>E(!1)}),r.jsx("aside",{className:"absolute left-0 top-0 bottom-0 w-64 bg-card border-r border-border overflow-y-auto",children:r.jsx("nav",{className:"py-4",children:qt((t==null?void 0:t.membership_tier)||"light",t==null?void 0:t.is_owner,t==null?void 0:t.is_team,t==null?void 0:t.email).map(s=>{if(s.children&&s.groupKey){const g=s.groupKey,D=s.children.some(C=>f===C.id);return r.jsxs("div",{children:[r.jsxs("button",{onClick:()=>ae(C=>({...C,[g]:!C[g]})),className:`w-full flex items-center gap-3 px-4 py-2.5 text-left transition-colors ${g==="community"?"bg-[hsl(104,46%,48%)]/10 text-[hsl(104,46%,68%)] ring-1 ring-[hsl(104,46%,48%)]/30 rounded-md mx-1":D?"bg-primary/10 text-primary":"text-muted-foreground hover:bg-muted hover:text-foreground"}`,children:[r.jsx(s.icon,{className:`h-5 w-5 flex-shrink-0 ${g==="community"?"text-[hsl(104,46%,68%)]":""}`}),r.jsx("span",{className:`font-body text-xs font-semibold uppercase tracking-wider ${g==="community"?"text-[hsl(104,46%,
16568%)]":""}`,children:s.label}),g==="community"&&!Se[g]&&r.jsxs("span",{className:"ml-auto inline-flex items-center gap-1 bg-[#25D366] text-white text-[10px] font-bold rounded-full px-2 py-0.5 flex-shrink-0 shadow-sm",children:[r.jsx("svg",{viewBox:"0 0 24 24",className:"h-2.5 w-2.5 fill-current","aria-hidden":"true",children:r.jsx("path",{d:"M.057 24l1.687-6.163a11.867 11.867 0 01-1.587-5.946C.16 5.335 5.495 0 12.05 0a11.817 11.817 0 018.413 3.488 11.824 11.824 0 013.48 8.414c-.003 6.557-5.338 11.892-11.893 11.892a11.9 11.9 0 01-5.688-1.448L.057 24zm6.597-3.807c1.676.995 3.276 1.591 5.392 1.592 5.448 0 9.886-4.434 9.889-9.885.002-5.462-4.415-9.89-9.881-9.892-5.452 0-9.887 4.434-9.889 9.884a9.86 9.86 0 001.51 5.26l-.999 3.648 3.978-1.044zm11.387-5.464c-.074-.124-.272-.198-.57-.347-.297-.149-1.758-.868-2.031-.967-.272-.099-.47-.149-.669.149-.198.297-.768.967-.941 1.165-.173.198-.347.223-.644.074-.297-.149-1.255-.462-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.297-.347.446-.521.151-.172.2-.296.3-.495.099-.198.05-.372-.025-.521-.075-.148-.669-1.611-.916-2.206-.242-.579-.487-.501-.669-.51l-.57-.01c-.198 0-.52.074-.792.372s-1.04 1.016-1.04 2.479 1.065 2.876 1.213 3.074c.149.198 2.095 3.2 5.076 4.487.709.306 1.263.489 1.694.626.712.226 1.36.194 1.872.118.571-.085 1.758-.719 2.006-1.413.248-.695.248-1.29.173-1.414z"})}),"WhatsApp"]}),Se[g]?r.jsx(Rt,{className:"h-3.5 w-3.5 ml-auto text-muted-foreground"}):g!=="community"?r.jsx(Ie,{className:"h-3.5 w-3.5 ml-auto text-muted-foreground"}):null]}),Se[g]&&s.children.map(C=>{const I=f===C.id,B=C.highlight&&!I;return r.jsxs("button",{onClick:()=>{C.id==="gruppen"&&(G(void 0),H(Z=>Z+1)),u(C.id),E(!1)},className:`w-full flex items-center gap-3 pl-10 pr-4 py-2.5 text-left transition-colors ${I?"bg-primary/10 text-primary":B?"text-primary font-bold hover:bg-primary/5":"text-muted-foreground hover:bg-muted hover:text-foreground"}`,children:[r.jsx(C.icon,{className:"h-4 w-4 flex-shrink-0"}),r.jsx("span",{className:"font-body text-sm",children:C.label}),C.id==="gruppen"&&ee>0&&r.jsx("span",{className:"ml-auto bg-red-500 text-white text-[10px] font-bold rounded-full w-5 h-5 flex items-center justify-center flex-shrink-0",children:ee>99?"99+":ee}),C.id==="members"&&T>0&&r.jsx("span",{className:"ml-auto bg-primary text-white text-[10px] font-bold rounded-full w-5 h-5 flex items-center justify-center flex-shrink-0",children:T>9?"9+":T}),C.id==="marktplatz"&&N>0&&r.jsx("span",{className:"ml-auto bg-primary text-white text-[10px] font-bold rounded-full w-5 h-5 flex items-center justify-center flex-shrink-0",children:N>9?"9+":N})]},C.id)})]},s.id)}const m=f===s.id,j=s.highlight&&!m;return r.jsxs("button",{onClick:()=>{if(s.id==="inbox"&&Y(null),s.id==="gruppen"&&(G(void 0),H(g=>g+1)),s.id==="felix-dm"){P.from("profiles").select("id, full_name").eq("is_owner",!0).single().then(({data:g})=>{g&&(Y({id:g.id,name:g.full_name||"Felix"}),u("inbox"))}),E(!1);return}u(s.id),E(!1)},className:`w-full flex items-center gap-3 px-4 py-3 text-left transition-colors ${s.id==="gruppen"?"bg-[hsl(104,46%,48%)]/10 text-[hsl(104,46%,68%)] ring-1 ring-[hsl(104,46%,48%)]/30 rounded-md mx-1":m?"bg-primary/10 text-primary":j?"text-primary font-bold hover:bg-primary/5":"text-muted-foreground hover:bg-muted hover:text-foreground"}`,children:[r.jsx(s.icon,{className:"h-5 w-5"}),r.jsx("span",{className:"font-body text-sm",children:s.label}),s.id==="gruppen"&&r.jsxs("span",{className:"ml-auto inline-flex items-center gap-1 bg-[#25D366] text-white text-[10px] font-bold rounded-full px-2 py-0.5 flex-shrink-0 shadow-sm",children:[r.jsx("svg",{viewBox:"0 0 24 24",className:"h-2.5 w-2.5 fill-current","aria-hidden":"true",children:r.jsx("path",{d:"M.057 24l1.687-6.163a11.867 11.867 0 01-1.587-5.946C.16 5.335 5.495 0 12.05 0a11.817 11.817 0 018.413 3.488 11.824 11.824 0 013.48 8.414c-.003 6.557-5.338 11.892-11.893 11.892a11.9 11.9 0 01-5.688-1.448L.057 24zm6.597-3.807c1.676.995 3.276 1.591 5.392 1.592 5.448 0 9.886-4.434 9.889-9.885.002-5.462-4.415-9.89-9.881-9.892-5.452 0-9.887 4.434-9.889 9.884a9.86 9.86 0 001.51 5.26l-.999 3.648 3.978-1.044zm11.387-5.464c-.074-.124-.272-.198-.57-.347-.297-.149-1.758-.868-2.031-.967-.272-.099-.47-.149-.669.149-.198.297-.768.967-.941 1.165-.173.198-.347.223-.644.074-.297-.149-1.255-.462-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.297-.347.446-.521.151-.172.2-.296.3-.495.099-.198.05-.372-.025-.521-.075-.148-.669-1.611-.916-2.206-.242-.579-.487-.501-.669-.51l-.57-.01c-.198 0-.52.074-.792.372s-1.04 1.016-1.04 2.479 1.065 2.876 1.213 3.074c.149.198 2.095 3.2 5.076 4.487.709.306 1.263.489 1.694.626.712.226 1.36.194 1.872.118.571-.085 1.758-.719 2.006-1.413.248-.695.248-1.29.173-1.414z"})}),"WhatsApp"]}),s.id==="inbox"&&k>0&&r.jsx("span",{className:"ml-auto bg-red-500 text-white text-[10px] font-bold rounded-full w-5 h-5 flex items-center justify-center flex-shrink-0",children:k>9?"9+":k}),s.id==="members"&&T>0&&r.jsx("span",{className:"ml-auto bg-primary text-white text-[10px] font-bold rounded-full w-5 h-5 flex items-center justify-center flex-shrink-0",children:T>9?"9+":T}),s.id==="marktplatz"&&N>0&&r.jsx("span",{className:"ml-auto bg-primary text-white text-[10px] font-bold rounded-full w-5 h-5 flex items-center justify-center flex-shrink-0",children:N>9?"9+":N})]},s.id)})})})]}),r.jsx("main",{className:"flex-1 p-6 sm:p-8 overflow-y-auto",children:r.jsx(l.Suspense,{fallback:r.
165jsx(Gt,{}),children:Jr()})})]}),f!=="coach"&&r.jsx("footer",{className:"border-t border-border py-6 px-4 bg-card",children:r.jsxs("div",{className:"max-w-6xl mx-auto flex flex-col sm:flex-row items-center justify-between gap-4",children:[r.jsxs("span",{className:"text-sm text-muted-foreground font-body",children:["© ",new Date().getFullYear()," Felix Thönnessen"]}),r.jsxs("div",{className:"flex gap-6 text-sm font-body",children:[r.jsx("a",{href:"/impressum",className:"text-muted-foreground hover:text-foreground transition-colors",children:"Impressum"}),r.jsx("a",{href:"/datenschutz",className:"text-muted-foreground hover:text-foreground transition-colors",children:"Datenschutz"}),r.jsx("a",{href:"/agb",className:"text-muted-foreground hover:text-foreground transition-colors",children:"AGB"})]})]})}),Vr&&r.jsx(l.Suspense,{fallback:null,children:r.jsx(ys,{onComplete:()=>ce(!1)})})]})},po=Object.freeze(Object.defineProperty({__proto__:null,default:ws},Symbol.toStringTag,{value:"Module"}));export{Wi as A,Ln as C,po as M,Un as S,dr as U,Dr as a,lr as b,Vi as c,$n as d,Hn as e,Fn as f,uo as g,cr as h,mo as i,nt as j,Kn as k};
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.