PageSourceSearch

https://app.fullmetrix.com/_next/static/chunks/4061za1hvx4ed.js

js fullmetrix.com collected 2026-10-02 06:02:52 UTC 52,756 bytes, 4 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="4f1e45a1-d49b-9812-8736-6ff83b9905df")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,421962,e=>{"use strict";let t=(0,e.i(33550).default)("outline","brand-google","BrandGoogle",[["path",{d:"M20.945 11a9 9 0 1 1 -3.284 -5.997l-2.655 2.392a5.5 5.5 0 1 0 2.119 6.605h-4.125v-3h7.945",key:"svg-0"}]]);e.s(["default",0,t])},632449,e=>{"use strict";var t=e.i(421962);e.s(["IconBrandGoogle",()=>t.default])},878061,e=>{"use strict";let t=(0,e.i(33550).default)("outline","lock","Lock",[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-4a4 4 0 1 1 8 0v4",key:"svg-2"}]]);e.s(["default",0,t])},59895,e=>{"use strict";var t=e.i(878061);e.s(["IconLock",()=>t.default])},754171,e=>{"use strict";let t=(0,e.i(33550).default)("outline","user","User",[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}]]);e.s(["default",0,t])},139900,e=>{"use strict";var t=e.i(754171);e.s(["IconUser",()=>t.default])},265132,e=>{"use strict";var t=e.i(843476),s=e.i(139900),a=e.i(975157),r=e.i(233684);function i(e){return(0,r.meshGradient)(e)}function n(e){return(0,r.meshInitials)(e)}e.s(["CustomerAvatar",0,function({name:e,seed:r,className:l}){let o=r??e??"";return(0,t.jsx)("span",{"aria-hidden":!0,style:{backgroundImage:i(o)},className:(0,a.cn)("flex size-9 shrink-0 items-center justify-center rounded-full text-xs font-semibold text-white! shadow-sm",l),children:e?n(e):(0,t.jsx)(s.IconUser,{className:"size-[48%]",stroke:2})})},"avatarGradient",0,i,"getInitials",0,n])},868499,e=>{"use strict";var t=e.i(843476);e.s([],712248),e.i(712248);var s=e.i(271645),a=e.i(25547),r=e.i(932156),i=e.i(13104),n=e.i(402346),l=e.i(659141),o=e.i(343444),d=e.i(39362),c=e.i(796918),u=e.i(538449),m=e.i(749899),g=e.i(790951),x=e.i(455057),f=e.i(107840);e.s(["Backdrop",()=>l.DialogBackdrop,"Close",()=>o.DialogClose,"Description",()=>d.DialogDescription,"Handle",()=>f.DialogHandle,"Popup",()=>c.DialogPopup,"Portal",()=>u.DialogPortal,"Root",0,function(e){let{children:l,open:o,defaultOpen:d=!1,onOpenChange:c,onOpenChangeComplete:u,actionsRef:m,handle:g,triggerId:x,defaultTriggerId:f=null}=e,h=(0,i.useDialogRootContext)(!0),p=!!h,j=n.DialogStore.useStore(g?.store,{open:d,openProp:o,activeTriggerId:f,triggerIdProp:x,modal:!0,disablePointerDismissal:!0,nested:p,role:"alertdialog"});j.useControlledProp("openProp",o),j.useControlledProp("triggerIdProp",x),j.useSyncedValue("nested",p),j.useContextCallback("onOpenChange",c),j.useContextCallback("onOpenChangeComplete",u);let v=j.useState("payload");(0,r.useDialogRoot)({store:j,actionsRef:m,parentContext:h?.store.context,isDrawer:!1,onOpenChange:c,triggerIdProp:x});let w=s.useMemo(()=>({store:j}),[j]);return(0,t.jsx)(a.IsDrawerContext.Provider,{value:!1,children:(0,t.jsx)(i.DialogRootContext.Provider,{value:w,children:"function"==typeof l?l({payload:v}):l})})},"Title",()=>m.DialogTitle,"Trigger",()=>g.DialogTrigger,"Viewport",()=>x.DialogViewport,"createHandle",0,function(){return new f.DialogHandle(new n.DialogStore({modal:!0,disablePointerDismissal:!0,role:"alertdialog"}))}],102756);var h=e.i(102756),h=h,p=e.i(975157),j=e.i(519455);function v({...e}){return(0,t.jsx)(h.Portal,{"data-slot":"alert-dialog-portal",...e})}function w({className:e,...s}){return(0,t.jsx)(h.Backdrop,{"data-slot":"alert-dialog-overlay",className:(0,p.cn)("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/50 fixed inset-0 isolate z-50",e),...s})}e.s(["AlertDialog",0,function({...e}){return(0,t.jsx)(h.Root,{"data-slot":"alert-dialog",...e})},"AlertDialogAction",0,function({className:e,...s}){return(0,t.jsx)(j.Button,{"data-slot":"alert-dialog-action",className:(0,p.cn)(e),...s})},"AlertDialogCancel",0,function({className:e,variant:s="outline",size:a="default",...r}){return(0,t.jsx)(h.Close,{"data-slot":"alert-dialog-cancel",className:(0,p.cn)(e),render:(0,t.jsx)(j.Button,{variant:s,size:a}),...r})},"AlertDialogContent",0,function({className:e,size:s="default",...a}){return(0,t.jsxs)(v,{children:[(0,t.jsx)(w,{}),(0,t.jsx)(h.Popup,{"data-slot":"alert-dialog-content","data-size":s,className:(0,p.cn)("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 bg-background ring-foreground
2/10 gap-3 rounded-xl p-4 ring-1 duration-100 data-[size=default]:max-w-xs data-[size=sm]:max-w-64 data-[size=default]:sm:max-w-sm group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid grid-cols-[minmax(0,1fr)] w-full -translate-x-1/2 -translate-y-1/2 outline-none",e),...a})]})},"AlertDialogDescription",0,function({className:e,...s}){return(0,t.jsx)(h.Description,{"data-slot":"alert-dialog-description",className:(0,p.cn)("text-muted-foreground *:[a]:hover:text-foreground text-sm text-balance md:text-pretty *:[a]:underline *:[a]:underline-offset-3",e),...s})},"AlertDialogFooter",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,p.cn)("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...s})},"AlertDialogHeader",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,p.cn)("grid grid-rows-[auto_1fr] place-items-center gap-1 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...s})},"AlertDialogMedia",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-media",className:(0,p.cn)("bg-muted mb-2 inline-flex size-8 items-center justify-center rounded-md sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-4",e),...s})},"AlertDialogTitle",0,function({className:e,...s}){return(0,t.jsx)(h.Title,{"data-slot":"alert-dialog-title",className:(0,p.cn)("text-sm font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...s})},"AlertDialogTrigger",0,function({...e}){return(0,t.jsx)(h.Trigger,{"data-slot":"alert-dialog-trigger",...e})}],868499)},799676,e=>{"use strict";var t=e.i(843476);e.s([],722697),e.i(722697);var s=e.i(271645),a=e.i(269095),r=e.i(367805);let i=s.createContext(void 0);function n(){let e=s.useContext(i);if(void 0===e)throw Error((0,r.default)(13));return e}let l={imageLoadingStatus:()=>null},o=s.forwardRef(function(e,r){let{className:n,render:o,style:d,...c}=e,[u,m]=s.useState("idle"),g=s.useMemo(()=>({imageLoadingStatus:u,setImageLoadingStatus:m}),[u,m]),x=(0,a.useRenderElement)("span",e,{state:{imageLoadingStatus:u},ref:r,props:c,stateAttributesMapping:l});return(0,t.jsx)(i.Provider,{value:g,children:x})});var d=e.i(676477),c=e.i(500977),u=e.i(223715),m=e.i(814060),g=e.i(361463),x=e.i(417514);let f={...l,...m.transitionStatusMapping},h=s.forwardRef(function(e,t){let{className:r,render:i,onLoadingStatusChange:l,referrerPolicy:o,crossOrigin:m,style:h,...p}=e,j=n(),v=function(e,{referrerPolicy:t,crossOrigin:a}){let[r,i]=s.useState("idle");return(0,c.useIsoLayoutEffect)(()=>{if(!e)return i("error"),x.NOOP;let s=!0,r=new window.Image,n=e=>()=>{s&&i(e)};return i("loading"),r.onload=n("loaded"),r.onerror=n("error"),t&&(r.referrerPolicy=t),r.crossOrigin=a??null,r.src=e,r.complete&&i(r.naturalWidth>0?"loaded":"error"),()=>{s=!1}},[e,a,t]),r}(e.src,{referrerPolicy:o,crossOrigin:m}),w="loaded"===v,{mounted:N,transitionStatus:b,setMounted:y}=(0,g.useTransitionStatus)(w),C=s.useRef(null),D=(0,d.useStableCallback)(e=>{l?.(e),j.setImageLoadingStatus(e)});(0,c.useIsoLayoutEffect)(()=>{"idle"!==v&&D(v)},[v,D]),(0,u.useOpenChangeComplete)({open:w,ref:C,onComplete(){w||y(!1)}});let S=(0,a.useRenderElement)("img",e,{state:{imageLoadingStatus:v,transitionStatus:b},ref:[t,C],props:p,stateAttributesMapping:f,enabled:N});return N?S:null});var p=e.i(566745);let j=s.forwardRef(function(e,t){let{className:r,render:i,delay:o,style:d,...c}=e,{imageLoadingStatus:u}=n(),[m,g]=s.useState(void 0===o),x=(0,p.useTimeout)();return s.useEffect(()=>(void 0!==o&&x.start(o,()=>g(!0)),x.clear),[x,o]),(0,a.useRenderElement)("span",e,{state:{imageLoadingStatus:u},ref:t,props:c,stateAttributesMapping:l,enabled:"loaded"!==u&&m})});e.s(["Fallback",0,j,"Image",0,h,"Root",0,o],407887);var v=e.i(407887),v=v,w=e.i(975157);e.s(["Avatar",0,function({className:e,size:s="default",...a}){return(0,t.jsx)(v.Root,{"data-slot":"avatar","data-size":s,className:(0,w.cn)("group/avatar relative flex size-8 shrink-0 overflow-hidden rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6",e),...a})},"AvatarFallback",0,function({className:e,...s}){return(0,t.jsx)(v.Fallback,{"data-slot":"avatar-fallback",className:(0,w.cn)("bg-muted text-muted-foreground rounded-full flex size-full items-center justify-center text-sm group-data-[size=sm]/avatar:text-xs",e),...s})},"AvatarImage",0,function({className:e,...s}){return(0,t.jsx)(v.Image,{"data-slot":"avatar-image",className:(0,w.cn)("aspect-square size-full",e),...s})}],799676)},487486,e=>{"use strict";var t=e.i(119805),s=e.i(45281),a=e.i(225913),r=e.i(975157);let i=(0,a.cva)("inline-flex items-center justify-center rounded-full border border-transparent px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-foreground underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:a="default",render:n,...l}){return(0,s.useRender)({defaultTagName:"span",props:(0,t.mergeProps)({className:(0,r.cn)(i({className:e,variant:a}))},l),render:n,state:{slot:"badge",variant:a}})}])},515288,e=>{"use strict";var t=e.i(843476),s=e.i(975157);e.s(["Card",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card",className:(0,s.cn)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...a})},"CardAction",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-action",className:(0,s.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...a})},"CardContent",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,s.cn)("px-6",e),...a})},"CardDescription",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,s.cn)("text-muted-foreground text-sm",e),...a})},"CardFooter",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-footer",className:(0,s.cn)("flex items-center px-6 [.border-t]:pt-6",e),...a})},"CardHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,s.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...a})},"CardTitle",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,s.cn)("leading-none font-semibold",e),...a})}])},776639,e=>{"use strict";var t=e.i(843476),s=e.i(972920),a=e.i(948148),r=e.i(975157),i=e.i(519455),n=e.i(995926);function l({...e}){return(0,t.jsx)(s.Dialog.Portal,{"data-slot":"dialog-portal",...e})}function o({className:e,...a}){return(0,t.jsx)(s.Dialog.Backdrop,{"data-slot":"dialog-overlay",className:(0,r.cn)("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/80 duration-100 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 isolate z-50",e),...a})}e.s(["Dialog",0,function({...e}){return(0,t.jsx)(s.Dialog.Root,{"data-slot":"dialog",...e})},"DialogClose",0,function({...e}){return(0,t.jsx)(s.Dialog.Close,{"data-slot":"dialog-close",...e})},"DialogContent",0,function({className:e,children:d,showCloseButton:c=!0,...u}){let m=(0,a.useTranslations)("common");return(0,t.jsxs)(l,{children:[(0,t.jsx)(o,{forceRender:!0}),(0,t.jsxs)(s.Dialog.Popup,{"data-slot":"dialog-content",className:(0,r.cn)("bg-background data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 ring-foreground
2/10 grid grid-cols-[minmax(0,1fr)] max-w-[calc(100%-2rem)] gap-4 rounded-xl p-4 text-xs/relaxed ring-1 duration-100 sm:max-w-sm fixed top-1/2 left-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2 outline-none",e),...u,children:[d,c&&(0,t.jsxs)(s.Dialog.Close,{"data-slot":"dialog-close",render:(0,t.jsx)(i.Button,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm"}),children:[(0,t.jsx)(n.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:m("close")})]})]})]})},"DialogDescription",0,function({className:e,...a}){return(0,t.jsx)(s.Dialog.Description,{"data-slot":"dialog-description",className:(0,r.cn)("text-muted-foreground *:[a]:hover:text-foreground text-xs/relaxed *:[a]:underline *:[a]:underline-offset-3",e),...a})},"DialogFooter",0,function({className:e,showCloseButton:n=!1,children:l,...o}){let d=(0,a.useTranslations)("common");return(0,t.jsxs)("div",{"data-slot":"dialog-footer",className:(0,r.cn)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...o,children:[l,n&&(0,t.jsx)(s.Dialog.Close,{render:(0,t.jsx)(i.Button,{variant:"outline"}),children:d("close")})]})},"DialogHeader",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"dialog-header",className:(0,r.cn)("gap-1 flex flex-col",e),...s})},"DialogTitle",0,function({className:e,...a}){return(0,t.jsx)(s.Dialog.Title,{"data-slot":"dialog-title",className:(0,r.cn)("text-sm font-medium",e),...a})},"DialogTrigger",0,function({...e}){return(0,t.jsx)(s.Dialog.Trigger,{"data-slot":"dialog-trigger",...e})}])},110204,e=>{"use strict";var t=e.i(843476),s=e.i(975157);e.s(["Label",0,function({className:e,...a}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,s.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...a})}])},772436,e=>{"use strict";var t=e.i(843476),s=e.i(740582),a=e.i(975157);e.s(["Separator",0,function({className:e,orientation:r="horizontal",...i}){return(0,t.jsx)(s.Separator,{"data-slot":"separator",orientation:r,className:(0,a.cn)("bg-border shrink-0 data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",e),...i})}])},302747,e=>{"use strict";var t=e.i(843476),s=e.i(975157);e.s(["Skeleton",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"skeleton",className:(0,s.cn)("bg-accent animate-pulse rounded-md",e),...a})}])},227436,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(948148),r=e.i(954616),i=e.i(912598),n=e.i(846696),l=e.i(519455),o=e.i(793479),d=e.i(110204),c=e.i(776639),u=e.i(578938);e.s(["ChangePasswordDialog",0,function({open:e,onOpenChange:m,hasPassword:g}){let x=(0,a.useTranslations)("auth.changePassword"),f=(0,i.useQueryClient)(),[h,p]=(0,s.use
2State)(""),[j,v]=(0,s.useState)(""),[w,N]=(0,s.useState)(""),[b,y]=(0,s.useState)(""),C=(0,r.useMutation)({mutationFn:async()=>{if(g){let{error:e}=await u.authClient.changePassword({currentPassword:h,newPassword:j,revokeOtherSessions:!1});if(e)throw e}else{let e=await u.authClient.$fetch("/set-password",{method:"POST",body:{newPassword:j}});if(e.error)throw e.error}},onSuccess:()=>{f.invalidateQueries({queryKey:["auth-providers"]}),n.toast.success(g?x("changeSuccess"):x("setSuccess")),D(),m(!1)},onError:()=>{y(g?x("changeError"):x("setError"))}});function D(){p(""),v(""),N(""),y("")}return(0,t.jsx)(c.Dialog,{open:e,onOpenChange:e=>{e||D(),m(e)},children:(0,t.jsxs)(c.DialogContent,{children:[(0,t.jsxs)(c.DialogHeader,{children:[(0,t.jsx)(c.DialogTitle,{children:g?x("changeTitle"):x("setTitle")}),(0,t.jsx)(c.DialogDescription,{children:g?x("changeDesc"):x("setDesc")})]}),(0,t.jsxs)("form",{onSubmit:function(e){(e.preventDefault(),y(""),j.length<8)?y(x("minLength")):j!==w?y(x("mismatch")):C.mutate()},className:"flex flex-col gap-4",children:[g&&(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(d.Label,{htmlFor:"current-password",children:x("currentPassword")}),(0,t.jsx)(o.Input,{id:"current-password",type:"password",placeholder:"••••••••",value:h,onChange:e=>p(e.target.value),autoFocus:!0})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(d.Label,{htmlFor:"new-password",children:x("newPassword")}),(0,t.jsx)(o.Input,{id:"new-password",type:"password",placeholder:"••••••••",value:j,onChange:e=>v(e.target.value),autoFocus:!g})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(d.Label,{htmlFor:"confirm-password",children:x("confirmPassword")}),(0,t.jsx)(o.Input,{id:"confirm-password",type:"password",placeholder:"••••••••",value:w,onChange:e=>N(e.target.value)})]}),b&&(0,t.jsx)("p",{className:"text-destructive text-xs",children:b}),(0,t.jsx)(l.Button,{type:"submit",disabled:C.isPending,className:"w-full cursor-pointer",children:C.isPending?x("saving"):g?x("changeSubmit"):x("setSubmit")})]})]})})}])},169725,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(948148),r=e.i(846696),i=e.i(519455),n=e.i(515288),l=e.i(578938);e.s(["CheckEmailMessage",0,function({email:e,callbackURL:o="/"}){let d=(0,a.useTranslations)("auth.checkEmail"),[c,u]=(0,s.useState)(0),[m,g]=(0,s.useState)(!1);async function x(){g(!0);try{let{error:t}=await l.authClient.sendVerificationEmail({email:e,callbackURL:o});if(t)throw t;r.toast.success(d("resendSuccess")),u(60)}catch{r.toast.error(d("resendError"))}finally{g(!1)}}return(0,s.useEffect)(()=>{if(c<=0)return;let e=setTimeout(()=>u(e=>e-1),1e3);return()=>clearTimeout(e)},[c]),(0,t.jsxs)(n.Card,{className:"w-full max-w-md",children:[(0,t.jsxs)(n.CardHeader,{children:[(0,t.jsx)(n.CardTitle,{children:d("heading")}),(0,t.jsxs)(n.CardDescription,{children:[d("description")," ",(0,t.jsx)("strong",{children:e})]})]}),(0,t.jsxs)(n.CardContent,{className:"flex flex-col gap-3",children:[(0,t.jsx)("p",{className:"text-muted-foreground text-sm",children:d("instructions")}),(0,t.jsx)(i.Button,{variant:"outline",className:"w-full cursor-pointer",onClick:x,disabled:m||c>0,children:c>0?d("resendCooldown",{seconds:c}):m?d("resending"):d("resend")})]})]})}])},507110,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(861745),r=e.i(948148),i=e.i(519455),n=e.i(876555),l=e.i(373201);e.s(["GoogleSignInButton",0,function({callbackURL:e}){let o=(0,r.useTranslations)("auth.google"),d=(0,a.useLocale)(),[c,u]=(0,s.useState)(!1);async function m(){u(!0),(0,l.setLocaleCookie)(d),localStorage.setItem("fullmetrix_last_auth_method","google"),await (0,n.signInWithGoogle)(e)}return(0,t.jsxs)(i.Button,{variant:"outline",className:"h-11 w-full gap-3 text-sm",onClick:m,disabled:c,children:[(0,t.jsxs)("svg",{className:"size-5",viewBox:"0 0 24 24",children:[(0,t.jsx)("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z",fill:"#4285F4"}),(0,t.jsx)("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),(0,t.jsx)("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),(0,t.jsx)("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"})]}),o(c?"connecting":"continueWith")]})}])},330300,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(948148),r=e.i(618566),i=e.i(846696),n=e.i(520133),l=e.i(519455),o=e.i(793479),d=e.i(110204),c=e.i(772436),u=e.i(507110),m=e.i(976016),g=e.i(876555),x=e.i(688289),f=e.i(373457);e.s(["LoginForm",0,function(){let e=(0,a.useTranslations)("auth.login"),h=(0,a.useTranslations)("auth.validation"),p=(0,n.useRouter)(),j=(0,r.useSearchParams)(),v=(0,x.getAuthRedirectTarget)(j),w="/"===v?"/register":`/register?returnTo=${encodeURIComponent(v)}
2`,[N,b]=(0,s.useState)(!1),[y,C]=(0,s.useState)({}),D=(0,s.useSyncExternalStore)(()=>()=>{},()=>localStorage.getItem("fullmetrix_last_auth_method"),()=>null);async function S(t){t.preventDefault(),C({});let s=new FormData(t.currentTarget),a={email:s.get("email"),password:s.get("password")},r=m.loginSchema.safeParse(a);if(!r.success){let e={};for(let t of r.error.issues)e[t.path[0]]=h(t.message);C(e);return}b(!0);let{error:n}=await (0,g.signIn)(a.email,a.password);(b(!1),n)?i.toast.error(e("invalidCredentials")):(localStorage.setItem("fullmetrix_last_auth_method","email"),v.startsWith("/api/auth/oauth2/authorize?"))?window.location.assign(v):p.push(v)}return(0,t.jsxs)("div",{className:"w-full max-w-sm",children:[(0,t.jsxs)("div",{className:"mb-10 flex items-center gap-3 lg:hidden",children:[(0,t.jsx)(f.default,{size:36}),(0,t.jsx)("span",{className:"text-xl font-semibold tracking-tight",children:"Fullmetrix"})]}),(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:e("heading")}),(0,t.jsx)("p",{className:"text-muted-foreground mt-2 text-sm",children:e("subtitle")})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,t.jsxs)("div",{className:"relative",children:["google"===D&&(0,t.jsx)("div",{className:"bg-foreground text-background absolute -top-2 -right-2 z-10 rounded-full px-2 py-0.5 text-xs font-medium shadow-sm",children:e("lastMethod")}),(0,t.jsx)(u.GoogleSignInButton,{callbackURL:v})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)(c.Separator,{className:"flex-1"}),(0,t.jsx)("span",{className:"text-muted-foreground text-xs",children:e("or")}),(0,t.jsx)(c.Separator,{className:"flex-1"})]}),(0,t.jsxs)("form",{onSubmit:S,className:"flex flex-col gap-4",children:[(0,t.jsxs)("div",{className:"relative flex flex-col gap-2",children:["email"===D&&(0,t.jsx)("div",{className:"bg-foreground text-background absolute -top-2 -right-2 z-10 rounded-full px-2 py-0.5 text-xs font-medium shadow-sm",children:e("lastMethod")}),(0,t.jsx)(d.Label,{htmlFor:"email",children:e("email")}),(0,t.jsx)(o.Input,{id:"email",name:"email",type:"email",placeholder:"[email protected]"}),y.email&&(0,t.jsx)("p",{className:"text-destructive text-xs",children:y.email})]}),(0,t.jsxs)("div",{className:"relative flex flex-col gap-2",children:[(0,t.jsx)(d.Label,{htmlFor:"password",children:e("password")}),(0,t.jsx)(o.Input,{id:"password",name:"password",type:"password",placeholder:"••••••••"}),(0,t.jsx)(n.Link,{href:"/reset-password",className:"text-muted-foreground absolute top-0 right-0 text-xs hover:underline",children:e("forgotPassword")}),y.password&&(0,t.jsx)("p",{className:"text-destructive text-xs",children:y.password})]}),(0,t.jsx)(l.Button,{type:"submit",disabled:N,className:"mt-2 h-11 w-full",children:N?e("submitting"):e("submit")})]}),(0,t.jsxs)("p",{className:"text-muted-foreground text-center text-sm",children:[e("noAccount")," ",(0,t.jsx)(n.Link,{href:w,className:"text-foreground hover:underline",children:e("signUp")})]})]})]})}])},741812,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(948148),r=e.i(846696),i=e.i(519455),n=e.i(578938);e.s(["OAuthConsentForm",0,function(){let e=(0,a.useTranslations)("auth.oauthConsent"),[l,o]=(0,s.use
2State)(null);async function d(t){o(t?"accept":"deny");let{data:s,error:a}=await n.authClient.$fetch("/oauth2/consent",{method:"POST",body:{accept:t,oauth_query:window.location.search.slice(1)}});if(a){o(null),r.toast.error(e("error"));return}s&&"string"==typeof s.url&&window.location.assign(s.url)}return(0,t.jsxs)("div",{className:"flex w-full max-w-md flex-col gap-8",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("p",{className:"text-muted-foreground text-sm font-medium",children:"Fullmetrix"}),(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:e("heading")}),(0,t.jsx)("p",{className:"text-muted-foreground text-sm leading-6",children:e("description")})]}),(0,t.jsxs)("div",{className:"bg-muted/50 flex flex-col gap-4 rounded-xl p-5",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e("analyticsTitle")}),(0,t.jsx)("p",{className:"text-muted-foreground text-sm leading-5",children:e("analyticsDescription")})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e("organizationsTitle")}),(0,t.jsx)("p",{className:"text-muted-foreground text-sm leading-5",children:e("organizationsDescription")})]})]}),(0,t.jsx)("p",{className:"text-muted-foreground text-sm leading-6",children:e("readOnlyNotice")}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row-reverse",children:[(0,t.jsx)(i.Button,{type:"button",className:"cursor-pointer sm:flex-1",disabled:null!==l,onClick:()=>d(!0),children:"accept"===l?e("authorizing"):e("authorize")}),(0,t.jsx)(i.Button,{type:"button",variant:"outline",className:"cursor-pointer sm:flex-1",disabled:null!==l,onClick:()=>d(!1),children:"deny"===l?e("denying"):e("deny")})]})]})}])},237174,e=>{"use strict";var t=e.i(843476),s=e.i(948148),a=e.i(520133),r=e.i(271645),i=e.i(127169),n=e.i(912598),l=e.i(846696),o=e.i(515288),d=e.i(487486),c=e.i(519455),u=e.i(302747),m=e.i(876555);e.s(["PendingInvitation",0,function(){let e=(0,s.useTranslations)("auth.pending"),g=(0,s.useTranslations)("common"),x=(0,s.useTranslations)("settings.team"),f=(0,s.useTranslations)("invitation"),h=(0,a.useRouter)(),p=(0,n.useQueryClient)(),{data:j,isPending:v}=(0,m.useSession)(),[w,N]=(0,r.useState)(null);(0,r.useEffect)(()=>{v||j||h.push("/login")},[j,v,h]);let{data:b=[],isLoading:y}=(0,i.useQuery)({queryKey:["user-invitations",j?.user?.id],queryFn:async()=>{let e=await fetch("/api/invitations");if(!e.ok)throw Error(f("acceptError"));let t=await e.json(),s=Date.now();return t.filter(e=>"pending"===e.status.toLowerCase()&&new Date(e.expiresAt).getTime()>s)},enabled:!!j});async function C(e){N(e.id);let t=await fetch("/api/invitations/respond",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:e.id,action:"accept"})});if(N(null),!t.ok){let e=await t.json().catch(()=>({}));l.toast.error(e.error||f("acceptError")),p.invalidateQueries({queryKey:["user-invitations"]});return}l.toast.success(f("acceptSuccess")),h.push("/"),h.refresh()}let D=async()=>{await (0,m.signOut)(),h.push("/login")};return v?null:(0,t.jsxs)(o.Card,{className:"w-full max-w-md",children:[(0,t.jsxs)(o.CardHeader,{children:[(0,t.jsx)(o.CardTitle,{children:e("heading")}),(0,t.jsxs)(o.CardDescription,{children:[e("greeting")," ",j?.user?.name??"",","]})]}),(0,t.jsx)(o.CardContent,{className:"flex flex-col gap-4",children:y?(0,t.jsxs)("div",{className:"flex flex-col gap-3","aria-busy":"true","aria-label":g("loading"),children:[(0,t.jsx)(u.Skeleton,{className:"h-16 w-full"}),(0,t.jsx)(u.Skeleton,{className:"h-16 w-full"})]}):b.length>0?(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsx)("p",{className:"text-muted-foreground text-sm",children:e("invitationsFound")}),b.map(e=>(0,t.jsxs)("div",{className:"border-border flex items-center gap-3 rounded-lg border p-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,t.jsx)("span",{className:"truncate text-sm font-medium",children:e.companyName}),(0,t.jsx)(d.Badge,{variant:"outline",className:"w-fit",children:"ADMIN"===e.role?x("roleAdmin"):x("roleMember")})]}),(0,t.jsx)(c.Button,{size:"sm",className:"cursor-pointer",disabled:w===e.id,onClick:()=>C(e),children:w===e.id?f("processing"):f("accept")})]},e.id))]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"text-muted-foreground text-sm",children:e("message")}),(0,t.jsx)("p",{className:"text-muted-foreground text-sm",children:e("emailNote")})]})}),(0,t.jsxs)(o.CardFooter,{className:"flex gap-2",children:[(0,t.jsx)(c.Button,{variant:"outline",onClick:()=>{h.push("/")},className:"cursor-pointer",children:e("refresh")}),(0,t.jsx)(c.Button,{variant:"ghost",onClick:D,className:"cursor-pointer",children:e("signOut")})]})]})}])},131469,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(948148),r=e.i(954616),i=e.i(912598),n=e.i(846696),l=e.i(799676),o=e.i(265132),d=e.i(519455),c=e.i(793479),u=e.i(110204),m=e.i(776639),g=e.i(578938);let x=new Set(["image/png","image/jpeg","image/webp"]);async function f(e){let t=await new Promise((t,s)=>{let a=new FileReader;a.onload=()=>t(a.result),a.onerror=()=>s(a.error),a.readAsDataURL(e)}),s=await new Promise((e,s)=>{let a=new Image;a.onload=()=>e(a),a.onerror=()=>s(Error("Image load failed")),a.src=t}),a=Math.min(s.width,s.height),r=(s.width-a)/2,i=(s.height-a)/2,n=document.createElement("canvas");n.width=256,n.height=256;let l=n.getContext("2d");if(!l)throw Error("Canvas not supported");return l.drawImage(s,r,i,a,a,0,0,256,256),n.toDataURL("image/jpeg",.85)}e.s(["ProfileSection",0,function({user:e}){let h=(0,a.useTranslations)("auth.profile"),p=(0,i.useQueryClient)(),j=(0,s.useRef)(null),[v,w]=(0,s.use
2State)(!1),[N,b]=(0,s.useState)(e.name),[y,C]=(0,s.useState)(""),[D,S]=(0,s.useState)(e.image),k=(0,r.useMutation)({mutationFn:async e=>{let{error:t}=await g.authClient.updateUser({name:e});if(t)throw t},onSuccess:()=>{p.invalidateQueries({queryKey:["organization-members"]}),n.toast.success(h("updateSuccess")),w(!1)},onError:()=>{n.toast.error(h("updateError"))}}),T=(0,r.useMutation)({mutationFn:async e=>{let{error:t}=await g.authClient.updateUser({image:e});if(t)throw t;return e},onMutate:e=>(S(e),{prev:D}),onSuccess:(e,t)=>{p.invalidateQueries({queryKey:["organization-members"]}),n.toast.success(t?h("photoUpdated"):h("photoRemoved"))},onError:(e,t,s)=>{s&&S(s.prev),n.toast.error(h("photoUpdateError"))}});async function P(e){let t=e.target.files?.[0];if(e.target.value="",t){if(!x.has(t.type))return void n.toast.error(h("photoInvalidType"));if(t.size>5242880)return void n.toast.error(h("photoTooLarge"));try{let e=await f(t);T.mutate(e)}catch{n.toast.error(h("photoUpdateError"))}}}return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsx)("h3",{className:"text-sm font-medium",children:h("heading")}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)(l.Avatar,{className:"size-16",children:[D&&(0,t.jsx)(l.AvatarImage,{src:D,alt:e.name}),(0,t.jsx)(l.AvatarFallback,{className:"text-lg text-white!",style:{backgroundImage:(0,o.avatarGradient)(e.name)},children:(0,o.getInitials)(e.name)})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e.name}),(0,t.jsx)("p",{className:"text-muted-foreground text-xs",children:e.email}),(0,t.jsxs)("div",{className:"mt-1 flex flex-wrap gap-2",children:[(0,t.jsx)(d.Button,{variant:"outline",size:"sm",className:"w-fit cursor-pointer",onClick:()=>{b(e.name),w(!0)},children:h("editName")}),(0,t.jsx)(d.Button,{variant:"outline",size:"sm",className:"w-fit cursor-pointer",disabled:T.isPending,onClick:()=>j.current?.click(),children:h("changePhoto")}),D&&(0,t.jsx)(d.Button,{variant:"outline",size:"sm",className:"w-fit cursor-pointer",disabled:T.isPending,onClick:()=>T.mutate(null),children:h("removePhoto")})]}),(0,t.jsx)("input",{ref:j,type:"file",accept:"image/png,image/jpeg,image/webp",className:"hidden",onChange:P})]})]})]}),(0,t.jsx)(m.Dialog,{open:v,onOpenChange:w,children:(0,t.jsxs)(m.DialogContent,{children:[(0,t.jsxs)(m.DialogHeader,{children:[(0,t.jsx)(m.DialogTitle,{children:h("editNameTitle")}),(0,t.jsx)(m.DialogDescription,{children:h("editNameDesc")})]}),(0,t.jsxs)("form",{onSubmit:function(e){e.preventDefault(),C("");let t=N.trim();t.length<1?C(h("nameRequired")):k.mutate(t)},className:"flex flex-col gap-4",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(u.Label,{htmlFor:"edit-name",children:h("nameLabel")}),(0,t.jsx)(c.Input,{id:"edit-name",value:N,onChange:e=>b(e.target.value),autoFocus:!0}),y&&(0,t.jsx)("p",{className:"text-destructive text-xs",children:y})]}),(0,t.jsx)(d.Button,{type:"submit",disabled:k.isPending,className:"w-full cursor-pointer",children:k.isPending?h("saving"):h("save")})]})]})})]})}])},926924,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(861745),r=e.i(948148),i=e.i(618566),n=e.i(520133),l=e.i(519455),o=e.i(793479),d=e.i(110204),c=e.i(772436),u=e.i(507110),m=e.i(169725),g=e.i(976016),x=e.i(876555),f=e.i(688289),h=e.i(373457),p=e.i(760507);e.s(["RegisterForm",0,function(){let e=(0,p.useToastError)(),j=(0,r.useTranslations)("auth.register"),v=(0,a.useLocale)(),w=(0,r.useTranslations)("auth.validation"),N=(0,i.useSearchParams)(),b=(0,f.getAuthRedirectTarget)(N),y="/"===b?"/login":`/login?returnTo=${encodeURIComponent(b)}`,[C,D]=(0,s.useState)(!1),[S,k]=(0,s.useState)(null),[T,P]=(0,s.useState)({}),I="/"===b?void 0:b;if(S)return(0,t.jsx)(m.CheckEmailMessage,{email:S,callbackURL:I});async function E(t){t.preventDefault(),P({});let s=new FormData(t.currentTarget),a={name:s.get("name"),email:s.get("email"),password:s.get("password"),confirmPassword:s.get("confirmPassword")},r=g.registerSchema.safeParse(a);if(!r.success){let e={};for(let t of r.error.issues)e[t.path[0]]=w(t.message);P(e);return}D(!0);let{error:i}=await (0,x.signUp)(a.name,a.email,a.password,v,I);(D(!1),i)?e(i):k(a.email)}return(0,t.jsxs)("div",{className:"w-full max-w-sm",children:[(0,t.jsxs)("div",{className:"mb-10 flex items-center gap-3 lg:hidden",children:[(0,t.jsx)(h.default,{size:36}),(0,t.jsx)("span",{className:"text-xl font-semibold tracking-tight",children:"Fullmetrix"})]}),(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:j("heading")}),(0,t.jsx)("p",{className:"text-muted-foreground mt-2 text-sm",children:j("subtitle")})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,t.jsx)(u.GoogleSignInButton,{callbackURL:b}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)(c.Separator,{className:"flex-1"}),(0,t.jsx)("span",{className:"text-muted-foreground text-xs",children:j("or")}),(0,t.jsx)(c.Separator,{className:"flex-1"})]}),(0,t.jsxs)("form",{onSubmit:E,className:"flex flex-col gap-4",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(d.Label,{htmlFor:"name",children:j("name")}
2),(0,t.jsx)(o.Input,{id:"name",name:"name",placeholder:j("namePlaceholder")}),T.name&&(0,t.jsx)("p",{className:"text-destructive text-xs",children:T.name})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(d.Label,{htmlFor:"email",children:j("email")}),(0,t.jsx)(o.Input,{id:"email",name:"email",type:"email",placeholder:"[email protected]",defaultValue:N.get("email")??void 0}),T.email&&(0,t.jsx)("p",{className:"text-destructive text-xs",children:T.email})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(d.Label,{htmlFor:"password",children:j("password")}),(0,t.jsx)(o.Input,{id:"password",name:"password",type:"password",placeholder:"••••••••"}),T.password&&(0,t.jsx)("p",{className:"text-destructive text-xs",children:T.password})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(d.Label,{htmlFor:"confirmPassword",children:j("confirmPassword")}),(0,t.jsx)(o.Input,{id:"confirmPassword",name:"confirmPassword",type:"password",placeholder:"••••••••"}),T.confirmPassword&&(0,t.jsx)("p",{className:"text-destructive text-xs",children:T.confirmPassword})]}),(0,t.jsx)(l.Button,{type:"submit",disabled:C,className:"mt-2 h-11 w-full",children:j(C?"submitting":"submit")})]}),(0,t.jsxs)("p",{className:"text-muted-foreground text-center text-sm",children:[j("hasAccount")," ",(0,t.jsx)(n.Link,{href:y,className:"text-foreground hover:underline",children:j("signIn")})]})]})]})}])},604167,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(948148),r=e.i(520133),i=e.i(618566),n=e.i(846696),l=e.i(519455),o=e.i(793479),d=e.i(110204),c=e.i(976016),u=e.i(876555),m=e.i(373457),g=e.i(760507);e.s(["ResetPasswordForm",0,function(){let e=(0,g.useToastError)(),x=(0,a.useTranslations)("auth.resetPassword"),f=(0,a.useTranslations)("auth.validation"),h=(0,r.useRouter)(),p=(0,i.useSearchParams)(),j=p.get("token"),v=null!==p.get("error"),[w,N]=(0,s.useState)(!1),[b,y]=(0,s.useState)(!1),[C,D]=(0,s.useState)({});async function S(t){t.preventDefault(),D({});let s={email:new FormData(t.currentTarget).get("email")},a=c.resetPasswordSchema.safeParse(s);if(!a.success){let e={};for(let t of a.error.issues)e[t.path[0]]=f(t.message);D(e);return}N(!0);let{error:r}=await (0,u.forgotPassword)(s.email);(N(!1),r)?e(r):y(!0)}async function k(t){t.preventDefault(),D({});let s=new FormData(t.currentTarget),a={password:s.get("password"),confirmPassword:s.get("confirmPassword")},r=c.newPasswordSchema.safeParse(a);if(!r.success){let e={};for(let t of r.error.issues)e[t.path[0]]=f(t.message);D(e);return}N(!0);let{error:i}=await (0,u.resetPassword)(a.password,j);(N(!1),i)?e(i):(n.toast.success(x("success")),h.push("/login"))}return b?(0,t.jsxs)("div",{className:"w-full max-w-sm",children:[(0,t.jsxs)("div",{className:"mb-10 flex items-center gap-3 lg:hidden",children:[(0,t.jsx)(m.default,{size:36}),(0,t.jsx)("span",{className:"text-xl font-semibold tracking-tight",children:"Fullmetrix"})]}),(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:x("emailSentHeading")}),(0,t.jsx)("p",{className:"text-muted-foreground mt-2 text-sm",children:x("emailSentDesc")})]}),(0,t.jsx)(r.Link,{href:"/login",className:"text-sm hover:underline",children:x("backToLogin")})]}):j&&!v?(0,t.jsxs)("div",{className:"w-full max-w-sm",children:[(0,t.jsxs)("div",{className:"mb-10 flex items-center gap-3 lg:hidden",children:[(0,t.jsx)(m.default,{size:36}),(0,t.jsx)("span",{className:"text-xl font-semibold tracking-tight",children:"Fullmetrix"})]}),(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:x("newPasswordHeading")}),(0,t.jsx)("p",{className:"text-muted-foreground mt-2 text-sm",children:x("newPasswordSubtitle")})]}),(0,t.jsxs)("form",{onSubmit:k,className:"flex flex-col gap-4",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(d.Label,{htmlFor:"password",children:x("newPassword")}),(0,t.jsx)(o.Input,{id:"password",name:"password",type:"password",placeholder:"••••••••"}),C.password&&(0,t.jsx)("p",{className:"text-destructive text-xs",children:C.password})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(d.Label,{htmlFor:"confirmPassword",children:x("confirmPassword")}),(0,t.jsx)(o.Input,{id:"confirmPassword",name:"confirmPassword",type:"password",placeholder:"••••••••"}),C.confirmPassword&&(0,t.jsx)("p",{className:"text-destructive text-xs",children:C.confirmPassword})]}),(0,t.jsx)(l.Button,{type:"submit",disabled:w,className:"mt-2 h-11 w-full",children:w?x("resetting"):x("resetSubmit")})]})]}):(0,t.jsxs)("div",{className:"w-full max-w-sm",children:[(0,t.jsxs)("div",{className:"mb-10 flex items-center gap-3 lg:hidden",children:[(0,t.jsx)(m.default,{size:36}),(0,t.jsx)("span",{className:"text-xl font-semibold tracking-tight",children:"Fullmetrix"})]}),(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:v?x("invalidTokenHeading"):x("heading")}),(0,t.jsx)("p",{className:v?"text-destructive mt-2 text-sm":"text-muted-foreground mt-2 text-sm",children:v?x("invalidTokenDesc"):x("subtitle")})]}),(0,t.jsxs)("form",{onSubmit:S,className:"flex flex-col gap-4",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(d.Label,{htmlFor:"email",children:x("email")}),(0,t.jsx)(o.Input,{id:"email",name:"email",type:"email",placeholder:"[email protected]"}),C.email&&(0,t.jsx)("p",{className:"text-destructive text-xs",children:C.email})]}),(0,t.jsx)(l.Button,{type:"submit",disabled:w,className:"mt-2 h-11 w-full",children:w?x("submitting"):x("submit")}),(0,t.jsx)(r.Link,{href:"/login",className:"text-muted-foreground text-center text-sm hover:underline",children:x("backToLogin")})]})]})}])},324428,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(948148),r=e.i(954616),i=e.i(912598),n=e.i(846696),l=e.i(632449),o=e.i(59895),d=e.i(487486),c=e.i(519455),u=e.i(868499),m=e.i(578938),g=e.i(127169),x=e.i(227436);e.s(["SecuritySection",0,function(){let e=(0,a.useTranslations)("auth.security"),f=(0,i.useQueryClient)(),{data:h,isLoading:p}=(0,g.useQuery)({queryKey:["auth-providers"],queryFn:async()=>{let{data:e}=await m.authClient.listAccounts(),t=e??[],s=t.some(e=>
2"credential"===e.providerId),a=t.find(e=>"google"===e.providerId);return{hasPassword:s,hasGoogle:!!a,googleLocalAccountId:a?.id??null}},staleTime:3e5,gcTime:6e5}),[j,v]=(0,s.useState)(!1),[w,N]=(0,s.useState)(!1),b=(0,r.useMutation)({mutationFn:async()=>{if(!h?.googleLocalAccountId)throw Error("Compte Google introuvable");let{error:e}=await m.authClient.unlinkAccount({accountId:h.googleLocalAccountId});if(e)throw e},onSuccess:()=>{f.invalidateQueries({queryKey:["auth-providers"]}),n.toast.success(e("unlinkSuccess")),N(!1)},onError:()=>{n.toast.error(e("unlinkError"))}}),y=h?.hasPassword&&h?.hasGoogle;return p?(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsx)("h3",{className:"text-sm font-medium",children:e("heading")}),(0,t.jsx)("p",{className:"text-muted-foreground text-xs",children:e("loading")})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsx)("h3",{className:"text-sm font-medium",children:e("heading")}),(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between rounded-lg border p-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(o.IconLock,{className:"text-muted-foreground size-5"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e("password")}),(0,t.jsx)("p",{className:"text-muted-foreground text-xs",children:h?.hasPassword?e("passwordSet"):e("noPassword")})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(d.Badge,{variant:h?.hasPassword?"default":"outline",children:h?.hasPassword?e("active"):e("inactive")}),(0,t.jsx)(c.Button,{variant:"outline",size:"sm",className:"cursor-pointer",onClick:()=>v(!0),children:h?.hasPassword?e("change"):e("configure")})]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between rounded-lg border p-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(l.IconBrandGoogle,{className:"text-muted-foreground size-5"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:"Google"}),(0,t.jsx)("p",{className:"text-muted-foreground text-xs",children:h?.hasGoogle?e("googleConnected"):e("googleNotConnected")})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(d.Badge,{variant:h?.hasGoogle?"default":"outline",children:h?.hasGoogle?e("active"):e("inactive")}),h?.hasGoogle?(0,t.jsx)(c.Button,{variant:"outline",size:"sm",className:"cursor-pointer",disabled:!y,onClick:()=>N(!0),children:e("disconnect")}):(0,t.jsx)(c.Button,{variant:"outline",size:"sm",className:"cursor-pointer",onClick:function(){m.authClient.linkSocial({provider:"google",callbackURL:window.location.href})},children:e("connect")})]})]})]})]}),(0,t.jsx)(x.ChangePasswordDialog,{open:j,onOpenChange:v,hasPassword:h?.hasPassword??!1}),(0,t.jsx)(u.AlertDialog,{open:w,onOpenChange:N,children:(0,t.jsxs)(u.AlertDialogContent,{children:[(0,t.jsxs)(u.AlertDialogHeader,{children:[(0,t.jsx)(u.AlertDialogTitle,{children:e("unlinkGoogleTitle")}),(0,t.jsx)(u.AlertDialogDescription,{children:e("unlinkGoogleDesc")})]}),(0,t.jsxs)(u.AlertDialogFooter,{children:[(0,t.jsx)(u.AlertDialogCancel,{children:e("cancel")}),(0,t.jsx)(u.AlertDialogAction,{onClick:()=>b.mutate(),disabled:b.isPending,children:b.isPending?e("unlinking"):e("unlinkSubmit")})]})]})})]})}],324428)},876555,688289,e=>{"use strict";var t=e.i(578938),s=e.i(247167),a="featurebase-sdk",r=null;function i(){return"u">typeof window&&"u">typeof document}function n(){null!==r&&(clearTimeout(r),r=null),i()&&"function"==typeof window.Featurebase&&window.Featurebase("shutdown")}function l(e,t="/"){if(!e||!e.startsWith("/")||e.startsWith("//"))return t;let s=e.toLowerCase();return e.startsWith("/\\")||s.startsWith("/%5c")||s.startsWith("/%2f")?t:e}e.s(["getAuthRedirectTarget",0,function(e){let t=e.getAll("ba_param");return e.has("sig")&&e.has("client_id")&&t.includes("client_id")&&t.includes("redirect_uri")?`/api/auth/oauth2/authorize?${e.toString()}`:l(e.get("returnTo"))},"toSafeAuthRedirect",0,l],688289),e.s(["forgotPassword",0,function(e){return t.authClient.requestPasswordReset({email:e,redirectTo:"/reset-password"})},"resetPassword",0,function(e,s){return t.authClient.resetPassword({newPassword:e,token:s})},"signIn",0,function(e,s){return t.authClient.signIn.email({email:e,password:s})},"signInWithGoogle",0,function(e="/"){return t.authClient.signIn.social({provider:"google",callbackURL:l(e)})}
2,"signOut",0,function(){return!function(){if(i()){if(i()){if("function"!=typeof window.Featurebase){let e=function(...t){(e.q||(e.q=[])).push(t)};e.q=[],window.Featurebase=e}if(!document.getElementById(a)){let e=document.createElement("script");e.id=a,e.src=!function(){var e;if("u">typeof window&&"development"===window.FEATUREBASE_ENV)return!0;try{if(void 0!==s.default&&(null==(e=s.default.env)?void 0:e.NEXT_PUBLIC_ENVIRONMENT)==="development")return!0}catch(e){}return!1}()?"https://do.featurebase.app/js/sdk.js":"https://sdk.fbasedev.com/dist/sdk.js",e.defer=!0,document.head.appendChild(e)}}null===r&&(r=setTimeout(n,250))}}(),window.posthog?.reset(),t.authClient.signOut()},"signUp",0,function(e,s,a,r,i){let n=i?l(i):void 0;return t.authClient.signUp.email({name:e,email:s,password:a,locale:r,...n&&"/"!==n?{callbackURL:n}:{}})},"useSession",0,function(){return t.authClient.useSession()}],876555)},976016,e=>{"use strict";var t=e.i(681307);let s=t.z.object({email:t.z.email("invalidEmail"),password:t.z.string().min(8,"passwordMinLength")}),a=t.z.object({name:t.z.string().min(2,"nameMinLength"),email:t.z.email("invalidEmail"),password:t.z.string().min(8,"passwordMinLength"),confirmPassword:t.z.string()}).refine(e=>e.password===e.confirmPassword,{message:"passwordMismatch",path:["confirmPassword"]}),r=t.z.object({email:t.z.email("invalidEmail")}),i=t.z.object({password:t.z.string().min(8,"passwordMinLength"),confirmPassword:t.z.string()}).refine(e=>e.password===e.confirmPassword,{message:"passwordMismatch",path:["confirmPassword"]});e.s(["loginSchema",0,s,"newPasswordSchema",0,i,"registerSchema",0,a,"resetPasswordSchema",0,r])},373457,e=>{"use strict";var t=e.i(843476),s=e.i(271645);e.s(["default",0,function({size:e=28,className:a=""}){let r=(0,s.useId)();return(0,t.jsx)("div",{className:`fullmetrix-logo-mark flex-shrink-0 rounded-[8px] ${a}`,style:{width:e,height:e},children:(0,t.jsxs)("svg",{width:e,height:e,viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"block",children:[(0,t.jsx)("defs",{children:(0,t.jsxs)("linearGradient",{id:r,x1:"0",y1:"0",x2:"28",y2:"28",gradientUnits:"userSpaceOnUse",children:[(0,t.jsx)("stop",{stopColor:"#2469fe"}),(0,t.jsx)("stop",{offset:"1",stopColor:"#173ae1"})]})}),(0,t.jsx)("rect",{width:"28",height:"28",rx:"8",fill:`url(#${r})`}),(0,t.jsx)("rect",{x:"7",y:"8",width:"14",height:"2.5",rx:"1.25",fill:"white"}),(0,t.jsx)("rect",{x:"7",y:"12.75",width:"10",height:"2.5",rx:"1.25",fill:"white"}),(0,t.jsx)("rect",{x:"7",y:"17.5",width:"7",height:"2.5",rx:"1.25",fill:"white"})]})})}])},760507,e=>{"use strict";var t=e.i(948148),s=e.i(831483);e.s(["useToastError",0,function(){let e=(0,t.useTranslations)("errors");return(t,a="generic")=>{(0,s.toastError)(t,e,a)}}])},831483,e=>{"use strict";var t=e.i(846696);let s={UNAUTHORIZED:"unauthorized",UNAUTHENTICATED:"unauthorized",FORBIDDEN:"forbidden",NOT_FOUND:"notFound",VALIDATION_FAILED:"validation",INVALID_INPUT:"validation",CONFLICT:"conflict",ALREADY_EXISTS:"conflict",TIMEOUT:"timeout",SERVER_ERROR:"serverError",INTERNAL_SERVER_ERROR:"serverError",NETWORK_ERROR:"network",RATE_LIMITED:"rateLimited",PAYMENT_REQUIRED:"paymentRequired"};async function a(e,t){let s=null,a=null;try{let t=await e.json();t&&"object"==typeof t&&("string"==typeof t.code&&(s=t.code),"string"==typeof t.error?a=t.error:"string"==typeof t.message&&(a=t.message))}catch{}if(s)throw Error(s);if(a)throw Error(a);if(401===e.status)throw Error("UNAUTHORIZED");if(403===e.status)throw Error("FORBIDDEN");if(404===e.status)throw Error("NOT_FOUND");if(409===e.status)throw Error("CONFLICT");if(422===e.status)throw Error("VALIDATION_FAILED");if(429===e.status)throw Error("RATE_LIMITED");if(e.status>=500)throw Error("SERVER_ERROR");throw Error(t)}e.s(["throwFromResponse",0,a,"toastError",0,function(e,a,r="generic"){let i=function(e,t){if(e){let t=e.toUpperCase().replace(/[\s-]/g,"_");if(s[t])return s[t];for(let[e,a]of Object.entries(s))if(t===e||t.startsWith(e+"_")||t.endsWith("_"+e))return a}return t instanceof TypeError&&e?.toLowerCase().includes("fetch")?"network":null}(function(e){if(!e)return null;if("string"==typeof e)return e;if(e instanceof Error)return e.message||null;if("object"==typeof e&&"message"in e){let t=e.message;if("string"==typeof t)return t}return null}(e),e);i?t.toast.error(a(i)):t.toast.error(a(r))}])},233684,485519,e=>{"use strict";function t(e){let t=0;for(let s=0;s<e.length;s++)t=(t<<5)-t+e.charCodeAt(s)|0;return Math.abs(t)}e.s(["hashString",0,t],485519);let s=[[[222,76,62],[230,68,48]],[[243,72,66],[250,64,50]],[[258,70,66],[266,60,52]],[[280,64,66],[288,56,52]],[[320,68,66],[330,60,54]],[[345,72,66],[352,64,54]],[[210,68,62],[220,62,48]],[[28,78,62],[20,70,52]],[[215,24,56],[222,22,42]]];function a([e,t,s]){return`hsl(${e}, ${t}%, ${s}%)`}function r(e){let r=s[t(e)%s.length];return[a(r[0]),a(r[1])]}e.s(["meshGradient",0,function(e){let[t,s]=r(e);return`radial-gradient(circle at 30% 24%, rgba(255,255,255,0.32), transparent 55%), linear-gradient(145deg, ${t}, ${s})`},"meshGradientDataUri",0,function(e,t=400){return`data:image/svg+xml;utf8,${encodeURIComponent(function(e,t=400){let[s,a]=r(e);return`<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${t}
2" viewBox="0 0 ${t} ${t}"><defs><linearGradient id="fmg" x1="0" y1="0" x2="1" y2="1"><stop offset="0%" stop-color="${s}"/><stop offset="100%" stop-color="${a}"/></linearGradient><radialGradient id="fmh" cx="30%" cy="24%" r="60%"><stop offset="0%" stop-color="#ffffff" stop-opacity="0.32"/><stop offset="100%" stop-color="#ffffff" stop-opacity="0"/></radialGradient></defs><rect width="${t}" height="${t}" fill="url(#fmg)"/><rect width="${t}" height="${t}" fill="url(#fmh)"/></svg>`}(e,t))}`},"meshInitials",0,function(e){return e.split(" ").map(e=>e[0]).filter(Boolean).slice(0,2).join("").toUpperCase()}],233684)}]);
3
4//# debugId=4f1e45a1-d49b-9812-8736-6ff83b9905df

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.