Compare commits

...

10 Commits

Author SHA1 Message Date
avanzato 3f33154e16 Log release HML: UEA-PRODEM
Deploy HML Avanzato / deploy-hml (push) Failing after 13s
2026-06-10 12:14:47 -03:00
avanzato 9947565694 UEA-PRODEM 2026-06-10 12:14:46 -03:00
avanzato f54126b9d8 Log release HML: UEA-PRODEM
Deploy HML Avanzato / deploy-hml (push) Failing after 13s
2026-06-10 12:09:52 -03:00
avanzato a4002cb9c0 UEA-PRODEM 2026-06-10 12:09:52 -03:00
avanzato 17c278c624 Log release HML: UEA-PRODEM
Deploy HML Avanzato / deploy-hml (push) Failing after 14s
2026-06-10 11:39:22 -03:00
avanzato d420d33415 UEA-PRODEM 2026-06-10 11:39:21 -03:00
avanzato 47b753b5f1 Log release HML: Area restrita - Questionario
Deploy HML Avanzato / deploy-hml (push) Failing after 18s
2026-06-08 23:51:01 -03:00
avanzato ef968f10ae Area restrita - Questionario 2026-06-08 23:50:59 -03:00
avanzato f2e2400637 Log release HML: Aplicativos de Atrair Leads
Deploy HML Avanzato / deploy-hml (push) Successful in 52s
2026-06-08 20:45:15 -03:00
avanzato 27b4c9e705 Aplicativos de Atrair Leads 2026-06-08 20:45:15 -03:00
12059 changed files with 161867 additions and 2387841 deletions
Vendored
BIN
View File
Binary file not shown.
+6
View File
@@ -0,0 +1,6 @@
{
"version": 1,
"features": ["auth","db"],
"app_id": "19ea9897-40f2-8c3c-8000-0000bdf34d18",
"initialized_at": "2026-06-08T23:21:32Z"
}
+5
View File
@@ -0,0 +1,5 @@
node_modules
dist
.git
*.swp
*.log
+17
View File
@@ -0,0 +1,17 @@
# ── Backend ─────────────────────────────────────────────────────
APP_ID= # Application ID
APP_SECRET= # Application secret (used for JWT signing)
# ── Database ───────────────────────────────────────────────────
DATABASE_URL= # MySQL connection string (mysql://user:pass@host:port/db)
# ── Frontend (exposed to browser via Vite) ──────────────────────
VITE_KIMI_AUTH_URL= # Kimi OAuth server URL (e.g. https://auth.kimi.com)
VITE_APP_ID= # OAuth application ID
# ── Backend (Auth) ─────────────────────────────────────────────
KIMI_AUTH_URL= # Kimi OAuth server URL (backend)
KIMI_OPEN_URL= # Kimi Open Platform URL (e.g. https://open.kimi.com)
# ── Admin Role ──────────────────────────────────────────────────
OWNER_UNION_ID= # Union ID of the app creator; this user gets role "admin" on first login
+20 -25
View File
@@ -7,40 +7,35 @@ yarn-error.log*
pnpm-debug.log* pnpm-debug.log*
lerna-debug.log* lerna-debug.log*
# Build node_modules
dist dist
dist-ssr dist-ssr
*.local *.local
# Cache # Editor directories and files
.cache
.vite
# Dependencias
node_modules
# Ambiente (NUNCA commite!)
.env
.env.local
.env.*.local
# Editor
.vscode/* .vscode/*
!.vscode/extensions.json !.vscode/extensions.json
.idea .idea
.DS_Store
*.suo *.suo
*.ntvs* *.ntvs*
*.njsproj *.njsproj
*.sln *.sln
*.sw? *.sw?
# Environment variables
# OS .env
.DS_Store .env.local
Thumbs.db .env.*.local
# Database
# Scripts de deploy local *.db
scripts/.env.local *.sqlite
*.sqlite3
# ZIPs internos (nunca commite!) db/migrations/*.sql
*.zip # TypeScript cache
avanzato-*.zip *.tsbuildinfo
# Build outputs
dist/
build/
# Test coverage
coverage/
.nyc_output/
+35
View File
@@ -0,0 +1,35 @@
# Dependencies
node_modules/
.pnpm-store/
# Build outputs
dist/
build/
*.dist
# Generated files
*.tsbuildinfo
coverage/
# Package files
package-lock.json
pnpm-lock.yaml
# Database
*.db
*.sqlite
*.sqlite3
# Logs
*.log
# Environment files
.env*
# IDE files
.vscode/
.idea/
# OS files
.DS_Store
Thumbs.db
+15
View File
@@ -0,0 +1,15 @@
{
"semi": true,
"trailingComma": "es5",
"singleQuote": false,
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"bracketSpacing": true,
"bracketSameLine": false,
"arrowParens": "avoid",
"endOfLine": "lf",
"quoteProps": "as-needed",
"jsxSingleQuote": false,
"proseWrap": "preserve"
}
+235
View File
@@ -0,0 +1,235 @@
# ============================================================================
# GUIA - Como Subir o ZIP em Desenvolvimento (Dev)
# ============================================================================
## 1. DESCOMPACTAR O ZIP
```bash
# No Mac/Linux:
cd ~/Documentos # ou onde voce guarda os projetos
unzip avanzato-site-v1.5.0-FINAL.zip -d avanzato-site
# No Windows (PowerShell):
Expand-Archive -Path "avanzato-site-v1.5.0-FINAL.zip" -DestinationPath "avanzato-site"
```
---
## 2. ENTRAR NA PASTA
```bash
cd avanzato-site
```
Estrutura que voce vera:
```
avanzato-site/
src/ ← Codigo fonte React
api/ ← Backend tRPC + Hono
db/ ← Schema do banco
dist/ ← Build pronto (frontend)
public/ ← Imagens, logos, favicon
package.json ← Dependencias
...
```
---
## 3. INSTALAR DEPENDENCIAS
```bash
npm install
```
Se der erro de esbuild:
```bash
npm config set allow-scripts true
npm rebuild esbuild --foreground-scripts
```
---
## 4. CONFIGURAR O BANCO DE DADOS (MySQL)
O projeto precisa de MySQL rodando. Voce tem 2 opcoes:
### OPCAO A - MySQL Local (se ja tem instalado)
```bash
# Verificar se MySQL esta rodando
mysql -u root -p
# Criar banco de dados
CREATE DATABASE avanzato CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
```
Editar o arquivo `.env`:
```bash
# Abrir .env e verificar DATABASE_URL
DATABASE_URL="mysql://root:SUA_SENHA@localhost:3306/avanzato"
```
### OPCAO B - Docker (mais facil)
```bash
# Rodar MySQL em Docker
docker run -d \
--name mysql-avanzato \
-e MYSQL_ROOT_PASSWORD=senha123 \
-e MYSQL_DATABASE=avanzato \
-p 3306:3306 \
mysql:8
# Esperar 30 segundos e verificar
docker logs mysql-avanzato
```
Editar `.env`:
```
DATABASE_URL="mysql://root:senha123@localhost:3306/avanzato"
```
### OPCAO C - Sem banco (frontend apenas)
Se quiser ver so o frontend, pule para o passo 6 e use:
```bash
npm run build
npx serve dist/
```
---
## 5. SINCRONIZAR O BANCO
```bash
npm run db:push
```
Isso cria todas as tabelas automaticamente.
Para popular com dados iniciais (formulario UEA):
```bash
npx tsx db/seed.ts
```
---
## 6. INICIAR O SERVIDOR
```bash
npm run dev
```
Acesse: **http://localhost:3000**
---
## 7. COMANDOS UTEIS
| Comando | O que faz |
|---------|-----------|
| `npm run dev` | Inicia servidor dev (porta 3000) |
| `npm run build` | Build para producao (gera dist/) |
| `npm run check` | Verifica erros de TypeScript |
| `npm run db:push` | Sincroniza schema com o banco |
| `npm start` | Inicia servidor de producao |
---
## 8. PROBLEMAS COMUNS
### "Cannot find module"
```bash
rm -rf node_modules package-lock.json
npm install
```
### "esbuild permission denied"
```bash
npm config set allow-scripts true
npm rebuild esbuild --foreground-scripts
```
### "Database connection refused"
```bash
# Verificar se MySQL esta rodando
mysql -u root -p -e "SHOW DATABASES;"
# Ou com Docker
docker ps | grep mysql
```
### Tela branca no navegador
```bash
# Verificar console do navegador (F12)
# Verificar se o backend esta rodando
curl http://localhost:3000/api/trpc/ping
```
### Porta 3000 ocupada
```bash
# Mac/Linux
lsof -ti:3000 | xargs kill -9
# Windows
netstat -ano | findstr :3000
taskkill /PID <NUMERO> /F
```
---
## 9. ESTRUTURA DAS ROTAS
```
http://localhost:3000/
/ ← Site principal (Home)
/sobre ← Sobre nos
/servicos/* ← 10 paginas de servicos
/tecnologias ← Tecnologias
/ferramentas ← 7 ferramentas gratuitas
/avaliacao ← Avaliador de TI
/cases ← Cases de sucesso
/blog ← Blog
/contato ← Contato
/area-do-cliente ← Painel admin
/formulario/:codigo ← Formulario publico
/uea-prodem-angola ← Ambiente UEA-PRODEM
/status ← Pagina de status/versao
```
---
## 10. PARA PRODUCAO
```bash
# 1. Build
npm run build
# 2. O conteudo fica em dist/
# 3. Copiar tudo de dist/ para o servidor
# 4. Configurar Nginx (ver nginx/avanzato.conf)
```
---
## RESUMO RAPIDO
```bash
# 1x - Setup inicial
cd avanzato-site
npm install
npm config set allow-scripts true
npm rebuild esbuild --foreground-scripts
# 1x - Banco (se usar MySQL)
npm run db:push
npx tsx db/seed.ts
# Sempre que quiser rodar
npm run dev
# Acesse: http://localhost:3000
```
---
Duvidas? Verifique o arquivo `.env` e confirme que DATABASE_URL esta correto.
+22
View File
@@ -0,0 +1,22 @@
import * as cookie from "cookie";
import { Session } from "@contracts/constants";
import { getSessionCookieOptions } from "./lib/cookies";
import { createRouter, authedQuery } from "./middleware";
export const authRouter = createRouter({
me: authedQuery.query((opts) => opts.ctx.user),
logout: authedQuery.mutation(async ({ ctx }) => {
const opts = getSessionCookieOptions(ctx.req.headers);
ctx.resHeaders.append(
"set-cookie",
cookie.serialize(Session.cookieName, "", {
httpOnly: opts.httpOnly,
path: opts.path,
sameSite: opts.sameSite?.toLowerCase() as "lax" | "none",
secure: opts.secure,
maxAge: 0,
}),
);
return { success: true };
}),
});
+36
View File
@@ -0,0 +1,36 @@
import { Hono } from "hono";
import { bodyLimit } from "hono/body-limit";
import type { HttpBindings } from "@hono/node-server";
import { fetchRequestHandler } from "@trpc/server/adapters/fetch";
import { appRouter } from "./router";
import { createContext } from "./context";
import { env } from "./lib/env";
import { createOAuthCallbackHandler } from "./kimi/auth";
import { Paths } from "@contracts/constants";
const app = new Hono<{ Bindings: HttpBindings }>();
app.use(bodyLimit({ maxSize: 50 * 1024 * 1024 }));
app.get(Paths.oauthCallback, createOAuthCallbackHandler());
app.use("/api/trpc/*", async (c) => {
return fetchRequestHandler({
endpoint: "/api/trpc",
req: c.req.raw,
router: appRouter,
createContext,
});
});
app.all("/api/*", (c) => c.json({ error: "Not Found" }, 404));
export default app;
if (env.isProduction) {
const { serve } = await import("@hono/node-server");
const { serveStaticFiles } = await import("./lib/vite");
serveStaticFiles(app);
const port = parseInt(process.env.PORT || "3000");
serve({ fetch: app.fetch, port }, () => {
console.log(`Server running on http://localhost:${port}/`);
});
}
+21
View File
@@ -0,0 +1,21 @@
import type { FetchCreateContextFnOptions } from "@trpc/server/adapters/fetch";
import type { User } from "@db/schema";
import { authenticateRequest } from "./kimi/auth";
export type TrpcContext = {
req: Request;
resHeaders: Headers;
user?: User;
};
export async function createContext(
opts: FetchCreateContextFnOptions,
): Promise<TrpcContext> {
const ctx: TrpcContext = { req: opts.req, resHeaders: opts.resHeaders };
try {
ctx.user = await authenticateRequest(opts.req.headers);
} catch {
// Authentication is optional here
}
return ctx;
}
+211
View File
@@ -0,0 +1,211 @@
// ============================================================================
// FORM ROUTER - Area do Cliente Avanzato
// ============================================================================
// Routers para gestao de formularios e respostas
// ============================================================================
import { z } from "zod";
import { createRouter, publicQuery, authedQuery } from "./middleware";
import { getDb } from "./queries/connection";
import { clientForms, formSections, formQuestions, formAnswers, formSubmissions } from "../db/schema";
import { eq, desc, and } from "drizzle-orm";
// Gerar codigo aleatorio de 8 caracteres
function generateCode(): string {
return Math.random().toString(36).substring(2, 10).toUpperCase();
}
export const formRouter = createRouter({
// ==========================================================================
// ADMIN - Gerenciamento de Formularios
// ==========================================================================
// Listar todos os formularios
list: publicQuery.query(async () => {
const db = getDb();
const forms = await db.select().from(clientForms).orderBy(desc(clientForms.createdAt));
return forms;
}),
// Criar novo formulario
create: publicQuery
.input(
z.object({
title: z.string().min(1),
description: z.string().optional(),
clientName: z.string().min(1),
clientEmail: z.string().email().optional(),
})
)
.mutation(async ({ input }) => {
const db = getDb();
const code = generateCode();
await db.insert(clientForms).values({
title: input.title,
description: input.description || "",
clientName: input.clientName,
clientEmail: input.clientEmail || "",
status: "active",
accessCode: code,
createdBy: "Avanzato",
});
return { code, message: "Formulario criado com sucesso" };
}),
// Atualizar status (active/inactive/archived)
updateStatus: publicQuery
.input(
z.object({
accessCode: z.string(),
status: z.enum(["active", "inactive", "archived"]),
})
)
.mutation(async ({ input }) => {
const db = getDb();
await db
.update(clientForms)
.set({ status: input.status })
.where(eq(clientForms.accessCode, input.accessCode));
return { message: "Status atualizado" };
}),
// Excluir formulario
delete: publicQuery
.input(z.object({ accessCode: z.string() }))
.mutation(async ({ input }) => {
const db = getDb();
// Primeiro excluir respostas e perguntas
await db.delete(formAnswers).where(eq(formAnswers.formId, input.accessCode));
await db.delete(formQuestions).where(eq(formQuestions.formId, input.accessCode));
await db.delete(formSections).where(eq(formSections.formId, input.accessCode));
await db.delete(formSubmissions).where(eq(formSubmissions.formId, input.accessCode));
await db.delete(clientForms).where(eq(clientForms.accessCode, input.accessCode));
return { message: "Formulario excluido" };
}),
// Renovar codigo de acesso
regenerateCode: publicQuery
.input(z.object({ accessCode: z.string() }))
.mutation(async ({ input }) => {
const db = getDb();
const newCode = generateCode();
await db
.update(clientForms)
.set({ accessCode: newCode })
.where(eq(clientForms.accessCode, input.accessCode));
return { newCode };
}),
// ==========================================================================
// PUBLICO - Acesso ao Formulario via Codigo
// ==========================================================================
// Buscar formulario por codigo (publico)
getByCode: publicQuery
.input(z.object({ code: z.string() }))
.query(async ({ input }) => {
const db = getDb();
const [form] = await db
.select()
.from(clientForms)
.where(eq(clientForms.accessCode, input.code));
if (!form) return null;
if (form.status !== "active") return { ...form, _blocked: true };
// Buscar perguntas agrupadas por secao
const questions = await db
.select()
.from(formQuestions)
.where(eq(formQuestions.formId, input.code))
.orderBy(formQuestions.id);
const sections = await db
.select()
.from(formSections)
.where(eq(formSections.formId, input.code))
.orderBy(formSections.id);
return { ...form, questions, sections };
}),
// Submeter respostas do formulario
submit: publicQuery
.input(
z.object({
formId: z.string(),
code: z.string(),
answers: z.array(
z.object({
questionId: z.string(),
answer: z.string(),
})
),
submittedBy: z.string().optional(),
submittedByEmail: z.string().optional(),
})
)
.mutation(async ({ input }) => {
const db = getDb();
// Verificar se formulario esta ativo
const [form] = await db
.select()
.from(clientForms)
.where(eq(clientForms.accessCode, input.code));
if (!form || form.status !== "active") {
throw new Error("Formulario nao encontrado ou inativo");
}
// Inserir submissao
await db.insert(formSubmissions).values({
formId: input.formId,
submittedBy: input.submittedBy || "Anonimo",
submittedByEmail: input.submittedByEmail || "",
});
// Inserir respostas
for (const a of input.answers) {
await db.insert(formAnswers).values({
formId: input.formId,
questionId: a.questionId,
answer: a.answer,
});
}
return { message: "Respostas submetidas com sucesso" };
}),
// ==========================================================================
// ADMIN - Visualizar Respostas
// ==========================================================================
// Listar submissoes de um formulario
getSubmissions: publicQuery
.input(z.object({ accessCode: z.string() }))
.query(async ({ input }) => {
const db = getDb();
const submissions = await db
.select()
.from(formSubmissions)
.where(eq(formSubmissions.formId, input.accessCode))
.orderBy(desc(formSubmissions.createdAt));
return submissions;
}),
// Obter todas as respostas de uma submissao
getAnswers: publicQuery
.input(z.object({ formId: z.string() }))
.query(async ({ input }) => {
const db = getDb();
const answers = await db
.select()
.from(formAnswers)
.where(eq(formAnswers.formId, input.formId))
.orderBy(formAnswers.id);
return answers;
}),
});
+130
View File
@@ -0,0 +1,130 @@
import type { Context } from "hono";
import { setCookie } from "hono/cookie";
import * as jose from "jose";
import * as cookie from "cookie";
import { env } from "../lib/env";
import { getSessionCookieOptions } from "../lib/cookies";
import { Session } from "@contracts/constants";
import { Errors } from "@contracts/errors";
import { signSessionToken, verifySessionToken } from "./session";
import { users as kimiUsers } from "./platform";
import { findUserByUnionId, upsertUser } from "../queries/users";
import type { TokenResponse } from "./types";
async function exchangeAuthCode(
code: string,
redirectUri: string,
): Promise<TokenResponse> {
const body = new URLSearchParams({
grant_type: "authorization_code",
code,
client_id: env.appId,
redirect_uri: redirectUri,
client_secret: env.appSecret,
});
const resp = await fetch(`${env.kimiAuthUrl}/api/oauth/token`, {
method: "POST",
headers: { "Content-Type": "application/x-www-form-urlencoded" },
body: body.toString(),
});
if (!resp.ok) {
const text = await resp.text();
throw new Error(`Token exchange failed (${resp.status}): ${text}`);
}
return resp.json() as Promise<TokenResponse>;
}
const jwks = jose.createRemoteJWKSet(
new URL(`${env.kimiAuthUrl}/api/.well-known/jwks.json`),
);
async function verifyAccessToken(
accessToken: string,
): Promise<{ userId: string; clientId: string }> {
const { payload } = await jose.jwtVerify(accessToken, jwks);
const userId = payload.user_id as string;
const clientId = payload.client_id as string;
if (!userId) {
throw new Error("user_id missing from access token");
}
return { userId, clientId };
}
export async function authenticateRequest(headers: Headers) {
const cookies = cookie.parse(headers.get("cookie") || "");
const token = cookies[Session.cookieName];
if (!token) {
console.warn("[auth] No session cookie found in request.");
throw Errors.forbidden("Invalid authentication token.");
}
const claim = await verifySessionToken(token);
if (!claim) {
throw Errors.forbidden("Invalid authentication token.");
}
const user = await findUserByUnionId(claim.unionId);
if (!user) {
throw Errors.forbidden("User not found. Please re-login.");
}
return user;
}
export function createOAuthCallbackHandler() {
return async (c: Context) => {
const code = c.req.query("code");
const state = c.req.query("state");
const error = c.req.query("error");
const errorDescription = c.req.query("error_description");
if (error) {
if (error === "access_denied") {
return c.redirect("/", 302);
}
return c.json(
{ error, error_description: errorDescription },
400,
);
}
if (!code || !state) {
return c.json({ error: "code and state are required" }, 400);
}
try {
const redirectUri = atob(state);
const tokenResp = await exchangeAuthCode(code, redirectUri);
const { userId } = await verifyAccessToken(tokenResp.access_token);
const userProfile = await kimiUsers.getProfile(tokenResp.access_token);
if (!userProfile) {
throw new Error("Failed to fetch user profile from Kimi Open");
}
await upsertUser({
unionId: userId,
name: userProfile.name,
avatar: userProfile.avatar_url,
lastSignInAt: new Date(),
});
const token = await signSessionToken({
unionId: userId,
clientId: env.appId,
});
const cookieOpts = getSessionCookieOptions(c.req.raw.headers);
setCookie(c, Session.cookieName, token, {
...cookieOpts,
maxAge: Session.maxAgeMs / 1000,
});
return c.redirect("/", 302);
} catch (error) {
console.error("[OAuth] Callback failed", error);
return c.json({ error: "OAuth callback failed" }, 500);
}
};
}
export { exchangeAuthCode, verifyAccessToken };
+30
View File
@@ -0,0 +1,30 @@
import { env } from "../lib/env";
import type { UserProfile } from "./types";
async function kimiRequest<T>(
path: string,
token: string,
init?: RequestInit,
): Promise<T | null> {
const resp = await fetch(`${env.kimiOpenUrl}${path}`, {
...init,
headers: {
Accept: "application/json",
Authorization: `Bearer ${token}`,
...init?.headers,
},
});
if (!resp.ok) {
const text = await resp.text();
console.warn(
`[kimi] Request to ${path} failed (${resp.status}): ${text}`,
);
return null;
}
return resp.json() as Promise<T>;
}
export const users = {
getProfile: (token: string) =>
kimiRequest<UserProfile>("/v1/users/me/profile", token),
};
+40
View File
@@ -0,0 +1,40 @@
import * as jose from "jose";
import { env } from "../lib/env";
import type { SessionPayload } from "./types";
const JWT_ALG = "HS256";
export async function signSessionToken(
payload: SessionPayload,
): Promise<string> {
const secret = new TextEncoder().encode(env.appSecret);
return new jose.SignJWT(payload)
.setProtectedHeader({ alg: JWT_ALG })
.setIssuedAt()
.setExpirationTime("1 year")
.sign(secret);
}
export async function verifySessionToken(
token: string,
): Promise<SessionPayload | null> {
if (!token) {
console.warn("[session] No token provided for verification.");
return null;
}
try {
const secret = new TextEncoder().encode(env.appSecret);
const { payload } = await jose.jwtVerify(token, secret, {
algorithms: [JWT_ALG],
});
const { unionId, clientId } = payload;
if (!unionId || !clientId) {
console.warn("[session] JWT payload missing required fields.");
return null;
}
return { unionId, clientId } as SessionPayload;
} catch (error) {
console.warn("[session] JWT verification failed:", error);
return null;
}
}
+18
View File
@@ -0,0 +1,18 @@
export type TokenResponse = {
access_token: string;
token_type: string;
expires_in: number;
refresh_token?: string;
scope: string;
};
export type SessionPayload = {
unionId: string;
clientId: string;
};
export type UserProfile = {
user_id: string;
name: string;
avatar_url: string;
};
+17
View File
@@ -0,0 +1,17 @@
import type { CookieOptions } from "hono/utils/cookie";
function isLocalhost(headers: Headers): boolean {
const host = headers.get("host") || "";
return host.startsWith("localhost:") || host.startsWith("127.0.0.1:");
}
export function getSessionCookieOptions(headers: Headers): CookieOptions {
const localhost = isLocalhost(headers);
return {
httpOnly: true,
path: "/",
sameSite: localhost ? "Lax" : "None",
secure: !localhost,
};
}
+19
View File
@@ -0,0 +1,19 @@
import "dotenv/config";
function required(name: string): string {
const value = process.env[name];
if (!value && process.env.NODE_ENV === "production") {
throw new Error(`Missing required environment variable: ${name}`);
}
return value ?? "";
}
export const env = {
appId: required("APP_ID"),
appSecret: required("APP_SECRET"),
isProduction: process.env.NODE_ENV === "production",
databaseUrl: required("DATABASE_URL"),
kimiAuthUrl: required("KIMI_AUTH_URL"),
kimiOpenUrl: required("KIMI_OPEN_URL"),
ownerUnionId: process.env.OWNER_UNION_ID ?? "",
};
+77
View File
@@ -0,0 +1,77 @@
interface RequestConfig extends RequestInit {
baseUrl?: string;
params?: Record<string, string | number>;
timeout?: number;
}
export class HttpClient {
private baseUrl: string;
private defaultHeaders: Record<string, string>;
constructor(baseURL: string, opts?: { headers?: Record<string, string> }) {
this.baseUrl = baseURL;
this.defaultHeaders = {
"Content-Type": "application/json",
...opts?.headers,
};
}
async request<T>(endpoint: string, config: RequestConfig = {}): Promise<T> {
const {
method = "GET",
params,
body,
headers,
timeout = 30000,
...rest
} = config;
const url = new URL(`${this.baseUrl}${endpoint}`);
if (params) {
Object.entries(params).forEach(([key, value]) =>
url.searchParams.append(key, value.toString()),
);
}
const controller = new AbortController();
const timeoutId = setTimeout(() => controller.abort(), timeout);
try {
const response = await fetch(url.toString(), {
...rest,
method,
headers: { ...this.defaultHeaders, ...headers },
body: body ? JSON.stringify(body) : undefined,
signal: controller.signal,
});
clearTimeout(timeoutId);
if (!response.ok) {
const errorData = (await response
.json()
.catch(() => ({}))) as Record<string, string>;
throw new Error(errorData.message || `HTTP Error: ${response.status}`);
}
return (await response.json()) as T;
} catch (error: any) {
if (error.name === "AbortError") {
throw new Error("Request timeout");
}
throw error;
}
}
get<T>(
url: string,
params?: RequestConfig["params"],
config?: RequestConfig,
) {
return this.request<T>(url, { ...config, method: "GET", params });
}
post<T>(url: string, body?: any, config?: RequestConfig) {
return this.request<T>(url, { ...config, method: "POST", body });
}
}
+23
View File
@@ -0,0 +1,23 @@
import type { Hono } from "hono";
import type { HttpBindings } from "@hono/node-server";
import { serveStatic } from "@hono/node-server/serve-static";
import fs from "fs";
import path from "path";
type App = Hono<{ Bindings: HttpBindings }>;
export function serveStaticFiles(app: App) {
const distPath = path.resolve(import.meta.dirname, "../dist/public");
app.use("*", serveStatic({ root: "./dist/public" }));
app.notFound((c) => {
const accept = c.req.header("accept") ?? "";
if (!accept.includes("text/html")) {
return c.json({ error: "Not Found" }, 404);
}
const indexPath = path.resolve(distPath, "index.html");
const content = fs.readFileSync(indexPath, "utf-8");
return c.html(content);
});
}
+42
View File
@@ -0,0 +1,42 @@
import { ErrorMessages } from "@contracts/constants";
import { initTRPC, TRPCError } from "@trpc/server";
import superjson from "superjson";
import type { TrpcContext } from "./context";
const t = initTRPC.context<TrpcContext>().create({
transformer: superjson,
});
export const createRouter = t.router;
export const publicQuery = t.procedure;
const requireAuth = t.middleware(async (opts) => {
const { ctx, next } = opts;
if (!ctx.user) {
throw new TRPCError({
code: "UNAUTHORIZED",
message: ErrorMessages.unauthenticated,
});
}
return next({ ctx: { ...ctx, user: ctx.user } });
});
function requireRole(role: string) {
return t.middleware(async (opts) => {
const { ctx, next } = opts;
if (!ctx.user || ctx.user.role !== role) {
throw new TRPCError({
code: "FORBIDDEN",
message: ErrorMessages.insufficientRole,
});
}
return next({ ctx: { ...ctx, user: ctx.user } });
});
}
export const authedQuery = t.procedure.use(requireAuth);
export const adminQuery = authedQuery.use(requireRole("admin"));
+18
View File
@@ -0,0 +1,18 @@
import { drizzle } from "drizzle-orm/mysql2";
import { env } from "../lib/env";
import * as schema from "@db/schema";
import * as relations from "@db/relations";
const fullSchema = { ...schema, ...relations };
let instance: ReturnType<typeof drizzle<typeof fullSchema>>;
export function getDb() {
if (!instance) {
instance = drizzle(env.databaseUrl, {
mode: "planetscale",
schema: fullSchema,
});
}
return instance;
}
+36
View File
@@ -0,0 +1,36 @@
import { eq } from "drizzle-orm";
import * as schema from "@db/schema";
import type { InsertUser } from "@db/schema";
import { getDb } from "./connection";
import { env } from "../lib/env";
export async function findUserByUnionId(unionId: string) {
const rows = await getDb()
.select()
.from(schema.users)
.where(eq(schema.users.unionId, unionId))
.limit(1);
return rows.at(0);
}
export async function upsertUser(data: InsertUser) {
const values = { ...data };
const updateSet: Partial<InsertUser> = {
lastSignInAt: new Date(),
...data,
};
if (
values.role === undefined &&
values.unionId &&
values.unionId === env.ownerUnionId
) {
values.role = "admin";
updateSet.role = "admin";
}
await getDb()
.insert(schema.users)
.values(values)
.onDuplicateKeyUpdate({ set: updateSet });
}
+11
View File
@@ -0,0 +1,11 @@
import { authRouter } from "./auth-router";
import { formRouter } from "./form-router";
import { createRouter, publicQuery } from "./middleware";
export const appRouter = createRouter({
ping: publicQuery.query(() => ({ ok: true, ts: Date.now() })),
auth: authRouter,
form: formRouter,
});
export type AppRouter = typeof appRouter;
+14
View File
@@ -0,0 +1,14 @@
export const Session = {
cookieName: "kimi_sid",
maxAgeMs: 365 * 24 * 60 * 60 * 1000,
} as const;
export const ErrorMessages = {
unauthenticated: "Authentication required",
insufficientRole: "Insufficient permissions",
} as const;
export const Paths = {
login: "/login",
oauthCallback: "/api/oauth/callback",
} as const;
+15
View File
@@ -0,0 +1,15 @@
type AppError = { tag: "app_error"; status: number; message: string };
function appError(status: number, message: string): AppError {
return { tag: "app_error", status, message };
}
export const Errors = {
badRequest: (msg: string) => appError(400, msg),
unauthorized: (msg: string) => appError(401, msg),
forbidden: (msg: string) => appError(403, msg),
notFound: (msg: string) => appError(404, msg),
internal: (msg: string) => appError(500, msg),
} as const;
export type { AppError };
+2
View File
@@ -0,0 +1,2 @@
export type * from "../db/schema";
export * from "./errors";
+1
View File
@@ -0,0 +1 @@
import {} from "./schema";
+109
View File
@@ -0,0 +1,109 @@
import {
mysqlTable,
mysqlEnum,
serial,
varchar,
text,
timestamp,
// bigint,
} from "drizzle-orm/mysql-core";
export const users = mysqlTable("users", {
id: serial("id").primaryKey(),
unionId: varchar("unionId", { length: 255 }).notNull().unique(),
name: varchar("name", { length: 255 }),
email: varchar("email", { length: 320 }),
avatar: text("avatar"),
role: mysqlEnum("role", ["user", "admin"]).default("user").notNull(),
createdAt: timestamp("createdAt").defaultNow().notNull(),
updatedAt: timestamp("updatedAt")
.defaultNow()
.notNull()
.$onUpdate(() => new Date()),
lastSignInAt: timestamp("lastSignInAt").defaultNow().notNull(),
});
export type User = typeof users.$inferSelect;
export type InsertUser = typeof users.$inferInsert;
// ============================================================================
// SISTEMA DE FORMULARIOS - Area do Cliente Avanzato
// ============================================================================
// Formularios criados pela Avanzato para clientes
export const clientForms = mysqlTable("client_forms", {
id: serial("id").primaryKey(),
title: varchar("title", { length: 255 }).notNull(),
description: text("description"),
clientName: varchar("clientName", { length: 255 }).notNull(),
clientEmail: varchar("clientEmail", { length: 320 }),
status: mysqlEnum("status", ["active", "inactive", "archived"]).default("inactive").notNull(),
accessCode: varchar("access_code", { length: 32 }).notNull().unique(),
createdBy: varchar("created_by", { length: 255 }),
createdAt: timestamp("created_at").defaultNow().notNull(),
updatedAt: timestamp("updated_at").defaultNow().notNull().$onUpdate(() => new Date()),
});
export type ClientForm = typeof clientForms.$inferSelect;
export type InsertClientForm = typeof clientForms.$inferInsert;
// Secoes de cada formulario
export const formSections = mysqlTable("form_sections", {
id: serial("id").primaryKey(),
formId: varchar("form_id", { length: 32 }).notNull(),
title: varchar("title", { length: 255 }).notNull(),
description: text("description"),
orderNum: serial("order_num"),
createdAt: timestamp("created_at").defaultNow().notNull(),
});
export type FormSection = typeof formSections.$inferSelect;
// Perguntas/Campos de cada secao
export const formQuestions = mysqlTable("form_questions", {
id: serial("id").primaryKey(),
formId: varchar("form_id", { length: 32 }).notNull(),
sectionId: varchar("section_id", { length: 32 }),
question: text("question").notNull(),
fieldType: mysqlEnum("field_type", ["text", "textarea", "number", "select", "multiselect", "date", "file"]).default("text").notNull(),
options: text("options"), // JSON string para select/multiselect
required: mysqlEnum("required", ["yes", "no"]).default("no").notNull(),
orderNum: serial("order_num"),
createdAt: timestamp("created_at").defaultNow().notNull(),
});
export type FormQuestion = typeof formQuestions.$inferSelect;
// Respostas submetidas pelos clientes
export const formAnswers = mysqlTable("form_answers", {
id: serial("id").primaryKey(),
formId: varchar("form_id", { length: 32 }).notNull(),
questionId: varchar("question_id", { length: 32 }).notNull(),
answer: text("answer"),
createdAt: timestamp("created_at").defaultNow().notNull(),
});
export type FormAnswer = typeof formAnswers.$inferSelect;
// Submissoes completas (uma por formulario preenchido)
export const formSubmissions = mysqlTable("form_submissions", {
id: serial("id").primaryKey(),
formId: varchar("form_id", { length: 32 }).notNull(),
submittedBy: varchar("submitted_by", { length: 255 }),
submittedByEmail: varchar("submitted_by_email", { length: 320 }),
notes: text("notes"),
createdAt: timestamp("created_at").defaultNow().notNull(),
});
export type FormSubmission = typeof formSubmissions.$inferSelect;
//
// Example:
// export const posts = mysqlTable("posts", {
// id: serial("id").primaryKey(),
// title: varchar("title", { length: 255 }).notNull(),
// content: text("content"),
// createdAt: timestamp("created_at").notNull().defaultNow(),
// });
//
// Note: FK columns referencing a serial() PK must use:
// bigint("columnName", { mode: "number", unsigned: true }).notNull()
+181
View File
@@ -0,0 +1,181 @@
// ============================================================================
// SEED - Formulario UEA-PRODEM-ANGOLA
// ============================================================================
// Executar: npx tsx db/seed.ts
// ============================================================================
import { getDb } from "../api/queries/connection";
import { clientForms, formSections, formQuestions } from "./schema";
const FORM_ID = "uea-prodem-angola";
const sections = [
{ id: "s1", title: "1. DADOS INSTITUCIONAIS", description: "Informacoes sobre a estrutura atual da UEA", order: 1 },
{ id: "s2", title: "2. PROJECAO DE CRESCIMENTO", description: "Estimativas de crescimento para os proximos 36 meses", order: 2 },
{ id: "s3", title: "3. REGISTO E VALIDACAO", description: "Processo de aprovacao e validacao de membros", order: 3 },
{ id: "s4", title: "4. ESTRUTURA DE MEMBROS", description: "Categorias, niveis e beneficios", order: 4 },
{ id: "s5", title: "5. PAGAMENTOS", description: "Plataformas e regras de faturacao", order: 5 },
{ id: "s6", title: "6. INCUBADORA EMPRESARIAL", description: "Funil de evolucao e acompanhamento", order: 6 },
{ id: "s7", title: "7. FORMACAO E CERTIFICACAO", description: "Cursos, conteudos e certificados", order: 7 },
{ id: "s8", title: "8. MARKETPLACE B2B", description: "Produtos, servicos e intermedicao", order: 8 },
{ id: "s9", title: "9. EVENTOS", description: "Gestao e transmissao de eventos", order: 9 },
{ id: "s10", title: "10. BANCO CENTRAL DE DADOS (BCD)", description: "Objetivos, dados e dashboards", order: 10 },
{ id: "s11", title: "11. DOCUMENTACAO LEGAL", description: "Documentos necessarios para o projeto", order: 11 },
{ id: "s12", title: "12. INFRAESTRUTURA E HOSPEDAGEM", description: "Ambiente, cloud e suporte tecnico", order: 12 },
{ id: "s13", title: "13. RELATORIOS EXECUTIVOS", description: "Relatorios para a Direcao", order: 13 },
];
const questions = [
// SECAO 1 - DADOS INSTITUCIONAIS
{ sectionId: "s1", q: "1.1 Quantidade atual de membros individuais ativos", type: "number" as const, required: "yes" as const },
{ sectionId: "s1", q: "1.2 Quantidade atual de empresas associadas", type: "number" as const, required: "yes" as const },
{ sectionId: "s1", q: "1.3 Quantidade total de cadastros existentes", type: "number" as const, required: "yes" as const },
{ sectionId: "s1", q: "1.4 Quantidade de membros pagantes", type: "number" as const, required: "yes" as const },
{ sectionId: "s1", q: "1.5 Quantidade de membros inadimplentes", type: "number" as const, required: "yes" as const },
{ sectionId: "s1", q: "1.6 Quantidade de provincias atualmente representadas", type: "number" as const, required: "yes" as const },
{ sectionId: "s1", q: "1.7 Quantidade de colaboradores administrativos da UEA", type: "number" as const, required: "yes" as const },
{ sectionId: "s1", q: "1.8 Quantidade de utilizadores internos que terao acesso administrativo ao sistema", type: "number" as const, required: "yes" as const },
// SECAO 2 - PROJECAO DE CRESCIMENTO
{ sectionId: "s2", q: "2.1 Membros previstos para 12 meses", type: "number" as const, required: "yes" as const },
{ sectionId: "s2", q: "2.1 Membros previstos para 24 meses", type: "number" as const, required: "yes" as const },
{ sectionId: "s2", q: "2.1 Membros previstos para 36 meses", type: "number" as const, required: "yes" as const },
{ sectionId: "s2", q: "2.2 Empresas previstas para 12 meses", type: "number" as const, required: "yes" as const },
{ sectionId: "s2", q: "2.2 Empresas previstas para 24 meses", type: "number" as const, required: "yes" as const },
{ sectionId: "s2", q: "2.2 Empresas previstas para 36 meses", type: "number" as const, required: "yes" as const },
{ sectionId: "s2", q: "2.3 Numero medio de novos cadastros esperado por mes", type: "number" as const, required: "yes" as const },
{ sectionId: "s2", q: "2.4 Numero medio de acessos simultaneos esperado durante eventos ou campanhas nacionais", type: "number" as const, required: "yes" as const },
// SECAO 3 - REGISTO E VALIDACAO
{ sectionId: "s3", q: "3.1 Quem aprovara os novos membros?", type: "textarea" as const, required: "yes" as const },
{ sectionId: "s3", q: "3.2 Existirao administradores provinciais?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "A definir"]), required: "yes" as const },
{ sectionId: "s3", q: "3.3 Existirao administradores municipais?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "A definir"]), required: "yes" as const },
{ sectionId: "s3", q: "3.4 O processo de validacao sera centralizado ou descentralizado?", type: "select" as const, options: JSON.stringify(["Centralizado", "Descentralizado", "Misto", "A definir"]), required: "yes" as const },
{ sectionId: "s3", q: "3.5 Quais documentos serao obrigatorios para cada categoria de membro?", type: "textarea" as const, required: "yes" as const },
{ sectionId: "s3", q: "3.6 Sera necessaria assinatura digital dos documentos?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "A definir"]), required: "yes" as const },
{ sectionId: "s3", q: "3.7 O certificado digital do membro devera possuir QR Code de validacao publica?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "A definir"]), required: "yes" as const },
// SECAO 4 - ESTRUTURA DE MEMBROS
{ sectionId: "s4", q: "4.1 Confirmar todas as categorias de membros", type: "textarea" as const, required: "yes" as const },
{ sectionId: "s4", q: "4.2 Confirmar niveis de adesao: Bronze, Prata, Ouro, Platina - havera outros?", type: "textarea" as const, required: "yes" as const },
{ sectionId: "s4", q: "4.3 Quais beneficios especificos existirao em cada categoria?", type: "textarea" as const, required: "yes" as const },
{ sectionId: "s4", q: "4.4 Cada categoria tera valor de quota diferente?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "A definir"]), required: "yes" as const },
{ sectionId: "s4", q: "4.5 O associado podera alterar sua categoria diretamente pela plataforma?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "A definir"]), required: "yes" as const },
// SECAO 5 - PAGAMENTOS
{ sectionId: "s5", q: "5.1 Quais plataformas de pagamento serao utilizadas? (Multicaixa Express, Referencia Bancaria, Transferencia, Cartao, Outras)", type: "multiselect" as const, options: JSON.stringify(["Multicaixa Express", "Referencia Bancaria", "Transferencia Bancaria", "Cartao", "Outras"]), required: "yes" as const },
{ sectionId: "s5", q: "5.2 Existe fornecedor ja homologado para integracao de pagamentos?", type: "textarea" as const, required: "yes" as const },
{ sectionId: "s5", q: "5.3 O sistema de faturacao ja foi definido?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "Em desenvolvimento"]), required: "yes" as const },
{ sectionId: "s5", q: "5.4 Sera necessaria emissao automatica de: Faturas, Recibos, Declaracoes de pagamento?", type: "multiselect" as const, options: JSON.stringify(["Faturas", "Recibos", "Declaracoes de pagamento"]), required: "yes" as const },
{ sectionId: "s5", q: "5.5 Qual sera a regra de bloqueio por inadimplencia?", type: "textarea" as const, required: "yes" as const },
// SECAO 6 - INCUBADORA EMPRESARIAL
{ sectionId: "s6", q: "6.1 Quais etapas existirao no funil de evolucao das empresas? (Ideia, Planeamento, MVP, Operacao, Crescimento, Escala)", type: "multiselect" as const, options: JSON.stringify(["Ideia", "Planeamento", "MVP", "Operacao", "Crescimento", "Escala"]), required: "yes" as const },
{ sectionId: "s6", q: "6.2 Quem acompanhara os incubados?", type: "textarea" as const, required: "yes" as const },
{ sectionId: "s6", q: "6.3 Havera metas obrigatorias?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "A definir"]), required: "yes" as const },
{ sectionId: "s6", q: "6.4 Havera indicadores de desempenho (KPIs)?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "A definir"]), required: "yes" as const },
{ sectionId: "s6", q: "6.5 Quais relatorios deverao ser produzidos?", type: "textarea" as const, required: "yes" as const },
// SECAO 7 - FORMACAO E CERTIFICACAO
{ sectionId: "s7", q: "7.1 Quantidade estimada de cursos", type: "number" as const, required: "yes" as const },
{ sectionId: "s7", q: "7.2 Os cursos serao hospedados na propria plataforma ou em ambiente externo?", type: "select" as const, options: JSON.stringify(["Plataforma propria", "Ambiente externo", "Misto", "A definir"]), required: "yes" as const },
{ sectionId: "s7", q: "7.3 Quem produzira os conteudos?", type: "textarea" as const, required: "yes" as const },
{ sectionId: "s7", q: "7.4 Os certificados possuirao validacao online?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "A definir"]), required: "yes" as const },
{ sectionId: "s7", q: "7.5 Sera necessario historico academico dos membros?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "A definir"]), required: "yes" as const },
// SECAO 8 - MARKETPLACE B2B
{ sectionId: "s8", q: "8.1 Quais tipos de produtos e servicos poderao ser anunciados?", type: "textarea" as const, required: "yes" as const },
{ sectionId: "s8", q: "8.2 Existira intermediacao financeira pela UEA?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "A definir"]), required: "yes" as const },
{ sectionId: "s8", q: "8.3 Existirao avaliacoes dos fornecedores?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "A definir"]), required: "yes" as const },
{ sectionId: "s8", q: "8.4 Existira sistema de mensagens entre membros?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "A definir"]), required: "yes" as const },
// SECAO 9 - EVENTOS
{ sectionId: "s9", q: "9.1 Quantidade media de eventos por ano", type: "number" as const, required: "yes" as const },
{ sectionId: "s9", q: "9.2 Existira venda de ingressos?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "A definir"]), required: "yes" as const },
{ sectionId: "s9", q: "9.3 Existira transmissao online?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "A definir"]), required: "yes" as const },
{ sectionId: "s9", q: "9.4 Existira emissao de certificados por participacao?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "A definir"]), required: "yes" as const },
// SECAO 10 - BANCO CENTRAL DE DADOS
{ sectionId: "s10", q: "10.1 Qual o objetivo operacional do BCD?", type: "textarea" as const, required: "yes" as const },
{ sectionId: "s10", q: "10.2 Quais dados deverao ser consolidados?", type: "textarea" as const, required: "yes" as const },
{ sectionId: "s10", q: "10.3 Quem tera acesso aos dados?", type: "textarea" as const, required: "yes" as const },
{ sectionId: "s10", q: "10.4 Existirao dashboards provinciais?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "A definir"]), required: "yes" as const },
{ sectionId: "s10", q: "10.5 Existirao dashboards nacionais?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "A definir"]), required: "yes" as const },
{ sectionId: "s10", q: "10.6 Quais indicadores deverao ser acompanhados em tempo real?", type: "textarea" as const, required: "yes" as const },
// SECAO 11 - DOCUMENTACAO LEGAL
{ sectionId: "s11", q: "11.1 Estatuto completo da UEA - sera enviado?", type: "select" as const, options: JSON.stringify(["Sim, ja disponivel", "Sera enviado", "Nao disponivel"]), required: "no" as const },
{ sectionId: "s11", q: "11.2 Certidao de Registo", type: "select" as const, options: JSON.stringify(["Sim, ja disponivel", "Sera enviado", "Nao disponivel"]), required: "no" as const },
{ sectionId: "s11", q: "11.3 Regulamentos internos", type: "select" as const, options: JSON.stringify(["Sim, ja disponivel", "Sera enviado", "Nao disponivel"]), required: "no" as const },
{ sectionId: "s11", q: "11.4 Organograma oficial", type: "select" as const, options: JSON.stringify(["Sim, ja disponivel", "Sera enviado", "Nao disponivel"]), required: "no" as const },
{ sectionId: "s11", q: "11.5 Politica de privacidade", type: "select" as const, options: JSON.stringify(["Sim, ja disponivel", "Sera enviado", "Nao disponivel"]), required: "no" as const },
{ sectionId: "s11", q: "11.6 Politica de protecao de dados", type: "select" as const, options: JSON.stringify(["Sim, ja disponivel", "Sera enviado", "Nao disponivel"]), required: "no" as const },
{ sectionId: "s11", q: "11.7 Manual de identidade visual", type: "select" as const, options: JSON.stringify(["Sim, ja disponivel", "Sera enviado", "Nao disponivel"]), required: "no" as const },
{ sectionId: "s11", q: "11.8 Logotipos oficiais em formato vetorial", type: "select" as const, options: JSON.stringify(["Sim, ja disponivel", "Sera enviado", "Nao disponivel"]), required: "no" as const },
// SECAO 12 - INFRAESTRUTURA
{ sectionId: "s12", q: "12.1 O ambiente sera hospedado em Angola ou internacionalmente?", type: "select" as const, options: JSON.stringify(["Angola", "Internacional", "Hibrido", "A definir"]), required: "yes" as const },
{ sectionId: "s12", q: "12.2 Existe preferencia por provedor cloud? (AWS, Azure, Google Cloud, Digital Ocean, Infraestrutura propria)", type: "multiselect" as const, options: JSON.stringify(["AWS", "Azure", "Google Cloud", "Digital Ocean", "Infraestrutura propria", "A definir"]), required: "yes" as const },
{ sectionId: "s12", q: "12.3 Qual o orcamento previsto para hospedagem mensal?", type: "text" as const, required: "no" as const },
{ sectionId: "s12", q: "12.4 Existe equipa tecnica interna para suporte?", type: "select" as const, options: JSON.stringify(["Sim", "Nao", "Parcial"]), required: "yes" as const },
// SECAO 13 - RELATORIOS EXECUTIVOS
{ sectionId: "s13", q: "13.1 Relatorios desejados: Novos associados por periodo", type: "select" as const, options: JSON.stringify(["Sim", "Nao"]), required: "yes" as const },
{ sectionId: "s13", q: "13.2 Relatorios desejados: Associados por provincia", type: "select" as const, options: JSON.stringify(["Sim", "Nao"]), required: "yes" as const },
{ sectionId: "s13", q: "13.3 Relatorios desejados: Empresas incubadas", type: "select" as const, options: JSON.stringify(["Sim", "Nao"]), required: "yes" as const },
{ sectionId: "s13", q: "13.4 Relatorios desejados: Quotas recebidas", type: "select" as const, options: JSON.stringify(["Sim", "Nao"]), required: "yes" as const },
{ sectionId: "s13", q: "13.5 Relatorios desejados: Quotas em atraso", type: "select" as const, options: JSON.stringify(["Sim", "Nao"]), required: "yes" as const },
{ sectionId: "s13", q: "13.6 Relatorios desejados: Participacao em cursos", type: "select" as const, options: JSON.stringify(["Sim", "Nao"]), required: "yes" as const },
{ sectionId: "s13", q: "13.7 Relatorios desejados: Participacao em eventos", type: "select" as const, options: JSON.stringify(["Sim", "Nao"]), required: "yes" as const },
{ sectionId: "s13", q: "13.8 Relatorios desejados: Crescimento por sector economico", type: "select" as const, options: JSON.stringify(["Sim", "Nao"]), required: "yes" as const },
{ sectionId: "s13", q: "13.9 Relatorios desejados: Crescimento por provincia", type: "select" as const, options: JSON.stringify(["Sim", "Nao"]), required: "yes" as const },
{ sectionId: "s13", q: "13.10 Relatorios desejados: Indicadores de empregabilidade", type: "select" as const, options: JSON.stringify(["Sim", "Nao"]), required: "yes" as const },
{ sectionId: "s13", q: "13.11 Relatorios desejados: Indicadores de impacto economico", type: "select" as const, options: JSON.stringify(["Sim", "Nao"]), required: "yes" as const },
];
async function seed() {
const db = getDb();
console.log("[Seed] Inserindo formulario UEA-PRODEM-ANGOLA...");
// Criar formulario
const code = Math.random().toString(36).substring(2, 10).toUpperCase();
await db.insert(clientForms).values({
id: 1,
title: "Levantamento de Requisitos - Portal e Plataforma Digital UEA-PRODEM-ANGOLA",
description: "Formulario completo para levantamento de requisitos do ecossistema digital composto por Portal Institucional, Gestao de Associados, BCD, Area Restrita, Sistema de Pagamento, Biblioteca Digital, Plataforma de Formacao, Sistema de Certificacao, Incubadora Empresarial, Gestao de Mentorias, Marketplace B2B, Dashboard Executivo, Gestao de Eventos e Relatorios Gerenciais.",
clientName: "UEA-PRODEM-ANGOLA",
clientEmail: "",
status: "active",
accessCode: code,
createdBy: "Avanzato",
});
console.log(`[Seed] Formulario criado com codigo: ${code}`);
// Inserir secoes
for (const s of sections) {
await db.insert(formSections).values({
formId: FORM_ID,
title: s.title,
description: s.description,
});
}
console.log(`[Seed] ${sections.length} secoes inseridas`);
// Inserir perguntas
let count = 0;
for (const q of questions) {
await db.insert(formQuestions).values({
formId: FORM_ID,
sectionId: q.sectionId,
question: q.q,
fieldType: q.type,
options: q.options || null,
required: q.required,
});
count++;
}
console.log(`[Seed] ${count} perguntas inseridas`);
console.log("[Seed] Concluido! Acesse o formulario em: /formulario/" + code);
}
seed().catch(console.error);
+16
View File
@@ -0,0 +1,16 @@
import "dotenv/config";
import { defineConfig } from "drizzle-kit";
const connectionString = process.env.DATABASE_URL;
if (!connectionString) {
throw new Error("DATABASE_URL is required to run drizzle commands");
}
export default defineConfig({
schema: "./db/schema.ts",
out: "./db/migrations",
dialect: "mysql",
dbCredentials: {
url: connectionString,
},
});
+2 -252
View File
@@ -1,262 +1,12 @@
<!doctype html> <!doctype html>
<html lang="pt-BR"> <html lang="en">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> <title>Avanzato Area do Cliente</title>
<!-- DETECAO DE AMBIENTE - Inline (executa antes de tudo) -->
<script>
(function() {
var h = location.hostname;
var IS_PROD = h === 'avanzato.com.br' || h === 'www.avanzato.com.br';
// Torna disponivel para outros scripts
window.__IS_PROD__ = IS_PROD;
// Se NAO for producao, desativa tracking globalmente
if (!IS_PROD) {
window.__AVANZATO_ENV__ = h === 'hml.avanzato.com.br' ? 'homologation' : 'development';
// Bloqueia gtag
window.dataLayer = { push: function(){} };
window.gtag = function(){};
// Bloqueia fbq (Facebook Pixel)
window.fbq = function(){};
// Bloqueia Mautic
window.MauticSDKLoaded = true;
console.log('[Avanzato] Ambiente: ' + window.__AVANZATO_ENV__ + ' | Tracking bloqueado');
} else {
window.__AVANZATO_ENV__ = 'production';
}
})();
</script>
<!-- Google tag (gtag.js) - Ads + Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-16714813566"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
// LGPD/GDPR Consent Mode v2
// analytics_storage = 'denied' → GA4 coleta dados ANONIMIZADOS (sem cookies)
// Isso permite ver trafego SEM precisar de consentimento explicito
gtag('consent', 'default', {
ad_storage: 'denied',
analytics_storage: 'denied',
ad_user_data: 'denied',
ad_personalization: 'denied',
functionality_storage: 'granted', // Permite funcionalidade basica
security_storage: 'granted', // Permite seguranca
wait_for_update: 500
});
// IMPORTANTE: Ativar Consent Mode no painel do GA4
// GA4 → Admin → Account Settings → Consent Settings → Enable
gtag('js', new Date());
gtag('config', 'AW-16714813566');
gtag('config', 'G-LMHX8RJ3LH', { // GA4 - Avanzato
'send_page_view': true,
'cookie_expires': 63072000, // 2 anos
'cookie_update': true
});
</script>
<!-- Meta Pixel (Facebook) - ID: 1223271852059785 -->
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '1223271852059785');
fbq('track', 'PageView');
</script>
<!-- Mautic Tracking -->
<script>
(function(w,d,t,u,n,a,m){
w['MauticTrackingObject']=n;
w[n]=w[n]||function(){(w[n].q=w[n].q||[]).push(arguments)},a=d.createElement(t),
m=d.getElementsByTagName(t)[0];a.async=1;a.src=u;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://mkt.avanzato.com.br/mtc.js','mt');
mt('send', 'pageview');
</script>
<!-- FIM Mautic Tracking -->
<!-- Preconnect to Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Urbanist:wght@400;500;600;700;800;900&display=swap" rel="stylesheet">
<!-- Primary Meta Tags -->
<title>Avanzato Tecnologia | TI Gerenciada, Cloud e Seguranca em Guarulhos/SP</title>
<meta name="title" content="Avanzato Tecnologia | TI Gerenciada, Cloud e Seguranca em Guarulhos/SP" />
<meta name="description" content="Solucoes em TI Gerenciada, Cloud Computing e Seguranca da Informacao. +23 anos de experiencia, +500 clientes atendidos. Suporte 24/7 em Guarulhos e regiao." />
<meta name="app-version" content="1.0.0" />
<meta name="keywords" content="TI Gerenciada, Cloud Computing, Seguranca da Informacao, Suporte Tecnico, Tecnologia da Informacao, Guarulhos, Sao Paulo, Infraestrutura de TI, Backup, Firewall, Consultoria TI" />
<meta name="author" content="Avanzato Tecnologia" />
<meta name="robots" content="index, follow" id="meta-robots" />
<meta name="googlebot" content="index, follow" id="meta-googlebot" />
<!-- BLOQUEAR INDEXACAO EM HOMOLOGACAO -->
<script>
(function() {
// Usa IS_PROD ja definido no inicio do documento
if (!window.__IS_PROD__) {
// Homologacao/Desenvolvimento: bloquear indexacao
document.getElementById('meta-robots').setAttribute('content', 'noindex, nofollow');
document.getElementById('meta-googlebot').setAttribute('content', 'noindex, nofollow');
// Adicionar tambem X-Robots-Tag via meta http-equiv
var meta = document.createElement('meta');
meta.httpEquiv = 'X-Robots-Tag';
meta.content = 'noindex, nofollow';
document.head.appendChild(meta);
console.log('%c[SEO] ' + (window.__AVANZATO_ENV__ || 'nao-producao') + ' - indexacao BLOQUEADA', 'background:#dc2626;color:#fff;font-weight:bold;padding:2px 6px;border-radius:3px');
} else {
console.log('%c[SEO] Producao - indexacao PERMITIDA (index, follow)', 'background:#16a34a;color:#fff;font-weight:bold;padding:2px 6px;border-radius:3px');
}
})();
</script>
<!-- Canonical URL -->
<link rel="canonical" href="https://avanzato.com.br" />
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website" />
<meta property="og:url" content="https://avanzato.com.br" />
<meta property="og:title" content="Avanzato Tecnologia | TI Gerenciada, Cloud e Seguranca" />
<meta property="og:description" content="Solucoes em TI Gerenciada, Cloud Computing e Seguranca da Informacao. +23 anos de experiencia, suporte 24/7." />
<meta property="og:image" content="https://avanzato.com.br/og-image.jpg" />
<meta property="og:locale" content="pt_BR" />
<meta property="og:site_name" content="Avanzato Tecnologia" />
<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:url" content="https://avanzato.com.br" />
<meta property="twitter:title" content="Avanzato Tecnologia | TI Gerenciada, Cloud e Seguranca" />
<meta property="twitter:description" content="Solucoes em TI Gerenciada, Cloud Computing e Seguranca da Informacao. +23 anos de experiencia, suporte 24/7." />
<meta property="twitter:image" content="https://avanzato.com.br/og-image.jpg" />
<!-- Favicon -->
<link rel="icon" type="image/png" href="https://avanzato.com.br/favicon.png" />
<link rel="shortcut icon" type="image/png" href="https://avanzato.com.br/favicon.png" />
<link rel="manifest" href="/site.webmanifest" />
<!-- Theme Color -->
<meta name="theme-color" content="#cbf400" />
<meta name="msapplication-TileColor" content="#0e0e0e" />
<!-- Structured Data / Schema.org -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Organization",
"name": "Avanzato Tecnologia",
"alternateName": "Avanzato Tecnologia e Informatica",
"url": "https://avanzato.com.br",
"logo": "https://avanzato.com.br/logo.svg",
"description": "Solucoes em TI Gerenciada, Cloud Computing e Seguranca da Informacao. +23 anos de experiencia.",
"foundingDate": "2001",
"address": {
"@type": "PostalAddress",
"streetAddress": "Av. Dr. Carlos de Campos, 43 - Sl 05/06",
"addressLocality": "Guarulhos",
"addressRegion": "SP",
"postalCode": "07040-000",
"addressCountry": "BR"
},
"geo": {
"@type": "GeoCoordinates",
"latitude": "-23.4686",
"longitude": "-46.5326"
},
"contactPoint": {
"@type": "ContactPoint",
"telephone": "+55-11-4810-1704",
"contactType": "customer service",
"availableLanguage": ["Portuguese"],
"areaServed": "BR"
},
"sameAs": [
"https://www.facebook.com/avanzatotec",
"https://www.linkedin.com/company/avanzato-tecnologia-e-informatica/",
"https://www.instagram.com/avanzato.tecnologia/",
"https://www.youtube.com/@AvanzatoTecnologia"
],
"openingHoursSpecification": {
"@type": "OpeningHoursSpecification",
"dayOfWeek": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"],
"opens": "08:00",
"closes": "18:00"
}
}
</script>
<!-- Local Business Schema -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "LocalBusiness",
"name": "Avanzato Tecnologia",
"image": "https://avanzato.com.br/logo.svg",
"@id": "https://avanzato.com.br",
"url": "https://avanzato.com.br",
"telephone": "+55-11-4810-1704",
"priceRange": "$$",
"address": {
"@type": "PostalAddress",
"streetAddress": "Av. Dr. Carlos de Campos, 43 - Sl 05/06, Parque Renato Maia",
"addressLocality": "Guarulhos",
"addressRegion": "SP",
"postalCode": "07040-000",
"addressCountry": "BR"
},
"geo": {
"@type": "GeoCoordinates",
"latitude": -23.4686,
"longitude": -46.5326
},
"openingHoursSpecification": [
{
"@type": "OpeningHoursSpecification",
"dayOfWeek": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"],
"opens": "08:00",
"closes": "18:00"
}
],
"department": {
"@type": "ComputerStore",
"name": "Departamento de TI",
"openingHours": "24/7"
}
}
</script>
</head> </head>
<body> <body>
<div id="root"></div> <div id="root"></div>
<script type="module" src="/src/main.tsx"></script> <script type="module" src="/src/main.tsx"></script>
<!-- Facebook Pixel noscript (moved from head to body to fix parse5 warning) -->
<noscript>
<img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=1223271852059785&ev=PageView&noscript=1"/>
</noscript>
<!-- Noscript content for SEO -->
<noscript>
<div style="padding: 20px; text-align: center; font-family: Urbanist, Arial, sans-serif; background: #0e0e0e; color: white; min-height: 100vh;">
<h1 style="color: #cbf400;">Avanzato Tecnologia</h1>
<p>Para visualizar nosso site completo, por favor habilite o JavaScript no seu navegador.</p>
<p>Entre em contato: (11) 4810-1704 | contato@avanzato.com.br</p>
</div>
</noscript>
</body> </body>
</html> </html>
+31
View File
@@ -0,0 +1,31 @@
Using Node.js 20, Tailwind CSS v3.4.19, and Vite v7.2.4
Tailwind CSS has been set up with the shadcn theme
Setup complete: /mnt/agents/output/app
Components (40+):
accordion, alert-dialog, alert, aspect-ratio, avatar, badge, breadcrumb,
button-group, button, calendar, card, carousel, chart, checkbox, collapsible,
command, context-menu, dialog, drawer, dropdown-menu, empty, field, form,
hover-card, input-group, input-otp, input, item, kbd, label, menubar,
navigation-menu, pagination, popover, progress, radio-group, resizable,
scroll-area, select, separator, sheet, sidebar, skeleton, slider, sonner,
spinner, switch, table, tabs, textarea, toggle-group, toggle, tooltip
Usage:
import { Button } from '@/components/ui/button'
import { Card, CardHeader, CardTitle } from '@/components/ui/card'
Structure:
src/sections/ Page sections
src/hooks/ Custom hooks
src/types/ Type definitions
src/App.css Styles specific to the Webapp
src/App.tsx Root React component
src/index.css Global styles
src/main.tsx Entry point for rendering the Webapp
index.html Entry point for the Webapp
tailwind.config.js Configures Tailwind's theme, plugins, etc.
vite.config.ts Main build and dev server settings for Vite
postcss.config.js Config file for CSS post-processing tools
-57
View File
@@ -1,57 +0,0 @@
# Release HML
Data: qua 3 jun 2026 22:07:59 -03
Ambiente:
HML
Descrição:
Aplicativos de Atrair Leads
Branch:
develop
Arquivos alterados antes do commit:
M dist/index.html
D infra/releases/2026-06-02_22-34-39_HML.md
M src/App.tsx
M src/sections/About.tsx
M src/sections/CondominiosCTA.tsx
M src/sections/Hero.tsx
M src/sections/Navigation.tsx
M src/sections/Services.tsx
?? infra/releases/2026-06-03_22-07-58_HML.md
?? nginx/
?? public/about-image.webp
?? public/hero-dashboard.webp
?? public/service-cloud.webp
?? public/service-security.webp
?? public/service-support.webp
?? public/service-ti.webp
Status:
Preparado para publicação
Commit:
fdfb4606
Arquivos no commit:
dist/index.html
infra/releases/2026-06-02_22-34-39_HML.md
infra/releases/2026-06-03_22-07-58_HML.md
nginx/avanzato.conf
public/about-image.webp
public/hero-dashboard.webp
public/service-cloud.webp
public/service-security.webp
public/service-support.webp
public/service-ti.webp
src/App.tsx
src/sections/About.tsx
src/sections/CondominiosCTA.tsx
src/sections/Hero.tsx
src/sections/Navigation.tsx
src/sections/Services.tsx
Status final:
Publicado no Gitea / aguardando pipeline HML
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1 +1 @@
../baseline-browser-mapping/dist/cli.js ../baseline-browser-mapping/dist/cli.cjs
-1
View File
@@ -1 +0,0 @@
../cross-env/src/bin/cross-env.js
-1
View File
@@ -1 +0,0 @@
../cross-env/src/bin/cross-env-shell.js
Generated Vendored
+1 -1
View File
@@ -1 +1 @@
../nanoid/bin/nanoid.cjs ../nanoid/bin/nanoid.js
+3814 -2524
View File
File diff suppressed because it is too large Load Diff
+51 -147
View File
@@ -1,7 +1,4 @@
"use client"; "use client";
import {
Presence
} from "./chunk-INCCO7S4.js";
import { import {
Combination_default, Combination_default,
DismissableLayer, DismissableLayer,
@@ -9,129 +6,36 @@ import {
Portal, Portal,
hideOthers, hideOthers,
useFocusGuards useFocusGuards
} from "./chunk-LIWCVBQK.js"; } from "./chunk-NC6JEPWD.js";
import { import {
Primitive, Presence,
composeEventHandlers, composeEventHandlers,
createContext2, createContext2,
createContextScope, createContextScope,
useControllableState, useControllableState,
useId useId
} from "./chunk-MOFDO34C.js"; } from "./chunk-TU5XDRIH.js";
import { import {
composeRefs, Primitive
} from "./chunk-QPQFA2HW.js";
import {
createSlot,
useComposedRefs useComposedRefs
} from "./chunk-2VUH7NEY.js"; } from "./chunk-7O5GCKER.js";
import "./chunk-YF4B4G2L.js"; import "./chunk-UEHR66ST.js";
import { import {
require_jsx_runtime require_jsx_runtime
} from "./chunk-2YVA4HRZ.js"; } from "./chunk-LPULNKJF.js";
import { import {
require_react require_react
} from "./chunk-WUR7D6NS.js"; } from "./chunk-42LCURWG.js";
import { import {
__toESM __toESM
} from "./chunk-G3PMV62Z.js"; } from "./chunk-G3PMV62Z.js";
// node_modules/@radix-ui/react-dialog/dist/index.mjs // node_modules/@radix-ui/react-dialog/dist/index.mjs
var React2 = __toESM(require_react(), 1);
// node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.mjs
var React = __toESM(require_react(), 1); var React = __toESM(require_react(), 1);
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1); var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
function createSlot(ownerName) {
const SlotClone = createSlotClone(ownerName);
const Slot22 = React.forwardRef((props, forwardedRef) => {
const { children, ...slotProps } = props;
const childrenArray = React.Children.toArray(children);
const slottable = childrenArray.find(isSlottable);
if (slottable) {
const newElement = slottable.props.children;
const newChildren = childrenArray.map((child) => {
if (child === slottable) {
if (React.Children.count(newElement) > 1) return React.Children.only(null);
return React.isValidElement(newElement) ? newElement.props.children : null;
} else {
return child;
}
});
return (0, import_jsx_runtime.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
}
return (0, import_jsx_runtime.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
});
Slot22.displayName = `${ownerName}.Slot`;
return Slot22;
}
var Slot = createSlot("Slot");
function createSlotClone(ownerName) {
const SlotClone = React.forwardRef((props, forwardedRef) => {
const { children, ...slotProps } = props;
if (React.isValidElement(children)) {
const childrenRef = getElementRef(children);
const props2 = mergeProps(slotProps, children.props);
if (children.type !== React.Fragment) {
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
}
return React.cloneElement(children, props2);
}
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
});
SlotClone.displayName = `${ownerName}.SlotClone`;
return SlotClone;
}
var SLOTTABLE_IDENTIFIER = /* @__PURE__ */ Symbol("radix.slottable");
function createSlottable(ownerName) {
const Slottable2 = ({ children }) => {
return (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children });
};
Slottable2.displayName = `${ownerName}.Slottable`;
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
return Slottable2;
}
var Slottable = createSlottable("Slottable");
function isSlottable(child) {
return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
}
function mergeProps(slotProps, childProps) {
const overrideProps = { ...childProps };
for (const propName in childProps) {
const slotPropValue = slotProps[propName];
const childPropValue = childProps[propName];
const isHandler = /^on[A-Z]/.test(propName);
if (isHandler) {
if (slotPropValue && childPropValue) {
overrideProps[propName] = (...args) => {
const result = childPropValue(...args);
slotPropValue(...args);
return result;
};
} else if (slotPropValue) {
overrideProps[propName] = slotPropValue;
}
} else if (propName === "style") {
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
} else if (propName === "className") {
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
}
}
return { ...slotProps, ...overrideProps };
}
function getElementRef(element) {
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
if (mayWarn) {
return element.ref;
}
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
if (mayWarn) {
return element.props.ref;
}
return element.props.ref || element.ref;
}
// node_modules/@radix-ui/react-dialog/dist/index.mjs
var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
var DIALOG_NAME = "Dialog"; var DIALOG_NAME = "Dialog";
var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME); var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME); var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
@@ -144,15 +48,15 @@ var Dialog = (props) => {
onOpenChange, onOpenChange,
modal = true modal = true
} = props; } = props;
const triggerRef = React2.useRef(null); const triggerRef = React.useRef(null);
const contentRef = React2.useRef(null); const contentRef = React.useRef(null);
const [open, setOpen] = useControllableState({ const [open, setOpen] = useControllableState({
prop: openProp, prop: openProp,
defaultProp: defaultOpen ?? false, defaultProp: defaultOpen ?? false,
onChange: onOpenChange, onChange: onOpenChange,
caller: DIALOG_NAME caller: DIALOG_NAME
}); });
return (0, import_jsx_runtime2.jsx)( return (0, import_jsx_runtime.jsx)(
DialogProvider, DialogProvider,
{ {
scope: __scopeDialog, scope: __scopeDialog,
@@ -163,7 +67,7 @@ var Dialog = (props) => {
descriptionId: useId(), descriptionId: useId(),
open, open,
onOpenChange: setOpen, onOpenChange: setOpen,
onOpenToggle: React2.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]), onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
modal, modal,
children children
} }
@@ -171,18 +75,18 @@ var Dialog = (props) => {
}; };
Dialog.displayName = DIALOG_NAME; Dialog.displayName = DIALOG_NAME;
var TRIGGER_NAME = "DialogTrigger"; var TRIGGER_NAME = "DialogTrigger";
var DialogTrigger = React2.forwardRef( var DialogTrigger = React.forwardRef(
(props, forwardedRef) => { (props, forwardedRef) => {
const { __scopeDialog, ...triggerProps } = props; const { __scopeDialog, ...triggerProps } = props;
const context = useDialogContext(TRIGGER_NAME, __scopeDialog); const context = useDialogContext(TRIGGER_NAME, __scopeDialog);
const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef); const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
return (0, import_jsx_runtime2.jsx)( return (0, import_jsx_runtime.jsx)(
Primitive.button, Primitive.button,
{ {
type: "button", type: "button",
"aria-haspopup": "dialog", "aria-haspopup": "dialog",
"aria-expanded": context.open, "aria-expanded": context.open,
"aria-controls": context.contentId, "aria-controls": context.open ? context.contentId : void 0,
"data-state": getState(context.open), "data-state": getState(context.open),
...triggerProps, ...triggerProps,
ref: composedTriggerRef, ref: composedTriggerRef,
@@ -199,28 +103,28 @@ var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {
var DialogPortal = (props) => { var DialogPortal = (props) => {
const { __scopeDialog, forceMount, children, container } = props; const { __scopeDialog, forceMount, children, container } = props;
const context = useDialogContext(PORTAL_NAME, __scopeDialog); const context = useDialogContext(PORTAL_NAME, __scopeDialog);
return (0, import_jsx_runtime2.jsx)(PortalProvider, { scope: __scopeDialog, forceMount, children: React2.Children.map(children, (child) => (0, import_jsx_runtime2.jsx)(Presence, { present: forceMount || context.open, children: (0, import_jsx_runtime2.jsx)(Portal, { asChild: true, container, children: child }) })) }); return (0, import_jsx_runtime.jsx)(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => (0, import_jsx_runtime.jsx)(Presence, { present: forceMount || context.open, children: (0, import_jsx_runtime.jsx)(Portal, { asChild: true, container, children: child }) })) });
}; };
DialogPortal.displayName = PORTAL_NAME; DialogPortal.displayName = PORTAL_NAME;
var OVERLAY_NAME = "DialogOverlay"; var OVERLAY_NAME = "DialogOverlay";
var DialogOverlay = React2.forwardRef( var DialogOverlay = React.forwardRef(
(props, forwardedRef) => { (props, forwardedRef) => {
const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog); const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);
const { forceMount = portalContext.forceMount, ...overlayProps } = props; const { forceMount = portalContext.forceMount, ...overlayProps } = props;
const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog); const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
return context.modal ? (0, import_jsx_runtime2.jsx)(Presence, { present: forceMount || context.open, children: (0, import_jsx_runtime2.jsx)(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null; return context.modal ? (0, import_jsx_runtime.jsx)(Presence, { present: forceMount || context.open, children: (0, import_jsx_runtime.jsx)(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
} }
); );
DialogOverlay.displayName = OVERLAY_NAME; DialogOverlay.displayName = OVERLAY_NAME;
var Slot2 = createSlot("DialogOverlay.RemoveScroll"); var Slot = createSlot("DialogOverlay.RemoveScroll");
var DialogOverlayImpl = React2.forwardRef( var DialogOverlayImpl = React.forwardRef(
(props, forwardedRef) => { (props, forwardedRef) => {
const { __scopeDialog, ...overlayProps } = props; const { __scopeDialog, ...overlayProps } = props;
const context = useDialogContext(OVERLAY_NAME, __scopeDialog); const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
return ( return (
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll` // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
// ie. when `Overlay` and `Content` are siblings // ie. when `Overlay` and `Content` are siblings
(0, import_jsx_runtime2.jsx)(Combination_default, { as: Slot2, allowPinchZoom: true, shards: [context.contentRef], children: (0, import_jsx_runtime2.jsx)( (0, import_jsx_runtime.jsx)(Combination_default, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: (0, import_jsx_runtime.jsx)(
Primitive.div, Primitive.div,
{ {
"data-state": getState(context.open), "data-state": getState(context.open),
@@ -233,31 +137,31 @@ var DialogOverlayImpl = React2.forwardRef(
} }
); );
var CONTENT_NAME = "DialogContent"; var CONTENT_NAME = "DialogContent";
var DialogContent = React2.forwardRef( var DialogContent = React.forwardRef(
(props, forwardedRef) => { (props, forwardedRef) => {
const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog); const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);
const { forceMount = portalContext.forceMount, ...contentProps } = props; const { forceMount = portalContext.forceMount, ...contentProps } = props;
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog); const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
return (0, import_jsx_runtime2.jsx)(Presence, { present: forceMount || context.open, children: context.modal ? (0, import_jsx_runtime2.jsx)(DialogContentModal, { ...contentProps, ref: forwardedRef }) : (0, import_jsx_runtime2.jsx)(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) }); return (0, import_jsx_runtime.jsx)(Presence, { present: forceMount || context.open, children: context.modal ? (0, import_jsx_runtime.jsx)(DialogContentModal, { ...contentProps, ref: forwardedRef }) : (0, import_jsx_runtime.jsx)(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
} }
); );
DialogContent.displayName = CONTENT_NAME; DialogContent.displayName = CONTENT_NAME;
var DialogContentModal = React2.forwardRef( var DialogContentModal = React.forwardRef(
(props, forwardedRef) => { (props, forwardedRef) => {
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog); const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
const contentRef = React2.useRef(null); const contentRef = React.useRef(null);
const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef); const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
React2.useEffect(() => { React.useEffect(() => {
const content = contentRef.current; const content = contentRef.current;
if (content) return hideOthers(content); if (content) return hideOthers(content);
}, []); }, []);
return (0, import_jsx_runtime2.jsx)( return (0, import_jsx_runtime.jsx)(
DialogContentImpl, DialogContentImpl,
{ {
...props, ...props,
ref: composedRefs, ref: composedRefs,
trapFocus: context.open, trapFocus: context.open,
disableOutsidePointerEvents: true, disableOutsidePointerEvents: context.open,
onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => { onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
event.preventDefault(); event.preventDefault();
context.triggerRef.current?.focus(); context.triggerRef.current?.focus();
@@ -276,12 +180,12 @@ var DialogContentModal = React2.forwardRef(
); );
} }
); );
var DialogContentNonModal = React2.forwardRef( var DialogContentNonModal = React.forwardRef(
(props, forwardedRef) => { (props, forwardedRef) => {
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog); const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
const hasInteractedOutsideRef = React2.useRef(false); const hasInteractedOutsideRef = React.useRef(false);
const hasPointerDownOutsideRef = React2.useRef(false); const hasPointerDownOutsideRef = React.useRef(false);
return (0, import_jsx_runtime2.jsx)( return (0, import_jsx_runtime.jsx)(
DialogContentImpl, DialogContentImpl,
{ {
...props, ...props,
@@ -316,15 +220,15 @@ var DialogContentNonModal = React2.forwardRef(
); );
} }
); );
var DialogContentImpl = React2.forwardRef( var DialogContentImpl = React.forwardRef(
(props, forwardedRef) => { (props, forwardedRef) => {
const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props; const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;
const context = useDialogContext(CONTENT_NAME, __scopeDialog); const context = useDialogContext(CONTENT_NAME, __scopeDialog);
const contentRef = React2.useRef(null); const contentRef = React.useRef(null);
const composedRefs = useComposedRefs(forwardedRef, contentRef); const composedRefs = useComposedRefs(forwardedRef, contentRef);
useFocusGuards(); useFocusGuards();
return (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [ return (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
(0, import_jsx_runtime2.jsx)( (0, import_jsx_runtime.jsx)(
FocusScope, FocusScope,
{ {
asChild: true, asChild: true,
@@ -332,7 +236,7 @@ var DialogContentImpl = React2.forwardRef(
trapped: trapFocus, trapped: trapFocus,
onMountAutoFocus: onOpenAutoFocus, onMountAutoFocus: onOpenAutoFocus,
onUnmountAutoFocus: onCloseAutoFocus, onUnmountAutoFocus: onCloseAutoFocus,
children: (0, import_jsx_runtime2.jsx)( children: (0, import_jsx_runtime.jsx)(
DismissableLayer, DismissableLayer,
{ {
role: "dialog", role: "dialog",
@@ -347,37 +251,37 @@ var DialogContentImpl = React2.forwardRef(
) )
} }
), ),
(0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
(0, import_jsx_runtime2.jsx)(TitleWarning, { titleId: context.titleId }), (0, import_jsx_runtime.jsx)(TitleWarning, { titleId: context.titleId }),
(0, import_jsx_runtime2.jsx)(DescriptionWarning, { contentRef, descriptionId: context.descriptionId }) (0, import_jsx_runtime.jsx)(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
] }) ] })
] }); ] });
} }
); );
var TITLE_NAME = "DialogTitle"; var TITLE_NAME = "DialogTitle";
var DialogTitle = React2.forwardRef( var DialogTitle = React.forwardRef(
(props, forwardedRef) => { (props, forwardedRef) => {
const { __scopeDialog, ...titleProps } = props; const { __scopeDialog, ...titleProps } = props;
const context = useDialogContext(TITLE_NAME, __scopeDialog); const context = useDialogContext(TITLE_NAME, __scopeDialog);
return (0, import_jsx_runtime2.jsx)(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef }); return (0, import_jsx_runtime.jsx)(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
} }
); );
DialogTitle.displayName = TITLE_NAME; DialogTitle.displayName = TITLE_NAME;
var DESCRIPTION_NAME = "DialogDescription"; var DESCRIPTION_NAME = "DialogDescription";
var DialogDescription = React2.forwardRef( var DialogDescription = React.forwardRef(
(props, forwardedRef) => { (props, forwardedRef) => {
const { __scopeDialog, ...descriptionProps } = props; const { __scopeDialog, ...descriptionProps } = props;
const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog); const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
return (0, import_jsx_runtime2.jsx)(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef }); return (0, import_jsx_runtime.jsx)(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
} }
); );
DialogDescription.displayName = DESCRIPTION_NAME; DialogDescription.displayName = DESCRIPTION_NAME;
var CLOSE_NAME = "DialogClose"; var CLOSE_NAME = "DialogClose";
var DialogClose = React2.forwardRef( var DialogClose = React.forwardRef(
(props, forwardedRef) => { (props, forwardedRef) => {
const { __scopeDialog, ...closeProps } = props; const { __scopeDialog, ...closeProps } = props;
const context = useDialogContext(CLOSE_NAME, __scopeDialog); const context = useDialogContext(CLOSE_NAME, __scopeDialog);
return (0, import_jsx_runtime2.jsx)( return (0, import_jsx_runtime.jsx)(
Primitive.button, Primitive.button,
{ {
type: "button", type: "button",
@@ -405,7 +309,7 @@ var TitleWarning = ({ titleId }) => {
If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component. If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`; For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
React2.useEffect(() => { React.useEffect(() => {
if (titleId) { if (titleId) {
const hasTitle = document.getElementById(titleId); const hasTitle = document.getElementById(titleId);
if (!hasTitle) console.error(MESSAGE); if (!hasTitle) console.error(MESSAGE);
@@ -417,7 +321,7 @@ var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
var DescriptionWarning = ({ contentRef, descriptionId }) => { var DescriptionWarning = ({ contentRef, descriptionId }) => {
const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME); const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`; const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
React2.useEffect(() => { React.useEffect(() => {
const describedById = contentRef.current?.getAttribute("aria-describedby"); const describedById = contentRef.current?.getAttribute("aria-describedby");
if (descriptionId && describedById) { if (descriptionId && describedById) {
const hasDescription = document.getElementById(descriptionId); const hasDescription = document.getElementById(descriptionId);
File diff suppressed because one or more lines are too long
+8 -49
View File
@@ -1,66 +1,25 @@
"use client"; "use client";
import { import {
createSlot Primitive
} from "./chunk-YWBEB5PG.js"; } from "./chunk-QPQFA2HW.js";
import "./chunk-2VUH7NEY.js"; import "./chunk-7O5GCKER.js";
import { import "./chunk-UEHR66ST.js";
require_react_dom
} from "./chunk-YF4B4G2L.js";
import { import {
require_jsx_runtime require_jsx_runtime
} from "./chunk-2YVA4HRZ.js"; } from "./chunk-LPULNKJF.js";
import { import {
require_react require_react
} from "./chunk-WUR7D6NS.js"; } from "./chunk-42LCURWG.js";
import { import {
__toESM __toESM
} from "./chunk-G3PMV62Z.js"; } from "./chunk-G3PMV62Z.js";
// node_modules/@radix-ui/react-label/dist/index.mjs // node_modules/@radix-ui/react-label/dist/index.mjs
var React2 = __toESM(require_react(), 1);
// node_modules/@radix-ui/react-label/node_modules/@radix-ui/react-primitive/dist/index.mjs
var React = __toESM(require_react(), 1); var React = __toESM(require_react(), 1);
var ReactDOM = __toESM(require_react_dom(), 1);
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1); var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
var NODES = [
"a",
"button",
"div",
"form",
"h2",
"h3",
"img",
"input",
"label",
"li",
"nav",
"ol",
"p",
"select",
"span",
"svg",
"ul"
];
var Primitive = NODES.reduce((primitive, node) => {
const Slot = createSlot(`Primitive.${node}`);
const Node = React.forwardRef((props, forwardedRef) => {
const { asChild, ...primitiveProps } = props;
const Comp = asChild ? Slot : node;
if (typeof window !== "undefined") {
window[/* @__PURE__ */ Symbol.for("radix-ui")] = true;
}
return (0, import_jsx_runtime.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
});
Node.displayName = `Primitive.${node}`;
return { ...primitive, [node]: Node };
}, {});
// node_modules/@radix-ui/react-label/dist/index.mjs
var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
var NAME = "Label"; var NAME = "Label";
var Label = React2.forwardRef((props, forwardedRef) => { var Label = React.forwardRef((props, forwardedRef) => {
return (0, import_jsx_runtime2.jsx)( return (0, import_jsx_runtime.jsx)(
Primitive.label, Primitive.label,
{ {
...props, ...props,
File diff suppressed because one or more lines are too long
+264 -129
View File
@@ -1,31 +1,31 @@
"use client"; "use client";
import {
Presence
} from "./chunk-INCCO7S4.js";
import { import {
createCollection, createCollection,
useDirection, useDirection,
usePrevious, usePrevious,
useSize useSize
} from "./chunk-L2OGOWTU.js"; } from "./chunk-MN52RY2D.js";
import { import {
Primitive, Presence,
composeEventHandlers, composeEventHandlers,
createContextScope, createContextScope,
useCallbackRef, useCallbackRef,
useControllableState, useControllableState,
useId useId
} from "./chunk-MOFDO34C.js"; } from "./chunk-TU5XDRIH.js";
import {
Primitive
} from "./chunk-QPQFA2HW.js";
import { import {
useComposedRefs useComposedRefs
} from "./chunk-2VUH7NEY.js"; } from "./chunk-7O5GCKER.js";
import "./chunk-YF4B4G2L.js"; import "./chunk-UEHR66ST.js";
import { import {
require_jsx_runtime require_jsx_runtime
} from "./chunk-2YVA4HRZ.js"; } from "./chunk-LPULNKJF.js";
import { import {
require_react require_react
} from "./chunk-WUR7D6NS.js"; } from "./chunk-42LCURWG.js";
import { import {
__toESM __toESM
} from "./chunk-G3PMV62Z.js"; } from "./chunk-G3PMV62Z.js";
@@ -252,61 +252,115 @@ var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1); var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
var RADIO_NAME = "Radio"; var RADIO_NAME = "Radio";
var [createRadioContext, createRadioScope] = createContextScope(RADIO_NAME); var [createRadioContext, createRadioScope] = createContextScope(RADIO_NAME);
var [RadioProvider, useRadioContext] = createRadioContext(RADIO_NAME); var [RadioProviderImpl, useRadioContext] = createRadioContext(RADIO_NAME);
function RadioProvider(props) {
const {
__scopeRadio,
checked = false,
children,
disabled,
form,
name,
onCheck,
required,
value = "on",
// @ts-expect-error
internal_do_not_use_render
} = props;
const [control, setControl] = React3.useState(null);
const [bubbleInput, setBubbleInput] = React3.useState(null);
const hasConsumerStoppedPropagationRef = React3.useRef(false);
const isFormControl = control ? !!form || !!control.closest("form") : (
// We set this to true by default so that events bubble to forms without JS (SSR)
true
);
const context = {
checked,
disabled,
required,
name,
form,
value,
control,
setControl,
hasConsumerStoppedPropagationRef,
isFormControl,
bubbleInput,
setBubbleInput,
onCheck: () => onCheck?.()
};
return (0, import_jsx_runtime2.jsx)(RadioProviderImpl, { scope: __scopeRadio, ...context, children: isFunction(internal_do_not_use_render) ? internal_do_not_use_render(context) : children });
}
var TRIGGER_NAME = "RadioTrigger";
var RadioTrigger = React3.forwardRef(
({ __scopeRadio, onClick, ...radioProps }, forwardedRef) => {
const {
checked,
disabled,
value,
setControl,
onCheck,
hasConsumerStoppedPropagationRef,
isFormControl,
bubbleInput
} = useRadioContext(TRIGGER_NAME, __scopeRadio);
const composedRefs = useComposedRefs(forwardedRef, setControl);
return (0, import_jsx_runtime2.jsx)(
Primitive.button,
{
type: "button",
role: "radio",
"aria-checked": checked,
"data-state": getState(checked),
"data-disabled": disabled ? "" : void 0,
disabled,
value,
...radioProps,
ref: composedRefs,
onClick: composeEventHandlers(onClick, (event) => {
if (!checked) onCheck();
if (bubbleInput && isFormControl) {
hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();
if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();
}
})
}
);
}
);
RadioTrigger.displayName = TRIGGER_NAME;
var Radio = React3.forwardRef( var Radio = React3.forwardRef(
(props, forwardedRef) => { (props, forwardedRef) => {
const { const { __scopeRadio, name, checked, required, disabled, value, onCheck, form, ...radioProps } = props;
__scopeRadio, return (0, import_jsx_runtime2.jsx)(
name, RadioProvider,
checked = false, {
required, __scopeRadio,
disabled, checked,
value = "on", disabled,
onCheck, required,
form, onCheck,
...radioProps name,
} = props; form,
const [button, setButton] = React3.useState(null); value,
const composedRefs = useComposedRefs(forwardedRef, (node) => setButton(node)); internal_do_not_use_render: ({ isFormControl }) => (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
const hasConsumerStoppedPropagationRef = React3.useRef(false); (0, import_jsx_runtime2.jsx)(
const isFormControl = button ? form || !!button.closest("form") : true; RadioTrigger,
return (0, import_jsx_runtime2.jsxs)(RadioProvider, { scope: __scopeRadio, checked, disabled, children: [ {
(0, import_jsx_runtime2.jsx)( ...radioProps,
Primitive.button, ref: forwardedRef,
{ __scopeRadio
type: "button",
role: "radio",
"aria-checked": checked,
"data-state": getState(checked),
"data-disabled": disabled ? "" : void 0,
disabled,
value,
...radioProps,
ref: composedRefs,
onClick: composeEventHandlers(props.onClick, (event) => {
if (!checked) onCheck?.();
if (isFormControl) {
hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();
if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();
} }
}) ),
} isFormControl && (0, import_jsx_runtime2.jsx)(
), RadioBubbleInput,
isFormControl && (0, import_jsx_runtime2.jsx)( {
RadioBubbleInput, __scopeRadio
{ }
control: button, )
bubbles: !hasConsumerStoppedPropagationRef.current, ] })
name, }
value, );
checked,
required,
disabled,
form,
style: { transform: "translateX(-100%)" }
}
)
] });
} }
); );
Radio.displayName = RADIO_NAME; Radio.displayName = RADIO_NAME;
@@ -329,19 +383,24 @@ var RadioIndicator = React3.forwardRef(
RadioIndicator.displayName = INDICATOR_NAME; RadioIndicator.displayName = INDICATOR_NAME;
var BUBBLE_INPUT_NAME = "RadioBubbleInput"; var BUBBLE_INPUT_NAME = "RadioBubbleInput";
var RadioBubbleInput = React3.forwardRef( var RadioBubbleInput = React3.forwardRef(
({ ({ __scopeRadio, ...props }, forwardedRef) => {
__scopeRadio, const {
control, control,
checked, checked,
bubbles = true, required,
...props disabled,
}, forwardedRef) => { name,
const ref = React3.useRef(null); value,
const composedRefs = useComposedRefs(ref, forwardedRef); form,
bubbleInput,
setBubbleInput,
hasConsumerStoppedPropagationRef
} = useRadioContext(BUBBLE_INPUT_NAME, __scopeRadio);
const composedRefs = useComposedRefs(forwardedRef, setBubbleInput);
const prevChecked = usePrevious(checked); const prevChecked = usePrevious(checked);
const controlSize = useSize(control); const controlSize = useSize(control);
React3.useEffect(() => { React3.useEffect(() => {
const input = ref.current; const input = bubbleInput;
if (!input) return; if (!input) return;
const inputProto = window.HTMLInputElement.prototype; const inputProto = window.HTMLInputElement.prototype;
const descriptor = Object.getOwnPropertyDescriptor( const descriptor = Object.getOwnPropertyDescriptor(
@@ -349,18 +408,25 @@ var RadioBubbleInput = React3.forwardRef(
"checked" "checked"
); );
const setChecked = descriptor.set; const setChecked = descriptor.set;
const bubbles = !hasConsumerStoppedPropagationRef.current;
if (prevChecked !== checked && setChecked) { if (prevChecked !== checked && setChecked) {
const event = new Event("click", { bubbles }); const event = new Event("click", { bubbles });
setChecked.call(input, checked); setChecked.call(input, checked);
input.dispatchEvent(event); input.dispatchEvent(event);
} }
}, [prevChecked, checked, bubbles]); }, [bubbleInput, prevChecked, checked, hasConsumerStoppedPropagationRef]);
const defaultCheckedRef = React3.useRef(checked);
return (0, import_jsx_runtime2.jsx)( return (0, import_jsx_runtime2.jsx)(
Primitive.input, Primitive.input,
{ {
type: "radio", type: "radio",
"aria-hidden": true, "aria-hidden": true,
defaultChecked: checked, defaultChecked: defaultCheckedRef.current,
required,
disabled,
name,
value,
form,
...props, ...props,
tabIndex: -1, tabIndex: -1,
ref: composedRefs, ref: composedRefs,
@@ -370,13 +436,20 @@ var RadioBubbleInput = React3.forwardRef(
position: "absolute", position: "absolute",
pointerEvents: "none", pointerEvents: "none",
opacity: 0, opacity: 0,
margin: 0 margin: 0,
// We transform because the input is absolutely positioned but we have
// rendered it **after** the button. This pulls it back to sit on top
// of the button.
transform: "translateX(-100%)"
} }
} }
); );
} }
); );
RadioBubbleInput.displayName = BUBBLE_INPUT_NAME; RadioBubbleInput.displayName = BUBBLE_INPUT_NAME;
function isFunction(value) {
return typeof value === "function";
}
function getState(checked) { function getState(checked) {
return checked ? "checked" : "unchecked"; return checked ? "checked" : "unchecked";
} }
@@ -449,62 +522,121 @@ var RadioGroup = React2.forwardRef(
); );
RadioGroup.displayName = RADIO_GROUP_NAME; RadioGroup.displayName = RADIO_GROUP_NAME;
var ITEM_NAME2 = "RadioGroupItem"; var ITEM_NAME2 = "RadioGroupItem";
var ITEM_PROVIDER_NAME = "RadioGroupItemProvider";
var ITEM_TRIGGER_NAME = "RadioGroupItemTrigger";
var ITEM_BUBBLE_INPUT_NAME = "RadioGroupItemBubbleInput";
function RadioGroupItemProvider(props) {
const {
__scopeRadioGroup,
value,
disabled,
children,
// @ts-expect-error
internal_do_not_use_render
} = props;
const context = useRadioGroupContext(ITEM_PROVIDER_NAME, __scopeRadioGroup);
const radioScope = useRadioScope(__scopeRadioGroup);
const isDisabled = context.disabled || disabled;
return (0, import_jsx_runtime3.jsx)(
RadioProvider,
{
...radioScope,
checked: context.value === value,
disabled: isDisabled,
required: context.required,
name: context.name,
value,
onCheck: () => context.onValueChange(value),
internal_do_not_use_render,
children
}
);
}
var RadioGroupItemTrigger = React2.forwardRef((props, forwardedRef) => {
const { __scopeRadioGroup, ...triggerProps } = props;
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeRadioGroup);
const radioScope = useRadioScope(__scopeRadioGroup);
const { checked, disabled } = useRadioContext(ITEM_TRIGGER_NAME, radioScope.__scopeRadio);
const ref = React2.useRef(null);
const composedRefs = useComposedRefs(forwardedRef, ref);
const isArrowKeyPressedRef = React2.useRef(false);
React2.useEffect(() => {
const handleKeyDown = (event) => {
if (ARROW_KEYS.includes(event.key)) {
isArrowKeyPressedRef.current = true;
}
};
const handleKeyUp = () => isArrowKeyPressedRef.current = false;
document.addEventListener("keydown", handleKeyDown);
document.addEventListener("keyup", handleKeyUp);
return () => {
document.removeEventListener("keydown", handleKeyDown);
document.removeEventListener("keyup", handleKeyUp);
};
}, []);
return (0, import_jsx_runtime3.jsx)(
Item,
{
asChild: true,
...rovingFocusGroupScope,
focusable: !disabled,
active: checked,
children: (0, import_jsx_runtime3.jsx)(
RadioTrigger,
{
...radioScope,
...triggerProps,
ref: composedRefs,
onKeyDown: composeEventHandlers(triggerProps.onKeyDown, (event) => {
if (event.key === "Enter") event.preventDefault();
}),
onFocus: composeEventHandlers(triggerProps.onFocus, () => {
if (isArrowKeyPressedRef.current) {
ref.current?.click();
}
})
}
)
}
);
});
RadioGroupItemTrigger.displayName = ITEM_TRIGGER_NAME;
var RadioGroupItem = React2.forwardRef( var RadioGroupItem = React2.forwardRef(
(props, forwardedRef) => { (props, forwardedRef) => {
const { __scopeRadioGroup, disabled, ...itemProps } = props; const { __scopeRadioGroup, value, disabled, ...itemProps } = props;
const context = useRadioGroupContext(ITEM_NAME2, __scopeRadioGroup);
const isDisabled = context.disabled || disabled;
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeRadioGroup);
const radioScope = useRadioScope(__scopeRadioGroup);
const ref = React2.useRef(null);
const composedRefs = useComposedRefs(forwardedRef, ref);
const checked = context.value === itemProps.value;
const isArrowKeyPressedRef = React2.useRef(false);
React2.useEffect(() => {
const handleKeyDown = (event) => {
if (ARROW_KEYS.includes(event.key)) {
isArrowKeyPressedRef.current = true;
}
};
const handleKeyUp = () => isArrowKeyPressedRef.current = false;
document.addEventListener("keydown", handleKeyDown);
document.addEventListener("keyup", handleKeyUp);
return () => {
document.removeEventListener("keydown", handleKeyDown);
document.removeEventListener("keyup", handleKeyUp);
};
}, []);
return (0, import_jsx_runtime3.jsx)( return (0, import_jsx_runtime3.jsx)(
Item, RadioGroupItemProvider,
{ {
asChild: true, __scopeRadioGroup,
...rovingFocusGroupScope, value,
focusable: !isDisabled, disabled,
active: checked, internal_do_not_use_render: ({ isFormControl }) => (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
children: (0, import_jsx_runtime3.jsx)( (0, import_jsx_runtime3.jsx)(
Radio, RadioGroupItemTrigger,
{ {
disabled: isDisabled, ...itemProps,
required: context.required, ref: forwardedRef,
checked, __scopeRadioGroup
...radioScope, }
...itemProps, ),
name: context.name, isFormControl && (0, import_jsx_runtime3.jsx)(
ref: composedRefs, RadioGroupItemBubbleInput,
onCheck: () => context.onValueChange(itemProps.value), {
onKeyDown: composeEventHandlers((event) => { __scopeRadioGroup
if (event.key === "Enter") event.preventDefault(); }
}), )
onFocus: composeEventHandlers(itemProps.onFocus, () => { ] })
if (isArrowKeyPressedRef.current) ref.current?.click();
})
}
)
} }
); );
} }
); );
RadioGroupItem.displayName = ITEM_NAME2; RadioGroupItem.displayName = ITEM_NAME2;
var RadioGroupItemBubbleInput = React2.forwardRef((props, forwardedRef) => {
const { __scopeRadioGroup, ...bubbleProps } = props;
const radioScope = useRadioScope(__scopeRadioGroup);
return (0, import_jsx_runtime3.jsx)(RadioBubbleInput, { ...radioScope, ...bubbleProps, ref: forwardedRef });
});
RadioGroupItemBubbleInput.displayName = ITEM_BUBBLE_INPUT_NAME;
var INDICATOR_NAME2 = "RadioGroupIndicator"; var INDICATOR_NAME2 = "RadioGroupIndicator";
var RadioGroupIndicator = React2.forwardRef( var RadioGroupIndicator = React2.forwardRef(
(props, forwardedRef) => { (props, forwardedRef) => {
@@ -514,16 +646,19 @@ var RadioGroupIndicator = React2.forwardRef(
} }
); );
RadioGroupIndicator.displayName = INDICATOR_NAME2; RadioGroupIndicator.displayName = INDICATOR_NAME2;
var Root2 = RadioGroup;
var Item2 = RadioGroupItem;
var Indicator = RadioGroupIndicator;
export { export {
Indicator, RadioGroupIndicator as Indicator,
Item2 as Item, RadioGroupItem as Item,
RadioGroup, RadioGroup,
RadioGroupIndicator, RadioGroupIndicator,
RadioGroupItem, RadioGroupItem,
Root2 as Root, RadioGroup as Root,
createRadioGroupScope createRadioGroupScope,
RadioGroupItemBubbleInput as unstable_ItemBubbleInput,
RadioGroupItemProvider as unstable_ItemProvider,
RadioGroupItemTrigger as unstable_ItemTrigger,
RadioGroupItemBubbleInput as unstable_RadioGroupItemBubbleInput,
RadioGroupItemProvider as unstable_RadioGroupItemProvider,
RadioGroupItemTrigger as unstable_RadioGroupItemTrigger
}; };
//# sourceMappingURL=@radix-ui_react-radio-group.js.map //# sourceMappingURL=@radix-ui_react-radio-group.js.map
File diff suppressed because one or more lines are too long
+506 -492
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
+2 -4
View File
@@ -3,10 +3,8 @@ import {
Slottable, Slottable,
createSlot, createSlot,
createSlottable createSlottable
} from "./chunk-YWBEB5PG.js"; } from "./chunk-7O5GCKER.js";
import "./chunk-2VUH7NEY.js"; import "./chunk-42LCURWG.js";
import "./chunk-2YVA4HRZ.js";
import "./chunk-WUR7D6NS.js";
import "./chunk-G3PMV62Z.js"; import "./chunk-G3PMV62Z.js";
export { export {
Slot as Root, Slot as Root,
+76 -40
View File
@@ -1,148 +1,184 @@
{ {
"hash": "bef2a67d", "hash": "1a70cb28",
"configHash": "eccf13b4", "configHash": "79477533",
"lockfileHash": "c4c8a51c", "lockfileHash": "d90d73aa",
"browserHash": "e7109be1", "browserHash": "bd30cf82",
"optimized": { "optimized": {
"react": { "react": {
"src": "../../react/index.js", "src": "../../react/index.js",
"file": "react.js", "file": "react.js",
"fileHash": "dd97ceba", "fileHash": "efddcd34",
"needsInterop": true "needsInterop": true
}, },
"react-dom": { "react-dom": {
"src": "../../react-dom/index.js", "src": "../../react-dom/index.js",
"file": "react-dom.js", "file": "react-dom.js",
"fileHash": "8becf687", "fileHash": "0dd34a10",
"needsInterop": true "needsInterop": true
}, },
"react/jsx-dev-runtime": { "react/jsx-dev-runtime": {
"src": "../../react/jsx-dev-runtime.js", "src": "../../react/jsx-dev-runtime.js",
"file": "react_jsx-dev-runtime.js", "file": "react_jsx-dev-runtime.js",
"fileHash": "2c7217d2", "fileHash": "752a116d",
"needsInterop": true "needsInterop": true
}, },
"react/jsx-runtime": { "react/jsx-runtime": {
"src": "../../react/jsx-runtime.js", "src": "../../react/jsx-runtime.js",
"file": "react_jsx-runtime.js", "file": "react_jsx-runtime.js",
"fileHash": "e28ec614", "fileHash": "1af8d748",
"needsInterop": true "needsInterop": true
}, },
"@radix-ui/react-dialog": { "@radix-ui/react-dialog": {
"src": "../../@radix-ui/react-dialog/dist/index.mjs", "src": "../../@radix-ui/react-dialog/dist/index.mjs",
"file": "@radix-ui_react-dialog.js", "file": "@radix-ui_react-dialog.js",
"fileHash": "22041c72", "fileHash": "bd3964a6",
"needsInterop": false "needsInterop": false
}, },
"@radix-ui/react-label": { "@radix-ui/react-label": {
"src": "../../@radix-ui/react-label/dist/index.mjs", "src": "../../@radix-ui/react-label/dist/index.mjs",
"file": "@radix-ui_react-label.js", "file": "@radix-ui_react-label.js",
"fileHash": "d33ac0ed", "fileHash": "1dfe49ba",
"needsInterop": false "needsInterop": false
}, },
"@radix-ui/react-radio-group": { "@radix-ui/react-radio-group": {
"src": "../../@radix-ui/react-radio-group/dist/index.mjs", "src": "../../@radix-ui/react-radio-group/dist/index.mjs",
"file": "@radix-ui_react-radio-group.js", "file": "@radix-ui_react-radio-group.js",
"fileHash": "2be9d4b7", "fileHash": "afd809b3",
"needsInterop": false "needsInterop": false
}, },
"@radix-ui/react-select": { "@radix-ui/react-select": {
"src": "../../@radix-ui/react-select/dist/index.mjs", "src": "../../@radix-ui/react-select/dist/index.mjs",
"file": "@radix-ui_react-select.js", "file": "@radix-ui_react-select.js",
"fileHash": "51dd47da", "fileHash": "9f0b18ab",
"needsInterop": false "needsInterop": false
}, },
"@radix-ui/react-slot": { "@radix-ui/react-slot": {
"src": "../../@radix-ui/react-slot/dist/index.mjs", "src": "../../@radix-ui/react-slot/dist/index.mjs",
"file": "@radix-ui_react-slot.js", "file": "@radix-ui_react-slot.js",
"fileHash": "32dfa860", "fileHash": "7b614955",
"needsInterop": false
},
"@tanstack/react-query": {
"src": "../../@tanstack/react-query/build/modern/index.js",
"file": "@tanstack_react-query.js",
"fileHash": "7727cf8b",
"needsInterop": false
},
"@trpc/client": {
"src": "../../@trpc/client/dist/index.mjs",
"file": "@trpc_client.js",
"fileHash": "a925f840",
"needsInterop": false
},
"@trpc/react-query": {
"src": "../../@trpc/react-query/dist/index.mjs",
"file": "@trpc_react-query.js",
"fileHash": "c9572626",
"needsInterop": false "needsInterop": false
}, },
"class-variance-authority": { "class-variance-authority": {
"src": "../../class-variance-authority/dist/index.mjs", "src": "../../class-variance-authority/dist/index.mjs",
"file": "class-variance-authority.js", "file": "class-variance-authority.js",
"fileHash": "f4a8c6f4", "fileHash": "ff31d58d",
"needsInterop": false "needsInterop": false
}, },
"clsx": { "clsx": {
"src": "../../clsx/dist/clsx.mjs", "src": "../../clsx/dist/clsx.mjs",
"file": "clsx.js", "file": "clsx.js",
"fileHash": "e5a299ae", "fileHash": "a875d95e",
"needsInterop": false "needsInterop": false
}, },
"gsap": { "gsap": {
"src": "../../gsap/index.js", "src": "../../gsap/index.js",
"file": "gsap.js", "file": "gsap.js",
"fileHash": "76791308", "fileHash": "bf0da5d0",
"needsInterop": false "needsInterop": false
}, },
"gsap/ScrollTrigger": { "gsap/ScrollTrigger": {
"src": "../../gsap/ScrollTrigger.js", "src": "../../gsap/ScrollTrigger.js",
"file": "gsap_ScrollTrigger.js", "file": "gsap_ScrollTrigger.js",
"fileHash": "187ec0aa", "fileHash": "f6a7cc40",
"needsInterop": false "needsInterop": false
}, },
"lucide-react": { "lucide-react": {
"src": "../../lucide-react/dist/esm/lucide-react.js", "src": "../../lucide-react/dist/esm/lucide-react.js",
"file": "lucide-react.js", "file": "lucide-react.js",
"fileHash": "58304198", "fileHash": "534898f8",
"needsInterop": false "needsInterop": false
}, },
"react-dom/client": { "react-dom/client": {
"src": "../../react-dom/client.js", "src": "../../react-dom/client.js",
"file": "react-dom_client.js", "file": "react-dom_client.js",
"fileHash": "b30625c8", "fileHash": "78138719",
"needsInterop": true "needsInterop": true
}, },
"react-helmet-async": { "react-helmet-async": {
"src": "../../react-helmet-async/lib/index.esm.js", "src": "../../react-helmet-async/lib/index.esm.js",
"file": "react-helmet-async.js", "file": "react-helmet-async.js",
"fileHash": "79a82144", "fileHash": "e0aa9f4a",
"needsInterop": false
},
"react-router": {
"src": "../../react-router/dist/development/index.mjs",
"file": "react-router.js",
"fileHash": "5268fb1c",
"needsInterop": false "needsInterop": false
}, },
"react-router-dom": { "react-router-dom": {
"src": "../../react-router-dom/dist/index.mjs", "src": "../../react-router-dom/dist/index.mjs",
"file": "react-router-dom.js", "file": "react-router-dom.js",
"fileHash": "4427109e", "fileHash": "ecf8fd5f",
"needsInterop": false
},
"superjson": {
"src": "../../superjson/dist/index.js",
"file": "superjson.js",
"fileHash": "c5c8eff8",
"needsInterop": false "needsInterop": false
}, },
"tailwind-merge": { "tailwind-merge": {
"src": "../../tailwind-merge/dist/bundle-mjs.mjs", "src": "../../tailwind-merge/dist/bundle-mjs.mjs",
"file": "tailwind-merge.js", "file": "tailwind-merge.js",
"fileHash": "9511be49", "fileHash": "829c5877",
"needsInterop": false "needsInterop": false
} }
}, },
"chunks": { "chunks": {
"chunk-XI7PLG3Z": {
"file": "chunk-XI7PLG3Z.js"
},
"chunk-U7P2NEEE": { "chunk-U7P2NEEE": {
"file": "chunk-U7P2NEEE.js" "file": "chunk-U7P2NEEE.js"
}, },
"chunk-YWBEB5PG": { "chunk-GGIHF44A": {
"file": "chunk-YWBEB5PG.js" "file": "chunk-GGIHF44A.js"
}, },
"chunk-INCCO7S4": { "chunk-SZH6OGFT": {
"file": "chunk-INCCO7S4.js" "file": "chunk-SZH6OGFT.js"
}, },
"chunk-LIWCVBQK": { "chunk-NC6JEPWD": {
"file": "chunk-LIWCVBQK.js" "file": "chunk-NC6JEPWD.js"
}, },
"chunk-L2OGOWTU": { "chunk-MN52RY2D": {
"file": "chunk-L2OGOWTU.js" "file": "chunk-MN52RY2D.js"
}, },
"chunk-MOFDO34C": { "chunk-TU5XDRIH": {
"file": "chunk-MOFDO34C.js" "file": "chunk-TU5XDRIH.js"
}, },
"chunk-2VUH7NEY": { "chunk-QPQFA2HW": {
"file": "chunk-2VUH7NEY.js" "file": "chunk-QPQFA2HW.js"
}, },
"chunk-YF4B4G2L": { "chunk-7O5GCKER": {
"file": "chunk-YF4B4G2L.js" "file": "chunk-7O5GCKER.js"
}, },
"chunk-2YVA4HRZ": { "chunk-UEHR66ST": {
"file": "chunk-2YVA4HRZ.js" "file": "chunk-UEHR66ST.js"
}, },
"chunk-WUR7D6NS": { "chunk-LPULNKJF": {
"file": "chunk-WUR7D6NS.js" "file": "chunk-LPULNKJF.js"
},
"chunk-42LCURWG": {
"file": "chunk-42LCURWG.js"
}, },
"chunk-G3PMV62Z": { "chunk-G3PMV62Z": {
"file": "chunk-G3PMV62Z.js" "file": "chunk-G3PMV62Z.js"
-49
View File
@@ -1,49 +0,0 @@
import {
require_react
} from "./chunk-WUR7D6NS.js";
import {
__toESM
} from "./chunk-G3PMV62Z.js";
// node_modules/@radix-ui/react-compose-refs/dist/index.mjs
var React = __toESM(require_react(), 1);
function setRef(ref, value) {
if (typeof ref === "function") {
return ref(value);
} else if (ref !== null && ref !== void 0) {
ref.current = value;
}
}
function composeRefs(...refs) {
return (node) => {
let hasCleanup = false;
const cleanups = refs.map((ref) => {
const cleanup = setRef(ref, node);
if (!hasCleanup && typeof cleanup == "function") {
hasCleanup = true;
}
return cleanup;
});
if (hasCleanup) {
return () => {
for (let i = 0; i < cleanups.length; i++) {
const cleanup = cleanups[i];
if (typeof cleanup == "function") {
cleanup();
} else {
setRef(refs[i], null);
}
}
};
}
};
}
function useComposedRefs(...refs) {
return React.useCallback(composeRefs(...refs), refs);
}
export {
composeRefs,
useComposedRefs
};
//# sourceMappingURL=chunk-2VUH7NEY.js.map
-7
View File
@@ -1,7 +0,0 @@
{
"version": 3,
"sources": ["../../@radix-ui/react-compose-refs/src/compose-refs.tsx"],
"sourcesContent": ["import * as React from 'react';\n\ntype PossibleRef<T> = React.Ref<T> | undefined;\n\n/**\n * Set a given ref to a given value\n * This utility takes care of different types of refs: callback refs and RefObject(s)\n */\nfunction setRef<T>(ref: PossibleRef<T>, value: T) {\n if (typeof ref === 'function') {\n return ref(value);\n } else if (ref !== null && ref !== undefined) {\n ref.current = value;\n }\n}\n\n/**\n * A utility to compose multiple refs together\n * Accepts callback refs and RefObject(s)\n */\nfunction composeRefs<T>(...refs: PossibleRef<T>[]): React.RefCallback<T> {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == 'function') {\n hasCleanup = true;\n }\n return cleanup;\n });\n\n // React <19 will log an error to the console if a callback ref returns a\n // value. We don't use ref cleanups internally so this will only happen if a\n // user's ref callback returns a value, which we only expect if they are\n // using the cleanup functionality added in React 19.\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == 'function') {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\n\n/**\n * A custom hook that composes multiple refs\n * Accepts callback refs and RefObject(s)\n */\nfunction useComposedRefs<T>(...refs: PossibleRef<T>[]): React.RefCallback<T> {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return React.useCallback(composeRefs(...refs), refs);\n}\n\nexport { composeRefs, useComposedRefs };\n"],
"mappings": ";;;;;;;;AAAA,YAAuB;AAQvB,SAAS,OAAU,KAAqB,OAAU;AAChD,MAAI,OAAO,QAAQ,YAAY;AAC7B,WAAO,IAAI,KAAK;EAClB,WAAW,QAAQ,QAAQ,QAAQ,QAAW;AAC5C,QAAI,UAAU;EAChB;AACF;AAMA,SAAS,eAAkB,MAA8C;AACvE,SAAO,CAAC,SAAS;AACf,QAAI,aAAa;AACjB,UAAM,WAAW,KAAK,IAAI,CAAC,QAAQ;AACjC,YAAM,UAAU,OAAO,KAAK,IAAI;AAChC,UAAI,CAAC,cAAc,OAAO,WAAW,YAAY;AAC/C,qBAAa;MACf;AACA,aAAO;IACT,CAAC;AAMD,QAAI,YAAY;AACd,aAAO,MAAM;AACX,iBAAS,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;AACxC,gBAAM,UAAU,SAAS,CAAC;AAC1B,cAAI,OAAO,WAAW,YAAY;AAChC,oBAAQ;UACV,OAAO;AACL,mBAAO,KAAK,CAAC,GAAG,IAAI;UACtB;QACF;MACF;IACF;EACF;AACF;AAMA,SAAS,mBAAsB,MAA8C;AAE3E,SAAa,kBAAY,YAAY,GAAG,IAAI,GAAG,IAAI;AACrD;",
"names": []
}
-279
View File
@@ -1,279 +0,0 @@
import {
require_react
} from "./chunk-WUR7D6NS.js";
import {
__commonJS
} from "./chunk-G3PMV62Z.js";
// node_modules/react/cjs/react-jsx-runtime.development.js
var require_react_jsx_runtime_development = __commonJS({
"node_modules/react/cjs/react-jsx-runtime.development.js"(exports) {
"use strict";
(function() {
function getComponentNameFromType(type) {
if (null == type) return null;
if ("function" === typeof type)
return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
if ("string" === typeof type) return type;
switch (type) {
case REACT_FRAGMENT_TYPE:
return "Fragment";
case REACT_PROFILER_TYPE:
return "Profiler";
case REACT_STRICT_MODE_TYPE:
return "StrictMode";
case REACT_SUSPENSE_TYPE:
return "Suspense";
case REACT_SUSPENSE_LIST_TYPE:
return "SuspenseList";
case REACT_ACTIVITY_TYPE:
return "Activity";
}
if ("object" === typeof type)
switch ("number" === typeof type.tag && console.error(
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
), type.$$typeof) {
case REACT_PORTAL_TYPE:
return "Portal";
case REACT_CONTEXT_TYPE:
return type.displayName || "Context";
case REACT_CONSUMER_TYPE:
return (type._context.displayName || "Context") + ".Consumer";
case REACT_FORWARD_REF_TYPE:
var innerType = type.render;
type = type.displayName;
type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
return type;
case REACT_MEMO_TYPE:
return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
case REACT_LAZY_TYPE:
innerType = type._payload;
type = type._init;
try {
return getComponentNameFromType(type(innerType));
} catch (x) {
}
}
return null;
}
function testStringCoercion(value) {
return "" + value;
}
function checkKeyStringCoercion(value) {
try {
testStringCoercion(value);
var JSCompiler_inline_result = false;
} catch (e) {
JSCompiler_inline_result = true;
}
if (JSCompiler_inline_result) {
JSCompiler_inline_result = console;
var JSCompiler_temp_const = JSCompiler_inline_result.error;
var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
JSCompiler_temp_const.call(
JSCompiler_inline_result,
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
JSCompiler_inline_result$jscomp$0
);
return testStringCoercion(value);
}
}
function getTaskName(type) {
if (type === REACT_FRAGMENT_TYPE) return "<>";
if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE)
return "<...>";
try {
var name = getComponentNameFromType(type);
return name ? "<" + name + ">" : "<...>";
} catch (x) {
return "<...>";
}
}
function getOwner() {
var dispatcher = ReactSharedInternals.A;
return null === dispatcher ? null : dispatcher.getOwner();
}
function UnknownOwner() {
return Error("react-stack-top-frame");
}
function hasValidKey(config) {
if (hasOwnProperty.call(config, "key")) {
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
if (getter && getter.isReactWarning) return false;
}
return void 0 !== config.key;
}
function defineKeyPropWarningGetter(props, displayName) {
function warnAboutAccessingKey() {
specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error(
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
displayName
));
}
warnAboutAccessingKey.isReactWarning = true;
Object.defineProperty(props, "key", {
get: warnAboutAccessingKey,
configurable: true
});
}
function elementRefGetterWithDeprecationWarning() {
var componentName = getComponentNameFromType(this.type);
didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error(
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
));
componentName = this.props.ref;
return void 0 !== componentName ? componentName : null;
}
function ReactElement(type, key, props, owner, debugStack, debugTask) {
var refProp = props.ref;
type = {
$$typeof: REACT_ELEMENT_TYPE,
type,
key,
props,
_owner: owner
};
null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", {
enumerable: false,
get: elementRefGetterWithDeprecationWarning
}) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
type._store = {};
Object.defineProperty(type._store, "validated", {
configurable: false,
enumerable: false,
writable: true,
value: 0
});
Object.defineProperty(type, "_debugInfo", {
configurable: false,
enumerable: false,
writable: true,
value: null
});
Object.defineProperty(type, "_debugStack", {
configurable: false,
enumerable: false,
writable: true,
value: debugStack
});
Object.defineProperty(type, "_debugTask", {
configurable: false,
enumerable: false,
writable: true,
value: debugTask
});
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
return type;
}
function jsxDEVImpl(type, config, maybeKey, isStaticChildren, debugStack, debugTask) {
var children = config.children;
if (void 0 !== children)
if (isStaticChildren)
if (isArrayImpl(children)) {
for (isStaticChildren = 0; isStaticChildren < children.length; isStaticChildren++)
validateChildKeys(children[isStaticChildren]);
Object.freeze && Object.freeze(children);
} else
console.error(
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
);
else validateChildKeys(children);
if (hasOwnProperty.call(config, "key")) {
children = getComponentNameFromType(type);
var keys = Object.keys(config).filter(function(k) {
return "key" !== k;
});
isStaticChildren = 0 < keys.length ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
didWarnAboutKeySpread[children + isStaticChildren] || (keys = 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}", console.error(
'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
isStaticChildren,
children,
keys,
children
), didWarnAboutKeySpread[children + isStaticChildren] = true);
}
children = null;
void 0 !== maybeKey && (checkKeyStringCoercion(maybeKey), children = "" + maybeKey);
hasValidKey(config) && (checkKeyStringCoercion(config.key), children = "" + config.key);
if ("key" in config) {
maybeKey = {};
for (var propName in config)
"key" !== propName && (maybeKey[propName] = config[propName]);
} else maybeKey = config;
children && defineKeyPropWarningGetter(
maybeKey,
"function" === typeof type ? type.displayName || type.name || "Unknown" : type
);
return ReactElement(
type,
children,
maybeKey,
getOwner(),
debugStack,
debugTask
);
}
function validateChildKeys(node) {
isValidElement(node) ? node._store && (node._store.validated = 1) : "object" === typeof node && null !== node && node.$$typeof === REACT_LAZY_TYPE && ("fulfilled" === node._payload.status ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1));
}
function isValidElement(object) {
return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
}
var React = require_react(), REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
return null;
};
React = {
react_stack_bottom_frame: function(callStackForError) {
return callStackForError();
}
};
var specialPropKeyWarningShown;
var didWarnAboutElementRef = {};
var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(
React,
UnknownOwner
)();
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
var didWarnAboutKeySpread = {};
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.jsx = function(type, config, maybeKey) {
var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
return jsxDEVImpl(
type,
config,
maybeKey,
false,
trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
);
};
exports.jsxs = function(type, config, maybeKey) {
var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
return jsxDEVImpl(
type,
config,
maybeKey,
true,
trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
);
};
})();
}
});
// node_modules/react/jsx-runtime.js
var require_jsx_runtime = __commonJS({
"node_modules/react/jsx-runtime.js"(exports, module) {
if (false) {
module.exports = null;
} else {
module.exports = require_react_jsx_runtime_development();
}
}
});
export {
require_jsx_runtime
};
//# sourceMappingURL=chunk-2YVA4HRZ.js.map
File diff suppressed because one or more lines are too long
-143
View File
@@ -1,143 +0,0 @@
import {
useLayoutEffect2
} from "./chunk-MOFDO34C.js";
import {
useComposedRefs
} from "./chunk-2VUH7NEY.js";
import {
require_react
} from "./chunk-WUR7D6NS.js";
import {
__toESM
} from "./chunk-G3PMV62Z.js";
// node_modules/@radix-ui/react-presence/dist/index.mjs
var React2 = __toESM(require_react(), 1);
var React = __toESM(require_react(), 1);
function useStateMachine(initialState, machine) {
return React.useReducer((state, event) => {
const nextState = machine[state][event];
return nextState ?? state;
}, initialState);
}
var Presence = (props) => {
const { present, children } = props;
const presence = usePresence(present);
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React2.Children.only(children);
const ref = useComposedRefs(presence.ref, getElementRef(child));
const forceMount = typeof children === "function";
return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;
};
Presence.displayName = "Presence";
function usePresence(present) {
const [node, setNode] = React2.useState();
const stylesRef = React2.useRef(null);
const prevPresentRef = React2.useRef(present);
const prevAnimationNameRef = React2.useRef("none");
const initialState = present ? "mounted" : "unmounted";
const [state, send] = useStateMachine(initialState, {
mounted: {
UNMOUNT: "unmounted",
ANIMATION_OUT: "unmountSuspended"
},
unmountSuspended: {
MOUNT: "mounted",
ANIMATION_END: "unmounted"
},
unmounted: {
MOUNT: "mounted"
}
});
React2.useEffect(() => {
const currentAnimationName = getAnimationName(stylesRef.current);
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
}, [state]);
useLayoutEffect2(() => {
const styles = stylesRef.current;
const wasPresent = prevPresentRef.current;
const hasPresentChanged = wasPresent !== present;
if (hasPresentChanged) {
const prevAnimationName = prevAnimationNameRef.current;
const currentAnimationName = getAnimationName(styles);
if (present) {
send("MOUNT");
} else if (currentAnimationName === "none" || styles?.display === "none") {
send("UNMOUNT");
} else {
const isAnimating = prevAnimationName !== currentAnimationName;
if (wasPresent && isAnimating) {
send("ANIMATION_OUT");
} else {
send("UNMOUNT");
}
}
prevPresentRef.current = present;
}
}, [present, send]);
useLayoutEffect2(() => {
if (node) {
let timeoutId;
const ownerWindow = node.ownerDocument.defaultView ?? window;
const handleAnimationEnd = (event) => {
const currentAnimationName = getAnimationName(stylesRef.current);
const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));
if (event.target === node && isCurrentAnimation) {
send("ANIMATION_END");
if (!prevPresentRef.current) {
const currentFillMode = node.style.animationFillMode;
node.style.animationFillMode = "forwards";
timeoutId = ownerWindow.setTimeout(() => {
if (node.style.animationFillMode === "forwards") {
node.style.animationFillMode = currentFillMode;
}
});
}
}
};
const handleAnimationStart = (event) => {
if (event.target === node) {
prevAnimationNameRef.current = getAnimationName(stylesRef.current);
}
};
node.addEventListener("animationstart", handleAnimationStart);
node.addEventListener("animationcancel", handleAnimationEnd);
node.addEventListener("animationend", handleAnimationEnd);
return () => {
ownerWindow.clearTimeout(timeoutId);
node.removeEventListener("animationstart", handleAnimationStart);
node.removeEventListener("animationcancel", handleAnimationEnd);
node.removeEventListener("animationend", handleAnimationEnd);
};
} else {
send("ANIMATION_END");
}
}, [node, send]);
return {
isPresent: ["mounted", "unmountSuspended"].includes(state),
ref: React2.useCallback((node2) => {
stylesRef.current = node2 ? getComputedStyle(node2) : null;
setNode(node2);
}, [])
};
}
function getAnimationName(styles) {
return styles?.animationName || "none";
}
function getElementRef(element) {
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
if (mayWarn) {
return element.ref;
}
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
if (mayWarn) {
return element.props.ref;
}
return element.props.ref || element.ref;
}
export {
Presence
};
//# sourceMappingURL=chunk-INCCO7S4.js.map
File diff suppressed because one or more lines are too long
-248
View File
@@ -1,248 +0,0 @@
import {
createContextScope,
useLayoutEffect2
} from "./chunk-MOFDO34C.js";
import {
composeRefs,
useComposedRefs
} from "./chunk-2VUH7NEY.js";
import {
require_jsx_runtime
} from "./chunk-2YVA4HRZ.js";
import {
require_react
} from "./chunk-WUR7D6NS.js";
import {
__toESM
} from "./chunk-G3PMV62Z.js";
// node_modules/@radix-ui/react-collection/dist/index.mjs
var import_react = __toESM(require_react(), 1);
// node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-slot/dist/index.mjs
var React = __toESM(require_react(), 1);
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
function createSlot(ownerName) {
const SlotClone = createSlotClone(ownerName);
const Slot2 = React.forwardRef((props, forwardedRef) => {
const { children, ...slotProps } = props;
const childrenArray = React.Children.toArray(children);
const slottable = childrenArray.find(isSlottable);
if (slottable) {
const newElement = slottable.props.children;
const newChildren = childrenArray.map((child) => {
if (child === slottable) {
if (React.Children.count(newElement) > 1) return React.Children.only(null);
return React.isValidElement(newElement) ? newElement.props.children : null;
} else {
return child;
}
});
return (0, import_jsx_runtime.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
}
return (0, import_jsx_runtime.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
});
Slot2.displayName = `${ownerName}.Slot`;
return Slot2;
}
var Slot = createSlot("Slot");
function createSlotClone(ownerName) {
const SlotClone = React.forwardRef((props, forwardedRef) => {
const { children, ...slotProps } = props;
if (React.isValidElement(children)) {
const childrenRef = getElementRef(children);
const props2 = mergeProps(slotProps, children.props);
if (children.type !== React.Fragment) {
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
}
return React.cloneElement(children, props2);
}
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
});
SlotClone.displayName = `${ownerName}.SlotClone`;
return SlotClone;
}
var SLOTTABLE_IDENTIFIER = /* @__PURE__ */ Symbol("radix.slottable");
function createSlottable(ownerName) {
const Slottable2 = ({ children }) => {
return (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children });
};
Slottable2.displayName = `${ownerName}.Slottable`;
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
return Slottable2;
}
var Slottable = createSlottable("Slottable");
function isSlottable(child) {
return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
}
function mergeProps(slotProps, childProps) {
const overrideProps = { ...childProps };
for (const propName in childProps) {
const slotPropValue = slotProps[propName];
const childPropValue = childProps[propName];
const isHandler = /^on[A-Z]/.test(propName);
if (isHandler) {
if (slotPropValue && childPropValue) {
overrideProps[propName] = (...args) => {
const result = childPropValue(...args);
slotPropValue(...args);
return result;
};
} else if (slotPropValue) {
overrideProps[propName] = slotPropValue;
}
} else if (propName === "style") {
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
} else if (propName === "className") {
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
}
}
return { ...slotProps, ...overrideProps };
}
function getElementRef(element) {
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
if (mayWarn) {
return element.ref;
}
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
if (mayWarn) {
return element.props.ref;
}
return element.props.ref || element.ref;
}
// node_modules/@radix-ui/react-collection/dist/index.mjs
var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
var import_react2 = __toESM(require_react(), 1);
var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
function createCollection(name) {
const PROVIDER_NAME = name + "CollectionProvider";
const [createCollectionContext, createCollectionScope] = createContextScope(PROVIDER_NAME);
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(
PROVIDER_NAME,
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
);
const CollectionProvider = (props) => {
const { scope, children } = props;
const ref = import_react.default.useRef(null);
const itemMap = import_react.default.useRef(/* @__PURE__ */ new Map()).current;
return (0, import_jsx_runtime2.jsx)(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
};
CollectionProvider.displayName = PROVIDER_NAME;
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);
const CollectionSlot = import_react.default.forwardRef(
(props, forwardedRef) => {
const { scope, children } = props;
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
return (0, import_jsx_runtime2.jsx)(CollectionSlotImpl, { ref: composedRefs, children });
}
);
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
const ITEM_DATA_ATTR = "data-radix-collection-item";
const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);
const CollectionItemSlot = import_react.default.forwardRef(
(props, forwardedRef) => {
const { scope, children, ...itemData } = props;
const ref = import_react.default.useRef(null);
const composedRefs = useComposedRefs(forwardedRef, ref);
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
import_react.default.useEffect(() => {
context.itemMap.set(ref, { ref, ...itemData });
return () => void context.itemMap.delete(ref);
});
return (0, import_jsx_runtime2.jsx)(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
}
);
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
function useCollection(scope) {
const context = useCollectionContext(name + "CollectionConsumer", scope);
const getItems = import_react.default.useCallback(() => {
const collectionNode = context.collectionRef.current;
if (!collectionNode) return [];
const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
const items = Array.from(context.itemMap.values());
const orderedItems = items.sort(
(a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)
);
return orderedItems;
}, [context.collectionRef, context.itemMap]);
return getItems;
}
return [
{ Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },
useCollection,
createCollectionScope
];
}
// node_modules/@radix-ui/react-direction/dist/index.mjs
var React3 = __toESM(require_react(), 1);
var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
var DirectionContext = React3.createContext(void 0);
function useDirection(localDir) {
const globalDir = React3.useContext(DirectionContext);
return localDir || globalDir || "ltr";
}
// node_modules/@radix-ui/react-use-size/dist/index.mjs
var React4 = __toESM(require_react(), 1);
function useSize(element) {
const [size, setSize] = React4.useState(void 0);
useLayoutEffect2(() => {
if (element) {
setSize({ width: element.offsetWidth, height: element.offsetHeight });
const resizeObserver = new ResizeObserver((entries) => {
if (!Array.isArray(entries)) {
return;
}
if (!entries.length) {
return;
}
const entry = entries[0];
let width;
let height;
if ("borderBoxSize" in entry) {
const borderSizeEntry = entry["borderBoxSize"];
const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
width = borderSize["inlineSize"];
height = borderSize["blockSize"];
} else {
width = element.offsetWidth;
height = element.offsetHeight;
}
setSize({ width, height });
});
resizeObserver.observe(element, { box: "border-box" });
return () => resizeObserver.unobserve(element);
} else {
setSize(void 0);
}
}, [element]);
return size;
}
// node_modules/@radix-ui/react-use-previous/dist/index.mjs
var React5 = __toESM(require_react(), 1);
function usePrevious(value) {
const ref = React5.useRef({ value, previous: value });
return React5.useMemo(() => {
if (ref.current.value !== value) {
ref.current.previous = ref.current.value;
ref.current.value = value;
}
return ref.current.previous;
}, [value]);
}
export {
createCollection,
useDirection,
useSize,
usePrevious
};
//# sourceMappingURL=chunk-L2OGOWTU.js.map
File diff suppressed because one or more lines are too long
-1352
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
-354
View File
@@ -1,354 +0,0 @@
import {
composeRefs
} from "./chunk-2VUH7NEY.js";
import {
require_react_dom
} from "./chunk-YF4B4G2L.js";
import {
require_jsx_runtime
} from "./chunk-2YVA4HRZ.js";
import {
require_react
} from "./chunk-WUR7D6NS.js";
import {
__toESM
} from "./chunk-G3PMV62Z.js";
// node_modules/@radix-ui/primitive/dist/index.mjs
var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
return function handleEvent(event) {
originalEventHandler?.(event);
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
return ourEventHandler?.(event);
}
};
}
// node_modules/@radix-ui/react-context/dist/index.mjs
var React = __toESM(require_react(), 1);
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
function createContext2(rootComponentName, defaultContext) {
const Context = React.createContext(defaultContext);
const Provider = (props) => {
const { children, ...context } = props;
const value = React.useMemo(() => context, Object.values(context));
return (0, import_jsx_runtime.jsx)(Context.Provider, { value, children });
};
Provider.displayName = rootComponentName + "Provider";
function useContext2(consumerName) {
const context = React.useContext(Context);
if (context) return context;
if (defaultContext !== void 0) return defaultContext;
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
}
return [Provider, useContext2];
}
function createContextScope(scopeName, createContextScopeDeps = []) {
let defaultContexts = [];
function createContext3(rootComponentName, defaultContext) {
const BaseContext = React.createContext(defaultContext);
const index = defaultContexts.length;
defaultContexts = [...defaultContexts, defaultContext];
const Provider = (props) => {
const { scope, children, ...context } = props;
const Context = scope?.[scopeName]?.[index] || BaseContext;
const value = React.useMemo(() => context, Object.values(context));
return (0, import_jsx_runtime.jsx)(Context.Provider, { value, children });
};
Provider.displayName = rootComponentName + "Provider";
function useContext2(consumerName, scope) {
const Context = scope?.[scopeName]?.[index] || BaseContext;
const context = React.useContext(Context);
if (context) return context;
if (defaultContext !== void 0) return defaultContext;
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
}
return [Provider, useContext2];
}
const createScope = () => {
const scopeContexts = defaultContexts.map((defaultContext) => {
return React.createContext(defaultContext);
});
return function useScope(scope) {
const contexts = scope?.[scopeName] || scopeContexts;
return React.useMemo(
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
[scope, contexts]
);
};
};
createScope.scopeName = scopeName;
return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
}
function composeContextScopes(...scopes) {
const baseScope = scopes[0];
if (scopes.length === 1) return baseScope;
const createScope = () => {
const scopeHooks = scopes.map((createScope2) => ({
useScope: createScope2(),
scopeName: createScope2.scopeName
}));
return function useComposedScopes(overrideScopes) {
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
const scopeProps = useScope(overrideScopes);
const currentScope = scopeProps[`__scope${scopeName}`];
return { ...nextScopes2, ...currentScope };
}, {});
return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
};
};
createScope.scopeName = baseScope.scopeName;
return createScope;
}
// node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
var React2 = __toESM(require_react(), 1);
var useLayoutEffect2 = globalThis?.document ? React2.useLayoutEffect : () => {
};
// node_modules/@radix-ui/react-id/dist/index.mjs
var React3 = __toESM(require_react(), 1);
var useReactId = React3[" useId ".trim().toString()] || (() => void 0);
var count = 0;
function useId(deterministicId) {
const [id, setId] = React3.useState(useReactId());
useLayoutEffect2(() => {
if (!deterministicId) setId((reactId) => reactId ?? String(count++));
}, [deterministicId]);
return deterministicId || (id ? `radix-${id}` : "");
}
// node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
var React5 = __toESM(require_react(), 1);
var React22 = __toESM(require_react(), 1);
// node_modules/@radix-ui/react-use-effect-event/dist/index.mjs
var React4 = __toESM(require_react(), 1);
var useReactEffectEvent = React4[" useEffectEvent ".trim().toString()];
var useReactInsertionEffect = React4[" useInsertionEffect ".trim().toString()];
// node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
var useInsertionEffect = React5[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
function useControllableState({
prop,
defaultProp,
onChange = () => {
},
caller
}) {
const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
defaultProp,
onChange
});
const isControlled = prop !== void 0;
const value = isControlled ? prop : uncontrolledProp;
if (true) {
const isControlledRef = React5.useRef(prop !== void 0);
React5.useEffect(() => {
const wasControlled = isControlledRef.current;
if (wasControlled !== isControlled) {
const from = wasControlled ? "controlled" : "uncontrolled";
const to = isControlled ? "controlled" : "uncontrolled";
console.warn(
`${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
);
}
isControlledRef.current = isControlled;
}, [isControlled, caller]);
}
const setValue = React5.useCallback(
(nextValue) => {
if (isControlled) {
const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
if (value2 !== prop) {
onChangeRef.current?.(value2);
}
} else {
setUncontrolledProp(nextValue);
}
},
[isControlled, prop, setUncontrolledProp, onChangeRef]
);
return [value, setValue];
}
function useUncontrolledState({
defaultProp,
onChange
}) {
const [value, setValue] = React5.useState(defaultProp);
const prevValueRef = React5.useRef(value);
const onChangeRef = React5.useRef(onChange);
useInsertionEffect(() => {
onChangeRef.current = onChange;
}, [onChange]);
React5.useEffect(() => {
if (prevValueRef.current !== value) {
onChangeRef.current?.(value);
prevValueRef.current = value;
}
}, [value, prevValueRef]);
return [value, setValue, onChangeRef];
}
function isFunction(value) {
return typeof value === "function";
}
// node_modules/@radix-ui/react-primitive/dist/index.mjs
var React7 = __toESM(require_react(), 1);
var ReactDOM = __toESM(require_react_dom(), 1);
// node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.mjs
var React6 = __toESM(require_react(), 1);
var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
function createSlot(ownerName) {
const SlotClone = createSlotClone(ownerName);
const Slot2 = React6.forwardRef((props, forwardedRef) => {
const { children, ...slotProps } = props;
const childrenArray = React6.Children.toArray(children);
const slottable = childrenArray.find(isSlottable);
if (slottable) {
const newElement = slottable.props.children;
const newChildren = childrenArray.map((child) => {
if (child === slottable) {
if (React6.Children.count(newElement) > 1) return React6.Children.only(null);
return React6.isValidElement(newElement) ? newElement.props.children : null;
} else {
return child;
}
});
return (0, import_jsx_runtime2.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React6.isValidElement(newElement) ? React6.cloneElement(newElement, void 0, newChildren) : null });
}
return (0, import_jsx_runtime2.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
});
Slot2.displayName = `${ownerName}.Slot`;
return Slot2;
}
var Slot = createSlot("Slot");
function createSlotClone(ownerName) {
const SlotClone = React6.forwardRef((props, forwardedRef) => {
const { children, ...slotProps } = props;
if (React6.isValidElement(children)) {
const childrenRef = getElementRef(children);
const props2 = mergeProps(slotProps, children.props);
if (children.type !== React6.Fragment) {
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
}
return React6.cloneElement(children, props2);
}
return React6.Children.count(children) > 1 ? React6.Children.only(null) : null;
});
SlotClone.displayName = `${ownerName}.SlotClone`;
return SlotClone;
}
var SLOTTABLE_IDENTIFIER = /* @__PURE__ */ Symbol("radix.slottable");
function createSlottable(ownerName) {
const Slottable2 = ({ children }) => {
return (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children });
};
Slottable2.displayName = `${ownerName}.Slottable`;
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
return Slottable2;
}
var Slottable = createSlottable("Slottable");
function isSlottable(child) {
return React6.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
}
function mergeProps(slotProps, childProps) {
const overrideProps = { ...childProps };
for (const propName in childProps) {
const slotPropValue = slotProps[propName];
const childPropValue = childProps[propName];
const isHandler = /^on[A-Z]/.test(propName);
if (isHandler) {
if (slotPropValue && childPropValue) {
overrideProps[propName] = (...args) => {
const result = childPropValue(...args);
slotPropValue(...args);
return result;
};
} else if (slotPropValue) {
overrideProps[propName] = slotPropValue;
}
} else if (propName === "style") {
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
} else if (propName === "className") {
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
}
}
return { ...slotProps, ...overrideProps };
}
function getElementRef(element) {
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
if (mayWarn) {
return element.ref;
}
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
if (mayWarn) {
return element.props.ref;
}
return element.props.ref || element.ref;
}
// node_modules/@radix-ui/react-primitive/dist/index.mjs
var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
var NODES = [
"a",
"button",
"div",
"form",
"h2",
"h3",
"img",
"input",
"label",
"li",
"nav",
"ol",
"p",
"select",
"span",
"svg",
"ul"
];
var Primitive = NODES.reduce((primitive, node) => {
const Slot2 = createSlot(`Primitive.${node}`);
const Node = React7.forwardRef((props, forwardedRef) => {
const { asChild, ...primitiveProps } = props;
const Comp = asChild ? Slot2 : node;
if (typeof window !== "undefined") {
window[/* @__PURE__ */ Symbol.for("radix-ui")] = true;
}
return (0, import_jsx_runtime3.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
});
Node.displayName = `Primitive.${node}`;
return { ...primitive, [node]: Node };
}, {});
function dispatchDiscreteCustomEvent(target, event) {
if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
}
// node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
var React8 = __toESM(require_react(), 1);
function useCallbackRef(callback) {
const callbackRef = React8.useRef(callback);
React8.useEffect(() => {
callbackRef.current = callback;
});
return React8.useMemo(() => (...args) => callbackRef.current?.(...args), []);
}
export {
composeEventHandlers,
createContext2,
createContextScope,
useLayoutEffect2,
useId,
useControllableState,
Primitive,
dispatchDiscreteCustomEvent,
useCallbackRef
};
//# sourceMappingURL=chunk-MOFDO34C.js.map
File diff suppressed because one or more lines are too long
-991
View File
@@ -1,991 +0,0 @@
import {
__commonJS
} from "./chunk-G3PMV62Z.js";
// node_modules/react/cjs/react.development.js
var require_react_development = __commonJS({
"node_modules/react/cjs/react.development.js"(exports, module) {
"use strict";
(function() {
function defineDeprecationWarning(methodName, info) {
Object.defineProperty(Component.prototype, methodName, {
get: function() {
console.warn(
"%s(...) is deprecated in plain JavaScript React classes. %s",
info[0],
info[1]
);
}
});
}
function getIteratorFn(maybeIterable) {
if (null === maybeIterable || "object" !== typeof maybeIterable)
return null;
maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
return "function" === typeof maybeIterable ? maybeIterable : null;
}
function warnNoop(publicInstance, callerName) {
publicInstance = (publicInstance = publicInstance.constructor) && (publicInstance.displayName || publicInstance.name) || "ReactClass";
var warningKey = publicInstance + "." + callerName;
didWarnStateUpdateForUnmountedComponent[warningKey] || (console.error(
"Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",
callerName,
publicInstance
), didWarnStateUpdateForUnmountedComponent[warningKey] = true);
}
function Component(props, context, updater) {
this.props = props;
this.context = context;
this.refs = emptyObject;
this.updater = updater || ReactNoopUpdateQueue;
}
function ComponentDummy() {
}
function PureComponent(props, context, updater) {
this.props = props;
this.context = context;
this.refs = emptyObject;
this.updater = updater || ReactNoopUpdateQueue;
}
function noop() {
}
function testStringCoercion(value) {
return "" + value;
}
function checkKeyStringCoercion(value) {
try {
testStringCoercion(value);
var JSCompiler_inline_result = false;
} catch (e) {
JSCompiler_inline_result = true;
}
if (JSCompiler_inline_result) {
JSCompiler_inline_result = console;
var JSCompiler_temp_const = JSCompiler_inline_result.error;
var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
JSCompiler_temp_const.call(
JSCompiler_inline_result,
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
JSCompiler_inline_result$jscomp$0
);
return testStringCoercion(value);
}
}
function getComponentNameFromType(type) {
if (null == type) return null;
if ("function" === typeof type)
return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
if ("string" === typeof type) return type;
switch (type) {
case REACT_FRAGMENT_TYPE:
return "Fragment";
case REACT_PROFILER_TYPE:
return "Profiler";
case REACT_STRICT_MODE_TYPE:
return "StrictMode";
case REACT_SUSPENSE_TYPE:
return "Suspense";
case REACT_SUSPENSE_LIST_TYPE:
return "SuspenseList";
case REACT_ACTIVITY_TYPE:
return "Activity";
}
if ("object" === typeof type)
switch ("number" === typeof type.tag && console.error(
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
), type.$$typeof) {
case REACT_PORTAL_TYPE:
return "Portal";
case REACT_CONTEXT_TYPE:
return type.displayName || "Context";
case REACT_CONSUMER_TYPE:
return (type._context.displayName || "Context") + ".Consumer";
case REACT_FORWARD_REF_TYPE:
var innerType = type.render;
type = type.displayName;
type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
return type;
case REACT_MEMO_TYPE:
return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
case REACT_LAZY_TYPE:
innerType = type._payload;
type = type._init;
try {
return getComponentNameFromType(type(innerType));
} catch (x) {
}
}
return null;
}
function getTaskName(type) {
if (type === REACT_FRAGMENT_TYPE) return "<>";
if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE)
return "<...>";
try {
var name = getComponentNameFromType(type);
return name ? "<" + name + ">" : "<...>";
} catch (x) {
return "<...>";
}
}
function getOwner() {
var dispatcher = ReactSharedInternals.A;
return null === dispatcher ? null : dispatcher.getOwner();
}
function UnknownOwner() {
return Error("react-stack-top-frame");
}
function hasValidKey(config) {
if (hasOwnProperty.call(config, "key")) {
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
if (getter && getter.isReactWarning) return false;
}
return void 0 !== config.key;
}
function defineKeyPropWarningGetter(props, displayName) {
function warnAboutAccessingKey() {
specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error(
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
displayName
));
}
warnAboutAccessingKey.isReactWarning = true;
Object.defineProperty(props, "key", {
get: warnAboutAccessingKey,
configurable: true
});
}
function elementRefGetterWithDeprecationWarning() {
var componentName = getComponentNameFromType(this.type);
didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error(
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
));
componentName = this.props.ref;
return void 0 !== componentName ? componentName : null;
}
function ReactElement(type, key, props, owner, debugStack, debugTask) {
var refProp = props.ref;
type = {
$$typeof: REACT_ELEMENT_TYPE,
type,
key,
props,
_owner: owner
};
null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", {
enumerable: false,
get: elementRefGetterWithDeprecationWarning
}) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
type._store = {};
Object.defineProperty(type._store, "validated", {
configurable: false,
enumerable: false,
writable: true,
value: 0
});
Object.defineProperty(type, "_debugInfo", {
configurable: false,
enumerable: false,
writable: true,
value: null
});
Object.defineProperty(type, "_debugStack", {
configurable: false,
enumerable: false,
writable: true,
value: debugStack
});
Object.defineProperty(type, "_debugTask", {
configurable: false,
enumerable: false,
writable: true,
value: debugTask
});
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
return type;
}
function cloneAndReplaceKey(oldElement, newKey) {
newKey = ReactElement(
oldElement.type,
newKey,
oldElement.props,
oldElement._owner,
oldElement._debugStack,
oldElement._debugTask
);
oldElement._store && (newKey._store.validated = oldElement._store.validated);
return newKey;
}
function validateChildKeys(node) {
isValidElement(node) ? node._store && (node._store.validated = 1) : "object" === typeof node && null !== node && node.$$typeof === REACT_LAZY_TYPE && ("fulfilled" === node._payload.status ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1));
}
function isValidElement(object) {
return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
}
function escape(key) {
var escaperLookup = { "=": "=0", ":": "=2" };
return "$" + key.replace(/[=:]/g, function(match) {
return escaperLookup[match];
});
}
function getElementKey(element, index) {
return "object" === typeof element && null !== element && null != element.key ? (checkKeyStringCoercion(element.key), escape("" + element.key)) : index.toString(36);
}
function resolveThenable(thenable) {
switch (thenable.status) {
case "fulfilled":
return thenable.value;
case "rejected":
throw thenable.reason;
default:
switch ("string" === typeof thenable.status ? thenable.then(noop, noop) : (thenable.status = "pending", thenable.then(
function(fulfilledValue) {
"pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
},
function(error) {
"pending" === thenable.status && (thenable.status = "rejected", thenable.reason = error);
}
)), thenable.status) {
case "fulfilled":
return thenable.value;
case "rejected":
throw thenable.reason;
}
}
throw thenable;
}
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
var type = typeof children;
if ("undefined" === type || "boolean" === type) children = null;
var invokeCallback = false;
if (null === children) invokeCallback = true;
else
switch (type) {
case "bigint":
case "string":
case "number":
invokeCallback = true;
break;
case "object":
switch (children.$$typeof) {
case REACT_ELEMENT_TYPE:
case REACT_PORTAL_TYPE:
invokeCallback = true;
break;
case REACT_LAZY_TYPE:
return invokeCallback = children._init, mapIntoArray(
invokeCallback(children._payload),
array,
escapedPrefix,
nameSoFar,
callback
);
}
}
if (invokeCallback) {
invokeCallback = children;
callback = callback(invokeCallback);
var childKey = "" === nameSoFar ? "." + getElementKey(invokeCallback, 0) : nameSoFar;
isArrayImpl(callback) ? (escapedPrefix = "", null != childKey && (escapedPrefix = childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function(c) {
return c;
})) : null != callback && (isValidElement(callback) && (null != callback.key && (invokeCallback && invokeCallback.key === callback.key || checkKeyStringCoercion(callback.key)), escapedPrefix = cloneAndReplaceKey(
callback,
escapedPrefix + (null == callback.key || invokeCallback && invokeCallback.key === callback.key ? "" : ("" + callback.key).replace(
userProvidedKeyEscapeRegex,
"$&/"
) + "/") + childKey
), "" !== nameSoFar && null != invokeCallback && isValidElement(invokeCallback) && null == invokeCallback.key && invokeCallback._store && !invokeCallback._store.validated && (escapedPrefix._store.validated = 2), callback = escapedPrefix), array.push(callback));
return 1;
}
invokeCallback = 0;
childKey = "" === nameSoFar ? "." : nameSoFar + ":";
if (isArrayImpl(children))
for (var i = 0; i < children.length; i++)
nameSoFar = children[i], type = childKey + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(
nameSoFar,
array,
escapedPrefix,
type,
callback
);
else if (i = getIteratorFn(children), "function" === typeof i)
for (i === children.entries && (didWarnAboutMaps || console.warn(
"Using Maps as children is not supported. Use an array of keyed ReactElements instead."
), didWarnAboutMaps = true), children = i.call(children), i = 0; !(nameSoFar = children.next()).done; )
nameSoFar = nameSoFar.value, type = childKey + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(
nameSoFar,
array,
escapedPrefix,
type,
callback
);
else if ("object" === type) {
if ("function" === typeof children.then)
return mapIntoArray(
resolveThenable(children),
array,
escapedPrefix,
nameSoFar,
callback
);
array = String(children);
throw Error(
"Objects are not valid as a React child (found: " + ("[object Object]" === array ? "object with keys {" + Object.keys(children).join(", ") + "}" : array) + "). If you meant to render a collection of children, use an array instead."
);
}
return invokeCallback;
}
function mapChildren(children, func, context) {
if (null == children) return children;
var result = [], count = 0;
mapIntoArray(children, result, "", "", function(child) {
return func.call(context, child, count++);
});
return result;
}
function lazyInitializer(payload) {
if (-1 === payload._status) {
var ioInfo = payload._ioInfo;
null != ioInfo && (ioInfo.start = ioInfo.end = performance.now());
ioInfo = payload._result;
var thenable = ioInfo();
thenable.then(
function(moduleObject) {
if (0 === payload._status || -1 === payload._status) {
payload._status = 1;
payload._result = moduleObject;
var _ioInfo = payload._ioInfo;
null != _ioInfo && (_ioInfo.end = performance.now());
void 0 === thenable.status && (thenable.status = "fulfilled", thenable.value = moduleObject);
}
},
function(error) {
if (0 === payload._status || -1 === payload._status) {
payload._status = 2;
payload._result = error;
var _ioInfo2 = payload._ioInfo;
null != _ioInfo2 && (_ioInfo2.end = performance.now());
void 0 === thenable.status && (thenable.status = "rejected", thenable.reason = error);
}
}
);
ioInfo = payload._ioInfo;
if (null != ioInfo) {
ioInfo.value = thenable;
var displayName = thenable.displayName;
"string" === typeof displayName && (ioInfo.name = displayName);
}
-1 === payload._status && (payload._status = 0, payload._result = thenable);
}
if (1 === payload._status)
return ioInfo = payload._result, void 0 === ioInfo && console.error(
"lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?",
ioInfo
), "default" in ioInfo || console.error(
"lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",
ioInfo
), ioInfo.default;
throw payload._result;
}
function resolveDispatcher() {
var dispatcher = ReactSharedInternals.H;
null === dispatcher && console.error(
"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
);
return dispatcher;
}
function releaseAsyncTransition() {
ReactSharedInternals.asyncTransitions--;
}
function enqueueTask(task) {
if (null === enqueueTaskImpl)
try {
var requireString = ("require" + Math.random()).slice(0, 7);
enqueueTaskImpl = (module && module[requireString]).call(
module,
"timers"
).setImmediate;
} catch (_err) {
enqueueTaskImpl = function(callback) {
false === didWarnAboutMessageChannel && (didWarnAboutMessageChannel = true, "undefined" === typeof MessageChannel && console.error(
"This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."
));
var channel = new MessageChannel();
channel.port1.onmessage = callback;
channel.port2.postMessage(void 0);
};
}
return enqueueTaskImpl(task);
}
function aggregateErrors(errors) {
return 1 < errors.length && "function" === typeof AggregateError ? new AggregateError(errors) : errors[0];
}
function popActScope(prevActQueue, prevActScopeDepth) {
prevActScopeDepth !== actScopeDepth - 1 && console.error(
"You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "
);
actScopeDepth = prevActScopeDepth;
}
function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
var queue = ReactSharedInternals.actQueue;
if (null !== queue)
if (0 !== queue.length)
try {
flushActQueue(queue);
enqueueTask(function() {
return recursivelyFlushAsyncActWork(returnValue, resolve, reject);
});
return;
} catch (error) {
ReactSharedInternals.thrownErrors.push(error);
}
else ReactSharedInternals.actQueue = null;
0 < ReactSharedInternals.thrownErrors.length ? (queue = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(queue)) : resolve(returnValue);
}
function flushActQueue(queue) {
if (!isFlushing) {
isFlushing = true;
var i = 0;
try {
for (; i < queue.length; i++) {
var callback = queue[i];
do {
ReactSharedInternals.didUsePromise = false;
var continuation = callback(false);
if (null !== continuation) {
if (ReactSharedInternals.didUsePromise) {
queue[i] = callback;
queue.splice(0, i);
return;
}
callback = continuation;
} else break;
} while (1);
}
queue.length = 0;
} catch (error) {
queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);
} finally {
isFlushing = false;
}
}
}
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, didWarnStateUpdateForUnmountedComponent = {}, ReactNoopUpdateQueue = {
isMounted: function() {
return false;
},
enqueueForceUpdate: function(publicInstance) {
warnNoop(publicInstance, "forceUpdate");
},
enqueueReplaceState: function(publicInstance) {
warnNoop(publicInstance, "replaceState");
},
enqueueSetState: function(publicInstance) {
warnNoop(publicInstance, "setState");
}
}, assign = Object.assign, emptyObject = {};
Object.freeze(emptyObject);
Component.prototype.isReactComponent = {};
Component.prototype.setState = function(partialState, callback) {
if ("object" !== typeof partialState && "function" !== typeof partialState && null != partialState)
throw Error(
"takes an object of state variables to update or a function which returns an object of state variables."
);
this.updater.enqueueSetState(this, partialState, callback, "setState");
};
Component.prototype.forceUpdate = function(callback) {
this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
};
var deprecatedAPIs = {
isMounted: [
"isMounted",
"Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."
],
replaceState: [
"replaceState",
"Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."
]
};
for (fnName in deprecatedAPIs)
deprecatedAPIs.hasOwnProperty(fnName) && defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
ComponentDummy.prototype = Component.prototype;
deprecatedAPIs = PureComponent.prototype = new ComponentDummy();
deprecatedAPIs.constructor = PureComponent;
assign(deprecatedAPIs, Component.prototype);
deprecatedAPIs.isPureReactComponent = true;
var isArrayImpl = Array.isArray, REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference"), ReactSharedInternals = {
H: null,
A: null,
T: null,
S: null,
actQueue: null,
asyncTransitions: 0,
isBatchingLegacy: false,
didScheduleLegacyUpdate: false,
didUsePromise: false,
thrownErrors: [],
getCurrentStack: null,
recentlyCreatedOwnerStacks: 0
}, hasOwnProperty = Object.prototype.hasOwnProperty, createTask = console.createTask ? console.createTask : function() {
return null;
};
deprecatedAPIs = {
react_stack_bottom_frame: function(callStackForError) {
return callStackForError();
}
};
var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;
var didWarnAboutElementRef = {};
var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(
deprecatedAPIs,
UnknownOwner
)();
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
var didWarnAboutMaps = false, userProvidedKeyEscapeRegex = /\/+/g, reportGlobalError = "function" === typeof reportError ? reportError : function(error) {
if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
var event = new window.ErrorEvent("error", {
bubbles: true,
cancelable: true,
message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error),
error
});
if (!window.dispatchEvent(event)) return;
} else if ("object" === typeof process && "function" === typeof process.emit) {
process.emit("uncaughtException", error);
return;
}
console.error(error);
}, didWarnAboutMessageChannel = false, enqueueTaskImpl = null, actScopeDepth = 0, didWarnNoAwaitAct = false, isFlushing = false, queueSeveralMicrotasks = "function" === typeof queueMicrotask ? function(callback) {
queueMicrotask(function() {
return queueMicrotask(callback);
});
} : enqueueTask;
deprecatedAPIs = Object.freeze({
__proto__: null,
c: function(size) {
return resolveDispatcher().useMemoCache(size);
}
});
var fnName = {
map: mapChildren,
forEach: function(children, forEachFunc, forEachContext) {
mapChildren(
children,
function() {
forEachFunc.apply(this, arguments);
},
forEachContext
);
},
count: function(children) {
var n = 0;
mapChildren(children, function() {
n++;
});
return n;
},
toArray: function(children) {
return mapChildren(children, function(child) {
return child;
}) || [];
},
only: function(children) {
if (!isValidElement(children))
throw Error(
"React.Children.only expected to receive a single React element child."
);
return children;
}
};
exports.Activity = REACT_ACTIVITY_TYPE;
exports.Children = fnName;
exports.Component = Component;
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.Profiler = REACT_PROFILER_TYPE;
exports.PureComponent = PureComponent;
exports.StrictMode = REACT_STRICT_MODE_TYPE;
exports.Suspense = REACT_SUSPENSE_TYPE;
exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
exports.__COMPILER_RUNTIME = deprecatedAPIs;
exports.act = function(callback) {
var prevActQueue = ReactSharedInternals.actQueue, prevActScopeDepth = actScopeDepth;
actScopeDepth++;
var queue = ReactSharedInternals.actQueue = null !== prevActQueue ? prevActQueue : [], didAwaitActCall = false;
try {
var result = callback();
} catch (error) {
ReactSharedInternals.thrownErrors.push(error);
}
if (0 < ReactSharedInternals.thrownErrors.length)
throw popActScope(prevActQueue, prevActScopeDepth), callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
if (null !== result && "object" === typeof result && "function" === typeof result.then) {
var thenable = result;
queueSeveralMicrotasks(function() {
didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error(
"You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"
));
});
return {
then: function(resolve, reject) {
didAwaitActCall = true;
thenable.then(
function(returnValue) {
popActScope(prevActQueue, prevActScopeDepth);
if (0 === prevActScopeDepth) {
try {
flushActQueue(queue), enqueueTask(function() {
return recursivelyFlushAsyncActWork(
returnValue,
resolve,
reject
);
});
} catch (error$0) {
ReactSharedInternals.thrownErrors.push(error$0);
}
if (0 < ReactSharedInternals.thrownErrors.length) {
var _thrownError = aggregateErrors(
ReactSharedInternals.thrownErrors
);
ReactSharedInternals.thrownErrors.length = 0;
reject(_thrownError);
}
} else resolve(returnValue);
},
function(error) {
popActScope(prevActQueue, prevActScopeDepth);
0 < ReactSharedInternals.thrownErrors.length ? (error = aggregateErrors(
ReactSharedInternals.thrownErrors
), ReactSharedInternals.thrownErrors.length = 0, reject(error)) : reject(error);
}
);
}
};
}
var returnValue$jscomp$0 = result;
popActScope(prevActQueue, prevActScopeDepth);
0 === prevActScopeDepth && (flushActQueue(queue), 0 !== queue.length && queueSeveralMicrotasks(function() {
didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error(
"A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"
));
}), ReactSharedInternals.actQueue = null);
if (0 < ReactSharedInternals.thrownErrors.length)
throw callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
return {
then: function(resolve, reject) {
didAwaitActCall = true;
0 === prevActScopeDepth ? (ReactSharedInternals.actQueue = queue, enqueueTask(function() {
return recursivelyFlushAsyncActWork(
returnValue$jscomp$0,
resolve,
reject
);
})) : resolve(returnValue$jscomp$0);
}
};
};
exports.cache = function(fn) {
return function() {
return fn.apply(null, arguments);
};
};
exports.cacheSignal = function() {
return null;
};
exports.captureOwnerStack = function() {
var getCurrentStack = ReactSharedInternals.getCurrentStack;
return null === getCurrentStack ? null : getCurrentStack();
};
exports.cloneElement = function(element, config, children) {
if (null === element || void 0 === element)
throw Error(
"The argument must be a React element, but you passed " + element + "."
);
var props = assign({}, element.props), key = element.key, owner = element._owner;
if (null != config) {
var JSCompiler_inline_result;
a: {
if (hasOwnProperty.call(config, "ref") && (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(
config,
"ref"
).get) && JSCompiler_inline_result.isReactWarning) {
JSCompiler_inline_result = false;
break a;
}
JSCompiler_inline_result = void 0 !== config.ref;
}
JSCompiler_inline_result && (owner = getOwner());
hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key);
for (propName in config)
!hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || "ref" === propName && void 0 === config.ref || (props[propName] = config[propName]);
}
var propName = arguments.length - 2;
if (1 === propName) props.children = children;
else if (1 < propName) {
JSCompiler_inline_result = Array(propName);
for (var i = 0; i < propName; i++)
JSCompiler_inline_result[i] = arguments[i + 2];
props.children = JSCompiler_inline_result;
}
props = ReactElement(
element.type,
key,
props,
owner,
element._debugStack,
element._debugTask
);
for (key = 2; key < arguments.length; key++)
validateChildKeys(arguments[key]);
return props;
};
exports.createContext = function(defaultValue) {
defaultValue = {
$$typeof: REACT_CONTEXT_TYPE,
_currentValue: defaultValue,
_currentValue2: defaultValue,
_threadCount: 0,
Provider: null,
Consumer: null
};
defaultValue.Provider = defaultValue;
defaultValue.Consumer = {
$$typeof: REACT_CONSUMER_TYPE,
_context: defaultValue
};
defaultValue._currentRenderer = null;
defaultValue._currentRenderer2 = null;
return defaultValue;
};
exports.createElement = function(type, config, children) {
for (var i = 2; i < arguments.length; i++)
validateChildKeys(arguments[i]);
i = {};
var key = null;
if (null != config)
for (propName in didWarnAboutOldJSXRuntime || !("__self" in config) || "key" in config || (didWarnAboutOldJSXRuntime = true, console.warn(
"Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform"
)), hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key), config)
hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (i[propName] = config[propName]);
var childrenLength = arguments.length - 2;
if (1 === childrenLength) i.children = children;
else if (1 < childrenLength) {
for (var childArray = Array(childrenLength), _i = 0; _i < childrenLength; _i++)
childArray[_i] = arguments[_i + 2];
Object.freeze && Object.freeze(childArray);
i.children = childArray;
}
if (type && type.defaultProps)
for (propName in childrenLength = type.defaultProps, childrenLength)
void 0 === i[propName] && (i[propName] = childrenLength[propName]);
key && defineKeyPropWarningGetter(
i,
"function" === typeof type ? type.displayName || type.name || "Unknown" : type
);
var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
return ReactElement(
type,
key,
i,
getOwner(),
propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask
);
};
exports.createRef = function() {
var refObject = { current: null };
Object.seal(refObject);
return refObject;
};
exports.forwardRef = function(render) {
null != render && render.$$typeof === REACT_MEMO_TYPE ? console.error(
"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."
) : "function" !== typeof render ? console.error(
"forwardRef requires a render function but was given %s.",
null === render ? "null" : typeof render
) : 0 !== render.length && 2 !== render.length && console.error(
"forwardRef render functions accept exactly two parameters: props and ref. %s",
1 === render.length ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."
);
null != render && null != render.defaultProps && console.error(
"forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?"
);
var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render }, ownName;
Object.defineProperty(elementType, "displayName", {
enumerable: false,
configurable: true,
get: function() {
return ownName;
},
set: function(name) {
ownName = name;
render.name || render.displayName || (Object.defineProperty(render, "name", { value: name }), render.displayName = name);
}
});
return elementType;
};
exports.isValidElement = isValidElement;
exports.lazy = function(ctor) {
ctor = { _status: -1, _result: ctor };
var lazyType = {
$$typeof: REACT_LAZY_TYPE,
_payload: ctor,
_init: lazyInitializer
}, ioInfo = {
name: "lazy",
start: -1,
end: -1,
value: null,
owner: null,
debugStack: Error("react-stack-top-frame"),
debugTask: console.createTask ? console.createTask("lazy()") : null
};
ctor._ioInfo = ioInfo;
lazyType._debugInfo = [{ awaited: ioInfo }];
return lazyType;
};
exports.memo = function(type, compare) {
null == type && console.error(
"memo: The first argument must be a component. Instead received: %s",
null === type ? "null" : typeof type
);
compare = {
$$typeof: REACT_MEMO_TYPE,
type,
compare: void 0 === compare ? null : compare
};
var ownName;
Object.defineProperty(compare, "displayName", {
enumerable: false,
configurable: true,
get: function() {
return ownName;
},
set: function(name) {
ownName = name;
type.name || type.displayName || (Object.defineProperty(type, "name", { value: name }), type.displayName = name);
}
});
return compare;
};
exports.startTransition = function(scope) {
var prevTransition = ReactSharedInternals.T, currentTransition = {};
currentTransition._updatedFibers = /* @__PURE__ */ new Set();
ReactSharedInternals.T = currentTransition;
try {
var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
"object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && (ReactSharedInternals.asyncTransitions++, returnValue.then(releaseAsyncTransition, releaseAsyncTransition), returnValue.then(noop, reportGlobalError));
} catch (error) {
reportGlobalError(error);
} finally {
null === prevTransition && currentTransition._updatedFibers && (scope = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < scope && console.warn(
"Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."
)), null !== prevTransition && null !== currentTransition.types && (null !== prevTransition.types && prevTransition.types !== currentTransition.types && console.error(
"We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."
), prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition;
}
};
exports.unstable_useCacheRefresh = function() {
return resolveDispatcher().useCacheRefresh();
};
exports.use = function(usable) {
return resolveDispatcher().use(usable);
};
exports.useActionState = function(action, initialState, permalink) {
return resolveDispatcher().useActionState(
action,
initialState,
permalink
);
};
exports.useCallback = function(callback, deps) {
return resolveDispatcher().useCallback(callback, deps);
};
exports.useContext = function(Context) {
var dispatcher = resolveDispatcher();
Context.$$typeof === REACT_CONSUMER_TYPE && console.error(
"Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"
);
return dispatcher.useContext(Context);
};
exports.useDebugValue = function(value, formatterFn) {
return resolveDispatcher().useDebugValue(value, formatterFn);
};
exports.useDeferredValue = function(value, initialValue) {
return resolveDispatcher().useDeferredValue(value, initialValue);
};
exports.useEffect = function(create, deps) {
null == create && console.warn(
"React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"
);
return resolveDispatcher().useEffect(create, deps);
};
exports.useEffectEvent = function(callback) {
return resolveDispatcher().useEffectEvent(callback);
};
exports.useId = function() {
return resolveDispatcher().useId();
};
exports.useImperativeHandle = function(ref, create, deps) {
return resolveDispatcher().useImperativeHandle(ref, create, deps);
};
exports.useInsertionEffect = function(create, deps) {
null == create && console.warn(
"React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"
);
return resolveDispatcher().useInsertionEffect(create, deps);
};
exports.useLayoutEffect = function(create, deps) {
null == create && console.warn(
"React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"
);
return resolveDispatcher().useLayoutEffect(create, deps);
};
exports.useMemo = function(create, deps) {
return resolveDispatcher().useMemo(create, deps);
};
exports.useOptimistic = function(passthrough, reducer) {
return resolveDispatcher().useOptimistic(passthrough, reducer);
};
exports.useReducer = function(reducer, initialArg, init) {
return resolveDispatcher().useReducer(reducer, initialArg, init);
};
exports.useRef = function(initialValue) {
return resolveDispatcher().useRef(initialValue);
};
exports.useState = function(initialState) {
return resolveDispatcher().useState(initialState);
};
exports.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
return resolveDispatcher().useSyncExternalStore(
subscribe,
getSnapshot,
getServerSnapshot
);
};
exports.useTransition = function() {
return resolveDispatcher().useTransition();
};
exports.version = "19.2.3";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
})();
}
});
// node_modules/react/index.js
var require_react = __commonJS({
"node_modules/react/index.js"(exports, module) {
if (false) {
module.exports = null;
} else {
module.exports = require_react_development();
}
}
});
export {
require_react
};
//# sourceMappingURL=chunk-WUR7D6NS.js.map
File diff suppressed because one or more lines are too long
-267
View File
@@ -1,267 +0,0 @@
import {
require_react
} from "./chunk-WUR7D6NS.js";
import {
__commonJS
} from "./chunk-G3PMV62Z.js";
// node_modules/react-dom/cjs/react-dom.development.js
var require_react_dom_development = __commonJS({
"node_modules/react-dom/cjs/react-dom.development.js"(exports) {
"use strict";
(function() {
function noop() {
}
function testStringCoercion(value) {
return "" + value;
}
function createPortal$1(children, containerInfo, implementation) {
var key = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
try {
testStringCoercion(key);
var JSCompiler_inline_result = false;
} catch (e) {
JSCompiler_inline_result = true;
}
JSCompiler_inline_result && (console.error(
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
"function" === typeof Symbol && Symbol.toStringTag && key[Symbol.toStringTag] || key.constructor.name || "Object"
), testStringCoercion(key));
return {
$$typeof: REACT_PORTAL_TYPE,
key: null == key ? null : "" + key,
children,
containerInfo,
implementation
};
}
function getCrossOriginStringAs(as, input) {
if ("font" === as) return "";
if ("string" === typeof input)
return "use-credentials" === input ? input : "";
}
function getValueDescriptorExpectingObjectForWarning(thing) {
return null === thing ? "`null`" : void 0 === thing ? "`undefined`" : "" === thing ? "an empty string" : 'something with type "' + typeof thing + '"';
}
function getValueDescriptorExpectingEnumForWarning(thing) {
return null === thing ? "`null`" : void 0 === thing ? "`undefined`" : "" === thing ? "an empty string" : "string" === typeof thing ? JSON.stringify(thing) : "number" === typeof thing ? "`" + thing + "`" : 'something with type "' + typeof thing + '"';
}
function resolveDispatcher() {
var dispatcher = ReactSharedInternals.H;
null === dispatcher && console.error(
"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
);
return dispatcher;
}
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
var React = require_react(), Internals = {
d: {
f: noop,
r: function() {
throw Error(
"Invalid form element. requestFormReset must be passed a form that was rendered by React."
);
},
D: noop,
C: noop,
L: noop,
m: noop,
X: noop,
S: noop,
M: noop
},
p: 0,
findDOMNode: null
}, REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
"function" === typeof Map && null != Map.prototype && "function" === typeof Map.prototype.forEach && "function" === typeof Set && null != Set.prototype && "function" === typeof Set.prototype.clear && "function" === typeof Set.prototype.forEach || console.error(
"React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"
);
exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = Internals;
exports.createPortal = function(children, container) {
var key = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;
if (!container || 1 !== container.nodeType && 9 !== container.nodeType && 11 !== container.nodeType)
throw Error("Target container is not a DOM element.");
return createPortal$1(children, container, null, key);
};
exports.flushSync = function(fn) {
var previousTransition = ReactSharedInternals.T, previousUpdatePriority = Internals.p;
try {
if (ReactSharedInternals.T = null, Internals.p = 2, fn)
return fn();
} finally {
ReactSharedInternals.T = previousTransition, Internals.p = previousUpdatePriority, Internals.d.f() && console.error(
"flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."
);
}
};
exports.preconnect = function(href, options) {
"string" === typeof href && href ? null != options && "object" !== typeof options ? console.error(
"ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",
getValueDescriptorExpectingEnumForWarning(options)
) : null != options && "string" !== typeof options.crossOrigin && console.error(
"ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",
getValueDescriptorExpectingObjectForWarning(options.crossOrigin)
) : console.error(
"ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
getValueDescriptorExpectingObjectForWarning(href)
);
"string" === typeof href && (options ? (options = options.crossOrigin, options = "string" === typeof options ? "use-credentials" === options ? options : "" : void 0) : options = null, Internals.d.C(href, options));
};
exports.prefetchDNS = function(href) {
if ("string" !== typeof href || !href)
console.error(
"ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
getValueDescriptorExpectingObjectForWarning(href)
);
else if (1 < arguments.length) {
var options = arguments[1];
"object" === typeof options && options.hasOwnProperty("crossOrigin") ? console.error(
"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
getValueDescriptorExpectingEnumForWarning(options)
) : console.error(
"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
getValueDescriptorExpectingEnumForWarning(options)
);
}
"string" === typeof href && Internals.d.D(href);
};
exports.preinit = function(href, options) {
"string" === typeof href && href ? null == options || "object" !== typeof options ? console.error(
"ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",
getValueDescriptorExpectingEnumForWarning(options)
) : "style" !== options.as && "script" !== options.as && console.error(
'ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',
getValueDescriptorExpectingEnumForWarning(options.as)
) : console.error(
"ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
getValueDescriptorExpectingObjectForWarning(href)
);
if ("string" === typeof href && options && "string" === typeof options.as) {
var as = options.as, crossOrigin = getCrossOriginStringAs(as, options.crossOrigin), integrity = "string" === typeof options.integrity ? options.integrity : void 0, fetchPriority = "string" === typeof options.fetchPriority ? options.fetchPriority : void 0;
"style" === as ? Internals.d.S(
href,
"string" === typeof options.precedence ? options.precedence : void 0,
{
crossOrigin,
integrity,
fetchPriority
}
) : "script" === as && Internals.d.X(href, {
crossOrigin,
integrity,
fetchPriority,
nonce: "string" === typeof options.nonce ? options.nonce : void 0
});
}
};
exports.preinitModule = function(href, options) {
var encountered = "";
"string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".");
void 0 !== options && "object" !== typeof options ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "." : options && "as" in options && "script" !== options.as && (encountered += " The `as` option encountered was " + getValueDescriptorExpectingEnumForWarning(options.as) + ".");
if (encountered)
console.error(
"ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",
encountered
);
else
switch (encountered = options && "string" === typeof options.as ? options.as : "script", encountered) {
case "script":
break;
default:
encountered = getValueDescriptorExpectingEnumForWarning(encountered), console.error(
'ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',
encountered,
href
);
}
if ("string" === typeof href)
if ("object" === typeof options && null !== options) {
if (null == options.as || "script" === options.as)
encountered = getCrossOriginStringAs(
options.as,
options.crossOrigin
), Internals.d.M(href, {
crossOrigin: encountered,
integrity: "string" === typeof options.integrity ? options.integrity : void 0,
nonce: "string" === typeof options.nonce ? options.nonce : void 0
});
} else null == options && Internals.d.M(href);
};
exports.preload = function(href, options) {
var encountered = "";
"string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".");
null == options || "object" !== typeof options ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "." : "string" === typeof options.as && options.as || (encountered += " The `as` option encountered was " + getValueDescriptorExpectingObjectForWarning(options.as) + ".");
encountered && console.error(
'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',
encountered
);
if ("string" === typeof href && "object" === typeof options && null !== options && "string" === typeof options.as) {
encountered = options.as;
var crossOrigin = getCrossOriginStringAs(
encountered,
options.crossOrigin
);
Internals.d.L(href, encountered, {
crossOrigin,
integrity: "string" === typeof options.integrity ? options.integrity : void 0,
nonce: "string" === typeof options.nonce ? options.nonce : void 0,
type: "string" === typeof options.type ? options.type : void 0,
fetchPriority: "string" === typeof options.fetchPriority ? options.fetchPriority : void 0,
referrerPolicy: "string" === typeof options.referrerPolicy ? options.referrerPolicy : void 0,
imageSrcSet: "string" === typeof options.imageSrcSet ? options.imageSrcSet : void 0,
imageSizes: "string" === typeof options.imageSizes ? options.imageSizes : void 0,
media: "string" === typeof options.media ? options.media : void 0
});
}
};
exports.preloadModule = function(href, options) {
var encountered = "";
"string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".");
void 0 !== options && "object" !== typeof options ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "." : options && "as" in options && "string" !== typeof options.as && (encountered += " The `as` option encountered was " + getValueDescriptorExpectingObjectForWarning(options.as) + ".");
encountered && console.error(
'ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',
encountered
);
"string" === typeof href && (options ? (encountered = getCrossOriginStringAs(
options.as,
options.crossOrigin
), Internals.d.m(href, {
as: "string" === typeof options.as && "script" !== options.as ? options.as : void 0,
crossOrigin: encountered,
integrity: "string" === typeof options.integrity ? options.integrity : void 0
})) : Internals.d.m(href));
};
exports.requestFormReset = function(form) {
Internals.d.r(form);
};
exports.unstable_batchedUpdates = function(fn, a) {
return fn(a);
};
exports.useFormState = function(action, initialState, permalink) {
return resolveDispatcher().useFormState(action, initialState, permalink);
};
exports.useFormStatus = function() {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.2.3";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
})();
}
});
// node_modules/react-dom/index.js
var require_react_dom = __commonJS({
"node_modules/react-dom/index.js"(exports, module) {
if (false) {
checkDCE();
module.exports = null;
} else {
module.exports = require_react_dom_development();
}
}
});
export {
require_react_dom
};
//# sourceMappingURL=chunk-YF4B4G2L.js.map
File diff suppressed because one or more lines are too long
-128
View File
@@ -1,128 +0,0 @@
import {
composeRefs
} from "./chunk-2VUH7NEY.js";
import {
require_jsx_runtime
} from "./chunk-2YVA4HRZ.js";
import {
require_react
} from "./chunk-WUR7D6NS.js";
import {
__toESM
} from "./chunk-G3PMV62Z.js";
// node_modules/@radix-ui/react-slot/dist/index.mjs
var React = __toESM(require_react(), 1);
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
var use = React[" use ".trim().toString()];
function isPromiseLike(value) {
return typeof value === "object" && value !== null && "then" in value;
}
function isLazyComponent(element) {
return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
}
function createSlot(ownerName) {
const SlotClone = createSlotClone(ownerName);
const Slot2 = React.forwardRef((props, forwardedRef) => {
let { children, ...slotProps } = props;
if (isLazyComponent(children) && typeof use === "function") {
children = use(children._payload);
}
const childrenArray = React.Children.toArray(children);
const slottable = childrenArray.find(isSlottable);
if (slottable) {
const newElement = slottable.props.children;
const newChildren = childrenArray.map((child) => {
if (child === slottable) {
if (React.Children.count(newElement) > 1) return React.Children.only(null);
return React.isValidElement(newElement) ? newElement.props.children : null;
} else {
return child;
}
});
return (0, import_jsx_runtime.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
}
return (0, import_jsx_runtime.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
});
Slot2.displayName = `${ownerName}.Slot`;
return Slot2;
}
var Slot = createSlot("Slot");
function createSlotClone(ownerName) {
const SlotClone = React.forwardRef((props, forwardedRef) => {
let { children, ...slotProps } = props;
if (isLazyComponent(children) && typeof use === "function") {
children = use(children._payload);
}
if (React.isValidElement(children)) {
const childrenRef = getElementRef(children);
const props2 = mergeProps(slotProps, children.props);
if (children.type !== React.Fragment) {
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
}
return React.cloneElement(children, props2);
}
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
});
SlotClone.displayName = `${ownerName}.SlotClone`;
return SlotClone;
}
var SLOTTABLE_IDENTIFIER = /* @__PURE__ */ Symbol("radix.slottable");
function createSlottable(ownerName) {
const Slottable2 = ({ children }) => {
return (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children });
};
Slottable2.displayName = `${ownerName}.Slottable`;
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
return Slottable2;
}
var Slottable = createSlottable("Slottable");
function isSlottable(child) {
return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
}
function mergeProps(slotProps, childProps) {
const overrideProps = { ...childProps };
for (const propName in childProps) {
const slotPropValue = slotProps[propName];
const childPropValue = childProps[propName];
const isHandler = /^on[A-Z]/.test(propName);
if (isHandler) {
if (slotPropValue && childPropValue) {
overrideProps[propName] = (...args) => {
const result = childPropValue(...args);
slotPropValue(...args);
return result;
};
} else if (slotPropValue) {
overrideProps[propName] = slotPropValue;
}
} else if (propName === "style") {
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
} else if (propName === "className") {
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
}
}
return { ...slotProps, ...overrideProps };
}
function getElementRef(element) {
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
if (mayWarn) {
return element.ref;
}
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
if (mayWarn) {
return element.props.ref;
}
return element.props.ref || element.ref;
}
export {
createSlot,
Slot,
createSlottable,
Slottable
};
//# sourceMappingURL=chunk-YWBEB5PG.js.map
File diff suppressed because one or more lines are too long
+30 -43
View File
@@ -1056,24 +1056,6 @@ var _invertEase = function _invertEase2(ease) {
return 1 - ease(1 - p); return 1 - ease(1 - p);
}; };
}; };
var _propagateYoyoEase = function _propagateYoyoEase2(timeline2, isYoyo) {
var child = timeline2._first, ease;
while (child) {
if (child instanceof Timeline) {
_propagateYoyoEase2(child, isYoyo);
} else if (child.vars.yoyoEase && (!child._yoyo || !child._repeat) && child._yoyo !== isYoyo) {
if (child.timeline) {
_propagateYoyoEase2(child.timeline, isYoyo);
} else {
ease = child._ease;
child._ease = child._yEase;
child._yEase = ease;
child._yoyo = isYoyo;
}
}
child = child._next;
}
};
var _parseEase = function _parseEase2(ease, defaultEase) { var _parseEase = function _parseEase2(ease, defaultEase) {
return !ease ? defaultEase : (_isFunction(ease) ? ease : _easeMap[ease] || _configEaseFromString(ease)) || defaultEase; return !ease ? defaultEase : (_isFunction(ease) ? ease : _easeMap[ease] || _configEaseFromString(ease)) || defaultEase;
}; };
@@ -1579,7 +1561,6 @@ var Timeline = (function(_Animation) {
if (!this._ts && !prevPaused) { if (!this._ts && !prevPaused) {
return this; return this;
} }
_propagateYoyoEase(this, isYoyo);
} }
} }
if (this._hasPause && !this._forcing && this._lock < 2) { if (this._hasPause && !this._forcing && this._lock < 2) {
@@ -1590,7 +1571,7 @@ var Timeline = (function(_Animation) {
} }
this._tTime = tTime; this._tTime = tTime;
this._time = time; this._time = time;
this._act = !timeScale; this._act = !!timeScale;
if (!this._initted) { if (!this._initted) {
this._onUpdate = this.vars.onUpdate; this._onUpdate = this.vars.onUpdate;
this._initted = 1; this._initted = 1;
@@ -2038,16 +2019,12 @@ var _checkPlugin = function _checkPlugin2(property, vars, tween, index, target,
var _overwritingTween; var _overwritingTween;
var _forceAllPropTweens; var _forceAllPropTweens;
var _initTween = function _initTween2(tween, time, tTime) { var _initTween = function _initTween2(tween, time, tTime) {
var vars = tween.vars, ease = vars.ease, startAt = vars.startAt, immediateRender = vars.immediateRender, lazy = vars.lazy, onUpdate = vars.onUpdate, runBackwards = vars.runBackwards, yoyoEase = vars.yoyoEase, keyframes = vars.keyframes, autoRevert = vars.autoRevert, dur = tween._dur, prevStartAt = tween._startAt, targets = tween._targets, parent = tween.parent, fullTargets = parent && parent.data === "nested" ? parent.vars.targets : targets, autoOverwrite = tween._overwrite === "auto" && !_suppressOverwrites, tl = tween.timeline, cleanVars, i, p, pt, target, hasPriority, gsData, harness, plugin, ptLookup, index, harnessVars, overwritten; var vars = tween.vars, ease = vars.ease, startAt = vars.startAt, immediateRender = vars.immediateRender, lazy = vars.lazy, onUpdate = vars.onUpdate, runBackwards = vars.runBackwards, yoyoEase = vars.yoyoEase, keyframes = vars.keyframes, autoRevert = vars.autoRevert, dur = tween._dur, prevStartAt = tween._startAt, targets = tween._targets, parent = tween.parent, fullTargets = parent && parent.data === "nested" ? parent.vars.targets : targets, autoOverwrite = tween._overwrite === "auto" && !_suppressOverwrites, tl = tween.timeline, reverseEase = vars.easeReverse || yoyoEase, cleanVars, i, p, pt, target, hasPriority, gsData, harness, plugin, ptLookup, index, harnessVars, overwritten;
tl && (!keyframes || !ease) && (ease = "none"); tl && (!keyframes || !ease) && (ease = "none");
tween._ease = _parseEase(ease, _defaults.ease); tween._ease = _parseEase(ease, _defaults.ease);
tween._yEase = yoyoEase ? _invertEase(_parseEase(yoyoEase === true ? ease : yoyoEase, _defaults.ease)) : 0; tween._rEase = reverseEase && (_parseEase(reverseEase) || tween._ease);
if (yoyoEase && tween._yoyo && !tween._repeat) {
yoyoEase = tween._yEase;
tween._yEase = tween._ease;
tween._ease = yoyoEase;
}
tween._from = !tl && !!vars.runBackwards; tween._from = !tl && !!vars.runBackwards;
if (tween._from) tween.ratio = 1;
if (!tl || keyframes && !vars.stagger) { if (!tl || keyframes && !vars.stagger) {
harness = targets[0] ? _getCache(targets[0]).harness : 0; harness = targets[0] ? _getCache(targets[0]).harness : 0;
harnessVars = harness && vars[harness.prop]; harnessVars = harness && vars[harness.prop];
@@ -2166,7 +2143,7 @@ var _updatePropTweens = function _updatePropTweens2(tween, property, value, star
tween.vars[property] = "+=0"; tween.vars[property] = "+=0";
_initTween(tween, time); _initTween(tween, time);
_forceAllPropTweens = 0; _forceAllPropTweens = 0;
return skipRecursion ? _warn(property + " not eligible for reset") : 1; return skipRecursion ? _warn(property + " not eligible for reset. Try splitting into individual properties") : 1;
} }
ptCache.push(pt); ptCache.push(pt);
} }
@@ -2223,7 +2200,7 @@ var _parseKeyframe = function _parseKeyframe2(prop, obj, allProps, easeEach) {
var _parseFuncOrString = function _parseFuncOrString2(value, tween, i, target, targets) { var _parseFuncOrString = function _parseFuncOrString2(value, tween, i, target, targets) {
return _isFunction(value) ? value.call(tween, i, target, targets) : _isString(value) && ~value.indexOf("random(") ? _replaceRandom(value) : value; return _isFunction(value) ? value.call(tween, i, target, targets) : _isString(value) && ~value.indexOf("random(") ? _replaceRandom(value) : value;
}; };
var _staggerTweenProps = _callbackNames + "repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert"; var _staggerTweenProps = _callbackNames + "repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,easeReverse,autoRevert";
var _staggerPropsToSkip = {}; var _staggerPropsToSkip = {};
_forEachName(_staggerTweenProps + ",id,stagger,delay,duration,paused,scrollTrigger", function(name) { _forEachName(_staggerTweenProps + ",id,stagger,delay,duration,paused,scrollTrigger", function(name) {
return _staggerPropsToSkip[name] = 1; return _staggerPropsToSkip[name] = 1;
@@ -2238,12 +2215,13 @@ var Tween = (function(_Animation2) {
position = null; position = null;
} }
_this3 = _Animation2.call(this, skipInherit ? vars : _inheritDefaults(vars)) || this; _this3 = _Animation2.call(this, skipInherit ? vars : _inheritDefaults(vars)) || this;
var _this3$vars = _this3.vars, duration = _this3$vars.duration, delay = _this3$vars.delay, immediateRender = _this3$vars.immediateRender, stagger = _this3$vars.stagger, overwrite = _this3$vars.overwrite, keyframes = _this3$vars.keyframes, defaults2 = _this3$vars.defaults, scrollTrigger = _this3$vars.scrollTrigger, yoyoEase = _this3$vars.yoyoEase, parent = vars.parent || _globalTimeline, parsedTargets = (_isArray(targets) || _isTypedArray(targets) ? _isNumber(targets[0]) : "length" in vars) ? [targets] : toArray(targets), tl, i, copy, l, p, curTarget, staggerFunc, staggerVarsToMerge; var _this3$vars = _this3.vars, duration = _this3$vars.duration, delay = _this3$vars.delay, immediateRender = _this3$vars.immediateRender, stagger = _this3$vars.stagger, overwrite = _this3$vars.overwrite, keyframes = _this3$vars.keyframes, defaults2 = _this3$vars.defaults, scrollTrigger = _this3$vars.scrollTrigger, parent = vars.parent || _globalTimeline, parsedTargets = (_isArray(targets) || _isTypedArray(targets) ? _isNumber(targets[0]) : "length" in vars) ? [targets] : toArray(targets), tl, i, copy, l, p, curTarget, staggerFunc, staggerVarsToMerge;
_this3._targets = parsedTargets.length ? _harness(parsedTargets) : _warn("GSAP target " + targets + " not found. https://gsap.com", !_config.nullTargetWarn) || []; _this3._targets = parsedTargets.length ? _harness(parsedTargets) : _warn("GSAP target " + targets + " not found. https://gsap.com", !_config.nullTargetWarn) || [];
_this3._ptLookup = []; _this3._ptLookup = [];
_this3._overwrite = overwrite; _this3._overwrite = overwrite;
if (keyframes || stagger || _isFuncOrString(duration) || _isFuncOrString(delay)) { if (keyframes || stagger || _isFuncOrString(duration) || _isFuncOrString(delay)) {
vars = _this3.vars; vars = _this3.vars;
var easeReverse = vars.easeReverse || vars.yoyoEase;
tl = _this3.timeline = new Timeline({ tl = _this3.timeline = new Timeline({
data: "nested", data: "nested",
defaults: defaults2 || {}, defaults: defaults2 || {},
@@ -2266,7 +2244,7 @@ var Tween = (function(_Animation2) {
for (i = 0; i < l; i++) { for (i = 0; i < l; i++) {
copy = _copyExcluding(vars, _staggerPropsToSkip); copy = _copyExcluding(vars, _staggerPropsToSkip);
copy.stagger = 0; copy.stagger = 0;
yoyoEase && (copy.yoyoEase = yoyoEase); easeReverse && (copy.easeReverse = easeReverse);
staggerVarsToMerge && _merge(copy, staggerVarsToMerge); staggerVarsToMerge && _merge(copy, staggerVarsToMerge);
curTarget = parsedTargets[i]; curTarget = parsedTargets[i];
copy.duration = +_parseFuncOrString(duration, _assertThisInitialized(_this3), i, curTarget, parsedTargets); copy.duration = +_parseFuncOrString(duration, _assertThisInitialized(_this3), i, curTarget, parsedTargets);
@@ -2338,7 +2316,7 @@ var Tween = (function(_Animation2) {
} }
var _proto3 = Tween2.prototype; var _proto3 = Tween2.prototype;
_proto3.render = function render3(totalTime, suppressEvents, force) { _proto3.render = function render3(totalTime, suppressEvents, force) {
var prevTime = this._time, tDur = this._tDur, dur = this._dur, isNegative = totalTime < 0, tTime = totalTime > tDur - _tinyNum && !isNegative ? tDur : totalTime < _tinyNum ? 0 : totalTime, time, pt, iteration, cycleDuration, prevIteration, isYoyo, ratio, timeline2, yoyoEase; var prevTime = this._time, tDur = this._tDur, dur = this._dur, isNegative = totalTime < 0, tTime = totalTime > tDur - _tinyNum && !isNegative ? tDur : totalTime < _tinyNum ? 0 : totalTime, time, pt, iteration, cycleDuration, prevIteration, isYoyo, ratio, timeline2;
if (!dur) { if (!dur) {
_renderZeroDurationTween(this, totalTime, suppressEvents, force); _renderZeroDurationTween(this, totalTime, suppressEvents, force);
} else if (tTime !== this._tTime || !totalTime || force || !this._initted && this._tTime || this._startAt && this._zTime < 0 !== isNegative || this._lazy) { } else if (tTime !== this._tTime || !totalTime || force || !this._initted && this._tTime || this._startAt && this._zTime < 0 !== isNegative || this._lazy) {
@@ -2364,17 +2342,13 @@ var Tween = (function(_Animation2) {
} }
} }
isYoyo = this._yoyo && iteration & 1; isYoyo = this._yoyo && iteration & 1;
if (isYoyo) { if (isYoyo) time = dur - time;
yoyoEase = this._yEase;
time = dur - time;
}
prevIteration = _animationCycle(this._tTime, cycleDuration); prevIteration = _animationCycle(this._tTime, cycleDuration);
if (time === prevTime && !force && this._initted && iteration === prevIteration) { if (time === prevTime && !force && this._initted && iteration === prevIteration) {
this._tTime = tTime; this._tTime = tTime;
return this; return this;
} }
if (iteration !== prevIteration) { if (iteration !== prevIteration) {
timeline2 && this._yEase && _propagateYoyoEase(timeline2, isYoyo);
if (this.vars.repeatRefresh && !isYoyo && !this._lock && time !== cycleDuration && this._initted) { if (this.vars.repeatRefresh && !isYoyo && !this._lock && time !== cycleDuration && this._initted) {
this._lock = force = 1; this._lock = force = 1;
this.render(_roundPrecise(cycleDuration * iteration), true).invalidate()._lock = 0; this.render(_roundPrecise(cycleDuration * iteration), true).invalidate()._lock = 0;
@@ -2393,16 +2367,29 @@ var Tween = (function(_Animation2) {
return this.render(totalTime, suppressEvents, force); return this.render(totalTime, suppressEvents, force);
} }
} }
if (this._rEase) {
var inv = time < prevTime;
if (inv !== this._inv) {
var segDur = inv ? prevTime : dur - prevTime;
this._inv = inv;
if (this._from) this.ratio = 1 - this.ratio;
this._invRatio = this.ratio;
this._invTime = prevTime;
this._invRecip = segDur ? (inv ? -1 : 1) / segDur : 0;
this._invScale = inv ? -this.ratio : 1 - this.ratio;
this._invEase = inv ? this._rEase : this._ease;
}
this.ratio = ratio = this._invRatio + this._invScale * this._invEase((time - this._invTime) * this._invRecip);
} else {
this.ratio = ratio = this._ease(time / dur);
}
if (this._from) this.ratio = ratio = 1 - ratio;
this._tTime = tTime; this._tTime = tTime;
this._time = time; this._time = time;
if (!this._act && this._ts) { if (!this._act && this._ts) {
this._act = 1; this._act = 1;
this._lazy = 0; this._lazy = 0;
} }
this.ratio = ratio = (yoyoEase || this._ease)(time / dur);
if (this._from) {
this.ratio = ratio = 1 - ratio;
}
if (!prevTime && tTime && !suppressEvents && !prevIteration) { if (!prevTime && tTime && !suppressEvents && !prevIteration) {
_callback(this, "onStart"); _callback(this, "onStart");
if (this._tTime !== tTime) { if (this._tTime !== tTime) {
@@ -2674,7 +2661,7 @@ var PropTween = (function() {
}; };
return PropTween2; return PropTween2;
})(); })();
_forEachName(_callbackNames + "parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger", function(name) { _forEachName(_callbackNames + "parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger,easeReverse", function(name) {
return _reservedProps[name] = 1; return _reservedProps[name] = 1;
}); });
_globals.TweenMax = _globals.TweenLite = Tween; _globals.TweenMax = _globals.TweenLite = Tween;
@@ -3146,7 +3133,7 @@ var gsap = _gsap.registerPlugin({
} }
} }
}, _buildModifierPlugin("roundProps", _roundModifier), _buildModifierPlugin("modifiers"), _buildModifierPlugin("snap", snap)) || _gsap; }, _buildModifierPlugin("roundProps", _roundModifier), _buildModifierPlugin("modifiers"), _buildModifierPlugin("snap", snap)) || _gsap;
Tween.version = Timeline.version = gsap.version = "3.14.2"; Tween.version = Timeline.version = gsap.version = "3.15.0";
_coreReady = 1; _coreReady = 1;
_windowExists() && _wake(); _windowExists() && _wake();
var Power0 = _easeMap.Power0; var Power0 = _easeMap.Power0;
+3 -3
View File
File diff suppressed because one or more lines are too long
+19 -13
View File
@@ -168,7 +168,7 @@ var _getVelocityProp = function _getVelocityProp2(value, minTimeRefresh, useDelt
}; };
}; };
var _getEvent = function _getEvent2(e, preventDefault) { var _getEvent = function _getEvent2(e, preventDefault) {
preventDefault && !e._gsapAllow && e.preventDefault(); preventDefault && !e._gsapAllow && e.cancelable !== false && e.preventDefault();
return e.changedTouches ? e.changedTouches[0] : e; return e.changedTouches ? e.changedTouches[0] : e;
}; };
var _getAbsoluteMax = function _getAbsoluteMax2(a) { var _getAbsoluteMax = function _getAbsoluteMax2(a) {
@@ -196,9 +196,9 @@ var _initCore = function _initCore2(core) {
setTimeout(function() { setTimeout(function() {
return _startup = 0; return _startup = 0;
}, 500); }, 500);
_setScrollTrigger();
_coreInitted = 1; _coreInitted = 1;
} }
ScrollTrigger || _setScrollTrigger();
return _coreInitted; return _coreInitted;
}; };
_horizontal.op = _vertical; _horizontal.op = _vertical;
@@ -468,7 +468,7 @@ var Observer = (function() {
}]); }]);
return Observer2; return Observer2;
})(); })();
Observer.version = "3.14.2"; Observer.version = "3.15.0";
Observer.create = function(vars) { Observer.create = function(vars) {
return new Observer(vars); return new Observer(vars);
}; };
@@ -604,11 +604,11 @@ var _isObject = function _isObject2(value) {
var _endAnimation = function _endAnimation2(animation, reversed, pause) { var _endAnimation = function _endAnimation2(animation, reversed, pause) {
return animation && animation.progress(reversed ? 0 : 1) && pause && animation.pause(); return animation && animation.progress(reversed ? 0 : 1) && pause && animation.pause();
}; };
var _callback = function _callback2(self, func) { var _callback = function _callback2(self, func, extraParam) {
if (self.enabled) { if (self.enabled) {
var result = self._ctx ? self._ctx.add(function() { var result = self._ctx ? self._ctx.add(function() {
return func(self); return func(self, extraParam);
}) : func(self); }) : func(self, extraParam);
result && result.totalTime && (self.callbackAnimation = result); result && result.totalTime && (self.callbackAnimation = result);
} }
}; };
@@ -629,7 +629,7 @@ var _Width = "Width";
var _Height = "Height"; var _Height = "Height";
var _px = "px"; var _px = "px";
var _getComputedStyle = function _getComputedStyle2(element) { var _getComputedStyle = function _getComputedStyle2(element) {
return _win2.getComputedStyle(element); return _win2.getComputedStyle(element.nodeType === Node.DOCUMENT_NODE ? element.scrollingElement : element);
}; };
var _makePositionable = function _makePositionable2(element) { var _makePositionable = function _makePositionable2(element) {
var position = _getComputedStyle(element).position; var position = _getComputedStyle(element).position;
@@ -653,7 +653,7 @@ var _getBounds = function _getBounds2(element, withoutTransforms) {
scale: 1, scale: 1,
skewX: 0, skewX: 0,
skewY: 0 skewY: 0
}).progress(1), bounds = element.getBoundingClientRect(); }).progress(1), bounds = element.getBoundingClientRect ? element.getBoundingClientRect() : element.scrollingElement.getBoundingClientRect();
tween && tween.progress(0).kill(); tween && tween.progress(0).kill();
return bounds; return bounds;
}; };
@@ -768,7 +768,7 @@ var _offsetToPx = function _offsetToPx2(value, size) {
}; };
var _createMarker = function _createMarker2(type, name, container, direction, _ref4, offset, matchWidthEl, containerAnimation) { var _createMarker = function _createMarker2(type, name, container, direction, _ref4, offset, matchWidthEl, containerAnimation) {
var startColor = _ref4.startColor, endColor = _ref4.endColor, fontSize = _ref4.fontSize, indent = _ref4.indent, fontWeight = _ref4.fontWeight; var startColor = _ref4.startColor, endColor = _ref4.endColor, fontSize = _ref4.fontSize, indent = _ref4.indent, fontWeight = _ref4.fontWeight;
var e = _doc2.createElement("div"), useFixedPosition = _isViewport3(container) || _getProxyProp(container, "pinType") === "fixed", isScroller = type.indexOf("scroller") !== -1, parent = useFixedPosition ? _body2 : container, isStart = type.indexOf("start") !== -1, color = isStart ? startColor : endColor, css = "border-color:" + color + ";font-size:" + fontSize + ";color:" + color + ";font-weight:" + fontWeight + ";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;"; var e = _doc2.createElement("div"), useFixedPosition = _isViewport3(container) || _getProxyProp(container, "pinType") === "fixed", isScroller = type.indexOf("scroller") !== -1, parent = useFixedPosition ? _body2 : container.tagName === "IFRAME" ? container.contentDocument.body : container, isStart = type.indexOf("start") !== -1, color = isStart ? startColor : endColor, css = "border-color:" + color + ";font-size:" + fontSize + ";color:" + color + ";font-weight:" + fontWeight + ";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;";
css += "position:" + ((isScroller || containerAnimation) && useFixedPosition ? "fixed;" : "absolute;"); css += "position:" + ((isScroller || containerAnimation) && useFixedPosition ? "fixed;" : "absolute;");
(isScroller || containerAnimation || !useFixedPosition) && (css += (direction === _vertical ? _right : _bottom) + ":" + (offset + parseFloat(indent)) + "px;"); (isScroller || containerAnimation || !useFixedPosition) && (css += (direction === _vertical ? _right : _bottom) + ":" + (offset + parseFloat(indent)) + "px;");
matchWidthEl && (css += "box-sizing:border-box;text-align:left;width:" + matchWidthEl.offsetWidth + "px;"); matchWidthEl && (css += "box-sizing:border-box;text-align:left;width:" + matchWidthEl.offsetWidth + "px;");
@@ -1293,7 +1293,7 @@ var ScrollTrigger2 = (function() {
data: _abs(endScroll - scroll), data: _abs(endScroll - scroll),
// record the distance so that if another snap tween occurs (conflict) we can prioritize the closest snap. // record the distance so that if another snap tween occurs (conflict) we can prioritize the closest snap.
onInterrupt: function onInterrupt() { onInterrupt: function onInterrupt() {
return snapDelayedCall.restart(true) && _onInterrupt && _onInterrupt(self); return snapDelayedCall.restart(true) && _onInterrupt && _callback(self, _onInterrupt);
}, },
onComplete: function onComplete() { onComplete: function onComplete() {
self.update(); self.update();
@@ -1303,10 +1303,10 @@ var ScrollTrigger2 = (function() {
} }
snap1 = snap2 = animation && !isToggle ? animation.totalProgress() : self.progress; snap1 = snap2 = animation && !isToggle ? animation.totalProgress() : self.progress;
onSnapComplete && onSnapComplete(self); onSnapComplete && onSnapComplete(self);
_onComplete && _onComplete(self); _onComplete && _callback(self, _onComplete);
} }
}, scroll, change1 * change, endScroll - scroll - change1 * change); }, scroll, change1 * change, endScroll - scroll - change1 * change);
onStart && onStart(self, tweenTo.tween); onStart && _callback(self, onStart, tweenTo.tween);
} }
} else if (self.isActive && lastSnap !== scroll) { } else if (self.isActive && lastSnap !== scroll) {
snapDelayedCall.restart(true); snapDelayedCall.restart(true);
@@ -2000,6 +2000,12 @@ var ScrollTrigger2 = (function() {
_wheelListener(_removeListener3, _scrollers[i], _scrollers[i + 1]); _wheelListener(_removeListener3, _scrollers[i], _scrollers[i + 1]);
_wheelListener(_removeListener3, _scrollers[i], _scrollers[i + 2]); _wheelListener(_removeListener3, _scrollers[i], _scrollers[i + 2]);
} }
} else if (_doc2) {
var onLoad = function onLoad2() {
ScrollTrigger3.enable();
_doc2.removeEventListener("DOMContentLoaded", onLoad2);
};
_doc2.addEventListener("DOMContentLoaded", onLoad);
} }
} }
}; };
@@ -2050,7 +2056,7 @@ var ScrollTrigger2 = (function() {
}; };
return ScrollTrigger3; return ScrollTrigger3;
})(); })();
ScrollTrigger2.version = "3.14.2"; ScrollTrigger2.version = "3.15.0";
ScrollTrigger2.saveStyles = function(targets) { ScrollTrigger2.saveStyles = function(targets) {
return targets ? _toArray(targets).forEach(function(target) { return targets ? _toArray(targets).forEach(function(target) {
if (target && target.style) { if (target && target.style) {
+3 -3
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,6 +1,6 @@
import { import {
require_react require_react
} from "./chunk-WUR7D6NS.js"; } from "./chunk-42LCURWG.js";
import { import {
__export, __export,
__toESM __toESM
+2 -2
View File
@@ -1,6 +1,6 @@
import { import {
require_react_dom require_react_dom
} from "./chunk-YF4B4G2L.js"; } from "./chunk-UEHR66ST.js";
import "./chunk-WUR7D6NS.js"; import "./chunk-42LCURWG.js";
import "./chunk-G3PMV62Z.js"; import "./chunk-G3PMV62Z.js";
export default require_react_dom(); export default require_react_dom();
+7 -7
View File
@@ -1,9 +1,9 @@
import { import {
require_react_dom require_react_dom
} from "./chunk-YF4B4G2L.js"; } from "./chunk-UEHR66ST.js";
import { import {
require_react require_react
} from "./chunk-WUR7D6NS.js"; } from "./chunk-42LCURWG.js";
import { import {
__commonJS __commonJS
} from "./chunk-G3PMV62Z.js"; } from "./chunk-G3PMV62Z.js";
@@ -20052,9 +20052,9 @@ var require_react_dom_client_development = __commonJS({
}; };
(function() { (function() {
var isomorphicReactPackageVersion = React.version; var isomorphicReactPackageVersion = React.version;
if ("19.2.3" !== isomorphicReactPackageVersion) if ("19.2.7" !== isomorphicReactPackageVersion)
throw Error( throw Error(
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + "\n - react-dom: 19.2.3\nLearn more: https://react.dev/warnings/version-mismatch") 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + "\n - react-dom: 19.2.7\nLearn more: https://react.dev/warnings/version-mismatch")
); );
})(); })();
"function" === typeof Map && null != Map.prototype && "function" === typeof Map.prototype.forEach && "function" === typeof Set && null != Set.prototype && "function" === typeof Set.prototype.clear && "function" === typeof Set.prototype.forEach || console.error( "function" === typeof Map && null != Map.prototype && "function" === typeof Map.prototype.forEach && "function" === typeof Set && null != Set.prototype && "function" === typeof Set.prototype.clear && "function" === typeof Set.prototype.forEach || console.error(
@@ -20078,10 +20078,10 @@ var require_react_dom_client_development = __commonJS({
if (!(function() { if (!(function() {
var internals = { var internals = {
bundleType: 1, bundleType: 1,
version: "19.2.3", version: "19.2.7",
rendererPackageName: "react-dom", rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals, currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.3" reconcilerVersion: "19.2.7"
}; };
internals.overrideHookState = overrideHookState; internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath; internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -20172,7 +20172,7 @@ var require_react_dom_client_development = __commonJS({
listenToAllSupportedEvents(container); listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren); return new ReactDOMHydrationRoot(initialChildren);
}; };
exports.version = "19.2.3"; exports.version = "19.2.7";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error()); "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
})(); })();
} }
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,6 +1,6 @@
import { import {
require_react require_react
} from "./chunk-WUR7D6NS.js"; } from "./chunk-42LCURWG.js";
import { import {
__commonJS, __commonJS,
__toESM __toESM
+158 -13987
View File
File diff suppressed because it is too large Load Diff
+4 -4
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,5 +1,5 @@
import { import {
require_react require_react
} from "./chunk-WUR7D6NS.js"; } from "./chunk-42LCURWG.js";
import "./chunk-G3PMV62Z.js"; import "./chunk-G3PMV62Z.js";
export default require_react(); export default require_react();
+1 -1
View File
@@ -1,6 +1,6 @@
import { import {
require_react require_react
} from "./chunk-WUR7D6NS.js"; } from "./chunk-42LCURWG.js";
import { import {
__commonJS __commonJS
} from "./chunk-G3PMV62Z.js"; } from "./chunk-G3PMV62Z.js";
+2 -2
View File
@@ -1,6 +1,6 @@
import { import {
require_jsx_runtime require_jsx_runtime
} from "./chunk-2YVA4HRZ.js"; } from "./chunk-LPULNKJF.js";
import "./chunk-WUR7D6NS.js"; import "./chunk-42LCURWG.js";
import "./chunk-G3PMV62Z.js"; import "./chunk-G3PMV62Z.js";
export default require_jsx_runtime(); export default require_jsx_runtime();
+292 -41
View File
@@ -305,15 +305,27 @@ var createConfigUtils = (config) => ({
cache: createLruCache(config.cacheSize), cache: createLruCache(config.cacheSize),
parseClassName: createParseClassName(config), parseClassName: createParseClassName(config),
sortModifiers: createSortModifiers(config), sortModifiers: createSortModifiers(config),
postfixLookupClassGroupIds: createPostfixLookupClassGroupIds(config),
...createClassGroupUtils(config) ...createClassGroupUtils(config)
}); });
var createPostfixLookupClassGroupIds = (config) => {
const lookup = /* @__PURE__ */ Object.create(null);
const classGroupIds = config.postfixLookupClassGroups;
if (classGroupIds) {
for (let i = 0; i < classGroupIds.length; i++) {
lookup[classGroupIds[i]] = true;
}
}
return lookup;
};
var SPLIT_CLASSES_REGEX = /\s+/; var SPLIT_CLASSES_REGEX = /\s+/;
var mergeClassList = (classList, configUtils) => { var mergeClassList = (classList, configUtils) => {
const { const {
parseClassName, parseClassName,
getClassGroupId, getClassGroupId,
getConflictingClassGroupIds, getConflictingClassGroupIds,
sortModifiers sortModifiers,
postfixLookupClassGroupIds
} = configUtils; } = configUtils;
const classGroupsInConflict = []; const classGroupsInConflict = [];
const classNames = classList.trim().split(SPLIT_CLASSES_REGEX); const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);
@@ -332,7 +344,18 @@ var mergeClassList = (classList, configUtils) => {
continue; continue;
} }
let hasPostfixModifier = !!maybePostfixModifierPosition; let hasPostfixModifier = !!maybePostfixModifierPosition;
let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName); let classGroupId;
if (hasPostfixModifier) {
const baseClassNameWithoutPostfix = baseClassName.substring(0, maybePostfixModifierPosition);
classGroupId = getClassGroupId(baseClassNameWithoutPostfix);
const classGroupIdWithPostfix = classGroupId && postfixLookupClassGroupIds[classGroupId] ? getClassGroupId(baseClassName) : void 0;
if (classGroupIdWithPostfix && classGroupIdWithPostfix !== classGroupId) {
classGroupId = classGroupIdWithPostfix;
hasPostfixModifier = false;
}
} else {
classGroupId = getClassGroupId(baseClassName);
}
if (!classGroupId) { if (!classGroupId) {
if (!hasPostfixModifier) { if (!hasPostfixModifier) {
result = originalClassName + (result.length > 0 ? " " + result : result); result = originalClassName + (result.length > 0 ? " " + result : result);
@@ -425,7 +448,7 @@ var fromTheme = (key) => {
}; };
var arbitraryValueRegex = /^\[(?:(\w[\w-]*):)?(.+)\]$/i; var arbitraryValueRegex = /^\[(?:(\w[\w-]*):)?(.+)\]$/i;
var arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i; var arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i;
var fractionRegex = /^\d+\/\d+$/; var fractionRegex = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/;
var tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/; var tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
var lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/; var lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/;
var colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/; var colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/;
@@ -447,10 +470,13 @@ var isNever = () => false;
var isShadow = (value) => shadowRegex.test(value); var isShadow = (value) => shadowRegex.test(value);
var isImage = (value) => imageRegex.test(value); var isImage = (value) => imageRegex.test(value);
var isAnyNonArbitrary = (value) => !isArbitraryValue(value) && !isArbitraryVariable(value); var isAnyNonArbitrary = (value) => !isArbitraryValue(value) && !isArbitraryVariable(value);
var isNamedContainerQuery = (value) => value.startsWith("@container") && (value[10] === "/" && value[11] !== void 0 || value[11] === "s" && value[16] !== void 0 && value.startsWith("-size/", 10) || value[11] === "n" && value[18] !== void 0 && value.startsWith("-normal/", 10));
var isArbitrarySize = (value) => getIsArbitraryValue(value, isLabelSize, isNever); var isArbitrarySize = (value) => getIsArbitraryValue(value, isLabelSize, isNever);
var isArbitraryValue = (value) => arbitraryValueRegex.test(value); var isArbitraryValue = (value) => arbitraryValueRegex.test(value);
var isArbitraryLength = (value) => getIsArbitraryValue(value, isLabelLength, isLengthOnly); var isArbitraryLength = (value) => getIsArbitraryValue(value, isLabelLength, isLengthOnly);
var isArbitraryNumber = (value) => getIsArbitraryValue(value, isLabelNumber, isNumber); var isArbitraryNumber = (value) => getIsArbitraryValue(value, isLabelNumber, isNumber);
var isArbitraryWeight = (value) => getIsArbitraryValue(value, isLabelWeight, isAny);
var isArbitraryFamilyName = (value) => getIsArbitraryValue(value, isLabelFamilyName, isNever);
var isArbitraryPosition = (value) => getIsArbitraryValue(value, isLabelPosition, isNever); var isArbitraryPosition = (value) => getIsArbitraryValue(value, isLabelPosition, isNever);
var isArbitraryImage = (value) => getIsArbitraryValue(value, isLabelImage, isImage); var isArbitraryImage = (value) => getIsArbitraryValue(value, isLabelImage, isImage);
var isArbitraryShadow = (value) => getIsArbitraryValue(value, isLabelShadow, isShadow); var isArbitraryShadow = (value) => getIsArbitraryValue(value, isLabelShadow, isShadow);
@@ -461,6 +487,7 @@ var isArbitraryVariablePosition = (value) => getIsArbitraryVariable(value, isLab
var isArbitraryVariableSize = (value) => getIsArbitraryVariable(value, isLabelSize); var isArbitraryVariableSize = (value) => getIsArbitraryVariable(value, isLabelSize);
var isArbitraryVariableImage = (value) => getIsArbitraryVariable(value, isLabelImage); var isArbitraryVariableImage = (value) => getIsArbitraryVariable(value, isLabelImage);
var isArbitraryVariableShadow = (value) => getIsArbitraryVariable(value, isLabelShadow, true); var isArbitraryVariableShadow = (value) => getIsArbitraryVariable(value, isLabelShadow, true);
var isArbitraryVariableWeight = (value) => getIsArbitraryVariable(value, isLabelWeight, true);
var getIsArbitraryValue = (value, testLabel, testValue) => { var getIsArbitraryValue = (value, testLabel, testValue) => {
const result = arbitraryValueRegex.exec(value); const result = arbitraryValueRegex.exec(value);
if (result) { if (result) {
@@ -487,11 +514,13 @@ var isLabelSize = (label) => label === "length" || label === "size" || label ===
var isLabelLength = (label) => label === "length"; var isLabelLength = (label) => label === "length";
var isLabelNumber = (label) => label === "number"; var isLabelNumber = (label) => label === "number";
var isLabelFamilyName = (label) => label === "family-name"; var isLabelFamilyName = (label) => label === "family-name";
var isLabelWeight = (label) => label === "number" || label === "weight";
var isLabelShadow = (label) => label === "shadow"; var isLabelShadow = (label) => label === "shadow";
var validators = Object.defineProperty({ var validators = Object.defineProperty({
__proto__: null, __proto__: null,
isAny, isAny,
isAnyNonArbitrary, isAnyNonArbitrary,
isArbitraryFamilyName,
isArbitraryImage, isArbitraryImage,
isArbitraryLength, isArbitraryLength,
isArbitraryNumber, isArbitraryNumber,
@@ -506,8 +535,11 @@ var validators = Object.defineProperty({
isArbitraryVariablePosition, isArbitraryVariablePosition,
isArbitraryVariableShadow, isArbitraryVariableShadow,
isArbitraryVariableSize, isArbitraryVariableSize,
isArbitraryVariableWeight,
isArbitraryWeight,
isFraction, isFraction,
isInteger, isInteger,
isNamedContainerQuery,
isNumber, isNumber,
isPercent, isPercent,
isTshirtSize isTshirtSize
@@ -569,6 +601,8 @@ var getDefaultConfig = () => {
const scaleAlignSecondaryAxis = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"]; const scaleAlignSecondaryAxis = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"];
const scaleMargin = () => ["auto", ...scaleUnambiguousSpacing()]; const scaleMargin = () => ["auto", ...scaleUnambiguousSpacing()];
const scaleSizing = () => [isFraction, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...scaleUnambiguousSpacing()]; const scaleSizing = () => [isFraction, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...scaleUnambiguousSpacing()];
const scaleSizingInline = () => [isFraction, "screen", "full", "dvw", "lvw", "svw", "min", "max", "fit", ...scaleUnambiguousSpacing()];
const scaleSizingBlock = () => [isFraction, "screen", "full", "lh", "dvh", "lvh", "svh", "min", "max", "fit", ...scaleUnambiguousSpacing()];
const scaleColor = () => [themeColor, isArbitraryVariable, isArbitraryValue]; const scaleColor = () => [themeColor, isArbitraryVariable, isArbitraryValue];
const scaleBgPosition = () => [...scalePosition(), isArbitraryVariablePosition, isArbitraryPosition, { const scaleBgPosition = () => [...scalePosition(), isArbitraryVariablePosition, isArbitraryPosition, {
position: [isArbitraryVariable, isArbitraryValue] position: [isArbitraryVariable, isArbitraryValue]
@@ -645,6 +679,18 @@ var getDefaultConfig = () => {
* @deprecated since Tailwind CSS v4.0.0 * @deprecated since Tailwind CSS v4.0.0
*/ */
container: ["container"], container: ["container"],
/**
* Container Type
* @see https://tailwindcss.com/docs/responsive-design#container-queries
*/
"container-type": [{
"@container": ["", "normal", "size", isArbitraryVariable, isArbitraryValue]
}],
/**
* Container Name
* @see https://tailwindcss.com/docs/responsive-design#named-containers
*/
"container-named": [isNamedContainerQuery],
/** /**
* Columns * Columns
* @see https://tailwindcss.com/docs/columns * @see https://tailwindcss.com/docs/columns
@@ -778,40 +824,66 @@ var getDefaultConfig = () => {
*/ */
position: ["static", "fixed", "absolute", "relative", "sticky"], position: ["static", "fixed", "absolute", "relative", "sticky"],
/** /**
* Top / Right / Bottom / Left * Inset
* @see https://tailwindcss.com/docs/top-right-bottom-left * @see https://tailwindcss.com/docs/top-right-bottom-left
*/ */
inset: [{ inset: [{
inset: scaleInset() inset: scaleInset()
}], }],
/** /**
* Right / Left * Inset Inline
* @see https://tailwindcss.com/docs/top-right-bottom-left * @see https://tailwindcss.com/docs/top-right-bottom-left
*/ */
"inset-x": [{ "inset-x": [{
"inset-x": scaleInset() "inset-x": scaleInset()
}], }],
/** /**
* Top / Bottom * Inset Block
* @see https://tailwindcss.com/docs/top-right-bottom-left * @see https://tailwindcss.com/docs/top-right-bottom-left
*/ */
"inset-y": [{ "inset-y": [{
"inset-y": scaleInset() "inset-y": scaleInset()
}], }],
/** /**
* Start * Inset Inline Start
* @see https://tailwindcss.com/docs/top-right-bottom-left * @see https://tailwindcss.com/docs/top-right-bottom-left
* @todo class group will be renamed to `inset-s` in next major release
*/ */
start: [{ start: [{
"inset-s": scaleInset(),
/**
* @deprecated since Tailwind CSS v4.2.0 in favor of `inset-s-*` utilities.
* @see https://github.com/tailwindlabs/tailwindcss/pull/19613
*/
start: scaleInset() start: scaleInset()
}], }],
/** /**
* End * Inset Inline End
* @see https://tailwindcss.com/docs/top-right-bottom-left * @see https://tailwindcss.com/docs/top-right-bottom-left
* @todo class group will be renamed to `inset-e` in next major release
*/ */
end: [{ end: [{
"inset-e": scaleInset(),
/**
* @deprecated since Tailwind CSS v4.2.0 in favor of `inset-e-*` utilities.
* @see https://github.com/tailwindlabs/tailwindcss/pull/19613
*/
end: scaleInset() end: scaleInset()
}], }],
/**
* Inset Block Start
* @see https://tailwindcss.com/docs/top-right-bottom-left
*/
"inset-bs": [{
"inset-bs": scaleInset()
}],
/**
* Inset Block End
* @see https://tailwindcss.com/docs/top-right-bottom-left
*/
"inset-be": [{
"inset-be": scaleInset()
}],
/** /**
* Top * Top
* @see https://tailwindcss.com/docs/top-right-bottom-left * @see https://tailwindcss.com/docs/top-right-bottom-left
@@ -1078,33 +1150,47 @@ var getDefaultConfig = () => {
p: scaleUnambiguousSpacing() p: scaleUnambiguousSpacing()
}], }],
/** /**
* Padding X * Padding Inline
* @see https://tailwindcss.com/docs/padding * @see https://tailwindcss.com/docs/padding
*/ */
px: [{ px: [{
px: scaleUnambiguousSpacing() px: scaleUnambiguousSpacing()
}], }],
/** /**
* Padding Y * Padding Block
* @see https://tailwindcss.com/docs/padding * @see https://tailwindcss.com/docs/padding
*/ */
py: [{ py: [{
py: scaleUnambiguousSpacing() py: scaleUnambiguousSpacing()
}], }],
/** /**
* Padding Start * Padding Inline Start
* @see https://tailwindcss.com/docs/padding * @see https://tailwindcss.com/docs/padding
*/ */
ps: [{ ps: [{
ps: scaleUnambiguousSpacing() ps: scaleUnambiguousSpacing()
}], }],
/** /**
* Padding End * Padding Inline End
* @see https://tailwindcss.com/docs/padding * @see https://tailwindcss.com/docs/padding
*/ */
pe: [{ pe: [{
pe: scaleUnambiguousSpacing() pe: scaleUnambiguousSpacing()
}], }],
/**
* Padding Block Start
* @see https://tailwindcss.com/docs/padding
*/
pbs: [{
pbs: scaleUnambiguousSpacing()
}],
/**
* Padding Block End
* @see https://tailwindcss.com/docs/padding
*/
pbe: [{
pbe: scaleUnambiguousSpacing()
}],
/** /**
* Padding Top * Padding Top
* @see https://tailwindcss.com/docs/padding * @see https://tailwindcss.com/docs/padding
@@ -1141,33 +1227,47 @@ var getDefaultConfig = () => {
m: scaleMargin() m: scaleMargin()
}], }],
/** /**
* Margin X * Margin Inline
* @see https://tailwindcss.com/docs/margin * @see https://tailwindcss.com/docs/margin
*/ */
mx: [{ mx: [{
mx: scaleMargin() mx: scaleMargin()
}], }],
/** /**
* Margin Y * Margin Block
* @see https://tailwindcss.com/docs/margin * @see https://tailwindcss.com/docs/margin
*/ */
my: [{ my: [{
my: scaleMargin() my: scaleMargin()
}], }],
/** /**
* Margin Start * Margin Inline Start
* @see https://tailwindcss.com/docs/margin * @see https://tailwindcss.com/docs/margin
*/ */
ms: [{ ms: [{
ms: scaleMargin() ms: scaleMargin()
}], }],
/** /**
* Margin End * Margin Inline End
* @see https://tailwindcss.com/docs/margin * @see https://tailwindcss.com/docs/margin
*/ */
me: [{ me: [{
me: scaleMargin() me: scaleMargin()
}], }],
/**
* Margin Block Start
* @see https://tailwindcss.com/docs/margin
*/
mbs: [{
mbs: scaleMargin()
}],
/**
* Margin Block End
* @see https://tailwindcss.com/docs/margin
*/
mbe: [{
mbe: scaleMargin()
}],
/** /**
* Margin Top * Margin Top
* @see https://tailwindcss.com/docs/margin * @see https://tailwindcss.com/docs/margin
@@ -1230,6 +1330,48 @@ var getDefaultConfig = () => {
size: [{ size: [{
size: scaleSizing() size: scaleSizing()
}], }],
/**
* Inline Size
* @see https://tailwindcss.com/docs/width
*/
"inline-size": [{
inline: ["auto", ...scaleSizingInline()]
}],
/**
* Min-Inline Size
* @see https://tailwindcss.com/docs/min-width
*/
"min-inline-size": [{
"min-inline": ["auto", ...scaleSizingInline()]
}],
/**
* Max-Inline Size
* @see https://tailwindcss.com/docs/max-width
*/
"max-inline-size": [{
"max-inline": ["none", ...scaleSizingInline()]
}],
/**
* Block Size
* @see https://tailwindcss.com/docs/height
*/
"block-size": [{
block: ["auto", ...scaleSizingBlock()]
}],
/**
* Min-Block Size
* @see https://tailwindcss.com/docs/min-height
*/
"min-block-size": [{
"min-block": ["auto", ...scaleSizingBlock()]
}],
/**
* Max-Block Size
* @see https://tailwindcss.com/docs/max-height
*/
"max-block-size": [{
"max-block": ["none", ...scaleSizingBlock()]
}],
/** /**
* Width * Width
* @see https://tailwindcss.com/docs/width * @see https://tailwindcss.com/docs/width
@@ -1314,7 +1456,7 @@ var getDefaultConfig = () => {
* @see https://tailwindcss.com/docs/font-weight * @see https://tailwindcss.com/docs/font-weight
*/ */
"font-weight": [{ "font-weight": [{
font: [themeFontWeight, isArbitraryVariable, isArbitraryNumber] font: [themeFontWeight, isArbitraryVariableWeight, isArbitraryWeight]
}], }],
/** /**
* Font Stretch * Font Stretch
@@ -1328,7 +1470,14 @@ var getDefaultConfig = () => {
* @see https://tailwindcss.com/docs/font-family * @see https://tailwindcss.com/docs/font-family
*/ */
"font-family": [{ "font-family": [{
font: [isArbitraryVariableFamilyName, isArbitraryValue, themeFont] font: [isArbitraryVariableFamilyName, isArbitraryFamilyName, themeFont]
}],
/**
* Font Feature Settings
* @see https://tailwindcss.com/docs/font-feature-settings
*/
"font-features": [{
"font-features": [isArbitraryValue]
}], }],
/** /**
* Font Variant Numeric * Font Variant Numeric
@@ -1485,6 +1634,13 @@ var getDefaultConfig = () => {
indent: [{ indent: [{
indent: scaleUnambiguousSpacing() indent: scaleUnambiguousSpacing()
}], }],
/**
* Tab Size
* @see https://tailwindcss.com/docs/tab-size
*/
"tab-size": [{
tab: [isInteger, isArbitraryVariable, isArbitraryValue]
}],
/** /**
* Vertical Alignment * Vertical Alignment
* @see https://tailwindcss.com/docs/vertical-align * @see https://tailwindcss.com/docs/vertical-align
@@ -1750,33 +1906,47 @@ var getDefaultConfig = () => {
border: scaleBorderWidth() border: scaleBorderWidth()
}], }],
/** /**
* Border Width X * Border Width Inline
* @see https://tailwindcss.com/docs/border-width * @see https://tailwindcss.com/docs/border-width
*/ */
"border-w-x": [{ "border-w-x": [{
"border-x": scaleBorderWidth() "border-x": scaleBorderWidth()
}], }],
/** /**
* Border Width Y * Border Width Block
* @see https://tailwindcss.com/docs/border-width * @see https://tailwindcss.com/docs/border-width
*/ */
"border-w-y": [{ "border-w-y": [{
"border-y": scaleBorderWidth() "border-y": scaleBorderWidth()
}], }],
/** /**
* Border Width Start * Border Width Inline Start
* @see https://tailwindcss.com/docs/border-width * @see https://tailwindcss.com/docs/border-width
*/ */
"border-w-s": [{ "border-w-s": [{
"border-s": scaleBorderWidth() "border-s": scaleBorderWidth()
}], }],
/** /**
* Border Width End * Border Width Inline End
* @see https://tailwindcss.com/docs/border-width * @see https://tailwindcss.com/docs/border-width
*/ */
"border-w-e": [{ "border-w-e": [{
"border-e": scaleBorderWidth() "border-e": scaleBorderWidth()
}], }],
/**
* Border Width Block Start
* @see https://tailwindcss.com/docs/border-width
*/
"border-w-bs": [{
"border-bs": scaleBorderWidth()
}],
/**
* Border Width Block End
* @see https://tailwindcss.com/docs/border-width
*/
"border-w-be": [{
"border-be": scaleBorderWidth()
}],
/** /**
* Border Width Top * Border Width Top
* @see https://tailwindcss.com/docs/border-width * @see https://tailwindcss.com/docs/border-width
@@ -1851,33 +2021,47 @@ var getDefaultConfig = () => {
border: scaleColor() border: scaleColor()
}], }],
/** /**
* Border Color X * Border Color Inline
* @see https://tailwindcss.com/docs/border-color * @see https://tailwindcss.com/docs/border-color
*/ */
"border-color-x": [{ "border-color-x": [{
"border-x": scaleColor() "border-x": scaleColor()
}], }],
/** /**
* Border Color Y * Border Color Block
* @see https://tailwindcss.com/docs/border-color * @see https://tailwindcss.com/docs/border-color
*/ */
"border-color-y": [{ "border-color-y": [{
"border-y": scaleColor() "border-y": scaleColor()
}], }],
/** /**
* Border Color S * Border Color Inline Start
* @see https://tailwindcss.com/docs/border-color * @see https://tailwindcss.com/docs/border-color
*/ */
"border-color-s": [{ "border-color-s": [{
"border-s": scaleColor() "border-s": scaleColor()
}], }],
/** /**
* Border Color E * Border Color Inline End
* @see https://tailwindcss.com/docs/border-color * @see https://tailwindcss.com/docs/border-color
*/ */
"border-color-e": [{ "border-color-e": [{
"border-e": scaleColor() "border-e": scaleColor()
}], }],
/**
* Border Color Block Start
* @see https://tailwindcss.com/docs/border-color
*/
"border-color-bs": [{
"border-bs": scaleColor()
}],
/**
* Border Color Block End
* @see https://tailwindcss.com/docs/border-color
*/
"border-color-be": [{
"border-be": scaleColor()
}],
/** /**
* Border Color Top * Border Color Top
* @see https://tailwindcss.com/docs/border-color * @see https://tailwindcss.com/docs/border-color
@@ -2682,6 +2866,13 @@ var getDefaultConfig = () => {
* @see https://tailwindcss.com/docs/translate * @see https://tailwindcss.com/docs/translate
*/ */
"translate-none": ["translate-none"], "translate-none": ["translate-none"],
/**
* Zoom
* @see https://tailwindcss.com/docs/zoom
*/
zoom: [{
zoom: [isInteger, isArbitraryVariable, isArbitraryValue]
}],
// --------------------- // ---------------------
// --- Interactivity --- // --- Interactivity ---
// --------------------- // ---------------------
@@ -2748,6 +2939,34 @@ var getDefaultConfig = () => {
"scroll-behavior": [{ "scroll-behavior": [{
scroll: ["auto", "smooth"] scroll: ["auto", "smooth"]
}], }],
/**
* Scrollbar Thumb Color
* @see https://tailwindcss.com/docs/scrollbar-color
*/
"scrollbar-thumb-color": [{
"scrollbar-thumb": scaleColor()
}],
/**
* Scrollbar Track Color
* @see https://tailwindcss.com/docs/scrollbar-color
*/
"scrollbar-track-color": [{
"scrollbar-track": scaleColor()
}],
/**
* Scrollbar Gutter
* @see https://tailwindcss.com/docs/scrollbar-gutter
*/
"scrollbar-gutter": [{
"scrollbar-gutter": ["auto", "stable", "both"]
}],
/**
* Scrollbar Width
* @see https://tailwindcss.com/docs/scrollbar-width
*/
"scrollbar-w": [{
scrollbar: ["auto", "thin", "none"]
}],
/** /**
* Scroll Margin * Scroll Margin
* @see https://tailwindcss.com/docs/scroll-margin * @see https://tailwindcss.com/docs/scroll-margin
@@ -2756,33 +2975,47 @@ var getDefaultConfig = () => {
"scroll-m": scaleUnambiguousSpacing() "scroll-m": scaleUnambiguousSpacing()
}], }],
/** /**
* Scroll Margin X * Scroll Margin Inline
* @see https://tailwindcss.com/docs/scroll-margin * @see https://tailwindcss.com/docs/scroll-margin
*/ */
"scroll-mx": [{ "scroll-mx": [{
"scroll-mx": scaleUnambiguousSpacing() "scroll-mx": scaleUnambiguousSpacing()
}], }],
/** /**
* Scroll Margin Y * Scroll Margin Block
* @see https://tailwindcss.com/docs/scroll-margin * @see https://tailwindcss.com/docs/scroll-margin
*/ */
"scroll-my": [{ "scroll-my": [{
"scroll-my": scaleUnambiguousSpacing() "scroll-my": scaleUnambiguousSpacing()
}], }],
/** /**
* Scroll Margin Start * Scroll Margin Inline Start
* @see https://tailwindcss.com/docs/scroll-margin * @see https://tailwindcss.com/docs/scroll-margin
*/ */
"scroll-ms": [{ "scroll-ms": [{
"scroll-ms": scaleUnambiguousSpacing() "scroll-ms": scaleUnambiguousSpacing()
}], }],
/** /**
* Scroll Margin End * Scroll Margin Inline End
* @see https://tailwindcss.com/docs/scroll-margin * @see https://tailwindcss.com/docs/scroll-margin
*/ */
"scroll-me": [{ "scroll-me": [{
"scroll-me": scaleUnambiguousSpacing() "scroll-me": scaleUnambiguousSpacing()
}], }],
/**
* Scroll Margin Block Start
* @see https://tailwindcss.com/docs/scroll-margin
*/
"scroll-mbs": [{
"scroll-mbs": scaleUnambiguousSpacing()
}],
/**
* Scroll Margin Block End
* @see https://tailwindcss.com/docs/scroll-margin
*/
"scroll-mbe": [{
"scroll-mbe": scaleUnambiguousSpacing()
}],
/** /**
* Scroll Margin Top * Scroll Margin Top
* @see https://tailwindcss.com/docs/scroll-margin * @see https://tailwindcss.com/docs/scroll-margin
@@ -2819,33 +3052,47 @@ var getDefaultConfig = () => {
"scroll-p": scaleUnambiguousSpacing() "scroll-p": scaleUnambiguousSpacing()
}], }],
/** /**
* Scroll Padding X * Scroll Padding Inline
* @see https://tailwindcss.com/docs/scroll-padding * @see https://tailwindcss.com/docs/scroll-padding
*/ */
"scroll-px": [{ "scroll-px": [{
"scroll-px": scaleUnambiguousSpacing() "scroll-px": scaleUnambiguousSpacing()
}], }],
/** /**
* Scroll Padding Y * Scroll Padding Block
* @see https://tailwindcss.com/docs/scroll-padding * @see https://tailwindcss.com/docs/scroll-padding
*/ */
"scroll-py": [{ "scroll-py": [{
"scroll-py": scaleUnambiguousSpacing() "scroll-py": scaleUnambiguousSpacing()
}], }],
/** /**
* Scroll Padding Start * Scroll Padding Inline Start
* @see https://tailwindcss.com/docs/scroll-padding * @see https://tailwindcss.com/docs/scroll-padding
*/ */
"scroll-ps": [{ "scroll-ps": [{
"scroll-ps": scaleUnambiguousSpacing() "scroll-ps": scaleUnambiguousSpacing()
}], }],
/** /**
* Scroll Padding End * Scroll Padding Inline End
* @see https://tailwindcss.com/docs/scroll-padding * @see https://tailwindcss.com/docs/scroll-padding
*/ */
"scroll-pe": [{ "scroll-pe": [{
"scroll-pe": scaleUnambiguousSpacing() "scroll-pe": scaleUnambiguousSpacing()
}], }],
/**
* Scroll Padding Block Start
* @see https://tailwindcss.com/docs/scroll-padding
*/
"scroll-pbs": [{
"scroll-pbs": scaleUnambiguousSpacing()
}],
/**
* Scroll Padding Block End
* @see https://tailwindcss.com/docs/scroll-padding
*/
"scroll-pbe": [{
"scroll-pbe": scaleUnambiguousSpacing()
}],
/** /**
* Scroll Padding Top * Scroll Padding Top
* @see https://tailwindcss.com/docs/scroll-padding * @see https://tailwindcss.com/docs/scroll-padding
@@ -2978,17 +3225,18 @@ var getDefaultConfig = () => {
}] }]
}, },
conflictingClassGroups: { conflictingClassGroups: {
"container-named": ["container-type"],
overflow: ["overflow-x", "overflow-y"], overflow: ["overflow-x", "overflow-y"],
overscroll: ["overscroll-x", "overscroll-y"], overscroll: ["overscroll-x", "overscroll-y"],
inset: ["inset-x", "inset-y", "start", "end", "top", "right", "bottom", "left"], inset: ["inset-x", "inset-y", "inset-bs", "inset-be", "start", "end", "top", "right", "bottom", "left"],
"inset-x": ["right", "left"], "inset-x": ["right", "left"],
"inset-y": ["top", "bottom"], "inset-y": ["top", "bottom"],
flex: ["basis", "grow", "shrink"], flex: ["basis", "grow", "shrink"],
gap: ["gap-x", "gap-y"], gap: ["gap-x", "gap-y"],
p: ["px", "py", "ps", "pe", "pt", "pr", "pb", "pl"], p: ["px", "py", "ps", "pe", "pbs", "pbe", "pt", "pr", "pb", "pl"],
px: ["pr", "pl"], px: ["pr", "pl"],
py: ["pt", "pb"], py: ["pt", "pb"],
m: ["mx", "my", "ms", "me", "mt", "mr", "mb", "ml"], m: ["mx", "my", "ms", "me", "mbs", "mbe", "mt", "mr", "mb", "ml"],
mx: ["mr", "ml"], mx: ["mr", "ml"],
my: ["mt", "mb"], my: ["mt", "mb"],
size: ["w", "h"], size: ["w", "h"],
@@ -3008,18 +3256,18 @@ var getDefaultConfig = () => {
"rounded-b": ["rounded-br", "rounded-bl"], "rounded-b": ["rounded-br", "rounded-bl"],
"rounded-l": ["rounded-tl", "rounded-bl"], "rounded-l": ["rounded-tl", "rounded-bl"],
"border-spacing": ["border-spacing-x", "border-spacing-y"], "border-spacing": ["border-spacing-x", "border-spacing-y"],
"border-w": ["border-w-x", "border-w-y", "border-w-s", "border-w-e", "border-w-t", "border-w-r", "border-w-b", "border-w-l"], "border-w": ["border-w-x", "border-w-y", "border-w-s", "border-w-e", "border-w-bs", "border-w-be", "border-w-t", "border-w-r", "border-w-b", "border-w-l"],
"border-w-x": ["border-w-r", "border-w-l"], "border-w-x": ["border-w-r", "border-w-l"],
"border-w-y": ["border-w-t", "border-w-b"], "border-w-y": ["border-w-t", "border-w-b"],
"border-color": ["border-color-x", "border-color-y", "border-color-s", "border-color-e", "border-color-t", "border-color-r", "border-color-b", "border-color-l"], "border-color": ["border-color-x", "border-color-y", "border-color-s", "border-color-e", "border-color-bs", "border-color-be", "border-color-t", "border-color-r", "border-color-b", "border-color-l"],
"border-color-x": ["border-color-r", "border-color-l"], "border-color-x": ["border-color-r", "border-color-l"],
"border-color-y": ["border-color-t", "border-color-b"], "border-color-y": ["border-color-t", "border-color-b"],
translate: ["translate-x", "translate-y", "translate-none"], translate: ["translate-x", "translate-y", "translate-none"],
"translate-none": ["translate", "translate-x", "translate-y", "translate-z"], "translate-none": ["translate", "translate-x", "translate-y", "translate-z"],
"scroll-m": ["scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml"], "scroll-m": ["scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mbs", "scroll-mbe", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml"],
"scroll-mx": ["scroll-mr", "scroll-ml"], "scroll-mx": ["scroll-mr", "scroll-ml"],
"scroll-my": ["scroll-mt", "scroll-mb"], "scroll-my": ["scroll-mt", "scroll-mb"],
"scroll-p": ["scroll-px", "scroll-py", "scroll-ps", "scroll-pe", "scroll-pt", "scroll-pr", "scroll-pb", "scroll-pl"], "scroll-p": ["scroll-px", "scroll-py", "scroll-ps", "scroll-pe", "scroll-pbs", "scroll-pbe", "scroll-pt", "scroll-pr", "scroll-pb", "scroll-pl"],
"scroll-px": ["scroll-pr", "scroll-pl"], "scroll-px": ["scroll-pr", "scroll-pl"],
"scroll-py": ["scroll-pt", "scroll-pb"], "scroll-py": ["scroll-pt", "scroll-pb"],
touch: ["touch-x", "touch-y", "touch-pz"], touch: ["touch-x", "touch-y", "touch-pz"],
@@ -3030,6 +3278,7 @@ var getDefaultConfig = () => {
conflictingClassGroupModifiers: { conflictingClassGroupModifiers: {
"font-size": ["leading"] "font-size": ["leading"]
}, },
postfixLookupClassGroups: ["container-type"],
orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"] orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"]
}; };
}; };
@@ -3047,11 +3296,13 @@ var mergeConfigs = (baseConfig, {
overrideConfigProperties(baseConfig.classGroups, override.classGroups); overrideConfigProperties(baseConfig.classGroups, override.classGroups);
overrideConfigProperties(baseConfig.conflictingClassGroups, override.conflictingClassGroups); overrideConfigProperties(baseConfig.conflictingClassGroups, override.conflictingClassGroups);
overrideConfigProperties(baseConfig.conflictingClassGroupModifiers, override.conflictingClassGroupModifiers); overrideConfigProperties(baseConfig.conflictingClassGroupModifiers, override.conflictingClassGroupModifiers);
overrideProperty(baseConfig, "postfixLookupClassGroups", override.postfixLookupClassGroups);
overrideProperty(baseConfig, "orderSensitiveModifiers", override.orderSensitiveModifiers); overrideProperty(baseConfig, "orderSensitiveModifiers", override.orderSensitiveModifiers);
mergeConfigProperties(baseConfig.theme, extend.theme); mergeConfigProperties(baseConfig.theme, extend.theme);
mergeConfigProperties(baseConfig.classGroups, extend.classGroups); mergeConfigProperties(baseConfig.classGroups, extend.classGroups);
mergeConfigProperties(baseConfig.conflictingClassGroups, extend.conflictingClassGroups); mergeConfigProperties(baseConfig.conflictingClassGroups, extend.conflictingClassGroups);
mergeConfigProperties(baseConfig.conflictingClassGroupModifiers, extend.conflictingClassGroupModifiers); mergeConfigProperties(baseConfig.conflictingClassGroupModifiers, extend.conflictingClassGroupModifiers);
mergeArrayProperties(baseConfig, extend, "postfixLookupClassGroups");
mergeArrayProperties(baseConfig, extend, "orderSensitiveModifiers"); mergeArrayProperties(baseConfig, extend, "orderSensitiveModifiers");
return baseConfig; return baseConfig;
}; };
+3 -3
View File
File diff suppressed because one or more lines are too long
+15 -1
View File
@@ -54,6 +54,7 @@
"deno": "1", "deno": "1",
"ios": "10", "ios": "10",
"samsung": "5", "samsung": "5",
"rhino": "1.9",
"opera_mobile": "41", "opera_mobile": "41",
"electron": "1.2" "electron": "1.2"
}, },
@@ -219,6 +220,7 @@
"deno": "1", "deno": "1",
"ios": "10", "ios": "10",
"samsung": "5", "samsung": "5",
"rhino": "1.9",
"opera_mobile": "41", "opera_mobile": "41",
"electron": "1.2" "electron": "1.2"
}, },
@@ -280,6 +282,7 @@
"deno": "1", "deno": "1",
"ios": "10", "ios": "10",
"samsung": "5", "samsung": "5",
"rhino": "1.9",
"opera_mobile": "41", "opera_mobile": "41",
"electron": "1.2" "electron": "1.2"
}, },
@@ -1075,6 +1078,7 @@
"deno": "1", "deno": "1",
"ios": "10", "ios": "10",
"samsung": "7", "samsung": "7",
"rhino": "1.9",
"opera_mobile": "43", "opera_mobile": "43",
"electron": "1.7" "electron": "1.7"
}, },
@@ -1216,7 +1220,6 @@
"deno": "1", "deno": "1",
"ios": "11.3", "ios": "11.3",
"samsung": "8", "samsung": "8",
"rhino": "1.7.15",
"opera_mobile": "46", "opera_mobile": "46",
"electron": "3.0" "electron": "3.0"
}, },
@@ -1452,6 +1455,7 @@
"deno": "1", "deno": "1",
"ios": "10", "ios": "10",
"samsung": "5", "samsung": "5",
"rhino": "1.9",
"opera_mobile": "37", "opera_mobile": "37",
"electron": "1.1" "electron": "1.1"
}, },
@@ -1465,6 +1469,7 @@
"deno": "1", "deno": "1",
"ios": "10", "ios": "10",
"samsung": "5", "samsung": "5",
"rhino": "1.9",
"opera_mobile": "37", "opera_mobile": "37",
"electron": "1.1" "electron": "1.1"
}, },
@@ -1968,6 +1973,7 @@
"deno": "1", "deno": "1",
"ios": "10", "ios": "10",
"samsung": "5", "samsung": "5",
"rhino": "1.9",
"opera_mobile": "41", "opera_mobile": "41",
"electron": "1.2" "electron": "1.2"
}, },
@@ -1981,6 +1987,7 @@
"deno": "1", "deno": "1",
"ios": "10", "ios": "10",
"samsung": "5", "samsung": "5",
"rhino": "1.9",
"opera_mobile": "41", "opera_mobile": "41",
"electron": "1.2" "electron": "1.2"
}, },
@@ -1994,6 +2001,7 @@
"deno": "1", "deno": "1",
"ios": "10", "ios": "10",
"samsung": "5", "samsung": "5",
"rhino": "1.9",
"opera_mobile": "41", "opera_mobile": "41",
"electron": "1.2" "electron": "1.2"
}, },
@@ -2007,6 +2015,7 @@
"deno": "1", "deno": "1",
"ios": "10", "ios": "10",
"samsung": "5", "samsung": "5",
"rhino": "1.9",
"opera_mobile": "41", "opera_mobile": "41",
"electron": "1.2" "electron": "1.2"
}, },
@@ -2020,6 +2029,7 @@
"deno": "1", "deno": "1",
"ios": "10", "ios": "10",
"samsung": "5", "samsung": "5",
"rhino": "1.9",
"opera_mobile": "41", "opera_mobile": "41",
"electron": "1.2" "electron": "1.2"
}, },
@@ -2033,6 +2043,7 @@
"deno": "1", "deno": "1",
"ios": "10", "ios": "10",
"samsung": "5", "samsung": "5",
"rhino": "1.9",
"opera_mobile": "41", "opera_mobile": "41",
"electron": "1.2" "electron": "1.2"
}, },
@@ -2046,6 +2057,7 @@
"deno": "1", "deno": "1",
"ios": "10", "ios": "10",
"samsung": "5", "samsung": "5",
"rhino": "1.9",
"opera_mobile": "41", "opera_mobile": "41",
"electron": "1.2" "electron": "1.2"
}, },
@@ -2059,6 +2071,7 @@
"deno": "1", "deno": "1",
"ios": "10", "ios": "10",
"samsung": "5", "samsung": "5",
"rhino": "1.9",
"opera_mobile": "41", "opera_mobile": "41",
"electron": "1.2" "electron": "1.2"
}, },
@@ -2072,6 +2085,7 @@
"deno": "1", "deno": "1",
"ios": "10", "ios": "10",
"samsung": "5", "samsung": "5",
"rhino": "1.9",
"opera_mobile": "41", "opera_mobile": "41",
"electron": "1.2" "electron": "1.2"
}, },
+3
View File
@@ -13,6 +13,9 @@
"bugfix/transform-safari-block-shadowing", "bugfix/transform-safari-block-shadowing",
"bugfix/transform-safari-for-shadowing" "bugfix/transform-safari-for-shadowing"
], ],
"transform-destructuring": [
"bugfix/transform-safari-rest-destructuring-rhs-array"
],
"transform-template-literals": [ "transform-template-literals": [
"bugfix/transform-tagged-template-caching" "bugfix/transform-tagged-template-caching"
], ],
+28
View File
@@ -35,6 +35,7 @@
"deno": "1", "deno": "1",
"ios": "10", "ios": "10",
"samsung": "5", "samsung": "5",
"rhino": "1.9",
"opera_mobile": "41", "opera_mobile": "41",
"electron": "1.2" "electron": "1.2"
}, },
@@ -80,6 +81,19 @@
"opera_mobile": "36", "opera_mobile": "36",
"electron": "0.37" "electron": "0.37"
}, },
"bugfix/transform-safari-rest-destructuring-rhs-array": {
"chrome": "49",
"opera": "36",
"edge": "14",
"firefox": "34",
"safari": "14.1",
"node": "6",
"deno": "1",
"ios": "14.5",
"samsung": "5",
"opera_mobile": "36",
"electron": "0.37"
},
"bugfix/transform-tagged-template-caching": { "bugfix/transform-tagged-template-caching": {
"chrome": "41", "chrome": "41",
"opera": "28", "opera": "28",
@@ -171,6 +185,7 @@
"deno": "1", "deno": "1",
"ios": "9", "ios": "9",
"samsung": "3.4", "samsung": "3.4",
"rhino": "1.9",
"opera_mobile": "28", "opera_mobile": "28",
"electron": "0.21" "electron": "0.21"
}, },
@@ -187,6 +202,19 @@
"opera_mobile": "41", "opera_mobile": "41",
"electron": "1.2" "electron": "1.2"
}, },
"transform-destructuring": {
"chrome": "51",
"opera": "38",
"edge": "15",
"firefox": "53",
"safari": "10",
"node": "6.5",
"deno": "1",
"ios": "10",
"samsung": "5",
"opera_mobile": "41",
"electron": "1.2"
},
"transform-block-scoping": { "transform-block-scoping": {
"chrome": "50", "chrome": "50",
"opera": "37", "opera": "37",
+11 -6
View File
@@ -1,10 +1,10 @@
{ {
"transform-explicit-resource-management": { "transform-explicit-resource-management": {
"chrome": "134", "chrome": "141",
"edge": "134", "edge": "141",
"firefox": "141", "firefox": "141",
"node": "24", "node": "25",
"electron": "35.0" "electron": "39.0"
}, },
"transform-duplicate-named-capturing-groups-regex": { "transform-duplicate-named-capturing-groups-regex": {
"chrome": "126", "chrome": "126",
@@ -14,6 +14,7 @@
"safari": "17.4", "safari": "17.4",
"node": "23", "node": "23",
"ios": "17.4", "ios": "17.4",
"rhino": "1.9",
"electron": "31.0" "electron": "31.0"
}, },
"transform-regexp-modifiers": { "transform-regexp-modifiers": {
@@ -432,6 +433,7 @@
"deno": "1", "deno": "1",
"ios": "11.3", "ios": "11.3",
"samsung": "9", "samsung": "9",
"rhino": "1.9",
"opera_mobile": "47", "opera_mobile": "47",
"electron": "3.0" "electron": "3.0"
}, },
@@ -445,6 +447,7 @@
"deno": "1", "deno": "1",
"ios": "11.3", "ios": "11.3",
"samsung": "9", "samsung": "9",
"rhino": "1.9",
"opera_mobile": "47", "opera_mobile": "47",
"electron": "3.0" "electron": "3.0"
}, },
@@ -458,6 +461,7 @@
"deno": "1", "deno": "1",
"ios": "11.3", "ios": "11.3",
"samsung": "9", "samsung": "9",
"rhino": "1.9",
"opera_mobile": "47", "opera_mobile": "47",
"electron": "3.0" "electron": "3.0"
}, },
@@ -498,6 +502,7 @@
"deno": "1", "deno": "1",
"ios": "13", "ios": "13",
"samsung": "3.4", "samsung": "3.4",
"rhino": "1.9",
"opera_mobile": "28", "opera_mobile": "28",
"electron": "0.21" "electron": "0.21"
}, },
@@ -695,10 +700,10 @@
"opera": "38", "opera": "38",
"edge": "15", "edge": "15",
"firefox": "53", "firefox": "53",
"safari": "10", "safari": "14.1",
"node": "6.5", "node": "6.5",
"deno": "1", "deno": "1",
"ios": "10", "ios": "14.5",
"samsung": "5", "samsung": "5",
"opera_mobile": "41", "opera_mobile": "41",
"electron": "1.2" "electron": "1.2"
+3 -3
View File
@@ -1,6 +1,6 @@
{ {
"name": "@babel/compat-data", "name": "@babel/compat-data",
"version": "7.28.6", "version": "7.29.7",
"author": "The Babel Team (https://babel.dev/team)", "author": "The Babel Team (https://babel.dev/team)",
"license": "MIT", "license": "MIT",
"description": "The compat-data to determine required Babel plugins", "description": "The compat-data to determine required Babel plugins",
@@ -30,8 +30,8 @@
], ],
"devDependencies": { "devDependencies": {
"@mdn/browser-compat-data": "^6.0.8", "@mdn/browser-compat-data": "^6.0.8",
"core-js-compat": "^3.43.0", "core-js-compat": "^3.48.0",
"electron-to-chromium": "^1.5.140" "electron-to-chromium": "^1.5.278"
}, },
"engines": { "engines": {
"node": ">=6.9.0" "node": ">=6.9.0"
+1 -1
View File
@@ -1 +1 @@
{"version":3,"names":[],"sources":["../../src/config/cache-contexts.ts"],"sourcesContent":["import type { ConfigContext } from \"./config-chain.ts\";\nimport type {\n CallerMetadata,\n TargetsListOrObject,\n} from \"./validation/options.ts\";\n\nexport type { ConfigContext as FullConfig };\n\nexport type FullPreset = {\n targets: TargetsListOrObject;\n} & ConfigContext;\nexport type FullPlugin = {\n assumptions: { [name: string]: boolean };\n} & FullPreset;\n\n// Context not including filename since it is used in places that cannot\n// process 'ignore'/'only' and other filename-based logic.\nexport type SimpleConfig = {\n envName: string;\n caller: CallerMetadata | undefined;\n};\nexport type SimplePreset = {\n targets: TargetsListOrObject;\n} & SimpleConfig;\nexport type SimplePlugin = {\n assumptions: {\n [name: string]: boolean;\n };\n} & SimplePreset;\n"],"mappings":"","ignoreList":[]} {"version":3,"names":[],"sources":["../../src/config/cache-contexts.ts"],"sourcesContent":["import type { ConfigContext } from \"./config-chain.ts\";\nimport type {\n CallerMetadata,\n TargetsListOrObject,\n} from \"./validation/options.ts\";\n\nexport type { ConfigContext as FullConfig };\n\nexport type FullPreset = {\n targets: TargetsListOrObject;\n} & ConfigContext;\nexport type FullPlugin = {\n assumptions: Record<string, boolean>;\n} & FullPreset;\n\n// Context not including filename since it is used in places that cannot\n// process 'ignore'/'only' and other filename-based logic.\nexport type SimpleConfig = {\n envName: string;\n caller: CallerMetadata | undefined;\n};\nexport type SimplePreset = {\n targets: TargetsListOrObject;\n} & SimpleConfig;\nexport type SimplePlugin = {\n assumptions: Record<string, boolean>;\n} & SimplePreset;\n"],"mappings":"","ignoreList":[]}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -139,7 +139,7 @@ const readIgnoreConfig = (0, _utils.makeStaticFileCache)((filepath, content) =>
const ignoreDir = _path().dirname(filepath); const ignoreDir = _path().dirname(filepath);
const ignorePatterns = content.split("\n").map(line => line.replace(/#.*$/, "").trim()).filter(Boolean); const ignorePatterns = content.split("\n").map(line => line.replace(/#.*$/, "").trim()).filter(Boolean);
for (const pattern of ignorePatterns) { for (const pattern of ignorePatterns) {
if (pattern[0] === "!") { if (pattern.startsWith("!")) {
throw new _configError.default(`Negation of file paths is not supported.`, filepath); throw new _configError.default(`Negation of file paths is not supported.`, filepath);
} }
} }
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
{"version":3,"names":["_package","require","_configuration","_plugins"],"sources":["../../../src/config/files/index.ts"],"sourcesContent":["type indexBrowserType = typeof import(\"./index-browser\");\ntype indexType = typeof import(\"./index\");\n\n// Kind of gross, but essentially asserting that the exports of this module are the same as the\n// exports of index-browser, since this file may be replaced at bundle time with index-browser.\n({}) as any as indexBrowserType as indexType;\n\nexport { findPackageData } from \"./package.ts\";\n\nexport {\n findConfigUpwards,\n findRelativeConfig,\n findRootConfig,\n loadConfig,\n resolveShowConfigPath,\n ROOT_CONFIG_FILENAMES,\n} from \"./configuration.ts\";\nexport type {\n ConfigFile,\n IgnoreFile,\n RelativeConfig,\n FilePackageData,\n} from \"./types.ts\";\nexport {\n loadPlugin,\n loadPreset,\n resolvePlugin,\n resolvePreset,\n} from \"./plugins.ts\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,cAAA,GAAAD,OAAA;AAcA,IAAAE,QAAA,GAAAF,OAAA;AAlBA,CAAC,CAAC,CAAC;AAA0C","ignoreList":[]} {"version":3,"names":["_package","require","_configuration","_plugins"],"sources":["../../../src/config/files/index.ts"],"sourcesContent":["type indexBrowserType = typeof import(\"./index-browser\");\ntype indexType = typeof import(\"./index\");\n\n// Kind of gross, but essentially asserting that the exports of this module are the same as the\n// exports of index-browser, since this file may be replaced at bundle time with index-browser.\n// eslint-disable-next-line @typescript-eslint/no-unused-expressions\n({}) as any as indexBrowserType as indexType;\n\nexport { findPackageData } from \"./package.ts\";\n\nexport {\n findConfigUpwards,\n findRelativeConfig,\n findRootConfig,\n loadConfig,\n resolveShowConfigPath,\n ROOT_CONFIG_FILENAMES,\n} from \"./configuration.ts\";\nexport type {\n ConfigFile,\n IgnoreFile,\n RelativeConfig,\n FilePackageData,\n} from \"./types.ts\";\nexport {\n loadPlugin,\n loadPreset,\n resolvePlugin,\n resolvePreset,\n} from \"./plugins.ts\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,cAAA,GAAAD,OAAA;AAcA,IAAAE,QAAA,GAAAF,OAAA;AAlBA,CAAC,CAAC,CAAC;AAA0C","ignoreList":[]}
+9 -17
View File
@@ -41,11 +41,9 @@ var _transformFile = require("../../transform-file.js");
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
const debug = _debug()("babel:config:loading:files:module-types"); const debug = _debug()("babel:config:loading:files:module-types");
{ try {
try { var import_ = require("./import.cjs");
var import_ = require("./import.cjs"); } catch (_unused) {}
} catch (_unused) {}
}
const supportsESM = exports.supportsESM = _semver().satisfies(process.versions.node, "^12.17 || >=13.2"); const supportsESM = exports.supportsESM = _semver().satisfies(process.versions.node, "^12.17 || >=13.2");
const LOADING_CJS_FILES = new Set(); const LOADING_CJS_FILES = new Set();
function loadCjsDefault(filepath) { function loadCjsDefault(filepath) {
@@ -60,19 +58,15 @@ function loadCjsDefault(filepath) {
} finally { } finally {
LOADING_CJS_FILES.delete(filepath); LOADING_CJS_FILES.delete(filepath);
} }
{ return module != null && (module.__esModule || module[Symbol.toStringTag] === "Module") ? module.default || (arguments[1] ? module : undefined) : module;
return module != null && (module.__esModule || module[Symbol.toStringTag] === "Module") ? module.default || (arguments[1] ? module : undefined) : module;
}
} }
const loadMjsFromPath = (0, _rewriteStackTrace.endHiddenCallStack)(function () { const loadMjsFromPath = (0, _rewriteStackTrace.endHiddenCallStack)(function () {
var _loadMjsFromPath = _asyncToGenerator(function* (filepath) { var _loadMjsFromPath = _asyncToGenerator(function* (filepath) {
const url = (0, _url().pathToFileURL)(filepath).toString() + "?import"; const url = (0, _url().pathToFileURL)(filepath).toString() + "?import";
{ if (!import_) {
if (!import_) { throw new _configError.default("Internal error: Native ECMAScript modules aren't supported by this platform.\n", filepath);
throw new _configError.default("Internal error: Native ECMAScript modules aren't supported by this platform.\n", filepath);
}
return yield import_(url);
} }
return yield import_(url);
}); });
function loadMjsFromPath(_x) { function loadMjsFromPath(_x) {
return _loadMjsFromPath.apply(this, arguments); return _loadMjsFromPath.apply(this, arguments);
@@ -191,9 +185,8 @@ function getTSPreset(filepath) {
} catch (error) { } catch (error) {
if (error.code !== "MODULE_NOT_FOUND") throw error; if (error.code !== "MODULE_NOT_FOUND") throw error;
let message = "You appear to be using a .cts file as Babel configuration, but the `@babel/preset-typescript` package was not found: please install it!"; let message = "You appear to be using a .cts file as Babel configuration, but the `@babel/preset-typescript` package was not found: please install it!";
{ if (process.versions.pnp) {
if (process.versions.pnp) { message += `
message += `
If you are using Yarn Plug'n'Play, you may also need to add the following configuration to your .yarnrc.yml file: If you are using Yarn Plug'n'Play, you may also need to add the following configuration to your .yarnrc.yml file:
packageExtensions: packageExtensions:
@@ -201,7 +194,6 @@ packageExtensions:
\t\tpeerDependencies: \t\tpeerDependencies:
\t\t\t"@babel/preset-typescript": "*" \t\t\t"@babel/preset-typescript": "*"
`; `;
}
} }
throw new _configError.default(message, filepath); throw new _configError.default(message, filepath);
} }
File diff suppressed because one or more lines are too long
+6 -16
View File
@@ -200,29 +200,19 @@ function resolveStandardizedName(type, name, dirname, allowAsync) {
} }
} }
} }
{ var LOADING_MODULES = new Set();
var LOADING_MODULES = new Set();
}
function* requireModule(type, loader, name) { function* requireModule(type, loader, name) {
{ if (!(yield* (0, _async.isAsync)()) && LOADING_MODULES.has(name)) {
if (!(yield* (0, _async.isAsync)()) && LOADING_MODULES.has(name)) { throw new Error(`Reentrant ${type} detected trying to load "${name}". This module is not ignored ` + "and is trying to load itself while compiling itself, leading to a dependency cycle. " + 'We recommend adding it to your "ignore" list in your babelrc, or to a .babelignore.');
throw new Error(`Reentrant ${type} detected trying to load "${name}". This module is not ignored ` + "and is trying to load itself while compiling itself, leading to a dependency cycle. " + 'We recommend adding it to your "ignore" list in your babelrc, or to a .babelignore.');
}
} }
try { try {
{ LOADING_MODULES.add(name);
LOADING_MODULES.add(name); return yield* (0, _moduleTypes.default)(name, loader, `You appear to be using a native ECMAScript module ${type}, ` + "which is only supported when running Babel asynchronously " + "or when using the Node.js `--experimental-require-module` flag.", `You appear to be using a ${type} that contains top-level await, ` + "which is only supported when running Babel asynchronously.", true);
}
{
return yield* (0, _moduleTypes.default)(name, loader, `You appear to be using a native ECMAScript module ${type}, ` + "which is only supported when running Babel asynchronously " + "or when using the Node.js `--experimental-require-module` flag.", `You appear to be using a ${type} that contains top-level await, ` + "which is only supported when running Babel asynchronously.", true);
}
} catch (err) { } catch (err) {
err.message = `[BABEL]: ${err.message} (While processing: ${name})`; err.message = `[BABEL]: ${err.message} (While processing: ${name})`;
throw err; throw err;
} finally { } finally {
{ LOADING_MODULES.delete(name);
LOADING_MODULES.delete(name);
}
} }
} }
0 && 0; 0 && 0;

Some files were not shown because too many files have changed in this diff Show More