1import{i as W,u as X,d as ee,r as o,j as e,N as te,L as P}from"./react-B4L68OGK.js";import{b as se,F as ne,s as A,L as B,v as re,t as S,d as ae,w as oe,e as j,a5 as H,p as le,a9 as ie,I as de,a as R,S as ce,X as me,aa as ue,o as he,A as xe}from"./index-COZbFGRV.js";import"./radix-DjD5lmjs.js";import"./query-BPG6VFGJ.js";import"./supabase-DC3VomA8.js";const l={docentric:{name:"Docentric",href:"https://ax.docentric.com/",logo:"/media/partners/docentric-2026.svg"},lasernet:{name:"Formpipe Lasernet",href:"https://www.formpipe.com/lasernet/",logo:"/media/partners/lasernet-2026.svg"},"executive-automats":{name:"Executive Automats",href:"https://xplusglobal.com/",logo:"/media/wp-mirror/partners/executive-automats.svg"},"be-terna-lohn":{name:"Be-Terna",href:"https://www.be-terna.com/de/loesungen/human-resource-management/payroll-swiss",hrefEn:"https://www.be-terna.com/en/solutions/human-resource-management/payroll-swiss",logo:"/media/wp-mirror/partners/be-terna.svg"}},_=(h,t)=>t==="en"&&h.hrefEn?h.hrefEn:h.href,ye=()=>{const{slug:h}=W(),{language:t}=se();X(),ee();const[s,O]=o.useState(null),[T,V]=o.useState(!1),[q,L]=o.useState(!0),[x,y]=o.useState([]),[N,$]=o.useState(""),[g,C]=o.useState(!1),[w,E]=o.useState(!1),I=ne("addons.ai_assistant_enabled",!0),D=o.useRef(null),[c,m]=o.useState(null);if(o.useEffect(()=>{if(c===null)return;const n=r=>{if(!s)return;const i=s.gallery_image_urls.length;r.key==="Escape"&&m(null),r.key==="ArrowRight"&&m(d=>d===null?null:(d+1)%i),r.key==="ArrowLeft"&&m(d=>d===null?null:(d-1+i)%i)};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[c,s]),o.useEffect(()=>{h&&(L(!0),A.from("addons").select("*").eq("slug",h).maybeSingle().then(({data:n})=>{n?O({...n,gallery_image_urls:n.gallery_image_urls||[]}):V(!0),L(!1)}))},[h]),o.useEffect(()=>{if(!s?.slug)return;if(!I){E(!1);return}let n=!1;return A.functions.invoke("addon-chat",{body:{addonSlug:s.slug,language:t,messages:[{role:"user",content:"ping"}]}}).then(({data:r,error:i})=>{n||!i&&r?.reply&&E(!0)}).catch(()=>{}),()=>{n=!0}},[s?.slug,t,I]),o.useEffect(()=>{D.current?.scrollIntoView({behavior:"smooth"})},[x]),T)return e.jsx(te,{to:`/${t}/${t==="de"?"produkte":"products"}`,replace:!0});if(q||!s)return e.jsx(B,{children:e.jsx("div",{className:"container-custom py-32 text-center text-muted-foreground",children:"Lade ..."})});const a=t==="de"?s.title_de:s.title_en,p=t==="de"?s.subtitle_de:s.subtitle_en,K=(t==="de"?s.content_html_de:s.content_html_en)||s.content_html_de||"",G=re(K),f=S(s.hero_image_url),u=s.gallery_image_urls.map(S).filter(Boolean),U=async n=>{n.preventDefault();const r=N.trim();if(!r||g)return;const i=[...x,{role:"user",content:r}];y(i),$(""),C(!0);try{const{data:d,error:z}=await A.functions.invoke("addon-chat",{body:{addonSlug:s.slug,language:t,messages:i}});if(z)throw z;y([...i,{role:"assistant",content:d.reply||"..."}])}catch(d){y([...i,{role:"assistant",content:t==="de"?`Fehler: ${d.message||"Anfrage fehlgeschlagen"}`:`Error: ${d.message||"Request failed"}`}])}finally{C(!1)}},v=`/de/loesungen/add-ons/${s.slug}`,F=`/en/solutions/add-ons/${s.slug}`,k=t==="de"?v:F,J=t==="de"?`${a} - Add-on für Microsoft Dynamics 365 | Axperience`:`${a} - Add-on for Microsoft Dynamics 365 | Axperience`,Y=t==="de"?`${a}: Add-on für Microsoft Dynamics 365 Finance & SCM, betreut durch Axperience.`:`${a}: Add-on for Microsoft Dynamics 365 Finance & SCM, delivered by Axperience.`,M=p&&p.slice(0,158)||Y,b=l[s.slug],Z={"@context":"https://schema.org","@type":"SoftwareApplication",name:a,description:M,applicationCategory:"BusinessApplication",operatingSystem:"Microsoft Dynamics 365",url:`https://axperience.ch${k}`,image:f||void 0,offers:{"@type":"Offer",priceCurrency:"CHF",availability:"https://schema.org/InStock"},provider:{"@type":"Organization",name:"Axperience AG",url:"https://axperience.ch"},...b?{manufacturer:{"@type":"Organization",name:b.name,url:b.href}}:{}},Q={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:t==="de"?"Start":"Home",item:"https://axperience.ch/"},{"@type":"ListItem",position:2,name:t==="de"?"Produkte":"Products",item:`https://axperience.ch${t==="de"?"/produkte":"/products"}`},{"@type":"ListItem",position:3,name:a,item:`https://axperience.ch${k}`}]};return e.jsxs(B,{children:[e.jsx(ae,{title:J,description:M,path:k,type:"article",locale:t==="de"?"de_CH":"en_GB",image:f||void 0,keywords:[a,"Microsoft Dynamics 365","Add-on","Finance & SCM",b?.name].filter(
1Boolean),alternates:[{hrefLang:"de-CH",path:v},{hrefLang:"en",path:F},{hrefLang:"x-default",path:v}],jsonLd:[Z,Q]}),e.jsx("section",{className:"relative py-20 md:py-28 bg-brand-gradient-orange overflow-hidden",children:e.jsxs("div",{className:"container-custom relative z-10",children:[e.jsxs(P,{to:t==="de"?"/produkte":"/products",className:"inline-flex items-center gap-2 text-background/80 hover:text-background mb-6 text-sm",children:[e.jsx(oe,{className:"h-4 w-4"})," ",t==="de"?"Zurück zu Add-ons":"Back to add-ons"]}),e.jsxs("h1",{className:"text-4xl md:text-5xl lg:text-6xl font-heading font-bold text-background mb-4",children:[a,e.jsx(j,{variant:"secondary"})]}),p&&e.jsx("p",{className:"text-xl text-background/80 max-w-3xl",children:p})]})}),f&&e.jsx("section",{className:"bg-background relative z-10",children:e.jsx("div",{className:"container-custom",children:e.jsx("img",{src:f,alt:`${a} - Axperience Add-on`,className:"w-full md:w-4/5 mx-auto rounded-2xl shadow-xl border border-border -mt-10 md:-mt-10",loading:"lazy"})})}),e.jsx("section",{className:"bg-background pt-10 md:pt-14",children:e.jsx("div",{className:"container-custom",children:e.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-xs md:text-sm",children:[e.jsx("span",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-primary/10 text-primary font-medium",children:s.category==="partner"?t==="de"?"Partnerlösung":"Partner solution":"Axperience Add-on"}),e.jsx("span",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-muted text-muted-foreground",children:t==="de"?"Für Microsoft Dynamics 365 F&SCM":"For Microsoft Dynamics 365 F&SCM"}),e.jsx("span",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-muted text-muted-foreground",children:"DE / EN"}),l[s.slug]&&e.jsxs("a",{href:_(l[s.slug],t),target:"_blank",rel:"noopener noreferrer",className:"ml-auto inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full border border-border text-foreground hover:text-primary hover:border-primary transition-colors",children:[t==="de"?"Hersteller":"Vendor",": ",l[s.slug].name,e.jsx(H,{className:"h-3.5 w-3.5"})]})]})})}),e.jsx("section",{className:"bg-background pt-8",children:e.jsx("div",{className:"container-custom",children:e.jsxs("div",{className:"rounded-2xl border border-border bg-muted/40 p-6 md:p-8",children:[e.jsxs("h2",{className:"text-lg md:text-xl font-heading font-semibold mb-3",children:[t==="de"?"Auf einen Blick":"At a glance",e.jsx(j,{})]}),(t==="de"?s.short_description_de:s.short_description_en)&&e.jsx("p",{className:"text-base text-foreground/90 mb-5 leading-relaxed",children:t==="de"?s.short_description_de:s.short_description_en}),e.jsxs("ul",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-8 gap-y-2 text-sm text-muted-foreground",children:[e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"mt-2 w-1.5 h-1.5 bg-primary rounded-full flex-shrink-0"}),t==="de"?"Nahtlose Integration in Dynamics 365 F&SCM":"Seamless integration into Dynamics 365 F&SCM"]}),e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"mt-2 w-1.5 h-1.5 bg-primary rounded-full flex-shrink-0"}),s.category==="partner"?t==="de"?"Betreut durch Axperience als Schweizer Partner":"Delivered by Axperience as Swiss partner":t==="de"?"Axperience Eigenentwicklung":"Axperience in-house development"]}),e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"mt-2 w-1.5 h-1.5 bg-primary rounded-full flex-shrink-0"}),t==="de"?"Einsatzbereit für Cloud und On-Premise Szenarien":"Ready for cloud and on-premise scenarios"]}),e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"mt-2 w-1.5 h-1.5 bg-primary rounded-full flex-shrink-0"}),t==="de"?"Support und Weiterentwicklung aus der Schweiz":"Support and roadmap from Switzerland"]})]})]})})}),e.jsx("section",{className:"py-16 md:py-20 bg-background",children:e.jsxs("div",{className:`container-custom grid grid-cols-1 gap-12 ${w?"lg:grid-cols-3":""}`,children:[e.jsxs("article",{className:`prose prose-lg max-w-none ${w?"lg:col-span-2":"mx-auto"}`,children:[e.jsx("h2",{className:"!mt-0",children:t==="de"?"Funktionsweise":"How it works"}),l[s.slug]&&e.jsxs("div",{className:"not-prose mb-10 flex items-center gap-6 p-6 rounded-2xl border border-border bg-muted/40",children:[e.jsx("a",{href:_(l[s.slug],t),target:"_blank",rel:"noopener noreferrer","aria-label":l[s.slug].name,className:"group block shrink-0",children:e.jsx("img",{src:S(l[s.slug].logo),alt:`${l[s.slug].name}
1 Logo`,loading:"lazy",className:"logo-anthracite h-12 md:h-14 w-auto object-contain"})}),e.jsxs("div",{className:"text-sm",children:[e.jsx("div",{className:"font-semibold text-foreground",children:l[s.slug].name}),e.jsxs("a",{href:_(l[s.slug],t),target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-primary hover:underline",children:[t==="de"?"Zur Herstellerseite":"Visit vendor website",e.jsx(H,{className:"h-3.5 w-3.5"})]})]})]}),e.jsx("div",{dangerouslySetInnerHTML:{__html:G}})]}),w&&e.jsx("aside",{className:"lg:col-span-1",children:e.jsxs("div",{className:"sticky top-28 bg-card border border-border rounded-2xl p-6 shadow-md",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center",children:e.jsx(le,{className:"h-5 w-5 text-primary"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-heading font-semibold",children:t==="de"?"KI-Assistent":"AI Assistant"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t==="de"?`Fragen zu ${a}?`:`Questions about ${a}?`})]})]}),e.jsxs("div",{className:"space-y-3 max-h-80 overflow-y-auto mb-4 pr-1",children:[x.length===0&&e.jsx("p",{className:"text-sm text-muted-foreground italic",children:t==="de"?"Stell hier deine Frage zu diesem Modul. Die KI antwortet nur auf Basis der Informationen oben.":"Ask your question about this module. The AI only answers based on the information above."}),x.map((n,r)=>e.jsxs("div",{className:`text-sm rounded-lg px-3 py-2 ${n.role==="user"?"bg-primary/10 text-foreground":"bg-muted text-foreground"}`,children:[e.jsx("div",{className:"text-[10px] uppercase tracking-wide text-muted-foreground mb-1",children:n.role==="user"?t==="de"?"Du":"You":"KI"}),e.jsx("div",{className:"whitespace-pre-wrap",children:n.content})]},r)),g&&e.jsxs("div",{className:"text-sm text-muted-foreground flex items-center gap-2",children:[e.jsx(ie,{className:"h-3 w-3 animate-spin"})," ..."]}),e.jsx("div",{ref:D})]}),e.jsxs("form",{onSubmit:U,className:"flex gap-2",children:[e.jsx(de,{value:N,onChange:n=>$(n.target.value),placeholder:t==="de"?"Deine Frage ...":"Your question ...",disabled:g}),e.jsx(R,{type:"submit",size:"icon",disabled:g||!N.trim(),children:e.jsx(ce,{className:"h-4 w-4"})})]})]})})]})}),u.length>=1&&e.jsx("section",{className:"py-16 bg-muted/30",children:e.jsxs("div",{className:"container-custom",children:[e.jsxs("h2",{className:"text-2xl font-heading font-bold mb-12",children:[t==="de"?"Einblicke":"Screenshots",e.jsx(j,{})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:u.map((n,r)=>e.jsx("button",{type:"button",onClick:()=>m(r),className:"block group overflow-hidden rounded-xl border border-border bg-background text-left",children:e.jsx("img",{src:n,alt:`${a} - Screenshot ${r+1}`,loading:"lazy",className:"w-full h-auto group-hover:scale-105 transition-transform duration-500"})},n+r))})]})}),c!==null&&u[c]&&e.jsxs("div",{className:"fixed inset-0 z-[100] bg-black/90 flex items-center justify-center p-4",onClick:()=>m(null),role:"dialog","aria-modal":"true",children:[e.jsx("button",{type:"button",onClick:n=>{n.stopPropagation(),m(null)},className:"absolute top-4 right-4 text-white/80 hover:text-white p-2 rounded-full bg-white/10 hover:bg-white/20 transition","aria-label":t==="de"?"Schliessen":"Close",children:e.jsx(me,{className:"h-6 w-6"})}),u.length>1&&e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",onClick:n=>{n.stopPropagation();const r=u.length;m((c-1+r)%r)},className:"absolute left-4 top-1/2 -translate-y-1/2 text-white/80 hover:text-white p-3 rounded-full bg-white/10 hover:bg-white/20 transition","aria-label":t==="de"?"Vorheriges Bild":"Previous image",children:e.jsx(ue,{className:"h-7 w-7"})}),e.jsx("button",{type:"button",onClick:n=>{n.stopPropagation(),m((c+1)%u.length)},className:"absolute right-4 top-1/2 -translate-y-1/2 text-white/80 hover:text-white p-3 rounded-full bg-white/10 hover:bg-white/20 transition","aria-label":t==="de"?"Nächstes Bild":"Next image",children:e.jsx(he,{className:"h-7 w-7"})})]}),e.jsx("img",{src:u[c],alt:`${a} - Screenshot ${c+1}`,onClick:n=>n.stopPropagation(),className:"max-h-[90vh] max-w-[90vw] object-contain rounded-lg shadow-2xl"}),e.jsxs("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 text-white/70 text-sm",children:[c+1," / ",u.length]})]}),e.jsx("section",{className:"py-16 bg-brand-gradient-orange",children:e.jsxs("div",{className:"container-custom text-center",children:[e.jsxs("h2",{className:"text-3xl font-heading font-bold text-background mb-6",children:[t==="de"?`Interesse an ${a}`:`Interested in ${a}`,e.jsx(j,{variant:"secondary"})]}),e.jsx(R,{asChild:!0,size:"lg",variant:"secondary",children:e.jsxs(P,{to:t==="de"?"/kontakt":"/contact",children:[t==="de"?"Kontakt aufnehmen":"Get in touch",e.jsx(xe,{className:"ml-2 h-5 w-5"})]})})]})})]})};export{ye as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.