diff --git a/src/services/azure_devops/sync.py b/src/services/azure_devops/sync.py index 58cb651..241a653 100644 --- a/src/services/azure_devops/sync.py +++ b/src/services/azure_devops/sync.py @@ -85,7 +85,7 @@ async def sync_user_work_items(user: User, db: AsyncSession) -> int: wi.assigned_to_email = assigned_email wi.iteration_path = f.get("System.IterationPath", "") wi.area_path = f.get("System.AreaPath", "") - wi.url = f"https://dev.azure.com/{integ.organization}/{integ.project}/_workitems/edit/{ado_id}" + wi.url = f"https://dev.azure.com/{integ.organization}/_workitems/edit/{ado_id}" wi.fields_json = f wi.synced_at = datetime.now(timezone.utc) diff --git a/src/static/assets/AdminView-RdxNbXY6.js b/src/static/assets/AdminView-Bw7ch0XQ.js similarity index 88% rename from src/static/assets/AdminView-RdxNbXY6.js rename to src/static/assets/AdminView-Bw7ch0XQ.js index 09f9bc1..2564904 100644 --- a/src/static/assets/AdminView-RdxNbXY6.js +++ b/src/static/assets/AdminView-Bw7ch0XQ.js @@ -1 +1 @@ -import{d as p,u as y,y as h,c as r,a as t,e as n,k as v,w as d,f as b,s as m,o as s,F as g,r as k,t as a,q as u,h as A}from"./index-BP_aNEdP.js";import{a as w}from"./admin-C27haAMd.js";import{_ as B,a as S}from"./CardContent.vue_vue_type_script_setup_true_lang-B8VjSxLa.js";import{_ as f}from"./Badge.vue_vue_type_script_setup_true_lang-B2H6z2RD.js";import{_ as V}from"./Spinner.vue_vue_type_script_setup_true_lang-Cu49-Cc4.js";import{a as $}from"./utils-7WVCegLb.js";const N={class:"p-6"},C={key:0,class:"flex items-center justify-center h-20"},D={class:"w-full"},E={class:"px-4 py-3"},F={class:"text-sm font-medium text-foreground"},R={class:"px-4 py-3 text-sm text-muted-foreground"},U={class:"px-4 py-3"},j={class:"px-4 py-3"},q={class:"px-4 py-3 text-xs text-muted-foreground"},H=p({__name:"AdminView",setup(I){const x=y(),_=b(),i=m([]),l=m(!1);return h(async()=>{if(!x.isAdmin){_.push("/");return}l.value=!0;try{const c=await w.users();i.value=c.data}finally{l.value=!1}}),(c,o)=>(s(),r("div",N,[o[1]||(o[1]=t("h2",{class:"text-lg font-semibold text-foreground mb-6"},"Admin — Users",-1)),l.value?(s(),r("div",C,[n(V,{class:"text-primary"})])):(s(),v(B,{key:1},{default:d(()=>[n(S,{class:"p-0"},{default:d(()=>[t("table",D,[o[0]||(o[0]=t("thead",null,[t("tr",{class:"border-b border-border"},[t("th",{class:"text-left text-xs font-medium text-muted-foreground px-4 py-3"},"User"),t("th",{class:"text-left text-xs font-medium text-muted-foreground px-4 py-3"},"Email"),t("th",{class:"text-left text-xs font-medium text-muted-foreground px-4 py-3"},"Role"),t("th",{class:"text-left text-xs font-medium text-muted-foreground px-4 py-3"},"Status"),t("th",{class:"text-left text-xs font-medium text-muted-foreground px-4 py-3"},"Joined")])],-1)),t("tbody",null,[(s(!0),r(g,null,k(i.value,e=>(s(),r("tr",{key:e.id,class:"border-b border-border last:border-0 hover:bg-muted/30"},[t("td",E,[t("p",F,a(e.username),1)]),t("td",R,a(e.email),1),t("td",U,[n(f,{variant:e.role==="admin"?"default":"secondary",class:"text-xs"},{default:d(()=>[u(a(e.role),1)]),_:2},1032,["variant"])]),t("td",j,[n(f,{variant:e.is_active?"success":"outline",class:"text-xs"},{default:d(()=>[u(a(e.is_active?"Active":"Inactive"),1)]),_:2},1032,["variant"])]),t("td",q,a(A($)(e.created_at)),1)]))),128))])])]),_:1})]),_:1}))]))}});export{H as default}; +import{d as p,u as y,y as h,c as r,a as t,e as n,k as v,w as d,f as b,s as m,o as s,F as g,r as k,t as a,q as u,h as A}from"./index-DVV3ZbZ2.js";import{a as w}from"./admin-xS9EtPqv.js";import{_ as B,a as S}from"./CardContent.vue_vue_type_script_setup_true_lang-DdGXaWEa.js";import{_ as f}from"./Badge.vue_vue_type_script_setup_true_lang-WigJUOyH.js";import{_ as V}from"./Spinner.vue_vue_type_script_setup_true_lang-BkmDerVR.js";import{a as $}from"./utils-7WVCegLb.js";const N={class:"p-6"},C={key:0,class:"flex items-center justify-center h-20"},D={class:"w-full"},E={class:"px-4 py-3"},F={class:"text-sm font-medium text-foreground"},R={class:"px-4 py-3 text-sm text-muted-foreground"},U={class:"px-4 py-3"},j={class:"px-4 py-3"},q={class:"px-4 py-3 text-xs text-muted-foreground"},H=p({__name:"AdminView",setup(I){const x=y(),_=b(),i=m([]),l=m(!1);return h(async()=>{if(!x.isAdmin){_.push("/");return}l.value=!0;try{const c=await w.users();i.value=c.data}finally{l.value=!1}}),(c,o)=>(s(),r("div",N,[o[1]||(o[1]=t("h2",{class:"text-lg font-semibold text-foreground mb-6"},"Admin — Users",-1)),l.value?(s(),r("div",C,[n(V,{class:"text-primary"})])):(s(),v(B,{key:1},{default:d(()=>[n(S,{class:"p-0"},{default:d(()=>[t("table",D,[o[0]||(o[0]=t("thead",null,[t("tr",{class:"border-b border-border"},[t("th",{class:"text-left text-xs font-medium text-muted-foreground px-4 py-3"},"User"),t("th",{class:"text-left text-xs font-medium text-muted-foreground px-4 py-3"},"Email"),t("th",{class:"text-left text-xs font-medium text-muted-foreground px-4 py-3"},"Role"),t("th",{class:"text-left text-xs font-medium text-muted-foreground px-4 py-3"},"Status"),t("th",{class:"text-left text-xs font-medium text-muted-foreground px-4 py-3"},"Joined")])],-1)),t("tbody",null,[(s(!0),r(g,null,k(i.value,e=>(s(),r("tr",{key:e.id,class:"border-b border-border last:border-0 hover:bg-muted/30"},[t("td",E,[t("p",F,a(e.username),1)]),t("td",R,a(e.email),1),t("td",U,[n(f,{variant:e.role==="admin"?"default":"secondary",class:"text-xs"},{default:d(()=>[u(a(e.role),1)]),_:2},1032,["variant"])]),t("td",j,[n(f,{variant:e.is_active?"success":"outline",class:"text-xs"},{default:d(()=>[u(a(e.is_active?"Active":"Inactive"),1)]),_:2},1032,["variant"])]),t("td",q,a(A($)(e.created_at)),1)]))),128))])])]),_:1})]),_:1}))]))}});export{H as default}; diff --git a/src/static/assets/AppLayout-CpcGPOud.js b/src/static/assets/AppLayout-CpcGPOud.js deleted file mode 100644 index b115f1a..0000000 --- a/src/static/assets/AppLayout-CpcGPOud.js +++ /dev/null @@ -1 +0,0 @@ -import{d as C,u as M,c as n,b as B,a as e,F as z,r as V,t as v,h as c,j as y,o as s,k as $,w as j,i as b,n as d,m as A,l as H,R as S,g as _,p as D,q as T,K as L,f as R,e as f,T as O,s as I,v as P}from"./index-BP_aNEdP.js";const N={class:"flex flex-col h-full bg-[hsl(222_44%_7%)] border-r border-border"},F={class:"flex-1 px-2 py-3 space-y-0.5 overflow-y-auto"},K={key:0,class:"absolute left-0 top-1/2 -translate-y-1/2 w-0.5 h-4 bg-primary rounded-r-full"},q={class:"text-sm"},E={class:"p-3 border-t border-border shrink-0"},U={class:"flex items-center gap-3 px-2 py-2 rounded-lg"},W={class:"h-7 w-7 rounded-full bg-primary/15 ring-1 ring-primary/20 flex items-center justify-center text-[10px] font-bold text-primary shrink-0"},G={class:"flex-1 min-w-0"},J={class:"text-xs font-medium text-foreground truncate"},Q=C({__name:"Sidebar",emits:["close"],setup(w,{emit:x}){const a=_(),i=M(),k=x,u=[{name:"Dashboard",path:"/",icon:"grid"},{name:"Calendar",path:"/calendar",icon:"calendar"},{name:"Tasks",path:"/board",icon:"check-square",external:!0},{name:"Projects",path:"/projects",icon:"folder"},{name:"Live Feed",path:"/live",icon:"activity"},{name:"Reports",path:"/reports",icon:"file-text"},{name:"Keys",path:"/keys",icon:"key"},{name:"DevOps",path:"/devops",icon:"devops"},{name:"Settings",path:"/settings",icon:"settings"},{name:"Admin",path:"/admin",icon:"shield",adminOnly:!0}],m=y(()=>u.filter(h=>!h.adminOnly||i.isAdmin));function o(h){return h==="/"?a.path==="/":a.path.startsWith(h)}const l=y(()=>{var t,p;return(((t=i.user)==null?void 0:t.username)??((p=i.user)==null?void 0:p.email)??"?").slice(0,2).toUpperCase()});return(h,t)=>{var p,g;return s(),n("aside",N,[t[12]||(t[12]=B('

CC Dashboard

Oliver Agency

',1)),e("nav",F,[(s(!0),n(z,null,V(m.value,r=>(s(),$(H(r.external?"a":c(S)),A({key:r.path},{ref_for:!0},r.external?{href:r.path,target:"_blank",rel:"noopener"}:{to:r.path},{class:["relative flex items-center gap-3 px-3 h-10 rounded-lg text-sm font-medium transition-all duration-150 group",o(r.path)?"bg-primary/10 text-primary":"text-white/60 hover:bg-white/5 hover:text-white"],onClick:t[0]||(t[0]=ie=>k("close"))}),{default:j(()=>[o(r.path)?(s(),n("span",K)):b("",!0),r.icon==="grid"?(s(),n("svg",{key:1,class:d(["h-4 w-4 shrink-0 transition-colors",o(r.path)?"text-primary":"text-white/40 group-hover:text-white/70"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...t[1]||(t[1]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"},null,-1)])],2)):r.icon==="calendar"?(s(),n("svg",{key:2,class:d(["h-4 w-4 shrink-0",o(r.path)?"text-primary":"text-white/40 group-hover:text-white/70"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...t[2]||(t[2]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"},null,-1)])],2)):r.icon==="check-square"?(s(),n("svg",{key:3,class:d(["h-4 w-4 shrink-0",o(r.path)?"text-primary":"text-white/40 group-hover:text-white/70"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...t[3]||(t[3]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"},null,-1)])],2)):r.icon==="folder"?(s(),n("svg",{key:4,class:d(["h-4 w-4 shrink-0",o(r.path)?"text-primary":"text-white/40 group-hover:text-white/70"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...t[4]||(t[4]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 7a2 2 0 012-2h3.586a1 1 0 01.707.293l1.414 1.414A1 1 0 0011.414 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V7z"},null,-1)])],2)):r.icon==="activity"?(s(),n("svg",{key:5,class:d(["h-4 w-4 shrink-0",o(r.path)?"text-primary":"text-white/40 group-hover:text-white/70"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...t[5]||(t[5]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 10V3L4 14h7v7l9-11h-7z"},null,-1)])],2)):r.icon==="file-text"?(s(),n("svg",{key:6,class:d(["h-4 w-4 shrink-0",o(r.path)?"text-primary":"text-white/40 group-hover:text-white/70"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...t[6]||(t[6]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"},null,-1)])],2)):r.icon==="key"?(s(),n("svg",{key:7,class:d(["h-4 w-4 shrink-0",o(r.path)?"text-primary":"text-white/40 group-hover:text-white/70"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...t[7]||(t[7]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"},null,-1)])],2)):r.icon==="devops"?(s(),n("svg",{key:8,class:d(["h-4 w-4 shrink-0",o(r.path)?"text-primary":"text-white/40 group-hover:text-white/70"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...t[8]||(t[8]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4"},null,-1)])],2)):r.icon==="settings"?(s(),n("svg",{key:9,class:d(["h-4 w-4 shrink-0",o(r.path)?"text-primary":"text-white/40 group-hover:text-white/70"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...t[9]||(t[9]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"},null,-1),e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"},null,-1)])],2)):r.icon==="shield"?(s(),n("svg",{key:10,class:d(["h-4 w-4 shrink-0",o(r.path)?"text-primary":"text-white/40 group-hover:text-white/70"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...t[10]||(t[10]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"},null,-1)])],2)):b("",!0),e("span",q,v(r.name),1)]),_:2},1040,["class"]))),128))]),e("div",E,[e("div",U,[e("div",W,v(l.value),1),e("div",G,[e("p",J,v(((p=c(i).user)==null?void 0:p.username)??((g=c(i).user)==null?void 0:g.email)),1),t[11]||(t[11]=e("div",{class:"flex items-center gap-1 mt-0.5"},[e("div",{class:"h-1.5 w-1.5 rounded-full bg-[hsl(var(--success))]"}),e("span",{class:"text-[10px] text-white/45"},"Online")],-1))])])])])}}}),X={class:"h-14 border-b border-border bg-card/95 backdrop-blur-sm flex items-center px-4 gap-3 shrink-0 sticky top-0 z-10"},Y={class:"flex-1"},Z={class:"text-sm font-semibold text-foreground"},ee={class:"flex items-center gap-2.5"},te={class:"h-7 w-7 rounded-full bg-primary/15 ring-1 ring-primary/25 flex items-center justify-center text-[10px] font-bold text-primary shrink-0"},re={class:"hidden sm:block text-xs font-medium text-foreground max-w-[120px] truncate"},oe=C({__name:"TopBar",props:{title:{},sidebarOpen:{type:Boolean}},emits:["toggleSidebar","toggleDark"],setup(w,{emit:x}){const a=x,i=M(),k=R();async function u(){await i.logout(),L.success("Logged out"),k.push({name:"login"})}function m(){const o=document.documentElement.classList.toggle("dark");localStorage.setItem("theme",o?"dark":"light"),a("toggleDark")}return(o,l)=>{var h,t,p,g;return s(),n("header",X,[e("button",{class:"lg:hidden flex h-9 w-9 items-center justify-center rounded-lg text-muted-foreground hover:bg-muted hover:text-foreground transition-colors","aria-label":"Toggle sidebar",onClick:l[0]||(l[0]=r=>a("toggleSidebar"))},[...l[1]||(l[1]=[e("svg",{class:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 6h16M4 12h16M4 18h16"})],-1)])]),e("div",Y,[e("h1",Z,v(w.title??"CC Dashboard"),1)]),D(o.$slots,"actions"),e("button",{class:"flex h-9 w-9 items-center justify-center rounded-lg text-muted-foreground hover:bg-muted hover:text-foreground transition-colors","aria-label":"Toggle dark mode",onClick:m},[...l[2]||(l[2]=[e("svg",{class:"h-4 w-4 hidden dark:block",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"})],-1),e("svg",{class:"h-4 w-4 dark:hidden",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z"})],-1)])]),l[4]||(l[4]=e("div",{class:"h-6 w-px bg-border"},null,-1)),e("div",ee,[e("div",te,v((((h=c(i).user)==null?void 0:h.username)??((t=c(i).user)==null?void 0:t.email)??"?").slice(0,2).toUpperCase()),1),e("span",re,v(((p=c(i).user)==null?void 0:p.username)??((g=c(i).user)==null?void 0:g.email)),1),e("button",{class:"flex h-7 items-center gap-1 rounded-md px-2 text-xs text-muted-foreground hover:bg-muted hover:text-foreground transition-colors",onClick:u},[...l[3]||(l[3]=[e("svg",{class:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"})],-1),T(" Sign out ",-1)])])])])}}}),se={class:"h-screen flex overflow-hidden bg-background"},ne={class:"flex-1 flex flex-col overflow-hidden min-w-0"},ae={class:"flex-1 overflow-y-auto"},de=C({__name:"AppLayout",setup(w){const x=_(),a=I(!1),i=y(()=>({dashboard:"Dashboard",calendar:"Calendar",planner:"Planner",projects:"Projects","project-detail":"Project Details",live:"Live Feed",reports:"AI Reports",keys:"API Keys",settings:"Settings",admin:"Admin"})[x.name]??"CC Dashboard");return(k,u)=>{const m=P("RouterView");return s(),n("div",se,[f(O,{"enter-active-class":"transition-opacity duration-200","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"transition-opacity duration-200","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:j(()=>[a.value?(s(),n("div",{key:0,class:"fixed inset-0 z-20 bg-black/60 lg:hidden",onClick:u[0]||(u[0]=o=>a.value=!1)})):b("",!0)]),_:1}),e("div",{class:d(["fixed inset-y-0 left-0 z-30 w-60 transform transition-transform duration-300 lg:relative lg:translate-x-0",a.value?"translate-x-0":"-translate-x-full"])},[f(Q,{onClose:u[1]||(u[1]=o=>a.value=!1)})],2),e("div",ne,[f(oe,{title:i.value,"sidebar-open":a.value,onToggleSidebar:u[2]||(u[2]=o=>a.value=!a.value)},null,8,["title","sidebar-open"]),e("main",ae,[f(m)])])])}}});export{de as default}; diff --git a/src/static/assets/AppLayout-wYWKlGO6.js b/src/static/assets/AppLayout-wYWKlGO6.js new file mode 100644 index 0000000..7946efa --- /dev/null +++ b/src/static/assets/AppLayout-wYWKlGO6.js @@ -0,0 +1 @@ +import{d as C,u as M,c as n,b as _,a as e,F as z,r as V,t as g,h as p,j as b,o as r,k as $,w as j,i as y,n as d,m as A,l as H,R as S,g as B,p as D,q as T,K as L,f as R,e as m,T as O,s as I,v as P}from"./index-DVV3ZbZ2.js";const N={class:"flex flex-col h-full bg-white border-r border-slate-200/80"},F={class:"flex-1 px-3 py-4 space-y-0.5 overflow-y-auto"},K={key:0,class:"absolute left-0 top-1/2 -translate-y-1/2 w-1 h-6 bg-orange-500 rounded-r-full"},q={class:"text-sm"},E={class:"p-4 border-t border-slate-100 shrink-0"},U={class:"flex items-center gap-3 px-2 py-2 rounded-xl bg-slate-50"},W={class:"h-8 w-8 rounded-full bg-gradient-to-br from-orange-400 to-orange-600 flex items-center justify-center text-[11px] font-bold text-white shrink-0 shadow-sm shadow-orange-200"},G={class:"flex-1 min-w-0"},J={class:"text-xs font-semibold text-slate-700 truncate"},Q=C({__name:"Sidebar",emits:["close"],setup(w,{emit:v}){const a=B(),l=M(),x=v,u=[{name:"Dashboard",path:"/",icon:"grid"},{name:"Calendar",path:"/calendar",icon:"calendar"},{name:"Tasks",path:"/board/",icon:"check-square",external:!0},{name:"Projects",path:"/projects",icon:"folder"},{name:"Live Feed",path:"/live",icon:"activity"},{name:"Reports",path:"/reports",icon:"file-text"},{name:"Keys",path:"/keys",icon:"key"},{name:"DevOps",path:"/devops",icon:"devops"},{name:"Settings",path:"/settings",icon:"settings"},{name:"Admin",path:"/admin",icon:"shield",adminOnly:!0}],k=b(()=>u.filter(c=>!c.adminOnly||l.isAdmin));function s(c){return c==="/"?a.path==="/":a.path.startsWith(c)}const i=b(()=>{var t,h;return(((t=l.user)==null?void 0:t.username)??((h=l.user)==null?void 0:h.email)??"?").slice(0,2).toUpperCase()});return(c,t)=>{var h,f;return r(),n("aside",N,[t[12]||(t[12]=_('

CC Dashboard

Oliver Agency

',1)),e("nav",F,[(r(!0),n(z,null,V(k.value,o=>(r(),$(H(o.external?"a":p(S)),A({key:o.path},{ref_for:!0},o.external?{href:o.path,target:"_blank",rel:"noopener"}:{to:o.path},{class:["relative flex items-center gap-3 px-3 h-10 rounded-xl text-sm font-medium transition-all duration-200 group",s(o.path)?"bg-orange-50 text-orange-600":"text-slate-500 hover:bg-slate-50 hover:text-slate-800"],onClick:t[0]||(t[0]=le=>x("close"))}),{default:j(()=>[s(o.path)?(r(),n("span",K)):y("",!0),o.icon==="grid"?(r(),n("svg",{key:1,class:d(["h-4 w-4 shrink-0 transition-colors",s(o.path)?"text-orange-500":"text-slate-400 group-hover:text-slate-600"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...t[1]||(t[1]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"},null,-1)])],2)):o.icon==="calendar"?(r(),n("svg",{key:2,class:d(["h-4 w-4 shrink-0",s(o.path)?"text-orange-500":"text-slate-400 group-hover:text-slate-600"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...t[2]||(t[2]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"},null,-1)])],2)):o.icon==="check-square"?(r(),n("svg",{key:3,class:d(["h-4 w-4 shrink-0",s(o.path)?"text-orange-500":"text-slate-400 group-hover:text-slate-600"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...t[3]||(t[3]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"},null,-1)])],2)):o.icon==="folder"?(r(),n("svg",{key:4,class:d(["h-4 w-4 shrink-0",s(o.path)?"text-orange-500":"text-slate-400 group-hover:text-slate-600"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...t[4]||(t[4]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 7a2 2 0 012-2h3.586a1 1 0 01.707.293l1.414 1.414A1 1 0 0011.414 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V7z"},null,-1)])],2)):o.icon==="activity"?(r(),n("svg",{key:5,class:d(["h-4 w-4 shrink-0",s(o.path)?"text-orange-500":"text-slate-400 group-hover:text-slate-600"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...t[5]||(t[5]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 10V3L4 14h7v7l9-11h-7z"},null,-1)])],2)):o.icon==="file-text"?(r(),n("svg",{key:6,class:d(["h-4 w-4 shrink-0",s(o.path)?"text-orange-500":"text-slate-400 group-hover:text-slate-600"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...t[6]||(t[6]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"},null,-1)])],2)):o.icon==="key"?(r(),n("svg",{key:7,class:d(["h-4 w-4 shrink-0",s(o.path)?"text-orange-500":"text-slate-400 group-hover:text-slate-600"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...t[7]||(t[7]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"},null,-1)])],2)):o.icon==="devops"?(r(),n("svg",{key:8,class:d(["h-4 w-4 shrink-0",s(o.path)?"text-orange-500":"text-slate-400 group-hover:text-slate-600"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...t[8]||(t[8]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4"},null,-1)])],2)):o.icon==="settings"?(r(),n("svg",{key:9,class:d(["h-4 w-4 shrink-0",s(o.path)?"text-orange-500":"text-slate-400 group-hover:text-slate-600"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...t[9]||(t[9]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"},null,-1),e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"},null,-1)])],2)):o.icon==="shield"?(r(),n("svg",{key:10,class:d(["h-4 w-4 shrink-0",s(o.path)?"text-orange-500":"text-slate-400 group-hover:text-slate-600"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...t[10]||(t[10]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"},null,-1)])],2)):y("",!0),e("span",q,g(o.name),1)]),_:2},1040,["class"]))),128))]),e("div",E,[e("div",U,[e("div",W,g(i.value),1),e("div",G,[e("p",J,g(((h=p(l).user)==null?void 0:h.username)??((f=p(l).user)==null?void 0:f.email)),1),t[11]||(t[11]=e("div",{class:"flex items-center gap-1 mt-0.5"},[e("div",{class:"h-1.5 w-1.5 rounded-full bg-emerald-400"}),e("span",{class:"text-[10px] text-slate-400 font-medium"},"Online")],-1))])])])])}}}),X={class:"h-14 border-b border-slate-200/80 bg-white/80 backdrop-blur-xl flex items-center px-4 gap-3 shrink-0 sticky top-0 z-10 shadow-sm shadow-slate-100/60"},Y={class:"flex-1"},Z={class:"text-sm font-semibold text-foreground"},ee={class:"flex items-center gap-2.5"},te={class:"h-7 w-7 rounded-full bg-gradient-to-br from-orange-400 to-orange-600 flex items-center justify-center text-[10px] font-bold text-white shrink-0 shadow-sm shadow-orange-200"},oe={class:"hidden sm:block text-xs font-medium text-foreground max-w-[120px] truncate"},se=C({__name:"TopBar",props:{title:{},sidebarOpen:{type:Boolean}},emits:["toggleSidebar","toggleDark"],setup(w,{emit:v}){const a=v,l=M(),x=R();async function u(){await l.logout(),L.success("Logged out"),x.push({name:"login"})}function k(){const s=document.documentElement.classList.toggle("dark");localStorage.setItem("theme",s?"dark":"light"),a("toggleDark")}return(s,i)=>{var c,t,h,f;return r(),n("header",X,[e("button",{class:"lg:hidden flex h-9 w-9 items-center justify-center rounded-lg text-muted-foreground hover:bg-muted hover:text-foreground transition-colors","aria-label":"Toggle sidebar",onClick:i[0]||(i[0]=o=>a("toggleSidebar"))},[...i[1]||(i[1]=[e("svg",{class:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 6h16M4 12h16M4 18h16"})],-1)])]),e("div",Y,[e("h1",Z,g(w.title??"CC Dashboard"),1)]),D(s.$slots,"actions"),e("button",{class:"flex h-9 w-9 items-center justify-center rounded-lg text-muted-foreground hover:bg-muted hover:text-foreground transition-colors","aria-label":"Toggle dark mode",onClick:k},[...i[2]||(i[2]=[e("svg",{class:"h-4 w-4 hidden dark:block",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"})],-1),e("svg",{class:"h-4 w-4 dark:hidden",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z"})],-1)])]),i[4]||(i[4]=e("div",{class:"h-6 w-px bg-border"},null,-1)),e("div",ee,[e("div",te,g((((c=p(l).user)==null?void 0:c.username)??((t=p(l).user)==null?void 0:t.email)??"?").slice(0,2).toUpperCase()),1),e("span",oe,g(((h=p(l).user)==null?void 0:h.username)??((f=p(l).user)==null?void 0:f.email)),1),e("button",{class:"flex h-7 items-center gap-1 rounded-md px-2 text-xs text-muted-foreground hover:bg-muted hover:text-foreground transition-colors",onClick:u},[...i[3]||(i[3]=[e("svg",{class:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"})],-1),T(" Sign out ",-1)])])])])}}}),re={class:"h-screen flex overflow-hidden",style:{background:"linear-gradient(135deg, #f0f4fa 0%, #f8f9fd 50%, #fef9f5 100%)"}},ne={class:"flex-1 flex flex-col overflow-hidden min-w-0"},ae={class:"flex-1 overflow-y-auto"},de=C({__name:"AppLayout",setup(w){const v=B(),a=I(!1),l=b(()=>({dashboard:"Dashboard",calendar:"Calendar",planner:"Planner",projects:"Projects","project-detail":"Project Details",live:"Live Feed",reports:"AI Reports",keys:"API Keys",settings:"Settings",admin:"Admin"})[v.name]??"CC Dashboard");return(x,u)=>{const k=P("RouterView");return r(),n("div",re,[m(O,{"enter-active-class":"transition-opacity duration-200","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"transition-opacity duration-200","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:j(()=>[a.value?(r(),n("div",{key:0,class:"fixed inset-0 z-20 bg-black/60 lg:hidden",onClick:u[0]||(u[0]=s=>a.value=!1)})):y("",!0)]),_:1}),e("div",{class:d(["fixed inset-y-0 left-0 z-30 w-60 transform transition-transform duration-300 lg:relative lg:translate-x-0",a.value?"translate-x-0":"-translate-x-full"])},[m(Q,{onClose:u[1]||(u[1]=s=>a.value=!1)})],2),e("div",ne,[m(se,{title:l.value,"sidebar-open":a.value,onToggleSidebar:u[2]||(u[2]=s=>a.value=!a.value)},null,8,["title","sidebar-open"]),e("main",ae,[m(k)])])])}}});export{de as default}; diff --git a/src/static/assets/Badge.vue_vue_type_script_setup_true_lang-B2H6z2RD.js b/src/static/assets/Badge.vue_vue_type_script_setup_true_lang-WigJUOyH.js similarity index 91% rename from src/static/assets/Badge.vue_vue_type_script_setup_true_lang-B2H6z2RD.js rename to src/static/assets/Badge.vue_vue_type_script_setup_true_lang-WigJUOyH.js index 035e6c3..be33d74 100644 --- a/src/static/assets/Badge.vue_vue_type_script_setup_true_lang-B2H6z2RD.js +++ b/src/static/assets/Badge.vue_vue_type_script_setup_true_lang-WigJUOyH.js @@ -1 +1 @@ -import{c as a}from"./utils-7WVCegLb.js";import{d as n,o,c as s,n as d,h as i,p as c}from"./index-BP_aNEdP.js";const f=n({__name:"Badge",props:{variant:{default:"default"},class:{}},setup(r){const e=r;return(t,l)=>(o(),s("span",{class:d(i(a)("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold transition-colors",{"bg-primary text-primary-foreground":e.variant==="default","bg-secondary text-secondary-foreground":e.variant==="secondary","bg-destructive text-destructive-foreground":e.variant==="destructive","border border-border text-foreground":e.variant==="outline","bg-emerald-500/20 text-emerald-400":e.variant==="success","bg-amber-500/20 text-amber-400":e.variant==="warning"},e.class))},[c(t.$slots,"default")],2))}});export{f as _}; +import{c as a}from"./utils-7WVCegLb.js";import{d as n,o,c as s,n as d,h as i,p as c}from"./index-DVV3ZbZ2.js";const f=n({__name:"Badge",props:{variant:{default:"default"},class:{}},setup(r){const e=r;return(t,l)=>(o(),s("span",{class:d(i(a)("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold transition-colors",{"bg-primary text-primary-foreground":e.variant==="default","bg-secondary text-secondary-foreground":e.variant==="secondary","bg-destructive text-destructive-foreground":e.variant==="destructive","border border-border text-foreground":e.variant==="outline","bg-emerald-500/20 text-emerald-400":e.variant==="success","bg-amber-500/20 text-amber-400":e.variant==="warning"},e.class))},[c(t.$slots,"default")],2))}});export{f as _}; diff --git a/src/static/assets/Button.vue_vue_type_script_setup_true_lang-B_YE_XNW.js b/src/static/assets/Button.vue_vue_type_script_setup_true_lang-ClV4YfXb.js similarity index 91% rename from src/static/assets/Button.vue_vue_type_script_setup_true_lang-B_YE_XNW.js rename to src/static/assets/Button.vue_vue_type_script_setup_true_lang-ClV4YfXb.js index 2b5bfc5..99cdf8f 100644 --- a/src/static/assets/Button.vue_vue_type_script_setup_true_lang-B_YE_XNW.js +++ b/src/static/assets/Button.vue_vue_type_script_setup_true_lang-ClV4YfXb.js @@ -1 +1 @@ -import{_ as c}from"./Spinner.vue_vue_type_script_setup_true_lang-Cu49-Cc4.js";import{c as l}from"./utils-7WVCegLb.js";import{d as u,c as f,n as m,k as b,i as v,p as g,j as p,o as n}from"./index-BP_aNEdP.js";const y=["type","disabled"],z=u({__name:"Button",props:{variant:{default:"default"},size:{default:"md"},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},type:{default:"button"},class:{}},emits:["click"],setup(t,{emit:s}){const e=t,a=s,r=p(()=>l("inline-flex items-center justify-center rounded-md font-medium 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",{"bg-primary text-primary-foreground hover:bg-primary/90":e.variant==="default","border border-input bg-background hover:bg-accent hover:text-accent-foreground":e.variant==="outline","hover:bg-accent hover:text-accent-foreground":e.variant==="ghost","bg-destructive text-destructive-foreground hover:bg-destructive/90":e.variant==="destructive","bg-secondary text-secondary-foreground hover:bg-secondary/80":e.variant==="secondary","underline-offset-4 hover:underline text-primary":e.variant==="link","h-8 px-3 text-xs":e.size==="sm","h-10 px-4 py-2 text-sm":e.size==="md","h-11 px-8 text-base":e.size==="lg","h-9 w-9 p-0":e.size==="icon"},e.class));return(i,o)=>(n(),f("button",{class:m(r.value),type:t.type,disabled:t.disabled||t.loading,onClick:o[0]||(o[0]=d=>a("click",d))},[t.loading?(n(),b(c,{key:0,size:"sm",class:"mr-2"})):v("",!0),g(i.$slots,"default")],10,y))}});export{z as _}; +import{_ as c}from"./Spinner.vue_vue_type_script_setup_true_lang-BkmDerVR.js";import{c as l}from"./utils-7WVCegLb.js";import{d as u,c as f,n as m,k as b,i as v,p as g,j as p,o as n}from"./index-DVV3ZbZ2.js";const y=["type","disabled"],z=u({__name:"Button",props:{variant:{default:"default"},size:{default:"md"},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},type:{default:"button"},class:{}},emits:["click"],setup(t,{emit:s}){const e=t,a=s,r=p(()=>l("inline-flex items-center justify-center rounded-md font-medium 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",{"bg-primary text-primary-foreground hover:bg-primary/90":e.variant==="default","border border-input bg-background hover:bg-accent hover:text-accent-foreground":e.variant==="outline","hover:bg-accent hover:text-accent-foreground":e.variant==="ghost","bg-destructive text-destructive-foreground hover:bg-destructive/90":e.variant==="destructive","bg-secondary text-secondary-foreground hover:bg-secondary/80":e.variant==="secondary","underline-offset-4 hover:underline text-primary":e.variant==="link","h-8 px-3 text-xs":e.size==="sm","h-10 px-4 py-2 text-sm":e.size==="md","h-11 px-8 text-base":e.size==="lg","h-9 w-9 p-0":e.size==="icon"},e.class));return(i,o)=>(n(),f("button",{class:m(r.value),type:t.type,disabled:t.disabled||t.loading,onClick:o[0]||(o[0]=d=>a("click",d))},[t.loading?(n(),b(c,{key:0,size:"sm",class:"mr-2"})):v("",!0),g(i.$slots,"default")],10,y))}});export{z as _}; diff --git a/src/static/assets/CalendarView-njGDFx7r.js b/src/static/assets/CalendarView-9h-6kWBL.js similarity index 56% rename from src/static/assets/CalendarView-njGDFx7r.js rename to src/static/assets/CalendarView-9h-6kWBL.js index d794928..03d7a64 100644 --- a/src/static/assets/CalendarView-njGDFx7r.js +++ b/src/static/assets/CalendarView-9h-6kWBL.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/tasks-OhvhAG_3.js","assets/index-BP_aNEdP.js","assets/index-Bq2H3vqg.css"])))=>i.map(i=>d[i]); -import{C as We,s as T,j as Y,d as N,o as v,c as b,a as u,e as S,w as C,q as Z,t as D,h as w,i as $,n as E,B as H,D as he,F as B,r as j,k as Ee,y as ge,p as Ie,E as Re,x as Ae,g as Qe,_ as Xe,K as A,f as Ge}from"./index-BP_aNEdP.js";import{d as Ue}from"./dashboard-CviKGUv7.js";import{i as O,f as re,c as Ve}from"./utils-7WVCegLb.js";import{_ as G}from"./Button.vue_vue_type_script_setup_true_lang-B_YE_XNW.js";import{u as ve}from"./tasks-OhvhAG_3.js";import{_ as Je}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{_ as Ke}from"./Badge.vue_vue_type_script_setup_true_lang-B2H6z2RD.js";import{_ as Ze}from"./Dialog.vue_vue_type_script_setup_true_lang-v8iqnRk8.js";import{_ as U}from"./Input.vue_vue_type_script_setup_true_lang-SeygKlpx.js";import{u as et}from"./devops-DxRDHPW5.js";import"./Spinner.vue_vue_type_script_setup_true_lang-Cu49-Cc4.js";const oe=40/30;function tt(e){if(e.length===0)return[];const n=[...e].sort((s,i)=>new Date(s.start_at).getTime()-new Date(i.start_at).getTime()),t=[],a=[];for(const s of n){const i=new Date(s.start_at).getTime(),d=new Date(s.end_at).getTime();let l=-1;for(let h=0;h{const d=new Date(s.start_at).getTime(),l=new Date(s.end_at).getTime();let h=i;for(const o of a){const c=new Date(o.block.start_at).getTime(),y=new Date(o.block.end_at).getTime();cd&&o.lane>h&&(h=o.lane)}return{block:s,lane:i,totalLanes:h+1}})}function nt(e,n=7){return((e.getHours()-n)*60+e.getMinutes())*oe}function at(e,n){const t=(n.getTime()-e.getTime())/6e4;return Math.max(t*oe,20)}function De(e,n=7){const t=e.getDay(),a=new Date(e);return a.setDate(e.getDate()-(t+6)%7),a.setHours(0,0,0,0),Array.from({length:n},(r,s)=>{const i=new Date(a);return i.setDate(a.getDate()+s),i})}function Me(e,n=15){return Math.round(e/n)*n}const te=We("calendar",()=>{const e=T([]),n=T(new Date),t=T("week"),a=T(7),r=T(!1),s=T(null),i=Y(()=>De(n.value,a.value));async function d(f,p,M){r.value=!0,s.value=null;try{const W=await Ue.calendar({from:f,to:p,view:M});e.value=W.data}catch(W){const ne=W;s.value=ne.message??"Failed to fetch calendar"}finally{r.value=!1}}function l(f){a.value=f}async function h(){if(t.value==="week"){const f=De(n.value,a.value),p=O(f[0]),M=O(f[a.value-1]);await d(p,M,"week")}else{const f=O(n.value);await d(f,f,"day")}}function o(){const f=new Date(n.value);t.value==="week"?f.setDate(f.getDate()-7):f.setDate(f.getDate()-1),n.value=f}function c(){const f=new Date(n.value);t.value==="week"?f.setDate(f.getDate()+7):f.setDate(f.getDate()+1),n.value=f}function y(){n.value=new Date}function k(f){t.value=f}function x(f){e.value.push(f)}function g(f){const p=e.value.findIndex(M=>M.id===f.id);p!==-1&&(e.value[p]=f)}function m(f){e.value=e.value.filter(p=>p.id!==f)}function P(f){const p=O(f);return e.value.filter(M=>O(new Date(M.start_at))===p)}return{blocks:e,currentDate:n,view:t,weekLength:a,loading:r,error:s,weekDays:i,fetch:d,fetchCurrentView:h,navigatePrev:o,navigateNext:c,goToToday:y,setView:k,setWeekLength:l,addBlock:x,updateBlock:g,removeBlock:m,getBlocksForDay:P}});function V(e){const n=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&n==="[object Date]"?new e.constructor(+e):typeof e=="number"||n==="[object Number]"||typeof e=="string"||n==="[object String]"?new Date(e):new Date(NaN)}function I(e,n){return e instanceof Date?new e.constructor(n):new Date(n)}const Ye=6048e5,rt=864e5;let ot={};function ie(){return ot}function ee(e,n){var d,l,h,o;const t=ie(),a=(n==null?void 0:n.weekStartsOn)??((l=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:l.weekStartsOn)??t.weekStartsOn??((o=(h=t.locale)==null?void 0:h.options)==null?void 0:o.weekStartsOn)??0,r=V(e),s=r.getDay(),i=(s=r.getTime()?t+1:n.getTime()>=i.getTime()?t:t-1}function Se(e){const n=V(e);return n.setHours(0,0,0,0),n}function Te(e){const n=V(e),t=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return t.setUTCFullYear(n.getFullYear()),+e-+t}function st(e,n){const t=Se(e),a=Se(n),r=+t-Te(t),s=+a-Te(a);return Math.round((r-s)/rt)}function it(e){const n=Be(e),t=I(e,0);return t.setFullYear(n,0,4),t.setHours(0,0,0,0),se(t)}function ut(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function lt(e){if(!ut(e)&&typeof e!="number")return!1;const n=V(e);return!isNaN(Number(n))}function dt(e){const n=V(e),t=I(e,0);return t.setFullYear(n.getFullYear(),0,1),t.setHours(0,0,0,0),t}const ct={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},mt=(e,n,t)=>{let a;const r=ct[e];return typeof r=="string"?a=r:n===1?a=r.one:a=r.other.replace("{{count}}",n.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+a:a+" ago":a};function me(e){return(n={})=>{const t=n.width?String(n.width):e.defaultWidth;return e.formats[t]||e.formats[e.defaultWidth]}}const ft={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ht={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},gt={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},vt={date:me({formats:ft,defaultWidth:"full"}),time:me({formats:ht,defaultWidth:"full"}),dateTime:me({formats:gt,defaultWidth:"full"})},bt={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},wt=(e,n,t,a)=>bt[e];function J(e){return(n,t)=>{const a=t!=null&&t.context?String(t.context):"standalone";let r;if(a==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,d=t!=null&&t.width?String(t.width):i;r=e.formattingValues[d]||e.formattingValues[i]}else{const i=e.defaultWidth,d=t!=null&&t.width?String(t.width):e.defaultWidth;r=e.values[d]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(n):n;return r[s]}}const yt={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},pt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},kt={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},xt={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},_t={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Dt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Mt=(e,n)=>{const t=Number(e),a=t%100;if(a>20||a<10)switch(a%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},St={ordinalNumber:Mt,era:J({values:yt,defaultWidth:"wide"}),quarter:J({values:pt,defaultWidth:"wide",argumentCallback:e=>e-1}),month:J({values:kt,defaultWidth:"wide"}),day:J({values:xt,defaultWidth:"wide"}),dayPeriod:J({values:_t,defaultWidth:"wide",formattingValues:Dt,defaultFormattingWidth:"wide"})};function K(e){return(n,t={})=>{const a=t.width,r=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],s=n.match(r);if(!s)return null;const i=s[0],d=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(d)?Pt(d,c=>c.test(i)):Tt(d,c=>c.test(i));let h;h=e.valueCallback?e.valueCallback(l):l,h=t.valueCallback?t.valueCallback(h):h;const o=n.slice(i.length);return{value:h,rest:o}}}function Tt(e,n){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&n(e[t]))return t}function Pt(e,n){for(let t=0;t{const a=n.match(e.matchPattern);if(!a)return null;const r=a[0],s=n.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=t.valueCallback?t.valueCallback(i):i;const d=n.slice(r.length);return{value:i,rest:d}}}const Ot=/^(\d+)(th|st|nd|rd)?/i,Ct=/\d+/i,Wt={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Et={any:[/^b/i,/^(a|c)/i]},Vt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Yt={any:[/1/i,/2/i,/3/i,/4/i]},Bt={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},jt={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Ft={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Lt={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Nt={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},zt={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Ht={ordinalNumber:$t({matchPattern:Ot,parsePattern:Ct,valueCallback:e=>parseInt(e,10)}),era:K({matchPatterns:Wt,defaultMatchWidth:"wide",parsePatterns:Et,defaultParseWidth:"any"}),quarter:K({matchPatterns:Vt,defaultMatchWidth:"wide",parsePatterns:Yt,defaultParseWidth:"any",valueCallback:e=>e+1}),month:K({matchPatterns:Bt,defaultMatchWidth:"wide",parsePatterns:jt,defaultParseWidth:"any"}),day:K({matchPatterns:Ft,defaultMatchWidth:"wide",parsePatterns:Lt,defaultParseWidth:"any"}),dayPeriod:K({matchPatterns:Nt,defaultMatchWidth:"any",parsePatterns:zt,defaultParseWidth:"any"})},qt={code:"en-US",formatDistance:mt,formatLong:vt,formatRelative:wt,localize:St,match:Ht,options:{weekStartsOn:0,firstWeekContainsDate:1}};function It(e){const n=V(e);return st(n,dt(n))+1}function Rt(e){const n=V(e),t=+se(n)-+it(n);return Math.round(t/Ye)+1}function je(e,n){var o,c,y,k;const t=V(e),a=t.getFullYear(),r=ie(),s=(n==null?void 0:n.firstWeekContainsDate)??((c=(o=n==null?void 0:n.locale)==null?void 0:o.options)==null?void 0:c.firstWeekContainsDate)??r.firstWeekContainsDate??((k=(y=r.locale)==null?void 0:y.options)==null?void 0:k.firstWeekContainsDate)??1,i=I(e,0);i.setFullYear(a+1,0,s),i.setHours(0,0,0,0);const d=ee(i,n),l=I(e,0);l.setFullYear(a,0,s),l.setHours(0,0,0,0);const h=ee(l,n);return t.getTime()>=d.getTime()?a+1:t.getTime()>=h.getTime()?a:a-1}function At(e,n){var d,l,h,o;const t=ie(),a=(n==null?void 0:n.firstWeekContainsDate)??((l=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:l.firstWeekContainsDate)??t.firstWeekContainsDate??((o=(h=t.locale)==null?void 0:h.options)==null?void 0:o.firstWeekContainsDate)??1,r=je(e,n),s=I(e,0);return s.setFullYear(r,0,a),s.setHours(0,0,0,0),ee(s,n)}function Qt(e,n){const t=V(e),a=+ee(t,n)-+At(t,n);return Math.round(a/Ye)+1}function _(e,n){const t=e<0?"-":"",a=Math.abs(e).toString().padStart(n,"0");return t+a}const F={y(e,n){const t=e.getFullYear(),a=t>0?t:1-t;return _(n==="yy"?a%100:a,n.length)},M(e,n){const t=e.getMonth();return n==="M"?String(t+1):_(t+1,2)},d(e,n){return _(e.getDate(),n.length)},a(e,n){const t=e.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(e,n){return _(e.getHours()%12||12,n.length)},H(e,n){return _(e.getHours(),n.length)},m(e,n){return _(e.getMinutes(),n.length)},s(e,n){return _(e.getSeconds(),n.length)},S(e,n){const t=n.length,a=e.getMilliseconds(),r=Math.trunc(a*Math.pow(10,t-3));return _(r,n.length)}},Q={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Pe={G:function(e,n,t){const a=e.getFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return t.era(a,{width:"abbreviated"});case"GGGGG":return t.era(a,{width:"narrow"});case"GGGG":default:return t.era(a,{width:"wide"})}},y:function(e,n,t){if(n==="yo"){const a=e.getFullYear(),r=a>0?a:1-a;return t.ordinalNumber(r,{unit:"year"})}return F.y(e,n)},Y:function(e,n,t,a){const r=je(e,a),s=r>0?r:1-r;if(n==="YY"){const i=s%100;return _(i,2)}return n==="Yo"?t.ordinalNumber(s,{unit:"year"}):_(s,n.length)},R:function(e,n){const t=Be(e);return _(t,n.length)},u:function(e,n){const t=e.getFullYear();return _(t,n.length)},Q:function(e,n,t){const a=Math.ceil((e.getMonth()+1)/3);switch(n){case"Q":return String(a);case"QQ":return _(a,2);case"Qo":return t.ordinalNumber(a,{unit:"quarter"});case"QQQ":return t.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(a,{width:"wide",context:"formatting"})}},q:function(e,n,t){const a=Math.ceil((e.getMonth()+1)/3);switch(n){case"q":return String(a);case"qq":return _(a,2);case"qo":return t.ordinalNumber(a,{unit:"quarter"});case"qqq":return t.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(a,{width:"wide",context:"standalone"})}},M:function(e,n,t){const a=e.getMonth();switch(n){case"M":case"MM":return F.M(e,n);case"Mo":return t.ordinalNumber(a+1,{unit:"month"});case"MMM":return t.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(a,{width:"wide",context:"formatting"})}},L:function(e,n,t){const a=e.getMonth();switch(n){case"L":return String(a+1);case"LL":return _(a+1,2);case"Lo":return t.ordinalNumber(a+1,{unit:"month"});case"LLL":return t.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(a,{width:"wide",context:"standalone"})}},w:function(e,n,t,a){const r=Qt(e,a);return n==="wo"?t.ordinalNumber(r,{unit:"week"}):_(r,n.length)},I:function(e,n,t){const a=Rt(e);return n==="Io"?t.ordinalNumber(a,{unit:"week"}):_(a,n.length)},d:function(e,n,t){return n==="do"?t.ordinalNumber(e.getDate(),{unit:"date"}):F.d(e,n)},D:function(e,n,t){const a=It(e);return n==="Do"?t.ordinalNumber(a,{unit:"dayOfYear"}):_(a,n.length)},E:function(e,n,t){const a=e.getDay();switch(n){case"E":case"EE":case"EEE":return t.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(a,{width:"short",context:"formatting"});case"EEEE":default:return t.day(a,{width:"wide",context:"formatting"})}},e:function(e,n,t,a){const r=e.getDay(),s=(r-a.weekStartsOn+8)%7||7;switch(n){case"e":return String(s);case"ee":return _(s,2);case"eo":return t.ordinalNumber(s,{unit:"day"});case"eee":return t.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(r,{width:"short",context:"formatting"});case"eeee":default:return t.day(r,{width:"wide",context:"formatting"})}},c:function(e,n,t,a){const r=e.getDay(),s=(r-a.weekStartsOn+8)%7||7;switch(n){case"c":return String(s);case"cc":return _(s,n.length);case"co":return t.ordinalNumber(s,{unit:"day"});case"ccc":return t.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(r,{width:"narrow",context:"standalone"});case"cccccc":return t.day(r,{width:"short",context:"standalone"});case"cccc":default:return t.day(r,{width:"wide",context:"standalone"})}},i:function(e,n,t){const a=e.getDay(),r=a===0?7:a;switch(n){case"i":return String(r);case"ii":return _(r,n.length);case"io":return t.ordinalNumber(r,{unit:"day"});case"iii":return t.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(a,{width:"short",context:"formatting"});case"iiii":default:return t.day(a,{width:"wide",context:"formatting"})}},a:function(e,n,t){const r=e.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,n,t){const a=e.getHours();let r;switch(a===12?r=Q.noon:a===0?r=Q.midnight:r=a/12>=1?"pm":"am",n){case"b":case"bb":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,n,t){const a=e.getHours();let r;switch(a>=17?r=Q.evening:a>=12?r=Q.afternoon:a>=4?r=Q.morning:r=Q.night,n){case"B":case"BB":case"BBB":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,n,t){if(n==="ho"){let a=e.getHours()%12;return a===0&&(a=12),t.ordinalNumber(a,{unit:"hour"})}return F.h(e,n)},H:function(e,n,t){return n==="Ho"?t.ordinalNumber(e.getHours(),{unit:"hour"}):F.H(e,n)},K:function(e,n,t){const a=e.getHours()%12;return n==="Ko"?t.ordinalNumber(a,{unit:"hour"}):_(a,n.length)},k:function(e,n,t){let a=e.getHours();return a===0&&(a=24),n==="ko"?t.ordinalNumber(a,{unit:"hour"}):_(a,n.length)},m:function(e,n,t){return n==="mo"?t.ordinalNumber(e.getMinutes(),{unit:"minute"}):F.m(e,n)},s:function(e,n,t){return n==="so"?t.ordinalNumber(e.getSeconds(),{unit:"second"}):F.s(e,n)},S:function(e,n){return F.S(e,n)},X:function(e,n,t){const a=e.getTimezoneOffset();if(a===0)return"Z";switch(n){case"X":return Oe(a);case"XXXX":case"XX":return z(a);case"XXXXX":case"XXX":default:return z(a,":")}},x:function(e,n,t){const a=e.getTimezoneOffset();switch(n){case"x":return Oe(a);case"xxxx":case"xx":return z(a);case"xxxxx":case"xxx":default:return z(a,":")}},O:function(e,n,t){const a=e.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+$e(a,":");case"OOOO":default:return"GMT"+z(a,":")}},z:function(e,n,t){const a=e.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+$e(a,":");case"zzzz":default:return"GMT"+z(a,":")}},t:function(e,n,t){const a=Math.trunc(e.getTime()/1e3);return _(a,n.length)},T:function(e,n,t){const a=e.getTime();return _(a,n.length)}};function $e(e,n=""){const t=e>0?"-":"+",a=Math.abs(e),r=Math.trunc(a/60),s=a%60;return s===0?t+String(r):t+String(r)+n+_(s,2)}function Oe(e,n){return e%60===0?(e>0?"-":"+")+_(Math.abs(e)/60,2):z(e,n)}function z(e,n=""){const t=e>0?"-":"+",a=Math.abs(e),r=_(Math.trunc(a/60),2),s=_(a%60,2);return t+r+n+s}const Ce=(e,n)=>{switch(e){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},Fe=(e,n)=>{switch(e){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},Xt=(e,n)=>{const t=e.match(/(P+)(p+)?/)||[],a=t[1],r=t[2];if(!r)return Ce(e,n);let s;switch(a){case"P":s=n.dateTime({width:"short"});break;case"PP":s=n.dateTime({width:"medium"});break;case"PPP":s=n.dateTime({width:"long"});break;case"PPPP":default:s=n.dateTime({width:"full"});break}return s.replace("{{date}}",Ce(a,n)).replace("{{time}}",Fe(r,n))},Gt={p:Fe,P:Xt},Ut=/^D+$/,Jt=/^Y+$/,Kt=["D","DD","YY","YYYY"];function Zt(e){return Ut.test(e)}function en(e){return Jt.test(e)}function tn(e,n,t){const a=nn(e,n,t);if(console.warn(a),Kt.includes(e))throw new RangeError(a)}function nn(e,n,t){const a=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${n}\`) for formatting ${a} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const an=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,rn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,on=/^'([^]*?)'?$/,sn=/''/g,un=/[a-zA-Z]/;function q(e,n,t){var o,c,y,k,x,g,m,P;const a=ie(),r=(t==null?void 0:t.locale)??a.locale??qt,s=(t==null?void 0:t.firstWeekContainsDate)??((c=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:c.firstWeekContainsDate)??a.firstWeekContainsDate??((k=(y=a.locale)==null?void 0:y.options)==null?void 0:k.firstWeekContainsDate)??1,i=(t==null?void 0:t.weekStartsOn)??((g=(x=t==null?void 0:t.locale)==null?void 0:x.options)==null?void 0:g.weekStartsOn)??a.weekStartsOn??((P=(m=a.locale)==null?void 0:m.options)==null?void 0:P.weekStartsOn)??0,d=V(e);if(!lt(d))throw new RangeError("Invalid time value");let l=n.match(rn).map(f=>{const p=f[0];if(p==="p"||p==="P"){const M=Gt[p];return M(f,r.formatLong)}return f}).join("").match(an).map(f=>{if(f==="''")return{isToken:!1,value:"'"};const p=f[0];if(p==="'")return{isToken:!1,value:ln(f)};if(Pe[p])return{isToken:!0,value:f};if(p.match(un))throw new RangeError("Format string contains an unescaped latin alphabet character `"+p+"`");return{isToken:!1,value:f}});r.localize.preprocessor&&(l=r.localize.preprocessor(d,l));const h={firstWeekContainsDate:s,weekStartsOn:i,locale:r};return l.map(f=>{if(!f.isToken)return f.value;const p=f.value;(!(t!=null&&t.useAdditionalWeekYearTokens)&&en(p)||!(t!=null&&t.useAdditionalDayOfYearTokens)&&Zt(p))&&tn(p,n,String(e));const M=Pe[p[0]];return M(d,p,r.localize,h)}).join("")}function ln(e){const n=e.match(on);return n?n[1].replace(sn,"'"):e}const dn={class:"flex items-center gap-2 flex-wrap"},cn={class:"flex items-center gap-1"},mn={class:"text-sm font-medium text-foreground flex-1 min-w-0 truncate"},fn={key:0,class:"text-xs text-muted-foreground"},hn={class:"flex items-center rounded-md border border-border overflow-hidden"},gn={key:1,class:"flex items-center rounded-md border border-border overflow-hidden"},vn=N({__name:"CalendarToolbar",setup(e){const n=te(),t=Y(()=>{if(n.view==="week"){const d=n.weekDays;if(!d.length)return"";const l=d[0],h=d[d.length-1];return l.getMonth()===h.getMonth()?`${q(l,"MMM d")} – ${q(h,"d, yyyy")}`:`${q(l,"MMM d")} – ${q(h,"MMM d, yyyy")}`}else return q(n.currentDate,"EEEE, MMMM d, yyyy")});async function a(d){d==="prev"?n.navigatePrev():n.navigateNext(),await n.fetchCurrentView()}async function r(){n.goToToday(),await n.fetchCurrentView()}async function s(d){n.setView(d),await n.fetchCurrentView()}async function i(d){n.setWeekLength(d),await n.fetchCurrentView()}return(d,l)=>(v(),b("div",dn,[u("div",cn,[S(G,{variant:"outline",size:"sm",onClick:l[0]||(l[0]=h=>a("prev"))},{default:C(()=>[...l[6]||(l[6]=[u("svg",{class:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[u("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"})],-1)])]),_:1}),S(G,{variant:"outline",size:"sm",onClick:r},{default:C(()=>[...l[7]||(l[7]=[Z("Today",-1)])]),_:1}),S(G,{variant:"outline",size:"sm",onClick:l[1]||(l[1]=h=>a("next"))},{default:C(()=>[...l[8]||(l[8]=[u("svg",{class:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[u("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1)])]),_:1})]),u("span",mn,D(t.value),1),w(n).loading?(v(),b("div",fn,"Loading...")):$("",!0),u("div",hn,[u("button",{class:E(["px-3 py-1.5 text-xs font-medium transition-colors",w(n).view==="day"?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted"]),onClick:l[2]||(l[2]=h=>s("day"))}," Day ",2),u("button",{class:E(["px-3 py-1.5 text-xs font-medium transition-colors",w(n).view==="week"?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted"]),onClick:l[3]||(l[3]=h=>s("week"))}," Week ",2)]),w(n).view==="week"?(v(),b("div",gn,[u("button",{class:E(["px-3 py-1.5 text-xs font-medium transition-colors",w(n).weekLength===5?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted"]),onClick:l[4]||(l[4]=h=>i(5))}," 5d ",2),u("button",{class:E(["px-3 py-1.5 text-xs font-medium transition-colors",w(n).weekLength===7?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted"]),onClick:l[5]||(l[5]=h=>i(7))}," 7d ",2)])):$("",!0)]))}}),bn=7;function Le(){const e=ve(),n=te(),t=T(null),a=T(null),r=T(null),s=T(null);function i(g,m){var P,f;t.value=g.id,(P=m.dataTransfer)==null||P.setData("task_id",g.id),(f=m.dataTransfer)==null||f.setData("estimate_hours",String(g.estimate_hours??1))}function d(g,m){var f,p,M,W;const P=new Date(g.end_at).getTime()-new Date(g.start_at).getTime();(f=m.dataTransfer)==null||f.setData("block_id",g.id),(p=m.dataTransfer)==null||p.setData("block_duration_ms",String(P)),(M=m.dataTransfer)==null||M.setData("task_id",g.task_id??""),(W=m.dataTransfer)==null||W.setData("estimate_hours",String(P/36e5))}function l(g,m){m.preventDefault(),a.value=O(g)}function h(){a.value=null}async function o(g,m){var ye,pe,ke,xe;m.preventDefault(),a.value=null,t.value=null;const P=(ye=m.dataTransfer)==null?void 0:ye.getData("block_id"),f=(pe=m.dataTransfer)==null?void 0:pe.getData("task_id"),p=parseFloat(((ke=m.dataTransfer)==null?void 0:ke.getData("estimate_hours"))??"1")||1,M=parseFloat(((xe=m.dataTransfer)==null?void 0:xe.getData("block_duration_ms"))??"0"),ne=m.currentTarget.getBoundingClientRect(),ue=m.clientY-ne.top,le=Me(ue/oe,15),Ne=Math.max(0,Math.min(le,12*60)),R=new Date(g);R.setHours(bn,0,0,0),R.setMinutes(R.getMinutes()+Ne);const de=R.toISOString();if(P&&M>0){const He=new Date(R.getTime()+M).toISOString();try{await e.updateBlock(P,{start_at:de,end_at:He}),await n.fetchCurrentView()}catch(qe){console.error("Failed to move block:",qe)}return}if(!f)return;const ce=new Date(R);ce.setMinutes(ce.getMinutes()+Math.round(p*60));const be=ce.toISOString(),we=`temp_${Date.now()}`,ze={kind:"planned",id:we,project_id:null,job_number:"",display_name:"Loading...",start_at:de,end_at:be,title:"",color_hue:260,tags:[],task_id:f,session_id:null,manual_entry_id:null};n.addBlock(ze);try{await e.createBlock(f,{start_at:de,end_at:be}),await n.fetchCurrentView()}catch(_e){n.removeBlock(we),console.error("Failed to create task block:",_e)}}let c=0,y="",k=null;function x(g,m){m.preventDefault(),m.stopPropagation(),r.value=g,k=g,c=m.clientY,y=g.end_at,s.value=g.end_at;const P=p=>{if(!k)return;const M=p.clientY-c,W=Me(M/oe,15),ue=new Date(y).getTime()+W*6e4,le=new Date(k.start_at).getTime()+15*6e4;s.value=new Date(Math.max(ue,le)).toISOString()},f=async()=>{if(document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",f),!k||!s.value){r.value=null;return}const p=k.id,M=s.value;if(M===y){r.value=null,s.value=null;return}try{k.task_id&&await e.updateBlock(p,{start_at:k.start_at,end_at:M}),n.updateBlock({...k,end_at:M})}catch(W){console.error("Failed to resize block:",W),n.updateBlock({...k,end_at:y})}r.value=null,s.value=null,k=null};document.addEventListener("mousemove",P),document.addEventListener("mouseup",f)}return{draggingTaskId:t,dragOverDay:a,resizingBlock:r,resizePreviewEnd:s,onDragStart:i,onBlockDragStart:d,onDragOver:l,onDragLeave:h,onDrop:o,onResizeStart:x}}function wn(e){return`hsla(${e}, 65%, 45%, 0.85)`}function yn(e){return`hsla(${e}, 65%, 55%, 1)`}const pn=["draggable"],kn={class:"px-1.5 py-1 h-full flex flex-col text-white overflow-hidden"},xn={class:"text-xs font-semibold leading-tight truncate"},_n={key:0,class:"text-xs opacity-75 truncate"},Dn={key:1,class:"text-xs opacity-75 mt-auto"},Mn=N({__name:"CalendarBlock",props:{block:{},lane:{},totalLanes:{},top:{},height:{},resizeEnd:{}},emits:["resizeStart","click","blockDragStart"],setup(e,{emit:n}){const t=e,a=n,r=Y(()=>t.resizeEnd?new Date(t.resizeEnd):new Date(t.block.end_at)),s=Y(()=>{if(!t.resizeEnd)return t.height;const o=(r.value.getTime()-new Date(t.block.start_at).getTime())/6e4;return Math.max(o*(40/30),20)}),i=Y(()=>{const h=r.value.getTime()-new Date(t.block.start_at).getTime();return re(h/36e5)}),d=Y(()=>{const h=`calc(${100/t.totalLanes}% - 2px)`,o=`calc(${t.lane/t.totalLanes*100}% + 1px)`;return{top:`${t.top}px`,height:`${s.value}px`,width:h,left:o,backgroundColor:wn(t.block.color_hue),borderColor:yn(t.block.color_hue)}}),l=Y(()=>s.value<40);return(h,o)=>(v(),b("div",{class:E(["absolute rounded overflow-hidden cursor-pointer select-none group",{"border-2":e.block.kind==="session","border-2 border-dashed opacity-80":e.block.kind==="planned","border-2 calendar-block--manual":e.block.kind==="manual"}]),draggable:e.block.kind==="planned"&&!!e.block.task_id,style:H(d.value),onClick:o[1]||(o[1]=c=>a("click",e.block)),onDragstart:o[2]||(o[2]=c=>e.block.kind==="planned"&&e.block.task_id?a("blockDragStart",e.block,c):void 0)},[u("div",kn,[u("p",xn,D(e.block.display_name),1),!l.value&&e.block.job_number?(v(),b("p",_n,D(e.block.job_number),1)):$("",!0),l.value?$("",!0):(v(),b("p",Dn,D(i.value),1))]),u("div",{class:"absolute bottom-0 left-0 right-0 h-2 cursor-s-resize opacity-0 group-hover:opacity-100 flex items-center justify-center",onMousedown:o[0]||(o[0]=he(c=>a("resizeStart",c),["stop"]))},[...o[3]||(o[3]=[u("div",{class:"w-8 h-0.5 bg-white/60 rounded"},null,-1)])],32)],46,pn))}}),Sn=Je(Mn,[["__scopeId","data-v-978cfc69"]]),Tn={class:"flex overflow-auto h-full"},Pn={class:"flex flex-1 gap-px min-w-0"},$n=["onDragover","onDrop"],On={key:1,class:"absolute inset-0 bg-primary/10 pointer-events-none z-0"},L=7,fe=19,X=40,Cn=N({__name:"CalendarGrid",emits:["blockClick"],setup(e,{emit:n}){const t=Array.from({length:fe-L+1},(k,x)=>L+x),a=te(),r=Le(),s=n,i=Y(()=>a.view==="week"?a.weekDays:[a.currentDate]),d=O(new Date);function l(k){const x=a.getBlocksForDay(k);return tt(x)}function h(k){return nt(new Date(k.start_at),L)}function o(k){return at(new Date(k.start_at),new Date(k.end_at))}function c(k){var x;return((x=r.resizingBlock.value)==null?void 0:x.id)===k.id}function y(k){return k===12?"12 PM":k>12?`${k-12} PM`:`${k} AM`}return(k,x)=>(v(),b("div",Tn,[u("div",{class:"w-12 shrink-0 relative",style:H({height:`${(fe-L+1)*X*2}px`})},[(v(!0),b(B,null,j(w(t),g=>(v(),b("div",{key:g,class:"absolute right-2 text-xs text-muted-foreground",style:H({top:`${(g-L)*X*2-6}px`})},D(y(g)),5))),128))],4),u("div",Pn,[(v(!0),b(B,null,j(i.value,g=>(v(),b("div",{key:w(O)(g),class:E(["flex-1 relative border-l border-border",{"bg-primary/5":w(O)(g)===w(d)}]),style:H({height:`${(fe-L)*X*2}px`}),onDragover:m=>w(r).onDragOver(g,m),onDragleave:x[1]||(x[1]=m=>w(r).onDragLeave()),onDrop:m=>w(r).onDrop(g,m)},[w(a).view==="week"?(v(),b("div",{key:0,class:E(["sticky top-0 z-10 text-center py-1 text-xs font-medium border-b border-border bg-background",w(O)(g)===w(d)?"text-primary":"text-muted-foreground"])},[u("div",null,D(w(q)(g,"EEE")),1),u("div",{class:E(["inline-flex h-6 w-6 mx-auto items-center justify-center rounded-full text-sm",w(O)(g)===w(d)?"bg-primary text-primary-foreground":""])},D(w(q)(g,"d")),3)],2)):$("",!0),(v(!0),b(B,null,j(w(t),m=>(v(),b("div",{key:m,class:"absolute left-0 right-0 border-t border-border/40",style:H({top:`${(m-L)*X*2}px`})},null,4))),128)),(v(!0),b(B,null,j(w(t).slice(0,-1),m=>(v(),b("div",{key:`half-${m}`,class:"absolute left-0 right-0 border-t border-border/20",style:H({top:`${(m-L)*X*2+X}px`})},null,4))),128)),w(r).dragOverDay.value===w(O)(g)?(v(),b("div",On)):$("",!0),(v(!0),b(B,null,j(l(g),({block:m,lane:P,totalLanes:f})=>(v(),Ee(Sn,{key:m.id,block:m,lane:P,"total-lanes":f,top:h(m),height:o(m),"resize-end":c(m)?w(r).resizePreviewEnd.value:null,onClick:p=>s("blockClick",m),onResizeStart:p=>w(r).onResizeStart(m,p),onBlockDragStart:x[0]||(x[0]=(p,M)=>w(r).onBlockDragStart(p,M))},null,8,["block","lane","total-lanes","top","height","resize-end","onClick","onResizeStart"]))),128))],46,$n))),128))])]))}}),Wn={class:"flex flex-col h-full bg-card border-l border-border"},En={class:"p-3 border-b border-border flex items-center justify-between shrink-0"},Vn={class:"flex-1 overflow-y-auto p-2 space-y-1.5"},Yn={key:0,class:"text-xs text-muted-foreground p-2"},Bn={key:1,class:"text-xs text-muted-foreground p-2 text-center"},jn=["onDragstart"],Fn={class:"flex items-start gap-2"},Ln={class:"flex-1 min-w-0"},Nn={class:"text-xs font-medium text-foreground leading-tight truncate"},zn={class:"flex items-center gap-1.5 mt-1 flex-wrap"},Hn={key:0,class:"text-xs text-muted-foreground"},qn={key:0,class:"p-3 border-t border-border shrink-0"},In={class:"space-y-1"},Rn={class:"text-muted-foreground truncate max-w-[100px]"},An={class:"text-foreground"},Qn=N({__name:"PlannerSidebar",emits:["createTask"],setup(e,{emit:n}){const t=ve(),a=te(),r=Le(),s=n,i=Y(()=>O(a.currentDate));ge(()=>{t.fetchForDate(i.value)});const d=o=>({todo:"outline",doing:"default",done:"success",cancelled:"secondary"})[o],l=o=>o>=4?"bg-red-500":o===3?"bg-amber-500":"bg-emerald-500",h=Y(()=>{const o={};for(const c of t.tasks){const y=c.project_id??"_none";o[y]||(o[y]={name:c.project_id?y:"No Project",planned:0,actual:0}),o[y].planned+=c.estimate_hours??0,o[y].actual+=c.actual_hours??0}return Object.values(o)});return(o,c)=>(v(),b("div",Wn,[u("div",En,[c[2]||(c[2]=u("h3",{class:"text-sm font-semibold text-foreground"},"Planner",-1)),S(G,{size:"sm",variant:"ghost",onClick:c[0]||(c[0]=y=>s("createTask"))},{default:C(()=>[...c[1]||(c[1]=[u("svg",{class:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[u("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1)])]),_:1})]),u("div",Vn,[w(t).loading?(v(),b("div",Yn,"Loading...")):w(t).tasks.length===0?(v(),b("div",Bn," No tasks for today ")):$("",!0),(v(!0),b(B,null,j(w(t).tasks,y=>(v(),b("div",{key:y.id,class:"rounded-md border border-border bg-background p-2 cursor-grab active:cursor-grabbing hover:border-primary/50 transition-colors",draggable:"true",onDragstart:k=>w(r).onDragStart(y,k)},[u("div",Fn,[u("div",{class:E(["h-2 w-2 rounded-full mt-1.5 shrink-0",l(y.priority)])},null,2),u("div",Ln,[u("p",Nn,D(y.title),1),u("div",zn,[S(Ke,{variant:d(y.status),class:"text-xs py-0"},{default:C(()=>[Z(D(y.status),1)]),_:2},1032,["variant"]),y.estimate_hours?(v(),b("span",Hn,D(w(re)(y.estimate_hours)),1)):$("",!0)])])])],40,jn))),128))]),h.value.length?(v(),b("div",qn,[c[3]||(c[3]=u("p",{class:"text-xs font-medium text-muted-foreground mb-2"},"Plan vs Actual",-1)),u("div",In,[(v(!0),b(B,null,j(h.value,y=>(v(),b("div",{key:y.name,class:"flex items-center justify-between text-xs"},[u("span",Rn,D(y.name),1),u("span",An,D(w(re)(y.planned))+" / "+D(w(re)(y.actual)),1)]))),128))])])):$("",!0)]))}}),Xn=["id","value","placeholder","disabled","rows"],Gn=N({__name:"Textarea",props:{modelValue:{},placeholder:{},disabled:{type:Boolean},rows:{},class:{},id:{}},emits:["update:modelValue"],setup(e,{emit:n}){const t=e,a=n;return(r,s)=>(v(),b("textarea",{id:e.id,value:e.modelValue,placeholder:e.placeholder,disabled:e.disabled,rows:e.rows??3,class:E(w(Ve)("flex 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 resize-none",t.class)),onInput:s[0]||(s[0]=i=>a("update:modelValue",i.target.value))},null,42,Xn))}}),Un=["id","value","disabled"],Jn=["selected"],ae=N({__name:"Select",props:{modelValue:{},disabled:{type:Boolean},class:{},id:{},placeholder:{}},emits:["update:modelValue","change"],setup(e,{emit:n}){const t=e,a=n;return(r,s)=>(v(),b("select",{id:e.id,value:e.modelValue,disabled:e.disabled,class:E(w(Ve)("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm","ring-offset-background focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50",t.class)),onChange:s[0]||(s[0]=i=>a("update:modelValue",i.target.value))},[e.placeholder?(v(),b("option",{key:0,value:"",disabled:"",selected:!e.modelValue},D(e.placeholder),9,Jn)):$("",!0),Ie(r.$slots,"default")],42,Un))}}),Kn={list:()=>Re.get("/api/projects")},Zn=We("projects",()=>{const e=T([]),n=T(!1);async function t(){if(!(e.value.length>0)){n.value=!0;try{const a=await Kn.list();e.value=a.data}catch{e.value=[]}finally{n.value=!1}}}return{projects:e,loading:n,fetchProjects:t}}),ea={class:"space-y-1.5"},ta={class:"space-y-1.5"},na={class:"grid grid-cols-2 gap-3"},aa={class:"space-y-1.5"},ra={class:"space-y-1.5"},oa={class:"grid grid-cols-2 gap-3"},sa={class:"space-y-1.5"},ia={class:"space-y-1.5"},ua={class:"grid grid-cols-2 gap-3"},la={class:"space-y-1.5"},da={class:"space-y-1.5"},ca={key:0,class:"space-y-1.5"},ma=["value"],fa={key:1,class:"space-y-1.5"},ha=["value"],ga=N({__name:"TaskForm",props:{open:{type:Boolean},task:{default:null},defaultDate:{}},emits:["close","save"],setup(e,{emit:n}){const t=e,a=n,r=et(),s=Zn();ge(()=>{s.fetchProjects()});const i=T({title:"",notes:"",planned_date:"",start_time:"",end_time:"",estimate_hours:1,status:"todo",priority:3,project_id:void 0,azure_work_item_id:void 0});Ae(()=>t.open,h=>{h&&(t.task?i.value={title:t.task.title,notes:t.task.notes??"",planned_date:t.task.planned_date??"",start_time:"",end_time:"",estimate_hours:t.task.estimate_hours??1,status:t.task.status,priority:t.task.priority,project_id:t.task.project_id??void 0,azure_work_item_id:t.task.azure_work_item_id??void 0}:i.value={title:"",notes:"",planned_date:t.defaultDate??"",start_time:"",end_time:"",estimate_hours:1,status:"todo",priority:3,project_id:void 0,azure_work_item_id:void 0},r.integration&&!r.workItems.length&&r.fetchWorkItems("open"))},{immediate:!0});const d=T(!1);async function l(){if(i.value.title.trim()){d.value=!0;try{const h={title:i.value.title,notes:i.value.notes||void 0,planned_date:i.value.planned_date,estimate_hours:i.value.estimate_hours,status:i.value.status,priority:i.value.priority,project_id:i.value.project_id||null,azure_work_item_id:i.value.azure_work_item_id||null};let o;i.value.planned_date&&i.value.start_time&&i.value.end_time&&(o={start_at:new Date(`${i.value.planned_date}T${i.value.start_time}:00`).toISOString(),end_at:new Date(`${i.value.planned_date}T${i.value.end_time}:00`).toISOString()}),a("save",h,o)}finally{d.value=!1}}}return(h,o)=>(v(),Ee(Ze,{open:e.open,title:e.task?"Edit Task":"New Task","max-width":"max-w-md",onClose:o[11]||(o[11]=c=>a("close"))},{footer:C(()=>[S(G,{variant:"outline",disabled:d.value,onClick:o[10]||(o[10]=c=>a("close"))},{default:C(()=>[...o[25]||(o[25]=[Z("Cancel",-1)])]),_:1},8,["disabled"]),S(G,{loading:d.value,onClick:l},{default:C(()=>[Z(D(e.task?"Update":"Create"),1)]),_:1},8,["loading"])]),default:C(()=>[u("form",{class:"space-y-4",onSubmit:he(l,["prevent"])},[u("div",ea,[o[12]||(o[12]=u("label",{class:"text-sm font-medium text-foreground"},"Title *",-1)),S(U,{modelValue:i.value.title,"onUpdate:modelValue":o[0]||(o[0]=c=>i.value.title=c),placeholder:"Task title...",disabled:d.value},null,8,["modelValue","disabled"])]),u("div",ta,[o[13]||(o[13]=u("label",{class:"text-sm font-medium text-foreground"},"Notes",-1)),S(Gn,{modelValue:i.value.notes,"onUpdate:modelValue":o[1]||(o[1]=c=>i.value.notes=c),placeholder:"Additional notes...",disabled:d.value},null,8,["modelValue","disabled"])]),u("div",na,[u("div",aa,[o[14]||(o[14]=u("label",{class:"text-sm font-medium text-foreground"},"Planned Date",-1)),S(U,{modelValue:i.value.planned_date,"onUpdate:modelValue":o[2]||(o[2]=c=>i.value.planned_date=c),type:"date",disabled:d.value},null,8,["modelValue","disabled"])]),u("div",ra,[o[15]||(o[15]=u("label",{class:"text-sm font-medium text-foreground"},"Estimate (h)",-1)),S(U,{modelValue:i.value.estimate_hours,"onUpdate:modelValue":o[3]||(o[3]=c=>i.value.estimate_hours=c),type:"number",min:"0.25",max:"24",step:"0.25",disabled:d.value},null,8,["modelValue","disabled"])])]),u("div",oa,[u("div",sa,[o[16]||(o[16]=u("label",{class:"text-sm font-medium text-foreground"},[Z("Start time "),u("span",{class:"text-muted-foreground font-normal"},"(optional)")],-1)),S(U,{modelValue:i.value.start_time,"onUpdate:modelValue":o[4]||(o[4]=c=>i.value.start_time=c),type:"time",disabled:d.value},null,8,["modelValue","disabled"])]),u("div",ia,[o[17]||(o[17]=u("label",{class:"text-sm font-medium text-foreground"},"End time",-1)),S(U,{modelValue:i.value.end_time,"onUpdate:modelValue":o[5]||(o[5]=c=>i.value.end_time=c),type:"time",disabled:d.value},null,8,["modelValue","disabled"])])]),u("div",ua,[u("div",la,[o[19]||(o[19]=u("label",{class:"text-sm font-medium text-foreground"},"Status",-1)),S(ae,{modelValue:i.value.status,"onUpdate:modelValue":o[6]||(o[6]=c=>i.value.status=c),disabled:d.value},{default:C(()=>[...o[18]||(o[18]=[u("option",{value:"todo"},"Todo",-1),u("option",{value:"doing"},"Doing",-1),u("option",{value:"done"},"Done",-1),u("option",{value:"cancelled"},"Cancelled",-1)])]),_:1},8,["modelValue","disabled"])]),u("div",da,[o[21]||(o[21]=u("label",{class:"text-sm font-medium text-foreground"},"Priority",-1)),S(ae,{modelValue:i.value.priority,"onUpdate:modelValue":o[7]||(o[7]=c=>i.value.priority=c),disabled:d.value},{default:C(()=>[...o[20]||(o[20]=[u("option",{value:"1"},"1 - Low",-1),u("option",{value:"2"},"2 - Normal",-1),u("option",{value:"3"},"3 - Medium",-1),u("option",{value:"4"},"4 - High",-1),u("option",{value:"5"},"5 - Critical",-1)])]),_:1},8,["modelValue","disabled"])])]),w(s).projects.length?(v(),b("div",ca,[o[23]||(o[23]=u("label",{class:"text-sm font-medium text-foreground"},"Project",-1)),S(ae,{modelValue:i.value.project_id,"onUpdate:modelValue":o[8]||(o[8]=c=>i.value.project_id=c),disabled:d.value,placeholder:"Select project..."},{default:C(()=>[o[22]||(o[22]=u("option",{value:""},"None",-1)),(v(!0),b(B,null,j(w(s).projects,c=>(v(),b("option",{key:c.id,value:c.id},D(c.display_name)+D(c.job_number?` (${c.job_number})`:""),9,ma))),128))]),_:1},8,["modelValue","disabled"])])):$("",!0),w(r).workItems.length?(v(),b("div",fa,[o[24]||(o[24]=u("label",{class:"text-sm font-medium text-foreground"},"Azure DevOps Work Item",-1)),S(ae,{modelValue:i.value.azure_work_item_id,"onUpdate:modelValue":o[9]||(o[9]=c=>i.value.azure_work_item_id=c),disabled:d.value,placeholder:"Link work item..."},{default:C(()=>[(v(!0),b(B,null,j(w(r).workItems,c=>(v(),b("option",{key:c.id,value:c.id}," #"+D(c.ado_id)+" – "+D(c.title),9,ha))),128))]),_:1},8,["modelValue","disabled"])])):$("",!0)],32)]),_:1},8,["open","title"]))}}),va={class:"h-full flex flex-col"},ba={class:"p-4 border-b border-border flex items-center gap-3 flex-wrap"},wa={class:"flex items-center gap-2 ml-auto"},ya={class:"flex-1 flex overflow-hidden"},pa={class:"flex-1 overflow-auto"},ka={key:0,class:"w-56 shrink-0 overflow-hidden"},xa={class:"bg-card border border-border rounded-lg shadow-xl p-4 w-72"},_a={class:"flex items-start justify-between gap-2 mb-3"},Da={class:"font-semibold text-sm text-foreground"},Ma={key:0,class:"text-xs text-muted-foreground"},Sa={class:"space-y-1 text-xs text-muted-foreground"},Ta={key:0,class:"mt-2 flex flex-wrap gap-1"},Pa={key:1,class:"mt-3 pt-3 border-t border-border flex items-center gap-2"},$a=["disabled"],Oa={key:2,class:"mt-3 pt-3 border-t border-border text-xs text-muted-foreground"},Ha=N({__name:"CalendarView",setup(e){const n=te(),t=ve(),a=Ge(),r=Qe(),s=T(!0),i=T(!1),d=T(null),l=T(null),h=T(!1);ge(async()=>{const x=r.query.date;x&&(n.currentDate=new Date(x+"T12:00:00"),n.setView("day")),await n.fetchCurrentView()});function o(x){if(x.project_id&&x.kind==="session"){const g=x.start_at.substring(0,10);a.push({name:"project-detail",params:{id:x.project_id,date:g}})}else l.value=x}async function c(x){try{d.value?(await t.update(d.value.id,x),A.success("Task updated")):(await t.create(x),A.success("Task created")),i.value=!1,d.value=null,t.fetchForDate(O(n.currentDate))}catch{A.error("Failed to save task")}}async function y(x){if(x.task_id)try{const g=await Xe(()=>import("./tasks-OhvhAG_3.js").then(m=>m.t),__vite__mapDeps([0,1,2])).then(m=>m.tasksApi.get(x.task_id));d.value=g.data,l.value=null,i.value=!0}catch{A.error("Failed to load task")}}async function k(x){if(confirm(`Delete "${x.display_name}"?`)){h.value=!0;try{await t.deleteBlock(x.id),n.removeBlock(x.id),l.value=null,A.success("Block deleted")}catch{A.error("Failed to delete block")}finally{h.value=!1}}}return(x,g)=>(v(),b("div",va,[u("div",ba,[S(vn),u("div",wa,[u("button",{class:"text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:g[0]||(g[0]=m=>s.value=!s.value)},D(s.value?"Hide Planner":"Show Planner"),1)])]),u("div",ya,[u("div",pa,[S(Cn,{onBlockClick:o})]),s.value?(v(),b("div",ka,[S(Qn,{onCreateTask:g[1]||(g[1]=m=>i.value=!0)})])):$("",!0)]),l.value?(v(),b("div",{key:0,class:"fixed inset-0 z-40 flex items-center justify-center p-4",onClick:g[5]||(g[5]=he(m=>l.value=null,["self"]))},[u("div",xa,[u("div",_a,[u("div",null,[u("p",Da,D(l.value.display_name),1),l.value.job_number?(v(),b("p",Ma,D(l.value.job_number),1)):$("",!0)]),u("button",{class:"text-muted-foreground hover:text-foreground",onClick:g[2]||(g[2]=m=>l.value=null)},[...g[7]||(g[7]=[u("svg",{class:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[u("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])])]),u("div",Sa,[u("p",null,"Start: "+D(new Date(l.value.start_at).toLocaleString()),1),u("p",null,"End: "+D(new Date(l.value.end_at).toLocaleString()),1),u("p",null,"Type: "+D(l.value.kind),1)]),l.value.tags.length?(v(),b("div",Ta,[(v(!0),b(B,null,j(l.value.tags,m=>(v(),b("span",{key:m.id,class:"px-1.5 py-0.5 rounded text-xs",style:H({background:`${m.color_hex}22`,color:m.color_hex})},D(m.name),5))),128))])):$("",!0),l.value.kind==="planned"?(v(),b("div",Pa,[u("button",{class:"flex-1 text-xs px-2 py-1.5 rounded bg-muted hover:bg-muted/80 text-foreground transition-colors",onClick:g[3]||(g[3]=m=>y(l.value))},"Edit task"),u("button",{class:"flex-1 text-xs px-2 py-1.5 rounded bg-destructive/10 hover:bg-destructive/20 text-destructive transition-colors",disabled:h.value,onClick:g[4]||(g[4]=m=>k(l.value))},"Delete block",8,$a)])):(v(),b("p",Oa,D(l.value.kind==="session"?"Session from Claude Code — read-only":"Read-only entry"),1))])])):$("",!0),S(ga,{open:i.value,task:d.value,"default-date":w(O)(w(n).currentDate),onClose:g[6]||(g[6]=m=>{i.value=!1,d.value=null}),onSave:c},null,8,["open","task","default-date"])]))}});export{Ha as default}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/tasks-Dr7jFVHn.js","assets/index-DVV3ZbZ2.js","assets/index-CS_oOq1J.css"])))=>i.map(i=>d[i]); +import{C as We,s as T,j as Y,d as N,o as v,c as b,a as u,e as S,w as C,q as Z,t as D,h as w,i as $,n as E,B as H,D as he,F as B,r as j,k as Ee,y as ge,p as Ie,E as Re,x as Ae,g as Qe,_ as Xe,K as A,f as Ge}from"./index-DVV3ZbZ2.js";import{d as Ue}from"./dashboard-CxPPoZJ0.js";import{i as O,f as re,c as Ve}from"./utils-7WVCegLb.js";import{_ as G}from"./Button.vue_vue_type_script_setup_true_lang-ClV4YfXb.js";import{u as ve}from"./tasks-Dr7jFVHn.js";import{_ as Je}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{_ as Ke}from"./Badge.vue_vue_type_script_setup_true_lang-WigJUOyH.js";import{_ as Ze}from"./Dialog.vue_vue_type_script_setup_true_lang-CSPK-Rcg.js";import{_ as U}from"./Input.vue_vue_type_script_setup_true_lang-BM1xhrlf.js";import{u as et}from"./devops-HjUgCfao.js";import"./Spinner.vue_vue_type_script_setup_true_lang-BkmDerVR.js";const oe=40/30;function tt(e){if(e.length===0)return[];const n=[...e].sort((s,i)=>new Date(s.start_at).getTime()-new Date(i.start_at).getTime()),t=[],a=[];for(const s of n){const i=new Date(s.start_at).getTime(),d=new Date(s.end_at).getTime();let l=-1;for(let h=0;h{const d=new Date(s.start_at).getTime(),l=new Date(s.end_at).getTime();let h=i;for(const o of a){const c=new Date(o.block.start_at).getTime(),y=new Date(o.block.end_at).getTime();cd&&o.lane>h&&(h=o.lane)}return{block:s,lane:i,totalLanes:h+1}})}function nt(e,n=7){return((e.getHours()-n)*60+e.getMinutes())*oe}function at(e,n){const t=(n.getTime()-e.getTime())/6e4;return Math.max(t*oe,20)}function De(e,n=7){const t=e.getDay(),a=new Date(e);return a.setDate(e.getDate()-(t+6)%7),a.setHours(0,0,0,0),Array.from({length:n},(r,s)=>{const i=new Date(a);return i.setDate(a.getDate()+s),i})}function Me(e,n=15){return Math.round(e/n)*n}const te=We("calendar",()=>{const e=T([]),n=T(new Date),t=T("week"),a=T(7),r=T(!1),s=T(null),i=Y(()=>De(n.value,a.value));async function d(f,k,M){r.value=!0,s.value=null;try{const W=await Ue.calendar({from:f,to:k,view:M});e.value=W.data}catch(W){const ne=W;s.value=ne.message??"Failed to fetch calendar"}finally{r.value=!1}}function l(f){a.value=f}async function h(){if(t.value==="week"){const f=De(n.value,a.value),k=O(f[0]),M=O(f[a.value-1]);await d(k,M,"week")}else{const f=O(n.value);await d(f,f,"day")}}function o(){const f=new Date(n.value);t.value==="week"?f.setDate(f.getDate()-7):f.setDate(f.getDate()-1),n.value=f}function c(){const f=new Date(n.value);t.value==="week"?f.setDate(f.getDate()+7):f.setDate(f.getDate()+1),n.value=f}function y(){n.value=new Date}function p(f){t.value=f}function x(f){e.value.push(f)}function g(f){const k=e.value.findIndex(M=>M.id===f.id);k!==-1&&(e.value[k]=f)}function m(f){e.value=e.value.filter(k=>k.id!==f)}function P(f){const k=O(f);return e.value.filter(M=>O(new Date(M.start_at))===k)}return{blocks:e,currentDate:n,view:t,weekLength:a,loading:r,error:s,weekDays:i,fetch:d,fetchCurrentView:h,navigatePrev:o,navigateNext:c,goToToday:y,setView:p,setWeekLength:l,addBlock:x,updateBlock:g,removeBlock:m,getBlocksForDay:P}});function V(e){const n=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&n==="[object Date]"?new e.constructor(+e):typeof e=="number"||n==="[object Number]"||typeof e=="string"||n==="[object String]"?new Date(e):new Date(NaN)}function I(e,n){return e instanceof Date?new e.constructor(n):new Date(n)}const Ye=6048e5,rt=864e5;let ot={};function ie(){return ot}function ee(e,n){var d,l,h,o;const t=ie(),a=(n==null?void 0:n.weekStartsOn)??((l=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:l.weekStartsOn)??t.weekStartsOn??((o=(h=t.locale)==null?void 0:h.options)==null?void 0:o.weekStartsOn)??0,r=V(e),s=r.getDay(),i=(s=r.getTime()?t+1:n.getTime()>=i.getTime()?t:t-1}function Se(e){const n=V(e);return n.setHours(0,0,0,0),n}function Te(e){const n=V(e),t=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return t.setUTCFullYear(n.getFullYear()),+e-+t}function st(e,n){const t=Se(e),a=Se(n),r=+t-Te(t),s=+a-Te(a);return Math.round((r-s)/rt)}function it(e){const n=Be(e),t=I(e,0);return t.setFullYear(n,0,4),t.setHours(0,0,0,0),se(t)}function ut(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function lt(e){if(!ut(e)&&typeof e!="number")return!1;const n=V(e);return!isNaN(Number(n))}function dt(e){const n=V(e),t=I(e,0);return t.setFullYear(n.getFullYear(),0,1),t.setHours(0,0,0,0),t}const ct={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},mt=(e,n,t)=>{let a;const r=ct[e];return typeof r=="string"?a=r:n===1?a=r.one:a=r.other.replace("{{count}}",n.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+a:a+" ago":a};function me(e){return(n={})=>{const t=n.width?String(n.width):e.defaultWidth;return e.formats[t]||e.formats[e.defaultWidth]}}const ft={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ht={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},gt={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},vt={date:me({formats:ft,defaultWidth:"full"}),time:me({formats:ht,defaultWidth:"full"}),dateTime:me({formats:gt,defaultWidth:"full"})},bt={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},wt=(e,n,t,a)=>bt[e];function J(e){return(n,t)=>{const a=t!=null&&t.context?String(t.context):"standalone";let r;if(a==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,d=t!=null&&t.width?String(t.width):i;r=e.formattingValues[d]||e.formattingValues[i]}else{const i=e.defaultWidth,d=t!=null&&t.width?String(t.width):e.defaultWidth;r=e.values[d]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(n):n;return r[s]}}const yt={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},kt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},pt={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},xt={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},_t={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Dt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Mt=(e,n)=>{const t=Number(e),a=t%100;if(a>20||a<10)switch(a%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},St={ordinalNumber:Mt,era:J({values:yt,defaultWidth:"wide"}),quarter:J({values:kt,defaultWidth:"wide",argumentCallback:e=>e-1}),month:J({values:pt,defaultWidth:"wide"}),day:J({values:xt,defaultWidth:"wide"}),dayPeriod:J({values:_t,defaultWidth:"wide",formattingValues:Dt,defaultFormattingWidth:"wide"})};function K(e){return(n,t={})=>{const a=t.width,r=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],s=n.match(r);if(!s)return null;const i=s[0],d=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(d)?Pt(d,c=>c.test(i)):Tt(d,c=>c.test(i));let h;h=e.valueCallback?e.valueCallback(l):l,h=t.valueCallback?t.valueCallback(h):h;const o=n.slice(i.length);return{value:h,rest:o}}}function Tt(e,n){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&n(e[t]))return t}function Pt(e,n){for(let t=0;t{const a=n.match(e.matchPattern);if(!a)return null;const r=a[0],s=n.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=t.valueCallback?t.valueCallback(i):i;const d=n.slice(r.length);return{value:i,rest:d}}}const Ot=/^(\d+)(th|st|nd|rd)?/i,Ct=/\d+/i,Wt={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Et={any:[/^b/i,/^(a|c)/i]},Vt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Yt={any:[/1/i,/2/i,/3/i,/4/i]},Bt={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},jt={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Ft={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Lt={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Nt={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},zt={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Ht={ordinalNumber:$t({matchPattern:Ot,parsePattern:Ct,valueCallback:e=>parseInt(e,10)}),era:K({matchPatterns:Wt,defaultMatchWidth:"wide",parsePatterns:Et,defaultParseWidth:"any"}),quarter:K({matchPatterns:Vt,defaultMatchWidth:"wide",parsePatterns:Yt,defaultParseWidth:"any",valueCallback:e=>e+1}),month:K({matchPatterns:Bt,defaultMatchWidth:"wide",parsePatterns:jt,defaultParseWidth:"any"}),day:K({matchPatterns:Ft,defaultMatchWidth:"wide",parsePatterns:Lt,defaultParseWidth:"any"}),dayPeriod:K({matchPatterns:Nt,defaultMatchWidth:"any",parsePatterns:zt,defaultParseWidth:"any"})},qt={code:"en-US",formatDistance:mt,formatLong:vt,formatRelative:wt,localize:St,match:Ht,options:{weekStartsOn:0,firstWeekContainsDate:1}};function It(e){const n=V(e);return st(n,dt(n))+1}function Rt(e){const n=V(e),t=+se(n)-+it(n);return Math.round(t/Ye)+1}function je(e,n){var o,c,y,p;const t=V(e),a=t.getFullYear(),r=ie(),s=(n==null?void 0:n.firstWeekContainsDate)??((c=(o=n==null?void 0:n.locale)==null?void 0:o.options)==null?void 0:c.firstWeekContainsDate)??r.firstWeekContainsDate??((p=(y=r.locale)==null?void 0:y.options)==null?void 0:p.firstWeekContainsDate)??1,i=I(e,0);i.setFullYear(a+1,0,s),i.setHours(0,0,0,0);const d=ee(i,n),l=I(e,0);l.setFullYear(a,0,s),l.setHours(0,0,0,0);const h=ee(l,n);return t.getTime()>=d.getTime()?a+1:t.getTime()>=h.getTime()?a:a-1}function At(e,n){var d,l,h,o;const t=ie(),a=(n==null?void 0:n.firstWeekContainsDate)??((l=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:l.firstWeekContainsDate)??t.firstWeekContainsDate??((o=(h=t.locale)==null?void 0:h.options)==null?void 0:o.firstWeekContainsDate)??1,r=je(e,n),s=I(e,0);return s.setFullYear(r,0,a),s.setHours(0,0,0,0),ee(s,n)}function Qt(e,n){const t=V(e),a=+ee(t,n)-+At(t,n);return Math.round(a/Ye)+1}function _(e,n){const t=e<0?"-":"",a=Math.abs(e).toString().padStart(n,"0");return t+a}const F={y(e,n){const t=e.getFullYear(),a=t>0?t:1-t;return _(n==="yy"?a%100:a,n.length)},M(e,n){const t=e.getMonth();return n==="M"?String(t+1):_(t+1,2)},d(e,n){return _(e.getDate(),n.length)},a(e,n){const t=e.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(e,n){return _(e.getHours()%12||12,n.length)},H(e,n){return _(e.getHours(),n.length)},m(e,n){return _(e.getMinutes(),n.length)},s(e,n){return _(e.getSeconds(),n.length)},S(e,n){const t=n.length,a=e.getMilliseconds(),r=Math.trunc(a*Math.pow(10,t-3));return _(r,n.length)}},Q={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Pe={G:function(e,n,t){const a=e.getFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return t.era(a,{width:"abbreviated"});case"GGGGG":return t.era(a,{width:"narrow"});case"GGGG":default:return t.era(a,{width:"wide"})}},y:function(e,n,t){if(n==="yo"){const a=e.getFullYear(),r=a>0?a:1-a;return t.ordinalNumber(r,{unit:"year"})}return F.y(e,n)},Y:function(e,n,t,a){const r=je(e,a),s=r>0?r:1-r;if(n==="YY"){const i=s%100;return _(i,2)}return n==="Yo"?t.ordinalNumber(s,{unit:"year"}):_(s,n.length)},R:function(e,n){const t=Be(e);return _(t,n.length)},u:function(e,n){const t=e.getFullYear();return _(t,n.length)},Q:function(e,n,t){const a=Math.ceil((e.getMonth()+1)/3);switch(n){case"Q":return String(a);case"QQ":return _(a,2);case"Qo":return t.ordinalNumber(a,{unit:"quarter"});case"QQQ":return t.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(a,{width:"wide",context:"formatting"})}},q:function(e,n,t){const a=Math.ceil((e.getMonth()+1)/3);switch(n){case"q":return String(a);case"qq":return _(a,2);case"qo":return t.ordinalNumber(a,{unit:"quarter"});case"qqq":return t.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(a,{width:"wide",context:"standalone"})}},M:function(e,n,t){const a=e.getMonth();switch(n){case"M":case"MM":return F.M(e,n);case"Mo":return t.ordinalNumber(a+1,{unit:"month"});case"MMM":return t.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(a,{width:"wide",context:"formatting"})}},L:function(e,n,t){const a=e.getMonth();switch(n){case"L":return String(a+1);case"LL":return _(a+1,2);case"Lo":return t.ordinalNumber(a+1,{unit:"month"});case"LLL":return t.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(a,{width:"wide",context:"standalone"})}},w:function(e,n,t,a){const r=Qt(e,a);return n==="wo"?t.ordinalNumber(r,{unit:"week"}):_(r,n.length)},I:function(e,n,t){const a=Rt(e);return n==="Io"?t.ordinalNumber(a,{unit:"week"}):_(a,n.length)},d:function(e,n,t){return n==="do"?t.ordinalNumber(e.getDate(),{unit:"date"}):F.d(e,n)},D:function(e,n,t){const a=It(e);return n==="Do"?t.ordinalNumber(a,{unit:"dayOfYear"}):_(a,n.length)},E:function(e,n,t){const a=e.getDay();switch(n){case"E":case"EE":case"EEE":return t.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(a,{width:"short",context:"formatting"});case"EEEE":default:return t.day(a,{width:"wide",context:"formatting"})}},e:function(e,n,t,a){const r=e.getDay(),s=(r-a.weekStartsOn+8)%7||7;switch(n){case"e":return String(s);case"ee":return _(s,2);case"eo":return t.ordinalNumber(s,{unit:"day"});case"eee":return t.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(r,{width:"short",context:"formatting"});case"eeee":default:return t.day(r,{width:"wide",context:"formatting"})}},c:function(e,n,t,a){const r=e.getDay(),s=(r-a.weekStartsOn+8)%7||7;switch(n){case"c":return String(s);case"cc":return _(s,n.length);case"co":return t.ordinalNumber(s,{unit:"day"});case"ccc":return t.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(r,{width:"narrow",context:"standalone"});case"cccccc":return t.day(r,{width:"short",context:"standalone"});case"cccc":default:return t.day(r,{width:"wide",context:"standalone"})}},i:function(e,n,t){const a=e.getDay(),r=a===0?7:a;switch(n){case"i":return String(r);case"ii":return _(r,n.length);case"io":return t.ordinalNumber(r,{unit:"day"});case"iii":return t.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(a,{width:"short",context:"formatting"});case"iiii":default:return t.day(a,{width:"wide",context:"formatting"})}},a:function(e,n,t){const r=e.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,n,t){const a=e.getHours();let r;switch(a===12?r=Q.noon:a===0?r=Q.midnight:r=a/12>=1?"pm":"am",n){case"b":case"bb":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,n,t){const a=e.getHours();let r;switch(a>=17?r=Q.evening:a>=12?r=Q.afternoon:a>=4?r=Q.morning:r=Q.night,n){case"B":case"BB":case"BBB":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,n,t){if(n==="ho"){let a=e.getHours()%12;return a===0&&(a=12),t.ordinalNumber(a,{unit:"hour"})}return F.h(e,n)},H:function(e,n,t){return n==="Ho"?t.ordinalNumber(e.getHours(),{unit:"hour"}):F.H(e,n)},K:function(e,n,t){const a=e.getHours()%12;return n==="Ko"?t.ordinalNumber(a,{unit:"hour"}):_(a,n.length)},k:function(e,n,t){let a=e.getHours();return a===0&&(a=24),n==="ko"?t.ordinalNumber(a,{unit:"hour"}):_(a,n.length)},m:function(e,n,t){return n==="mo"?t.ordinalNumber(e.getMinutes(),{unit:"minute"}):F.m(e,n)},s:function(e,n,t){return n==="so"?t.ordinalNumber(e.getSeconds(),{unit:"second"}):F.s(e,n)},S:function(e,n){return F.S(e,n)},X:function(e,n,t){const a=e.getTimezoneOffset();if(a===0)return"Z";switch(n){case"X":return Oe(a);case"XXXX":case"XX":return z(a);case"XXXXX":case"XXX":default:return z(a,":")}},x:function(e,n,t){const a=e.getTimezoneOffset();switch(n){case"x":return Oe(a);case"xxxx":case"xx":return z(a);case"xxxxx":case"xxx":default:return z(a,":")}},O:function(e,n,t){const a=e.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+$e(a,":");case"OOOO":default:return"GMT"+z(a,":")}},z:function(e,n,t){const a=e.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+$e(a,":");case"zzzz":default:return"GMT"+z(a,":")}},t:function(e,n,t){const a=Math.trunc(e.getTime()/1e3);return _(a,n.length)},T:function(e,n,t){const a=e.getTime();return _(a,n.length)}};function $e(e,n=""){const t=e>0?"-":"+",a=Math.abs(e),r=Math.trunc(a/60),s=a%60;return s===0?t+String(r):t+String(r)+n+_(s,2)}function Oe(e,n){return e%60===0?(e>0?"-":"+")+_(Math.abs(e)/60,2):z(e,n)}function z(e,n=""){const t=e>0?"-":"+",a=Math.abs(e),r=_(Math.trunc(a/60),2),s=_(a%60,2);return t+r+n+s}const Ce=(e,n)=>{switch(e){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},Fe=(e,n)=>{switch(e){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},Xt=(e,n)=>{const t=e.match(/(P+)(p+)?/)||[],a=t[1],r=t[2];if(!r)return Ce(e,n);let s;switch(a){case"P":s=n.dateTime({width:"short"});break;case"PP":s=n.dateTime({width:"medium"});break;case"PPP":s=n.dateTime({width:"long"});break;case"PPPP":default:s=n.dateTime({width:"full"});break}return s.replace("{{date}}",Ce(a,n)).replace("{{time}}",Fe(r,n))},Gt={p:Fe,P:Xt},Ut=/^D+$/,Jt=/^Y+$/,Kt=["D","DD","YY","YYYY"];function Zt(e){return Ut.test(e)}function en(e){return Jt.test(e)}function tn(e,n,t){const a=nn(e,n,t);if(console.warn(a),Kt.includes(e))throw new RangeError(a)}function nn(e,n,t){const a=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${n}\`) for formatting ${a} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const an=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,rn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,on=/^'([^]*?)'?$/,sn=/''/g,un=/[a-zA-Z]/;function q(e,n,t){var o,c,y,p,x,g,m,P;const a=ie(),r=(t==null?void 0:t.locale)??a.locale??qt,s=(t==null?void 0:t.firstWeekContainsDate)??((c=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:c.firstWeekContainsDate)??a.firstWeekContainsDate??((p=(y=a.locale)==null?void 0:y.options)==null?void 0:p.firstWeekContainsDate)??1,i=(t==null?void 0:t.weekStartsOn)??((g=(x=t==null?void 0:t.locale)==null?void 0:x.options)==null?void 0:g.weekStartsOn)??a.weekStartsOn??((P=(m=a.locale)==null?void 0:m.options)==null?void 0:P.weekStartsOn)??0,d=V(e);if(!lt(d))throw new RangeError("Invalid time value");let l=n.match(rn).map(f=>{const k=f[0];if(k==="p"||k==="P"){const M=Gt[k];return M(f,r.formatLong)}return f}).join("").match(an).map(f=>{if(f==="''")return{isToken:!1,value:"'"};const k=f[0];if(k==="'")return{isToken:!1,value:ln(f)};if(Pe[k])return{isToken:!0,value:f};if(k.match(un))throw new RangeError("Format string contains an unescaped latin alphabet character `"+k+"`");return{isToken:!1,value:f}});r.localize.preprocessor&&(l=r.localize.preprocessor(d,l));const h={firstWeekContainsDate:s,weekStartsOn:i,locale:r};return l.map(f=>{if(!f.isToken)return f.value;const k=f.value;(!(t!=null&&t.useAdditionalWeekYearTokens)&&en(k)||!(t!=null&&t.useAdditionalDayOfYearTokens)&&Zt(k))&&tn(k,n,String(e));const M=Pe[k[0]];return M(d,k,r.localize,h)}).join("")}function ln(e){const n=e.match(on);return n?n[1].replace(sn,"'"):e}const dn={class:"flex items-center gap-2 flex-wrap"},cn={class:"flex items-center gap-1"},mn={class:"text-sm font-medium text-foreground flex-1 min-w-0 truncate"},fn={key:0,class:"text-xs text-muted-foreground"},hn={class:"flex items-center rounded-md border border-border overflow-hidden"},gn={key:1,class:"flex items-center rounded-md border border-border overflow-hidden"},vn=N({__name:"CalendarToolbar",setup(e){const n=te(),t=Y(()=>{if(n.view==="week"){const d=n.weekDays;if(!d.length)return"";const l=d[0],h=d[d.length-1];return l.getMonth()===h.getMonth()?`${q(l,"MMM d")} – ${q(h,"d, yyyy")}`:`${q(l,"MMM d")} – ${q(h,"MMM d, yyyy")}`}else return q(n.currentDate,"EEEE, MMMM d, yyyy")});async function a(d){d==="prev"?n.navigatePrev():n.navigateNext(),await n.fetchCurrentView()}async function r(){n.goToToday(),await n.fetchCurrentView()}async function s(d){n.setView(d),await n.fetchCurrentView()}async function i(d){n.setWeekLength(d),await n.fetchCurrentView()}return(d,l)=>(v(),b("div",dn,[u("div",cn,[S(G,{variant:"outline",size:"sm",onClick:l[0]||(l[0]=h=>a("prev"))},{default:C(()=>[...l[6]||(l[6]=[u("svg",{class:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[u("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"})],-1)])]),_:1}),S(G,{variant:"outline",size:"sm",onClick:r},{default:C(()=>[...l[7]||(l[7]=[Z("Today",-1)])]),_:1}),S(G,{variant:"outline",size:"sm",onClick:l[1]||(l[1]=h=>a("next"))},{default:C(()=>[...l[8]||(l[8]=[u("svg",{class:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[u("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1)])]),_:1})]),u("span",mn,D(t.value),1),w(n).loading?(v(),b("div",fn,"Loading...")):$("",!0),u("div",hn,[u("button",{class:E(["px-3 py-1.5 text-xs font-medium transition-colors",w(n).view==="day"?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted"]),onClick:l[2]||(l[2]=h=>s("day"))}," Day ",2),u("button",{class:E(["px-3 py-1.5 text-xs font-medium transition-colors",w(n).view==="week"?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted"]),onClick:l[3]||(l[3]=h=>s("week"))}," Week ",2)]),w(n).view==="week"?(v(),b("div",gn,[u("button",{class:E(["px-3 py-1.5 text-xs font-medium transition-colors",w(n).weekLength===5?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted"]),onClick:l[4]||(l[4]=h=>i(5))}," 5d ",2),u("button",{class:E(["px-3 py-1.5 text-xs font-medium transition-colors",w(n).weekLength===7?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted"]),onClick:l[5]||(l[5]=h=>i(7))}," 7d ",2)])):$("",!0)]))}}),bn=7;function Le(){const e=ve(),n=te(),t=T(null),a=T(null),r=T(null),s=T(null);function i(g,m){var P,f;t.value=g.id,(P=m.dataTransfer)==null||P.setData("task_id",g.id),(f=m.dataTransfer)==null||f.setData("estimate_hours",String(g.estimate_hours??1))}function d(g,m){var f,k,M,W;const P=new Date(g.end_at).getTime()-new Date(g.start_at).getTime();(f=m.dataTransfer)==null||f.setData("block_id",g.id),(k=m.dataTransfer)==null||k.setData("block_duration_ms",String(P)),(M=m.dataTransfer)==null||M.setData("task_id",g.task_id??""),(W=m.dataTransfer)==null||W.setData("estimate_hours",String(P/36e5))}function l(g,m){m.preventDefault(),a.value=O(g)}function h(){a.value=null}async function o(g,m){var ye,ke,pe,xe;m.preventDefault(),a.value=null,t.value=null;const P=(ye=m.dataTransfer)==null?void 0:ye.getData("block_id"),f=(ke=m.dataTransfer)==null?void 0:ke.getData("task_id"),k=parseFloat(((pe=m.dataTransfer)==null?void 0:pe.getData("estimate_hours"))??"1")||1,M=parseFloat(((xe=m.dataTransfer)==null?void 0:xe.getData("block_duration_ms"))??"0"),ne=m.currentTarget.getBoundingClientRect(),ue=m.clientY-ne.top,le=Me(ue/oe,15),Ne=Math.max(0,Math.min(le,12*60)),R=new Date(g);R.setHours(bn,0,0,0),R.setMinutes(R.getMinutes()+Ne);const de=R.toISOString();if(P&&M>0){const He=new Date(R.getTime()+M).toISOString();try{await e.updateBlock(P,{start_at:de,end_at:He}),await n.fetchCurrentView()}catch(qe){console.error("Failed to move block:",qe)}return}if(!f)return;const ce=new Date(R);ce.setMinutes(ce.getMinutes()+Math.round(k*60));const be=ce.toISOString(),we=`temp_${Date.now()}`,ze={kind:"planned",id:we,project_id:null,job_number:"",display_name:"Loading...",start_at:de,end_at:be,title:"",color_hue:260,tags:[],task_id:f,session_id:null,manual_entry_id:null};n.addBlock(ze);try{await e.createBlock(f,{start_at:de,end_at:be}),await n.fetchCurrentView()}catch(_e){n.removeBlock(we),console.error("Failed to create task block:",_e)}}let c=0,y="",p=null;function x(g,m){m.preventDefault(),m.stopPropagation(),r.value=g,p=g,c=m.clientY,y=g.end_at,s.value=g.end_at;const P=k=>{if(!p)return;const M=k.clientY-c,W=Me(M/oe,15),ue=new Date(y).getTime()+W*6e4,le=new Date(p.start_at).getTime()+15*6e4;s.value=new Date(Math.max(ue,le)).toISOString()},f=async()=>{if(document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",f),!p||!s.value){r.value=null;return}const k=p.id,M=s.value;if(M===y){r.value=null,s.value=null;return}try{p.task_id&&await e.updateBlock(k,{start_at:p.start_at,end_at:M}),n.updateBlock({...p,end_at:M})}catch(W){console.error("Failed to resize block:",W),n.updateBlock({...p,end_at:y})}r.value=null,s.value=null,p=null};document.addEventListener("mousemove",P),document.addEventListener("mouseup",f)}return{draggingTaskId:t,dragOverDay:a,resizingBlock:r,resizePreviewEnd:s,onDragStart:i,onBlockDragStart:d,onDragOver:l,onDragLeave:h,onDrop:o,onResizeStart:x}}function wn(e){return`hsla(${e}, 65%, 45%, 0.85)`}function yn(e){return`hsla(${e}, 65%, 55%, 1)`}const kn=["draggable"],pn={class:"px-1.5 py-1 h-full flex flex-col text-white overflow-hidden"},xn={class:"text-xs font-semibold leading-tight truncate"},_n={key:0,class:"text-xs opacity-75 truncate"},Dn={key:1,class:"text-xs opacity-75 mt-auto"},Mn=N({__name:"CalendarBlock",props:{block:{},lane:{},totalLanes:{},top:{},height:{},resizeEnd:{}},emits:["resizeStart","click","blockDragStart"],setup(e,{emit:n}){const t=e,a=n,r=Y(()=>t.resizeEnd?new Date(t.resizeEnd):new Date(t.block.end_at)),s=Y(()=>{if(!t.resizeEnd)return t.height;const o=(r.value.getTime()-new Date(t.block.start_at).getTime())/6e4;return Math.max(o*(40/30),20)}),i=Y(()=>{const h=r.value.getTime()-new Date(t.block.start_at).getTime();return re(h/36e5)}),d=Y(()=>{const h=`calc(${100/t.totalLanes}% - 2px)`,o=`calc(${t.lane/t.totalLanes*100}% + 1px)`;return{top:`${t.top}px`,height:`${s.value}px`,width:h,left:o,backgroundColor:wn(t.block.color_hue),borderColor:yn(t.block.color_hue)}}),l=Y(()=>s.value<40);return(h,o)=>(v(),b("div",{class:E(["absolute rounded overflow-hidden cursor-pointer select-none group",{"border-2":e.block.kind==="session","border-2 border-dashed opacity-80":e.block.kind==="planned","border-2 calendar-block--manual":e.block.kind==="manual"}]),draggable:e.block.kind==="planned"&&!!e.block.task_id,style:H(d.value),onClick:o[1]||(o[1]=c=>a("click",e.block)),onDragstart:o[2]||(o[2]=c=>e.block.kind==="planned"&&e.block.task_id?a("blockDragStart",e.block,c):void 0)},[u("div",pn,[u("p",xn,D(e.block.kind==="planned"&&e.block.title?e.block.title:e.block.display_name),1),!l.value&&e.block.job_number?(v(),b("p",_n,D(e.block.job_number),1)):$("",!0),l.value?$("",!0):(v(),b("p",Dn,D(i.value),1))]),u("div",{class:"absolute bottom-0 left-0 right-0 h-2 cursor-s-resize opacity-0 group-hover:opacity-100 flex items-center justify-center",onMousedown:o[0]||(o[0]=he(c=>a("resizeStart",c),["stop"]))},[...o[3]||(o[3]=[u("div",{class:"w-8 h-0.5 bg-white/60 rounded"},null,-1)])],32)],46,kn))}}),Sn=Je(Mn,[["__scopeId","data-v-53efb3d3"]]),Tn={class:"flex overflow-auto h-full"},Pn={class:"flex flex-1 gap-px min-w-0"},$n=["onDragover","onDrop"],On={key:1,class:"absolute inset-0 bg-primary/10 pointer-events-none z-0"},L=7,fe=19,X=40,Cn=N({__name:"CalendarGrid",emits:["blockClick"],setup(e,{emit:n}){const t=Array.from({length:fe-L+1},(p,x)=>L+x),a=te(),r=Le(),s=n,i=Y(()=>a.view==="week"?a.weekDays:[a.currentDate]),d=O(new Date);function l(p){const x=a.getBlocksForDay(p);return tt(x)}function h(p){return nt(new Date(p.start_at),L)}function o(p){return at(new Date(p.start_at),new Date(p.end_at))}function c(p){var x;return((x=r.resizingBlock.value)==null?void 0:x.id)===p.id}function y(p){return p===12?"12 PM":p>12?`${p-12} PM`:`${p} AM`}return(p,x)=>(v(),b("div",Tn,[u("div",{class:"w-12 shrink-0 relative",style:H({height:`${(fe-L+1)*X*2}px`})},[(v(!0),b(B,null,j(w(t),g=>(v(),b("div",{key:g,class:"absolute right-2 text-xs text-muted-foreground",style:H({top:`${(g-L)*X*2-6}px`})},D(y(g)),5))),128))],4),u("div",Pn,[(v(!0),b(B,null,j(i.value,g=>(v(),b("div",{key:w(O)(g),class:E(["flex-1 relative border-l border-border",{"bg-primary/5":w(O)(g)===w(d)}]),style:H({height:`${(fe-L)*X*2}px`}),onDragover:m=>w(r).onDragOver(g,m),onDragleave:x[1]||(x[1]=m=>w(r).onDragLeave()),onDrop:m=>w(r).onDrop(g,m)},[w(a).view==="week"?(v(),b("div",{key:0,class:E(["sticky top-0 z-10 text-center py-1 text-xs font-medium border-b border-border bg-background",w(O)(g)===w(d)?"text-primary":"text-muted-foreground"])},[u("div",null,D(w(q)(g,"EEE")),1),u("div",{class:E(["inline-flex h-6 w-6 mx-auto items-center justify-center rounded-full text-sm",w(O)(g)===w(d)?"bg-primary text-primary-foreground":""])},D(w(q)(g,"d")),3)],2)):$("",!0),(v(!0),b(B,null,j(w(t),m=>(v(),b("div",{key:m,class:"absolute left-0 right-0 border-t border-border/40",style:H({top:`${(m-L)*X*2}px`})},null,4))),128)),(v(!0),b(B,null,j(w(t).slice(0,-1),m=>(v(),b("div",{key:`half-${m}`,class:"absolute left-0 right-0 border-t border-border/20",style:H({top:`${(m-L)*X*2+X}px`})},null,4))),128)),w(r).dragOverDay.value===w(O)(g)?(v(),b("div",On)):$("",!0),(v(!0),b(B,null,j(l(g),({block:m,lane:P,totalLanes:f})=>(v(),Ee(Sn,{key:m.id,block:m,lane:P,"total-lanes":f,top:h(m),height:o(m),"resize-end":c(m)?w(r).resizePreviewEnd.value:null,onClick:k=>s("blockClick",m),onResizeStart:k=>w(r).onResizeStart(m,k),onBlockDragStart:x[0]||(x[0]=(k,M)=>w(r).onBlockDragStart(k,M))},null,8,["block","lane","total-lanes","top","height","resize-end","onClick","onResizeStart"]))),128))],46,$n))),128))])]))}}),Wn={class:"flex flex-col h-full bg-card border-l border-border"},En={class:"p-3 border-b border-border flex items-center justify-between shrink-0"},Vn={class:"flex-1 overflow-y-auto p-2 space-y-1.5"},Yn={key:0,class:"text-xs text-muted-foreground p-2"},Bn={key:1,class:"text-xs text-muted-foreground p-2 text-center"},jn=["onDragstart"],Fn={class:"flex items-start gap-2"},Ln={class:"flex-1 min-w-0"},Nn={class:"text-xs font-medium text-foreground leading-tight truncate"},zn={class:"flex items-center gap-1.5 mt-1 flex-wrap"},Hn={key:0,class:"text-xs text-muted-foreground"},qn={key:0,class:"p-3 border-t border-border shrink-0"},In={class:"space-y-1"},Rn={class:"text-muted-foreground truncate max-w-[100px]"},An={class:"text-foreground"},Qn=N({__name:"PlannerSidebar",emits:["createTask"],setup(e,{emit:n}){const t=ve(),a=te(),r=Le(),s=n,i=Y(()=>O(a.currentDate));ge(()=>{t.fetchForDate(i.value)});const d=o=>({todo:"outline",doing:"default",done:"success",cancelled:"secondary"})[o],l=o=>o>=4?"bg-red-500":o===3?"bg-amber-500":"bg-emerald-500",h=Y(()=>{const o={};for(const c of t.tasks){const y=c.project_id??"_none";o[y]||(o[y]={name:c.project_id?y:"No Project",planned:0,actual:0}),o[y].planned+=c.estimate_hours??0,o[y].actual+=c.actual_hours??0}return Object.values(o)});return(o,c)=>(v(),b("div",Wn,[u("div",En,[c[2]||(c[2]=u("h3",{class:"text-sm font-semibold text-foreground"},"Planner",-1)),S(G,{size:"sm",variant:"ghost",onClick:c[0]||(c[0]=y=>s("createTask"))},{default:C(()=>[...c[1]||(c[1]=[u("svg",{class:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[u("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1)])]),_:1})]),u("div",Vn,[w(t).loading?(v(),b("div",Yn,"Loading...")):w(t).tasks.length===0?(v(),b("div",Bn," No tasks for today ")):$("",!0),(v(!0),b(B,null,j(w(t).tasks,y=>(v(),b("div",{key:y.id,class:"rounded-md border border-border bg-background p-2 cursor-grab active:cursor-grabbing hover:border-primary/50 transition-colors",draggable:"true",onDragstart:p=>w(r).onDragStart(y,p)},[u("div",Fn,[u("div",{class:E(["h-2 w-2 rounded-full mt-1.5 shrink-0",l(y.priority)])},null,2),u("div",Ln,[u("p",Nn,D(y.title),1),u("div",zn,[S(Ke,{variant:d(y.status),class:"text-xs py-0"},{default:C(()=>[Z(D(y.status),1)]),_:2},1032,["variant"]),y.estimate_hours?(v(),b("span",Hn,D(w(re)(y.estimate_hours)),1)):$("",!0)])])])],40,jn))),128))]),h.value.length?(v(),b("div",qn,[c[3]||(c[3]=u("p",{class:"text-xs font-medium text-muted-foreground mb-2"},"Plan vs Actual",-1)),u("div",In,[(v(!0),b(B,null,j(h.value,y=>(v(),b("div",{key:y.name,class:"flex items-center justify-between text-xs"},[u("span",Rn,D(y.name),1),u("span",An,D(w(re)(y.planned))+" / "+D(w(re)(y.actual)),1)]))),128))])])):$("",!0)]))}}),Xn=["id","value","placeholder","disabled","rows"],Gn=N({__name:"Textarea",props:{modelValue:{},placeholder:{},disabled:{type:Boolean},rows:{},class:{},id:{}},emits:["update:modelValue"],setup(e,{emit:n}){const t=e,a=n;return(r,s)=>(v(),b("textarea",{id:e.id,value:e.modelValue,placeholder:e.placeholder,disabled:e.disabled,rows:e.rows??3,class:E(w(Ve)("flex 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 resize-none",t.class)),onInput:s[0]||(s[0]=i=>a("update:modelValue",i.target.value))},null,42,Xn))}}),Un=["id","value","disabled"],Jn=["selected"],ae=N({__name:"Select",props:{modelValue:{},disabled:{type:Boolean},class:{},id:{},placeholder:{}},emits:["update:modelValue","change"],setup(e,{emit:n}){const t=e,a=n;return(r,s)=>(v(),b("select",{id:e.id,value:e.modelValue,disabled:e.disabled,class:E(w(Ve)("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm","ring-offset-background focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50",t.class)),onChange:s[0]||(s[0]=i=>a("update:modelValue",i.target.value))},[e.placeholder?(v(),b("option",{key:0,value:"",disabled:"",selected:!e.modelValue},D(e.placeholder),9,Jn)):$("",!0),Ie(r.$slots,"default")],42,Un))}}),Kn={list:()=>Re.get("/api/projects")},Zn=We("projects",()=>{const e=T([]),n=T(!1);async function t(){if(!(e.value.length>0)){n.value=!0;try{const a=await Kn.list();e.value=a.data}catch{e.value=[]}finally{n.value=!1}}}return{projects:e,loading:n,fetchProjects:t}}),ea={class:"space-y-1.5"},ta={class:"space-y-1.5"},na={class:"grid grid-cols-2 gap-3"},aa={class:"space-y-1.5"},ra={class:"space-y-1.5"},oa={class:"grid grid-cols-2 gap-3"},sa={class:"space-y-1.5"},ia={class:"space-y-1.5"},ua={class:"grid grid-cols-2 gap-3"},la={class:"space-y-1.5"},da={class:"space-y-1.5"},ca={key:0,class:"space-y-1.5"},ma=["value"],fa={key:1,class:"space-y-1.5"},ha=["value"],ga=N({__name:"TaskForm",props:{open:{type:Boolean},task:{default:null},defaultDate:{}},emits:["close","save"],setup(e,{emit:n}){const t=e,a=n,r=et(),s=Zn();ge(()=>{s.fetchProjects()});const i=T({title:"",notes:"",planned_date:"",start_time:"",end_time:"",estimate_hours:1,status:"todo",priority:3,project_id:void 0,azure_work_item_id:void 0});Ae(()=>t.open,h=>{h&&(t.task?i.value={title:t.task.title,notes:t.task.notes??"",planned_date:t.task.planned_date??"",start_time:"",end_time:"",estimate_hours:t.task.estimate_hours??1,status:t.task.status,priority:t.task.priority,project_id:t.task.project_id??void 0,azure_work_item_id:t.task.azure_work_item_id??void 0}:i.value={title:"",notes:"",planned_date:t.defaultDate??"",start_time:"",end_time:"",estimate_hours:1,status:"todo",priority:3,project_id:void 0,azure_work_item_id:void 0},r.integration&&!r.workItems.length&&r.fetchWorkItems("open"))},{immediate:!0});const d=T(!1);async function l(){if(i.value.title.trim()){d.value=!0;try{const h={title:i.value.title,notes:i.value.notes||void 0,planned_date:i.value.planned_date,estimate_hours:i.value.estimate_hours,status:i.value.status,priority:i.value.priority,project_id:i.value.project_id||null,azure_work_item_id:i.value.azure_work_item_id||null};let o;i.value.planned_date&&i.value.start_time&&i.value.end_time&&(o={start_at:new Date(`${i.value.planned_date}T${i.value.start_time}:00`).toISOString(),end_at:new Date(`${i.value.planned_date}T${i.value.end_time}:00`).toISOString()}),a("save",h,o)}finally{d.value=!1}}}return(h,o)=>(v(),Ee(Ze,{open:e.open,title:e.task?"Edit Task":"New Task","max-width":"max-w-md",onClose:o[11]||(o[11]=c=>a("close"))},{footer:C(()=>[S(G,{variant:"outline",disabled:d.value,onClick:o[10]||(o[10]=c=>a("close"))},{default:C(()=>[...o[25]||(o[25]=[Z("Cancel",-1)])]),_:1},8,["disabled"]),S(G,{loading:d.value,onClick:l},{default:C(()=>[Z(D(e.task?"Update":"Create"),1)]),_:1},8,["loading"])]),default:C(()=>[u("form",{class:"space-y-4",onSubmit:he(l,["prevent"])},[u("div",ea,[o[12]||(o[12]=u("label",{class:"text-sm font-medium text-foreground"},"Title *",-1)),S(U,{modelValue:i.value.title,"onUpdate:modelValue":o[0]||(o[0]=c=>i.value.title=c),placeholder:"Task title...",disabled:d.value},null,8,["modelValue","disabled"])]),u("div",ta,[o[13]||(o[13]=u("label",{class:"text-sm font-medium text-foreground"},"Notes",-1)),S(Gn,{modelValue:i.value.notes,"onUpdate:modelValue":o[1]||(o[1]=c=>i.value.notes=c),placeholder:"Additional notes...",disabled:d.value},null,8,["modelValue","disabled"])]),u("div",na,[u("div",aa,[o[14]||(o[14]=u("label",{class:"text-sm font-medium text-foreground"},"Planned Date",-1)),S(U,{modelValue:i.value.planned_date,"onUpdate:modelValue":o[2]||(o[2]=c=>i.value.planned_date=c),type:"date",disabled:d.value},null,8,["modelValue","disabled"])]),u("div",ra,[o[15]||(o[15]=u("label",{class:"text-sm font-medium text-foreground"},"Estimate (h)",-1)),S(U,{modelValue:i.value.estimate_hours,"onUpdate:modelValue":o[3]||(o[3]=c=>i.value.estimate_hours=c),type:"number",min:"0.25",max:"24",step:"0.25",disabled:d.value},null,8,["modelValue","disabled"])])]),u("div",oa,[u("div",sa,[o[16]||(o[16]=u("label",{class:"text-sm font-medium text-foreground"},[Z("Start time "),u("span",{class:"text-muted-foreground font-normal"},"(optional)")],-1)),S(U,{modelValue:i.value.start_time,"onUpdate:modelValue":o[4]||(o[4]=c=>i.value.start_time=c),type:"time",disabled:d.value},null,8,["modelValue","disabled"])]),u("div",ia,[o[17]||(o[17]=u("label",{class:"text-sm font-medium text-foreground"},"End time",-1)),S(U,{modelValue:i.value.end_time,"onUpdate:modelValue":o[5]||(o[5]=c=>i.value.end_time=c),type:"time",disabled:d.value},null,8,["modelValue","disabled"])])]),u("div",ua,[u("div",la,[o[19]||(o[19]=u("label",{class:"text-sm font-medium text-foreground"},"Status",-1)),S(ae,{modelValue:i.value.status,"onUpdate:modelValue":o[6]||(o[6]=c=>i.value.status=c),disabled:d.value},{default:C(()=>[...o[18]||(o[18]=[u("option",{value:"todo"},"Todo",-1),u("option",{value:"doing"},"Doing",-1),u("option",{value:"done"},"Done",-1),u("option",{value:"cancelled"},"Cancelled",-1)])]),_:1},8,["modelValue","disabled"])]),u("div",da,[o[21]||(o[21]=u("label",{class:"text-sm font-medium text-foreground"},"Priority",-1)),S(ae,{modelValue:i.value.priority,"onUpdate:modelValue":o[7]||(o[7]=c=>i.value.priority=c),disabled:d.value},{default:C(()=>[...o[20]||(o[20]=[u("option",{value:"1"},"1 - Low",-1),u("option",{value:"2"},"2 - Normal",-1),u("option",{value:"3"},"3 - Medium",-1),u("option",{value:"4"},"4 - High",-1),u("option",{value:"5"},"5 - Critical",-1)])]),_:1},8,["modelValue","disabled"])])]),w(s).projects.length?(v(),b("div",ca,[o[23]||(o[23]=u("label",{class:"text-sm font-medium text-foreground"},"Project",-1)),S(ae,{modelValue:i.value.project_id,"onUpdate:modelValue":o[8]||(o[8]=c=>i.value.project_id=c),disabled:d.value,placeholder:"Select project..."},{default:C(()=>[o[22]||(o[22]=u("option",{value:""},"None",-1)),(v(!0),b(B,null,j(w(s).projects,c=>(v(),b("option",{key:c.id,value:c.id},D(c.display_name)+D(c.job_number?` (${c.job_number})`:""),9,ma))),128))]),_:1},8,["modelValue","disabled"])])):$("",!0),w(r).workItems.length?(v(),b("div",fa,[o[24]||(o[24]=u("label",{class:"text-sm font-medium text-foreground"},"Azure DevOps Work Item",-1)),S(ae,{modelValue:i.value.azure_work_item_id,"onUpdate:modelValue":o[9]||(o[9]=c=>i.value.azure_work_item_id=c),disabled:d.value,placeholder:"Link work item..."},{default:C(()=>[(v(!0),b(B,null,j(w(r).workItems,c=>(v(),b("option",{key:c.id,value:c.id}," #"+D(c.ado_id)+" – "+D(c.title),9,ha))),128))]),_:1},8,["modelValue","disabled"])])):$("",!0)],32)]),_:1},8,["open","title"]))}}),va={class:"h-full flex flex-col"},ba={class:"p-4 border-b border-border flex items-center gap-3 flex-wrap"},wa={class:"flex items-center gap-2 ml-auto"},ya={class:"flex-1 flex overflow-hidden"},ka={class:"flex-1 overflow-auto"},pa={key:0,class:"w-56 shrink-0 overflow-hidden"},xa={class:"bg-card border border-border rounded-lg shadow-xl p-4 w-72"},_a={class:"flex items-start justify-between gap-2 mb-3"},Da={class:"font-semibold text-sm text-foreground"},Ma={key:0,class:"text-xs text-muted-foreground"},Sa={class:"space-y-1 text-xs text-muted-foreground"},Ta={key:0,class:"mt-2 flex flex-wrap gap-1"},Pa={key:1,class:"mt-3 pt-3 border-t border-border flex items-center gap-2"},$a=["disabled"],Oa={key:2,class:"mt-3 pt-3 border-t border-border text-xs text-muted-foreground"},Ha=N({__name:"CalendarView",setup(e){const n=te(),t=ve(),a=Ge(),r=Qe(),s=T(!0),i=T(!1),d=T(null),l=T(null),h=T(!1);ge(async()=>{const x=r.query.date;x&&(n.currentDate=new Date(x+"T12:00:00"),n.setView("day")),await n.fetchCurrentView()});function o(x){if(x.project_id&&x.kind==="session"){const g=x.start_at.substring(0,10);a.push({name:"project-detail",params:{id:x.project_id,date:g}})}else l.value=x}async function c(x){try{d.value?(await t.update(d.value.id,x),A.success("Task updated")):(await t.create(x),A.success("Task created")),i.value=!1,d.value=null,t.fetchForDate(O(n.currentDate))}catch{A.error("Failed to save task")}}async function y(x){if(x.task_id)try{const g=await Xe(()=>import("./tasks-Dr7jFVHn.js").then(m=>m.t),__vite__mapDeps([0,1,2])).then(m=>m.tasksApi.get(x.task_id));d.value=g.data,l.value=null,i.value=!0}catch{A.error("Failed to load task")}}async function p(x){if(confirm(`Delete "${x.display_name}"?`)){h.value=!0;try{await t.deleteBlock(x.id),n.removeBlock(x.id),l.value=null,A.success("Block deleted")}catch{A.error("Failed to delete block")}finally{h.value=!1}}}return(x,g)=>(v(),b("div",va,[u("div",ba,[S(vn),u("div",wa,[u("button",{class:"text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:g[0]||(g[0]=m=>s.value=!s.value)},D(s.value?"Hide Planner":"Show Planner"),1)])]),u("div",ya,[u("div",ka,[S(Cn,{onBlockClick:o})]),s.value?(v(),b("div",pa,[S(Qn,{onCreateTask:g[1]||(g[1]=m=>i.value=!0)})])):$("",!0)]),l.value?(v(),b("div",{key:0,class:"fixed inset-0 z-40 flex items-center justify-center p-4",onClick:g[5]||(g[5]=he(m=>l.value=null,["self"]))},[u("div",xa,[u("div",_a,[u("div",null,[u("p",Da,D(l.value.display_name),1),l.value.job_number?(v(),b("p",Ma,D(l.value.job_number),1)):$("",!0)]),u("button",{class:"text-muted-foreground hover:text-foreground",onClick:g[2]||(g[2]=m=>l.value=null)},[...g[7]||(g[7]=[u("svg",{class:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[u("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])])]),u("div",Sa,[u("p",null,"Start: "+D(new Date(l.value.start_at).toLocaleString()),1),u("p",null,"End: "+D(new Date(l.value.end_at).toLocaleString()),1),u("p",null,"Type: "+D(l.value.kind),1)]),l.value.tags.length?(v(),b("div",Ta,[(v(!0),b(B,null,j(l.value.tags,m=>(v(),b("span",{key:m.id,class:"px-1.5 py-0.5 rounded text-xs",style:H({background:`${m.color_hex}22`,color:m.color_hex})},D(m.name),5))),128))])):$("",!0),l.value.kind==="planned"?(v(),b("div",Pa,[u("button",{class:"flex-1 text-xs px-2 py-1.5 rounded bg-muted hover:bg-muted/80 text-foreground transition-colors",onClick:g[3]||(g[3]=m=>y(l.value))},"Edit task"),u("button",{class:"flex-1 text-xs px-2 py-1.5 rounded bg-destructive/10 hover:bg-destructive/20 text-destructive transition-colors",disabled:h.value,onClick:g[4]||(g[4]=m=>p(l.value))},"Delete block",8,$a)])):(v(),b("p",Oa,D(l.value.kind==="session"?"Session from Claude Code — read-only":"Read-only entry"),1))])])):$("",!0),S(ga,{open:i.value,task:d.value,"default-date":w(O)(w(n).currentDate),onClose:g[6]||(g[6]=m=>{i.value=!1,d.value=null}),onSave:c},null,8,["open","task","default-date"])]))}});export{Ha as default}; diff --git a/src/static/assets/CalendarView-DRWiX2N8.css b/src/static/assets/CalendarView-bLogQo28.css similarity index 62% rename from src/static/assets/CalendarView-DRWiX2N8.css rename to src/static/assets/CalendarView-bLogQo28.css index 5800823..fd65692 100644 --- a/src/static/assets/CalendarView-DRWiX2N8.css +++ b/src/static/assets/CalendarView-bLogQo28.css @@ -1 +1 @@ -.calendar-block--manual[data-v-978cfc69]{background-image:repeating-linear-gradient(45deg,transparent,transparent 3px,rgba(255,255,255,.1) 3px,rgba(255,255,255,.1) 6px)} +.calendar-block--manual[data-v-53efb3d3]{background-image:repeating-linear-gradient(45deg,transparent,transparent 3px,rgba(255,255,255,.1) 3px,rgba(255,255,255,.1) 6px)} diff --git a/src/static/assets/CardContent.vue_vue_type_script_setup_true_lang-B8VjSxLa.js b/src/static/assets/CardContent.vue_vue_type_script_setup_true_lang-DdGXaWEa.js similarity index 86% rename from src/static/assets/CardContent.vue_vue_type_script_setup_true_lang-B8VjSxLa.js rename to src/static/assets/CardContent.vue_vue_type_script_setup_true_lang-DdGXaWEa.js index 3e5b0d4..95435fb 100644 --- a/src/static/assets/CardContent.vue_vue_type_script_setup_true_lang-B8VjSxLa.js +++ b/src/static/assets/CardContent.vue_vue_type_script_setup_true_lang-DdGXaWEa.js @@ -1 +1 @@ -import{c as e}from"./utils-7WVCegLb.js";import{d as o,c as n,n as t,h as c,p,o as l}from"./index-BP_aNEdP.js";const _=o({__name:"Card",props:{class:{}},setup(s){const a=s;return(r,d)=>(l(),n("div",{class:t(c(e)("rounded-lg border bg-card text-card-foreground shadow-sm",a.class))},[p(r.$slots,"default")],2))}}),f=o({__name:"CardContent",props:{class:{}},setup(s){const a=s;return(r,d)=>(l(),n("div",{class:t(c(e)("p-6 pt-0",a.class))},[p(r.$slots,"default")],2))}});export{_,f as a}; +import{c as e}from"./utils-7WVCegLb.js";import{d as o,c as n,n as t,h as c,p,o as l}from"./index-DVV3ZbZ2.js";const _=o({__name:"Card",props:{class:{}},setup(s){const a=s;return(r,d)=>(l(),n("div",{class:t(c(e)("rounded-lg border bg-card text-card-foreground shadow-sm",a.class))},[p(r.$slots,"default")],2))}}),f=o({__name:"CardContent",props:{class:{}},setup(s){const a=s;return(r,d)=>(l(),n("div",{class:t(c(e)("p-6 pt-0",a.class))},[p(r.$slots,"default")],2))}});export{_,f as a}; diff --git a/src/static/assets/CardTitle.vue_vue_type_script_setup_true_lang-KH4UhlTi.js b/src/static/assets/CardTitle.vue_vue_type_script_setup_true_lang-CT9DRTds.js similarity index 87% rename from src/static/assets/CardTitle.vue_vue_type_script_setup_true_lang-KH4UhlTi.js rename to src/static/assets/CardTitle.vue_vue_type_script_setup_true_lang-CT9DRTds.js index 3a60a16..de4ebf7 100644 --- a/src/static/assets/CardTitle.vue_vue_type_script_setup_true_lang-KH4UhlTi.js +++ b/src/static/assets/CardTitle.vue_vue_type_script_setup_true_lang-CT9DRTds.js @@ -1 +1 @@ -import{c as t}from"./utils-7WVCegLb.js";import{d as n,o,c as r,n as c,h as l,p}from"./index-BP_aNEdP.js";const f=n({__name:"CardHeader",props:{class:{}},setup(s){const e=s;return(a,i)=>(o(),r("div",{class:c(l(t)("flex flex-col space-y-1.5 p-6",e.class))},[p(a.$slots,"default")],2))}}),_=n({__name:"CardTitle",props:{class:{}},setup(s){const e=s;return(a,i)=>(o(),r("h3",{class:c(l(t)("text-lg font-semibold leading-none tracking-tight",e.class))},[p(a.$slots,"default")],2))}});export{f as _,_ as a}; +import{c as t}from"./utils-7WVCegLb.js";import{d as n,o,c as r,n as c,h as l,p}from"./index-DVV3ZbZ2.js";const f=n({__name:"CardHeader",props:{class:{}},setup(s){const e=s;return(a,i)=>(o(),r("div",{class:c(l(t)("flex flex-col space-y-1.5 p-6",e.class))},[p(a.$slots,"default")],2))}}),_=n({__name:"CardTitle",props:{class:{}},setup(s){const e=s;return(a,i)=>(o(),r("h3",{class:c(l(t)("text-lg font-semibold leading-none tracking-tight",e.class))},[p(a.$slots,"default")],2))}});export{f as _,_ as a}; diff --git a/src/static/assets/DashboardView-CEeTSEhN.js b/src/static/assets/DashboardView-BsUJ2kCa.js similarity index 97% rename from src/static/assets/DashboardView-CEeTSEhN.js rename to src/static/assets/DashboardView-BsUJ2kCa.js index 0a045cc..eebc207 100644 --- a/src/static/assets/DashboardView-CEeTSEhN.js +++ b/src/static/assets/DashboardView-BsUJ2kCa.js @@ -1 +1 @@ -import{d as X,k as N,w as a,n as u,l as re,h as m,R as A,o,e as l,a as e,t as c,c as r,i as j,q as p,j as V,x as le,y as ne,F as g,r as x,z as J,A as Q,s as h,B as _,f as ae}from"./index-BP_aNEdP.js";import{d as z}from"./dashboard-CviKGUv7.js";import{a as k,_ as b}from"./CardContent.vue_vue_type_script_setup_true_lang-B8VjSxLa.js";import{_ as M,a as D}from"./CardTitle.vue_vue_type_script_setup_true_lang-KH4UhlTi.js";import{_ as de}from"./Progress.vue_vue_type_script_setup_true_lang-sI-MERcU.js";import{_ as ie}from"./Button.vue_vue_type_script_setup_true_lang-B_YE_XNW.js";import{u as ue}from"./tasks-OhvhAG_3.js";import{u as ce}from"./devops-DxRDHPW5.js";import{i as T,f as H}from"./utils-7WVCegLb.js";import"./Spinner.vue_vue_type_script_setup_true_lang-Cu49-Cc4.js";const me={class:"flex items-start justify-between gap-2"},fe={class:"flex-1 min-w-0"},ge={class:"mt-2"},xe={key:0,class:"h-7 w-20 bg-muted animate-pulse rounded"},pe={key:0,class:"text-xs text-muted-foreground mt-1.5 truncate"},ve={key:0,class:"mt-3 flex items-center gap-1.5 text-xs"},he={class:"h-3 w-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},ye={key:0,"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2.5",d:"M5 10l7-7m0 0l7 7m-7-7v18"},ke={key:1,"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2.5",d:"M19 14l-7 7m0 0l-7-7m7 7V3"},be={key:2,"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2.5",d:"M5 12h14"},B=X({__name:"KpiCard",props:{label:{},value:{},icon:{},trend:{},description:{},loading:{type:Boolean},hero:{type:Boolean},to:{}},setup(n){const W=n,w=V(()=>W.hero?"relative overflow-hidden transition-all duration-200 border-primary/20 bg-primary/5 ring-1 ring-primary/15 panel-glow-hover":"relative overflow-hidden transition-all duration-200 border-border/60 panel-glow-hover");return(C,i)=>(o(),N(re(n.to?m(A):"div"),{to:n.to,class:u(n.to?"block hover:opacity-90 transition-opacity":"")},{default:a(()=>[l(b,{class:u(w.value)},{default:a(()=>[e("span",{class:u(["pointer-events-none absolute -right-4 -top-4 h-14 w-14 rounded-full",n.hero?"bg-primary/10":"bg-primary/5"])},null,2),e("span",{class:u(["pointer-events-none absolute -right-1 -top-1 h-6 w-6 rounded-full",n.hero?"bg-primary/15":"bg-primary/8"])},null,2),l(k,{class:"p-5"},{default:a(()=>[e("div",me,[e("div",fe,[e("p",{class:u(["text-[10px] font-semibold uppercase tracking-[0.1em] truncate",n.hero?"text-primary/80":"text-muted-foreground"])},c(n.label),3),e("div",ge,[n.loading?(o(),r("div",xe)):(o(),r("p",{key:1,class:u(["kpi-value font-bold tracking-tight leading-none",n.hero?"text-3xl text-primary":"text-2xl text-foreground"])},c(n.value),3))]),n.description?(o(),r("p",pe,c(n.description),1)):j("",!0)]),n.icon?(o(),r("div",{key:0,class:u(["rounded-xl flex items-center justify-center shrink-0",[n.hero?"h-11 w-11 bg-primary/15 ring-1 ring-primary/25":"h-9 w-9 bg-muted ring-1 ring-border"]])},[n.icon==="clock"?(o(),r("svg",{key:0,class:u(["shrink-0",n.hero?"h-5 w-5 text-primary":"h-4 w-4 text-muted-foreground"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...i[0]||(i[0]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)])],2)):n.icon==="calendar"?(o(),r("svg",{key:1,class:u(["shrink-0",n.hero?"h-5 w-5 text-primary":"h-4 w-4 text-muted-foreground"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...i[1]||(i[1]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"},null,-1)])],2)):n.icon==="folder"?(o(),r("svg",{key:2,class:u(["shrink-0",n.hero?"h-5 w-5 text-primary":"h-4 w-4 text-muted-foreground"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...i[2]||(i[2]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 7a2 2 0 012-2h3.586a1 1 0 01.707.293l1.414 1.414A1 1 0 0011.414 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V7z"},null,-1)])],2)):n.icon==="trending-up"?(o(),r("svg",{key:3,class:u(["shrink-0",n.hero?"h-5 w-5 text-primary":"h-4 w-4 text-muted-foreground"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...i[3]||(i[3]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 7h8m0 0v8m0-8l-8 8-4-4-6 6"},null,-1)])],2)):n.icon==="git"?(o(),r("svg",{key:4,class:u(["shrink-0",n.hero?"h-5 w-5 text-primary":"h-4 w-4 text-muted-foreground"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...i[4]||(i[4]=[e("circle",{cx:"12",cy:"12",r:"4",stroke:"currentColor","stroke-width":"2"},null,-1),e("path",{"stroke-linecap":"round","stroke-width":"2",d:"M2 12h6M16 12h6"},null,-1)])],2)):(o(),r("svg",{key:5,class:u(["shrink-0",n.hero?"h-5 w-5 text-primary":"h-4 w-4 text-muted-foreground"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...i[5]||(i[5]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"},null,-1)])],2))],2)):j("",!0)]),n.trend!==void 0?(o(),r("div",ve,[e("div",{class:u(["flex items-center gap-1 font-semibold tabular-nums",n.trend>0?"text-[hsl(var(--success))]":n.trend<0?"text-destructive":"text-muted-foreground"])},[(o(),r("svg",he,[n.trend>0?(o(),r("path",ye)):n.trend<0?(o(),r("path",ke)):(o(),r("path",be))])),p(" "+c(n.trend>0?"+":"")+c(Math.abs(n.trend))+"% ",1)],2),i[6]||(i[6]=e("span",{class:"text-muted-foreground"},"vs last period",-1))])):j("",!0),e("div",{class:u(["mt-3 h-px rounded-full",n.hero?"w-full bg-primary/20":"w-10 bg-primary/20"])},null,2)]),_:1})]),_:1},8,["class"])]),_:1},8,["to","class"]))}}),we={class:"p-6 space-y-6"},_e={class:"flex flex-wrap items-center gap-3"},je={class:"flex items-center rounded-lg border border-border overflow-hidden bg-muted/30"},Ce=["onClick"],$e={class:"grid grid-cols-2 md:grid-cols-3 xl:grid-cols-6 gap-4"},Me={class:"grid grid-cols-1 lg:grid-cols-2 gap-4"},De={class:"flex items-center justify-between"},Be={key:0,class:"flex flex-col items-center justify-center py-6 gap-2"},Ve={key:1,class:"space-y-1.5"},ze=["disabled","onClick"],Te={key:0,class:"h-3 w-3 animate-spin text-primary",fill:"none",viewBox:"0 0 24 24"},He={class:"flex-1 text-xs text-foreground truncate"},Ne={key:0,class:"text-[10px] px-1 py-0.5 rounded bg-primary/20 text-primary shrink-0"},Ae={key:1,class:"text-[10px] px-1 py-0.5 rounded bg-destructive/20 text-destructive shrink-0"},Se={class:"flex items-center justify-between"},Fe={key:0,class:"flex flex-col items-center justify-center py-6 gap-2"},Pe={key:1,class:"space-y-2"},Re=["href"],Ie={class:"flex-1 min-w-0"},Oe={class:"text-xs text-foreground truncate group-hover:text-primary transition-colors"},qe={class:"text-[10px] text-muted-foreground truncate"},Ue={class:"text-[10px] px-1.5 py-0.5 rounded border border-border/50 text-muted-foreground shrink-0"},We={class:"grid grid-cols-1 lg:grid-cols-2 gap-4"},Le={key:0,class:"h-40 flex items-end gap-px"},Ee={key:1,class:"h-40 flex flex-col items-center justify-center gap-2"},Ke={key:2,class:"h-40 flex items-end gap-px overflow-hidden"},Ge=["title","onClick"],Je={key:0,class:"h-40 flex items-end gap-2"},Qe={key:1,class:"h-40 flex flex-col items-center justify-center gap-2"},Xe={key:2,class:"flex items-end gap-2",style:{height:"160px"}},Ye=["title"],Ze={class:"text-[10px] text-muted-foreground font-medium"},et={class:"grid grid-cols-1 lg:grid-cols-2 gap-4"},tt={key:0,class:"space-y-3"},st={key:1,class:"flex flex-col items-center justify-center py-8 gap-2"},ot={key:2,class:"space-y-2.5"},rt={class:"text-xs text-foreground w-24 truncate shrink-0 tabular-nums"},lt={class:"flex-1 h-1.5 bg-muted rounded-full overflow-hidden"},nt={class:"text-xs text-muted-foreground w-9 text-right shrink-0 tabular-nums"},at={key:0,class:"space-y-3"},dt={class:"flex justify-between"},it={key:1,class:"flex flex-col items-center justify-center py-8 gap-2"},ut={key:2,class:"space-y-2.5"},ct={class:"flex items-center justify-between text-xs mb-1"},mt={class:"text-foreground truncate max-w-[160px] font-medium group-hover:text-primary transition-colors"},ft={class:"text-muted-foreground shrink-0 tabular-nums ml-2"},jt=X({__name:"DashboardView",setup(n){const W=ae(),w=ue(),C=ce(),i=h("today"),S=h(""),F=h(""),y=h(null),L=h([]),P=h([]),R=h([]),I=h([]),f=h(!1),$=h(null),Y=V(()=>{const d=new Date,s=T(d);if(i.value==="today")return{from:s,to:s};if(i.value==="7d"){const v=new Date(d);return v.setDate(d.getDate()-7),{from:T(v),to:s}}else if(i.value==="30d"){const v=new Date(d);return v.setDate(d.getDate()-30),{from:T(v),to:s}}else return{from:S.value||s,to:F.value||s}});async function E(){if(!(i.value==="custom"&&(!S.value||!F.value))){f.value=!0;try{const d=Y.value,[s,v,O,q,U]=await Promise.all([z.summary(d),z.projects(d),z.timeline(d),z.dow(d),z.tools(d)]);y.value=s.data,L.value=v.data,P.value=O.data,R.value=q.data,I.value=U.data}catch(d){console.error("Failed to load dashboard data",d)}finally{f.value=!1}}}le(i,()=>{i.value!=="custom"&&E()});async function Z(d){if(!$.value){$.value=d;try{await w.complete(d),await w.fetchForDate(T(new Date))}finally{$.value=null}}}const K=V(()=>C.workItems.filter(d=>!["Closed","Done","Removed"].includes(d.state)).sort((d,s)=>(d.priority??3)-(s.priority??3)).slice(0,5));ne(async()=>{E(),w.fetchForDate(T(new Date));try{await C.fetchIntegration(),C.integration&&C.fetchWorkItems()}catch{}});const ee=V(()=>Math.max(...P.value.map(d=>d.hours),1)),te=V(()=>Math.max(...R.value.map(d=>d.hours),1)),se=V(()=>Math.max(...I.value.map(d=>d.pct),1)),oe=d=>d?d>90?"danger":d>70?"warning":"success":"default";return(d,s)=>{var v,O,q,U;return o(),r("div",we,[e("div",_e,[s[4]||(s[4]=e("h2",{class:"text-base font-semibold text-foreground flex-1 tracking-tight"},"Overview",-1)),e("div",je,[(o(),r(g,null,x(["today","7d","30d","custom"],t=>e("button",{key:t,class:u(["px-3 py-1.5 text-xs font-medium transition-colors",i.value===t?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted/50"]),onClick:G=>i.value=t},c(t==="today"?"Today":t==="7d"?"7 days":t==="30d"?"30 days":"Custom"),11,Ce)),64))]),i.value==="custom"?(o(),r(g,{key:0},[J(e("input",{"onUpdate:modelValue":s[0]||(s[0]=t=>S.value=t),type:"date",class:"h-8 rounded-lg border border-input bg-muted/30 px-2 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring"},null,512),[[Q,S.value]]),s[3]||(s[3]=e("span",{class:"text-xs text-muted-foreground"},"to",-1)),J(e("input",{"onUpdate:modelValue":s[1]||(s[1]=t=>F.value=t),type:"date",class:"h-8 rounded-lg border border-input bg-muted/30 px-2 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring"},null,512),[[Q,F.value]]),l(ie,{size:"sm",loading:f.value,onClick:E},{default:a(()=>[...s[2]||(s[2]=[p("Apply",-1)])]),_:1},8,["loading"])],64)):j("",!0)]),e("div",$e,[l(B,{label:"Total Hours",value:y.value?m(H)(y.value.total_hours):"—",icon:"clock",loading:f.value,hero:!0},null,8,["value","loading"]),l(B,{label:"Working Days",value:((v=y.value)==null?void 0:v.working_days)??"—",icon:"calendar",loading:f.value},null,8,["value","loading"]),l(B,{label:"Projects",value:((O=y.value)==null?void 0:O.total_projects)??"—",icon:"folder",loading:f.value,to:"/projects"},null,8,["value","loading"]),l(B,{label:"Avg / Day",value:y.value?m(H)(y.value.avg_hours_per_day):"—",icon:"trending-up",loading:f.value},null,8,["value","loading"]),l(B,{label:"Top Project",value:((q=y.value)==null?void 0:q.top_project)??"—",icon:"star",loading:f.value,to:"/projects"},null,8,["value","loading"]),l(B,{label:"Commits",value:((U=y.value)==null?void 0:U.total_commits)??"—",icon:"git",loading:f.value},null,8,["value","loading"])]),e("div",Me,[l(b,{class:"border-border/60 bg-card panel-glow"},{default:a(()=>[l(M,{class:"pb-2"},{default:a(()=>[e("div",De,[l(D,{class:"text-xs font-semibold text-muted-foreground uppercase tracking-widest"},{default:a(()=>[...s[5]||(s[5]=[p("Tasks Today",-1)])]),_:1}),l(m(A),{to:"/planner",class:"text-xs text-primary hover:underline"},{default:a(()=>[...s[6]||(s[6]=[p("View all →",-1)])]),_:1})])]),_:1}),l(k,null,{default:a(()=>[m(w).tasks.filter(t=>t.status!=="done"&&t.status!=="cancelled").length===0?(o(),r("div",Be,[...s[7]||(s[7]=[e("svg",{class:"h-7 w-7 text-muted-foreground/30",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M9 12l2 2 4-4M7.835 4.697a3.42 3.42 0 001.946-.806 3.42 3.42 0 014.438 0 3.42 3.42 0 001.946.806 3.42 3.42 0 013.138 3.138 3.42 3.42 0 00.806 1.946 3.42 3.42 0 010 4.438 3.42 3.42 0 00-.806 1.946 3.42 3.42 0 01-3.138 3.138 3.42 3.42 0 00-1.946.806 3.42 3.42 0 01-4.438 0 3.42 3.42 0 00-1.946-.806 3.42 3.42 0 01-3.138-3.138 3.42 3.42 0 00-.806-1.946 3.42 3.42 0 010-4.438 3.42 3.42 0 00.806-1.946 3.42 3.42 0 013.138-3.138z"})],-1),e("p",{class:"text-xs text-muted-foreground"},"No pending tasks for today",-1)])])):(o(),r("div",Ve,[(o(!0),r(g,null,x(m(w).tasks.filter(t=>t.status!=="done"&&t.status!=="cancelled").slice(0,6),t=>(o(),r("div",{key:t.id,class:"flex items-center gap-2 group py-1"},[e("button",{class:u(["h-4 w-4 shrink-0 rounded border border-border/70 group-hover:border-primary transition-colors flex items-center justify-center",{"opacity-50":$.value===t.id}]),disabled:!!$.value,onClick:G=>Z(t.id),title:"Mark done"},[$.value===t.id?(o(),r("svg",Te,[...s[8]||(s[8]=[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"},null,-1)])])):j("",!0)],10,ze),e("span",He,c(t.title),1),t.status==="doing"?(o(),r("span",Ne,"in progress")):t.priority<=2?(o(),r("span",Ae,"urgent")):j("",!0)]))),128))]))]),_:1})]),_:1}),m(C).integration?(o(),N(b,{key:0,class:"border-border/60 bg-card panel-glow"},{default:a(()=>[l(M,{class:"pb-2"},{default:a(()=>[e("div",Se,[l(D,{class:"text-xs font-semibold text-muted-foreground uppercase tracking-widest"},{default:a(()=>[...s[9]||(s[9]=[p("ADO Priority Items",-1)])]),_:1}),l(m(A),{to:"/devops",class:"text-xs text-primary hover:underline"},{default:a(()=>[...s[10]||(s[10]=[p("View all →",-1)])]),_:1})])]),_:1}),l(k,null,{default:a(()=>[K.value.length===0?(o(),r("div",Fe,[...s[11]||(s[11]=[e("p",{class:"text-xs text-muted-foreground"},"No open work items",-1)])])):(o(),r("div",Pe,[(o(!0),r(g,null,x(K.value,t=>(o(),r("a",{key:t.id,href:t.url,target:"_blank",rel:"noopener",class:"flex items-start gap-2 group py-1"},[e("span",{class:u(["mt-0.5 shrink-0 h-4 w-4 rounded text-[10px] font-bold flex items-center justify-center",(t.priority??3)<=2?"bg-destructive/20 text-destructive":"bg-muted text-muted-foreground"])},c(t.priority??3),3),e("div",Ie,[e("p",Oe,c(t.title),1),e("p",qe,c(t.team_project??""),1)]),e("span",Ue,c(t.state),1)],8,Re))),128))]))]),_:1})]),_:1})):(o(),N(b,{key:1,class:"border-border/60 bg-card panel-glow border-dashed"},{default:a(()=>[l(k,{class:"flex flex-col items-center justify-center py-10 gap-2"},{default:a(()=>[s[13]||(s[13]=e("svg",{class:"h-8 w-8 text-muted-foreground/20",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"})],-1)),s[14]||(s[14]=e("p",{class:"text-xs text-muted-foreground"},"Connect Azure DevOps in",-1)),l(m(A),{to:"/devops",class:"text-xs text-primary hover:underline"},{default:a(()=>[...s[12]||(s[12]=[p("Settings → DevOps",-1)])]),_:1})]),_:1})]),_:1}))]),e("div",We,[l(b,{class:"border-border/60 bg-card panel-glow"},{default:a(()=>[l(M,{class:"pb-2"},{default:a(()=>[l(D,{class:"text-xs font-semibold text-muted-foreground uppercase tracking-widest"},{default:a(()=>[...s[15]||(s[15]=[p("Hours by Day",-1)])]),_:1})]),_:1}),l(k,null,{default:a(()=>[f.value?(o(),r("div",Le,[(o(),r(g,null,x(30,t=>e("div",{key:t,class:"flex-1 bg-muted animate-pulse rounded-t",style:_({height:`${20+Math.random()*60}%`})},null,4)),64))])):P.value.length===0?(o(),r("div",Ee,[...s[16]||(s[16]=[e("svg",{class:"h-8 w-8 text-muted-foreground/30",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})],-1),e("p",{class:"text-xs text-muted-foreground"},"No sessions in this period",-1)])])):(o(),r("div",Ke,[(o(!0),r(g,null,x(P.value,t=>(o(),r("div",{key:t.date,class:"flex-1 bg-primary/70 hover:bg-primary rounded-t transition-colors duration-150 cursor-pointer",style:_({height:`${Math.max(t.hours/ee.value*160,2)}px`}),title:`${t.date}: ${m(H)(t.hours)}`,onClick:G=>m(W).push({path:"/calendar",query:{date:t.date}})},null,12,Ge))),128))]))]),_:1})]),_:1}),l(b,{class:"border-border/60 bg-card panel-glow"},{default:a(()=>[l(M,{class:"pb-2"},{default:a(()=>[l(D,{class:"text-xs font-semibold text-muted-foreground uppercase tracking-widest"},{default:a(()=>[...s[17]||(s[17]=[p("By Day of Week",-1)])]),_:1})]),_:1}),l(k,null,{default:a(()=>[f.value?(o(),r("div",Je,[(o(),r(g,null,x(7,t=>e("div",{key:t,class:"flex-1 flex flex-col items-center gap-1"},[e("div",{class:"w-full bg-muted animate-pulse rounded-t",style:_({height:`${30+t*8}%`})},null,4),s[18]||(s[18]=e("div",{class:"h-3 w-4 bg-muted animate-pulse rounded"},null,-1))])),64))])):R.value.length===0?(o(),r("div",Qe,[...s[19]||(s[19]=[e("svg",{class:"h-8 w-8 text-muted-foreground/30",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})],-1),e("p",{class:"text-xs text-muted-foreground"},"No sessions in this period",-1)])])):(o(),r("div",Xe,[(o(!0),r(g,null,x(R.value,t=>(o(),r("div",{key:t.dow,class:"flex-1 flex flex-col items-center gap-1 cursor-default",style:{height:"160px","justify-content":"flex-end"}},[e("div",{class:"w-full bg-primary/70 hover:bg-primary rounded-t transition-colors duration-150",style:_({height:`${Math.max(t.hours/te.value*128,2)}px`}),title:`${t.label}: ${m(H)(t.hours)}`},null,12,Ye),e("span",Ze,c(t.label.slice(0,2)),1)]))),128))]))]),_:1})]),_:1})]),e("div",et,[l(b,{class:"border-border/60 bg-card panel-glow"},{default:a(()=>[l(M,{class:"pb-2"},{default:a(()=>[l(D,{class:"text-xs font-semibold text-muted-foreground uppercase tracking-widest"},{default:a(()=>[...s[20]||(s[20]=[p("Tool Usage",-1)])]),_:1})]),_:1}),l(k,null,{default:a(()=>[f.value?(o(),r("div",tt,[(o(),r(g,null,x(5,t=>e("div",{key:t,class:"flex items-center gap-2"},[e("div",{class:"h-3 rounded bg-muted animate-pulse",style:_({width:`${40+t*10}px`})},null,4),s[21]||(s[21]=e("div",{class:"flex-1 h-2 bg-muted animate-pulse rounded-full"},null,-1)),s[22]||(s[22]=e("div",{class:"h-3 w-8 bg-muted animate-pulse rounded"},null,-1))])),64))])):I.value.length===0?(o(),r("div",st,[...s[23]||(s[23]=[e("svg",{class:"h-8 w-8 text-muted-foreground/30",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"})],-1),e("p",{class:"text-xs text-muted-foreground"},"No tool data yet",-1)])])):(o(),r("div",ot,[(o(!0),r(g,null,x(I.value.slice(0,8),t=>(o(),r("div",{key:t.tool,class:"flex items-center gap-2.5"},[e("span",rt,c(t.tool),1),e("div",lt,[e("div",{class:"h-full bg-primary/70 rounded-full transition-all duration-300",style:_({width:`${t.pct/se.value*100}%`})},null,4)]),e("span",nt,c((t.pct??0).toFixed(0))+"% ",1)]))),128))]))]),_:1})]),_:1}),l(b,{class:"border-border/60 bg-card panel-glow"},{default:a(()=>[l(M,{class:"pb-2"},{default:a(()=>[l(D,{class:"text-xs font-semibold text-muted-foreground uppercase tracking-widest"},{default:a(()=>[...s[24]||(s[24]=[p("Projects",-1)])]),_:1})]),_:1}),l(k,null,{default:a(()=>[f.value?(o(),r("div",at,[(o(),r(g,null,x(5,t=>e("div",{key:t,class:"space-y-1.5"},[e("div",dt,[e("div",{class:"h-3 rounded bg-muted animate-pulse",style:_({width:`${80+t*15}px`})},null,4),s[25]||(s[25]=e("div",{class:"h-3 w-12 bg-muted animate-pulse rounded"},null,-1))]),s[26]||(s[26]=e("div",{class:"h-1.5 bg-muted animate-pulse rounded-full"},null,-1))])),64))])):L.value.length===0?(o(),r("div",it,[...s[27]||(s[27]=[e("svg",{class:"h-8 w-8 text-muted-foreground/30",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M3 7a2 2 0 012-2h3.586a1 1 0 01.707.293l1.414 1.414A1 1 0 0011.414 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V7z"})],-1),e("p",{class:"text-xs text-muted-foreground"},"No project data yet",-1)])])):(o(),r("div",ut,[(o(!0),r(g,null,x(L.value.slice(0,8),t=>(o(),N(m(A),{key:t.project_id,to:`/projects/${t.project_id}`,class:"block group"},{default:a(()=>[e("div",ct,[e("span",mt,c(t.display_name),1),e("span",ft,c(m(H)(t.total_hours)),1)]),t.progress_pct!==null?(o(),N(de,{key:0,value:t.progress_pct,color:oe(t.progress_pct)},null,8,["value","color"])):j("",!0)]),_:2},1032,["to"]))),128))]))]),_:1})]),_:1})])])}}});export{jt as default}; +import{d as X,k as N,w as a,n as u,l as re,h as m,R as A,o,e as l,a as e,t as c,c as r,i as j,q as p,j as V,x as le,y as ne,F as g,r as x,z as J,A as Q,s as h,B as _,f as ae}from"./index-DVV3ZbZ2.js";import{d as z}from"./dashboard-CxPPoZJ0.js";import{a as k,_ as b}from"./CardContent.vue_vue_type_script_setup_true_lang-DdGXaWEa.js";import{_ as M,a as D}from"./CardTitle.vue_vue_type_script_setup_true_lang-CT9DRTds.js";import{_ as de}from"./Progress.vue_vue_type_script_setup_true_lang-vRzAaLns.js";import{_ as ie}from"./Button.vue_vue_type_script_setup_true_lang-ClV4YfXb.js";import{u as ue}from"./tasks-Dr7jFVHn.js";import{u as ce}from"./devops-HjUgCfao.js";import{i as T,f as H}from"./utils-7WVCegLb.js";import"./Spinner.vue_vue_type_script_setup_true_lang-BkmDerVR.js";const me={class:"flex items-start justify-between gap-2"},fe={class:"flex-1 min-w-0"},ge={class:"mt-2"},xe={key:0,class:"h-7 w-20 bg-muted animate-pulse rounded"},pe={key:0,class:"text-xs text-muted-foreground mt-1.5 truncate"},ve={key:0,class:"mt-3 flex items-center gap-1.5 text-xs"},he={class:"h-3 w-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},ye={key:0,"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2.5",d:"M5 10l7-7m0 0l7 7m-7-7v18"},ke={key:1,"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2.5",d:"M19 14l-7 7m0 0l-7-7m7 7V3"},be={key:2,"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2.5",d:"M5 12h14"},B=X({__name:"KpiCard",props:{label:{},value:{},icon:{},trend:{},description:{},loading:{type:Boolean},hero:{type:Boolean},to:{}},setup(n){const W=n,w=V(()=>W.hero?"relative overflow-hidden transition-all duration-200 border-primary/20 bg-primary/5 ring-1 ring-primary/15 panel-glow-hover":"relative overflow-hidden transition-all duration-200 border-border/60 panel-glow-hover");return(C,i)=>(o(),N(re(n.to?m(A):"div"),{to:n.to,class:u(n.to?"block hover:opacity-90 transition-opacity":"")},{default:a(()=>[l(b,{class:u(w.value)},{default:a(()=>[e("span",{class:u(["pointer-events-none absolute -right-4 -top-4 h-14 w-14 rounded-full",n.hero?"bg-primary/10":"bg-primary/5"])},null,2),e("span",{class:u(["pointer-events-none absolute -right-1 -top-1 h-6 w-6 rounded-full",n.hero?"bg-primary/15":"bg-primary/8"])},null,2),l(k,{class:"p-5"},{default:a(()=>[e("div",me,[e("div",fe,[e("p",{class:u(["text-[10px] font-semibold uppercase tracking-[0.1em] truncate",n.hero?"text-primary/80":"text-muted-foreground"])},c(n.label),3),e("div",ge,[n.loading?(o(),r("div",xe)):(o(),r("p",{key:1,class:u(["kpi-value font-bold tracking-tight leading-none",n.hero?"text-3xl text-primary":"text-2xl text-foreground"])},c(n.value),3))]),n.description?(o(),r("p",pe,c(n.description),1)):j("",!0)]),n.icon?(o(),r("div",{key:0,class:u(["rounded-xl flex items-center justify-center shrink-0",[n.hero?"h-11 w-11 bg-primary/15 ring-1 ring-primary/25":"h-9 w-9 bg-muted ring-1 ring-border"]])},[n.icon==="clock"?(o(),r("svg",{key:0,class:u(["shrink-0",n.hero?"h-5 w-5 text-primary":"h-4 w-4 text-muted-foreground"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...i[0]||(i[0]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)])],2)):n.icon==="calendar"?(o(),r("svg",{key:1,class:u(["shrink-0",n.hero?"h-5 w-5 text-primary":"h-4 w-4 text-muted-foreground"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...i[1]||(i[1]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"},null,-1)])],2)):n.icon==="folder"?(o(),r("svg",{key:2,class:u(["shrink-0",n.hero?"h-5 w-5 text-primary":"h-4 w-4 text-muted-foreground"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...i[2]||(i[2]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 7a2 2 0 012-2h3.586a1 1 0 01.707.293l1.414 1.414A1 1 0 0011.414 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V7z"},null,-1)])],2)):n.icon==="trending-up"?(o(),r("svg",{key:3,class:u(["shrink-0",n.hero?"h-5 w-5 text-primary":"h-4 w-4 text-muted-foreground"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...i[3]||(i[3]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 7h8m0 0v8m0-8l-8 8-4-4-6 6"},null,-1)])],2)):n.icon==="git"?(o(),r("svg",{key:4,class:u(["shrink-0",n.hero?"h-5 w-5 text-primary":"h-4 w-4 text-muted-foreground"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...i[4]||(i[4]=[e("circle",{cx:"12",cy:"12",r:"4",stroke:"currentColor","stroke-width":"2"},null,-1),e("path",{"stroke-linecap":"round","stroke-width":"2",d:"M2 12h6M16 12h6"},null,-1)])],2)):(o(),r("svg",{key:5,class:u(["shrink-0",n.hero?"h-5 w-5 text-primary":"h-4 w-4 text-muted-foreground"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...i[5]||(i[5]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"},null,-1)])],2))],2)):j("",!0)]),n.trend!==void 0?(o(),r("div",ve,[e("div",{class:u(["flex items-center gap-1 font-semibold tabular-nums",n.trend>0?"text-[hsl(var(--success))]":n.trend<0?"text-destructive":"text-muted-foreground"])},[(o(),r("svg",he,[n.trend>0?(o(),r("path",ye)):n.trend<0?(o(),r("path",ke)):(o(),r("path",be))])),p(" "+c(n.trend>0?"+":"")+c(Math.abs(n.trend))+"% ",1)],2),i[6]||(i[6]=e("span",{class:"text-muted-foreground"},"vs last period",-1))])):j("",!0),e("div",{class:u(["mt-3 h-px rounded-full",n.hero?"w-full bg-primary/20":"w-10 bg-primary/20"])},null,2)]),_:1})]),_:1},8,["class"])]),_:1},8,["to","class"]))}}),we={class:"p-6 space-y-6"},_e={class:"flex flex-wrap items-center gap-3"},je={class:"flex items-center rounded-lg border border-border overflow-hidden bg-muted/30"},Ce=["onClick"],$e={class:"grid grid-cols-2 md:grid-cols-3 xl:grid-cols-6 gap-4"},Me={class:"grid grid-cols-1 lg:grid-cols-2 gap-4"},De={class:"flex items-center justify-between"},Be={key:0,class:"flex flex-col items-center justify-center py-6 gap-2"},Ve={key:1,class:"space-y-1.5"},ze=["disabled","onClick"],Te={key:0,class:"h-3 w-3 animate-spin text-primary",fill:"none",viewBox:"0 0 24 24"},He={class:"flex-1 text-xs text-foreground truncate"},Ne={key:0,class:"text-[10px] px-1 py-0.5 rounded bg-primary/20 text-primary shrink-0"},Ae={key:1,class:"text-[10px] px-1 py-0.5 rounded bg-destructive/20 text-destructive shrink-0"},Se={class:"flex items-center justify-between"},Fe={key:0,class:"flex flex-col items-center justify-center py-6 gap-2"},Pe={key:1,class:"space-y-2"},Re=["href"],Ie={class:"flex-1 min-w-0"},Oe={class:"text-xs text-foreground truncate group-hover:text-primary transition-colors"},qe={class:"text-[10px] text-muted-foreground truncate"},Ue={class:"text-[10px] px-1.5 py-0.5 rounded border border-border/50 text-muted-foreground shrink-0"},We={class:"grid grid-cols-1 lg:grid-cols-2 gap-4"},Le={key:0,class:"h-40 flex items-end gap-px"},Ee={key:1,class:"h-40 flex flex-col items-center justify-center gap-2"},Ke={key:2,class:"h-40 flex items-end gap-px overflow-hidden"},Ge=["title","onClick"],Je={key:0,class:"h-40 flex items-end gap-2"},Qe={key:1,class:"h-40 flex flex-col items-center justify-center gap-2"},Xe={key:2,class:"flex items-end gap-2",style:{height:"160px"}},Ye=["title"],Ze={class:"text-[10px] text-muted-foreground font-medium"},et={class:"grid grid-cols-1 lg:grid-cols-2 gap-4"},tt={key:0,class:"space-y-3"},st={key:1,class:"flex flex-col items-center justify-center py-8 gap-2"},ot={key:2,class:"space-y-2.5"},rt={class:"text-xs text-foreground w-24 truncate shrink-0 tabular-nums"},lt={class:"flex-1 h-1.5 bg-muted rounded-full overflow-hidden"},nt={class:"text-xs text-muted-foreground w-9 text-right shrink-0 tabular-nums"},at={key:0,class:"space-y-3"},dt={class:"flex justify-between"},it={key:1,class:"flex flex-col items-center justify-center py-8 gap-2"},ut={key:2,class:"space-y-2.5"},ct={class:"flex items-center justify-between text-xs mb-1"},mt={class:"text-foreground truncate max-w-[160px] font-medium group-hover:text-primary transition-colors"},ft={class:"text-muted-foreground shrink-0 tabular-nums ml-2"},jt=X({__name:"DashboardView",setup(n){const W=ae(),w=ue(),C=ce(),i=h("today"),S=h(""),F=h(""),y=h(null),L=h([]),P=h([]),R=h([]),I=h([]),f=h(!1),$=h(null),Y=V(()=>{const d=new Date,s=T(d);if(i.value==="today")return{from:s,to:s};if(i.value==="7d"){const v=new Date(d);return v.setDate(d.getDate()-7),{from:T(v),to:s}}else if(i.value==="30d"){const v=new Date(d);return v.setDate(d.getDate()-30),{from:T(v),to:s}}else return{from:S.value||s,to:F.value||s}});async function E(){if(!(i.value==="custom"&&(!S.value||!F.value))){f.value=!0;try{const d=Y.value,[s,v,O,q,U]=await Promise.all([z.summary(d),z.projects(d),z.timeline(d),z.dow(d),z.tools(d)]);y.value=s.data,L.value=v.data,P.value=O.data,R.value=q.data,I.value=U.data}catch(d){console.error("Failed to load dashboard data",d)}finally{f.value=!1}}}le(i,()=>{i.value!=="custom"&&E()});async function Z(d){if(!$.value){$.value=d;try{await w.complete(d),await w.fetchForDate(T(new Date))}finally{$.value=null}}}const K=V(()=>C.workItems.filter(d=>!["Closed","Done","Removed"].includes(d.state)).sort((d,s)=>(d.priority??3)-(s.priority??3)).slice(0,5));ne(async()=>{E(),w.fetchForDate(T(new Date));try{await C.fetchIntegration(),C.integration&&C.fetchWorkItems()}catch{}});const ee=V(()=>Math.max(...P.value.map(d=>d.hours),1)),te=V(()=>Math.max(...R.value.map(d=>d.hours),1)),se=V(()=>Math.max(...I.value.map(d=>d.pct),1)),oe=d=>d?d>90?"danger":d>70?"warning":"success":"default";return(d,s)=>{var v,O,q,U;return o(),r("div",we,[e("div",_e,[s[4]||(s[4]=e("h2",{class:"text-base font-semibold text-foreground flex-1 tracking-tight"},"Overview",-1)),e("div",je,[(o(),r(g,null,x(["today","7d","30d","custom"],t=>e("button",{key:t,class:u(["px-3 py-1.5 text-xs font-medium transition-colors",i.value===t?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted/50"]),onClick:G=>i.value=t},c(t==="today"?"Today":t==="7d"?"7 days":t==="30d"?"30 days":"Custom"),11,Ce)),64))]),i.value==="custom"?(o(),r(g,{key:0},[J(e("input",{"onUpdate:modelValue":s[0]||(s[0]=t=>S.value=t),type:"date",class:"h-8 rounded-lg border border-input bg-muted/30 px-2 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring"},null,512),[[Q,S.value]]),s[3]||(s[3]=e("span",{class:"text-xs text-muted-foreground"},"to",-1)),J(e("input",{"onUpdate:modelValue":s[1]||(s[1]=t=>F.value=t),type:"date",class:"h-8 rounded-lg border border-input bg-muted/30 px-2 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring"},null,512),[[Q,F.value]]),l(ie,{size:"sm",loading:f.value,onClick:E},{default:a(()=>[...s[2]||(s[2]=[p("Apply",-1)])]),_:1},8,["loading"])],64)):j("",!0)]),e("div",$e,[l(B,{label:"Total Hours",value:y.value?m(H)(y.value.total_hours):"—",icon:"clock",loading:f.value,hero:!0},null,8,["value","loading"]),l(B,{label:"Working Days",value:((v=y.value)==null?void 0:v.working_days)??"—",icon:"calendar",loading:f.value},null,8,["value","loading"]),l(B,{label:"Projects",value:((O=y.value)==null?void 0:O.total_projects)??"—",icon:"folder",loading:f.value,to:"/projects"},null,8,["value","loading"]),l(B,{label:"Avg / Day",value:y.value?m(H)(y.value.avg_hours_per_day):"—",icon:"trending-up",loading:f.value},null,8,["value","loading"]),l(B,{label:"Top Project",value:((q=y.value)==null?void 0:q.top_project)??"—",icon:"star",loading:f.value,to:"/projects"},null,8,["value","loading"]),l(B,{label:"Commits",value:((U=y.value)==null?void 0:U.total_commits)??"—",icon:"git",loading:f.value},null,8,["value","loading"])]),e("div",Me,[l(b,{class:"border-border/60 bg-card panel-glow"},{default:a(()=>[l(M,{class:"pb-2"},{default:a(()=>[e("div",De,[l(D,{class:"text-xs font-semibold text-muted-foreground uppercase tracking-widest"},{default:a(()=>[...s[5]||(s[5]=[p("Tasks Today",-1)])]),_:1}),l(m(A),{to:"/planner",class:"text-xs text-primary hover:underline"},{default:a(()=>[...s[6]||(s[6]=[p("View all →",-1)])]),_:1})])]),_:1}),l(k,null,{default:a(()=>[m(w).tasks.filter(t=>t.status!=="done"&&t.status!=="cancelled").length===0?(o(),r("div",Be,[...s[7]||(s[7]=[e("svg",{class:"h-7 w-7 text-muted-foreground/30",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M9 12l2 2 4-4M7.835 4.697a3.42 3.42 0 001.946-.806 3.42 3.42 0 014.438 0 3.42 3.42 0 001.946.806 3.42 3.42 0 013.138 3.138 3.42 3.42 0 00.806 1.946 3.42 3.42 0 010 4.438 3.42 3.42 0 00-.806 1.946 3.42 3.42 0 01-3.138 3.138 3.42 3.42 0 00-1.946.806 3.42 3.42 0 01-4.438 0 3.42 3.42 0 00-1.946-.806 3.42 3.42 0 01-3.138-3.138 3.42 3.42 0 00-.806-1.946 3.42 3.42 0 010-4.438 3.42 3.42 0 00.806-1.946 3.42 3.42 0 013.138-3.138z"})],-1),e("p",{class:"text-xs text-muted-foreground"},"No pending tasks for today",-1)])])):(o(),r("div",Ve,[(o(!0),r(g,null,x(m(w).tasks.filter(t=>t.status!=="done"&&t.status!=="cancelled").slice(0,6),t=>(o(),r("div",{key:t.id,class:"flex items-center gap-2 group py-1"},[e("button",{class:u(["h-4 w-4 shrink-0 rounded border border-border/70 group-hover:border-primary transition-colors flex items-center justify-center",{"opacity-50":$.value===t.id}]),disabled:!!$.value,onClick:G=>Z(t.id),title:"Mark done"},[$.value===t.id?(o(),r("svg",Te,[...s[8]||(s[8]=[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"},null,-1)])])):j("",!0)],10,ze),e("span",He,c(t.title),1),t.status==="doing"?(o(),r("span",Ne,"in progress")):t.priority<=2?(o(),r("span",Ae,"urgent")):j("",!0)]))),128))]))]),_:1})]),_:1}),m(C).integration?(o(),N(b,{key:0,class:"border-border/60 bg-card panel-glow"},{default:a(()=>[l(M,{class:"pb-2"},{default:a(()=>[e("div",Se,[l(D,{class:"text-xs font-semibold text-muted-foreground uppercase tracking-widest"},{default:a(()=>[...s[9]||(s[9]=[p("ADO Priority Items",-1)])]),_:1}),l(m(A),{to:"/devops",class:"text-xs text-primary hover:underline"},{default:a(()=>[...s[10]||(s[10]=[p("View all →",-1)])]),_:1})])]),_:1}),l(k,null,{default:a(()=>[K.value.length===0?(o(),r("div",Fe,[...s[11]||(s[11]=[e("p",{class:"text-xs text-muted-foreground"},"No open work items",-1)])])):(o(),r("div",Pe,[(o(!0),r(g,null,x(K.value,t=>(o(),r("a",{key:t.id,href:t.url,target:"_blank",rel:"noopener",class:"flex items-start gap-2 group py-1"},[e("span",{class:u(["mt-0.5 shrink-0 h-4 w-4 rounded text-[10px] font-bold flex items-center justify-center",(t.priority??3)<=2?"bg-destructive/20 text-destructive":"bg-muted text-muted-foreground"])},c(t.priority??3),3),e("div",Ie,[e("p",Oe,c(t.title),1),e("p",qe,c(t.team_project??""),1)]),e("span",Ue,c(t.state),1)],8,Re))),128))]))]),_:1})]),_:1})):(o(),N(b,{key:1,class:"border-border/60 bg-card panel-glow border-dashed"},{default:a(()=>[l(k,{class:"flex flex-col items-center justify-center py-10 gap-2"},{default:a(()=>[s[13]||(s[13]=e("svg",{class:"h-8 w-8 text-muted-foreground/20",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"})],-1)),s[14]||(s[14]=e("p",{class:"text-xs text-muted-foreground"},"Connect Azure DevOps in",-1)),l(m(A),{to:"/devops",class:"text-xs text-primary hover:underline"},{default:a(()=>[...s[12]||(s[12]=[p("Settings → DevOps",-1)])]),_:1})]),_:1})]),_:1}))]),e("div",We,[l(b,{class:"border-border/60 bg-card panel-glow"},{default:a(()=>[l(M,{class:"pb-2"},{default:a(()=>[l(D,{class:"text-xs font-semibold text-muted-foreground uppercase tracking-widest"},{default:a(()=>[...s[15]||(s[15]=[p("Hours by Day",-1)])]),_:1})]),_:1}),l(k,null,{default:a(()=>[f.value?(o(),r("div",Le,[(o(),r(g,null,x(30,t=>e("div",{key:t,class:"flex-1 bg-muted animate-pulse rounded-t",style:_({height:`${20+Math.random()*60}%`})},null,4)),64))])):P.value.length===0?(o(),r("div",Ee,[...s[16]||(s[16]=[e("svg",{class:"h-8 w-8 text-muted-foreground/30",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})],-1),e("p",{class:"text-xs text-muted-foreground"},"No sessions in this period",-1)])])):(o(),r("div",Ke,[(o(!0),r(g,null,x(P.value,t=>(o(),r("div",{key:t.date,class:"flex-1 bg-primary/70 hover:bg-primary rounded-t transition-colors duration-150 cursor-pointer",style:_({height:`${Math.max(t.hours/ee.value*160,2)}px`}),title:`${t.date}: ${m(H)(t.hours)}`,onClick:G=>m(W).push({path:"/calendar",query:{date:t.date}})},null,12,Ge))),128))]))]),_:1})]),_:1}),l(b,{class:"border-border/60 bg-card panel-glow"},{default:a(()=>[l(M,{class:"pb-2"},{default:a(()=>[l(D,{class:"text-xs font-semibold text-muted-foreground uppercase tracking-widest"},{default:a(()=>[...s[17]||(s[17]=[p("By Day of Week",-1)])]),_:1})]),_:1}),l(k,null,{default:a(()=>[f.value?(o(),r("div",Je,[(o(),r(g,null,x(7,t=>e("div",{key:t,class:"flex-1 flex flex-col items-center gap-1"},[e("div",{class:"w-full bg-muted animate-pulse rounded-t",style:_({height:`${30+t*8}%`})},null,4),s[18]||(s[18]=e("div",{class:"h-3 w-4 bg-muted animate-pulse rounded"},null,-1))])),64))])):R.value.length===0?(o(),r("div",Qe,[...s[19]||(s[19]=[e("svg",{class:"h-8 w-8 text-muted-foreground/30",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})],-1),e("p",{class:"text-xs text-muted-foreground"},"No sessions in this period",-1)])])):(o(),r("div",Xe,[(o(!0),r(g,null,x(R.value,t=>(o(),r("div",{key:t.dow,class:"flex-1 flex flex-col items-center gap-1 cursor-default",style:{height:"160px","justify-content":"flex-end"}},[e("div",{class:"w-full bg-primary/70 hover:bg-primary rounded-t transition-colors duration-150",style:_({height:`${Math.max(t.hours/te.value*128,2)}px`}),title:`${t.label}: ${m(H)(t.hours)}`},null,12,Ye),e("span",Ze,c(t.label.slice(0,2)),1)]))),128))]))]),_:1})]),_:1})]),e("div",et,[l(b,{class:"border-border/60 bg-card panel-glow"},{default:a(()=>[l(M,{class:"pb-2"},{default:a(()=>[l(D,{class:"text-xs font-semibold text-muted-foreground uppercase tracking-widest"},{default:a(()=>[...s[20]||(s[20]=[p("Tool Usage",-1)])]),_:1})]),_:1}),l(k,null,{default:a(()=>[f.value?(o(),r("div",tt,[(o(),r(g,null,x(5,t=>e("div",{key:t,class:"flex items-center gap-2"},[e("div",{class:"h-3 rounded bg-muted animate-pulse",style:_({width:`${40+t*10}px`})},null,4),s[21]||(s[21]=e("div",{class:"flex-1 h-2 bg-muted animate-pulse rounded-full"},null,-1)),s[22]||(s[22]=e("div",{class:"h-3 w-8 bg-muted animate-pulse rounded"},null,-1))])),64))])):I.value.length===0?(o(),r("div",st,[...s[23]||(s[23]=[e("svg",{class:"h-8 w-8 text-muted-foreground/30",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"})],-1),e("p",{class:"text-xs text-muted-foreground"},"No tool data yet",-1)])])):(o(),r("div",ot,[(o(!0),r(g,null,x(I.value.slice(0,8),t=>(o(),r("div",{key:t.tool,class:"flex items-center gap-2.5"},[e("span",rt,c(t.tool),1),e("div",lt,[e("div",{class:"h-full bg-primary/70 rounded-full transition-all duration-300",style:_({width:`${t.pct/se.value*100}%`})},null,4)]),e("span",nt,c((t.pct??0).toFixed(0))+"% ",1)]))),128))]))]),_:1})]),_:1}),l(b,{class:"border-border/60 bg-card panel-glow"},{default:a(()=>[l(M,{class:"pb-2"},{default:a(()=>[l(D,{class:"text-xs font-semibold text-muted-foreground uppercase tracking-widest"},{default:a(()=>[...s[24]||(s[24]=[p("Projects",-1)])]),_:1})]),_:1}),l(k,null,{default:a(()=>[f.value?(o(),r("div",at,[(o(),r(g,null,x(5,t=>e("div",{key:t,class:"space-y-1.5"},[e("div",dt,[e("div",{class:"h-3 rounded bg-muted animate-pulse",style:_({width:`${80+t*15}px`})},null,4),s[25]||(s[25]=e("div",{class:"h-3 w-12 bg-muted animate-pulse rounded"},null,-1))]),s[26]||(s[26]=e("div",{class:"h-1.5 bg-muted animate-pulse rounded-full"},null,-1))])),64))])):L.value.length===0?(o(),r("div",it,[...s[27]||(s[27]=[e("svg",{class:"h-8 w-8 text-muted-foreground/30",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M3 7a2 2 0 012-2h3.586a1 1 0 01.707.293l1.414 1.414A1 1 0 0011.414 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V7z"})],-1),e("p",{class:"text-xs text-muted-foreground"},"No project data yet",-1)])])):(o(),r("div",ut,[(o(!0),r(g,null,x(L.value.slice(0,8),t=>(o(),N(m(A),{key:t.project_id,to:`/projects/${t.project_id}`,class:"block group"},{default:a(()=>[e("div",ct,[e("span",mt,c(t.display_name),1),e("span",ft,c(m(H)(t.total_hours)),1)]),t.progress_pct!==null?(o(),N(de,{key:0,value:t.progress_pct,color:oe(t.progress_pct)},null,8,["value","color"])):j("",!0)]),_:2},1032,["to"]))),128))]))]),_:1})]),_:1})])])}}});export{jt as default}; diff --git a/src/static/assets/DevopsConnectForm.vue_vue_type_script_setup_true_lang-DQc_dk7n.js b/src/static/assets/DevopsConnectForm.vue_vue_type_script_setup_true_lang-5nCaOxp1.js similarity index 90% rename from src/static/assets/DevopsConnectForm.vue_vue_type_script_setup_true_lang-DQc_dk7n.js rename to src/static/assets/DevopsConnectForm.vue_vue_type_script_setup_true_lang-5nCaOxp1.js index 7d166e2..0b36f1d 100644 --- a/src/static/assets/DevopsConnectForm.vue_vue_type_script_setup_true_lang-DQc_dk7n.js +++ b/src/static/assets/DevopsConnectForm.vue_vue_type_script_setup_true_lang-5nCaOxp1.js @@ -1 +1 @@ -import{u as D}from"./devops-DxRDHPW5.js";import{_}from"./Input.vue_vue_type_script_setup_true_lang-SeygKlpx.js";import{_ as V}from"./Button.vue_vue_type_script_setup_true_lang-B_YE_XNW.js";import{d as j,s as c,o as i,c as m,h as a,a as o,q as g,t as d,i as p,e as v,w as k,k as z,K as u}from"./index-BP_aNEdP.js";const B={class:"space-y-4"},I={key:0,class:"text-xs text-muted-foreground space-y-1"},N={class:"text-foreground"},P={class:"text-foreground"},S={key:0},U={key:1,class:"text-red-400"},b={class:"grid grid-cols-2 gap-3"},A={class:"space-y-1.5"},F={class:"space-y-1.5"},O={class:"space-y-1.5"},q={class:"flex items-center gap-2"},G=j({__name:"DevopsConnectForm",setup(E){var y,x;const t=D(),n=c(((y=t.integration)==null?void 0:y.organization)??""),r=c(((x=t.integration)==null?void 0:x.project)??""),s=c(""),f=c(!1);async function w(){if(!n.value||!r.value||!s.value){u.error("All fields are required");return}f.value=!0;try{await t.saveIntegration({organization:n.value,project:r.value,pat:s.value}),s.value="",u.success("Integration saved")}catch{u.error("Failed to save integration")}finally{f.value=!1}}async function C(){if(confirm("Delete ADO integration?"))try{await t.deleteIntegration(),n.value="",r.value="",s.value="",u.success("Integration deleted")}catch{u.error("Failed to delete integration")}}return(K,e)=>(i(),m("div",B,[a(t).integration?(i(),m("div",I,[o("p",null,[e[3]||(e[3]=g(" Connected to ",-1)),o("strong",N,d(a(t).integration.organization),1),e[4]||(e[4]=g(" / ",-1)),o("strong",P,d(a(t).integration.project),1)]),a(t).integration.last_synced_at?(i(),m("p",S," Last synced: "+d(new Date(a(t).integration.last_synced_at).toLocaleString()),1)):p("",!0),a(t).integration.last_sync_error?(i(),m("p",U," Error: "+d(a(t).integration.last_sync_error),1)):p("",!0)])):p("",!0),o("div",b,[o("div",A,[e[5]||(e[5]=o("label",{class:"text-sm font-medium text-foreground"},"Organization",-1)),v(_,{modelValue:n.value,"onUpdate:modelValue":e[0]||(e[0]=l=>n.value=l),placeholder:"myorg"},null,8,["modelValue"])]),o("div",F,[e[6]||(e[6]=o("label",{class:"text-sm font-medium text-foreground"},"Project",-1)),v(_,{modelValue:r.value,"onUpdate:modelValue":e[1]||(e[1]=l=>r.value=l),placeholder:"myproject"},null,8,["modelValue"])])]),o("div",O,[e[7]||(e[7]=o("label",{class:"text-sm font-medium text-foreground"}," Personal Access Token ",-1)),v(_,{modelValue:s.value,"onUpdate:modelValue":e[2]||(e[2]=l=>s.value=l),type:"password",placeholder:"••••••••",autocomplete:"new-password"},null,8,["modelValue"])]),o("div",q,[v(V,{loading:f.value,onClick:w},{default:k(()=>[g(d(a(t).integration?"Update":"Connect"),1)]),_:1},8,["loading"]),a(t).integration?(i(),z(V,{key:0,variant:"destructive",size:"sm",onClick:C},{default:k(()=>[...e[8]||(e[8]=[g(" Disconnect ",-1)])]),_:1})):p("",!0)])]))}});export{G as _}; +import{u as D}from"./devops-HjUgCfao.js";import{_}from"./Input.vue_vue_type_script_setup_true_lang-BM1xhrlf.js";import{_ as V}from"./Button.vue_vue_type_script_setup_true_lang-ClV4YfXb.js";import{d as j,s as c,o as i,c as m,h as a,a as o,q as g,t as d,i as p,e as v,w as k,k as z,K as u}from"./index-DVV3ZbZ2.js";const B={class:"space-y-4"},I={key:0,class:"text-xs text-muted-foreground space-y-1"},N={class:"text-foreground"},P={class:"text-foreground"},S={key:0},U={key:1,class:"text-red-400"},b={class:"grid grid-cols-2 gap-3"},A={class:"space-y-1.5"},F={class:"space-y-1.5"},O={class:"space-y-1.5"},q={class:"flex items-center gap-2"},G=j({__name:"DevopsConnectForm",setup(E){var y,x;const t=D(),n=c(((y=t.integration)==null?void 0:y.organization)??""),r=c(((x=t.integration)==null?void 0:x.project)??""),s=c(""),f=c(!1);async function w(){if(!n.value||!r.value||!s.value){u.error("All fields are required");return}f.value=!0;try{await t.saveIntegration({organization:n.value,project:r.value,pat:s.value}),s.value="",u.success("Integration saved")}catch{u.error("Failed to save integration")}finally{f.value=!1}}async function C(){if(confirm("Delete ADO integration?"))try{await t.deleteIntegration(),n.value="",r.value="",s.value="",u.success("Integration deleted")}catch{u.error("Failed to delete integration")}}return(K,e)=>(i(),m("div",B,[a(t).integration?(i(),m("div",I,[o("p",null,[e[3]||(e[3]=g(" Connected to ",-1)),o("strong",N,d(a(t).integration.organization),1),e[4]||(e[4]=g(" / ",-1)),o("strong",P,d(a(t).integration.project),1)]),a(t).integration.last_synced_at?(i(),m("p",S," Last synced: "+d(new Date(a(t).integration.last_synced_at).toLocaleString()),1)):p("",!0),a(t).integration.last_sync_error?(i(),m("p",U," Error: "+d(a(t).integration.last_sync_error),1)):p("",!0)])):p("",!0),o("div",b,[o("div",A,[e[5]||(e[5]=o("label",{class:"text-sm font-medium text-foreground"},"Organization",-1)),v(_,{modelValue:n.value,"onUpdate:modelValue":e[0]||(e[0]=l=>n.value=l),placeholder:"myorg"},null,8,["modelValue"])]),o("div",F,[e[6]||(e[6]=o("label",{class:"text-sm font-medium text-foreground"},"Project",-1)),v(_,{modelValue:r.value,"onUpdate:modelValue":e[1]||(e[1]=l=>r.value=l),placeholder:"myproject"},null,8,["modelValue"])])]),o("div",O,[e[7]||(e[7]=o("label",{class:"text-sm font-medium text-foreground"}," Personal Access Token ",-1)),v(_,{modelValue:s.value,"onUpdate:modelValue":e[2]||(e[2]=l=>s.value=l),type:"password",placeholder:"••••••••",autocomplete:"new-password"},null,8,["modelValue"])]),o("div",q,[v(V,{loading:f.value,onClick:w},{default:k(()=>[g(d(a(t).integration?"Update":"Connect"),1)]),_:1},8,["loading"]),a(t).integration?(i(),z(V,{key:0,variant:"destructive",size:"sm",onClick:C},{default:k(()=>[...e[8]||(e[8]=[g(" Disconnect ",-1)])]),_:1})):p("",!0)])]))}});export{G as _}; diff --git a/src/static/assets/DevopsView-BtWCUdc6.js b/src/static/assets/DevopsView-BtWCUdc6.js new file mode 100644 index 0000000..67cd320 --- /dev/null +++ b/src/static/assets/DevopsView-BtWCUdc6.js @@ -0,0 +1 @@ +import{d as O,c as n,a as e,t as f,n as k,q as M,i as p,F as h,r as z,I,s as j,j as B,o as r,B as X,D as F,z as R,A as U,p as H,u as q,y as G,h as m,k as T,w as y,e as _,K as L}from"./index-DVV3ZbZ2.js";import{u as J}from"./devops-HjUgCfao.js";import{_ as Q,a as Y}from"./CardContent.vue_vue_type_script_setup_true_lang-DdGXaWEa.js";import{a as Z,_ as ee}from"./CardTitle.vue_vue_type_script_setup_true_lang-CT9DRTds.js";import{_ as te}from"./Button.vue_vue_type_script_setup_true_lang-ClV4YfXb.js";import{_ as E}from"./Spinner.vue_vue_type_script_setup_true_lang-BkmDerVR.js";import{_ as se}from"./DevopsConnectForm.vue_vue_type_script_setup_true_lang-5nCaOxp1.js";import"./utils-7WVCegLb.js";import"./Input.vue_vue_type_script_setup_true_lang-BM1xhrlf.js";const oe={class:"w-full"},re={class:"flex items-center gap-2 mb-2"},ne={class:"text-xs text-muted-foreground"},le={key:0,class:"h-1.5 w-1.5 rounded-full bg-primary"},ie={class:"overflow-x-auto rounded-xl border border-border"},ae={class:"w-full table-fixed border-collapse",style:{"min-width":"600px"}},de={class:"bg-muted/30"},ue=["onClick"],ce={class:"text-xs font-semibold text-muted-foreground tracking-wide uppercase"},me=["d"],fe=["onMousedown"],pe={key:0},xe=["onUpdate:modelValue"],ye=["onClick"],ge={class:"text-sm text-foreground truncate block"},ve={key:0},ke=["colspan"],he=O({__name:"DataTable",props:{columns:{},rows:{},rowKey:{default:"id"}},emits:["rowClick"],setup(g,{emit:i}){const W=g,C=i,x=j(null),w=j("asc"),b=I({}),$=I({}),S=j(!1);W.columns.forEach(l=>{l.width&&($[l.key]=l.width)});function N(l){const a=$[l.key]??l.width;return a?`${a}px`:"auto"}function V(l){l.sortable&&(x.value===l.key?w.value=w.value==="asc"?"desc":"asc":(x.value=l.key,w.value="asc"))}const d=B(()=>{let l=[...W.rows];for(const[a,s]of Object.entries(b))s&&(l=l.filter(c=>String(c[a]??"").toLowerCase().includes(s.toLowerCase())));return l}),t=B(()=>{if(!x.value)return d.value;const l=x.value;return[...d.value].sort((a,s)=>{const c=a[l],u=s[l];if(c==null)return 1;if(u==null)return-1;const A=String(c)String(u)?1:0;return w.value==="asc"?A:-A})}),v=B(()=>Object.values(b).some(Boolean));let o=null;function D(l,a){if(!l.resizable)return;a.preventDefault(),a.stopPropagation();const s=$[l.key]??l.width??100;o={key:l.key,startX:a.clientX,startW:s};function c(A){if(!o)return;const K=A.clientX-o.startX;$[o.key]=Math.max(l.minWidth??60,o.startW+K)}function u(){o=null,window.removeEventListener("mousemove",c),window.removeEventListener("mouseup",u)}window.addEventListener("mousemove",c),window.addEventListener("mouseup",u)}function P(){for(const l of Object.keys(b))b[l]=""}return(l,a)=>(r(),n("div",oe,[e("div",re,[e("span",ne,f(t.value.length)+" items",1),a[4]||(a[4]=e("div",{class:"flex-1"},null,-1)),g.columns.some(s=>s.filterable)?(r(),n("button",{key:0,class:k(["flex items-center gap-1.5 px-2.5 py-1 rounded-lg text-xs font-medium border transition-colors",S.value||v.value?"bg-primary/10 border-primary/20 text-primary":"border-border text-muted-foreground hover:text-foreground hover:bg-muted/40"]),onClick:a[0]||(a[0]=s=>S.value=!S.value)},[a[2]||(a[2]=e("svg",{class:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2a1 1 0 01-.293.707L13 13.414V19a1 1 0 01-.553.894l-4 2A1 1 0 017 21v-7.586L3.293 6.707A1 1 0 013 6V4z"})],-1)),a[3]||(a[3]=M(" Filter ",-1)),v.value?(r(),n("span",le)):p("",!0)],2)):p("",!0),v.value?(r(),n("button",{key:1,class:"text-xs text-muted-foreground hover:text-foreground",onClick:P}," Clear ")):p("",!0)]),e("div",ie,[e("table",ae,[e("colgroup",null,[(r(!0),n(h,null,z(g.columns,s=>(r(),n("col",{key:s.key,style:X({width:N(s)})},null,4))),128))]),e("thead",de,[e("tr",null,[(r(!0),n(h,null,z(g.columns,s=>(r(),n("th",{key:s.key,class:k(["relative px-3 py-2 text-left group select-none",[s.sortable?"cursor-pointer hover:bg-muted/50":""]]),onClick:c=>V(s)},[e("div",{class:k(["flex items-center gap-1",{"justify-center":s.align==="center","justify-end":s.align==="right"}])},[e("span",ce,f(s.title),1),s.sortable?(r(),n("svg",{key:0,class:k(["h-3 w-3 shrink-0 transition-opacity",x.value===s.key?"opacity-100 text-primary":"opacity-0 group-hover:opacity-40"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:x.value===s.key&&w.value==="desc"?"M19 9l-7 7-7-7":"M5 15l7-7 7 7"},null,8,me)],2)):p("",!0)],2),s.resizable?(r(),n("div",{key:0,class:"absolute right-0 top-0 bottom-0 w-1 cursor-col-resize opacity-0 group-hover:opacity-100 hover:opacity-100 hover:bg-primary/30 transition-opacity",onMousedown:F(c=>D(s,c),["stop"])},null,40,fe)):p("",!0)],10,ue))),128))]),S.value?(r(),n("tr",pe,[(r(!0),n(h,null,z(g.columns,s=>(r(),n("th",{key:`filter-${s.key}`,class:"px-2 pb-2 pt-0"},[s.filterable?R((r(),n("input",{key:0,"onUpdate:modelValue":c=>b[s.key]=c,type:"text",class:"w-full px-2 py-1 text-xs rounded-lg border border-border bg-background text-foreground placeholder:text-muted-foreground/60 focus:outline-none focus:ring-1 focus:ring-primary focus:border-primary",placeholder:"Filter…",onClick:a[1]||(a[1]=F(()=>{},["stop"]))},null,8,xe)),[[U,b[s.key]]]):p("",!0)]))),128))])):p("",!0)]),e("tbody",null,[(r(!0),n(h,null,z(t.value,(s,c)=>(r(),n("tr",{key:String(s[g.rowKey]??c),class:"border-t border-border/50 hover:bg-muted/20 transition-colors cursor-pointer",onClick:u=>C("rowClick",s)},[(r(!0),n(h,null,z(g.columns,u=>(r(),n("td",{key:u.key,class:k(["px-3 py-2",[u.className,u.align==="center"?"text-center":u.align==="right"?"text-right":"text-left"]])},[H(l.$slots,`cell-${u.key}`,{row:s,value:s[u.key]},()=>[e("span",ge,f(s[u.key]??"—"),1)])],2))),128))],8,ye))),128)),t.value.length===0?(r(),n("tr",ve,[e("td",{colspan:g.columns.length,class:"text-center py-10 text-sm text-muted-foreground"}," No items found ",8,ke)])):p("",!0)])])])]))}}),be={class:"p-6 space-y-5"},we={class:"flex items-center justify-between gap-4 flex-wrap"},_e={class:"glass-card rounded-xl px-4 py-3 flex items-center gap-3 flex-wrap"},Ce={class:"text-sm text-slate-700"},$e={class:"text-slate-800"},Se={key:0,class:"text-xs text-slate-400 ml-auto"},ze={key:3,class:"w-full text-xs text-destructive"},je={key:1,class:"space-y-3"},We={class:"flex items-center justify-between gap-3 flex-wrap"},De={class:"flex items-center rounded-xl border border-slate-200 overflow-hidden bg-white shadow-sm"},Ae=["onClick"],Le={key:0,class:"flex items-center justify-center py-12"},Me={key:1,class:"bg-white rounded-xl shadow-sm border border-slate-200/80 overflow-hidden"},Be={class:"text-xs font-mono text-slate-400"},Ne={class:"min-w-0"},Ve={class:"text-sm text-slate-800 truncate font-medium"},Fe={class:"text-xs text-slate-400 truncate"},Ie=["title"],Te={class:"text-xs text-slate-400"},Ee={class:"flex items-center gap-1 justify-end"},Oe=["onClick"],Pe={key:0,class:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Ke={key:1,class:"h-3.5 w-3.5 animate-spin",fill:"none",viewBox:"0 0 24 24"},Xe=["href"],et=O({__name:"DevopsView",setup(g){const i=J(),W=q(),C=j("All"),x=j(null);G(async()=>{await i.fetchIntegration(),i.integration&&await i.fetchWorkItems()});const w=B(()=>C.value==="All"?i.workItems:i.workItems.filter(t=>t.state===C.value)),b=[{key:"ado_id",title:"#",width:70,minWidth:50,sortable:!0,resizable:!0},{key:"title",title:"Title",minWidth:120,sortable:!0,filterable:!0,resizable:!0},{key:"team_project",title:"Project",width:140,minWidth:80,sortable:!0,filterable:!0,resizable:!0},{key:"priority",title:"P",width:60,minWidth:50,sortable:!0,align:"center",resizable:!0},{key:"created_date",title:"Created",width:110,minWidth:80,sortable:!0,resizable:!0},{key:"state",title:"State",width:110,minWidth:80,sortable:!0,filterable:!0,resizable:!0},{key:"id",title:"Actions",width:90,minWidth:80,align:"right"}];async function $(){try{await i.sync(),L.success("Sync complete"),await i.fetchWorkItems()}catch{L.error(i.error??"Sync failed")}}async function S(d,t){if(t.stopPropagation(),!x.value){x.value=d;try{const v=await fetch(`/cc-dashboard/api/devops/work-items/${d}/clone`,{method:"POST",headers:{Authorization:`Bearer ${W.token}`}});if(!v.ok)throw new Error(await v.text());L.success("Cloned to Tasks")}catch{L.error("Failed to clone")}finally{x.value=null}}}function N(d){const t=d??3;return t<=1?"text-red-500 font-bold":t<=2?"text-amber-500 font-semibold":"text-slate-400"}function V(d){return d==="Active"||d==="Doing"||d==="In Progress"?"bg-blue-50 text-blue-600 border border-blue-100":d==="Resolved"||d==="Done"||d==="Closed"?"bg-emerald-50 text-emerald-600 border border-emerald-100":"bg-slate-50 text-slate-500 border border-slate-200"}return(d,t)=>{var v;return r(),n("div",be,[e("div",we,[t[2]||(t[2]=e("h2",{class:"text-lg font-semibold text-foreground"},"Azure DevOps",-1)),m(i).integration?(r(),T(te,{key:0,variant:"outline",size:"sm",loading:m(i).syncing,onClick:$},{default:y(()=>[...t[1]||(t[1]=[M(" Sync Now ",-1)])]),_:1},8,["loading"])):p("",!0)]),e("div",_e,[m(i).loading&&!m(i).integration?(r(),n(h,{key:0},[_(E,{size:"sm"}),t[3]||(t[3]=e("span",{class:"text-sm text-muted-foreground"},"Loading…",-1))],64)):m(i).integration?(r(),n(h,{key:1},[t[7]||(t[7]=e("div",{class:"h-2 w-2 rounded-full bg-emerald-400 shadow-sm shadow-emerald-200"},null,-1)),e("span",Ce,[t[4]||(t[4]=M(" Connected to ",-1)),e("strong",$e,f(m(i).integration.organization),1),t[5]||(t[5]=e("span",{class:"text-slate-400 mx-1"},"·",-1)),t[6]||(t[6]=e("span",{class:"text-slate-500 text-xs"},"all assigned work items",-1))]),m(i).integration.last_synced_at?(r(),n("span",Se," Last synced: "+f(new Date(m(i).integration.last_synced_at).toLocaleString()),1)):p("",!0)],64)):(r(),n(h,{key:2},[t[8]||(t[8]=e("div",{class:"h-2 w-2 rounded-full bg-slate-300"},null,-1)),t[9]||(t[9]=e("span",{class:"text-sm text-muted-foreground"},"Not connected",-1))],64)),(v=m(i).integration)!=null&&v.last_sync_error?(r(),n("p",ze," Error: "+f(m(i).integration.last_sync_error),1)):p("",!0)]),!m(i).integration&&!m(i).loading?(r(),T(Q,{key:0},{default:y(()=>[_(ee,null,{default:y(()=>[_(Z,{class:"text-sm"},{default:y(()=>[...t[10]||(t[10]=[M("Connect Azure DevOps",-1)])]),_:1})]),_:1}),_(Y,null,{default:y(()=>[_(se)]),_:1})]),_:1})):p("",!0),m(i).integration?(r(),n("div",je,[e("div",We,[t[11]||(t[11]=e("h3",{class:"text-sm font-semibold text-slate-700"},"Work Items",-1)),e("div",De,[(r(),n(h,null,z(["All","Active","Resolved","Closed"],o=>e("button",{key:o,class:k(["px-3 py-1.5 text-xs font-medium transition-colors",C.value===o?"bg-orange-500 text-white":"text-slate-500 hover:text-slate-700 hover:bg-slate-50"]),onClick:D=>C.value=o},f(o),11,Ae)),64))])]),m(i).loading?(r(),n("div",Le,[_(E,{size:"md",class:"text-primary"})])):(r(),n("div",Me,[_(he,{columns:b,rows:w.value,"row-key":"id"},{"cell-ado_id":y(({value:o})=>[e("span",Be,"#"+f(o),1)]),"cell-title":y(({row:o})=>[e("div",Ne,[e("p",Ve,f(o.title),1),e("p",Fe,f(o.type),1)])]),"cell-team_project":y(({value:o})=>[e("span",{class:"text-xs text-slate-500 truncate block",title:String(o??"")},f(o||"—"),9,Ie)]),"cell-priority":y(({value:o})=>[e("span",{class:k(["text-xs font-semibold",N(o)])}," P"+f(o??3),3)]),"cell-created_date":y(({value:o})=>[e("span",Te,f(o?new Date(String(o)).toLocaleDateString():"—"),1)]),"cell-state":y(({value:o})=>[e("span",{class:k(["text-xs px-2 py-0.5 rounded-full font-medium",V(String(o??""))])},f(o),3)]),"cell-id":y(({row:o})=>[e("div",Ee,[e("button",{class:k(["p-1.5 rounded-lg text-slate-400 hover:text-orange-500 hover:bg-orange-50 transition-colors",{"opacity-50":x.value===String(o.id)}]),title:"Clone to Tasks",onClick:D=>S(String(o.id),D)},[x.value!==String(o.id)?(r(),n("svg",Pe,[...t[12]||(t[12]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"},null,-1)])])):(r(),n("svg",Ke,[...t[13]||(t[13]=[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"},null,-1)])]))],10,Oe),o.url?(r(),n("a",{key:0,href:String(o.url),target:"_blank",rel:"noopener",class:"p-1.5 rounded-lg text-slate-400 hover:text-blue-500 hover:bg-blue-50 transition-colors",title:"Open in Azure DevOps",onClick:t[0]||(t[0]=F(()=>{},["stop"]))},[...t[14]||(t[14]=[e("svg",{class:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})],-1)])],8,Xe)):p("",!0)])]),_:1},8,["rows"])]))])):p("",!0)])}}});export{et as default}; diff --git a/src/static/assets/DevopsView-sHwtWFcb.js b/src/static/assets/DevopsView-sHwtWFcb.js deleted file mode 100644 index f0f5563..0000000 --- a/src/static/assets/DevopsView-sHwtWFcb.js +++ /dev/null @@ -1 +0,0 @@ -import{d as N,u as B,y as I,c as r,a as t,h as a,k as g,w as i,i as c,e as d,o as n,q as f,t as l,F as v,r as b,n as x,D as T,s as w,j as L,K as _}from"./index-BP_aNEdP.js";import{u as V}from"./devops-DxRDHPW5.js";import{_ as k,a as y}from"./CardContent.vue_vue_type_script_setup_true_lang-B8VjSxLa.js";import{a as C,_ as S}from"./CardTitle.vue_vue_type_script_setup_true_lang-KH4UhlTi.js";import{_ as P}from"./Button.vue_vue_type_script_setup_true_lang-B_YE_XNW.js";import{_ as $}from"./Spinner.vue_vue_type_script_setup_true_lang-Cu49-Cc4.js";import{_ as F}from"./DevopsConnectForm.vue_vue_type_script_setup_true_lang-DQc_dk7n.js";import"./utils-7WVCegLb.js";import"./Input.vue_vue_type_script_setup_true_lang-SeygKlpx.js";const M={class:"p-6 space-y-6"},W={class:"flex items-center justify-between gap-4 flex-wrap"},E={class:"flex items-center gap-2"},O={key:0,class:"flex items-center gap-2 text-sm text-muted-foreground"},K={key:1,class:"flex items-center gap-3"},R={class:"text-sm text-foreground"},q={key:0,class:"text-xs text-muted-foreground ml-2"},H={key:2,class:"flex items-center gap-3"},G={key:3,class:"text-xs text-destructive mt-2"},J={class:"flex items-center justify-between gap-3 flex-wrap"},Q={class:"flex items-center rounded-lg border border-border overflow-hidden bg-muted/30"},U=["onClick"],X={key:0,class:"flex items-center justify-center py-8"},Y={key:1,class:"text-center py-8 text-sm text-muted-foreground"},Z={key:2,class:"space-y-0"},tt={class:"text-xs font-mono text-muted-foreground w-10 shrink-0"},et={class:"flex-1 min-w-0"},st={class:"text-sm text-foreground truncate"},ot={class:"text-xs text-muted-foreground"},nt=["title"],rt=["title"],at={class:"text-xs text-muted-foreground w-20 shrink-0 hidden lg:block"},lt={class:"flex items-center gap-1 shrink-0 w-14 justify-end"},it=["onClick"],dt={key:0,class:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},ct={key:1,class:"h-3.5 w-3.5 animate-spin",fill:"none",viewBox:"0 0 24 24"},ut=["href"],bt=N({__name:"DevopsView",setup(mt){const o=V(),j=B(),p=w("All"),u=w(null);I(async()=>{await o.fetchIntegration(),o.integration&&await o.fetchWorkItems()});const h=L(()=>p.value==="All"?o.workItems:o.workItems.filter(m=>m.state===p.value));async function z(){try{await o.sync(),_.success("Sync complete"),await o.fetchWorkItems()}catch{_.error(o.error??"Sync failed")}}async function A(m){if(!u.value){u.value=m;try{const s=await fetch(`/cc-dashboard/api/devops/work-items/${m}/clone`,{method:"POST",headers:{Authorization:`Bearer ${j.token}`}});if(!s.ok)throw new Error(await s.text());_.success("Cloned to Tasks")}catch{_.error("Failed to clone")}finally{u.value=null}}}return(m,s)=>(n(),r("div",M,[t("div",W,[s[1]||(s[1]=t("h2",{class:"text-lg font-semibold text-foreground"},"Azure DevOps",-1)),t("div",E,[a(o).integration?(n(),g(P,{key:0,variant:"outline",size:"sm",loading:a(o).syncing,onClick:z},{default:i(()=>[...s[0]||(s[0]=[f(" Sync Now ",-1)])]),_:1},8,["loading"])):c("",!0)])]),d(k,null,{default:i(()=>[d(y,{class:"pt-4"},{default:i(()=>{var e;return[a(o).loading&&!a(o).integration?(n(),r("div",O,[d($,{size:"sm"}),s[2]||(s[2]=t("span",null,"Loading...",-1))])):a(o).integration?(n(),r("div",K,[s[5]||(s[5]=t("div",{class:"h-2 w-2 rounded-full bg-[hsl(var(--success))]"},null,-1)),t("span",R,[s[3]||(s[3]=f(" Connected to ",-1)),t("strong",null,l(a(o).integration.organization),1),s[4]||(s[4]=f(" / ",-1)),t("strong",null,l(a(o).integration.project),1)]),a(o).integration.last_synced_at?(n(),r("span",q," Last synced: "+l(new Date(a(o).integration.last_synced_at).toLocaleString()),1)):c("",!0)])):(n(),r("div",H,[...s[6]||(s[6]=[t("div",{class:"h-2 w-2 rounded-full bg-muted-foreground"},null,-1),t("span",{class:"text-sm text-muted-foreground"},"Not connected",-1)])])),(e=a(o).integration)!=null&&e.last_sync_error?(n(),r("p",G," Error: "+l(a(o).integration.last_sync_error),1)):c("",!0)]}),_:1})]),_:1}),!a(o).integration&&!a(o).loading?(n(),g(k,{key:0},{default:i(()=>[d(S,null,{default:i(()=>[d(C,{class:"text-sm"},{default:i(()=>[...s[7]||(s[7]=[f("Connect Azure DevOps",-1)])]),_:1})]),_:1}),d(y,null,{default:i(()=>[d(F)]),_:1})]),_:1})):c("",!0),a(o).integration?(n(),g(k,{key:1},{default:i(()=>[d(S,{class:"pb-2"},{default:i(()=>[t("div",J,[d(C,{class:"text-sm"},{default:i(()=>[...s[8]||(s[8]=[f("Work Items",-1)])]),_:1}),t("div",Q,[(n(),r(v,null,b(["All","Active","Resolved","Closed"],e=>t("button",{key:e,class:x(["px-3 py-1 text-xs font-medium transition-colors",p.value===e?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted/50"]),onClick:D=>p.value=e},l(e),11,U)),64))])])]),_:1}),d(y,null,{default:i(()=>[a(o).loading?(n(),r("div",X,[d($,{size:"md",class:"text-primary"})])):h.value.length===0?(n(),r("div",Y," No work items found ")):(n(),r("div",Z,[s[11]||(s[11]=t("div",{class:"flex items-center gap-3 px-3 py-1.5 text-xs text-muted-foreground border-b border-border mb-1"},[t("span",{class:"w-10 shrink-0"},"#"),t("span",{class:"flex-1"},"Title"),t("span",{class:"w-28 shrink-0 hidden md:block"},"Project"),t("span",{class:"w-8 shrink-0 text-center hidden sm:block"},"P"),t("span",{class:"w-20 shrink-0 hidden lg:block"},"Created"),t("span",{class:"w-20 shrink-0"},"State"),t("span",{class:"w-14 shrink-0 text-right"},"Link")],-1)),(n(!0),r(v,null,b(h.value,e=>(n(),r("div",{key:e.id,class:"flex items-center gap-3 px-3 py-2 rounded-lg hover:bg-muted/30 transition-colors"},[t("span",tt,"#"+l(e.ado_id),1),t("div",et,[t("p",st,l(e.title),1),t("p",ot,l(e.type),1)]),t("span",{class:"text-xs text-muted-foreground w-28 shrink-0 truncate hidden md:block",title:e.team_project},l(e.team_project||"—"),9,nt),t("span",{class:x(["text-xs font-medium w-8 shrink-0 text-center hidden sm:block",(e.priority??3)<=1?"text-red-400":(e.priority??3)<=2?"text-amber-400":"text-muted-foreground"]),title:`Priority ${e.priority}`}," P"+l(e.priority??3),11,rt),t("span",at,l(e.created_date?new Date(e.created_date).toLocaleDateString():"—"),1),t("span",{class:x(["text-xs px-2 py-0.5 rounded-full shrink-0 w-20 text-center",e.state==="Active"?"bg-blue-500/10 text-blue-400":e.state==="Resolved"?"bg-green-500/10 text-green-400":(e.state==="Closed","bg-muted text-muted-foreground")])},l(e.state),3),t("div",lt,[t("button",{class:x(["p-1 rounded text-muted-foreground hover:text-primary transition-colors",{"opacity-50":u.value===e.id}]),title:"Clone to Tasks",onClick:T(D=>A(e.id),["stop"])},[u.value!==e.id?(n(),r("svg",dt,[...s[9]||(s[9]=[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"},null,-1)])])):(n(),r("svg",ct,[...s[10]||(s[10]=[t("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),t("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"},null,-1)])]))],10,it),e.url?(n(),r("a",{key:0,href:e.url,target:"_blank",class:"text-xs text-primary hover:underline"},"→",8,ut)):c("",!0)])]))),128))]))]),_:1})]),_:1})):c("",!0)]))}});export{bt as default}; diff --git a/src/static/assets/Dialog.vue_vue_type_script_setup_true_lang-v8iqnRk8.js b/src/static/assets/Dialog.vue_vue_type_script_setup_true_lang-CSPK-Rcg.js similarity index 93% rename from src/static/assets/Dialog.vue_vue_type_script_setup_true_lang-v8iqnRk8.js rename to src/static/assets/Dialog.vue_vue_type_script_setup_true_lang-CSPK-Rcg.js index aee6248..f9df72d 100644 --- a/src/static/assets/Dialog.vue_vue_type_script_setup_true_lang-v8iqnRk8.js +++ b/src/static/assets/Dialog.vue_vue_type_script_setup_true_lang-CSPK-Rcg.js @@ -1 +1 @@ -import{d as y,y as k,G as b,k as h,H as g,e as c,T as x,w as u,o as a,c as n,a as o,p as r,t as m,i,n as w}from"./index-BP_aNEdP.js";import{_ as $}from"./Button.vue_vue_type_script_setup_true_lang-B_YE_XNW.js";const C={key:0,class:"fixed inset-0 z-50 flex items-center justify-center p-4"},B=["aria-label"],j={key:0,class:"flex items-center justify-between p-6 pb-4"},z={class:"text-lg font-semibold text-foreground"},E={key:0,class:"text-sm text-muted-foreground mt-1"},L={class:"px-6 pb-4"},M={key:1,class:"flex justify-end gap-2 px-6 pb-6"},V=y({__name:"Dialog",props:{open:{type:Boolean},title:{},description:{},maxWidth:{default:"max-w-lg"}},emits:["close"],setup(e,{emit:f}){const p=e,l=f;function d(t){t.key==="Escape"&&p.open&&l("close")}return k(()=>document.addEventListener("keydown",d)),b(()=>document.removeEventListener("keydown",d)),(t,s)=>(a(),h(g,{to:"body"},[c(x,{"enter-active-class":"transition-opacity duration-200","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"transition-opacity duration-200","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:u(()=>[e.open?(a(),n("div",C,[o("div",{class:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:s[0]||(s[0]=v=>l("close"))}),o("div",{class:w(["relative w-full bg-card border border-border rounded-lg shadow-xl z-10",e.maxWidth]),role:"dialog","aria-modal":!0,"aria-label":e.title},[e.title||t.$slots.header?(a(),n("div",j,[o("div",null,[r(t.$slots,"header",{},()=>[o("h2",z,m(e.title),1),e.description?(a(),n("p",E,m(e.description),1)):i("",!0)])]),c($,{variant:"ghost",size:"icon",class:"shrink-0",onClick:s[1]||(s[1]=v=>l("close"))},{default:u(()=>[...s[2]||(s[2]=[o("svg",{class:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[o("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])]),_:1})])):i("",!0),o("div",L,[r(t.$slots,"default")]),t.$slots.footer?(a(),n("div",M,[r(t.$slots,"footer")])):i("",!0)],10,B)])):i("",!0)]),_:3})]))}});export{V as _}; +import{d as y,y as k,G as b,k as h,H as g,e as c,T as x,w as u,o as a,c as n,a as o,p as r,t as m,i,n as w}from"./index-DVV3ZbZ2.js";import{_ as $}from"./Button.vue_vue_type_script_setup_true_lang-ClV4YfXb.js";const C={key:0,class:"fixed inset-0 z-50 flex items-center justify-center p-4"},B=["aria-label"],j={key:0,class:"flex items-center justify-between p-6 pb-4"},z={class:"text-lg font-semibold text-foreground"},E={key:0,class:"text-sm text-muted-foreground mt-1"},L={class:"px-6 pb-4"},M={key:1,class:"flex justify-end gap-2 px-6 pb-6"},V=y({__name:"Dialog",props:{open:{type:Boolean},title:{},description:{},maxWidth:{default:"max-w-lg"}},emits:["close"],setup(e,{emit:f}){const p=e,l=f;function d(t){t.key==="Escape"&&p.open&&l("close")}return k(()=>document.addEventListener("keydown",d)),b(()=>document.removeEventListener("keydown",d)),(t,s)=>(a(),h(g,{to:"body"},[c(x,{"enter-active-class":"transition-opacity duration-200","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"transition-opacity duration-200","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:u(()=>[e.open?(a(),n("div",C,[o("div",{class:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:s[0]||(s[0]=v=>l("close"))}),o("div",{class:w(["relative w-full bg-card border border-border rounded-lg shadow-xl z-10",e.maxWidth]),role:"dialog","aria-modal":!0,"aria-label":e.title},[e.title||t.$slots.header?(a(),n("div",j,[o("div",null,[r(t.$slots,"header",{},()=>[o("h2",z,m(e.title),1),e.description?(a(),n("p",E,m(e.description),1)):i("",!0)])]),c($,{variant:"ghost",size:"icon",class:"shrink-0",onClick:s[1]||(s[1]=v=>l("close"))},{default:u(()=>[...s[2]||(s[2]=[o("svg",{class:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[o("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])]),_:1})])):i("",!0),o("div",L,[r(t.$slots,"default")]),t.$slots.footer?(a(),n("div",M,[r(t.$slots,"footer")])):i("",!0)],10,B)])):i("",!0)]),_:3})]))}});export{V as _}; diff --git a/src/static/assets/Input.vue_vue_type_script_setup_true_lang-SeygKlpx.js b/src/static/assets/Input.vue_vue_type_script_setup_true_lang-BM1xhrlf.js similarity index 94% rename from src/static/assets/Input.vue_vue_type_script_setup_true_lang-SeygKlpx.js rename to src/static/assets/Input.vue_vue_type_script_setup_true_lang-BM1xhrlf.js index 9b07fd9..190ee19 100644 --- a/src/static/assets/Input.vue_vue_type_script_setup_true_lang-SeygKlpx.js +++ b/src/static/assets/Input.vue_vue_type_script_setup_true_lang-BM1xhrlf.js @@ -1 +1 @@ -import{c as i}from"./utils-7WVCegLb.js";import{d,o as s,c as u,n as m,h as r}from"./index-BP_aNEdP.js";const c=["id","name","type","value","placeholder","disabled","autocomplete","min","max","step"],g=d({__name:"Input",props:{modelValue:{},type:{},placeholder:{},disabled:{type:Boolean},class:{},id:{},name:{},autocomplete:{},min:{},max:{},step:{}},emits:["update:modelValue","change","blur","focus"],setup(e,{emit:n}){const a=e,o=n;return(f,t)=>(s(),u("input",{id:e.id,name:e.name,type:e.type??"text",value:e.modelValue,placeholder:e.placeholder,disabled:e.disabled,autocomplete:e.autocomplete,min:e.min,max:e.max,step:e.step,class:m(r(i)("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","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.class)),onInput:t[0]||(t[0]=l=>o("update:modelValue",l.target.value)),onChange:t[1]||(t[1]=l=>o("change",l.target.value)),onBlur:t[2]||(t[2]=l=>o("blur",l)),onFocus:t[3]||(t[3]=l=>o("focus",l))},null,42,c))}});export{g as _}; +import{c as i}from"./utils-7WVCegLb.js";import{d,o as s,c as u,n as m,h as r}from"./index-DVV3ZbZ2.js";const c=["id","name","type","value","placeholder","disabled","autocomplete","min","max","step"],g=d({__name:"Input",props:{modelValue:{},type:{},placeholder:{},disabled:{type:Boolean},class:{},id:{},name:{},autocomplete:{},min:{},max:{},step:{}},emits:["update:modelValue","change","blur","focus"],setup(e,{emit:n}){const a=e,o=n;return(f,t)=>(s(),u("input",{id:e.id,name:e.name,type:e.type??"text",value:e.modelValue,placeholder:e.placeholder,disabled:e.disabled,autocomplete:e.autocomplete,min:e.min,max:e.max,step:e.step,class:m(r(i)("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","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.class)),onInput:t[0]||(t[0]=l=>o("update:modelValue",l.target.value)),onChange:t[1]||(t[1]=l=>o("change",l.target.value)),onBlur:t[2]||(t[2]=l=>o("blur",l)),onFocus:t[3]||(t[3]=l=>o("focus",l))},null,42,c))}});export{g as _}; diff --git a/src/static/assets/KeysView-DJ0U5kZP.js b/src/static/assets/KeysView-Bo8BcbFR.js similarity index 88% rename from src/static/assets/KeysView-DJ0U5kZP.js rename to src/static/assets/KeysView-Bo8BcbFR.js index bcb1868..6cf6111 100644 --- a/src/static/assets/KeysView-DJ0U5kZP.js +++ b/src/static/assets/KeysView-Bo8BcbFR.js @@ -1 +1 @@ -import{a as b}from"./admin-C27haAMd.js";import{_ as K,a as $}from"./CardContent.vue_vue_type_script_setup_true_lang-B8VjSxLa.js";import{_ as v}from"./Button.vue_vue_type_script_setup_true_lang-B_YE_XNW.js";import{_ as V}from"./Dialog.vue_vue_type_script_setup_true_lang-v8iqnRk8.js";import{_ as N}from"./Input.vue_vue_type_script_setup_true_lang-SeygKlpx.js";import{_ as A}from"./Spinner.vue_vue_type_script_setup_true_lang-Cu49-Cc4.js";import{d as B,y as L,c as l,a as t,e as r,w as n,s as i,o as a,q as p,F as P,r as F,t as u,h as k,k as I,i as j,K as y}from"./index-BP_aNEdP.js";import{a as h}from"./utils-7WVCegLb.js";const D={class:"p-6"},R={class:"flex items-center justify-between mb-6"},z={key:0,class:"flex items-center justify-center h-20"},M={key:1,class:"text-center text-muted-foreground py-8 text-sm"},T={key:2,class:"w-full"},U={class:"px-4 py-3 text-sm text-foreground"},q={class:"px-4 py-3 text-sm font-mono text-muted-foreground"},E={class:"px-4 py-3 text-xs text-muted-foreground"},H={class:"px-4 py-3 text-xs text-muted-foreground"},S={class:"px-4 py-3 text-right"},G={class:"space-y-4"},J={key:0,class:"rounded-md bg-emerald-500/10 border border-emerald-500/30 p-3"},O={class:"text-xs font-mono text-foreground break-all"},Q={key:1,class:"space-y-1.5"},re=B({__name:"KeysView",setup(W){const f=i([]),_=i(!1),c=i(!1),m=i(""),x=i(!1),d=i(null);L(()=>g());async function g(){_.value=!0;try{const o=await b.keys();f.value=o.data}finally{_.value=!1}}async function w(){if(m.value.trim()){x.value=!0;try{const o=await b.createKey({label:m.value});d.value=o.data.key,y.success("API key created"),await g(),m.value=""}catch{y.error("Failed to create key")}finally{x.value=!1}}}async function C(o){if(confirm(`Revoke key "${o.label}"? This cannot be undone.`))try{await b.revokeKey(o.id),y.success("Key revoked"),f.value=f.value.filter(e=>e.id!==o.id)}catch{y.error("Failed to revoke key")}}return(o,e)=>(a(),l("div",D,[t("div",R,[e[5]||(e[5]=t("h2",{class:"text-lg font-semibold text-foreground"},"API Keys",-1)),r(v,{size:"sm",onClick:e[0]||(e[0]=s=>{c.value=!0,d.value=null})},{default:n(()=>[...e[4]||(e[4]=[t("svg",{class:"h-4 w-4 mr-1.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1),p(" New Key ",-1)])]),_:1})]),r(K,null,{default:n(()=>[r($,{class:"p-0"},{default:n(()=>[_.value?(a(),l("div",z,[r(A,{class:"text-primary"})])):f.value.length===0?(a(),l("div",M," No API keys ")):(a(),l("table",T,[e[7]||(e[7]=t("thead",null,[t("tr",{class:"border-b border-border"},[t("th",{class:"text-left text-xs font-medium text-muted-foreground px-4 py-3"},"Label"),t("th",{class:"text-left text-xs font-medium text-muted-foreground px-4 py-3"},"Prefix"),t("th",{class:"text-left text-xs font-medium text-muted-foreground px-4 py-3"},"Created"),t("th",{class:"text-left text-xs font-medium text-muted-foreground px-4 py-3"},"Last Used"),t("th",{class:"px-4 py-3"})])],-1)),t("tbody",null,[(a(!0),l(P,null,F(f.value,s=>(a(),l("tr",{key:s.id,class:"border-b border-border last:border-0 hover:bg-muted/30"},[t("td",U,u(s.label),1),t("td",q,u(s.prefix)+"...",1),t("td",E,u(k(h)(s.created_at)),1),t("td",H,u(s.last_used?k(h)(s.last_used):"Never"),1),t("td",S,[r(v,{variant:"ghost",size:"sm",class:"text-destructive",onClick:X=>C(s)},{default:n(()=>[...e[6]||(e[6]=[p(" Revoke ",-1)])]),_:1},8,["onClick"])])]))),128))])]))]),_:1})]),_:1}),r(V,{open:c.value,title:"Create API Key",onClose:e[3]||(e[3]=s=>c.value=!1)},{footer:n(()=>[r(v,{variant:"outline",onClick:e[2]||(e[2]=s=>c.value=!1)},{default:n(()=>[p(u(d.value?"Done":"Cancel"),1)]),_:1}),d.value?j("",!0):(a(),I(v,{key:0,loading:x.value,onClick:w},{default:n(()=>[...e[10]||(e[10]=[p(" Create ",-1)])]),_:1},8,["loading"]))]),default:n(()=>[t("div",G,[d.value?(a(),l("div",J,[e[8]||(e[8]=t("p",{class:"text-xs text-emerald-400 font-medium mb-1"},"Key created — save it now!",-1)),t("p",O,u(d.value),1)])):(a(),l("div",Q,[e[9]||(e[9]=t("label",{class:"text-sm font-medium text-foreground"},"Label",-1)),r(N,{modelValue:m.value,"onUpdate:modelValue":e[1]||(e[1]=s=>m.value=s),placeholder:"e.g. claude-collector",disabled:x.value},null,8,["modelValue","disabled"])]))])]),_:1},8,["open"])]))}});export{re as default}; +import{a as b}from"./admin-xS9EtPqv.js";import{_ as K,a as $}from"./CardContent.vue_vue_type_script_setup_true_lang-DdGXaWEa.js";import{_ as v}from"./Button.vue_vue_type_script_setup_true_lang-ClV4YfXb.js";import{_ as V}from"./Dialog.vue_vue_type_script_setup_true_lang-CSPK-Rcg.js";import{_ as N}from"./Input.vue_vue_type_script_setup_true_lang-BM1xhrlf.js";import{_ as A}from"./Spinner.vue_vue_type_script_setup_true_lang-BkmDerVR.js";import{d as B,y as L,c as l,a as t,e as r,w as n,s as i,o as a,q as p,F as P,r as F,t as u,h as k,k as I,i as j,K as y}from"./index-DVV3ZbZ2.js";import{a as h}from"./utils-7WVCegLb.js";const D={class:"p-6"},R={class:"flex items-center justify-between mb-6"},z={key:0,class:"flex items-center justify-center h-20"},M={key:1,class:"text-center text-muted-foreground py-8 text-sm"},T={key:2,class:"w-full"},U={class:"px-4 py-3 text-sm text-foreground"},q={class:"px-4 py-3 text-sm font-mono text-muted-foreground"},E={class:"px-4 py-3 text-xs text-muted-foreground"},H={class:"px-4 py-3 text-xs text-muted-foreground"},S={class:"px-4 py-3 text-right"},G={class:"space-y-4"},J={key:0,class:"rounded-md bg-emerald-500/10 border border-emerald-500/30 p-3"},O={class:"text-xs font-mono text-foreground break-all"},Q={key:1,class:"space-y-1.5"},re=B({__name:"KeysView",setup(W){const f=i([]),_=i(!1),c=i(!1),m=i(""),x=i(!1),d=i(null);L(()=>g());async function g(){_.value=!0;try{const o=await b.keys();f.value=o.data}finally{_.value=!1}}async function w(){if(m.value.trim()){x.value=!0;try{const o=await b.createKey({label:m.value});d.value=o.data.key,y.success("API key created"),await g(),m.value=""}catch{y.error("Failed to create key")}finally{x.value=!1}}}async function C(o){if(confirm(`Revoke key "${o.label}"? This cannot be undone.`))try{await b.revokeKey(o.id),y.success("Key revoked"),f.value=f.value.filter(e=>e.id!==o.id)}catch{y.error("Failed to revoke key")}}return(o,e)=>(a(),l("div",D,[t("div",R,[e[5]||(e[5]=t("h2",{class:"text-lg font-semibold text-foreground"},"API Keys",-1)),r(v,{size:"sm",onClick:e[0]||(e[0]=s=>{c.value=!0,d.value=null})},{default:n(()=>[...e[4]||(e[4]=[t("svg",{class:"h-4 w-4 mr-1.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1),p(" New Key ",-1)])]),_:1})]),r(K,null,{default:n(()=>[r($,{class:"p-0"},{default:n(()=>[_.value?(a(),l("div",z,[r(A,{class:"text-primary"})])):f.value.length===0?(a(),l("div",M," No API keys ")):(a(),l("table",T,[e[7]||(e[7]=t("thead",null,[t("tr",{class:"border-b border-border"},[t("th",{class:"text-left text-xs font-medium text-muted-foreground px-4 py-3"},"Label"),t("th",{class:"text-left text-xs font-medium text-muted-foreground px-4 py-3"},"Prefix"),t("th",{class:"text-left text-xs font-medium text-muted-foreground px-4 py-3"},"Created"),t("th",{class:"text-left text-xs font-medium text-muted-foreground px-4 py-3"},"Last Used"),t("th",{class:"px-4 py-3"})])],-1)),t("tbody",null,[(a(!0),l(P,null,F(f.value,s=>(a(),l("tr",{key:s.id,class:"border-b border-border last:border-0 hover:bg-muted/30"},[t("td",U,u(s.label),1),t("td",q,u(s.prefix)+"...",1),t("td",E,u(k(h)(s.created_at)),1),t("td",H,u(s.last_used?k(h)(s.last_used):"Never"),1),t("td",S,[r(v,{variant:"ghost",size:"sm",class:"text-destructive",onClick:X=>C(s)},{default:n(()=>[...e[6]||(e[6]=[p(" Revoke ",-1)])]),_:1},8,["onClick"])])]))),128))])]))]),_:1})]),_:1}),r(V,{open:c.value,title:"Create API Key",onClose:e[3]||(e[3]=s=>c.value=!1)},{footer:n(()=>[r(v,{variant:"outline",onClick:e[2]||(e[2]=s=>c.value=!1)},{default:n(()=>[p(u(d.value?"Done":"Cancel"),1)]),_:1}),d.value?j("",!0):(a(),I(v,{key:0,loading:x.value,onClick:w},{default:n(()=>[...e[10]||(e[10]=[p(" Create ",-1)])]),_:1},8,["loading"]))]),default:n(()=>[t("div",G,[d.value?(a(),l("div",J,[e[8]||(e[8]=t("p",{class:"text-xs text-emerald-400 font-medium mb-1"},"Key created — save it now!",-1)),t("p",O,u(d.value),1)])):(a(),l("div",Q,[e[9]||(e[9]=t("label",{class:"text-sm font-medium text-foreground"},"Label",-1)),r(N,{modelValue:m.value,"onUpdate:modelValue":e[1]||(e[1]=s=>m.value=s),placeholder:"e.g. claude-collector",disabled:x.value},null,8,["modelValue","disabled"])]))])]),_:1},8,["open"])]))}});export{re as default}; diff --git a/src/static/assets/LiveView-1BXLV--t.js b/src/static/assets/LiveView-DtdoVW56.js similarity index 92% rename from src/static/assets/LiveView-1BXLV--t.js rename to src/static/assets/LiveView-DtdoVW56.js index 2cfdc9a..10e863d 100644 --- a/src/static/assets/LiveView-1BXLV--t.js +++ b/src/static/assets/LiveView-DtdoVW56.js @@ -1 +1 @@ -import{G as T,s as g,d as J,u as O,y as V,c as f,a as o,n as b,h as l,t as v,k as $,w as x,i as k,e as C,o as c,q as w,F as B,r as F,j as z}from"./index-BP_aNEdP.js";import{_ as A,a as D}from"./CardContent.vue_vue_type_script_setup_true_lang-B8VjSxLa.js";import{_ as N}from"./Button.vue_vue_type_script_setup_true_lang-B_YE_XNW.js";import"./utils-7WVCegLb.js";import"./Spinner.vue_vue_type_script_setup_true_lang-Cu49-Cc4.js";function U(E){const e=g([]),i=g(!1),m=g(null);let s=null,r=null,u=!1;function p(){if(!u)try{s=new EventSource(E),s.onopen=()=>{i.value=!0,m.value=null},s.onmessage=n=>{try{const y=JSON.parse(n.data);e.value.push({type:"message",data:y}),e.value.length>200&&e.value.shift()}catch{e.value.push({type:"message",data:n.data})}},s.addEventListener("session_start",n=>{try{e.value.push({type:"session_start",data:JSON.parse(n.data)})}catch{e.value.push({type:"session_start",data:n.data})}e.value.length>200&&e.value.shift()}),s.addEventListener("session_end",n=>{try{e.value.push({type:"session_end",data:JSON.parse(n.data)})}catch{e.value.push({type:"session_end",data:n.data})}e.value.length>200&&e.value.shift()}),s.addEventListener("activity",n=>{try{e.value.push({type:"activity",data:JSON.parse(n.data)})}catch{e.value.push({type:"activity",data:n.data})}e.value.length>200&&e.value.shift()}),s.onerror=()=>{i.value=!1,m.value="Connection lost, reconnecting...",s==null||s.close(),s=null,u||(r=setTimeout(()=>p(),5e3))}}catch{m.value="Failed to connect to event stream",u||(r=setTimeout(()=>p(),5e3))}}function _(){u=!0,r&&clearTimeout(r),s==null||s.close(),s=null,i.value=!1}function h(){e.value=[]}return T(()=>{_()}),{events:e,connected:i,error:m,connect:p,disconnect:_,clearEvents:h}}const I={class:"p-6 h-full flex flex-col"},R={class:"flex items-center gap-3 mb-4"},q={class:"flex items-center gap-2"},G={class:"text-xs text-muted-foreground"},M={key:0,class:"mb-4 text-xs text-amber-400 bg-amber-500/10 border border-amber-500/30 rounded px-3 py-2"},P={key:0,class:"flex items-center justify-center h-full text-sm text-muted-foreground"},W={key:1,class:"overflow-y-auto h-full font-mono text-xs"},H={class:"flex-1 min-w-0"},K={class:"flex items-center gap-2 flex-wrap"},Q={key:0,class:"text-muted-foreground"},X={class:"text-muted-foreground truncate mt-0.5"},ne=J({__name:"LiveView",setup(E){const e=O(),i=e.getToken(),m=`/cc-dashboard/api/events${i?`?token=${encodeURIComponent(i)}`:""}`,{events:s,connected:r,error:u,connect:p,clearEvents:_}=U(m);V(()=>{e.isAuthenticated&&i&&p()});const h=z(()=>[...s.value].reverse().slice(0,100));function n(t){return t==="session_start"?"text-emerald-400":t==="session_end"?"text-amber-400":t==="activity"?"text-blue-400":"text-muted-foreground"}function y(t){return t==="session_start"?"▶":t==="session_end"?"■":t==="activity"?"●":"○"}function j(t){if(typeof t=="string")return t;if(t&&typeof t=="object"){const a=t;return a.message||a.summary||JSON.stringify(t)}return String(t)}function S(t){if(t&&typeof t=="object"){const a=t;return a.display_name||a.project_id||""}return""}return(t,a)=>(c(),f("div",I,[o("div",R,[a[2]||(a[2]=o("h2",{class:"text-lg font-semibold text-foreground flex-1"},"Live Feed",-1)),o("div",q,[o("div",{class:b(["h-2 w-2 rounded-full",l(r)?"bg-emerald-500 animate-pulse":"bg-red-500"])},null,2),o("span",G,v(l(r)?"Connected":"Disconnected"),1)]),l(r)?k("",!0):(c(),$(N,{key:0,variant:"outline",size:"sm",onClick:l(p)},{default:x(()=>[...a[0]||(a[0]=[w(" Reconnect ",-1)])]),_:1},8,["onClick"])),C(N,{variant:"ghost",size:"sm",onClick:l(_)},{default:x(()=>[...a[1]||(a[1]=[w(" Clear ",-1)])]),_:1},8,["onClick"])]),l(u)&&!l(r)?(c(),f("div",M,v(l(u)),1)):k("",!0),C(A,{class:"flex-1 overflow-hidden"},{default:x(()=>[C(D,{class:"p-0 h-full"},{default:x(()=>[h.value.length===0?(c(),f("div",P,[...a[3]||(a[3]=[o("div",{class:"text-center"},[o("div",{class:"text-2xl mb-2"},"📡"),o("p",null,"Waiting for events..."),o("p",{class:"text-xs mt-1"},"Activity will appear here in real-time")],-1)])])):(c(),f("div",W,[(c(!0),f(B,null,F(h.value,(d,L)=>(c(),f("div",{key:L,class:"flex items-start gap-2 px-4 py-1.5 hover:bg-muted/50 border-b border-border/30"},[o("span",{class:b([n(d.type),"shrink-0 mt-0.5"])},v(y(d.type)),3),o("div",H,[o("div",K,[o("span",{class:b([n(d.type),"font-medium"])},v(d.type),3),S(d.data)?(c(),f("span",Q,v(S(d.data)),1)):k("",!0)]),o("p",X,v(j(d.data)),1)])]))),128))]))]),_:1})]),_:1})]))}});export{ne as default}; +import{G as T,s as g,d as J,u as O,y as V,c as f,a as o,n as b,h as l,t as v,k as $,w as x,i as k,e as C,o as c,q as w,F as B,r as F,j as z}from"./index-DVV3ZbZ2.js";import{_ as A,a as D}from"./CardContent.vue_vue_type_script_setup_true_lang-DdGXaWEa.js";import{_ as N}from"./Button.vue_vue_type_script_setup_true_lang-ClV4YfXb.js";import"./utils-7WVCegLb.js";import"./Spinner.vue_vue_type_script_setup_true_lang-BkmDerVR.js";function U(E){const e=g([]),i=g(!1),m=g(null);let s=null,r=null,u=!1;function p(){if(!u)try{s=new EventSource(E),s.onopen=()=>{i.value=!0,m.value=null},s.onmessage=n=>{try{const y=JSON.parse(n.data);e.value.push({type:"message",data:y}),e.value.length>200&&e.value.shift()}catch{e.value.push({type:"message",data:n.data})}},s.addEventListener("session_start",n=>{try{e.value.push({type:"session_start",data:JSON.parse(n.data)})}catch{e.value.push({type:"session_start",data:n.data})}e.value.length>200&&e.value.shift()}),s.addEventListener("session_end",n=>{try{e.value.push({type:"session_end",data:JSON.parse(n.data)})}catch{e.value.push({type:"session_end",data:n.data})}e.value.length>200&&e.value.shift()}),s.addEventListener("activity",n=>{try{e.value.push({type:"activity",data:JSON.parse(n.data)})}catch{e.value.push({type:"activity",data:n.data})}e.value.length>200&&e.value.shift()}),s.onerror=()=>{i.value=!1,m.value="Connection lost, reconnecting...",s==null||s.close(),s=null,u||(r=setTimeout(()=>p(),5e3))}}catch{m.value="Failed to connect to event stream",u||(r=setTimeout(()=>p(),5e3))}}function _(){u=!0,r&&clearTimeout(r),s==null||s.close(),s=null,i.value=!1}function h(){e.value=[]}return T(()=>{_()}),{events:e,connected:i,error:m,connect:p,disconnect:_,clearEvents:h}}const I={class:"p-6 h-full flex flex-col"},R={class:"flex items-center gap-3 mb-4"},q={class:"flex items-center gap-2"},G={class:"text-xs text-muted-foreground"},M={key:0,class:"mb-4 text-xs text-amber-400 bg-amber-500/10 border border-amber-500/30 rounded px-3 py-2"},P={key:0,class:"flex items-center justify-center h-full text-sm text-muted-foreground"},W={key:1,class:"overflow-y-auto h-full font-mono text-xs"},H={class:"flex-1 min-w-0"},K={class:"flex items-center gap-2 flex-wrap"},Q={key:0,class:"text-muted-foreground"},X={class:"text-muted-foreground truncate mt-0.5"},ne=J({__name:"LiveView",setup(E){const e=O(),i=e.getToken(),m=`/cc-dashboard/api/events${i?`?token=${encodeURIComponent(i)}`:""}`,{events:s,connected:r,error:u,connect:p,clearEvents:_}=U(m);V(()=>{e.isAuthenticated&&i&&p()});const h=z(()=>[...s.value].reverse().slice(0,100));function n(t){return t==="session_start"?"text-emerald-400":t==="session_end"?"text-amber-400":t==="activity"?"text-blue-400":"text-muted-foreground"}function y(t){return t==="session_start"?"▶":t==="session_end"?"■":t==="activity"?"●":"○"}function j(t){if(typeof t=="string")return t;if(t&&typeof t=="object"){const a=t;return a.message||a.summary||JSON.stringify(t)}return String(t)}function S(t){if(t&&typeof t=="object"){const a=t;return a.display_name||a.project_id||""}return""}return(t,a)=>(c(),f("div",I,[o("div",R,[a[2]||(a[2]=o("h2",{class:"text-lg font-semibold text-foreground flex-1"},"Live Feed",-1)),o("div",q,[o("div",{class:b(["h-2 w-2 rounded-full",l(r)?"bg-emerald-500 animate-pulse":"bg-red-500"])},null,2),o("span",G,v(l(r)?"Connected":"Disconnected"),1)]),l(r)?k("",!0):(c(),$(N,{key:0,variant:"outline",size:"sm",onClick:l(p)},{default:x(()=>[...a[0]||(a[0]=[w(" Reconnect ",-1)])]),_:1},8,["onClick"])),C(N,{variant:"ghost",size:"sm",onClick:l(_)},{default:x(()=>[...a[1]||(a[1]=[w(" Clear ",-1)])]),_:1},8,["onClick"])]),l(u)&&!l(r)?(c(),f("div",M,v(l(u)),1)):k("",!0),C(A,{class:"flex-1 overflow-hidden"},{default:x(()=>[C(D,{class:"p-0 h-full"},{default:x(()=>[h.value.length===0?(c(),f("div",P,[...a[3]||(a[3]=[o("div",{class:"text-center"},[o("div",{class:"text-2xl mb-2"},"📡"),o("p",null,"Waiting for events..."),o("p",{class:"text-xs mt-1"},"Activity will appear here in real-time")],-1)])])):(c(),f("div",W,[(c(!0),f(B,null,F(h.value,(d,L)=>(c(),f("div",{key:L,class:"flex items-start gap-2 px-4 py-1.5 hover:bg-muted/50 border-b border-border/30"},[o("span",{class:b([n(d.type),"shrink-0 mt-0.5"])},v(y(d.type)),3),o("div",H,[o("div",K,[o("span",{class:b([n(d.type),"font-medium"])},v(d.type),3),S(d.data)?(c(),f("span",Q,v(S(d.data)),1)):k("",!0)]),o("p",X,v(j(d.data)),1)])]))),128))]))]),_:1})]),_:1})]))}});export{ne as default}; diff --git a/src/static/assets/LoginView-Bp6PnQyZ.js b/src/static/assets/LoginView-BX1BQo9f.js similarity index 94% rename from src/static/assets/LoginView-Bp6PnQyZ.js rename to src/static/assets/LoginView-BX1BQo9f.js index 7c15250..4fd1154 100644 --- a/src/static/assets/LoginView-Bp6PnQyZ.js +++ b/src/static/assets/LoginView-BX1BQo9f.js @@ -1 +1 @@ -import{d as h,u as f,c as o,a as t,b as m,e as a,w as d,o as r,f as g,g as p,h as i,t as x,i as w}from"./index-BP_aNEdP.js";import{_ as y,a as b}from"./CardContent.vue_vue_type_script_setup_true_lang-B8VjSxLa.js";import"./utils-7WVCegLb.js";const v={class:"min-h-screen flex items-center justify-center bg-background p-4"},_={class:"w-full max-w-sm"},k={class:"space-y-4"},C={key:0,class:"rounded-md bg-destructive/10 border border-destructive/30 px-3 py-2 text-sm text-destructive"},B=["disabled"],V={key:0},S={key:1},M=h({__name:"LoginView",setup(F){const c=g(),l=p(),s=f();async function u(){try{await s.loginWithMicrosoft();const n=l.query.redirect;c.push(n??"/")}catch{}}return(n,e)=>(r(),o("div",v,[t("div",_,[e[2]||(e[2]=m('

CC Dashboard

Corporate Planning Hub

',1)),a(y,null,{default:d(()=>[a(b,{class:"pt-6"},{default:d(()=>[t("div",k,[i(s).error?(r(),o("div",C,x(i(s).error),1)):w("",!0),t("button",{type:"button",disabled:i(s).loading,class:"w-full flex items-center justify-center gap-3 rounded-md border border-border bg-white px-4 py-2.5 text-sm font-medium text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",onClick:u},[e[0]||(e[0]=t("svg",{class:"h-5 w-5 shrink-0",viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("rect",{x:"1",y:"1",width:"9",height:"9",fill:"#F25022"}),t("rect",{x:"11",y:"1",width:"9",height:"9",fill:"#7FBA00"}),t("rect",{x:"1",y:"11",width:"9",height:"9",fill:"#00A4EF"}),t("rect",{x:"11",y:"11",width:"9",height:"9",fill:"#FFB900"})],-1)),i(s).loading?(r(),o("span",V,"Signing in…")):(r(),o("span",S,"Sign in with Microsoft"))],8,B),e[1]||(e[1]=t("p",{class:"text-center text-xs text-muted-foreground"}," Use your @oliver.agency account ",-1))])]),_:1})]),_:1})])]))}});export{M as default}; +import{d as h,u as f,c as o,a as t,b as m,e as a,w as d,o as r,f as g,g as p,h as i,t as x,i as w}from"./index-DVV3ZbZ2.js";import{_ as y,a as b}from"./CardContent.vue_vue_type_script_setup_true_lang-DdGXaWEa.js";import"./utils-7WVCegLb.js";const v={class:"min-h-screen flex items-center justify-center bg-background p-4"},_={class:"w-full max-w-sm"},k={class:"space-y-4"},C={key:0,class:"rounded-md bg-destructive/10 border border-destructive/30 px-3 py-2 text-sm text-destructive"},B=["disabled"],V={key:0},S={key:1},M=h({__name:"LoginView",setup(F){const c=g(),l=p(),s=f();async function u(){try{await s.loginWithMicrosoft();const n=l.query.redirect;c.push(n??"/")}catch{}}return(n,e)=>(r(),o("div",v,[t("div",_,[e[2]||(e[2]=m('

CC Dashboard

Corporate Planning Hub

',1)),a(y,null,{default:d(()=>[a(b,{class:"pt-6"},{default:d(()=>[t("div",k,[i(s).error?(r(),o("div",C,x(i(s).error),1)):w("",!0),t("button",{type:"button",disabled:i(s).loading,class:"w-full flex items-center justify-center gap-3 rounded-md border border-border bg-white px-4 py-2.5 text-sm font-medium text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",onClick:u},[e[0]||(e[0]=t("svg",{class:"h-5 w-5 shrink-0",viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("rect",{x:"1",y:"1",width:"9",height:"9",fill:"#F25022"}),t("rect",{x:"11",y:"1",width:"9",height:"9",fill:"#7FBA00"}),t("rect",{x:"1",y:"11",width:"9",height:"9",fill:"#00A4EF"}),t("rect",{x:"11",y:"11",width:"9",height:"9",fill:"#FFB900"})],-1)),i(s).loading?(r(),o("span",V,"Signing in…")):(r(),o("span",S,"Sign in with Microsoft"))],8,B),e[1]||(e[1]=t("p",{class:"text-center text-xs text-muted-foreground"}," Use your @oliver.agency account ",-1))])]),_:1})]),_:1})])]))}});export{M as default}; diff --git a/src/static/assets/Progress.vue_vue_type_script_setup_true_lang-sI-MERcU.js b/src/static/assets/Progress.vue_vue_type_script_setup_true_lang-vRzAaLns.js similarity index 90% rename from src/static/assets/Progress.vue_vue_type_script_setup_true_lang-sI-MERcU.js rename to src/static/assets/Progress.vue_vue_type_script_setup_true_lang-vRzAaLns.js index 4017bcf..f133ab1 100644 --- a/src/static/assets/Progress.vue_vue_type_script_setup_true_lang-sI-MERcU.js +++ b/src/static/assets/Progress.vue_vue_type_script_setup_true_lang-vRzAaLns.js @@ -1 +1 @@ -import{c as r}from"./utils-7WVCegLb.js";import{d as s,o as n,c as t,n as l,h as c,a as d,B as u}from"./index-BP_aNEdP.js";const h=s({__name:"Progress",props:{value:{},max:{default:100},class:{},color:{default:"default"}},setup(a){const e=a,o=()=>Math.min(100,Math.max(0,e.value/e.max*100));return(i,m)=>(n(),t("div",{class:l(c(r)("relative h-2 w-full overflow-hidden rounded-full bg-secondary",e.class))},[d("div",{class:l(["h-full rounded-full transition-all duration-300",{"bg-primary":a.color==="default","bg-emerald-500":a.color==="success","bg-amber-500":a.color==="warning","bg-red-500":a.color==="danger"}]),style:u({width:`${o()}%`})},null,6)],2))}});export{h as _}; +import{c as r}from"./utils-7WVCegLb.js";import{d as s,o as n,c as t,n as l,h as c,a as d,B as u}from"./index-DVV3ZbZ2.js";const h=s({__name:"Progress",props:{value:{},max:{default:100},class:{},color:{default:"default"}},setup(a){const e=a,o=()=>Math.min(100,Math.max(0,e.value/e.max*100));return(i,m)=>(n(),t("div",{class:l(c(r)("relative h-2 w-full overflow-hidden rounded-full bg-secondary",e.class))},[d("div",{class:l(["h-full rounded-full transition-all duration-300",{"bg-primary":a.color==="default","bg-emerald-500":a.color==="success","bg-amber-500":a.color==="warning","bg-red-500":a.color==="danger"}]),style:u({width:`${o()}%`})},null,6)],2))}});export{h as _}; diff --git a/src/static/assets/ProjectDetailView-9CL5OHue.js b/src/static/assets/ProjectDetailView-CdSz2pYH.js similarity index 96% rename from src/static/assets/ProjectDetailView-9CL5OHue.js rename to src/static/assets/ProjectDetailView-CdSz2pYH.js index 51fffd2..68288fd 100644 --- a/src/static/assets/ProjectDetailView-9CL5OHue.js +++ b/src/static/assets/ProjectDetailView-CdSz2pYH.js @@ -1 +1 @@ -import{d as T,u as F,y as M,c as o,e as r,F as f,a as e,t as i,h as d,i as _,w as n,k as P,g as R,f as q,s as $,o as s,q as p,r as h,B as C,n as z,j as E}from"./index-BP_aNEdP.js";import{d as G}from"./dashboard-CviKGUv7.js";import{_ as v,a as y}from"./CardContent.vue_vue_type_script_setup_true_lang-B8VjSxLa.js";import{_ as g,a as k}from"./CardTitle.vue_vue_type_script_setup_true_lang-KH4UhlTi.js";import{_ as H}from"./Spinner.vue_vue_type_script_setup_true_lang-Cu49-Cc4.js";import{f as b,b as A}from"./utils-7WVCegLb.js";const I={class:"p-6"},O={key:0,class:"flex items-center justify-center h-40"},U={class:"mb-6"},J={class:"flex items-start justify-between gap-4 flex-wrap"},K={class:"flex items-center gap-3 mb-1 flex-wrap"},Q={class:"text-xl font-bold text-foreground"},W={key:0,class:"text-sm text-primary font-medium"},X={class:"flex items-center gap-3 mt-1 flex-wrap"},Y={key:0,class:"text-sm text-muted-foreground"},Z={key:1,class:"text-xs bg-muted text-muted-foreground px-2 py-1 rounded"},tt=["href"],et={class:"text-right"},st={class:"text-2xl font-bold text-foreground"},ot={class:"h-32 flex items-end gap-px"},at=["title"],lt={class:"grid grid-cols-1 lg:grid-cols-2 gap-6 mb-6"},rt={key:0,class:"text-sm text-muted-foreground"},nt={key:1,class:"space-y-1.5"},it=["title"],dt={class:"text-foreground shrink-0 ml-2"},ut={key:0,class:"text-sm text-muted-foreground"},ct={key:1,class:"space-y-2"},mt={class:"text-xs text-foreground w-24 truncate shrink-0"},_t={class:"flex-1 h-2 bg-secondary rounded-full overflow-hidden"},ft={class:"text-xs text-muted-foreground w-8 text-right shrink-0"},xt={class:"space-y-1"},pt=["onClick"],ht={class:"text-xs text-muted-foreground w-24 shrink-0"},vt={class:"flex-1 h-1.5 bg-secondary rounded-full overflow-hidden"},yt={class:"text-xs text-foreground w-16 text-right shrink-0 tabular-nums"},gt={class:"text-xs text-muted-foreground w-12 text-right shrink-0"},kt={key:0,class:"text-sm text-muted-foreground"},bt={key:1,class:"space-y-2"},wt={class:"flex-1 min-w-0"},jt={class:"text-xs font-medium text-foreground"},$t={class:"text-xs text-muted-foreground mt-0.5"},Ct={class:"flex items-start gap-2 shrink-0"},zt={class:"text-right"},Bt={class:"text-xs font-medium text-foreground"},St={class:"text-xs text-muted-foreground"},Dt=["onClick"],Nt={key:0,class:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},At={key:1,class:"h-3.5 w-3.5 animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},Vt={key:2,class:"text-center text-muted-foreground py-12"},Et=T({__name:"ProjectDetailView",setup(Lt){const B=R(),S=q(),w=B.params.id,u=B.params.date,V=F(),a=$(null),j=$(!1),x=$(null);M(async()=>{j.value=!0;try{const c=u?{from:u,to:u}:void 0,l=await G.project(w,c);a.value=l.data}finally{j.value=!1}});const D=E(()=>{var c;return Math.max(...((c=a.value)==null?void 0:c.daily.map(l=>l.hours))??[1],1)});async function L(c){if(!x.value){x.value=c;try{const l=await fetch(`/cc-dashboard/api/dashboard/sessions/${c}/summarize`,{method:"POST",headers:{Authorization:`Bearer ${V.token}`}});if(l.ok){const t=await l.json();if(a.value){const m=a.value.sessions.findIndex(N=>N.id===c);m!==-1&&(a.value.sessions[m]={...a.value.sessions[m],ai_title:t.title,ai_result:t.result})}}}catch{}finally{x.value=null}}}return(c,l)=>(s(),o("div",I,[j.value?(s(),o("div",O,[r(H,{size:"lg",class:"text-primary"})])):a.value?(s(),o(f,{key:1},[e("div",U,[e("div",J,[e("div",null,[e("div",K,[e("h2",Q,i(a.value.project.display_name),1),d(u)?(s(),o("span",W,i(d(u)),1)):_("",!0),d(u)?(s(),o("button",{key:1,class:"text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:l[0]||(l[0]=t=>d(S).push({name:"project-detail",params:{id:d(w)}}))}," ← All time ")):_("",!0)]),e("div",X,[a.value.project.client?(s(),o("span",Y,i(a.value.project.client),1)):_("",!0),a.value.project.job_number?(s(),o("span",Z,i(a.value.project.job_number),1)):_("",!0),a.value.project.repo_url?(s(),o("a",{key:2,href:a.value.project.repo_url,target:"_blank",class:"text-xs text-primary hover:underline"}," Repository → ",8,tt)):_("",!0)])]),e("div",et,[e("p",st,i(d(b)(a.value.daily.reduce((t,m)=>t+m.hours,0))),1),l[1]||(l[1]=e("p",{class:"text-xs text-muted-foreground"},"total hours",-1))])])]),r(v,{class:"mb-6"},{default:n(()=>[r(g,{class:"pb-2"},{default:n(()=>[r(k,{class:"text-sm"},{default:n(()=>[...l[2]||(l[2]=[p("Daily Activity",-1)])]),_:1})]),_:1}),r(y,null,{default:n(()=>[e("div",ot,[(s(!0),o(f,null,h(a.value.daily,t=>(s(),o("div",{key:t.date,class:"flex-1 bg-primary/70 hover:bg-primary rounded-t transition-colors",style:C({height:`${t.hours/D.value*100}%`}),title:`${t.date}: ${d(b)(t.hours)}`},null,12,at))),128))])]),_:1})]),_:1}),e("div",lt,[r(v,null,{default:n(()=>[r(g,{class:"pb-2"},{default:n(()=>[r(k,{class:"text-sm"},{default:n(()=>[...l[3]||(l[3]=[p("Top Files",-1)])]),_:1})]),_:1}),r(y,null,{default:n(()=>[a.value.top_files.length?(s(),o("div",nt,[(s(!0),o(f,null,h(a.value.top_files.slice(0,10),t=>(s(),o("div",{key:t.file,class:"flex items-center justify-between text-xs"},[e("span",{class:"text-muted-foreground truncate max-w-[200px]",title:t.file},i(t.file.split("/").pop()),9,it),e("span",dt,i(t.count)+"×",1)]))),128))])):(s(),o("div",rt,"No data"))]),_:1})]),_:1}),r(v,null,{default:n(()=>[r(g,{class:"pb-2"},{default:n(()=>[r(k,{class:"text-sm"},{default:n(()=>[...l[4]||(l[4]=[p("Tool Usage",-1)])]),_:1})]),_:1}),r(y,null,{default:n(()=>[a.value.top_tools.length?(s(),o("div",ct,[(s(!0),o(f,null,h(a.value.top_tools.slice(0,8),t=>(s(),o("div",{key:t.tool,class:"flex items-center gap-2"},[e("span",mt,i(t.tool),1),e("div",_t,[e("div",{class:"h-full bg-primary rounded-full",style:C({width:`${t.pct}%`})},null,4)]),e("span",ft,i((t.pct??0).toFixed(0))+"% ",1)]))),128))])):(s(),o("div",ut,"No data"))]),_:1})]),_:1})]),!d(u)&&a.value.daily.length>0?(s(),P(v,{key:0,class:"mb-6"},{default:n(()=>[r(g,{class:"pb-2"},{default:n(()=>[r(k,{class:"text-sm"},{default:n(()=>[...l[5]||(l[5]=[p("Daily Breakdown",-1)])]),_:1})]),_:1}),r(y,null,{default:n(()=>[e("div",xt,[(s(!0),o(f,null,h([...a.value.daily].reverse(),t=>(s(),o("div",{key:t.date,class:"flex items-center gap-3 px-2 py-2 rounded-lg hover:bg-muted/30 transition-colors cursor-pointer",onClick:m=>d(S).push({name:"project-detail",params:{id:d(w),date:t.date}})},[e("span",ht,i(t.date),1),e("div",vt,[e("div",{class:"h-full bg-primary/70 rounded-full",style:C({width:`${t.hours/D.value*100}%`})},null,4)]),e("span",yt,i(d(b)(t.hours)),1),e("span",gt,i(t.sessions)+" sess.",1)],8,pt))),128))])]),_:1})]),_:1})):_("",!0),r(v,null,{default:n(()=>[r(g,{class:"pb-2"},{default:n(()=>[r(k,{class:"text-sm"},{default:n(()=>[p(i(d(u)?`Sessions — ${d(u)}`:"Recent Sessions"),1)]),_:1})]),_:1}),r(y,null,{default:n(()=>[a.value.sessions.length?(s(),o("div",bt,[(s(!0),o(f,null,h(a.value.sessions,t=>{var m;return s(),o("div",{key:t.id,class:"flex items-start gap-3 py-2 border-b border-border last:border-0"},[e("div",wt,[e("p",jt,i(t.ai_title||((m=t.work_summary)==null?void 0:m.substring(0,80))||d(A)(t.start_at)),1),e("p",$t,i(d(A)(t.start_at)),1),t.ai_result?(s(),o("p",{key:0,class:z(["text-xs text-muted-foreground mt-0.5",d(u)?"":"line-clamp-2"])},i(t.ai_result),3)):t.work_summary&&t.ai_title?(s(),o("p",{key:1,class:z(["text-xs text-muted-foreground mt-0.5",d(u)?"":"line-clamp-2"])},i(t.work_summary),3)):_("",!0)]),e("div",Ct,[e("div",zt,[e("p",Bt,i(d(b)(t.active_hours)),1),e("p",St,i(t.commits.length)+" commits",1)]),e("button",{class:z(["flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:text-primary transition-colors",{"opacity-50 cursor-not-allowed":x.value===t.id}]),title:"Generate AI summary",onClick:N=>L(t.id)},[x.value!==t.id?(s(),o("svg",Nt,[...l[6]||(l[6]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 00-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 003.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 003.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 00-3.09 3.09z"},null,-1)])])):(s(),o("svg",At,[...l[7]||(l[7]=[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"},null,-1)])]))],10,Dt)])])}),128))])):(s(),o("div",kt,"No sessions"))]),_:1})]),_:1})],64)):(s(),o("div",Vt," Project not found "))]))}});export{Et as default}; +import{d as T,u as F,y as M,c as o,e as r,F as f,a as e,t as i,h as d,i as _,w as n,k as P,g as R,f as q,s as $,o as s,q as p,r as h,B as C,n as z,j as E}from"./index-DVV3ZbZ2.js";import{d as G}from"./dashboard-CxPPoZJ0.js";import{_ as v,a as y}from"./CardContent.vue_vue_type_script_setup_true_lang-DdGXaWEa.js";import{_ as g,a as k}from"./CardTitle.vue_vue_type_script_setup_true_lang-CT9DRTds.js";import{_ as H}from"./Spinner.vue_vue_type_script_setup_true_lang-BkmDerVR.js";import{f as b,b as A}from"./utils-7WVCegLb.js";const I={class:"p-6"},O={key:0,class:"flex items-center justify-center h-40"},U={class:"mb-6"},J={class:"flex items-start justify-between gap-4 flex-wrap"},K={class:"flex items-center gap-3 mb-1 flex-wrap"},Q={class:"text-xl font-bold text-foreground"},W={key:0,class:"text-sm text-primary font-medium"},X={class:"flex items-center gap-3 mt-1 flex-wrap"},Y={key:0,class:"text-sm text-muted-foreground"},Z={key:1,class:"text-xs bg-muted text-muted-foreground px-2 py-1 rounded"},tt=["href"],et={class:"text-right"},st={class:"text-2xl font-bold text-foreground"},ot={class:"h-32 flex items-end gap-px"},at=["title"],lt={class:"grid grid-cols-1 lg:grid-cols-2 gap-6 mb-6"},rt={key:0,class:"text-sm text-muted-foreground"},nt={key:1,class:"space-y-1.5"},it=["title"],dt={class:"text-foreground shrink-0 ml-2"},ut={key:0,class:"text-sm text-muted-foreground"},ct={key:1,class:"space-y-2"},mt={class:"text-xs text-foreground w-24 truncate shrink-0"},_t={class:"flex-1 h-2 bg-secondary rounded-full overflow-hidden"},ft={class:"text-xs text-muted-foreground w-8 text-right shrink-0"},xt={class:"space-y-1"},pt=["onClick"],ht={class:"text-xs text-muted-foreground w-24 shrink-0"},vt={class:"flex-1 h-1.5 bg-secondary rounded-full overflow-hidden"},yt={class:"text-xs text-foreground w-16 text-right shrink-0 tabular-nums"},gt={class:"text-xs text-muted-foreground w-12 text-right shrink-0"},kt={key:0,class:"text-sm text-muted-foreground"},bt={key:1,class:"space-y-2"},wt={class:"flex-1 min-w-0"},jt={class:"text-xs font-medium text-foreground"},$t={class:"text-xs text-muted-foreground mt-0.5"},Ct={class:"flex items-start gap-2 shrink-0"},zt={class:"text-right"},Bt={class:"text-xs font-medium text-foreground"},St={class:"text-xs text-muted-foreground"},Dt=["onClick"],Nt={key:0,class:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},At={key:1,class:"h-3.5 w-3.5 animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},Vt={key:2,class:"text-center text-muted-foreground py-12"},Et=T({__name:"ProjectDetailView",setup(Lt){const B=R(),S=q(),w=B.params.id,u=B.params.date,V=F(),a=$(null),j=$(!1),x=$(null);M(async()=>{j.value=!0;try{const c=u?{from:u,to:u}:void 0,l=await G.project(w,c);a.value=l.data}finally{j.value=!1}});const D=E(()=>{var c;return Math.max(...((c=a.value)==null?void 0:c.daily.map(l=>l.hours))??[1],1)});async function L(c){if(!x.value){x.value=c;try{const l=await fetch(`/cc-dashboard/api/dashboard/sessions/${c}/summarize`,{method:"POST",headers:{Authorization:`Bearer ${V.token}`}});if(l.ok){const t=await l.json();if(a.value){const m=a.value.sessions.findIndex(N=>N.id===c);m!==-1&&(a.value.sessions[m]={...a.value.sessions[m],ai_title:t.title,ai_result:t.result})}}}catch{}finally{x.value=null}}}return(c,l)=>(s(),o("div",I,[j.value?(s(),o("div",O,[r(H,{size:"lg",class:"text-primary"})])):a.value?(s(),o(f,{key:1},[e("div",U,[e("div",J,[e("div",null,[e("div",K,[e("h2",Q,i(a.value.project.display_name),1),d(u)?(s(),o("span",W,i(d(u)),1)):_("",!0),d(u)?(s(),o("button",{key:1,class:"text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:l[0]||(l[0]=t=>d(S).push({name:"project-detail",params:{id:d(w)}}))}," ← All time ")):_("",!0)]),e("div",X,[a.value.project.client?(s(),o("span",Y,i(a.value.project.client),1)):_("",!0),a.value.project.job_number?(s(),o("span",Z,i(a.value.project.job_number),1)):_("",!0),a.value.project.repo_url?(s(),o("a",{key:2,href:a.value.project.repo_url,target:"_blank",class:"text-xs text-primary hover:underline"}," Repository → ",8,tt)):_("",!0)])]),e("div",et,[e("p",st,i(d(b)(a.value.daily.reduce((t,m)=>t+m.hours,0))),1),l[1]||(l[1]=e("p",{class:"text-xs text-muted-foreground"},"total hours",-1))])])]),r(v,{class:"mb-6"},{default:n(()=>[r(g,{class:"pb-2"},{default:n(()=>[r(k,{class:"text-sm"},{default:n(()=>[...l[2]||(l[2]=[p("Daily Activity",-1)])]),_:1})]),_:1}),r(y,null,{default:n(()=>[e("div",ot,[(s(!0),o(f,null,h(a.value.daily,t=>(s(),o("div",{key:t.date,class:"flex-1 bg-primary/70 hover:bg-primary rounded-t transition-colors",style:C({height:`${t.hours/D.value*100}%`}),title:`${t.date}: ${d(b)(t.hours)}`},null,12,at))),128))])]),_:1})]),_:1}),e("div",lt,[r(v,null,{default:n(()=>[r(g,{class:"pb-2"},{default:n(()=>[r(k,{class:"text-sm"},{default:n(()=>[...l[3]||(l[3]=[p("Top Files",-1)])]),_:1})]),_:1}),r(y,null,{default:n(()=>[a.value.top_files.length?(s(),o("div",nt,[(s(!0),o(f,null,h(a.value.top_files.slice(0,10),t=>(s(),o("div",{key:t.file,class:"flex items-center justify-between text-xs"},[e("span",{class:"text-muted-foreground truncate max-w-[200px]",title:t.file},i(t.file.split("/").pop()),9,it),e("span",dt,i(t.count)+"×",1)]))),128))])):(s(),o("div",rt,"No data"))]),_:1})]),_:1}),r(v,null,{default:n(()=>[r(g,{class:"pb-2"},{default:n(()=>[r(k,{class:"text-sm"},{default:n(()=>[...l[4]||(l[4]=[p("Tool Usage",-1)])]),_:1})]),_:1}),r(y,null,{default:n(()=>[a.value.top_tools.length?(s(),o("div",ct,[(s(!0),o(f,null,h(a.value.top_tools.slice(0,8),t=>(s(),o("div",{key:t.tool,class:"flex items-center gap-2"},[e("span",mt,i(t.tool),1),e("div",_t,[e("div",{class:"h-full bg-primary rounded-full",style:C({width:`${t.pct}%`})},null,4)]),e("span",ft,i((t.pct??0).toFixed(0))+"% ",1)]))),128))])):(s(),o("div",ut,"No data"))]),_:1})]),_:1})]),!d(u)&&a.value.daily.length>0?(s(),P(v,{key:0,class:"mb-6"},{default:n(()=>[r(g,{class:"pb-2"},{default:n(()=>[r(k,{class:"text-sm"},{default:n(()=>[...l[5]||(l[5]=[p("Daily Breakdown",-1)])]),_:1})]),_:1}),r(y,null,{default:n(()=>[e("div",xt,[(s(!0),o(f,null,h([...a.value.daily].reverse(),t=>(s(),o("div",{key:t.date,class:"flex items-center gap-3 px-2 py-2 rounded-lg hover:bg-muted/30 transition-colors cursor-pointer",onClick:m=>d(S).push({name:"project-detail",params:{id:d(w),date:t.date}})},[e("span",ht,i(t.date),1),e("div",vt,[e("div",{class:"h-full bg-primary/70 rounded-full",style:C({width:`${t.hours/D.value*100}%`})},null,4)]),e("span",yt,i(d(b)(t.hours)),1),e("span",gt,i(t.sessions)+" sess.",1)],8,pt))),128))])]),_:1})]),_:1})):_("",!0),r(v,null,{default:n(()=>[r(g,{class:"pb-2"},{default:n(()=>[r(k,{class:"text-sm"},{default:n(()=>[p(i(d(u)?`Sessions — ${d(u)}`:"Recent Sessions"),1)]),_:1})]),_:1}),r(y,null,{default:n(()=>[a.value.sessions.length?(s(),o("div",bt,[(s(!0),o(f,null,h(a.value.sessions,t=>{var m;return s(),o("div",{key:t.id,class:"flex items-start gap-3 py-2 border-b border-border last:border-0"},[e("div",wt,[e("p",jt,i(t.ai_title||((m=t.work_summary)==null?void 0:m.substring(0,80))||d(A)(t.start_at)),1),e("p",$t,i(d(A)(t.start_at)),1),t.ai_result?(s(),o("p",{key:0,class:z(["text-xs text-muted-foreground mt-0.5",d(u)?"":"line-clamp-2"])},i(t.ai_result),3)):t.work_summary&&t.ai_title?(s(),o("p",{key:1,class:z(["text-xs text-muted-foreground mt-0.5",d(u)?"":"line-clamp-2"])},i(t.work_summary),3)):_("",!0)]),e("div",Ct,[e("div",zt,[e("p",Bt,i(d(b)(t.active_hours)),1),e("p",St,i(t.commits.length)+" commits",1)]),e("button",{class:z(["flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:text-primary transition-colors",{"opacity-50 cursor-not-allowed":x.value===t.id}]),title:"Generate AI summary",onClick:N=>L(t.id)},[x.value!==t.id?(s(),o("svg",Nt,[...l[6]||(l[6]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 00-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 003.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 003.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 00-3.09 3.09z"},null,-1)])])):(s(),o("svg",At,[...l[7]||(l[7]=[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"},null,-1)])]))],10,Dt)])])}),128))])):(s(),o("div",kt,"No sessions"))]),_:1})]),_:1})],64)):(s(),o("div",Vt," Project not found "))]))}});export{Et as default}; diff --git a/src/static/assets/ProjectsView-DEY2YtRe.js b/src/static/assets/ProjectsView-B6APDx1k.js similarity index 95% rename from src/static/assets/ProjectsView-DEY2YtRe.js rename to src/static/assets/ProjectsView-B6APDx1k.js index 0296860..ecea4f0 100644 --- a/src/static/assets/ProjectsView-DEY2YtRe.js +++ b/src/static/assets/ProjectsView-B6APDx1k.js @@ -1 +1 @@ -import{d as M,y as $,c as r,a as e,n as c,e as m,F as p,r as v,b as V,s as g,o,k as B,w as h,t as n,i as d,h as i,f as z}from"./index-BP_aNEdP.js";import{d as S}from"./dashboard-CviKGUv7.js";import{a as N,_ as F}from"./CardContent.vue_vue_type_script_setup_true_lang-B8VjSxLa.js";import{_ as L}from"./Progress.vue_vue_type_script_setup_true_lang-sI-MERcU.js";import{_ as D}from"./Spinner.vue_vue_type_script_setup_true_lang-Cu49-Cc4.js";import{f as b,a as y}from"./utils-7WVCegLb.js";const H={class:"p-6"},P={class:"flex items-center gap-3 mb-6"},A={class:"flex items-center rounded-lg border border-border overflow-hidden bg-muted/30"},I={key:0,class:"flex items-center justify-center h-40"},E={key:1,class:"text-center text-muted-foreground py-12"},G={key:2,class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4"},R={class:"flex items-start justify-between gap-2 mb-3"},T={class:"min-w-0"},q={class:"font-semibold text-sm text-foreground truncate"},J={key:0,class:"text-xs text-muted-foreground truncate"},K={key:0,class:"text-xs bg-muted text-muted-foreground px-1.5 py-0.5 rounded shrink-0"},O={class:"space-y-1.5"},Q={class:"flex items-center justify-between text-xs"},U={class:"font-medium text-foreground"},W={class:"flex items-center justify-between text-xs"},X={class:"text-foreground"},Y={key:0,class:"flex items-center justify-between text-xs"},Z={class:"text-foreground"},j={key:0,class:"mt-3"},tt={class:"flex items-center justify-between text-xs mb-1"},et={key:3,class:"border border-border rounded-lg overflow-hidden"},st=["onClick"],ot={class:"min-w-0"},rt={class:"text-sm font-medium text-foreground truncate"},nt={key:0,class:"text-xs text-muted-foreground truncate"},at={class:"text-sm text-foreground tabular-nums text-right w-20"},it={class:"text-sm text-muted-foreground tabular-nums text-right w-16"},dt={class:"text-xs text-muted-foreground text-right w-24"},lt={class:"w-20 flex items-center justify-end gap-1.5"},ut={key:1,class:"text-xs text-muted-foreground"},vt=M({__name:"ProjectsView",setup(ct){const x=z(),l=g([]),_=g(!1),w=localStorage.getItem("projects.view"),u=g(w==="list"?"list":"grid");function f(a){u.value=a,localStorage.setItem("projects.view",a)}$(async()=>{_.value=!0;try{const a=await S.projects({});l.value=a.data.sort((s,t)=>t.total_hours-s.total_hours)}finally{_.value=!1}});const k=a=>a?a>90?"danger":a>70?"warning":"success":"default";return(a,s)=>(o(),r("div",H,[e("div",P,[s[4]||(s[4]=e("h2",{class:"text-lg font-semibold text-foreground flex-1"},"Projects",-1)),e("div",A,[e("button",{class:c(["px-2.5 py-1.5 transition-colors",u.value==="grid"?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted/50"]),title:"Grid view",onClick:s[0]||(s[0]=t=>f("grid"))},[...s[2]||(s[2]=[e("svg",{class:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"})],-1)])],2),e("button",{class:c(["px-2.5 py-1.5 transition-colors",u.value==="list"?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted/50"]),title:"List view",onClick:s[1]||(s[1]=t=>f("list"))},[...s[3]||(s[3]=[e("svg",{class:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 6h16M4 10h16M4 14h16M4 18h16"})],-1)])],2)])]),_.value?(o(),r("div",I,[m(D,{size:"lg",class:"text-primary"})])):l.value.length===0?(o(),r("div",E," No projects found ")):u.value==="grid"?(o(),r("div",G,[(o(!0),r(p,null,v(l.value,t=>(o(),B(F,{key:t.project_id,class:"cursor-pointer hover:border-primary/50 transition-colors",onClick:C=>i(x).push(`/projects/${t.project_id}`)},{default:h(()=>[m(N,{class:"p-4"},{default:h(()=>[e("div",R,[e("div",T,[e("p",q,n(t.display_name),1),t.client?(o(),r("p",J,n(t.client),1)):d("",!0)]),t.job_number?(o(),r("span",K,n(t.job_number),1)):d("",!0)]),e("div",O,[e("div",Q,[s[5]||(s[5]=e("span",{class:"text-muted-foreground"},"Total hours",-1)),e("span",U,n(i(b)(t.total_hours)),1)]),e("div",W,[s[6]||(s[6]=e("span",{class:"text-muted-foreground"},"Sessions",-1)),e("span",X,n(t.session_count),1)]),t.last_active?(o(),r("div",Y,[s[7]||(s[7]=e("span",{class:"text-muted-foreground"},"Last active",-1)),e("span",Z,n(i(y)(t.last_active)),1)])):d("",!0)]),t.progress_pct!==null?(o(),r("div",j,[e("div",tt,[s[8]||(s[8]=e("span",{class:"text-muted-foreground"},"Budget",-1)),e("span",{class:c(t.progress_pct>90?"text-red-400":"text-muted-foreground")},n((t.progress_pct??0).toFixed(0))+"% ",3)]),m(L,{value:t.progress_pct,color:k(t.progress_pct)},null,8,["value","color"])])):d("",!0)]),_:2},1024)]),_:2},1032,["onClick"]))),128))])):(o(),r("div",et,[s[9]||(s[9]=V('
ProjectHoursSessionsLast ActiveBudget
',1)),(o(!0),r(p,null,v(l.value,t=>(o(),r("div",{key:t.project_id,class:"grid grid-cols-[1fr_auto_auto_auto_auto] gap-4 px-4 py-3 border-b border-border last:border-0 cursor-pointer hover:bg-muted/20 transition-colors items-center",onClick:C=>i(x).push(`/projects/${t.project_id}`)},[e("div",ot,[e("p",rt,n(t.display_name),1),t.client?(o(),r("p",nt,n(t.client),1)):d("",!0)]),e("span",at,n(i(b)(t.total_hours)),1),e("span",it,n(t.session_count),1),e("span",dt,n(t.last_active?i(y)(t.last_active):"—"),1),e("div",lt,[t.progress_pct!==null?(o(),r("span",{key:0,class:c(["text-xs tabular-nums",t.progress_pct>90?"text-red-400":"text-muted-foreground"])},n((t.progress_pct??0).toFixed(0))+"% ",3)):(o(),r("span",ut,"—"))])],8,st))),128))]))]))}});export{vt as default}; +import{d as M,y as $,c as r,a as e,n as c,e as m,F as p,r as v,b as V,s as g,o,k as B,w as h,t as n,i as d,h as i,f as z}from"./index-DVV3ZbZ2.js";import{d as S}from"./dashboard-CxPPoZJ0.js";import{a as N,_ as F}from"./CardContent.vue_vue_type_script_setup_true_lang-DdGXaWEa.js";import{_ as L}from"./Progress.vue_vue_type_script_setup_true_lang-vRzAaLns.js";import{_ as D}from"./Spinner.vue_vue_type_script_setup_true_lang-BkmDerVR.js";import{f as b,a as y}from"./utils-7WVCegLb.js";const H={class:"p-6"},P={class:"flex items-center gap-3 mb-6"},A={class:"flex items-center rounded-lg border border-border overflow-hidden bg-muted/30"},I={key:0,class:"flex items-center justify-center h-40"},E={key:1,class:"text-center text-muted-foreground py-12"},G={key:2,class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4"},R={class:"flex items-start justify-between gap-2 mb-3"},T={class:"min-w-0"},q={class:"font-semibold text-sm text-foreground truncate"},J={key:0,class:"text-xs text-muted-foreground truncate"},K={key:0,class:"text-xs bg-muted text-muted-foreground px-1.5 py-0.5 rounded shrink-0"},O={class:"space-y-1.5"},Q={class:"flex items-center justify-between text-xs"},U={class:"font-medium text-foreground"},W={class:"flex items-center justify-between text-xs"},X={class:"text-foreground"},Y={key:0,class:"flex items-center justify-between text-xs"},Z={class:"text-foreground"},j={key:0,class:"mt-3"},tt={class:"flex items-center justify-between text-xs mb-1"},et={key:3,class:"border border-border rounded-lg overflow-hidden"},st=["onClick"],ot={class:"min-w-0"},rt={class:"text-sm font-medium text-foreground truncate"},nt={key:0,class:"text-xs text-muted-foreground truncate"},at={class:"text-sm text-foreground tabular-nums text-right w-20"},it={class:"text-sm text-muted-foreground tabular-nums text-right w-16"},dt={class:"text-xs text-muted-foreground text-right w-24"},lt={class:"w-20 flex items-center justify-end gap-1.5"},ut={key:1,class:"text-xs text-muted-foreground"},vt=M({__name:"ProjectsView",setup(ct){const x=z(),l=g([]),_=g(!1),w=localStorage.getItem("projects.view"),u=g(w==="list"?"list":"grid");function f(a){u.value=a,localStorage.setItem("projects.view",a)}$(async()=>{_.value=!0;try{const a=await S.projects({});l.value=a.data.sort((s,t)=>t.total_hours-s.total_hours)}finally{_.value=!1}});const k=a=>a?a>90?"danger":a>70?"warning":"success":"default";return(a,s)=>(o(),r("div",H,[e("div",P,[s[4]||(s[4]=e("h2",{class:"text-lg font-semibold text-foreground flex-1"},"Projects",-1)),e("div",A,[e("button",{class:c(["px-2.5 py-1.5 transition-colors",u.value==="grid"?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted/50"]),title:"Grid view",onClick:s[0]||(s[0]=t=>f("grid"))},[...s[2]||(s[2]=[e("svg",{class:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"})],-1)])],2),e("button",{class:c(["px-2.5 py-1.5 transition-colors",u.value==="list"?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted/50"]),title:"List view",onClick:s[1]||(s[1]=t=>f("list"))},[...s[3]||(s[3]=[e("svg",{class:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 6h16M4 10h16M4 14h16M4 18h16"})],-1)])],2)])]),_.value?(o(),r("div",I,[m(D,{size:"lg",class:"text-primary"})])):l.value.length===0?(o(),r("div",E," No projects found ")):u.value==="grid"?(o(),r("div",G,[(o(!0),r(p,null,v(l.value,t=>(o(),B(F,{key:t.project_id,class:"cursor-pointer hover:border-primary/50 transition-colors",onClick:C=>i(x).push(`/projects/${t.project_id}`)},{default:h(()=>[m(N,{class:"p-4"},{default:h(()=>[e("div",R,[e("div",T,[e("p",q,n(t.display_name),1),t.client?(o(),r("p",J,n(t.client),1)):d("",!0)]),t.job_number?(o(),r("span",K,n(t.job_number),1)):d("",!0)]),e("div",O,[e("div",Q,[s[5]||(s[5]=e("span",{class:"text-muted-foreground"},"Total hours",-1)),e("span",U,n(i(b)(t.total_hours)),1)]),e("div",W,[s[6]||(s[6]=e("span",{class:"text-muted-foreground"},"Sessions",-1)),e("span",X,n(t.session_count),1)]),t.last_active?(o(),r("div",Y,[s[7]||(s[7]=e("span",{class:"text-muted-foreground"},"Last active",-1)),e("span",Z,n(i(y)(t.last_active)),1)])):d("",!0)]),t.progress_pct!==null?(o(),r("div",j,[e("div",tt,[s[8]||(s[8]=e("span",{class:"text-muted-foreground"},"Budget",-1)),e("span",{class:c(t.progress_pct>90?"text-red-400":"text-muted-foreground")},n((t.progress_pct??0).toFixed(0))+"% ",3)]),m(L,{value:t.progress_pct,color:k(t.progress_pct)},null,8,["value","color"])])):d("",!0)]),_:2},1024)]),_:2},1032,["onClick"]))),128))])):(o(),r("div",et,[s[9]||(s[9]=V('
ProjectHoursSessionsLast ActiveBudget
',1)),(o(!0),r(p,null,v(l.value,t=>(o(),r("div",{key:t.project_id,class:"grid grid-cols-[1fr_auto_auto_auto_auto] gap-4 px-4 py-3 border-b border-border last:border-0 cursor-pointer hover:bg-muted/20 transition-colors items-center",onClick:C=>i(x).push(`/projects/${t.project_id}`)},[e("div",ot,[e("p",rt,n(t.display_name),1),t.client?(o(),r("p",nt,n(t.client),1)):d("",!0)]),e("span",at,n(i(b)(t.total_hours)),1),e("span",it,n(t.session_count),1),e("span",dt,n(t.last_active?i(y)(t.last_active):"—"),1),e("div",lt,[t.progress_pct!==null?(o(),r("span",{key:0,class:c(["text-xs tabular-nums",t.progress_pct>90?"text-red-400":"text-muted-foreground"])},n((t.progress_pct??0).toFixed(0))+"% ",3)):(o(),r("span",ut,"—"))])],8,st))),128))]))]))}});export{vt as default}; diff --git a/src/static/assets/ReportsView-CgmFyw5q.css b/src/static/assets/ReportsView-CgmFyw5q.css new file mode 100644 index 0000000..be7acdc --- /dev/null +++ b/src/static/assets/ReportsView-CgmFyw5q.css @@ -0,0 +1 @@ +[data-v-32c92954] .prose{color:hsl(var(--foreground))}[data-v-32c92954] .prose h1{color:hsl(var(--foreground));font-weight:600;margin-top:1rem;margin-bottom:.5rem}[data-v-32c92954] .prose p{margin-bottom:.75rem;color:hsl(var(--muted-foreground))}[data-v-32c92954] .prose ul{margin-left:1.25rem;color:hsl(var(--muted-foreground))}[data-v-32c92954] .prose li{margin-bottom:.25rem}[data-v-32c92954] .prose code{background:hsl(var(--muted));padding:.125rem .25rem;border-radius:.25rem;font-size:.85em;word-break:break-word;overflow-wrap:anywhere}[data-v-32c92954] .prose pre{white-space:pre-wrap;word-break:break-word;overflow-wrap:anywhere;max-width:100%;overflow-x:auto}[data-v-32c92954] .prose pre code{word-break:break-word;overflow-wrap:anywhere} diff --git a/src/static/assets/ReportsView-ChihzSMD.css b/src/static/assets/ReportsView-ChihzSMD.css deleted file mode 100644 index 52f1927..0000000 --- a/src/static/assets/ReportsView-ChihzSMD.css +++ /dev/null @@ -1 +0,0 @@ -[data-v-5c75fc6a] .prose{color:hsl(var(--foreground))}[data-v-5c75fc6a] .prose h1{color:hsl(var(--foreground));font-weight:600;margin-top:1rem;margin-bottom:.5rem}[data-v-5c75fc6a] .prose p{margin-bottom:.75rem;color:hsl(var(--muted-foreground))}[data-v-5c75fc6a] .prose ul{margin-left:1.25rem;color:hsl(var(--muted-foreground))}[data-v-5c75fc6a] .prose li{margin-bottom:.25rem}[data-v-5c75fc6a] .prose code{background:hsl(var(--muted));padding:.125rem .25rem;border-radius:.25rem;font-size:.85em;word-break:break-word;overflow-wrap:anywhere}[data-v-5c75fc6a] .prose pre{white-space:pre-wrap;word-break:break-word;overflow-wrap:anywhere;max-width:100%;overflow-x:auto}[data-v-5c75fc6a] .prose pre code{word-break:break-word;overflow-wrap:anywhere} diff --git a/src/static/assets/ReportsView-DvsVoXsC.js b/src/static/assets/ReportsView-g7JsvGXC.js similarity index 52% rename from src/static/assets/ReportsView-DvsVoXsC.js rename to src/static/assets/ReportsView-g7JsvGXC.js index 3b51a47..a0d9ea6 100644 --- a/src/static/assets/ReportsView-DvsVoXsC.js +++ b/src/static/assets/ReportsView-g7JsvGXC.js @@ -1,19 +1,19 @@ -var Ce=Object.defineProperty;var ae=a=>{throw TypeError(a)};var Ee=(a,t,e)=>t in a?Ce(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e;var k=(a,t,e)=>Ee(a,typeof t!="symbol"?t+"":t,e),Le=(a,t,e)=>t.has(a)||ae("Cannot "+e);var ce=(a,t,e)=>t.has(a)?ae("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(a):t.set(a,e);var Z=(a,t,e)=>(Le(a,t,"access private method"),e);import{E as V,d as Be,y as qe,c as z,a as x,n as U,e as P,w as I,F as Ze,r as Pe,s as A,o as _,q as G,k as pe,t as W,h as Me,i as he,K as ue}from"./index-BP_aNEdP.js";import{a as De,_ as Qe}from"./CardContent.vue_vue_type_script_setup_true_lang-B8VjSxLa.js";import{_ as fe}from"./Badge.vue_vue_type_script_setup_true_lang-B2H6z2RD.js";import{_ as Ne}from"./Button.vue_vue_type_script_setup_true_lang-B_YE_XNW.js";import{_ as je}from"./Spinner.vue_vue_type_script_setup_true_lang-Cu49-Cc4.js";import{a as Oe,i as He}from"./utils-7WVCegLb.js";import{_ as Fe}from"./_plugin-vue_export-helper-DlAUqK2U.js";const de={list:()=>V.get("/api/reports"),get:a=>V.get(`/api/reports/${a}`),generate:a=>V.post("/api/reports/generate",a)};function J(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let S=J();function we(a){S=a}const ye=/[&<>"']/,Ve=new RegExp(ye.source,"g"),_e=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Ue=new RegExp(_e.source,"g"),Ge={"&":"&","<":"<",">":">",'"':""","'":"'"},ge=a=>Ge[a];function m(a,t){if(t){if(ye.test(a))return a.replace(Ve,ge)}else if(_e.test(a))return a.replace(Ue,ge);return a}const We=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Xe(a){return a.replace(We,(t,e)=>(e=e.toLowerCase(),e==="colon"?":":e.charAt(0)==="#"?e.charAt(1)==="x"?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""))}const Ke=/(^|[^\[])\^/g;function g(a,t){let e=typeof a=="string"?a:a.source;t=t||"";const n={replace:(i,r)=>{let s=typeof r=="string"?r:r.source;return s=s.replace(Ke,"$1"),e=e.replace(i,s),n},getRegex:()=>new RegExp(e,t)};return n}function ke(a){try{a=encodeURI(a).replace(/%25/g,"%")}catch{return null}return a}const E={exec:()=>null};function xe(a,t){const e=a.replace(/\|/g,(r,s,o)=>{let l=!1,u=s;for(;--u>=0&&o[u]==="\\";)l=!l;return l?"|":" |"}),n=e.split(/ \|/);let i=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length{throw TypeError(a)};var Ee=(a,t,e)=>t in a?Ce(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e;var x=(a,t,e)=>Ee(a,typeof t!="symbol"?t+"":t,e),Le=(a,t,e)=>t.has(a)||ce("Cannot "+e);var pe=(a,t,e)=>t.has(a)?ce("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(a):t.set(a,e);var P=(a,t,e)=>(Le(a,t,"access private method"),e);import{E as V,d as Be,u as qe,y as Ze,c as R,a as b,n as G,e as M,w as A,F as Pe,r as Me,s as C,o as T,q as W,k as ue,t as X,h as De,i as he,K as D}from"./index-DVV3ZbZ2.js";import{a as Qe,_ as je}from"./CardContent.vue_vue_type_script_setup_true_lang-DdGXaWEa.js";import{_ as fe}from"./Badge.vue_vue_type_script_setup_true_lang-WigJUOyH.js";import{_ as Oe}from"./Button.vue_vue_type_script_setup_true_lang-ClV4YfXb.js";import{_ as Ne}from"./Spinner.vue_vue_type_script_setup_true_lang-BkmDerVR.js";import{a as He,i as Ue}from"./utils-7WVCegLb.js";import{_ as Fe}from"./_plugin-vue_export-helper-DlAUqK2U.js";const de={list:()=>V.get("/api/reports"),get:a=>V.get(`/api/reports/${a}`),generate:a=>V.post("/api/reports/generate",a)};function Y(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let I=Y();function we(a){I=a}const ye=/[&<>"']/,Ve=new RegExp(ye.source,"g"),$e=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Ge=new RegExp($e.source,"g"),We={"&":"&","<":"<",">":">",'"':""","'":"'"},ge=a=>We[a];function w(a,t){if(t){if(ye.test(a))return a.replace(Ve,ge)}else if($e.test(a))return a.replace(Ge,ge);return a}const Xe=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Ke(a){return a.replace(Xe,(t,e)=>(e=e.toLowerCase(),e==="colon"?":":e.charAt(0)==="#"?e.charAt(1)==="x"?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""))}const Je=/(^|[^\[])\^/g;function g(a,t){let e=typeof a=="string"?a:a.source;t=t||"";const n={replace:(i,r)=>{let s=typeof r=="string"?r:r.source;return s=s.replace(Je,"$1"),e=e.replace(i,s),n},getRegex:()=>new RegExp(e,t)};return n}function ke(a){try{a=encodeURI(a).replace(/%25/g,"%")}catch{return null}return a}const L={exec:()=>null};function xe(a,t){const e=a.replace(/\|/g,(r,s,o)=>{let l=!1,u=s;for(;--u>=0&&o[u]==="\\";)l=!l;return l?"|":" |"}),n=e.split(/ \|/);let i=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length{const r=i.match(/^\s+/);if(r===null)return i;const[s]=r;return s.length>=n.length?i.slice(n.length):i}).join(` -`)}class Q{constructor(t){k(this,"options");k(this,"rules");k(this,"lexer");this.options=t||S}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const n=e[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:M(n,` -`)}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const n=e[0],i=Ye(n,e[3]||"");return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:i}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(/#$/.test(n)){const i=M(n,"#");(this.options.pedantic||!i||/ $/.test(i))&&(n=i.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:e[0]}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){let n=e[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,` - $1`);n=M(n.replace(/^ *>[ \t]?/gm,""),` -`);const i=this.lexer.state.top;this.lexer.state.top=!0;const r=this.lexer.blockTokens(n);return this.lexer.state.top=i,{type:"blockquote",raw:e[0],tokens:r,text:n}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim();const i=n.length>1,r={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");const s=new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`);let o="",l="",u=!1;for(;t;){let c=!1;if(!(e=s.exec(t))||this.rules.block.hr.test(t))break;o=e[0],t=t.substring(o.length);let h=e[2].split(` -`,1)[0].replace(/^\t+/,H=>" ".repeat(3*H.length)),p=t.split(` -`,1)[0],f=0;this.options.pedantic?(f=2,l=h.trimStart()):(f=e[2].search(/[^ ]/),f=f>4?1:f,l=h.slice(f),f+=e[1].length);let $=!1;if(!h&&/^ *$/.test(p)&&(o+=p+` -`,t=t.substring(p.length+1),c=!0),!c){const H=new RegExp(`^ {0,${Math.min(3,f-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),re=new RegExp(`^ {0,${Math.min(3,f-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),oe=new RegExp(`^ {0,${Math.min(3,f-1)}}(?:\`\`\`|~~~)`),le=new RegExp(`^ {0,${Math.min(3,f-1)}}#`);for(;t;){const F=t.split(` -`,1)[0];if(p=F,this.options.pedantic&&(p=p.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),oe.test(p)||le.test(p)||H.test(p)||re.test(t))break;if(p.search(/[^ ]/)>=f||!p.trim())l+=` -`+p.slice(f);else{if($||h.search(/[^ ]/)>=4||oe.test(h)||le.test(h)||re.test(h))break;l+=` -`+p}!$&&!p.trim()&&($=!0),o+=F+` -`,t=t.substring(F.length+1),h=p.slice(f)}}r.loose||(u?r.loose=!0:/\n *\n *$/.test(o)&&(u=!0));let b=null,T;this.options.gfm&&(b=/^\[[ xX]\] /.exec(l),b&&(T=b[0]!=="[ ] ",l=l.replace(/^\[[ xX]\] +/,""))),r.items.push({type:"list_item",raw:o,task:!!b,checked:T,loose:!1,text:l,tokens:[]}),r.raw+=o}r.items[r.items.length-1].raw=o.trimEnd(),r.items[r.items.length-1].text=l.trimEnd(),r.raw=r.raw.trimEnd();for(let c=0;cf.type==="space"),p=h.length>0&&h.some(f=>/\n.*\n/.test(f.raw));r.loose=p}if(r.loose)for(let c=0;c$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:e[0],href:i,title:r}}}table(t){const e=this.rules.block.table.exec(t);if(!e||!/[:|]/.test(e[2]))return;const n=xe(e[1]),i=e[2].replace(/^\||\| *$/g,"").split("|"),r=e[3]&&e[3].trim()?e[3].replace(/\n[ \t]*$/,"").split(` +`)}class O{constructor(t){x(this,"options");x(this,"rules");x(this,"lexer");this.options=t||I}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const n=e[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Q(n,` +`)}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const n=e[0],i=et(n,e[3]||"");return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:i}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(/#$/.test(n)){const i=Q(n,"#");(this.options.pedantic||!i||/ $/.test(i))&&(n=i.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:e[0]}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){let n=e[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,` + $1`);n=Q(n.replace(/^ *>[ \t]?/gm,""),` +`);const i=this.lexer.state.top;this.lexer.state.top=!0;const r=this.lexer.blockTokens(n);return this.lexer.state.top=i,{type:"blockquote",raw:e[0],tokens:r,text:n}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim();const i=n.length>1,r={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");const s=new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`);let o="",l="",u=!1;for(;t;){let c=!1;if(!(e=s.exec(t))||this.rules.block.hr.test(t))break;o=e[0],t=t.substring(o.length);let f=e[2].split(` +`,1)[0].replace(/^\t+/,z=>" ".repeat(3*z.length)),p=t.split(` +`,1)[0],h=0;this.options.pedantic?(h=2,l=f.trimStart()):(h=e[2].search(/[^ ]/),h=h>4?1:h,l=f.slice(h),h+=e[1].length);let k=!1;if(!f&&/^ *$/.test(p)&&(o+=p+` +`,t=t.substring(p.length+1),c=!0),!c){const z=new RegExp(`^ {0,${Math.min(3,h-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),oe=new RegExp(`^ {0,${Math.min(3,h-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),le=new RegExp(`^ {0,${Math.min(3,h-1)}}(?:\`\`\`|~~~)`),ae=new RegExp(`^ {0,${Math.min(3,h-1)}}#`);for(;t;){const F=t.split(` +`,1)[0];if(p=F,this.options.pedantic&&(p=p.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),le.test(p)||ae.test(p)||z.test(p)||oe.test(t))break;if(p.search(/[^ ]/)>=h||!p.trim())l+=` +`+p.slice(h);else{if(k||f.search(/[^ ]/)>=4||le.test(f)||ae.test(f)||oe.test(f))break;l+=` +`+p}!k&&!p.trim()&&(k=!0),o+=F+` +`,t=t.substring(F.length+1),f=p.slice(h)}}r.loose||(u?r.loose=!0:/\n *\n *$/.test(o)&&(u=!0));let m=null,y;this.options.gfm&&(m=/^\[[ xX]\] /.exec(l),m&&(y=m[0]!=="[ ] ",l=l.replace(/^\[[ xX]\] +/,""))),r.items.push({type:"list_item",raw:o,task:!!m,checked:y,loose:!1,text:l,tokens:[]}),r.raw+=o}r.items[r.items.length-1].raw=o.trimEnd(),r.items[r.items.length-1].text=l.trimEnd(),r.raw=r.raw.trimEnd();for(let c=0;ch.type==="space"),p=f.length>0&&f.some(h=>/\n.*\n/.test(h.raw));r.loose=p}if(r.loose)for(let c=0;c$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:e[0],href:i,title:r}}}table(t){const e=this.rules.block.table.exec(t);if(!e||!/[:|]/.test(e[2]))return;const n=xe(e[1]),i=e[2].replace(/^\||\| *$/g,"").split("|"),r=e[3]&&e[3].trim()?e[3].replace(/\n[ \t]*$/,"").split(` `):[],s={type:"table",raw:e[0],header:[],align:[],rows:[]};if(n.length===i.length){for(const o of i)/^ *-+: *$/.test(o)?s.align.push("right"):/^ *:-+: *$/.test(o)?s.align.push("center"):/^ *:-+ *$/.test(o)?s.align.push("left"):s.align.push(null);for(const o of n)s.header.push({text:o,tokens:this.lexer.inline(o)});for(const o of r)s.rows.push(xe(o,s.header.length).map(l=>({text:l,tokens:this.lexer.inline(l)})));return s}}lheading(t){const e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){const e=this.rules.block.paragraph.exec(t);if(e){const n=e[1].charAt(e[1].length-1)===` -`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){const e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){const e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:m(e[1])}}tag(t){const e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&/^/i.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){const e=this.rules.inline.link.exec(t);if(e){const n=e[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;const s=M(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{const s=Je(e[2],"()");if(s>-1){const l=(e[0].indexOf("!")===0?5:4)+e[1].length+s;e[2]=e[2].substring(0,s),e[0]=e[0].substring(0,l).trim(),e[3]=""}}let i=e[2],r="";if(this.options.pedantic){const s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);s&&(i=s[1],r=s[3])}else r=e[3]?e[3].slice(1,-1):"";return i=i.trim(),/^$/.test(n)?i=i.slice(1):i=i.slice(1,-1)),me(e,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){const i=(n[2]||n[1]).replace(/\s+/g," "),r=e[i.toLowerCase()];if(!r){const s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return me(n,r,n[0],this.lexer)}}emStrong(t,e,n=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!i||i[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(i[1]||i[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const s=[...i[0]].length-1;let o,l,u=s,c=0;const h=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,e=e.slice(-1*t.length+s);(i=h.exec(e))!=null;){if(o=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!o)continue;if(l=[...o].length,i[3]||i[4]){u+=l;continue}else if((i[5]||i[6])&&s%3&&!((s+l)%3)){c+=l;continue}if(u-=l,u>0)continue;l=Math.min(l,l+u+c);const p=[...i[0]][0].length,f=t.slice(0,s+i.index+p+l);if(Math.min(s,l)%2){const b=f.slice(1,-1);return{type:"em",raw:f,text:b,tokens:this.lexer.inlineTokens(b)}}const $=f.slice(2,-2);return{type:"strong",raw:f,text:$,tokens:this.lexer.inlineTokens($)}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(/\n/g," ");const i=/[^ ]/.test(n),r=/^ /.test(n)&&/ $/.test(n);return i&&r&&(n=n.substring(1,n.length-1)),n=m(n,!0),{type:"codespan",raw:e[0],text:n}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){const e=this.rules.inline.autolink.exec(t);if(e){let n,i;return e[2]==="@"?(n=m(e[1]),i="mailto:"+n):(n=m(e[1]),i=n),{type:"link",raw:e[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}url(t){var n;let e;if(e=this.rules.inline.url.exec(t)){let i,r;if(e[2]==="@")i=m(e[0]),r="mailto:"+i;else{let s;do s=e[0],e[0]=((n=this.rules.inline._backpedal.exec(e[0]))==null?void 0:n[0])??"";while(s!==e[0]);i=m(e[0]),e[1]==="www."?r="http://"+e[0]:r=e[0]}return{type:"link",raw:e[0],text:i,href:r,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t){const e=this.rules.inline.text.exec(t);if(e){let n;return this.lexer.state.inRawBlock?n=e[0]:n=m(e[0]),{type:"text",raw:e[0],text:n}}}}const et=/^(?: *(?:\n|$))+/,tt=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,nt=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,B=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,st=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,$e=/(?:[*+-]|\d{1,9}[.)])/,Te=g(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,$e).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),Y=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,it=/^[^\n]+/,ee=/(?!\s*\])(?:\\.|[^\[\]\\])+/,rt=g(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",ee).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ot=g(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,$e).getRegex(),O="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",te=/|$))/,lt=g("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",te).replace("tag",O).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ze=g(Y).replace("hr",B).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",O).getRegex(),at=g(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ze).getRegex(),ne={blockquote:at,code:tt,def:rt,fences:nt,heading:st,hr:B,html:lt,lheading:Te,list:ot,newline:et,paragraph:ze,table:E,text:it},be=g("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",B).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",O).getRegex(),ct={...ne,table:be,paragraph:g(Y).replace("hr",B).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",be).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",O).getRegex()},pt={...ne,html:g(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",te).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:E,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:g(Y).replace("hr",B).replace("heading",` *#{1,6} *[^ -]`).replace("lheading",Te).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Re=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ht=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ve=/^( {2,}|\\)\n(?!\s*$)/,ut=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,gt=g(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,q).getRegex(),kt=g("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,q).getRegex(),xt=g("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,q).getRegex(),mt=g(/\\([punct])/,"gu").replace(/punct/g,q).getRegex(),bt=g(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),wt=g(te).replace("(?:-->|$)","-->").getRegex(),yt=g("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",wt).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),N=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,_t=g(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",N).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Se=g(/^!?\[(label)\]\[(ref)\]/).replace("label",N).replace("ref",ee).getRegex(),Ie=g(/^!?\[(ref)\](?:\[\])?/).replace("ref",ee).getRegex(),$t=g("reflink|nolink(?!\\()","g").replace("reflink",Se).replace("nolink",Ie).getRegex(),se={_backpedal:E,anyPunctuation:mt,autolink:bt,blockSkip:dt,br:ve,code:ht,del:E,emStrongLDelim:gt,emStrongRDelimAst:kt,emStrongRDelimUnd:xt,escape:Re,link:_t,nolink:Ie,punctuation:ft,reflink:Se,reflinkSearch:$t,tag:yt,text:ut,url:E},Tt={...se,link:g(/^!?\[(label)\]\((.*?)\)/).replace("label",N).getRegex(),reflink:g(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",N).getRegex()},X={...se,escape:g(Re).replace("])","~|])").getRegex(),url:g(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\/i.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){const e=this.rules.inline.link.exec(t);if(e){const n=e[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;const s=Q(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{const s=Ye(e[2],"()");if(s>-1){const l=(e[0].indexOf("!")===0?5:4)+e[1].length+s;e[2]=e[2].substring(0,s),e[0]=e[0].substring(0,l).trim(),e[3]=""}}let i=e[2],r="";if(this.options.pedantic){const s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);s&&(i=s[1],r=s[3])}else r=e[3]?e[3].slice(1,-1):"";return i=i.trim(),/^$/.test(n)?i=i.slice(1):i=i.slice(1,-1)),me(e,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){const i=(n[2]||n[1]).replace(/\s+/g," "),r=e[i.toLowerCase()];if(!r){const s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return me(n,r,n[0],this.lexer)}}emStrong(t,e,n=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!i||i[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(i[1]||i[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const s=[...i[0]].length-1;let o,l,u=s,c=0;const f=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,e=e.slice(-1*t.length+s);(i=f.exec(e))!=null;){if(o=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!o)continue;if(l=[...o].length,i[3]||i[4]){u+=l;continue}else if((i[5]||i[6])&&s%3&&!((s+l)%3)){c+=l;continue}if(u-=l,u>0)continue;l=Math.min(l,l+u+c);const p=[...i[0]][0].length,h=t.slice(0,s+i.index+p+l);if(Math.min(s,l)%2){const m=h.slice(1,-1);return{type:"em",raw:h,text:m,tokens:this.lexer.inlineTokens(m)}}const k=h.slice(2,-2);return{type:"strong",raw:h,text:k,tokens:this.lexer.inlineTokens(k)}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(/\n/g," ");const i=/[^ ]/.test(n),r=/^ /.test(n)&&/ $/.test(n);return i&&r&&(n=n.substring(1,n.length-1)),n=w(n,!0),{type:"codespan",raw:e[0],text:n}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){const e=this.rules.inline.autolink.exec(t);if(e){let n,i;return e[2]==="@"?(n=w(e[1]),i="mailto:"+n):(n=w(e[1]),i=n),{type:"link",raw:e[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}url(t){var n;let e;if(e=this.rules.inline.url.exec(t)){let i,r;if(e[2]==="@")i=w(e[0]),r="mailto:"+i;else{let s;do s=e[0],e[0]=((n=this.rules.inline._backpedal.exec(e[0]))==null?void 0:n[0])??"";while(s!==e[0]);i=w(e[0]),e[1]==="www."?r="http://"+e[0]:r=e[0]}return{type:"link",raw:e[0],text:i,href:r,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t){const e=this.rules.inline.text.exec(t);if(e){let n;return this.lexer.state.inRawBlock?n=e[0]:n=w(e[0]),{type:"text",raw:e[0],text:n}}}}const tt=/^(?: *(?:\n|$))+/,nt=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,st=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,q=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,it=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,_e=/(?:[*+-]|\d{1,9}[.)])/,Te=g(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,_e).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),ee=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,rt=/^[^\n]+/,te=/(?!\s*\])(?:\\.|[^\[\]\\])+/,ot=g(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",te).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),lt=g(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,_e).getRegex(),U="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ne=/|$))/,at=g("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",ne).replace("tag",U).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ze=g(ee).replace("hr",q).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",U).getRegex(),ct=g(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ze).getRegex(),se={blockquote:ct,code:nt,def:ot,fences:st,heading:it,hr:q,html:at,lheading:Te,list:lt,newline:tt,paragraph:ze,table:L,text:rt},be=g("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",q).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",U).getRegex(),pt={...se,table:be,paragraph:g(ee).replace("hr",q).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",be).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",U).getRegex()},ut={...se,html:g(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ne).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:L,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:g(ee).replace("hr",q).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",Te).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Re=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ht=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ve=/^( {2,}|\\)\n(?!\s*$)/,ft=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,kt=g(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Z).getRegex(),xt=g("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Z).getRegex(),mt=g("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Z).getRegex(),bt=g(/\\([punct])/,"gu").replace(/punct/g,Z).getRegex(),wt=g(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),yt=g(ne).replace("(?:-->|$)","-->").getRegex(),$t=g("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",yt).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),N=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,_t=g(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",N).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Se=g(/^!?\[(label)\]\[(ref)\]/).replace("label",N).replace("ref",te).getRegex(),Ie=g(/^!?\[(ref)\](?:\[\])?/).replace("ref",te).getRegex(),Tt=g("reflink|nolink(?!\\()","g").replace("reflink",Se).replace("nolink",Ie).getRegex(),ie={_backpedal:L,anyPunctuation:bt,autolink:wt,blockSkip:gt,br:ve,code:ht,del:L,emStrongLDelim:kt,emStrongRDelimAst:xt,emStrongRDelimUnd:mt,escape:Re,link:_t,nolink:Ie,punctuation:dt,reflink:Se,reflinkSearch:Tt,tag:$t,text:ft,url:L},zt={...ie,link:g(/^!?\[(label)\]\((.*?)\)/).replace("label",N).getRegex(),reflink:g(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",N).getRegex()},K={...ie,escape:g(Re).replace("])","~|])").getRegex(),url:g(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\l+" ".repeat(u.length));let n,i,r,s;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(o=>(n=o.call({lexer:this},t,e))?(t=t.substring(n.raw.length),e.push(n),!0):!1))){if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length),n.raw.length===1&&e.length>0?e[e.length-1].raw+=` `:e.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length),i=e[e.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=` `+n.raw,i.text+=` @@ -23,9 +23,9 @@ var Ce=Object.defineProperty;var ae=a=>{throw TypeError(a)};var Ee=(a,t,e)=>t in `+n.raw,i.text+=` `+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):e.push(n),s=r.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length),i=e[e.length-1],i&&i.type==="text"?(i.raw+=` `+n.raw,i.text+=` -`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):e.push(n);continue}if(t){const o="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let n,i,r,s=t,o,l,u;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)c.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,o.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(l||(u=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(n=c.call({lexer:this},t,e))?(t=t.substring(n.raw.length),e.push(n),!0):!1))){if(n=this.tokenizer.escape(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.tag(t)){t=t.substring(n.raw.length),i=e[e.length-1],i&&n.type==="text"&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):e.push(n);continue}if(n=this.tokenizer.link(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(n.raw.length),i=e[e.length-1],i&&n.type==="text"&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):e.push(n);continue}if(n=this.tokenizer.emStrong(t,s,u)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.codespan(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.br(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.del(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.autolink(t)){t=t.substring(n.raw.length),e.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(t))){t=t.substring(n.raw.length),e.push(n);continue}if(r=t,this.options.extensions&&this.options.extensions.startInline){let c=1/0;const h=t.slice(1);let p;this.options.extensions.startInline.forEach(f=>{p=f.call({lexer:this},h),typeof p=="number"&&p>=0&&(c=Math.min(c,p))}),c<1/0&&c>=0&&(r=t.substring(0,c+1))}if(n=this.tokenizer.inlineText(r)){t=t.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(u=n.raw.slice(-1)),l=!0,i=e[e.length-1],i&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):e.push(n);continue}if(t){const c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return e}}class j{constructor(t){k(this,"options");this.options=t||S}code(t,e,n){var r;const i=(r=(e||"").match(/^\S*/))==null?void 0:r[0];return t=t.replace(/\n$/,"")+` -`,i?'
'+(n?t:m(t,!0))+`
-`:"
"+(n?t:m(t,!0))+`
+`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):e.push(n);continue}if(t){const o="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let n,i,r,s=t,o,l,u;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)c.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,o.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(l||(u=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(n=c.call({lexer:this},t,e))?(t=t.substring(n.raw.length),e.push(n),!0):!1))){if(n=this.tokenizer.escape(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.tag(t)){t=t.substring(n.raw.length),i=e[e.length-1],i&&n.type==="text"&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):e.push(n);continue}if(n=this.tokenizer.link(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(n.raw.length),i=e[e.length-1],i&&n.type==="text"&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):e.push(n);continue}if(n=this.tokenizer.emStrong(t,s,u)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.codespan(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.br(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.del(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.autolink(t)){t=t.substring(n.raw.length),e.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(t))){t=t.substring(n.raw.length),e.push(n);continue}if(r=t,this.options.extensions&&this.options.extensions.startInline){let c=1/0;const f=t.slice(1);let p;this.options.extensions.startInline.forEach(h=>{p=h.call({lexer:this},f),typeof p=="number"&&p>=0&&(c=Math.min(c,p))}),c<1/0&&c>=0&&(r=t.substring(0,c+1))}if(n=this.tokenizer.inlineText(r)){t=t.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(u=n.raw.slice(-1)),l=!0,i=e[e.length-1],i&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):e.push(n);continue}if(t){const c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return e}}class H{constructor(t){x(this,"options");this.options=t||I}code(t,e,n){var r;const i=(r=(e||"").match(/^\S*/))==null?void 0:r[0];return t=t.replace(/\n$/,"")+` +`,i?'
'+(n?t:w(t,!0))+`
+`:"
"+(n?t:w(t,!0))+`
`}blockquote(t){return`
${t}
`}html(t,e){return t}heading(t,e,n){return`${t} @@ -41,6 +41,6 @@ ${t} `}tablerow(t){return` ${t} `}tablecell(t,e){const n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+` -`}strong(t){return`${t}`}em(t){return`${t}`}codespan(t){return`${t}`}br(){return"
"}del(t){return`${t}`}link(t,e,n){const i=ke(t);if(i===null)return n;t=i;let r='
",r}image(t,e,n){const i=ke(t);if(i===null)return n;t=i;let r=`${n}0&&p.tokens[0].type==="paragraph"?(p.tokens[0].text=T+" "+p.tokens[0].text,p.tokens[0].tokens&&p.tokens[0].tokens.length>0&&p.tokens[0].tokens[0].type==="text"&&(p.tokens[0].tokens[0].text=T+" "+p.tokens[0].tokens[0].text)):p.tokens.unshift({type:"text",text:T+" "}):b+=T+" "}b+=this.parse(p.tokens,u),c+=this.renderer.listitem(b,$,!!f)}n+=this.renderer.list(c,o,l);continue}case"html":{const s=r;n+=this.renderer.html(s.text,s.block);continue}case"paragraph":{const s=r;n+=this.renderer.paragraph(this.parseInline(s.tokens));continue}case"text":{let s=r,o=s.tokens?this.parseInline(s.tokens):s.text;for(;i+1{const u=o[l].flat(1/0);n=n.concat(this.walkTokens(u,e))}):o.tokens&&(n=n.concat(this.walkTokens(o.tokens,e)))}}return n}use(...t){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{const i={...n};if(i.async=this.defaults.async||i.async||!1,n.extensions&&(n.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){const s=e.renderers[r.name];s?e.renderers[r.name]=function(...o){let l=r.renderer.apply(this,o);return l===!1&&(l=s.apply(this,o)),l}:e.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const s=e[r.level];s?s.unshift(r.tokenizer):e[r.level]=[r.tokenizer],r.start&&(r.level==="block"?e.startBlock?e.startBlock.push(r.start):e.startBlock=[r.start]:r.level==="inline"&&(e.startInline?e.startInline.push(r.start):e.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(e.childTokens[r.name]=r.childTokens)}),i.extensions=e),n.renderer){const r=this.defaults.renderer||new j(this.defaults);for(const s in n.renderer){if(!(s in r))throw new Error(`renderer '${s}' does not exist`);if(s==="options")continue;const o=s,l=n.renderer[o],u=r[o];r[o]=(...c)=>{let h=l.apply(r,c);return h===!1&&(h=u.apply(r,c)),h||""}}i.renderer=r}if(n.tokenizer){const r=this.defaults.tokenizer||new Q(this.defaults);for(const s in n.tokenizer){if(!(s in r))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;const o=s,l=n.tokenizer[o],u=r[o];r[o]=(...c)=>{let h=l.apply(r,c);return h===!1&&(h=u.apply(r,c)),h}}i.tokenizer=r}if(n.hooks){const r=this.defaults.hooks||new L;for(const s in n.hooks){if(!(s in r))throw new Error(`hook '${s}' does not exist`);if(s==="options")continue;const o=s,l=n.hooks[o],u=r[o];L.passThroughHooks.has(s)?r[o]=c=>{if(this.defaults.async)return Promise.resolve(l.call(r,c)).then(p=>u.call(r,p));const h=l.call(r,c);return u.call(r,h)}:r[o]=(...c)=>{let h=l.apply(r,c);return h===!1&&(h=u.apply(r,c)),h}}i.hooks=r}if(n.walkTokens){const r=this.defaults.walkTokens,s=n.walkTokens;i.walkTokens=function(o){let l=[];return l.push(s.call(this,o)),r&&(l=l.concat(r.call(this,o))),l}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return w.lex(t,e??this.defaults)}parser(t,e){return y.parse(t,e??this.defaults)}}v=new WeakSet,K=function(t,e){return(n,i)=>{const r={...i},s={...this.defaults,...r};this.defaults.async===!0&&r.async===!1&&(s.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),s.async=!0);const o=Z(this,v,Ae).call(this,!!s.silent,!!s.async);if(typeof n>"u"||n===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(s.hooks&&(s.hooks.options=s),s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(n):n).then(l=>t(l,s)).then(l=>s.hooks?s.hooks.processAllTokens(l):l).then(l=>s.walkTokens?Promise.all(this.walkTokens(l,s.walkTokens)).then(()=>l):l).then(l=>e(l,s)).then(l=>s.hooks?s.hooks.postprocess(l):l).catch(o);try{s.hooks&&(n=s.hooks.preprocess(n));let l=t(n,s);s.hooks&&(l=s.hooks.processAllTokens(l)),s.walkTokens&&this.walkTokens(l,s.walkTokens);let u=e(l,s);return s.hooks&&(u=s.hooks.postprocess(u)),u}catch(l){return o(l)}}},Ae=function(t,e){return n=>{if(n.message+=` -Please report this to https://github.com/markedjs/marked.`,t){const i="

An error occurred:

"+m(n.message+"",!0)+"
";return e?Promise.resolve(i):i}if(e)return Promise.reject(n);throw n}};const R=new Rt;function d(a,t){return R.parse(a,t)}d.options=d.setOptions=function(a){return R.setOptions(a),d.defaults=R.defaults,we(d.defaults),d};d.getDefaults=J;d.defaults=S;d.use=function(...a){return R.use(...a),d.defaults=R.defaults,we(d.defaults),d};d.walkTokens=function(a,t){return R.walkTokens(a,t)};d.parseInline=R.parseInline;d.Parser=y;d.parser=y.parse;d.Renderer=j;d.TextRenderer=ie;d.Lexer=w;d.lexer=w.lex;d.Tokenizer=Q;d.Hooks=L;d.parse=d;d.options;d.setOptions;d.use;d.walkTokens;d.parseInline;y.parse;w.lex;const vt={class:"p-6"},St={class:"flex items-center gap-3 mb-6 flex-wrap"},It={class:"flex items-center gap-2"},At={class:"flex items-center rounded-md border border-border overflow-hidden"},Ct={key:0,class:"flex items-center justify-center h-20"},Et={key:1,class:"text-center text-muted-foreground py-12 text-sm"},Lt={key:2,class:"space-y-3"},Bt=["onClick"],qt={class:"flex items-center gap-2 flex-wrap"},Zt={class:"text-sm font-medium text-foreground"},Pt={class:"flex items-center gap-2 shrink-0"},Mt={class:"text-xs text-muted-foreground"},Dt={key:0,class:"mt-4 pt-4 border-t border-border"},Qt={class:"flex gap-2 mb-3"},Nt=["href"],jt=["href"],Ot=["innerHTML"],Ht=Be({__name:"ReportsView",setup(a){const t=A([]),e=A(!1),n=A(!1),i=A(null),r=A("daily");qe(()=>s());async function s(){e.value=!0;try{const c=await de.list();t.value=c.data}finally{e.value=!1}}async function o(){n.value=!0;try{await de.generate({type:r.value,period_date:He(new Date)}),ue.success("Report generated"),await s()}catch{ue.error("Failed to generate report")}finally{n.value=!1}}function l(c){i.value=i.value===c?null:c}function u(c){return d(c)}return(c,h)=>(_(),z("div",vt,[x("div",St,[h[3]||(h[3]=x("h2",{class:"text-lg font-semibold text-foreground flex-1"},"AI Reports",-1)),x("div",It,[x("div",At,[x("button",{class:U(["px-3 py-1.5 text-xs font-medium transition-colors",r.value==="daily"?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-muted"]),onClick:h[0]||(h[0]=p=>r.value="daily")},"Daily",2),x("button",{class:U(["px-3 py-1.5 text-xs font-medium transition-colors",r.value==="weekly"?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-muted"]),onClick:h[1]||(h[1]=p=>r.value="weekly")},"Weekly",2)]),P(Ne,{size:"sm",loading:n.value,onClick:o},{default:I(()=>[...h[2]||(h[2]=[G(" Generate Now ",-1)])]),_:1},8,["loading"])])]),e.value?(_(),z("div",Ct,[P(je,{class:"text-primary"})])):t.value.length===0?(_(),z("div",Et," No reports generated yet ")):(_(),z("div",Lt,[(_(!0),z(Ze,null,Pe(t.value,p=>(_(),pe(Qe,{key:p.id},{default:I(()=>[P(De,{class:"p-4"},{default:I(()=>[x("div",{class:"flex items-start justify-between gap-3 cursor-pointer",onClick:f=>l(p.id)},[x("div",qt,[P(fe,{variant:p.type==="daily"?"default":"secondary",class:"text-xs"},{default:I(()=>[G(W(p.type),1)]),_:2},1032,["variant"]),x("span",Zt,W(Me(Oe)(p.period_date)),1),p.email_sent?(_(),pe(fe,{key:0,variant:"success",class:"text-xs"},{default:I(()=>[...h[4]||(h[4]=[G(" Email sent ",-1)])]),_:1})):he("",!0)]),x("div",Pt,[x("span",Mt,W(new Date(p.generated_at).toLocaleString()),1),(_(),z("svg",{class:U(["h-4 w-4 text-muted-foreground transition-transform",i.value===p.id?"rotate-180":""]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...h[5]||(h[5]=[x("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"},null,-1)])],2))])],8,Bt),i.value===p.id?(_(),z("div",Dt,[x("div",Qt,[x("a",{href:`/cc-dashboard/api/reports/${p.id}/export?format=md`,download:"",class:"text-xs px-2 py-1 rounded border border-border text-muted-foreground hover:text-foreground hover:border-foreground/30 transition-colors"},"↓ Markdown",8,Nt),x("a",{href:`/cc-dashboard/api/reports/${p.id}/export?format=html`,download:"",class:"text-xs px-2 py-1 rounded border border-border text-muted-foreground hover:text-foreground hover:border-foreground/30 transition-colors"},"↓ HTML",8,jt)]),x("div",{class:"prose prose-sm prose-invert max-w-none text-sm text-foreground break-words",innerHTML:u(p.content_markdown)},null,8,Ot)])):he("",!0)]),_:2},1024)]),_:2},1024))),128))]))]))}}),Yt=Fe(Ht,[["__scopeId","data-v-5c75fc6a"]]);export{Yt as default}; +`}strong(t){return`${t}`}em(t){return`${t}`}codespan(t){return`${t}`}br(){return"
"}del(t){return`${t}`}link(t,e,n){const i=ke(t);if(i===null)return n;t=i;let r='
",r}image(t,e,n){const i=ke(t);if(i===null)return n;t=i;let r=`${n}0&&p.tokens[0].type==="paragraph"?(p.tokens[0].text=y+" "+p.tokens[0].text,p.tokens[0].tokens&&p.tokens[0].tokens.length>0&&p.tokens[0].tokens[0].type==="text"&&(p.tokens[0].tokens[0].text=y+" "+p.tokens[0].tokens[0].text)):p.tokens.unshift({type:"text",text:y+" "}):m+=y+" "}m+=this.parse(p.tokens,u),c+=this.renderer.listitem(m,k,!!h)}n+=this.renderer.list(c,o,l);continue}case"html":{const s=r;n+=this.renderer.html(s.text,s.block);continue}case"paragraph":{const s=r;n+=this.renderer.paragraph(this.parseInline(s.tokens));continue}case"text":{let s=r,o=s.tokens?this.parseInline(s.tokens):s.text;for(;i+1{const u=o[l].flat(1/0);n=n.concat(this.walkTokens(u,e))}):o.tokens&&(n=n.concat(this.walkTokens(o.tokens,e)))}}return n}use(...t){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{const i={...n};if(i.async=this.defaults.async||i.async||!1,n.extensions&&(n.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){const s=e.renderers[r.name];s?e.renderers[r.name]=function(...o){let l=r.renderer.apply(this,o);return l===!1&&(l=s.apply(this,o)),l}:e.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const s=e[r.level];s?s.unshift(r.tokenizer):e[r.level]=[r.tokenizer],r.start&&(r.level==="block"?e.startBlock?e.startBlock.push(r.start):e.startBlock=[r.start]:r.level==="inline"&&(e.startInline?e.startInline.push(r.start):e.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(e.childTokens[r.name]=r.childTokens)}),i.extensions=e),n.renderer){const r=this.defaults.renderer||new H(this.defaults);for(const s in n.renderer){if(!(s in r))throw new Error(`renderer '${s}' does not exist`);if(s==="options")continue;const o=s,l=n.renderer[o],u=r[o];r[o]=(...c)=>{let f=l.apply(r,c);return f===!1&&(f=u.apply(r,c)),f||""}}i.renderer=r}if(n.tokenizer){const r=this.defaults.tokenizer||new O(this.defaults);for(const s in n.tokenizer){if(!(s in r))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;const o=s,l=n.tokenizer[o],u=r[o];r[o]=(...c)=>{let f=l.apply(r,c);return f===!1&&(f=u.apply(r,c)),f}}i.tokenizer=r}if(n.hooks){const r=this.defaults.hooks||new B;for(const s in n.hooks){if(!(s in r))throw new Error(`hook '${s}' does not exist`);if(s==="options")continue;const o=s,l=n.hooks[o],u=r[o];B.passThroughHooks.has(s)?r[o]=c=>{if(this.defaults.async)return Promise.resolve(l.call(r,c)).then(p=>u.call(r,p));const f=l.call(r,c);return u.call(r,f)}:r[o]=(...c)=>{let f=l.apply(r,c);return f===!1&&(f=u.apply(r,c)),f}}i.hooks=r}if(n.walkTokens){const r=this.defaults.walkTokens,s=n.walkTokens;i.walkTokens=function(o){let l=[];return l.push(s.call(this,o)),r&&(l=l.concat(r.call(this,o))),l}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return $.lex(t,e??this.defaults)}parser(t,e){return _.parse(t,e??this.defaults)}}S=new WeakSet,J=function(t,e){return(n,i)=>{const r={...i},s={...this.defaults,...r};this.defaults.async===!0&&r.async===!1&&(s.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),s.async=!0);const o=P(this,S,Ae).call(this,!!s.silent,!!s.async);if(typeof n>"u"||n===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(s.hooks&&(s.hooks.options=s),s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(n):n).then(l=>t(l,s)).then(l=>s.hooks?s.hooks.processAllTokens(l):l).then(l=>s.walkTokens?Promise.all(this.walkTokens(l,s.walkTokens)).then(()=>l):l).then(l=>e(l,s)).then(l=>s.hooks?s.hooks.postprocess(l):l).catch(o);try{s.hooks&&(n=s.hooks.preprocess(n));let l=t(n,s);s.hooks&&(l=s.hooks.processAllTokens(l)),s.walkTokens&&this.walkTokens(l,s.walkTokens);let u=e(l,s);return s.hooks&&(u=s.hooks.postprocess(u)),u}catch(l){return o(l)}}},Ae=function(t,e){return n=>{if(n.message+=` +Please report this to https://github.com/markedjs/marked.`,t){const i="

An error occurred:

"+w(n.message+"",!0)+"
";return e?Promise.resolve(i):i}if(e)return Promise.reject(n);throw n}};const v=new vt;function d(a,t){return v.parse(a,t)}d.options=d.setOptions=function(a){return v.setOptions(a),d.defaults=v.defaults,we(d.defaults),d};d.getDefaults=Y;d.defaults=I;d.use=function(...a){return v.use(...a),d.defaults=v.defaults,we(d.defaults),d};d.walkTokens=function(a,t){return v.walkTokens(a,t)};d.parseInline=v.parseInline;d.Parser=_;d.parser=_.parse;d.Renderer=H;d.TextRenderer=re;d.Lexer=$;d.lexer=$.lex;d.Tokenizer=O;d.Hooks=B;d.parse=d;d.options;d.setOptions;d.use;d.walkTokens;d.parseInline;_.parse;$.lex;const St={class:"p-6"},It={class:"flex items-center gap-3 mb-6 flex-wrap"},At={class:"flex items-center gap-2"},Ct={class:"flex items-center rounded-md border border-border overflow-hidden"},Et={key:0,class:"flex items-center justify-center h-20"},Lt={key:1,class:"text-center text-muted-foreground py-12 text-sm"},Bt={key:2,class:"space-y-3"},qt=["onClick"],Zt={class:"flex items-center gap-2 flex-wrap"},Pt={class:"text-sm font-medium text-foreground"},Mt={class:"flex items-center gap-2 shrink-0"},Dt={class:"text-xs text-muted-foreground"},Qt={key:0,class:"mt-4 pt-4 border-t border-border"},jt={class:"flex gap-2 mb-3"},Ot=["onClick"],Nt=["onClick"],Ht=["innerHTML"],Ut=Be({__name:"ReportsView",setup(a){const t=qe(),e=C([]),n=C(!1),i=C(!1),r=C(null),s=C("daily");Ze(()=>o());async function o(){n.value=!0;try{const p=await de.list();e.value=p.data}finally{n.value=!1}}async function l(){i.value=!0;try{await de.generate({type:s.value,period_date:Ue(new Date)}),D.success("Report generated"),await o()}catch{D.error("Failed to generate report")}finally{i.value=!1}}function u(p){r.value=r.value===p?null:p}function c(p){return d(p)}async function f(p,h){try{const k=await fetch(`/cc-dashboard/api/reports/${p}/export?format=${h}`,{headers:{Authorization:`Bearer ${t.token}`}});if(!k.ok){D.error("Export failed");return}const m=await k.blob(),y=URL.createObjectURL(m),z=document.createElement("a");z.href=y,z.download=`report.${h}`,z.click(),URL.revokeObjectURL(y)}catch{D.error("Export failed")}}return(p,h)=>(T(),R("div",St,[b("div",It,[h[3]||(h[3]=b("h2",{class:"text-lg font-semibold text-foreground flex-1"},"AI Reports",-1)),b("div",At,[b("div",Ct,[b("button",{class:G(["px-3 py-1.5 text-xs font-medium transition-colors",s.value==="daily"?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-muted"]),onClick:h[0]||(h[0]=k=>s.value="daily")},"Daily",2),b("button",{class:G(["px-3 py-1.5 text-xs font-medium transition-colors",s.value==="weekly"?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-muted"]),onClick:h[1]||(h[1]=k=>s.value="weekly")},"Weekly",2)]),M(Oe,{size:"sm",loading:i.value,onClick:l},{default:A(()=>[...h[2]||(h[2]=[W(" Generate Now ",-1)])]),_:1},8,["loading"])])]),n.value?(T(),R("div",Et,[M(Ne,{class:"text-primary"})])):e.value.length===0?(T(),R("div",Lt," No reports generated yet ")):(T(),R("div",Bt,[(T(!0),R(Pe,null,Me(e.value,k=>(T(),ue(je,{key:k.id},{default:A(()=>[M(Qe,{class:"p-4"},{default:A(()=>[b("div",{class:"flex items-start justify-between gap-3 cursor-pointer",onClick:m=>u(k.id)},[b("div",Zt,[M(fe,{variant:k.type==="daily"?"default":"secondary",class:"text-xs"},{default:A(()=>[W(X(k.type),1)]),_:2},1032,["variant"]),b("span",Pt,X(De(He)(k.period_date)),1),k.email_sent?(T(),ue(fe,{key:0,variant:"success",class:"text-xs"},{default:A(()=>[...h[4]||(h[4]=[W(" Email sent ",-1)])]),_:1})):he("",!0)]),b("div",Mt,[b("span",Dt,X(new Date(k.generated_at).toLocaleString()),1),(T(),R("svg",{class:G(["h-4 w-4 text-muted-foreground transition-transform",r.value===k.id?"rotate-180":""]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...h[5]||(h[5]=[b("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"},null,-1)])],2))])],8,qt),r.value===k.id?(T(),R("div",Qt,[b("div",jt,[b("button",{class:"text-xs px-2.5 py-1 rounded-lg border border-border text-muted-foreground hover:text-foreground hover:border-foreground/30 transition-colors",onClick:m=>f(k.id,"md")},"↓ Markdown",8,Ot),b("button",{class:"text-xs px-2.5 py-1 rounded-lg border border-border text-muted-foreground hover:text-foreground hover:border-foreground/30 transition-colors",onClick:m=>f(k.id,"html")},"↓ HTML",8,Nt)]),b("div",{class:"prose prose-sm prose-invert max-w-none text-sm text-foreground break-words",innerHTML:c(k.content_markdown)},null,8,Ht)])):he("",!0)]),_:2},1024)]),_:2},1024))),128))]))]))}}),en=Fe(Ut,[["__scopeId","data-v-32c92954"]]);export{en as default}; diff --git a/src/static/assets/SettingsView-Bj_8ZT0B.js b/src/static/assets/SettingsView-DINReUal.js similarity index 85% rename from src/static/assets/SettingsView-Bj_8ZT0B.js rename to src/static/assets/SettingsView-DINReUal.js index f736a9b..c62357a 100644 --- a/src/static/assets/SettingsView-Bj_8ZT0B.js +++ b/src/static/assets/SettingsView-DINReUal.js @@ -1 +1 @@ -import{d as N,u as E,y as P,c as U,a,e as t,w as s,s as f,o as k,q as u,h as c,k as z,i as B,E as I,K as x}from"./index-BP_aNEdP.js";import{u as F}from"./devops-DxRDHPW5.js";import{_ as w,a as V}from"./CardContent.vue_vue_type_script_setup_true_lang-B8VjSxLa.js";import{_ as $,a as S}from"./CardTitle.vue_vue_type_script_setup_true_lang-KH4UhlTi.js";import{_ as y}from"./Input.vue_vue_type_script_setup_true_lang-SeygKlpx.js";import{_}from"./Button.vue_vue_type_script_setup_true_lang-B_YE_XNW.js";import{_ as O}from"./DevopsConnectForm.vue_vue_type_script_setup_true_lang-DQc_dk7n.js";import{i as C}from"./utils-7WVCegLb.js";import"./Spinner.vue_vue_type_script_setup_true_lang-Cu49-Cc4.js";function T(i,l){const n=`/cc-dashboard/api/export/timesheet.csv?from=${i}&to=${l}`,o=document.createElement("a");o.href=n,o.download=`timesheet-${i}-${l}.csv`,o.click()}function A(i,l){const n=`/cc-dashboard/api/export/timesheet.ics?from=${i}&to=${l}`,o=document.createElement("a");o.href=n,o.download=`timesheet-${i}-${l}.ics`,o.click()}const H={class:"p-6 space-y-6 max-w-2xl"},K={class:"space-y-1.5"},M={class:"space-y-1.5"},j={class:"flex items-center justify-between"},q={class:"flex items-center gap-3 flex-wrap"},h={class:"space-y-1.5"},G={class:"space-y-1.5"},J={class:"flex items-center gap-2"},se=N({__name:"SettingsView",setup(i){const l=E(),n=F(),o=f(""),p=f(0),g=f(!1),d=f(""),m=f("");P(()=>{l.user&&(o.value=l.user.username,p.value=l.user.daily_overhead_hours??0),n.fetchIntegration();const v=new Date;m.value=C(v);const e=new Date(v);e.setDate(v.getDate()-30),d.value=C(e)});async function D(){g.value=!0;try{await I.patch("/api/auth/me",{username:o.value,daily_overhead_hours:p.value}),await l.fetchMe(),x.success("Profile saved")}catch{x.error("Failed to save profile")}finally{g.value=!1}}async function b(){try{await n.sync(),x.success("Sync complete")}catch{x.error(n.error??"Sync failed")}}return(v,e)=>(k(),U("div",H,[e[18]||(e[18]=a("h2",{class:"text-lg font-semibold text-foreground"},"Settings",-1)),t(w,null,{default:s(()=>[t($,null,{default:s(()=>[t(S,{class:"text-sm"},{default:s(()=>[...e[6]||(e[6]=[u("Profile",-1)])]),_:1})]),_:1}),t(V,{class:"space-y-4"},{default:s(()=>[a("div",K,[e[7]||(e[7]=a("label",{class:"text-sm font-medium text-foreground"},"Username",-1)),t(y,{modelValue:o.value,"onUpdate:modelValue":e[0]||(e[0]=r=>o.value=r),placeholder:"username"},null,8,["modelValue"])]),a("div",M,[e[8]||(e[8]=a("label",{class:"text-sm font-medium text-foreground"},"Daily Overhead Hours",-1)),t(y,{modelValue:p.value,"onUpdate:modelValue":e[1]||(e[1]=r=>p.value=r),type:"number",min:"0",max:"8",step:"0.25",class:"w-32"},null,8,["modelValue"]),e[9]||(e[9]=a("p",{class:"text-xs text-muted-foreground"}," Hours per day to add for overhead / meetings ",-1))]),t(_,{loading:g.value,onClick:D},{default:s(()=>[...e[10]||(e[10]=[u("Save Profile",-1)])]),_:1},8,["loading"])]),_:1})]),_:1}),t(w,null,{default:s(()=>[t($,null,{default:s(()=>[a("div",j,[t(S,{class:"text-sm"},{default:s(()=>[...e[11]||(e[11]=[u("Azure DevOps Integration",-1)])]),_:1}),c(n).integration?(k(),z(_,{key:0,variant:"outline",size:"sm",loading:c(n).syncing,onClick:b},{default:s(()=>[...e[12]||(e[12]=[u(" Sync Now ",-1)])]),_:1},8,["loading"])):B("",!0)])]),_:1}),t(V,null,{default:s(()=>[t(O)]),_:1})]),_:1}),t(w,null,{default:s(()=>[t($,null,{default:s(()=>[t(S,{class:"text-sm"},{default:s(()=>[...e[13]||(e[13]=[u("Export",-1)])]),_:1})]),_:1}),t(V,{class:"space-y-4"},{default:s(()=>[a("div",q,[a("div",h,[e[14]||(e[14]=a("label",{class:"text-xs text-muted-foreground"},"From",-1)),t(y,{modelValue:d.value,"onUpdate:modelValue":e[2]||(e[2]=r=>d.value=r),type:"date",class:"h-8 text-xs"},null,8,["modelValue"])]),a("div",G,[e[15]||(e[15]=a("label",{class:"text-xs text-muted-foreground"},"To",-1)),t(y,{modelValue:m.value,"onUpdate:modelValue":e[3]||(e[3]=r=>m.value=r),type:"date",class:"h-8 text-xs"},null,8,["modelValue"])])]),a("div",J,[t(_,{variant:"outline",size:"sm",onClick:e[4]||(e[4]=r=>c(T)(d.value,m.value))},{default:s(()=>[...e[16]||(e[16]=[u(" Download CSV ",-1)])]),_:1}),t(_,{variant:"outline",size:"sm",onClick:e[5]||(e[5]=r=>c(A)(d.value,m.value))},{default:s(()=>[...e[17]||(e[17]=[u(" Download ICS ",-1)])]),_:1})])]),_:1})]),_:1})]))}});export{se as default}; +import{d as N,u as E,y as P,c as U,a,e as t,w as s,s as f,o as k,q as u,h as c,k as z,i as B,E as I,K as x}from"./index-DVV3ZbZ2.js";import{u as F}from"./devops-HjUgCfao.js";import{_ as w,a as V}from"./CardContent.vue_vue_type_script_setup_true_lang-DdGXaWEa.js";import{_ as $,a as S}from"./CardTitle.vue_vue_type_script_setup_true_lang-CT9DRTds.js";import{_ as y}from"./Input.vue_vue_type_script_setup_true_lang-BM1xhrlf.js";import{_}from"./Button.vue_vue_type_script_setup_true_lang-ClV4YfXb.js";import{_ as O}from"./DevopsConnectForm.vue_vue_type_script_setup_true_lang-5nCaOxp1.js";import{i as C}from"./utils-7WVCegLb.js";import"./Spinner.vue_vue_type_script_setup_true_lang-BkmDerVR.js";function T(i,l){const n=`/cc-dashboard/api/export/timesheet.csv?from=${i}&to=${l}`,o=document.createElement("a");o.href=n,o.download=`timesheet-${i}-${l}.csv`,o.click()}function A(i,l){const n=`/cc-dashboard/api/export/timesheet.ics?from=${i}&to=${l}`,o=document.createElement("a");o.href=n,o.download=`timesheet-${i}-${l}.ics`,o.click()}const H={class:"p-6 space-y-6 max-w-2xl"},K={class:"space-y-1.5"},M={class:"space-y-1.5"},j={class:"flex items-center justify-between"},q={class:"flex items-center gap-3 flex-wrap"},h={class:"space-y-1.5"},G={class:"space-y-1.5"},J={class:"flex items-center gap-2"},se=N({__name:"SettingsView",setup(i){const l=E(),n=F(),o=f(""),p=f(0),g=f(!1),d=f(""),m=f("");P(()=>{l.user&&(o.value=l.user.username,p.value=l.user.daily_overhead_hours??0),n.fetchIntegration();const v=new Date;m.value=C(v);const e=new Date(v);e.setDate(v.getDate()-30),d.value=C(e)});async function D(){g.value=!0;try{await I.patch("/api/auth/me",{username:o.value,daily_overhead_hours:p.value}),await l.fetchMe(),x.success("Profile saved")}catch{x.error("Failed to save profile")}finally{g.value=!1}}async function b(){try{await n.sync(),x.success("Sync complete")}catch{x.error(n.error??"Sync failed")}}return(v,e)=>(k(),U("div",H,[e[18]||(e[18]=a("h2",{class:"text-lg font-semibold text-foreground"},"Settings",-1)),t(w,null,{default:s(()=>[t($,null,{default:s(()=>[t(S,{class:"text-sm"},{default:s(()=>[...e[6]||(e[6]=[u("Profile",-1)])]),_:1})]),_:1}),t(V,{class:"space-y-4"},{default:s(()=>[a("div",K,[e[7]||(e[7]=a("label",{class:"text-sm font-medium text-foreground"},"Username",-1)),t(y,{modelValue:o.value,"onUpdate:modelValue":e[0]||(e[0]=r=>o.value=r),placeholder:"username"},null,8,["modelValue"])]),a("div",M,[e[8]||(e[8]=a("label",{class:"text-sm font-medium text-foreground"},"Daily Overhead Hours",-1)),t(y,{modelValue:p.value,"onUpdate:modelValue":e[1]||(e[1]=r=>p.value=r),type:"number",min:"0",max:"8",step:"0.25",class:"w-32"},null,8,["modelValue"]),e[9]||(e[9]=a("p",{class:"text-xs text-muted-foreground"}," Hours per day to add for overhead / meetings ",-1))]),t(_,{loading:g.value,onClick:D},{default:s(()=>[...e[10]||(e[10]=[u("Save Profile",-1)])]),_:1},8,["loading"])]),_:1})]),_:1}),t(w,null,{default:s(()=>[t($,null,{default:s(()=>[a("div",j,[t(S,{class:"text-sm"},{default:s(()=>[...e[11]||(e[11]=[u("Azure DevOps Integration",-1)])]),_:1}),c(n).integration?(k(),z(_,{key:0,variant:"outline",size:"sm",loading:c(n).syncing,onClick:b},{default:s(()=>[...e[12]||(e[12]=[u(" Sync Now ",-1)])]),_:1},8,["loading"])):B("",!0)])]),_:1}),t(V,null,{default:s(()=>[t(O)]),_:1})]),_:1}),t(w,null,{default:s(()=>[t($,null,{default:s(()=>[t(S,{class:"text-sm"},{default:s(()=>[...e[13]||(e[13]=[u("Export",-1)])]),_:1})]),_:1}),t(V,{class:"space-y-4"},{default:s(()=>[a("div",q,[a("div",h,[e[14]||(e[14]=a("label",{class:"text-xs text-muted-foreground"},"From",-1)),t(y,{modelValue:d.value,"onUpdate:modelValue":e[2]||(e[2]=r=>d.value=r),type:"date",class:"h-8 text-xs"},null,8,["modelValue"])]),a("div",G,[e[15]||(e[15]=a("label",{class:"text-xs text-muted-foreground"},"To",-1)),t(y,{modelValue:m.value,"onUpdate:modelValue":e[3]||(e[3]=r=>m.value=r),type:"date",class:"h-8 text-xs"},null,8,["modelValue"])])]),a("div",J,[t(_,{variant:"outline",size:"sm",onClick:e[4]||(e[4]=r=>c(T)(d.value,m.value))},{default:s(()=>[...e[16]||(e[16]=[u(" Download CSV ",-1)])]),_:1}),t(_,{variant:"outline",size:"sm",onClick:e[5]||(e[5]=r=>c(A)(d.value,m.value))},{default:s(()=>[...e[17]||(e[17]=[u(" Download ICS ",-1)])]),_:1})])]),_:1})]),_:1})]))}});export{se as default}; diff --git a/src/static/assets/Spinner.vue_vue_type_script_setup_true_lang-Cu49-Cc4.js b/src/static/assets/Spinner.vue_vue_type_script_setup_true_lang-BkmDerVR.js similarity index 90% rename from src/static/assets/Spinner.vue_vue_type_script_setup_true_lang-Cu49-Cc4.js rename to src/static/assets/Spinner.vue_vue_type_script_setup_true_lang-BkmDerVR.js index 0e1d0ca..7922050 100644 --- a/src/static/assets/Spinner.vue_vue_type_script_setup_true_lang-Cu49-Cc4.js +++ b/src/static/assets/Spinner.vue_vue_type_script_setup_true_lang-BkmDerVR.js @@ -1 +1 @@ -import{d as l,o as n,c as o,n as t,a as r}from"./index-BP_aNEdP.js";const i=l({__name:"Spinner",props:{size:{},class:{}},setup(s){return(a,e)=>(n(),o("svg",{class:t(["animate-spin text-current",s.size==="sm"?"h-3 w-3":s.size==="lg"?"h-6 w-6":"h-4 w-4",a.$props.class]),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[...e[0]||(e[0]=[r("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),r("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])],2))}});export{i as _}; +import{d as l,o as n,c as o,n as t,a as r}from"./index-DVV3ZbZ2.js";const i=l({__name:"Spinner",props:{size:{},class:{}},setup(s){return(a,e)=>(n(),o("svg",{class:t(["animate-spin text-current",s.size==="sm"?"h-3 w-3":s.size==="lg"?"h-6 w-6":"h-4 w-4",a.$props.class]),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[...e[0]||(e[0]=[r("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),r("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])],2))}});export{i as _}; diff --git a/src/static/assets/admin-C27haAMd.js b/src/static/assets/admin-xS9EtPqv.js similarity index 68% rename from src/static/assets/admin-C27haAMd.js rename to src/static/assets/admin-xS9EtPqv.js index b3a79be..1983553 100644 --- a/src/static/assets/admin-C27haAMd.js +++ b/src/static/assets/admin-xS9EtPqv.js @@ -1 +1 @@ -import{E as e}from"./index-BP_aNEdP.js";const i={users:()=>e.get("/api/admin/users"),keys:()=>e.get("/api/keys"),createKey:s=>e.post("/api/keys",s),revokeKey:s=>e.delete(`/api/keys/${s}`)};export{i as a}; +import{E as e}from"./index-DVV3ZbZ2.js";const i={users:()=>e.get("/api/admin/users"),keys:()=>e.get("/api/keys"),createKey:s=>e.post("/api/keys",s),revokeKey:s=>e.delete(`/api/keys/${s}`)};export{i as a}; diff --git a/src/static/assets/dashboard-CviKGUv7.js b/src/static/assets/dashboard-CxPPoZJ0.js similarity index 88% rename from src/static/assets/dashboard-CviKGUv7.js rename to src/static/assets/dashboard-CxPPoZJ0.js index aa73672..734bc8a 100644 --- a/src/static/assets/dashboard-CviKGUv7.js +++ b/src/static/assets/dashboard-CxPPoZJ0.js @@ -1 +1 @@ -import{E as t}from"./index-BP_aNEdP.js";const e={summary:a=>t.get("/api/dashboard/summary",{params:a}),projects:a=>t.get("/api/dashboard/projects",{params:a}),timeline:a=>t.get("/api/dashboard/timeline",{params:a}),monthly:a=>t.get("/api/dashboard/monthly",{params:a}),dow:a=>t.get("/api/dashboard/dow",{params:a}),tools:a=>t.get("/api/dashboard/tools",{params:a}),activity:a=>t.get("/api/dashboard/activity",{params:a}),calendar:a=>t.get("/api/dashboard/calendar",{params:a}),project:(a,o)=>t.get("/api/dashboard/project/"+a,{params:o})};export{e as d}; +import{E as t}from"./index-DVV3ZbZ2.js";const e={summary:a=>t.get("/api/dashboard/summary",{params:a}),projects:a=>t.get("/api/dashboard/projects",{params:a}),timeline:a=>t.get("/api/dashboard/timeline",{params:a}),monthly:a=>t.get("/api/dashboard/monthly",{params:a}),dow:a=>t.get("/api/dashboard/dow",{params:a}),tools:a=>t.get("/api/dashboard/tools",{params:a}),activity:a=>t.get("/api/dashboard/activity",{params:a}),calendar:a=>t.get("/api/dashboard/calendar",{params:a}),project:(a,o)=>t.get("/api/dashboard/project/"+a,{params:o})};export{e as d}; diff --git a/src/static/assets/devops-DxRDHPW5.js b/src/static/assets/devops-HjUgCfao.js similarity index 94% rename from src/static/assets/devops-DxRDHPW5.js rename to src/static/assets/devops-HjUgCfao.js index 2961520..35de6fa 100644 --- a/src/static/assets/devops-DxRDHPW5.js +++ b/src/static/assets/devops-HjUgCfao.js @@ -1 +1 @@ -import{E as s,C as I,s as o}from"./index-BP_aNEdP.js";const i={getIntegration:()=>s.get("/api/devops/integration"),saveIntegration:e=>s.put("/api/devops/integration",e),deleteIntegration:()=>s.delete("/api/devops/integration"),sync:()=>s.post("/api/devops/sync"),workItems:e=>s.get("/api/devops/work-items",{params:e?{state:e}:void 0})},m=I("devops",()=>{const e=o(null),l=o([]),r=o(!1),n=o(!1),c=o(null);async function u(){n.value=!0;try{const t=await i.getIntegration();e.value=t.data}catch{e.value=null}finally{n.value=!1}}async function d(t){const a=await i.saveIntegration(t);e.value=a.data}async function g(){await i.deleteIntegration(),e.value=null}async function f(){var t,a;r.value=!0,c.value=null;try{await i.sync(),await u()}catch(v){const p=v;throw c.value=((a=(t=p.response)==null?void 0:t.data)==null?void 0:a.detail)??p.message??"Sync failed",v}finally{r.value=!1}}async function y(t){n.value=!0;try{const a=await i.workItems(t);l.value=a.data}catch{l.value=[]}finally{n.value=!1}}return{integration:e,workItems:l,syncing:r,loading:n,error:c,fetchIntegration:u,saveIntegration:d,deleteIntegration:g,sync:f,fetchWorkItems:y}});export{m as u}; +import{E as s,C as I,s as o}from"./index-DVV3ZbZ2.js";const i={getIntegration:()=>s.get("/api/devops/integration"),saveIntegration:e=>s.put("/api/devops/integration",e),deleteIntegration:()=>s.delete("/api/devops/integration"),sync:()=>s.post("/api/devops/sync"),workItems:e=>s.get("/api/devops/work-items",{params:e?{state:e}:void 0})},m=I("devops",()=>{const e=o(null),l=o([]),r=o(!1),n=o(!1),c=o(null);async function u(){n.value=!0;try{const t=await i.getIntegration();e.value=t.data}catch{e.value=null}finally{n.value=!1}}async function d(t){const a=await i.saveIntegration(t);e.value=a.data}async function g(){await i.deleteIntegration(),e.value=null}async function f(){var t,a;r.value=!0,c.value=null;try{await i.sync(),await u()}catch(v){const p=v;throw c.value=((a=(t=p.response)==null?void 0:t.data)==null?void 0:a.detail)??p.message??"Sync failed",v}finally{r.value=!1}}async function y(t){n.value=!0;try{const a=await i.workItems(t);l.value=a.data}catch{l.value=[]}finally{n.value=!1}}return{integration:e,workItems:l,syncing:r,loading:n,error:c,fetchIntegration:u,saveIntegration:d,deleteIntegration:g,sync:f,fetchWorkItems:y}});export{m as u}; diff --git a/src/static/assets/index-Bq2H3vqg.css b/src/static/assets/index-Bq2H3vqg.css deleted file mode 100644 index a9d1159..0000000 --- a/src/static/assets/index-Bq2H3vqg.css +++ /dev/null @@ -1 +0,0 @@ -@import"https://api.fontshare.com/v2/css?f[]=satoshi@700,500,400&display=swap";@import"https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap";*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background: 0 0% 98%;--foreground: 222 47% 11%;--card: 0 0% 100%;--card-foreground: 222 47% 11%;--popover: 0 0% 100%;--popover-foreground: 222 47% 11%;--primary: 191 91% 37%;--primary-foreground: 0 0% 100%;--secondary: 210 40% 94%;--secondary-foreground: 222 47% 11%;--muted: 210 40% 94%;--muted-foreground: 215 16% 47%;--accent: 191 91% 92%;--accent-foreground: 191 91% 25%;--destructive: 0 84% 60%;--destructive-foreground: 0 0% 100%;--border: 214 32% 88%;--input: 214 32% 88%;--ring: 191 91% 37%;--radius: .5rem;--sidebar-background: 210 40% 96%;--sidebar-foreground: 222 47% 11%;--sidebar-primary: 191 91% 37%;--sidebar-primary-foreground: 0 0% 100%;--sidebar-accent: 191 91% 92%;--sidebar-accent-foreground: 191 91% 25%;--sidebar-border: 214 32% 88%;--sidebar-ring: 191 91% 37%;--success: 158 64% 40%;--warning: 38 92% 50%}.dark{--background: 226 49% 8%;--foreground: 220 40% 92%;--card: 220 44% 10%;--card-foreground: 220 40% 92%;--popover: 220 44% 12%;--popover-foreground: 220 40% 92%;--primary: 200 100% 67%;--primary-foreground: 226 49% 8%;--secondary: 220 30% 14%;--secondary-foreground: 220 20% 75%;--muted: 220 30% 12%;--muted-foreground: 220 12% 52%;--accent: 220 30% 14%;--accent-foreground: 220 40% 92%;--destructive: 0 72% 51%;--destructive-foreground: 220 40% 98%;--border: 220 28% 17%;--input: 220 28% 17%;--ring: 200 100% 67%;--success: 158 64% 52%;--warning: 38 92% 60%}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground));font-family:Satoshi,Inter,system-ui,-apple-system,sans-serif;font-feature-settings:"rlig" 1,"calt" 1;-webkit-font-smoothing:antialiased}.tabular-nums,[data-value],.kpi-value{font-family:JetBrains Mono,Fira Code,ui-monospace,monospace;font-variant-numeric:tabular-nums}::-webkit-scrollbar{width:4px;height:4px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:#252e41;border-radius:9999px}::-webkit-scrollbar-thumb:hover{background:#374562}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.-right-1{right:-.25rem}.-right-4{right:-1rem}.-top-1{top:-.25rem}.-top-4{top:-1rem}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.right-2{right:.5rem}.top-0{top:0}.top-1\/2{top:50%}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-1\.5{margin-right:.375rem}.mr-2{margin-right:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-auto{margin-top:auto}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.\!block{display:block!important}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-0\.5{height:.125rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-20{height:5rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-40{height:10rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.min-h-screen{min-height:100vh}.w-0\.5{width:.125rem}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-20{width:5rem}.w-24{width:6rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-60{width:15rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0px}.max-w-2xl{max-width:42rem}.max-w-\[100px\]{max-width:100px}.max-w-\[120px\]{max-width:120px}.max-w-\[160px\]{max-width:160px}.max-w-\[200px\]{max-width:200px}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-none{max-width:none}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.cursor-s-resize{cursor:s-resize}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-\[1fr_auto_auto_auto_auto\]{grid-template-columns:1fr auto auto auto auto}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-px{gap:1px}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-2\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.625rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.625rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-xl{border-radius:.75rem}.rounded-r-full{border-top-right-radius:9999px;border-bottom-right-radius:9999px}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-amber-500\/30{border-color:#f59e0b4d}.border-border{border-color:hsl(var(--border))}.border-border\/20{border-color:hsl(var(--border) / .2)}.border-border\/30{border-color:hsl(var(--border) / .3)}.border-border\/40{border-color:hsl(var(--border) / .4)}.border-border\/50{border-color:hsl(var(--border) / .5)}.border-border\/60{border-color:hsl(var(--border) / .6)}.border-border\/70{border-color:hsl(var(--border) / .7)}.border-destructive\/30{border-color:hsl(var(--destructive) / .3)}.border-emerald-500\/30{border-color:#10b9814d}.border-input{border-color:hsl(var(--input))}.border-primary\/20{border-color:hsl(var(--primary) / .2)}.bg-\[hsl\(222_44\%_7\%\)\]{--tw-bg-opacity: 1;background-color:hsl(222 44% 7% / var(--tw-bg-opacity, 1))}.bg-\[hsl\(var\(--success\)\)\]{background-color:hsl(var(--success))}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.bg-amber-500\/10{background-color:#f59e0b1a}.bg-amber-500\/20{background-color:#f59e0b33}.bg-background{background-color:hsl(var(--background))}.bg-black\/60{background-color:#0009}.bg-blue-500\/10{background-color:#3b82f61a}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-card\/95{background-color:hsl(var(--card) / .95)}.bg-destructive{background-color:hsl(var(--destructive))}.bg-destructive\/10{background-color:hsl(var(--destructive) / .1)}.bg-destructive\/20{background-color:hsl(var(--destructive) / .2)}.bg-destructive\/90{background-color:hsl(var(--destructive) / .9)}.bg-emerald-500{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity, 1))}.bg-emerald-500\/10{background-color:#10b9811a}.bg-emerald-500\/20{background-color:#10b98133}.bg-green-500\/10{background-color:#22c55e1a}.bg-muted{background-color:hsl(var(--muted))}.bg-muted-foreground{background-color:hsl(var(--muted-foreground))}.bg-muted\/30{background-color:hsl(var(--muted) / .3)}.bg-primary{background-color:hsl(var(--primary))}.bg-primary\/10{background-color:hsl(var(--primary) / .1)}.bg-primary\/15{background-color:hsl(var(--primary) / .15)}.bg-primary\/20{background-color:hsl(var(--primary) / .2)}.bg-primary\/5{background-color:hsl(var(--primary) / .05)}.bg-primary\/70{background-color:hsl(var(--primary) / .7)}.bg-primary\/90{background-color:hsl(var(--primary) / .9)}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-secondary\/80{background-color:hsl(var(--secondary) / .8)}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\/60{background-color:#fff9}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pt-0{padding-top:0}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[10px\]{font-size:10px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-none{line-height:1}.leading-tight{line-height:1.25}.tracking-\[0\.1em\]{letter-spacing:.1em}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-widest{letter-spacing:.1em}.text-\[hsl\(var\(--success\)\)\]{color:hsl(var(--success))}.text-accent-foreground{color:hsl(var(--accent-foreground))}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-current{color:currentColor}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-emerald-400{--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity, 1))}.text-foreground{color:hsl(var(--foreground))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-muted-foreground\/20{color:hsl(var(--muted-foreground) / .2)}.text-muted-foreground\/30{color:hsl(var(--muted-foreground) / .3)}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-primary\/80{color:hsl(var(--primary) / .8)}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-white\/40{color:#fff6}.text-white\/45{color:#ffffff73}.text-white\/60{color:#fff9}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-25{opacity:.25}.opacity-50{opacity:.5}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline{outline-style:solid}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-border{--tw-ring-color: hsl(var(--border))}.ring-primary\/15{--tw-ring-color: hsl(var(--primary) / .15)}.ring-primary\/20{--tw-ring-color: hsl(var(--primary) / .2)}.ring-primary\/25{--tw-ring-color: hsl(var(--primary) / .25)}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.panel-glow{box-shadow:0 0 0 1px hsl(var(--border)),0 4px 24px -4px #05080f99}.panel-glow-hover:hover{box-shadow:0 0 0 1px #57c7ff2e,0 8px 32px -4px #57c7ff14}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.last\:border-0:last-child{border-width:0px}.hover\:border-foreground\/30:hover{border-color:hsl(var(--foreground) / .3)}.hover\:border-primary\/50:hover{border-color:hsl(var(--primary) / .5)}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-destructive\/20:hover{background-color:hsl(var(--destructive) / .2)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-muted\/20:hover{background-color:hsl(var(--muted) / .2)}.hover\:bg-muted\/30:hover{background-color:hsl(var(--muted) / .3)}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-muted\/80:hover{background-color:hsl(var(--muted) / .8)}.hover\:bg-primary:hover{background-color:hsl(var(--primary))}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:bg-white\/5:hover{background-color:#ffffff0d}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-primary:hover{color:hsl(var(--primary))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-90:hover{opacity:.9}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-primary:focus{--tw-ring-color: hsl(var(--primary))}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.active\:cursor-grabbing:active{cursor:grabbing}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:border-primary{border-color:hsl(var(--primary))}.group:hover .group-hover\:text-primary{color:hsl(var(--primary))}.group:hover .group-hover\:text-white\/70{color:#ffffffb3}.group:hover .group-hover\:opacity-100{opacity:1}.dark\:block:is(.dark *){display:block}.dark\:hidden:is(.dark *){display:none}@media (min-width: 640px){.sm\:block{display:block}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width: 768px){.md\:block{display:block}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width: 1024px){.lg\:relative{position:relative}.lg\:block{display:block}.lg\:hidden{display:none}.lg\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width: 1280px){.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}} diff --git a/src/static/assets/index-CS_oOq1J.css b/src/static/assets/index-CS_oOq1J.css new file mode 100644 index 0000000..81e853a --- /dev/null +++ b/src/static/assets/index-CS_oOq1J.css @@ -0,0 +1 @@ +@import"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap";*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background: 220 33% 96%;--foreground: 222 47% 11%;--card: 0 0% 100%;--card-foreground: 222 47% 11%;--popover: 0 0% 100%;--popover-foreground: 222 47% 11%;--primary: 25 95% 53%;--primary-foreground: 0 0% 100%;--secondary: 200 85% 50%;--secondary-foreground: 0 0% 100%;--muted: 220 20% 93%;--muted-foreground: 215 20% 48%;--accent: 25 100% 96%;--accent-foreground: 25 95% 40%;--destructive: 0 84% 60%;--destructive-foreground: 0 0% 100%;--border: 220 20% 88%;--input: 220 20% 88%;--ring: 25 95% 53%;--radius: .75rem;--success: 142 71% 45%;--warning: 38 92% 50%}.dark{--background: 226 49% 8%;--foreground: 220 40% 92%;--card: 220 44% 10%;--card-foreground: 220 40% 92%;--popover: 220 44% 12%;--popover-foreground: 220 40% 92%;--primary: 25 95% 60%;--primary-foreground: 226 49% 8%;--secondary: 200 85% 55%;--secondary-foreground: 226 49% 8%;--muted: 220 30% 14%;--muted-foreground: 220 12% 52%;--accent: 220 30% 14%;--accent-foreground: 220 40% 92%;--destructive: 0 72% 51%;--destructive-foreground: 220 40% 98%;--border: 220 28% 17%;--input: 220 28% 17%;--ring: 25 95% 60%;--success: 158 64% 52%;--warning: 38 92% 60%}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground));font-family:Inter,system-ui,-apple-system,sans-serif;font-feature-settings:"rlig" 1,"calt" 1;-webkit-font-smoothing:antialiased}.tabular-nums,[data-value],.kpi-value{font-family:JetBrains Mono,ui-monospace,monospace;font-variant-numeric:tabular-nums}::-webkit-scrollbar{width:4px;height:4px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:#c2c9d6;border-radius:9999px}::-webkit-scrollbar-thumb:hover{background:#9da8be}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.-right-1{right:-.25rem}.-right-4{right:-1rem}.-top-1{top:-.25rem}.-top-4{top:-1rem}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.right-2{right:.5rem}.top-0{top:0}.top-1\/2{top:50%}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-1\.5{margin-right:.375rem}.mr-2{margin-right:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-auto{margin-top:auto}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.\!block{display:block!important}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-0\.5{height:.125rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-20{height:5rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-40{height:10rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.min-h-screen{min-height:100vh}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-60{width:15rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0px}.max-w-2xl{max-width:42rem}.max-w-\[100px\]{max-width:100px}.max-w-\[120px\]{max-width:120px}.max-w-\[160px\]{max-width:160px}.max-w-\[200px\]{max-width:200px}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-none{max-width:none}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.table-fixed{table-layout:fixed}.border-collapse{border-collapse:collapse}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.cursor-s-resize{cursor:s-resize}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-\[1fr_auto_auto_auto_auto\]{grid-template-columns:1fr auto auto auto auto}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-px{gap:1px}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-2\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.625rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.625rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-xl{border-radius:.75rem}.rounded-r-full{border-top-right-radius:9999px;border-bottom-right-radius:9999px}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-amber-500\/30{border-color:#f59e0b4d}.border-blue-100{--tw-border-opacity: 1;border-color:rgb(219 234 254 / var(--tw-border-opacity, 1))}.border-border{border-color:hsl(var(--border))}.border-border\/20{border-color:hsl(var(--border) / .2)}.border-border\/30{border-color:hsl(var(--border) / .3)}.border-border\/40{border-color:hsl(var(--border) / .4)}.border-border\/50{border-color:hsl(var(--border) / .5)}.border-border\/60{border-color:hsl(var(--border) / .6)}.border-border\/70{border-color:hsl(var(--border) / .7)}.border-destructive\/30{border-color:hsl(var(--destructive) / .3)}.border-emerald-100{--tw-border-opacity: 1;border-color:rgb(209 250 229 / var(--tw-border-opacity, 1))}.border-emerald-500\/30{border-color:#10b9814d}.border-input{border-color:hsl(var(--input))}.border-primary\/20{border-color:hsl(var(--primary) / .2)}.border-slate-100{--tw-border-opacity: 1;border-color:rgb(241 245 249 / var(--tw-border-opacity, 1))}.border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1))}.border-slate-200\/80{border-color:#e2e8f0cc}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.bg-amber-500\/10{background-color:#f59e0b1a}.bg-amber-500\/20{background-color:#f59e0b33}.bg-background{background-color:hsl(var(--background))}.bg-black\/60{background-color:#0009}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-destructive\/10{background-color:hsl(var(--destructive) / .1)}.bg-destructive\/20{background-color:hsl(var(--destructive) / .2)}.bg-destructive\/90{background-color:hsl(var(--destructive) / .9)}.bg-emerald-400{--tw-bg-opacity: 1;background-color:rgb(52 211 153 / var(--tw-bg-opacity, 1))}.bg-emerald-50{--tw-bg-opacity: 1;background-color:rgb(236 253 245 / var(--tw-bg-opacity, 1))}.bg-emerald-500{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity, 1))}.bg-emerald-500\/10{background-color:#10b9811a}.bg-emerald-500\/20{background-color:#10b98133}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/30{background-color:hsl(var(--muted) / .3)}.bg-orange-50{--tw-bg-opacity: 1;background-color:rgb(255 247 237 / var(--tw-bg-opacity, 1))}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity, 1))}.bg-primary{background-color:hsl(var(--primary))}.bg-primary\/10{background-color:hsl(var(--primary) / .1)}.bg-primary\/15{background-color:hsl(var(--primary) / .15)}.bg-primary\/20{background-color:hsl(var(--primary) / .2)}.bg-primary\/5{background-color:hsl(var(--primary) / .05)}.bg-primary\/70{background-color:hsl(var(--primary) / .7)}.bg-primary\/90{background-color:hsl(var(--primary) / .9)}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-secondary\/80{background-color:hsl(var(--secondary) / .8)}.bg-slate-300{--tw-bg-opacity: 1;background-color:rgb(203 213 225 / var(--tw-bg-opacity, 1))}.bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\/60{background-color:#fff9}.bg-white\/80{background-color:#fffc}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.from-orange-400{--tw-gradient-from: #fb923c var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 146 60 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-orange-600{--tw-gradient-to: #ea580c var(--tw-gradient-to-position)}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pt-0{padding-top:0}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-none{line-height:1}.leading-tight{line-height:1.25}.tracking-\[0\.1em\]{letter-spacing:.1em}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-widest{letter-spacing:.1em}.text-\[hsl\(var\(--success\)\)\]{color:hsl(var(--success))}.text-accent-foreground{color:hsl(var(--accent-foreground))}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-current{color:currentColor}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-emerald-400{--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity, 1))}.text-emerald-600{--tw-text-opacity: 1;color:rgb(5 150 105 / var(--tw-text-opacity, 1))}.text-foreground{color:hsl(var(--foreground))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-muted-foreground\/20{color:hsl(var(--muted-foreground) / .2)}.text-muted-foreground\/30{color:hsl(var(--muted-foreground) / .3)}.text-orange-500{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.text-orange-600{--tw-text-opacity: 1;color:rgb(234 88 12 / var(--tw-text-opacity, 1))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-primary\/80{color:hsl(var(--primary) / .8)}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-slate-800{--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-25{opacity:.25}.opacity-50{opacity:.5}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-emerald-200{--tw-shadow-color: #a7f3d0;--tw-shadow: var(--tw-shadow-colored)}.shadow-orange-200{--tw-shadow-color: #fed7aa;--tw-shadow: var(--tw-shadow-colored)}.shadow-slate-100\/60{--tw-shadow-color: rgb(241 245 249 / .6);--tw-shadow: var(--tw-shadow-colored)}.outline{outline-style:solid}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-border{--tw-ring-color: hsl(var(--border))}.ring-primary\/15{--tw-ring-color: hsl(var(--primary) / .15)}.ring-primary\/25{--tw-ring-color: hsl(var(--primary) / .25)}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-xl{--tw-backdrop-blur: blur(24px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.glass-card{background:#ffffffb8;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border:1px solid rgba(255,255,255,.85);box-shadow:0 1px 3px #0000000f,0 8px 32px #0000000f}.panel-glow{box-shadow:0 1px 3px #0000000f,0 8px 32px #0000000f;border:1px solid rgba(255,255,255,.9)}.dark .panel-glow{box-shadow:0 0 0 1px hsl(var(--border)),0 4px 24px -4px #05080f99;border-color:hsl(var(--border))}.panel-glow-hover:hover{box-shadow:0 4px 24px #f973161f,0 1px 3px #0000000f;border-color:#f9731640;transition:all .2s ease}@keyframes fadeIn{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@keyframes slideUp{0%{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground\/60::-moz-placeholder{color:hsl(var(--muted-foreground) / .6)}.placeholder\:text-muted-foreground\/60::placeholder{color:hsl(var(--muted-foreground) / .6)}.last\:border-0:last-child{border-width:0px}.hover\:border-foreground\/30:hover{border-color:hsl(var(--foreground) / .3)}.hover\:border-primary\/50:hover{border-color:hsl(var(--primary) / .5)}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-blue-50:hover{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.hover\:bg-destructive\/20:hover{background-color:hsl(var(--destructive) / .2)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-muted\/20:hover{background-color:hsl(var(--muted) / .2)}.hover\:bg-muted\/30:hover{background-color:hsl(var(--muted) / .3)}.hover\:bg-muted\/40:hover{background-color:hsl(var(--muted) / .4)}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-muted\/80:hover{background-color:hsl(var(--muted) / .8)}.hover\:bg-orange-50:hover{--tw-bg-opacity: 1;background-color:rgb(255 247 237 / var(--tw-bg-opacity, 1))}.hover\:bg-primary:hover{background-color:hsl(var(--primary))}.hover\:bg-primary\/30:hover{background-color:hsl(var(--primary) / .3)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:bg-slate-50:hover{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1))}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-blue-500:hover{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-orange-500:hover{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.hover\:text-primary:hover{color:hsl(var(--primary))}.hover\:text-slate-700:hover{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.hover\:text-slate-800:hover{--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:opacity-90:hover{opacity:.9}.focus\:border-primary:focus{border-color:hsl(var(--primary))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-primary:focus{--tw-ring-color: hsl(var(--primary))}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.active\:cursor-grabbing:active{cursor:grabbing}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:border-primary{border-color:hsl(var(--primary))}.group:hover .group-hover\:text-primary{color:hsl(var(--primary))}.group:hover .group-hover\:text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:opacity-100{opacity:1}.group:hover .group-hover\:opacity-40{opacity:.4}.dark\:block:is(.dark *){display:block}.dark\:hidden:is(.dark *){display:none}@media (min-width: 640px){.sm\:block{display:block}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width: 768px){.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width: 1024px){.lg\:relative{position:relative}.lg\:hidden{display:none}.lg\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width: 1280px){.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}} diff --git a/src/static/assets/index-BP_aNEdP.js b/src/static/assets/index-DVV3ZbZ2.js similarity index 99% rename from src/static/assets/index-BP_aNEdP.js rename to src/static/assets/index-DVV3ZbZ2.js index 00320c9..abaf43e 100644 --- a/src/static/assets/index-BP_aNEdP.js +++ b/src/static/assets/index-DVV3ZbZ2.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LoginView-Bp6PnQyZ.js","assets/CardContent.vue_vue_type_script_setup_true_lang-B8VjSxLa.js","assets/utils-7WVCegLb.js","assets/DashboardView-CEeTSEhN.js","assets/dashboard-CviKGUv7.js","assets/CardTitle.vue_vue_type_script_setup_true_lang-KH4UhlTi.js","assets/Progress.vue_vue_type_script_setup_true_lang-sI-MERcU.js","assets/Button.vue_vue_type_script_setup_true_lang-B_YE_XNW.js","assets/Spinner.vue_vue_type_script_setup_true_lang-Cu49-Cc4.js","assets/tasks-OhvhAG_3.js","assets/devops-DxRDHPW5.js","assets/CalendarView-njGDFx7r.js","assets/_plugin-vue_export-helper-DlAUqK2U.js","assets/Badge.vue_vue_type_script_setup_true_lang-B2H6z2RD.js","assets/Dialog.vue_vue_type_script_setup_true_lang-v8iqnRk8.js","assets/Input.vue_vue_type_script_setup_true_lang-SeygKlpx.js","assets/CalendarView-DRWiX2N8.css","assets/ProjectsView-DEY2YtRe.js","assets/ProjectDetailView-9CL5OHue.js","assets/LiveView-1BXLV--t.js","assets/ReportsView-DvsVoXsC.js","assets/ReportsView-ChihzSMD.css","assets/KeysView-DJ0U5kZP.js","assets/admin-C27haAMd.js","assets/DevopsView-sHwtWFcb.js","assets/DevopsConnectForm.vue_vue_type_script_setup_true_lang-DQc_dk7n.js","assets/SettingsView-Bj_8ZT0B.js","assets/AdminView-RdxNbXY6.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LoginView-BX1BQo9f.js","assets/CardContent.vue_vue_type_script_setup_true_lang-DdGXaWEa.js","assets/utils-7WVCegLb.js","assets/DashboardView-BsUJ2kCa.js","assets/dashboard-CxPPoZJ0.js","assets/CardTitle.vue_vue_type_script_setup_true_lang-CT9DRTds.js","assets/Progress.vue_vue_type_script_setup_true_lang-vRzAaLns.js","assets/Button.vue_vue_type_script_setup_true_lang-ClV4YfXb.js","assets/Spinner.vue_vue_type_script_setup_true_lang-BkmDerVR.js","assets/tasks-Dr7jFVHn.js","assets/devops-HjUgCfao.js","assets/CalendarView-9h-6kWBL.js","assets/_plugin-vue_export-helper-DlAUqK2U.js","assets/Badge.vue_vue_type_script_setup_true_lang-WigJUOyH.js","assets/Dialog.vue_vue_type_script_setup_true_lang-CSPK-Rcg.js","assets/Input.vue_vue_type_script_setup_true_lang-BM1xhrlf.js","assets/CalendarView-bLogQo28.css","assets/ProjectsView-B6APDx1k.js","assets/ProjectDetailView-CdSz2pYH.js","assets/LiveView-DtdoVW56.js","assets/ReportsView-g7JsvGXC.js","assets/ReportsView-CgmFyw5q.css","assets/KeysView-Bo8BcbFR.js","assets/admin-xS9EtPqv.js","assets/DevopsView-BtWCUdc6.js","assets/DevopsConnectForm.vue_vue_type_script_setup_true_lang-5nCaOxp1.js","assets/SettingsView-DINReUal.js","assets/AdminView-Bw7ch0XQ.js"])))=>i.map(i=>d[i]); var zl=n=>{throw TypeError(n)};var sa=(n,e,t)=>e.has(n)||zl("Cannot "+t);var k=(n,e,t)=>(sa(n,e,"read from private field"),t?t.call(n):e.get(n)),ye=(n,e,t)=>e.has(n)?zl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),se=(n,e,t,r)=>(sa(n,e,"write to private field"),r?r.call(n,t):e.set(n,t),t),lt=(n,e,t)=>(sa(n,e,"access private method"),t);var Pi=(n,e,t,r)=>({set _(o){se(n,e,o,t)},get _(){return k(n,e,r)}});(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function t(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=t(o);fetch(o.href,i)}})();/** * @vue/shared v3.5.34 * (c) 2018-present Yuxi (Evan) You and Vue contributors @@ -41,4 +41,4 @@ Error Description: ${i.errorMessage}`);else{const s=i;this.logger.error(`A non-M Error: ${s.name} Error Description: ${s.message}`)}return null}return r||(this.logger.warning("The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request."),this.logger.verbose("Creating custom Authority for custom domain scenario."),r=pt.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),r}isInKnownAuthorities(){return this.authorityOptions.knownAuthorities.filter(t=>t&&ve.getDomainFromUrl(t).toLowerCase()===this.hostnameAndPort).length>0}static generateAuthority(e,t){let r;if(t&&t.azureCloudInstance!==hl.None){const o=t.tenant?t.tenant:R.DEFAULT_COMMON_TENANT;r=`${t.azureCloudInstance}/${o}/`}return r||e}static createCloudDiscoveryMetadataFromHost(e){return{preferred_network:e,preferred_cache:e,aliases:[e]}}getPreferredCache(){if(this.managedIdentity)return R.DEFAULT_AUTHORITY_HOST;if(this.discoveryComplete())return this.metadata.preferred_cache;throw H(Mn)}isAlias(e){return this.metadata.aliases.indexOf(e)>-1}isAliasOfKnownMicrosoftAuthority(e){return cp.has(e)}static isPublicCloudAuthority(e){return R.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0}static buildRegionalAuthorityString(e,t,r){const o=new ve(e);o.validateAsUri();const i=o.getUrlComponents();let s=`${t}.${i.HostNameAndPort}`;this.isPublicCloudAuthority(i.HostNameAndPort)&&(s=`${t}.${R.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX}`);const a=ve.constructAuthorityUriFromObject({...o.getUrlComponents(),HostNameAndPort:s}).urlString;return r?`${a}?${r}`:a}static replaceWithRegionalInformation(e,t){const r={...e};return r.authorization_endpoint=pt.buildRegionalAuthorityString(r.authorization_endpoint,t),r.token_endpoint=pt.buildRegionalAuthorityString(r.token_endpoint,t),r.end_session_endpoint&&(r.end_session_endpoint=pt.buildRegionalAuthorityString(r.end_session_endpoint,t)),r}static transformCIAMAuthority(e){let t=e;const o=new ve(e).getUrlComponents();if(o.PathSegments.length===0&&o.HostNameAndPort.endsWith(R.CIAM_AUTH_URL)){const i=o.HostNameAndPort.split(".")[0];t=`${t}${i}${R.AAD_TENANT_DOMAIN_SUFFIX}`}return t}}pt.reservedTenantDomains=new Set(["{tenant}","{tenantid}",ur.COMMON,ur.CONSUMERS,ur.ORGANIZATIONS]);function Z_(n){var o;const r=(o=new ve(n).getUrlComponents().PathSegments.slice(-1)[0])==null?void 0:o.toLowerCase();switch(r){case ur.COMMON:case ur.ORGANIZATIONS:case ur.CONSUMERS:return;default:return r}}function hp(n){return n.endsWith(R.FORWARD_SLASH)?n:`${n}${R.FORWARD_SLASH}`}function eb(n){const e=n.cloudDiscoveryMetadata;let t;if(e)try{t=JSON.parse(e)}catch{throw xe(ml)}return{canonicalAuthority:n.authority?hp(n.authority):void 0,knownAuthorities:n.knownAuthorities,cloudDiscoveryMetadata:t}}/*! @azure/msal-common v14.16.1 2025-08-05 */async function fp(n,e,t,r,o,i,s){s==null||s.addQueueMeasurement(_.AuthorityFactoryCreateDiscoveredInstance,i);const a=pt.transformCIAMAuthority(hp(n)),c=new pt(a,e,t,r,o,i,s);try{return await q(c.resolveEndpointsAsync.bind(c),_.AuthorityResolveEndpointsAsync,o,s,i)(),c}catch{throw H(Mn)}}/*! @azure/msal-common v14.16.1 2025-08-05 */class fr extends Fe{constructor(e,t,r,o,i){super(e,t,r),this.name="ServerError",this.errorNo=o,this.status=i,Object.setPrototypeOf(this,fr.prototype)}}/*! @azure/msal-common v14.16.1 2025-08-05 */class Tn{static generateThrottlingStorageKey(e){return`${ei.THROTTLING_PREFIX}.${JSON.stringify(e)}`}static preProcess(e,t,r){var s;const o=Tn.generateThrottlingStorageKey(t),i=e.getThrottlingCache(o);if(i){if(i.throttleTime=500&&e.status<600}static checkResponseForRetryAfter(e){return e.headers?e.headers.hasOwnProperty(bt.RETRY_AFTER)&&(e.status<200||e.status>=300):!1}static calculateThrottleTime(e){const t=e<=0?0:e,r=Date.now()/1e3;return Math.floor(Math.min(r+(t||ei.DEFAULT_THROTTLE_TIME_SECONDS),r+ei.DEFAULT_MAX_THROTTLE_TIME_SECONDS)*1e3)}static removeThrottle(e,t,r,o){const i={clientId:t,authority:r.authority,scopes:r.scopes,homeAccountIdentifier:o,claims:r.claims,authenticationScheme:r.authenticationScheme,resourceRequestMethod:r.resourceRequestMethod,resourceRequestUri:r.resourceRequestUri,shrClaims:r.shrClaims,sshKid:r.sshKid},s=this.generateThrottlingStorageKey(i);e.removeItem(s,r.correlationId)}}/*! @azure/msal-common v14.16.1 2025-08-05 */class Zs extends Fe{constructor(e,t,r){super(e.errorCode,e.errorMessage,e.subError),Object.setPrototypeOf(this,Zs.prototype),this.name="NetworkError",this.error=e,this.httpStatus=t,this.responseHeaders=r}}function Kd(n,e,t){return new Zs(n,e,t)}/*! @azure/msal-common v14.16.1 2025-08-05 */class _l{constructor(e,t){this.config=u_(e),this.logger=new hr(this.config.loggerOptions,qg,dl),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority,this.performanceClient=t}createTokenRequestHeaders(e){const t={};if(t[bt.CONTENT_TYPE]=R.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&e)switch(e.type){case Kt.HOME_ACCOUNT_ID:try{const r=no(e.credential);t[bt.CCS_HEADER]=`Oid:${r.uid}@${r.utid}`}catch(r){this.logger.verbose("Could not parse home account ID for CCS Header: "+r)}break;case Kt.UPN:t[bt.CCS_HEADER]=`UPN: ${e.credential}`;break}return t}async executePostToTokenEndpoint(e,t,r,o,i,s){var c;s&&((c=this.performanceClient)==null||c.addQueueMeasurement(s,i));const a=await this.sendPostRequest(o,e,{body:t,headers:r},i);return this.config.serverTelemetryManager&&a.status<500&&a.status!==429&&this.config.serverTelemetryManager.clearTelemetryCache(),a}async sendPostRequest(e,t,r,o){var s,a,c;Tn.preProcess(this.cacheManager,e,o);let i;try{i=await q(this.networkClient.sendPostRequestAsync.bind(this.networkClient),_.NetworkClientSendPostRequestAsync,this.logger,this.performanceClient,o)(t,r);const l=i.headers||{};(a=this.performanceClient)==null||a.addFields({refreshTokenSize:((s=i.body.refresh_token)==null?void 0:s.length)||0,httpVerToken:l[bt.X_MS_HTTP_VERSION]||"",requestId:l[bt.X_MS_REQUEST_ID]||""},o)}catch(l){if(l instanceof Zs){const u=l.responseHeaders;throw u&&((c=this.performanceClient)==null||c.addFields({httpVerToken:u[bt.X_MS_HTTP_VERSION]||"",requestId:u[bt.X_MS_REQUEST_ID]||"",contentTypeHeader:u[bt.CONTENT_TYPE]||void 0,contentLengthHeader:u[bt.CONTENT_LENGTH]||void 0,httpStatus:l.httpStatus},o)),l.error}throw l instanceof Fe?l:H(Rg)}return Tn.postProcess(this.cacheManager,e,i,o),i}async updateAuthority(e,t){var i;(i=this.performanceClient)==null||i.addQueueMeasurement(_.UpdateTokenEndpointAuthority,t);const r=`https://${e}/${this.authority.tenant}/`,o=await fp(r,this.networkClient,this.cacheManager,this.authority.options,this.logger,t,this.performanceClient);this.authority=o}createTokenQueryParameters(e){const t=new ti(e.correlationId,this.performanceClient);return e.embeddedClientId&&t.addBrokerParameters({brokerClientId:this.config.authOptions.clientId,brokerRedirectUri:this.config.authOptions.redirectUri}),e.tokenQueryParameters&&t.addExtraQueryParameters(e.tokenQueryParameters),t.addCorrelationId(e.correlationId),t.createQueryString()}}/*! @azure/msal-common v14.16.1 2025-08-05 */const vs="no_tokens_found",gp="native_account_unavailable",bl="refresh_token_expired",tb="interaction_required",nb="consent_required",rb="login_required",ea="bad_token";/*! @azure/msal-common v14.16.1 2025-08-05 */const qd=[tb,nb,rb,ea],ob=["message_only","additional_action","basic_action","user_password_expired","consent_required","bad_token"],ib={[vs]:"No refresh token found in the cache. Please sign-in.",[gp]:"The requested account is not available in the native broker. It may have been deleted or logged out. Please sign-in again using an interactive API.",[bl]:"Refresh token has expired.",[ea]:"Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve."};class cn extends Fe{constructor(e,t,r,o,i,s,a,c){super(e,t,r),Object.setPrototypeOf(this,cn.prototype),this.timestamp=o||R.EMPTY_STRING,this.traceId=i||R.EMPTY_STRING,this.correlationId=s||R.EMPTY_STRING,this.claims=a||R.EMPTY_STRING,this.name="InteractionRequiredAuthError",this.errorNo=c}}function $d(n,e,t){const r=!!n&&qd.indexOf(n)>-1,o=!!t&&ob.indexOf(t)>-1,i=!!e&&qd.some(s=>e.indexOf(s)>-1);return r||i||o}function Cc(n){return new cn(n,ib[n])}/*! @azure/msal-common v14.16.1 2025-08-05 */class nn{static setRequestState(e,t,r){const o=nn.generateLibraryState(e,r);return t?`${o}${R.RESOURCE_DELIM}${t}`:o}static generateLibraryState(e,t){if(!e)throw H(fc);const r={id:e.createNewGuid()};t&&(r.meta=t);const o=JSON.stringify(r);return e.base64Encode(o)}static parseRequestState(e,t){if(!e)throw H(fc);if(!t)throw H(_o);try{const r=t.split(R.RESOURCE_DELIM),o=r[0],i=r.length>1?r.slice(1).join(R.RESOURCE_DELIM):R.EMPTY_STRING,s=e.base64Decode(o),a=JSON.parse(s);return{userRequestState:i||R.EMPTY_STRING,libraryState:a}}catch{throw H(_o)}}}/*! @azure/msal-common v14.16.1 2025-08-05 */const sb={SW:"sw"};class Io{constructor(e,t){this.cryptoUtils=e,this.performanceClient=t}async generateCnf(e,t){var i;(i=this.performanceClient)==null||i.addQueueMeasurement(_.PopTokenGenerateCnf,e.correlationId);const r=await q(this.generateKid.bind(this),_.PopTokenGenerateCnf,t,this.performanceClient,e.correlationId)(e),o=this.cryptoUtils.base64UrlEncode(JSON.stringify(r));return{kid:r.kid,reqCnfString:o}}async generateKid(e){var r;return(r=this.performanceClient)==null||r.addQueueMeasurement(_.PopTokenGenerateKid,e.correlationId),{kid:await this.cryptoUtils.getPublicKeyThumbprint(e),xms_ksl:sb.SW}}async signPopToken(e,t,r){return this.signPayload(e,t,r)}async signPayload(e,t,r,o){const{resourceRequestMethod:i,resourceRequestUri:s,shrClaims:a,shrNonce:c,shrOptions:l}=r,u=s?new ve(s):void 0,d=u==null?void 0:u.getUrlComponents();return this.cryptoUtils.signJwt({at:e,ts:bn(),m:i==null?void 0:i.toUpperCase(),u:d==null?void 0:d.HostNameAndPort,nonce:c||this.cryptoUtils.createNewGuid(),p:d==null?void 0:d.AbsolutePath,q:d!=null&&d.QueryString?[[],d.QueryString]:void 0,client_claims:a||void 0,...o},t,l,r.correlationId)}}/*! @azure/msal-common v14.16.1 2025-08-05 */class ab{constructor(e,t){this.cache=e,this.hasChanged=t}get cacheHasChanged(){return this.hasChanged}get tokenCache(){return this.cache}}/*! @azure/msal-common v14.16.1 2025-08-05 */function cb(n){var r,o;const e="code=",t=(r=n.error_uri)==null?void 0:r.lastIndexOf(e);return t&&t>=0?(o=n.error_uri)==null?void 0:o.substring(t+e.length):void 0}class Hr{constructor(e,t,r,o,i,s,a){this.clientId=e,this.cacheStorage=t,this.cryptoObj=r,this.logger=o,this.serializableCache=i,this.persistencePlugin=s,this.performanceClient=a}validateServerAuthorizationCodeResponse(e,t){if(!e.state||!t)throw e.state?H(fs,"Cached State"):H(fs,"Server State");let r,o;try{r=decodeURIComponent(e.state)}catch{throw H(_o,e.state)}try{o=decodeURIComponent(t)}catch{throw H(_o,e.state)}if(r!==o)throw H(Pg);if(e.error||e.error_description||e.suberror){const i=cb(e);throw $d(e.error,e.error_description,e.suberror)?new cn(e.error||"",e.error_description,e.suberror,e.timestamp||"",e.trace_id||"",e.correlation_id||"",e.claims||"",i):new fr(e.error||"",e.error_description,e.suberror,i)}}validateTokenResponse(e,t){var r;if(e.error||e.error_description||e.suberror){const o=`Error(s): ${e.error_codes||R.NOT_AVAILABLE} - Timestamp: ${e.timestamp||R.NOT_AVAILABLE} - Description: ${e.error_description||R.NOT_AVAILABLE} - Correlation ID: ${e.correlation_id||R.NOT_AVAILABLE} - Trace ID: ${e.trace_id||R.NOT_AVAILABLE}`,i=(r=e.error_codes)!=null&&r.length?e.error_codes[0]:void 0,s=new fr(e.error,o,e.suberror,i,e.status);if(t&&e.status&&e.status>=Fi.SERVER_ERROR_RANGE_START&&e.status<=Fi.SERVER_ERROR_RANGE_END){this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently unavailable and the access token is unable to be refreshed. ${s}`);return}else if(t&&e.status&&e.status>=Fi.CLIENT_ERROR_RANGE_START&&e.status<=Fi.CLIENT_ERROR_RANGE_END){this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently available but is unable to refresh the access token. -${s}`);return}throw $d(e.error,e.error_description,e.suberror)?new cn(e.error,e.error_description,e.suberror,e.timestamp||R.EMPTY_STRING,e.trace_id||R.EMPTY_STRING,e.correlation_id||R.EMPTY_STRING,e.claims||R.EMPTY_STRING,i):s}}async handleServerTokenResponse(e,t,r,o,i,s,a,c,l){var C;(C=this.performanceClient)==null||C.addQueueMeasurement(_.HandleServerTokenResponse,e.correlation_id);let u;if(e.id_token){if(u=qr(e.id_token||R.EMPTY_STRING,this.cryptoObj.base64Decode),i&&i.nonce&&u.nonce!==i.nonce)throw H(Ng);if(o.maxAge||o.maxAge===0){const p=u.auth_time;if(!p)throw H(al);$g(p,o.maxAge)}}this.homeAccountIdentifier=rt.generateHomeAccountId(e.client_info||R.EMPTY_STRING,t.authorityType,this.logger,this.cryptoObj,u);let d;i&&i.state&&(d=nn.parseRequestState(this.cryptoObj,i.state)),e.key_id=e.key_id||o.sshKid||void 0;const h=this.generateCacheRecord(e,t,r,o,u,s,i);let f;try{if(this.persistencePlugin&&this.serializableCache&&(this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),f=new ab(this.serializableCache,!0),await this.persistencePlugin.beforeCacheAccess(f)),a&&!c&&h.account){const p=h.account.generateAccountKey();if(!this.cacheStorage.getAccount(p,o.correlationId,this.logger))return this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"),await Hr.generateAuthenticationResult(this.cryptoObj,t,h,!1,o,u,d,void 0,l)}await this.cacheStorage.saveCacheRecord(h,o.correlationId,o.storeInCache)}finally{this.persistencePlugin&&this.serializableCache&&f&&(this.logger.verbose("Persistence enabled, calling afterCacheAccess"),await this.persistencePlugin.afterCacheAccess(f))}return Hr.generateAuthenticationResult(this.cryptoObj,t,h,!1,o,u,d,e,l)}generateCacheRecord(e,t,r,o,i,s,a){const c=t.getPreferredCache();if(!c)throw H(ll);const l=ip(i);let u,d;e.id_token&&i&&(u=Ws(this.homeAccountIdentifier,c,e.id_token,this.clientId,l||""),d=Il(this.cacheStorage,t,this.homeAccountIdentifier,this.cryptoObj.base64Decode,o.correlationId,i,e.client_info,c,l,a,void 0,this.logger));let h=null;if(e.access_token){const p=e.scope?Ye.fromString(e.scope):new Ye(o.scopes||[]),v=(typeof e.expires_in=="string"?parseInt(e.expires_in,10):e.expires_in)||0,E=(typeof e.ext_expires_in=="string"?parseInt(e.ext_expires_in,10):e.ext_expires_in)||0,b=(typeof e.refresh_in=="string"?parseInt(e.refresh_in,10):e.refresh_in)||void 0,y=r+v,T=y+E,N=b&&b>0?r+b:void 0;h=Ys(this.homeAccountIdentifier,c,e.access_token,this.clientId,l||t.tenant||"",p.printScopes(),y,T,this.cryptoObj.base64Decode,N,e.token_type,s,e.key_id,o.claims,o.requestedClaimsHash)}let f=null;if(e.refresh_token){let p;if(e.refresh_token_expires_in){const v=typeof e.refresh_token_expires_in=="string"?parseInt(e.refresh_token_expires_in,10):e.refresh_token_expires_in;p=r+v}f=jg(this.homeAccountIdentifier,c,e.refresh_token,this.clientId,e.foci,s,p)}let C=null;return e.foci&&(C={clientId:this.clientId,environment:c,familyId:e.foci}),{account:d,idToken:u,accessToken:h,refreshToken:f,appMetadata:C}}static async generateAuthenticationResult(e,t,r,o,i,s,a,c,l){var y,T,N,z,B;let u=R.EMPTY_STRING,d=[],h=null,f,C,p=R.EMPTY_STRING;if(r.accessToken){if(r.accessToken.tokenType===Ne.POP&&!i.popKid){const F=new Io(e),{secret:O,keyId:Q}=r.accessToken;if(!Q)throw H(ul);u=await F.signPopToken(O,Q,i)}else u=r.accessToken.secret;d=Ye.fromString(r.accessToken.target).asArray(),h=new Date(Number(r.accessToken.expiresOn)*1e3),f=new Date(Number(r.accessToken.extendedExpiresOn)*1e3),r.accessToken.refreshOn&&(C=new Date(Number(r.accessToken.refreshOn)*1e3))}r.appMetadata&&(p=r.appMetadata.familyId===Zo?Zo:"");const v=(s==null?void 0:s.oid)||(s==null?void 0:s.sub)||"",E=(s==null?void 0:s.tid)||"";c!=null&&c.spa_accountid&&r.account&&(r.account.nativeAccountId=c==null?void 0:c.spa_accountid);const b=r.account?vl(r.account.getAccountInfo(),void 0,s,(y=r.idToken)==null?void 0:y.secret):null;return{authority:t.canonicalAuthority,uniqueId:v,tenantId:E,scopes:d,account:b,idToken:((T=r==null?void 0:r.idToken)==null?void 0:T.secret)||"",idTokenClaims:s||{},accessToken:u,fromCache:o,expiresOn:h,extExpiresOn:f,refreshOn:C,correlationId:i.correlationId,requestId:l||R.EMPTY_STRING,familyId:p,tokenType:((N=r.accessToken)==null?void 0:N.tokenType)||R.EMPTY_STRING,state:a?a.userRequestState:R.EMPTY_STRING,cloudGraphHostName:((z=r.account)==null?void 0:z.cloudGraphHostName)||R.EMPTY_STRING,msGraphHost:((B=r.account)==null?void 0:B.msGraphHost)||R.EMPTY_STRING,code:c==null?void 0:c.spa_code,fromNativeBroker:!1}}}function Il(n,e,t,r,o,i,s,a,c,l,u,d){d==null||d.verbose("setCachedAccount called");const f=n.getAccountKeys().find(b=>b.startsWith(t));let C=null;f&&(C=n.getAccount(f,o,d));const p=C||rt.createAccount({homeAccountId:t,idTokenClaims:i,clientInfo:s,environment:a,cloudGraphHostName:l==null?void 0:l.cloud_graph_host_name,msGraphHost:l==null?void 0:l.msgraph_host,nativeAccountId:u},e,r),v=p.tenantProfiles||[],E=c||p.realm;if(E&&!v.find(b=>b.tenantId===E)){const b=Cl(t,p.localAccountId,E,i);v.push(b)}return p.tenantProfiles=v,p}/*! @azure/msal-common v14.16.1 2025-08-05 */async function pp(n,e,t){return typeof n=="string"?n:n({clientId:e,tokenEndpoint:t})}/*! @azure/msal-common v14.16.1 2025-08-05 */class mp extends _l{constructor(e,t){var r;super(e,t),this.includeRedirectUri=!0,this.oidcDefaultScopes=(r=this.config.authOptions.authority.options.OIDCOptions)==null?void 0:r.defaultScopes}async getAuthCodeUrl(e){var r;(r=this.performanceClient)==null||r.addQueueMeasurement(_.GetAuthCodeUrl,e.correlationId);const t=await q(this.createAuthCodeUrlQueryString.bind(this),_.AuthClientCreateQueryString,this.logger,this.performanceClient,e.correlationId)(e);return ve.appendQueryString(this.authority.authorizationEndpoint,t)}async acquireToken(e,t){var a,c;if((a=this.performanceClient)==null||a.addQueueMeasurement(_.AuthClientAcquireToken,e.correlationId),!e.code)throw H(Dg);const r=bn(),o=await q(this.executeTokenRequest.bind(this),_.AuthClientExecuteTokenRequest,this.logger,this.performanceClient,e.correlationId)(this.authority,e),i=(c=o.headers)==null?void 0:c[bt.X_MS_REQUEST_ID],s=new Hr(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin,this.performanceClient);return s.validateTokenResponse(o.body),q(s.handleServerTokenResponse.bind(s),_.HandleServerTokenResponse,this.logger,this.performanceClient,e.correlationId)(o.body,this.authority,r,e,t,void 0,void 0,void 0,i)}handleFragmentResponse(e,t){if(new Hr(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,null,null).validateServerAuthorizationCodeResponse(e,t),!e.code)throw H(Bg);return e}getLogoutUri(e){if(!e)throw xe(Jg);const t=this.createLogoutUrlQueryString(e);return ve.appendQueryString(this.authority.endSessionEndpoint,t)}async executeTokenRequest(e,t){var l,u;(l=this.performanceClient)==null||l.addQueueMeasurement(_.AuthClientExecuteTokenRequest,t.correlationId);const r=this.createTokenQueryParameters(t),o=ve.appendQueryString(e.tokenEndpoint,r),i=await q(this.createTokenRequestBody.bind(this),_.AuthClientCreateTokenRequestBody,this.logger,this.performanceClient,t.correlationId)(t);let s;if(t.clientInfo)try{const d=ps(t.clientInfo,this.cryptoUtils.base64Decode);s={credential:`${d.uid}${yt.CLIENT_INFO_SEPARATOR}${d.utid}`,type:Kt.HOME_ACCOUNT_ID}}catch(d){this.logger.verbose("Could not parse client info for CCS Header: "+d)}const a=this.createTokenRequestHeaders(s||t.ccsCredential),c={clientId:((u=t.tokenBodyParameters)==null?void 0:u.clientId)||this.config.authOptions.clientId,authority:e.canonicalAuthority,scopes:t.scopes,claims:t.claims,authenticationScheme:t.authenticationScheme,resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,sshKid:t.sshKid};return q(this.executePostToTokenEndpoint.bind(this),_.AuthorizationCodeClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,t.correlationId)(o,i,a,c,t.correlationId,_.AuthorizationCodeClientExecutePostToTokenEndpoint)}async createTokenRequestBody(e){var o,i;(o=this.performanceClient)==null||o.addQueueMeasurement(_.AuthClientCreateTokenRequestBody,e.correlationId);const t=new ti(e.correlationId,this.performanceClient);if(t.addClientId(e.embeddedClientId||((i=e.tokenBodyParameters)==null?void 0:i[Ur])||this.config.authOptions.clientId),this.includeRedirectUri?t.addRedirectUri(e.redirectUri):Jr.validateRedirectUri(e.redirectUri),t.addScopes(e.scopes,!0,this.oidcDefaultScopes),t.addAuthorizationCode(e.code),t.addLibraryInfo(this.config.libraryInfo),t.addApplicationTelemetry(this.config.telemetry.application),t.addThrottling(),this.serverTelemetryManager&&!mc(this.config)&&t.addServerTelemetry(this.serverTelemetryManager),e.codeVerifier&&t.addCodeVerifier(e.codeVerifier),this.config.clientCredentials.clientSecret&&t.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const s=this.config.clientCredentials.clientAssertion;t.addClientAssertion(await pp(s.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),t.addClientAssertionType(s.assertionType)}if(t.addGrantType(_g.AUTHORIZATION_CODE_GRANT),t.addClientInfo(),e.authenticationScheme===Ne.POP){const s=new Io(this.cryptoUtils,this.performanceClient);let a;e.popKid?a=this.cryptoUtils.encodeKid(e.popKid):a=(await q(s.generateCnf.bind(s),_.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,t.addPopToken(a)}else if(e.authenticationScheme===Ne.SSH)if(e.sshJwk)t.addSshJwk(e.sshJwk);else throw xe(Js);(!tn.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&t.addClaims(e.claims,this.config.authOptions.clientCapabilities);let r;if(e.clientInfo)try{const s=ps(e.clientInfo,this.cryptoUtils.base64Decode);r={credential:`${s.uid}${yt.CLIENT_INFO_SEPARATOR}${s.utid}`,type:Kt.HOME_ACCOUNT_ID}}catch(s){this.logger.verbose("Could not parse client info for CCS Header: "+s)}else r=e.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&r)switch(r.type){case Kt.HOME_ACCOUNT_ID:try{const s=no(r.credential);t.addCcsOid(s)}catch(s){this.logger.verbose("Could not parse home account ID for CCS Header: "+s)}break;case Kt.UPN:t.addCcsUpn(r.credential);break}return e.embeddedClientId&&t.addBrokerParameters({brokerClientId:this.config.authOptions.clientId,brokerRedirectUri:this.config.authOptions.redirectUri}),e.tokenBodyParameters&&t.addExtraQueryParameters(e.tokenBodyParameters),e.enableSpaAuthorizationCode&&(!e.tokenBodyParameters||!e.tokenBodyParameters[Bd])&&t.addExtraQueryParameters({[Bd]:"1"}),t.createQueryString()}async createAuthCodeUrlQueryString(e){var i,s;const t=e.correlationId||this.config.cryptoInterface.createNewGuid();(i=this.performanceClient)==null||i.addQueueMeasurement(_.AuthClientCreateQueryString,t);const r=new ti(t,this.performanceClient);r.addClientId(e.embeddedClientId||((s=e.extraQueryParameters)==null?void 0:s[Ur])||this.config.authOptions.clientId);const o=[...e.scopes||[],...e.extraScopesToConsent||[]];if(r.addScopes(o,!0,this.oidcDefaultScopes),r.addRedirectUri(e.redirectUri),r.addCorrelationId(t),r.addResponseMode(e.responseMode),r.addResponseTypeCode(),r.addLibraryInfo(this.config.libraryInfo),mc(this.config)||r.addApplicationTelemetry(this.config.telemetry.application),r.addClientInfo(),e.codeChallenge&&e.codeChallengeMethod&&r.addCodeChallengeParams(e.codeChallenge,e.codeChallengeMethod),e.prompt&&r.addPrompt(e.prompt),e.domainHint&&r.addDomainHint(e.domainHint),e.prompt!==at.SELECT_ACCOUNT)if(e.sid&&e.prompt===at.NONE)this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request"),r.addSid(e.sid);else if(e.account){const a=this.extractAccountSid(e.account);let c=this.extractLoginHint(e.account);if(c&&e.domainHint&&(this.logger.warning('AuthorizationCodeClient.createAuthCodeUrlQueryString: "domainHint" param is set, skipping opaque "login_hint" claim. Please consider not passing domainHint'),c=null),c){this.logger.verbose("createAuthCodeUrlQueryString: login_hint claim present on account"),r.addLoginHint(c);try{const l=no(e.account.homeAccountId);r.addCcsOid(l)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(a&&e.prompt===at.NONE){this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account"),r.addSid(a);try{const l=no(e.account.homeAccountId);r.addCcsOid(l)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(e.loginHint)this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from request"),r.addLoginHint(e.loginHint),r.addCcsUpn(e.loginHint);else if(e.account.username){this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from account"),r.addLoginHint(e.account.username);try{const l=no(e.account.homeAccountId);r.addCcsOid(l)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}}else e.loginHint&&(this.logger.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request"),r.addLoginHint(e.loginHint),r.addCcsUpn(e.loginHint));else this.logger.verbose("createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints");if(e.nonce&&r.addNonce(e.nonce),e.state&&r.addState(e.state),(e.claims||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&r.addClaims(e.claims,this.config.authOptions.clientCapabilities),e.embeddedClientId&&r.addBrokerParameters({brokerClientId:this.config.authOptions.clientId,brokerRedirectUri:this.config.authOptions.redirectUri}),this.addExtraQueryParams(e,r),e.nativeBroker&&(r.addNativeBroker(),e.authenticationScheme===Ne.POP)){const a=new Io(this.cryptoUtils);let c;e.popKid?c=this.cryptoUtils.encodeKid(e.popKid):c=(await q(a.generateCnf.bind(a),_.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,r.addPopToken(c)}return r.createQueryString()}createLogoutUrlQueryString(e){const t=new ti(e.correlationId,this.performanceClient);return e.postLogoutRedirectUri&&t.addPostLogoutRedirectUri(e.postLogoutRedirectUri),e.correlationId&&t.addCorrelationId(e.correlationId),e.idTokenHint&&t.addIdTokenHint(e.idTokenHint),e.state&&t.addState(e.state),e.logoutHint&&t.addLogoutHint(e.logoutHint),this.addExtraQueryParams(e,t),t.createQueryString()}addExtraQueryParams(e,t){!(e.extraQueryParameters&&e.extraQueryParameters.hasOwnProperty("instance_aware"))&&this.config.authOptions.instanceAware&&(e.extraQueryParameters=e.extraQueryParameters||{},e.extraQueryParameters.instance_aware="true"),e.extraQueryParameters&&t.addExtraQueryParameters(e.extraQueryParameters)}extractAccountSid(e){var t;return((t=e.idTokenClaims)==null?void 0:t.sid)||null}extractLoginHint(e){var t;return((t=e.idTokenClaims)==null?void 0:t.login_hint)||null}}/*! @azure/msal-common v14.16.1 2025-08-05 */const lb=300;class vc extends _l{constructor(e,t){super(e,t)}async acquireToken(e){var s,a;(s=this.performanceClient)==null||s.addQueueMeasurement(_.RefreshTokenClientAcquireToken,e.correlationId);const t=bn(),r=await q(this.executeTokenRequest.bind(this),_.RefreshTokenClientExecuteTokenRequest,this.logger,this.performanceClient,e.correlationId)(e,this.authority),o=(a=r.headers)==null?void 0:a[bt.X_MS_REQUEST_ID],i=new Hr(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return i.validateTokenResponse(r.body),q(i.handleServerTokenResponse.bind(i),_.HandleServerTokenResponse,this.logger,this.performanceClient,e.correlationId)(r.body,this.authority,t,e,void 0,void 0,!0,e.forceCache,o)}async acquireTokenByRefreshToken(e){var r;if(!e)throw xe(Yg);if((r=this.performanceClient)==null||r.addQueueMeasurement(_.RefreshTokenClientAcquireTokenByRefreshToken,e.correlationId),!e.account)throw H(cl);if(this.cacheManager.isAppMetadataFOCI(e.account.environment))try{return await q(this.acquireTokenWithCachedRefreshToken.bind(this),_.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!0)}catch(o){const i=o instanceof cn&&o.errorCode===vs,s=o instanceof fr&&o.errorCode===Id.INVALID_GRANT_ERROR&&o.subError===Id.CLIENT_MISMATCH_ERROR;if(i||s)return q(this.acquireTokenWithCachedRefreshToken.bind(this),_.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!1);throw o}return q(this.acquireTokenWithCachedRefreshToken.bind(this),_.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!1)}async acquireTokenWithCachedRefreshToken(e,t){var i;(i=this.performanceClient)==null||i.addQueueMeasurement(_.RefreshTokenClientAcquireTokenWithCachedRefreshToken,e.correlationId);const r=$r(this.cacheManager.getRefreshToken.bind(this.cacheManager),_.CacheManagerGetRefreshToken,this.logger,this.performanceClient,e.correlationId)(e.account,t,e.correlationId,void 0,this.performanceClient);if(!r)throw Cc(vs);if(r.expiresOn&&pc(r.expiresOn,e.refreshTokenExpirationOffsetSeconds||lb))throw Cc(bl);const o={...e,refreshToken:r.secret,authenticationScheme:e.authenticationScheme||Ne.BEARER,ccsCredential:{credential:e.account.homeAccountId,type:Kt.HOME_ACCOUNT_ID}};try{return await q(this.acquireToken.bind(this),_.RefreshTokenClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(o)}catch(s){if(s instanceof cn&&s.subError===ea){this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");const a=to(r);this.cacheManager.removeRefreshToken(a,e.correlationId)}throw s}}async executeTokenRequest(e,t){var c,l;(c=this.performanceClient)==null||c.addQueueMeasurement(_.RefreshTokenClientExecuteTokenRequest,e.correlationId);const r=this.createTokenQueryParameters(e),o=ve.appendQueryString(t.tokenEndpoint,r),i=await q(this.createTokenRequestBody.bind(this),_.RefreshTokenClientCreateTokenRequestBody,this.logger,this.performanceClient,e.correlationId)(e),s=this.createTokenRequestHeaders(e.ccsCredential),a={clientId:((l=e.tokenBodyParameters)==null?void 0:l.clientId)||this.config.authOptions.clientId,authority:t.canonicalAuthority,scopes:e.scopes,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid};return q(this.executePostToTokenEndpoint.bind(this),_.RefreshTokenClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,e.correlationId)(o,i,s,a,e.correlationId,_.RefreshTokenClientExecutePostToTokenEndpoint)}async createTokenRequestBody(e){var o,i,s;(o=this.performanceClient)==null||o.addQueueMeasurement(_.RefreshTokenClientCreateTokenRequestBody,e.correlationId);const t=e.correlationId,r=new ti(t,this.performanceClient);if(r.addClientId(e.embeddedClientId||((i=e.tokenBodyParameters)==null?void 0:i[Ur])||this.config.authOptions.clientId),e.redirectUri&&r.addRedirectUri(e.redirectUri),r.addScopes(e.scopes,!0,(s=this.config.authOptions.authority.options.OIDCOptions)==null?void 0:s.defaultScopes),r.addGrantType(_g.REFRESH_TOKEN_GRANT),r.addClientInfo(),r.addLibraryInfo(this.config.libraryInfo),r.addApplicationTelemetry(this.config.telemetry.application),r.addThrottling(),this.serverTelemetryManager&&!mc(this.config)&&r.addServerTelemetry(this.serverTelemetryManager),r.addRefreshToken(e.refreshToken),this.config.clientCredentials.clientSecret&&r.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const a=this.config.clientCredentials.clientAssertion;r.addClientAssertion(await pp(a.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),r.addClientAssertionType(a.assertionType)}if(e.authenticationScheme===Ne.POP){const a=new Io(this.cryptoUtils,this.performanceClient);let c;e.popKid?c=this.cryptoUtils.encodeKid(e.popKid):c=(await q(a.generateCnf.bind(a),_.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,r.addPopToken(c)}else if(e.authenticationScheme===Ne.SSH)if(e.sshJwk)r.addSshJwk(e.sshJwk);else throw xe(Js);if((!tn.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&r.addClaims(e.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&e.ccsCredential)switch(e.ccsCredential.type){case Kt.HOME_ACCOUNT_ID:try{const a=no(e.ccsCredential.credential);r.addCcsOid(a)}catch(a){this.logger.verbose("Could not parse home account ID for CCS Header: "+a)}break;case Kt.UPN:r.addCcsUpn(e.ccsCredential.credential);break}return e.embeddedClientId&&r.addBrokerParameters({brokerClientId:this.config.authOptions.clientId,brokerRedirectUri:this.config.authOptions.redirectUri}),e.tokenBodyParameters&&r.addExtraQueryParameters(e.tokenBodyParameters),r.createQueryString()}}/*! @azure/msal-common v14.16.1 2025-08-05 */class ub extends _l{constructor(e,t){super(e,t)}async acquireToken(e){var t;try{const[r,o]=await this.acquireCachedToken({...e,scopes:(t=e.scopes)!=null&&t.length?e.scopes:[...Po]});return o===er.PROACTIVELY_REFRESHED&&(this.logger.info("SilentFlowClient:acquireCachedToken - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed."),new vc(this.config,this.performanceClient).acquireTokenByRefreshToken(e).catch(()=>{})),r}catch(r){if(r instanceof Qs&&r.errorCode===Fn)return new vc(this.config,this.performanceClient).acquireTokenByRefreshToken(e);throw r}}async acquireCachedToken(e){var c;(c=this.performanceClient)==null||c.addQueueMeasurement(_.SilentFlowClientAcquireCachedToken,e.correlationId);let t=er.NOT_APPLICABLE;if(e.forceRefresh||!this.config.cacheOptions.claimsBasedCachingEnabled&&!tn.isEmptyObj(e.claims))throw this.setCacheOutcome(er.FORCE_REFRESH_OR_CLAIMS,e.correlationId),H(Fn);if(!e.account)throw H(cl);const r=e.account.tenantId||Z_(e.authority),o=this.cacheManager.getTokenKeys(),i=this.cacheManager.getAccessToken(e.account,e,o,r,this.performanceClient);if(i){if(Fw(i.cachedAt)||pc(i.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw this.setCacheOutcome(er.CACHED_ACCESS_TOKEN_EXPIRED,e.correlationId),H(Fn);i.refreshOn&&pc(i.refreshOn,0)&&(t=er.PROACTIVELY_REFRESHED)}else throw this.setCacheOutcome(er.NO_CACHED_ACCESS_TOKEN,e.correlationId),H(Fn);const s=e.authority||this.authority.getPreferredCache(),a={account:this.cacheManager.readAccountFromCache(e.account,e.correlationId),accessToken:i,idToken:this.cacheManager.getIdToken(e.account,e.correlationId,o,r,this.performanceClient),refreshToken:null,appMetadata:this.cacheManager.readAppMetadataFromCache(s)};return this.setCacheOutcome(t,e.correlationId),this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[await q(this.generateResultFromCacheRecord.bind(this),_.SilentFlowClientGenerateResultFromCacheRecord,this.logger,this.performanceClient,e.correlationId)(a,e),t]}setCacheOutcome(e,t){var r,o;(r=this.serverTelemetryManager)==null||r.setCacheOutcome(e),(o=this.performanceClient)==null||o.addFields({cacheOutcome:e},t),e!==er.NOT_APPLICABLE&&this.logger.info(`Token refresh is required due to cache outcome: ${e}`)}async generateResultFromCacheRecord(e,t){var o;(o=this.performanceClient)==null||o.addQueueMeasurement(_.SilentFlowClientGenerateResultFromCacheRecord,t.correlationId);let r;if(e.idToken&&(r=qr(e.idToken.secret,this.config.cryptoInterface.base64Decode)),t.maxAge||t.maxAge===0){const i=r==null?void 0:r.auth_time;if(!i)throw H(al);$g(i,t.maxAge)}return Hr.generateAuthenticationResult(this.cryptoUtils,this.authority,e,!0,t,r)}}/*! @azure/msal-common v14.16.1 2025-08-05 */const db={sendGetRequestAsync:()=>Promise.reject(H(ge)),sendPostRequestAsync:()=>Promise.reject(H(ge))};/*! @azure/msal-common v14.16.1 2025-08-05 */const jd=",",yp="|";function hb(n){const{skus:e,libraryName:t,libraryVersion:r,extensionName:o,extensionVersion:i}=n,s=new Map([[0,[t,r]],[2,[o,i]]]);let a=[];if(e!=null&&e.length){if(a=e.split(jd),a.length<4)return e}else a=Array.from({length:4},()=>yp);return s.forEach((c,l)=>{var u,d;c.length===2&&((u=c[0])!=null&&u.length)&&((d=c[1])!=null&&d.length)&&fb({skuArr:a,index:l,skuName:c[0],skuVersion:c[1]})}),a.join(jd)}function fb(n){const{skuArr:e,index:t,skuName:r,skuVersion:o}=n;t>=e.length||(e[t]=[r,o].join(yp))}class fi{constructor(e,t){this.cacheOutcome=er.NOT_APPLICABLE,this.cacheManager=t,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||R.EMPTY_STRING,this.wrapperVer=e.wrapperVer||R.EMPTY_STRING,this.telemetryCacheKey=ut.CACHE_KEY+yt.CACHE_KEY_SEPARATOR+e.clientId}generateCurrentRequestHeaderValue(){const e=`${this.apiId}${ut.VALUE_SEPARATOR}${this.cacheOutcome}`,t=[this.wrapperSKU,this.wrapperVer],r=this.getNativeBrokerErrorCode();r!=null&&r.length&&t.push(`broker_error=${r}`);const o=t.join(ut.VALUE_SEPARATOR),i=this.getRegionDiscoveryFields(),s=[e,i].join(ut.VALUE_SEPARATOR);return[ut.SCHEMA_VERSION,s,o].join(ut.CATEGORY_SEPARATOR)}generateLastRequestHeaderValue(){const e=this.getLastRequests(),t=fi.maxErrorsToSend(e),r=e.failedRequests.slice(0,2*t).join(ut.VALUE_SEPARATOR),o=e.errors.slice(0,t).join(ut.VALUE_SEPARATOR),i=e.errors.length,s=t=ut.MAX_CACHED_ERRORS&&(t.failedRequests.shift(),t.failedRequests.shift(),t.errors.shift()),t.failedRequests.push(this.apiId,this.correlationId),e instanceof Error&&e&&e.toString()?e instanceof Fe?e.subError?t.errors.push(e.subError):e.errorCode?t.errors.push(e.errorCode):t.errors.push(e.toString()):t.errors.push(e.toString()):t.errors.push(ut.UNKNOWN_ERROR),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t,this.correlationId)}incrementCacheHits(){const e=this.getLastRequests();return e.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e,this.correlationId),e.cacheHits}getLastRequests(){const e={failedRequests:[],errors:[],cacheHits:0};return this.cacheManager.getServerTelemetry(this.telemetryCacheKey)||e}clearTelemetryCache(){const e=this.getLastRequests(),t=fi.maxErrorsToSend(e),r=e.errors.length;if(t===r)this.cacheManager.removeItem(this.telemetryCacheKey,this.correlationId);else{const o={failedRequests:e.failedRequests.slice(t*2),errors:e.errors.slice(t),cacheHits:0};this.cacheManager.setServerTelemetry(this.telemetryCacheKey,o,this.correlationId)}}static maxErrorsToSend(e){let t,r=0,o=0;const i=e.errors.length;for(t=0;tnull,discard:()=>{},add:()=>{},increment:()=>{},event:{eventId:this.generateId(),status:X_.InProgress,authority:"",libraryName:"",libraryVersion:"",clientId:"",name:e,startTimeMs:Date.now(),correlationId:t||""},measurement:new Vd}}startPerformanceMeasurement(){return new Vd}calculateQueuedTime(){return 0}addQueueMeasurement(){}setPreQueueTime(){}endMeasurement(){return null}discardMeasurements(){}removePerformanceCallback(){return!0}addPerformanceCallback(){return""}emitEvents(){}addFields(){}incrementFields(){}cacheEventByCorrelationId(){}}/*! @azure/msal-browser v3.30.0 2025-08-05 */const kl="pkce_not_created",Tc="crypto_nonexistent",ta="empty_navigate_uri",Tp="hash_empty_error",Ol="no_state_in_hash",Ap="hash_does_not_contain_known_properties",Ep="unable_to_parse_state",wp="state_interaction_type_mismatch",_p="interaction_in_progress",bp="popup_window_error",Ip="empty_window_error",Fr="user_cancelled",mb="monitor_popup_timeout",Sp="monitor_window_timeout",Rp="redirect_in_iframe",kp="block_iframe_reload",Op="block_nested_popups",yb="iframe_closed_prematurely",na="silent_logout_unsupported",Pp="no_account_error",Cb="silent_prompt_value_error",Np="no_token_request_cache_error",Mp="unable_to_parse_token_request_cache_error",Pl="no_cached_authority_error",vb="auth_request_not_set_error",Tb="invalid_cache_type",ra="non_browser_environment",Xr="database_not_open",Ts="no_network_connectivity",xp="post_request_failed",Dp="get_request_failed",Ac="failed_to_parse_response",Lp="unable_to_load_token",Nl="crypto_key_not_found",Up="auth_code_required",Hp="auth_code_or_nativeAccountId_required",Fp="spa_code_and_nativeAccountId_present",Ml="database_unavailable",Bp="unable_to_acquire_token_from_native_platform",Kp="native_handshake_timeout",qp="native_extension_not_installed",ki="native_connection_not_established",$p="uninitialized_public_client_application",jp="native_prompt_not_supported",Gp="invalid_base64_string",Vp="invalid_pop_token_request",zp="failed_to_build_headers",Qp="failed_to_parse_headers";/*! @azure/msal-browser v3.30.0 2025-08-05 */const On="For more visit: aka.ms/msaljs/browser-errors",Ab={[kl]:"The PKCE code challenge and verifier could not be generated.",[Tc]:"The crypto object or function is not available.",[ta]:"Navigation URI is empty. Please check stack trace for more info.",[Tp]:`Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. ${On}`,[Ol]:"Hash does not contain state. Please verify that the request originated from msal.",[Ap]:`Hash does not contain known properites. Please verify that your redirectUri is not changing the hash. ${On}`,[Ep]:"Unable to parse state. Please verify that the request originated from msal.",[wp]:"Hash contains state but the interaction type does not match the caller.",[_p]:`Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. ${On}`,[bp]:"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser.",[Ip]:"window.open returned null or undefined window object.",[Fr]:"User cancelled the flow.",[mb]:`Token acquisition in popup failed due to timeout. ${On}`,[Sp]:`Token acquisition in iframe failed due to timeout. ${On}`,[Rp]:"Redirects are not supported for iframed or brokered applications. Please ensure you are using MSAL.js in a top frame of the window if using the redirect APIs, or use the popup APIs.",[kp]:`Request was blocked inside an iframe because MSAL detected an authentication response. ${On}`,[Op]:"Request was blocked inside a popup because MSAL detected it was running in a popup.",[yb]:"The iframe being monitored was closed prematurely.",[na]:"Silent logout not supported. Please call logoutRedirect or logoutPopup instead.",[Pp]:"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request.",[Cb]:"The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'.",[Np]:"No token request found in cache.",[Mp]:"The cached token request could not be parsed.",[Pl]:"No cached authority found.",[vb]:"Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler",[Tb]:"Invalid cache type",[ra]:"Login and token requests are not supported in non-browser environments.",[Xr]:"Database is not open!",[Ts]:"No network connectivity. Check your internet connection.",[xp]:"Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'",[Dp]:"Network request failed. Please check the network trace to determine root cause.",[Ac]:"Failed to parse network response. Check network trace.",[Lp]:"Error loading token to cache.",[Nl]:"Cryptographic Key or Keypair not found in browser storage.",[Up]:"An authorization code must be provided (as the `code` property on the request) to this flow.",[Hp]:"An authorization code or nativeAccountId must be provided to this flow.",[Fp]:"Request cannot contain both spa code and native account id.",[Ml]:"IndexedDB, which is required for persistent cryptographic key storage, is unavailable. This may be caused by browser privacy features which block persistent storage in third-party contexts.",[Bp]:`Unable to acquire token from native platform. ${On}`,[Kp]:"Timed out while attempting to establish connection to browser extension",[qp]:"Native extension is not installed. If you think this is a mistake call the initialize function.",[ki]:`Connection to native platform has not been established. Please install a compatible browser extension and run initialize(). ${On}`,[$p]:`You must call and await the initialize function before attempting to call any other MSAL API. ${On}`,[jp]:"The provided prompt is not supported by the native platform. This request should be routed to the web based flow.",[Gp]:"Invalid base64 encoded string.",[Vp]:"Invalid PoP token request. The request should not have both a popKid value and signPopToken set to true.",[zp]:"Failed to build request headers object.",[Qp]:"Failed to parse response headers"};class Oi extends Fe{constructor(e,t){super(e,Ab[e],t),Object.setPrototypeOf(this,Oi.prototype),this.name="BrowserAuthError"}}function Y(n,e){return new Oi(n,e)}/*! @azure/msal-browser v3.30.0 2025-08-05 */const Ft={INVALID_GRANT_ERROR:"invalid_grant",POPUP_WIDTH:483,POPUP_HEIGHT:600,POPUP_NAME_PREFIX:"msal",DEFAULT_POLL_INTERVAL_MS:30,MSAL_SKU:"msal.js.browser"},ro={CHANNEL_ID:"53ee284d-920a-4b59-9d30-a60315b26836",PREFERRED_EXTENSION_ID:"ppnbnpeolgkicgegkbkbjmhlideopiji",MATS_TELEMETRY:"MATS"},br={HandshakeRequest:"Handshake",HandshakeResponse:"HandshakeResponse",GetToken:"GetToken",Response:"Response"},Ot={LocalStorage:"localStorage",SessionStorage:"sessionStorage",MemoryStorage:"memoryStorage"},zd={GET:"GET",POST:"POST"},ke={AUTHORITY:"authority",ACQUIRE_TOKEN_ACCOUNT:"acquireToken.account",SESSION_STATE:"session.state",REQUEST_STATE:"request.state",NONCE_IDTOKEN:"nonce.id_token",ORIGIN_URI:"request.origin",RENEW_STATUS:"token.renew.status",URL_HASH:"urlHash",REQUEST_PARAMS:"request.params",SCOPES:"scopes",INTERACTION_STATUS_KEY:"interaction.status",CCS_CREDENTIAL:"ccs.credential",CORRELATION_ID:"request.correlationId",NATIVE_REQUEST:"request.native",REDIRECT_CONTEXT:"request.redirect.context"},zt={ACCOUNT_KEYS:"msal.account.keys",TOKEN_KEYS:"msal.token.keys",VERSION:"msal.version"},ji={WRAPPER_SKU:"wrapper.sku",WRAPPER_VER:"wrapper.version"},He={acquireTokenRedirect:861,acquireTokenPopup:862,ssoSilent:863,acquireTokenSilent_authCode:864,handleRedirectPromise:865,acquireTokenByCode:866,acquireTokenSilent_silentFlow:61,logout:961,logoutPopup:962};var ee;(function(n){n.Redirect="redirect",n.Popup="popup",n.Silent="silent",n.None="none"})(ee||(ee={}));const Qd={scopes:Po},Wp="jwk",Ec="msal.db",Eb=1,wb=`${Ec}.keys`,Dt={Default:0,AccessToken:1,AccessTokenAndRefreshToken:2,RefreshToken:3,RefreshTokenAndNetwork:4,Skip:5},_b=[Dt.Default,Dt.Skip,Dt.RefreshTokenAndNetwork],bb="msal.browser.log.level",Ib="msal.browser.log.pii";/*! @azure/msal-browser v3.30.0 2025-08-05 */function Gi(n){return encodeURIComponent(xl(n).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"))}function oa(n){return Yp(n).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function xl(n){return Yp(new TextEncoder().encode(n))}function Yp(n){const e=Array.from(n,t=>String.fromCodePoint(t)).join("");return btoa(e)}/*! @azure/msal-browser v3.30.0 2025-08-05 */const Sb="RSASSA-PKCS1-v1_5",Jp="SHA-256",Rb=2048,kb=new Uint8Array([1,0,1]),Wd="0123456789abcdef",Yd=new Uint32Array(1),Ob="crypto_subtle_undefined",Dl={name:Sb,hash:Jp,modulusLength:Rb,publicExponent:kb};function Pb(n){if(!window)throw Y(ra);if(!window.crypto)throw Y(Tc);if(!n&&!window.crypto.subtle)throw Y(Tc,Ob)}async function Xp(n,e,t){e==null||e.addQueueMeasurement(_.Sha256Digest,t);const o=new TextEncoder().encode(n);return window.crypto.subtle.digest(Jp,o)}function Nb(n){return window.crypto.getRandomValues(n)}function Pa(){return window.crypto.getRandomValues(Yd),Yd[0]}function In(){const n=Date.now(),e=Pa()*1024+(Pa()&1023),t=new Uint8Array(16),r=Math.trunc(e/2**30),o=e&2**30-1,i=Pa();t[0]=n/2**40,t[1]=n/2**32,t[2]=n/2**24,t[3]=n/2**16,t[4]=n/2**8,t[5]=n,t[6]=112|r>>>8,t[7]=r,t[8]=128|o>>>24,t[9]=o>>>16,t[10]=o>>>8,t[11]=o,t[12]=i>>>24,t[13]=i>>>16,t[14]=i>>>8,t[15]=i;let s="";for(let a=0;a>>4),s+=Wd.charAt(t[a]&15),(a===3||a===5||a===7||a===9)&&(s+="-");return s}async function Mb(n,e){return window.crypto.subtle.generateKey(Dl,n,e)}async function Na(n){return window.crypto.subtle.exportKey(Wp,n)}async function xb(n,e,t){return window.crypto.subtle.importKey(Wp,n,Dl,e,t)}async function Db(n,e){return window.crypto.subtle.sign(Dl,n,e)}async function Zp(n){const e=await Xp(n),t=new Uint8Array(e);return oa(t)}/*! @azure/msal-browser v3.30.0 2025-08-05 */const Ll="storage_not_supported",Lb="stubbed_public_client_application_called",em="in_mem_redirect_unavailable";/*! @azure/msal-browser v3.30.0 2025-08-05 */const Ub={[Ll]:"Given storage configuration option was not supported.",[Lb]:"Stub instance of Public Client Application was called. If using msal-react, please ensure context is not used without a provider. For more visit: aka.ms/msaljs/browser-errors",[em]:"Redirect cannot be supported. In-memory storage was selected and storeAuthStateInCookie=false, which would cause the library to be unable to handle the incoming hash. If you would like to use the redirect API, please use session/localStorage or set storeAuthStateInCookie=true."};class Ul extends Fe{constructor(e,t){super(e,t),this.name="BrowserConfigurationAuthError",Object.setPrototypeOf(this,Ul.prototype)}}function Hl(n){return new Ul(n,Ub[n])}/*! @azure/msal-browser v3.30.0 2025-08-05 */function Hb(n){n.location.hash="",typeof n.history.replaceState=="function"&&n.history.replaceState(null,"",`${n.location.origin}${n.location.pathname}${n.location.search}`)}function Fb(n){const e=n.split("#");e.shift(),window.location.hash=e.length>0?e.join("#"):""}function Fl(){return window.parent!==window}function Bb(){return typeof window<"u"&&!!window.opener&&window.opener!==window&&typeof window.name=="string"&&window.name.indexOf(`${Ft.POPUP_NAME_PREFIX}.`)===0}function Bn(){return typeof window<"u"&&window.location?window.location.href.split("?")[0].split("#")[0]:""}function Kb(){const e=new ve(window.location.href).getUrlComponents();return`${e.Protocol}//${e.HostNameAndPort}/`}function qb(){if(ve.hashContainsKnownProperties(window.location.hash)&&Fl())throw Y(kp)}function $b(n){if(Fl()&&!n)throw Y(Rp)}function jb(){if(Bb())throw Y(Op)}function tm(){if(typeof window>"u")throw Y(ra)}function nm(n){if(!n)throw Y($p)}function Bl(n){tm(),qb(),jb(),nm(n)}function Jd(n,e){if(Bl(n),$b(e.system.allowRedirectInIframe),e.cache.cacheLocation===Ot.MemoryStorage&&!e.cache.storeAuthStateInCookie)throw Hl(em)}function rm(n){const e=document.createElement("link");e.rel="preconnect",e.href=new URL(n).origin,e.crossOrigin="anonymous",document.head.appendChild(e),window.setTimeout(()=>{try{document.head.removeChild(e)}catch{}},1e4)}function Gb(){return In()}/*! @azure/msal-browser v3.30.0 2025-08-05 */class As{navigateInternal(e,t){return As.defaultNavigateWindow(e,t)}navigateExternal(e,t){return As.defaultNavigateWindow(e,t)}static defaultNavigateWindow(e,t){return t.noHistory?window.location.replace(e):window.location.assign(e),new Promise(r=>{setTimeout(()=>{r(!0)},t.timeout)})}}/*! @azure/msal-browser v3.30.0 2025-08-05 */class Vb{async sendGetRequestAsync(e,t){let r,o={},i=0;const s=Xd(t);try{r=await fetch(e,{method:zd.GET,headers:s})}catch{throw Y(window.navigator.onLine?Dp:Ts)}o=Zd(r.headers);try{return i=r.status,{headers:o,body:await r.json(),status:i}}catch{throw Kd(Y(Ac),i,o)}}async sendPostRequestAsync(e,t){const r=t&&t.body||"",o=Xd(t);let i,s=0,a={};try{i=await fetch(e,{method:zd.POST,headers:o,body:r})}catch{throw Y(window.navigator.onLine?xp:Ts)}a=Zd(i.headers);try{return s=i.status,{headers:a,body:await i.json(),status:s}}catch{throw Kd(Y(Ac),s,a)}}}function Xd(n){try{const e=new Headers;if(!(n&&n.headers))return e;const t=n.headers;return Object.entries(t).forEach(([r,o])=>{e.append(r,o)}),e}catch{throw Y(zp)}}function Zd(n){try{const e={};return n.forEach((t,r)=>{e[r]=t}),e}catch{throw Y(Qp)}}/*! @azure/msal-browser v3.30.0 2025-08-05 */const zb=6e4,wc=1e4,Qb=3e4,Wb=2e3;function Yb({auth:n,cache:e,system:t,telemetry:r},o){const i={clientId:R.EMPTY_STRING,authority:`${R.DEFAULT_AUTHORITY}`,knownAuthorities:[],cloudDiscoveryMetadata:R.EMPTY_STRING,authorityMetadata:R.EMPTY_STRING,redirectUri:typeof window<"u"?Bn():"",postLogoutRedirectUri:R.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:qn.AAD,OIDCOptions:{serverResponseType:Ri.FRAGMENT,defaultScopes:[R.OPENID_SCOPE,R.PROFILE_SCOPE,R.OFFLINE_ACCESS_SCOPE]},azureCloudOptions:{azureCloudInstance:hl.None,tenant:R.EMPTY_STRING},skipAuthorityMetadataCache:!1,supportsNestedAppAuth:!1,instanceAware:!1},s={cacheLocation:Ot.SessionStorage,temporaryCacheLocation:Ot.SessionStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!!(e&&e.cacheLocation===Ot.LocalStorage),claimsBasedCachingEnabled:!1},a={loggerCallback:()=>{},logLevel:Ke.Info,piiLoggingEnabled:!1},l={...{...up,loggerOptions:a,networkClient:o?new Vb:db,navigationClient:new As,loadFrameTimeout:0,windowHashTimeout:(t==null?void 0:t.loadFrameTimeout)||zb,iframeHashTimeout:(t==null?void 0:t.loadFrameTimeout)||wc,navigateFrameWait:0,redirectNavigationTimeout:Qb,asyncPopups:!1,allowRedirectInIframe:!1,allowNativeBroker:!1,nativeBrokerHandshakeTimeout:(t==null?void 0:t.nativeBrokerHandshakeTimeout)||Wb,pollIntervalMilliseconds:Ft.DEFAULT_POLL_INTERVAL_MS},...t,loggerOptions:(t==null?void 0:t.loggerOptions)||a},u={application:{appName:R.EMPTY_STRING,appVersion:R.EMPTY_STRING},client:new pb};if((n==null?void 0:n.protocolMode)!==qn.OIDC&&(n!=null&&n.OIDCOptions)&&new hr(l.loggerOptions).warning(JSON.stringify(xe(np))),n!=null&&n.protocolMode&&n.protocolMode!==qn.AAD&&(l!=null&&l.allowNativeBroker))throw xe(rp);return{auth:{...i,...n,OIDCOptions:{...i.OIDCOptions,...n==null?void 0:n.OIDCOptions}},cache:{...s,...e},system:l,telemetry:{...u,...r}}}/*! @azure/msal-browser v3.30.0 2025-08-05 */const Jb="@azure/msal-browser",So="3.30.0";/*! @azure/msal-browser v3.30.0 2025-08-05 */class Kl{static loggerCallback(e,t){switch(e){case Ke.Error:console.error(t);return;case Ke.Info:console.info(t);return;case Ke.Verbose:console.debug(t);return;case Ke.Warning:console.warn(t);return;default:console.log(t);return}}constructor(e){var c;this.browserEnvironment=typeof window<"u",this.config=Yb(e,this.browserEnvironment);let t;try{t=window[Ot.SessionStorage]}catch{}const r=t==null?void 0:t.getItem(bb),o=(c=t==null?void 0:t.getItem(Ib))==null?void 0:c.toLowerCase(),i=o==="true"?!0:o==="false"?!1:void 0,s={...this.config.system.loggerOptions},a=r&&Object.keys(Ke).includes(r)?Ke[r]:void 0;a&&(s.loggerCallback=Kl.loggerCallback,s.logLevel=a),i!==void 0&&(s.piiLoggingEnabled=i),this.logger=new hr(s,Jb,So),this.available=!1}getConfig(){return this.config}getLogger(){return this.logger}isAvailable(){return this.available}isBrowserEnvironment(){return this.browserEnvironment}}/*! @azure/msal-browser v3.30.0 2025-08-05 */class Br extends Kl{getModuleName(){return Br.MODULE_NAME}getId(){return Br.ID}async initialize(){return this.available=typeof window<"u",this.available}}Br.MODULE_NAME="";Br.ID="StandardOperatingContext";/*! @azure/msal-browser v3.30.0 2025-08-05 */function _n(n){return new TextDecoder().decode(Xb(n))}function Xb(n){let e=n.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw Y(Gp)}const t=atob(e);return Uint8Array.from(t,r=>r.codePointAt(0)||0)}/*! @azure/msal-browser v3.30.0 2025-08-05 */class Zb{constructor(){this.dbName=Ec,this.version=Eb,this.tableName=wb,this.dbOpen=!1}async open(){return new Promise((e,t)=>{const r=window.indexedDB.open(this.dbName,this.version);r.addEventListener("upgradeneeded",o=>{o.target.result.createObjectStore(this.tableName)}),r.addEventListener("success",o=>{const i=o;this.db=i.target.result,this.dbOpen=!0,e()}),r.addEventListener("error",()=>t(Y(Ml)))})}closeConnection(){const e=this.db;e&&this.dbOpen&&(e.close(),this.dbOpen=!1)}async validateDbIsOpen(){if(!this.dbOpen)return this.open()}async getItem(e){return await this.validateDbIsOpen(),new Promise((t,r)=>{if(!this.db)return r(Y(Xr));const s=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).get(e);s.addEventListener("success",a=>{const c=a;this.closeConnection(),t(c.target.result)}),s.addEventListener("error",a=>{this.closeConnection(),r(a)})})}async setItem(e,t){return await this.validateDbIsOpen(),new Promise((r,o)=>{if(!this.db)return o(Y(Xr));const a=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).put(t,e);a.addEventListener("success",()=>{this.closeConnection(),r()}),a.addEventListener("error",c=>{this.closeConnection(),o(c)})})}async removeItem(e){return await this.validateDbIsOpen(),new Promise((t,r)=>{if(!this.db)return r(Y(Xr));const s=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).delete(e);s.addEventListener("success",()=>{this.closeConnection(),t()}),s.addEventListener("error",a=>{this.closeConnection(),r(a)})})}async getKeys(){return await this.validateDbIsOpen(),new Promise((e,t)=>{if(!this.db)return t(Y(Xr));const i=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).getAllKeys();i.addEventListener("success",s=>{const a=s;this.closeConnection(),e(a.target.result)}),i.addEventListener("error",s=>{this.closeConnection(),t(s)})})}async containsKey(e){return await this.validateDbIsOpen(),new Promise((t,r)=>{if(!this.db)return r(Y(Xr));const s=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).count(e);s.addEventListener("success",a=>{const c=a;this.closeConnection(),t(c.target.result===1)}),s.addEventListener("error",a=>{this.closeConnection(),r(a)})})}async deleteDatabase(){return this.db&&this.dbOpen&&this.closeConnection(),new Promise((e,t)=>{const r=window.indexedDB.deleteDatabase(Ec),o=setTimeout(()=>t(!1),200);r.addEventListener("success",()=>(clearTimeout(o),e(!0))),r.addEventListener("blocked",()=>(clearTimeout(o),e(!0))),r.addEventListener("error",()=>(clearTimeout(o),t(!1)))})}}/*! @azure/msal-browser v3.30.0 2025-08-05 */class _c{constructor(){this.cache=new Map}getItem(e){return this.cache.get(e)||null}setItem(e,t){this.cache.set(e,t)}removeItem(e){this.cache.delete(e)}getKeys(){const e=[];return this.cache.forEach((t,r)=>{e.push(r)}),e}containsKey(e){return this.cache.has(e)}clear(){this.cache.clear()}}/*! @azure/msal-browser v3.30.0 2025-08-05 */class eI{constructor(e){this.inMemoryCache=new _c,this.indexedDBCache=new Zb,this.logger=e}handleDatabaseAccessError(e){if(e instanceof Oi&&e.errorCode===Ml)this.logger.error("Could not access persistent storage. This may be caused by browser privacy features which block persistent storage in third-party contexts.");else throw e}async getItem(e){const t=this.inMemoryCache.getItem(e);if(!t)try{return this.logger.verbose("Queried item not found in in-memory cache, now querying persistent storage."),await this.indexedDBCache.getItem(e)}catch(r){this.handleDatabaseAccessError(r)}return t}async setItem(e,t){this.inMemoryCache.setItem(e,t);try{await this.indexedDBCache.setItem(e,t)}catch(r){this.handleDatabaseAccessError(r)}}async removeItem(e){this.inMemoryCache.removeItem(e);try{await this.indexedDBCache.removeItem(e)}catch(t){this.handleDatabaseAccessError(t)}}async getKeys(){const e=this.inMemoryCache.getKeys();if(e.length===0)try{return this.logger.verbose("In-memory cache is empty, now querying persistent storage."),await this.indexedDBCache.getKeys()}catch(t){this.handleDatabaseAccessError(t)}return e}async containsKey(e){const t=this.inMemoryCache.containsKey(e);if(!t)try{return this.logger.verbose("Key not found in in-memory cache, now querying persistent storage."),await this.indexedDBCache.containsKey(e)}catch(r){this.handleDatabaseAccessError(r)}return t}clearInMemory(){this.logger.verbose("Deleting in-memory keystore"),this.inMemoryCache.clear(),this.logger.verbose("In-memory keystore deleted")}async clearPersistent(){try{this.logger.verbose("Deleting persistent keystore");const e=await this.indexedDBCache.deleteDatabase();return e&&this.logger.verbose("Persistent keystore deleted"),e}catch(e){return this.handleDatabaseAccessError(e),!1}}}/*! @azure/msal-browser v3.30.0 2025-08-05 */class Ro{constructor(e,t,r){this.logger=e,Pb(r??!1),this.cache=new eI(this.logger),this.performanceClient=t}createNewGuid(){return In()}base64Encode(e){return xl(e)}base64Decode(e){return _n(e)}base64UrlEncode(e){return Gi(e)}encodeKid(e){return this.base64UrlEncode(JSON.stringify({kid:e}))}async getPublicKeyThumbprint(e){var u;const t=(u=this.performanceClient)==null?void 0:u.startMeasurement(_.CryptoOptsGetPublicKeyThumbprint,e.correlationId),r=await Mb(Ro.EXTRACTABLE,Ro.POP_KEY_USAGES),o=await Na(r.publicKey),i={e:o.e,kty:o.kty,n:o.n},s=eh(i),a=await this.hashString(s),c=await Na(r.privateKey),l=await xb(c,!1,["sign"]);return await this.cache.setItem(a,{privateKey:l,publicKey:r.publicKey,requestMethod:e.resourceRequestMethod,requestUri:e.resourceRequestUri}),t&&t.end({success:!0}),a}async removeTokenBindingKey(e){return await this.cache.removeItem(e),!await this.cache.containsKey(e)}async clearKeystore(){this.cache.clearInMemory();try{return await this.cache.clearPersistent(),!0}catch(e){return e instanceof Error?this.logger.error(`Clearing keystore failed with error: ${e.message}`):this.logger.error("Clearing keystore failed with unknown error"),!1}}async signJwt(e,t,r,o){var y;const i=(y=this.performanceClient)==null?void 0:y.startMeasurement(_.CryptoOptsSignJwt,o),s=await this.cache.getItem(t);if(!s)throw Y(Nl);const a=await Na(s.publicKey),c=eh(a),l=Gi(JSON.stringify({kid:t})),u=Rl.getShrHeaderString({...r==null?void 0:r.header,alg:a.alg,kid:l}),d=Gi(u);e.cnf={jwk:JSON.parse(c)};const h=Gi(JSON.stringify(e)),f=`${d}.${h}`,p=new TextEncoder().encode(f),v=await Db(s.privateKey,p),E=oa(new Uint8Array(v)),b=`${f}.${E}`;return i&&i.end({success:!0}),b}async hashString(e){return Zp(e)}}Ro.POP_KEY_USAGES=["sign","verify"];Ro.EXTRACTABLE=!0;function eh(n){return JSON.stringify(n,Object.keys(n).sort())}/*! @azure/msal-browser v3.30.0 2025-08-05 */class tI{constructor(){if(!window.localStorage)throw Hl(Ll)}getItem(e){return window.localStorage.getItem(e)}setItem(e,t){window.localStorage.setItem(e,t)}removeItem(e){window.localStorage.removeItem(e)}getKeys(){return Object.keys(window.localStorage)}containsKey(e){return window.localStorage.hasOwnProperty(e)}}/*! @azure/msal-browser v3.30.0 2025-08-05 */class nI{constructor(){if(!window.sessionStorage)throw Hl(Ll)}getItem(e){return window.sessionStorage.getItem(e)}setItem(e,t){window.sessionStorage.setItem(e,t)}removeItem(e){window.sessionStorage.removeItem(e)}getKeys(){return Object.keys(window.sessionStorage)}containsKey(e){return window.sessionStorage.hasOwnProperty(e)}}/*! @azure/msal-browser v3.30.0 2025-08-05 */function om(n,e){if(!e)return null;try{return nn.parseRequestState(n,e).libraryState.meta}catch{throw H(_o)}}/*! @azure/msal-browser v3.30.0 2025-08-05 */const rI=24*60*60*1e3;class oI{getItem(e){const t=`${encodeURIComponent(e)}`,r=document.cookie.split(";");for(let o=0;o{const o=decodeURIComponent(r).trim().split("=");t.push(o[0])}),t}containsKey(e){return this.getKeys().includes(e)}}function iI(n){const e=new Date;return new Date(e.getTime()+n*rI).toUTCString()}/*! @azure/msal-browser v3.30.0 2025-08-05 */class bc extends bo{constructor(e,t,r,o,i,s){super(e,r,o,i),this.cacheConfig=t,this.logger=o,this.internalStorage=new _c,this.browserStorage=this.setupBrowserStorage(this.cacheConfig.cacheLocation),this.temporaryCacheStorage=this.setupBrowserStorage(this.cacheConfig.temporaryCacheLocation),this.cookieStorage=new oI,t.cacheMigrationEnabled&&(this.migrateCacheEntries(),this.createKeyMaps()),this.performanceClient=s}setupBrowserStorage(e){try{switch(e){case Ot.LocalStorage:return new tI;case Ot.SessionStorage:return new nI;case Ot.MemoryStorage:default:break}}catch(t){this.logger.error(t)}return this.cacheConfig.cacheLocation=Ot.MemoryStorage,new _c}migrateCacheEntries(){const e=this.browserStorage.getItem(zt.VERSION);e&&this.logger.info(`MSAL.js was last initialized with version ${e}`),e!==So&&this.browserStorage.setItem(zt.VERSION,So);const t=`${R.CACHE_PREFIX}.${it.ID_TOKEN}`,r=`${R.CACHE_PREFIX}.${it.CLIENT_INFO}`,o=`${R.CACHE_PREFIX}.${it.ERROR}`,i=`${R.CACHE_PREFIX}.${it.ERROR_DESC}`,s=this.browserStorage.getItem(t),a=this.browserStorage.getItem(r),c=this.browserStorage.getItem(o),l=this.browserStorage.getItem(i),u=[s,a,c,l];[it.ID_TOKEN,it.CLIENT_INFO,it.ERROR,it.ERROR_DESC].forEach((h,f)=>{const C=u[f];C&&this.setTemporaryCache(h,C,!0)})}createKeyMaps(){this.logger.trace("BrowserCacheManager - createKeyMaps called.");const e=this.cryptoImpl.createNewGuid(),t=this.getItem(zt.ACCOUNT_KEYS),r=this.getItem(`${zt.TOKEN_KEYS}.${this.clientId}`);if(t&&r){this.logger.verbose("BrowserCacheManager:createKeyMaps - account and token key maps already exist, skipping migration.");return}this.browserStorage.getKeys().forEach(i=>{if(this.isCredentialKey(i)){const s=this.getItem(i);if(s){const a=this.validateAndParseJson(s);if(a&&a.hasOwnProperty("credentialType"))switch(a.credentialType){case ae.ID_TOKEN:if(Pd(a)){this.logger.trace("BrowserCacheManager:createKeyMaps - idToken found, saving key to token key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - idToken with key: ${i} found, saving key to token key map`);const c=a,l=this.updateCredentialCacheKey(i,c,e);this.addTokenKey(l,ae.ID_TOKEN,e);return}else this.logger.trace("BrowserCacheManager:createKeyMaps - key found matching idToken schema with value containing idToken credentialType field but value failed IdTokenEntity validation, skipping."),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - failed idToken validation on key: ${i}`);break;case ae.ACCESS_TOKEN:case ae.ACCESS_TOKEN_WITH_AUTH_SCHEME:if(Od(a)){this.logger.trace("BrowserCacheManager:createKeyMaps - accessToken found, saving key to token key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - accessToken with key: ${i} found, saving key to token key map`);const c=a,l=this.updateCredentialCacheKey(i,c,e);this.addTokenKey(l,ae.ACCESS_TOKEN,e);return}else this.logger.trace("BrowserCacheManager:createKeyMaps - key found matching accessToken schema with value containing accessToken credentialType field but value failed AccessTokenEntity validation, skipping."),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - failed accessToken validation on key: ${i}`);break;case ae.REFRESH_TOKEN:if(Nd(a)){this.logger.trace("BrowserCacheManager:createKeyMaps - refreshToken found, saving key to token key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - refreshToken with key: ${i} found, saving key to token key map`);const c=a,l=this.updateCredentialCacheKey(i,c,e);this.addTokenKey(l,ae.REFRESH_TOKEN,e);return}else this.logger.trace("BrowserCacheManager:createKeyMaps - key found matching refreshToken schema with value containing refreshToken credentialType field but value failed RefreshTokenEntity validation, skipping."),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - failed refreshToken validation on key: ${i}`);break}}}if(this.isAccountKey(i)){const s=this.getItem(i);if(s){const a=this.validateAndParseJson(s);a&&rt.isAccountEntity(a)&&(this.logger.trace("BrowserCacheManager:createKeyMaps - account found, saving key to account key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - account with key: ${i} found, saving key to account key map`),this.addAccountKeyToMap(i,e))}}})}validateAndParseJson(e){try{const t=JSON.parse(e);return t&&typeof t=="object"?t:null}catch{return null}}getItem(e){return this.browserStorage.getItem(e)}setItem(e,t,r){let o=[];for(let s=0;s<=20;s++)try{this.browserStorage.setItem(e,t),s>0&&this.removeAccessTokenKeys(o.slice(0,s),r);break}catch(a){const c=lp(a);if(c.errorCode===Al&&s<20){if(o.length||(e===`${zt.TOKEN_KEYS}.${this.clientId}`?o=JSON.parse(t).accessToken:o=this.getTokenKeys().accessToken),o.length<=s)throw c;this.removeAccessToken(o[s],r,!1)}else throw c}}getAccount(e,t,r){this.logger.trace("BrowserCacheManager.getAccount called");const o=this.getCachedAccountEntity(e,t);return this.updateOutdatedCachedAccount(e,o,t,r)}getCachedAccountEntity(e,t){const r=this.getItem(e);if(!r)return this.removeAccountKeyFromMap(e,t),null;const o=this.validateAndParseJson(r);return!o||!rt.isAccountEntity(o)?null:bo.toObject(new rt,o)}setAccount(e,t){this.logger.trace("BrowserCacheManager.setAccount called");const r=e.generateAccountKey();e.lastUpdatedAt=Date.now().toString(),this.setItem(r,JSON.stringify(e),t),this.addAccountKeyToMap(r,t)}getAccountKeys(){this.logger.trace("BrowserCacheManager.getAccountKeys called");const e=this.getItem(zt.ACCOUNT_KEYS);return e?JSON.parse(e):(this.logger.verbose("BrowserCacheManager.getAccountKeys - No account keys found"),[])}addAccountKeyToMap(e,t){this.logger.trace("BrowserCacheManager.addAccountKeyToMap called"),this.logger.tracePii(`BrowserCacheManager.addAccountKeyToMap called with key: ${e}`);const r=this.getAccountKeys();r.indexOf(e)===-1?(r.push(e),this.setItem(zt.ACCOUNT_KEYS,JSON.stringify(r),t),this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key added")):this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key already exists in map")}removeAccountKeyFromMap(e,t){this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap called"),this.logger.tracePii(`BrowserCacheManager.removeAccountKeyFromMap called with key: ${e}`);const r=this.getAccountKeys(),o=r.indexOf(e);if(o>-1){if(r.splice(o,1),r.length===0){this.removeItem(zt.ACCOUNT_KEYS);return}else this.setItem(zt.ACCOUNT_KEYS,JSON.stringify(r),t);this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap account key removed")}else this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap key not found in existing map")}async removeAccount(e,t){super.removeAccount(e,t),this.removeAccountKeyFromMap(e,t)}removeOutdatedAccount(e,t){this.removeItem(e),this.removeAccountKeyFromMap(e,t)}removeIdToken(e,t){super.removeIdToken(e,t),this.removeTokenKey(e,ae.ID_TOKEN,t)}removeAccessToken(e,t,r=!0){var o;super.removeAccessToken(e,t),(o=this.performanceClient)==null||o.incrementFields({accessTokensRemoved:1},t),r&&this.removeTokenKey(e,ae.ACCESS_TOKEN,t)}removeAccessTokenKeys(e,t){this.logger.trace("removeAccessTokenKey called");const r=this.getTokenKeys();let o=0;if(e.forEach(i=>{const s=r.accessToken.indexOf(i);s>-1&&(r.accessToken.splice(s,1),o++)}),o>0){this.logger.info(`removed ${o} accessToken keys from tokenKeys map`),this.setTokenKeys(r,t);return}}removeRefreshToken(e,t){super.removeRefreshToken(e,t),this.removeTokenKey(e,ae.REFRESH_TOKEN,t)}getTokenKeys(){this.logger.trace("BrowserCacheManager.getTokenKeys called");const e=this.getItem(`${zt.TOKEN_KEYS}.${this.clientId}`);if(e){const t=this.validateAndParseJson(e);if(t&&t.hasOwnProperty("idToken")&&t.hasOwnProperty("accessToken")&&t.hasOwnProperty("refreshToken"))return t;this.logger.error("BrowserCacheManager.getTokenKeys - Token keys found but in an unknown format. Returning empty key map.")}else this.logger.verbose("BrowserCacheManager.getTokenKeys - No token keys found");return{idToken:[],accessToken:[],refreshToken:[]}}setTokenKeys(e,t){if(e.idToken.length===0&&e.accessToken.length===0&&e.refreshToken.length===0){this.removeItem(`${zt.TOKEN_KEYS}.${this.clientId}`);return}else this.setItem(`${zt.TOKEN_KEYS}.${this.clientId}`,JSON.stringify(e),t)}addTokenKey(e,t,r){this.logger.trace("BrowserCacheManager addTokenKey called");const o=this.getTokenKeys();switch(t){case ae.ID_TOKEN:o.idToken.indexOf(e)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - idToken added to map"),o.idToken.push(e));break;case ae.ACCESS_TOKEN:const i=o.accessToken.indexOf(e);i!==-1&&o.accessToken.splice(i,1),this.logger.trace(`access token ${i===-1?"added to":"updated in"} map`),o.accessToken.push(e);break;case ae.REFRESH_TOKEN:o.refreshToken.indexOf(e)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - refreshToken added to map"),o.refreshToken.push(e));break;default:throw this.logger.error(`BrowserCacheManager:addTokenKey - CredentialType provided invalid. CredentialType: ${t}`),H(gc)}this.setTokenKeys(o,r)}removeTokenKey(e,t,r,o=this.getTokenKeys()){switch(this.logger.trace("BrowserCacheManager removeTokenKey called"),t){case ae.ID_TOKEN:this.logger.infoPii(`BrowserCacheManager: removeTokenKey - attempting to remove idToken with key: ${e} from map`);const i=o.idToken.indexOf(e);i>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - idToken removed from map"),o.idToken.splice(i,1)):this.logger.info("BrowserCacheManager: removeTokenKey - idToken does not exist in map. Either it was previously removed or it was never added.");break;case ae.ACCESS_TOKEN:this.logger.infoPii(`BrowserCacheManager: removeTokenKey - attempting to remove accessToken with key: ${e} from map`);const s=o.accessToken.indexOf(e);s>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - accessToken removed from map"),o.accessToken.splice(s,1)):this.logger.info("BrowserCacheManager: removeTokenKey - accessToken does not exist in map. Either it was previously removed or it was never added.");break;case ae.REFRESH_TOKEN:this.logger.infoPii(`BrowserCacheManager: removeTokenKey - attempting to remove refreshToken with key: ${e} from map`);const a=o.refreshToken.indexOf(e);a>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken removed from map"),o.refreshToken.splice(a,1)):this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken does not exist in map. Either it was previously removed or it was never added.");break;default:throw this.logger.error(`BrowserCacheManager:removeTokenKey - CredentialType provided invalid. CredentialType: ${t}`),H(gc)}this.setTokenKeys(o,r)}getIdTokenCredential(e,t){const r=this.getItem(e);if(!r)return this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeIdToken(e,t),null;const o=this.validateAndParseJson(r);return!o||!Pd(o)?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),o)}setIdTokenCredential(e,t){this.logger.trace("BrowserCacheManager.setIdTokenCredential called");const r=to(e);e.lastUpdatedAt=Date.now().toString(),this.setItem(r,JSON.stringify(e),t),this.addTokenKey(r,ae.ID_TOKEN,t)}getAccessTokenCredential(e,t){const r=this.getItem(e);if(!r)return this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeTokenKey(e,ae.ACCESS_TOKEN,t),null;const o=this.validateAndParseJson(r);return!o||!Od(o)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),o)}setAccessTokenCredential(e,t){this.logger.trace("BrowserCacheManager.setAccessTokenCredential called");const r=to(e);e.lastUpdatedAt=Date.now().toString(),this.setItem(r,JSON.stringify(e),t),this.addTokenKey(r,ae.ACCESS_TOKEN,t)}getRefreshTokenCredential(e,t){const r=this.getItem(e);if(!r)return this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeTokenKey(e,ae.REFRESH_TOKEN,t),null;const o=this.validateAndParseJson(r);return!o||!Nd(o)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),o)}setRefreshTokenCredential(e,t){this.logger.trace("BrowserCacheManager.setRefreshTokenCredential called");const r=to(e);e.lastUpdatedAt=Date.now().toString(),this.setItem(r,JSON.stringify(e),t),this.addTokenKey(r,ae.REFRESH_TOKEN,t)}getAppMetadata(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null;const r=this.validateAndParseJson(t);return!r||!Qw(e,r)?(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),r)}setAppMetadata(e,t){this.logger.trace("BrowserCacheManager.setAppMetadata called");const r=zw(e);this.setItem(r,JSON.stringify(e),t)}getServerTelemetry(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null;const r=this.validateAndParseJson(t);return!r||!Gw(e,r)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),r)}setServerTelemetry(e,t,r){this.logger.trace("BrowserCacheManager.setServerTelemetry called"),this.setItem(e,JSON.stringify(t),r)}getAuthorityMetadata(e){const t=this.internalStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAuthorityMetadata: called, no cache hit"),null;const r=this.validateAndParseJson(t);return r&&Ww(e,r)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),r):null}getAuthorityMetadataKeys(){return this.internalStorage.getKeys().filter(t=>this.isAuthorityMetadata(t))}setWrapperMetadata(e,t){this.internalStorage.setItem(ji.WRAPPER_SKU,e),this.internalStorage.setItem(ji.WRAPPER_VER,t)}getWrapperMetadata(){const e=this.internalStorage.getItem(ji.WRAPPER_SKU)||R.EMPTY_STRING,t=this.internalStorage.getItem(ji.WRAPPER_VER)||R.EMPTY_STRING;return[e,t]}setAuthorityMetadata(e,t){this.logger.trace("BrowserCacheManager.setAuthorityMetadata called"),this.internalStorage.setItem(e,JSON.stringify(t))}getActiveAccount(e){const t=this.generateCacheKey(it.ACTIVE_ACCOUNT_FILTERS),r=this.getItem(t);if(!r){this.logger.trace("BrowserCacheManager.getActiveAccount: No active account filters cache schema found, looking for legacy schema");const i=this.generateCacheKey(it.ACTIVE_ACCOUNT),s=this.getItem(i);if(!s)return this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null;const a=this.getAccountInfoFilteredBy({localAccountId:s},e);return a?(this.logger.trace("BrowserCacheManager.getActiveAccount: Legacy active account cache schema found"),this.logger.trace("BrowserCacheManager.getActiveAccount: Adding active account filters cache schema"),this.setActiveAccount(a,e),a):null}const o=this.validateAndParseJson(r);return o?(this.logger.trace("BrowserCacheManager.getActiveAccount: Active account filters schema found"),this.getAccountInfoFilteredBy({homeAccountId:o.homeAccountId,localAccountId:o.localAccountId,tenantId:o.tenantId},e)):(this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null)}setActiveAccount(e,t){const r=this.generateCacheKey(it.ACTIVE_ACCOUNT_FILTERS),o=this.generateCacheKey(it.ACTIVE_ACCOUNT);if(e){this.logger.verbose("setActiveAccount: Active account set");const i={homeAccountId:e.homeAccountId,localAccountId:e.localAccountId,tenantId:e.tenantId,lastUpdatedAt:Date.now().toString()};this.setItem(r,JSON.stringify(i),t),this.setItem(o,e.localAccountId,t)}else this.logger.verbose("setActiveAccount: No account passed, active account not set"),this.browserStorage.removeItem(r),this.browserStorage.removeItem(o)}getThrottlingCache(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null;const r=this.validateAndParseJson(t);return!r||!Vw(e,r)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),r)}setThrottlingCache(e,t,r){this.logger.trace("BrowserCacheManager.setThrottlingCache called"),this.setItem(e,JSON.stringify(t),r)}getTemporaryCache(e,t){const r=t?this.generateCacheKey(e):e;if(this.cacheConfig.storeAuthStateInCookie){const i=this.cookieStorage.getItem(r);if(i)return this.logger.trace("BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies"),i}const o=this.temporaryCacheStorage.getItem(r);if(!o){if(this.cacheConfig.cacheLocation===Ot.LocalStorage){const i=this.browserStorage.getItem(r);if(i)return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item found in local storage"),i}return this.logger.trace("BrowserCacheManager.getTemporaryCache: No cache item found in local storage"),null}return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item returned"),o}setTemporaryCache(e,t,r){const o=r?this.generateCacheKey(e):e;this.temporaryCacheStorage.setItem(o,t),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie"),this.cookieStorage.setItem(o,t,void 0,this.cacheConfig.secureCookies))}removeItem(e){this.browserStorage.removeItem(e)}removeTemporaryItem(e){this.temporaryCacheStorage.removeItem(e),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.removeItem: storeAuthStateInCookie is true, clearing item cookie"),this.cookieStorage.removeItem(e))}getKeys(){return this.browserStorage.getKeys()}async clear(e){await this.removeAllAccounts(e),this.removeAppMetadata(e),this.temporaryCacheStorage.getKeys().forEach(t=>{(t.indexOf(R.CACHE_PREFIX)!==-1||t.indexOf(this.clientId)!==-1)&&this.removeTemporaryItem(t)}),this.browserStorage.getKeys().forEach(t=>{(t.indexOf(R.CACHE_PREFIX)!==-1||t.indexOf(this.clientId)!==-1)&&this.browserStorage.removeItem(t)}),this.internalStorage.clear()}async clearTokensAndKeysWithClaims(e,t){e.addQueueMeasurement(_.ClearTokensAndKeysWithClaims,t);const r=this.getTokenKeys();let o=0;r.accessToken.forEach(i=>{const s=this.getAccessTokenCredential(i,t);s!=null&&s.requestedClaimsHash&&i.includes(s.requestedClaimsHash.toLowerCase())&&(this.removeAccessToken(i,t),o++)}),o>0&&this.logger.warning(`${o} access tokens with claims in the cache keys have been removed from the cache.`)}generateCacheKey(e){return this.validateAndParseJson(e)?JSON.stringify(e):tn.startsWith(e,R.CACHE_PREFIX)||tn.startsWith(e,it.ADAL_ID_TOKEN)?e:`${R.CACHE_PREFIX}.${this.clientId}.${e}`}generateAuthorityKey(e){const{libraryState:{id:t}}=nn.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${ke.AUTHORITY}.${t}`)}generateNonceKey(e){const{libraryState:{id:t}}=nn.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${ke.NONCE_IDTOKEN}.${t}`)}generateStateKey(e){const{libraryState:{id:t}}=nn.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${ke.REQUEST_STATE}.${t}`)}getCachedAuthority(e){const t=this.generateStateKey(e),r=this.getTemporaryCache(t);if(!r)return null;const o=this.generateAuthorityKey(r);return this.getTemporaryCache(o)}updateCacheEntries(e,t,r,o,i){this.logger.trace("BrowserCacheManager.updateCacheEntries called");const s=this.generateStateKey(e);this.setTemporaryCache(s,e,!1);const a=this.generateNonceKey(e);this.setTemporaryCache(a,t,!1);const c=this.generateAuthorityKey(e);if(this.setTemporaryCache(c,r,!1),i){const l={credential:i.homeAccountId,type:Kt.HOME_ACCOUNT_ID};this.setTemporaryCache(ke.CCS_CREDENTIAL,JSON.stringify(l),!0)}else if(o){const l={credential:o,type:Kt.UPN};this.setTemporaryCache(ke.CCS_CREDENTIAL,JSON.stringify(l),!0)}}resetRequestCache(e){this.logger.trace("BrowserCacheManager.resetRequestCache called"),e&&(this.temporaryCacheStorage.getKeys().forEach(t=>{t.indexOf(e)!==-1&&this.removeTemporaryItem(t)}),this.removeTemporaryItem(this.generateStateKey(e)),this.removeTemporaryItem(this.generateNonceKey(e)),this.removeTemporaryItem(this.generateAuthorityKey(e))),this.removeTemporaryItem(this.generateCacheKey(ke.REQUEST_PARAMS)),this.removeTemporaryItem(this.generateCacheKey(ke.ORIGIN_URI)),this.removeTemporaryItem(this.generateCacheKey(ke.URL_HASH)),this.removeTemporaryItem(this.generateCacheKey(ke.CORRELATION_ID)),this.removeTemporaryItem(this.generateCacheKey(ke.CCS_CREDENTIAL)),this.removeTemporaryItem(this.generateCacheKey(ke.NATIVE_REQUEST)),this.setInteractionInProgress(!1)}cleanRequestByState(e){if(this.logger.trace("BrowserCacheManager.cleanRequestByState called"),e){const t=this.generateStateKey(e),r=this.temporaryCacheStorage.getItem(t);this.logger.infoPii(`BrowserCacheManager.cleanRequestByState: Removing temporary cache items for state: ${r}`),this.resetRequestCache(r||R.EMPTY_STRING)}}cleanRequestByInteractionType(e){this.logger.trace("BrowserCacheManager.cleanRequestByInteractionType called"),this.temporaryCacheStorage.getKeys().forEach(t=>{if(t.indexOf(ke.REQUEST_STATE)===-1)return;const r=this.temporaryCacheStorage.getItem(t);if(!r)return;const o=om(this.cryptoImpl,r);o&&o.interactionType===e&&(this.logger.infoPii(`BrowserCacheManager.cleanRequestByInteractionType: Removing temporary cache items for state: ${r}`),this.resetRequestCache(r))}),this.setInteractionInProgress(!1)}cacheCodeRequest(e){this.logger.trace("BrowserCacheManager.cacheCodeRequest called");const t=xl(JSON.stringify(e));this.setTemporaryCache(ke.REQUEST_PARAMS,t,!0)}getCachedRequest(e){this.logger.trace("BrowserCacheManager.getCachedRequest called");const t=this.getTemporaryCache(ke.REQUEST_PARAMS,!0);if(!t)throw Y(Np);let r;try{r=JSON.parse(_n(t))}catch(o){throw this.logger.errorPii(`Attempted to parse: ${t}`),this.logger.error(`Parsing cached token request threw with error: ${o}`),Y(Mp)}if(this.removeTemporaryItem(this.generateCacheKey(ke.REQUEST_PARAMS)),!r.authority){const o=this.generateAuthorityKey(e),i=this.getTemporaryCache(o);if(!i)throw Y(Pl);r.authority=i}return r}getCachedNativeRequest(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");const e=this.getTemporaryCache(ke.NATIVE_REQUEST,!0);if(!e)return this.logger.trace("BrowserCacheManager.getCachedNativeRequest: No cached native request found"),null;const t=this.validateAndParseJson(e);return t||(this.logger.error("BrowserCacheManager.getCachedNativeRequest: Unable to parse native request"),null)}isInteractionInProgress(e){const t=this.getInteractionInProgress();return e?t===this.clientId:!!t}getInteractionInProgress(){const e=`${R.CACHE_PREFIX}.${ke.INTERACTION_STATUS_KEY}`;return this.getTemporaryCache(e,!1)}setInteractionInProgress(e){const t=`${R.CACHE_PREFIX}.${ke.INTERACTION_STATUS_KEY}`;if(e){if(this.getInteractionInProgress())throw Y(_p);this.setTemporaryCache(t,this.clientId,!1)}else!e&&this.getInteractionInProgress()===this.clientId&&this.removeTemporaryItem(t)}getLegacyLoginHint(){const e=this.getTemporaryCache(it.ADAL_ID_TOKEN);e&&(this.browserStorage.removeItem(it.ADAL_ID_TOKEN),this.logger.verbose("Cached ADAL id token retrieved."));const t=this.getTemporaryCache(it.ID_TOKEN,!0);t&&(this.browserStorage.removeItem(this.generateCacheKey(it.ID_TOKEN)),this.logger.verbose("Cached MSAL.js v1 id token retrieved"));const r=t||e;if(r){const o=qr(r,_n);if(o.preferred_username)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 preferred_username as loginHint"),o.preferred_username;if(o.upn)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 upn as loginHint"),o.upn;this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, however, no account hint claim found. Enable preferred_username or upn id token claim to get SSO.")}return null}updateCredentialCacheKey(e,t,r){const o=to(t);if(e!==o){const i=this.getItem(e);if(i)return this.browserStorage.removeItem(e),this.setItem(o,i,r),this.logger.verbose(`Updated an outdated ${t.credentialType} cache key`),o;this.logger.error(`Attempted to update an outdated ${t.credentialType} cache key but no item matching the outdated key was found in storage`)}return e}async hydrateCache(e,t){var a,c,l;const r=Ws((a=e.account)==null?void 0:a.homeAccountId,(c=e.account)==null?void 0:c.environment,e.idToken,this.clientId,e.tenantId);let o;t.claims&&(o=await this.cryptoImpl.hashString(t.claims));const i=Ys((l=e.account)==null?void 0:l.homeAccountId,e.account.environment,e.accessToken,this.clientId,e.tenantId,e.scopes.join(" "),e.expiresOn?e.expiresOn.getTime()/1e3:0,e.extExpiresOn?e.extExpiresOn.getTime()/1e3:0,_n,void 0,e.tokenType,void 0,t.sshKid,t.claims,o),s={idToken:r,accessToken:i};return this.saveCacheRecord(s,e.correlationId)}async saveCacheRecord(e,t,r){try{await super.saveCacheRecord(e,t,r)}catch(o){if(o instanceof co&&this.performanceClient&&t)try{const i=this.getTokenKeys();this.performanceClient.addFields({cacheRtCount:i.refreshToken.length,cacheIdCount:i.idToken.length,cacheAtCount:i.accessToken.length},t)}catch{}throw o}}}const sI=(n,e)=>{const t={cacheLocation:Ot.MemoryStorage,temporaryCacheLocation:Ot.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};return new bc(n,t,gs,e)};/*! @azure/msal-browser v3.30.0 2025-08-05 */function aI(n,e,t,r,o){return n.verbose("getAllAccounts called"),t?e.getAllAccounts(r,o):[]}function cI(n,e,t,r){if(e.trace("getAccount called"),Object.keys(n).length===0)return e.warning("getAccount: No accountFilter provided"),null;const o=t.getAccountInfoFilteredBy(n,r);return o?(e.verbose("getAccount: Account matching provided filter found, returning"),o):(e.verbose("getAccount: No matching account found, returning null"),null)}function lI(n,e,t,r){if(e.trace("getAccountByUsername called"),!n)return e.warning("getAccountByUsername: No username provided"),null;const o=t.getAccountInfoFilteredBy({username:n},r);return o?(e.verbose("getAccountByUsername: Account matching username found, returning"),e.verbosePii(`getAccountByUsername: Returning signed-in accounts matching username: ${n}`),o):(e.verbose("getAccountByUsername: No matching account found, returning null"),null)}function uI(n,e,t,r){if(e.trace("getAccountByHomeId called"),!n)return e.warning("getAccountByHomeId: No homeAccountId provided"),null;const o=t.getAccountInfoFilteredBy({homeAccountId:n},r);return o?(e.verbose("getAccountByHomeId: Account matching homeAccountId found, returning"),e.verbosePii(`getAccountByHomeId: Returning signed-in accounts matching homeAccountId: ${n}`),o):(e.verbose("getAccountByHomeId: No matching account found, returning null"),null)}function dI(n,e,t,r){if(e.trace("getAccountByLocalId called"),!n)return e.warning("getAccountByLocalId: No localAccountId provided"),null;const o=t.getAccountInfoFilteredBy({localAccountId:n},r);return o?(e.verbose("getAccountByLocalId: Account matching localAccountId found, returning"),e.verbosePii(`getAccountByLocalId: Returning signed-in accounts matching localAccountId: ${n}`),o):(e.verbose("getAccountByLocalId: No matching account found, returning null"),null)}function hI(n,e,t){e.setActiveAccount(n,t)}function fI(n,e){return n.getActiveAccount(e)}/*! @azure/msal-browser v3.30.0 2025-08-05 */const oe={INITIALIZE_START:"msal:initializeStart",INITIALIZE_END:"msal:initializeEnd",ACCOUNT_ADDED:"msal:accountAdded",ACCOUNT_REMOVED:"msal:accountRemoved",ACTIVE_ACCOUNT_CHANGED:"msal:activeAccountChanged",LOGIN_START:"msal:loginStart",LOGIN_SUCCESS:"msal:loginSuccess",LOGIN_FAILURE:"msal:loginFailure",ACQUIRE_TOKEN_START:"msal:acquireTokenStart",ACQUIRE_TOKEN_SUCCESS:"msal:acquireTokenSuccess",ACQUIRE_TOKEN_FAILURE:"msal:acquireTokenFailure",ACQUIRE_TOKEN_NETWORK_START:"msal:acquireTokenFromNetworkStart",SSO_SILENT_START:"msal:ssoSilentStart",SSO_SILENT_SUCCESS:"msal:ssoSilentSuccess",SSO_SILENT_FAILURE:"msal:ssoSilentFailure",ACQUIRE_TOKEN_BY_CODE_START:"msal:acquireTokenByCodeStart",ACQUIRE_TOKEN_BY_CODE_SUCCESS:"msal:acquireTokenByCodeSuccess",ACQUIRE_TOKEN_BY_CODE_FAILURE:"msal:acquireTokenByCodeFailure",HANDLE_REDIRECT_START:"msal:handleRedirectStart",HANDLE_REDIRECT_END:"msal:handleRedirectEnd",POPUP_OPENED:"msal:popupOpened",LOGOUT_START:"msal:logoutStart",LOGOUT_SUCCESS:"msal:logoutSuccess",LOGOUT_FAILURE:"msal:logoutFailure",LOGOUT_END:"msal:logoutEnd",RESTORE_FROM_BFCACHE:"msal:restoreFromBFCache"};/*! @azure/msal-browser v3.30.0 2025-08-05 */class gI{constructor(e){this.eventCallbacks=new Map,this.logger=e||new hr({})}addEventCallback(e,t,r){if(typeof window<"u"){const o=r||Gb();return this.eventCallbacks.has(o)?(this.logger.error(`Event callback with id: ${o} is already registered. Please provide a unique id or remove the existing callback and try again.`),null):(this.eventCallbacks.set(o,[e,t||[]]),this.logger.verbose(`Event callback registered with id: ${o}`),o)}return null}removeEventCallback(e){this.eventCallbacks.delete(e),this.logger.verbose(`Event callback ${e} removed.`)}emitEvent(e,t,r,o){if(typeof window<"u"){const i={eventType:e,interactionType:t||null,payload:r||null,error:o||null,timestamp:Date.now()};this.eventCallbacks.forEach(([s,a],c)=>{(a.length===0||a.includes(e))&&(this.logger.verbose(`Emitting event to callback ${c}: ${e}`),s.apply(null,[i]))})}}}/*! @azure/msal-browser v3.30.0 2025-08-05 */class im{constructor(e,t,r,o,i,s,a,c,l){this.config=e,this.browserStorage=t,this.browserCrypto=r,this.networkClient=this.config.system.networkClient,this.eventHandler=i,this.navigationClient=s,this.nativeMessageHandler=c,this.correlationId=l||In(),this.logger=o.clone(Ft.MSAL_SKU,So,this.correlationId),this.performanceClient=a}async clearCacheOnLogout(e){if(e){rt.accountInfoIsEqual(e,this.browserStorage.getActiveAccount(this.correlationId),!1)&&(this.logger.verbose("Setting active account to null"),this.browserStorage.setActiveAccount(null,this.correlationId));try{await this.browserStorage.removeAccount(rt.generateAccountCacheKey(e),this.correlationId),this.logger.verbose("Cleared cache items belonging to the account provided in the logout request.")}catch{this.logger.error("Account provided in logout request was not found. Local cache unchanged.")}}else try{this.logger.verbose("No account provided in logout request, clearing all cache items.",this.correlationId),await this.browserStorage.clear(this.correlationId),await this.browserCrypto.clearKeystore()}catch{this.logger.error("Attempted to clear all MSAL cache items and failed. Local cache unchanged.")}}getRedirectUri(e){this.logger.verbose("getRedirectUri called");const t=e||this.config.auth.redirectUri;return ve.getAbsoluteUrl(t,Bn())}initializeServerTelemetryManager(e,t){this.logger.verbose("initializeServerTelemetryManager called");const r={clientId:this.config.auth.clientId,correlationId:this.correlationId,apiId:e,forceRefresh:t||!1,wrapperSKU:this.browserStorage.getWrapperMetadata()[0],wrapperVer:this.browserStorage.getWrapperMetadata()[1]};return new fi(r,this.browserStorage)}async getDiscoveredAuthority(e){const{account:t}=e,r=e.requestExtraQueryParameters&&e.requestExtraQueryParameters.hasOwnProperty("instance_aware")?e.requestExtraQueryParameters.instance_aware:void 0;this.performanceClient.addQueueMeasurement(_.StandardInteractionClientGetDiscoveredAuthority,this.correlationId);const o={protocolMode:this.config.auth.protocolMode,OIDCOptions:this.config.auth.OIDCOptions,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},i=e.requestAuthority||this.config.auth.authority,s=r!=null&&r.length?r==="true":this.config.auth.instanceAware,a=t&&s?this.config.auth.authority.replace(ve.getDomainFromUrl(i),t.environment):i,c=pt.generateAuthority(a,e.requestAzureCloudOptions||this.config.auth.azureCloudOptions),l=await q(fp,_.AuthorityFactoryCreateDiscoveredInstance,this.logger,this.performanceClient,this.correlationId)(c,this.config.system.networkClient,this.browserStorage,o,this.logger,this.correlationId,this.performanceClient);if(t&&!l.isAlias(t.environment))throw xe(op);return l}}/*! @azure/msal-browser v3.30.0 2025-08-05 */const pI=32;async function mI(n,e,t){n.addQueueMeasurement(_.GeneratePkceCodes,t);const r=$r(yI,_.GenerateCodeVerifier,e,n,t)(n,e,t),o=await q(CI,_.GenerateCodeChallengeFromVerifier,e,n,t)(r,n,e,t);return{verifier:r,challenge:o}}function yI(n,e,t){try{const r=new Uint8Array(pI);return $r(Nb,_.GetRandomValues,e,n,t)(r),oa(r)}catch{throw Y(kl)}}async function CI(n,e,t,r){e.addQueueMeasurement(_.GenerateCodeChallengeFromVerifier,r);try{const o=await q(Xp,_.Sha256Digest,t,e,r)(n,e,r);return oa(new Uint8Array(o))}catch{throw Y(kl)}}/*! @azure/msal-browser v3.30.0 2025-08-05 */async function ql(n,e,t,r){t.addQueueMeasurement(_.InitializeBaseRequest,n.correlationId);const o=n.authority||e.auth.authority,i=[...n&&n.scopes||[]],s={...n,correlationId:n.correlationId,authority:o,scopes:i};if(!s.authenticationScheme)s.authenticationScheme=Ne.BEARER,r.verbose(`Authentication Scheme wasn't explicitly set in request, defaulting to "Bearer" request`);else{if(s.authenticationScheme===Ne.SSH){if(!n.sshJwk)throw xe(Js);if(!n.sshKid)throw xe(tp)}r.verbose(`Authentication Scheme set to "${s.authenticationScheme}" as configured in Auth request`)}return e.cache.claimsBasedCachingEnabled&&n.claims&&!tn.isEmptyObj(n.claims)&&(s.requestedClaimsHash=await Zp(n.claims)),s}async function vI(n,e,t,r,o){r.addQueueMeasurement(_.InitializeSilentRequest,n.correlationId);const i=await q(ql,_.InitializeBaseRequest,o,r,n.correlationId)(n,t,r,o);return{...n,...i,account:e,forceRefresh:n.forceRefresh||!1}}/*! @azure/msal-browser v3.30.0 2025-08-05 */class No extends im{async initializeAuthorizationCodeRequest(e){this.performanceClient.addQueueMeasurement(_.StandardInteractionClientInitializeAuthorizationCodeRequest,this.correlationId);const t=await q(mI,_.GeneratePkceCodes,this.logger,this.performanceClient,this.correlationId)(this.performanceClient,this.logger,this.correlationId),r={...e,redirectUri:e.redirectUri,code:R.EMPTY_STRING,codeVerifier:t.verifier};return e.codeChallenge=t.challenge,e.codeChallengeMethod=R.S256_CODE_CHALLENGE_METHOD,r}initializeLogoutRequest(e){this.logger.verbose("initializeLogoutRequest called",e==null?void 0:e.correlationId);const t={correlationId:this.correlationId||In(),...e};if(e)if(e.logoutHint)this.logger.verbose("logoutHint has already been set in logoutRequest");else if(e.account){const r=this.getLogoutHintFromIdTokenClaims(e.account);r&&(this.logger.verbose("Setting logoutHint to login_hint ID Token Claim value for the account provided"),t.logoutHint=r)}else this.logger.verbose("logoutHint was not set and account was not passed into logout request, logoutHint will not be set");else this.logger.verbose("logoutHint will not be set since no logout request was configured");return!e||e.postLogoutRedirectUri!==null?e&&e.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to uri set on logout request",t.correlationId),t.postLogoutRedirectUri=ve.getAbsoluteUrl(e.postLogoutRedirectUri,Bn())):this.config.auth.postLogoutRedirectUri===null?this.logger.verbose("postLogoutRedirectUri configured as null and no uri set on request, not passing post logout redirect",t.correlationId):this.config.auth.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to configured uri",t.correlationId),t.postLogoutRedirectUri=ve.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,Bn())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",t.correlationId),t.postLogoutRedirectUri=ve.getAbsoluteUrl(Bn(),Bn())):this.logger.verbose("postLogoutRedirectUri passed as null, not setting post logout redirect uri",t.correlationId),t}getLogoutHintFromIdTokenClaims(e){const t=e.idTokenClaims;if(t){if(t.login_hint)return t.login_hint;this.logger.verbose("The ID Token Claims tied to the provided account do not contain a login_hint claim, logoutHint will not be added to logout request")}else this.logger.verbose("The provided account does not contain ID Token Claims, logoutHint will not be added to logout request");return null}async createAuthCodeClient(e){this.performanceClient.addQueueMeasurement(_.StandardInteractionClientCreateAuthCodeClient,this.correlationId);const t=await q(this.getClientConfiguration.bind(this),_.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)(e);return new mp(t,this.performanceClient)}async getClientConfiguration(e){const{serverTelemetryManager:t,requestAuthority:r,requestAzureCloudOptions:o,requestExtraQueryParameters:i,account:s}=e;this.performanceClient.addQueueMeasurement(_.StandardInteractionClientGetClientConfiguration,this.correlationId);const a=await q(this.getDiscoveredAuthority.bind(this),_.StandardInteractionClientGetDiscoveredAuthority,this.logger,this.performanceClient,this.correlationId)({requestAuthority:r,requestAzureCloudOptions:o,requestExtraQueryParameters:i,account:s}),c=this.config.system.loggerOptions;return{authOptions:{clientId:this.config.auth.clientId,authority:a,clientCapabilities:this.config.auth.clientCapabilities,redirectUri:this.config.auth.redirectUri},systemOptions:{tokenRenewalOffsetSeconds:this.config.system.tokenRenewalOffsetSeconds,preventCorsPreflight:!0},loggerOptions:{loggerCallback:c.loggerCallback,piiLoggingEnabled:c.piiLoggingEnabled,logLevel:c.logLevel,correlationId:this.correlationId},cacheOptions:{claimsBasedCachingEnabled:this.config.cache.claimsBasedCachingEnabled},cryptoInterface:this.browserCrypto,networkInterface:this.networkClient,storageInterface:this.browserStorage,serverTelemetryManager:t,libraryInfo:{sku:Ft.MSAL_SKU,version:So,cpu:R.EMPTY_STRING,os:R.EMPTY_STRING},telemetry:this.config.telemetry}}async initializeAuthorizationRequest(e,t){this.performanceClient.addQueueMeasurement(_.StandardInteractionClientInitializeAuthorizationRequest,this.correlationId);const r=this.getRedirectUri(e.redirectUri),o={interactionType:t},i=nn.setRequestState(this.browserCrypto,e&&e.state||R.EMPTY_STRING,o),a={...await q(ql,_.InitializeBaseRequest,this.logger,this.performanceClient,this.correlationId)({...e,correlationId:this.correlationId},this.config,this.performanceClient,this.logger),redirectUri:r,state:i,nonce:e.nonce||In(),responseMode:this.config.auth.OIDCOptions.serverResponseType};if(e.loginHint||e.sid)return a;const c=e.account||this.browserStorage.getActiveAccount(this.correlationId);if(c&&(this.logger.verbose("Setting validated request account",this.correlationId),this.logger.verbosePii(`Setting validated request account: ${c.homeAccountId}`,this.correlationId),a.account=c),!a.loginHint&&!c){const l=this.browserStorage.getLegacyLoginHint();l&&(a.loginHint=l)}return a}}/*! @azure/msal-browser v3.30.0 2025-08-05 */const TI="ContentError",sm="user_switch";/*! @azure/msal-browser v3.30.0 2025-08-05 */const AI="USER_INTERACTION_REQUIRED",EI="USER_CANCEL",wI="NO_NETWORK",_I="PERSISTENT_ERROR",bI="DISABLED",II="ACCOUNT_UNAVAILABLE";/*! @azure/msal-browser v3.30.0 2025-08-05 */const SI=-2147186943,RI={[sm]:"User attempted to switch accounts in the native broker, which is not allowed. All new accounts must sign-in through the standard web flow first, please try again."};class An extends Fe{constructor(e,t,r){super(e,t),Object.setPrototypeOf(this,An.prototype),this.name="NativeAuthError",this.ext=r}}function Zr(n){if(n.ext&&n.ext.status&&(n.ext.status===_I||n.ext.status===bI)||n.ext&&n.ext.error&&n.ext.error===SI)return!0;switch(n.errorCode){case TI:return!0;default:return!1}}function Ic(n,e,t){if(t&&t.status)switch(t.status){case II:return Cc(gp);case AI:return new cn(n,e);case EI:return Y(Fr);case wI:return Y(Ts)}return new An(n,RI[n]||e,t)}/*! @azure/msal-browser v3.30.0 2025-08-05 */class am extends No{async acquireToken(e){this.performanceClient.addQueueMeasurement(_.SilentCacheClientAcquireToken,e.correlationId);const t=this.initializeServerTelemetryManager(He.acquireTokenSilent_silentFlow),r=await q(this.getClientConfiguration.bind(this),_.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:t,requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,account:e.account}),o=new ub(r,this.performanceClient);this.logger.verbose("Silent auth client created");try{const s=(await q(o.acquireCachedToken.bind(o),_.SilentFlowClientAcquireCachedToken,this.logger,this.performanceClient,e.correlationId)(e))[0];return this.performanceClient.addFields({fromCache:!0},e.correlationId),s}catch(i){throw i instanceof Oi&&i.errorCode===Nl&&this.logger.verbose("Signing keypair for bound access token not found. Refreshing bound access token and generating a new crypto keypair."),i}}logout(e){this.logger.verbose("logoutRedirect called");const t=this.initializeLogoutRequest(e);return this.clearCacheOnLogout(t==null?void 0:t.account)}}/*! @azure/msal-browser v3.30.0 2025-08-05 */class lo extends im{constructor(e,t,r,o,i,s,a,c,l,u,d,h){var C;super(e,t,r,o,i,s,c,l,h),this.apiId=a,this.accountId=u,this.nativeMessageHandler=l,this.nativeStorageManager=d,this.silentCacheClient=new am(e,this.nativeStorageManager,r,o,i,s,c,l,h),this.serverTelemetryManager=this.initializeServerTelemetryManager(this.apiId);const f=this.nativeMessageHandler.getExtensionId()===ro.PREFERRED_EXTENSION_ID?"chrome":(C=this.nativeMessageHandler.getExtensionId())!=null&&C.length?"unknown":void 0;this.skus=fi.makeExtraSkuString({libraryName:Ft.MSAL_SKU,libraryVersion:So,extensionName:f,extensionVersion:this.nativeMessageHandler.getExtensionVersion()})}addRequestSKUs(e){e.extraParameters={...e.extraParameters,[z_]:this.skus}}async acquireToken(e){this.performanceClient.addQueueMeasurement(_.NativeInteractionClientAcquireToken,e.correlationId),this.logger.trace("NativeInteractionClient - acquireToken called.");const t=this.performanceClient.startMeasurement(_.NativeInteractionClientAcquireToken,e.correlationId),r=bn();try{const o=await this.initializeNativeRequest(e);try{const l=await this.acquireTokensFromCache(this.accountId,o);return t.end({success:!0,isNativeBroker:!1,fromCache:!0}),l}catch{this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call")}const{...i}=o,s={method:br.GetToken,request:i},a=await this.nativeMessageHandler.sendMessage(s),c=this.validateNativeResponse(a);return await this.handleNativeResponse(c,o,r).then(l=>(t.end({success:!0,isNativeBroker:!0,requestId:l.requestId}),this.serverTelemetryManager.clearNativeBrokerErrorCode(),l)).catch(l=>{throw t.end({success:!1,errorCode:l.errorCode,subErrorCode:l.subError,isNativeBroker:!0}),l})}catch(o){throw o instanceof An&&this.serverTelemetryManager.setNativeBrokerErrorCode(o.errorCode),o}}createSilentCacheRequest(e,t){return{authority:e.authority,correlationId:this.correlationId,scopes:Ye.fromString(e.scope).asArray(),account:t,forceRefresh:!1}}async acquireTokensFromCache(e,t){if(!e)throw this.logger.warning("NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided"),H(hc);const r=this.browserStorage.getBaseAccountInfo({nativeAccountId:e},t.correlationId);if(!r)throw H(hc);try{const o=this.createSilentCacheRequest(t,r),i=await this.silentCacheClient.acquireToken(o),s={...r,idTokenClaims:i==null?void 0:i.idTokenClaims,idToken:i==null?void 0:i.idToken};return{...i,account:s}}catch(o){throw o}}async acquireTokenRedirect(e,t){this.logger.trace("NativeInteractionClient - acquireTokenRedirect called.");const{...r}=e;delete r.onRedirectNavigate;const o=await this.initializeNativeRequest(r),i={method:br.GetToken,request:o};try{const c=await this.nativeMessageHandler.sendMessage(i);this.validateNativeResponse(c)}catch(c){if(c instanceof An&&(this.serverTelemetryManager.setNativeBrokerErrorCode(c.errorCode),Zr(c)))throw c}this.browserStorage.setTemporaryCache(ke.NATIVE_REQUEST,JSON.stringify(o),!0);const s={apiId:He.acquireTokenRedirect,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},a=this.config.auth.navigateToLoginRequestUrl?window.location.href:this.getRedirectUri(e.redirectUri);t.end({success:!0}),await this.navigationClient.navigateExternal(a,s)}async handleRedirectPromise(e,t){if(this.logger.trace("NativeInteractionClient - handleRedirectPromise called."),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),null;const r=this.browserStorage.getCachedNativeRequest();if(!r)return this.logger.verbose("NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null."),e&&t&&(e==null||e.addFields({errorCode:"no_cached_request"},t)),null;const{prompt:o,...i}=r;o&&this.logger.verbose("NativeInteractionClient - handleRedirectPromise called and prompt was included in the original request, removing prompt from cached request to prevent second interaction with native broker window."),this.browserStorage.removeItem(this.browserStorage.generateCacheKey(ke.NATIVE_REQUEST));const s={method:br.GetToken,request:i},a=bn();try{this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker.");const c=await this.nativeMessageHandler.sendMessage(s);this.validateNativeResponse(c);const l=this.handleNativeResponse(c,i,a);this.browserStorage.setInteractionInProgress(!1);const u=await l;return this.serverTelemetryManager.clearNativeBrokerErrorCode(),u}catch(c){throw this.browserStorage.setInteractionInProgress(!1),c}}logout(){return this.logger.trace("NativeInteractionClient - logout called."),Promise.reject("Logout not implemented yet")}async handleNativeResponse(e,t,r){var u;this.logger.trace("NativeInteractionClient - handleNativeResponse called.");const o=qr(e.id_token,_n),i=this.createHomeAccountIdentifier(e,o),s=(u=this.browserStorage.getAccountInfoFilteredBy({nativeAccountId:t.accountId},this.correlationId))==null?void 0:u.homeAccountId;if(i!==s&&e.account.id!==t.accountId)throw Ic(sm);const a=await this.getDiscoveredAuthority({requestAuthority:t.authority}),c=Il(this.browserStorage,a,i,_n,this.correlationId,o,e.client_info,void 0,o.tid,void 0,e.account.id,this.logger),l=await this.generateAuthenticationResult(e,t,o,c,a.canonicalAuthority,r);return this.cacheAccount(c),this.cacheNativeTokens(e,t,i,o,e.access_token,l.tenantId,r),l}createHomeAccountIdentifier(e,t){return rt.generateHomeAccountId(e.client_info||R.EMPTY_STRING,Zt.Default,this.logger,this.browserCrypto,t)}generateScopes(e,t){return e.scope?Ye.fromString(e.scope):Ye.fromString(t.scope)}async generatePopAccessToken(e,t){if(t.tokenType===Ne.POP&&t.signPopToken){if(e.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),e.shr;const r=new Io(this.browserCrypto),o={resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,shrNonce:t.shrNonce};if(!t.keyId)throw H(ul);return r.signPopToken(e.access_token,t.keyId,o)}else return e.access_token}async generateAuthenticationResult(e,t,r,o,i,s){const a=this.addTelemetryFromNativeResponse(e),c=e.scope?Ye.fromString(e.scope):Ye.fromString(t.scope),l=e.account.properties||{},u=l.UID||r.oid||r.sub||R.EMPTY_STRING,d=l.TenantId||r.tid||R.EMPTY_STRING,h=vl(o.getAccountInfo(),void 0,r,e.id_token);h.nativeAccountId!==e.account.id&&(h.nativeAccountId=e.account.id);const f=await this.generatePopAccessToken(e,t),C=t.tokenType===Ne.POP?Ne.POP:Ne.BEARER;return{authority:i,uniqueId:u,tenantId:d,scopes:c.asArray(),account:h,idToken:e.id_token,idTokenClaims:r,accessToken:f,fromCache:a?this.isResponseFromCache(a):!1,expiresOn:new Date(Number(s+e.expires_in)*1e3),tokenType:C,correlationId:this.correlationId,state:e.state,fromNativeBroker:!0}}cacheAccount(e){this.browserStorage.setAccount(e,this.correlationId),this.browserStorage.removeAccountContext(e,this.correlationId).catch(t=>{this.logger.error(`Error occurred while removing account context from browser storage. ${t}`)})}cacheNativeTokens(e,t,r,o,i,s,a){const c=Ws(r,t.authority,e.id_token||"",t.clientId,o.tid||""),l=t.tokenType===Ne.POP?R.SHR_NONCE_VALIDITY:(typeof e.expires_in=="string"?parseInt(e.expires_in,10):e.expires_in)||0,u=a+l,d=this.generateScopes(e,t),h=Ys(r,t.authority,i,t.clientId,o.tid||s,d.printScopes(),u,0,_n,void 0,t.tokenType,void 0,t.keyId),f={idToken:c,accessToken:h};this.nativeStorageManager.saveCacheRecord(f,t.correlationId,t.storeInCache)}addTelemetryFromNativeResponse(e){const t=this.getMATSFromResponse(e);return t?(this.performanceClient.addFields({extensionId:this.nativeMessageHandler.getExtensionId(),extensionVersion:this.nativeMessageHandler.getExtensionVersion(),matsBrokerVersion:t.broker_version,matsAccountJoinOnStart:t.account_join_on_start,matsAccountJoinOnEnd:t.account_join_on_end,matsDeviceJoin:t.device_join,matsPromptBehavior:t.prompt_behavior,matsApiErrorCode:t.api_error_code,matsUiVisible:t.ui_visible,matsSilentCode:t.silent_code,matsSilentBiSubCode:t.silent_bi_sub_code,matsSilentMessage:t.silent_message,matsSilentStatus:t.silent_status,matsHttpStatus:t.http_status,matsHttpEventCount:t.http_event_count},this.correlationId),t):null}validateNativeResponse(e){if(e.hasOwnProperty("access_token")&&e.hasOwnProperty("id_token")&&e.hasOwnProperty("client_info")&&e.hasOwnProperty("account")&&e.hasOwnProperty("scope")&&e.hasOwnProperty("expires_in"))return e;throw bg(ol,"Response missing expected properties.")}getMATSFromResponse(e){if(e.properties.MATS)try{return JSON.parse(e.properties.MATS)}catch{this.logger.error("NativeInteractionClient - Error parsing MATS telemetry, returning null instead")}return null}isResponseFromCache(e){return typeof e.is_cached>"u"?(this.logger.verbose("NativeInteractionClient - MATS telemetry does not contain field indicating if response was served from cache. Returning false."),!1):!!e.is_cached}async initializeNativeRequest(e){this.logger.trace("NativeInteractionClient - initializeNativeRequest called");const t=e.authority||this.config.auth.authority;e.account&&await this.getDiscoveredAuthority({requestAuthority:t,requestAzureCloudOptions:e.azureCloudOptions,account:e.account});const r=new ve(t);r.validateAsUri();const{scopes:o,...i}=e,s=new Ye(o||[]);s.appendScopes(Po);const a=()=>{switch(this.apiId){case He.ssoSilent:case He.acquireTokenSilent_silentFlow:return this.logger.trace("initializeNativeRequest: silent request sets prompt to none"),at.NONE}if(!e.prompt){this.logger.trace("initializeNativeRequest: prompt was not provided");return}switch(e.prompt){case at.NONE:case at.CONSENT:case at.LOGIN:return this.logger.trace("initializeNativeRequest: prompt is compatible with native flow"),e.prompt;default:throw this.logger.trace(`initializeNativeRequest: prompt = ${e.prompt} is not compatible with native flow`),Y(jp)}},c={...i,accountId:this.accountId,clientId:this.config.auth.clientId,authority:r.urlString,scope:s.printScopes(),redirectUri:this.getRedirectUri(e.redirectUri),prompt:a(),correlationId:this.correlationId,tokenType:e.authenticationScheme,windowTitleSubstring:document.title,extraParameters:{...e.extraQueryParameters,...e.tokenQueryParameters},extendedExpiryToken:!1,keyId:e.popKid};if(c.signPopToken&&e.popKid)throw Y(Vp);if(this.handleExtraBrokerParams(c),c.extraParameters=c.extraParameters||{},c.extraParameters.telemetry=ro.MATS_TELEMETRY,e.authenticationScheme===Ne.POP){const l={resourceRequestUri:e.resourceRequestUri,resourceRequestMethod:e.resourceRequestMethod,shrClaims:e.shrClaims,shrNonce:e.shrNonce},u=new Io(this.browserCrypto);let d;if(c.keyId)d=this.browserCrypto.base64UrlEncode(JSON.stringify({kid:c.keyId})),c.signPopToken=!1;else{const h=await q(u.generateCnf.bind(u),_.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(l,this.logger);d=h.reqCnfString,c.keyId=h.kid,c.signPopToken=!0}c.reqCnf=d}return this.addRequestSKUs(c),c}handleExtraBrokerParams(e){var i;const t=e.extraParameters&&e.extraParameters.hasOwnProperty(wl)&&e.extraParameters.hasOwnProperty(yc)&&e.extraParameters.hasOwnProperty(Ur);if(!e.embeddedClientId&&!t)return;let r="";const o=e.redirectUri;e.embeddedClientId?(e.redirectUri=this.config.auth.redirectUri,r=e.embeddedClientId):e.extraParameters&&(e.redirectUri=e.extraParameters[yc],r=e.extraParameters[Ur]),e.extraParameters={child_client_id:r,child_redirect_uri:o},(i=this.performanceClient)==null||i.addFields({embeddedClientId:r,embeddedRedirectUri:o},e.correlationId)}}/*! @azure/msal-browser v3.30.0 2025-08-05 */class En{constructor(e,t,r,o){this.logger=e,this.handshakeTimeoutMs=t,this.extensionId=o,this.resolvers=new Map,this.handshakeResolvers=new Map,this.messageChannel=new MessageChannel,this.windowListener=this.onWindowMessage.bind(this),this.performanceClient=r,this.handshakeEvent=r.startMeasurement(_.NativeMessageHandlerHandshake)}async sendMessage(e){this.logger.trace("NativeMessageHandler - sendMessage called.");const t={channel:ro.CHANNEL_ID,extensionId:this.extensionId,responseId:In(),body:e};return this.logger.trace("NativeMessageHandler - Sending request to browser extension"),this.logger.tracePii(`NativeMessageHandler - Sending request to browser extension: ${JSON.stringify(t)}`),this.messageChannel.port1.postMessage(t),new Promise((r,o)=>{this.resolvers.set(t.responseId,{resolve:r,reject:o})})}static async createProvider(e,t,r){e.trace("NativeMessageHandler - createProvider called.");try{const o=new En(e,t,r,ro.PREFERRED_EXTENSION_ID);return await o.sendHandshakeRequest(),o}catch{const i=new En(e,t,r);return await i.sendHandshakeRequest(),i}}async sendHandshakeRequest(){this.logger.trace("NativeMessageHandler - sendHandshakeRequest called."),window.addEventListener("message",this.windowListener,!1);const e={channel:ro.CHANNEL_ID,extensionId:this.extensionId,responseId:In(),body:{method:br.HandshakeRequest}};return this.handshakeEvent.add({extensionId:this.extensionId,extensionHandshakeTimeoutMs:this.handshakeTimeoutMs}),this.messageChannel.port1.onmessage=t=>{this.onChannelMessage(t)},window.postMessage(e,window.origin,[this.messageChannel.port2]),new Promise((t,r)=>{this.handshakeResolvers.set(e.responseId,{resolve:t,reject:r}),this.timeoutId=window.setTimeout(()=>{window.removeEventListener("message",this.windowListener,!1),this.messageChannel.port1.close(),this.messageChannel.port2.close(),this.handshakeEvent.end({extensionHandshakeTimedOut:!0,success:!1}),r(Y(Kp)),this.handshakeResolvers.delete(e.responseId)},this.handshakeTimeoutMs)})}onWindowMessage(e){if(this.logger.trace("NativeMessageHandler - onWindowMessage called"),e.source!==window)return;const t=e.data;if(!(!t.channel||t.channel!==ro.CHANNEL_ID)&&!(t.extensionId&&t.extensionId!==this.extensionId)&&t.body.method===br.HandshakeRequest){const r=this.handshakeResolvers.get(t.responseId);if(!r){this.logger.trace(`NativeMessageHandler.onWindowMessage - resolver can't be found for request ${t.responseId}`);return}this.logger.verbose(t.extensionId?`Extension with id: ${t.extensionId} not installed`:"No extension installed"),clearTimeout(this.timeoutId),this.messageChannel.port1.close(),this.messageChannel.port2.close(),window.removeEventListener("message",this.windowListener,!1),this.handshakeEvent.end({success:!1,extensionInstalled:!1}),r.reject(Y(qp))}}onChannelMessage(e){this.logger.trace("NativeMessageHandler - onChannelMessage called.");const t=e.data,r=this.resolvers.get(t.responseId),o=this.handshakeResolvers.get(t.responseId);try{const i=t.body.method;if(i===br.Response){if(!r)return;const s=t.body.response;if(this.logger.trace("NativeMessageHandler - Received response from browser extension"),this.logger.tracePii(`NativeMessageHandler - Received response from browser extension: ${JSON.stringify(s)}`),s.status!=="Success")r.reject(Ic(s.code,s.description,s.ext));else if(s.result)s.result.code&&s.result.description?r.reject(Ic(s.result.code,s.result.description,s.result.ext)):r.resolve(s.result);else throw bg(ol,"Event does not contain result.");this.resolvers.delete(t.responseId)}else if(i===br.HandshakeResponse){if(!o){this.logger.trace(`NativeMessageHandler.onChannelMessage - resolver can't be found for request ${t.responseId}`);return}clearTimeout(this.timeoutId),window.removeEventListener("message",this.windowListener,!1),this.extensionId=t.extensionId,this.extensionVersion=t.body.version,this.logger.verbose(`NativeMessageHandler - Received HandshakeResponse from extension: ${this.extensionId}`),this.handshakeEvent.end({extensionInstalled:!0,success:!0}),o.resolve(),this.handshakeResolvers.delete(t.responseId)}}catch(i){this.logger.error("Error parsing response from WAM Extension"),this.logger.errorPii(`Error parsing response from WAM Extension: ${i}`),this.logger.errorPii(`Unable to parse ${e}`),r?r.reject(i):o&&o.reject(i)}}getExtensionId(){return this.extensionId}getExtensionVersion(){return this.extensionVersion}static isNativeAvailable(e,t,r,o){if(t.trace("isNativeAvailable called"),!e.system.allowNativeBroker)return t.trace("isNativeAvailable: allowNativeBroker is not enabled, returning false"),!1;if(!r)return t.trace("isNativeAvailable: WAM extension provider is not initialized, returning false"),!1;if(o)switch(o){case Ne.BEARER:case Ne.POP:return t.trace("isNativeAvailable: authenticationScheme is supported, returning true"),!0;default:return t.trace("isNativeAvailable: authenticationScheme is not supported, returning false"),!1}return!0}}/*! @azure/msal-browser v3.30.0 2025-08-05 */class $l{constructor(e,t,r,o,i){this.authModule=e,this.browserStorage=t,this.authCodeRequest=r,this.logger=o,this.performanceClient=i}async handleCodeResponse(e,t){this.performanceClient.addQueueMeasurement(_.HandleCodeResponse,t.correlationId);let r;try{r=this.authModule.handleFragmentResponse(e,t.state)}catch(o){throw o instanceof fr&&o.subError===Fr?Y(Fr):o}return q(this.handleCodeResponseFromServer.bind(this),_.HandleCodeResponseFromServer,this.logger,this.performanceClient,t.correlationId)(r,t)}async handleCodeResponseFromServer(e,t,r=!0){if(this.performanceClient.addQueueMeasurement(_.HandleCodeResponseFromServer,t.correlationId),this.logger.trace("InteractionHandler.handleCodeResponseFromServer called"),this.authCodeRequest.code=e.code,e.cloud_instance_host_name&&await q(this.authModule.updateAuthority.bind(this.authModule),_.UpdateTokenEndpointAuthority,this.logger,this.performanceClient,t.correlationId)(e.cloud_instance_host_name,t.correlationId),r&&(e.nonce=t.nonce||void 0),e.state=t.state,e.client_info)this.authCodeRequest.clientInfo=e.client_info;else{const i=this.createCcsCredentials(t);i&&(this.authCodeRequest.ccsCredential=i)}return await q(this.authModule.acquireToken.bind(this.authModule),_.AuthClientAcquireToken,this.logger,this.performanceClient,t.correlationId)(this.authCodeRequest,e)}createCcsCredentials(e){return e.account?{credential:e.account.homeAccountId,type:Kt.HOME_ACCOUNT_ID}:e.loginHint?{credential:e.loginHint,type:Kt.UPN}:null}}/*! @azure/msal-browser v3.30.0 2025-08-05 */function cm(n,e,t){const r=ys(n);if(!r)throw sp(n)?(t.error(`A ${e} is present in the iframe but it does not contain known properties. It's likely that the ${e} has been replaced by code running on the redirectUri page.`),t.errorPii(`The ${e} detected is: ${n}`),Y(Ap)):(t.error(`The request has returned to the redirectUri but a ${e} is not present. It's likely that the ${e} has been removed or the page has been redirected by code running on the redirectUri page.`),Y(Tp));return r}function kI(n,e,t){if(!n.state)throw Y(Ol);const r=om(e,n.state);if(!r)throw Y(Ep);if(r.interactionType!==t)throw Y(wp)}/*! @azure/msal-browser v3.30.0 2025-08-05 */class OI extends No{constructor(e,t,r,o,i,s,a,c,l,u){super(e,t,r,o,i,s,a,l,u),this.unloadWindow=this.unloadWindow.bind(this),this.nativeStorage=c}acquireToken(e){try{const r={popupName:this.generatePopupName(e.scopes||Po,e.authority||this.config.auth.authority),popupWindowAttributes:e.popupWindowAttributes||{},popupWindowParent:e.popupWindowParent??window};return this.config.system.asyncPopups?(this.logger.verbose("asyncPopups set to true, acquiring token"),this.acquireTokenPopupAsync(e,r)):(this.logger.verbose("asyncPopup set to false, opening popup before acquiring token"),r.popup=this.openSizedPopup("about:blank",r),this.acquireTokenPopupAsync(e,r))}catch(t){return Promise.reject(t)}}logout(e){try{this.logger.verbose("logoutPopup called");const t=this.initializeLogoutRequest(e),r={popupName:this.generateLogoutPopupName(t),popupWindowAttributes:(e==null?void 0:e.popupWindowAttributes)||{},popupWindowParent:(e==null?void 0:e.popupWindowParent)??window},o=e&&e.authority,i=e&&e.mainWindowRedirectUri;return this.config.system.asyncPopups?(this.logger.verbose("asyncPopups set to true"),this.logoutPopupAsync(t,r,o,i)):(this.logger.verbose("asyncPopup set to false, opening popup"),r.popup=this.openSizedPopup("about:blank",r),this.logoutPopupAsync(t,r,o,i))}catch(t){return Promise.reject(t)}}async acquireTokenPopupAsync(e,t){var i;this.logger.verbose("acquireTokenPopupAsync called");const r=this.initializeServerTelemetryManager(He.acquireTokenPopup),o=await q(this.initializeAuthorizationRequest.bind(this),_.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,this.correlationId)(e,ee.Popup);rm(o.authority);try{const s=await q(this.initializeAuthorizationCodeRequest.bind(this),_.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,this.correlationId)(o),a=await q(this.createAuthCodeClient.bind(this),_.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:r,requestAuthority:o.authority,requestAzureCloudOptions:o.azureCloudOptions,requestExtraQueryParameters:o.extraQueryParameters,account:o.account}),c=En.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,e.authenticationScheme);let l;c&&(l=this.performanceClient.startMeasurement(_.FetchAccountIdWithNativeBroker,e.correlationId));const u=await a.getAuthCodeUrl({...o,nativeBroker:c}),d=new $l(a,this.browserStorage,s,this.logger,this.performanceClient),h=this.initiateAuthRequest(u,t);this.eventHandler.emitEvent(oe.POPUP_OPENED,ee.Popup,{popupWindow:h},null);const f=await this.monitorPopupForHash(h,t.popupWindowParent),C=$r(cm,_.DeserializeResponse,this.logger,this.performanceClient,this.correlationId)(f,this.config.auth.OIDCOptions.serverResponseType,this.logger);if(Tn.removeThrottle(this.browserStorage,this.config.auth.clientId,s),C.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),l&&l.end({success:!0,isNativeBroker:!0}),!this.nativeMessageHandler)throw Y(ki);const v=new lo(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,He.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,C.accountId,this.nativeStorage,o.correlationId),{userRequestState:E}=nn.parseRequestState(this.browserCrypto,o.state);return await v.acquireToken({...o,state:E,prompt:void 0})}return await d.handleCodeResponse(C,o)}catch(s){throw(i=t.popup)==null||i.close(),s instanceof Fe&&(s.setCorrelationId(this.correlationId),r.cacheFailedRequest(s)),s}}async logoutPopupAsync(e,t,r,o){var s,a,c,l;this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(oe.LOGOUT_START,ee.Popup,e);const i=this.initializeServerTelemetryManager(He.logoutPopup);try{await this.clearCacheOnLogout(e.account);const u=await q(this.createAuthCodeClient.bind(this),_.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:i,requestAuthority:r,account:e.account||void 0});try{u.authority.endSessionEndpoint}catch{if((s=e.account)!=null&&s.homeAccountId&&e.postLogoutRedirectUri&&u.authority.protocolMode===qn.OIDC){if(this.browserStorage.removeAccount((a=e.account)==null?void 0:a.homeAccountId,this.correlationId),this.eventHandler.emitEvent(oe.LOGOUT_SUCCESS,ee.Popup,e),o){const f={apiId:He.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},C=ve.getAbsoluteUrl(o,Bn());await this.navigationClient.navigateInternal(C,f)}(c=t.popup)==null||c.close();return}}const d=u.getLogoutUri(e);this.eventHandler.emitEvent(oe.LOGOUT_SUCCESS,ee.Popup,e);const h=this.openPopup(d,t);if(this.eventHandler.emitEvent(oe.POPUP_OPENED,ee.Popup,{popupWindow:h},null),await this.monitorPopupForHash(h,t.popupWindowParent).catch(()=>{}),o){const f={apiId:He.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},C=ve.getAbsoluteUrl(o,Bn());this.logger.verbose("Redirecting main window to url specified in the request"),this.logger.verbosePii(`Redirecting main window to: ${C}`),await this.navigationClient.navigateInternal(C,f)}else this.logger.verbose("No main window navigation requested")}catch(u){throw(l=t.popup)==null||l.close(),u instanceof Fe&&(u.setCorrelationId(this.correlationId),i.cacheFailedRequest(u)),this.browserStorage.setInteractionInProgress(!1),this.eventHandler.emitEvent(oe.LOGOUT_FAILURE,ee.Popup,null,u),this.eventHandler.emitEvent(oe.LOGOUT_END,ee.Popup),u}this.eventHandler.emitEvent(oe.LOGOUT_END,ee.Popup)}initiateAuthRequest(e,t){if(e)return this.logger.infoPii(`Navigate to: ${e}`),this.openPopup(e,t);throw this.logger.error("Navigate url is empty"),Y(ta)}monitorPopupForHash(e,t){return new Promise((r,o)=>{this.logger.verbose("PopupHandler.monitorPopupForHash - polling started");const i=setInterval(()=>{if(e.closed){this.logger.error("PopupHandler.monitorPopupForHash - window closed"),clearInterval(i),o(Y(Fr));return}let s="";try{s=e.location.href}catch{}if(!s||s==="about:blank")return;clearInterval(i);let a="";const c=this.config.auth.OIDCOptions.serverResponseType;e&&(c===Ri.QUERY?a=e.location.search:a=e.location.hash),this.logger.verbose("PopupHandler.monitorPopupForHash - popup window is on same origin as caller"),r(a)},this.config.system.pollIntervalMilliseconds)}).finally(()=>{this.cleanPopup(e,t)})}openPopup(e,t){try{let r;if(t.popup?(r=t.popup,this.logger.verbosePii(`Navigating popup window to: ${e}`),r.location.assign(e)):typeof t.popup>"u"&&(this.logger.verbosePii(`Opening popup window to: ${e}`),r=this.openSizedPopup(e,t)),!r)throw Y(Ip);return r.focus&&r.focus(),this.currentWindow=r,t.popupWindowParent.addEventListener("beforeunload",this.unloadWindow),r}catch(r){throw this.logger.error("error opening popup "+r.message),this.browserStorage.setInteractionInProgress(!1),Y(bp)}}openSizedPopup(e,{popupName:t,popupWindowAttributes:r,popupWindowParent:o}){var f,C,p,v;const i=o.screenLeft?o.screenLeft:o.screenX,s=o.screenTop?o.screenTop:o.screenY,a=o.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,c=o.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;let l=(f=r.popupSize)==null?void 0:f.width,u=(C=r.popupSize)==null?void 0:C.height,d=(p=r.popupPosition)==null?void 0:p.top,h=(v=r.popupPosition)==null?void 0:v.left;return(!l||l<0||l>a)&&(this.logger.verbose("Default popup window width used. Window width not configured or invalid."),l=Ft.POPUP_WIDTH),(!u||u<0||u>c)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),u=Ft.POPUP_HEIGHT),(!d||d<0||d>c)&&(this.logger.verbose("Default popup window top position used. Window top not configured or invalid."),d=Math.max(0,c/2-Ft.POPUP_HEIGHT/2+s)),(!h||h<0||h>a)&&(this.logger.verbose("Default popup window left position used. Window left not configured or invalid."),h=Math.max(0,a/2-Ft.POPUP_WIDTH/2+i)),o.open(e,t,`width=${l}, height=${u}, top=${d}, left=${h}, scrollbars=yes`)}unloadWindow(e){this.browserStorage.cleanRequestByInteractionType(ee.Popup),this.currentWindow&&this.currentWindow.close(),e.preventDefault()}cleanPopup(e,t){e.close(),t.removeEventListener("beforeunload",this.unloadWindow),this.browserStorage.setInteractionInProgress(!1)}generatePopupName(e,t){return`${Ft.POPUP_NAME_PREFIX}.${this.config.auth.clientId}.${e.join("-")}.${t}.${this.correlationId}`}generateLogoutPopupName(e){const t=e.account&&e.account.homeAccountId;return`${Ft.POPUP_NAME_PREFIX}.${this.config.auth.clientId}.${t}.${this.correlationId}`}}/*! @azure/msal-browser v3.30.0 2025-08-05 */class th{constructor(e,t,r,o,i){this.authModule=e,this.browserStorage=t,this.authCodeRequest=r,this.logger=o,this.performanceClient=i}async initiateAuthRequest(e,t){if(this.logger.verbose("RedirectHandler.initiateAuthRequest called"),e){t.redirectStartPage&&(this.logger.verbose("RedirectHandler.initiateAuthRequest: redirectStartPage set, caching start page"),this.browserStorage.setTemporaryCache(ke.ORIGIN_URI,t.redirectStartPage,!0)),this.browserStorage.setTemporaryCache(ke.CORRELATION_ID,this.authCodeRequest.correlationId,!0),this.browserStorage.cacheCodeRequest(this.authCodeRequest),this.logger.infoPii(`RedirectHandler.initiateAuthRequest: Navigate to: ${e}`);const r={apiId:He.acquireTokenRedirect,timeout:t.redirectTimeout,noHistory:!1};if(typeof t.onRedirectNavigate=="function")if(this.logger.verbose("RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback"),t.onRedirectNavigate(e)!==!1){this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating"),await t.navigationClient.navigateExternal(e,r);return}else{this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate returned false, stopping navigation");return}else{this.logger.verbose("RedirectHandler.initiateAuthRequest: Navigating window to navigate url"),await t.navigationClient.navigateExternal(e,r);return}}else throw this.logger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"),Y(ta)}async handleCodeResponse(e,t){this.logger.verbose("RedirectHandler.handleCodeResponse called"),this.browserStorage.setInteractionInProgress(!1);const r=this.browserStorage.generateStateKey(t),o=this.browserStorage.getTemporaryCache(r);if(!o)throw H(fs,"Cached State");let i;try{i=this.authModule.handleFragmentResponse(e,o)}catch(l){throw l instanceof fr&&l.subError===Fr?Y(Fr):l}const s=this.browserStorage.generateNonceKey(o),a=this.browserStorage.getTemporaryCache(s);if(this.authCodeRequest.code=i.code,i.cloud_instance_host_name&&await q(this.authModule.updateAuthority.bind(this.authModule),_.UpdateTokenEndpointAuthority,this.logger,this.performanceClient,this.authCodeRequest.correlationId)(i.cloud_instance_host_name,this.authCodeRequest.correlationId),i.nonce=a||void 0,i.state=o,i.client_info)this.authCodeRequest.clientInfo=i.client_info;else{const l=this.checkCcsCredentials();l&&(this.authCodeRequest.ccsCredential=l)}const c=await this.authModule.acquireToken(this.authCodeRequest,i);return this.browserStorage.cleanRequestByState(t),c}checkCcsCredentials(){const e=this.browserStorage.getTemporaryCache(ke.CCS_CREDENTIAL,!0);if(e)try{return JSON.parse(e)}catch{this.authModule.logger.error("Cache credential could not be parsed"),this.authModule.logger.errorPii(`Cache credential could not be parsed: ${e}`)}return null}}/*! @azure/msal-browser v3.30.0 2025-08-05 */function PI(){if(typeof window>"u"||typeof window.performance>"u"||typeof window.performance.getEntriesByType!="function")return;const n=window.performance.getEntriesByType("navigation"),e=n.length?n[0]:void 0;return e==null?void 0:e.type}class NI extends No{constructor(e,t,r,o,i,s,a,c,l,u){super(e,t,r,o,i,s,a,l,u),this.nativeStorage=c}async acquireToken(e){const t=await q(this.initializeAuthorizationRequest.bind(this),_.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,this.correlationId)(e,ee.Redirect);this.browserStorage.updateCacheEntries(t.state,t.nonce,t.authority,t.loginHint||"",t.account||null);const r=this.initializeServerTelemetryManager(He.acquireTokenRedirect),o=i=>{i.persisted&&(this.logger.verbose("Page was restored from back/forward cache. Clearing temporary cache."),this.browserStorage.cleanRequestByState(t.state),this.eventHandler.emitEvent(oe.RESTORE_FROM_BFCACHE,ee.Redirect))};try{const i=await q(this.initializeAuthorizationCodeRequest.bind(this),_.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,this.correlationId)(t),s=await q(this.createAuthCodeClient.bind(this),_.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:r,requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account}),a=new th(s,this.browserStorage,i,this.logger,this.performanceClient),c=await s.getAuthCodeUrl({...t,nativeBroker:En.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,e.authenticationScheme)}),l=this.getRedirectStartPage(e.redirectStartPage);return this.logger.verbosePii(`Redirect start page: ${l}`),window.addEventListener("pageshow",o),await a.initiateAuthRequest(c,{navigationClient:this.navigationClient,redirectTimeout:this.config.system.redirectNavigationTimeout,redirectStartPage:l,onRedirectNavigate:e.onRedirectNavigate||this.config.auth.onRedirectNavigate})}catch(i){throw i instanceof Fe&&(i.setCorrelationId(this.correlationId),r.cacheFailedRequest(i)),window.removeEventListener("pageshow",o),this.browserStorage.cleanRequestByState(t.state),i}}async handleRedirectPromise(e="",t){const r=this.initializeServerTelemetryManager(He.handleRedirectPromise);try{if(!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),null;const[o,i]=this.getRedirectResponse(e||"");if(!o)return this.logger.info("handleRedirectPromise did not detect a response as a result of a redirect. Cleaning temporary cache."),this.browserStorage.cleanRequestByInteractionType(ee.Redirect),PI()!=="back_forward"?t.event.errorCode="no_server_response":this.logger.verbose("Back navigation event detected. Muting no_server_response error"),null;const s=this.browserStorage.getTemporaryCache(ke.ORIGIN_URI,!0)||R.EMPTY_STRING,a=ve.removeHashFromUrl(s),c=ve.removeHashFromUrl(window.location.href);if(a===c&&this.config.auth.navigateToLoginRequestUrl)return this.logger.verbose("Current page is loginRequestUrl, handling response"),s.indexOf("#")>-1&&Fb(s),await this.handleResponse(o,r);if(this.config.auth.navigateToLoginRequestUrl){if(!Fl()||this.config.system.allowRedirectInIframe){this.browserStorage.setTemporaryCache(ke.URL_HASH,i,!0);const l={apiId:He.handleRedirectPromise,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0};let u=!0;if(!s||s==="null"){const d=Kb();this.browserStorage.setTemporaryCache(ke.ORIGIN_URI,d,!0),this.logger.warning("Unable to get valid login request url from cache, redirecting to home page"),u=await this.navigationClient.navigateInternal(d,l)}else this.logger.verbose(`Navigating to loginRequestUrl: ${s}`),u=await this.navigationClient.navigateInternal(s,l);if(!u)return await this.handleResponse(o,r)}}else return this.logger.verbose("NavigateToLoginRequestUrl set to false, handling response"),await this.handleResponse(o,r);return null}catch(o){throw o instanceof Fe&&(o.setCorrelationId(this.correlationId),r.cacheFailedRequest(o)),this.browserStorage.cleanRequestByInteractionType(ee.Redirect),o}}getRedirectResponse(e){this.logger.verbose("getRedirectResponseHash called");let t=e;t||(this.config.auth.OIDCOptions.serverResponseType===Ri.QUERY?t=window.location.search:t=window.location.hash);let r=ys(t);if(r){try{kI(r,this.browserCrypto,ee.Redirect)}catch(i){return i instanceof Fe&&this.logger.error(`Interaction type validation failed due to ${i.errorCode}: ${i.errorMessage}`),[null,""]}return Hb(window),this.logger.verbose("Hash contains known properties, returning response hash"),[r,t]}const o=this.browserStorage.getTemporaryCache(ke.URL_HASH,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(ke.URL_HASH)),o&&(r=ys(o),r)?(this.logger.verbose("Hash does not contain known properties, returning cached hash"),[r,o]):[null,""]}async handleResponse(e,t){const r=e.state;if(!r)throw Y(Ol);const o=this.browserStorage.getCachedRequest(r);if(this.logger.verbose("handleResponse called, retrieved cached request"),e.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw Y(ki);const c=new lo(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,He.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,e.accountId,this.nativeStorage,o.correlationId),{userRequestState:l}=nn.parseRequestState(this.browserCrypto,r);return c.acquireToken({...o,state:l,prompt:void 0}).finally(()=>{this.browserStorage.cleanRequestByState(r)})}const i=this.browserStorage.getCachedAuthority(r);if(!i)throw Y(Pl);const s=await q(this.createAuthCodeClient.bind(this),_.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:t,requestAuthority:i});return Tn.removeThrottle(this.browserStorage,this.config.auth.clientId,o),new th(s,this.browserStorage,o,this.logger,this.performanceClient).handleCodeResponse(e,r)}async logout(e){var o,i;this.logger.verbose("logoutRedirect called");const t=this.initializeLogoutRequest(e),r=this.initializeServerTelemetryManager(He.logout);try{this.eventHandler.emitEvent(oe.LOGOUT_START,ee.Redirect,e),await this.clearCacheOnLogout(t.account);const s={apiId:He.logout,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},a=await q(this.createAuthCodeClient.bind(this),_.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:r,requestAuthority:e&&e.authority,requestExtraQueryParameters:e==null?void 0:e.extraQueryParameters,account:e&&e.account||void 0});if(a.authority.protocolMode===qn.OIDC)try{a.authority.endSessionEndpoint}catch{if((o=t.account)!=null&&o.homeAccountId){this.browserStorage.removeAccount((i=t.account)==null?void 0:i.homeAccountId,this.correlationId),this.eventHandler.emitEvent(oe.LOGOUT_SUCCESS,ee.Redirect,t);return}}const c=a.getLogoutUri(t);if(this.eventHandler.emitEvent(oe.LOGOUT_SUCCESS,ee.Redirect,t),e&&typeof e.onRedirectNavigate=="function")if(e.onRedirectNavigate(c)!==!1){this.logger.verbose("Logout onRedirectNavigate did not return false, navigating"),this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),await this.navigationClient.navigateExternal(c,s);return}else this.browserStorage.setInteractionInProgress(!1),this.logger.verbose("Logout onRedirectNavigate returned false, stopping navigation");else{this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),await this.navigationClient.navigateExternal(c,s);return}}catch(s){throw s instanceof Fe&&(s.setCorrelationId(this.correlationId),r.cacheFailedRequest(s)),this.eventHandler.emitEvent(oe.LOGOUT_FAILURE,ee.Redirect,null,s),this.eventHandler.emitEvent(oe.LOGOUT_END,ee.Redirect),s}this.eventHandler.emitEvent(oe.LOGOUT_END,ee.Redirect)}getRedirectStartPage(e){const t=e||window.location.href;return ve.getAbsoluteUrl(t,Bn())}}/*! @azure/msal-browser v3.30.0 2025-08-05 */async function MI(n,e,t,r,o){if(e.addQueueMeasurement(_.SilentHandlerInitiateAuthRequest,r),!n)throw t.info("Navigate url is empty"),Y(ta);return o?q(DI,_.SilentHandlerLoadFrame,t,e,r)(n,o,e,r):$r(LI,_.SilentHandlerLoadFrameSync,t,e,r)(n)}async function xI(n,e,t,r,o,i,s){return r.addQueueMeasurement(_.SilentHandlerMonitorIframeForHash,i),new Promise((a,c)=>{e{window.clearInterval(u),c(Y(Sp))},e),u=window.setInterval(()=>{let d="";const h=n.contentWindow;try{d=h?h.location.href:""}catch{}if(!d||d==="about:blank")return;let f="";h&&(s===Ri.QUERY?f=h.location.search:f=h.location.hash),window.clearTimeout(l),window.clearInterval(u),a(f)},t)}).finally(()=>{$r(UI,_.RemoveHiddenIframe,o,r,i)(n)})}function DI(n,e,t,r){return t.addQueueMeasurement(_.SilentHandlerLoadFrame,r),new Promise((o,i)=>{const s=lm();window.setTimeout(()=>{if(!s){i("Unable to load iframe");return}s.src=n,o(s)},e)})}function LI(n){const e=lm();return e.src=n,e}function lm(){const n=document.createElement("iframe");return n.className="msalSilentIframe",n.style.visibility="hidden",n.style.position="absolute",n.style.width=n.style.height="0",n.style.border="0",n.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms"),document.body.appendChild(n),n}function UI(n){document.body===n.parentNode&&document.body.removeChild(n)}/*! @azure/msal-browser v3.30.0 2025-08-05 */class HI extends No{constructor(e,t,r,o,i,s,a,c,l,u,d){super(e,t,r,o,i,s,c,u,d),this.apiId=a,this.nativeStorage=l}async acquireToken(e){this.performanceClient.addQueueMeasurement(_.SilentIframeClientAcquireToken,e.correlationId),!e.loginHint&&!e.sid&&(!e.account||!e.account.username)&&this.logger.warning("No user hint provided. The authorization server may need more information to complete this request.");const t={...e};t.prompt?t.prompt!==at.NONE&&t.prompt!==at.NO_SESSION&&(this.logger.warning(`SilentIframeClient. Replacing invalid prompt ${t.prompt} with ${at.NONE}`),t.prompt=at.NONE):t.prompt=at.NONE;const r=await q(this.initializeAuthorizationRequest.bind(this),_.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,e.correlationId)(t,ee.Silent);rm(r.authority);const o=this.initializeServerTelemetryManager(this.apiId);let i;try{return i=await q(this.createAuthCodeClient.bind(this),_.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:o,requestAuthority:r.authority,requestAzureCloudOptions:r.azureCloudOptions,requestExtraQueryParameters:r.extraQueryParameters,account:r.account}),await q(this.silentTokenHelper.bind(this),_.SilentIframeClientTokenHelper,this.logger,this.performanceClient,e.correlationId)(i,r)}catch(s){if(s instanceof Fe&&(s.setCorrelationId(this.correlationId),o.cacheFailedRequest(s)),!i||!(s instanceof Fe)||s.errorCode!==Ft.INVALID_GRANT_ERROR)throw s;this.performanceClient.addFields({retryError:s.errorCode},this.correlationId);const a=await q(this.initializeAuthorizationRequest.bind(this),_.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,e.correlationId)(t,ee.Silent);return await q(this.silentTokenHelper.bind(this),_.SilentIframeClientTokenHelper,this.logger,this.performanceClient,this.correlationId)(i,a)}}logout(){return Promise.reject(Y(na))}async silentTokenHelper(e,t){const r=t.correlationId;this.performanceClient.addQueueMeasurement(_.SilentIframeClientTokenHelper,r);const o=await q(this.initializeAuthorizationCodeRequest.bind(this),_.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,r)(t),i=await q(e.getAuthCodeUrl.bind(e),_.GetAuthCodeUrl,this.logger,this.performanceClient,r)({...t,nativeBroker:En.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,t.authenticationScheme)}),s=new $l(e,this.browserStorage,o,this.logger,this.performanceClient),a=await q(MI,_.SilentHandlerInitiateAuthRequest,this.logger,this.performanceClient,r)(i,this.performanceClient,this.logger,r,this.config.system.navigateFrameWait),c=this.config.auth.OIDCOptions.serverResponseType,l=await q(xI,_.SilentHandlerMonitorIframeForHash,this.logger,this.performanceClient,r)(a,this.config.system.iframeHashTimeout,this.config.system.pollIntervalMilliseconds,this.performanceClient,this.logger,r,c),u=$r(cm,_.DeserializeResponse,this.logger,this.performanceClient,this.correlationId)(l,c,this.logger);if(u.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw Y(ki);const d=new lo(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.apiId,this.performanceClient,this.nativeMessageHandler,u.accountId,this.browserStorage,r),{userRequestState:h}=nn.parseRequestState(this.browserCrypto,t.state);return q(d.acquireToken.bind(d),_.NativeInteractionClientAcquireToken,this.logger,this.performanceClient,r)({...t,state:h,prompt:t.prompt||at.NONE})}return q(s.handleCodeResponse.bind(s),_.HandleCodeResponse,this.logger,this.performanceClient,r)(u,t)}}/*! @azure/msal-browser v3.30.0 2025-08-05 */class FI extends No{async acquireToken(e){this.performanceClient.addQueueMeasurement(_.SilentRefreshClientAcquireToken,e.correlationId);const t=await q(ql,_.InitializeBaseRequest,this.logger,this.performanceClient,e.correlationId)(e,this.config,this.performanceClient,this.logger),r={...e,...t};e.redirectUri&&(r.redirectUri=this.getRedirectUri(e.redirectUri));const o=this.initializeServerTelemetryManager(He.acquireTokenSilent_silentFlow),i=await this.createRefreshTokenClient({serverTelemetryManager:o,authorityUrl:r.authority,azureCloudOptions:r.azureCloudOptions,account:r.account});return q(i.acquireTokenByRefreshToken.bind(i),_.RefreshTokenClientAcquireTokenByRefreshToken,this.logger,this.performanceClient,e.correlationId)(r).catch(s=>{throw s.setCorrelationId(this.correlationId),o.cacheFailedRequest(s),s})}logout(){return Promise.reject(Y(na))}async createRefreshTokenClient(e){const t=await q(this.getClientConfiguration.bind(this),_.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:e.serverTelemetryManager,requestAuthority:e.authorityUrl,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account});return new vc(t,this.performanceClient)}}/*! @azure/msal-browser v3.30.0 2025-08-05 */class BI{constructor(e,t,r,o){this.isBrowserEnvironment=typeof window<"u",this.config=e,this.storage=t,this.logger=r,this.cryptoObj=o}loadExternalTokens(e,t,r){if(!this.isBrowserEnvironment)throw Y(ra);const o=e.correlationId||In(),i=t.id_token?qr(t.id_token,_n):void 0,s={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},a=e.authority?new pt(pt.generateAuthority(e.authority,e.azureCloudOptions),this.config.system.networkClient,this.storage,s,this.logger,e.correlationId||In()):void 0,c=this.loadAccount(e,r.clientInfo||t.client_info||"",o,i,a),l=this.loadIdToken(t,c.homeAccountId,c.environment,c.realm,o),u=this.loadAccessToken(e,t,c.homeAccountId,c.environment,c.realm,r,o),d=this.loadRefreshToken(t,c.homeAccountId,c.environment,o);return this.generateAuthenticationResult(e,{account:c,idToken:l,accessToken:u,refreshToken:d},i,a)}loadAccount(e,t,r,o,i){if(this.logger.verbose("TokenCache - loading account"),e.account){const l=rt.createFromAccountInfo(e.account);return this.storage.setAccount(l,r),l}else if(!i||!t&&!o)throw this.logger.error("TokenCache - if an account is not provided on the request, authority and either clientInfo or idToken must be provided instead."),Y(Lp);const s=rt.generateHomeAccountId(t,i.authorityType,this.logger,this.cryptoObj,o),a=o==null?void 0:o.tid,c=Il(this.storage,i,s,_n,r,o,t,i.hostnameAndPort,a,void 0,void 0,this.logger);return this.storage.setAccount(c,r),c}loadIdToken(e,t,r,o,i){if(!e.id_token)return this.logger.verbose("TokenCache - no id token found in response"),null;this.logger.verbose("TokenCache - loading id token");const s=Ws(t,r,e.id_token,this.config.auth.clientId,o);return this.storage.setIdTokenCredential(s,i),s}loadAccessToken(e,t,r,o,i,s,a){if(t.access_token)if(t.expires_in){if(!t.scope&&(!e.scopes||!e.scopes.length))return this.logger.error("TokenCache - scopes not specified in the request or response. Cannot add token to the cache."),null}else return this.logger.error("TokenCache - no expiration set on the access token. Cannot add it to the cache."),null;else return this.logger.verbose("TokenCache - no access token found in response"),null;this.logger.verbose("TokenCache - loading access token");const c=t.scope?Ye.fromString(t.scope):new Ye(e.scopes),l=s.expiresOn||t.expires_in+new Date().getTime()/1e3,u=s.extendedExpiresOn||(t.ext_expires_in||t.expires_in)+new Date().getTime()/1e3,d=Ys(r,o,t.access_token,this.config.auth.clientId,i,c.printScopes(),l,u,_n);return this.storage.setAccessTokenCredential(d,a),d}loadRefreshToken(e,t,r,o){if(!e.refresh_token)return this.logger.verbose("TokenCache - no refresh token found in response"),null;this.logger.verbose("TokenCache - loading refresh token");const i=jg(t,r,e.refresh_token,this.config.auth.clientId,e.foci,void 0,e.refresh_token_expires_in);return this.storage.setRefreshTokenCredential(i,o),i}generateAuthenticationResult(e,t,r,o){var u,d,h;let i="",s=[],a=null,c;t!=null&&t.accessToken&&(i=t.accessToken.secret,s=Ye.fromString(t.accessToken.target).asArray(),a=new Date(Number(t.accessToken.expiresOn)*1e3),c=new Date(Number(t.accessToken.extendedExpiresOn)*1e3));const l=t.account;return{authority:o?o.canonicalAuthority:"",uniqueId:t.account.localAccountId,tenantId:t.account.realm,scopes:s,account:l.getAccountInfo(),idToken:((u=t.idToken)==null?void 0:u.secret)||"",idTokenClaims:r||{},accessToken:i,fromCache:!0,expiresOn:a,correlationId:e.correlationId||"",requestId:"",extExpiresOn:c,familyId:((d=t.refreshToken)==null?void 0:d.familyId)||"",tokenType:((h=t==null?void 0:t.accessToken)==null?void 0:h.tokenType)||"",state:e.state||"",cloudGraphHostName:l.cloudGraphHostName||"",msGraphHost:l.msGraphHost||"",fromNativeBroker:!1}}}/*! @azure/msal-browser v3.30.0 2025-08-05 */class KI extends mp{constructor(e){super(e),this.includeRedirectUri=!1}}/*! @azure/msal-browser v3.30.0 2025-08-05 */class qI extends No{constructor(e,t,r,o,i,s,a,c,l,u){super(e,t,r,o,i,s,c,l,u),this.apiId=a}async acquireToken(e){if(!e.code)throw Y(Up);const t=await q(this.initializeAuthorizationRequest.bind(this),_.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,e.correlationId)(e,ee.Silent),r=this.initializeServerTelemetryManager(this.apiId);try{const o={...t,code:e.code},i=await q(this.getClientConfiguration.bind(this),_.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:r,requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account}),s=new KI(i);this.logger.verbose("Auth code client created");const a=new $l(s,this.browserStorage,o,this.logger,this.performanceClient);return await q(a.handleCodeResponseFromServer.bind(a),_.HandleCodeResponseFromServer,this.logger,this.performanceClient,e.correlationId)({code:e.code,msgraph_host:e.msGraphHost,cloud_graph_host_name:e.cloudGraphHostName,cloud_instance_host_name:e.cloudInstanceHostName},t,!1)}catch(o){throw o instanceof Fe&&(o.setCorrelationId(this.correlationId),r.cacheFailedRequest(o)),o}}logout(){return Promise.reject(Y(na))}}/*! @azure/msal-browser v3.30.0 2025-08-05 */function dn(n){const e=n==null?void 0:n.idTokenClaims;if(e!=null&&e.tfp||e!=null&&e.acr)return"B2C";if(e!=null&&e.tid){if((e==null?void 0:e.tid)==="9188040d-6c67-4c5b-b112-36a304b66dad")return"MSA"}else return;return"AAD"}function Vi(n,e){try{Bl(n)}catch(t){throw e.end({success:!1},t),t}}class ia{constructor(e){this.operatingContext=e,this.isBrowserEnvironment=this.operatingContext.isBrowserEnvironment(),this.config=e.getConfig(),this.initialized=!1,this.logger=this.operatingContext.getLogger(),this.networkClient=this.config.system.networkClient,this.navigationClient=this.config.system.navigationClient,this.redirectResponse=new Map,this.hybridAuthCodeResponses=new Map,this.performanceClient=this.config.telemetry.client,this.browserCrypto=this.isBrowserEnvironment?new Ro(this.logger,this.performanceClient):gs,this.eventHandler=new gI(this.logger),this.browserStorage=this.isBrowserEnvironment?new bc(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger,eb(this.config.auth),this.performanceClient):sI(this.config.auth.clientId,this.logger);const t={cacheLocation:Ot.MemoryStorage,temporaryCacheLocation:Ot.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};this.nativeInternalStorage=new bc(this.config.auth.clientId,t,this.browserCrypto,this.logger,void 0,this.performanceClient),this.tokenCache=new BI(this.config,this.browserStorage,this.logger,this.browserCrypto),this.activeSilentTokenRequests=new Map,this.trackPageVisibility=this.trackPageVisibility.bind(this),this.trackPageVisibilityWithMeasurement=this.trackPageVisibilityWithMeasurement.bind(this),this.listeningToStorageEvents=!1,this.handleAccountCacheChange=this.handleAccountCacheChange.bind(this)}static async createController(e,t){const r=new ia(e);return await r.initialize(t),r}trackPageVisibility(e){e&&(this.logger.info("Perf: Visibility change detected"),this.performanceClient.incrementFields({visibilityChangeCount:1},e))}async initialize(e){if(this.logger.trace("initialize called"),this.initialized){this.logger.info("initialize has already been called, exiting early.");return}if(!this.isBrowserEnvironment){this.logger.info("in non-browser environment, exiting early."),this.initialized=!0,this.eventHandler.emitEvent(oe.INITIALIZE_END);return}const t=(e==null?void 0:e.correlationId)||this.getRequestCorrelationId(),r=this.config.system.allowNativeBroker,o=this.performanceClient.startMeasurement(_.InitializeClientApplication,t);if(this.eventHandler.emitEvent(oe.INITIALIZE_START),r)try{this.nativeExtensionProvider=await En.createProvider(this.logger,this.config.system.nativeBrokerHandshakeTimeout,this.performanceClient)}catch(i){this.logger.verbose(i)}this.config.cache.claimsBasedCachingEnabled||(this.logger.verbose("Claims-based caching is disabled. Clearing the previous cache with claims"),await q(this.browserStorage.clearTokensAndKeysWithClaims.bind(this.browserStorage),_.ClearTokensAndKeysWithClaims,this.logger,this.performanceClient,t)(this.performanceClient,t)),this.initialized=!0,this.eventHandler.emitEvent(oe.INITIALIZE_END),o.end({allowNativeBroker:r,success:!0})}async handleRedirectPromise(e){if(this.logger.verbose("handleRedirectPromise called"),nm(this.initialized),this.isBrowserEnvironment){const t=e||"";let r=this.redirectResponse.get(t);return typeof r>"u"?(r=this.handleRedirectPromiseInternal(e),this.redirectResponse.set(t,r),this.logger.verbose("handleRedirectPromise has been called for the first time, storing the promise")):this.logger.verbose("handleRedirectPromise has been called previously, returning the result from the first call"),r}return this.logger.verbose("handleRedirectPromise returns null, not browser environment"),null}async handleRedirectPromiseInternal(e){const t=this.getAllAccounts(),r=this.browserStorage.getCachedNativeRequest(),o=r&&En.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider)&&this.nativeExtensionProvider&&!e,i=o?r==null?void 0:r.correlationId:this.browserStorage.getTemporaryCache(ke.CORRELATION_ID,!0)||"",s=this.performanceClient.startMeasurement(_.AcquireTokenRedirect,i);this.eventHandler.emitEvent(oe.HANDLE_REDIRECT_START,ee.Redirect);let a;if(o&&this.nativeExtensionProvider){this.logger.trace("handleRedirectPromise - acquiring token from native platform");const c=new lo(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,He.handleRedirectPromise,this.performanceClient,this.nativeExtensionProvider,r.accountId,this.nativeInternalStorage,r.correlationId);a=q(c.handleRedirectPromise.bind(c),_.HandleNativeRedirectPromiseMeasurement,this.logger,this.performanceClient,s.event.correlationId)(this.performanceClient,s.event.correlationId)}else{this.logger.trace("handleRedirectPromise - acquiring token from web flow");const c=this.createRedirectClient(i);a=q(c.handleRedirectPromise.bind(c),_.HandleRedirectPromiseMeasurement,this.logger,this.performanceClient,s.event.correlationId)(e,s)}return a.then(c=>(c?(t.length{const l=c;throw t.length>0?this.eventHandler.emitEvent(oe.ACQUIRE_TOKEN_FAILURE,ee.Redirect,null,l):this.eventHandler.emitEvent(oe.LOGIN_FAILURE,ee.Redirect,null,l),this.eventHandler.emitEvent(oe.HANDLE_REDIRECT_END,ee.Redirect),s.end({success:!1},l),c})}async acquireTokenRedirect(e){const t=this.getRequestCorrelationId(e);this.logger.verbose("acquireTokenRedirect called",t);const r=this.performanceClient.startMeasurement(_.AcquireTokenPreRedirect,t);r.add({accountType:dn(e.account),scenarioId:e.scenarioId});const o=e.onRedirectNavigate;if(o)e.onRedirectNavigate=s=>{const a=typeof o=="function"?o(s):void 0;return a!==!1?r.end({success:!0}):r.discard(),a};else{const s=this.config.auth.onRedirectNavigate;this.config.auth.onRedirectNavigate=a=>{const c=typeof s=="function"?s(a):void 0;return c!==!1?r.end({success:!0}):r.discard(),c}}const i=this.getAllAccounts().length>0;try{Jd(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0),i?this.eventHandler.emitEvent(oe.ACQUIRE_TOKEN_START,ee.Redirect,e):this.eventHandler.emitEvent(oe.LOGIN_START,ee.Redirect,e);let s;return this.nativeExtensionProvider&&this.canUseNative(e)?s=new lo(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,He.acquireTokenRedirect,this.performanceClient,this.nativeExtensionProvider,this.getNativeAccountId(e),this.nativeInternalStorage,t).acquireTokenRedirect(e,r).catch(c=>{if(c instanceof An&&Zr(c))return this.nativeExtensionProvider=void 0,this.createRedirectClient(t).acquireToken(e);if(c instanceof cn)return this.logger.verbose("acquireTokenRedirect - Resolving interaction required error thrown by native broker by falling back to web flow"),this.createRedirectClient(t).acquireToken(e);throw this.browserStorage.setInteractionInProgress(!1),c}):s=this.createRedirectClient(t).acquireToken(e),await s}catch(s){throw r.end({success:!1},s),i?this.eventHandler.emitEvent(oe.ACQUIRE_TOKEN_FAILURE,ee.Redirect,null,s):this.eventHandler.emitEvent(oe.LOGIN_FAILURE,ee.Redirect,null,s),s}}acquireTokenPopup(e){const t=this.getRequestCorrelationId(e),r=this.performanceClient.startMeasurement(_.AcquireTokenPopup,t);r.add({scenarioId:e.scenarioId,accountType:dn(e.account)});try{this.logger.verbose("acquireTokenPopup called",t),Vi(this.initialized,r),this.browserStorage.setInteractionInProgress(!0)}catch(s){return Promise.reject(s)}const o=this.getAllAccounts();o.length>0?this.eventHandler.emitEvent(oe.ACQUIRE_TOKEN_START,ee.Popup,e):this.eventHandler.emitEvent(oe.LOGIN_START,ee.Popup,e);let i;return this.canUseNative(e)?i=this.acquireTokenNative({...e,correlationId:t},He.acquireTokenPopup).then(s=>(this.browserStorage.setInteractionInProgress(!1),r.end({success:!0,isNativeBroker:!0,accountType:dn(s.account)}),s)).catch(s=>{if(s instanceof An&&Zr(s))return this.nativeExtensionProvider=void 0,this.createPopupClient(t).acquireToken(e);if(s instanceof cn)return this.logger.verbose("acquireTokenPopup - Resolving interaction required error thrown by native broker by falling back to web flow"),this.createPopupClient(t).acquireToken(e);throw this.browserStorage.setInteractionInProgress(!1),s}):i=this.createPopupClient(t).acquireToken(e),i.then(s=>(o.length(o.length>0?this.eventHandler.emitEvent(oe.ACQUIRE_TOKEN_FAILURE,ee.Popup,null,s):this.eventHandler.emitEvent(oe.LOGIN_FAILURE,ee.Popup,null,s),r.end({success:!1},s),Promise.reject(s)))}trackPageVisibilityWithMeasurement(){const e=this.ssoSilentMeasurement||this.acquireTokenByCodeAsyncMeasurement;e&&(this.logger.info("Perf: Visibility change detected in ",e.event.name),e.increment({visibilityChangeCount:1}))}async ssoSilent(e){var i,s;const t=this.getRequestCorrelationId(e),r={...e,prompt:e.prompt,correlationId:t};this.ssoSilentMeasurement=this.performanceClient.startMeasurement(_.SsoSilent,t),(i=this.ssoSilentMeasurement)==null||i.add({scenarioId:e.scenarioId,accountType:dn(e.account)}),Vi(this.initialized,this.ssoSilentMeasurement),(s=this.ssoSilentMeasurement)==null||s.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),this.logger.verbose("ssoSilent called",t),this.eventHandler.emitEvent(oe.SSO_SILENT_START,ee.Silent,r);let o;return this.canUseNative(r)?o=this.acquireTokenNative(r,He.ssoSilent).catch(a=>{if(a instanceof An&&Zr(a))return this.nativeExtensionProvider=void 0,this.createSilentIframeClient(r.correlationId).acquireToken(r);throw a}):o=this.createSilentIframeClient(r.correlationId).acquireToken(r),o.then(a=>{var c;return this.eventHandler.emitEvent(oe.SSO_SILENT_SUCCESS,ee.Silent,a),(c=this.ssoSilentMeasurement)==null||c.end({success:!0,isNativeBroker:a.fromNativeBroker,accessTokenSize:a.accessToken.length,idTokenSize:a.idToken.length,accountType:dn(a.account)}),a}).catch(a=>{var c;throw this.eventHandler.emitEvent(oe.SSO_SILENT_FAILURE,ee.Silent,null,a),(c=this.ssoSilentMeasurement)==null||c.end({success:!1},a),a}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})}async acquireTokenByCode(e){const t=this.getRequestCorrelationId(e);this.logger.trace("acquireTokenByCode called",t);const r=this.performanceClient.startMeasurement(_.AcquireTokenByCode,t);Vi(this.initialized,r),this.eventHandler.emitEvent(oe.ACQUIRE_TOKEN_BY_CODE_START,ee.Silent,e),r.add({scenarioId:e.scenarioId});try{if(e.code&&e.nativeAccountId)throw Y(Fp);if(e.code){const o=e.code;let i=this.hybridAuthCodeResponses.get(o);return i?(this.logger.verbose("Existing acquireTokenByCode request found",t),r.discard()):(this.logger.verbose("Initiating new acquireTokenByCode request",t),i=this.acquireTokenByCodeAsync({...e,correlationId:t}).then(s=>(this.eventHandler.emitEvent(oe.ACQUIRE_TOKEN_BY_CODE_SUCCESS,ee.Silent,s),this.hybridAuthCodeResponses.delete(o),r.end({success:!0,isNativeBroker:s.fromNativeBroker,accessTokenSize:s.accessToken.length,idTokenSize:s.idToken.length,accountType:dn(s.account)}),s)).catch(s=>{throw this.hybridAuthCodeResponses.delete(o),this.eventHandler.emitEvent(oe.ACQUIRE_TOKEN_BY_CODE_FAILURE,ee.Silent,null,s),r.end({success:!1},s),s}),this.hybridAuthCodeResponses.set(o,i)),await i}else if(e.nativeAccountId)if(this.canUseNative(e,e.nativeAccountId)){const o=await this.acquireTokenNative({...e,correlationId:t},He.acquireTokenByCode,e.nativeAccountId).catch(i=>{throw i instanceof An&&Zr(i)&&(this.nativeExtensionProvider=void 0),i});return r.end({accountType:dn(o.account),success:!0}),o}else throw Y(Bp);else throw Y(Hp)}catch(o){throw this.eventHandler.emitEvent(oe.ACQUIRE_TOKEN_BY_CODE_FAILURE,ee.Silent,null,o),r.end({success:!1},o),o}}async acquireTokenByCodeAsync(e){var o;return this.logger.trace("acquireTokenByCodeAsync called",e.correlationId),this.acquireTokenByCodeAsyncMeasurement=this.performanceClient.startMeasurement(_.AcquireTokenByCodeAsync,e.correlationId),(o=this.acquireTokenByCodeAsyncMeasurement)==null||o.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),await this.createSilentAuthCodeClient(e.correlationId).acquireToken(e).then(i=>{var s;return(s=this.acquireTokenByCodeAsyncMeasurement)==null||s.end({success:!0,fromCache:i.fromCache,isNativeBroker:i.fromNativeBroker}),i}).catch(i=>{var s;throw(s=this.acquireTokenByCodeAsyncMeasurement)==null||s.end({success:!1},i),i}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})}async acquireTokenFromCache(e,t){switch(this.performanceClient.addQueueMeasurement(_.AcquireTokenFromCache,e.correlationId),t){case Dt.Default:case Dt.AccessToken:case Dt.AccessTokenAndRefreshToken:const r=this.createSilentCacheClient(e.correlationId);return q(r.acquireToken.bind(r),_.SilentCacheClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(e);default:throw H(Fn)}}async acquireTokenByRefreshToken(e,t){switch(this.performanceClient.addQueueMeasurement(_.AcquireTokenByRefreshToken,e.correlationId),t){case Dt.Default:case Dt.AccessTokenAndRefreshToken:case Dt.RefreshToken:case Dt.RefreshTokenAndNetwork:const r=this.createSilentRefreshClient(e.correlationId);return q(r.acquireToken.bind(r),_.SilentRefreshClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(e);default:throw H(Fn)}}async acquireTokenBySilentIframe(e){this.performanceClient.addQueueMeasurement(_.AcquireTokenBySilentIframe,e.correlationId);const t=this.createSilentIframeClient(e.correlationId);return q(t.acquireToken.bind(t),_.SilentIframeClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(e)}async logout(e){const t=this.getRequestCorrelationId(e);return this.logger.warning("logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.",t),this.logoutRedirect({correlationId:t,...e})}async logoutRedirect(e){const t=this.getRequestCorrelationId(e);return Jd(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0),this.createRedirectClient(t).logout(e)}logoutPopup(e){try{const t=this.getRequestCorrelationId(e);return Bl(this.initialized),this.browserStorage.setInteractionInProgress(!0),this.createPopupClient(t).logout(e)}catch(t){return Promise.reject(t)}}async clearCache(e){if(!this.isBrowserEnvironment){this.logger.info("in non-browser environment, returning early.");return}const t=this.getRequestCorrelationId(e);return this.createSilentCacheClient(t).logout(e)}getAllAccounts(e){const t=this.getRequestCorrelationId();return aI(this.logger,this.browserStorage,this.isBrowserEnvironment,t,e)}getAccount(e){const t=this.getRequestCorrelationId();return cI(e,this.logger,this.browserStorage,t)}getAccountByUsername(e){const t=this.getRequestCorrelationId();return lI(e,this.logger,this.browserStorage,t)}getAccountByHomeId(e){const t=this.getRequestCorrelationId();return uI(e,this.logger,this.browserStorage,t)}getAccountByLocalId(e){const t=this.getRequestCorrelationId();return dI(e,this.logger,this.browserStorage,t)}setActiveAccount(e){const t=this.getRequestCorrelationId();hI(e,this.browserStorage,t)}getActiveAccount(){const e=this.getRequestCorrelationId();return fI(this.browserStorage,e)}async hydrateCache(e,t){this.logger.verbose("hydrateCache called");const r=rt.createFromAccountInfo(e.account,e.cloudGraphHostName,e.msGraphHost);return this.browserStorage.setAccount(r,e.correlationId),e.fromNativeBroker?(this.logger.verbose("Response was from native broker, storing in-memory"),this.nativeInternalStorage.hydrateCache(e,t)):this.browserStorage.hydrateCache(e,t)}async acquireTokenNative(e,t,r){if(this.logger.trace("acquireTokenNative called"),!this.nativeExtensionProvider)throw Y(ki);return new lo(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,t,this.performanceClient,this.nativeExtensionProvider,r||this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId).acquireToken(e)}canUseNative(e,t){if(this.logger.trace("canUseNative called"),!En.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,e.authenticationScheme))return this.logger.trace("canUseNative: isNativeAvailable returned false, returning false"),!1;if(e.prompt)switch(e.prompt){case at.NONE:case at.CONSENT:case at.LOGIN:this.logger.trace("canUseNative: prompt is compatible with native flow");break;default:return this.logger.trace(`canUseNative: prompt = ${e.prompt} is not compatible with native flow, returning false`),!1}return!t&&!this.getNativeAccountId(e)?(this.logger.trace("canUseNative: nativeAccountId is not available, returning false"),!1):!0}getNativeAccountId(e){const t=e.account||this.getAccount({loginHint:e.loginHint,sid:e.sid})||this.getActiveAccount();return t&&t.nativeAccountId||""}createPopupClient(e){return new OI(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createRedirectClient(e){return new NI(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createSilentIframeClient(e){return new HI(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,He.ssoSilent,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createSilentCacheClient(e){return new am(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)}createSilentRefreshClient(e){return new FI(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)}createSilentAuthCodeClient(e){return new qI(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,He.acquireTokenByCode,this.performanceClient,this.nativeExtensionProvider,e)}addEventCallback(e,t){return this.eventHandler.addEventCallback(e,t)}removeEventCallback(e){this.eventHandler.removeEventCallback(e)}addPerformanceCallback(e){return tm(),this.performanceClient.addPerformanceCallback(e)}removePerformanceCallback(e){return this.performanceClient.removePerformanceCallback(e)}enableAccountStorageEvents(){typeof window>"u"||(this.listeningToStorageEvents?this.logger.verbose("Account storage listener already registered."):(this.logger.verbose("Adding account storage listener."),this.listeningToStorageEvents=!0,window.addEventListener("storage",this.handleAccountCacheChange)))}disableAccountStorageEvents(){typeof window>"u"||(this.listeningToStorageEvents?(this.logger.verbose("Removing account storage listener."),window.removeEventListener("storage",this.handleAccountCacheChange),this.listeningToStorageEvents=!1):this.logger.verbose("No account storage listener registered."))}handleAccountCacheChange(e){var t;try{(t=e.key)!=null&&t.includes(it.ACTIVE_ACCOUNT_FILTERS)&&this.eventHandler.emitEvent(oe.ACTIVE_ACCOUNT_CHANGED);const r=e.newValue||e.oldValue;if(!r)return;const o=JSON.parse(r);if(typeof o!="object"||!rt.isAccountEntity(o))return;const s=bo.toObject(new rt,o).getAccountInfo();!e.oldValue&&e.newValue?(this.logger.info("Account was added to cache in a different window"),this.eventHandler.emitEvent(oe.ACCOUNT_ADDED,void 0,s)):!e.newValue&&e.oldValue&&(this.logger.info("Account was removed from cache in a different window"),this.eventHandler.emitEvent(oe.ACCOUNT_REMOVED,void 0,s))}catch{return}}getTokenCache(){return this.tokenCache}getLogger(){return this.logger}setLogger(e){this.logger=e}initializeWrapperLibrary(e,t){this.browserStorage.setWrapperMetadata(e,t)}setNavigationClient(e){this.navigationClient=e}getConfiguration(){return this.config}getPerformanceClient(){return this.performanceClient}isBrowserEnv(){return this.isBrowserEnvironment}getRequestCorrelationId(e){return e!=null&&e.correlationId?e.correlationId:this.isBrowserEnvironment?In():R.EMPTY_STRING}async loginRedirect(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginRedirect called",t),this.acquireTokenRedirect({correlationId:t,...e||Qd})}loginPopup(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginPopup called",t),this.acquireTokenPopup({correlationId:t,...e||Qd})}async acquireTokenSilent(e){const t=this.getRequestCorrelationId(e),r=this.performanceClient.startMeasurement(_.AcquireTokenSilent,t);r.add({cacheLookupPolicy:e.cacheLookupPolicy,scenarioId:e.scenarioId}),Vi(this.initialized,r),this.logger.verbose("acquireTokenSilent called",t);const o=e.account||this.getActiveAccount();if(!o)throw Y(Pp);r.add({accountType:dn(o)});const i={clientId:this.config.auth.clientId,authority:e.authority||R.EMPTY_STRING,scopes:e.scopes,homeAccountIdentifier:o.homeAccountId,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid,shrOptions:e.shrOptions},s=JSON.stringify(i),a=this.activeSilentTokenRequests.get(s);if(typeof a>"u"){this.logger.verbose("acquireTokenSilent called for the first time, storing active request",t);const c=q(this.acquireTokenSilentAsync.bind(this),_.AcquireTokenSilentAsync,this.logger,this.performanceClient,t)({...e,correlationId:t},o).then(l=>(this.activeSilentTokenRequests.delete(s),r.end({success:!0,fromCache:l.fromCache,isNativeBroker:l.fromNativeBroker,cacheLookupPolicy:e.cacheLookupPolicy,accessTokenSize:l.accessToken.length,idTokenSize:l.idToken.length}),l)).catch(l=>{throw this.activeSilentTokenRequests.delete(s),r.end({success:!1},l),l});return this.activeSilentTokenRequests.set(s,c),{...await c,state:e.state}}else return this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call",t),r.discard(),{...await a,state:e.state}}async acquireTokenSilentAsync(e,t){const r=()=>this.trackPageVisibility(e.correlationId);this.performanceClient.addQueueMeasurement(_.AcquireTokenSilentAsync,e.correlationId),this.eventHandler.emitEvent(oe.ACQUIRE_TOKEN_START,ee.Silent,e),e.correlationId&&this.performanceClient.incrementFields({visibilityChangeCount:0},e.correlationId),document.addEventListener("visibilitychange",r);const o=await q(vI,_.InitializeSilentRequest,this.logger,this.performanceClient,e.correlationId)(e,t,this.config,this.performanceClient,this.logger),i=e.cacheLookupPolicy||Dt.Default;return this.acquireTokenSilentNoIframe(o,i).catch(async a=>{if($I(a,i))if(this.activeIframeRequest)if(i!==Dt.Skip){const[l,u]=this.activeIframeRequest;this.logger.verbose(`Iframe request is already in progress, awaiting resolution for request with correlationId: ${u}`,o.correlationId);const d=this.performanceClient.startMeasurement(_.AwaitConcurrentIframe,o.correlationId);d.add({awaitIframeCorrelationId:u});const h=await l;if(d.end({success:h}),h)return this.logger.verbose(`Parallel iframe request with correlationId: ${u} succeeded. Retrying cache and/or RT redemption`,o.correlationId),this.acquireTokenSilentNoIframe(o,i);throw this.logger.info(`Iframe request with correlationId: ${u} failed. Interaction is required.`),a}else return this.logger.warning("Another iframe request is currently in progress and CacheLookupPolicy is set to Skip. This may result in degraded performance and/or reliability for both calls. Please consider changing the CacheLookupPolicy to take advantage of request queuing and token cache.",o.correlationId),q(this.acquireTokenBySilentIframe.bind(this),_.AcquireTokenBySilentIframe,this.logger,this.performanceClient,o.correlationId)(o);else{let l;return this.activeIframeRequest=[new Promise(u=>{l=u}),o.correlationId],this.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",o.correlationId),q(this.acquireTokenBySilentIframe.bind(this),_.AcquireTokenBySilentIframe,this.logger,this.performanceClient,o.correlationId)(o).then(u=>(l(!0),u)).catch(u=>{throw l(!1),u}).finally(()=>{this.activeIframeRequest=void 0})}else throw a}).then(a=>(this.eventHandler.emitEvent(oe.ACQUIRE_TOKEN_SUCCESS,ee.Silent,a),e.correlationId&&this.performanceClient.addFields({fromCache:a.fromCache,isNativeBroker:a.fromNativeBroker},e.correlationId),a)).catch(a=>{throw this.eventHandler.emitEvent(oe.ACQUIRE_TOKEN_FAILURE,ee.Silent,null,a),a}).finally(()=>{document.removeEventListener("visibilitychange",r)})}async acquireTokenSilentNoIframe(e,t){return En.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,e.authenticationScheme)&&e.account.nativeAccountId?(this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform"),this.acquireTokenNative(e,He.acquireTokenSilent_silentFlow).catch(async r=>{throw r instanceof An&&Zr(r)?(this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow"),this.nativeExtensionProvider=void 0,H(Fn)):r})):(this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),q(this.acquireTokenFromCache.bind(this),_.AcquireTokenFromCache,this.logger,this.performanceClient,e.correlationId)(e,t).catch(r=>{if(t===Dt.AccessToken)throw r;return this.eventHandler.emitEvent(oe.ACQUIRE_TOKEN_NETWORK_START,ee.Silent,e),q(this.acquireTokenByRefreshToken.bind(this),_.AcquireTokenByRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,t)}))}}function $I(n,e){const t=!(n instanceof cn&&n.subError!==ea),r=n.errorCode===Ft.INVALID_GRANT_ERROR||n.errorCode===Fn,o=t&&r||n.errorCode===vs||n.errorCode===bl,i=_b.includes(e);return o&&i}/*! @azure/msal-browser v3.30.0 2025-08-05 */async function jI(n,e){const t=new Br(n);return await t.initialize(),ia.createController(t,e)}/*! @azure/msal-browser v3.30.0 2025-08-05 */class jl{static async createPublicClientApplication(e){const t=await jI(e);return new jl(e,t)}constructor(e,t){this.controller=t||new ia(new Br(e))}async initialize(e){return this.controller.initialize(e)}async acquireTokenPopup(e){return this.controller.acquireTokenPopup(e)}acquireTokenRedirect(e){return this.controller.acquireTokenRedirect(e)}acquireTokenSilent(e){return this.controller.acquireTokenSilent(e)}acquireTokenByCode(e){return this.controller.acquireTokenByCode(e)}addEventCallback(e,t){return this.controller.addEventCallback(e,t)}removeEventCallback(e){return this.controller.removeEventCallback(e)}addPerformanceCallback(e){return this.controller.addPerformanceCallback(e)}removePerformanceCallback(e){return this.controller.removePerformanceCallback(e)}enableAccountStorageEvents(){this.controller.enableAccountStorageEvents()}disableAccountStorageEvents(){this.controller.disableAccountStorageEvents()}getAccount(e){return this.controller.getAccount(e)}getAccountByHomeId(e){return this.controller.getAccountByHomeId(e)}getAccountByLocalId(e){return this.controller.getAccountByLocalId(e)}getAccountByUsername(e){return this.controller.getAccountByUsername(e)}getAllAccounts(e){return this.controller.getAllAccounts(e)}handleRedirectPromise(e){return this.controller.handleRedirectPromise(e)}loginPopup(e){return this.controller.loginPopup(e)}loginRedirect(e){return this.controller.loginRedirect(e)}logout(e){return this.controller.logout(e)}logoutRedirect(e){return this.controller.logoutRedirect(e)}logoutPopup(e){return this.controller.logoutPopup(e)}ssoSilent(e){return this.controller.ssoSilent(e)}getTokenCache(){return this.controller.getTokenCache()}getLogger(){return this.controller.getLogger()}setLogger(e){this.controller.setLogger(e)}setActiveAccount(e){this.controller.setActiveAccount(e)}getActiveAccount(){return this.controller.getActiveAccount()}initializeWrapperLibrary(e,t){return this.controller.initializeWrapperLibrary(e,t)}setNavigationClient(e){this.controller.setNavigationClient(e)}getConfiguration(){return this.controller.getConfiguration()}async hydrateCache(e,t){return this.controller.hydrateCache(e,t)}clearCache(e){return this.controller.clearCache(e)}}const Es=new jl({auth:{clientId:"9079054c-9620-4757-a256-23413042f1ef",authority:"https://login.microsoftonline.com/e519c2e6-bc6d-4fdf-8d9c-923c2f002385",redirectUri:"https://optical-dev.oliver.solutions/cc-dashboard/"},cache:{cacheLocation:"sessionStorage",storeAuthStateInCookie:!1}}),GI=["openid","profile","email"];async function VI(){await Es.initialize(),await Es.handleRedirectPromise()}const um=WC("auth",()=>{const n=Oe(null),e=Oe(null),t=Oe(!1),r=Oe(null),o=Te(()=>n.value!==null),i=Te(()=>{var u;return((u=e.value)==null?void 0:u.role)==="admin"});async function s(){var u,d;t.value=!0,r.value=null;try{const f=(await Es.loginPopup({scopes:GI})).idToken,C=await ds.post("/api/auth/microsoft",{id_token:f});n.value=C.data.access_token,await c()}catch(h){const f=h;throw r.value=((d=(u=f.response)==null?void 0:u.data)==null?void 0:d.detail)??f.message??"Login failed",h}finally{t.value=!1}}async function a(){n.value=null,e.value=null;try{await Es.clearCache()}catch{}}async function c(){const u=await ds.get("/api/auth/me");e.value=u.data}function l(){return n.value}return{token:n,user:e,loading:t,error:r,isAuthenticated:o,isAdmin:i,loginWithMicrosoft:s,logout:a,fetchMe:c,getToken:l}}),zI=[{path:"/login",name:"login",component:()=>Gt(()=>import("./LoginView-Bp6PnQyZ.js"),__vite__mapDeps([0,1,2])),meta:{public:!0}},{path:"/",component:()=>Gt(()=>import("./AppLayout-CpcGPOud.js"),[]),children:[{path:"",name:"dashboard",component:()=>Gt(()=>import("./DashboardView-CEeTSEhN.js"),__vite__mapDeps([3,4,1,2,5,6,7,8,9,10]))},{path:"calendar",name:"calendar",component:()=>Gt(()=>import("./CalendarView-njGDFx7r.js"),__vite__mapDeps([11,4,2,7,8,9,12,13,14,15,10,16]))},{path:"projects",name:"projects",component:()=>Gt(()=>import("./ProjectsView-DEY2YtRe.js"),__vite__mapDeps([17,4,1,2,6,8]))},{path:"projects/:id/:date?",name:"project-detail",component:()=>Gt(()=>import("./ProjectDetailView-9CL5OHue.js"),__vite__mapDeps([18,4,1,2,5,8]))},{path:"live",name:"live",component:()=>Gt(()=>import("./LiveView-1BXLV--t.js"),__vite__mapDeps([19,1,2,7,8]))},{path:"reports",name:"reports",component:()=>Gt(()=>import("./ReportsView-DvsVoXsC.js"),__vite__mapDeps([20,1,2,13,7,8,12,21]))},{path:"keys",name:"keys",component:()=>Gt(()=>import("./KeysView-DJ0U5kZP.js"),__vite__mapDeps([22,23,1,2,7,8,14,15]))},{path:"devops",name:"devops",component:()=>Gt(()=>import("./DevopsView-sHwtWFcb.js"),__vite__mapDeps([24,10,1,2,5,7,8,25,15]))},{path:"settings",name:"settings",component:()=>Gt(()=>import("./SettingsView-Bj_8ZT0B.js"),__vite__mapDeps([26,10,1,2,5,15,7,8,25]))},{path:"admin",name:"admin",component:()=>Gt(()=>import("./AdminView-RdxNbXY6.js"),__vite__mapDeps([27,23,1,2,13,8])),meta:{adminOnly:!0}}]},{path:"/:pathMatch(.*)*",redirect:"/"}],Sc=PA({history:lA("/cc-dashboard/"),routes:zI});Sc.beforeEach((n,e,t)=>{const r=um();if(n.meta.public){t();return}if(!r.isAuthenticated){t({name:"login",query:{redirect:n.fullPath}});return}if(n.meta.adminOnly&&!r.isAdmin){t({name:"dashboard"});return}t()});VI().then(()=>{const n=BC(wT),e=$C();n.use(e),n.use(Sc),n.use(Ov);const t=um();vw(()=>t.getToken(),()=>{t.logout(),Sc.push({name:"login"})}),n.mount("#app")});export{ZI as A,lr as B,WC as C,eS as D,ds as E,We as F,tf as G,YI as H,oS as K,IA as R,XI as T,Gt as _,sn as a,JI as b,je as c,ko as d,Ge as e,iS as f,sS as g,dt as h,Tr as i,Te as j,Hn as k,Do as l,Yo as m,Ut as n,Ee as o,Wt as p,Ga as q,Ba as r,Oe as s,Fo as t,um as u,Ey as v,vr as w,Mr as x,is as y,WI as z}; +${s}`);return}throw $d(e.error,e.error_description,e.suberror)?new cn(e.error,e.error_description,e.suberror,e.timestamp||R.EMPTY_STRING,e.trace_id||R.EMPTY_STRING,e.correlation_id||R.EMPTY_STRING,e.claims||R.EMPTY_STRING,i):s}}async handleServerTokenResponse(e,t,r,o,i,s,a,c,l){var C;(C=this.performanceClient)==null||C.addQueueMeasurement(_.HandleServerTokenResponse,e.correlation_id);let u;if(e.id_token){if(u=qr(e.id_token||R.EMPTY_STRING,this.cryptoObj.base64Decode),i&&i.nonce&&u.nonce!==i.nonce)throw H(Ng);if(o.maxAge||o.maxAge===0){const p=u.auth_time;if(!p)throw H(al);$g(p,o.maxAge)}}this.homeAccountIdentifier=rt.generateHomeAccountId(e.client_info||R.EMPTY_STRING,t.authorityType,this.logger,this.cryptoObj,u);let d;i&&i.state&&(d=nn.parseRequestState(this.cryptoObj,i.state)),e.key_id=e.key_id||o.sshKid||void 0;const h=this.generateCacheRecord(e,t,r,o,u,s,i);let f;try{if(this.persistencePlugin&&this.serializableCache&&(this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),f=new ab(this.serializableCache,!0),await this.persistencePlugin.beforeCacheAccess(f)),a&&!c&&h.account){const p=h.account.generateAccountKey();if(!this.cacheStorage.getAccount(p,o.correlationId,this.logger))return this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"),await Hr.generateAuthenticationResult(this.cryptoObj,t,h,!1,o,u,d,void 0,l)}await this.cacheStorage.saveCacheRecord(h,o.correlationId,o.storeInCache)}finally{this.persistencePlugin&&this.serializableCache&&f&&(this.logger.verbose("Persistence enabled, calling afterCacheAccess"),await this.persistencePlugin.afterCacheAccess(f))}return Hr.generateAuthenticationResult(this.cryptoObj,t,h,!1,o,u,d,e,l)}generateCacheRecord(e,t,r,o,i,s,a){const c=t.getPreferredCache();if(!c)throw H(ll);const l=ip(i);let u,d;e.id_token&&i&&(u=Ws(this.homeAccountIdentifier,c,e.id_token,this.clientId,l||""),d=Il(this.cacheStorage,t,this.homeAccountIdentifier,this.cryptoObj.base64Decode,o.correlationId,i,e.client_info,c,l,a,void 0,this.logger));let h=null;if(e.access_token){const p=e.scope?Ye.fromString(e.scope):new Ye(o.scopes||[]),v=(typeof e.expires_in=="string"?parseInt(e.expires_in,10):e.expires_in)||0,E=(typeof e.ext_expires_in=="string"?parseInt(e.ext_expires_in,10):e.ext_expires_in)||0,b=(typeof e.refresh_in=="string"?parseInt(e.refresh_in,10):e.refresh_in)||void 0,y=r+v,T=y+E,N=b&&b>0?r+b:void 0;h=Ys(this.homeAccountIdentifier,c,e.access_token,this.clientId,l||t.tenant||"",p.printScopes(),y,T,this.cryptoObj.base64Decode,N,e.token_type,s,e.key_id,o.claims,o.requestedClaimsHash)}let f=null;if(e.refresh_token){let p;if(e.refresh_token_expires_in){const v=typeof e.refresh_token_expires_in=="string"?parseInt(e.refresh_token_expires_in,10):e.refresh_token_expires_in;p=r+v}f=jg(this.homeAccountIdentifier,c,e.refresh_token,this.clientId,e.foci,s,p)}let C=null;return e.foci&&(C={clientId:this.clientId,environment:c,familyId:e.foci}),{account:d,idToken:u,accessToken:h,refreshToken:f,appMetadata:C}}static async generateAuthenticationResult(e,t,r,o,i,s,a,c,l){var y,T,N,z,B;let u=R.EMPTY_STRING,d=[],h=null,f,C,p=R.EMPTY_STRING;if(r.accessToken){if(r.accessToken.tokenType===Ne.POP&&!i.popKid){const F=new Io(e),{secret:O,keyId:Q}=r.accessToken;if(!Q)throw H(ul);u=await F.signPopToken(O,Q,i)}else u=r.accessToken.secret;d=Ye.fromString(r.accessToken.target).asArray(),h=new Date(Number(r.accessToken.expiresOn)*1e3),f=new Date(Number(r.accessToken.extendedExpiresOn)*1e3),r.accessToken.refreshOn&&(C=new Date(Number(r.accessToken.refreshOn)*1e3))}r.appMetadata&&(p=r.appMetadata.familyId===Zo?Zo:"");const v=(s==null?void 0:s.oid)||(s==null?void 0:s.sub)||"",E=(s==null?void 0:s.tid)||"";c!=null&&c.spa_accountid&&r.account&&(r.account.nativeAccountId=c==null?void 0:c.spa_accountid);const b=r.account?vl(r.account.getAccountInfo(),void 0,s,(y=r.idToken)==null?void 0:y.secret):null;return{authority:t.canonicalAuthority,uniqueId:v,tenantId:E,scopes:d,account:b,idToken:((T=r==null?void 0:r.idToken)==null?void 0:T.secret)||"",idTokenClaims:s||{},accessToken:u,fromCache:o,expiresOn:h,extExpiresOn:f,refreshOn:C,correlationId:i.correlationId,requestId:l||R.EMPTY_STRING,familyId:p,tokenType:((N=r.accessToken)==null?void 0:N.tokenType)||R.EMPTY_STRING,state:a?a.userRequestState:R.EMPTY_STRING,cloudGraphHostName:((z=r.account)==null?void 0:z.cloudGraphHostName)||R.EMPTY_STRING,msGraphHost:((B=r.account)==null?void 0:B.msGraphHost)||R.EMPTY_STRING,code:c==null?void 0:c.spa_code,fromNativeBroker:!1}}}function Il(n,e,t,r,o,i,s,a,c,l,u,d){d==null||d.verbose("setCachedAccount called");const f=n.getAccountKeys().find(b=>b.startsWith(t));let C=null;f&&(C=n.getAccount(f,o,d));const p=C||rt.createAccount({homeAccountId:t,idTokenClaims:i,clientInfo:s,environment:a,cloudGraphHostName:l==null?void 0:l.cloud_graph_host_name,msGraphHost:l==null?void 0:l.msgraph_host,nativeAccountId:u},e,r),v=p.tenantProfiles||[],E=c||p.realm;if(E&&!v.find(b=>b.tenantId===E)){const b=Cl(t,p.localAccountId,E,i);v.push(b)}return p.tenantProfiles=v,p}/*! @azure/msal-common v14.16.1 2025-08-05 */async function pp(n,e,t){return typeof n=="string"?n:n({clientId:e,tokenEndpoint:t})}/*! @azure/msal-common v14.16.1 2025-08-05 */class mp extends _l{constructor(e,t){var r;super(e,t),this.includeRedirectUri=!0,this.oidcDefaultScopes=(r=this.config.authOptions.authority.options.OIDCOptions)==null?void 0:r.defaultScopes}async getAuthCodeUrl(e){var r;(r=this.performanceClient)==null||r.addQueueMeasurement(_.GetAuthCodeUrl,e.correlationId);const t=await q(this.createAuthCodeUrlQueryString.bind(this),_.AuthClientCreateQueryString,this.logger,this.performanceClient,e.correlationId)(e);return ve.appendQueryString(this.authority.authorizationEndpoint,t)}async acquireToken(e,t){var a,c;if((a=this.performanceClient)==null||a.addQueueMeasurement(_.AuthClientAcquireToken,e.correlationId),!e.code)throw H(Dg);const r=bn(),o=await q(this.executeTokenRequest.bind(this),_.AuthClientExecuteTokenRequest,this.logger,this.performanceClient,e.correlationId)(this.authority,e),i=(c=o.headers)==null?void 0:c[bt.X_MS_REQUEST_ID],s=new Hr(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin,this.performanceClient);return s.validateTokenResponse(o.body),q(s.handleServerTokenResponse.bind(s),_.HandleServerTokenResponse,this.logger,this.performanceClient,e.correlationId)(o.body,this.authority,r,e,t,void 0,void 0,void 0,i)}handleFragmentResponse(e,t){if(new Hr(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,null,null).validateServerAuthorizationCodeResponse(e,t),!e.code)throw H(Bg);return e}getLogoutUri(e){if(!e)throw xe(Jg);const t=this.createLogoutUrlQueryString(e);return ve.appendQueryString(this.authority.endSessionEndpoint,t)}async executeTokenRequest(e,t){var l,u;(l=this.performanceClient)==null||l.addQueueMeasurement(_.AuthClientExecuteTokenRequest,t.correlationId);const r=this.createTokenQueryParameters(t),o=ve.appendQueryString(e.tokenEndpoint,r),i=await q(this.createTokenRequestBody.bind(this),_.AuthClientCreateTokenRequestBody,this.logger,this.performanceClient,t.correlationId)(t);let s;if(t.clientInfo)try{const d=ps(t.clientInfo,this.cryptoUtils.base64Decode);s={credential:`${d.uid}${yt.CLIENT_INFO_SEPARATOR}${d.utid}`,type:Kt.HOME_ACCOUNT_ID}}catch(d){this.logger.verbose("Could not parse client info for CCS Header: "+d)}const a=this.createTokenRequestHeaders(s||t.ccsCredential),c={clientId:((u=t.tokenBodyParameters)==null?void 0:u.clientId)||this.config.authOptions.clientId,authority:e.canonicalAuthority,scopes:t.scopes,claims:t.claims,authenticationScheme:t.authenticationScheme,resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,sshKid:t.sshKid};return q(this.executePostToTokenEndpoint.bind(this),_.AuthorizationCodeClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,t.correlationId)(o,i,a,c,t.correlationId,_.AuthorizationCodeClientExecutePostToTokenEndpoint)}async createTokenRequestBody(e){var o,i;(o=this.performanceClient)==null||o.addQueueMeasurement(_.AuthClientCreateTokenRequestBody,e.correlationId);const t=new ti(e.correlationId,this.performanceClient);if(t.addClientId(e.embeddedClientId||((i=e.tokenBodyParameters)==null?void 0:i[Ur])||this.config.authOptions.clientId),this.includeRedirectUri?t.addRedirectUri(e.redirectUri):Jr.validateRedirectUri(e.redirectUri),t.addScopes(e.scopes,!0,this.oidcDefaultScopes),t.addAuthorizationCode(e.code),t.addLibraryInfo(this.config.libraryInfo),t.addApplicationTelemetry(this.config.telemetry.application),t.addThrottling(),this.serverTelemetryManager&&!mc(this.config)&&t.addServerTelemetry(this.serverTelemetryManager),e.codeVerifier&&t.addCodeVerifier(e.codeVerifier),this.config.clientCredentials.clientSecret&&t.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const s=this.config.clientCredentials.clientAssertion;t.addClientAssertion(await pp(s.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),t.addClientAssertionType(s.assertionType)}if(t.addGrantType(_g.AUTHORIZATION_CODE_GRANT),t.addClientInfo(),e.authenticationScheme===Ne.POP){const s=new Io(this.cryptoUtils,this.performanceClient);let a;e.popKid?a=this.cryptoUtils.encodeKid(e.popKid):a=(await q(s.generateCnf.bind(s),_.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,t.addPopToken(a)}else if(e.authenticationScheme===Ne.SSH)if(e.sshJwk)t.addSshJwk(e.sshJwk);else throw xe(Js);(!tn.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&t.addClaims(e.claims,this.config.authOptions.clientCapabilities);let r;if(e.clientInfo)try{const s=ps(e.clientInfo,this.cryptoUtils.base64Decode);r={credential:`${s.uid}${yt.CLIENT_INFO_SEPARATOR}${s.utid}`,type:Kt.HOME_ACCOUNT_ID}}catch(s){this.logger.verbose("Could not parse client info for CCS Header: "+s)}else r=e.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&r)switch(r.type){case Kt.HOME_ACCOUNT_ID:try{const s=no(r.credential);t.addCcsOid(s)}catch(s){this.logger.verbose("Could not parse home account ID for CCS Header: "+s)}break;case Kt.UPN:t.addCcsUpn(r.credential);break}return e.embeddedClientId&&t.addBrokerParameters({brokerClientId:this.config.authOptions.clientId,brokerRedirectUri:this.config.authOptions.redirectUri}),e.tokenBodyParameters&&t.addExtraQueryParameters(e.tokenBodyParameters),e.enableSpaAuthorizationCode&&(!e.tokenBodyParameters||!e.tokenBodyParameters[Bd])&&t.addExtraQueryParameters({[Bd]:"1"}),t.createQueryString()}async createAuthCodeUrlQueryString(e){var i,s;const t=e.correlationId||this.config.cryptoInterface.createNewGuid();(i=this.performanceClient)==null||i.addQueueMeasurement(_.AuthClientCreateQueryString,t);const r=new ti(t,this.performanceClient);r.addClientId(e.embeddedClientId||((s=e.extraQueryParameters)==null?void 0:s[Ur])||this.config.authOptions.clientId);const o=[...e.scopes||[],...e.extraScopesToConsent||[]];if(r.addScopes(o,!0,this.oidcDefaultScopes),r.addRedirectUri(e.redirectUri),r.addCorrelationId(t),r.addResponseMode(e.responseMode),r.addResponseTypeCode(),r.addLibraryInfo(this.config.libraryInfo),mc(this.config)||r.addApplicationTelemetry(this.config.telemetry.application),r.addClientInfo(),e.codeChallenge&&e.codeChallengeMethod&&r.addCodeChallengeParams(e.codeChallenge,e.codeChallengeMethod),e.prompt&&r.addPrompt(e.prompt),e.domainHint&&r.addDomainHint(e.domainHint),e.prompt!==at.SELECT_ACCOUNT)if(e.sid&&e.prompt===at.NONE)this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request"),r.addSid(e.sid);else if(e.account){const a=this.extractAccountSid(e.account);let c=this.extractLoginHint(e.account);if(c&&e.domainHint&&(this.logger.warning('AuthorizationCodeClient.createAuthCodeUrlQueryString: "domainHint" param is set, skipping opaque "login_hint" claim. Please consider not passing domainHint'),c=null),c){this.logger.verbose("createAuthCodeUrlQueryString: login_hint claim present on account"),r.addLoginHint(c);try{const l=no(e.account.homeAccountId);r.addCcsOid(l)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(a&&e.prompt===at.NONE){this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account"),r.addSid(a);try{const l=no(e.account.homeAccountId);r.addCcsOid(l)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(e.loginHint)this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from request"),r.addLoginHint(e.loginHint),r.addCcsUpn(e.loginHint);else if(e.account.username){this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from account"),r.addLoginHint(e.account.username);try{const l=no(e.account.homeAccountId);r.addCcsOid(l)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}}else e.loginHint&&(this.logger.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request"),r.addLoginHint(e.loginHint),r.addCcsUpn(e.loginHint));else this.logger.verbose("createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints");if(e.nonce&&r.addNonce(e.nonce),e.state&&r.addState(e.state),(e.claims||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&r.addClaims(e.claims,this.config.authOptions.clientCapabilities),e.embeddedClientId&&r.addBrokerParameters({brokerClientId:this.config.authOptions.clientId,brokerRedirectUri:this.config.authOptions.redirectUri}),this.addExtraQueryParams(e,r),e.nativeBroker&&(r.addNativeBroker(),e.authenticationScheme===Ne.POP)){const a=new Io(this.cryptoUtils);let c;e.popKid?c=this.cryptoUtils.encodeKid(e.popKid):c=(await q(a.generateCnf.bind(a),_.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,r.addPopToken(c)}return r.createQueryString()}createLogoutUrlQueryString(e){const t=new ti(e.correlationId,this.performanceClient);return e.postLogoutRedirectUri&&t.addPostLogoutRedirectUri(e.postLogoutRedirectUri),e.correlationId&&t.addCorrelationId(e.correlationId),e.idTokenHint&&t.addIdTokenHint(e.idTokenHint),e.state&&t.addState(e.state),e.logoutHint&&t.addLogoutHint(e.logoutHint),this.addExtraQueryParams(e,t),t.createQueryString()}addExtraQueryParams(e,t){!(e.extraQueryParameters&&e.extraQueryParameters.hasOwnProperty("instance_aware"))&&this.config.authOptions.instanceAware&&(e.extraQueryParameters=e.extraQueryParameters||{},e.extraQueryParameters.instance_aware="true"),e.extraQueryParameters&&t.addExtraQueryParameters(e.extraQueryParameters)}extractAccountSid(e){var t;return((t=e.idTokenClaims)==null?void 0:t.sid)||null}extractLoginHint(e){var t;return((t=e.idTokenClaims)==null?void 0:t.login_hint)||null}}/*! @azure/msal-common v14.16.1 2025-08-05 */const lb=300;class vc extends _l{constructor(e,t){super(e,t)}async acquireToken(e){var s,a;(s=this.performanceClient)==null||s.addQueueMeasurement(_.RefreshTokenClientAcquireToken,e.correlationId);const t=bn(),r=await q(this.executeTokenRequest.bind(this),_.RefreshTokenClientExecuteTokenRequest,this.logger,this.performanceClient,e.correlationId)(e,this.authority),o=(a=r.headers)==null?void 0:a[bt.X_MS_REQUEST_ID],i=new Hr(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return i.validateTokenResponse(r.body),q(i.handleServerTokenResponse.bind(i),_.HandleServerTokenResponse,this.logger,this.performanceClient,e.correlationId)(r.body,this.authority,t,e,void 0,void 0,!0,e.forceCache,o)}async acquireTokenByRefreshToken(e){var r;if(!e)throw xe(Yg);if((r=this.performanceClient)==null||r.addQueueMeasurement(_.RefreshTokenClientAcquireTokenByRefreshToken,e.correlationId),!e.account)throw H(cl);if(this.cacheManager.isAppMetadataFOCI(e.account.environment))try{return await q(this.acquireTokenWithCachedRefreshToken.bind(this),_.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!0)}catch(o){const i=o instanceof cn&&o.errorCode===vs,s=o instanceof fr&&o.errorCode===Id.INVALID_GRANT_ERROR&&o.subError===Id.CLIENT_MISMATCH_ERROR;if(i||s)return q(this.acquireTokenWithCachedRefreshToken.bind(this),_.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!1);throw o}return q(this.acquireTokenWithCachedRefreshToken.bind(this),_.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!1)}async acquireTokenWithCachedRefreshToken(e,t){var i;(i=this.performanceClient)==null||i.addQueueMeasurement(_.RefreshTokenClientAcquireTokenWithCachedRefreshToken,e.correlationId);const r=$r(this.cacheManager.getRefreshToken.bind(this.cacheManager),_.CacheManagerGetRefreshToken,this.logger,this.performanceClient,e.correlationId)(e.account,t,e.correlationId,void 0,this.performanceClient);if(!r)throw Cc(vs);if(r.expiresOn&&pc(r.expiresOn,e.refreshTokenExpirationOffsetSeconds||lb))throw Cc(bl);const o={...e,refreshToken:r.secret,authenticationScheme:e.authenticationScheme||Ne.BEARER,ccsCredential:{credential:e.account.homeAccountId,type:Kt.HOME_ACCOUNT_ID}};try{return await q(this.acquireToken.bind(this),_.RefreshTokenClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(o)}catch(s){if(s instanceof cn&&s.subError===ea){this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");const a=to(r);this.cacheManager.removeRefreshToken(a,e.correlationId)}throw s}}async executeTokenRequest(e,t){var c,l;(c=this.performanceClient)==null||c.addQueueMeasurement(_.RefreshTokenClientExecuteTokenRequest,e.correlationId);const r=this.createTokenQueryParameters(e),o=ve.appendQueryString(t.tokenEndpoint,r),i=await q(this.createTokenRequestBody.bind(this),_.RefreshTokenClientCreateTokenRequestBody,this.logger,this.performanceClient,e.correlationId)(e),s=this.createTokenRequestHeaders(e.ccsCredential),a={clientId:((l=e.tokenBodyParameters)==null?void 0:l.clientId)||this.config.authOptions.clientId,authority:t.canonicalAuthority,scopes:e.scopes,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid};return q(this.executePostToTokenEndpoint.bind(this),_.RefreshTokenClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,e.correlationId)(o,i,s,a,e.correlationId,_.RefreshTokenClientExecutePostToTokenEndpoint)}async createTokenRequestBody(e){var o,i,s;(o=this.performanceClient)==null||o.addQueueMeasurement(_.RefreshTokenClientCreateTokenRequestBody,e.correlationId);const t=e.correlationId,r=new ti(t,this.performanceClient);if(r.addClientId(e.embeddedClientId||((i=e.tokenBodyParameters)==null?void 0:i[Ur])||this.config.authOptions.clientId),e.redirectUri&&r.addRedirectUri(e.redirectUri),r.addScopes(e.scopes,!0,(s=this.config.authOptions.authority.options.OIDCOptions)==null?void 0:s.defaultScopes),r.addGrantType(_g.REFRESH_TOKEN_GRANT),r.addClientInfo(),r.addLibraryInfo(this.config.libraryInfo),r.addApplicationTelemetry(this.config.telemetry.application),r.addThrottling(),this.serverTelemetryManager&&!mc(this.config)&&r.addServerTelemetry(this.serverTelemetryManager),r.addRefreshToken(e.refreshToken),this.config.clientCredentials.clientSecret&&r.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const a=this.config.clientCredentials.clientAssertion;r.addClientAssertion(await pp(a.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),r.addClientAssertionType(a.assertionType)}if(e.authenticationScheme===Ne.POP){const a=new Io(this.cryptoUtils,this.performanceClient);let c;e.popKid?c=this.cryptoUtils.encodeKid(e.popKid):c=(await q(a.generateCnf.bind(a),_.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,r.addPopToken(c)}else if(e.authenticationScheme===Ne.SSH)if(e.sshJwk)r.addSshJwk(e.sshJwk);else throw xe(Js);if((!tn.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&r.addClaims(e.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&e.ccsCredential)switch(e.ccsCredential.type){case Kt.HOME_ACCOUNT_ID:try{const a=no(e.ccsCredential.credential);r.addCcsOid(a)}catch(a){this.logger.verbose("Could not parse home account ID for CCS Header: "+a)}break;case Kt.UPN:r.addCcsUpn(e.ccsCredential.credential);break}return e.embeddedClientId&&r.addBrokerParameters({brokerClientId:this.config.authOptions.clientId,brokerRedirectUri:this.config.authOptions.redirectUri}),e.tokenBodyParameters&&r.addExtraQueryParameters(e.tokenBodyParameters),r.createQueryString()}}/*! @azure/msal-common v14.16.1 2025-08-05 */class ub extends _l{constructor(e,t){super(e,t)}async acquireToken(e){var t;try{const[r,o]=await this.acquireCachedToken({...e,scopes:(t=e.scopes)!=null&&t.length?e.scopes:[...Po]});return o===er.PROACTIVELY_REFRESHED&&(this.logger.info("SilentFlowClient:acquireCachedToken - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed."),new vc(this.config,this.performanceClient).acquireTokenByRefreshToken(e).catch(()=>{})),r}catch(r){if(r instanceof Qs&&r.errorCode===Fn)return new vc(this.config,this.performanceClient).acquireTokenByRefreshToken(e);throw r}}async acquireCachedToken(e){var c;(c=this.performanceClient)==null||c.addQueueMeasurement(_.SilentFlowClientAcquireCachedToken,e.correlationId);let t=er.NOT_APPLICABLE;if(e.forceRefresh||!this.config.cacheOptions.claimsBasedCachingEnabled&&!tn.isEmptyObj(e.claims))throw this.setCacheOutcome(er.FORCE_REFRESH_OR_CLAIMS,e.correlationId),H(Fn);if(!e.account)throw H(cl);const r=e.account.tenantId||Z_(e.authority),o=this.cacheManager.getTokenKeys(),i=this.cacheManager.getAccessToken(e.account,e,o,r,this.performanceClient);if(i){if(Fw(i.cachedAt)||pc(i.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw this.setCacheOutcome(er.CACHED_ACCESS_TOKEN_EXPIRED,e.correlationId),H(Fn);i.refreshOn&&pc(i.refreshOn,0)&&(t=er.PROACTIVELY_REFRESHED)}else throw this.setCacheOutcome(er.NO_CACHED_ACCESS_TOKEN,e.correlationId),H(Fn);const s=e.authority||this.authority.getPreferredCache(),a={account:this.cacheManager.readAccountFromCache(e.account,e.correlationId),accessToken:i,idToken:this.cacheManager.getIdToken(e.account,e.correlationId,o,r,this.performanceClient),refreshToken:null,appMetadata:this.cacheManager.readAppMetadataFromCache(s)};return this.setCacheOutcome(t,e.correlationId),this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[await q(this.generateResultFromCacheRecord.bind(this),_.SilentFlowClientGenerateResultFromCacheRecord,this.logger,this.performanceClient,e.correlationId)(a,e),t]}setCacheOutcome(e,t){var r,o;(r=this.serverTelemetryManager)==null||r.setCacheOutcome(e),(o=this.performanceClient)==null||o.addFields({cacheOutcome:e},t),e!==er.NOT_APPLICABLE&&this.logger.info(`Token refresh is required due to cache outcome: ${e}`)}async generateResultFromCacheRecord(e,t){var o;(o=this.performanceClient)==null||o.addQueueMeasurement(_.SilentFlowClientGenerateResultFromCacheRecord,t.correlationId);let r;if(e.idToken&&(r=qr(e.idToken.secret,this.config.cryptoInterface.base64Decode)),t.maxAge||t.maxAge===0){const i=r==null?void 0:r.auth_time;if(!i)throw H(al);$g(i,t.maxAge)}return Hr.generateAuthenticationResult(this.cryptoUtils,this.authority,e,!0,t,r)}}/*! @azure/msal-common v14.16.1 2025-08-05 */const db={sendGetRequestAsync:()=>Promise.reject(H(ge)),sendPostRequestAsync:()=>Promise.reject(H(ge))};/*! @azure/msal-common v14.16.1 2025-08-05 */const jd=",",yp="|";function hb(n){const{skus:e,libraryName:t,libraryVersion:r,extensionName:o,extensionVersion:i}=n,s=new Map([[0,[t,r]],[2,[o,i]]]);let a=[];if(e!=null&&e.length){if(a=e.split(jd),a.length<4)return e}else a=Array.from({length:4},()=>yp);return s.forEach((c,l)=>{var u,d;c.length===2&&((u=c[0])!=null&&u.length)&&((d=c[1])!=null&&d.length)&&fb({skuArr:a,index:l,skuName:c[0],skuVersion:c[1]})}),a.join(jd)}function fb(n){const{skuArr:e,index:t,skuName:r,skuVersion:o}=n;t>=e.length||(e[t]=[r,o].join(yp))}class fi{constructor(e,t){this.cacheOutcome=er.NOT_APPLICABLE,this.cacheManager=t,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||R.EMPTY_STRING,this.wrapperVer=e.wrapperVer||R.EMPTY_STRING,this.telemetryCacheKey=ut.CACHE_KEY+yt.CACHE_KEY_SEPARATOR+e.clientId}generateCurrentRequestHeaderValue(){const e=`${this.apiId}${ut.VALUE_SEPARATOR}${this.cacheOutcome}`,t=[this.wrapperSKU,this.wrapperVer],r=this.getNativeBrokerErrorCode();r!=null&&r.length&&t.push(`broker_error=${r}`);const o=t.join(ut.VALUE_SEPARATOR),i=this.getRegionDiscoveryFields(),s=[e,i].join(ut.VALUE_SEPARATOR);return[ut.SCHEMA_VERSION,s,o].join(ut.CATEGORY_SEPARATOR)}generateLastRequestHeaderValue(){const e=this.getLastRequests(),t=fi.maxErrorsToSend(e),r=e.failedRequests.slice(0,2*t).join(ut.VALUE_SEPARATOR),o=e.errors.slice(0,t).join(ut.VALUE_SEPARATOR),i=e.errors.length,s=t=ut.MAX_CACHED_ERRORS&&(t.failedRequests.shift(),t.failedRequests.shift(),t.errors.shift()),t.failedRequests.push(this.apiId,this.correlationId),e instanceof Error&&e&&e.toString()?e instanceof Fe?e.subError?t.errors.push(e.subError):e.errorCode?t.errors.push(e.errorCode):t.errors.push(e.toString()):t.errors.push(e.toString()):t.errors.push(ut.UNKNOWN_ERROR),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t,this.correlationId)}incrementCacheHits(){const e=this.getLastRequests();return e.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e,this.correlationId),e.cacheHits}getLastRequests(){const e={failedRequests:[],errors:[],cacheHits:0};return this.cacheManager.getServerTelemetry(this.telemetryCacheKey)||e}clearTelemetryCache(){const e=this.getLastRequests(),t=fi.maxErrorsToSend(e),r=e.errors.length;if(t===r)this.cacheManager.removeItem(this.telemetryCacheKey,this.correlationId);else{const o={failedRequests:e.failedRequests.slice(t*2),errors:e.errors.slice(t),cacheHits:0};this.cacheManager.setServerTelemetry(this.telemetryCacheKey,o,this.correlationId)}}static maxErrorsToSend(e){let t,r=0,o=0;const i=e.errors.length;for(t=0;tnull,discard:()=>{},add:()=>{},increment:()=>{},event:{eventId:this.generateId(),status:X_.InProgress,authority:"",libraryName:"",libraryVersion:"",clientId:"",name:e,startTimeMs:Date.now(),correlationId:t||""},measurement:new Vd}}startPerformanceMeasurement(){return new Vd}calculateQueuedTime(){return 0}addQueueMeasurement(){}setPreQueueTime(){}endMeasurement(){return null}discardMeasurements(){}removePerformanceCallback(){return!0}addPerformanceCallback(){return""}emitEvents(){}addFields(){}incrementFields(){}cacheEventByCorrelationId(){}}/*! @azure/msal-browser v3.30.0 2025-08-05 */const kl="pkce_not_created",Tc="crypto_nonexistent",ta="empty_navigate_uri",Tp="hash_empty_error",Ol="no_state_in_hash",Ap="hash_does_not_contain_known_properties",Ep="unable_to_parse_state",wp="state_interaction_type_mismatch",_p="interaction_in_progress",bp="popup_window_error",Ip="empty_window_error",Fr="user_cancelled",mb="monitor_popup_timeout",Sp="monitor_window_timeout",Rp="redirect_in_iframe",kp="block_iframe_reload",Op="block_nested_popups",yb="iframe_closed_prematurely",na="silent_logout_unsupported",Pp="no_account_error",Cb="silent_prompt_value_error",Np="no_token_request_cache_error",Mp="unable_to_parse_token_request_cache_error",Pl="no_cached_authority_error",vb="auth_request_not_set_error",Tb="invalid_cache_type",ra="non_browser_environment",Xr="database_not_open",Ts="no_network_connectivity",xp="post_request_failed",Dp="get_request_failed",Ac="failed_to_parse_response",Lp="unable_to_load_token",Nl="crypto_key_not_found",Up="auth_code_required",Hp="auth_code_or_nativeAccountId_required",Fp="spa_code_and_nativeAccountId_present",Ml="database_unavailable",Bp="unable_to_acquire_token_from_native_platform",Kp="native_handshake_timeout",qp="native_extension_not_installed",ki="native_connection_not_established",$p="uninitialized_public_client_application",jp="native_prompt_not_supported",Gp="invalid_base64_string",Vp="invalid_pop_token_request",zp="failed_to_build_headers",Qp="failed_to_parse_headers";/*! @azure/msal-browser v3.30.0 2025-08-05 */const On="For more visit: aka.ms/msaljs/browser-errors",Ab={[kl]:"The PKCE code challenge and verifier could not be generated.",[Tc]:"The crypto object or function is not available.",[ta]:"Navigation URI is empty. Please check stack trace for more info.",[Tp]:`Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. ${On}`,[Ol]:"Hash does not contain state. Please verify that the request originated from msal.",[Ap]:`Hash does not contain known properites. Please verify that your redirectUri is not changing the hash. ${On}`,[Ep]:"Unable to parse state. Please verify that the request originated from msal.",[wp]:"Hash contains state but the interaction type does not match the caller.",[_p]:`Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. ${On}`,[bp]:"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser.",[Ip]:"window.open returned null or undefined window object.",[Fr]:"User cancelled the flow.",[mb]:`Token acquisition in popup failed due to timeout. ${On}`,[Sp]:`Token acquisition in iframe failed due to timeout. ${On}`,[Rp]:"Redirects are not supported for iframed or brokered applications. Please ensure you are using MSAL.js in a top frame of the window if using the redirect APIs, or use the popup APIs.",[kp]:`Request was blocked inside an iframe because MSAL detected an authentication response. ${On}`,[Op]:"Request was blocked inside a popup because MSAL detected it was running in a popup.",[yb]:"The iframe being monitored was closed prematurely.",[na]:"Silent logout not supported. Please call logoutRedirect or logoutPopup instead.",[Pp]:"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request.",[Cb]:"The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'.",[Np]:"No token request found in cache.",[Mp]:"The cached token request could not be parsed.",[Pl]:"No cached authority found.",[vb]:"Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler",[Tb]:"Invalid cache type",[ra]:"Login and token requests are not supported in non-browser environments.",[Xr]:"Database is not open!",[Ts]:"No network connectivity. Check your internet connection.",[xp]:"Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'",[Dp]:"Network request failed. Please check the network trace to determine root cause.",[Ac]:"Failed to parse network response. Check network trace.",[Lp]:"Error loading token to cache.",[Nl]:"Cryptographic Key or Keypair not found in browser storage.",[Up]:"An authorization code must be provided (as the `code` property on the request) to this flow.",[Hp]:"An authorization code or nativeAccountId must be provided to this flow.",[Fp]:"Request cannot contain both spa code and native account id.",[Ml]:"IndexedDB, which is required for persistent cryptographic key storage, is unavailable. This may be caused by browser privacy features which block persistent storage in third-party contexts.",[Bp]:`Unable to acquire token from native platform. ${On}`,[Kp]:"Timed out while attempting to establish connection to browser extension",[qp]:"Native extension is not installed. If you think this is a mistake call the initialize function.",[ki]:`Connection to native platform has not been established. Please install a compatible browser extension and run initialize(). ${On}`,[$p]:`You must call and await the initialize function before attempting to call any other MSAL API. ${On}`,[jp]:"The provided prompt is not supported by the native platform. This request should be routed to the web based flow.",[Gp]:"Invalid base64 encoded string.",[Vp]:"Invalid PoP token request. The request should not have both a popKid value and signPopToken set to true.",[zp]:"Failed to build request headers object.",[Qp]:"Failed to parse response headers"};class Oi extends Fe{constructor(e,t){super(e,Ab[e],t),Object.setPrototypeOf(this,Oi.prototype),this.name="BrowserAuthError"}}function Y(n,e){return new Oi(n,e)}/*! @azure/msal-browser v3.30.0 2025-08-05 */const Ft={INVALID_GRANT_ERROR:"invalid_grant",POPUP_WIDTH:483,POPUP_HEIGHT:600,POPUP_NAME_PREFIX:"msal",DEFAULT_POLL_INTERVAL_MS:30,MSAL_SKU:"msal.js.browser"},ro={CHANNEL_ID:"53ee284d-920a-4b59-9d30-a60315b26836",PREFERRED_EXTENSION_ID:"ppnbnpeolgkicgegkbkbjmhlideopiji",MATS_TELEMETRY:"MATS"},br={HandshakeRequest:"Handshake",HandshakeResponse:"HandshakeResponse",GetToken:"GetToken",Response:"Response"},Ot={LocalStorage:"localStorage",SessionStorage:"sessionStorage",MemoryStorage:"memoryStorage"},zd={GET:"GET",POST:"POST"},ke={AUTHORITY:"authority",ACQUIRE_TOKEN_ACCOUNT:"acquireToken.account",SESSION_STATE:"session.state",REQUEST_STATE:"request.state",NONCE_IDTOKEN:"nonce.id_token",ORIGIN_URI:"request.origin",RENEW_STATUS:"token.renew.status",URL_HASH:"urlHash",REQUEST_PARAMS:"request.params",SCOPES:"scopes",INTERACTION_STATUS_KEY:"interaction.status",CCS_CREDENTIAL:"ccs.credential",CORRELATION_ID:"request.correlationId",NATIVE_REQUEST:"request.native",REDIRECT_CONTEXT:"request.redirect.context"},zt={ACCOUNT_KEYS:"msal.account.keys",TOKEN_KEYS:"msal.token.keys",VERSION:"msal.version"},ji={WRAPPER_SKU:"wrapper.sku",WRAPPER_VER:"wrapper.version"},He={acquireTokenRedirect:861,acquireTokenPopup:862,ssoSilent:863,acquireTokenSilent_authCode:864,handleRedirectPromise:865,acquireTokenByCode:866,acquireTokenSilent_silentFlow:61,logout:961,logoutPopup:962};var ee;(function(n){n.Redirect="redirect",n.Popup="popup",n.Silent="silent",n.None="none"})(ee||(ee={}));const Qd={scopes:Po},Wp="jwk",Ec="msal.db",Eb=1,wb=`${Ec}.keys`,Dt={Default:0,AccessToken:1,AccessTokenAndRefreshToken:2,RefreshToken:3,RefreshTokenAndNetwork:4,Skip:5},_b=[Dt.Default,Dt.Skip,Dt.RefreshTokenAndNetwork],bb="msal.browser.log.level",Ib="msal.browser.log.pii";/*! @azure/msal-browser v3.30.0 2025-08-05 */function Gi(n){return encodeURIComponent(xl(n).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"))}function oa(n){return Yp(n).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function xl(n){return Yp(new TextEncoder().encode(n))}function Yp(n){const e=Array.from(n,t=>String.fromCodePoint(t)).join("");return btoa(e)}/*! @azure/msal-browser v3.30.0 2025-08-05 */const Sb="RSASSA-PKCS1-v1_5",Jp="SHA-256",Rb=2048,kb=new Uint8Array([1,0,1]),Wd="0123456789abcdef",Yd=new Uint32Array(1),Ob="crypto_subtle_undefined",Dl={name:Sb,hash:Jp,modulusLength:Rb,publicExponent:kb};function Pb(n){if(!window)throw Y(ra);if(!window.crypto)throw Y(Tc);if(!n&&!window.crypto.subtle)throw Y(Tc,Ob)}async function Xp(n,e,t){e==null||e.addQueueMeasurement(_.Sha256Digest,t);const o=new TextEncoder().encode(n);return window.crypto.subtle.digest(Jp,o)}function Nb(n){return window.crypto.getRandomValues(n)}function Pa(){return window.crypto.getRandomValues(Yd),Yd[0]}function In(){const n=Date.now(),e=Pa()*1024+(Pa()&1023),t=new Uint8Array(16),r=Math.trunc(e/2**30),o=e&2**30-1,i=Pa();t[0]=n/2**40,t[1]=n/2**32,t[2]=n/2**24,t[3]=n/2**16,t[4]=n/2**8,t[5]=n,t[6]=112|r>>>8,t[7]=r,t[8]=128|o>>>24,t[9]=o>>>16,t[10]=o>>>8,t[11]=o,t[12]=i>>>24,t[13]=i>>>16,t[14]=i>>>8,t[15]=i;let s="";for(let a=0;a>>4),s+=Wd.charAt(t[a]&15),(a===3||a===5||a===7||a===9)&&(s+="-");return s}async function Mb(n,e){return window.crypto.subtle.generateKey(Dl,n,e)}async function Na(n){return window.crypto.subtle.exportKey(Wp,n)}async function xb(n,e,t){return window.crypto.subtle.importKey(Wp,n,Dl,e,t)}async function Db(n,e){return window.crypto.subtle.sign(Dl,n,e)}async function Zp(n){const e=await Xp(n),t=new Uint8Array(e);return oa(t)}/*! @azure/msal-browser v3.30.0 2025-08-05 */const Ll="storage_not_supported",Lb="stubbed_public_client_application_called",em="in_mem_redirect_unavailable";/*! @azure/msal-browser v3.30.0 2025-08-05 */const Ub={[Ll]:"Given storage configuration option was not supported.",[Lb]:"Stub instance of Public Client Application was called. If using msal-react, please ensure context is not used without a provider. For more visit: aka.ms/msaljs/browser-errors",[em]:"Redirect cannot be supported. In-memory storage was selected and storeAuthStateInCookie=false, which would cause the library to be unable to handle the incoming hash. If you would like to use the redirect API, please use session/localStorage or set storeAuthStateInCookie=true."};class Ul extends Fe{constructor(e,t){super(e,t),this.name="BrowserConfigurationAuthError",Object.setPrototypeOf(this,Ul.prototype)}}function Hl(n){return new Ul(n,Ub[n])}/*! @azure/msal-browser v3.30.0 2025-08-05 */function Hb(n){n.location.hash="",typeof n.history.replaceState=="function"&&n.history.replaceState(null,"",`${n.location.origin}${n.location.pathname}${n.location.search}`)}function Fb(n){const e=n.split("#");e.shift(),window.location.hash=e.length>0?e.join("#"):""}function Fl(){return window.parent!==window}function Bb(){return typeof window<"u"&&!!window.opener&&window.opener!==window&&typeof window.name=="string"&&window.name.indexOf(`${Ft.POPUP_NAME_PREFIX}.`)===0}function Bn(){return typeof window<"u"&&window.location?window.location.href.split("?")[0].split("#")[0]:""}function Kb(){const e=new ve(window.location.href).getUrlComponents();return`${e.Protocol}//${e.HostNameAndPort}/`}function qb(){if(ve.hashContainsKnownProperties(window.location.hash)&&Fl())throw Y(kp)}function $b(n){if(Fl()&&!n)throw Y(Rp)}function jb(){if(Bb())throw Y(Op)}function tm(){if(typeof window>"u")throw Y(ra)}function nm(n){if(!n)throw Y($p)}function Bl(n){tm(),qb(),jb(),nm(n)}function Jd(n,e){if(Bl(n),$b(e.system.allowRedirectInIframe),e.cache.cacheLocation===Ot.MemoryStorage&&!e.cache.storeAuthStateInCookie)throw Hl(em)}function rm(n){const e=document.createElement("link");e.rel="preconnect",e.href=new URL(n).origin,e.crossOrigin="anonymous",document.head.appendChild(e),window.setTimeout(()=>{try{document.head.removeChild(e)}catch{}},1e4)}function Gb(){return In()}/*! @azure/msal-browser v3.30.0 2025-08-05 */class As{navigateInternal(e,t){return As.defaultNavigateWindow(e,t)}navigateExternal(e,t){return As.defaultNavigateWindow(e,t)}static defaultNavigateWindow(e,t){return t.noHistory?window.location.replace(e):window.location.assign(e),new Promise(r=>{setTimeout(()=>{r(!0)},t.timeout)})}}/*! @azure/msal-browser v3.30.0 2025-08-05 */class Vb{async sendGetRequestAsync(e,t){let r,o={},i=0;const s=Xd(t);try{r=await fetch(e,{method:zd.GET,headers:s})}catch{throw Y(window.navigator.onLine?Dp:Ts)}o=Zd(r.headers);try{return i=r.status,{headers:o,body:await r.json(),status:i}}catch{throw Kd(Y(Ac),i,o)}}async sendPostRequestAsync(e,t){const r=t&&t.body||"",o=Xd(t);let i,s=0,a={};try{i=await fetch(e,{method:zd.POST,headers:o,body:r})}catch{throw Y(window.navigator.onLine?xp:Ts)}a=Zd(i.headers);try{return s=i.status,{headers:a,body:await i.json(),status:s}}catch{throw Kd(Y(Ac),s,a)}}}function Xd(n){try{const e=new Headers;if(!(n&&n.headers))return e;const t=n.headers;return Object.entries(t).forEach(([r,o])=>{e.append(r,o)}),e}catch{throw Y(zp)}}function Zd(n){try{const e={};return n.forEach((t,r)=>{e[r]=t}),e}catch{throw Y(Qp)}}/*! @azure/msal-browser v3.30.0 2025-08-05 */const zb=6e4,wc=1e4,Qb=3e4,Wb=2e3;function Yb({auth:n,cache:e,system:t,telemetry:r},o){const i={clientId:R.EMPTY_STRING,authority:`${R.DEFAULT_AUTHORITY}`,knownAuthorities:[],cloudDiscoveryMetadata:R.EMPTY_STRING,authorityMetadata:R.EMPTY_STRING,redirectUri:typeof window<"u"?Bn():"",postLogoutRedirectUri:R.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:qn.AAD,OIDCOptions:{serverResponseType:Ri.FRAGMENT,defaultScopes:[R.OPENID_SCOPE,R.PROFILE_SCOPE,R.OFFLINE_ACCESS_SCOPE]},azureCloudOptions:{azureCloudInstance:hl.None,tenant:R.EMPTY_STRING},skipAuthorityMetadataCache:!1,supportsNestedAppAuth:!1,instanceAware:!1},s={cacheLocation:Ot.SessionStorage,temporaryCacheLocation:Ot.SessionStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!!(e&&e.cacheLocation===Ot.LocalStorage),claimsBasedCachingEnabled:!1},a={loggerCallback:()=>{},logLevel:Ke.Info,piiLoggingEnabled:!1},l={...{...up,loggerOptions:a,networkClient:o?new Vb:db,navigationClient:new As,loadFrameTimeout:0,windowHashTimeout:(t==null?void 0:t.loadFrameTimeout)||zb,iframeHashTimeout:(t==null?void 0:t.loadFrameTimeout)||wc,navigateFrameWait:0,redirectNavigationTimeout:Qb,asyncPopups:!1,allowRedirectInIframe:!1,allowNativeBroker:!1,nativeBrokerHandshakeTimeout:(t==null?void 0:t.nativeBrokerHandshakeTimeout)||Wb,pollIntervalMilliseconds:Ft.DEFAULT_POLL_INTERVAL_MS},...t,loggerOptions:(t==null?void 0:t.loggerOptions)||a},u={application:{appName:R.EMPTY_STRING,appVersion:R.EMPTY_STRING},client:new pb};if((n==null?void 0:n.protocolMode)!==qn.OIDC&&(n!=null&&n.OIDCOptions)&&new hr(l.loggerOptions).warning(JSON.stringify(xe(np))),n!=null&&n.protocolMode&&n.protocolMode!==qn.AAD&&(l!=null&&l.allowNativeBroker))throw xe(rp);return{auth:{...i,...n,OIDCOptions:{...i.OIDCOptions,...n==null?void 0:n.OIDCOptions}},cache:{...s,...e},system:l,telemetry:{...u,...r}}}/*! @azure/msal-browser v3.30.0 2025-08-05 */const Jb="@azure/msal-browser",So="3.30.0";/*! @azure/msal-browser v3.30.0 2025-08-05 */class Kl{static loggerCallback(e,t){switch(e){case Ke.Error:console.error(t);return;case Ke.Info:console.info(t);return;case Ke.Verbose:console.debug(t);return;case Ke.Warning:console.warn(t);return;default:console.log(t);return}}constructor(e){var c;this.browserEnvironment=typeof window<"u",this.config=Yb(e,this.browserEnvironment);let t;try{t=window[Ot.SessionStorage]}catch{}const r=t==null?void 0:t.getItem(bb),o=(c=t==null?void 0:t.getItem(Ib))==null?void 0:c.toLowerCase(),i=o==="true"?!0:o==="false"?!1:void 0,s={...this.config.system.loggerOptions},a=r&&Object.keys(Ke).includes(r)?Ke[r]:void 0;a&&(s.loggerCallback=Kl.loggerCallback,s.logLevel=a),i!==void 0&&(s.piiLoggingEnabled=i),this.logger=new hr(s,Jb,So),this.available=!1}getConfig(){return this.config}getLogger(){return this.logger}isAvailable(){return this.available}isBrowserEnvironment(){return this.browserEnvironment}}/*! @azure/msal-browser v3.30.0 2025-08-05 */class Br extends Kl{getModuleName(){return Br.MODULE_NAME}getId(){return Br.ID}async initialize(){return this.available=typeof window<"u",this.available}}Br.MODULE_NAME="";Br.ID="StandardOperatingContext";/*! @azure/msal-browser v3.30.0 2025-08-05 */function _n(n){return new TextDecoder().decode(Xb(n))}function Xb(n){let e=n.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw Y(Gp)}const t=atob(e);return Uint8Array.from(t,r=>r.codePointAt(0)||0)}/*! @azure/msal-browser v3.30.0 2025-08-05 */class Zb{constructor(){this.dbName=Ec,this.version=Eb,this.tableName=wb,this.dbOpen=!1}async open(){return new Promise((e,t)=>{const r=window.indexedDB.open(this.dbName,this.version);r.addEventListener("upgradeneeded",o=>{o.target.result.createObjectStore(this.tableName)}),r.addEventListener("success",o=>{const i=o;this.db=i.target.result,this.dbOpen=!0,e()}),r.addEventListener("error",()=>t(Y(Ml)))})}closeConnection(){const e=this.db;e&&this.dbOpen&&(e.close(),this.dbOpen=!1)}async validateDbIsOpen(){if(!this.dbOpen)return this.open()}async getItem(e){return await this.validateDbIsOpen(),new Promise((t,r)=>{if(!this.db)return r(Y(Xr));const s=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).get(e);s.addEventListener("success",a=>{const c=a;this.closeConnection(),t(c.target.result)}),s.addEventListener("error",a=>{this.closeConnection(),r(a)})})}async setItem(e,t){return await this.validateDbIsOpen(),new Promise((r,o)=>{if(!this.db)return o(Y(Xr));const a=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).put(t,e);a.addEventListener("success",()=>{this.closeConnection(),r()}),a.addEventListener("error",c=>{this.closeConnection(),o(c)})})}async removeItem(e){return await this.validateDbIsOpen(),new Promise((t,r)=>{if(!this.db)return r(Y(Xr));const s=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).delete(e);s.addEventListener("success",()=>{this.closeConnection(),t()}),s.addEventListener("error",a=>{this.closeConnection(),r(a)})})}async getKeys(){return await this.validateDbIsOpen(),new Promise((e,t)=>{if(!this.db)return t(Y(Xr));const i=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).getAllKeys();i.addEventListener("success",s=>{const a=s;this.closeConnection(),e(a.target.result)}),i.addEventListener("error",s=>{this.closeConnection(),t(s)})})}async containsKey(e){return await this.validateDbIsOpen(),new Promise((t,r)=>{if(!this.db)return r(Y(Xr));const s=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).count(e);s.addEventListener("success",a=>{const c=a;this.closeConnection(),t(c.target.result===1)}),s.addEventListener("error",a=>{this.closeConnection(),r(a)})})}async deleteDatabase(){return this.db&&this.dbOpen&&this.closeConnection(),new Promise((e,t)=>{const r=window.indexedDB.deleteDatabase(Ec),o=setTimeout(()=>t(!1),200);r.addEventListener("success",()=>(clearTimeout(o),e(!0))),r.addEventListener("blocked",()=>(clearTimeout(o),e(!0))),r.addEventListener("error",()=>(clearTimeout(o),t(!1)))})}}/*! @azure/msal-browser v3.30.0 2025-08-05 */class _c{constructor(){this.cache=new Map}getItem(e){return this.cache.get(e)||null}setItem(e,t){this.cache.set(e,t)}removeItem(e){this.cache.delete(e)}getKeys(){const e=[];return this.cache.forEach((t,r)=>{e.push(r)}),e}containsKey(e){return this.cache.has(e)}clear(){this.cache.clear()}}/*! @azure/msal-browser v3.30.0 2025-08-05 */class eI{constructor(e){this.inMemoryCache=new _c,this.indexedDBCache=new Zb,this.logger=e}handleDatabaseAccessError(e){if(e instanceof Oi&&e.errorCode===Ml)this.logger.error("Could not access persistent storage. This may be caused by browser privacy features which block persistent storage in third-party contexts.");else throw e}async getItem(e){const t=this.inMemoryCache.getItem(e);if(!t)try{return this.logger.verbose("Queried item not found in in-memory cache, now querying persistent storage."),await this.indexedDBCache.getItem(e)}catch(r){this.handleDatabaseAccessError(r)}return t}async setItem(e,t){this.inMemoryCache.setItem(e,t);try{await this.indexedDBCache.setItem(e,t)}catch(r){this.handleDatabaseAccessError(r)}}async removeItem(e){this.inMemoryCache.removeItem(e);try{await this.indexedDBCache.removeItem(e)}catch(t){this.handleDatabaseAccessError(t)}}async getKeys(){const e=this.inMemoryCache.getKeys();if(e.length===0)try{return this.logger.verbose("In-memory cache is empty, now querying persistent storage."),await this.indexedDBCache.getKeys()}catch(t){this.handleDatabaseAccessError(t)}return e}async containsKey(e){const t=this.inMemoryCache.containsKey(e);if(!t)try{return this.logger.verbose("Key not found in in-memory cache, now querying persistent storage."),await this.indexedDBCache.containsKey(e)}catch(r){this.handleDatabaseAccessError(r)}return t}clearInMemory(){this.logger.verbose("Deleting in-memory keystore"),this.inMemoryCache.clear(),this.logger.verbose("In-memory keystore deleted")}async clearPersistent(){try{this.logger.verbose("Deleting persistent keystore");const e=await this.indexedDBCache.deleteDatabase();return e&&this.logger.verbose("Persistent keystore deleted"),e}catch(e){return this.handleDatabaseAccessError(e),!1}}}/*! @azure/msal-browser v3.30.0 2025-08-05 */class Ro{constructor(e,t,r){this.logger=e,Pb(r??!1),this.cache=new eI(this.logger),this.performanceClient=t}createNewGuid(){return In()}base64Encode(e){return xl(e)}base64Decode(e){return _n(e)}base64UrlEncode(e){return Gi(e)}encodeKid(e){return this.base64UrlEncode(JSON.stringify({kid:e}))}async getPublicKeyThumbprint(e){var u;const t=(u=this.performanceClient)==null?void 0:u.startMeasurement(_.CryptoOptsGetPublicKeyThumbprint,e.correlationId),r=await Mb(Ro.EXTRACTABLE,Ro.POP_KEY_USAGES),o=await Na(r.publicKey),i={e:o.e,kty:o.kty,n:o.n},s=eh(i),a=await this.hashString(s),c=await Na(r.privateKey),l=await xb(c,!1,["sign"]);return await this.cache.setItem(a,{privateKey:l,publicKey:r.publicKey,requestMethod:e.resourceRequestMethod,requestUri:e.resourceRequestUri}),t&&t.end({success:!0}),a}async removeTokenBindingKey(e){return await this.cache.removeItem(e),!await this.cache.containsKey(e)}async clearKeystore(){this.cache.clearInMemory();try{return await this.cache.clearPersistent(),!0}catch(e){return e instanceof Error?this.logger.error(`Clearing keystore failed with error: ${e.message}`):this.logger.error("Clearing keystore failed with unknown error"),!1}}async signJwt(e,t,r,o){var y;const i=(y=this.performanceClient)==null?void 0:y.startMeasurement(_.CryptoOptsSignJwt,o),s=await this.cache.getItem(t);if(!s)throw Y(Nl);const a=await Na(s.publicKey),c=eh(a),l=Gi(JSON.stringify({kid:t})),u=Rl.getShrHeaderString({...r==null?void 0:r.header,alg:a.alg,kid:l}),d=Gi(u);e.cnf={jwk:JSON.parse(c)};const h=Gi(JSON.stringify(e)),f=`${d}.${h}`,p=new TextEncoder().encode(f),v=await Db(s.privateKey,p),E=oa(new Uint8Array(v)),b=`${f}.${E}`;return i&&i.end({success:!0}),b}async hashString(e){return Zp(e)}}Ro.POP_KEY_USAGES=["sign","verify"];Ro.EXTRACTABLE=!0;function eh(n){return JSON.stringify(n,Object.keys(n).sort())}/*! @azure/msal-browser v3.30.0 2025-08-05 */class tI{constructor(){if(!window.localStorage)throw Hl(Ll)}getItem(e){return window.localStorage.getItem(e)}setItem(e,t){window.localStorage.setItem(e,t)}removeItem(e){window.localStorage.removeItem(e)}getKeys(){return Object.keys(window.localStorage)}containsKey(e){return window.localStorage.hasOwnProperty(e)}}/*! @azure/msal-browser v3.30.0 2025-08-05 */class nI{constructor(){if(!window.sessionStorage)throw Hl(Ll)}getItem(e){return window.sessionStorage.getItem(e)}setItem(e,t){window.sessionStorage.setItem(e,t)}removeItem(e){window.sessionStorage.removeItem(e)}getKeys(){return Object.keys(window.sessionStorage)}containsKey(e){return window.sessionStorage.hasOwnProperty(e)}}/*! @azure/msal-browser v3.30.0 2025-08-05 */function om(n,e){if(!e)return null;try{return nn.parseRequestState(n,e).libraryState.meta}catch{throw H(_o)}}/*! @azure/msal-browser v3.30.0 2025-08-05 */const rI=24*60*60*1e3;class oI{getItem(e){const t=`${encodeURIComponent(e)}`,r=document.cookie.split(";");for(let o=0;o{const o=decodeURIComponent(r).trim().split("=");t.push(o[0])}),t}containsKey(e){return this.getKeys().includes(e)}}function iI(n){const e=new Date;return new Date(e.getTime()+n*rI).toUTCString()}/*! @azure/msal-browser v3.30.0 2025-08-05 */class bc extends bo{constructor(e,t,r,o,i,s){super(e,r,o,i),this.cacheConfig=t,this.logger=o,this.internalStorage=new _c,this.browserStorage=this.setupBrowserStorage(this.cacheConfig.cacheLocation),this.temporaryCacheStorage=this.setupBrowserStorage(this.cacheConfig.temporaryCacheLocation),this.cookieStorage=new oI,t.cacheMigrationEnabled&&(this.migrateCacheEntries(),this.createKeyMaps()),this.performanceClient=s}setupBrowserStorage(e){try{switch(e){case Ot.LocalStorage:return new tI;case Ot.SessionStorage:return new nI;case Ot.MemoryStorage:default:break}}catch(t){this.logger.error(t)}return this.cacheConfig.cacheLocation=Ot.MemoryStorage,new _c}migrateCacheEntries(){const e=this.browserStorage.getItem(zt.VERSION);e&&this.logger.info(`MSAL.js was last initialized with version ${e}`),e!==So&&this.browserStorage.setItem(zt.VERSION,So);const t=`${R.CACHE_PREFIX}.${it.ID_TOKEN}`,r=`${R.CACHE_PREFIX}.${it.CLIENT_INFO}`,o=`${R.CACHE_PREFIX}.${it.ERROR}`,i=`${R.CACHE_PREFIX}.${it.ERROR_DESC}`,s=this.browserStorage.getItem(t),a=this.browserStorage.getItem(r),c=this.browserStorage.getItem(o),l=this.browserStorage.getItem(i),u=[s,a,c,l];[it.ID_TOKEN,it.CLIENT_INFO,it.ERROR,it.ERROR_DESC].forEach((h,f)=>{const C=u[f];C&&this.setTemporaryCache(h,C,!0)})}createKeyMaps(){this.logger.trace("BrowserCacheManager - createKeyMaps called.");const e=this.cryptoImpl.createNewGuid(),t=this.getItem(zt.ACCOUNT_KEYS),r=this.getItem(`${zt.TOKEN_KEYS}.${this.clientId}`);if(t&&r){this.logger.verbose("BrowserCacheManager:createKeyMaps - account and token key maps already exist, skipping migration.");return}this.browserStorage.getKeys().forEach(i=>{if(this.isCredentialKey(i)){const s=this.getItem(i);if(s){const a=this.validateAndParseJson(s);if(a&&a.hasOwnProperty("credentialType"))switch(a.credentialType){case ae.ID_TOKEN:if(Pd(a)){this.logger.trace("BrowserCacheManager:createKeyMaps - idToken found, saving key to token key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - idToken with key: ${i} found, saving key to token key map`);const c=a,l=this.updateCredentialCacheKey(i,c,e);this.addTokenKey(l,ae.ID_TOKEN,e);return}else this.logger.trace("BrowserCacheManager:createKeyMaps - key found matching idToken schema with value containing idToken credentialType field but value failed IdTokenEntity validation, skipping."),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - failed idToken validation on key: ${i}`);break;case ae.ACCESS_TOKEN:case ae.ACCESS_TOKEN_WITH_AUTH_SCHEME:if(Od(a)){this.logger.trace("BrowserCacheManager:createKeyMaps - accessToken found, saving key to token key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - accessToken with key: ${i} found, saving key to token key map`);const c=a,l=this.updateCredentialCacheKey(i,c,e);this.addTokenKey(l,ae.ACCESS_TOKEN,e);return}else this.logger.trace("BrowserCacheManager:createKeyMaps - key found matching accessToken schema with value containing accessToken credentialType field but value failed AccessTokenEntity validation, skipping."),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - failed accessToken validation on key: ${i}`);break;case ae.REFRESH_TOKEN:if(Nd(a)){this.logger.trace("BrowserCacheManager:createKeyMaps - refreshToken found, saving key to token key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - refreshToken with key: ${i} found, saving key to token key map`);const c=a,l=this.updateCredentialCacheKey(i,c,e);this.addTokenKey(l,ae.REFRESH_TOKEN,e);return}else this.logger.trace("BrowserCacheManager:createKeyMaps - key found matching refreshToken schema with value containing refreshToken credentialType field but value failed RefreshTokenEntity validation, skipping."),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - failed refreshToken validation on key: ${i}`);break}}}if(this.isAccountKey(i)){const s=this.getItem(i);if(s){const a=this.validateAndParseJson(s);a&&rt.isAccountEntity(a)&&(this.logger.trace("BrowserCacheManager:createKeyMaps - account found, saving key to account key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - account with key: ${i} found, saving key to account key map`),this.addAccountKeyToMap(i,e))}}})}validateAndParseJson(e){try{const t=JSON.parse(e);return t&&typeof t=="object"?t:null}catch{return null}}getItem(e){return this.browserStorage.getItem(e)}setItem(e,t,r){let o=[];for(let s=0;s<=20;s++)try{this.browserStorage.setItem(e,t),s>0&&this.removeAccessTokenKeys(o.slice(0,s),r);break}catch(a){const c=lp(a);if(c.errorCode===Al&&s<20){if(o.length||(e===`${zt.TOKEN_KEYS}.${this.clientId}`?o=JSON.parse(t).accessToken:o=this.getTokenKeys().accessToken),o.length<=s)throw c;this.removeAccessToken(o[s],r,!1)}else throw c}}getAccount(e,t,r){this.logger.trace("BrowserCacheManager.getAccount called");const o=this.getCachedAccountEntity(e,t);return this.updateOutdatedCachedAccount(e,o,t,r)}getCachedAccountEntity(e,t){const r=this.getItem(e);if(!r)return this.removeAccountKeyFromMap(e,t),null;const o=this.validateAndParseJson(r);return!o||!rt.isAccountEntity(o)?null:bo.toObject(new rt,o)}setAccount(e,t){this.logger.trace("BrowserCacheManager.setAccount called");const r=e.generateAccountKey();e.lastUpdatedAt=Date.now().toString(),this.setItem(r,JSON.stringify(e),t),this.addAccountKeyToMap(r,t)}getAccountKeys(){this.logger.trace("BrowserCacheManager.getAccountKeys called");const e=this.getItem(zt.ACCOUNT_KEYS);return e?JSON.parse(e):(this.logger.verbose("BrowserCacheManager.getAccountKeys - No account keys found"),[])}addAccountKeyToMap(e,t){this.logger.trace("BrowserCacheManager.addAccountKeyToMap called"),this.logger.tracePii(`BrowserCacheManager.addAccountKeyToMap called with key: ${e}`);const r=this.getAccountKeys();r.indexOf(e)===-1?(r.push(e),this.setItem(zt.ACCOUNT_KEYS,JSON.stringify(r),t),this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key added")):this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key already exists in map")}removeAccountKeyFromMap(e,t){this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap called"),this.logger.tracePii(`BrowserCacheManager.removeAccountKeyFromMap called with key: ${e}`);const r=this.getAccountKeys(),o=r.indexOf(e);if(o>-1){if(r.splice(o,1),r.length===0){this.removeItem(zt.ACCOUNT_KEYS);return}else this.setItem(zt.ACCOUNT_KEYS,JSON.stringify(r),t);this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap account key removed")}else this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap key not found in existing map")}async removeAccount(e,t){super.removeAccount(e,t),this.removeAccountKeyFromMap(e,t)}removeOutdatedAccount(e,t){this.removeItem(e),this.removeAccountKeyFromMap(e,t)}removeIdToken(e,t){super.removeIdToken(e,t),this.removeTokenKey(e,ae.ID_TOKEN,t)}removeAccessToken(e,t,r=!0){var o;super.removeAccessToken(e,t),(o=this.performanceClient)==null||o.incrementFields({accessTokensRemoved:1},t),r&&this.removeTokenKey(e,ae.ACCESS_TOKEN,t)}removeAccessTokenKeys(e,t){this.logger.trace("removeAccessTokenKey called");const r=this.getTokenKeys();let o=0;if(e.forEach(i=>{const s=r.accessToken.indexOf(i);s>-1&&(r.accessToken.splice(s,1),o++)}),o>0){this.logger.info(`removed ${o} accessToken keys from tokenKeys map`),this.setTokenKeys(r,t);return}}removeRefreshToken(e,t){super.removeRefreshToken(e,t),this.removeTokenKey(e,ae.REFRESH_TOKEN,t)}getTokenKeys(){this.logger.trace("BrowserCacheManager.getTokenKeys called");const e=this.getItem(`${zt.TOKEN_KEYS}.${this.clientId}`);if(e){const t=this.validateAndParseJson(e);if(t&&t.hasOwnProperty("idToken")&&t.hasOwnProperty("accessToken")&&t.hasOwnProperty("refreshToken"))return t;this.logger.error("BrowserCacheManager.getTokenKeys - Token keys found but in an unknown format. Returning empty key map.")}else this.logger.verbose("BrowserCacheManager.getTokenKeys - No token keys found");return{idToken:[],accessToken:[],refreshToken:[]}}setTokenKeys(e,t){if(e.idToken.length===0&&e.accessToken.length===0&&e.refreshToken.length===0){this.removeItem(`${zt.TOKEN_KEYS}.${this.clientId}`);return}else this.setItem(`${zt.TOKEN_KEYS}.${this.clientId}`,JSON.stringify(e),t)}addTokenKey(e,t,r){this.logger.trace("BrowserCacheManager addTokenKey called");const o=this.getTokenKeys();switch(t){case ae.ID_TOKEN:o.idToken.indexOf(e)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - idToken added to map"),o.idToken.push(e));break;case ae.ACCESS_TOKEN:const i=o.accessToken.indexOf(e);i!==-1&&o.accessToken.splice(i,1),this.logger.trace(`access token ${i===-1?"added to":"updated in"} map`),o.accessToken.push(e);break;case ae.REFRESH_TOKEN:o.refreshToken.indexOf(e)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - refreshToken added to map"),o.refreshToken.push(e));break;default:throw this.logger.error(`BrowserCacheManager:addTokenKey - CredentialType provided invalid. CredentialType: ${t}`),H(gc)}this.setTokenKeys(o,r)}removeTokenKey(e,t,r,o=this.getTokenKeys()){switch(this.logger.trace("BrowserCacheManager removeTokenKey called"),t){case ae.ID_TOKEN:this.logger.infoPii(`BrowserCacheManager: removeTokenKey - attempting to remove idToken with key: ${e} from map`);const i=o.idToken.indexOf(e);i>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - idToken removed from map"),o.idToken.splice(i,1)):this.logger.info("BrowserCacheManager: removeTokenKey - idToken does not exist in map. Either it was previously removed or it was never added.");break;case ae.ACCESS_TOKEN:this.logger.infoPii(`BrowserCacheManager: removeTokenKey - attempting to remove accessToken with key: ${e} from map`);const s=o.accessToken.indexOf(e);s>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - accessToken removed from map"),o.accessToken.splice(s,1)):this.logger.info("BrowserCacheManager: removeTokenKey - accessToken does not exist in map. Either it was previously removed or it was never added.");break;case ae.REFRESH_TOKEN:this.logger.infoPii(`BrowserCacheManager: removeTokenKey - attempting to remove refreshToken with key: ${e} from map`);const a=o.refreshToken.indexOf(e);a>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken removed from map"),o.refreshToken.splice(a,1)):this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken does not exist in map. Either it was previously removed or it was never added.");break;default:throw this.logger.error(`BrowserCacheManager:removeTokenKey - CredentialType provided invalid. CredentialType: ${t}`),H(gc)}this.setTokenKeys(o,r)}getIdTokenCredential(e,t){const r=this.getItem(e);if(!r)return this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeIdToken(e,t),null;const o=this.validateAndParseJson(r);return!o||!Pd(o)?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),o)}setIdTokenCredential(e,t){this.logger.trace("BrowserCacheManager.setIdTokenCredential called");const r=to(e);e.lastUpdatedAt=Date.now().toString(),this.setItem(r,JSON.stringify(e),t),this.addTokenKey(r,ae.ID_TOKEN,t)}getAccessTokenCredential(e,t){const r=this.getItem(e);if(!r)return this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeTokenKey(e,ae.ACCESS_TOKEN,t),null;const o=this.validateAndParseJson(r);return!o||!Od(o)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),o)}setAccessTokenCredential(e,t){this.logger.trace("BrowserCacheManager.setAccessTokenCredential called");const r=to(e);e.lastUpdatedAt=Date.now().toString(),this.setItem(r,JSON.stringify(e),t),this.addTokenKey(r,ae.ACCESS_TOKEN,t)}getRefreshTokenCredential(e,t){const r=this.getItem(e);if(!r)return this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeTokenKey(e,ae.REFRESH_TOKEN,t),null;const o=this.validateAndParseJson(r);return!o||!Nd(o)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),o)}setRefreshTokenCredential(e,t){this.logger.trace("BrowserCacheManager.setRefreshTokenCredential called");const r=to(e);e.lastUpdatedAt=Date.now().toString(),this.setItem(r,JSON.stringify(e),t),this.addTokenKey(r,ae.REFRESH_TOKEN,t)}getAppMetadata(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null;const r=this.validateAndParseJson(t);return!r||!Qw(e,r)?(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),r)}setAppMetadata(e,t){this.logger.trace("BrowserCacheManager.setAppMetadata called");const r=zw(e);this.setItem(r,JSON.stringify(e),t)}getServerTelemetry(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null;const r=this.validateAndParseJson(t);return!r||!Gw(e,r)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),r)}setServerTelemetry(e,t,r){this.logger.trace("BrowserCacheManager.setServerTelemetry called"),this.setItem(e,JSON.stringify(t),r)}getAuthorityMetadata(e){const t=this.internalStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAuthorityMetadata: called, no cache hit"),null;const r=this.validateAndParseJson(t);return r&&Ww(e,r)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),r):null}getAuthorityMetadataKeys(){return this.internalStorage.getKeys().filter(t=>this.isAuthorityMetadata(t))}setWrapperMetadata(e,t){this.internalStorage.setItem(ji.WRAPPER_SKU,e),this.internalStorage.setItem(ji.WRAPPER_VER,t)}getWrapperMetadata(){const e=this.internalStorage.getItem(ji.WRAPPER_SKU)||R.EMPTY_STRING,t=this.internalStorage.getItem(ji.WRAPPER_VER)||R.EMPTY_STRING;return[e,t]}setAuthorityMetadata(e,t){this.logger.trace("BrowserCacheManager.setAuthorityMetadata called"),this.internalStorage.setItem(e,JSON.stringify(t))}getActiveAccount(e){const t=this.generateCacheKey(it.ACTIVE_ACCOUNT_FILTERS),r=this.getItem(t);if(!r){this.logger.trace("BrowserCacheManager.getActiveAccount: No active account filters cache schema found, looking for legacy schema");const i=this.generateCacheKey(it.ACTIVE_ACCOUNT),s=this.getItem(i);if(!s)return this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null;const a=this.getAccountInfoFilteredBy({localAccountId:s},e);return a?(this.logger.trace("BrowserCacheManager.getActiveAccount: Legacy active account cache schema found"),this.logger.trace("BrowserCacheManager.getActiveAccount: Adding active account filters cache schema"),this.setActiveAccount(a,e),a):null}const o=this.validateAndParseJson(r);return o?(this.logger.trace("BrowserCacheManager.getActiveAccount: Active account filters schema found"),this.getAccountInfoFilteredBy({homeAccountId:o.homeAccountId,localAccountId:o.localAccountId,tenantId:o.tenantId},e)):(this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null)}setActiveAccount(e,t){const r=this.generateCacheKey(it.ACTIVE_ACCOUNT_FILTERS),o=this.generateCacheKey(it.ACTIVE_ACCOUNT);if(e){this.logger.verbose("setActiveAccount: Active account set");const i={homeAccountId:e.homeAccountId,localAccountId:e.localAccountId,tenantId:e.tenantId,lastUpdatedAt:Date.now().toString()};this.setItem(r,JSON.stringify(i),t),this.setItem(o,e.localAccountId,t)}else this.logger.verbose("setActiveAccount: No account passed, active account not set"),this.browserStorage.removeItem(r),this.browserStorage.removeItem(o)}getThrottlingCache(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null;const r=this.validateAndParseJson(t);return!r||!Vw(e,r)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),r)}setThrottlingCache(e,t,r){this.logger.trace("BrowserCacheManager.setThrottlingCache called"),this.setItem(e,JSON.stringify(t),r)}getTemporaryCache(e,t){const r=t?this.generateCacheKey(e):e;if(this.cacheConfig.storeAuthStateInCookie){const i=this.cookieStorage.getItem(r);if(i)return this.logger.trace("BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies"),i}const o=this.temporaryCacheStorage.getItem(r);if(!o){if(this.cacheConfig.cacheLocation===Ot.LocalStorage){const i=this.browserStorage.getItem(r);if(i)return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item found in local storage"),i}return this.logger.trace("BrowserCacheManager.getTemporaryCache: No cache item found in local storage"),null}return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item returned"),o}setTemporaryCache(e,t,r){const o=r?this.generateCacheKey(e):e;this.temporaryCacheStorage.setItem(o,t),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie"),this.cookieStorage.setItem(o,t,void 0,this.cacheConfig.secureCookies))}removeItem(e){this.browserStorage.removeItem(e)}removeTemporaryItem(e){this.temporaryCacheStorage.removeItem(e),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.removeItem: storeAuthStateInCookie is true, clearing item cookie"),this.cookieStorage.removeItem(e))}getKeys(){return this.browserStorage.getKeys()}async clear(e){await this.removeAllAccounts(e),this.removeAppMetadata(e),this.temporaryCacheStorage.getKeys().forEach(t=>{(t.indexOf(R.CACHE_PREFIX)!==-1||t.indexOf(this.clientId)!==-1)&&this.removeTemporaryItem(t)}),this.browserStorage.getKeys().forEach(t=>{(t.indexOf(R.CACHE_PREFIX)!==-1||t.indexOf(this.clientId)!==-1)&&this.browserStorage.removeItem(t)}),this.internalStorage.clear()}async clearTokensAndKeysWithClaims(e,t){e.addQueueMeasurement(_.ClearTokensAndKeysWithClaims,t);const r=this.getTokenKeys();let o=0;r.accessToken.forEach(i=>{const s=this.getAccessTokenCredential(i,t);s!=null&&s.requestedClaimsHash&&i.includes(s.requestedClaimsHash.toLowerCase())&&(this.removeAccessToken(i,t),o++)}),o>0&&this.logger.warning(`${o} access tokens with claims in the cache keys have been removed from the cache.`)}generateCacheKey(e){return this.validateAndParseJson(e)?JSON.stringify(e):tn.startsWith(e,R.CACHE_PREFIX)||tn.startsWith(e,it.ADAL_ID_TOKEN)?e:`${R.CACHE_PREFIX}.${this.clientId}.${e}`}generateAuthorityKey(e){const{libraryState:{id:t}}=nn.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${ke.AUTHORITY}.${t}`)}generateNonceKey(e){const{libraryState:{id:t}}=nn.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${ke.NONCE_IDTOKEN}.${t}`)}generateStateKey(e){const{libraryState:{id:t}}=nn.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${ke.REQUEST_STATE}.${t}`)}getCachedAuthority(e){const t=this.generateStateKey(e),r=this.getTemporaryCache(t);if(!r)return null;const o=this.generateAuthorityKey(r);return this.getTemporaryCache(o)}updateCacheEntries(e,t,r,o,i){this.logger.trace("BrowserCacheManager.updateCacheEntries called");const s=this.generateStateKey(e);this.setTemporaryCache(s,e,!1);const a=this.generateNonceKey(e);this.setTemporaryCache(a,t,!1);const c=this.generateAuthorityKey(e);if(this.setTemporaryCache(c,r,!1),i){const l={credential:i.homeAccountId,type:Kt.HOME_ACCOUNT_ID};this.setTemporaryCache(ke.CCS_CREDENTIAL,JSON.stringify(l),!0)}else if(o){const l={credential:o,type:Kt.UPN};this.setTemporaryCache(ke.CCS_CREDENTIAL,JSON.stringify(l),!0)}}resetRequestCache(e){this.logger.trace("BrowserCacheManager.resetRequestCache called"),e&&(this.temporaryCacheStorage.getKeys().forEach(t=>{t.indexOf(e)!==-1&&this.removeTemporaryItem(t)}),this.removeTemporaryItem(this.generateStateKey(e)),this.removeTemporaryItem(this.generateNonceKey(e)),this.removeTemporaryItem(this.generateAuthorityKey(e))),this.removeTemporaryItem(this.generateCacheKey(ke.REQUEST_PARAMS)),this.removeTemporaryItem(this.generateCacheKey(ke.ORIGIN_URI)),this.removeTemporaryItem(this.generateCacheKey(ke.URL_HASH)),this.removeTemporaryItem(this.generateCacheKey(ke.CORRELATION_ID)),this.removeTemporaryItem(this.generateCacheKey(ke.CCS_CREDENTIAL)),this.removeTemporaryItem(this.generateCacheKey(ke.NATIVE_REQUEST)),this.setInteractionInProgress(!1)}cleanRequestByState(e){if(this.logger.trace("BrowserCacheManager.cleanRequestByState called"),e){const t=this.generateStateKey(e),r=this.temporaryCacheStorage.getItem(t);this.logger.infoPii(`BrowserCacheManager.cleanRequestByState: Removing temporary cache items for state: ${r}`),this.resetRequestCache(r||R.EMPTY_STRING)}}cleanRequestByInteractionType(e){this.logger.trace("BrowserCacheManager.cleanRequestByInteractionType called"),this.temporaryCacheStorage.getKeys().forEach(t=>{if(t.indexOf(ke.REQUEST_STATE)===-1)return;const r=this.temporaryCacheStorage.getItem(t);if(!r)return;const o=om(this.cryptoImpl,r);o&&o.interactionType===e&&(this.logger.infoPii(`BrowserCacheManager.cleanRequestByInteractionType: Removing temporary cache items for state: ${r}`),this.resetRequestCache(r))}),this.setInteractionInProgress(!1)}cacheCodeRequest(e){this.logger.trace("BrowserCacheManager.cacheCodeRequest called");const t=xl(JSON.stringify(e));this.setTemporaryCache(ke.REQUEST_PARAMS,t,!0)}getCachedRequest(e){this.logger.trace("BrowserCacheManager.getCachedRequest called");const t=this.getTemporaryCache(ke.REQUEST_PARAMS,!0);if(!t)throw Y(Np);let r;try{r=JSON.parse(_n(t))}catch(o){throw this.logger.errorPii(`Attempted to parse: ${t}`),this.logger.error(`Parsing cached token request threw with error: ${o}`),Y(Mp)}if(this.removeTemporaryItem(this.generateCacheKey(ke.REQUEST_PARAMS)),!r.authority){const o=this.generateAuthorityKey(e),i=this.getTemporaryCache(o);if(!i)throw Y(Pl);r.authority=i}return r}getCachedNativeRequest(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");const e=this.getTemporaryCache(ke.NATIVE_REQUEST,!0);if(!e)return this.logger.trace("BrowserCacheManager.getCachedNativeRequest: No cached native request found"),null;const t=this.validateAndParseJson(e);return t||(this.logger.error("BrowserCacheManager.getCachedNativeRequest: Unable to parse native request"),null)}isInteractionInProgress(e){const t=this.getInteractionInProgress();return e?t===this.clientId:!!t}getInteractionInProgress(){const e=`${R.CACHE_PREFIX}.${ke.INTERACTION_STATUS_KEY}`;return this.getTemporaryCache(e,!1)}setInteractionInProgress(e){const t=`${R.CACHE_PREFIX}.${ke.INTERACTION_STATUS_KEY}`;if(e){if(this.getInteractionInProgress())throw Y(_p);this.setTemporaryCache(t,this.clientId,!1)}else!e&&this.getInteractionInProgress()===this.clientId&&this.removeTemporaryItem(t)}getLegacyLoginHint(){const e=this.getTemporaryCache(it.ADAL_ID_TOKEN);e&&(this.browserStorage.removeItem(it.ADAL_ID_TOKEN),this.logger.verbose("Cached ADAL id token retrieved."));const t=this.getTemporaryCache(it.ID_TOKEN,!0);t&&(this.browserStorage.removeItem(this.generateCacheKey(it.ID_TOKEN)),this.logger.verbose("Cached MSAL.js v1 id token retrieved"));const r=t||e;if(r){const o=qr(r,_n);if(o.preferred_username)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 preferred_username as loginHint"),o.preferred_username;if(o.upn)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 upn as loginHint"),o.upn;this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, however, no account hint claim found. Enable preferred_username or upn id token claim to get SSO.")}return null}updateCredentialCacheKey(e,t,r){const o=to(t);if(e!==o){const i=this.getItem(e);if(i)return this.browserStorage.removeItem(e),this.setItem(o,i,r),this.logger.verbose(`Updated an outdated ${t.credentialType} cache key`),o;this.logger.error(`Attempted to update an outdated ${t.credentialType} cache key but no item matching the outdated key was found in storage`)}return e}async hydrateCache(e,t){var a,c,l;const r=Ws((a=e.account)==null?void 0:a.homeAccountId,(c=e.account)==null?void 0:c.environment,e.idToken,this.clientId,e.tenantId);let o;t.claims&&(o=await this.cryptoImpl.hashString(t.claims));const i=Ys((l=e.account)==null?void 0:l.homeAccountId,e.account.environment,e.accessToken,this.clientId,e.tenantId,e.scopes.join(" "),e.expiresOn?e.expiresOn.getTime()/1e3:0,e.extExpiresOn?e.extExpiresOn.getTime()/1e3:0,_n,void 0,e.tokenType,void 0,t.sshKid,t.claims,o),s={idToken:r,accessToken:i};return this.saveCacheRecord(s,e.correlationId)}async saveCacheRecord(e,t,r){try{await super.saveCacheRecord(e,t,r)}catch(o){if(o instanceof co&&this.performanceClient&&t)try{const i=this.getTokenKeys();this.performanceClient.addFields({cacheRtCount:i.refreshToken.length,cacheIdCount:i.idToken.length,cacheAtCount:i.accessToken.length},t)}catch{}throw o}}}const sI=(n,e)=>{const t={cacheLocation:Ot.MemoryStorage,temporaryCacheLocation:Ot.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};return new bc(n,t,gs,e)};/*! @azure/msal-browser v3.30.0 2025-08-05 */function aI(n,e,t,r,o){return n.verbose("getAllAccounts called"),t?e.getAllAccounts(r,o):[]}function cI(n,e,t,r){if(e.trace("getAccount called"),Object.keys(n).length===0)return e.warning("getAccount: No accountFilter provided"),null;const o=t.getAccountInfoFilteredBy(n,r);return o?(e.verbose("getAccount: Account matching provided filter found, returning"),o):(e.verbose("getAccount: No matching account found, returning null"),null)}function lI(n,e,t,r){if(e.trace("getAccountByUsername called"),!n)return e.warning("getAccountByUsername: No username provided"),null;const o=t.getAccountInfoFilteredBy({username:n},r);return o?(e.verbose("getAccountByUsername: Account matching username found, returning"),e.verbosePii(`getAccountByUsername: Returning signed-in accounts matching username: ${n}`),o):(e.verbose("getAccountByUsername: No matching account found, returning null"),null)}function uI(n,e,t,r){if(e.trace("getAccountByHomeId called"),!n)return e.warning("getAccountByHomeId: No homeAccountId provided"),null;const o=t.getAccountInfoFilteredBy({homeAccountId:n},r);return o?(e.verbose("getAccountByHomeId: Account matching homeAccountId found, returning"),e.verbosePii(`getAccountByHomeId: Returning signed-in accounts matching homeAccountId: ${n}`),o):(e.verbose("getAccountByHomeId: No matching account found, returning null"),null)}function dI(n,e,t,r){if(e.trace("getAccountByLocalId called"),!n)return e.warning("getAccountByLocalId: No localAccountId provided"),null;const o=t.getAccountInfoFilteredBy({localAccountId:n},r);return o?(e.verbose("getAccountByLocalId: Account matching localAccountId found, returning"),e.verbosePii(`getAccountByLocalId: Returning signed-in accounts matching localAccountId: ${n}`),o):(e.verbose("getAccountByLocalId: No matching account found, returning null"),null)}function hI(n,e,t){e.setActiveAccount(n,t)}function fI(n,e){return n.getActiveAccount(e)}/*! @azure/msal-browser v3.30.0 2025-08-05 */const oe={INITIALIZE_START:"msal:initializeStart",INITIALIZE_END:"msal:initializeEnd",ACCOUNT_ADDED:"msal:accountAdded",ACCOUNT_REMOVED:"msal:accountRemoved",ACTIVE_ACCOUNT_CHANGED:"msal:activeAccountChanged",LOGIN_START:"msal:loginStart",LOGIN_SUCCESS:"msal:loginSuccess",LOGIN_FAILURE:"msal:loginFailure",ACQUIRE_TOKEN_START:"msal:acquireTokenStart",ACQUIRE_TOKEN_SUCCESS:"msal:acquireTokenSuccess",ACQUIRE_TOKEN_FAILURE:"msal:acquireTokenFailure",ACQUIRE_TOKEN_NETWORK_START:"msal:acquireTokenFromNetworkStart",SSO_SILENT_START:"msal:ssoSilentStart",SSO_SILENT_SUCCESS:"msal:ssoSilentSuccess",SSO_SILENT_FAILURE:"msal:ssoSilentFailure",ACQUIRE_TOKEN_BY_CODE_START:"msal:acquireTokenByCodeStart",ACQUIRE_TOKEN_BY_CODE_SUCCESS:"msal:acquireTokenByCodeSuccess",ACQUIRE_TOKEN_BY_CODE_FAILURE:"msal:acquireTokenByCodeFailure",HANDLE_REDIRECT_START:"msal:handleRedirectStart",HANDLE_REDIRECT_END:"msal:handleRedirectEnd",POPUP_OPENED:"msal:popupOpened",LOGOUT_START:"msal:logoutStart",LOGOUT_SUCCESS:"msal:logoutSuccess",LOGOUT_FAILURE:"msal:logoutFailure",LOGOUT_END:"msal:logoutEnd",RESTORE_FROM_BFCACHE:"msal:restoreFromBFCache"};/*! @azure/msal-browser v3.30.0 2025-08-05 */class gI{constructor(e){this.eventCallbacks=new Map,this.logger=e||new hr({})}addEventCallback(e,t,r){if(typeof window<"u"){const o=r||Gb();return this.eventCallbacks.has(o)?(this.logger.error(`Event callback with id: ${o} is already registered. Please provide a unique id or remove the existing callback and try again.`),null):(this.eventCallbacks.set(o,[e,t||[]]),this.logger.verbose(`Event callback registered with id: ${o}`),o)}return null}removeEventCallback(e){this.eventCallbacks.delete(e),this.logger.verbose(`Event callback ${e} removed.`)}emitEvent(e,t,r,o){if(typeof window<"u"){const i={eventType:e,interactionType:t||null,payload:r||null,error:o||null,timestamp:Date.now()};this.eventCallbacks.forEach(([s,a],c)=>{(a.length===0||a.includes(e))&&(this.logger.verbose(`Emitting event to callback ${c}: ${e}`),s.apply(null,[i]))})}}}/*! @azure/msal-browser v3.30.0 2025-08-05 */class im{constructor(e,t,r,o,i,s,a,c,l){this.config=e,this.browserStorage=t,this.browserCrypto=r,this.networkClient=this.config.system.networkClient,this.eventHandler=i,this.navigationClient=s,this.nativeMessageHandler=c,this.correlationId=l||In(),this.logger=o.clone(Ft.MSAL_SKU,So,this.correlationId),this.performanceClient=a}async clearCacheOnLogout(e){if(e){rt.accountInfoIsEqual(e,this.browserStorage.getActiveAccount(this.correlationId),!1)&&(this.logger.verbose("Setting active account to null"),this.browserStorage.setActiveAccount(null,this.correlationId));try{await this.browserStorage.removeAccount(rt.generateAccountCacheKey(e),this.correlationId),this.logger.verbose("Cleared cache items belonging to the account provided in the logout request.")}catch{this.logger.error("Account provided in logout request was not found. Local cache unchanged.")}}else try{this.logger.verbose("No account provided in logout request, clearing all cache items.",this.correlationId),await this.browserStorage.clear(this.correlationId),await this.browserCrypto.clearKeystore()}catch{this.logger.error("Attempted to clear all MSAL cache items and failed. Local cache unchanged.")}}getRedirectUri(e){this.logger.verbose("getRedirectUri called");const t=e||this.config.auth.redirectUri;return ve.getAbsoluteUrl(t,Bn())}initializeServerTelemetryManager(e,t){this.logger.verbose("initializeServerTelemetryManager called");const r={clientId:this.config.auth.clientId,correlationId:this.correlationId,apiId:e,forceRefresh:t||!1,wrapperSKU:this.browserStorage.getWrapperMetadata()[0],wrapperVer:this.browserStorage.getWrapperMetadata()[1]};return new fi(r,this.browserStorage)}async getDiscoveredAuthority(e){const{account:t}=e,r=e.requestExtraQueryParameters&&e.requestExtraQueryParameters.hasOwnProperty("instance_aware")?e.requestExtraQueryParameters.instance_aware:void 0;this.performanceClient.addQueueMeasurement(_.StandardInteractionClientGetDiscoveredAuthority,this.correlationId);const o={protocolMode:this.config.auth.protocolMode,OIDCOptions:this.config.auth.OIDCOptions,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},i=e.requestAuthority||this.config.auth.authority,s=r!=null&&r.length?r==="true":this.config.auth.instanceAware,a=t&&s?this.config.auth.authority.replace(ve.getDomainFromUrl(i),t.environment):i,c=pt.generateAuthority(a,e.requestAzureCloudOptions||this.config.auth.azureCloudOptions),l=await q(fp,_.AuthorityFactoryCreateDiscoveredInstance,this.logger,this.performanceClient,this.correlationId)(c,this.config.system.networkClient,this.browserStorage,o,this.logger,this.correlationId,this.performanceClient);if(t&&!l.isAlias(t.environment))throw xe(op);return l}}/*! @azure/msal-browser v3.30.0 2025-08-05 */const pI=32;async function mI(n,e,t){n.addQueueMeasurement(_.GeneratePkceCodes,t);const r=$r(yI,_.GenerateCodeVerifier,e,n,t)(n,e,t),o=await q(CI,_.GenerateCodeChallengeFromVerifier,e,n,t)(r,n,e,t);return{verifier:r,challenge:o}}function yI(n,e,t){try{const r=new Uint8Array(pI);return $r(Nb,_.GetRandomValues,e,n,t)(r),oa(r)}catch{throw Y(kl)}}async function CI(n,e,t,r){e.addQueueMeasurement(_.GenerateCodeChallengeFromVerifier,r);try{const o=await q(Xp,_.Sha256Digest,t,e,r)(n,e,r);return oa(new Uint8Array(o))}catch{throw Y(kl)}}/*! @azure/msal-browser v3.30.0 2025-08-05 */async function ql(n,e,t,r){t.addQueueMeasurement(_.InitializeBaseRequest,n.correlationId);const o=n.authority||e.auth.authority,i=[...n&&n.scopes||[]],s={...n,correlationId:n.correlationId,authority:o,scopes:i};if(!s.authenticationScheme)s.authenticationScheme=Ne.BEARER,r.verbose(`Authentication Scheme wasn't explicitly set in request, defaulting to "Bearer" request`);else{if(s.authenticationScheme===Ne.SSH){if(!n.sshJwk)throw xe(Js);if(!n.sshKid)throw xe(tp)}r.verbose(`Authentication Scheme set to "${s.authenticationScheme}" as configured in Auth request`)}return e.cache.claimsBasedCachingEnabled&&n.claims&&!tn.isEmptyObj(n.claims)&&(s.requestedClaimsHash=await Zp(n.claims)),s}async function vI(n,e,t,r,o){r.addQueueMeasurement(_.InitializeSilentRequest,n.correlationId);const i=await q(ql,_.InitializeBaseRequest,o,r,n.correlationId)(n,t,r,o);return{...n,...i,account:e,forceRefresh:n.forceRefresh||!1}}/*! @azure/msal-browser v3.30.0 2025-08-05 */class No extends im{async initializeAuthorizationCodeRequest(e){this.performanceClient.addQueueMeasurement(_.StandardInteractionClientInitializeAuthorizationCodeRequest,this.correlationId);const t=await q(mI,_.GeneratePkceCodes,this.logger,this.performanceClient,this.correlationId)(this.performanceClient,this.logger,this.correlationId),r={...e,redirectUri:e.redirectUri,code:R.EMPTY_STRING,codeVerifier:t.verifier};return e.codeChallenge=t.challenge,e.codeChallengeMethod=R.S256_CODE_CHALLENGE_METHOD,r}initializeLogoutRequest(e){this.logger.verbose("initializeLogoutRequest called",e==null?void 0:e.correlationId);const t={correlationId:this.correlationId||In(),...e};if(e)if(e.logoutHint)this.logger.verbose("logoutHint has already been set in logoutRequest");else if(e.account){const r=this.getLogoutHintFromIdTokenClaims(e.account);r&&(this.logger.verbose("Setting logoutHint to login_hint ID Token Claim value for the account provided"),t.logoutHint=r)}else this.logger.verbose("logoutHint was not set and account was not passed into logout request, logoutHint will not be set");else this.logger.verbose("logoutHint will not be set since no logout request was configured");return!e||e.postLogoutRedirectUri!==null?e&&e.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to uri set on logout request",t.correlationId),t.postLogoutRedirectUri=ve.getAbsoluteUrl(e.postLogoutRedirectUri,Bn())):this.config.auth.postLogoutRedirectUri===null?this.logger.verbose("postLogoutRedirectUri configured as null and no uri set on request, not passing post logout redirect",t.correlationId):this.config.auth.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to configured uri",t.correlationId),t.postLogoutRedirectUri=ve.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,Bn())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",t.correlationId),t.postLogoutRedirectUri=ve.getAbsoluteUrl(Bn(),Bn())):this.logger.verbose("postLogoutRedirectUri passed as null, not setting post logout redirect uri",t.correlationId),t}getLogoutHintFromIdTokenClaims(e){const t=e.idTokenClaims;if(t){if(t.login_hint)return t.login_hint;this.logger.verbose("The ID Token Claims tied to the provided account do not contain a login_hint claim, logoutHint will not be added to logout request")}else this.logger.verbose("The provided account does not contain ID Token Claims, logoutHint will not be added to logout request");return null}async createAuthCodeClient(e){this.performanceClient.addQueueMeasurement(_.StandardInteractionClientCreateAuthCodeClient,this.correlationId);const t=await q(this.getClientConfiguration.bind(this),_.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)(e);return new mp(t,this.performanceClient)}async getClientConfiguration(e){const{serverTelemetryManager:t,requestAuthority:r,requestAzureCloudOptions:o,requestExtraQueryParameters:i,account:s}=e;this.performanceClient.addQueueMeasurement(_.StandardInteractionClientGetClientConfiguration,this.correlationId);const a=await q(this.getDiscoveredAuthority.bind(this),_.StandardInteractionClientGetDiscoveredAuthority,this.logger,this.performanceClient,this.correlationId)({requestAuthority:r,requestAzureCloudOptions:o,requestExtraQueryParameters:i,account:s}),c=this.config.system.loggerOptions;return{authOptions:{clientId:this.config.auth.clientId,authority:a,clientCapabilities:this.config.auth.clientCapabilities,redirectUri:this.config.auth.redirectUri},systemOptions:{tokenRenewalOffsetSeconds:this.config.system.tokenRenewalOffsetSeconds,preventCorsPreflight:!0},loggerOptions:{loggerCallback:c.loggerCallback,piiLoggingEnabled:c.piiLoggingEnabled,logLevel:c.logLevel,correlationId:this.correlationId},cacheOptions:{claimsBasedCachingEnabled:this.config.cache.claimsBasedCachingEnabled},cryptoInterface:this.browserCrypto,networkInterface:this.networkClient,storageInterface:this.browserStorage,serverTelemetryManager:t,libraryInfo:{sku:Ft.MSAL_SKU,version:So,cpu:R.EMPTY_STRING,os:R.EMPTY_STRING},telemetry:this.config.telemetry}}async initializeAuthorizationRequest(e,t){this.performanceClient.addQueueMeasurement(_.StandardInteractionClientInitializeAuthorizationRequest,this.correlationId);const r=this.getRedirectUri(e.redirectUri),o={interactionType:t},i=nn.setRequestState(this.browserCrypto,e&&e.state||R.EMPTY_STRING,o),a={...await q(ql,_.InitializeBaseRequest,this.logger,this.performanceClient,this.correlationId)({...e,correlationId:this.correlationId},this.config,this.performanceClient,this.logger),redirectUri:r,state:i,nonce:e.nonce||In(),responseMode:this.config.auth.OIDCOptions.serverResponseType};if(e.loginHint||e.sid)return a;const c=e.account||this.browserStorage.getActiveAccount(this.correlationId);if(c&&(this.logger.verbose("Setting validated request account",this.correlationId),this.logger.verbosePii(`Setting validated request account: ${c.homeAccountId}`,this.correlationId),a.account=c),!a.loginHint&&!c){const l=this.browserStorage.getLegacyLoginHint();l&&(a.loginHint=l)}return a}}/*! @azure/msal-browser v3.30.0 2025-08-05 */const TI="ContentError",sm="user_switch";/*! @azure/msal-browser v3.30.0 2025-08-05 */const AI="USER_INTERACTION_REQUIRED",EI="USER_CANCEL",wI="NO_NETWORK",_I="PERSISTENT_ERROR",bI="DISABLED",II="ACCOUNT_UNAVAILABLE";/*! @azure/msal-browser v3.30.0 2025-08-05 */const SI=-2147186943,RI={[sm]:"User attempted to switch accounts in the native broker, which is not allowed. All new accounts must sign-in through the standard web flow first, please try again."};class An extends Fe{constructor(e,t,r){super(e,t),Object.setPrototypeOf(this,An.prototype),this.name="NativeAuthError",this.ext=r}}function Zr(n){if(n.ext&&n.ext.status&&(n.ext.status===_I||n.ext.status===bI)||n.ext&&n.ext.error&&n.ext.error===SI)return!0;switch(n.errorCode){case TI:return!0;default:return!1}}function Ic(n,e,t){if(t&&t.status)switch(t.status){case II:return Cc(gp);case AI:return new cn(n,e);case EI:return Y(Fr);case wI:return Y(Ts)}return new An(n,RI[n]||e,t)}/*! @azure/msal-browser v3.30.0 2025-08-05 */class am extends No{async acquireToken(e){this.performanceClient.addQueueMeasurement(_.SilentCacheClientAcquireToken,e.correlationId);const t=this.initializeServerTelemetryManager(He.acquireTokenSilent_silentFlow),r=await q(this.getClientConfiguration.bind(this),_.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:t,requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,account:e.account}),o=new ub(r,this.performanceClient);this.logger.verbose("Silent auth client created");try{const s=(await q(o.acquireCachedToken.bind(o),_.SilentFlowClientAcquireCachedToken,this.logger,this.performanceClient,e.correlationId)(e))[0];return this.performanceClient.addFields({fromCache:!0},e.correlationId),s}catch(i){throw i instanceof Oi&&i.errorCode===Nl&&this.logger.verbose("Signing keypair for bound access token not found. Refreshing bound access token and generating a new crypto keypair."),i}}logout(e){this.logger.verbose("logoutRedirect called");const t=this.initializeLogoutRequest(e);return this.clearCacheOnLogout(t==null?void 0:t.account)}}/*! @azure/msal-browser v3.30.0 2025-08-05 */class lo extends im{constructor(e,t,r,o,i,s,a,c,l,u,d,h){var C;super(e,t,r,o,i,s,c,l,h),this.apiId=a,this.accountId=u,this.nativeMessageHandler=l,this.nativeStorageManager=d,this.silentCacheClient=new am(e,this.nativeStorageManager,r,o,i,s,c,l,h),this.serverTelemetryManager=this.initializeServerTelemetryManager(this.apiId);const f=this.nativeMessageHandler.getExtensionId()===ro.PREFERRED_EXTENSION_ID?"chrome":(C=this.nativeMessageHandler.getExtensionId())!=null&&C.length?"unknown":void 0;this.skus=fi.makeExtraSkuString({libraryName:Ft.MSAL_SKU,libraryVersion:So,extensionName:f,extensionVersion:this.nativeMessageHandler.getExtensionVersion()})}addRequestSKUs(e){e.extraParameters={...e.extraParameters,[z_]:this.skus}}async acquireToken(e){this.performanceClient.addQueueMeasurement(_.NativeInteractionClientAcquireToken,e.correlationId),this.logger.trace("NativeInteractionClient - acquireToken called.");const t=this.performanceClient.startMeasurement(_.NativeInteractionClientAcquireToken,e.correlationId),r=bn();try{const o=await this.initializeNativeRequest(e);try{const l=await this.acquireTokensFromCache(this.accountId,o);return t.end({success:!0,isNativeBroker:!1,fromCache:!0}),l}catch{this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call")}const{...i}=o,s={method:br.GetToken,request:i},a=await this.nativeMessageHandler.sendMessage(s),c=this.validateNativeResponse(a);return await this.handleNativeResponse(c,o,r).then(l=>(t.end({success:!0,isNativeBroker:!0,requestId:l.requestId}),this.serverTelemetryManager.clearNativeBrokerErrorCode(),l)).catch(l=>{throw t.end({success:!1,errorCode:l.errorCode,subErrorCode:l.subError,isNativeBroker:!0}),l})}catch(o){throw o instanceof An&&this.serverTelemetryManager.setNativeBrokerErrorCode(o.errorCode),o}}createSilentCacheRequest(e,t){return{authority:e.authority,correlationId:this.correlationId,scopes:Ye.fromString(e.scope).asArray(),account:t,forceRefresh:!1}}async acquireTokensFromCache(e,t){if(!e)throw this.logger.warning("NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided"),H(hc);const r=this.browserStorage.getBaseAccountInfo({nativeAccountId:e},t.correlationId);if(!r)throw H(hc);try{const o=this.createSilentCacheRequest(t,r),i=await this.silentCacheClient.acquireToken(o),s={...r,idTokenClaims:i==null?void 0:i.idTokenClaims,idToken:i==null?void 0:i.idToken};return{...i,account:s}}catch(o){throw o}}async acquireTokenRedirect(e,t){this.logger.trace("NativeInteractionClient - acquireTokenRedirect called.");const{...r}=e;delete r.onRedirectNavigate;const o=await this.initializeNativeRequest(r),i={method:br.GetToken,request:o};try{const c=await this.nativeMessageHandler.sendMessage(i);this.validateNativeResponse(c)}catch(c){if(c instanceof An&&(this.serverTelemetryManager.setNativeBrokerErrorCode(c.errorCode),Zr(c)))throw c}this.browserStorage.setTemporaryCache(ke.NATIVE_REQUEST,JSON.stringify(o),!0);const s={apiId:He.acquireTokenRedirect,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},a=this.config.auth.navigateToLoginRequestUrl?window.location.href:this.getRedirectUri(e.redirectUri);t.end({success:!0}),await this.navigationClient.navigateExternal(a,s)}async handleRedirectPromise(e,t){if(this.logger.trace("NativeInteractionClient - handleRedirectPromise called."),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),null;const r=this.browserStorage.getCachedNativeRequest();if(!r)return this.logger.verbose("NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null."),e&&t&&(e==null||e.addFields({errorCode:"no_cached_request"},t)),null;const{prompt:o,...i}=r;o&&this.logger.verbose("NativeInteractionClient - handleRedirectPromise called and prompt was included in the original request, removing prompt from cached request to prevent second interaction with native broker window."),this.browserStorage.removeItem(this.browserStorage.generateCacheKey(ke.NATIVE_REQUEST));const s={method:br.GetToken,request:i},a=bn();try{this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker.");const c=await this.nativeMessageHandler.sendMessage(s);this.validateNativeResponse(c);const l=this.handleNativeResponse(c,i,a);this.browserStorage.setInteractionInProgress(!1);const u=await l;return this.serverTelemetryManager.clearNativeBrokerErrorCode(),u}catch(c){throw this.browserStorage.setInteractionInProgress(!1),c}}logout(){return this.logger.trace("NativeInteractionClient - logout called."),Promise.reject("Logout not implemented yet")}async handleNativeResponse(e,t,r){var u;this.logger.trace("NativeInteractionClient - handleNativeResponse called.");const o=qr(e.id_token,_n),i=this.createHomeAccountIdentifier(e,o),s=(u=this.browserStorage.getAccountInfoFilteredBy({nativeAccountId:t.accountId},this.correlationId))==null?void 0:u.homeAccountId;if(i!==s&&e.account.id!==t.accountId)throw Ic(sm);const a=await this.getDiscoveredAuthority({requestAuthority:t.authority}),c=Il(this.browserStorage,a,i,_n,this.correlationId,o,e.client_info,void 0,o.tid,void 0,e.account.id,this.logger),l=await this.generateAuthenticationResult(e,t,o,c,a.canonicalAuthority,r);return this.cacheAccount(c),this.cacheNativeTokens(e,t,i,o,e.access_token,l.tenantId,r),l}createHomeAccountIdentifier(e,t){return rt.generateHomeAccountId(e.client_info||R.EMPTY_STRING,Zt.Default,this.logger,this.browserCrypto,t)}generateScopes(e,t){return e.scope?Ye.fromString(e.scope):Ye.fromString(t.scope)}async generatePopAccessToken(e,t){if(t.tokenType===Ne.POP&&t.signPopToken){if(e.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),e.shr;const r=new Io(this.browserCrypto),o={resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,shrNonce:t.shrNonce};if(!t.keyId)throw H(ul);return r.signPopToken(e.access_token,t.keyId,o)}else return e.access_token}async generateAuthenticationResult(e,t,r,o,i,s){const a=this.addTelemetryFromNativeResponse(e),c=e.scope?Ye.fromString(e.scope):Ye.fromString(t.scope),l=e.account.properties||{},u=l.UID||r.oid||r.sub||R.EMPTY_STRING,d=l.TenantId||r.tid||R.EMPTY_STRING,h=vl(o.getAccountInfo(),void 0,r,e.id_token);h.nativeAccountId!==e.account.id&&(h.nativeAccountId=e.account.id);const f=await this.generatePopAccessToken(e,t),C=t.tokenType===Ne.POP?Ne.POP:Ne.BEARER;return{authority:i,uniqueId:u,tenantId:d,scopes:c.asArray(),account:h,idToken:e.id_token,idTokenClaims:r,accessToken:f,fromCache:a?this.isResponseFromCache(a):!1,expiresOn:new Date(Number(s+e.expires_in)*1e3),tokenType:C,correlationId:this.correlationId,state:e.state,fromNativeBroker:!0}}cacheAccount(e){this.browserStorage.setAccount(e,this.correlationId),this.browserStorage.removeAccountContext(e,this.correlationId).catch(t=>{this.logger.error(`Error occurred while removing account context from browser storage. ${t}`)})}cacheNativeTokens(e,t,r,o,i,s,a){const c=Ws(r,t.authority,e.id_token||"",t.clientId,o.tid||""),l=t.tokenType===Ne.POP?R.SHR_NONCE_VALIDITY:(typeof e.expires_in=="string"?parseInt(e.expires_in,10):e.expires_in)||0,u=a+l,d=this.generateScopes(e,t),h=Ys(r,t.authority,i,t.clientId,o.tid||s,d.printScopes(),u,0,_n,void 0,t.tokenType,void 0,t.keyId),f={idToken:c,accessToken:h};this.nativeStorageManager.saveCacheRecord(f,t.correlationId,t.storeInCache)}addTelemetryFromNativeResponse(e){const t=this.getMATSFromResponse(e);return t?(this.performanceClient.addFields({extensionId:this.nativeMessageHandler.getExtensionId(),extensionVersion:this.nativeMessageHandler.getExtensionVersion(),matsBrokerVersion:t.broker_version,matsAccountJoinOnStart:t.account_join_on_start,matsAccountJoinOnEnd:t.account_join_on_end,matsDeviceJoin:t.device_join,matsPromptBehavior:t.prompt_behavior,matsApiErrorCode:t.api_error_code,matsUiVisible:t.ui_visible,matsSilentCode:t.silent_code,matsSilentBiSubCode:t.silent_bi_sub_code,matsSilentMessage:t.silent_message,matsSilentStatus:t.silent_status,matsHttpStatus:t.http_status,matsHttpEventCount:t.http_event_count},this.correlationId),t):null}validateNativeResponse(e){if(e.hasOwnProperty("access_token")&&e.hasOwnProperty("id_token")&&e.hasOwnProperty("client_info")&&e.hasOwnProperty("account")&&e.hasOwnProperty("scope")&&e.hasOwnProperty("expires_in"))return e;throw bg(ol,"Response missing expected properties.")}getMATSFromResponse(e){if(e.properties.MATS)try{return JSON.parse(e.properties.MATS)}catch{this.logger.error("NativeInteractionClient - Error parsing MATS telemetry, returning null instead")}return null}isResponseFromCache(e){return typeof e.is_cached>"u"?(this.logger.verbose("NativeInteractionClient - MATS telemetry does not contain field indicating if response was served from cache. Returning false."),!1):!!e.is_cached}async initializeNativeRequest(e){this.logger.trace("NativeInteractionClient - initializeNativeRequest called");const t=e.authority||this.config.auth.authority;e.account&&await this.getDiscoveredAuthority({requestAuthority:t,requestAzureCloudOptions:e.azureCloudOptions,account:e.account});const r=new ve(t);r.validateAsUri();const{scopes:o,...i}=e,s=new Ye(o||[]);s.appendScopes(Po);const a=()=>{switch(this.apiId){case He.ssoSilent:case He.acquireTokenSilent_silentFlow:return this.logger.trace("initializeNativeRequest: silent request sets prompt to none"),at.NONE}if(!e.prompt){this.logger.trace("initializeNativeRequest: prompt was not provided");return}switch(e.prompt){case at.NONE:case at.CONSENT:case at.LOGIN:return this.logger.trace("initializeNativeRequest: prompt is compatible with native flow"),e.prompt;default:throw this.logger.trace(`initializeNativeRequest: prompt = ${e.prompt} is not compatible with native flow`),Y(jp)}},c={...i,accountId:this.accountId,clientId:this.config.auth.clientId,authority:r.urlString,scope:s.printScopes(),redirectUri:this.getRedirectUri(e.redirectUri),prompt:a(),correlationId:this.correlationId,tokenType:e.authenticationScheme,windowTitleSubstring:document.title,extraParameters:{...e.extraQueryParameters,...e.tokenQueryParameters},extendedExpiryToken:!1,keyId:e.popKid};if(c.signPopToken&&e.popKid)throw Y(Vp);if(this.handleExtraBrokerParams(c),c.extraParameters=c.extraParameters||{},c.extraParameters.telemetry=ro.MATS_TELEMETRY,e.authenticationScheme===Ne.POP){const l={resourceRequestUri:e.resourceRequestUri,resourceRequestMethod:e.resourceRequestMethod,shrClaims:e.shrClaims,shrNonce:e.shrNonce},u=new Io(this.browserCrypto);let d;if(c.keyId)d=this.browserCrypto.base64UrlEncode(JSON.stringify({kid:c.keyId})),c.signPopToken=!1;else{const h=await q(u.generateCnf.bind(u),_.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(l,this.logger);d=h.reqCnfString,c.keyId=h.kid,c.signPopToken=!0}c.reqCnf=d}return this.addRequestSKUs(c),c}handleExtraBrokerParams(e){var i;const t=e.extraParameters&&e.extraParameters.hasOwnProperty(wl)&&e.extraParameters.hasOwnProperty(yc)&&e.extraParameters.hasOwnProperty(Ur);if(!e.embeddedClientId&&!t)return;let r="";const o=e.redirectUri;e.embeddedClientId?(e.redirectUri=this.config.auth.redirectUri,r=e.embeddedClientId):e.extraParameters&&(e.redirectUri=e.extraParameters[yc],r=e.extraParameters[Ur]),e.extraParameters={child_client_id:r,child_redirect_uri:o},(i=this.performanceClient)==null||i.addFields({embeddedClientId:r,embeddedRedirectUri:o},e.correlationId)}}/*! @azure/msal-browser v3.30.0 2025-08-05 */class En{constructor(e,t,r,o){this.logger=e,this.handshakeTimeoutMs=t,this.extensionId=o,this.resolvers=new Map,this.handshakeResolvers=new Map,this.messageChannel=new MessageChannel,this.windowListener=this.onWindowMessage.bind(this),this.performanceClient=r,this.handshakeEvent=r.startMeasurement(_.NativeMessageHandlerHandshake)}async sendMessage(e){this.logger.trace("NativeMessageHandler - sendMessage called.");const t={channel:ro.CHANNEL_ID,extensionId:this.extensionId,responseId:In(),body:e};return this.logger.trace("NativeMessageHandler - Sending request to browser extension"),this.logger.tracePii(`NativeMessageHandler - Sending request to browser extension: ${JSON.stringify(t)}`),this.messageChannel.port1.postMessage(t),new Promise((r,o)=>{this.resolvers.set(t.responseId,{resolve:r,reject:o})})}static async createProvider(e,t,r){e.trace("NativeMessageHandler - createProvider called.");try{const o=new En(e,t,r,ro.PREFERRED_EXTENSION_ID);return await o.sendHandshakeRequest(),o}catch{const i=new En(e,t,r);return await i.sendHandshakeRequest(),i}}async sendHandshakeRequest(){this.logger.trace("NativeMessageHandler - sendHandshakeRequest called."),window.addEventListener("message",this.windowListener,!1);const e={channel:ro.CHANNEL_ID,extensionId:this.extensionId,responseId:In(),body:{method:br.HandshakeRequest}};return this.handshakeEvent.add({extensionId:this.extensionId,extensionHandshakeTimeoutMs:this.handshakeTimeoutMs}),this.messageChannel.port1.onmessage=t=>{this.onChannelMessage(t)},window.postMessage(e,window.origin,[this.messageChannel.port2]),new Promise((t,r)=>{this.handshakeResolvers.set(e.responseId,{resolve:t,reject:r}),this.timeoutId=window.setTimeout(()=>{window.removeEventListener("message",this.windowListener,!1),this.messageChannel.port1.close(),this.messageChannel.port2.close(),this.handshakeEvent.end({extensionHandshakeTimedOut:!0,success:!1}),r(Y(Kp)),this.handshakeResolvers.delete(e.responseId)},this.handshakeTimeoutMs)})}onWindowMessage(e){if(this.logger.trace("NativeMessageHandler - onWindowMessage called"),e.source!==window)return;const t=e.data;if(!(!t.channel||t.channel!==ro.CHANNEL_ID)&&!(t.extensionId&&t.extensionId!==this.extensionId)&&t.body.method===br.HandshakeRequest){const r=this.handshakeResolvers.get(t.responseId);if(!r){this.logger.trace(`NativeMessageHandler.onWindowMessage - resolver can't be found for request ${t.responseId}`);return}this.logger.verbose(t.extensionId?`Extension with id: ${t.extensionId} not installed`:"No extension installed"),clearTimeout(this.timeoutId),this.messageChannel.port1.close(),this.messageChannel.port2.close(),window.removeEventListener("message",this.windowListener,!1),this.handshakeEvent.end({success:!1,extensionInstalled:!1}),r.reject(Y(qp))}}onChannelMessage(e){this.logger.trace("NativeMessageHandler - onChannelMessage called.");const t=e.data,r=this.resolvers.get(t.responseId),o=this.handshakeResolvers.get(t.responseId);try{const i=t.body.method;if(i===br.Response){if(!r)return;const s=t.body.response;if(this.logger.trace("NativeMessageHandler - Received response from browser extension"),this.logger.tracePii(`NativeMessageHandler - Received response from browser extension: ${JSON.stringify(s)}`),s.status!=="Success")r.reject(Ic(s.code,s.description,s.ext));else if(s.result)s.result.code&&s.result.description?r.reject(Ic(s.result.code,s.result.description,s.result.ext)):r.resolve(s.result);else throw bg(ol,"Event does not contain result.");this.resolvers.delete(t.responseId)}else if(i===br.HandshakeResponse){if(!o){this.logger.trace(`NativeMessageHandler.onChannelMessage - resolver can't be found for request ${t.responseId}`);return}clearTimeout(this.timeoutId),window.removeEventListener("message",this.windowListener,!1),this.extensionId=t.extensionId,this.extensionVersion=t.body.version,this.logger.verbose(`NativeMessageHandler - Received HandshakeResponse from extension: ${this.extensionId}`),this.handshakeEvent.end({extensionInstalled:!0,success:!0}),o.resolve(),this.handshakeResolvers.delete(t.responseId)}}catch(i){this.logger.error("Error parsing response from WAM Extension"),this.logger.errorPii(`Error parsing response from WAM Extension: ${i}`),this.logger.errorPii(`Unable to parse ${e}`),r?r.reject(i):o&&o.reject(i)}}getExtensionId(){return this.extensionId}getExtensionVersion(){return this.extensionVersion}static isNativeAvailable(e,t,r,o){if(t.trace("isNativeAvailable called"),!e.system.allowNativeBroker)return t.trace("isNativeAvailable: allowNativeBroker is not enabled, returning false"),!1;if(!r)return t.trace("isNativeAvailable: WAM extension provider is not initialized, returning false"),!1;if(o)switch(o){case Ne.BEARER:case Ne.POP:return t.trace("isNativeAvailable: authenticationScheme is supported, returning true"),!0;default:return t.trace("isNativeAvailable: authenticationScheme is not supported, returning false"),!1}return!0}}/*! @azure/msal-browser v3.30.0 2025-08-05 */class $l{constructor(e,t,r,o,i){this.authModule=e,this.browserStorage=t,this.authCodeRequest=r,this.logger=o,this.performanceClient=i}async handleCodeResponse(e,t){this.performanceClient.addQueueMeasurement(_.HandleCodeResponse,t.correlationId);let r;try{r=this.authModule.handleFragmentResponse(e,t.state)}catch(o){throw o instanceof fr&&o.subError===Fr?Y(Fr):o}return q(this.handleCodeResponseFromServer.bind(this),_.HandleCodeResponseFromServer,this.logger,this.performanceClient,t.correlationId)(r,t)}async handleCodeResponseFromServer(e,t,r=!0){if(this.performanceClient.addQueueMeasurement(_.HandleCodeResponseFromServer,t.correlationId),this.logger.trace("InteractionHandler.handleCodeResponseFromServer called"),this.authCodeRequest.code=e.code,e.cloud_instance_host_name&&await q(this.authModule.updateAuthority.bind(this.authModule),_.UpdateTokenEndpointAuthority,this.logger,this.performanceClient,t.correlationId)(e.cloud_instance_host_name,t.correlationId),r&&(e.nonce=t.nonce||void 0),e.state=t.state,e.client_info)this.authCodeRequest.clientInfo=e.client_info;else{const i=this.createCcsCredentials(t);i&&(this.authCodeRequest.ccsCredential=i)}return await q(this.authModule.acquireToken.bind(this.authModule),_.AuthClientAcquireToken,this.logger,this.performanceClient,t.correlationId)(this.authCodeRequest,e)}createCcsCredentials(e){return e.account?{credential:e.account.homeAccountId,type:Kt.HOME_ACCOUNT_ID}:e.loginHint?{credential:e.loginHint,type:Kt.UPN}:null}}/*! @azure/msal-browser v3.30.0 2025-08-05 */function cm(n,e,t){const r=ys(n);if(!r)throw sp(n)?(t.error(`A ${e} is present in the iframe but it does not contain known properties. It's likely that the ${e} has been replaced by code running on the redirectUri page.`),t.errorPii(`The ${e} detected is: ${n}`),Y(Ap)):(t.error(`The request has returned to the redirectUri but a ${e} is not present. It's likely that the ${e} has been removed or the page has been redirected by code running on the redirectUri page.`),Y(Tp));return r}function kI(n,e,t){if(!n.state)throw Y(Ol);const r=om(e,n.state);if(!r)throw Y(Ep);if(r.interactionType!==t)throw Y(wp)}/*! @azure/msal-browser v3.30.0 2025-08-05 */class OI extends No{constructor(e,t,r,o,i,s,a,c,l,u){super(e,t,r,o,i,s,a,l,u),this.unloadWindow=this.unloadWindow.bind(this),this.nativeStorage=c}acquireToken(e){try{const r={popupName:this.generatePopupName(e.scopes||Po,e.authority||this.config.auth.authority),popupWindowAttributes:e.popupWindowAttributes||{},popupWindowParent:e.popupWindowParent??window};return this.config.system.asyncPopups?(this.logger.verbose("asyncPopups set to true, acquiring token"),this.acquireTokenPopupAsync(e,r)):(this.logger.verbose("asyncPopup set to false, opening popup before acquiring token"),r.popup=this.openSizedPopup("about:blank",r),this.acquireTokenPopupAsync(e,r))}catch(t){return Promise.reject(t)}}logout(e){try{this.logger.verbose("logoutPopup called");const t=this.initializeLogoutRequest(e),r={popupName:this.generateLogoutPopupName(t),popupWindowAttributes:(e==null?void 0:e.popupWindowAttributes)||{},popupWindowParent:(e==null?void 0:e.popupWindowParent)??window},o=e&&e.authority,i=e&&e.mainWindowRedirectUri;return this.config.system.asyncPopups?(this.logger.verbose("asyncPopups set to true"),this.logoutPopupAsync(t,r,o,i)):(this.logger.verbose("asyncPopup set to false, opening popup"),r.popup=this.openSizedPopup("about:blank",r),this.logoutPopupAsync(t,r,o,i))}catch(t){return Promise.reject(t)}}async acquireTokenPopupAsync(e,t){var i;this.logger.verbose("acquireTokenPopupAsync called");const r=this.initializeServerTelemetryManager(He.acquireTokenPopup),o=await q(this.initializeAuthorizationRequest.bind(this),_.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,this.correlationId)(e,ee.Popup);rm(o.authority);try{const s=await q(this.initializeAuthorizationCodeRequest.bind(this),_.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,this.correlationId)(o),a=await q(this.createAuthCodeClient.bind(this),_.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:r,requestAuthority:o.authority,requestAzureCloudOptions:o.azureCloudOptions,requestExtraQueryParameters:o.extraQueryParameters,account:o.account}),c=En.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,e.authenticationScheme);let l;c&&(l=this.performanceClient.startMeasurement(_.FetchAccountIdWithNativeBroker,e.correlationId));const u=await a.getAuthCodeUrl({...o,nativeBroker:c}),d=new $l(a,this.browserStorage,s,this.logger,this.performanceClient),h=this.initiateAuthRequest(u,t);this.eventHandler.emitEvent(oe.POPUP_OPENED,ee.Popup,{popupWindow:h},null);const f=await this.monitorPopupForHash(h,t.popupWindowParent),C=$r(cm,_.DeserializeResponse,this.logger,this.performanceClient,this.correlationId)(f,this.config.auth.OIDCOptions.serverResponseType,this.logger);if(Tn.removeThrottle(this.browserStorage,this.config.auth.clientId,s),C.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),l&&l.end({success:!0,isNativeBroker:!0}),!this.nativeMessageHandler)throw Y(ki);const v=new lo(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,He.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,C.accountId,this.nativeStorage,o.correlationId),{userRequestState:E}=nn.parseRequestState(this.browserCrypto,o.state);return await v.acquireToken({...o,state:E,prompt:void 0})}return await d.handleCodeResponse(C,o)}catch(s){throw(i=t.popup)==null||i.close(),s instanceof Fe&&(s.setCorrelationId(this.correlationId),r.cacheFailedRequest(s)),s}}async logoutPopupAsync(e,t,r,o){var s,a,c,l;this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(oe.LOGOUT_START,ee.Popup,e);const i=this.initializeServerTelemetryManager(He.logoutPopup);try{await this.clearCacheOnLogout(e.account);const u=await q(this.createAuthCodeClient.bind(this),_.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:i,requestAuthority:r,account:e.account||void 0});try{u.authority.endSessionEndpoint}catch{if((s=e.account)!=null&&s.homeAccountId&&e.postLogoutRedirectUri&&u.authority.protocolMode===qn.OIDC){if(this.browserStorage.removeAccount((a=e.account)==null?void 0:a.homeAccountId,this.correlationId),this.eventHandler.emitEvent(oe.LOGOUT_SUCCESS,ee.Popup,e),o){const f={apiId:He.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},C=ve.getAbsoluteUrl(o,Bn());await this.navigationClient.navigateInternal(C,f)}(c=t.popup)==null||c.close();return}}const d=u.getLogoutUri(e);this.eventHandler.emitEvent(oe.LOGOUT_SUCCESS,ee.Popup,e);const h=this.openPopup(d,t);if(this.eventHandler.emitEvent(oe.POPUP_OPENED,ee.Popup,{popupWindow:h},null),await this.monitorPopupForHash(h,t.popupWindowParent).catch(()=>{}),o){const f={apiId:He.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},C=ve.getAbsoluteUrl(o,Bn());this.logger.verbose("Redirecting main window to url specified in the request"),this.logger.verbosePii(`Redirecting main window to: ${C}`),await this.navigationClient.navigateInternal(C,f)}else this.logger.verbose("No main window navigation requested")}catch(u){throw(l=t.popup)==null||l.close(),u instanceof Fe&&(u.setCorrelationId(this.correlationId),i.cacheFailedRequest(u)),this.browserStorage.setInteractionInProgress(!1),this.eventHandler.emitEvent(oe.LOGOUT_FAILURE,ee.Popup,null,u),this.eventHandler.emitEvent(oe.LOGOUT_END,ee.Popup),u}this.eventHandler.emitEvent(oe.LOGOUT_END,ee.Popup)}initiateAuthRequest(e,t){if(e)return this.logger.infoPii(`Navigate to: ${e}`),this.openPopup(e,t);throw this.logger.error("Navigate url is empty"),Y(ta)}monitorPopupForHash(e,t){return new Promise((r,o)=>{this.logger.verbose("PopupHandler.monitorPopupForHash - polling started");const i=setInterval(()=>{if(e.closed){this.logger.error("PopupHandler.monitorPopupForHash - window closed"),clearInterval(i),o(Y(Fr));return}let s="";try{s=e.location.href}catch{}if(!s||s==="about:blank")return;clearInterval(i);let a="";const c=this.config.auth.OIDCOptions.serverResponseType;e&&(c===Ri.QUERY?a=e.location.search:a=e.location.hash),this.logger.verbose("PopupHandler.monitorPopupForHash - popup window is on same origin as caller"),r(a)},this.config.system.pollIntervalMilliseconds)}).finally(()=>{this.cleanPopup(e,t)})}openPopup(e,t){try{let r;if(t.popup?(r=t.popup,this.logger.verbosePii(`Navigating popup window to: ${e}`),r.location.assign(e)):typeof t.popup>"u"&&(this.logger.verbosePii(`Opening popup window to: ${e}`),r=this.openSizedPopup(e,t)),!r)throw Y(Ip);return r.focus&&r.focus(),this.currentWindow=r,t.popupWindowParent.addEventListener("beforeunload",this.unloadWindow),r}catch(r){throw this.logger.error("error opening popup "+r.message),this.browserStorage.setInteractionInProgress(!1),Y(bp)}}openSizedPopup(e,{popupName:t,popupWindowAttributes:r,popupWindowParent:o}){var f,C,p,v;const i=o.screenLeft?o.screenLeft:o.screenX,s=o.screenTop?o.screenTop:o.screenY,a=o.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,c=o.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;let l=(f=r.popupSize)==null?void 0:f.width,u=(C=r.popupSize)==null?void 0:C.height,d=(p=r.popupPosition)==null?void 0:p.top,h=(v=r.popupPosition)==null?void 0:v.left;return(!l||l<0||l>a)&&(this.logger.verbose("Default popup window width used. Window width not configured or invalid."),l=Ft.POPUP_WIDTH),(!u||u<0||u>c)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),u=Ft.POPUP_HEIGHT),(!d||d<0||d>c)&&(this.logger.verbose("Default popup window top position used. Window top not configured or invalid."),d=Math.max(0,c/2-Ft.POPUP_HEIGHT/2+s)),(!h||h<0||h>a)&&(this.logger.verbose("Default popup window left position used. Window left not configured or invalid."),h=Math.max(0,a/2-Ft.POPUP_WIDTH/2+i)),o.open(e,t,`width=${l}, height=${u}, top=${d}, left=${h}, scrollbars=yes`)}unloadWindow(e){this.browserStorage.cleanRequestByInteractionType(ee.Popup),this.currentWindow&&this.currentWindow.close(),e.preventDefault()}cleanPopup(e,t){e.close(),t.removeEventListener("beforeunload",this.unloadWindow),this.browserStorage.setInteractionInProgress(!1)}generatePopupName(e,t){return`${Ft.POPUP_NAME_PREFIX}.${this.config.auth.clientId}.${e.join("-")}.${t}.${this.correlationId}`}generateLogoutPopupName(e){const t=e.account&&e.account.homeAccountId;return`${Ft.POPUP_NAME_PREFIX}.${this.config.auth.clientId}.${t}.${this.correlationId}`}}/*! @azure/msal-browser v3.30.0 2025-08-05 */class th{constructor(e,t,r,o,i){this.authModule=e,this.browserStorage=t,this.authCodeRequest=r,this.logger=o,this.performanceClient=i}async initiateAuthRequest(e,t){if(this.logger.verbose("RedirectHandler.initiateAuthRequest called"),e){t.redirectStartPage&&(this.logger.verbose("RedirectHandler.initiateAuthRequest: redirectStartPage set, caching start page"),this.browserStorage.setTemporaryCache(ke.ORIGIN_URI,t.redirectStartPage,!0)),this.browserStorage.setTemporaryCache(ke.CORRELATION_ID,this.authCodeRequest.correlationId,!0),this.browserStorage.cacheCodeRequest(this.authCodeRequest),this.logger.infoPii(`RedirectHandler.initiateAuthRequest: Navigate to: ${e}`);const r={apiId:He.acquireTokenRedirect,timeout:t.redirectTimeout,noHistory:!1};if(typeof t.onRedirectNavigate=="function")if(this.logger.verbose("RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback"),t.onRedirectNavigate(e)!==!1){this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating"),await t.navigationClient.navigateExternal(e,r);return}else{this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate returned false, stopping navigation");return}else{this.logger.verbose("RedirectHandler.initiateAuthRequest: Navigating window to navigate url"),await t.navigationClient.navigateExternal(e,r);return}}else throw this.logger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"),Y(ta)}async handleCodeResponse(e,t){this.logger.verbose("RedirectHandler.handleCodeResponse called"),this.browserStorage.setInteractionInProgress(!1);const r=this.browserStorage.generateStateKey(t),o=this.browserStorage.getTemporaryCache(r);if(!o)throw H(fs,"Cached State");let i;try{i=this.authModule.handleFragmentResponse(e,o)}catch(l){throw l instanceof fr&&l.subError===Fr?Y(Fr):l}const s=this.browserStorage.generateNonceKey(o),a=this.browserStorage.getTemporaryCache(s);if(this.authCodeRequest.code=i.code,i.cloud_instance_host_name&&await q(this.authModule.updateAuthority.bind(this.authModule),_.UpdateTokenEndpointAuthority,this.logger,this.performanceClient,this.authCodeRequest.correlationId)(i.cloud_instance_host_name,this.authCodeRequest.correlationId),i.nonce=a||void 0,i.state=o,i.client_info)this.authCodeRequest.clientInfo=i.client_info;else{const l=this.checkCcsCredentials();l&&(this.authCodeRequest.ccsCredential=l)}const c=await this.authModule.acquireToken(this.authCodeRequest,i);return this.browserStorage.cleanRequestByState(t),c}checkCcsCredentials(){const e=this.browserStorage.getTemporaryCache(ke.CCS_CREDENTIAL,!0);if(e)try{return JSON.parse(e)}catch{this.authModule.logger.error("Cache credential could not be parsed"),this.authModule.logger.errorPii(`Cache credential could not be parsed: ${e}`)}return null}}/*! @azure/msal-browser v3.30.0 2025-08-05 */function PI(){if(typeof window>"u"||typeof window.performance>"u"||typeof window.performance.getEntriesByType!="function")return;const n=window.performance.getEntriesByType("navigation"),e=n.length?n[0]:void 0;return e==null?void 0:e.type}class NI extends No{constructor(e,t,r,o,i,s,a,c,l,u){super(e,t,r,o,i,s,a,l,u),this.nativeStorage=c}async acquireToken(e){const t=await q(this.initializeAuthorizationRequest.bind(this),_.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,this.correlationId)(e,ee.Redirect);this.browserStorage.updateCacheEntries(t.state,t.nonce,t.authority,t.loginHint||"",t.account||null);const r=this.initializeServerTelemetryManager(He.acquireTokenRedirect),o=i=>{i.persisted&&(this.logger.verbose("Page was restored from back/forward cache. Clearing temporary cache."),this.browserStorage.cleanRequestByState(t.state),this.eventHandler.emitEvent(oe.RESTORE_FROM_BFCACHE,ee.Redirect))};try{const i=await q(this.initializeAuthorizationCodeRequest.bind(this),_.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,this.correlationId)(t),s=await q(this.createAuthCodeClient.bind(this),_.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:r,requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account}),a=new th(s,this.browserStorage,i,this.logger,this.performanceClient),c=await s.getAuthCodeUrl({...t,nativeBroker:En.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,e.authenticationScheme)}),l=this.getRedirectStartPage(e.redirectStartPage);return this.logger.verbosePii(`Redirect start page: ${l}`),window.addEventListener("pageshow",o),await a.initiateAuthRequest(c,{navigationClient:this.navigationClient,redirectTimeout:this.config.system.redirectNavigationTimeout,redirectStartPage:l,onRedirectNavigate:e.onRedirectNavigate||this.config.auth.onRedirectNavigate})}catch(i){throw i instanceof Fe&&(i.setCorrelationId(this.correlationId),r.cacheFailedRequest(i)),window.removeEventListener("pageshow",o),this.browserStorage.cleanRequestByState(t.state),i}}async handleRedirectPromise(e="",t){const r=this.initializeServerTelemetryManager(He.handleRedirectPromise);try{if(!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),null;const[o,i]=this.getRedirectResponse(e||"");if(!o)return this.logger.info("handleRedirectPromise did not detect a response as a result of a redirect. Cleaning temporary cache."),this.browserStorage.cleanRequestByInteractionType(ee.Redirect),PI()!=="back_forward"?t.event.errorCode="no_server_response":this.logger.verbose("Back navigation event detected. Muting no_server_response error"),null;const s=this.browserStorage.getTemporaryCache(ke.ORIGIN_URI,!0)||R.EMPTY_STRING,a=ve.removeHashFromUrl(s),c=ve.removeHashFromUrl(window.location.href);if(a===c&&this.config.auth.navigateToLoginRequestUrl)return this.logger.verbose("Current page is loginRequestUrl, handling response"),s.indexOf("#")>-1&&Fb(s),await this.handleResponse(o,r);if(this.config.auth.navigateToLoginRequestUrl){if(!Fl()||this.config.system.allowRedirectInIframe){this.browserStorage.setTemporaryCache(ke.URL_HASH,i,!0);const l={apiId:He.handleRedirectPromise,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0};let u=!0;if(!s||s==="null"){const d=Kb();this.browserStorage.setTemporaryCache(ke.ORIGIN_URI,d,!0),this.logger.warning("Unable to get valid login request url from cache, redirecting to home page"),u=await this.navigationClient.navigateInternal(d,l)}else this.logger.verbose(`Navigating to loginRequestUrl: ${s}`),u=await this.navigationClient.navigateInternal(s,l);if(!u)return await this.handleResponse(o,r)}}else return this.logger.verbose("NavigateToLoginRequestUrl set to false, handling response"),await this.handleResponse(o,r);return null}catch(o){throw o instanceof Fe&&(o.setCorrelationId(this.correlationId),r.cacheFailedRequest(o)),this.browserStorage.cleanRequestByInteractionType(ee.Redirect),o}}getRedirectResponse(e){this.logger.verbose("getRedirectResponseHash called");let t=e;t||(this.config.auth.OIDCOptions.serverResponseType===Ri.QUERY?t=window.location.search:t=window.location.hash);let r=ys(t);if(r){try{kI(r,this.browserCrypto,ee.Redirect)}catch(i){return i instanceof Fe&&this.logger.error(`Interaction type validation failed due to ${i.errorCode}: ${i.errorMessage}`),[null,""]}return Hb(window),this.logger.verbose("Hash contains known properties, returning response hash"),[r,t]}const o=this.browserStorage.getTemporaryCache(ke.URL_HASH,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(ke.URL_HASH)),o&&(r=ys(o),r)?(this.logger.verbose("Hash does not contain known properties, returning cached hash"),[r,o]):[null,""]}async handleResponse(e,t){const r=e.state;if(!r)throw Y(Ol);const o=this.browserStorage.getCachedRequest(r);if(this.logger.verbose("handleResponse called, retrieved cached request"),e.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw Y(ki);const c=new lo(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,He.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,e.accountId,this.nativeStorage,o.correlationId),{userRequestState:l}=nn.parseRequestState(this.browserCrypto,r);return c.acquireToken({...o,state:l,prompt:void 0}).finally(()=>{this.browserStorage.cleanRequestByState(r)})}const i=this.browserStorage.getCachedAuthority(r);if(!i)throw Y(Pl);const s=await q(this.createAuthCodeClient.bind(this),_.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:t,requestAuthority:i});return Tn.removeThrottle(this.browserStorage,this.config.auth.clientId,o),new th(s,this.browserStorage,o,this.logger,this.performanceClient).handleCodeResponse(e,r)}async logout(e){var o,i;this.logger.verbose("logoutRedirect called");const t=this.initializeLogoutRequest(e),r=this.initializeServerTelemetryManager(He.logout);try{this.eventHandler.emitEvent(oe.LOGOUT_START,ee.Redirect,e),await this.clearCacheOnLogout(t.account);const s={apiId:He.logout,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},a=await q(this.createAuthCodeClient.bind(this),_.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:r,requestAuthority:e&&e.authority,requestExtraQueryParameters:e==null?void 0:e.extraQueryParameters,account:e&&e.account||void 0});if(a.authority.protocolMode===qn.OIDC)try{a.authority.endSessionEndpoint}catch{if((o=t.account)!=null&&o.homeAccountId){this.browserStorage.removeAccount((i=t.account)==null?void 0:i.homeAccountId,this.correlationId),this.eventHandler.emitEvent(oe.LOGOUT_SUCCESS,ee.Redirect,t);return}}const c=a.getLogoutUri(t);if(this.eventHandler.emitEvent(oe.LOGOUT_SUCCESS,ee.Redirect,t),e&&typeof e.onRedirectNavigate=="function")if(e.onRedirectNavigate(c)!==!1){this.logger.verbose("Logout onRedirectNavigate did not return false, navigating"),this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),await this.navigationClient.navigateExternal(c,s);return}else this.browserStorage.setInteractionInProgress(!1),this.logger.verbose("Logout onRedirectNavigate returned false, stopping navigation");else{this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),await this.navigationClient.navigateExternal(c,s);return}}catch(s){throw s instanceof Fe&&(s.setCorrelationId(this.correlationId),r.cacheFailedRequest(s)),this.eventHandler.emitEvent(oe.LOGOUT_FAILURE,ee.Redirect,null,s),this.eventHandler.emitEvent(oe.LOGOUT_END,ee.Redirect),s}this.eventHandler.emitEvent(oe.LOGOUT_END,ee.Redirect)}getRedirectStartPage(e){const t=e||window.location.href;return ve.getAbsoluteUrl(t,Bn())}}/*! @azure/msal-browser v3.30.0 2025-08-05 */async function MI(n,e,t,r,o){if(e.addQueueMeasurement(_.SilentHandlerInitiateAuthRequest,r),!n)throw t.info("Navigate url is empty"),Y(ta);return o?q(DI,_.SilentHandlerLoadFrame,t,e,r)(n,o,e,r):$r(LI,_.SilentHandlerLoadFrameSync,t,e,r)(n)}async function xI(n,e,t,r,o,i,s){return r.addQueueMeasurement(_.SilentHandlerMonitorIframeForHash,i),new Promise((a,c)=>{e{window.clearInterval(u),c(Y(Sp))},e),u=window.setInterval(()=>{let d="";const h=n.contentWindow;try{d=h?h.location.href:""}catch{}if(!d||d==="about:blank")return;let f="";h&&(s===Ri.QUERY?f=h.location.search:f=h.location.hash),window.clearTimeout(l),window.clearInterval(u),a(f)},t)}).finally(()=>{$r(UI,_.RemoveHiddenIframe,o,r,i)(n)})}function DI(n,e,t,r){return t.addQueueMeasurement(_.SilentHandlerLoadFrame,r),new Promise((o,i)=>{const s=lm();window.setTimeout(()=>{if(!s){i("Unable to load iframe");return}s.src=n,o(s)},e)})}function LI(n){const e=lm();return e.src=n,e}function lm(){const n=document.createElement("iframe");return n.className="msalSilentIframe",n.style.visibility="hidden",n.style.position="absolute",n.style.width=n.style.height="0",n.style.border="0",n.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms"),document.body.appendChild(n),n}function UI(n){document.body===n.parentNode&&document.body.removeChild(n)}/*! @azure/msal-browser v3.30.0 2025-08-05 */class HI extends No{constructor(e,t,r,o,i,s,a,c,l,u,d){super(e,t,r,o,i,s,c,u,d),this.apiId=a,this.nativeStorage=l}async acquireToken(e){this.performanceClient.addQueueMeasurement(_.SilentIframeClientAcquireToken,e.correlationId),!e.loginHint&&!e.sid&&(!e.account||!e.account.username)&&this.logger.warning("No user hint provided. The authorization server may need more information to complete this request.");const t={...e};t.prompt?t.prompt!==at.NONE&&t.prompt!==at.NO_SESSION&&(this.logger.warning(`SilentIframeClient. Replacing invalid prompt ${t.prompt} with ${at.NONE}`),t.prompt=at.NONE):t.prompt=at.NONE;const r=await q(this.initializeAuthorizationRequest.bind(this),_.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,e.correlationId)(t,ee.Silent);rm(r.authority);const o=this.initializeServerTelemetryManager(this.apiId);let i;try{return i=await q(this.createAuthCodeClient.bind(this),_.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:o,requestAuthority:r.authority,requestAzureCloudOptions:r.azureCloudOptions,requestExtraQueryParameters:r.extraQueryParameters,account:r.account}),await q(this.silentTokenHelper.bind(this),_.SilentIframeClientTokenHelper,this.logger,this.performanceClient,e.correlationId)(i,r)}catch(s){if(s instanceof Fe&&(s.setCorrelationId(this.correlationId),o.cacheFailedRequest(s)),!i||!(s instanceof Fe)||s.errorCode!==Ft.INVALID_GRANT_ERROR)throw s;this.performanceClient.addFields({retryError:s.errorCode},this.correlationId);const a=await q(this.initializeAuthorizationRequest.bind(this),_.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,e.correlationId)(t,ee.Silent);return await q(this.silentTokenHelper.bind(this),_.SilentIframeClientTokenHelper,this.logger,this.performanceClient,this.correlationId)(i,a)}}logout(){return Promise.reject(Y(na))}async silentTokenHelper(e,t){const r=t.correlationId;this.performanceClient.addQueueMeasurement(_.SilentIframeClientTokenHelper,r);const o=await q(this.initializeAuthorizationCodeRequest.bind(this),_.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,r)(t),i=await q(e.getAuthCodeUrl.bind(e),_.GetAuthCodeUrl,this.logger,this.performanceClient,r)({...t,nativeBroker:En.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,t.authenticationScheme)}),s=new $l(e,this.browserStorage,o,this.logger,this.performanceClient),a=await q(MI,_.SilentHandlerInitiateAuthRequest,this.logger,this.performanceClient,r)(i,this.performanceClient,this.logger,r,this.config.system.navigateFrameWait),c=this.config.auth.OIDCOptions.serverResponseType,l=await q(xI,_.SilentHandlerMonitorIframeForHash,this.logger,this.performanceClient,r)(a,this.config.system.iframeHashTimeout,this.config.system.pollIntervalMilliseconds,this.performanceClient,this.logger,r,c),u=$r(cm,_.DeserializeResponse,this.logger,this.performanceClient,this.correlationId)(l,c,this.logger);if(u.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw Y(ki);const d=new lo(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.apiId,this.performanceClient,this.nativeMessageHandler,u.accountId,this.browserStorage,r),{userRequestState:h}=nn.parseRequestState(this.browserCrypto,t.state);return q(d.acquireToken.bind(d),_.NativeInteractionClientAcquireToken,this.logger,this.performanceClient,r)({...t,state:h,prompt:t.prompt||at.NONE})}return q(s.handleCodeResponse.bind(s),_.HandleCodeResponse,this.logger,this.performanceClient,r)(u,t)}}/*! @azure/msal-browser v3.30.0 2025-08-05 */class FI extends No{async acquireToken(e){this.performanceClient.addQueueMeasurement(_.SilentRefreshClientAcquireToken,e.correlationId);const t=await q(ql,_.InitializeBaseRequest,this.logger,this.performanceClient,e.correlationId)(e,this.config,this.performanceClient,this.logger),r={...e,...t};e.redirectUri&&(r.redirectUri=this.getRedirectUri(e.redirectUri));const o=this.initializeServerTelemetryManager(He.acquireTokenSilent_silentFlow),i=await this.createRefreshTokenClient({serverTelemetryManager:o,authorityUrl:r.authority,azureCloudOptions:r.azureCloudOptions,account:r.account});return q(i.acquireTokenByRefreshToken.bind(i),_.RefreshTokenClientAcquireTokenByRefreshToken,this.logger,this.performanceClient,e.correlationId)(r).catch(s=>{throw s.setCorrelationId(this.correlationId),o.cacheFailedRequest(s),s})}logout(){return Promise.reject(Y(na))}async createRefreshTokenClient(e){const t=await q(this.getClientConfiguration.bind(this),_.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:e.serverTelemetryManager,requestAuthority:e.authorityUrl,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account});return new vc(t,this.performanceClient)}}/*! @azure/msal-browser v3.30.0 2025-08-05 */class BI{constructor(e,t,r,o){this.isBrowserEnvironment=typeof window<"u",this.config=e,this.storage=t,this.logger=r,this.cryptoObj=o}loadExternalTokens(e,t,r){if(!this.isBrowserEnvironment)throw Y(ra);const o=e.correlationId||In(),i=t.id_token?qr(t.id_token,_n):void 0,s={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},a=e.authority?new pt(pt.generateAuthority(e.authority,e.azureCloudOptions),this.config.system.networkClient,this.storage,s,this.logger,e.correlationId||In()):void 0,c=this.loadAccount(e,r.clientInfo||t.client_info||"",o,i,a),l=this.loadIdToken(t,c.homeAccountId,c.environment,c.realm,o),u=this.loadAccessToken(e,t,c.homeAccountId,c.environment,c.realm,r,o),d=this.loadRefreshToken(t,c.homeAccountId,c.environment,o);return this.generateAuthenticationResult(e,{account:c,idToken:l,accessToken:u,refreshToken:d},i,a)}loadAccount(e,t,r,o,i){if(this.logger.verbose("TokenCache - loading account"),e.account){const l=rt.createFromAccountInfo(e.account);return this.storage.setAccount(l,r),l}else if(!i||!t&&!o)throw this.logger.error("TokenCache - if an account is not provided on the request, authority and either clientInfo or idToken must be provided instead."),Y(Lp);const s=rt.generateHomeAccountId(t,i.authorityType,this.logger,this.cryptoObj,o),a=o==null?void 0:o.tid,c=Il(this.storage,i,s,_n,r,o,t,i.hostnameAndPort,a,void 0,void 0,this.logger);return this.storage.setAccount(c,r),c}loadIdToken(e,t,r,o,i){if(!e.id_token)return this.logger.verbose("TokenCache - no id token found in response"),null;this.logger.verbose("TokenCache - loading id token");const s=Ws(t,r,e.id_token,this.config.auth.clientId,o);return this.storage.setIdTokenCredential(s,i),s}loadAccessToken(e,t,r,o,i,s,a){if(t.access_token)if(t.expires_in){if(!t.scope&&(!e.scopes||!e.scopes.length))return this.logger.error("TokenCache - scopes not specified in the request or response. Cannot add token to the cache."),null}else return this.logger.error("TokenCache - no expiration set on the access token. Cannot add it to the cache."),null;else return this.logger.verbose("TokenCache - no access token found in response"),null;this.logger.verbose("TokenCache - loading access token");const c=t.scope?Ye.fromString(t.scope):new Ye(e.scopes),l=s.expiresOn||t.expires_in+new Date().getTime()/1e3,u=s.extendedExpiresOn||(t.ext_expires_in||t.expires_in)+new Date().getTime()/1e3,d=Ys(r,o,t.access_token,this.config.auth.clientId,i,c.printScopes(),l,u,_n);return this.storage.setAccessTokenCredential(d,a),d}loadRefreshToken(e,t,r,o){if(!e.refresh_token)return this.logger.verbose("TokenCache - no refresh token found in response"),null;this.logger.verbose("TokenCache - loading refresh token");const i=jg(t,r,e.refresh_token,this.config.auth.clientId,e.foci,void 0,e.refresh_token_expires_in);return this.storage.setRefreshTokenCredential(i,o),i}generateAuthenticationResult(e,t,r,o){var u,d,h;let i="",s=[],a=null,c;t!=null&&t.accessToken&&(i=t.accessToken.secret,s=Ye.fromString(t.accessToken.target).asArray(),a=new Date(Number(t.accessToken.expiresOn)*1e3),c=new Date(Number(t.accessToken.extendedExpiresOn)*1e3));const l=t.account;return{authority:o?o.canonicalAuthority:"",uniqueId:t.account.localAccountId,tenantId:t.account.realm,scopes:s,account:l.getAccountInfo(),idToken:((u=t.idToken)==null?void 0:u.secret)||"",idTokenClaims:r||{},accessToken:i,fromCache:!0,expiresOn:a,correlationId:e.correlationId||"",requestId:"",extExpiresOn:c,familyId:((d=t.refreshToken)==null?void 0:d.familyId)||"",tokenType:((h=t==null?void 0:t.accessToken)==null?void 0:h.tokenType)||"",state:e.state||"",cloudGraphHostName:l.cloudGraphHostName||"",msGraphHost:l.msGraphHost||"",fromNativeBroker:!1}}}/*! @azure/msal-browser v3.30.0 2025-08-05 */class KI extends mp{constructor(e){super(e),this.includeRedirectUri=!1}}/*! @azure/msal-browser v3.30.0 2025-08-05 */class qI extends No{constructor(e,t,r,o,i,s,a,c,l,u){super(e,t,r,o,i,s,c,l,u),this.apiId=a}async acquireToken(e){if(!e.code)throw Y(Up);const t=await q(this.initializeAuthorizationRequest.bind(this),_.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,e.correlationId)(e,ee.Silent),r=this.initializeServerTelemetryManager(this.apiId);try{const o={...t,code:e.code},i=await q(this.getClientConfiguration.bind(this),_.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:r,requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account}),s=new KI(i);this.logger.verbose("Auth code client created");const a=new $l(s,this.browserStorage,o,this.logger,this.performanceClient);return await q(a.handleCodeResponseFromServer.bind(a),_.HandleCodeResponseFromServer,this.logger,this.performanceClient,e.correlationId)({code:e.code,msgraph_host:e.msGraphHost,cloud_graph_host_name:e.cloudGraphHostName,cloud_instance_host_name:e.cloudInstanceHostName},t,!1)}catch(o){throw o instanceof Fe&&(o.setCorrelationId(this.correlationId),r.cacheFailedRequest(o)),o}}logout(){return Promise.reject(Y(na))}}/*! @azure/msal-browser v3.30.0 2025-08-05 */function dn(n){const e=n==null?void 0:n.idTokenClaims;if(e!=null&&e.tfp||e!=null&&e.acr)return"B2C";if(e!=null&&e.tid){if((e==null?void 0:e.tid)==="9188040d-6c67-4c5b-b112-36a304b66dad")return"MSA"}else return;return"AAD"}function Vi(n,e){try{Bl(n)}catch(t){throw e.end({success:!1},t),t}}class ia{constructor(e){this.operatingContext=e,this.isBrowserEnvironment=this.operatingContext.isBrowserEnvironment(),this.config=e.getConfig(),this.initialized=!1,this.logger=this.operatingContext.getLogger(),this.networkClient=this.config.system.networkClient,this.navigationClient=this.config.system.navigationClient,this.redirectResponse=new Map,this.hybridAuthCodeResponses=new Map,this.performanceClient=this.config.telemetry.client,this.browserCrypto=this.isBrowserEnvironment?new Ro(this.logger,this.performanceClient):gs,this.eventHandler=new gI(this.logger),this.browserStorage=this.isBrowserEnvironment?new bc(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger,eb(this.config.auth),this.performanceClient):sI(this.config.auth.clientId,this.logger);const t={cacheLocation:Ot.MemoryStorage,temporaryCacheLocation:Ot.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};this.nativeInternalStorage=new bc(this.config.auth.clientId,t,this.browserCrypto,this.logger,void 0,this.performanceClient),this.tokenCache=new BI(this.config,this.browserStorage,this.logger,this.browserCrypto),this.activeSilentTokenRequests=new Map,this.trackPageVisibility=this.trackPageVisibility.bind(this),this.trackPageVisibilityWithMeasurement=this.trackPageVisibilityWithMeasurement.bind(this),this.listeningToStorageEvents=!1,this.handleAccountCacheChange=this.handleAccountCacheChange.bind(this)}static async createController(e,t){const r=new ia(e);return await r.initialize(t),r}trackPageVisibility(e){e&&(this.logger.info("Perf: Visibility change detected"),this.performanceClient.incrementFields({visibilityChangeCount:1},e))}async initialize(e){if(this.logger.trace("initialize called"),this.initialized){this.logger.info("initialize has already been called, exiting early.");return}if(!this.isBrowserEnvironment){this.logger.info("in non-browser environment, exiting early."),this.initialized=!0,this.eventHandler.emitEvent(oe.INITIALIZE_END);return}const t=(e==null?void 0:e.correlationId)||this.getRequestCorrelationId(),r=this.config.system.allowNativeBroker,o=this.performanceClient.startMeasurement(_.InitializeClientApplication,t);if(this.eventHandler.emitEvent(oe.INITIALIZE_START),r)try{this.nativeExtensionProvider=await En.createProvider(this.logger,this.config.system.nativeBrokerHandshakeTimeout,this.performanceClient)}catch(i){this.logger.verbose(i)}this.config.cache.claimsBasedCachingEnabled||(this.logger.verbose("Claims-based caching is disabled. Clearing the previous cache with claims"),await q(this.browserStorage.clearTokensAndKeysWithClaims.bind(this.browserStorage),_.ClearTokensAndKeysWithClaims,this.logger,this.performanceClient,t)(this.performanceClient,t)),this.initialized=!0,this.eventHandler.emitEvent(oe.INITIALIZE_END),o.end({allowNativeBroker:r,success:!0})}async handleRedirectPromise(e){if(this.logger.verbose("handleRedirectPromise called"),nm(this.initialized),this.isBrowserEnvironment){const t=e||"";let r=this.redirectResponse.get(t);return typeof r>"u"?(r=this.handleRedirectPromiseInternal(e),this.redirectResponse.set(t,r),this.logger.verbose("handleRedirectPromise has been called for the first time, storing the promise")):this.logger.verbose("handleRedirectPromise has been called previously, returning the result from the first call"),r}return this.logger.verbose("handleRedirectPromise returns null, not browser environment"),null}async handleRedirectPromiseInternal(e){const t=this.getAllAccounts(),r=this.browserStorage.getCachedNativeRequest(),o=r&&En.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider)&&this.nativeExtensionProvider&&!e,i=o?r==null?void 0:r.correlationId:this.browserStorage.getTemporaryCache(ke.CORRELATION_ID,!0)||"",s=this.performanceClient.startMeasurement(_.AcquireTokenRedirect,i);this.eventHandler.emitEvent(oe.HANDLE_REDIRECT_START,ee.Redirect);let a;if(o&&this.nativeExtensionProvider){this.logger.trace("handleRedirectPromise - acquiring token from native platform");const c=new lo(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,He.handleRedirectPromise,this.performanceClient,this.nativeExtensionProvider,r.accountId,this.nativeInternalStorage,r.correlationId);a=q(c.handleRedirectPromise.bind(c),_.HandleNativeRedirectPromiseMeasurement,this.logger,this.performanceClient,s.event.correlationId)(this.performanceClient,s.event.correlationId)}else{this.logger.trace("handleRedirectPromise - acquiring token from web flow");const c=this.createRedirectClient(i);a=q(c.handleRedirectPromise.bind(c),_.HandleRedirectPromiseMeasurement,this.logger,this.performanceClient,s.event.correlationId)(e,s)}return a.then(c=>(c?(t.length{const l=c;throw t.length>0?this.eventHandler.emitEvent(oe.ACQUIRE_TOKEN_FAILURE,ee.Redirect,null,l):this.eventHandler.emitEvent(oe.LOGIN_FAILURE,ee.Redirect,null,l),this.eventHandler.emitEvent(oe.HANDLE_REDIRECT_END,ee.Redirect),s.end({success:!1},l),c})}async acquireTokenRedirect(e){const t=this.getRequestCorrelationId(e);this.logger.verbose("acquireTokenRedirect called",t);const r=this.performanceClient.startMeasurement(_.AcquireTokenPreRedirect,t);r.add({accountType:dn(e.account),scenarioId:e.scenarioId});const o=e.onRedirectNavigate;if(o)e.onRedirectNavigate=s=>{const a=typeof o=="function"?o(s):void 0;return a!==!1?r.end({success:!0}):r.discard(),a};else{const s=this.config.auth.onRedirectNavigate;this.config.auth.onRedirectNavigate=a=>{const c=typeof s=="function"?s(a):void 0;return c!==!1?r.end({success:!0}):r.discard(),c}}const i=this.getAllAccounts().length>0;try{Jd(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0),i?this.eventHandler.emitEvent(oe.ACQUIRE_TOKEN_START,ee.Redirect,e):this.eventHandler.emitEvent(oe.LOGIN_START,ee.Redirect,e);let s;return this.nativeExtensionProvider&&this.canUseNative(e)?s=new lo(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,He.acquireTokenRedirect,this.performanceClient,this.nativeExtensionProvider,this.getNativeAccountId(e),this.nativeInternalStorage,t).acquireTokenRedirect(e,r).catch(c=>{if(c instanceof An&&Zr(c))return this.nativeExtensionProvider=void 0,this.createRedirectClient(t).acquireToken(e);if(c instanceof cn)return this.logger.verbose("acquireTokenRedirect - Resolving interaction required error thrown by native broker by falling back to web flow"),this.createRedirectClient(t).acquireToken(e);throw this.browserStorage.setInteractionInProgress(!1),c}):s=this.createRedirectClient(t).acquireToken(e),await s}catch(s){throw r.end({success:!1},s),i?this.eventHandler.emitEvent(oe.ACQUIRE_TOKEN_FAILURE,ee.Redirect,null,s):this.eventHandler.emitEvent(oe.LOGIN_FAILURE,ee.Redirect,null,s),s}}acquireTokenPopup(e){const t=this.getRequestCorrelationId(e),r=this.performanceClient.startMeasurement(_.AcquireTokenPopup,t);r.add({scenarioId:e.scenarioId,accountType:dn(e.account)});try{this.logger.verbose("acquireTokenPopup called",t),Vi(this.initialized,r),this.browserStorage.setInteractionInProgress(!0)}catch(s){return Promise.reject(s)}const o=this.getAllAccounts();o.length>0?this.eventHandler.emitEvent(oe.ACQUIRE_TOKEN_START,ee.Popup,e):this.eventHandler.emitEvent(oe.LOGIN_START,ee.Popup,e);let i;return this.canUseNative(e)?i=this.acquireTokenNative({...e,correlationId:t},He.acquireTokenPopup).then(s=>(this.browserStorage.setInteractionInProgress(!1),r.end({success:!0,isNativeBroker:!0,accountType:dn(s.account)}),s)).catch(s=>{if(s instanceof An&&Zr(s))return this.nativeExtensionProvider=void 0,this.createPopupClient(t).acquireToken(e);if(s instanceof cn)return this.logger.verbose("acquireTokenPopup - Resolving interaction required error thrown by native broker by falling back to web flow"),this.createPopupClient(t).acquireToken(e);throw this.browserStorage.setInteractionInProgress(!1),s}):i=this.createPopupClient(t).acquireToken(e),i.then(s=>(o.length(o.length>0?this.eventHandler.emitEvent(oe.ACQUIRE_TOKEN_FAILURE,ee.Popup,null,s):this.eventHandler.emitEvent(oe.LOGIN_FAILURE,ee.Popup,null,s),r.end({success:!1},s),Promise.reject(s)))}trackPageVisibilityWithMeasurement(){const e=this.ssoSilentMeasurement||this.acquireTokenByCodeAsyncMeasurement;e&&(this.logger.info("Perf: Visibility change detected in ",e.event.name),e.increment({visibilityChangeCount:1}))}async ssoSilent(e){var i,s;const t=this.getRequestCorrelationId(e),r={...e,prompt:e.prompt,correlationId:t};this.ssoSilentMeasurement=this.performanceClient.startMeasurement(_.SsoSilent,t),(i=this.ssoSilentMeasurement)==null||i.add({scenarioId:e.scenarioId,accountType:dn(e.account)}),Vi(this.initialized,this.ssoSilentMeasurement),(s=this.ssoSilentMeasurement)==null||s.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),this.logger.verbose("ssoSilent called",t),this.eventHandler.emitEvent(oe.SSO_SILENT_START,ee.Silent,r);let o;return this.canUseNative(r)?o=this.acquireTokenNative(r,He.ssoSilent).catch(a=>{if(a instanceof An&&Zr(a))return this.nativeExtensionProvider=void 0,this.createSilentIframeClient(r.correlationId).acquireToken(r);throw a}):o=this.createSilentIframeClient(r.correlationId).acquireToken(r),o.then(a=>{var c;return this.eventHandler.emitEvent(oe.SSO_SILENT_SUCCESS,ee.Silent,a),(c=this.ssoSilentMeasurement)==null||c.end({success:!0,isNativeBroker:a.fromNativeBroker,accessTokenSize:a.accessToken.length,idTokenSize:a.idToken.length,accountType:dn(a.account)}),a}).catch(a=>{var c;throw this.eventHandler.emitEvent(oe.SSO_SILENT_FAILURE,ee.Silent,null,a),(c=this.ssoSilentMeasurement)==null||c.end({success:!1},a),a}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})}async acquireTokenByCode(e){const t=this.getRequestCorrelationId(e);this.logger.trace("acquireTokenByCode called",t);const r=this.performanceClient.startMeasurement(_.AcquireTokenByCode,t);Vi(this.initialized,r),this.eventHandler.emitEvent(oe.ACQUIRE_TOKEN_BY_CODE_START,ee.Silent,e),r.add({scenarioId:e.scenarioId});try{if(e.code&&e.nativeAccountId)throw Y(Fp);if(e.code){const o=e.code;let i=this.hybridAuthCodeResponses.get(o);return i?(this.logger.verbose("Existing acquireTokenByCode request found",t),r.discard()):(this.logger.verbose("Initiating new acquireTokenByCode request",t),i=this.acquireTokenByCodeAsync({...e,correlationId:t}).then(s=>(this.eventHandler.emitEvent(oe.ACQUIRE_TOKEN_BY_CODE_SUCCESS,ee.Silent,s),this.hybridAuthCodeResponses.delete(o),r.end({success:!0,isNativeBroker:s.fromNativeBroker,accessTokenSize:s.accessToken.length,idTokenSize:s.idToken.length,accountType:dn(s.account)}),s)).catch(s=>{throw this.hybridAuthCodeResponses.delete(o),this.eventHandler.emitEvent(oe.ACQUIRE_TOKEN_BY_CODE_FAILURE,ee.Silent,null,s),r.end({success:!1},s),s}),this.hybridAuthCodeResponses.set(o,i)),await i}else if(e.nativeAccountId)if(this.canUseNative(e,e.nativeAccountId)){const o=await this.acquireTokenNative({...e,correlationId:t},He.acquireTokenByCode,e.nativeAccountId).catch(i=>{throw i instanceof An&&Zr(i)&&(this.nativeExtensionProvider=void 0),i});return r.end({accountType:dn(o.account),success:!0}),o}else throw Y(Bp);else throw Y(Hp)}catch(o){throw this.eventHandler.emitEvent(oe.ACQUIRE_TOKEN_BY_CODE_FAILURE,ee.Silent,null,o),r.end({success:!1},o),o}}async acquireTokenByCodeAsync(e){var o;return this.logger.trace("acquireTokenByCodeAsync called",e.correlationId),this.acquireTokenByCodeAsyncMeasurement=this.performanceClient.startMeasurement(_.AcquireTokenByCodeAsync,e.correlationId),(o=this.acquireTokenByCodeAsyncMeasurement)==null||o.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),await this.createSilentAuthCodeClient(e.correlationId).acquireToken(e).then(i=>{var s;return(s=this.acquireTokenByCodeAsyncMeasurement)==null||s.end({success:!0,fromCache:i.fromCache,isNativeBroker:i.fromNativeBroker}),i}).catch(i=>{var s;throw(s=this.acquireTokenByCodeAsyncMeasurement)==null||s.end({success:!1},i),i}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})}async acquireTokenFromCache(e,t){switch(this.performanceClient.addQueueMeasurement(_.AcquireTokenFromCache,e.correlationId),t){case Dt.Default:case Dt.AccessToken:case Dt.AccessTokenAndRefreshToken:const r=this.createSilentCacheClient(e.correlationId);return q(r.acquireToken.bind(r),_.SilentCacheClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(e);default:throw H(Fn)}}async acquireTokenByRefreshToken(e,t){switch(this.performanceClient.addQueueMeasurement(_.AcquireTokenByRefreshToken,e.correlationId),t){case Dt.Default:case Dt.AccessTokenAndRefreshToken:case Dt.RefreshToken:case Dt.RefreshTokenAndNetwork:const r=this.createSilentRefreshClient(e.correlationId);return q(r.acquireToken.bind(r),_.SilentRefreshClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(e);default:throw H(Fn)}}async acquireTokenBySilentIframe(e){this.performanceClient.addQueueMeasurement(_.AcquireTokenBySilentIframe,e.correlationId);const t=this.createSilentIframeClient(e.correlationId);return q(t.acquireToken.bind(t),_.SilentIframeClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(e)}async logout(e){const t=this.getRequestCorrelationId(e);return this.logger.warning("logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.",t),this.logoutRedirect({correlationId:t,...e})}async logoutRedirect(e){const t=this.getRequestCorrelationId(e);return Jd(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0),this.createRedirectClient(t).logout(e)}logoutPopup(e){try{const t=this.getRequestCorrelationId(e);return Bl(this.initialized),this.browserStorage.setInteractionInProgress(!0),this.createPopupClient(t).logout(e)}catch(t){return Promise.reject(t)}}async clearCache(e){if(!this.isBrowserEnvironment){this.logger.info("in non-browser environment, returning early.");return}const t=this.getRequestCorrelationId(e);return this.createSilentCacheClient(t).logout(e)}getAllAccounts(e){const t=this.getRequestCorrelationId();return aI(this.logger,this.browserStorage,this.isBrowserEnvironment,t,e)}getAccount(e){const t=this.getRequestCorrelationId();return cI(e,this.logger,this.browserStorage,t)}getAccountByUsername(e){const t=this.getRequestCorrelationId();return lI(e,this.logger,this.browserStorage,t)}getAccountByHomeId(e){const t=this.getRequestCorrelationId();return uI(e,this.logger,this.browserStorage,t)}getAccountByLocalId(e){const t=this.getRequestCorrelationId();return dI(e,this.logger,this.browserStorage,t)}setActiveAccount(e){const t=this.getRequestCorrelationId();hI(e,this.browserStorage,t)}getActiveAccount(){const e=this.getRequestCorrelationId();return fI(this.browserStorage,e)}async hydrateCache(e,t){this.logger.verbose("hydrateCache called");const r=rt.createFromAccountInfo(e.account,e.cloudGraphHostName,e.msGraphHost);return this.browserStorage.setAccount(r,e.correlationId),e.fromNativeBroker?(this.logger.verbose("Response was from native broker, storing in-memory"),this.nativeInternalStorage.hydrateCache(e,t)):this.browserStorage.hydrateCache(e,t)}async acquireTokenNative(e,t,r){if(this.logger.trace("acquireTokenNative called"),!this.nativeExtensionProvider)throw Y(ki);return new lo(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,t,this.performanceClient,this.nativeExtensionProvider,r||this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId).acquireToken(e)}canUseNative(e,t){if(this.logger.trace("canUseNative called"),!En.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,e.authenticationScheme))return this.logger.trace("canUseNative: isNativeAvailable returned false, returning false"),!1;if(e.prompt)switch(e.prompt){case at.NONE:case at.CONSENT:case at.LOGIN:this.logger.trace("canUseNative: prompt is compatible with native flow");break;default:return this.logger.trace(`canUseNative: prompt = ${e.prompt} is not compatible with native flow, returning false`),!1}return!t&&!this.getNativeAccountId(e)?(this.logger.trace("canUseNative: nativeAccountId is not available, returning false"),!1):!0}getNativeAccountId(e){const t=e.account||this.getAccount({loginHint:e.loginHint,sid:e.sid})||this.getActiveAccount();return t&&t.nativeAccountId||""}createPopupClient(e){return new OI(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createRedirectClient(e){return new NI(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createSilentIframeClient(e){return new HI(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,He.ssoSilent,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createSilentCacheClient(e){return new am(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)}createSilentRefreshClient(e){return new FI(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)}createSilentAuthCodeClient(e){return new qI(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,He.acquireTokenByCode,this.performanceClient,this.nativeExtensionProvider,e)}addEventCallback(e,t){return this.eventHandler.addEventCallback(e,t)}removeEventCallback(e){this.eventHandler.removeEventCallback(e)}addPerformanceCallback(e){return tm(),this.performanceClient.addPerformanceCallback(e)}removePerformanceCallback(e){return this.performanceClient.removePerformanceCallback(e)}enableAccountStorageEvents(){typeof window>"u"||(this.listeningToStorageEvents?this.logger.verbose("Account storage listener already registered."):(this.logger.verbose("Adding account storage listener."),this.listeningToStorageEvents=!0,window.addEventListener("storage",this.handleAccountCacheChange)))}disableAccountStorageEvents(){typeof window>"u"||(this.listeningToStorageEvents?(this.logger.verbose("Removing account storage listener."),window.removeEventListener("storage",this.handleAccountCacheChange),this.listeningToStorageEvents=!1):this.logger.verbose("No account storage listener registered."))}handleAccountCacheChange(e){var t;try{(t=e.key)!=null&&t.includes(it.ACTIVE_ACCOUNT_FILTERS)&&this.eventHandler.emitEvent(oe.ACTIVE_ACCOUNT_CHANGED);const r=e.newValue||e.oldValue;if(!r)return;const o=JSON.parse(r);if(typeof o!="object"||!rt.isAccountEntity(o))return;const s=bo.toObject(new rt,o).getAccountInfo();!e.oldValue&&e.newValue?(this.logger.info("Account was added to cache in a different window"),this.eventHandler.emitEvent(oe.ACCOUNT_ADDED,void 0,s)):!e.newValue&&e.oldValue&&(this.logger.info("Account was removed from cache in a different window"),this.eventHandler.emitEvent(oe.ACCOUNT_REMOVED,void 0,s))}catch{return}}getTokenCache(){return this.tokenCache}getLogger(){return this.logger}setLogger(e){this.logger=e}initializeWrapperLibrary(e,t){this.browserStorage.setWrapperMetadata(e,t)}setNavigationClient(e){this.navigationClient=e}getConfiguration(){return this.config}getPerformanceClient(){return this.performanceClient}isBrowserEnv(){return this.isBrowserEnvironment}getRequestCorrelationId(e){return e!=null&&e.correlationId?e.correlationId:this.isBrowserEnvironment?In():R.EMPTY_STRING}async loginRedirect(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginRedirect called",t),this.acquireTokenRedirect({correlationId:t,...e||Qd})}loginPopup(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginPopup called",t),this.acquireTokenPopup({correlationId:t,...e||Qd})}async acquireTokenSilent(e){const t=this.getRequestCorrelationId(e),r=this.performanceClient.startMeasurement(_.AcquireTokenSilent,t);r.add({cacheLookupPolicy:e.cacheLookupPolicy,scenarioId:e.scenarioId}),Vi(this.initialized,r),this.logger.verbose("acquireTokenSilent called",t);const o=e.account||this.getActiveAccount();if(!o)throw Y(Pp);r.add({accountType:dn(o)});const i={clientId:this.config.auth.clientId,authority:e.authority||R.EMPTY_STRING,scopes:e.scopes,homeAccountIdentifier:o.homeAccountId,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid,shrOptions:e.shrOptions},s=JSON.stringify(i),a=this.activeSilentTokenRequests.get(s);if(typeof a>"u"){this.logger.verbose("acquireTokenSilent called for the first time, storing active request",t);const c=q(this.acquireTokenSilentAsync.bind(this),_.AcquireTokenSilentAsync,this.logger,this.performanceClient,t)({...e,correlationId:t},o).then(l=>(this.activeSilentTokenRequests.delete(s),r.end({success:!0,fromCache:l.fromCache,isNativeBroker:l.fromNativeBroker,cacheLookupPolicy:e.cacheLookupPolicy,accessTokenSize:l.accessToken.length,idTokenSize:l.idToken.length}),l)).catch(l=>{throw this.activeSilentTokenRequests.delete(s),r.end({success:!1},l),l});return this.activeSilentTokenRequests.set(s,c),{...await c,state:e.state}}else return this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call",t),r.discard(),{...await a,state:e.state}}async acquireTokenSilentAsync(e,t){const r=()=>this.trackPageVisibility(e.correlationId);this.performanceClient.addQueueMeasurement(_.AcquireTokenSilentAsync,e.correlationId),this.eventHandler.emitEvent(oe.ACQUIRE_TOKEN_START,ee.Silent,e),e.correlationId&&this.performanceClient.incrementFields({visibilityChangeCount:0},e.correlationId),document.addEventListener("visibilitychange",r);const o=await q(vI,_.InitializeSilentRequest,this.logger,this.performanceClient,e.correlationId)(e,t,this.config,this.performanceClient,this.logger),i=e.cacheLookupPolicy||Dt.Default;return this.acquireTokenSilentNoIframe(o,i).catch(async a=>{if($I(a,i))if(this.activeIframeRequest)if(i!==Dt.Skip){const[l,u]=this.activeIframeRequest;this.logger.verbose(`Iframe request is already in progress, awaiting resolution for request with correlationId: ${u}`,o.correlationId);const d=this.performanceClient.startMeasurement(_.AwaitConcurrentIframe,o.correlationId);d.add({awaitIframeCorrelationId:u});const h=await l;if(d.end({success:h}),h)return this.logger.verbose(`Parallel iframe request with correlationId: ${u} succeeded. Retrying cache and/or RT redemption`,o.correlationId),this.acquireTokenSilentNoIframe(o,i);throw this.logger.info(`Iframe request with correlationId: ${u} failed. Interaction is required.`),a}else return this.logger.warning("Another iframe request is currently in progress and CacheLookupPolicy is set to Skip. This may result in degraded performance and/or reliability for both calls. Please consider changing the CacheLookupPolicy to take advantage of request queuing and token cache.",o.correlationId),q(this.acquireTokenBySilentIframe.bind(this),_.AcquireTokenBySilentIframe,this.logger,this.performanceClient,o.correlationId)(o);else{let l;return this.activeIframeRequest=[new Promise(u=>{l=u}),o.correlationId],this.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",o.correlationId),q(this.acquireTokenBySilentIframe.bind(this),_.AcquireTokenBySilentIframe,this.logger,this.performanceClient,o.correlationId)(o).then(u=>(l(!0),u)).catch(u=>{throw l(!1),u}).finally(()=>{this.activeIframeRequest=void 0})}else throw a}).then(a=>(this.eventHandler.emitEvent(oe.ACQUIRE_TOKEN_SUCCESS,ee.Silent,a),e.correlationId&&this.performanceClient.addFields({fromCache:a.fromCache,isNativeBroker:a.fromNativeBroker},e.correlationId),a)).catch(a=>{throw this.eventHandler.emitEvent(oe.ACQUIRE_TOKEN_FAILURE,ee.Silent,null,a),a}).finally(()=>{document.removeEventListener("visibilitychange",r)})}async acquireTokenSilentNoIframe(e,t){return En.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,e.authenticationScheme)&&e.account.nativeAccountId?(this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform"),this.acquireTokenNative(e,He.acquireTokenSilent_silentFlow).catch(async r=>{throw r instanceof An&&Zr(r)?(this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow"),this.nativeExtensionProvider=void 0,H(Fn)):r})):(this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),q(this.acquireTokenFromCache.bind(this),_.AcquireTokenFromCache,this.logger,this.performanceClient,e.correlationId)(e,t).catch(r=>{if(t===Dt.AccessToken)throw r;return this.eventHandler.emitEvent(oe.ACQUIRE_TOKEN_NETWORK_START,ee.Silent,e),q(this.acquireTokenByRefreshToken.bind(this),_.AcquireTokenByRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,t)}))}}function $I(n,e){const t=!(n instanceof cn&&n.subError!==ea),r=n.errorCode===Ft.INVALID_GRANT_ERROR||n.errorCode===Fn,o=t&&r||n.errorCode===vs||n.errorCode===bl,i=_b.includes(e);return o&&i}/*! @azure/msal-browser v3.30.0 2025-08-05 */async function jI(n,e){const t=new Br(n);return await t.initialize(),ia.createController(t,e)}/*! @azure/msal-browser v3.30.0 2025-08-05 */class jl{static async createPublicClientApplication(e){const t=await jI(e);return new jl(e,t)}constructor(e,t){this.controller=t||new ia(new Br(e))}async initialize(e){return this.controller.initialize(e)}async acquireTokenPopup(e){return this.controller.acquireTokenPopup(e)}acquireTokenRedirect(e){return this.controller.acquireTokenRedirect(e)}acquireTokenSilent(e){return this.controller.acquireTokenSilent(e)}acquireTokenByCode(e){return this.controller.acquireTokenByCode(e)}addEventCallback(e,t){return this.controller.addEventCallback(e,t)}removeEventCallback(e){return this.controller.removeEventCallback(e)}addPerformanceCallback(e){return this.controller.addPerformanceCallback(e)}removePerformanceCallback(e){return this.controller.removePerformanceCallback(e)}enableAccountStorageEvents(){this.controller.enableAccountStorageEvents()}disableAccountStorageEvents(){this.controller.disableAccountStorageEvents()}getAccount(e){return this.controller.getAccount(e)}getAccountByHomeId(e){return this.controller.getAccountByHomeId(e)}getAccountByLocalId(e){return this.controller.getAccountByLocalId(e)}getAccountByUsername(e){return this.controller.getAccountByUsername(e)}getAllAccounts(e){return this.controller.getAllAccounts(e)}handleRedirectPromise(e){return this.controller.handleRedirectPromise(e)}loginPopup(e){return this.controller.loginPopup(e)}loginRedirect(e){return this.controller.loginRedirect(e)}logout(e){return this.controller.logout(e)}logoutRedirect(e){return this.controller.logoutRedirect(e)}logoutPopup(e){return this.controller.logoutPopup(e)}ssoSilent(e){return this.controller.ssoSilent(e)}getTokenCache(){return this.controller.getTokenCache()}getLogger(){return this.controller.getLogger()}setLogger(e){this.controller.setLogger(e)}setActiveAccount(e){this.controller.setActiveAccount(e)}getActiveAccount(){return this.controller.getActiveAccount()}initializeWrapperLibrary(e,t){return this.controller.initializeWrapperLibrary(e,t)}setNavigationClient(e){this.controller.setNavigationClient(e)}getConfiguration(){return this.controller.getConfiguration()}async hydrateCache(e,t){return this.controller.hydrateCache(e,t)}clearCache(e){return this.controller.clearCache(e)}}const Es=new jl({auth:{clientId:"9079054c-9620-4757-a256-23413042f1ef",authority:"https://login.microsoftonline.com/e519c2e6-bc6d-4fdf-8d9c-923c2f002385",redirectUri:"https://optical-dev.oliver.solutions/cc-dashboard/"},cache:{cacheLocation:"sessionStorage",storeAuthStateInCookie:!1}}),GI=["openid","profile","email"];async function VI(){await Es.initialize(),await Es.handleRedirectPromise()}const um=WC("auth",()=>{const n=Oe(null),e=Oe(null),t=Oe(!1),r=Oe(null),o=Te(()=>n.value!==null),i=Te(()=>{var u;return((u=e.value)==null?void 0:u.role)==="admin"});async function s(){var u,d;t.value=!0,r.value=null;try{const f=(await Es.loginPopup({scopes:GI})).idToken,C=await ds.post("/api/auth/microsoft",{id_token:f});n.value=C.data.access_token,await c()}catch(h){const f=h;throw r.value=((d=(u=f.response)==null?void 0:u.data)==null?void 0:d.detail)??f.message??"Login failed",h}finally{t.value=!1}}async function a(){n.value=null,e.value=null;try{await Es.clearCache()}catch{}}async function c(){const u=await ds.get("/api/auth/me");e.value=u.data}function l(){return n.value}return{token:n,user:e,loading:t,error:r,isAuthenticated:o,isAdmin:i,loginWithMicrosoft:s,logout:a,fetchMe:c,getToken:l}}),zI=[{path:"/login",name:"login",component:()=>Gt(()=>import("./LoginView-BX1BQo9f.js"),__vite__mapDeps([0,1,2])),meta:{public:!0}},{path:"/",component:()=>Gt(()=>import("./AppLayout-wYWKlGO6.js"),[]),children:[{path:"",name:"dashboard",component:()=>Gt(()=>import("./DashboardView-BsUJ2kCa.js"),__vite__mapDeps([3,4,1,2,5,6,7,8,9,10]))},{path:"calendar",name:"calendar",component:()=>Gt(()=>import("./CalendarView-9h-6kWBL.js"),__vite__mapDeps([11,4,2,7,8,9,12,13,14,15,10,16]))},{path:"projects",name:"projects",component:()=>Gt(()=>import("./ProjectsView-B6APDx1k.js"),__vite__mapDeps([17,4,1,2,6,8]))},{path:"projects/:id/:date?",name:"project-detail",component:()=>Gt(()=>import("./ProjectDetailView-CdSz2pYH.js"),__vite__mapDeps([18,4,1,2,5,8]))},{path:"live",name:"live",component:()=>Gt(()=>import("./LiveView-DtdoVW56.js"),__vite__mapDeps([19,1,2,7,8]))},{path:"reports",name:"reports",component:()=>Gt(()=>import("./ReportsView-g7JsvGXC.js"),__vite__mapDeps([20,1,2,13,7,8,12,21]))},{path:"keys",name:"keys",component:()=>Gt(()=>import("./KeysView-Bo8BcbFR.js"),__vite__mapDeps([22,23,1,2,7,8,14,15]))},{path:"devops",name:"devops",component:()=>Gt(()=>import("./DevopsView-BtWCUdc6.js"),__vite__mapDeps([24,10,1,2,5,7,8,25,15]))},{path:"settings",name:"settings",component:()=>Gt(()=>import("./SettingsView-DINReUal.js"),__vite__mapDeps([26,10,1,2,5,15,7,8,25]))},{path:"admin",name:"admin",component:()=>Gt(()=>import("./AdminView-Bw7ch0XQ.js"),__vite__mapDeps([27,23,1,2,13,8])),meta:{adminOnly:!0}}]},{path:"/:pathMatch(.*)*",redirect:"/"}],Sc=PA({history:lA("/cc-dashboard/"),routes:zI});Sc.beforeEach((n,e,t)=>{const r=um();if(n.meta.public){t();return}if(!r.isAuthenticated){t({name:"login",query:{redirect:n.fullPath}});return}if(n.meta.adminOnly&&!r.isAdmin){t({name:"dashboard"});return}t()});VI().then(()=>{const n=BC(wT),e=$C();n.use(e),n.use(Sc),n.use(Ov);const t=um();vw(()=>t.getToken(),()=>{t.logout(),Sc.push({name:"login"})}),n.mount("#app")});export{ZI as A,lr as B,WC as C,eS as D,ds as E,We as F,tf as G,YI as H,Ci as I,oS as K,IA as R,XI as T,Gt as _,sn as a,JI as b,je as c,ko as d,Ge as e,iS as f,sS as g,dt as h,Tr as i,Te as j,Hn as k,Do as l,Yo as m,Ut as n,Ee as o,Wt as p,Ga as q,Ba as r,Oe as s,Fo as t,um as u,Ey as v,vr as w,Mr as x,is as y,WI as z}; diff --git a/src/static/assets/tasks-OhvhAG_3.js b/src/static/assets/tasks-Dr7jFVHn.js similarity index 96% rename from src/static/assets/tasks-OhvhAG_3.js rename to src/static/assets/tasks-Dr7jFVHn.js index 47b544a..0f9ea9c 100644 --- a/src/static/assets/tasks-OhvhAG_3.js +++ b/src/static/assets/tasks-Dr7jFVHn.js @@ -1 +1 @@ -import{E as l,C as w,s as i}from"./index-BP_aNEdP.js";const o={list:a=>l.get("/api/tasks",{params:a}),get:a=>l.get(`/api/tasks/${a}`),create:a=>l.post("/api/tasks",a),update:(a,s)=>l.patch(`/api/tasks/${a}`,s),remove:a=>l.delete(`/api/tasks/${a}`),complete:a=>l.post(`/api/tasks/${a}/complete`),blocks:a=>l.get(`/api/tasks/${a}/blocks`),createBlock:(a,s)=>l.post(`/api/tasks/${a}/blocks`,s),updateBlock:(a,s)=>l.patch(`/api/tasks/blocks/${a}`,s),deleteBlock:a=>l.delete(`/api/tasks/blocks/${a}`)},b=Object.freeze(Object.defineProperty({__proto__:null,tasksApi:o},Symbol.toStringTag,{value:"Module"})),$=w("tasks",()=>{const a=i([]),s=i(!1),n=i(null);async function u(t){s.value=!0,n.value=null;try{const e=await o.list({date:t});a.value=e.data}catch(e){const c=e;n.value=c.message??"Failed to fetch tasks"}finally{s.value=!1}}async function d(t){s.value=!0,n.value=null;try{const e=await o.list(t?{project_id:t}:void 0);a.value=e.data}catch(e){const c=e;n.value=c.message??"Failed to fetch tasks"}finally{s.value=!1}}async function p(t){const e=await o.create(t);return a.value.push(e.data),e.data}async function k(t,e){const c=await o.update(t,e),r=a.value.findIndex(h=>h.id===t);return r!==-1&&(a.value[r]=c.data),c.data}async function f(t){await o.remove(t),a.value=a.value.filter(e=>e.id!==t)}async function v(t){const e=await o.complete(t),c=a.value.findIndex(r=>r.id===t);return c!==-1&&(a.value[c]=e.data),e.data}async function y(t,e){return(await o.createBlock(t,e)).data}async function m(t,e){return(await o.updateBlock(t,e)).data}async function g(t){await o.deleteBlock(t)}return{tasks:a,loading:s,error:n,fetchForDate:u,fetchAll:d,create:p,update:k,remove:f,complete:v,createBlock:y,updateBlock:m,deleteBlock:g}});export{b as t,$ as u}; +import{E as l,C as w,s as i}from"./index-DVV3ZbZ2.js";const o={list:a=>l.get("/api/tasks",{params:a}),get:a=>l.get(`/api/tasks/${a}`),create:a=>l.post("/api/tasks",a),update:(a,s)=>l.patch(`/api/tasks/${a}`,s),remove:a=>l.delete(`/api/tasks/${a}`),complete:a=>l.post(`/api/tasks/${a}/complete`),blocks:a=>l.get(`/api/tasks/${a}/blocks`),createBlock:(a,s)=>l.post(`/api/tasks/${a}/blocks`,s),updateBlock:(a,s)=>l.patch(`/api/tasks/blocks/${a}`,s),deleteBlock:a=>l.delete(`/api/tasks/blocks/${a}`)},b=Object.freeze(Object.defineProperty({__proto__:null,tasksApi:o},Symbol.toStringTag,{value:"Module"})),$=w("tasks",()=>{const a=i([]),s=i(!1),n=i(null);async function u(t){s.value=!0,n.value=null;try{const e=await o.list({date:t});a.value=e.data}catch(e){const c=e;n.value=c.message??"Failed to fetch tasks"}finally{s.value=!1}}async function d(t){s.value=!0,n.value=null;try{const e=await o.list(t?{project_id:t}:void 0);a.value=e.data}catch(e){const c=e;n.value=c.message??"Failed to fetch tasks"}finally{s.value=!1}}async function p(t){const e=await o.create(t);return a.value.push(e.data),e.data}async function k(t,e){const c=await o.update(t,e),r=a.value.findIndex(h=>h.id===t);return r!==-1&&(a.value[r]=c.data),c.data}async function f(t){await o.remove(t),a.value=a.value.filter(e=>e.id!==t)}async function v(t){const e=await o.complete(t),c=a.value.findIndex(r=>r.id===t);return c!==-1&&(a.value[c]=e.data),e.data}async function y(t,e){return(await o.createBlock(t,e)).data}async function m(t,e){return(await o.updateBlock(t,e)).data}async function g(t){await o.deleteBlock(t)}return{tasks:a,loading:s,error:n,fetchForDate:u,fetchAll:d,create:p,update:k,remove:f,complete:v,createBlock:y,updateBlock:m,deleteBlock:g}});export{b as t,$ as u}; diff --git a/src/static/index.html b/src/static/index.html index 142e0f7..f838200 100644 --- a/src/static/index.html +++ b/src/static/index.html @@ -14,8 +14,8 @@ else { document.documentElement.classList.remove('dark'); } })(); - - + +
diff --git a/web/src/components/calendar/CalendarBlock.vue b/web/src/components/calendar/CalendarBlock.vue index e6eaba2..f4b90e8 100644 --- a/web/src/components/calendar/CalendarBlock.vue +++ b/web/src/components/calendar/CalendarBlock.vue @@ -66,7 +66,7 @@ const isShort = computed(() => effectiveHeight.value < 40) >
-

{{ block.display_name }}

+

{{ (block.kind === 'planned' && block.title) ? block.title : block.display_name }}

{{ block.job_number }}

diff --git a/web/src/components/shared/AppLayout.vue b/web/src/components/shared/AppLayout.vue index 77068dd..6c3e3ee 100644 --- a/web/src/components/shared/AppLayout.vue +++ b/web/src/components/shared/AppLayout.vue @@ -25,7 +25,7 @@ const pageTitle = computed(() => {