1import{c as Ee,j as e,r as l,d as j,a as W,m as w,i as Re,L as Te,D as Me,B as Le,b as C,t as P,k as Y}from"./index-Dsd8GAzx.js";import{R as Ie,c as V,P as $e,W as Ue,C as Fe,d as He,T as Be,D as Ge,a as J,O as ze,e as qe,f as Ke,b as Ye}from"./index-DRU_bn87.js";import{u as Q,b as X}from"./button-BvA20N-A.js";import{f as E,e as Z}from"./format-Ds46GObI.js";import{f as ee}from"./fr-BMUfRRx4.js";import{C as O}from"./circle-check-BmsR8PtY.js";import{C as We}from"./clock-wyqLImoB.js";/** 2 * @license lucide-react v0.475.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const Ve=[["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"}]],Je=Ee("Calendar",Ve);var Qe=Symbol("radix.slottable");function Xe(t){const a=({children:n})=>e.jsx(e.Fragment,{children:n});return a.displayName=`${t}.Slottable`,a.__radixId=Qe,a}var te="AlertDialog",[Ze]=qe(te,[V]),y=V(),ae=t=>{const{__scopeAlertDialog:a,...n}=t,o=y(a);return e.jsx(Ie,{...o,...n,modal:!0})};ae.displayName=te;var et="AlertDialogTrigger",tt=l.forwardRef((t,a)=>{const{__scopeAlertDialog:n,...o}=t,c=y(n);return e.jsx(Ke,{...c,...o,ref:a})});tt.displayName=et;var at="AlertDialogPortal",se=t=>{const{__scopeAlertDialog:a,...n}=t,o=y(a);return e.jsx($e,{...o,...n})};se.displayName=at;var st="AlertDialogOverlay",re=l.forwardRef((t,a)=>{const{__scopeAlertDialog:n,...o}=t,c=y(n);return e.jsx(ze,{...c,...o,ref:a})});re.displayName=st;var A="AlertDialogContent",[rt,nt]=Ze(A),ot=Xe("AlertDialogContent"),ne=l.forwardRef((t,a)=>{const{__scopeAlertDialog:n,children:o,...c}=t,g=y(n),m=l.useRef(null),f=Q(a,m),D=l.useRef(null);return e.jsx(Ue,{contentName:A,titleName:oe,docsSlug:"alert-dialog",children:e.jsx(rt,{scope:n,cancelRef:D,children:e.jsxs(Fe,{role:"alertdialog",...g,...c,ref:f,onOpenAutoFocus:He(c.onOpenAutoFocus,b=>{var R;b.preventDefault(),(R=D.current)==null||R.focus({preventScroll:!0})}),onPointerDownOutside:b=>b.preventDefault(),onInteractOutside:b=>b.preventDefault(),children:[e.jsx(ot,{children:o}),e.jsx(lt,{contentRef:m})]})})})});ne.displayName=A;var oe="AlertDialogTitle",ie=l.forwardRef((t,a)=>{const{__scopeAlertDialog:n,...o}=t,c=y(n);return e.jsx(Be,{...c,...o,ref:a})});ie.displayName=oe;var le="AlertDialogDescription",ce=l.forwardRef((t,a)=>{const{__scopeAlertDialog:n,...o}=t,c=y(n);return e.jsx(Ge,{...c,...o,ref:a})});ce.displayName=le;var it="AlertDialogAction",de=l.forwardRef((t,a)=>{const{__scopeAlertDialog:n,...o}=t,c=y(n);return e.jsx(J,{...c,...o,ref:a})});de.displayName=it;var pe="AlertDialogCancel",me=l.forwardRef((t,a)=>{const{__scopeAlertDialog:n,...o}=t,{cancelRef:c}=nt(pe,n),g=y(n),m=Q(a,c);return e.jsx(J,{...g,...o,ref:m})});me.displayName=pe;var lt=({contentRef:t})=>{const a=`\`${A}\` requires a description for the component to be accessible for screen reader users. 7 8You can add a description to the \`${A}\` by passing a \`${le}\` component as a child, which also benefits sighted users by adding visible context to the dialog. 9 10Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${A}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. 11 12For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return l.useEffect(()=>{var o;document.getElementById((o=t.current)==null?void 0:o.getAttribute("aria-describedby"))||console.warn(a)},[a,t]),null},ct=ae,dt=se,ue=re,xe=ne,fe=de,ge=me,be=ie,he=ce;const pt=ct,mt=dt,ye=l.forwardRef(({className:t,...a},n)=>e.jsx(ue,{className:j("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...a,ref:n}));ye.displayName=ue.displayName;const _e=l.forwardRef(({className:t,...a},n)=>e.jsxs(mt,{children:[e.jsx(ye,{}),e.jsx(xe,{ref:n,className:j("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
12nded-lg",t),...a})]}));_e.displayName=xe.displayName;const je=({className:t,...a})=>e.jsx("div",{className:j("flex flex-col space-y-2 text-center sm:text-left",t),...a});je.displayName="AlertDialogHeader";const Ne=({className:t,...a})=>e.jsx("div",{className:j("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...a});Ne.displayName="AlertDialogFooter";const ve=l.forwardRef(({className:t,...a},n)=>e.jsx(be,{ref:n,className:j("text-lg font-semibold",t),...a}));ve.displayName=be.displayName;const we=l.forwardRef(({className:t,...a},n)=>e.jsx(he,{ref:n,className:j("text-sm text-muted-foreground",t),...a}));we.displayName=he.displayName;const De=l.forwardRef(({className:t,...a},n)=>e.jsx(fe,{ref:n,className:j(X(),t),...a}));De.displayName=fe.displayName;const ke=l.forwardRef(({className:t,...a},n)=>e.jsx(ge,{ref:n,className:j(X({variant:"outline"}),"mt-2 sm:mt-0",t),...a}));ke.displayName=ge.displayName;function ut({isOpen:t,onOpenChange:a,serviceName:n,endDate:o,onConfirm:c,isLoading:g}){const{t:m,lang:f}=W(),D=f==="fr"?ee:Z,b=f==="fr"?"d MMMM yyyy":"MMMM d, yyyy";return e.jsx(pt,{open:t,onOpenChange:a,children:e.jsxs(_e,{children:[e.jsxs(je,{children:[e.jsx(ve,{children:m("cancel_dialog_title")}),e.jsxs(we,{className:"space-y-3",children:[e.jsxs("p",{children:[m("cancel_dialog_desc_prefix")," ",n,m("cancel_dialog_desc_suffix")]}),o&&e.jsxs("p",{className:"text-foreground font-medium",children:[m("cancel_dialog_access_until_prefix")," ",e.jsx("span",{className:"text-primary",children:E(new Date(o),b,{locale:D})})]})]})]}),e.jsxs(Ne,{children:[e.jsx(ke,{disabled:g,children:m("cancel_dialog_back")}),e.jsx(De,{onClick:c,disabled:g,className:"bg-destructive hover:bg-destructive/90",children:m(g?"cancel_dialog_confirming":"cancel_dialog_confirm")})]})]})})}const xt="https://media.base44.com/images/public/69d3bbd071c32e8e2cd61c44/4a75bb4a7_LogoBeacons.png",ft="https://media.base44.com/images/public/69d3bbd071c32e8e2cd61c44/fb9c6ade2_image.png",gt="https://media.base44.com/images/public/69d3bbd071c32e8e2cd61c44/6bb88099f_ShopifyLogo.png",bt="https://upload.wikimedia.org/wikipedia/commons/b/ba/Stripe_Logo%2C_revised_2016.svg",ht="https://chromewebstore.google.com/search/codir";function yt(t){const a=[t("plan_feat_secure_token"),t("plan_feat_persistent")];return[{key:"beacons",name:t("plan_beacons_name"),logos:[xt],description:t("plan_desc_beacons"),prices:{biweekly:16.11,monthly:25.42},oldPrices:{biweekly:17.9,monthly:29.9},extensionUrl:"https://chromewebstore.google.com/detail/codir-bc/dhbageoimfkhbfihgpcfefacahhokgje",features:[t("plan_feat_beacons_edit"),t("plan_feat_extension_chrome"),t("plan_feat_mobile_pc"),t("plan_feat_beacons_add"),t("plan_feat_beacons_any"),...a]},{key:"paypal",name:t("plan_paypal_name"),logos:[ft],description:t("plan_desc_paypal"),prices:{biweekly:17.91,monthly:27.97},oldPrices:{biweekly:19.9,monthly:32.9},extensionUrl:"https://chromewebstore.google.com/detail/codir-pp/lpdngnnibooaddgganflbhjjoedbkfdc",features:[t("plan_feat_paypal_edit"),t("plan_feat_extension_chrome"),t("plan_feat_mobile_pc"),t("plan_feat_paypal_add"),t("plan_feat_paypal_any"),...a]},{key:"shopify",name:t("plan_shopify_name"),logos:[gt],description:t("plan_desc_shopify"),prices:{biweekly:17.91,monthly:27.97},oldPrices:{biweekly:19.9,monthly:32.9},extensionUrl:"https://chromewebstore.google.com/detail/codir-sh/opcnpobebfjhjonnhenmmbndkpgoccgp",features:[t("plan_feat_shopify_edit"),t("plan_feat_extension_chrome"),t("plan_feat_mobile_pc"),t("plan_feat_shopify_add"),t("plan_feat_shopify_any"),...a]},{key:"stripe",name:t("plan_stripe_name"),logos:[bt],description:t("plan_desc_stripe"),prices:{biweekly:17.91,monthly:27.97},oldPrices:{biweekly:19.9,monthly:32.9},extensionUrl:ht,features:[t("plan_feat_stripe_edit"),t("plan_feat_extension_chrome"),t("plan_feat_mobile_pc"),t("plan_feat_stripe_add"),t("plan_feat_stripe_any"),...a]}]}function _t(t){return[{key:"biweekly",label:t("period_biweekly_label"),unit:t("period_biweekly_label")},{key:"monthly",label:t("period_monthly_label"),unit:t("period_monthly_short"),badge:t("pricing_card_popular")}]}function St(){const{t,lang:a}=W(),n=a==="fr"?ee:Z,o=yt(t),c=_t(t),[g,m]=l.useState(null),[f,D]=l.useState("monthly"),[b,R]=l.useState({}),[U,L]=l.useState(null),[T,I]=l.useState({isOpen:!1,serviceKey:null,
12serviceName:null,endDate:null}),[Ae,F]=l.useState(!1),[Se,H]=l.useState(!1),B=async()=>{var r;const i=((r=(await C.functions.invoke("getStripeSubscriptions",{})).data)==null?void 0:r.subscriptions)||{};return R(i),i};l.useEffect(()=>{async function s(){var h,N,u,x,_,M;const i=await C.auth.me();m(i);const d=new URLSearchParams(window.location.search).get("session_id");if(d)try{const p=await C.functions.invoke("confirmStripeCheckout",{sessionId:d});P.success(t("sub_toast_activated"));const S=((h=p==null?void 0:p.data)==null?void 0:h.amount)||((u=(N=p==null?void 0:p.data)==null?void 0:N.subscription)==null?void 0:u.amount),k=((x=p==null?void 0:p.data)==null?void 0:x.serviceKey)||((M=(_=p==null?void 0:p.data)==null?void 0:_.subscription)==null?void 0:M.serviceKey);Y("PURCHASE",{user_email:i==null?void 0:i.email,custom_data:{currency:"EUR",...S?{value:Number(S)}:{},...k?{content_ids:[k]}:{},transaction_id:d}}),window.history.replaceState({},"","/app/subscription")}catch(p){console.error("Payment confirmation error",p)}await B()}s()},[]);const Ce=s=>{var d;const i=o.find(h=>h.key===s),r=(d=b[s])==null?void 0:d.endDate;I({isOpen:!0,serviceKey:s,serviceName:i==null?void 0:i.name,endDate:r})},Pe=async()=>{const{serviceKey:s}=T;F(!0);try{const i=b[s];i!=null&&i.subscriptionId&&await C.functions.invoke("cancelStripeSubscription",{subscriptionId:i.subscriptionId}),await B(),I({isOpen:!1,serviceKey:null,serviceName:null,endDate:null}),P.success(t("sub_toast_cancelled"))}catch(i){console.error(i),P.error(t("sub_toast_cancel_error"))}finally{F(!1)}},Oe=async s=>{var i,r;L(s);try{const h=new URLSearchParams(window.location.search).get("ref")||localStorage.getItem("affiliate_ref")||void 0,N=await C.functions.invoke("createStripeCheckout",{serviceKey:s,billingPeriod:f,source:"subscription_page",...h?{affiliateCode:h}:{}}
12);if((i=N.data)!=null&&i.sessionUrl){const u=o.find(_=>_.key===s),x=(r=u==null?void 0:u.prices)==null?void 0:r[f];Y("START_CHECKOUT",{user_email:g==null?void 0:g.email,custom_data:{currency:"EUR",...x?{value:Number(x)}:{},content_ids:[s]}}),window.location.href=N.data.sessionUrl}else P.error(t("sub_toast_session_error")),L(null)}catch(d){P.error(t("sub_toast_payment_error")),console.error(d),L(null)}};return c.find(s=>s.key===f),e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsxs(w.div,{initial:{opacity:0,y:-10,filter:"blur(8px) brightness(2)"},animate:{opacity:1,y:0,filter:"blur(0px) brightness(1)"},transition:{duration:.6,ease:[.22,1,.36,1]},className:"mb-10 text-center",children:[e.jsx("h1",{className:"font-space font-bold text-3xl md:text-4xl text-white tracking-tight",children:t("sub_page_title")}),e.jsx("p",{className:"text-white/80 mt-2",children:t("sub_page_subtitle")})]}),e.jsxs(w.button,{onClick:()=>H(!0),initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.4,ease:[.22,1,.36,1]},whileHover:{scale:1.01},whileTap:{scale:.99},className:"w-full mb-6 rounded-2xl border border-primary/40 bg-gradient-to-r from-primary/15 via-primary/10 to-accent/15 backdrop-blur-xl p-5 text-left flex items-center justify-between gap-4 hover:border-primary/60 transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx("div",{className:"h-10 w-10 rounded-xl bg-gradient-to-br from-primary to-accent flex items-center justify-center shrink-0 shadow-lg shadow-primary/30",children:e.jsx(Re,{className:"h-5 w-5 text-white"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"font-space font-semibold text-foreground flex items-center gap-2 flex-wrap",children:["Créer un bundle personnalisé",e.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-white bg-gradient-to-r from-primary to-accent px-2 py-0.5 rounded-full",children:"-25%"})]}),e.jsx("p",{className:"text-sm text-muted-foreground truncate",children:"Combine 2 ou 3 extensions et économise jusqu'à 25%."})]})]}),e.jsx("span",{className:"text-sm font-semibold text-primary hidden sm:inline shrink-0",children:"Configurer â"})]}),e.jsxs(w.div,{initial:{opacity:0,y:20,scale:.97},animate:{opacity:1,y:0,scale:1},transition:{duration:.5,ease:[.22,1,.36,1]},className:"mb-10 rounded-2xl border border-primary/30 bg-card/80 backdrop-blur-xl p-6",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4 mb-3",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"inline-flex items-center gap-2 mb-1",children:[e.jsx("span",{className:"px-2 py-0.5 text-[10px] font-bold rounded-full bg-gradient-to-r from-primary to-accent text-white uppercase tracking-wider",children:"Gratuit"}),e.jsx("h3",{className:"font-space font-semibold text-foreground",children:"Utilise CODIR gratuitement"})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Crée un compte et utilise l'extension tout de suite â version bridée, sans payer."})]}),e.jsxs("div",{className:"text-right shrink-0",children:[e.jsx("div",{className:"text-2xl font-bold text-foreground",children:"0â¬"}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"pour toujours"})]})]}),e.jsxs("div",{className:"pt-3 border-t border-border/50 space-y-2",children:[e.jsxs("div",{className:"flex items-start gap-2 text-sm text-muted-foreground",children:[e.jsx(O,{className:"h-4 w-4 text-primary shrink-0 mt-0.5"}),e.jsx("span",{children:"Toutes les fonctions de personnalisation"})]}),e.jsxs("div",{className:"flex items-start gap-2 text-sm text-muted-foreground",children:[e.jsx(O,{className:"h-4 w-4 text-primary shrink-0 mt-0.5"}),e.jsxs("span",{children:["Génération plafonnée à ",e.jsx("strong",{className:"text-foreground",children:"100⬠par extension"})]})]}),e.jsxs("div",{className:"flex items-start gap-2 text-sm text-muted-foreground",children:[e.jsx(O,{className:"h-4 w-4 text-primary shrink-0 mt-0.5"}),e.jsx("span",{children:"Passe en illimité quand tu veux avec un plan ci-dessous"})]})]})]}),e.jsx("div",{className:"mb-12 flex justify-center",children:e.jsx("div",{className:"relative inline-flex gap-1 p-1.5 bg-secondary/50 rounded-xl border border-border/50",children:c.map(s=>{const i=f===s.key;return e.jsxs("div",{className:"relative",children:[e.jsxs("button",{onClick:()=>D(s.key),className:`relative px-6 py-2.5 rounded-lg text-sm font-semibold transition-colors duration-300 ${i?"text-slate-900":"text-muted-foreground hover:text-foreground"}`,children:[i&&e.jsx(w.div,{layoutId:"periodActivePill",className:"absolute inset-0 bg-white rounded-lg shadow-lg",transition:{type:"spring",stiffness:380,damping:32}}),e.jsx("span",{className:"relative z-10",children:s.label})]}),s.badge&&e.jsx(w.span,{initial:{scale:.8,opacity:0,y:-4}
12,animate:{scale:1,opacity:1,y:0},transition:{delay:.15,type:"spring",stiffness:300,damping:20},className:"absolute -top-2.5 -right-2 px-2 py-0.5 text-[10px] font-bold rounded-full whitespace-nowrap shadow-md border border-white/10 bg-gradient-to-r from-primary to-accent text-white",children:s.badge?`â
${s.badge}`:s.badge})]},s.key)})})}),e.jsx("h2",{className:"text-xs font-space font-bold text-white uppercase tracking-[0.25em] mb-4",children:t("sub_section")}),e.jsx("div",{className:"space-y-4",children:o.map((s,i)=>{var z,q,K;const r=b[s.key],d=r==null?void 0:r.isActive,h=r&&r.billingPeriod===f,N=d&&!(r!=null&&r.cancelAtPeriodEnd),u=d&&((r==null?void 0:r.cancelAtPeriodEnd)||(r==null?void 0:r.status)==="canceled"),x=!!(r!=null&&r.isAdminGrant),_=!!(r!=null&&r.isBundle),M=d&&s.prices[r.billingPeriod]!==void 0,p=d?r.billingPeriod:f,S=x?null:M?s.prices[r.billingPeriod]:d?null:s.prices[f],k=c.find(v=>v.key===p),G=d?((z=c.find(v=>v.key===r.billingPeriod))==null?void 0:z.label)||r.billingPeriod:null;return e.jsx(w.div,{initial:{opacity:0,y:30,scale:.95},animate:{opacity:1,y:0,scale:1},transition:{duration:.6,delay:i*.12,ease:[.22,1,.36,1]},whileHover:{scale:1.015,transition:{duration:.3}},children:e.jsx("div",{className:`w-full rounded-2xl border p-6 transition-all duration-200 backdrop-blur-xl ${N?"border-primary/50 bg-card/80":"border-border/50 bg-card/80 hover:border-border/80"}`,children:e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"flex items-center gap-1.5 shrink-0",children:s.logos.map((v,$)=>e.jsx("img",{src:v,alt:"",className:"h-8 w-8 object-contain"},$))}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-start justify-between mb-3",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("h3",{className:"font-space font-semibold text-foreground",children:s.name}),_&&e.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-white bg-gradient-to-r from-primary to-accent px-2 py-0.5 rounded-full",children:"Bundle"})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s.description})]}),e.jsx("div",{className:"text-right",children:x?e.jsx("div",{className:"text-xs font-semibold uppercase tracking-wider text-primary",children:t("sub_admin_free")}):S!==null?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-baseline gap-2 justify-end flex-wrap",children:[e.jsxs("div",{className:"text-2xl font-bold text-foreground",children:[S.toFixed(2),"â¬"]}),!d&&((q=s.oldPrices)==null?void 0:q[p])&&e.jsxs("div",{className:"text-sm text-muted-foreground line-through",children:[s.oldPrices[p].toFixed(2),"â¬"]})]}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:["/",(k==null?void 0:k.unit)||p]}),!d&&((K=s.oldPrices)==null?void 0:K[p])&&e.jsx("div",{className:"mt-1 inline-block text-[10px] font-bold text-white bg-gradient-to-r from-orange-500 to-amber-500 px-2 py-0.5 rounded",children:p==="monthly"?"-15% Rentrée":"-10% Rentrée"})]}):e.jsxs("div",{className:"text-xs font-semibold uppercase tracking-wider text-primary",children:[t("sub_plan_label_prefix")," ",G]})})]}),s.features&&e.jsx("div",{className:"mb-4 pt-3 border-t border-border/50 space-y-2",children:s.features.map((v,$)=>e.jsxs("div",{className:"flex items-start gap-2 text-sm text-muted-foreground",children:[e.jsx(O,{className:"h-4 w-4 text-primary shrink-0 mt-0.5"}),e.jsx("span",{children:v})]},$))}),!d&&e.jsx("button",{onClick:()=>Oe(s.key),disabled:U===s.key,className:"mt-4 w-full py-2.5 bg-primary hover:bg-primary/90 disabled:opacity-50 text-primary-foreground font-medium rounded-lg transition-all flex items-center justify-center gap-2",children:U===s.key?e.jsxs(e.Fragment,{children:[e.jsx(Te,{className:"h-4 w-4 animate-spin"}),t("sub_redirecting")]}):t("sub_start_now")}),d&&!h&&!x&&e.jsxs("div",{className:"mt-4 rounded-lg bg-primary/10 border border-primary/30 px-4 py-2.5 text-xs text-primary/90",children:[t("sub_already_prefix")," ",e.jsx("span",{className:"font-semibold",children:G}),t("sub_already_suffix")]}),d&&(r==null?void 0:r.startDate)&&e.jsxs(w.div,{initial:{opacity:0,height:0}
12,animate:{opacity:1,height:"auto"},transition:{duration:.3},className:"mt-4 pt-4 border-t border-border/50 space-y-3",children:[e.jsxs("div",{className:`flex items-center gap-2 text-sm font-medium ${u?"text-orange-400":"text-green-500"}`,children:[e.jsx(O,{className:"h-4 w-4"}),t(x?"sub_status_admin_free":u?"sub_status_cancelled":"sub_status_active")]}),!x&&e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"bg-secondary/50 rounded-lg px-3 py-2",children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground mb-0.5",children:[e.jsx(Je,{className:"h-3 w-3"}),t("sub_start_date")]}),e.jsx("div",{className:"text-sm font-medium text-foreground",children:E(new Date(r.startDate),"dd MMM yyyy",{locale:n})}),e.jsx("div",{className:"text-xs text-muted-foreground",children:E(new Date(r.startDate),"HH:mm",{locale:n})})]}),r.endDate&&e.jsxs("div",{className:`rounded-lg px-3 py-2 ${u?"bg-orange-500/10":"bg-secondary/50"}`,children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground mb-0.5",children:[e.jsx(We,{className:"h-3 w-3"}),t(u?"sub_access_ends":"sub_next_renewal")]}),e.jsx("div",{className:`text-sm font-medium ${u?"text-orange-400":"text-foreground"}`,children:E(new Date(r.endDate),"dd MMM yyyy",{locale:n})}),e.jsx("div",{className:"text-xs text-muted-foreground",children:E(new Date(r.endDate),"HH:mm",{locale:n})})]})]}),s.extensionUrl&&e.jsxs("a",{href:s.extensionUrl,target:"_blank",rel:"noopener noreferrer",className:"w-full py-2.5 bg-gradient-to-r from-primary to-accent hover:opacity-90 text-white font-semibold rounded-lg transition-all flex items-center justify-center gap-2 shadow-lg shadow-primary/20",children:[e.jsx(Me,{className:"h-4 w-4"}),t("sub_download_ext")]}),!u&&!x&&!_&&e.jsxs("button",{onClick:()=>Ce(s.key),className:"w-full py-2 border border-red-500/50 hover:bg-red-500/10 text-red-500 hover:text-red-600 font-medium rounded-lg transition-all flex items-center justify-center gap-2",children:[e.jsx(Ye,{className:"h-4 w-4"}),t("sub_cancel_button")]}),!u&&!x&&_&&e.jsx("div",{className:"rounded-lg bg-secondary/40 border border-border/50 px-3 py-2 text-xs text-muted-foreground text-center",children:"Extension incluse dans ton bundle. Annule le bundle depuis n'importe quelle extension du pack pour tout arrêter."})]})]})]})})},s.key)})}),e.jsx(Le,{open:Se,onClose:()=>H(!1)}),e.jsx(ut,{isOpen:T.isOpen,onOpenChange:s=>!s&&I({isOpen:!1,serviceKey:null,serviceName:null,endDate:null}),serviceName:T.serviceName,endDate:T.endDate,onConfirm:Pe,isLoading:Ae})]})}export{St 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.