PageSourceSearch

https://p3core.ca/assets/Portal-B-r3rWDw.js

js p3core.ca collected 2026-10-09 18:25:12 UTC 10,300 bytes, 1 lines download raw bytes

1import{u as k,a as _,c as L,f as P,i as R,b as N,d as V,e as X,g as Y,h as z,j as O,k as S,s as C,l as e,S as B,C as G,L as H,D as $,m as K,A as Q,n as W,o as J,p as Z,q as ee,r as te,t as M,v as q,U as se,w as ne,x as u,E as T,y as D,z as F,B as j,F as ae,G as re}from"./index-BlWJXOKl.js";import{A as ie}from"./apps-BBoCfvvL.js";import{A as oe}from"./arrow-up-right-BrL2Fi2w.js";import"./milestone-C4pi23cX.js";import"./shield-alert-C0EYYZnp.js";import"./waypoints-TUGsB2rQ.js";function U(t,a){const s=k(a()),i=()=>s.set(a());return i(),_(()=>{const r=()=>P.preRender(i,!1,!0),o=t.map(l=>l.on("change",r));return()=>{o.forEach(l=>l()),L(i)}}),s}const le=t=>t&&typeof t=="object"&&t.mix,ce=t=>le(t)?t.mix:void 0;function de(...t){const a=!Array.isArray(t[0]),s=a?0:-1,i=t[0+s],r=t[1+s],o=t[2+s],l=t[3+s],d=R(r,o,{mixer:ce(o[0]),...l});return a?d(i):d}function ue(t){N.current=[],t();const a=U(N.current,t);return N.current=void 0,a}function I(t,a,s,i){if(typeof t=="function")return ue(t);const r=typeof a=="function"?a:de(a,s,i);return Array.isArray(t)?E(t,r):E([t],([o])=>r(o))}function E(t,a){const s=V(()=>[]);return U(t,()=>{s.length=0;const i=t.length;for(let r=0;r<i;r++)s[r]=t[r].get();return a(s)})}function xe({app:t,accessible:a,launchable:s,onClick:i,index:r,badge:o=0}){const l=t.icon,d=D.useRef(null),[p,f]=D.useState(!1),c=k(0),m=k(0),g=F(c,{stiffness:300,damping:30}),w=F(m,{stiffness:300,damping:30}),v=I(w,[-.5,.5],[6,-6]),h=I(g,[-.5,.5],[-6,6]);function b(x){const A=d.current;if(!A)return;const y=A.getBoundingClientRect();c.set((x.clientX-y.left)/y.width-.5),m.set((x.clientY-y.top)/y.height-.5)}function n(){c.set(0),m.set(0),f(!1)}return e.jsxs(u.div,{style:{perspective:"800px"},className:"group relative isolate",variants:{hidden:{opacity:0,y:48,rotateX:18},visible:{opacity:1,y:0,rotateX:0,transition:{type:"spring",stiffness:110,damping:22,delay:r*.09}}},children:[e.jsx("span",{"aria-hidden":!0,className:j("pointer-events-none absolute -inset-1.5 -z-10 rounded-2xl bg-gradient-to-br opacity-0 blur-2xl transition-opacity duration-300",t.accentFrom,t.accentTo,a&&"group-hover:opacity-60")}),o>0&&e.jsx("span",{className:"absolute -right-1.5 -top-1.5 z-20 flex h-6 min-w-6 items-center justify-center rounded-full bg-destructive px-1.5 text-[11px] font-bold text-destructive-foreground shadow-lg shadow-black/40 ring-2 ring-brand-dark/50","aria-label":`${o} pending`,children:o>99?"99+":o}),e.jsxs(u.button,{ref:d,type:"button",onClick:i,onMouseMove:b,onMouseLeave:n,onMouseEnter:()=>f(!0),style:{rotateX:v,rotateY:h,transformStyle:"preserve-3d"},whileHover:{scale:1.06,y:-8,transition:{type:"spring",stiffness:260,damping:24}},whileTap:s?{scale:.97}:{},className:j("group relative flex h-44 w-full flex-col overflow-hidden rounded-lg border border-glass-border/55 p-5","bg-glass/70 text-card-foreground shadow-sm shadow-slate-950/5 backdrop-blur-xl dark:bg-card/72 dark:shadow-slate-950/20","text-center transition-all duration-200 ease-out",t.borderColor,t.glowColor,!a&&"cursor-default opacity-40",s&&"cursor-pointer"),children:[e.jsx(ae,{children:p&&a&&e.jsx(u.span,{initial:{top:"-2px"},animate:{top:"110%"},exit:{opacity:0},transition:{duration:.55,ease:"linear"},className:"pointer-events-none absolute inset-x-0 bg-gradient-to-r from-transparent via-white/40 to-transparent",style:{position:"absolute",left:0,right:0,height:"1px"}},"scan")}),e.jsx("span",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 bg-gradient-to-br from-glow/10 via-trans
1parent to-transparent opacity-0 transition-opacity duration-300 group-hover:opacity-100"}),e.jsxs("div",{className:"relative flex items-center justify-between",children:[e.jsxs("span",{className:"font-mono text-[10px] font-semibold tracking-[0.25em] text-muted-foreground/70",children:["SYS.",String(t.index).padStart(2,"0")]}),t.status==="active"?e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsxs("span",{className:"relative flex h-2 w-2",children:[e.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-emerald-400 opacity-50"}),e.jsx("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-emerald-400"})]}),e.jsx("span",{className:"font-mono text-[9px] font-bold uppercase tracking-widest text-success",children:"Online"})]}):t.status==="beta"?e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsxs("span",{className:"relative flex h-2 w-2",children:[e.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-sky-400 opacity-50"}),e.jsx("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-sky-400"})]}),e.jsx("span",{className:"font-mono text-[9px] font-bold uppercase tracking-widest text-sky-400",children:"Beta"})]}):e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"h-2 w-2 animate-pulse rounded-full bg-muted-foreground/25"}),e.jsx("span",{className:"font-mono text-[9px] font-bold uppercase tracking-widest text-muted-foreground/60",children:"Soon"})]})]}),e.jsxs("div",{className:"relative flex min-h-0 flex-1 flex-col items-center justify-center gap-2.5 text-center",children:[e.jsx("span",{className:j("flex h-12 w-12 items-center justify-center rounded-xl bg-gradient-to-br shadow-lg shadow-black/30",t.accentFrom,t.accentTo),children:e.jsx(l,{className:"h-6 w-6 text-white"})}),e.jsxs("div",{className:"w-full px-1",children:[e.jsx("h2",{className:"truncate font-display text-[17px] font-bold leading-tight text-foreground",children:t.name}),e.jsx("p",{className:"mt-0.5 truncate text-[10px] font-semibold uppercase tracking-wider text-muted-foreground/70",children:t.tagline})]})]}),e.jsx("div",{className:"relative flex items-center justify-center",children:s?e.jsx(u.span,{animate:p?{y:-2,opacity:1}:{y:0,opacity:.5},transition:{duration:.18,ease:T},className:j("flex h-7 w-7 flex-shrink-0 items-center justify-center rounded-lg bg-gradient-to-br",t.accentFrom,t.accentTo),children:e.jsx(oe,{className:"h-4 w-4 text-white"})}):e.jsx("span",{className:"rounded-full border border-border/70 bg-muted/40 px-2.5 py-0.5 font-mono text-[9px] uppercase tracking-widest text-muted-foreground",children:"Soon"})})]})]})}function ye(){var h,b;const{user:t,signOut:a}=X(),{currentOrg:s}=Y(),{canAccess:i,isSuperUser:r,loading:o}=z(),l=O(),d=(s==null?void 0:s.role)??"viewer",p=ie.filter(n=>i(n.id)),{data:f=0}=S({queryKey:["access-request-count"],enabled:r,refetchInterval:3e4,refetchOnWindowFocus:!0,queryFn:async()=>{const{count:n}=await C.from("access_requests").select("id",{count:"exact",head:!0}).eq("status","pending");return n??0}}),c=((h=t==null?void 0:t.user_metadata)==null?void 0:h.display_name)??((b=t==null?void 0:t.email)==null?void 0:b.split("@")[0])??"there",m=c.split(" ").map(n=>n[0]).join("").slice(0,2).toUpperCase(),{data:g}=S({queryKey:["profile-avatar",t==null?void 0:t.id],enabled:!!(t!=null&&t.id),staleTime:1/0,gcTime:1/0,queryFn:async()=>{const{data:n}=await C.from("profiles").select("avatar_url").eq("id",t.id).maybeSingle();return(n==null?void 0:n.avatar_url)??null}});async function w(){await a(),l("/login")}function v(n){if(n.status==="coming_soon"){re("Coming soon",{description:`${n.name} is under development and will be available shortly.`});return}l(n.path)}return e.jsxs(B,{className:"flex min-h-screen w-full flex-col",children:[e.jsx(G,{}),e.jsx("header",{className:"sticky top-0 z-30 border-b border-white/8 bg-brand-dark/40 backdrop-blur-xl",children:e.jsxs("div",{className:"mx-auto flex h-14 max-w-7xl items-center justify-between px-6",children:[e.jsx("div",{className:"flex items-center gap-2.5",children:e.jsx(H,{onDark:!0})}),e.jsx("div",{className:"flex items-center gap-1.5",children:e.jsxs($,{children:[e.jsx(K,{asChild:!0,children:e.jsxs("button",{type:"button","aria-label":"Account",className:"flex items-center gap-2.5 rounded-full px-1 py-1 outline-none ring-white/20 transition-colors hover:bg-white/10 focus-visible:ring-2",children:[e.jsx("span",{className:"hidden max-w-[160px] truncate text-sm text-white/80 sm:block",children:c}),e.jsxs(Q,{className:"h-8 w-8 border-2 border-white/20",children:[g&&e.jsx(W,{src:g,alt:c}),e.jsx(J,{className:"bg-white/15 text-xs font-semibold text-white",children:m||"U"})]})]})}),e.jsxs(Z,{align:"end",className:"w-56",children:[e.jsxs(ee,{className:"flex flex-col gap-0.5",children:[e.jsx("span",{className:"font-semibold",children:c}),e.jsx("span",{className:"text-xs font-normal text-muted-foreground",children:t==null?void 0:t.email}),s&&e.jsxs("span",{className:"mt-0.5 text-xs font-normal text-muted-foreground",children:[te(s)," · ",d]})]}),e.jsx(M,{}),e.jsxs(q,{onSelect:()=>l("/lcr/profile"),children:[e.jsx(se,{className:"h-4 w-4"})," Profile"]}),e.jsx(M,{}),e.jsxs(q,{className:"text-destructive focus:text-destructive",onSelect:w,children:[e.jsx(ne,{className:"h-4 w-4"})," Sign out"]})]})]})})]})}),e.jsxs("main",{className:"relative flex flex-1 flex-col items-center justify-start px-6 py-10 lg:py-12",children:[e.jsx("div",{"aria-hidden":!0,
1className:"pointer-events-none absolute inset-0 opacity-[0.04]",style:{backgroundImage:"linear-gradient(hsl(213 70% 80%) 1px, transparent 1px), linear-gradient(90deg, hsl(213 70% 80%) 1px, transparent 1px)",backgroundSize:"48px 48px"}}),e.jsx(u.p,{initial:{opacity:0,y:-8},animate:{opacity:1,y:0},transition:{duration:.5,ease:T},className:"mb-8 font-mono text-[10px] font-bold uppercase tracking-[0.35em] text-white/30",children:"── Applications ──"}),e.jsx(u.div,{variants:{hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.09}}},initial:"hidden",animate:"visible",className:"w-full max-w-6xl",children:e.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:o?Array.from({length:6}).map((n,x)=>e.jsx("div",{className:"h-44 w-full animate-pulse rounded-lg border border-glass-border/40 bg-glass/40 backdrop-blur-xl dark:bg-card/40"},x)):p.map((n,x)=>e.jsx(xe,{app:n,accessible:!0,launchable:n.status!=="coming_soon",badge:n.id==="control-center"?f:0,onClick:()=>v(n),index:x},n.id))})}),e.jsx(u.p,{initial:{opacity:0}
1,animate:{opacity:1},transition:{delay:.9,duration:.6},className:"mt-auto pt-12 font-mono text-[11px] tracking-wider text-white/60",children:`BGIS · P3Core · © ${new Date().getFullYear()}`})]})]})}export{ye as Portal};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.