1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5893a0eb-ad83-4e93-a92d-5e859d90bc2a",e._sentryDebugIdIdentifier="sentry-dbid-5893a0eb-ad83-4e93-a92d-5e859d90bc2a")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6053],{24041:(e,t,a)=>{a.d(t,{P:()=>u});var s=a(95155),r=a(12115),i=a(52530),o=a(33210),n=a(6296),l=a(91337),c=a(97048);function u({brandId:e,purpose:t,billingPeriod:a="monthly",seatCount:u=1,applied:m,onChange:d}){let[p,_]=(0,r.useState)(!1),[g,b]=(0,r.useState)(""),[x,f]=(0,r.useState)(!1),[y,h]=(0,r.useState)(""),v=(0,r.useRef)({billingPeriod:a,seatCount:u}),S=async s=>{f(!0),h("");try{let r=`brand_id=${e}&code=${encodeURIComponent(s)}&purpose=${t}&billing_period=${a}&seat_count=${u}`,i=await (0,l.MB)(`${(0,c.nI)()}/api/billing/coupon-check?${r}`),o=await i.json().catch(()=>({}));if(!i.ok){d(null),h(o?.detail||"Kupon doÄrulanamadı, tekrar deneyin.");return}d(o),h("")}catch{d(null),h("Kupon doÄrulanamadı, tekrar deneyin.")}finally{f(!1)}};return((0,r.useEffect)(()=>{let e=v.current;v.current={billingPeriod:a,seatCount:u},m&&(e.billingPeriod!==a||e.seatCount!==u)&&S(m.code)},[a,u]),m)?(0,s.jsxs)("div",{className:"mt-3",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between p-2.5 rounded-xl bg-emerald-500/10 border border-emerald-500/25",children:[(0,s.jsxs)("span",{className:"text-xs text-emerald-400 font-semibold flex items-center gap-1.5 min-w-0",children:[(0,s.jsx)(i.A,{className:"w-3.5 h-3.5 shrink-0"}),(0,s.jsxs)("span",{className:"truncate",children:[m.code," \xb7 %",m.percent_off," indirim: -",(0,c.us)(m.discount_kurus)]})]}),(0,s.jsx)("button",{type:"button",onClick:()=>{d(null),b(""),h("")},className:"p-1 rounded-lg hover:bg-white/10 text-gray-400 hover:text-white transition-colors shrink-0","aria-label":"Kuponu kaldır",children:(0,s.jsx)(o.A,{className:"w-3.5 h-3.5"})})]}),x&&(0,s.jsxs)("p",{className:"text-[11px] text-gray-500 mt-1.5 flex items-center gap-1.5",children:[(0,s.jsx)(n.A,{className:"w-3 h-3 animate-spin"})," Kupon yeni tutara g\xf6re doÄrulanıyor..."]}),y&&(0,s.jsx)("p",{className:"text-[11px] text-rose-400 mt-1.5",children:y})]}):(0,s.jsx)("div",{className:"mt-3",children:p?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("input",{type:"text",value:g,onChange:e=>b(e.target.value.toUpperCase()),placeholder:"TERMINAL20",maxLength:40,className:"flex-1 min-w-0 px-3 py-2 bg-white/5 border border-white/10 rounded-xl text-white text-sm placeholder-gray-600 focus:border-purple-500 focus:outline-none transition-all uppercase",onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),g.trim()&&!x&&S(g.trim()))}}),(0,s.jsx)("button",{type:"button",onClick:()=>g.trim()&&S(g.trim()),disabled:x||!g.trim(),className:"shrink-0 px-4 py-2 rounded-xl bg-white/10 hover:bg-white/15 text-white text-sm font-semibold disabled:opacity-40 disabled:cursor-not-allowed transition-all",children:x?(0,s.jsx)(n.A,{className:"w-4 h-4 animate-spin"}):"Uygula"})]}),y&&(0,s.jsx)("p",{className:"text-[11px] text-rose-400 mt-1.5",children:y})]}):(0,s.jsx)("button",{type:"button",onClick:()=>_(!0),className:"text-xs text-purple-400 hover:text-purple-300 underline underline-offset-2 transition-colors",children:"Kupon kodun var mı?"})})}},38498:(e,t,a)=>{a.d(t,{OnboardingProvider:()=>c,z:()=>l});var s=a(95155),r=a(12115),i=a(73321);let o=[{id:"welcome",page:"/accounts",title:"Merhaba! \uD83D\uDC4B",message:"Ben AXI, senin AI asistanın. İlk kurulumunu birlikte yapalım!",expression:"wave"},{id:"add-brand",page:"/accounts",title:"İÅletmeni Ekle",message:'"Yeni İÅletme Ekle" butonuna tıklayarak iÅletmeni oluÅtur.',targetSelector:'[data-onboarding="add-brand"]',position:"left",expression:"present"},{id:"wizard-step-1",page:"/accounts",title:"Kategori Se\xe7 \uD83C\uDFF7ï¸",message:"İÅletme kategorini se\xe7. SaÄlık, spor, eÄitim... Hangisi senin alanın?",expression:"present",wizardStep:1},{id:"wizard-step-2",page:"/accounts",title:"Sekt\xf6r Se\xe7 \uD83C\uDFE2",message:"Uzmanlık alanını belirle.",expression:"present",wizardStep:2},{id:"wizard-step-3",page:"/accounts",title:"İÅletme Bilgileri \uD83D\uDCCB",message:"İÅletmeni tanıt. İsim ve iletiÅim bilgilerini gir.",expression:"think",wizardStep:3},{id:"wizard-step-4",page:"/accounts",title:"Konum & Saatler \uD83D\uDCCD",message:"Neredesin ve ne zaman a\xe7ıksın?",expression:"present",wizardStep:4},{id:"wizard-step-5",page:"/accounts",title:"Hizmetler \uD83D\uDEE0ï¸",message:"SunduÄun hizmetleri se\xe7 veya ekle.",expression:"excited",wizardStep:5},{id:"wizard-step-6",page:"/accounts",title:"SSS â",message:"Sık sorulan sorular AI'ın cevap vermesine yardımcı olur.",expression:"listen",wizardStep:6},{id:"wizard-step-7",page:"/accounts",title:"AI Asistan \uD83E\uDD16",message:"AI asistanının kiÅiliÄini belirle!",expression:"excited",wizardStep:
17},{id:"dashboard-intro",page:"/",title:"HoÅ Geldin! \uD83D\uDE80",message:"İÅletmen hazır! Dashboard'da t\xfcm \xf6zetleri g\xf6rebilirsin.",expression:"excited"}],n=(0,r.createContext)(void 0),l=()=>{let e=(0,r.useContext)(n);if(!e)throw Error("useOnboarding must be used within OnboardingProvider");return e},c=({children:e})=>{let t=(0,i.usePathname)(),[a,l]=(0,r.useState)(!1),[c,u]=(0,r.useState)(0);(0,r.useEffect)(()=>{let e=localStorage.getItem("aexis_onboarding_completed"),t=localStorage.getItem("aexis_needs_onboarding");e||"true"!==t||l(!0)},[]),(0,r.useEffect)(()=>{"/"===t&&a&&localStorage.getItem("aexis_brand_id")&&(console.log("\uD83C\uDF89 Dashboard loaded with brand - completing onboarding"),l(!1),localStorage.setItem("aexis_onboarding_completed","true"),localStorage.removeItem("aexis_needs_onboarding"))},[t,a]),(0,r.useCallback)(()=>o.filter(e=>e.page===t),[t]);let m=o[c]||null,d=o.length,p=(0,r.useCallback)(()=>{c<o.length-1?u(e=>e+1):b()},[c]),_=(0,r.useCallback)(()=>{c>0&&u(e=>e-1)},[c]),g=(0,r.useCallback)(()=>{l(!1),localStorage.setItem("aexis_onboarding_completed","true"),localStorage.removeItem("aexis_needs_onboarding")},[]),b=(0,r.useCallback)(()=>{l(!1),localStorage.setItem("aexis_onboarding_completed","true"),localStorage.removeItem("aexis_needs_onboarding")},[]),x=(0,r.useCallback)(()=>{u(0),l(!0),localStorage.removeItem("aexis_onboarding_completed"),localStorage.setItem("aexis_needs_onboarding","true")},[]),f=(0,r.useCallback)(e=>{let t=o.findIndex(t=>t.id===e);-1!==t&&u(t)},[]),y=(0,r.useCallback)(e=>{if(!a)return;let t=o.findIndex(t=>t.wizardStep===e);-1!==t&&u(t)},[a]),h=(0,r.useCallback)(()=>{if(!a)return;let e=o.findIndex(e=>"wizard-step-1"===e.id);-1!==e&&u(e)},[a]),[v,S]=(0,r.useState)(null);return(0,r.useEffect)(()=>{if(v){let e=setTimeout(()=>{S(null)},4e3);return()=>clearTimeout(e)}},[v]),(0,s.jsx)(n.Provider,{value:{isOnboardingActive:a,currentStep:m,currentStepIndex:c,totalSteps:d,nextStep:p,prevStep:_,skipOnboarding:g,completeOnboarding:b,restartOnboarding:x,goToStep:f,setWizardStep:y,wizardOpened:h,dynamicMessage:v,setDynamicMessage:S},children:e})}},65072:(e,t,a)=>{a.d(t,{J:()=>c,UserProvider:()=>l});var s=a(95155),r=a(12115),i=a(66609);let o={fullName:"",email:"",phone:"",company:"",language:"tr",timezone:"Europe/Istanbul",avatar:null},n=(0,r.createContext)(void 0);function l({children:e}){let[t,a]=(0,r.useState)(o),[l,c]=(0,r.useState)(!0);(0,r.useEffect)(()=>{let e=localStorage.getItem("aexis_user_profile");if(e)try{a(JSON.parse(e))}catch(e){console.error("Failed to parse user profile",e)}c(!1)},[]);let u=async e=>e.size>2097152?void i.o.error("Dosya boyutu 2MB'dan k\xfc\xe7\xfck olmalıdır"):e.type.startsWith("image/")?new Promise((s,r)=>{let o=new FileReader;o.onloadend=()=>{let e=o.result,r={...t,avatar:e};a(r),localStorage.setItem("aexis_user_profile",JSON.stringify(r)),i.o.success("Profil fotoÄrafı g\xfcncellendi"),s()},o.onerror=r,o.readAsDataURL(e)}):void i.o.error("L\xfctfen ge\xe7erli bir resim dosyası y\xfckleyin"),m="admin"===t.role||!t.role;return(0,s.jsx)(n.Provider,{value:{user:t,updateProfile:e=>{let s={...t,...e};a(s),localStorage.setItem("aexis_user_profile",JSON.stringify(s)),i.o.success("Profil g\xfcncellendi")},updateAvatar:u,logout:()=>{localStorage.removeItem("aexis_user_profile"),localStorage.removeItem("aexis_active_brand_id"),window.location.href="/login"},loading:l,isAdmin:m,canAccessModule:e=>!!m||!t.allowedModules||0===t.allowedModules.length||t.allowedModules.includes(e)},children:e})}function c(){let e=(0,r.useContext)(n);if(void 0===e)throw Error("useUser must be used within a UserProvider");return e}},81228:(e,t,a)=>{a.d(t,{L:()=>m,TerminologyProvider:()=>u,k:()=>d});var s=a(95155),r=a(12115),i=a(73321),o=a(91337);let n=["/landing"],l={patient:"\xdcye",patients:"\xdcyeler",prospects:"\xdcye Adayları",appointment:"Randevu",appointments:"Randevular",service:"Hizmet",services:"Hizmetler",staff:"Personel",consultation:"G\xf6r\xfcÅme",treatment:"İÅlem",session:"Seans",revenue:"Gelir",client:"M\xfcÅteri",clinic:"Klinik",clinics:"Klinikler",period:"D\xf6nem"},c=(0,r.createContext)(void 0);function u({children:e}
1){let[t,a]=(0,r.useState)(l),[u,m]=(0,r.useState)(""),[d,p]=(0,r.useState)(null),[_,g]=(0,r.useState)(!0),b=(0,i.usePathname)(),x=n.some(e=>b?.startsWith(e)),f=(0,o.e9)();(0,r.useEffect)(()=>{x?g(!1):y()},[x]),(0,r.useEffect)(()=>{let e=e=>{let t=e.detail;t&&(console.log("TerminologyContext - industry changed via event:",t),h(t))};return window.addEventListener("aexis-industry-change",e),()=>window.removeEventListener("aexis-industry-change",e)},[]);let y=async()=>{try{let e=localStorage.getItem("aexis_industry_type"),t=localStorage.getItem("aexis_main_sector");console.log("TerminologyContext - savedIndustry from localStorage:",e),e&&(await h(e),p({mainSector:t||"",subSector:e,displayName:""}))}catch(e){console.error("Failed to load terminology:",e)}finally{g(!1)}},h=async e=>{try{let t=await fetch(`${f}/api/industries/${e}/terminology`);if(t.ok){let s=await t.json();console.log("TerminologyContext - fetched terminology:",s),s.terminology&&a(s.terminology),m(e)}else console.warn("Terminology API returned non-OK status, using defaults"),a(l),m(e)}catch(t){console.error("Failed to fetch terminology:",t),m(e)}},v=(0,r.useCallback)(async(e,t)=>{g(!0),await h(e),localStorage.setItem("aexis_industry_type",e),t&&(localStorage.setItem("aexis_main_sector",t),p(a=>({mainSector:t,subSector:e,displayName:a?.displayName||""}))),g(!1)},[]),S=(0,r.useCallback)(e=>t[e]||l[e]||e,[t]);return(0,s.jsx)(c.Provider,{value:{terminology:t,industryType:u,industryInfo:d,isLoading:_,t:S,setIndustry:v},children:e})}function m(){let e=(0,r.useContext)(c);if(void 0===e)throw Error("useTerminology must be used within a TerminologyProvider");return e}function d(){let{t:e}=m();return e}},87770:(e,t,a)=>{a.d(t,{Rs:()=>d,SubscriptionProvider:()=>m});var s=a(95155),r=a(12115),i=a(93422),o=a(34855);let n=["dashboard","customers","lost_customers","services","team","appointments","accounts","communication","analytics","reports","roas","forms","expenses","finance"],l={temel:{id:"temel",name:"Temel",price_monthly:999,modules:["dashboard","customers","services","team","appointments","accounts"],limits:{max_brands:1,max_team_members:1,included_seats:1,per_seat_price:250,max_customers:500,max_staff:5,max_messages_month:0,max_ai_requests_day:20},features:{lost_customers:!1,communication:!1,analytics:!1,reports:!1,roas:!1,ai_voice:!1,ai_auto_reply:!1,api_access:!1,ai_model:"gpt-3.5-turbo"},badge_color:"#6B7280",is_public:!0},pro:{id:"pro",name:"Pro",price_monthly:2199,modules:["dashboard","customers","lost_customers","services","team","appointments","accounts","communication","forms","expenses"],limits:{max_brands:1,max_team_members:2,included_seats:2,per_seat_price:500,max_customers:2e3,max_staff:15,max_messages_month:1e3,max_ai_requests_day:100},features:{lost_customers:!0,communication:!0,analytics:!1,reports:!1,roas:!1,ai_voice:!1,ai_auto_reply:!0,api_access:!1,ai_model:"gpt-5-mini"},badge_color:"#8B5CF6",is_public:!0},ultra:{id:"ultra",name:"Ultra",price_monthly:3699,modules:n,limits:{max_brands:1,max_team_members:3,included_seats:3,per_seat_price:1e3,max_customers:1e4,max_staff:50,max_messages_month:5e3,max_ai_requests_day:-1},features:{lost_customers:!0,communication:!0,analytics:!0,reports:!0,roas:!0,ai_voice:!0,ai_auto_reply:!0,api_access:!0,ai_model:"gpt-5-mini"},badge_color:"#F59E0B",is_public:!0},chatbot:{id:"chatbot",name:"Chatbot",price_monthly:1499,modules:["dashboard","communication","team"],limits:{max_brands:1,max_team_members:2,included_seats:2,per_seat_price:0,max_customers:2e3,max_staff:0,max_messages_month:2e3,max_conversations_month:2e3,max_ai_requests_day:100},features:{lost_customers:!1,communication:!0,analytics:!1,reports:!1,roas:!1,ai_voice:!1,ai_auto_reply:!0,api_access:!1,ai_model:"gpt-5-mini"},badge_color:"#06B6D4",is_public:!0},enterprise:{id:"enterprise",name:"Enterprise",price_monthly:0,modules:[...n,"beta_features"],limits:{max_brands:1,max_team_members:20,included_seats:-1,per_seat_price:0,max_customers:5e3,max_staff:50,max_messages_month:-1,max_ai_requests_day:-1},features:{lost_customers:!0,communication:!0,analytics:!0,reports:!0,roas:!0,ai_voice:!0,ai_auto_reply:!0,api_access:!0,ai_model:"gpt-5-mini",beta_features:!0},badge_color:"#D4AF37",is_public:!1},founder:{id:"founder",name:"Founder",price_monthly:0,modules:[...n,"beta_features"],limits:{max_brands:1,max_team_members:-1,included_seats:-1,per_seat_price:0,max_customers:-1,max_staff:-1,max_messages_month:-1,max_ai_requests_day:-1},features:{lost_customers:!0,communication:!0,analytics:!0,reports:!0,roas:!0,ai_voice:!0,ai_auto_reply:!0,api_access:!0,ai_model:"gpt-5-mini",beta_features:!0},badge_color:"#10B981",is_public:!1}},c={...l,...Object.fromEntries(o.l.map(e=>[e.id,{...l.ultra,id:e.id,name:e.name,price_monthly:e.monthlyKurus/100,is_public:!1,limits:{...l.ultra.limits,included_seats:e.seats,max_team_members:e.seats,per_seat_price:250}}
1])),ai_pending:{...l.temel,id:"ai_pending",name:"\xd6deme bekleniyor",price_monthly:0,is_public:!1,modules:["accounts"],features:{...l.temel.features,ai_voice:!1,ai_auto_reply:!1},limits:{...l.temel.limits,max_ai_requests_day:0}}},u=(0,r.createContext)(void 0);function m({children:e}){let{activeBrand:t}=(0,i.P)(),[a,o]=(0,r.useState)("temel"),[n,l]=(0,r.useState)(!0),[m,d]=(0,r.useState)({isOpen:!1,reason:"",requiredPlan:void 0}),p=["[email protected]","[email protected]"];(0,r.useEffect)(()=>{let e=(()=>{try{let e=localStorage.getItem("aexis_user_profile");if(e)return JSON.parse(e).email}catch(e){console.error("Failed to parse user profile",e)}return null})(),a=t?.subscription_plan;if(a?.startsWith("ai_")&&c[a]){o(a),l(!1);return}if(e&&p.includes(e.toLowerCase())){console.log("[Subscription] Founder email detected:",e),o("founder"),l(!1);return}let s=(()=>{try{let e=localStorage.getItem("aexis_user_profile");if(e){let t=JSON.parse(e),a=t.user_metadata?.subscription_plan||t.subscription_plan;if(a&&c[a])return a}}catch(e){console.error("Failed to parse user subscription plan",e)}return null})();if(s){console.log("[Subscription] User plan from metadata:",s),o(s),l(!1);return}if(t){let e=t.subscription_plan;e&&c[e]?o(e):o("temel")}l(!1)},[t]);let _=c[a],g=(0,r.useCallback)(e=>{if(_.modules.includes(e))return!0;if(t?.id)try{let a=localStorage.getItem(`aexis_permissions_${t.id}`);if(a){let t=JSON.parse(a),s=!1!==t.is_owner,r=t.allowed_modules||[];if(!s&&r.length>0&&r.includes(e))return!0}}catch{}return!1},[_,t?.id]),b=(0,r.useCallback)(e=>!!_.features[e],[_]),x=(0,r.useCallback)((e,t)=>{let a=_.limits[e]??0;return -1===a||t<a},[_]),f=(0,r.useCallback)(e=>_.limits[e]??0,[_]),y=(0,r.useCallback)(e=>-1===_.limits[e],[_]),h=(0,r.useCallback)((e,t)=>{d({isOpen:!0,reason:e,requiredPlan:t})},[]),v=(0,r.useCallback)(()=>{d({isOpen:!1,reason:"",requiredPlan:void 0})},[]);return(0,s.jsx)(u.Provider,{value:{plan:_,planId:a,isLoading:n,canAccessModule:g,canUseFeature:b,checkLimit:x,getLimit:f,isUnlimited:y,showUpgradeModal:h,upgradeModalState:m,closeUpgradeModal:v},children:e})}function d(){let e=(0,r.useContext)(u);if(void 0===e)throw Error("useSubscription must be used within a SubscriptionProvider");return e}}}]);
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.