PWA
CI / build (push) Has been skipped
CI / deploy (push) Successful in 1m24s

This commit is contained in:
eewing
2026-02-19 07:41:49 -06:00
parent 5776a1fdb1
commit c0fae761da
10919 changed files with 874329 additions and 13511 deletions
@@ -1,4 +1,4 @@
import { g as getContext, f as escape_html } from "../../chunks/index2.js";
import { g as getContext, i as escape_html } from "../../chunks/index2.js";
import "clsx";
import "../../chunks/state.svelte.js";
import "@sveltejs/kit/internal";
@@ -1,5 +1,6 @@
import { redirect } from "@sveltejs/kit";
import PocketBase from "pocketbase";
import { m as mapUserRecord } from "../chunks/user-from-record.js";
const POCKETBASE_URL = process.env.VITE_POCKETBASE_URL ?? "https://pocketbase.ccllc.pro";
const LOGIN_PATH = "/login";
const LOGOUT_PATH = "/logout";
@@ -17,13 +18,16 @@ const handle = async ({ event, resolve }) => {
event.locals.pb.authStore.clear();
}
const record = event.locals.pb.authStore.record;
event.locals.user = record ? {
id: record.id,
email: record.email,
name: record.name,
avatar: record.avatar,
darkmode: !!record.darkmode
} : null;
if (!record) {
event.locals.user = null;
} else {
try {
const full = await event.locals.pb.collection("users").getOne(record.id);
event.locals.user = mapUserRecord(full);
} catch {
event.locals.user = mapUserRecord(record);
}
}
if (!event.locals.user && !isPublicRoute(event.url.pathname)) {
const redirectTo = event.url.pathname + event.url.search;
const loginUrl = redirectTo && redirectTo !== "/" ? `${LOGIN_PATH}?redirectTo=${encodeURIComponent(redirectTo)}` : LOGIN_PATH;
@@ -1,15 +1,22 @@
import { l as lifecycle_function_unavailable, h as hasContext, g as getContext, s as setContext, d as derived, a as getAllContexts, p as props_id, b as attributes, c as bind_props, e as spread_props, f as escape_html } from "../../chunks/index2.js";
import "clsx";
import { l as lifecycle_function_unavailable, g as getContext, h as hasContext, s as setContext, d as derived, a as getAllContexts, p as props_id, b as attributes, c as bind_props, e as spread_props, f as head, i as escape_html } from "../../chunks/index2.js";
import "@sveltejs/kit/internal";
import "../../chunks/exports.js";
import "../../chunks/utils.js";
import { g as get$2 } from "../../chunks/index.js";
import "@sveltejs/kit/internal/server";
import { o as on } from "../../chunks/root.js";
import "../../chunks/state.svelte.js";
import "clsx";
import { c as cn } from "../../chunks/utils2.js";
import { i as isWritableSymbol, B as BoxSymbol, b as boxFrom, a as boxWith, c as boxFlatten, t as toReadonlyBox, d as isBox, e as isWritableBox, s as styleToString, f as isObject, g as executeCallbacks, h as attachRef, j as createBitsAttrs, k as getDataOpenClosed, l as boolToEmptyStrOrUndef, m as boolToStr, n as simpleBox, o as composeHandlers, p as createId, q as mergeProps, r as cssToStyleObj, u as getDataChecked, v as getAriaChecked, w as boolToTrueOrUndef, L as Label } from "../../chunks/label.js";
import { isTabbable, tabbable, isFocusable, focusable } from "tabbable";
import { computePosition, offset, shift, limitShift, flip, size, arrow, hide } from "@floating-ui/dom";
import { s as siteSlugs } from "../../chunks/sites.js";
function html(value) {
var html2 = String(value);
var open = "<!---->";
return open + html2 + "<!---->";
}
function mount() {
lifecycle_function_unavailable("mount");
}
@@ -18,6 +25,27 @@ function unmount() {
}
async function tick() {
}
const getStores = () => {
const stores$1 = getContext("__svelte__");
return {
/** @type {typeof page} */
page: {
subscribe: stores$1.page.subscribe
},
/** @type {typeof navigating} */
navigating: {
subscribe: stores$1.navigating.subscribe
},
/** @type {typeof updated} */
updated: stores$1.updated
};
};
const page = {
subscribe(fn) {
const store = getStores().page;
return store.subscribe(fn);
}
};
function box(initialValue) {
let current = initialValue;
return {
@@ -2219,6 +2247,50 @@ class AvatarRootState {
return this.#props($$value);
}
}
class AvatarImageState {
static create(opts) {
return new AvatarImageState(opts, AvatarRootContext.get());
}
opts;
root;
attachment;
constructor(opts, root) {
this.opts = opts;
this.root = root;
this.attachment = attachRef(this.opts.ref);
watch.pre(
[
() => this.opts.src.current,
() => this.opts.crossOrigin.current
],
([src, crossOrigin]) => {
if (!src) {
this.root.opts.loadingStatus.current = "error";
return;
}
this.root.loadImage(src, crossOrigin, this.opts.referrerPolicy.current);
}
);
}
#props = derived(() => ({
id: this.opts.id.current,
style: {
display: this.root.opts.loadingStatus.current === "loaded" ? "block" : "none"
},
"data-status": this.root.opts.loadingStatus.current,
[avatarAttrs.image]: "",
src: this.opts.src.current,
crossorigin: this.opts.crossOrigin.current,
referrerpolicy: this.opts.referrerPolicy.current,
...this.attachment
}));
get props() {
return this.#props();
}
set props($$value) {
return this.#props($$value);
}
}
class AvatarFallbackState {
static create(opts) {
return new AvatarFallbackState(opts, AvatarRootContext.get());
@@ -2292,6 +2364,40 @@ function Avatar$1($$renderer, $$props) {
bind_props($$props, { loadingStatus, ref });
});
}
function Avatar_image$1($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
const uid = props_id($$renderer2);
let {
src,
child,
id = createId(uid),
ref = null,
crossorigin = void 0,
referrerpolicy = void 0,
$$slots,
$$events,
...restProps
} = $$props;
const imageState = AvatarImageState.create({
src: boxWith(() => src),
id: boxWith(() => id),
ref: boxWith(() => ref, (v) => ref = v),
crossOrigin: boxWith(() => crossorigin),
referrerPolicy: boxWith(() => referrerpolicy)
});
const mergedProps = mergeProps(restProps, imageState.props);
if (child) {
$$renderer2.push("<!--[-->");
child($$renderer2, { props: mergedProps });
$$renderer2.push(`<!---->`);
} else {
$$renderer2.push("<!--[!-->");
$$renderer2.push(`<img${attributes({ ...mergedProps, src })} onload="this.__e=event" onerror="this.__e=event"/>`);
}
$$renderer2.push(`<!--]-->`);
bind_props($$props, { ref });
});
}
function Avatar_fallback$1($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
const uid = props_id($$renderer2);
@@ -3644,6 +3750,46 @@ function Avatar($$renderer, $$props) {
bind_props($$props, { ref, loadingStatus });
});
}
function Avatar_image($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
let {
ref = null,
class: className,
$$slots,
$$events,
...restProps
} = $$props;
let $$settled = true;
let $$inner_renderer;
function $$render_inner($$renderer3) {
$$renderer3.push("<!---->");
Avatar_image$1?.($$renderer3, spread_props([
{
"data-slot": "avatar-image",
class: cn("aspect-square size-full", className)
},
restProps,
{
get ref() {
return ref;
},
set ref($$value) {
ref = $$value;
$$settled = false;
}
}
]));
$$renderer3.push(`<!---->`);
}
do {
$$settled = true;
$$inner_renderer = $$renderer2.copy();
$$render_inner($$inner_renderer);
} while (!$$settled);
$$renderer2.subsume($$inner_renderer);
bind_props($$props, { ref });
});
}
function Avatar_fallback($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
let {
@@ -3899,31 +4045,44 @@ function Switch($$renderer, $$props) {
bind_props($$props, { ref, checked });
});
}
const pwaInfo = { "webManifest": { "linkTag": '<link rel="manifest" href="/manifest.webmanifest">' } };
function _layout($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
let { data, children } = $$props;
let pathname = get$2(page).url.pathname;
const isSiteRoute = siteSlugs.includes(pathname.slice(1).split("/")[0] ?? "");
let darkmode = false;
let onDarkmodeChange = () => {
};
head("12qhfyh", $$renderer2, ($$renderer3) => {
{
$$renderer3.push("<!--[-->");
$$renderer3.push(`${html(pwaInfo.webManifest.linkTag)}`);
}
$$renderer3.push(`<!--]-->`);
});
$$renderer2.push(`<div class="app-shell">`);
if (data.user) {
if (data.user && !isSiteRoute) {
$$renderer2.push("<!--[-->");
$$renderer2.push(`<header class="flex items-center justify-between w-full"><h1 class="text-lg font-semibold">Base</h1> `);
$$renderer2.push(`<header class="fixed right-0 top-0 z-50 flex items-center gap-2 p-2 pr-[max(0.5rem,env(safe-area-inset-right))] pt-[max(0.5rem,env(safe-area-inset-top))]" aria-label="User menu">`);
$$renderer2.push("<!---->");
Dropdown_menu?.($$renderer2, {
children: ($$renderer3) => {
$$renderer3.push("<!---->");
Dropdown_menu_trigger?.($$renderer3, {
class: "rounded-full border border-input bg-background hover:bg-accent",
class: "border-0 bg-transparent hover:bg-muted inline-flex size-10 shrink-0 items-center justify-center rounded-full focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",
onclick: (e) => e.preventDefault(),
children: ($$renderer4) => {
$$renderer4.push("<!---->");
Avatar?.($$renderer4, {
class: "h-8 w-8",
class: "size-10 rounded-full",
children: ($$renderer5) => {
$$renderer5.push("<!---->");
Avatar_image?.($$renderer5, { src: data.user.avatar, alt: "" });
$$renderer5.push(`<!----> `);
$$renderer5.push("<!---->");
Avatar_fallback?.($$renderer5, {
class: "text-xs",
class: "bg-muted text-muted-foreground flex size-10 items-center justify-center rounded-full text-sm font-medium",
children: ($$renderer6) => {
$$renderer6.push(`<!---->${escape_html(data.user.name ? String(data.user.name).slice(0, 2).toUpperCase() : data.user.email ? String(data.user.email).slice(0, 2).toUpperCase() : "?")}`);
},
@@ -3941,7 +4100,7 @@ function _layout($$renderer, $$props) {
$$renderer3.push("<!---->");
Dropdown_menu_content?.($$renderer3, {
align: "end",
class: "w-48",
class: "w-56",
children: ($$renderer4) => {
$$renderer4.push(`<div class="relative flex cursor-default items-center gap-2 rounded-sm py-1.5 px-2 text-sm outline-none select-none" role="button" tabindex="0">`);
Label($$renderer4, {
@@ -3973,9 +4132,9 @@ function _layout($$renderer, $$props) {
} else {
$$renderer2.push("<!--[!-->");
}
$$renderer2.push(`<!--]--> <main class="flex-1 flex flex-col gap-4 min-h-0">`);
$$renderer2.push(`<!--]--> <div class="page-view">`);
children?.($$renderer2);
$$renderer2.push(`<!----></main></div>`);
$$renderer2.push(`<!----></div></div>`);
});
}
export {
@@ -1,47 +1,32 @@
import "clsx";
import { j as ensure_array_like, k as attr, i as escape_html, m as stringify } from "../../chunks/index2.js";
import { B as Button } from "../../chunks/button.js";
import { s as siteSlugs, a as sites } from "../../chunks/sites.js";
function _page($$renderer, $$props) {
let { data } = $$props;
{
$$renderer.push("<!--[!-->");
$$renderer.push(`<main class="flex min-h-0 flex-1 flex-col items-center justify-center gap-6 p-6"><h1 class="text-2xl font-semibold">Base</h1> <div class="flex w-full max-w-xs flex-col gap-3"><a href="https://prism.ccllc.pro" class="block" target="_blank" rel="noopener noreferrer">`);
Button($$renderer, {
class: "h-12 w-full min-h-12",
children: ($$renderer2) => {
$$renderer2.push(`<!---->Prism`);
},
$$slots: { default: true }
});
$$renderer.push(`<!----></a> <a href="https://tasgrid.ccllc.pro" class="block" target="_blank" rel="noopener noreferrer">`);
Button($$renderer, {
class: "h-12 min-h-12 w-full",
variant: "outline",
children: ($$renderer2) => {
$$renderer2.push(`<!---->TasGrid`);
},
$$slots: { default: true }
});
$$renderer.push(`<!----></a> <a href="https://stackq.ccllc.pro" class="block" target="_blank" rel="noopener noreferrer">`);
Button($$renderer, {
class: "h-12 min-h-12 w-full",
variant: "outline",
children: ($$renderer2) => {
$$renderer2.push(`<!---->Stackq`);
},
$$slots: { default: true }
});
$$renderer.push(`<!----></a> <a href="https://hrm.ccllc.pro" class="block" target="_blank" rel="noopener noreferrer">`);
Button($$renderer, {
class: "h-12 min-h-12 w-full",
variant: "outline",
children: ($$renderer2) => {
$$renderer2.push(`<!---->HRM`);
},
$$slots: { default: true }
});
$$renderer.push(`<!----></a></div></main>`);
}
$$renderer.push(`<!--]-->`);
$$renderer.component(($$renderer2) => {
let { data } = $$props;
const visibleSlugs = data.user ? siteSlugs.filter((slug) => data.user && data.user[slug] === true) : [];
{
$$renderer2.push("<!--[!-->");
$$renderer2.push(`<main class="flex min-h-0 flex-1 flex-col items-center justify-center gap-4 p-4 sm:gap-6 sm:p-6"><h1 class="text-2xl font-semibold">Base</h1> <div class="flex w-full max-w-xs flex-col gap-3"><!--[-->`);
const each_array = ensure_array_like(visibleSlugs);
for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
let slug = each_array[$$index];
const site = sites[slug];
$$renderer2.push(`<a${attr("href", `/${stringify(slug)}`)} class="block">`);
Button($$renderer2, {
class: "h-16 w-full min-h-16",
variant: "outline",
children: ($$renderer3) => {
$$renderer3.push(`<!---->${escape_html(site.title)}`);
},
$$slots: { default: true }
});
$$renderer2.push(`<!----></a>`);
}
$$renderer2.push(`<!--]--></div></main>`);
}
$$renderer2.push(`<!--]-->`);
});
}
export {
_page as default
@@ -0,0 +1,10 @@
import "clsx";
function _layout($$renderer, $$props) {
let { children } = $$props;
$$renderer.push(`<div class="site-fullscreen">`);
children?.($$renderer);
$$renderer.push(`<!----></div>`);
}
export {
_layout as default
};
@@ -0,0 +1,17 @@
import { a as sites } from "../../../chunks/sites.js";
import { error } from "@sveltejs/kit";
function load({ params }) {
const slug = params.site?.toLowerCase();
const site = slug && slug in sites ? sites[slug] : null;
if (!site) {
throw error(404, `Unknown site: ${params.site}`);
}
return {
slug,
url: site.url,
title: site.title
};
}
export {
load
};
@@ -0,0 +1,26 @@
import { f as head, k as attr, i as escape_html } from "../../../chunks/index2.js";
import { B as Button } from "../../../chunks/button.js";
function _page($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
let { data } = $$props;
head("mbpe06", $$renderer2, ($$renderer3) => {
$$renderer3.title(($$renderer4) => {
$$renderer4.push(`<title>${escape_html(data.title)} — Base</title>`);
});
});
$$renderer2.push(`<main class="relative flex-1 min-h-0 min-w-0 flex flex-col"><iframe id="app-iframe"${attr("title", data.title)}${attr("src", data.url)} class="absolute inset-0 w-full h-full border-0 rounded-none"></iframe> <div class="absolute top-2 left-1/2 -translate-x-1/2 z-10 flex items-center justify-center pointer-events-none pt-[env(safe-area-inset-top)]" aria-hidden="true"><div class="pointer-events-auto"><a href="/">`);
Button($$renderer2, {
type: "button",
variant: "secondary",
class: "shadow-md",
children: ($$renderer3) => {
$$renderer3.push(`<!---->Base`);
},
$$slots: { default: true }
});
$$renderer2.push(`<!----></a></div></div></main>`);
});
}
export {
_page as default
};
@@ -1,4 +1,4 @@
import { b as attributes, j as clsx, c as bind_props, i as attr, f as escape_html } from "../../../chunks/index2.js";
import { b as attributes, o as clsx, c as bind_props, k as attr, i as escape_html } from "../../../chunks/index2.js";
import "@sveltejs/kit/internal";
import "../../../chunks/exports.js";
import "../../../chunks/utils.js";
@@ -8,6 +8,7 @@ import "../../../chunks/state.svelte.js";
import { B as Button } from "../../../chunks/button.js";
import { c as cn } from "../../../chunks/utils2.js";
import { L as Label } from "../../../chunks/label.js";
import { C as Card, a as Card_header, b as Card_title, c as Card_description, d as Card_content } from "../../../chunks/card-title.js";
import "clsx";
function Input($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
@@ -56,106 +57,6 @@ function Input($$renderer, $$props) {
bind_props($$props, { ref, value, files });
});
}
function Card($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
let {
ref = null,
class: className,
children,
$$slots,
$$events,
...restProps
} = $$props;
$$renderer2.push(`<div${attributes({
"data-slot": "card",
class: clsx(cn("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm", className)),
...restProps
})}>`);
children?.($$renderer2);
$$renderer2.push(`<!----></div>`);
bind_props($$props, { ref });
});
}
function Card_content($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
let {
ref = null,
class: className,
children,
$$slots,
$$events,
...restProps
} = $$props;
$$renderer2.push(`<div${attributes({
"data-slot": "card-content",
class: clsx(cn("px-6", className)),
...restProps
})}>`);
children?.($$renderer2);
$$renderer2.push(`<!----></div>`);
bind_props($$props, { ref });
});
}
function Card_description($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
let {
ref = null,
class: className,
children,
$$slots,
$$events,
...restProps
} = $$props;
$$renderer2.push(`<p${attributes({
"data-slot": "card-description",
class: clsx(cn("text-muted-foreground text-sm", className)),
...restProps
})}>`);
children?.($$renderer2);
$$renderer2.push(`<!----></p>`);
bind_props($$props, { ref });
});
}
function Card_header($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
let {
ref = null,
class: className,
children,
$$slots,
$$events,
...restProps
} = $$props;
$$renderer2.push(`<div${attributes({
"data-slot": "card-header",
class: clsx(cn("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6", className)),
...restProps
})}>`);
children?.($$renderer2);
$$renderer2.push(`<!----></div>`);
bind_props($$props, { ref });
});
}
function Card_title($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
let {
ref = null,
class: className,
children,
$$slots,
$$events,
...restProps
} = $$props;
$$renderer2.push(`<div${attributes({
"data-slot": "card-title",
class: clsx(cn("leading-none font-semibold", className)),
...restProps
})}>`);
children?.($$renderer2);
$$renderer2.push(`<!----></div>`);
bind_props($$props, { ref });
});
}
function _page($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
let { data, formAction } = $$props;
@@ -1,4 +1,4 @@
import { i as attr } from "../../../chunks/index2.js";
import { k as attr } from "../../../chunks/index2.js";
import "@sveltejs/kit/internal";
import "../../../chunks/exports.js";
import "../../../chunks/utils.js";
@@ -0,0 +1,15 @@
import { error } from "@sveltejs/kit";
import { m as mapUserRecord } from "../../../../chunks/user-from-record.js";
const load = async ({ params, locals }) => {
const id = params.id;
if (!id) throw error(404, "User not found");
try {
const record = await locals.pb.collection("users").getOne(id);
return { user: mapUserRecord(record) };
} catch {
throw error(404, "User not found");
}
};
export {
load
};
@@ -0,0 +1,74 @@
import { f as head, i as escape_html } from "../../../../chunks/index2.js";
import { C as Card, a as Card_header, b as Card_title, c as Card_description, d as Card_content } from "../../../../chunks/card-title.js";
import "clsx";
import { B as Button } from "../../../../chunks/button.js";
function _page($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
let { data } = $$props;
const user = data.user;
head("xnw5yb", $$renderer2, ($$renderer3) => {
$$renderer3.title(($$renderer4) => {
$$renderer4.push(`<title>${escape_html(user.name ?? user.email ?? "User")} — Base</title>`);
});
});
$$renderer2.push(`<main class="flex min-h-0 flex-1 flex-col gap-4 p-4 sm:gap-6 sm:p-6"><a href="/users" class="self-start">`);
Button($$renderer2, {
variant: "ghost",
size: "sm",
children: ($$renderer3) => {
$$renderer3.push(`<!---->← Users`);
},
$$slots: { default: true }
});
$$renderer2.push(`<!----></a> `);
$$renderer2.push("<!---->");
Card?.($$renderer2, {
class: "max-w-md",
children: ($$renderer3) => {
$$renderer3.push("<!---->");
Card_header?.($$renderer3, {
children: ($$renderer4) => {
$$renderer4.push("<!---->");
Card_title?.($$renderer4, {
children: ($$renderer5) => {
$$renderer5.push(`<!---->${escape_html(user.name ?? user.email ?? user.id)}`);
},
$$slots: { default: true }
});
$$renderer4.push(`<!----> `);
if (user.email) {
$$renderer4.push("<!--[-->");
$$renderer4.push("<!---->");
Card_description?.($$renderer4, {
children: ($$renderer5) => {
$$renderer5.push(`<!---->${escape_html(user.email)}`);
},
$$slots: { default: true }
});
$$renderer4.push(`<!---->`);
} else {
$$renderer4.push("<!--[!-->");
}
$$renderer4.push(`<!--]-->`);
},
$$slots: { default: true }
});
$$renderer3.push(`<!----> `);
$$renderer3.push("<!---->");
Card_content?.($$renderer3, {
class: "flex flex-col gap-2",
children: ($$renderer4) => {
$$renderer4.push(`<p class="text-muted-foreground text-sm"><span class="font-medium text-foreground">Access:</span><br/> Prism ${escape_html(user.prism ? "✓" : "—")} · TasGrid ${escape_html(user.tasgrid ? "✓" : "—")} · Stackq ${escape_html(user.stackq ? "✓" : "—")} · HRM ${escape_html(user.hrm ? "✓" : "—")}</p> <p class="text-muted-foreground text-sm"><span class="font-medium text-foreground">Dark mode:</span> ${escape_html(user.darkmode ? "On" : "Off")}</p>`);
},
$$slots: { default: true }
});
$$renderer3.push(`<!---->`);
},
$$slots: { default: true }
});
$$renderer2.push(`<!----></main>`);
});
}
export {
_page as default
};
@@ -0,0 +1,9 @@
import { m as mapUserRecord } from "../../../chunks/user-from-record.js";
const load = async ({ locals }) => {
const list = await locals.pb.collection("users").getFullList();
const users = list.map((r) => mapUserRecord(r));
return { users };
};
export {
load
};
@@ -0,0 +1,111 @@
import { b as attributes, o as clsx, c as bind_props, f as head, j as ensure_array_like, i as escape_html, k as attr, m as stringify } from "../../../chunks/index2.js";
import { C as Card, a as Card_header, b as Card_title, c as Card_description, d as Card_content } from "../../../chunks/card-title.js";
import { c as cn } from "../../../chunks/utils2.js";
import "clsx";
import { B as Button } from "../../../chunks/button.js";
function Card_footer($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
let {
ref = null,
class: className,
children,
$$slots,
$$events,
...restProps
} = $$props;
$$renderer2.push(`<div${attributes({
"data-slot": "card-footer",
class: clsx(cn("flex items-center px-6 [.border-t]:pt-6", className)),
...restProps
})}>`);
children?.($$renderer2);
$$renderer2.push(`<!----></div>`);
bind_props($$props, { ref });
});
}
function _page($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
let { data } = $$props;
head("9fk07v", $$renderer2, ($$renderer3) => {
$$renderer3.title(($$renderer4) => {
$$renderer4.push(`<title>Users — Base</title>`);
});
});
$$renderer2.push(`<main class="flex min-h-0 flex-1 flex-col gap-4 p-4 sm:gap-6 sm:p-6"><h1 class="text-2xl font-semibold">Users</h1> <div class="grid gap-4 sm:grid-cols-2 lg:grid-cols-3"><!--[-->`);
const each_array = ensure_array_like(data.users);
for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
let user = each_array[$$index];
$$renderer2.push("<!---->");
Card?.($$renderer2, {
class: "flex flex-col",
children: ($$renderer3) => {
$$renderer3.push("<!---->");
Card_header?.($$renderer3, {
class: "flex flex-row items-center gap-3",
children: ($$renderer4) => {
$$renderer4.push(`<div class="flex size-10 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground text-sm font-medium">${escape_html(user.name ? String(user.name).slice(0, 2).toUpperCase() : user.email ? String(user.email).slice(0, 2).toUpperCase() : "?")}</div> <div class="min-w-0 flex-1">`);
$$renderer4.push("<!---->");
Card_title?.($$renderer4, {
class: "truncate",
children: ($$renderer5) => {
$$renderer5.push(`<!---->${escape_html(user.name ?? user.email ?? user.id)}`);
},
$$slots: { default: true }
});
$$renderer4.push(`<!----> `);
if (user.email && user.name) {
$$renderer4.push("<!--[-->");
$$renderer4.push("<!---->");
Card_description?.($$renderer4, {
class: "truncate text-xs",
children: ($$renderer5) => {
$$renderer5.push(`<!---->${escape_html(user.email)}`);
},
$$slots: { default: true }
});
$$renderer4.push(`<!---->`);
} else {
$$renderer4.push("<!--[!-->");
}
$$renderer4.push(`<!--]--></div>`);
},
$$slots: { default: true }
});
$$renderer3.push(`<!----> `);
$$renderer3.push("<!---->");
Card_content?.($$renderer3, {
class: "flex-1",
children: ($$renderer4) => {
$$renderer4.push(`<p class="text-muted-foreground text-sm">Prism ${escape_html(user.prism ? "✓" : "—")} · TasGrid ${escape_html(user.tasgrid ? "✓" : "—")} · Stackq ${escape_html(user.stackq ? "✓" : "—")} · HRM ${escape_html(user.hrm ? "✓" : "—")}</p>`);
},
$$slots: { default: true }
});
$$renderer3.push(`<!----> `);
$$renderer3.push("<!---->");
Card_footer?.($$renderer3, {
children: ($$renderer4) => {
$$renderer4.push(`<a${attr("href", `/users/${stringify(user.id)}`)} class="block">`);
Button($$renderer4, {
variant: "outline",
class: "w-full",
children: ($$renderer5) => {
$$renderer5.push(`<!---->View`);
},
$$slots: { default: true }
});
$$renderer4.push(`<!----></a>`);
},
$$slots: { default: true }
});
$$renderer3.push(`<!---->`);
},
$$slots: { default: true }
});
$$renderer2.push(`<!---->`);
}
$$renderer2.push(`<!--]--></div></main>`);
});
}
export {
_page as default
};