PageSourceSearch

https://app.spaitial.ai/assets/_token-CNgevsDe-ff0596822183.js

js spaitial.ai collected 2026-09-24 19:11:05 UTC 3,081 bytes, 3 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a0d427-d74c-7843-8be7-f058e09bd008")}catch(e){}}();import{j as e}from"./react-jWZu4flA-ff0596822183.js";import{w as x}from"./tanstack-router-CrgChUXj-ff0596822183.js";import{u as p,c as r,b as v}from"./tanstack-query-BUz1YEPT-ff0596822183.js";import{x as m,B as d,bn as h,H as f,U as l}from"./index-VqXkOoxb-ff0596822183.js";import{a as j,b as N,d as y}from"./workspace-invitations-BR581qoe-ff0596822183.js";import{S as c}from"./skeleton-Vs0H-wo_-ff0596822183.js";import{ak as g,L as b}from"./icons-W87Fk3bW-ff0596822183.js";import"./posthog-CTdkyuxI-ff0596822183.js";import"./radix-DS4boY_j-ff0596822183.js";import"./supabase-BcuDcHL0-ff0596822183.js";const k=a=>a==="edit"?"Editor":"Viewer";function w({token:a,onAccepted:i,onDeclined:n}){const s=p({queryKey:m.invitations.byToken(a),queryFn:()=>j(a),retry:!1}),t=r({mutationFn:()=>N(a),onSuccess:u=>i?.(u.workspaceId)}),o=r({mutationFn:()=>y(a),onSuccess:()=>n?.()});return e.jsx("div",{className:"flex min-h-svh items-center justify-center bg-background p-6",children:e.jsxs("div",{className:"w-full max-w-sm rounded-2xl border bg-muted/20 p-6 text-center",children:[s.isLoading&&e.jsxs("div",{className:"space-y-3",children:[e.jsx(c,{className:"mx-auto h-11 w-11 rounded-xl"}),e.jsx(c,{className:"mx-auto h-5 w-48"}),e.jsx(c,{className:"mx-auto h-9 w-full"})]}),s.isError&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-lg font-medium",children:"This invitation is no longer available"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"It may have been revoked, already used, or has expired."})]}),s.data&&e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"mx-auto flex size-11 items-center justify-center rounded-xl border bg-background text-muted-foreground",children:e.jsx(g,{className:"size-5"})}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("h1",{className:"text-lg font-medium",children:s.data.workspaceName}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:[s.data.inviterName?`${s.data.inviterName} invited you`:"You have been invited"," ","as ",k(s.data.role)]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(d,{variant:"outline",className:"flex-1",disabled:o.isPending||t.isPending,onClick:()=>o.mutate(),children:"Decline"}),e.jsx(d,{className:"flex-1",disabled:t.isPending||o.isPending,onClick:()=>t.mutate(),children:t.isPending?e.jsx(b,{className:"size-4 animate-spin"}):"Accept"})]})]})]})})}function E(){const{token:a}=h.useParams(),i=x(),n=v(),s=f(t=>t.setActiveWorkspaceId);return e.jsx(w,{token:a,onAccepted:t=>{s(t),n.invalidateQueries({queryKey:m.workspaces.all}),l.success("Invitation accepted"),i({to:"/worlds"})},onDeclined:()=>{l.success("Invitation declined"),i({to:"/"})}})}export{E as component};
2
3//# chunkId=01a0d427-d74c-7843-8be7-f058e09bd008

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.