(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4331],{63715:function(e,t,a){"use strict";a.d(t,{Z:function(){return r}});var s=a(65531);/**
 * @license lucide-react v0.446.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let r=(0,s.Z)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},92851:function(e,t,a){"use strict";a.d(t,{Z:function(){return r}});var s=a(65531);/**
 * @license lucide-react v0.446.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let r=(0,s.Z)("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]])},82549:function(e,t,a){"use strict";a.d(t,{Z:function(){return r}});var s=a(65531);/**
 * @license lucide-react v0.446.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let r=(0,s.Z)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},51606:function(e,t,a){Promise.resolve().then(a.bind(a,91510))},91510:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return w}});var s=a(57437),r=a(2265),n=a(9883),i=a(63715),l=a(65531);/**
 * @license lucide-react v0.446.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let o=(0,l.Z)("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);var d=a(53905),c=a(45367),u=a(92851),m=a(93023),f=a(51908),x=a(3112),p=a(66672),h=a(55771),g=a(86110),y=a(12609),j=a(62621);let v={Rice:"Riz",Beans:"Haricots",Seasonings:"Assaisonnements","Haitian Products":"Produits Haitiens",Semolina:"Semoule","Wheat & Oat Meal":"Ble et Avoine","Dry Fish":"Poisson Seche","Corn Meal":"Farine de Mais",Detergent:"Detergent","Maple Syrup":"Sirop d'Erable","Canola Oil":"Huile de Canola","Red Lentils":"Lentilles Rouges","Wild Blueberries":"Bleuets Sauvages","Organic Oats":"Avoine Biologique",Honey:"Miel","Durum Wheat":"Ble Dur","Yellow Peas":"Pois Jaunes","Flaxseed Oil":"Huile de Lin","Atlantic Salmon":"Saumon Atlantique",Cranberries:"Canneberges",Chickpeas:"Pois Chiches"};function N(e){for(let[t,a]of Object.entries(v))if(e.toLowerCase().includes(t.toLowerCase()))return e.replace(RegExp(t,"gi"),a);let t=e.split(" ");return t.map(e=>e.length>3?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()+"e":e).join(" ")}let b={nameEn:"",nameFr:"",descriptionEn:"",descriptionFr:"",slug:"",image:""};function w(){var e;let[t,a]=(0,r.useState)([]),[l,v]=(0,r.useState)(!0),{toast:w}=(0,j.pm)(),[E,C]=(0,r.useState)(!1),[S,k]=(0,r.useState)(!1),[T,F]=(0,r.useState)(null),[D,R]=(0,r.useState)(b),[A,_]=(0,r.useState)(!1),O=async()=>{v(!0);try{let e=await fetch("/api/admin/categories",{cache:"no-store"});if(!e.ok)throw Error("Failed to fetch categories");let t=await e.json();a(t)}catch(e){console.error(e),w({title:"Error",description:"Failed to load categories",variant:"destructive"})}finally{v(!1)}};(0,r.useEffect)(()=>{O()},[]);let[z,I]=(0,r.useState)(!1),[Z,M]=(0,r.useState)(!1),[L,P]=(0,r.useState)(!1),[U,V]=(0,r.useState)(!1),B=(0,r.useCallback)(e=>{if(L||!e.trim())return;I(!0);let t=setTimeout(()=>{let t=N(e);R(e=>({...e,nameFr:t})),I(!1)},500);return()=>clearTimeout(t)},[L]),H=(0,r.useCallback)(e=>{if(U||!e.trim())return;M(!0);let t=setTimeout(()=>{let t=N(e);R(e=>({...e,descriptionFr:t})),M(!1)},500);return()=>clearTimeout(t)},[U]);(0,r.useEffect)(()=>{let e=B(D.nameEn);return e},[D.nameEn,B]),(0,r.useEffect)(()=>{let e=H(D.descriptionEn);return e},[D.descriptionEn,H]);let Y=()=>{F(null),R(b),P(!1),V(!1),C(!0)},q=e=>{F(e),R({nameEn:e.nameEn,nameFr:e.nameFr,descriptionEn:e.descriptionEn||"",descriptionFr:e.descriptionFr||"",slug:e.slug,image:e.image||""}),P(!0),V(!0),C(!0)},W=async e=>{var t;let a=null===(t=e.target.files)||void 0===t?void 0:t[0];if(!a)return;let s=new FormData;s.append("file",a),_(!0);try{let e=await fetch("/api/upload",{method:"POST",body:s});if(!e.ok)throw Error("Upload failed");let t=await e.json();R(e=>({...e,image:t.url})),w({title:"Success",description:"Image uploaded successfully"})}catch(e){console.error(e),w({title:"Error",description:"Failed to upload image",variant:"destructive"})}finally{_(!1)}},$=async()=>{try{if(T){let e=await fetch("/api/admin/categories/".concat(T.id),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(D)});if(!e.ok)throw Error("Failed to update category");w({title:"Success",description:"Category updated successfully"})}else{let e=await fetch("/api/admin/categories",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(D)});if(!e.ok){let t=await e.json();throw Error(t.error||"Failed to create category")}w({title:"Success",description:"Category created successfully"})}C(!1),O()}catch(e){w({title:"Error",description:e.message||"Something went wrong",variant:"destructive"})}},J=async()=>{if(T)try{let e=await fetch("/api/admin/categories/".concat(T.id),{method:"DELETE"});if(!e.ok){let t=await e.json();throw Error(t.error||"Failed to delete category")}w({title:"Success",description:"Category deleted successfully"}),k(!1),O()}catch(e){w({title:"Error",description:e.message,variant:"destructive"})}};return(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("div",{className:"flex items-center gap-4",children:(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Categories"}),(0,s.jsx)("p",{className:"text-muted-foreground",children:"Manage product categories"})]})}),(0,s.jsxs)(m.z,{onClick:Y,children:[(0,s.jsx)(n.Z,{className:"w-4 h-4 mr-2"}),"Add Category"]})]}),(0,s.jsxs)(g.Zb,{children:[(0,s.jsxs)(g.Ol,{children:[(0,s.jsx)(g.ll,{children:"All Categories"}),(0,s.jsxs)(g.SZ,{children:[t.length," categories found"]})]}),(0,s.jsx)(g.aY,{children:l?(0,s.jsxs)("div",{className:"text-center py-4 flex flex-col items-center",children:[(0,s.jsx)(i.Z,{className:"w-8 h-8 animate-spin mb-2 text-primary"}),(0,s.jsx)("p",{children:"Loading categories..."})]}):(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)("table",{className:"w-full",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{className:"border-b border-border",children:[(0,s.jsx)("th",{className:"text-left py-3 px-4 text-sm font-medium text-muted-foreground",children:"Image"}),(0,s.jsx)("th",{className:"text-left py-3 px-4 text-sm font-medium text-muted-foreground",children:"Name (EN)"}),(0,s.jsx)("th",{className:"text-left py-3 px-4 text-sm font-medium text-muted-foreground",children:"Name (FR)"}),(0,s.jsx)("th",{className:"text-left py-3 px-4 text-sm font-medium text-muted-foreground",children:"Slug"}),(0,s.jsx)("th",{className:"text-center py-3 px-4 text-sm font-medium text-muted-foreground",children:"Products"}),(0,s.jsx)("th",{className:"text-right py-3 px-4 text-sm font-medium text-muted-foreground",children:"Actions"})]})}),(0,s.jsxs)("tbody",{children:[t.map(e=>{var t;return(0,s.jsxs)("tr",{className:"border-b border-border last:border-0 hover:bg-muted/30 transition-colors",children:[(0,s.jsx)("td",{className:"py-3 px-4",children:(0,s.jsx)("div",{className:"w-12 h-12 bg-muted rounded-md overflow-hidden flex items-center justify-center border border-border",children:e.image?(0,s.jsx)("img",{src:e.image,alt:e.nameEn,className:"w-full h-full object-cover"}):(0,s.jsx)(o,{className:"w-6 h-6 text-muted-foreground"})})}),(0,s.jsx)("td",{className:"py-3 px-4 font-medium",children:e.nameEn}),(0,s.jsx)("td",{className:"py-3 px-4 text-muted-foreground",children:e.nameFr}),(0,s.jsx)("td",{className:"py-3 px-4 font-mono text-xs",children:e.slug}),(0,s.jsx)("td",{className:"py-3 px-4 text-center",children:(0,s.jsx)("span",{className:"inline-flex items-center justify-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-primary/10 text-primary",children:(null===(t=e._count)||void 0===t?void 0:t.products)||0})}),(0,s.jsx)("td",{className:"py-3 px-4",children:(0,s.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,s.jsx)(m.z,{variant:"ghost",size:"icon",onClick:()=>q(e),children:(0,s.jsx)(d.Z,{className:"w-4 h-4"})}),(0,s.jsx)(m.z,{variant:"ghost",size:"icon",className:"text-destructive hover:text-destructive",onClick:()=>{F(e),k(!0)},children:(0,s.jsx)(c.Z,{className:"w-4 h-4"})})]})})]},e.id)}),0===t.length&&(0,s.jsx)("tr",{children:(0,s.jsx)("td",{colSpan:6,className:"text-center py-12 text-muted-foreground",children:(0,s.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,s.jsx)(o,{className:"w-8 h-8 opacity-50"}),(0,s.jsx)("p",{children:"No categories found."}),(0,s.jsx)(m.z,{variant:"outline",size:"sm",onClick:Y,children:"Create your first category"})]})})})]})]})})})]}),(0,s.jsx)(y.Vq,{open:E,onOpenChange:C,children:(0,s.jsxs)(y.cZ,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[(0,s.jsxs)(y.fK,{children:[(0,s.jsx)(y.$N,{children:T?"Edit Category":"Add New Category"}),(0,s.jsx)(y.Be,{children:"Manage category details and translations."})]}),(0,s.jsxs)("div",{className:"space-y-6 py-4",children:[(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(p._,{htmlFor:"nameEn",children:"Name (English) *"}),(0,s.jsx)(f.I,{id:"nameEn",value:D.nameEn,onChange:e=>R({...D,nameEn:e.target.value}),onBlur:()=>{if(D.nameEn&&!D.slug){let e=D.nameEn.toLowerCase().replace(/[^a-z0-9]+/g,"_");R(t=>({...t,slug:e}))}},placeholder:"e.g. Rice"})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)(p._,{htmlFor:"nameFr",className:"flex items-center gap-2",children:["Name (French)",z&&(0,s.jsxs)("span",{className:"flex items-center gap-1 text-xs text-primary",children:[(0,s.jsx)(i.Z,{className:"w-3 h-3 animate-spin"}),"Translating..."]}),!z&&!L&&D.nameFr&&(0,s.jsxs)("span",{className:"flex items-center gap-1 text-xs text-secondary",children:[(0,s.jsx)(u.Z,{className:"w-3 h-3"}),"Auto-translated"]})]}),(0,s.jsx)(f.I,{id:"nameFr",value:D.nameFr,onChange:e=>{P(!0),R({...D,nameFr:e.target.value})},placeholder:"e.g. Riz"})]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(p._,{htmlFor:"descriptionEn",children:"Description (English)"}),(0,s.jsx)(h.g,{id:"descriptionEn",value:D.descriptionEn,onChange:e=>R({...D,descriptionEn:e.target.value}),rows:3,placeholder:"Short description for homepage"})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)(p._,{htmlFor:"descriptionFr",className:"flex items-center gap-2",children:["Description (French)",Z&&(0,s.jsxs)("span",{className:"flex items-center gap-1 text-xs text-primary",children:[(0,s.jsx)(i.Z,{className:"w-3 h-3 animate-spin"}),"Translating..."]})]}),(0,s.jsx)(h.g,{id:"descriptionFr",value:D.descriptionFr,onChange:e=>{V(!0),R({...D,descriptionFr:e.target.value})},rows:3,placeholder:"Description courte pour la page d'accueil"})]})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(p._,{htmlFor:"slug",children:"Slug (Unique ID) *"}),(0,s.jsx)(f.I,{id:"slug",value:D.slug,onChange:e=>R({...D,slug:e.target.value}),placeholder:"e.g. rice"})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(p._,{children:"Featured Image"}),(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[D.image&&(0,s.jsxs)("div",{className:"relative w-full h-32 bg-muted rounded-md overflow-hidden border border-border",children:[(0,s.jsx)("img",{src:D.image,alt:"Preview",className:"w-full h-full object-cover"}),(0,s.jsx)("button",{onClick:()=>R(e=>({...e,image:""})),className:"absolute top-1 right-1 bg-black/50 text-white rounded-full p-1 hover:bg-black/70",children:(0,s.jsx)(c.Z,{className:"w-3 h-3"})})]}),(0,s.jsxs)("div",{className:"grid w-full max-w-sm items-center gap-1.5",children:[(0,s.jsx)(p._,{htmlFor:"picture",className:"text-xs",children:"Upload Image"}),(0,s.jsx)(f.I,{id:"picture",type:"file",onChange:W,disabled:A}),A&&(0,s.jsx)("p",{className:"text-xs text-muted-foreground animate-pulse",children:"Uploading..."})]}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("div",{className:"absolute inset-0 flex items-center",children:(0,s.jsx)("span",{className:"w-full border-t"})}),(0,s.jsx)("div",{className:"relative flex justify-center text-xs uppercase",children:(0,s.jsx)("span",{className:"bg-background px-2 text-muted-foreground",children:"Or use URL"})})]}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)(p._,{htmlFor:"imageUrl",className:"text-xs",children:"Image URL"}),(0,s.jsx)(f.I,{id:"imageUrl",value:D.image,onChange:e=>R({...D,image:e.target.value}),placeholder:"https://..."})]})]})]})]}),(0,s.jsxs)("div",{className:"flex justify-end gap-3",children:[(0,s.jsx)(m.z,{variant:"outline",onClick:()=>C(!1),children:"Cancel"}),(0,s.jsxs)(m.z,{onClick:$,disabled:A||!D.nameEn||!D.slug,children:[l||A?(0,s.jsx)(i.Z,{className:"w-4 h-4 animate-spin mr-2"}):null,T?"Save Changes":"Create Category"]})]})]})}),(0,s.jsx)(x.f,{isOpen:S,onClose:()=>k(!1),onConfirm:J,itemName:null==T?void 0:T.nameEn,description:'This will permanently delete the category "'.concat(null==T?void 0:T.nameEn,'".').concat((null==T?void 0:null===(e=T._count)||void 0===e?void 0:e.products)?"\n\nWARNING: This category has ".concat(T._count.products," associated products. You cannot delete a category with products. Please reassign or delete the products first."):"")})]})}},3112:function(e,t,a){"use strict";a.d(t,{f:function(){return b}});var s=a(57437),r=a(2265),n=a(4631),i=a(63715),l=a(22261),o=a(39311),d=a(93023);let c=l.fC;l.xz;let u=l.h_,m=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(l.aV,{className:(0,o.cn)("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",a),...r,ref:t})});m.displayName=l.aV.displayName;let f=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsxs)(u,{children:[(0,s.jsx)(m,{}),(0,s.jsx)(l.VY,{ref:t,className:(0,o.cn)("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:rounded-lg",a),...r})]})});f.displayName=l.VY.displayName;let x=e=>{let{className:t,...a}=e;return(0,s.jsx)("div",{className:(0,o.cn)("flex flex-col space-y-2 text-center sm:text-left",t),...a})};x.displayName="AlertDialogHeader";let p=e=>{let{className:t,...a}=e;return(0,s.jsx)("div",{className:(0,o.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...a})};p.displayName="AlertDialogFooter";let h=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(l.Dx,{ref:t,className:(0,o.cn)("text-lg font-semibold",a),...r})});h.displayName=l.Dx.displayName;let g=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(l.dk,{ref:t,className:(0,o.cn)("text-sm text-muted-foreground",a),...r})});g.displayName=l.dk.displayName;let y=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(l.aU,{ref:t,className:(0,o.cn)((0,d.d)(),a),...r})});y.displayName=l.aU.displayName;let j=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(l.$j,{ref:t,className:(0,o.cn)((0,d.d)({variant:"outline"}),"mt-2 sm:mt-0",a),...r})});j.displayName=l.$j.displayName;var v=a(51908),N=a(66672);function b(e){let{isOpen:t,onClose:a,onConfirm:l,title:o="Are you sure?",description:u="This action cannot be undone. This will permanently delete the item.",itemName:m,loading:y=!1}=e,[b,w]=(0,r.useState)(""),[E,C]=(0,r.useState)(!1);(0,r.useEffect)(()=>{t&&(w(""),C(!1))},[t]);let S=async()=>{if("DELETE"===b){C(!0);try{await l()}catch(e){console.error(e)}finally{C(!1)}}};return(0,s.jsx)(c,{open:t,onOpenChange:e=>!e&&!E&&a(),children:(0,s.jsxs)(f,{children:[(0,s.jsxs)(x,{children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-destructive",children:[(0,s.jsx)(n.Z,{className:"h-5 w-5"}),(0,s.jsx)(h,{children:o})]}),(0,s.jsxs)(g,{children:[u,m&&(0,s.jsxs)("span",{className:"block mt-2 font-medium text-foreground",children:['You are about to delete: "',m,'"']})]})]}),(0,s.jsxs)("div",{className:"py-4 space-y-3",children:[(0,s.jsxs)(N._,{htmlFor:"confirm-delete",children:["Type ",(0,s.jsx)("span",{className:"font-bold text-destructive",children:"DELETE"})," to confirm"]}),(0,s.jsx)(v.I,{id:"confirm-delete",value:b,onChange:e=>w(e.target.value),placeholder:"DELETE",className:"font-mono",autoComplete:"off"})]}),(0,s.jsxs)(p,{children:[(0,s.jsx)(j,{disabled:E,onClick:a,children:"Cancel"}),(0,s.jsx)(d.z,{variant:"destructive",disabled:"DELETE"!==b||E||y,onClick:S,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:E||y?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.Z,{className:"mr-2 h-4 w-4 animate-spin"}),"Deleting..."]}):"Delete"})]})]})})}},93023:function(e,t,a){"use strict";a.d(t,{d:function(){return o},z:function(){return d}});var s=a(57437),r=a(2265),n=a(83474),i=a(96061),l=a(39311);let o=(0,i.j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium 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",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),d=r.forwardRef((e,t)=>{let{className:a,variant:r,size:i,asChild:d=!1,...c}=e,u=d?n.g7:"button";return(0,s.jsx)(u,{className:(0,l.cn)(o({variant:r,size:i,className:a})),ref:t,...c})});d.displayName="Button"},86110:function(e,t,a){"use strict";a.d(t,{Ol:function(){return l},SZ:function(){return d},Zb:function(){return i},aY:function(){return c},ll:function(){return o}});var s=a(57437),r=a(2265),n=a(39311);let i=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)("div",{ref:t,className:(0,n.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",a),...r})});i.displayName="Card";let l=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)("div",{ref:t,className:(0,n.cn)("flex flex-col space-y-1.5 p-6",a),...r})});l.displayName="CardHeader";let o=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)("h3",{ref:t,className:(0,n.cn)("text-2xl font-semibold leading-none tracking-tight",a),...r})});o.displayName="CardTitle";let d=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)("p",{ref:t,className:(0,n.cn)("text-sm text-muted-foreground",a),...r})});d.displayName="CardDescription";let c=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)("div",{ref:t,className:(0,n.cn)("p-6 pt-0",a),...r})});c.displayName="CardContent";let u=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)("div",{ref:t,className:(0,n.cn)("flex items-center p-6 pt-0",a),...r})});u.displayName="CardFooter"},12609:function(e,t,a){"use strict";a.d(t,{$N:function(){return x},Be:function(){return p},Vq:function(){return o},cZ:function(){return m},fK:function(){return f},hg:function(){return d}});var s=a(57437),r=a(2265),n=a(79515),i=a(82549),l=a(39311);let o=n.fC,d=n.xz,c=n.h_;n.x8;let u=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(n.aV,{ref:t,className:(0,l.cn)("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",a),...r})});u.displayName=n.aV.displayName;let m=r.forwardRef((e,t)=>{let{className:a,children:r,...o}=e;return(0,s.jsxs)(c,{children:[(0,s.jsx)(u,{}),(0,s.jsxs)(n.VY,{ref:t,className:(0,l.cn)("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:rounded-lg",a),...o,children:[r,(0,s.jsxs)(n.x8,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,s.jsx)(i.Z,{className:"h-4 w-4"}),(0,s.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});m.displayName=n.VY.displayName;let f=e=>{let{className:t,...a}=e;return(0,s.jsx)("div",{className:(0,l.cn)("flex flex-col space-y-1.5 text-center sm:text-left",t),...a})};f.displayName="DialogHeader";let x=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(n.Dx,{ref:t,className:(0,l.cn)("text-lg font-semibold leading-none tracking-tight",a),...r})});x.displayName=n.Dx.displayName;let p=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(n.dk,{ref:t,className:(0,l.cn)("text-sm text-muted-foreground",a),...r})});p.displayName=n.dk.displayName},51908:function(e,t,a){"use strict";a.d(t,{I:function(){return i}});var s=a(57437),r=a(2265),n=a(39311);let i=r.forwardRef((e,t)=>{let{className:a,type:r,...i}=e;return(0,s.jsx)("input",{type:r,className:(0,n.cn)("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",a),ref:t,...i})});i.displayName="Input"},66672:function(e,t,a){"use strict";a.d(t,{_:function(){return d}});var s=a(57437),r=a(2265),n=a(36743),i=a(96061),l=a(39311);let o=(0,i.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),d=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(n.f,{ref:t,className:(0,l.cn)(o(),a),...r})});d.displayName=n.f.displayName},55771:function(e,t,a){"use strict";a.d(t,{g:function(){return i}});var s=a(57437),r=a(2265),n=a(39311);let i=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)("textarea",{className:(0,n.cn)("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",a),ref:t,...r})});i.displayName="Textarea"},62621:function(e,t,a){"use strict";a.d(t,{pm:function(){return m}});var s=a(2265);let r=0,n=new Map,i=e=>{if(n.has(e))return;let t=setTimeout(()=>{n.delete(e),c({type:"REMOVE_TOAST",toastId:e})},1e6);n.set(e,t)},l=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case"DISMISS_TOAST":{let{toastId:a}=t;return a?i(a):e.toasts.forEach(e=>{i(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===a||void 0===a?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===t.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},o=[],d={toasts:[]};function c(e){d=l(d,e),o.forEach(e=>{e(d)})}function u(e){let{...t}=e,a=(r=(r+1)%Number.MAX_SAFE_INTEGER).toString(),s=()=>c({type:"DISMISS_TOAST",toastId:a});return c({type:"ADD_TOAST",toast:{...t,id:a,open:!0,onOpenChange:e=>{e||s()}}}),{id:a,dismiss:s,update:e=>c({type:"UPDATE_TOAST",toast:{...e,id:a}})}}function m(){let[e,t]=s.useState(d);return s.useEffect(()=>(o.push(t),()=>{let e=o.indexOf(t);e>-1&&o.splice(e,1)}),[e]),{...e,toast:u,dismiss:e=>c({type:"DISMISS_TOAST",toastId:e})}}},39311:function(e,t,a){"use strict";a.d(t,{cn:function(){return n}});var s=a(57042),r=a(74769);function n(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return(0,r.m6)((0,s.W)(t))}},36743:function(e,t,a){"use strict";a.d(t,{f:function(){return l}});var s=a(2265),r=a(31033),n=a(57437),i=s.forwardRef((e,t)=>(0,n.jsx)(r.WV.label,{...e,ref:t,onMouseDown:t=>{let a=t.target;a.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));i.displayName="Label";var l=i}},function(e){e.O(0,[6207,415,1798,2971,7864,1744],function(){return e(e.s=51606)}),_N_E=e.O()}]);