Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9337afc47e | ||
|
|
0f9ef308d2 | ||
|
|
04e4515995 | ||
|
|
fa2829803f | ||
|
|
8715f2b9f7 | ||
|
|
0563e893b5 | ||
|
|
9746961e1d | ||
|
|
e56007b6e2 | ||
|
|
78991d1cd0 | ||
|
|
46d787faff | ||
|
|
fdf612350a | ||
|
|
182a719053 | ||
|
|
1dc30b6c7e | ||
|
|
8a8c75acd1 | ||
|
|
e114b838f2 | ||
|
|
f40d1578c6 | ||
|
|
ce6ae7123c | ||
|
|
e319b8b8d8 |
No files matched your search
+25
-1
@@ -7,19 +7,43 @@ CLIENT_NAME=evolution
|
|||||||
|
|
||||||
GLOBAL_API_KEY=429683C4C977415CAAFCCE10F7D57E11
|
GLOBAL_API_KEY=429683C4C977415CAAFCCE10F7D57E11
|
||||||
|
|
||||||
|
# License — headless auto-activation by email.
|
||||||
|
# Set this to the email you used in your first manual license registration.
|
||||||
|
# On startup, the service will silently call /v1/register/auto and skip the
|
||||||
|
# browser flow. Falls back to the manual flow if the email isn't registered yet.
|
||||||
|
# Leave empty (or unset) to keep the default behavior (manual registration).
|
||||||
|
# [email protected]
|
||||||
|
|
||||||
WADEBUG=DEBUG
|
WADEBUG=DEBUG
|
||||||
LOGTYPE=console
|
LOGTYPE=console
|
||||||
WEBHOOKFILES=true
|
WEBHOOK_FILES=true
|
||||||
|
|
||||||
CONNECT_ON_STARTUP=true
|
CONNECT_ON_STARTUP=true
|
||||||
|
|
||||||
OS_NAME=Evolution GO
|
OS_NAME=Evolution GO
|
||||||
|
|
||||||
|
# Passkey (WebAuthn) pairing — required only for accounts that ask for a passkey
|
||||||
|
# when linking a device. Set this to the PUBLIC base URL of THIS API, reachable
|
||||||
|
# by the browser where WhatsApp Web opens (the Evolution Passkey Helper extension
|
||||||
|
# calls it from the web.whatsapp.com origin). Use a public domain in production,
|
||||||
|
# or a tunnel (ngrok/cloudflared) / LAN IP in development — NOT localhost if the
|
||||||
|
# browser runs on another machine. See docs/wiki/guias-api/passkey-pairing.md.
|
||||||
|
# PASSKEY_PUBLIC_URL=https://your-api.example.com
|
||||||
|
|
||||||
AMQP_URL=amqp://admin:admin@localhost:5672/default
|
AMQP_URL=amqp://admin:admin@localhost:5672/default
|
||||||
AMQP_GLOBAL_ENABLED=false
|
AMQP_GLOBAL_ENABLED=false
|
||||||
|
|
||||||
WEBHOOK_URL=https://webhook.site/2e6af2fa-6b04-497f-b4a1-13a905728d83
|
WEBHOOK_URL=https://webhook.site/2e6af2fa-6b04-497f-b4a1-13a905728d83
|
||||||
|
|
||||||
|
# Proxy Configuration
|
||||||
|
# PROXY_PROTOCOL can be http, https or socks5. If omitted, it is inferred from
|
||||||
|
# the port (1080/2080/42000-43000 → socks5; otherwise http).
|
||||||
|
# PROXY_PROTOCOL=http
|
||||||
|
# PROXY_HOST=proxy.example.com
|
||||||
|
# PROXY_PORT=8080
|
||||||
|
# PROXY_USERNAME=user
|
||||||
|
# PROXY_PASSWORD=secret
|
||||||
|
|
||||||
# Minio Configuration
|
# Minio Configuration
|
||||||
MINIO_ENABLED=true
|
MINIO_ENABLED=true
|
||||||
MINIO_ENDPOINT=localhost:9000
|
MINIO_ENDPOINT=localhost:9000
|
||||||
|
|||||||
@@ -0,0 +1,89 @@
|
|||||||
|
name: Bug Report
|
||||||
|
description: Create a report to help us improve.
|
||||||
|
labels:
|
||||||
|
- bug
|
||||||
|
- en
|
||||||
|
body:
|
||||||
|
- type: checkboxes
|
||||||
|
id: terms
|
||||||
|
attributes:
|
||||||
|
label: Welcome!
|
||||||
|
description: |
|
||||||
|
The issue tracker is only for reporting bugs and feature requests.
|
||||||
|
For support questions, please visit:
|
||||||
|
- [Community](https://evolutionfoundation.com.br/community)
|
||||||
|
- [WhatsApp Support](https://wa.me/553196219989)
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
**DO NOT OPEN AN ISSUE FOR GENERAL SUPPORT QUESTIONS.**
|
||||||
|
|
||||||
|
options:
|
||||||
|
- label: Yes, I have searched for similar issues on [GitHub](https://github.com/evolution-foundation/evolution-go/issues) and found none.
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: What did you do?
|
||||||
|
description: |
|
||||||
|
- Respect the issue template as much as possible.
|
||||||
|
- The title should be short and descriptive.
|
||||||
|
- Explain the conditions that led you to report this issue.
|
||||||
|
- Be clear and concise.
|
||||||
|
placeholder: Describe the problem you encountered in detail.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: What did you expect?
|
||||||
|
placeholder: Describe what you expected to happen.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: What did you observe instead of what you expected?
|
||||||
|
placeholder: Explain what actually happens when you follow the steps above.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Screenshots/Videos
|
||||||
|
placeholder: If possible, add screenshots or videos that illustrate the problem.
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Which version are you using?
|
||||||
|
description: Check the VERSION file or the startup log.
|
||||||
|
placeholder: e.g. 0.6.1
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: dropdown
|
||||||
|
id: select
|
||||||
|
attributes:
|
||||||
|
label: What is your environment?
|
||||||
|
options:
|
||||||
|
- Linux
|
||||||
|
- Docker
|
||||||
|
- Mac
|
||||||
|
- Windows
|
||||||
|
- Other
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: If applicable, paste the log output
|
||||||
|
description: Please attach any logs related to the issue.
|
||||||
|
placeholder: Paste the application log here.
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Additional Notes
|
||||||
|
description: Include any other information you think might be useful.
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
name: Feature Request
|
||||||
|
description: Suggest ideas for the project.
|
||||||
|
labels:
|
||||||
|
- enhancement
|
||||||
|
- en
|
||||||
|
body:
|
||||||
|
- type: checkboxes
|
||||||
|
id: terms
|
||||||
|
attributes:
|
||||||
|
label: Welcome!
|
||||||
|
description: '**DO NOT OPEN FOR GENERAL SUPPORT QUESTIONS.**'
|
||||||
|
options:
|
||||||
|
- label: Yes, I have searched for similar requests on [GitHub](https://github.com/evolution-foundation/evolution-go/issues) and found none.
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: dropdown
|
||||||
|
attributes:
|
||||||
|
label: What type of feature?
|
||||||
|
options:
|
||||||
|
- Integration
|
||||||
|
- Functionality
|
||||||
|
- Endpoint
|
||||||
|
- Performance
|
||||||
|
- Other
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: What is the motivation for the request?
|
||||||
|
description: |
|
||||||
|
What problem does the feature seek to solve?
|
||||||
|
Clearly describe the functionality you want implemented.
|
||||||
|
placeholder: Detailed description
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Usage Examples
|
||||||
|
description: Provide specific examples of how this functionality could be used.
|
||||||
|
placeholder: text - image - video - flowcharts
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: How should the feature be developed?
|
||||||
|
description: |
|
||||||
|
Should it be inserted directly into the code?
|
||||||
|
If you have implementation ideas, please share them here.
|
||||||
|
placeholder: Insert feature ideas here
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Additional Notes
|
||||||
|
description: Any other information relevant to your request.
|
||||||
|
placeholder: Insert your observations here.
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
name: Relatório de bug
|
||||||
|
description: Crie um relatório para nos ajudar a melhorar.
|
||||||
|
labels:
|
||||||
|
- bug
|
||||||
|
- pt-br
|
||||||
|
body:
|
||||||
|
- type: checkboxes
|
||||||
|
id: termos
|
||||||
|
attributes:
|
||||||
|
label: Bem-vindo!
|
||||||
|
description: |
|
||||||
|
O rastreador de problemas é apenas para relatar bugs e solicitações de recursos.
|
||||||
|
Para perguntas de suporte, acesse:
|
||||||
|
- [Comunidade](https://evolutionfoundation.com.br/community)
|
||||||
|
- [WhatsApp Suporte](https://wa.me/553196219989)
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
**NÃO ABRA UM PROBLEMA PARA PERGUNTAS GERAIS DE SUPORTE.**
|
||||||
|
|
||||||
|
options:
|
||||||
|
- label: Sim, pesquisei problemas semelhantes no [GitHub](https://github.com/evolution-foundation/evolution-go/issues) e não encontrei nenhum.
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: O que você fez?
|
||||||
|
description: |
|
||||||
|
- Respeite o modelo de problema tanto quanto possível.
|
||||||
|
- O título deve ser curto e descritivo.
|
||||||
|
- Explique as condições que o levaram a reportar este problema.
|
||||||
|
- Seja claro e conciso.
|
||||||
|
placeholder: Descreva detalhadamente o problema que você encontrou.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: O que você esperava?
|
||||||
|
placeholder: Descreva o que você esperava que acontecesse.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: O que você observou ao invés do que esperava?
|
||||||
|
placeholder: Explique o que realmente acontece quando você segue os passos acima.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Capturas de Tela/Vídeos
|
||||||
|
placeholder: Se possível, adicione capturas de tela ou vídeos que ilustrem o problema.
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Qual versão você está usando?
|
||||||
|
description: Verifique o arquivo VERSION ou o log de inicialização.
|
||||||
|
placeholder: ex. 0.6.1
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: dropdown
|
||||||
|
id: select
|
||||||
|
attributes:
|
||||||
|
label: Qual é o seu ambiente?
|
||||||
|
options:
|
||||||
|
- Linux
|
||||||
|
- Docker
|
||||||
|
- Mac
|
||||||
|
- Windows
|
||||||
|
- Outro
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Se aplicável, cole a saída do log
|
||||||
|
description: Por favor, anexe os logs que possam estar relacionados ao problema.
|
||||||
|
placeholder: Cole aqui o log da aplicação.
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Notas Adicionais
|
||||||
|
description: Inclua qualquer outra informação que possa ser útil.
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
name: Solicitação de recursos
|
||||||
|
description: Sugira ideias para o projeto.
|
||||||
|
labels:
|
||||||
|
- enhancement
|
||||||
|
- pt-br
|
||||||
|
body:
|
||||||
|
- type: checkboxes
|
||||||
|
id: termos
|
||||||
|
attributes:
|
||||||
|
label: Bem-vindo!
|
||||||
|
description: '**NÃO ABRA PARA PERGUNTAS GERAIS DE SUPORTE.**'
|
||||||
|
options:
|
||||||
|
- label: Sim, pesquisei solicitações semelhantes no [GitHub](https://github.com/evolution-foundation/evolution-go/issues) e não encontrei nenhum.
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: dropdown
|
||||||
|
attributes:
|
||||||
|
label: Qual tipo de recurso?
|
||||||
|
options:
|
||||||
|
- Integração
|
||||||
|
- Funcionalidade
|
||||||
|
- Endpoint
|
||||||
|
- Performance
|
||||||
|
- Outro
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Qual a motivação para a solicitação?
|
||||||
|
description: |
|
||||||
|
Qual problema o recurso busca resolver?
|
||||||
|
Descreva claramente a funcionalidade que você deseja que seja implementada.
|
||||||
|
placeholder: Descrição detalhada
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Exemplos de Uso
|
||||||
|
description: Forneça exemplos específicos de como essa funcionalidade poderia ser utilizada.
|
||||||
|
placeholder: texto - imagem - video - fluxogramas
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Como o recurso deve ser desenvolvido?
|
||||||
|
description: |
|
||||||
|
Deve ser inserido diretamente no código?
|
||||||
|
Se você tem ideias de implementação, por favor compartilhe aqui.
|
||||||
|
placeholder: Insira ideias para o recurso
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Notas Adicionais
|
||||||
|
description: Qualquer outra informação relevante para a sua solicitação.
|
||||||
|
placeholder: Insira aqui as suas observações.
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
## Description
|
||||||
|
<!-- Describe your changes in detail -->
|
||||||
|
|
||||||
|
## Related Issue
|
||||||
|
<!-- Link to the issue this PR addresses -->
|
||||||
|
Closes #(issue_number)
|
||||||
|
|
||||||
|
## Type of Change
|
||||||
|
- [ ] Bug fix (non-breaking change which fixes an issue)
|
||||||
|
- [ ] New feature (non-breaking change which adds functionality)
|
||||||
|
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
||||||
|
- [ ] Documentation update
|
||||||
|
- [ ] Refactoring (no functional changes)
|
||||||
|
- [ ] Performance improvement
|
||||||
|
|
||||||
|
## Testing
|
||||||
|
- [ ] Manual testing completed
|
||||||
|
- [ ] Functionality verified in development environment
|
||||||
|
- [ ] No breaking changes introduced
|
||||||
|
|
||||||
|
## Screenshots (if applicable)
|
||||||
|
|
||||||
|
## Checklist
|
||||||
|
- [ ] My code follows the project's style guidelines
|
||||||
|
- [ ] I have performed a self-review of my code
|
||||||
|
- [ ] I have tested my changes thoroughly
|
||||||
|
- [ ] Any dependent changes have been merged and published
|
||||||
|
|
||||||
|
## Additional Notes
|
||||||
@@ -4,8 +4,6 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
tags:
|
|
||||||
- "*.*.*"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_deploy:
|
build_deploy:
|
||||||
@@ -17,6 +15,12 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Read version
|
||||||
|
id: version
|
||||||
|
run: echo "version=$(cat VERSION 2>/dev/null || echo '0.0.0')" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Docker meta
|
- name: Docker meta
|
||||||
id: meta
|
id: meta
|
||||||
@@ -24,9 +28,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
images: evoapicloud/evolution-go
|
images: evoapicloud/evolution-go
|
||||||
tags: |
|
tags: |
|
||||||
type=ref,event=branch
|
type=raw,value=${{ steps.version.outputs.version }}
|
||||||
type=semver,pattern={{version}}
|
type=raw,value=latest,enable=${{ !contains(steps.version.outputs.version, '-beta') }}
|
||||||
type=raw,value=latest,enable={{is_default_branch}}
|
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
@@ -44,12 +47,15 @@ jobs:
|
|||||||
id: docker_build
|
id: docker_build
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
|
context: .
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
|
build-args: |
|
||||||
|
VERSION=${{ steps.version.outputs.version }}
|
||||||
|
|
||||||
- name: Image digest
|
- name: Image digest
|
||||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||||
@@ -7,4 +7,3 @@ coverage.*
|
|||||||
.idea/
|
.idea/
|
||||||
.vscode/
|
.vscode/
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.cursorrules
|
|
||||||
+107
-1
@@ -1,5 +1,111 @@
|
|||||||
# Evolution GO - Changelog
|
# Evolution GO - Changelog
|
||||||
|
|
||||||
|
## v0.7.2
|
||||||
|
|
||||||
|
**Docker:** `evoapicloud/evolution-go:0.7.2`
|
||||||
|
|
||||||
|
### 🆕 New Features
|
||||||
|
- **Passkey (WebAuthn) pairing** — support for linking accounts that the WhatsApp
|
||||||
|
server locks behind a **passkey** (the *Shortcake* / CRSC flow). When the
|
||||||
|
server demands a passkey, whatsmeow's `PairPasskeyRequest` is surfaced through a
|
||||||
|
new ceremony flow: the backend mints a short-lived ceremony token, and a bundled
|
||||||
|
browser extension (`passkey-helper`) runs the WebAuthn assertion on the
|
||||||
|
`web.whatsapp.com` origin and posts it back. Three public endpoints drive it:
|
||||||
|
`GET /passkey-ceremony/{token}`, `POST .../response`, `POST .../confirm`. The
|
||||||
|
manager detects the passkey stage and shows an "Abrir WhatsApp Web" button.
|
||||||
|
Confirmation is always manual (never auto-confirm on `SkipHandoffUX`).
|
||||||
|
Configure the public API base via **`PASSKEY_PUBLIC_URL`**. Full guide:
|
||||||
|
`docs/wiki/guias-api/passkey-pairing.md`. Note: there is no headless bypass —
|
||||||
|
the ceremony requires the account owner's real authenticator; the extension is
|
||||||
|
web-only.
|
||||||
|
- **Headless license auto-activation** — set `EVOLUTION_OPERATOR_EMAIL` to the
|
||||||
|
email used in your first manual license registration; on startup the service
|
||||||
|
silently calls `/v1/register/auto` and skips the browser flow (falls back to the
|
||||||
|
manual flow if the email isn't registered yet).
|
||||||
|
- **Button message media support** — additional media handling for interactive
|
||||||
|
button messages.
|
||||||
|
|
||||||
|
### 🔧 Improvements / CI
|
||||||
|
- **Dropped the whatsmeow fork — now uses official `go.mau.fi/whatsmeow`.** The
|
||||||
|
project previously vendored a fork (`whatsmeow-lib` submodule) to carry a
|
||||||
|
PostgreSQL pool patch; upstream rejected that patch in favor of `NewWithDB`
|
||||||
|
(app-side config). Removing the fork also pulled in upstream's native passkey
|
||||||
|
support. Pinned to the commit that adds passkeys
|
||||||
|
(`v0.0.0-20260630180629-b572e5bcb92b`). The `sync-releases` workflow no longer
|
||||||
|
re-adds the submodule.
|
||||||
|
- **QR pairing consumes `events.QR` directly** instead of `GetQRChannel`. The QR
|
||||||
|
channel auto-confirms passkey on `SkipHandoffUX` and disconnects the socket when
|
||||||
|
codes run out — both break an in-flight passkey ceremony. Connecting without it
|
||||||
|
keeps the socket alive for as long as pairing (QR or passkey) needs. QR rotation
|
||||||
|
now pauses while a passkey ceremony is active.
|
||||||
|
- **Public sync fixes** — the release workflow drops the obsolete whatsmeow-lib
|
||||||
|
step, targets `evolution-foundation/*`, and now ships the `passkey-helper`
|
||||||
|
extension to the public repo.
|
||||||
|
|
||||||
|
### 🐛 Bug Fixes
|
||||||
|
- **`POST /instance/pair` returned an empty `PairingCode`** — the handler
|
||||||
|
swallowed `PairPhone` errors and returned HTTP 200 with `PairingCode: ""`, and
|
||||||
|
the client wasn't connected/awaiting-auth before `PairPhone`. Now starts the
|
||||||
|
instance, waits for the websocket, and surfaces real errors (#21).
|
||||||
|
- **`GET /instance/status` returned 400 after a manual disconnect** — now returns
|
||||||
|
200 with the disconnected status instead of erroring until a container restart
|
||||||
|
(#20).
|
||||||
|
|
||||||
|
### 🏷️ Org rename
|
||||||
|
- Repository references updated from **EvolutionAPI** to **evolution-foundation**
|
||||||
|
(module path, imports, GitHub URLs, submodule URLs).
|
||||||
|
|
||||||
|
## v0.7.1
|
||||||
|
|
||||||
|
**Docker:** `evoapicloud/evolution-go:0.7.1`
|
||||||
|
|
||||||
|
### 🆕 New Features
|
||||||
|
- **Test-send modal in Manager** — new modal in the embedded manager UI to test message sending directly from the panel, covering text, media and interactive message types. Useful for validating an instance right after pairing without leaving the manager.
|
||||||
|
|
||||||
|
### 🔧 Improvements / CI
|
||||||
|
- **whatsmeow-lib SHA now pinned in the public sync** — the `sync-releases` workflow previously re-cloned whatsmeow `main` on every run, so the SHA listed in the CHANGELOG could drift from what the public repos actually built against. The workflow now captures the SHA from the dev submodule and checks out that exact commit in the target, restoring release reproducibility.
|
||||||
|
- **Repository cleanup** — dropped tracked binaries (`evolution-go`, `build/server`), IDE config (`.idea/`) and scratch files (`DIFF-COMPLETO.txt`, `API-INTERACTIVE-DOCS.txt`, `carousel-sender.html`). Expanded `.gitignore` to prevent reincidence.
|
||||||
|
|
||||||
|
### 📝 Docs
|
||||||
|
- **Postman collection** — added `Set Proxy` request and multipart hints on `/send/media`; collection file renamed from `Evolution GO.postman_collection (2).json` to `Evolution GO.postman_collection.json`.
|
||||||
|
- **Interactive messages docs** — additional examples and corrections.
|
||||||
|
|
||||||
|
## v0.7.0
|
||||||
|
|
||||||
|
**Docker:** `evoapicloud/evolution-go:0.7.0`
|
||||||
|
|
||||||
|
### 🆕 New Features
|
||||||
|
- **Multi-platform interactive messages** — Buttons, lists and carousel working on Android, iOS and WhatsApp Web/Desktop
|
||||||
|
- **SendButton**: removed `ViewOnceMessage` wrapper that blocked rendering on iOS and WhatsApp Web; `Footer` and `Header` are now conditional
|
||||||
|
- **SendList**: migrated from `InteractiveMessage`/`NativeFlowMessage` to legacy `ListMessage` (native protobuf) for broad compatibility
|
||||||
|
- **SendCarousel**: new endpoint `POST /send/carousel` with cards (image, text, footer, buttons) and automatic JPEG thumbnail generation for instant image loading
|
||||||
|
- `whatsmeow-lib`: added `biz` node for `InteractiveMessage` and pinned `product_list` type on the `biz` node for `ListMessage`
|
||||||
|
- **Base64 media support on `/send/media`** — The `url` field on `POST /send/media` now also accepts base64-encoded media. When the value does not start with `http://` or `https://`, it is treated as base64 and decoded; reuses the existing `SendMediaFile` flow
|
||||||
|
- **WhatsApp status endpoints** — new `POST /send/status/text` and `POST /send/status/media` publish text/image/video status to `status@broadcast`. Media endpoint supports both JSON (with URL) and multipart/form-data (file upload). Thanks @Eduardo-gato (#15)
|
||||||
|
- **Webhook routing for GROUP / NEWSLETTER** — when the primary `MESSAGE` / `SEND_MESSAGE` / `READ_RECEIPT` subscription is absent, events from `@g.us` chats are forwarded to `GROUP` subscribers and events from `@newsletter` chats to `NEWSLETTER` subscribers. Thanks @oismaelash (#18)
|
||||||
|
|
||||||
|
### 🔧 Improvements
|
||||||
|
- **Proxy protocol** — new optional `protocol` field (and `PROXY_PROTOCOL` env) supporting `http`, `https`, `socks5`. Replaces the hardcoded SOCKS5 dialer with `client.SetProxyAddress`, fixing HTTP-proxy QR pairing (#12). Thanks @TBDevMaster (#13)
|
||||||
|
- **WhatsApp Web version cache** — `fetchWhatsAppWebVersion` now caches the result for 1 hour with a mutex instead of issuing one request per instance startup. Thanks @VitorS0uza (#24)
|
||||||
|
- **Manager flicker fix** — instance page no longer replaces the list with skeleton cards on every 5s polling cycle (`hasLoaded` flag). Thanks @TBDevMaster (#14), closes #11
|
||||||
|
- **`WEBHOOKFILES` → `WEBHOOK_FILES`** — `.env.example`, docker-compose and docs aligned with the env var the runtime actually reads. Thanks @VitorS0uza (#22)
|
||||||
|
- **Dependency cleanup** — removed unused `github.com/evolution-foundation/evo-gate` from `go.mod`
|
||||||
|
- **whatsmeow-lib** bumped to `0923702fb`
|
||||||
|
- **Telemetry removed** — dropped legacy `pkg/telemetry`
|
||||||
|
|
||||||
|
### 🐛 Bug Fixes
|
||||||
|
- **`/message/edit`** — was silently ignored because the edit payload used `Conversation` while the original message was sent as `ExtendedTextMessage`. WhatsApp requires matching types; now the edit uses `ExtendedTextMessage` and the response returns the actual server timestamp instead of the zero value. Closes #16
|
||||||
|
- **Sticker upload to S3/MinIO** — when `webp.Decode` or `png.Encode` failed, the whole media pipeline aborted and the sticker was lost from the webhook. Now we log a warning and keep the raw `.webp` bytes so the sticker still reaches the bucket. Closes #5
|
||||||
|
- **Multipart `/send/media`** — the binary-upload branch silently dropped `mentionAll`, `mentionedJid` and `quoted`. These fields now parse from the form (with `mentionedJid` accepting repeated or comma-separated values) and reach the send service. Closes #2
|
||||||
|
|
||||||
|
### ⚠️ Breaking changes
|
||||||
|
- **Proxy** — previously all proxies were forced through SOCKS5. If you run SOCKS5 on a non-standard port (anything outside 1080/2080/42000-43000), set `PROXY_PROTOCOL=socks5` in the env or pass `"protocol": "socks5"` in the proxy body explicitly — otherwise the new protocol inference will fall back to HTTP.
|
||||||
|
|
||||||
|
### 📝 Docs
|
||||||
|
- **README** — updated WhatsApp support number and issue templates
|
||||||
|
- **Interactive messages guide** — new `docs/wiki/guias-api/api-interactive.md`
|
||||||
|
- **Proxy docs** — environment variables, configuration guide and API reference updated with the new `protocol` field
|
||||||
|
|
||||||
## v0.6.1
|
## v0.6.1
|
||||||
|
|
||||||
### 🆕 New Features
|
### 🆕 New Features
|
||||||
@@ -227,7 +333,7 @@
|
|||||||
|
|
||||||
- **Docker Hub**: `evoapicloud/evolution-go`
|
- **Docker Hub**: `evoapicloud/evolution-go`
|
||||||
- **Documentation**: Swagger available at `/swagger/`
|
- **Documentation**: Swagger available at `/swagger/`
|
||||||
- **GitHub**: [Evolution API Go](https://github.com/EvolutionAPI/evolution-go)
|
- **GitHub**: [Evolution API Go](https://github.com/evolution-foundation/evolution-go)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
+5
-5
@@ -7,10 +7,8 @@ WORKDIR /build
|
|||||||
# Copiar apenas arquivos de dependências primeiro para cachear o download
|
# Copiar apenas arquivos de dependências primeiro para cachear o download
|
||||||
COPY go.mod go.sum ./
|
COPY go.mod go.sum ./
|
||||||
|
|
||||||
# Copiar whatsmeow-lib que é uma dependência local
|
# whatsmeow agora vem do proxy oficial (go.mau.fi/whatsmeow, sem replace local) —
|
||||||
COPY whatsmeow-lib/ ./whatsmeow-lib/
|
# não há mais submódulo whatsmeow-lib para copiar.
|
||||||
|
|
||||||
# Agora fazer download das dependências (com replace funcionando)
|
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
|
|
||||||
# Copiar o restante do código
|
# Copiar o restante do código
|
||||||
@@ -21,12 +19,14 @@ RUN CGO_ENABLED=1 go build -ldflags "-X main.version=${VERSION}" -o server ./cmd
|
|||||||
|
|
||||||
FROM alpine:3.19.1 AS final
|
FROM alpine:3.19.1 AS final
|
||||||
|
|
||||||
RUN apk update && apk add --no-cache tzdata ffmpeg libjpeg-turbo libwebp
|
# poppler-utils provides pdftoppm, used to rasterize PDF page 1 for /send/media document thumbnails
|
||||||
|
RUN apk update && apk add --no-cache tzdata ffmpeg libjpeg-turbo libwebp poppler-utils
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY --from=build /build/server .
|
COPY --from=build /build/server .
|
||||||
COPY --from=build /build/manager/dist ./manager/dist
|
COPY --from=build /build/manager/dist ./manager/dist
|
||||||
|
COPY --from=build /build/VERSION ./VERSION
|
||||||
|
|
||||||
ENV TZ=America/Sao_Paulo
|
ENV TZ=America/Sao_Paulo
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,19 @@
|
|||||||
|
# Evolution Go License
|
||||||
|
|
||||||
|
Evolution Go is licensed under the Apache License 2.0, with the following additional conditions:
|
||||||
|
|
||||||
|
1. Evolution Go may be utilized commercially, including as a backend service for other applications or as an application development platform for enterprises. Should the conditions below be met, a commercial license must be obtained from the producer:
|
||||||
|
|
||||||
|
a. **LOGO and copyright information**: In the process of using Evolution Go's frontend components, you may not remove or modify the LOGO or copyright information in the Evolution Go console or applications. This restriction is inapplicable to uses of Evolution Go that do not involve its frontend components.
|
||||||
|
|
||||||
|
b. **Usage Notification Requirement**: If Evolution Go is used as part of any project, including closed-source systems (e.g., proprietary software), the user is required to display a clear notification within the system that Evolution Go is being utilized. This notification should be visible to system administrators and accessible from the system's documentation or settings page. Failure to comply with this requirement may result in the necessity for a commercial license, as determined by the producer.
|
||||||
|
|
||||||
|
Please contact [email protected] to inquire about licensing matters.
|
||||||
|
|
||||||
|
Apart from the specific conditions mentioned above, all other rights and restrictions follow the Apache License 2.0. Detailed information about the Apache License 2.0 can be found at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
Apache License
|
Apache License
|
||||||
Version 2.0, January 2004
|
Version 2.0, January 2004
|
||||||
http://www.apache.org/licenses/
|
http://www.apache.org/licenses/
|
||||||
@@ -9,7 +25,8 @@
|
|||||||
"License" shall mean the terms and conditions for use, reproduction,
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity granting the License.
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
other entities that control, are controlled by, or are under common
|
other entities that control, are controlled by, or are under common
|
||||||
@@ -34,16 +51,15 @@
|
|||||||
"Work" shall mean the work of authorship, whether in Source or
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
Object form, made available under the License, as indicated by a
|
Object form, made available under the License, as indicated by a
|
||||||
copyright notice that is included in or attached to the work
|
copyright notice that is included in or attached to the work
|
||||||
(which shall not include communications that are solely written
|
(an example is provided in the Appendix below).
|
||||||
by copyright holders to be excluded from the License).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
form, that is based upon (or derived from) the Work and for which the
|
form, that is based on (or derived from) the Work and for which the
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
of this License, Derivative Works shall not include works that remain
|
of this License, Derivative Works shall not include works that remain
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
the Work and derivative works thereof.
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
"Contribution" shall mean any work of authorship, including
|
||||||
the original version of the Work and any modifications or additions
|
the original version of the Work and any modifications or additions
|
||||||
@@ -53,10 +69,10 @@
|
|||||||
the copyright owner. For the purposes of this definition, "submitted"
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
means any form of electronic, verbal, or written communication sent
|
means any form of electronic, verbal, or written communication sent
|
||||||
to the Licensor or its representatives, including but not limited to
|
to the Licensor or its representatives, including but not limited to
|
||||||
communication on electronic mailing lists, source code control
|
communication on electronic mailing lists, source code control systems,
|
||||||
systems, and issue tracking systems that are managed by, or on behalf
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
of, the Licensor for the purpose of discussing and improving the Work,
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
but excluding communication that is conspicuously marked or otherwise
|
excluding communication that is conspicuously marked or otherwise
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
@@ -66,13 +82,9 @@
|
|||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
copyright license to use, reproduce, modify, merge, publish,
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
distribute, sublicense, and/or sell copies of the Work, and to
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
permit persons to whom the Work is furnished to do so, subject to
|
Work and such Derivative Works in Source or Object form.
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be
|
|
||||||
included in all copies or substantial portions of the Work.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
@@ -124,7 +136,7 @@
|
|||||||
that such additional attribution notices cannot be construed
|
that such additional attribution notices cannot be construed
|
||||||
as modifying the License.
|
as modifying the License.
|
||||||
|
|
||||||
You may add Your own copyright notice to Your modifications and
|
You may add Your own copyright statement to Your modifications and
|
||||||
may provide additional or different license terms and conditions
|
may provide additional or different license terms and conditions
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
@@ -166,29 +178,20 @@
|
|||||||
other commercial damages or losses), even if such Contributor
|
other commercial damages or losses), even if such Contributor
|
||||||
has been advised of the possibility of such damages.
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
9. Accepting Warranty or Support. You may choose to offer, and to
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
charge a fee for, warranty, support, indemnity or other liability
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
obligations and/or rights consistent with this License. However, in
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
accepting such obligations, You may act only on Your own behalf and
|
or other liability obligations and/or rights consistent with this
|
||||||
on Your sole responsibility, not on behalf of any other Contributor,
|
License. However, in accepting such obligations, You may act only
|
||||||
and only if You agree to indemnify, defend, and hold each Contributor
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
harmless for any liability incurred by, or claims asserted against,
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
such Contributor by reason of your accepting any such warranty or support.
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
Copyright 2026 Evolution Foundation
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
|
||||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
||||||
replaced with your own identifying information. (Don't include
|
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
|
||||||
comment syntax for the file format. We also recommend that a
|
|
||||||
file or class name and description of purpose be included on the
|
|
||||||
same page as the copyright notice for easier identification within
|
|
||||||
third-party archives.
|
|
||||||
|
|
||||||
Copyright 2025 Evolution API
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
@@ -202,21 +205,4 @@
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
|
|
||||||
|
© 2026 Evolution Foundation
|
||||||
ADDITIONAL CONDITIONS:
|
|
||||||
|
|
||||||
1. LOGO and copyright information: In the process of using Evolution Go API's
|
|
||||||
frontend components, you may not remove or modify the LOGO or copyright
|
|
||||||
information in the Evolution API console or applications. This restriction
|
|
||||||
is inapplicable to uses of Evolution Go API that do not involve its frontend
|
|
||||||
components.
|
|
||||||
|
|
||||||
2. Usage Notification Requirement: If Evolution Go API is used as part of any
|
|
||||||
project, including closed-source systems (e.g., proprietary software), the
|
|
||||||
user is required to display a clear notification within the system that
|
|
||||||
Evolution Go API is being utilized. This notification should be visible to
|
|
||||||
system administrators and accessible from the system's documentation or
|
|
||||||
settings page. Failure to comply with this requirement may result in the
|
|
||||||
necessity for a commercial license, as determined by the producer.
|
|
||||||
|
|
||||||
Please contact [email protected] to inquire about licensing matters.
|
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
Evolution Go
|
||||||
|
Copyright 2026 Evolution Foundation
|
||||||
|
|
||||||
|
This product includes software developed by Evolution Foundation
|
||||||
|
(https://evolutionfoundation.com.br).
|
||||||
|
|
||||||
|
Trademark notice
|
||||||
|
"Evolution Foundation", "Evolution" and "Evolution Go" are trademarks of
|
||||||
|
Evolution Foundation. The Evolution Go logo, wordmark, and visual identity
|
||||||
|
are governed by the Trademark and Brand Assets Policy included in this
|
||||||
|
repository (TRADEMARKS.md).
|
||||||
|
|
||||||
|
Third-party attributions
|
||||||
|
|
||||||
|
This product includes software developed by external contributors:
|
||||||
|
|
||||||
|
- whatsmeow (https://github.com/tulir/whatsmeow) by Tulir Asokan, used as the
|
||||||
|
WhatsApp protocol library.
|
||||||
@@ -1,52 +1,73 @@
|
|||||||
|
<p align="center">
|
||||||
|
<a href="https://evolutionfoundation.com.br">
|
||||||
|
<img src="./public/hover-evolution.png" alt="Evolution Foundation" />
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
<h1 align="center">Evolution Go</h1>
|
<h1 align="center">Evolution Go</h1>
|
||||||
|
|
||||||
<div align="center">
|
<p align="center">
|
||||||
|
High-performance WhatsApp API built in Go — part of the Evolution Foundation ecosystem.
|
||||||
|
</p>
|
||||||
|
|
||||||
[](https://hub.docker.com/r/evoapicloud/evolution-go)
|
<p align="center">
|
||||||
[](./LICENSE)
|
<a href="https://github.com/evolution-foundation/evolution-go/releases/latest"><img src="https://img.shields.io/github/v/release/evolution-foundation/evolution-go?include_prereleases&label=version&color=00ffa7" alt="Latest version" /></a>
|
||||||
[](https://golang.org/)
|
<a href="https://opensource.org/licenses/Apache-2.0"><img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" alt="License: Apache 2.0" /></a>
|
||||||
[](https://github.com/EvolutionAPI/evolution-go/stargazers)
|
<a href="https://docs.evolutionfoundation.com.br"><img src="https://img.shields.io/badge/Docs-evolutionfoundation.com.br-00ffa7" alt="Documentation" /></a>
|
||||||
[](https://docs.evolutionfoundation.com.br)
|
<a href="https://evolutionfoundation.com.br/community"><img src="https://img.shields.io/badge/Community-Join%20us-white" alt="Community" /></a>
|
||||||
|
<a href="https://hub.docker.com/r/evoapicloud/evolution-go"><img src="https://img.shields.io/badge/Docker-evoapicloud-blue" alt="Docker image" /></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
</div>
|
<p align="center">
|
||||||
|
<a href="https://evolutionfoundation.com.br">Website</a> ·
|
||||||
|
<a href="https://docs.evolutionfoundation.com.br">Documentation</a> ·
|
||||||
|
<a href="https://evolutionfoundation.com.br/community">Community</a> ·
|
||||||
|
<a href="mailto:suporte@evofoundation.com.br">Support</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
<div align="center"><img src="./public/images/cover.png" width="400"></div>
|
|
||||||
|
---
|
||||||
|
|
||||||
## About
|
## About
|
||||||
|
|
||||||
Evolution Go is a high-performance WhatsApp API built in Go, part of the [Evolution](https://evolutionfoundation.com.br/) ecosystem. It provides a robust, lightweight solution for WhatsApp integration using the [whatsmeow](https://github.com/tulir/whatsmeow) library.
|
**Evolution Go** is a high-performance WhatsApp API built in Go. Part of the Evolution Foundation ecosystem, it provides a robust, lightweight solution for WhatsApp integration using the [whatsmeow](https://github.com/tulir/whatsmeow) library.
|
||||||
|
|
||||||
|
## Part of the Evolution Foundation ecosystem
|
||||||
|
|
||||||
|
Evolution Go is one of the messaging engines maintained by Evolution Foundation. It is used as a WhatsApp provider by the [Evo CRM Community](https://github.com/evolution-foundation/evo-crm-community) and other projects in the ecosystem.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- **High Performance** — Built with Go for minimal resource usage
|
- **High performance** — built with Go for minimal resource usage
|
||||||
- **RESTful API** — Clean, well-documented REST endpoints with Swagger
|
- **RESTful API** — clean, well-documented REST endpoints with Swagger
|
||||||
- **Real-time Events** — WebSocket, Webhook, AMQP/RabbitMQ and NATS support
|
- **Real-time events** — WebSocket, Webhook, AMQP/RabbitMQ and NATS support
|
||||||
- **Media Support** — Images, videos, audio, documents with MinIO/S3 storage
|
- **Media support** — images, videos, audio, documents with MinIO/S3 storage
|
||||||
- **Message Storage** — Optional PostgreSQL persistence
|
- **Message storage** — optional PostgreSQL persistence
|
||||||
- **QR Code Pairing** — Built-in QR code generation for device linking
|
- **QR code pairing** — built-in QR code generation for device linking
|
||||||
- **License Management** — Built-in licensing with registration, activation, and heartbeat
|
- **License management** — built-in licensing with registration, activation, and heartbeat
|
||||||
- **Docker Ready** — Production-ready Docker configuration
|
- **Docker ready** — production-ready Docker configuration
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Quick Start
|
## Quick Start
|
||||||
|
|
||||||
### Docker (Recommended)
|
### Docker (recommended)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/EvolutionAPI/evolution-go.git
|
git clone https://github.com/evolution-foundation/evolution-go.git
|
||||||
cd evolution-go
|
cd evolution-go
|
||||||
make docker-build
|
make docker-build
|
||||||
make docker-run
|
make docker-run
|
||||||
```
|
```
|
||||||
|
|
||||||
### Local Development
|
### Local development
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/EvolutionAPI/evolution-go.git
|
git clone https://github.com/evolution-foundation/evolution-go.git
|
||||||
cd evolution-go
|
cd evolution-go
|
||||||
|
|
||||||
# Clone whatsmeow dependency
|
|
||||||
git clone [email protected]:EvolutionAPI/whatsmeow.git whatsmeow-lib
|
|
||||||
|
|
||||||
# Setup, configure and run
|
# Setup, configure and run
|
||||||
make setup
|
make setup
|
||||||
cp .env.example .env
|
cp .env.example .env
|
||||||
@@ -55,6 +76,8 @@ make dev
|
|||||||
|
|
||||||
> Run `make help` to see all available commands. See [COMMANDS.md](./COMMANDS.md) for detailed workflows.
|
> Run `make help` to see all available commands. See [COMMANDS.md](./COMMANDS.md) for detailed workflows.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
Create a `.env` file:
|
Create a `.env` file:
|
||||||
@@ -87,13 +110,15 @@ LOGTYPE=console
|
|||||||
```
|
```
|
||||||
|
|
||||||
| Variable | Description | Default |
|
| Variable | Description | Default |
|
||||||
|----------|-------------|---------|
|
|---|---|---|
|
||||||
| `SERVER_PORT` | Server port | `8080` |
|
| `SERVER_PORT` | Server port | `8080` |
|
||||||
| `CLIENT_NAME` | Client identifier | `evolution` |
|
| `CLIENT_NAME` | Client identifier | `evolution` |
|
||||||
| `GLOBAL_API_KEY` | API authentication key | **Required** |
|
| `GLOBAL_API_KEY` | API authentication key | **Required** |
|
||||||
| `DATABASE_SAVE_MESSAGES` | Enable message storage | `false` |
|
| `DATABASE_SAVE_MESSAGES` | Enable message storage | `false` |
|
||||||
| `WADEBUG` | WhatsApp debug level | `INFO` |
|
| `WADEBUG` | WhatsApp debug level | `INFO` |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## License Activation
|
## License Activation
|
||||||
|
|
||||||
Evolution Go requires a license to operate. On first run:
|
Evolution Go requires a license to operate. On first run:
|
||||||
@@ -106,6 +131,8 @@ Evolution Go requires a license to operate. On first run:
|
|||||||
|
|
||||||
The license status persists in the database (`runtime_configs` table). Heartbeats are sent periodically to maintain activation.
|
The license status persists in the database (`runtime_configs` table). Heartbeats are sent periodically to maintain activation.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## API Documentation
|
## API Documentation
|
||||||
|
|
||||||
Swagger UI available at:
|
Swagger UI available at:
|
||||||
@@ -117,7 +144,7 @@ http://localhost:8080/swagger/index.html
|
|||||||
### Key Endpoints
|
### Key Endpoints
|
||||||
|
|
||||||
| Method | Endpoint | Description |
|
| Method | Endpoint | Description |
|
||||||
|--------|----------|-------------|
|
|---|---|---|
|
||||||
| `POST` | `/instance/create` | Create WhatsApp instance |
|
| `POST` | `/instance/create` | Create WhatsApp instance |
|
||||||
| `GET` | `/instance/{name}/qrcode` | Get QR code for pairing |
|
| `GET` | `/instance/{name}/qrcode` | Get QR code for pairing |
|
||||||
| `POST` | `/message/sendText` | Send text message |
|
| `POST` | `/message/sendText` | Send text message |
|
||||||
@@ -125,6 +152,8 @@ http://localhost:8080/swagger/index.html
|
|||||||
| `GET` | `/instance/{name}/status` | Get instance status |
|
| `GET` | `/instance/{name}/status` | Get instance status |
|
||||||
| `DELETE` | `/instance/{name}` | Delete instance |
|
| `DELETE` | `/instance/{name}` | Delete instance |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Project Structure
|
## Project Structure
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -136,89 +165,97 @@ evolution-go/
|
|||||||
│ ├── message/ # Message handling
|
│ ├── message/ # Message handling
|
||||||
│ ├── sendMessage/ # Message sending
|
│ ├── sendMessage/ # Message sending
|
||||||
│ ├── routes/ # HTTP routes
|
│ ├── routes/ # HTTP routes
|
||||||
│ ├── middleware/ # Auth & validation middleware
|
│ ├── middleware/ # Auth & validation middleware
|
||||||
│ ├── config/ # Configuration
|
│ ├── config/ # Configuration
|
||||||
│ ├── events/ # Event producers (AMQP, NATS, Webhook, WS)
|
│ ├── events/ # Event producers (AMQP, NATS, Webhook, WS)
|
||||||
│ └── storage/ # Media storage (MinIO)
|
│ └── storage/ # Media storage (MinIO)
|
||||||
├── whatsmeow-lib/ # WhatsApp protocol library
|
|
||||||
├── docs/ # Swagger documentation
|
├── docs/ # Swagger documentation
|
||||||
├── Dockerfile
|
├── Dockerfile
|
||||||
├── Makefile
|
├── Makefile
|
||||||
└── VERSION
|
└── VERSION
|
||||||
```
|
```
|
||||||
|
|
||||||
## Technology Stack
|
---
|
||||||
|
|
||||||
|
## Tech Stack
|
||||||
|
|
||||||
| Component | Technology |
|
| Component | Technology |
|
||||||
|-----------|-----------|
|
|---|---|
|
||||||
| Language | Go 1.24+ |
|
| Language | Go 1.24+ |
|
||||||
| HTTP Framework | Gin |
|
| HTTP framework | Gin |
|
||||||
| WhatsApp | [whatsmeow](https://github.com/tulir/whatsmeow) |
|
| WhatsApp | [whatsmeow](https://github.com/tulir/whatsmeow) |
|
||||||
| Database | PostgreSQL |
|
| Database | PostgreSQL |
|
||||||
| ORM | GORM |
|
| ORM | GORM |
|
||||||
| Message Queue | RabbitMQ, NATS |
|
| Message queue | RabbitMQ, NATS |
|
||||||
| Object Storage | MinIO/S3 |
|
| Object storage | MinIO/S3 |
|
||||||
| Documentation | Swagger/OpenAPI |
|
| Documentation | Swagger/OpenAPI |
|
||||||
| Container | Docker |
|
| Container | Docker |
|
||||||
|
|
||||||
## Documentation & Support
|
---
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
|
||||||
| Resource | Link |
|
| Resource | Link |
|
||||||
|----------|------|
|
|---|---|
|
||||||
| Website | [evolutionfoundation.com.br](https://evolutionfoundation.com.br/) |
|
| Website | [evolutionfoundation.com.br](https://evolutionfoundation.com.br) |
|
||||||
| Documentation | [docs.evolutionfoundation.com.br](https://docs.evolutionfoundation.com.br/) |
|
| Documentation | [docs.evolutionfoundation.com.br](https://docs.evolutionfoundation.com.br) |
|
||||||
| Community | [evolutionfoundation.com.br/community](https://evolutionfoundation.com.br/community) |
|
| Community | [evolutionfoundation.com.br/community](https://evolutionfoundation.com.br/community) |
|
||||||
| WhatsApp Support | [+55 31 7503-8350](https://wa.me/553175038350) |
|
| Docker Hub | [evoapicloud/evolution-go](https://hub.docker.com/r/evoapicloud/evolution-go) |
|
||||||
| GitHub Issues | [evolution-go/issues](https://github.com/EvolutionAPI/evolution-go/issues) |
|
| Changelog | [CHANGELOG.md](./CHANGELOG.md) |
|
||||||
|
| Contributing | [CONTRIBUTING.md](./CONTRIBUTING.md) |
|
||||||
## Hosting
|
| Security | [SECURITY.md](./SECURITY.md) |
|
||||||
|
|
||||||
Deploy Evolution Go with optimized infrastructure:
|
|
||||||
|
|
||||||
| Product | Link |
|
|
||||||
|---------|------|
|
|
||||||
| Evolution Go VPS | [Hostgator - Evo Go](https://www.hostgator.com.br/52579-144-3-55.html) |
|
|
||||||
| Evolution API VPS | [Hostgator - Evo API](https://www.hostgator.com.br/servidor-vps/hospedagem-evo-api/lp-afiliado) |
|
|
||||||
|
|
||||||
## Contributing
|
|
||||||
|
|
||||||
1. Fork the repository
|
|
||||||
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
|
||||||
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
|
|
||||||
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
||||||
5. Open a Pull Request
|
|
||||||
|
|
||||||
## Security
|
|
||||||
|
|
||||||
For security concerns, please email: contato@evolution-api.com
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
Evolution Go is licensed under the Apache License 2.0, with the following additional conditions:
|
|
||||||
|
|
||||||
1. **Logo and copyright**: You may not remove or modify the logo or copyright information in the Evolution console or applications when using frontend components.
|
|
||||||
|
|
||||||
2. **Usage notification**: If Evolution Go is used as part of any project (including closed-source), a clear notification that Evolution Go is being utilized must be visible to system administrators.
|
|
||||||
|
|
||||||
Please contact contato@evolution-api.com for licensing inquiries. Full license details at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0).
|
|
||||||
|
|
||||||
## Acknowledgments
|
|
||||||
|
|
||||||
- [whatsmeow](https://github.com/tulir/whatsmeow) by [tulir](https://github.com/tulir)
|
|
||||||
- [Evolution API](https://github.com/EvolutionAPI/evolution-api)
|
|
||||||
|
|
||||||
## Telemetry
|
|
||||||
|
|
||||||
Evolution Go collects anonymous telemetry data (routes used, API version) to improve the service. No sensitive or personal data is collected.
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<div align="center">
|
## Hosting
|
||||||
|
|
||||||
**Evolution Go** — High-Performance WhatsApp API
|
Deploy Evolution Go with optimized infrastructure through our HostGator partnership:
|
||||||
|
|
||||||
Made with ❤️ by the [Evolution Team](https://evolutionfoundation.com.br/)
|
[**Evolution Go VPS — HostGator**](https://evolution-api.com/vps-evolution-go)
|
||||||
|
|
||||||
© 2025 Evolution Foundation
|
---
|
||||||
|
|
||||||
</div>
|
## Telemetry
|
||||||
|
|
||||||
|
Evolution Go collects anonymous telemetry data (routes used, API version) to help improve the service. **No sensitive or personal data is collected.**
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
|
||||||
|
Contributions are welcome! Please read [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines on how to submit issues, propose features, and open pull requests.
|
||||||
|
|
||||||
|
Join our [community](https://evolutionfoundation.com.br/community) to discuss ideas and collaborate.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Security
|
||||||
|
|
||||||
|
For security issues, **do not open a public issue**. Email **[email protected]** or use GitHub's private vulnerability reporting. See [SECURITY.md](./SECURITY.md) for details.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Acknowledgments
|
||||||
|
|
||||||
|
- [whatsmeow](https://github.com/tulir/whatsmeow) by [Tulir Asokan](https://github.com/tulir) — WhatsApp protocol library
|
||||||
|
- [Evolution API](https://github.com/evolution-foundation/evolution-api) — Node.js sister project
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
Evolution Go is licensed under the Apache License 2.0, with additional brand-protection conditions (LOGO/copyright preservation and Usage Notification requirement). See [LICENSE](./LICENSE) for full details.
|
||||||
|
|
||||||
|
For licensing inquiries, contact **[email protected]**.
|
||||||
|
|
||||||
|
## Trademarks
|
||||||
|
|
||||||
|
"Evolution Foundation", "Evolution" and "Evolution Go" are trademarks of Evolution Foundation. See [TRADEMARKS.md](./TRADEMARKS.md) for the brand assets policy.
|
||||||
|
|
||||||
|
Third-party attributions are documented in [NOTICE](./NOTICE).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
Made by <a href="https://evolutionfoundation.com.br">Evolution Foundation</a> · © 2026
|
||||||
|
</p>
|
||||||
+101
@@ -0,0 +1,101 @@
|
|||||||
|
# Evolution Go — Trademark and Brand Assets Policy
|
||||||
|
|
||||||
|
Version 1.0, 2026.05.06
|
||||||
|
|
||||||
|
"Evolution Foundation", "Evolution" and "Evolution Go" are trademarks of
|
||||||
|
Evolution Foundation. The "evolution-go" wordmark and the Evolution Go
|
||||||
|
logo are trademarks of Evolution Foundation.
|
||||||
|
|
||||||
|
## 1. Scope and purpose
|
||||||
|
|
||||||
|
This policy governs the use of Evolution Go trademarks and brand assets.
|
||||||
|
It is intended to protect users from confusion and to preserve the official
|
||||||
|
Evolution Go visual identity.
|
||||||
|
|
||||||
|
This policy applies to any use of:
|
||||||
|
(a) the product names and marks "Evolution Foundation", "Evolution" and "Evolution Go";
|
||||||
|
(b) the official logo and wordmark: the "evolution-go" wordmark and any
|
||||||
|
associated icon in neon green;
|
||||||
|
(c) the copyright line "© 2026 Evolution Foundation"; and
|
||||||
|
(d) any materials that implement or express the Evolution Go official look
|
||||||
|
and feel, including the Protected Visual Identity Elements listed in Section 3.
|
||||||
|
|
||||||
|
This policy does not change the software license for the source code, which is
|
||||||
|
licensed under the Apache License 2.0. This policy controls only trademarks and
|
||||||
|
brand assets.
|
||||||
|
|
||||||
|
## 2. Permitted trademark and brand asset use
|
||||||
|
|
||||||
|
2.1. You may truthfully refer to Evolution Go to describe that your software
|
||||||
|
is based on, compatible with, or derived from this project, provided that such
|
||||||
|
use does not imply endorsement by Evolution Foundation.
|
||||||
|
|
||||||
|
2.2. You may distribute and publicly host unmodified official builds of
|
||||||
|
Evolution Go that include Evolution Go brand assets, provided that you
|
||||||
|
comply with Section 3 and do not suggest endorsement beyond being an official
|
||||||
|
unmodified build.
|
||||||
|
|
||||||
|
2.3. You may use Evolution Go marks in nominative ways, such as
|
||||||
|
"based on Evolution Go", provided that the use is accurate and does not
|
||||||
|
create confusion.
|
||||||
|
|
||||||
|
## 3. Protected Visual Identity Elements (Brand Assets)
|
||||||
|
|
||||||
|
The following are the "Protected Visual Identity Elements":
|
||||||
|
(a) Product names and marks: "Evolution Foundation", "Evolution" and "Evolution Go";
|
||||||
|
(b) Official logo and wordmark: the "evolution-go" wordmark and any associated icon;
|
||||||
|
(c) Copyright line: "© 2026 Evolution Foundation";
|
||||||
|
(d) Official palette:
|
||||||
|
Background main: #0a0a0a
|
||||||
|
Background cards and popovers: #0a0a0a
|
||||||
|
Sidebar background: #171717
|
||||||
|
Primary neon green: #00ffa7
|
||||||
|
Primary green for light mode references: #01b274
|
||||||
|
Main text: #fafafa
|
||||||
|
Muted text: #a1a1a1
|
||||||
|
Borders and inputs: #262626
|
||||||
|
Muted background: #262626
|
||||||
|
Ring and focus: #555555
|
||||||
|
(e) Typography: ui sans serif, system ui, sans serif with base size 16px;
|
||||||
|
(f) Border radius: 0.625rem (10px) as the default component radius.
|
||||||
|
|
||||||
|
## 4. Restrictions for forks, modified versions, and redistributions
|
||||||
|
|
||||||
|
4.1. **No modification of Protected Visual Identity Elements when using
|
||||||
|
Evolution Go brand assets.** If you distribute or publicly host any version
|
||||||
|
of the user interface that uses Evolution Go brand assets, you may not
|
||||||
|
remove, replace, modify, disable, or bypass any Protected Visual Identity Element.
|
||||||
|
|
||||||
|
4.2. **Modified UI must remove Evolution Go brand assets.**
|
||||||
|
If you distribute or publicly host a modified user interface or user experience
|
||||||
|
(including changes to branding or visual identity), you must:
|
||||||
|
(a) remove and replace all Evolution Go trademarks and brand assets from
|
||||||
|
the user interface, product name display, and related marketing materials
|
||||||
|
for that distribution; and
|
||||||
|
(b) choose a name and branding that are clearly distinct from Evolution Go.
|
||||||
|
|
||||||
|
4.3. **No endorsement.**
|
||||||
|
You may not use Evolution Go trademarks or brand assets in a way that
|
||||||
|
implies Evolution Foundation sponsors, endorses, or is affiliated with your
|
||||||
|
distribution, except for unmodified official builds.
|
||||||
|
|
||||||
|
4.4. **No derivative works of the logo and wordmark.**
|
||||||
|
You may not modify, adapt, recolor, redesign, or create derivative works of the
|
||||||
|
Evolution Go logo or wordmark.
|
||||||
|
|
||||||
|
## 5. Permission requests
|
||||||
|
|
||||||
|
Any use not expressly permitted by this policy requires prior written permission
|
||||||
|
from Evolution Foundation. Contact: **[email protected]**.
|
||||||
|
|
||||||
|
## 6. Enforcement and termination
|
||||||
|
|
||||||
|
Any violation of this policy terminates your permission to use Evolution Go
|
||||||
|
brand assets. You must promptly cease use and remove Evolution Go trademarks
|
||||||
|
and brand assets from your distribution and any public hosting.
|
||||||
|
|
||||||
|
## 7. Disclaimer
|
||||||
|
|
||||||
|
This policy is provided "as is" and does not grant any rights beyond what is
|
||||||
|
expressly stated. All rights not expressly granted are reserved by Evolution
|
||||||
|
Foundation.
|
||||||
+54
-50
@@ -9,8 +9,8 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"os/signal"
|
"os/signal"
|
||||||
"strings"
|
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"strings"
|
||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -21,59 +21,63 @@ import (
|
|||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
_ "modernc.org/sqlite"
|
_ "modernc.org/sqlite"
|
||||||
|
|
||||||
call_handler "github.com/EvolutionAPI/evolution-go/pkg/call/handler"
|
call_handler "github.com/evolution-foundation/evolution-go/pkg/call/handler"
|
||||||
call_service "github.com/EvolutionAPI/evolution-go/pkg/call/service"
|
call_service "github.com/evolution-foundation/evolution-go/pkg/call/service"
|
||||||
chat_handler "github.com/EvolutionAPI/evolution-go/pkg/chat/handler"
|
chat_handler "github.com/evolution-foundation/evolution-go/pkg/chat/handler"
|
||||||
chat_service "github.com/EvolutionAPI/evolution-go/pkg/chat/service"
|
chat_service "github.com/evolution-foundation/evolution-go/pkg/chat/service"
|
||||||
community_handler "github.com/EvolutionAPI/evolution-go/pkg/community/handler"
|
community_handler "github.com/evolution-foundation/evolution-go/pkg/community/handler"
|
||||||
community_service "github.com/EvolutionAPI/evolution-go/pkg/community/service"
|
community_service "github.com/evolution-foundation/evolution-go/pkg/community/service"
|
||||||
config "github.com/EvolutionAPI/evolution-go/pkg/config"
|
config "github.com/evolution-foundation/evolution-go/pkg/config"
|
||||||
"github.com/EvolutionAPI/evolution-go/pkg/core"
|
"github.com/evolution-foundation/evolution-go/pkg/core"
|
||||||
producer_interfaces "github.com/EvolutionAPI/evolution-go/pkg/events/interfaces"
|
producer_interfaces "github.com/evolution-foundation/evolution-go/pkg/events/interfaces"
|
||||||
nats_producer "github.com/EvolutionAPI/evolution-go/pkg/events/nats"
|
nats_producer "github.com/evolution-foundation/evolution-go/pkg/events/nats"
|
||||||
rabbitmq_producer "github.com/EvolutionAPI/evolution-go/pkg/events/rabbitmq"
|
rabbitmq_producer "github.com/evolution-foundation/evolution-go/pkg/events/rabbitmq"
|
||||||
webhook_producer "github.com/EvolutionAPI/evolution-go/pkg/events/webhook"
|
webhook_producer "github.com/evolution-foundation/evolution-go/pkg/events/webhook"
|
||||||
websocket_producer "github.com/EvolutionAPI/evolution-go/pkg/events/websocket"
|
websocket_producer "github.com/evolution-foundation/evolution-go/pkg/events/websocket"
|
||||||
group_handler "github.com/EvolutionAPI/evolution-go/pkg/group/handler"
|
group_handler "github.com/evolution-foundation/evolution-go/pkg/group/handler"
|
||||||
group_service "github.com/EvolutionAPI/evolution-go/pkg/group/service"
|
group_service "github.com/evolution-foundation/evolution-go/pkg/group/service"
|
||||||
instance_handler "github.com/EvolutionAPI/evolution-go/pkg/instance/handler"
|
instance_handler "github.com/evolution-foundation/evolution-go/pkg/instance/handler"
|
||||||
instance_model "github.com/EvolutionAPI/evolution-go/pkg/instance/model"
|
instance_model "github.com/evolution-foundation/evolution-go/pkg/instance/model"
|
||||||
instance_repository "github.com/EvolutionAPI/evolution-go/pkg/instance/repository"
|
instance_repository "github.com/evolution-foundation/evolution-go/pkg/instance/repository"
|
||||||
instance_service "github.com/EvolutionAPI/evolution-go/pkg/instance/service"
|
instance_service "github.com/evolution-foundation/evolution-go/pkg/instance/service"
|
||||||
label_handler "github.com/EvolutionAPI/evolution-go/pkg/label/handler"
|
label_handler "github.com/evolution-foundation/evolution-go/pkg/label/handler"
|
||||||
label_model "github.com/EvolutionAPI/evolution-go/pkg/label/model"
|
label_model "github.com/evolution-foundation/evolution-go/pkg/label/model"
|
||||||
label_repository "github.com/EvolutionAPI/evolution-go/pkg/label/repository"
|
label_repository "github.com/evolution-foundation/evolution-go/pkg/label/repository"
|
||||||
label_service "github.com/EvolutionAPI/evolution-go/pkg/label/service"
|
label_service "github.com/evolution-foundation/evolution-go/pkg/label/service"
|
||||||
logger_wrapper "github.com/EvolutionAPI/evolution-go/pkg/logger"
|
logger_wrapper "github.com/evolution-foundation/evolution-go/pkg/logger"
|
||||||
message_handler "github.com/EvolutionAPI/evolution-go/pkg/message/handler"
|
message_handler "github.com/evolution-foundation/evolution-go/pkg/message/handler"
|
||||||
message_model "github.com/EvolutionAPI/evolution-go/pkg/message/model"
|
message_model "github.com/evolution-foundation/evolution-go/pkg/message/model"
|
||||||
message_repository "github.com/EvolutionAPI/evolution-go/pkg/message/repository"
|
message_repository "github.com/evolution-foundation/evolution-go/pkg/message/repository"
|
||||||
message_service "github.com/EvolutionAPI/evolution-go/pkg/message/service"
|
message_service "github.com/evolution-foundation/evolution-go/pkg/message/service"
|
||||||
auth_middleware "github.com/EvolutionAPI/evolution-go/pkg/middleware"
|
auth_middleware "github.com/evolution-foundation/evolution-go/pkg/middleware"
|
||||||
newsletter_handler "github.com/EvolutionAPI/evolution-go/pkg/newsletter/handler"
|
newsletter_handler "github.com/evolution-foundation/evolution-go/pkg/newsletter/handler"
|
||||||
newsletter_service "github.com/EvolutionAPI/evolution-go/pkg/newsletter/service"
|
newsletter_service "github.com/evolution-foundation/evolution-go/pkg/newsletter/service"
|
||||||
poll_handler "github.com/EvolutionAPI/evolution-go/pkg/poll/handler"
|
passkey_handler "github.com/evolution-foundation/evolution-go/pkg/passkey/handler"
|
||||||
routes "github.com/EvolutionAPI/evolution-go/pkg/routes"
|
poll_handler "github.com/evolution-foundation/evolution-go/pkg/poll/handler"
|
||||||
send_handler "github.com/EvolutionAPI/evolution-go/pkg/sendMessage/handler"
|
routes "github.com/evolution-foundation/evolution-go/pkg/routes"
|
||||||
send_service "github.com/EvolutionAPI/evolution-go/pkg/sendMessage/service"
|
send_handler "github.com/evolution-foundation/evolution-go/pkg/sendMessage/handler"
|
||||||
server_handler "github.com/EvolutionAPI/evolution-go/pkg/server/handler"
|
send_service "github.com/evolution-foundation/evolution-go/pkg/sendMessage/service"
|
||||||
storage_interfaces "github.com/EvolutionAPI/evolution-go/pkg/storage/interfaces"
|
server_handler "github.com/evolution-foundation/evolution-go/pkg/server/handler"
|
||||||
minio_storage "github.com/EvolutionAPI/evolution-go/pkg/storage/minio"
|
storage_interfaces "github.com/evolution-foundation/evolution-go/pkg/storage/interfaces"
|
||||||
"github.com/EvolutionAPI/evolution-go/pkg/telemetry"
|
minio_storage "github.com/evolution-foundation/evolution-go/pkg/storage/minio"
|
||||||
user_handler "github.com/EvolutionAPI/evolution-go/pkg/user/handler"
|
user_handler "github.com/evolution-foundation/evolution-go/pkg/user/handler"
|
||||||
user_service "github.com/EvolutionAPI/evolution-go/pkg/user/service"
|
user_service "github.com/evolution-foundation/evolution-go/pkg/user/service"
|
||||||
whatsmeow_service "github.com/EvolutionAPI/evolution-go/pkg/whatsmeow/service"
|
whatsmeow_service "github.com/evolution-foundation/evolution-go/pkg/whatsmeow/service"
|
||||||
amqp "github.com/rabbitmq/amqp091-go"
|
amqp "github.com/rabbitmq/amqp091-go"
|
||||||
)
|
)
|
||||||
|
|
||||||
var devMode = flag.Bool("dev", false, "Enable development mode")
|
var devMode = flag.Bool("dev", false, "Enable development mode")
|
||||||
|
|
||||||
var version = "dev"
|
var version = "0.0.0"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
if version == "dev" {
|
// ldflags -X main.version= sets this at compile time.
|
||||||
|
// If not set (or still default), try reading from VERSION file.
|
||||||
|
if version == "0.0.0" {
|
||||||
if v, err := os.ReadFile("VERSION"); err == nil {
|
if v, err := os.ReadFile("VERSION"); err == nil {
|
||||||
version = strings.TrimSpace(string(v))
|
if trimmed := strings.TrimSpace(string(v)); trimmed != "" {
|
||||||
|
version = trimmed
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -196,8 +200,6 @@ func setupRouter(db *gorm.DB, authDB *sql.DB, sqliteDB *sql.DB, config *config.C
|
|||||||
// NOVO: PollHandler usando PollService já inicializado no whatsmeowService (evita dupla inicialização)
|
// NOVO: PollHandler usando PollService já inicializado no whatsmeowService (evita dupla inicialização)
|
||||||
pollHandler := poll_handler.NewPollHandler(whatsmeowService.GetPollService(), loggerWrapper)
|
pollHandler := poll_handler.NewPollHandler(whatsmeowService.GetPollService(), loggerWrapper)
|
||||||
|
|
||||||
telemetry := telemetry.NewTelemetryService()
|
|
||||||
|
|
||||||
r := gin.Default()
|
r := gin.Default()
|
||||||
|
|
||||||
// CORS middleware — must be before everything else
|
// CORS middleware — must be before everything else
|
||||||
@@ -214,13 +216,15 @@ func setupRouter(db *gorm.DB, authDB *sql.DB, sqliteDB *sql.DB, config *config.C
|
|||||||
c.Next()
|
c.Next()
|
||||||
})
|
})
|
||||||
|
|
||||||
r.Use(telemetry.TelemetryMiddleware())
|
|
||||||
|
|
||||||
r.Use(core.GateMiddleware(runtimeCtx))
|
r.Use(core.GateMiddleware(runtimeCtx))
|
||||||
|
|
||||||
// License routes (always accessible, even without license)
|
// License routes (always accessible, even without license)
|
||||||
core.LicenseRoutes(r, runtimeCtx)
|
core.LicenseRoutes(r, runtimeCtx)
|
||||||
|
|
||||||
|
// Passkey ceremony routes — PUBLIC (called by the browser extension from the
|
||||||
|
// web.whatsapp.com origin, gated only by an opaque ephemeral token).
|
||||||
|
passkey_handler.RegisterRoutes(r, whatsmeowService)
|
||||||
|
|
||||||
routes.NewRouter(
|
routes.NewRouter(
|
||||||
auth_middleware.NewMiddleware(config, instanceService),
|
auth_middleware.NewMiddleware(config, instanceService),
|
||||||
instance_handler.NewInstanceHandler(instanceService, config),
|
instance_handler.NewInstanceHandler(instanceService, config),
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ LOG_COMPRESS=true
|
|||||||
CONNECT_ON_STARTUP=false
|
CONNECT_ON_STARTUP=false
|
||||||
|
|
||||||
# Enviar arquivos via webhook
|
# Enviar arquivos via webhook
|
||||||
WEBHOOKFILES=true
|
WEBHOOK_FILES=true
|
||||||
|
|
||||||
# Nome do sistema operacional
|
# Nome do sistema operacional
|
||||||
OS_NAME=Linux
|
OS_NAME=Linux
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ services:
|
|||||||
|
|
||||||
# Conexão
|
# Conexão
|
||||||
CONNECT_ON_STARTUP: "false"
|
CONNECT_ON_STARTUP: "false"
|
||||||
WEBHOOKFILES: "true"
|
WEBHOOK_FILES: "true"
|
||||||
|
|
||||||
# Sistema
|
# Sistema
|
||||||
OS_NAME: "Linux"
|
OS_NAME: "Linux"
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ services:
|
|||||||
|
|
||||||
# Conexão
|
# Conexão
|
||||||
CONNECT_ON_STARTUP: "true"
|
CONNECT_ON_STARTUP: "true"
|
||||||
WEBHOOKFILES: "true"
|
WEBHOOK_FILES: "true"
|
||||||
|
|
||||||
# Sistema
|
# Sistema
|
||||||
OS_NAME: "Linux"
|
OS_NAME: "Linux"
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ services:
|
|||||||
|
|
||||||
# Conexão
|
# Conexão
|
||||||
CONNECT_ON_STARTUP: "false"
|
CONNECT_ON_STARTUP: "false"
|
||||||
WEBHOOKFILES: "true"
|
WEBHOOK_FILES: "true"
|
||||||
|
|
||||||
# Sistema
|
# Sistema
|
||||||
OS_NAME: "Linux"
|
OS_NAME: "Linux"
|
||||||
|
|||||||
@@ -0,0 +1,89 @@
|
|||||||
|
version: '3.8'
|
||||||
|
|
||||||
|
services:
|
||||||
|
evolution_go:
|
||||||
|
image: intrategica/evg:1
|
||||||
|
networks:
|
||||||
|
- papi
|
||||||
|
environment:
|
||||||
|
# Servidor
|
||||||
|
SERVER_PORT: 3300
|
||||||
|
CLIENT_NAME: "evolution"
|
||||||
|
|
||||||
|
# Segurança (ALTERE a chave abaixo)
|
||||||
|
GLOBAL_API_KEY: "429683C4C977415CAAFCCE10F7D57E11"
|
||||||
|
|
||||||
|
# Banco de Dados PostgreSQL (serviço 'postgres' já existente)
|
||||||
|
POSTGRES_AUTH_DB: "postgresql://pastorini:pastorini123@postgres:5432/pastorini_api?sslmode=disable"
|
||||||
|
POSTGRES_USERS_DB: "postgresql://pastorini:pastorini123@postgres:5432/pastorini_api?sslmode=disable"
|
||||||
|
POSTGRES_HOST: "postgres"
|
||||||
|
POSTGRES_PORT: "5432"
|
||||||
|
POSTGRES_USER: "pastorini"
|
||||||
|
POSTGRES_PASSWORD: "pastorini123"
|
||||||
|
POSTGRES_DB: "pastorini_api"
|
||||||
|
DATABASE_SAVE_MESSAGES: "false"
|
||||||
|
|
||||||
|
# Logs e Debug
|
||||||
|
WADEBUG: "INFO"
|
||||||
|
LOGTYPE: "console"
|
||||||
|
LOG_DIRECTORY: "/app/logs"
|
||||||
|
LOG_MAX_SIZE: "100"
|
||||||
|
LOG_MAX_BACKUPS: "5"
|
||||||
|
LOG_MAX_AGE: "30"
|
||||||
|
LOG_COMPRESS: "true"
|
||||||
|
|
||||||
|
# Conexão
|
||||||
|
CONNECT_ON_STARTUP: "true"
|
||||||
|
WEBHOOKFILES: "true"
|
||||||
|
|
||||||
|
# Sistema
|
||||||
|
OS_NAME: "Linux"
|
||||||
|
|
||||||
|
# Eventos
|
||||||
|
EVENT_IGNORE_GROUP: "false"
|
||||||
|
EVENT_IGNORE_STATUS: "true"
|
||||||
|
|
||||||
|
# MinIO/S3 (Opcional)
|
||||||
|
MINIO_ENABLED: "false"
|
||||||
|
MINIO_ENDPOINT: ""
|
||||||
|
MINIO_ACCESS_KEY: ""
|
||||||
|
MINIO_SECRET_KEY: ""
|
||||||
|
MINIO_BUCKET: ""
|
||||||
|
MINIO_USE_SSL: "false"
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- evolution_go_data:/app/dbdata
|
||||||
|
- evolution_go_logs:/app/logs
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
replicas: 1
|
||||||
|
placement:
|
||||||
|
constraints:
|
||||||
|
- node.role == manager
|
||||||
|
restart_policy:
|
||||||
|
condition: on-failure
|
||||||
|
delay: 5s
|
||||||
|
max_attempts: 3
|
||||||
|
labels:
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.docker.network=papi
|
||||||
|
- traefik.http.routers.evocrm.rule=Host(`evocrm.intrategica.com.br`)
|
||||||
|
- traefik.http.routers.evocrm.entrypoints=websecure
|
||||||
|
- traefik.http.routers.evocrm.tls=true
|
||||||
|
- traefik.http.routers.evocrm.tls.certresolver=letsencryptresolver
|
||||||
|
- traefik.http.routers.evocrm.service=evocrm
|
||||||
|
- traefik.http.services.evocrm.loadbalancer.server.port=3300
|
||||||
|
- traefik.http.services.evocrm.loadbalancer.passHostHeader=true
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
evolution_go_data:
|
||||||
|
external: true
|
||||||
|
name: evolution_go_data
|
||||||
|
evolution_go_logs:
|
||||||
|
external: true
|
||||||
|
name: evolution_go_logs
|
||||||
|
|
||||||
|
networks:
|
||||||
|
papi:
|
||||||
|
external: true
|
||||||
|
name: papi
|
||||||
+11390
-360
File diff suppressed because it is too large.
Load diff
+11390
-360
File diff suppressed because it is too large.
Load diff
+7983
-285
File diff suppressed because it is too large.
Load diff
@@ -85,7 +85,7 @@ services:
|
|||||||
WADEBUG: "INFO"
|
WADEBUG: "INFO"
|
||||||
LOGTYPE: "console"
|
LOGTYPE: "console"
|
||||||
CONNECT_ON_STARTUP: "false"
|
CONNECT_ON_STARTUP: "false"
|
||||||
WEBHOOKFILES: "true"
|
WEBHOOK_FILES: "true"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- evolution_data:/app/dbdata
|
- evolution_data:/app/dbdata
|
||||||
@@ -469,7 +469,7 @@ data:
|
|||||||
WADEBUG: "INFO"
|
WADEBUG: "INFO"
|
||||||
LOGTYPE: "console"
|
LOGTYPE: "console"
|
||||||
CONNECT_ON_STARTUP: "false"
|
CONNECT_ON_STARTUP: "false"
|
||||||
WEBHOOKFILES: "true"
|
WEBHOOK_FILES: "true"
|
||||||
DATABASE_SAVE_MESSAGES: "false"
|
DATABASE_SAVE_MESSAGES: "false"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ LOGTYPE=console
|
|||||||
|
|
||||||
# Configurações de desenvolvimento
|
# Configurações de desenvolvimento
|
||||||
CONNECT_ON_STARTUP=false
|
CONNECT_ON_STARTUP=false
|
||||||
WEBHOOKFILES=true
|
WEBHOOK_FILES=true
|
||||||
OS_NAME=Linux
|
OS_NAME=Linux
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -211,7 +211,7 @@ CONNECT_ON_STARTUP=false
|
|||||||
|
|
||||||
**Recomendação**: `false` para maior controle sobre o ciclo de vida das instâncias.
|
**Recomendação**: `false` para maior controle sobre o ciclo de vida das instâncias.
|
||||||
|
|
||||||
### WEBHOOKFILES
|
### WEBHOOK_FILES
|
||||||
|
|
||||||
Envia URLs de mídia nos payloads de webhook.
|
Envia URLs de mídia nos payloads de webhook.
|
||||||
|
|
||||||
@@ -219,7 +219,7 @@ Envia URLs de mídia nos payloads de webhook.
|
|||||||
- **Padrão**: `true`
|
- **Padrão**: `true`
|
||||||
|
|
||||||
```env
|
```env
|
||||||
WEBHOOKFILES=true
|
WEBHOOK_FILES=true
|
||||||
```
|
```
|
||||||
|
|
||||||
### QRCODE_MAX_COUNT
|
### QRCODE_MAX_COUNT
|
||||||
@@ -540,7 +540,7 @@ LOGTYPE=console
|
|||||||
|
|
||||||
# Comportamento
|
# Comportamento
|
||||||
CONNECT_ON_STARTUP=false
|
CONNECT_ON_STARTUP=false
|
||||||
WEBHOOKFILES=true
|
WEBHOOK_FILES=true
|
||||||
CHECK_USER_EXISTS=true
|
CHECK_USER_EXISTS=true
|
||||||
EVENT_IGNORE_STATUS=true
|
EVENT_IGNORE_STATUS=true
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ DATABASE_SAVE_MESSAGES=false
|
|||||||
WADEBUG=DEBUG
|
WADEBUG=DEBUG
|
||||||
LOGTYPE=console
|
LOGTYPE=console
|
||||||
CONNECT_ON_STARTUP=false
|
CONNECT_ON_STARTUP=false
|
||||||
WEBHOOKFILES=true
|
WEBHOOK_FILES=true
|
||||||
OS_NAME=Linux
|
OS_NAME=Linux
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -224,7 +224,7 @@ O servidor estará disponível em `http://localhost:4000` com documentação Swa
|
|||||||
|
|
||||||
- **Grupo WhatsApp**: [evolution-api.com/whatsapp](https://evolution-api.com/whatsapp)
|
- **Grupo WhatsApp**: [evolution-api.com/whatsapp](https://evolution-api.com/whatsapp)
|
||||||
- **Discord**: [evolution-api.com/discord](https://evolution-api.com/discord)
|
- **Discord**: [evolution-api.com/discord](https://evolution-api.com/discord)
|
||||||
- **GitHub Issues**: [github.com/EvolutionAPI/evolution-go](https://github.com/EvolutionAPI/evolution-go/issues)
|
- **GitHub Issues**: [github.com/evolution-foundation/evolution-go](https://github.com/evolution-foundation/evolution-go/issues)
|
||||||
- **Documentação**: [doc.evolution-api.com](https://doc.evolution-api.com)
|
- **Documentação**: [doc.evolution-api.com](https://doc.evolution-api.com)
|
||||||
|
|
||||||
## Licença
|
## Licença
|
||||||
|
|||||||
@@ -0,0 +1,724 @@
|
|||||||
|
# API de Mensagens Interativas
|
||||||
|
|
||||||
|
Documentação completa dos endpoints para enviar mensagens interativas no WhatsApp: botões, listas e carrosséis. Todos os endpoints são compatíveis com **Android**, **iOS (iPhone)** e **WhatsApp Web/Desktop**.
|
||||||
|
|
||||||
|
## 📋 Índice
|
||||||
|
|
||||||
|
- [Enviar Botões](#enviar-botões)
|
||||||
|
- [Enviar Lista](#enviar-lista)
|
||||||
|
- [Enviar Carrossel](#enviar-carrossel)
|
||||||
|
- [Evento ButtonClick (Rastreio)](#evento-buttonclick)
|
||||||
|
- [Tipos de Botões](#tipos-de-botões)
|
||||||
|
- [Notas de Compatibilidade](#notas-de-compatibilidade)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Enviar Botões
|
||||||
|
|
||||||
|
Envia uma mensagem com botões interativos. Suporta botões de resposta rápida (reply), URL, ligação (call), cópia (copy) e PIX.
|
||||||
|
|
||||||
|
**Endpoint**: `POST /send/button`
|
||||||
|
|
||||||
|
**Headers**:
|
||||||
|
```
|
||||||
|
Content-Type: application/json
|
||||||
|
apikey: SUA-CHAVE-API
|
||||||
|
```
|
||||||
|
|
||||||
|
**Body**:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"number": "5511999999999",
|
||||||
|
"title": "Título da Mensagem",
|
||||||
|
"description": "Texto do corpo da mensagem",
|
||||||
|
"footer": "Texto do rodapé",
|
||||||
|
"buttons": [
|
||||||
|
{
|
||||||
|
"type": "reply",
|
||||||
|
"displayText": "Texto do Botão",
|
||||||
|
"id": "identificador_unico"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"delay": 1000,
|
||||||
|
"quoted": {
|
||||||
|
"messageId": "BAE5..."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Parâmetros**:
|
||||||
|
|
||||||
|
| Campo | Tipo | Obrigatório | Descrição |
|
||||||
|
|-------|------|-------------|-----------|
|
||||||
|
| `number` | string | ✅ Sim | Número do destinatário (formato: DDI + DDD + número) |
|
||||||
|
| `description` | string | ✅ Sim | Texto do corpo da mensagem |
|
||||||
|
| `buttons` | array | ✅ Sim | Array de botões (ver [Tipos de Botões](#tipos-de-botões)) |
|
||||||
|
| `title` | string | ❌ Não | Título exibido em negrito acima do corpo |
|
||||||
|
| `footer` | string | ❌ Não | Texto pequeno no rodapé. **Não enviar vazio** |
|
||||||
|
| `delay` | int32 | ❌ Não | Delay em milissegundos antes de enviar |
|
||||||
|
| `mentionedJid` | string | ❌ Não | JID do usuário a mencionar |
|
||||||
|
| `mentionAll` | bool | ❌ Não | Mencionar todos os participantes (apenas grupos) |
|
||||||
|
| `formatJid` | bool | ❌ Não | Formatar número automaticamente (padrão: true) |
|
||||||
|
| `quoted` | object | ❌ Não | Mensagem a ser citada |
|
||||||
|
|
||||||
|
**Resposta de Sucesso (200)**:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"message": "success",
|
||||||
|
"data": {
|
||||||
|
"Info": {
|
||||||
|
"ID": "3EB034D434158AD2CC0B9A",
|
||||||
|
"Chat": "[email protected]",
|
||||||
|
"Type": "ButtonMessage",
|
||||||
|
"Timestamp": "2026-04-01T17:54:09Z"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Resposta de Erro (400)**:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"error": "phone number is required"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Exemplo 1: Botões Quick Reply
|
||||||
|
|
||||||
|
Máximo 3 botões. Não pode misturar com outros tipos.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -X POST http://localhost:4000/send/button \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-H "apikey: SUA-CHAVE-API" \
|
||||||
|
-d '{
|
||||||
|
"number": "5511999999999",
|
||||||
|
"title": "Atendimento",
|
||||||
|
"description": "Como podemos ajudar você hoje?",
|
||||||
|
"footer": "Responda clicando em um botão",
|
||||||
|
"buttons": [
|
||||||
|
{"type": "reply", "displayText": "Suporte Técnico", "id": "suporte"},
|
||||||
|
{"type": "reply", "displayText": "Financeiro", "id": "financeiro"},
|
||||||
|
{"type": "reply", "displayText": "Vendas", "id": "vendas"}
|
||||||
|
]
|
||||||
|
}'
|
||||||
|
```
|
||||||
|
|
||||||
|
### Exemplo 2: Botões Mistos (URL + Call + Copy)
|
||||||
|
|
||||||
|
Podem ser combinados entre si livremente.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -X POST http://localhost:4000/send/button \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-H "apikey: SUA-CHAVE-API" \
|
||||||
|
-d '{
|
||||||
|
"number": "5511999999999",
|
||||||
|
"title": "Nossos Canais",
|
||||||
|
"description": "Escolha como deseja entrar em contato:",
|
||||||
|
"footer": "Empresa XYZ",
|
||||||
|
"buttons": [
|
||||||
|
{"type": "url", "displayText": "Acessar Site", "url": "https://empresa.com"},
|
||||||
|
{"type": "call", "displayText": "Ligar para Nós", "phoneNumber": "+5511999999999"},
|
||||||
|
{"type": "copy", "displayText": "Copiar Email", "copyCode": "[email protected]"}
|
||||||
|
]
|
||||||
|
}'
|
||||||
|
```
|
||||||
|
|
||||||
|
### Exemplo 3: Botão PIX
|
||||||
|
|
||||||
|
Deve ser enviado **sozinho**, sem outros botões.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -X POST http://localhost:4000/send/button \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-H "apikey: SUA-CHAVE-API" \
|
||||||
|
-d '{
|
||||||
|
"number": "5511999999999",
|
||||||
|
"title": "Pagamento PIX",
|
||||||
|
"description": "Realize o pagamento via PIX:",
|
||||||
|
"buttons": [
|
||||||
|
{
|
||||||
|
"type": "pix",
|
||||||
|
"currency": "BRL",
|
||||||
|
"name": "Empresa XYZ LTDA",
|
||||||
|
"keyType": "CNPJ",
|
||||||
|
"key": "12345678000199"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}'
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Enviar Lista
|
||||||
|
|
||||||
|
Envia uma mensagem com lista de opções organizadas em seções. O usuário toca no botão para abrir a lista e seleciona uma opção.
|
||||||
|
|
||||||
|
**Endpoint**: `POST /send/list`
|
||||||
|
|
||||||
|
**Headers**:
|
||||||
|
```
|
||||||
|
Content-Type: application/json
|
||||||
|
apikey: SUA-CHAVE-API
|
||||||
|
```
|
||||||
|
|
||||||
|
**Body**:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"number": "5511999999999",
|
||||||
|
"title": "Título da Lista",
|
||||||
|
"description": "Texto do corpo da mensagem",
|
||||||
|
"buttonText": "Texto do botão que abre a lista",
|
||||||
|
"footerText": "Texto do rodapé",
|
||||||
|
"sections": [
|
||||||
|
{
|
||||||
|
"title": "Nome da Seção",
|
||||||
|
"rows": [
|
||||||
|
{
|
||||||
|
"title": "Título da Opção",
|
||||||
|
"description": "Descrição da opção",
|
||||||
|
"rowId": "identificador_unico"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"delay": 1000,
|
||||||
|
"quoted": {
|
||||||
|
"messageId": "BAE5..."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Parâmetros**:
|
||||||
|
|
||||||
|
| Campo | Tipo | Obrigatório | Descrição |
|
||||||
|
|-------|------|-------------|-----------|
|
||||||
|
| `number` | string | ✅ Sim | Número do destinatário |
|
||||||
|
| `description` | string | ✅ Sim | Texto do corpo da mensagem |
|
||||||
|
| `sections` | array | ✅ Sim | Array de seções contendo rows |
|
||||||
|
| `buttonText` | string | ❌ Não | Texto do botão que abre a lista (padrão: "Ver Menu") |
|
||||||
|
| `title` | string | ❌ Não | Título em negrito no topo |
|
||||||
|
| `footerText` | string | ❌ Não | Texto do rodapé |
|
||||||
|
| `delay` | int32 | ❌ Não | Delay em milissegundos antes de enviar |
|
||||||
|
| `mentionedJid` | string | ❌ Não | JID do usuário a mencionar |
|
||||||
|
| `mentionAll` | bool | ❌ Não | Mencionar todos (apenas grupos) |
|
||||||
|
| `formatJid` | bool | ❌ Não | Formatar número automaticamente |
|
||||||
|
| `quoted` | object | ❌ Não | Mensagem a ser citada |
|
||||||
|
|
||||||
|
**Parâmetros da Seção**:
|
||||||
|
|
||||||
|
| Campo | Tipo | Obrigatório | Descrição |
|
||||||
|
|-------|------|-------------|-----------|
|
||||||
|
| `title` | string | ✅ Sim | Nome da seção |
|
||||||
|
| `rows` | array | ✅ Sim | Array de opções da seção |
|
||||||
|
|
||||||
|
**Parâmetros da Row**:
|
||||||
|
|
||||||
|
| Campo | Tipo | Obrigatório | Descrição |
|
||||||
|
|-------|------|-------------|-----------|
|
||||||
|
| `title` | string | ✅ Sim | Texto da opção |
|
||||||
|
| `description` | string | ❌ Não | Descrição da opção |
|
||||||
|
| `rowId` | string | ✅ Sim | ID único para rastreio do clique |
|
||||||
|
|
||||||
|
**Resposta de Sucesso (200)**:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"message": "success",
|
||||||
|
"data": {
|
||||||
|
"Info": {
|
||||||
|
"ID": "3EB0C5A277F7F9B6C599",
|
||||||
|
"Chat": "[email protected]",
|
||||||
|
"Type": "ListMessage",
|
||||||
|
"Timestamp": "2026-04-01T18:00:00Z"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Resposta de Erro (400)**:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"error": "sections are required"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Exemplo 1: Cardápio Digital
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -X POST http://localhost:4000/send/list \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-H "apikey: SUA-CHAVE-API" \
|
||||||
|
-d '{
|
||||||
|
"number": "5511999999999",
|
||||||
|
"title": "Cardápio Digital",
|
||||||
|
"description": "Escolha um item do nosso cardápio:",
|
||||||
|
"buttonText": "Ver Cardápio",
|
||||||
|
"footerText": "Restaurante XYZ",
|
||||||
|
"sections": [
|
||||||
|
{
|
||||||
|
"title": "Pratos Principais",
|
||||||
|
"rows": [
|
||||||
|
{"title": "Filé Mignon", "description": "Com arroz e batata - R$ 45,90", "rowId": "file_mignon"},
|
||||||
|
{"title": "Salmão Grelhado", "description": "Com legumes - R$ 52,90", "rowId": "salmao"},
|
||||||
|
{"title": "Frango Parmegiana", "description": "Com purê - R$ 35,90", "rowId": "frango"}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Bebidas",
|
||||||
|
"rows": [
|
||||||
|
{"title": "Suco Natural", "description": "Laranja, Limão ou Maracujá - R$ 8,00", "rowId": "suco"},
|
||||||
|
{"title": "Refrigerante", "description": "Lata 350ml - R$ 6,00", "rowId": "refri"},
|
||||||
|
{"title": "Água Mineral", "description": "500ml - R$ 4,00", "rowId": "agua"}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Sobremesas",
|
||||||
|
"rows": [
|
||||||
|
{"title": "Pudim", "description": "R$ 12,00", "rowId": "pudim"},
|
||||||
|
{"title": "Petit Gâteau", "description": "R$ 18,00", "rowId": "petit_gateau"}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}'
|
||||||
|
```
|
||||||
|
|
||||||
|
### Exemplo 2: Menu de Serviços
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -X POST http://localhost:4000/send/list \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-H "apikey: SUA-CHAVE-API" \
|
||||||
|
-d '{
|
||||||
|
"number": "5511999999999",
|
||||||
|
"description": "Selecione o serviço desejado:",
|
||||||
|
"buttonText": "Ver Serviços",
|
||||||
|
"sections": [
|
||||||
|
{
|
||||||
|
"title": "Atendimento",
|
||||||
|
"rows": [
|
||||||
|
{"title": "Falar com Atendente", "description": "Atendimento humano", "rowId": "atendente"},
|
||||||
|
{"title": "FAQ", "description": "Perguntas frequentes", "rowId": "faq"},
|
||||||
|
{"title": "Abrir Ticket", "description": "Registrar ocorrência", "rowId": "ticket"}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}'
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Enviar Carrossel
|
||||||
|
|
||||||
|
Envia uma mensagem com cards deslizáveis (carrossel), cada um com imagem, texto, rodapé e botões. Ideal para catálogos de produtos, planos e portfólios.
|
||||||
|
|
||||||
|
**Endpoint**: `POST /send/carousel`
|
||||||
|
|
||||||
|
**Headers**:
|
||||||
|
```
|
||||||
|
Content-Type: application/json
|
||||||
|
apikey: SUA-CHAVE-API
|
||||||
|
```
|
||||||
|
|
||||||
|
**Body**:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"number": "5511999999999",
|
||||||
|
"body": "Texto do corpo principal",
|
||||||
|
"footer": "Texto do rodapé principal",
|
||||||
|
"cards": [
|
||||||
|
{
|
||||||
|
"header": {
|
||||||
|
"title": "Título do Card",
|
||||||
|
"imageUrl": "https://url-da-imagem.com/foto.jpg"
|
||||||
|
},
|
||||||
|
"body": "Texto do corpo do card",
|
||||||
|
"footer": "Rodapé do card",
|
||||||
|
"buttons": [
|
||||||
|
{
|
||||||
|
"type": "REPLY",
|
||||||
|
"displayText": "Texto do Botão",
|
||||||
|
"id": "id_rastreio"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"delay": 1000,
|
||||||
|
"quoted": {
|
||||||
|
"messageId": "BAE5..."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Parâmetros**:
|
||||||
|
|
||||||
|
| Campo | Tipo | Obrigatório | Descrição |
|
||||||
|
|-------|------|-------------|-----------|
|
||||||
|
| `number` | string | ✅ Sim | Número do destinatário |
|
||||||
|
| `cards` | array | ✅ Sim | Array de cards (mínimo 2, máximo ~10) |
|
||||||
|
| `body` | string | ❌ Não | Texto do corpo principal (acima dos cards) |
|
||||||
|
| `footer` | string | ❌ Não | Rodapé principal |
|
||||||
|
| `delay` | int32 | ❌ Não | Delay em milissegundos antes de enviar |
|
||||||
|
| `formatJid` | bool | ❌ Não | Formatar número automaticamente |
|
||||||
|
| `quoted` | object | ❌ Não | Mensagem a ser citada |
|
||||||
|
|
||||||
|
**Parâmetros do Card**:
|
||||||
|
|
||||||
|
| Campo | Tipo | Obrigatório | Descrição |
|
||||||
|
|-------|------|-------------|-----------|
|
||||||
|
| `header` | object | ✅ Sim | Cabeçalho do card (deve conter imagem) |
|
||||||
|
| `header.title` | string | ❌ Não | Título do card |
|
||||||
|
| `header.subtitle` | string | ❌ Não | Subtítulo do card |
|
||||||
|
| `header.imageUrl` | string | ✅ Sim* | URL da imagem do card |
|
||||||
|
| `header.videoUrl` | string | ❌ Não | URL de vídeo (alternativa à imagem) |
|
||||||
|
| `body` | string | ✅ Sim | Texto do corpo do card |
|
||||||
|
| `footer` | string | ❌ Não | Rodapé do card |
|
||||||
|
| `buttons` | array | ❌ Não | Array de botões do card |
|
||||||
|
|
||||||
|
> ⚠️ **Importante**: Todos os cards **devem** ter imagem (`imageUrl`) para o carrossel renderizar corretamente em todos os dispositivos. As imagens recebem thumbnail JPEG automaticamente para carregamento instantâneo.
|
||||||
|
|
||||||
|
**Parâmetros do Botão do Card**:
|
||||||
|
|
||||||
|
| Campo | Tipo | Obrigatório | Descrição |
|
||||||
|
|-------|------|-------------|-----------|
|
||||||
|
| `type` | string | ❌ Não | Tipo do botão: `REPLY`, `URL`, `CALL`, `COPY` (padrão: `REPLY`) |
|
||||||
|
| `displayText` | string | ✅ Sim | Texto visível do botão |
|
||||||
|
| `id` | string | ✅ Sim* | ID para rastreio (reply) ou URL/telefone (url/call) |
|
||||||
|
| `copyCode` | string | ✅ Sim* | Texto a copiar (apenas tipo `COPY`) |
|
||||||
|
|
||||||
|
**Resposta de Sucesso (200)**:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"message": "success",
|
||||||
|
"data": {
|
||||||
|
"Info": {
|
||||||
|
"ID": "3EB0C5A277F7F9B6C599",
|
||||||
|
"Chat": "[email protected]",
|
||||||
|
"Type": "InteractiveMessage",
|
||||||
|
"Timestamp": "2026-04-01T18:30:00Z"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Resposta de Erro (400)**:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"error": "cards are required (minimum 1)"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Exemplo 1: Catálogo de Produtos
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -X POST http://localhost:4000/send/carousel \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-H "apikey: SUA-CHAVE-API" \
|
||||||
|
-d '{
|
||||||
|
"number": "5511999999999",
|
||||||
|
"body": "Confira nossos produtos em destaque!",
|
||||||
|
"footer": "Loja Virtual XYZ",
|
||||||
|
"cards": [
|
||||||
|
{
|
||||||
|
"header": {
|
||||||
|
"title": "Smartphone Pro Max",
|
||||||
|
"imageUrl": "https://placehold.co/600x400/1a1a2e/white?text=Smartphone"
|
||||||
|
},
|
||||||
|
"body": "Tela 6.7 AMOLED, 256GB, Câmera 108MP.\nDe R$ 4.999 por R$ 3.799!",
|
||||||
|
"footer": "12x sem juros",
|
||||||
|
"buttons": [
|
||||||
|
{"type": "REPLY", "displayText": "Comprar", "id": "comprar_smartphone"},
|
||||||
|
{"type": "URL", "displayText": "Ver Detalhes", "id": "https://loja.com/smartphone"}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"header": {
|
||||||
|
"title": "Notebook Ultra",
|
||||||
|
"imageUrl": "https://placehold.co/600x400/16213e/white?text=Notebook"
|
||||||
|
},
|
||||||
|
"body": "Intel i7, 16GB RAM, SSD 512GB, Tela 15.6 FHD.\nPor apenas R$ 5.299!",
|
||||||
|
"footer": "Frete grátis",
|
||||||
|
"buttons": [
|
||||||
|
{"type": "REPLY", "displayText": "Comprar", "id": "comprar_notebook"},
|
||||||
|
{"type": "URL", "displayText": "Ver Detalhes", "id": "https://loja.com/notebook"}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"header": {
|
||||||
|
"title": "Fone Bluetooth",
|
||||||
|
"imageUrl": "https://placehold.co/600x400/0f3460/white?text=Fone"
|
||||||
|
},
|
||||||
|
"body": "Cancelamento de ruído ativo, 30h bateria.\nR$ 299,90",
|
||||||
|
"footer": "Envio imediato",
|
||||||
|
"buttons": [
|
||||||
|
{"type": "REPLY", "displayText": "Comprar", "id": "comprar_fone"},
|
||||||
|
{"type": "CALL", "displayText": "Ligar p/ Comprar", "id": "+5511999999999"}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}'
|
||||||
|
```
|
||||||
|
|
||||||
|
### Exemplo 2: Planos de Serviço
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -X POST http://localhost:4000/send/carousel \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-H "apikey: SUA-CHAVE-API" \
|
||||||
|
-d '{
|
||||||
|
"number": "5511999999999",
|
||||||
|
"body": "Conheça nossos planos:",
|
||||||
|
"cards": [
|
||||||
|
{
|
||||||
|
"header": {
|
||||||
|
"title": "Plano Básico",
|
||||||
|
"imageUrl": "https://placehold.co/600x400/2ecc71/white?text=Basico"
|
||||||
|
},
|
||||||
|
"body": "Ideal para pequenas empresas.\n- 1.000 mensagens/mês\n- 1 instância\n- Suporte email\n\nR$ 97/mês",
|
||||||
|
"buttons": [
|
||||||
|
{"type": "REPLY", "displayText": "Contratar Básico", "id": "plano_basico"},
|
||||||
|
{"type": "COPY", "displayText": "Copiar Link", "copyCode": "https://planos.com/basico"}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"header": {
|
||||||
|
"title": "Plano Pro",
|
||||||
|
"imageUrl": "https://placehold.co/600x400/3498db/white?text=Pro"
|
||||||
|
},
|
||||||
|
"body": "Para empresas em crescimento.\n- 10.000 mensagens/mês\n- 5 instâncias\n- Suporte prioritário\n\nR$ 297/mês",
|
||||||
|
"buttons": [
|
||||||
|
{"type": "REPLY", "displayText": "Contratar Pro", "id": "plano_pro"},
|
||||||
|
{"type": "COPY", "displayText": "Copiar Link", "copyCode": "https://planos.com/pro"}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"header": {
|
||||||
|
"title": "Plano Enterprise",
|
||||||
|
"imageUrl": "https://placehold.co/600x400/9b59b6/white?text=Enterprise"
|
||||||
|
},
|
||||||
|
"body": "Solução completa.\n- Mensagens ilimitadas\n- Instâncias ilimitadas\n- Suporte 24/7\n\nSob consulta",
|
||||||
|
"buttons": [
|
||||||
|
{"type": "REPLY", "displayText": "Solicitar Orçamento", "id": "plano_enterprise"},
|
||||||
|
{"type": "CALL", "displayText": "Falar com Vendas", "id": "+5511999999999"}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}'
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Evento ButtonClick
|
||||||
|
|
||||||
|
Quando um usuário clica em um botão, seleciona um item de lista ou interage com um card de carrossel, a API dispara o evento `ButtonClick` para todos os canais configurados na instância.
|
||||||
|
|
||||||
|
### Canais de Disparo
|
||||||
|
|
||||||
|
- **Webhook** - Callback HTTP para URL configurada
|
||||||
|
- **WebSocket** - Evento em tempo real
|
||||||
|
- **RabbitMQ** - Mensagem na fila
|
||||||
|
- **NATS** - Mensagem no tópico
|
||||||
|
|
||||||
|
### Requisito
|
||||||
|
|
||||||
|
A instância deve ter o evento `BUTTON_CLICK` ou `MESSAGE` habilitado na configuração de events.
|
||||||
|
|
||||||
|
### Payload do Evento
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"event": "ButtonClick",
|
||||||
|
"data": {
|
||||||
|
"buttonId": "suporte",
|
||||||
|
"buttonText": "Suporte Técnico",
|
||||||
|
"type": "native_flow_response",
|
||||||
|
"phone": "5511999999999",
|
||||||
|
"jid": "[email protected]",
|
||||||
|
"pushName": "João Silva",
|
||||||
|
"messageId": "3EB034D434158AD2CC0B9A",
|
||||||
|
"chat": "[email protected]",
|
||||||
|
"fromMe": false,
|
||||||
|
"timestamp": 1711990500,
|
||||||
|
"extraData": {}
|
||||||
|
},
|
||||||
|
"instanceToken": "token_da_instancia",
|
||||||
|
"instanceId": "uuid-da-instancia",
|
||||||
|
"instanceName": "nome_da_instancia"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Campos do Evento
|
||||||
|
|
||||||
|
| Campo | Tipo | Descrição |
|
||||||
|
|-------|------|-----------|
|
||||||
|
| `buttonId` | string | ID do botão/row clicado (conforme definido no envio) |
|
||||||
|
| `buttonText` | string | Texto exibido no botão/row |
|
||||||
|
| `type` | string | Tipo de resposta (ver tabela abaixo) |
|
||||||
|
| `phone` | string | Número do usuário que clicou |
|
||||||
|
| `jid` | string | JID completo do usuário |
|
||||||
|
| `pushName` | string | Nome do contato no WhatsApp |
|
||||||
|
| `messageId` | string | ID da mensagem de resposta |
|
||||||
|
| `chat` | string | JID do chat |
|
||||||
|
| `fromMe` | bool | Se a mensagem é própria |
|
||||||
|
| `timestamp` | int64 | Timestamp Unix do clique |
|
||||||
|
|
||||||
|
### Tipos de Resposta
|
||||||
|
|
||||||
|
| Valor de `type` | Origem |
|
||||||
|
|-----------------|--------|
|
||||||
|
| `native_flow_response` | Clique em botão enviado via `/send/button` ou `/send/carousel` |
|
||||||
|
| `list_response` | Seleção de item em lista enviada via `/send/list` |
|
||||||
|
| `buttons_response` | Resposta a botões legados (ButtonsMessage) |
|
||||||
|
| `template_button_reply` | Resposta a template buttons |
|
||||||
|
|
||||||
|
### Exemplo: Botão Reply Clicado
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"event": "ButtonClick",
|
||||||
|
"data": {
|
||||||
|
"buttonId": "vendas",
|
||||||
|
"buttonText": "Vendas",
|
||||||
|
"type": "native_flow_response",
|
||||||
|
"phone": "5511999999999",
|
||||||
|
"jid": "[email protected]",
|
||||||
|
"pushName": "Maria Santos",
|
||||||
|
"messageId": "3EB0XXXXXXXXXXXXXX",
|
||||||
|
"chat": "[email protected]",
|
||||||
|
"fromMe": false,
|
||||||
|
"timestamp": 1711991000
|
||||||
|
},
|
||||||
|
"instanceToken": "teste123",
|
||||||
|
"instanceId": "4ee8ab07-8a67-42a8-a029-f382315912b1",
|
||||||
|
"instanceName": "minha_instancia"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Exemplo: Item de Lista Selecionado
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"event": "ButtonClick",
|
||||||
|
"data": {
|
||||||
|
"buttonId": "file_mignon",
|
||||||
|
"buttonText": "Filé Mignon",
|
||||||
|
"type": "list_response",
|
||||||
|
"phone": "5511999999999",
|
||||||
|
"jid": "[email protected]",
|
||||||
|
"pushName": "Pedro Oliveira",
|
||||||
|
"messageId": "3EB0XXXXXXXXXXXXXX",
|
||||||
|
"chat": "[email protected]",
|
||||||
|
"fromMe": false,
|
||||||
|
"timestamp": 1711991500
|
||||||
|
},
|
||||||
|
"instanceToken": "teste123",
|
||||||
|
"instanceId": "4ee8ab07-8a67-42a8-a029-f382315912b1",
|
||||||
|
"instanceName": "minha_instancia"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Exemplo: Botão de Carrossel Clicado
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"event": "ButtonClick",
|
||||||
|
"data": {
|
||||||
|
"buttonId": "comprar_smartphone",
|
||||||
|
"buttonText": "Comprar",
|
||||||
|
"type": "native_flow_response",
|
||||||
|
"phone": "5511999999999",
|
||||||
|
"jid": "[email protected]",
|
||||||
|
"pushName": "Ana Costa",
|
||||||
|
"messageId": "3EB0XXXXXXXXXXXXXX",
|
||||||
|
"chat": "[email protected]",
|
||||||
|
"fromMe": false,
|
||||||
|
"timestamp": 1711992000
|
||||||
|
},
|
||||||
|
"instanceToken": "teste123",
|
||||||
|
"instanceId": "4ee8ab07-8a67-42a8-a029-f382315912b1",
|
||||||
|
"instanceName": "minha_instancia"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Tipos de Botões
|
||||||
|
|
||||||
|
### Resumo por Endpoint
|
||||||
|
|
||||||
|
| Tipo | SendButton | SendCarousel | Campo obrigatório |
|
||||||
|
|------|-----------|-------------|-------------------|
|
||||||
|
| Reply | `"reply"` | `"REPLY"` (padrão) | `displayText`, `id` |
|
||||||
|
| URL | `"url"` | `"URL"` | `displayText`, `url` ou `id` |
|
||||||
|
| Call | `"call"` | `"CALL"` | `displayText`, `phoneNumber` ou `id` |
|
||||||
|
| Copy | `"copy"` | `"COPY"` | `displayText`, `copyCode` |
|
||||||
|
| PIX | `"pix"` | N/A | `currency`, `name`, `keyType`, `key` |
|
||||||
|
|
||||||
|
### Regras de Combinação
|
||||||
|
|
||||||
|
- **Reply**: Máximo 3 botões. **Não** pode misturar com outros tipos no mesmo envio.
|
||||||
|
- **PIX**: Deve ser enviado **sozinho**, sem outros botões.
|
||||||
|
- **URL / Call / Copy**: Podem ser combinados livremente entre si.
|
||||||
|
- **Carrossel**: Todos os tipos (exceto PIX) podem ser combinados no mesmo card.
|
||||||
|
- **Lista**: Não possui botões nos items. Usa `rowId` para rastreio.
|
||||||
|
|
||||||
|
### Estrutura de Cada Tipo
|
||||||
|
|
||||||
|
**Reply** (Resposta Rápida):
|
||||||
|
```json
|
||||||
|
{"type": "reply", "displayText": "Suporte", "id": "btn_suporte"}
|
||||||
|
```
|
||||||
|
|
||||||
|
**URL** (Abre Link):
|
||||||
|
```json
|
||||||
|
{"type": "url", "displayText": "Acessar Site", "url": "https://empresa.com"}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Call** (Ligação):
|
||||||
|
```json
|
||||||
|
{"type": "call", "displayText": "Ligar Agora", "phoneNumber": "+5511999999999"}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Copy** (Copiar Texto):
|
||||||
|
```json
|
||||||
|
{"type": "copy", "displayText": "Copiar Código", "copyCode": "DESCONTO20"}
|
||||||
|
```
|
||||||
|
|
||||||
|
**PIX** (Pagamento):
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"type": "pix",
|
||||||
|
"currency": "BRL",
|
||||||
|
"name": "Empresa XYZ",
|
||||||
|
"keyType": "CPF",
|
||||||
|
"key": "12345678901"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Notas de Compatibilidade
|
||||||
|
|
||||||
|
### Regras para Funcionamento em Todos os Dispositivos
|
||||||
|
|
||||||
|
| Regra | Detalhe |
|
||||||
|
|-------|---------|
|
||||||
|
| Footer vazio | **Não** envie campo `footer` vazio. Omita o campo ou preencha com texto |
|
||||||
|
| Imagens no carrossel | **Todos** os cards devem ter `imageUrl` para renderizar corretamente |
|
||||||
|
| Mínimo de cards | Carrossel requer no **mínimo 2 cards** |
|
||||||
|
| Thumbnails | Gerados automaticamente pela API (72px JPEG) para carregamento instantâneo |
|
||||||
|
| Formato do número | DDI + DDD + número, sem caracteres especiais (`5511999999999`) |
|
||||||
|
| Grupos | Use o JID do grupo (ex: `[email protected]`) |
|
||||||
|
| Mensagem quoted | Adicione `"quoted": {"messageId": "ID"}` ao payload |
|
||||||
|
|
||||||
|
### Compatibilidade Testada
|
||||||
|
|
||||||
|
| Tipo de Mensagem | Android | iOS (iPhone) | WhatsApp Web |
|
||||||
|
|------------------|---------|--------------|--------------|
|
||||||
|
| Botões (reply) | ✅ | ✅ | ✅ |
|
||||||
|
| Botões (url) | ✅ | ✅ | ✅ |
|
||||||
|
| Botões (call) | ✅ | ✅ | ✅ |
|
||||||
|
| Botões (copy) | ✅ | ✅ | ✅ |
|
||||||
|
| Botões (pix) | ✅ | ✅ | ✅ |
|
||||||
|
| Lista | ✅ | ✅ | ✅ |
|
||||||
|
| Carrossel | ✅ | ✅ | ✅ |
|
||||||
@@ -12,8 +12,9 @@ Documentação completa dos endpoints para enviar e gerenciar mensagens WhatsApp
|
|||||||
- [Enviar Sticker](#enviar-sticker)
|
- [Enviar Sticker](#enviar-sticker)
|
||||||
- [Enviar Localização](#enviar-localização)
|
- [Enviar Localização](#enviar-localização)
|
||||||
- [Enviar Contato](#enviar-contato)
|
- [Enviar Contato](#enviar-contato)
|
||||||
- [~~Enviar Botões~~](#enviar-botões) ⚠️ **DEPRECIADO**
|
- [Enviar Botões](api-interactive.md#enviar-botões) ➡️ **Ver [API de Mensagens Interativas](api-interactive.md)**
|
||||||
- [~~Enviar Lista~~](#enviar-lista) ⚠️ **DEPRECIADO**
|
- [Enviar Lista](api-interactive.md#enviar-lista) ➡️ **Ver [API de Mensagens Interativas](api-interactive.md)**
|
||||||
|
- [Enviar Carrossel](api-interactive.md#enviar-carrossel) ➡️ **Ver [API de Mensagens Interativas](api-interactive.md)**
|
||||||
|
|
||||||
### Gerenciar Mensagens
|
### Gerenciar Mensagens
|
||||||
- [Reagir a Mensagem](#reagir-a-mensagem)
|
- [Reagir a Mensagem](#reagir-a-mensagem)
|
||||||
|
|||||||
@@ -0,0 +1,412 @@
|
|||||||
|
# Pareamento por Chave de Acesso (Passkey / WebAuthn)
|
||||||
|
|
||||||
|
Guia completo de como conectar uma instância WhatsApp no Evolution GO quando a
|
||||||
|
conta exige uma **chave de acesso (passkey)** — a nova etapa de segurança que a
|
||||||
|
Meta passou a exigir em algumas contas ao vincular um novo dispositivo.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. Por que o passkey existe
|
||||||
|
|
||||||
|
O fluxo clássico multi-dispositivo era: mostra o QR rotativo → o celular escaneia
|
||||||
|
→ pareado. A Meta está lançando o **linking travado por passkey** (o protocolo
|
||||||
|
que os clients oficiais chamam de **Shortcake** no lado web / **CRSC** no lado
|
||||||
|
telefone): para **algumas contas**, o servidor exige uma **assertion de passkey
|
||||||
|
WebAuthn** antes de vincular um novo dispositivo.
|
||||||
|
|
||||||
|
**Quem é afetado:** é uma decisão **100% server-side, por conta** (um bucket A/B
|
||||||
|
do servidor + a conta ter um passkey + sinal de risco). O usuário não escolhe, e
|
||||||
|
o cliente não consegue disparar nem desviar. Você não controla se sua conta cai
|
||||||
|
nesse fluxo.
|
||||||
|
|
||||||
|
**Importante — nem sempre há QR.** Numa conta travada, o servidor responde ao
|
||||||
|
pareamento com `retry-with-method: shortcake-with-passkeys` e frequentemente
|
||||||
|
**omite o `qr-code`** — ou seja, **pode não existir QR para escanear**. O prólogo
|
||||||
|
de passkey também pode vir logo após um **código de pareamento**. Por isso o
|
||||||
|
Evolution GO trata o pedido de passkey de forma independente do QR.
|
||||||
|
|
||||||
|
O ponto difícil: a chamada `navigator.credentials.get()` (que dispara a
|
||||||
|
biometria/PIN) **só funciona numa página cujo domínio bata com o `rpId` da
|
||||||
|
credencial** (`whatsapp.com`) — ou seja, precisa rodar dentro de uma aba real
|
||||||
|
`web.whatsapp.com`. **Não existe bypass headless** (confirmado empiricamente por
|
||||||
|
pesquisa de engenharia reversa independente — ver §10): o servidor valida a
|
||||||
|
assinatura contra a chave pública **registrada** da conta, com challenge fresco;
|
||||||
|
uma assertion forjada é rejeitada. A cerimônia exige o autenticador real do dono
|
||||||
|
da conta (Touch ID / Windows Hello / passkey sincronizada).
|
||||||
|
|
||||||
|
> **É web-only.** Um companion android (`platform_type = 10`) é rejeitado pelo
|
||||||
|
> servidor com `463 account_reachout_restricted`. A cerimônia Shortcake só roda
|
||||||
|
> num companion web.
|
||||||
|
|
||||||
|
**Solução do Evolution GO:** uma pequena extensão de navegador
|
||||||
|
(`tools/passkey-helper`) roda **apenas** em `web.whatsapp.com`, executa a
|
||||||
|
cerimônia WebAuthn ali (onde o `rpId` é aceito), e devolve a assinatura para a
|
||||||
|
API do Evolution GO, que a repassa ao WhatsApp via whatsmeow.
|
||||||
|
|
||||||
|
> A extensão é o único componente que roda no domínio `web.whatsapp.com`. Ela
|
||||||
|
> não interage com o login do WhatsApp Web e não coleta dados — serve só como
|
||||||
|
> "palco" com o origin correto para a biometria.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. Arquitetura
|
||||||
|
|
||||||
|
```
|
||||||
|
┌──────────────────────────── Evolution GO (backend) ────────────────────────────┐
|
||||||
|
│ │
|
||||||
|
│ whatsmeow client ──emite──> events.PairPasskeyRequest / Confirmation / Error │
|
||||||
|
│ │ │ │
|
||||||
|
│ │ ▼ │
|
||||||
|
│ │ ceremony.Store (token efêmero + estágio, mutex) │
|
||||||
|
│ │ ▲ │
|
||||||
|
│ ▼ │ │
|
||||||
|
│ SendPasskeyResponse ◄──── API pública /passkey-ceremony/{token} │
|
||||||
|
│ SendPasskeyConfirmation (CORS libera https://web.whatsapp.com) │
|
||||||
|
└─────────────────────────────────────────────────────────────────────────────────┘
|
||||||
|
▲ │
|
||||||
|
│ POST assertion / confirm │ GET desafio
|
||||||
|
│ ▼
|
||||||
|
┌──────────────────────── Extensão (content script) ─────────────────────────┐
|
||||||
|
│ roda SÓ em https://web.whatsapp.com/* │
|
||||||
|
│ lê o token+baseUrl do hash da URL → GET desafio → navigator.credentials.get │
|
||||||
|
│ → POST da assinatura de volta │
|
||||||
|
└──────────────────────────────────────────────────────────────────────────────┘
|
||||||
|
▲
|
||||||
|
│ abre https://web.whatsapp.com/#wapk=<payload>
|
||||||
|
┌──────────────────────────────── Manager ───────────────────────────────────┐
|
||||||
|
│ QRCodeModal detecta passkeyStage no poll do QR → botão "Abrir WhatsApp Web" │
|
||||||
|
└──────────────────────────────────────────────────────────────────────────────┘
|
||||||
|
```
|
||||||
|
|
||||||
|
**Papéis:**
|
||||||
|
|
||||||
|
1. **whatsmeow** — emite os eventos de passkey e expõe `SendPasskeyResponse` /
|
||||||
|
`SendPasskeyConfirmation`.
|
||||||
|
2. **Backend Evolution GO** — guarda o estado da cerimônia (por token efêmero) e
|
||||||
|
expõe a API pública com CORS que o `web.whatsapp.com` chama.
|
||||||
|
3. **Extensão** — a única peça no origin `web.whatsapp.com`; executa a cerimônia
|
||||||
|
WebAuthn.
|
||||||
|
4. **Manager** — abre a URL da cerimônia e faz polling até conectar.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 3. Sequência ponta a ponta
|
||||||
|
|
||||||
|
1. Você cria a instância e clica em conectar.
|
||||||
|
- **Conta normal:** o QR aparece, você escaneia, conecta — e o passkey **nunca
|
||||||
|
é acionado**. Este guia não se aplica.
|
||||||
|
- **Conta travada por passkey:** pode aparecer um QR primeiro (e o passkey vir
|
||||||
|
depois do escaneio) **ou não haver QR algum** — o servidor decide. De
|
||||||
|
qualquer forma, o próximo passo é o passkey.
|
||||||
|
2. Quando o servidor pede o passkey, o whatsmeow emite `PairPasskeyRequest`
|
||||||
|
(independente de ter havido QR). O backend:
|
||||||
|
- gera um **token de cerimônia** efêmero (32 bytes, TTL 5 min);
|
||||||
|
- guarda o desafio WebAuthn (`publicKey`) associado a esse token;
|
||||||
|
- loga a URL `#wapk` pronta e a expõe no poll do QR.
|
||||||
|
3. O manager detecta `passkeyStage` e mostra o painel de passkey, com o botão
|
||||||
|
**"Abrir WhatsApp Web"** (aponta para
|
||||||
|
`https://web.whatsapp.com/#wapk=<payload>`).
|
||||||
|
4. A extensão (na aba `web.whatsapp.com`) lê o payload, busca o desafio na API,
|
||||||
|
executa `navigator.credentials.get()` (biometria/PIN) e **POSTa a
|
||||||
|
assinatura** para `/passkey-ceremony/{token}/response`.
|
||||||
|
5. O backend chama `SendPasskeyResponse`. O servidor valida a assertion contra a
|
||||||
|
chave pública registrada e responde com um **código de confirmação** →
|
||||||
|
`PairPasskeyConfirmation` → o backend guarda o código no estado da cerimônia.
|
||||||
|
6. A extensão mostra o código; o usuário confere e clica em confirmar → a
|
||||||
|
extensão chama `/passkey-ceremony/{token}/confirm` → o backend chama
|
||||||
|
`SendPasskeyConfirmation`.
|
||||||
|
7. O pareamento se completa: `PairSuccess` / `Connected`. O backend limpa a
|
||||||
|
cerimônia. O manager, ainda em polling, detecta `connected: true`.
|
||||||
|
|
||||||
|
> **Nota sobre o código de confirmação (handoff).** Em alguns casos o telefone
|
||||||
|
> pula a tela de conferência de código (quando um "handoff proof" válido é
|
||||||
|
> enviado). O Evolution GO **sempre** exige a confirmação manual
|
||||||
|
> (`skipHandoffUX=false`) — confirmar automaticamente pode dessincronizar o
|
||||||
|
> pareamento e disparar o anti-abuso do WhatsApp ("Não foi possível conectar o
|
||||||
|
> dispositivo").
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. Configuração obrigatória
|
||||||
|
|
||||||
|
### `PASSKEY_PUBLIC_URL`
|
||||||
|
|
||||||
|
A extensão roda no navegador e precisa chamar a **API do Evolution GO**. A URL
|
||||||
|
base dessa API precisa ser **acessível pelo navegador** onde o WhatsApp Web
|
||||||
|
abre. Defina no `.env`:
|
||||||
|
|
||||||
|
```env
|
||||||
|
# URL pública da API que o navegador (aba web.whatsapp.com) consegue alcançar.
|
||||||
|
# Em produção: o domínio público da API.
|
||||||
|
# Em desenvolvimento: um túnel (ngrok/cloudflared) OU o IP de LAN da máquina.
|
||||||
|
# NÃO use localhost se o navegador estiver em outra máquina.
|
||||||
|
PASSKEY_PUBLIC_URL=https://sua-api.exemplo.com
|
||||||
|
```
|
||||||
|
|
||||||
|
> Se `PASSKEY_PUBLIC_URL` não estiver setado, a URL `#wapk` sai com o
|
||||||
|
> placeholder `<SET_PASSKEY_PUBLIC_URL>` e o manager exibe um aviso, com o botão
|
||||||
|
> "Abrir WhatsApp Web" desabilitado.
|
||||||
|
|
||||||
|
### Instalar a extensão (uma vez por navegador)
|
||||||
|
|
||||||
|
A extensão fica na pasta **`passkey-helper/`** do repositório público (Manifest
|
||||||
|
V3, Chromium — Chrome/Edge). No repositório de desenvolvimento ela está em
|
||||||
|
`tools/passkey-helper/`.
|
||||||
|
|
||||||
|
**Chrome:** `chrome://extensions` → ativar **Modo do desenvolvedor** → **Carregar
|
||||||
|
sem compactação** → selecionar a pasta `passkey-helper`.
|
||||||
|
|
||||||
|
**Edge:** `edge://extensions` → **Modo de desenvolvedor** → **Carregar sem
|
||||||
|
pacote** → selecionar a pasta `passkey-helper`.
|
||||||
|
|
||||||
|
> Use o navegador logado na mesma conta (Google/iCloud) onde a passkey do
|
||||||
|
> WhatsApp está salva, ou tenha o celular por perto para a biometria.
|
||||||
|
|
||||||
|
### CORS
|
||||||
|
|
||||||
|
O backend já libera a origem `https://web.whatsapp.com` (o CORS atual usa `*`,
|
||||||
|
que cobre chamadas não-credenciadas da extensão). As rotas `/passkey-ceremony/*`
|
||||||
|
também estão isentas do gate de licença.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 5. Guia rápido para testar (comunidade)
|
||||||
|
|
||||||
|
Recurso **novo (0.7.2)** e ainda **não validado ponta a ponta** — poucas contas
|
||||||
|
foram travadas por passkey até agora. Se a sua conta pede passkey, siga o
|
||||||
|
passo-a-passo abaixo e reporte o resultado (funcionou / em qual etapa parou +
|
||||||
|
logs) numa issue do repositório. Isso ajuda muito.
|
||||||
|
|
||||||
|
**Como saber se preciso disso:** você tenta conectar a instância e (a) o QR não
|
||||||
|
completa o pareamento mesmo escaneado, ou (b) nem aparece QR, ou (c) o app do
|
||||||
|
WhatsApp reclama de "chave de acesso" / "não foi possível conectar o
|
||||||
|
dispositivo". Nesses casos a conta provavelmente está travada por passkey.
|
||||||
|
|
||||||
|
**Pré-requisitos:**
|
||||||
|
|
||||||
|
1. Evolution GO **0.7.2+** rodando.
|
||||||
|
2. `PASSKEY_PUBLIC_URL` no `.env` apontando para uma URL **pública** da API,
|
||||||
|
alcançável pelo navegador (ver §4). Em teste local use um túnel (ngrok /
|
||||||
|
cloudflared) — **não** `localhost` se o navegador estiver em outra máquina.
|
||||||
|
3. A **extensão** `tools/passkey-helper` instalada no Chrome/Edge (ver §4).
|
||||||
|
4. O navegador logado na mesma conta (Google/iCloud) onde a passkey do WhatsApp
|
||||||
|
está salva, **ou** o celular por perto para a biometria.
|
||||||
|
|
||||||
|
**Passo a passo:**
|
||||||
|
|
||||||
|
1. No manager, crie a instância e clique em conectar.
|
||||||
|
2. Se aparecer QR, escaneie. Se a conta for travada, o painel muda para
|
||||||
|
**"Chave de acesso (passkey)"** (ou não haverá QR, indo direto para esse
|
||||||
|
painel).
|
||||||
|
3. Clique em **"Abrir WhatsApp Web"**. Abre uma aba `web.whatsapp.com` com o
|
||||||
|
painel da extensão no canto.
|
||||||
|
4. Na aba, clique em **"Autenticar com chave de acesso"** e confirme com
|
||||||
|
biometria/PIN.
|
||||||
|
5. Se aparecer um **código de confirmação**, confira que ele bate com o do
|
||||||
|
celular e confirme.
|
||||||
|
6. Volte ao manager e aguarde a instância ficar **conectada**.
|
||||||
|
|
||||||
|
**Sem o manager (teste manual via API):** o backend loga a URL `#wapk` pronta
|
||||||
|
quando o passkey é pedido (procure por `Passkey required. Open this URL...` nos
|
||||||
|
logs). Copie essa URL, abra no navegador com a extensão, e complete a cerimônia.
|
||||||
|
Os endpoints estão na §6.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 6. Referência das requisições
|
||||||
|
|
||||||
|
Todas as rotas de cerimônia são **públicas** (sem `apikey`): a segurança está no
|
||||||
|
token de cerimônia — opaco, imprevisível, de uso único e com expiração. Sem um
|
||||||
|
token válido não há nada a fazer, e concluir a cerimônia ainda exige o
|
||||||
|
autenticador real do usuário.
|
||||||
|
|
||||||
|
`{base}` = `PASSKEY_PUBLIC_URL`. `{token}` = token de cerimônia.
|
||||||
|
|
||||||
|
### 5.1 Consultar o estado da cerimônia
|
||||||
|
|
||||||
|
```
|
||||||
|
GET {base}/passkey-ceremony/{token}
|
||||||
|
```
|
||||||
|
|
||||||
|
Resposta (200):
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"stage": "challenge",
|
||||||
|
"publicKey": {
|
||||||
|
"challenge": "<base64url>",
|
||||||
|
"timeout": 60000,
|
||||||
|
"rpId": "whatsapp.com",
|
||||||
|
"allowCredentials": [
|
||||||
|
{ "type": "public-key", "id": "<base64url>", "transports": ["internal"] }
|
||||||
|
],
|
||||||
|
"userVerification": "required"
|
||||||
|
},
|
||||||
|
"skipHandoffUX": false,
|
||||||
|
"code": "",
|
||||||
|
"error": ""
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
- `404` se o token for desconhecido ou expirado.
|
||||||
|
|
||||||
|
**Estágios (`stage`):**
|
||||||
|
|
||||||
|
| stage | significado |
|
||||||
|
| ----------------------- | ------------------------------------------------------------------ |
|
||||||
|
| `challenge` | desafio disponível; a extensão executa `navigator.credentials.get` |
|
||||||
|
| `awaiting_confirmation` | assinatura enviada; aguardando o código do servidor |
|
||||||
|
| `confirmation` | código disponível (`code`); usuário deve conferir e confirmar |
|
||||||
|
| `confirmed` | confirmação enviada; pareamento concluindo |
|
||||||
|
| `error` | falhou (ver `error`) |
|
||||||
|
|
||||||
|
### 5.2 Enviar a assinatura WebAuthn
|
||||||
|
|
||||||
|
```
|
||||||
|
POST {base}/passkey-ceremony/{token}/response
|
||||||
|
Content-Type: application/json
|
||||||
|
```
|
||||||
|
|
||||||
|
Corpo (produzido por `navigator.credentials.get()`, tudo em base64url **sem
|
||||||
|
padding**):
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"id": "<credential id>",
|
||||||
|
"rawId": "<base64url>",
|
||||||
|
"type": "public-key",
|
||||||
|
"response": {
|
||||||
|
"clientDataJSON": "<base64url>",
|
||||||
|
"authenticatorData": "<base64url>",
|
||||||
|
"signature": "<base64url>",
|
||||||
|
"userHandle": "<base64url|opcional>"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Resposta: `200 {"ok": true}`. Em erro: `4xx/5xx {"error": "..."}`.
|
||||||
|
|
||||||
|
Internamente chama `client.SendPasskeyResponse(ctx, *types.WebAuthnResponse)`. O
|
||||||
|
servidor então emite, de forma assíncrona, `PairPasskeyConfirmation` (código) ou
|
||||||
|
`PairPasskeyError`.
|
||||||
|
|
||||||
|
### 5.3 Confirmar o código
|
||||||
|
|
||||||
|
```
|
||||||
|
POST {base}/passkey-ceremony/{token}/confirm
|
||||||
|
```
|
||||||
|
|
||||||
|
Resposta: `200 {"ok": true}`. Chama `client.SendPasskeyConfirmation(ctx)`; o
|
||||||
|
pareamento então completa com `PairSuccess` / `Connected`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 7. Como o manager expõe isso
|
||||||
|
|
||||||
|
O manager **não** tem um endpoint dedicado — ele reaproveita o poll do QR que já
|
||||||
|
existe. O endpoint autenticado do QR (`GET /instance/qr`, header `apikey`)
|
||||||
|
retorna, quando há uma cerimônia ativa:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"message": "success",
|
||||||
|
"data": {
|
||||||
|
"qrcode": "",
|
||||||
|
"code": "",
|
||||||
|
"passkeyStage": "challenge",
|
||||||
|
"passkeyOpenUrl": "https://web.whatsapp.com/#wapk=...",
|
||||||
|
"passkeyCode": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
O `QRCodeModal` detecta `passkeyStage` e mostra o painel de passkey (botão
|
||||||
|
"Abrir WhatsApp Web" → `passkeyOpenUrl`, e o `passkeyCode` quando disponível).
|
||||||
|
|
||||||
|
> **Importante:** a **extensão** conduz a cerimônia inteira (desafio +
|
||||||
|
> confirmação). O manager só abre a URL e faz polling. O código de confirmação é
|
||||||
|
> exibido tanto na extensão quanto (opcionalmente) no manager para conferência.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 8. Notas de implementação (para quem for mexer no backend)
|
||||||
|
|
||||||
|
Regras que **não** podem ser violadas (extraídas do comportamento do whatsmeow):
|
||||||
|
|
||||||
|
- **Não use `GetQRChannel` durante o passkey.** No whatsmeow instalado, o handler
|
||||||
|
do `qrChannel` (a) auto-confirma a `PairPasskeyConfirmation` quando
|
||||||
|
`SkipHandoffUX` está setado — correndo com o fluxo manual — e (b) desconecta o
|
||||||
|
socket quando os códigos de QR acabam. Por isso o Evolution GO conecta com
|
||||||
|
`client.Connect()` direto e consome `events.QR` no event handler
|
||||||
|
(`handleQRCodes`), que o `pair.go` despacha para todos os handlers de qualquer
|
||||||
|
forma.
|
||||||
|
- **Nunca auto-confirme com base em `SkipHandoffUX`.** O backend força
|
||||||
|
`skipHandoffUX=false`, então a confirmação é sempre manual (o usuário confere o
|
||||||
|
código). Auto-confirmar dessincroniza o pareamento e dispara o anti-abuso do
|
||||||
|
WhatsApp.
|
||||||
|
- **`EnableAutoReconnect = false`** já está setado; a reconexão é centralizada
|
||||||
|
pela aplicação.
|
||||||
|
- **A rotação de QR pausa durante uma cerimônia de passkey.** O `handleQRCodes`
|
||||||
|
consulta `ceremony.Store.HasActiveByInstance()` antes de qualquer teardown, para
|
||||||
|
não derrubar o socket enquanto o usuário completa a cerimônia (que é conduzida
|
||||||
|
por um humano no navegador e pode demorar mais que a janela de rotação do QR).
|
||||||
|
- **`PairPasskeyRequest` NÃO chama `SendPasskeyResponse`.** No momento do request
|
||||||
|
só existe o desafio; a assinatura só existe depois que a extensão roda
|
||||||
|
`navigator.credentials.get()`. O `SendPasskeyResponse` é chamado apenas no
|
||||||
|
handler HTTP `/response`.
|
||||||
|
|
||||||
|
Arquivos principais:
|
||||||
|
|
||||||
|
| Arquivo | Responsabilidade |
|
||||||
|
| ---------------------------------------------- | -------------------------------------------------- |
|
||||||
|
| `pkg/passkey/ceremony/store.go` | estado da cerimônia (token → estágio), mutex, TTL |
|
||||||
|
| `pkg/passkey/handler/passkey_handler.go` | os 3 endpoints públicos |
|
||||||
|
| `pkg/whatsmeow/service/whatsmeow.go` | eventos `PairPasskey*`, `handleQRCodes`, bridges |
|
||||||
|
| `pkg/instance/service/instance_service.go` | `GetQr` expõe o estado da cerimônia ao manager |
|
||||||
|
| `tools/passkey-helper/` | extensão de navegador (content script + manifest) |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 9. Solução de problemas
|
||||||
|
|
||||||
|
| Sintoma | Causa provável / correção |
|
||||||
|
| --------------------------------------------------- | ------------------------------------------------------------------------------------------ |
|
||||||
|
| Botão "Abrir WhatsApp Web" desabilitado | `PASSKEY_PUBLIC_URL` não configurado. Defina no `.env` e reinicie. |
|
||||||
|
| A aba `web.whatsapp.com` não mostra o painel | Extensão não instalada / não é a aba de `web.whatsapp.com`. Instale e recarregue a aba. |
|
||||||
|
| `ceremony not found or expired` (404) | Token expirou (TTL 5 min). Gere um novo QR no manager para reiniciar a cerimônia. |
|
||||||
|
| A extensão falha ao buscar o desafio (CORS/rede) | `PASSKEY_PUBLIC_URL` não é alcançável pelo navegador. Use um túnel ou o IP de LAN correto. |
|
||||||
|
| "Não foi possível conectar o dispositivo" | Confirmação automática indevida. O backend força `skipHandoffUX=false` — confirme manual. |
|
||||||
|
| A assinatura é rejeitada pelo WhatsApp | Formato base64url com padding. A extensão emite base64url **sem** padding (correto). |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 10. Segurança
|
||||||
|
|
||||||
|
- O token de cerimônia é opaco, de uso único e expira em ~5 minutos.
|
||||||
|
- As rotas de cerimônia são públicas por design: sem um token válido não há nada
|
||||||
|
a fazer, e concluir a cerimônia exige o autenticador real do usuário.
|
||||||
|
- A extensão não coleta nem envia dados a terceiros; apenas executa a cerimônia
|
||||||
|
WebAuthn no origin correto.
|
||||||
|
- O whatsmeow é licenciado sob MIT; os eventos e métodos de passkey fazem parte
|
||||||
|
da biblioteca oficial (`go.mau.fi/whatsmeow`).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 11. Referências e limites conhecidos
|
||||||
|
|
||||||
|
- **Não existe bypass headless.** Numa conta travada, vincular exige uma assertion
|
||||||
|
do **próprio authenticator do dono** — obtida no navegador/dispositivo dele e
|
||||||
|
repassada ao fluxo. Isso é *usar* o passkey real, não burlá-lo. O servidor
|
||||||
|
valida a assinatura contra a chave pública registrada da conta (challenge
|
||||||
|
fresco, sem replay); assertions forjadas são rejeitadas silenciosamente.
|
||||||
|
- **Web-only.** A cerimônia Shortcake só roda num companion web. Companion android
|
||||||
|
é rejeitado (`463 account_reachout_restricted`).
|
||||||
|
- **A decisão é do servidor.** Nenhuma versão de client, flag ou capability
|
||||||
|
desvia do passkey — é um bucket A/B por conta, server-side.
|
||||||
|
- **Engenharia reversa do protocolo:** o fluxo Shortcake/CRSC (as stanzas,
|
||||||
|
a criptografia ECDH commit-reveal, a captura de wire correlacionada) foi
|
||||||
|
documentado de forma independente pelo projeto **zapo** em
|
||||||
|
<https://zapo.to/pt-br/reverse-engineering/passkey-linking> — leitura
|
||||||
|
recomendada para quem quiser entender o protocolo por baixo. O `zapo` é um
|
||||||
|
projeto independente, não afiliado ao WhatsApp/Meta; o Evolution GO apenas
|
||||||
|
consome o suporte a passkey já implementado no whatsmeow oficial.
|
||||||
@@ -59,7 +59,7 @@ POSTGRES_USERS_DB=postgresql://user:pass@host:5432/evogo_users?sslmode=disable
|
|||||||
| Variável | Padrão | Descrição |
|
| Variável | Padrão | Descrição |
|
||||||
|----------|--------|-----------|
|
|----------|--------|-----------|
|
||||||
| `CONNECT_ON_STARTUP` | `false` | Conectar instâncias ao iniciar servidor |
|
| `CONNECT_ON_STARTUP` | `false` | Conectar instâncias ao iniciar servidor |
|
||||||
| `WEBHOOKFILES` | `true` | Enviar URLs de mídia em webhooks |
|
| `WEBHOOK_FILES` | `true` | Enviar URLs de mídia em webhooks |
|
||||||
| `QRCODE_MAX_COUNT` | `5` | Tentativas máximas de QR Code |
|
| `QRCODE_MAX_COUNT` | `5` | Tentativas máximas de QR Code |
|
||||||
| `CHECK_USER_EXISTS` | `true` | Validar destinatário antes de enviar |
|
| `CHECK_USER_EXISTS` | `true` | Validar destinatário antes de enviar |
|
||||||
|
|
||||||
@@ -197,7 +197,7 @@ LOGTYPE=console
|
|||||||
|
|
||||||
# Comportamento
|
# Comportamento
|
||||||
CONNECT_ON_STARTUP=false
|
CONNECT_ON_STARTUP=false
|
||||||
WEBHOOKFILES=true
|
WEBHOOK_FILES=true
|
||||||
CHECK_USER_EXISTS=true
|
CHECK_USER_EXISTS=true
|
||||||
EVENT_IGNORE_STATUS=true
|
EVENT_IGNORE_STATUS=true
|
||||||
|
|
||||||
|
|||||||
Executable
BIN
Binary file not shown.
@@ -1,9 +1,9 @@
|
|||||||
module github.com/EvolutionAPI/evolution-go
|
module github.com/evolution-foundation/evolution-go
|
||||||
|
|
||||||
go 1.25.0
|
go 1.25.0
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/EvolutionAPI/evo-gate v0.1.2
|
github.com/DATA-DOG/go-sqlmock v1.5.2
|
||||||
github.com/chai2010/webp v1.1.1
|
github.com/chai2010/webp v1.1.1
|
||||||
github.com/gabriel-vasile/mimetype v1.4.5
|
github.com/gabriel-vasile/mimetype v1.4.5
|
||||||
github.com/gin-gonic/gin v1.10.0
|
github.com/gin-gonic/gin v1.10.0
|
||||||
@@ -21,10 +21,10 @@ require (
|
|||||||
github.com/swaggo/gin-swagger v1.6.0
|
github.com/swaggo/gin-swagger v1.6.0
|
||||||
github.com/swaggo/swag v1.16.3
|
github.com/swaggo/swag v1.16.3
|
||||||
github.com/vincent-petithory/dataurl v1.0.0
|
github.com/vincent-petithory/dataurl v1.0.0
|
||||||
go.mau.fi/whatsmeow v0.0.0-00010101000000-000000000000
|
go.mau.fi/whatsmeow v0.0.0-20260630180629-b572e5bcb92b
|
||||||
golang.org/x/exp v0.0.0-20260212183809-81e46e3db34a
|
golang.org/x/exp v0.0.0-20260611194520-c48552f49976
|
||||||
golang.org/x/image v0.0.0-20211028202545-6944b10bf410
|
golang.org/x/image v0.0.0-20211028202545-6944b10bf410
|
||||||
golang.org/x/net v0.50.0
|
golang.org/x/net v0.56.0
|
||||||
google.golang.org/protobuf v1.36.11
|
google.golang.org/protobuf v1.36.11
|
||||||
gopkg.in/natefinch/lumberjack.v2 v2.2.1
|
gopkg.in/natefinch/lumberjack.v2 v2.2.1
|
||||||
gorm.io/driver/postgres v1.5.9
|
gorm.io/driver/postgres v1.5.9
|
||||||
@@ -33,14 +33,14 @@ require (
|
|||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
filippo.io/edwards25519 v1.1.0 // indirect
|
filippo.io/edwards25519 v1.2.0 // indirect
|
||||||
github.com/KyleBanks/depth v1.2.1 // indirect
|
github.com/KyleBanks/depth v1.2.1 // indirect
|
||||||
github.com/beeper/argo-go v1.1.2 // indirect
|
github.com/beeper/argo-go v1.1.2 // indirect
|
||||||
github.com/bytedance/sonic v1.12.2 // indirect
|
github.com/bytedance/sonic v1.12.2 // indirect
|
||||||
github.com/bytedance/sonic/loader v0.2.0 // indirect
|
github.com/bytedance/sonic/loader v0.2.0 // indirect
|
||||||
github.com/cloudwego/base64x v0.1.4 // indirect
|
github.com/cloudwego/base64x v0.1.4 // indirect
|
||||||
github.com/cloudwego/iasm v0.2.0 // indirect
|
github.com/cloudwego/iasm v0.2.0 // indirect
|
||||||
github.com/coder/websocket v1.8.14 // indirect
|
github.com/coder/websocket v1.8.15 // indirect
|
||||||
github.com/dustin/go-humanize v1.0.1 // indirect
|
github.com/dustin/go-humanize v1.0.1 // indirect
|
||||||
github.com/elliotchance/orderedmap/v3 v3.1.0 // indirect
|
github.com/elliotchance/orderedmap/v3 v3.1.0 // indirect
|
||||||
github.com/gin-contrib/sse v0.1.0 // indirect
|
github.com/gin-contrib/sse v0.1.0 // indirect
|
||||||
@@ -75,22 +75,22 @@ require (
|
|||||||
github.com/nats-io/nuid v1.0.1 // indirect
|
github.com/nats-io/nuid v1.0.1 // indirect
|
||||||
github.com/ncruces/go-strftime v0.1.9 // indirect
|
github.com/ncruces/go-strftime v0.1.9 // indirect
|
||||||
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
|
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
|
||||||
github.com/petermattis/goid v0.0.0-20260113132338-7c7de50cc741 // indirect
|
github.com/petermattis/goid v0.0.0-20260330135022-df67b199bc81 // indirect
|
||||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
|
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
|
||||||
github.com/rogpeppe/go-internal v1.12.0 // indirect
|
github.com/rogpeppe/go-internal v1.12.0 // indirect
|
||||||
github.com/rs/xid v1.6.0 // indirect
|
github.com/rs/xid v1.6.0 // indirect
|
||||||
github.com/rs/zerolog v1.34.0 // indirect
|
github.com/rs/zerolog v1.35.1 // indirect
|
||||||
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
||||||
github.com/ugorji/go/codec v1.2.12 // indirect
|
github.com/ugorji/go/codec v1.2.12 // indirect
|
||||||
github.com/vektah/gqlparser/v2 v2.5.27 // indirect
|
github.com/vektah/gqlparser/v2 v2.5.27 // indirect
|
||||||
go.mau.fi/libsignal v0.2.1 // indirect
|
go.mau.fi/libsignal v0.2.2 // indirect
|
||||||
go.mau.fi/util v0.9.6 // indirect
|
go.mau.fi/util v0.9.10 // indirect
|
||||||
golang.org/x/arch v0.10.0 // indirect
|
golang.org/x/arch v0.10.0 // indirect
|
||||||
golang.org/x/crypto v0.48.0 // indirect
|
golang.org/x/crypto v0.53.0 // indirect
|
||||||
golang.org/x/sync v0.19.0 // indirect
|
golang.org/x/sync v0.21.0 // indirect
|
||||||
golang.org/x/sys v0.41.0 // indirect
|
golang.org/x/sys v0.46.0 // indirect
|
||||||
golang.org/x/text v0.34.0 // indirect
|
golang.org/x/text v0.38.0 // indirect
|
||||||
golang.org/x/tools v0.42.0 // indirect
|
golang.org/x/tools v0.46.0 // indirect
|
||||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||||
modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6 // indirect
|
modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6 // indirect
|
||||||
modernc.org/libc v1.55.3 // indirect
|
modernc.org/libc v1.55.3 // indirect
|
||||||
@@ -99,5 +99,3 @@ require (
|
|||||||
modernc.org/strutil v1.2.0 // indirect
|
modernc.org/strutil v1.2.0 // indirect
|
||||||
modernc.org/token v1.1.0 // indirect
|
modernc.org/token v1.1.0 // indirect
|
||||||
)
|
)
|
||||||
|
|
||||||
replace go.mau.fi/whatsmeow => ./whatsmeow-lib
|
|
||||||
@@ -1,9 +1,7 @@
|
|||||||
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
|
filippo.io/edwards25519 v1.2.0 h1:crnVqOiS4jqYleHd9vaKZ+HKtHfllngJIiOpNpoJsjo=
|
||||||
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
|
filippo.io/edwards25519 v1.2.0/go.mod h1:xzAOLCNug/yB62zG1bQ8uziwrIqIuxhctzJT18Q77mc=
|
||||||
github.com/DATA-DOG/go-sqlmock v1.5.2 h1:OcvFkGmslmlZibjAjaHm3L//6LiuBgolP7OputlJIzU=
|
github.com/DATA-DOG/go-sqlmock v1.5.2 h1:OcvFkGmslmlZibjAjaHm3L//6LiuBgolP7OputlJIzU=
|
||||||
github.com/DATA-DOG/go-sqlmock v1.5.2/go.mod h1:88MAG/4G7SMwSE3CeA0ZKzrT5CiOU3OJ+JlNzwDqpNU=
|
github.com/DATA-DOG/go-sqlmock v1.5.2/go.mod h1:88MAG/4G7SMwSE3CeA0ZKzrT5CiOU3OJ+JlNzwDqpNU=
|
||||||
github.com/EvolutionAPI/evo-gate v0.1.2 h1:ZPQ9SZ7OlajNU1pbtYqbMg1U/ZiUSKmlrYk0GHWOXkc=
|
|
||||||
github.com/EvolutionAPI/evo-gate v0.1.2/go.mod h1:48tcAgZ0yVojqLdmLpOSyWDGqPODBYXYRSEs2yIUI/w=
|
|
||||||
github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc=
|
github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc=
|
||||||
github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE=
|
github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE=
|
||||||
github.com/agnivade/levenshtein v1.2.1 h1:EHBY3UOn1gwdy/VbFwgo4cxecRznFk7fKWN1KOX7eoM=
|
github.com/agnivade/levenshtein v1.2.1 h1:EHBY3UOn1gwdy/VbFwgo4cxecRznFk7fKWN1KOX7eoM=
|
||||||
@@ -23,9 +21,8 @@ github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/
|
|||||||
github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w=
|
github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w=
|
||||||
github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg=
|
github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg=
|
||||||
github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY=
|
github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY=
|
||||||
github.com/coder/websocket v1.8.14 h1:9L0p0iKiNOibykf283eHkKUHHrpG7f65OE3BhhO7v9g=
|
github.com/coder/websocket v1.8.15 h1:6B2JPeOGlpff2Uz6vOEH1Vzpi0iUz20A+lPVhPHtNUA=
|
||||||
github.com/coder/websocket v1.8.14/go.mod h1:NX3SzP+inril6yawo5CQXx8+fk145lPDC6pumgx0mVg=
|
github.com/coder/websocket v1.8.15/go.mod h1:NX3SzP+inril6yawo5CQXx8+fk145lPDC6pumgx0mVg=
|
||||||
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
|
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
@@ -61,7 +58,6 @@ github.com/go-playground/validator/v10 v10.22.0 h1:k6HsTZ0sTnROkhS//R0O+55JgM8C4
|
|||||||
github.com/go-playground/validator/v10 v10.22.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM=
|
github.com/go-playground/validator/v10 v10.22.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM=
|
||||||
github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA=
|
github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA=
|
||||||
github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
|
github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
|
||||||
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
|
||||||
github.com/gomessguii/logger v0.0.3 h1:985MqDkp2Fi6IQ3eQ3NG7VXZo8flbWd+6QUj9hASWJA=
|
github.com/gomessguii/logger v0.0.3 h1:985MqDkp2Fi6IQ3eQ3NG7VXZo8flbWd+6QUj9hASWJA=
|
||||||
github.com/gomessguii/logger v0.0.3/go.mod h1:JBfDf2h4qUFaIjpE/0T4/jeLpIHopc73k+G9+iu9+ms=
|
github.com/gomessguii/logger v0.0.3/go.mod h1:JBfDf2h4qUFaIjpE/0T4/jeLpIHopc73k+G9+iu9+ms=
|
||||||
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
||||||
@@ -93,6 +89,7 @@ github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8Hm
|
|||||||
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
|
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
|
||||||
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
||||||
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||||
|
github.com/kisielk/sqlstruct v0.0.0-20201105191214-5f3e10d3ab46/go.mod h1:yyMNCyc/Ib3bDTKd379tNMpB/7/H5TjM2Y9QJ5THLbE=
|
||||||
github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc=
|
github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc=
|
||||||
github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0=
|
github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0=
|
||||||
github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
|
github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
|
||||||
@@ -110,15 +107,12 @@ github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
|
|||||||
github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
||||||
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
|
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
|
||||||
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
|
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
|
||||||
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
|
|
||||||
github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
|
github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
|
||||||
github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
|
github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
|
||||||
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
|
||||||
github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
|
||||||
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
||||||
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||||
github.com/mattn/go-sqlite3 v1.14.34 h1:3NtcvcUnFBPsuRcno8pUtupspG/GM+9nZ88zgJcp6Zk=
|
github.com/mattn/go-sqlite3 v1.14.45 h1:6KA/spDguL3KV8rnybG7ezSaE4SeMR3KC9VbUoAQaIk=
|
||||||
github.com/mattn/go-sqlite3 v1.14.34/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
|
github.com/mattn/go-sqlite3 v1.14.45/go.mod h1:pjEuOr8IwzLJP2MfGeTb0A35jauH+C2kbHKBr7yXKVQ=
|
||||||
github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34=
|
github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34=
|
||||||
github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM=
|
github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM=
|
||||||
github.com/minio/minio-go/v7 v7.0.80 h1:2mdUHXEykRdY/BigLt3Iuu1otL0JTogT0Nmltg0wujk=
|
github.com/minio/minio-go/v7 v7.0.80 h1:2mdUHXEykRdY/BigLt3Iuu1otL0JTogT0Nmltg0wujk=
|
||||||
@@ -140,9 +134,8 @@ github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaR
|
|||||||
github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
|
github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
|
||||||
github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M=
|
github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M=
|
||||||
github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc=
|
github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc=
|
||||||
github.com/petermattis/goid v0.0.0-20260113132338-7c7de50cc741 h1:KPpdlQLZcHfTMQRi6bFQ7ogNO0ltFT4PmtwTLW4W+14=
|
github.com/petermattis/goid v0.0.0-20260330135022-df67b199bc81 h1:WDsQxOJDy0N1VRAjXLpi8sCEZRSGarLWQevDxpTBRrM=
|
||||||
github.com/petermattis/goid v0.0.0-20260113132338-7c7de50cc741/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4=
|
github.com/petermattis/goid v0.0.0-20260330135022-df67b199bc81/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4=
|
||||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
|
||||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
github.com/rabbitmq/amqp091-go v1.10.0 h1:STpn5XsHlHGcecLmMFCtg7mqq0RnD+zFr4uzukfVhBw=
|
github.com/rabbitmq/amqp091-go v1.10.0 h1:STpn5XsHlHGcecLmMFCtg7mqq0RnD+zFr4uzukfVhBw=
|
||||||
@@ -153,8 +146,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU
|
|||||||
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
|
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
|
||||||
github.com/rs/xid v1.6.0 h1:fV591PaemRlL6JfRxGDEPl69wICngIQ3shQtzfy2gxU=
|
github.com/rs/xid v1.6.0 h1:fV591PaemRlL6JfRxGDEPl69wICngIQ3shQtzfy2gxU=
|
||||||
github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0=
|
github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0=
|
||||||
github.com/rs/zerolog v1.34.0 h1:k43nTLIwcTVQAncfCw4KZ2VY6ukYoZaBPNOE8txlOeY=
|
github.com/rs/zerolog v1.35.1 h1:m7xQeoiLIiV0BCEY4Hs+j2NG4Gp2o2KPKmhnnLiazKI=
|
||||||
github.com/rs/zerolog v1.34.0/go.mod h1:bJsvje4Z08ROH4Nhs5iH600c3IkWhwp44iRc54W6wYQ=
|
github.com/rs/zerolog v1.35.1/go.mod h1:EjML9kdfa/RMA7h/6z6pYmq1ykOuA8/mjWaEvGI+jcw=
|
||||||
github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8=
|
github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8=
|
||||||
github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I=
|
github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I=
|
||||||
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e h1:MRM5ITcdelLK2j1vwZ3Je0FKVCfqOLp5zO6trqMLYs0=
|
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e h1:MRM5ITcdelLK2j1vwZ3Je0FKVCfqOLp5zO6trqMLYs0=
|
||||||
@@ -184,46 +177,46 @@ github.com/vektah/gqlparser/v2 v2.5.27/go.mod h1:D1/VCZtV3LPnQrcPBeR/q5jkSQIPti0
|
|||||||
github.com/vincent-petithory/dataurl v1.0.0 h1:cXw+kPto8NLuJtlMsI152irrVw9fRDX8AbShPRpg2CI=
|
github.com/vincent-petithory/dataurl v1.0.0 h1:cXw+kPto8NLuJtlMsI152irrVw9fRDX8AbShPRpg2CI=
|
||||||
github.com/vincent-petithory/dataurl v1.0.0/go.mod h1:FHafX5vmDzyP+1CQATJn7WFKc9CvnvxyvZy6I1MrG/U=
|
github.com/vincent-petithory/dataurl v1.0.0/go.mod h1:FHafX5vmDzyP+1CQATJn7WFKc9CvnvxyvZy6I1MrG/U=
|
||||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||||
go.mau.fi/libsignal v0.2.1 h1:vRZG4EzTn70XY6Oh/pVKrQGuMHBkAWlGRC22/85m9L0=
|
go.mau.fi/libsignal v0.2.2 h1:QV+XdzQkm3x3aSG7FcqfGSZuFXz83pRZPBFaPygHbOU=
|
||||||
go.mau.fi/libsignal v0.2.1/go.mod h1:iVvjrHyfQqWajOUaMEsIfo3IqgVMrhWcPiiEzk7NgoU=
|
go.mau.fi/libsignal v0.2.2/go.mod h1:CRlIQg2J8uYTfDFvNoO8/KcZjs5cey0vbc6oj/bssY0=
|
||||||
go.mau.fi/util v0.9.6 h1:2nsvxm49KhI3wrFltr0+wSUBlnQ4CMtykuELjpIU+ts=
|
go.mau.fi/util v0.9.10 h1:wzvz5iDHyqDXB8vgisD4d3SzucLXNM3iNY+1O1RoHtg=
|
||||||
go.mau.fi/util v0.9.6/go.mod h1:sIJpRH7Iy5Ad1SBuxQoatxtIeErgzxCtjd/2hCMkYMI=
|
go.mau.fi/util v0.9.10/go.mod h1:YQOxySn+ZE3qSYqNxvyX7Yi3suA8YK17PS6QqBREW7A=
|
||||||
|
go.mau.fi/whatsmeow v0.0.0-20260630180629-b572e5bcb92b h1:ZUk1ErarDNpnbosXR/MeOz2gkqA4S1bh8zjaSRj7N+Y=
|
||||||
|
go.mau.fi/whatsmeow v0.0.0-20260630180629-b572e5bcb92b/go.mod h1:9dmNTYZ/1pHjPw/bz+azBsGjAkcrZbqzMrKcvG5bJ8U=
|
||||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||||
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
|
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
|
||||||
golang.org/x/arch v0.10.0 h1:S3huipmSclq3PJMNe76NGwkBR504WFkQ5dhzWzP8ZW8=
|
golang.org/x/arch v0.10.0 h1:S3huipmSclq3PJMNe76NGwkBR504WFkQ5dhzWzP8ZW8=
|
||||||
golang.org/x/arch v0.10.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys=
|
golang.org/x/arch v0.10.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys=
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||||
golang.org/x/crypto v0.48.0 h1:/VRzVqiRSggnhY7gNRxPauEQ5Drw9haKdM0jqfcCFts=
|
golang.org/x/crypto v0.53.0 h1:QZ4Muo8THX6CizN2vPPd5fBGHyogrdK9fG4wLPFUsto=
|
||||||
golang.org/x/crypto v0.48.0/go.mod h1:r0kV5h3qnFPlQnBSrULhlsRfryS2pmewsg+XfMgkVos=
|
golang.org/x/crypto v0.53.0/go.mod h1:DNLU434OwVakk9PzuwV8w62mAJpRJL3vsgcfp4Qnsio=
|
||||||
golang.org/x/exp v0.0.0-20260212183809-81e46e3db34a h1:ovFr6Z0MNmU7nH8VaX5xqw+05ST2uO1exVfZPVqRC5o=
|
golang.org/x/exp v0.0.0-20260611194520-c48552f49976 h1:X8Hz2ImujgbmetVuW+w2YkyZChE3cBpZi2P158rTG9M=
|
||||||
golang.org/x/exp v0.0.0-20260212183809-81e46e3db34a/go.mod h1:K79w1Vqn7PoiZn+TkNpx3BUWUQksGO3JcVX6qIjytmA=
|
golang.org/x/exp v0.0.0-20260611194520-c48552f49976/go.mod h1:vnf4pv9iKZXY58sQE1L86zmNWJ4159e1RkcWiLCkeEY=
|
||||||
golang.org/x/image v0.0.0-20211028202545-6944b10bf410 h1:hTftEOvwiOq2+O8k2D5/Q7COC7k5Qcrgc2TFURJYnvQ=
|
golang.org/x/image v0.0.0-20211028202545-6944b10bf410 h1:hTftEOvwiOq2+O8k2D5/Q7COC7k5Qcrgc2TFURJYnvQ=
|
||||||
golang.org/x/image v0.0.0-20211028202545-6944b10bf410/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM=
|
golang.org/x/image v0.0.0-20211028202545-6944b10bf410/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM=
|
||||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||||
golang.org/x/mod v0.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8=
|
golang.org/x/mod v0.37.0 h1:vF1DjpVEshcIqoEaauuHebaLk1O1forxjxBaVn884JQ=
|
||||||
golang.org/x/mod v0.33.0/go.mod h1:swjeQEj+6r7fODbD2cqrnje9PnziFuw4bmLbBZFrQ5w=
|
golang.org/x/mod v0.37.0/go.mod h1:m8S8VeM9r4dzDwjrKO0a1sZP3YjeMamRRlD+fmR2Q/0=
|
||||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||||
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||||
golang.org/x/net v0.50.0 h1:ucWh9eiCGyDR3vtzso0WMQinm2Dnt8cFMuQa9K33J60=
|
golang.org/x/net v0.56.0 h1:Rw8j/hFzGvJUZwNBXnAtf5sVDVt+65SK2C7IxCxZt5o=
|
||||||
golang.org/x/net v0.50.0/go.mod h1:UgoSli3F/pBgdJBHCTc+tp3gmrU4XswgGRgtnwWTfyM=
|
golang.org/x/net v0.56.0/go.mod h1:D3Ku6r+V6JROoZK144D2XfMHFcMq/0zSfLelVTCFKec=
|
||||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4=
|
golang.org/x/sync v0.21.0 h1:HLII4xRRTtCRkxYp4HNFF0Js/Og6q2i++KXbg0gHCwM=
|
||||||
golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
|
golang.org/x/sync v0.21.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
|
||||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.46.0 h1:noSf2Fq6F8DBgS+LysIkx7rIExoNHJsxOAtPp4rthXw=
|
||||||
golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k=
|
golang.org/x/sys v0.46.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
|
||||||
golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
|
|
||||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||||
@@ -232,13 +225,13 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
|||||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||||
golang.org/x/text v0.34.0 h1:oL/Qq0Kdaqxa1KbNeMKwQq0reLCCaFtqu2eNuSeNHbk=
|
golang.org/x/text v0.38.0 h1:sXmwo9DwP3OK9EZ7PqAdaooSGozfl/3a6/xJcbzPRhE=
|
||||||
golang.org/x/text v0.34.0/go.mod h1:homfLqTYRFyVYemLBFl5GgL/DWEiH5wcsQ5gSh1yziA=
|
golang.org/x/text v0.38.0/go.mod h1:YXZt3QhHUKYT53r2lLKFIVi6Ao1jdzrTR/KQ09qyxF4=
|
||||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||||
golang.org/x/tools v0.42.0 h1:uNgphsn75Tdz5Ji2q36v/nsFSfR/9BRFvqhGBaJGd5k=
|
golang.org/x/tools v0.46.0 h1:7jTurBkPZu4moS/Uy4OQT1M+QBlsj3wejyZwsT8Z7rk=
|
||||||
golang.org/x/tools v0.42.0/go.mod h1:Ma6lCIwGZvHK6XtgbswSoWroEkhugApmsXyrUmBhfr0=
|
golang.org/x/tools v0.46.0/go.mod h1:FrD85F8l+NWL+9XWBSyVSHO6Ne4jutsfIFba7AWQ5Ys=
|
||||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=
|
google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=
|
||||||
google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
|
google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
@layer properties;@layer theme,base,components,utilities;@layer theme{:root,:host{--font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-100: oklch(93.6% .032 17.717);--color-red-500: oklch(63.7% .237 25.331);--color-red-600: oklch(57.7% .245 27.325);--color-red-700: oklch(50.5% .213 27.518);--color-red-800: oklch(44.4% .177 26.899);--color-orange-100: oklch(95.4% .038 75.164);--color-orange-500: oklch(70.5% .213 47.604);--color-orange-600: oklch(64.6% .222 41.116);--color-orange-700: oklch(55.3% .195 38.402);--color-yellow-100: oklch(97.3% .071 103.193);--color-yellow-400: oklch(85.2% .199 91.936);--color-yellow-500: oklch(79.5% .184 86.047);--color-yellow-600: oklch(68.1% .162 75.834);--color-yellow-700: oklch(55.4% .135 66.442);--color-green-50: oklch(98.2% .018 155.826);--color-green-100: oklch(96.2% .044 156.743);--color-green-200: oklch(92.5% .084 155.995);--color-green-400: oklch(79.2% .209 151.711);--color-green-500: oklch(72.3% .219 149.579);--color-green-600: oklch(62.7% .194 149.214);--color-green-700: oklch(52.7% .154 150.069);--color-green-800: oklch(44.8% .119 151.328);--color-blue-50: oklch(97% .014 254.604);--color-blue-100: oklch(93.2% .032 255.585);--color-blue-200: oklch(88.2% .059 254.128);--color-blue-400: oklch(70.7% .165 254.624);--color-blue-500: oklch(62.3% .214 259.815);--color-blue-600: oklch(54.6% .245 262.881);--color-blue-700: oklch(48.8% .243 264.376);--color-blue-800: oklch(42.4% .199 265.638);--color-blue-900: oklch(37.9% .146 265.522);--color-purple-50: oklch(97.7% .014 308.299);--color-purple-100: oklch(94.6% .033 307.174);--color-purple-200: oklch(90.2% .063 306.703);--color-purple-500: oklch(62.7% .265 303.9);--color-purple-600: oklch(55.8% .288 302.321);--color-purple-700: oklch(49.6% .265 301.924);--color-purple-900: oklch(38.1% .176 304.987);--color-pink-50: oklch(97.1% .014 343.198);--color-pink-500: oklch(65.6% .241 354.308);--color-pink-600: oklch(59.2% .249 .584);--color-slate-50: oklch(98.4% .003 247.858);--color-slate-800: oklch(27.9% .041 260.031);--color-slate-900: oklch(20.8% .042 265.755);--color-gray-400: oklch(70.7% .022 261.325);--color-gray-600: oklch(44.6% .03 256.802);--color-gray-700: oklch(37.3% .034 259.733);--color-gray-900: oklch(21% .034 264.665);--color-black: #000;--color-white: #fff;--spacing: .25rem;--container-xs: 20rem;--container-sm: 24rem;--container-md: 28rem;--container-lg: 32rem;--container-2xl: 42rem;--container-4xl: 56rem;--container-6xl: 72rem;--text-xs: .75rem;--text-xs--line-height: calc(1 / .75);--text-sm: .875rem;--text-sm--line-height: calc(1.25 / .875);--text-base: 1rem;--text-base--line-height: 1.5 ;--text-lg: 1.125rem;--text-lg--line-height: calc(1.75 / 1.125);--text-xl: 1.25rem;--text-xl--line-height: calc(1.75 / 1.25);--text-2xl: 1.5rem;--text-2xl--line-height: calc(2 / 1.5);--text-3xl: 1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl: 2.25rem;--text-4xl--line-height: calc(2.5 / 2.25);--font-weight-normal: 400;--font-weight-medium: 500;--font-weight-semibold: 600;--font-weight-bold: 700;--tracking-tight: -.025em;--tracking-widest: .1em;--leading-tight: 1.25;--leading-snug: 1.375;--leading-relaxed: 1.625;--radius-xs: .125rem;--ease-in-out: cubic-bezier(.4, 0, .2, 1);--animate-spin: spin 1s linear infinite;--animate-pulse: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--aspect-video: 16 / 9;--default-transition-duration: .15s;--default-transition-timing-function: cubic-bezier(.4, 0, .2, 1);--default-font-family: var(--font-sans);--default-mono-font-family: var(--font-mono);--color-background: var(--background);--color-foreground: var(--foreground);--color-primary: var(--primary);--color-primary-foreground: var(--primary-foreground);--color-secondary: var(--secondary);--color-secondary-foreground: var(--secondary-foreground);--color-muted: var(--muted);--color-muted-foreground: var(--muted-foreground);--color-accent: var(--accent);--color-accent-foreground: var(--accent-foreground);--color-destructive: var(--destructive);--color-destructive-foreground: var(--destructive-foreground);--color-border: var(--border);--color-input: var(--input);--color-ring: var(--ring)}}@layer base{*,:after,:before,::backdrop,::file-selector-button{box-sizing:border-box;margin:0;padding:0;border:0 solid}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings, normal);font-variation-settings:var(--default-font-variation-settings, normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1Line truncated
|
@layer properties;@layer theme,base,components,utilities;@layer theme{:root,:host{--font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-100: oklch(93.6% .032 17.717);--color-red-500: oklch(63.7% .237 25.331);--color-red-600: oklch(57.7% .245 27.325);--color-red-700: oklch(50.5% .213 27.518);--color-red-800: oklch(44.4% .177 26.899);--color-orange-100: oklch(95.4% .038 75.164);--color-orange-500: oklch(70.5% .213 47.604);--color-orange-600: oklch(64.6% .222 41.116);--color-orange-700: oklch(55.3% .195 38.402);--color-yellow-100: oklch(97.3% .071 103.193);--color-yellow-400: oklch(85.2% .199 91.936);--color-yellow-500: oklch(79.5% .184 86.047);--color-yellow-600: oklch(68.1% .162 75.834);--color-yellow-700: oklch(55.4% .135 66.442);--color-green-50: oklch(98.2% .018 155.826);--color-green-100: oklch(96.2% .044 156.743);--color-green-200: oklch(92.5% .084 155.995);--color-green-400: oklch(79.2% .209 151.711);--color-green-500: oklch(72.3% .219 149.579);--color-green-600: oklch(62.7% .194 149.214);--color-green-700: oklch(52.7% .154 150.069);--color-green-800: oklch(44.8% .119 151.328);--color-blue-50: oklch(97% .014 254.604);--color-blue-100: oklch(93.2% .032 255.585);--color-blue-200: oklch(88.2% .059 254.128);--color-blue-400: oklch(70.7% .165 254.624);--color-blue-500: oklch(62.3% .214 259.815);--color-blue-600: oklch(54.6% .245 262.881);--color-blue-700: oklch(48.8% .243 264.376);--color-blue-800: oklch(42.4% .199 265.638);--color-blue-900: oklch(37.9% .146 265.522);--color-purple-50: oklch(97.7% .014 308.299);--color-purple-100: oklch(94.6% .033 307.174);--color-purple-200: oklch(90.2% .063 306.703);--color-purple-500: oklch(62.7% .265 303.9);--color-purple-600: oklch(55.8% .288 302.321);--color-purple-700: oklch(49.6% .265 301.924);--color-purple-900: oklch(38.1% .176 304.987);--color-pink-50: oklch(97.1% .014 343.198);--color-pink-500: oklch(65.6% .241 354.308);--color-pink-600: oklch(59.2% .249 .584);--color-slate-50: oklch(98.4% .003 247.858);--color-slate-800: oklch(27.9% .041 260.031);--color-slate-900: oklch(20.8% .042 265.755);--color-gray-400: oklch(70.7% .022 261.325);--color-gray-600: oklch(44.6% .03 256.802);--color-gray-700: oklch(37.3% .034 259.733);--color-gray-900: oklch(21% .034 264.665);--color-black: #000;--color-white: #fff;--spacing: .25rem;--container-xs: 20rem;--container-sm: 24rem;--container-md: 28rem;--container-lg: 32rem;--container-2xl: 42rem;--container-4xl: 56rem;--container-6xl: 72rem;--text-xs: .75rem;--text-xs--line-height: calc(1 / .75);--text-sm: .875rem;--text-sm--line-height: calc(1.25 / .875);--text-base: 1rem;--text-base--line-height: 1.5 ;--text-lg: 1.125rem;--text-lg--line-height: calc(1.75 / 1.125);--text-xl: 1.25rem;--text-xl--line-height: calc(1.75 / 1.25);--text-2xl: 1.5rem;--text-2xl--line-height: calc(2 / 1.5);--text-3xl: 1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl: 2.25rem;--text-4xl--line-height: calc(2.5 / 2.25);--font-weight-normal: 400;--font-weight-medium: 500;--font-weight-semibold: 600;--font-weight-bold: 700;--tracking-tight: -.025em;--tracking-widest: .1em;--leading-tight: 1.25;--leading-snug: 1.375;--leading-relaxed: 1.625;--radius-xs: .125rem;--ease-in-out: cubic-bezier(.4, 0, .2, 1);--animate-spin: spin 1s linear infinite;--animate-pulse: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--aspect-video: 16 / 9;--default-transition-duration: .15s;--default-transition-timing-function: cubic-bezier(.4, 0, .2, 1);--default-font-family: var(--font-sans);--default-mono-font-family: var(--font-mono);--color-background: var(--background);--color-foreground: var(--foreground);--color-primary: var(--primary);--color-primary-foreground: var(--primary-foreground);--color-secondary: var(--secondary);--color-secondary-foreground: var(--secondary-foreground);--color-muted: var(--muted);--color-muted-foreground: var(--muted-foreground);--color-accent: var(--accent);--color-accent-foreground: var(--accent-foreground);--color-destructive: var(--destructive);--color-destructive-foreground: var(--destructive-foreground);--color-border: var(--border);--color-input: var(--input);--color-ring: var(--ring)}}@layer base{*,:after,:before,::backdrop,::file-selector-button{box-sizing:border-box;margin:0;padding:0;border:0 solid}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings, normal);font-variation-settings:var(--default-font-variation-settings, normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1Line truncated
|
||||||
+406
@@ -0,0 +1,406 @@
|
|||||||
|
var kC=Object.defineProperty;var OC=(t,n,r)=>n in t?kC(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r;var gb=(t,n,r)=>OC(t,typeof n!="symbol"?n+"":n,r);function MC(t,n){for(var r=0;r<n.length;r++){const s=n[r];if(typeof s!="string"&&!Array.isArray(s)){for(const i in s)if(i!=="default"&&!(i in t)){const c=Object.getOwnPropertyDescriptor(s,i);c&&Object.defineProperty(t,i,c.get?c:{enumerable:!0,get:()=>s[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const c of i)if(c.type==="childList")for(const u of c.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&s(u)}).observe(document,{childList:!0,subtree:!0});function r(i){const c={};return i.integrity&&(c.integrity=i.integrity),i.referrerPolicy&&(c.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?c.credentials="include":i.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function s(i){if(i.ep)return;i.ep=!0;const c=r(i);fetch(i.href,c)}})();function N0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var dm={exports:{}},Vi={};/**
|
||||||
|
* @license React
|
||||||
|
* react-jsx-runtime.production.js
|
||||||
|
*
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/var yb;function DC(){if(yb)return Vi;yb=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function r(s,i,c){var u=null;if(c!==void 0&&(u=""+c),i.key!==void 0&&(u=""+i.key),"key"in i){c={};for(var f in i)f!=="key"&&(c[f]=i[f])}else c=i;return i=c.ref,{$$typeof:t,type:s,key:u,ref:i!==void 0?i:null,props:c}}return Vi.Fragment=n,Vi.jsx=r,Vi.jsxs=r,Vi}var vb;function zC(){return vb||(vb=1,dm.exports=DC()),dm.exports}var m=zC(),fm={exports:{}},Ye={};/**
|
||||||
|
* @license React
|
||||||
|
* react.production.js
|
||||||
|
*
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/var bb;function LC(){if(bb)return Ye;bb=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),w=Symbol.iterator;function C(T){return T===null||typeof T!="object"?null:(T=w&&T[w]||T["@@iterator"],typeof T=="function"?T:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,_={};function R(T,V,L){this.props=T,this.context=V,this.refs=_,this.updater=L||S}R.prototype.isReactComponent={},R.prototype.setState=function(T,V){if(typeof T!="object"&&typeof T!="function"&&T!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,T,V,"setState")},R.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function O(){}O.prototype=R.prototype;function A(T,V,L){this.props=T,this.context=V,this.refs=_,this.updater=L||S}var D=A.prototype=new O;D.constructor=A,E(D,R.prototype),D.isPureReactComponent=!0;var B=Array.isArray;function I(){}var U={H:null,A:null,T:null,S:null},$=Object.prototype.hasOwnProperty;function me(T,V,L){var K=L.ref;return{$$typeof:t,type:T,key:V,ref:K!==void 0?K:null,props:L}}function fe(T,V){return me(T.type,V,T.props)}function pe(T){return typeof T=="object"&&T!==null&&T.$$typeof===t}function re(T){var V={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(L){return V[L]})}var Y=/\/+/g;function ue(T,V){return typeof T=="object"&&T!==null&&T.key!=null?re(""+T.key):V.toString(36)}function ye(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then(I,I):(T.status="pending",T.then(function(V){T.status==="pending"&&(T.status="fulfilled",T.value=V)},function(V){T.status==="pending"&&(T.status="rejected",T.reason=V)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function j(T,V,L,K,W){var le=typeof T;(le==="undefined"||le==="boolean")&&(T=null);var ge=!1;if(T===null)ge=!0;else switch(le){case"bigint":case"string":case"number":ge=!0;break;case"object":switch(T.$$typeof){case t:case n:ge=!0;break;case v:return ge=T._init,j(ge(T._payload),V,L,K,W)}}if(ge)return W=W(T),ge=K===""?"."+ue(T,0):K,B(W)?(L="",ge!=null&&(L=ge.replace(Y,"$&/")+"/"),j(W,V,L,"",function(Ee){return Ee})):W!=null&&(pe(W)&&(W=fe(W,L+(W.key==null||T&&T.key===W.key?"":(""+W.key).replace(Y,"$&/")+"/")+ge)),V.push(W)),1;ge=0;var q=K===""?".":K+":";if(B(T))for(var ae=0;ae<T.length;ae++)K=T[ae],le=q+ue(K,ae),ge+=j(K,V,L,le,W);else if(ae=C(T),typeof ae=="function")for(T=ae.call(T),ae=0;!(K=T.next()).done;)K=K.value,le=q+ue(K,ae++),ge+=j(K,V,L,le,W);else if(le==="object"){if(typeof T.then=="function")return j(ye(T),V,L,K,W);throw V=String(T),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return ge}function X(T,V,L){if(T==null)return T;var K=[],W=0;return j(T,K,"","",function(le){return V.call(L,le,W++)}),K}function te(T){if(T._status===-1){var V=T._result;V=V(),V.then(function(L){(T._status===0||T._status===-1)&&(T._status=1,T._result=L)},function(L){(T._status===0||T._status===-1)&&(T._status=2,T._result=L)}),T._status===-1&&(T._status=0,T._result=V)}if(T._status===1)return T._result.default;throw T._result}var se=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof T=="object"&&T!==null&&typeof T.message=="string"?String(T.message):String(T),error:T});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)},ne={map:X,forEach:function(T,V,L){X(T,function(){V.apply(this,arguments)},L)},count:function(T){var V=0;return X(T,function(){V++}),V},toArray:function(T){return X(T,function(V){return V})||[]},only:function(T){if(!pe(T))throw Error("React.Children.only expected to receive a single React element child.");return T}};return Ye.Activity=y,Ye.Children=ne,Ye.Component=R,Ye.Fragment=r,Ye.Profiler=i,Ye.PureComponent=A,Ye.StrictMode=s,Ye.Suspense=g,Ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=U,Ye.__COMPILER_RUNTIME={__proto__:null,c:function(T){return U.H.useMemoCache(T)}},Ye.cache=function(T){return function(){return T.apply(null,arguments)}},Ye.cacheSignal=function(){return null},Ye.cloneElement=function(T,V,L){if(T==null)throw Error("The argument must be
Line truncated
|
||||||
|
* @license React
|
||||||
|
* scheduler.production.js
|
||||||
|
*
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/var wb;function UC(){return wb||(wb=1,(function(t){function n(j,X){var te=j.length;j.push(X);e:for(;0<te;){var se=te-1>>>1,ne=j[se];if(0<i(ne,X))j[se]=X,j[te]=ne,te=se;else break e}}function r(j){return j.length===0?null:j[0]}function s(j){if(j.length===0)return null;var X=j[0],te=j.pop();if(te!==X){j[0]=te;e:for(var se=0,ne=j.length,T=ne>>>1;se<T;){var V=2*(se+1)-1,L=j[V],K=V+1,W=j[K];if(0>i(L,te))K<ne&&0>i(W,L)?(j[se]=W,j[K]=te,se=K):(j[se]=L,j[V]=te,se=V);else if(K<ne&&0>i(W,te))j[se]=W,j[K]=te,se=K;else break e}}return X}function i(j,X){var te=j.sortIndex-X.sortIndex;return te!==0?te:j.id-X.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var u=Date,f=u.now();t.unstable_now=function(){return u.now()-f}}var g=[],p=[],v=1,y=null,w=3,C=!1,S=!1,E=!1,_=!1,R=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function D(j){for(var X=r(p);X!==null;){if(X.callback===null)s(p);else if(X.startTime<=j)s(p),X.sortIndex=X.expirationTime,n(g,X);else break;X=r(p)}}function B(j){if(E=!1,D(j),!S)if(r(g)!==null)S=!0,I||(I=!0,re());else{var X=r(p);X!==null&&ye(B,X.startTime-j)}}var I=!1,U=-1,$=5,me=-1;function fe(){return _?!0:!(t.unstable_now()-me<$)}function pe(){if(_=!1,I){var j=t.unstable_now();me=j;var X=!0;try{e:{S=!1,E&&(E=!1,O(U),U=-1),C=!0;var te=w;try{t:{for(D(j),y=r(g);y!==null&&!(y.expirationTime>j&&fe());){var se=y.callback;if(typeof se=="function"){y.callback=null,w=y.priorityLevel;var ne=se(y.expirationTime<=j);if(j=t.unstable_now(),typeof ne=="function"){y.callback=ne,D(j),X=!0;break t}y===r(g)&&s(g),D(j)}else s(g);y=r(g)}if(y!==null)X=!0;else{var T=r(p);T!==null&&ye(B,T.startTime-j),X=!1}}break e}finally{y=null,w=te,C=!1}X=void 0}}finally{X?re():I=!1}}}var re;if(typeof A=="function")re=function(){A(pe)};else if(typeof MessageChannel<"u"){var Y=new MessageChannel,ue=Y.port2;Y.port1.onmessage=pe,re=function(){ue.postMessage(null)}}else re=function(){R(pe,0)};function ye(j,X){U=R(function(){j(t.unstable_now())},X)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(j){j.callback=null},t.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<j?Math.floor(1e3/j):5},t.unstable_getCurrentPriorityLevel=function(){return w},t.unstable_next=function(j){switch(w){case 1:case 2:case 3:var X=3;break;default:X=w}var te=w;w=X;try{return j()}finally{w=te}},t.unstable_requestPaint=function(){_=!0},t.unstable_runWithPriority=function(j,X){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var te=w;w=j;try{return X()}finally{w=te}},t.unstable_scheduleCallback=function(j,X,te){var se=t.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?se+te:se):te=se,j){case 1:var ne=-1;break;case 2:ne=250;break;case 5:ne=1073741823;break;case 4:ne=1e4;break;default:ne=5e3}return ne=te+ne,j={id:v++,callback:X,priorityLevel:j,startTime:te,expirationTime:ne,sortIndex:-1},te>se?(j.sortIndex=te,n(p,j),r(g)===null&&j===r(p)&&(E?(O(U),U=-1):E=!0,ye(B,te-se))):(j.sortIndex=ne,n(g,j),S||C||(S=!0,I||(I=!0,re()))),j},t.unstable_shouldYield=fe,t.unstable_wrapCallback=function(j){var X=w;return function(){var te=w;w=X;try{return j.apply(this,arguments)}finally{w=te}}}})(pm)),pm}var Sb;function BC(){return Sb||(Sb=1,hm.exports=UC()),hm.exports}var gm={exports:{}},mn={};/**
|
||||||
|
* @license React
|
||||||
|
* react-dom.production.js
|
||||||
|
*
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/var Eb;function PC(){if(Eb)return mn;Eb=1;var t=Nh();function n(g){var p="https://react.dev/errors/"+g;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)p+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+g+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var s={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},i=Symbol.for("react.portal");function c(g,p,v){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:y==null?null:""+y,children:g,containerInfo:p,implementation:v}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(g,p){if(g==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return mn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,mn.createPortal=function(g,p){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(n(299));return c(g,p,null,v)},mn.flushSync=function(g){var p=u.T,v=s.p;try{if(u.T=null,s.p=2,g)return g()}finally{u.T=p,s.p=v,s.d.f()}},mn.preconnect=function(g,p){typeof g=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,s.d.C(g,p))},mn.prefetchDNS=function(g){typeof g=="string"&&s.d.D(g)},mn.preinit=function(g,p){if(typeof g=="string"&&p&&typeof p.as=="string"){var v=p.as,y=f(v,p.crossOrigin),w=typeof p.integrity=="string"?p.integrity:void 0,C=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;v==="style"?s.d.S(g,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:y,integrity:w,fetchPriority:C}):v==="script"&&s.d.X(g,{crossOrigin:y,integrity:w,fetchPriority:C,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},mn.preinitModule=function(g,p){if(typeof g=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var v=f(p.as,p.crossOrigin);s.d.M(g,{crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&s.d.M(g)},mn.preload=function(g,p){if(typeof g=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var v=p.as,y=f(v,p.crossOrigin);s.d.L(g,v,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},mn.preloadModule=function(g,p){if(typeof g=="string")if(p){var v=f(p.as,p.crossOrigin);s.d.m(g,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else s.d.m(g)},mn.requestFormReset=function(g){s.d.r(g)},mn.unstable_batchedUpdates=function(g,p){return g(p)},mn.useFormState=function(g,p,v){return u.H.useFormState(g,p,v)},mn.useFormStatus=function(){return u.H.useHostTransitionStatus()},mn.version="19.2.4",mn}var _b;function R0(){if(_b)return gm.exports;_b=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}return t(),gm.exports=PC(),gm.exports}/**
|
||||||
|
* @license React
|
||||||
|
* react-dom-client.production.js
|
||||||
|
*
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/var Cb;function HC(){if(Cb)return Ii;Cb=1;var t=BC(),n=Nh(),r=R0();function s(e){var a="https://react.dev/errors/"+e;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)a+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+e+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(e){var a=e,o=e;if(e.alternate)for(;a.return;)a=a.return;else{e=a;do a=e,(a.flags&4098)!==0&&(o=a.return),e=a.return;while(e)}return a.tag===3?o:null}function u(e){if(e.tag===13){var a=e.memoizedState;if(a===null&&(e=e.alternate,e!==null&&(a=e.memoizedState)),a!==null)return a.dehydrated}return null}function f(e){if(e.tag===31){var a=e.memoizedState;if(a===null&&(e=e.alternate,e!==null&&(a=e.memoizedState)),a!==null)return a.dehydrated}return null}function g(e){if(c(e)!==e)throw Error(s(188))}function p(e){var a=e.alternate;if(!a){if(a=c(e),a===null)throw Error(s(188));return a!==e?null:e}for(var o=e,l=a;;){var d=o.return;if(d===null)break;var h=d.alternate;if(h===null){if(l=d.return,l!==null){o=l;continue}break}if(d.child===h.child){for(h=d.child;h;){if(h===o)return g(d),e;if(h===l)return g(d),a;h=h.sibling}throw Error(s(188))}if(o.return!==l.return)o=d,l=h;else{for(var x=!1,N=d.child;N;){if(N===o){x=!0,o=d,l=h;break}if(N===l){x=!0,l=d,o=h;break}N=N.sibling}if(!x){for(N=h.child;N;){if(N===o){x=!0,o=h,l=d;break}if(N===l){x=!0,l=h,o=d;break}N=N.sibling}if(!x)throw Error(s(189))}}if(o.alternate!==l)throw Error(s(190))}if(o.tag!==3)throw Error(s(188));return o.stateNode.current===o?e:a}function v(e){var a=e.tag;if(a===5||a===26||a===27||a===6)return e;for(e=e.child;e!==null;){if(a=v(e),a!==null)return a;e=e.sibling}return null}var y=Object.assign,w=Symbol.for("react.element"),C=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),A=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),me=Symbol.for("react.activity"),fe=Symbol.for("react.memo_cache_sentinel"),pe=Symbol.iterator;function re(e){return e===null||typeof e!="object"?null:(e=pe&&e[pe]||e["@@iterator"],typeof e=="function"?e:null)}var Y=Symbol.for("react.client.reference");function ue(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Y?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case R:return"Profiler";case _:return"StrictMode";case B:return"Suspense";case I:return"SuspenseList";case me:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case S:return"Portal";case A:return e.displayName||"Context";case O:return(e._context.displayName||"Context")+".Consumer";case D:var a=e.render;return e=e.displayName,e||(e=a.displayName||a.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case U:return a=e.displayName||null,a!==null?a:ue(e.type)||"Memo";case $:a=e._payload,e=e._init;try{return ue(e(a))}catch{}}return null}var ye=Array.isArray,j=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},se=[],ne=-1;function T(e){return{current:e}}function V(e){0>ne||(e.current=se[ne],se[ne]=null,ne--)}function L(e,a){ne++,se[ne]=e.current,e.current=a}var K=T(null),W=T(null),le=T(null),ge=T(null);function q(e,a){switch(L(le,a),L(W,e),L(K,null),a.nodeType){case 9:case 11:e=(e=a.documentElement)&&(e=e.namespaceURI)?Pv(e):0;break;default:if(e=a.tagName,a=a.namespaceURI)a=Pv(a),e=Hv(a,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}V(K),L(K,e)}function ae(){V(K),V(W),V(le)}function Ee(e){e.memoizedState!==null&&L(ge,e);var a=K.current,o=Hv(a,e.type);a!==o&&(L(W,e),L(K,o))}function ke(e){W.current===e&&(V(K),V(W)),ge.current===e&&(V(ge),Ui._currentValue=te)}var ce,_e;function be(e){if(ce===void 0)try{throw Error()}catch(o){var a=o.stack.trim().match(/\n( *(at )?)/);ce=a&&a[1]||"",_e=-1<o.stack.indexOf(`
|
||||||
|
at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
|
||||||
|
`+ce+e+_e}var Re=!1;function Pe(e,a){if(!e||Re)return"";Re=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(a){var he=function(){throw Error()};if(Object.defineProperty(he.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(he,[])}catch(ee){var Q=ee}Reflect.construct(e,[],he)}else{try{he.call()}catch(ee){Q=ee}e.call(he.prototype)}}else{try{throw Error()}catch(ee){Q=ee}(he=e())&&typeof he.catch=="function"&&he.catch(function(){})}}catch(ee){if(ee&&Q&&typeof ee.stack=="string")return[ee.stack,Q.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=l.DetermineComponentFrameRoot(),x=h[0],N=h[1];if(x&&N){var M=x.split(`
|
||||||
|
`),Z=N.split(`
|
||||||
|
`);for(d=l=0;l<M.length&&!M[l].includes("DetermineComponentFrameRoot");)l++;for(;d<Z.length&&!Z[d].includes("DetermineComponentFrameRoot");)d++;if(l===M.length||d===Z.length)for(l=M.length-1,d=Z.length-1;1<=l&&0<=d&&M[l]!==Z[d];)d--;for(;1<=l&&0<=d;l--,d--)if(M[l]!==Z[d]){if(l!==1||d!==1)do if(l--,d--,0>d||M[l]!==Z[d]){var ie=`
|
||||||
|
`+M[l].replace(" at new "," at ");return e.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",e.displayName)),ie}while(1<=l&&0<=d);break}}}finally{Re=!1,Error.prepareStackTrace=o}return(o=e?e.displayName||e.name:"")?be(o):""}function qe(e,a){switch(e.tag){case 26:case 27:case 5:return be(e.type);case 16:return be("Lazy");case 13:return e.child!==a&&a!==null?be("Suspense Fallback"):be("Suspense");case 19:return be("SuspenseList");case 0:case 15:return Pe(e.type,!1);case 11:return Pe(e.type.render,!1);case 1:return Pe(e.type,!0);case 31:return be("Activity");default:return""}}function Ue(e){try{var a="",o=null;do a+=qe(e,o),o=e,e=e.return;while(e);return a}catch(l){return`
|
||||||
|
Error generating stack: `+l.message+`
|
||||||
|
`+l.stack}}var Le=Object.prototype.hasOwnProperty,pt=t.unstable_scheduleCallback,Zt=t.unstable_cancelCallback,k=t.unstable_shouldYield,P=t.unstable_requestPaint,F=t.unstable_now,Se=t.unstable_getCurrentPriorityLevel,ve=t.unstable_ImmediatePriority,xe=t.unstable_UserBlockingPriority,Ce=t.unstable_NormalPriority,Ve=t.unstable_LowPriority,We=t.unstable_IdlePriority,Pt=t.log,Dt=t.unstable_setDisableYieldValue,ht=null,zt=null;function rn(e){if(typeof Pt=="function"&&Dt(e),zt&&typeof zt.setStrictMode=="function")try{zt.setStrictMode(ht,e)}catch{}}var Ht=Math.clz32?Math.clz32:Yn,Qo=Math.log,ur=Math.LN2;function Yn(e){return e>>>=0,e===0?32:31-(Qo(e)/ur|0)|0}var Ua=256,Ms=262144,Wr=4194304;function xa(e){var a=e&42;if(a!==0)return a;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function $e(e,a,o){var l=e.pendingLanes;if(l===0)return 0;var d=0,h=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var N=l&134217727;return N!==0?(l=N&~h,l!==0?d=xa(l):(x&=N,x!==0?d=xa(x):o||(o=N&~e,o!==0&&(d=xa(o))))):(N=l&~h,N!==0?d=xa(N):x!==0?d=xa(x):o||(o=l&~e,o!==0&&(d=xa(o)))),d===0?0:a!==0&&a!==d&&(a&h)===0&&(h=d&-d,o=a&-a,h>=o||h===32&&(o&4194048)!==0)?a:d}function Ct(e,a){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&a)===0}function tn(e,a){switch(e){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function fn(){var e=Wr;return Wr<<=1,(Wr&62914560)===0&&(Wr=4194304),e}function dr(e){for(var a=[],o=0;31>o;o++)a.push(e);return a}function At(e,a){e.pendingLanes|=a,a!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function bn(e,a,o,l,d,h){var x=e.pendingLanes;e.pendingLanes=o,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=o,e.entangledLanes&=o,e.errorRecoveryDisabledLanes&=o,e.shellSuspendCounter=0;var N=e.entanglements,M=e.expirationTimes,Z=e.hiddenUpdates;for(o=x&~o;0<o;){var ie=31-Ht(o),he=1<<ie;N[ie]=0,M[ie]=-1;var Q=Z[ie];if(Q!==null)for(Z[ie]=null,ie=0;ie<Q.length;ie++){var ee=Q[ie];ee!==null&&(ee.lane&=-536870913)}o&=~he}l!==0&&Jr(e,l,0),h!==0&&d===0&&e.tag!==0&&(e.suspendedLanes|=h&~(x&~a))}function Jr(e,a,o){e.pendingLanes|=a,e.suspendedLanes&=~a;var l=31-Ht(a);e.entangledLanes|=a,e.entanglements[l]=e.entanglements[l]|1073741824|o&261930}function xn(e,a){var o=e.entangledLanes|=a;for(e=e.entanglements;o;){var l=31-Ht(o),d=1<<l;d&a|e[l]&a&&(e[l]|=a),o&=~d}}function wn(e,a){var o=a&-a;return o=(o&42)!==0?1:Ds(o),(o&(e.suspendedLanes|a))!==0?0:o}function Ds(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ca(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ed(){var e=X.p;return e!==0?e:(e=window.event,e===void 0?32:cb(e.type))}function Cp(e,a){var o=X.p;try{return X.p=e,a()}finally{X.p=o}}var fr=Math.random().toString(36).slice(2),sn="__reactFiber$"+fr,Sn="__reactProps$"+fr,zs="__reactContainer$"+fr,td="__reactEvents$"+fr,xE="__reactListeners$"+fr,wE="__reactHandles$"+fr,Np="__reactResources$"+fr,Wo="__reactMarker$"+fr;function nd(e){delete e[sn],delete e[Sn],delete e[td],delete e[xE],delete e[wE]}function Ls(e){var a=e[sn];if(a)return a;for(var o=e.parentNode;o;){if(a=o[zs]||o[sn]){if(o=a.alternate,a.child!==null||o!==null&&o.child!==null)for(e=Yv(e);e!==null;){if(o=e[sn])return o;e=Yv(e)}return a}e=o,o=e.parentNode}return null}function Us(e){if(e=e[sn]||e[zs]){var a=e.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return e}return null}function Jo(e){var a=e.tag;if(a===5||a===26||a===27||a===6)return e.stateNode;throw Error(s(33))}function Bs(e){var a=e[Np];return a||(a=e[Np]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function nn(e){e[Wo]=!0}var Rp=new Set,Ap={};function es(e,a){Ps(e,a),Ps(e+"Capture",a)}function Ps(e,a){for(Ap[e]=a,e=0;e<a.length;e++)Rp.add(a[e])}var SE=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\
Line truncated
|
||||||
|
`).replace(J_,"")}function Uv(e,a){return a=Lv(a),Lv(e)===a}function bt(e,a,o,l,d,h){switch(o){case"children":typeof l=="string"?a==="body"||a==="textarea"&&l===""||Vs(e,l):(typeof l=="number"||typeof l=="bigint")&&a!=="body"&&Vs(e,""+l);break;case"className":Al(e,"class",l);break;case"tabIndex":Al(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Al(e,o,l);break;case"style":Up(e,l,h);break;case"data":if(a!=="object"){Al(e,"data",l);break}case"src":case"href":if(l===""&&(a!=="a"||o!=="href")){e.removeAttribute(o);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(o);break}l=Tl(""+l),e.setAttribute(o,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(o,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof h=="function"&&(o==="formAction"?(a!=="input"&&bt(e,a,"name",d.name,d,null),bt(e,a,"formEncType",d.formEncType,d,null),bt(e,a,"formMethod",d.formMethod,d,null),bt(e,a,"formTarget",d.formTarget,d,null)):(bt(e,a,"encType",d.encType,d,null),bt(e,a,"method",d.method,d,null),bt(e,a,"target",d.target,d,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(o);break}l=Tl(""+l),e.setAttribute(o,l);break;case"onClick":l!=null&&(e.onclick=Pa);break;case"onScroll":l!=null&&at("scroll",e);break;case"onScrollEnd":l!=null&&at("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(o=l.__html,o!=null){if(d.children!=null)throw Error(s(60));e.innerHTML=o}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}o=Tl(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(o,""+l):e.removeAttribute(o);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(o,""):e.removeAttribute(o);break;case"capture":case"download":l===!0?e.setAttribute(o,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(o,l):e.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(o,l):e.removeAttribute(o);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(o):e.setAttribute(o,l);break;case"popover":at("beforetoggle",e),at("toggle",e),Rl(e,"popover",l);break;case"xlinkActuate":Ba(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Ba(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Ba(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Ba(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Ba(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Ba(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Ba(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Ba(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Ba(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Rl(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=RE.get(o)||o,Rl(e,o,l))}}function Yf(e,a,o,l,d,h){switch(o){case"style":Up(e,l,h);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(o=l.__html,o!=null){if(d.children!=null)throw Error(s(60));e.innerHTML=o}}break;case"children":typeof l=="string"?Vs(e,l):(typeof l=="number"||typeof l=="bigint")&&Vs(e,""+l);break;case"onScroll":l!=null&&at("scroll",e);break;case"onScrollEnd":l!=null&&at("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Pa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"inne
Line truncated
|
||||||
|
* react-router v7.13.2
|
||||||
|
*
|
||||||
|
* Copyright (c) Remix Software Inc.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE.md file in the root directory of this source tree.
|
||||||
|
*
|
||||||
|
* @license MIT
|
||||||
|
*/var Rb="popstate";function Ab(t){return typeof t=="object"&&t!=null&&"pathname"in t&&"search"in t&&"hash"in t&&"state"in t&&"key"in t}function qC(t={}){function n(s,i){var p;let c=(p=i.state)==null?void 0:p.masked,{pathname:u,search:f,hash:g}=c||s.location;return Gm("",{pathname:u,search:f,hash:g},i.state&&i.state.usr||null,i.state&&i.state.key||"default",c?{pathname:s.location.pathname,search:s.location.search,hash:s.location.hash}:void 0)}function r(s,i){return typeof i=="string"?i:sl(i)}return $C(n,r,null,t)}function Rt(t,n){if(t===!1||t===null||typeof t>"u")throw new Error(n)}function oa(t,n){if(!t){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function FC(){return Math.random().toString(36).substring(2,10)}function jb(t,n){return{usr:t.state,key:t.key,idx:n,masked:t.unstable_mask?{pathname:t.pathname,search:t.search,hash:t.hash}:void 0}}function Gm(t,n,r=null,s,i){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof n=="string"?Fo(n):n,state:r,key:n&&n.key||s||FC(),unstable_mask:i}}function sl({pathname:t="/",search:n="",hash:r=""}){return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Fo(t){let n={};if(t){let r=t.indexOf("#");r>=0&&(n.hash=t.substring(r),t=t.substring(0,r));let s=t.indexOf("?");s>=0&&(n.search=t.substring(s),t=t.substring(0,s)),t&&(n.pathname=t)}return n}function $C(t,n,r,s={}){let{window:i=document.defaultView,v5Compat:c=!1}=s,u=i.history,f="POP",g=null,p=v();p==null&&(p=0,u.replaceState({...u.state,idx:p},""));function v(){return(u.state||{idx:null}).idx}function y(){f="POP";let _=v(),R=_==null?null:_-p;p=_,g&&g({action:f,location:E.location,delta:R})}function w(_,R){f="PUSH";let O=Ab(_)?_:Gm(E.location,_,R);p=v()+1;let A=jb(O,p),D=E.createHref(O.unstable_mask||O);try{u.pushState(A,"",D)}catch(B){if(B instanceof DOMException&&B.name==="DataCloneError")throw B;i.location.assign(D)}c&&g&&g({action:f,location:E.location,delta:1})}function C(_,R){f="REPLACE";let O=Ab(_)?_:Gm(E.location,_,R);p=v();let A=jb(O,p),D=E.createHref(O.unstable_mask||O);u.replaceState(A,"",D),c&&g&&g({action:f,location:E.location,delta:0})}function S(_){return GC(_)}let E={get action(){return f},get location(){return t(i,u)},listen(_){if(g)throw new Error("A history only accepts one active listener");return i.addEventListener(Rb,y),g=_,()=>{i.removeEventListener(Rb,y),g=null}},createHref(_){return n(i,_)},createURL:S,encodeLocation(_){let R=S(_);return{pathname:R.pathname,search:R.search,hash:R.hash}},push:w,replace:C,go(_){return u.go(_)}};return E}function GC(t,n=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),Rt(r,"No window.location.(origin|href) available to create URL");let s=typeof t=="string"?t:sl(t);return s=s.replace(/ $/,"%20"),!n&&s.startsWith("//")&&(s=r+s),new URL(s,r)}function A0(t,n,r="/"){return YC(t,n,r,!1)}function YC(t,n,r,s){let i=typeof n=="string"?Fo(n):n,c=rr(i.pathname||"/",r);if(c==null)return null;let u=j0(t);ZC(u);let f=null;for(let g=0;f==null&&g<u.length;++g){let p=sN(c);f=aN(u[g],p,s)}return f}function j0(t,n=[],r=[],s="",i=!1){let c=(u,f,g=i,p)=>{let v={relativePath:p===void 0?u.path||"":p,caseSensitive:u.caseSensitive===!0,childrenIndex:f,route:u};if(v.relativePath.startsWith("/")){if(!v.relativePath.startsWith(s)&&g)return;Rt(v.relativePath.startsWith(s),`Absolute route path "${v.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),v.relativePath=v.relativePath.slice(s.length)}let y=ka([s,v.relativePath]),w=r.concat(v);u.children&&u.children.length>0&&(Rt(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),j0(u.children,n,w,y,g)),!(u.path==null&&!u.index)&&n.push({path:y,score:tN(y,u.index),routesMeta:w})};return t.forEach((u,f)=>{var g;if(u.path===""||!((g=u.path)!=null&&g.includes("?")))c(u,f);else for(let p of T0(u.path))c(u,f,!0,p)}),n}function T0(t){let n=t.split("/");if(n.length===0)return[];let[r,...s]=n,i=r.endsWith("?"),c=r.replace(/\?$/,"");if(s.length===0)return i?[c,""]:[c];let u=T0(s.join("/")),f=[];return f.push(...u.map(g=>g===""?c:[c,g].join("/"))),i&&f.push(...u),f.map(g=>t.startsWith("/")&&g===""?"/":g)}function ZC(t){t.sort((n,r)=>n.score!==r.score?r.score-n.score:nN(n.routesMeta.map(s=>s.childrenIndex),r.routesMeta.map(s=>s.childrenIndex)))}var XC=/^:[\w-]+$/,KC=3,QC=2,WC=1,JC=10,eN=-2,Tb=t=>t==="*";function tN(t,n){let r=t.split("/"),s=r.length;return r.some(Tb)&&(s+=eN),n&&(s+=QC),r.filter(i=>!Tb(i)).reduce((i,c)=>i+(XC.test(c)?KC:c===""?WC:JC),s)}function nN(t,n){return t.length===n.length&&t.slice(0,-1).every((s,i)=>s===n[i])?t[t.length-1]-n[n.length-1]:0}function aN(t,n,r=!1){let{routesMeta:s}=t,i={},c="/",u=[];for(let f=0;f<s.length;++f){let g=s[f],p=f===s.length-1,v=c==="/"?n:n.slice(c.length)||"/",y=iu({path:g.relativePath,cas
Line truncated
|
||||||
|
|
||||||
|
Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}/*`}">.`)}let v=Da(),y;if(n){let R=typeof n=="string"?Fo(n):n;Rt(g==="/"||((_=R.pathname)==null?void 0:_.startsWith(g)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${g}" but pathname "${R.pathname}" was given in the \`location\` prop.`),y=R}else y=v;let w=y.pathname||"/",C=w;if(g!=="/"){let R=g.replace(/^\//,"").split("/");C="/"+w.replace(/^\//,"").split("/").slice(R.length).join("/")}let S=A0(t,{pathname:C});oa(p||S!=null,`No routes matched location "${y.pathname}${y.search}${y.hash}" `),oa(S==null||S[S.length-1].route.element!==void 0||S[S.length-1].route.Component!==void 0||S[S.length-1].route.lazy!==void 0,`Matched leaf route at location "${y.pathname}${y.search}${y.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let E=MN(S&&S.map(R=>Object.assign({},R,{params:Object.assign({},u,R.params),pathname:ka([g,s.encodeLocation?s.encodeLocation(R.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?g:ka([g,s.encodeLocation?s.encodeLocation(R.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathnameBase])})),i,r);return n&&E?b.createElement(ml.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...y},navigationType:"POP"}},E):E}function jN(){let t=BN(),n=mN(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,s="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:s},c={padding:"2px 4px",backgroundColor:s},u=null;return console.error("Error handled by React Router default ErrorBoundary:",t),u=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:c},"ErrorBoundary")," or"," ",b.createElement("code",{style:c},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},n),r?b.createElement("pre",{style:i},r):null,u)}var TN=b.createElement(jN,null),P0=class extends b.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){this.props.onError?this.props.onError(t,n):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const r=SN(t.digest);r&&(t=r)}let n=t!==void 0?b.createElement(ia.Provider,{value:this.props.routeContext},b.createElement(Ah.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?b.createElement(kN,{error:t},n):n}};P0.contextType=gN;var vm=new WeakMap;function kN({children:t,error:n}){let{basename:r}=b.useContext(Gn);if(typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){let s=wN(n.digest);if(s){let i=vm.get(n);if(i)throw i;let c=O0(s.location,r);if(k0&&!vm.get(n))if(c.isExternal||s.reloadDocument)window.location.href=c.absoluteURL||c.to;else{const u=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(c.to,{replace:s.replace}));throw vm.set(n,u),u}return b.createElement("meta",{httpEquiv:"refresh",content:`0;url=${c.absoluteURL||c.to}`})}}return t}function ON({routeContext:t,match:n,children:r}){let s=b.useContext($o);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),b.createElement(ia.Provider,{value:t},r)}function MN(t,n=[],r){let s=r==null?void 0:r.state;if(t==null){if(!s)return null;if(s.errors)t=s.matches;else if(n.length===0&&!s.initialized&&s.matches.length>0)t=s.matches;else return null}let i=t,c=s==null?void 0:s.errors;if(c!=null){let v=i.findIndex(y=>y.route.id&&(c==null?void 0:c[y.route.id])!==void 0);Rt(v>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),i=i.slice(0,Math.min(i.length,v+1))}let u=!1,f=-1;if(r&&s){u=s.renderFallback;for(let v=0;v<i.length;v++){let y=i[v];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(f=v),y.route.id){let{loaderData:w,errors:C}=s,S=yLine truncated
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const Q2=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),W2=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,r,s)=>s?s.toUpperCase():r.toLowerCase()),Lb=t=>{const n=W2(t);return n.charAt(0).toUpperCase()+n.slice(1)},Y0=(...t)=>t.filter((n,r,s)=>!!n&&n.trim()!==""&&s.indexOf(n)===r).join(" ").trim(),J2=t=>{for(const n in t)if(n.startsWith("aria-")||n==="role"||n==="title")return!0};/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/var eR={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const tR=b.forwardRef(({color:t="currentColor",size:n=24,strokeWidth:r=2,absoluteStrokeWidth:s,className:i="",children:c,iconNode:u,...f},g)=>b.createElement("svg",{ref:g,...eR,width:n,height:n,stroke:t,strokeWidth:s?Number(r)*24/Number(n):r,className:Y0("lucide",i),...!c&&!J2(f)&&{"aria-hidden":"true"},...f},[...u.map(([p,v])=>b.createElement(p,v)),...Array.isArray(c)?c:[c]]));/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const Ge=(t,n)=>{const r=b.forwardRef(({className:s,...i},c)=>b.createElement(tR,{ref:c,iconNode:n,className:Y0(`lucide-${Q2(Lb(t))}`,`lucide-${t}`,s),...i}));return r.displayName=Lb(t),r};/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const nR=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Ub=Ge("arrow-left",nR);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const aR=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],rR=Ge("arrow-right",aR);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const sR=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],oR=Ge("book-open",sR);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const iR=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Km=Ge("chevron-down",iR);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const lR=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Qm=Ge("chevron-right",lR);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const cR=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],uR=Ge("chevron-up",cR);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const dR=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],fR=Ge("circle-alert",dR);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const mR=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],hR=Ge("circle-check-big",mR);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const pR=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Bb=Ge("circle-check",pR);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const gR=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],yR=Ge("circle-x",gR);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const vR=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],bR=Ge("clock",vR);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const xR=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],wR=Ge("code-xml",xR);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const SR=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],ER=Ge("ellipsis-vertical",SR);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const _R=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],CR=Ge("external-link",_R);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const NR=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],RR=Ge("eye-off",NR);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const AR=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],jR=Ge("eye",AR);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const TR=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],Pb=Ge("file-json",TR);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const kR=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],Wm=Ge("flask-conical",kR);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const OR=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],MR=Ge("funnel",OR);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const DR=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],zR=Ge("globe",DR);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const LR=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],Z0=Ge("key-round",LR);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const UR=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],BR=Ge("layers",UR);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const PR=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],HR=Ge("layout-dashboard",PR);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const VR=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],ol=Ge("loader-circle",VR);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const IR=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],qR=Ge("log-out",IR);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const FR=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]],$R=Ge("message-square",FR);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const GR=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],YR=Ge("moon",GR);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const ZR=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],XR=Ge("play",ZR);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const KR=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Jm=Ge("plus",KR);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const QR=[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15",key:"dxknvb"}],["path",{d:"M6.16 6.16a9 9 0 1 0 12.68 12.68",key:"1x7qb5"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],WR=Ge("power-off",QR);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const JR=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],X0=Ge("power",JR);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const eA=[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]],Hb=Ge("qr-code",eA);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const tA=[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]],nA=Ge("refresh-ccw",tA);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const aA=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Vb=Ge("refresh-cw",aA);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const rA=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],Ib=Ge("save",rA);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const sA=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],K0=Ge("search",sA);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const oA=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],iA=Ge("settings",oA);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const lA=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],cA=Ge("shield-check",lA);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const uA=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],dA=Ge("shield",uA);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const fA=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],mA=Ge("smartphone",fA);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const hA=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],pA=Ge("square-terminal",hA);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const gA=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],yA=Ge("sun",gA);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const vA=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],zh=Ge("trash-2",vA);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const bA=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],xA=Ge("triangle-alert",bA);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const wA=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Es=Ge("x",wA);/**
|
||||||
|
* @license lucide-react v0.525.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const SA=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],EA=Ge("zap",SA);class _A extends b.Component{constructor(r){super(r);gb(this,"handleReset",()=>{this.setState({hasError:!1,error:null,errorInfo:null})});this.state={hasError:!1,error:null,errorInfo:null}}static getDerivedStateFromError(r){return{hasError:!0,error:r,errorInfo:null}}componentDidCatch(r,s){console.error("ErrorBoundary caught an error:",r,s),this.setState({error:r,errorInfo:s})}render(){return this.state.hasError?this.props.fallback?this.props.fallback:m.jsx("div",{className:"flex min-h-screen items-center justify-center bg-gray-50 px-4",children:m.jsxs("div",{className:"w-full max-w-md rounded-lg bg-white p-8 shadow-lg",children:[m.jsx("div",{className:"mb-4 flex items-center justify-center",children:m.jsx("div",{className:"rounded-full bg-red-100 p-3",children:m.jsx(xA,{className:"h-8 w-8 text-red-600"})})}),m.jsx("h1",{className:"mb-2 text-center text-2xl font-bold text-gray-900",children:"Algo deu errado"}),m.jsx("p",{className:"mb-6 text-center text-gray-600",children:"Ocorreu um erro inesperado na aplicação."}),this.state.error&&m.jsxs("div",{className:"mb-6 rounded-md bg-red-50 p-4",children:[m.jsx("p",{className:"text-sm font-medium text-red-800",children:this.state.error.message}),!1]}),m.jsxs("div",{className:"flex gap-3",children:[m.jsx("button",{onClick:this.handleReset,className:"flex-1 rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",children:"Tentar novamente"}),m.jsx("button",{onClick:()=>window.location.href="/",className:"flex-1 rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",children:"Voltar ao início"})]})]})}):this.props.children}}function Q0(t){var n,r,s="";if(typeof t=="string"||typeof t=="number")s+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(n=0;n<i;n++)t[n]&&(r=Q0(t[n]))&&(s&&(s+=" "),s+=r)}else for(r in t)t[r]&&(s&&(s+=" "),s+=r);return s}function Lh(){for(var t,n,r=0,s="",i=arguments.length;r<i;r++)(t=arguments[r])&&(n=Q0(t))&&(s&&(s+=" "),s+=n);return s}const CA=(t,n)=>{const r=new Array(t.length+n.length);for(let s=0;s<t.length;s++)r[s]=t[s];for(let s=0;s<n.length;s++)r[t.length+s]=n[s];return r},NA=(t,n)=>({classGroupId:t,validator:n}),W0=(t=new Map,n=null,r)=>({nextPart:t,validators:n,classGroupId:r}),lu="-",qb=[],RA="arbitrary..",AA=t=>{const n=TA(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:s}=t;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return jA(u);const f=u.split(lu),g=f[0]===""&&f.length>1?1:0;return J0(f,g,n)},getConflictingClassGroupIds:(u,f)=>{if(f){const g=s[u],p=r[u];return g?p?CA(p,g):g:p||qb}return r[u]||qb}}},J0=(t,n,r)=>{if(t.length-n===0)return r.classGroupId;const i=t[n],c=r.nextPart.get(i);if(c){const p=J0(t,n+1,c);if(p)return p}const u=r.validators;if(u===null)return;const f=n===0?t.join(lu):t.slice(n).join(lu),g=u.length;for(let p=0;p<g;p++){const v=u[p];if(v.validator(f))return v.classGroupId}},jA=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=t.slice(1,-1),r=n.indexOf(":"),s=n.slice(0,r);return s?RA+s:void 0})(),TA=t=>{const{theme:n,classGroups:r}=t;return kA(r,n)},kA=(t,n)=>{const r=W0();for(const s in t){const i=t[s];Uh(i,r,s,n)}return r},Uh=(t,n,r,s)=>{const i=t.length;for(let c=0;c<i;c++){const u=t[c];OA(u,n,r,s)}},OA=(t,n,r,s)=>{if(typeof t=="string"){MA(t,n,r);return}if(typeof t=="function"){DA(t,n,r,s);return}zA(t,n,r,s)},MA=(t,n,r)=>{const s=t===""?n:e1(n,t);s.classGroupId=r},DA=(t,n,r,s)=>{if(LA(t)){Uh(t(s),n,r,s);return}n.validators===null&&(n.validators=[]),n.validators.push(NA(r,t))},zA=(t,n,r,s)=>{const i=Object.entries(t),c=i.length;for(let u=0;u<c;u++){const[f,g]=i[u];Uh(g,e1(n,f),r,s)}},e1=(t,n)=>{let r=t;const s=n.split(lu),i=s.length;for(let c=0;c<i;c++){const u=s[c];let f=r.nextPart.get(u);f||(f=W0(),r.nextPart.set(u,f)),r=f}return r},LA=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,UA=t=>{if(t<1)return{get:()=>{},set:()=>{}};let n=0,r=Object.create(null),s=Object.create(null);const i=(c,u)=>{r[c]=u,n++,n>t&&(n=0,s=r,r=Object.create(null))};return{get(c){let u=r[c];if(u!==void 0)return u;if((u=s[c])!==void 0)return i(c,u),u},set(c,u){c in r?r[c]=u:i(c,u)}}},eh="!",Fb=":",BA=[],$b=(t,n,r,s,i)=>({modifiers:t,hasImportantModifier:n,baseClassName:r,maybePostfixModifierPosition:s,isExternal:i}),PA=t=>{const{prefix:n,experimentalParseClassName:r}=t;let s=i=>{const c=[];let u=0,f=0,g=0,p;const v=i.length;for(let E=0;E<v;E++){const _=i[E];if(u===0&&f===0){if(_===Fb){c.push(i.slice(g,E)),g=E+1;continue}if(_==="/"){p=E;continue}}_==="["?u++:_==="]"?u--:_==="("?f++:_===")"&&f--}const y=c.length===0?i:i.slice(g);let w=y,C=!1;y.endsWith(eLine truncated
|
||||||
|
`).forEach(function(u){i=u.indexOf(":"),r=u.substring(0,i).trim().toLowerCase(),s=u.substring(i+1).trim(),!(!r||n[r]&&NT[r])&&(r==="set-cookie"?n[r]?n[r].push(s):n[r]=[s]:n[r]=n[r]?n[r]+", "+s:s)}),n},tx=Symbol("internals");function $i(t){return t&&String(t).trim().toLowerCase()}function nu(t){return t===!1||t==null?t:J.isArray(t)?t.map(nu):String(t)}function AT(t){const n=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=r.exec(t);)n[s[1]]=s[2];return n}const jT=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Em(t,n,r,s,i){if(J.isFunction(s))return s.call(this,n,r);if(i&&(n=r),!!J.isString(n)){if(J.isString(s))return n.indexOf(s)!==-1;if(J.isRegExp(s))return s.test(n)}}function TT(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(n,r,s)=>r.toUpperCase()+s)}function kT(t,n){const r=J.toCamelCase(" "+n);["get","set","has"].forEach(s=>{Object.defineProperty(t,s+r,{value:function(i,c,u){return this[s].call(this,n,i,c,u)},configurable:!0})})}let Mn=class{constructor(n){n&&this.set(n)}set(n,r,s){const i=this;function c(f,g,p){const v=$i(g);if(!v)throw new Error("header name must be a non-empty string");const y=J.findKey(i,v);(!y||i[y]===void 0||p===!0||p===void 0&&i[y]!==!1)&&(i[y||g]=nu(f))}const u=(f,g)=>J.forEach(f,(p,v)=>c(p,v,g));if(J.isPlainObject(n)||n instanceof this.constructor)u(n,r);else if(J.isString(n)&&(n=n.trim())&&!jT(n))u(RT(n),r);else if(J.isObject(n)&&J.isIterable(n)){let f={},g,p;for(const v of n){if(!J.isArray(v))throw TypeError("Object iterator must return a key-value pair");f[p=v[0]]=(g=f[p])?J.isArray(g)?[...g,v[1]]:[g,v[1]]:v[1]}u(f,r)}else n!=null&&c(r,n,s);return this}get(n,r){if(n=$i(n),n){const s=J.findKey(this,n);if(s){const i=this[s];if(!r)return i;if(r===!0)return AT(i);if(J.isFunction(r))return r.call(this,i,s);if(J.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,r){if(n=$i(n),n){const s=J.findKey(this,n);return!!(s&&this[s]!==void 0&&(!r||Em(this,this[s],s,r)))}return!1}delete(n,r){const s=this;let i=!1;function c(u){if(u=$i(u),u){const f=J.findKey(s,u);f&&(!r||Em(s,s[f],f,r))&&(delete s[f],i=!0)}}return J.isArray(n)?n.forEach(c):c(n),i}clear(n){const r=Object.keys(this);let s=r.length,i=!1;for(;s--;){const c=r[s];(!n||Em(this,this[c],c,n,!0))&&(delete this[c],i=!0)}return i}normalize(n){const r=this,s={};return J.forEach(this,(i,c)=>{const u=J.findKey(s,c);if(u){r[u]=nu(i),delete r[c];return}const f=n?TT(c):String(c).trim();f!==c&&delete r[c],r[f]=nu(i),s[f]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const r=Object.create(null);return J.forEach(this,(s,i)=>{s!=null&&s!==!1&&(r[i]=n&&J.isArray(s)?s.join(", "):s)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,r])=>n+": "+r).join(`
|
||||||
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...r){const s=new this(n);return r.forEach(i=>s.set(i)),s}static accessor(n){const s=(this[tx]=this[tx]={accessors:{}}).accessors,i=this.prototype;function c(u){const f=$i(u);s[f]||(kT(i,u),s[f]=!0)}return J.isArray(n)?n.forEach(c):c(n),this}};Mn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);J.reduceDescriptors(Mn.prototype,({value:t},n)=>{let r=n[0].toUpperCase()+n.slice(1);return{get:()=>t,set(s){this[r]=s}}});J.freezeMethods(Mn);function _m(t,n){const r=this||vl,s=n||r,i=Mn.from(s.headers);let c=s.data;return J.forEach(t,function(f){c=f.call(r,c,i.normalize(),n?n.status:void 0)}),i.normalize(),c}function R1(t){return!!(t&&t.__CANCEL__)}let bl=class extends Ie{constructor(n,r,s){super(n??"canceled",Ie.ERR_CANCELED,r,s),this.name="CanceledError",this.__CANCEL__=!0}};function A1(t,n,r){const s=r.config.validateStatus;!r.status||!s||s(r.status)?t(r):n(new Ie("Request failed with status code "+r.status,[Ie.ERR_BAD_REQUEST,Ie.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function OT(t){const n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return n&&n[1]||""}function MT(t,n){t=t||10;const r=new Array(t),s=new Array(t);let i=0,c=0,u;return n=n!==void 0?n:1e3,function(g){const p=Date.now(),v=s[c];u||(u=p),r[i]=g,s[i]=p;let y=c,w=0;for(;y!==i;)w+=r[y++],y=y%t;if(i=(i+1)%t,i===c&&(c=(c+1)%t),p-u<n)return;const C=v&&p-v;return C?Math.round(w*1e3/C):void 0}}function DT(t,n){let r=0,s=1e3/n,i,c;const u=(p,v=Date.now())=>{r=v,i=null,c&&(clearTimeout(c),c=null),t(...p)};return[(...p)=>{const v=Date.now(),y=v-r;y>=s?u(p,v):(i=p,c||(c=setTimeout(()=>{c=null,u(i)},s-y)))},()=>i&&u(i)]}const cu=(t,n,r=3)=>{let s=0;const i=MT(50,250);return DT(c=>{const u=c.loaded,f=c.lengthComputable?c.total:void 0,g=u-s,p=i(g),v=u<=f;s=u;const y={loaded:u,total:f,progress:f?u/f:void 0,bytes:g,rate:p||void 0,estimated:p&&f&&v?(f-u)/p:void 0,event:c,lengthComputable:f!=null,[n?"download":"upload"]:!0};t(y)},r)},nx=(t,n)=>{const r=t!=null;return[s=>n[0]({lengthComputable:r,total:t,loaded:s}),n[1]]},ax=t=>(...n)=>J.asap(()=>t(...n)),zT=hn.hasStandardBrowserEnv?((t,n)=>r=>(r=new URL(r,hn.origin),t.protocol===r.protocol&&t.host===r.host&&(n||t.port===r.port)))(new URL(hn.origin),hn.navigator&&/(msie|trident)/i.test(hn.navigator.userAgent)):()=>!0,LT=hn.hasStandardBrowserEnv?{write(t,n,r,s,i,c,u){if(typeof document>"u")return;const f=[`${t}=${encodeURIComponent(n)}`];J.isNumber(r)&&f.push(`expires=${new Date(r).toUTCString()}`),J.isString(s)&&f.push(`path=${s}`),J.isString(i)&&f.push(`domain=${i}`),c===!0&&f.push("secure"),J.isString(u)&&f.push(`SameSite=${u}`),document.cookie=f.join("; ")},read(t){if(typeof document>"u")return null;const n=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return n?decodeURIComponent(n[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function UT(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function BT(t,n){return n?t.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):t}function j1(t,n,r){let s=!UT(n);return t&&(s||r==!1)?BT(t,n):n}const rx=t=>t instanceof Mn?{...t}:t;function _s(t,n){n=n||{};const r={};function s(p,v,y,w){return J.isPlainObject(p)&&J.isPlainObject(v)?J.merge.call({caseless:w},p,v):J.isPlainObject(v)?J.merge({},v):J.isArray(v)?v.slice():v}function i(p,v,y,w){if(J.isUndefined(v)){if(!J.isUndefined(p))return s(void 0,p,y,w)}else return s(p,v,y,w)}function c(p,v){if(!J.isUndefined(v))return s(void 0,v)}function u(p,v){if(J.isUndefined(v)){if(!J.isUndefined(p))return s(void 0,p)}else return s(void 0,v)}function f(p,v,y){if(y in n)return s(p,v);if(y in t)return s(void 0,p)}const g={url:c,method:c,data:c,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:f,headers:(p,v,y)=>i(rx(p),rx(v),y,!0)};return J.forEach(Object.keys({...t,...n}),function(v){if(v==="__proto__"||v==="constructor"||v==="prototype")return;const y=J.hasOwnProp(g,v)?g[v]:i,w=y(t[v],n[v],v);J.isUndefined(w)&&y!==f||(r[v]=w)}),r}const T1=t=>{const n=_s({},t);let{data:r,withXSRFToken:s,xsrfHeaderName:i,xsrfCookieName:c,headers:u,auth:f}=n;if(n.headers=u=Mn.from(u),n.url=C1(j1(n.baseURL,n.url,n.allowAbsoluteUrls),t.params,t.paramsSerializer),f&&u.set("Authorization","Basic "+btoa((f.username||"")+":"+(f.password?unescape(encodeURIComponent(f.password)):""))),J.isFormData(r)){if(hn.hasStandardBrowserEnv||hn.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if(J.isFunction(r.getHeader
Line truncated
|
||||||
|
`+u.map(ux).join(`
|
||||||
|
`):" "+ux(u[0]):"as no adapter specified";throw new Ie("There is no suitable adapter to dispatch the request "+f,"ERR_NOT_SUPPORT")}return i}const O1={getAdapter:XT,adapters:qh};function Cm(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new bl(null,t)}function dx(t){return Cm(t),t.headers=Mn.from(t.headers),t.data=_m.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),O1.getAdapter(t.adapter||vl.adapter,t)(t).then(function(s){return Cm(t),s.data=_m.call(t,t.transformResponse,s),s.headers=Mn.from(s.headers),s},function(s){return R1(s)||(Cm(t),s&&s.response&&(s.response.data=_m.call(t,t.transformResponse,s.response),s.response.headers=Mn.from(s.response.headers))),Promise.reject(s)})}const M1="1.13.6",Lu={};["object","boolean","number","function","string","symbol"].forEach((t,n)=>{Lu[t]=function(s){return typeof s===t||"a"+(n<1?"n ":" ")+t}});const fx={};Lu.transitional=function(n,r,s){function i(c,u){return"[Axios v"+M1+"] Transitional option '"+c+"'"+u+(s?". "+s:"")}return(c,u,f)=>{if(n===!1)throw new Ie(i(u," has been removed"+(r?" in "+r:"")),Ie.ERR_DEPRECATED);return r&&!fx[u]&&(fx[u]=!0,console.warn(i(u," has been deprecated since v"+r+" and will be removed in the near future"))),n?n(c,u,f):!0}};Lu.spelling=function(n){return(r,s)=>(console.warn(`${s} is likely a misspelling of ${n}`),!0)};function KT(t,n,r){if(typeof t!="object")throw new Ie("options must be an object",Ie.ERR_BAD_OPTION_VALUE);const s=Object.keys(t);let i=s.length;for(;i-- >0;){const c=s[i],u=n[c];if(u){const f=t[c],g=f===void 0||u(f,c,t);if(g!==!0)throw new Ie("option "+c+" must be "+g,Ie.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Ie("Unknown option "+c,Ie.ERR_BAD_OPTION)}}const au={assertOptions:KT,validators:Lu},ra=au.validators;let Ss=class{constructor(n){this.defaults=n||{},this.interceptors={request:new ex,response:new ex}}async request(n,r){try{return await this._request(n,r)}catch(s){if(s instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const c=i.stack?i.stack.replace(/^.+\n/,""):"";try{s.stack?c&&!String(s.stack).endsWith(c.replace(/^.+\n.+\n/,""))&&(s.stack+=`
|
||||||
|
`+c):s.stack=c}catch{}}throw s}}_request(n,r){typeof n=="string"?(r=r||{},r.url=n):r=n||{},r=_s(this.defaults,r);const{transitional:s,paramsSerializer:i,headers:c}=r;s!==void 0&&au.assertOptions(s,{silentJSONParsing:ra.transitional(ra.boolean),forcedJSONParsing:ra.transitional(ra.boolean),clarifyTimeoutError:ra.transitional(ra.boolean),legacyInterceptorReqResOrdering:ra.transitional(ra.boolean)},!1),i!=null&&(J.isFunction(i)?r.paramsSerializer={serialize:i}:au.assertOptions(i,{encode:ra.function,serialize:ra.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),au.assertOptions(r,{baseUrl:ra.spelling("baseURL"),withXsrfToken:ra.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let u=c&&J.merge(c.common,c[r.method]);c&&J.forEach(["delete","get","head","post","put","patch","common"],S=>{delete c[S]}),r.headers=Mn.concat(u,c);const f=[];let g=!0;this.interceptors.request.forEach(function(E){if(typeof E.runWhen=="function"&&E.runWhen(r)===!1)return;g=g&&E.synchronous;const _=r.transitional||Vh;_&&_.legacyInterceptorReqResOrdering?f.unshift(E.fulfilled,E.rejected):f.push(E.fulfilled,E.rejected)});const p=[];this.interceptors.response.forEach(function(E){p.push(E.fulfilled,E.rejected)});let v,y=0,w;if(!g){const S=[dx.bind(this),void 0];for(S.unshift(...f),S.push(...p),w=S.length,v=Promise.resolve(r);y<w;)v=v.then(S[y++],S[y++]);return v}w=f.length;let C=r;for(;y<w;){const S=f[y++],E=f[y++];try{C=S(C)}catch(_){E.call(this,_);break}}try{v=dx.call(this,C)}catch(S){return Promise.reject(S)}for(y=0,w=p.length;y<w;)v=v.then(p[y++],p[y++]);return v}getUri(n){n=_s(this.defaults,n);const r=j1(n.baseURL,n.url,n.allowAbsoluteUrls);return C1(r,n.params,n.paramsSerializer)}};J.forEach(["delete","get","head","options"],function(n){Ss.prototype[n]=function(r,s){return this.request(_s(s||{},{method:n,url:r,data:(s||{}).data}))}});J.forEach(["post","put","patch"],function(n){function r(s){return function(c,u,f){return this.request(_s(f||{},{method:n,headers:s?{"Content-Type":"multipart/form-data"}:{},url:c,data:u}))}}Ss.prototype[n]=r(),Ss.prototype[n+"Form"]=r(!0)});let QT=class D1{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(c){r=c});const s=this;this.promise.then(i=>{if(!s._listeners)return;let c=s._listeners.length;for(;c-- >0;)s._listeners[c](i);s._listeners=null}),this.promise.then=i=>{let c;const u=new Promise(f=>{s.subscribe(f),c=f}).then(i);return u.cancel=function(){s.unsubscribe(c)},u},n(function(c,u,f){s.reason||(s.reason=new bl(c,u,f),r(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const r=this._listeners.indexOf(n);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const n=new AbortController,r=s=>{n.abort(s)};return this.subscribe(r),n.signal.unsubscribe=()=>this.unsubscribe(r),n.signal}static source(){let n;return{token:new D1(function(i){n=i}),cancel:n}}};function WT(t){return function(r){return t.apply(null,r)}}function JT(t){return J.isObject(t)&&t.isAxiosError===!0}const oh={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(oh).forEach(([t,n])=>{oh[n]=t});function z1(t){const n=new Ss(t),r=h1(Ss.prototype.request,n);return J.extend(r,Ss.prototype,n,{allOwnKeys:!0}),J.extend(r,n,null,{allOwnKeys:!0}),r.create=function(i){return z1(_s(t,i))},r}const Tt=z1(vl);Tt.Axios=Ss;Tt.CanceledError=bl;Tt.CancelToken=QT;Tt.isCancel=R1;Tt.VERSION=M1;
Line truncated
|
||||||
|
* @license lucide-react v0.522.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const Nk=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Rk=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,r,s)=>s?s.toUpperCase():r.toLowerCase()),hx=t=>{const n=Rk(t);return n.charAt(0).toUpperCase()+n.slice(1)},H1=(...t)=>t.filter((n,r,s)=>!!n&&n.trim()!==""&&s.indexOf(n)===r).join(" ").trim(),Ak=t=>{for(const n in t)if(n.startsWith("aria-")||n==="role"||n==="title")return!0};/**
|
||||||
|
* @license lucide-react v0.522.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/var jk={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
||||||
|
* @license lucide-react v0.522.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const Tk=b.forwardRef(({color:t="currentColor",size:n=24,strokeWidth:r=2,absoluteStrokeWidth:s,className:i="",children:c,iconNode:u,...f},g)=>b.createElement("svg",{ref:g,...jk,width:n,height:n,stroke:t,strokeWidth:s?Number(r)*24/Number(n):r,className:H1("lucide",i),...!c&&!Ak(f)&&{"aria-hidden":"true"},...f},[...u.map(([p,v])=>b.createElement(p,v)),...Array.isArray(c)?c:[c]]));/**
|
||||||
|
* @license lucide-react v0.522.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const kk=(t,n)=>{const r=b.forwardRef(({className:s,...i},c)=>b.createElement(Tk,{ref:c,iconNode:n,className:H1(`lucide-${Nk(hx(t))}`,`lucide-${t}`,s),...i}));return r.displayName=hx(t),r};/**
|
||||||
|
* @license lucide-react v0.522.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const Ok=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Mk=kk("x",Ok),px=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,gx=Lh,$h=(t,n)=>r=>{var s;if((n==null?void 0:n.variants)==null)return gx(t,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:c}=n,u=Object.keys(i).map(p=>{const v=r==null?void 0:r[p],y=c==null?void 0:c[p];if(v===null)return null;const w=px(v)||px(y);return i[p][w]}),f=r&&Object.entries(r).reduce((p,v)=>{let[y,w]=v;return w===void 0||(p[y]=w),p},{}),g=n==null||(s=n.compoundVariants)===null||s===void 0?void 0:s.reduce((p,v)=>{let{class:y,className:w,...C}=v;return Object.entries(C).every(S=>{let[E,_]=S;return Array.isArray(_)?_.includes({...c,...f}[E]):{...c,...f}[E]===_})?[...p,y,w]:p},[]);return gx(t,u,g,r==null?void 0:r.class,r==null?void 0:r.className)};function sr(t){const n=b.useRef(t);return b.useEffect(()=>{n.current=t}),b.useMemo(()=>(...r)=>{var s;return(s=n.current)==null?void 0:s.call(n,...r)},[])}function Dk(t,n=globalThis==null?void 0:globalThis.document){const r=sr(t);b.useEffect(()=>{const s=i=>{i.key==="Escape"&&r(i)};return n.addEventListener("keydown",s,{capture:!0}),()=>n.removeEventListener("keydown",s,{capture:!0})},[r,n])}var zk="DismissableLayer",ih="dismissableLayer.update",Lk="dismissableLayer.pointerDownOutside",Uk="dismissableLayer.focusOutside",yx,V1=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Uu=b.forwardRef((t,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:c,onInteractOutside:u,onDismiss:f,...g}=t,p=b.useContext(V1),[v,y]=b.useState(null),w=(v==null?void 0:v.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,C]=b.useState({}),S=Wt(n,U=>y(U)),E=Array.from(p.layers),[_]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),R=E.indexOf(_),O=v?E.indexOf(v):-1,A=p.layersWithOutsidePointerEventsDisabled.size>0,D=O>=R,B=Hk(U=>{const $=U.target,me=[...p.branches].some(fe=>fe.contains($));!D||me||(i==null||i(U),u==null||u(U),U.defaultPrevented||f==null||f())},w),I=Vk(U=>{const $=U.target;[...p.branches].some(fe=>fe.contains($))||(c==null||c(U),u==null||u(U),U.defaultPrevented||f==null||f())},w);return Dk(U=>{O===p.layers.size-1&&(s==null||s(U),!U.defaultPrevented&&f&&(U.preventDefault(),f()))},w),b.useEffect(()=>{if(v)return r&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(yx=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(v)),p.layers.add(v),vx(),()=>{r&&p.layersWithOutsidePointerEventsDisabled.size===1&&(w.body.style.pointerEvents=yx)}},[v,w,r,p]),b.useEffect(()=>()=>{v&&(p.layers.delete(v),p.layersWithOutsidePointerEventsDisabled.delete(v),vx())},[v,p]),b.useEffect(()=>{const U=()=>C({});return document.addEventListener(ih,U),()=>document.removeEventListener(ih,U)},[]),m.jsx(Mt.div,{...g,ref:S,style:{pointerEvents:A?D?"auto":"none":void 0,...t.style},onFocusCapture:Xe(t.onFocusCapture,I.onFocusCapture),onBlurCapture:Xe(t.onBlurCapture,I.onBlurCapture),onPointerDownCapture:Xe(t.onPointerDownCapture,B.onPointerDownCapture)})});Uu.displayName=zk;var Bk="DismissableLayerBranch",Pk=b.forwardRef((t,n)=>{const r=b.useContext(V1),s=b.useRef(null),i=Wt(n,s);return b.useEffect(()=>{const c=s.current;if(c)return r.branches.add(c),()=>{r.branches.delete(c)}},[r.branches]),m.jsx(Mt.div,{...t,ref:i})});Pk.displayName=Bk;function Hk(t,n=globalThis==null?void 0:globalThis.document){const r=sr(t),s=b.useRef(!1),i=b.useRef(()=>{});return b.useEffect(()=>{const c=f=>{if(f.target&&!s.current){let g=function(){I1(Lk,r,p,{discrete:!0})};const p={originalEvent:f};f.pointerType==="touch"?(n.removeEventListener("click",i.current),i.current=g,n.addEventListener("click",i.current,{once:!0})):g()}else n.removeEventListener("click",i.current);s.current=!1},u=window.setTimeout(()=>{n.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(u),n.removeEventListener("pointerdown",c),n.removeEventListener("click",i.current)}},[n,r]),{onPointerDownCapture:()=>s.current=!0}}function Vk(t,n=globalThis==null?void 0:globalThis.document){const r=sr(t),s=b.useRef(!1);return b.useEffect(()=>{const i=c=>{c.target&&!s.current&&I1(Uk,r,{originalEvent:c},{discrete:!1})};return n.addEventListener("focusin",i),()=>n.removeEventListener("focusin",i)},[n,r]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function vx(){const t=new CustomEvent(ih);document.dispatchEvent(t)}function I1(t,n,r,{discrete:s}){const i=r.originalEvent.target,c=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});n&&i.addEventListener(t,n,{once:!0}),s?B1(i,c):i.dispatchEvent(c)}var Nm="focusScope.autoFocusOnMount",Rm="focusScope.autoFocusOnUnmount",bx={bubbles:!1,cancelable:!0},Ik="FocusScope",Bu=b.forwardRef((t,n)=>{const{loop:r=!1,trapped:s=!1,onMountAutoFocus:i,onUnmountAutoFocus:c,...u}=t,[f,g]=b.useState(null),p=sr(i),v=sr(c),y=b.useRef(null),w=Wt(n,E=>g(ELine truncated
|
||||||
|
.`.concat(Qk,` {
|
||||||
|
overflow: hidden `).concat(s,`;
|
||||||
|
padding-right: `).concat(f,"px ").concat(s,`;
|
||||||
|
}
|
||||||
|
body[`).concat(ko,`] {
|
||||||
|
overflow: hidden `).concat(s,`;
|
||||||
|
overscroll-behavior: contain;
|
||||||
|
`).concat([n&&"position: relative ".concat(s,";"),r==="margin"&&`
|
||||||
|
padding-left: `.concat(i,`px;
|
||||||
|
padding-top: `).concat(c,`px;
|
||||||
|
padding-right: `).concat(u,`px;
|
||||||
|
margin-left:0;
|
||||||
|
margin-top:0;
|
||||||
|
margin-right: `).concat(f,"px ").concat(s,`;
|
||||||
|
`),r==="padding"&&"padding-right: ".concat(f,"px ").concat(s,";")].filter(Boolean).join(""),`
|
||||||
|
}
|
||||||
|
|
||||||
|
.`).concat(ru,` {
|
||||||
|
right: `).concat(f,"px ").concat(s,`;
|
||||||
|
}
|
||||||
|
|
||||||
|
.`).concat(su,` {
|
||||||
|
margin-right: `).concat(f,"px ").concat(s,`;
|
||||||
|
}
|
||||||
|
|
||||||
|
.`).concat(ru," .").concat(ru,` {
|
||||||
|
right: 0 `).concat(s,`;
|
||||||
|
}
|
||||||
|
|
||||||
|
.`).concat(su," .").concat(su,` {
|
||||||
|
margin-right: 0 `).concat(s,`;
|
||||||
|
}
|
||||||
|
|
||||||
|
body[`).concat(ko,`] {
|
||||||
|
`).concat(Wk,": ").concat(f,`px;
|
||||||
|
}
|
||||||
|
`)},Cx=function(){var t=parseInt(document.body.getAttribute(ko)||"0",10);return isFinite(t)?t:0},yO=function(){b.useEffect(function(){return document.body.setAttribute(ko,(Cx()+1).toString()),function(){var t=Cx()-1;t<=0?document.body.removeAttribute(ko):document.body.setAttribute(ko,t.toString())}},[])},vO=function(t){var n=t.noRelative,r=t.noImportant,s=t.gapMode,i=s===void 0?"margin":s;yO();var c=b.useMemo(function(){return hO(i)},[i]);return b.createElement(pO,{styles:gO(c,!n,i,r?"":"!important")})},lh=!1;if(typeof window<"u")try{var $c=Object.defineProperty({},"passive",{get:function(){return lh=!0,!0}});window.addEventListener("test",$c,$c),window.removeEventListener("test",$c,$c)}catch{lh=!1}var xo=lh?{passive:!1}:!1,bO=function(t){return t.tagName==="TEXTAREA"},Z1=function(t,n){if(!(t instanceof Element))return!1;var r=window.getComputedStyle(t);return r[n]!=="hidden"&&!(r.overflowY===r.overflowX&&!bO(t)&&r[n]==="visible")},xO=function(t){return Z1(t,"overflowY")},wO=function(t){return Z1(t,"overflowX")},Nx=function(t,n){var r=n.ownerDocument,s=n;do{typeof ShadowRoot<"u"&&s instanceof ShadowRoot&&(s=s.host);var i=X1(t,s);if(i){var c=K1(t,s),u=c[1],f=c[2];if(u>f)return!0}s=s.parentNode}while(s&&s!==r.body);return!1},SO=function(t){var n=t.scrollTop,r=t.scrollHeight,s=t.clientHeight;return[n,r,s]},EO=function(t){var n=t.scrollLeft,r=t.scrollWidth,s=t.clientWidth;return[n,r,s]},X1=function(t,n){return t==="v"?xO(n):wO(n)},K1=function(t,n){return t==="v"?SO(n):EO(n)},_O=function(t,n){return t==="h"&&n==="rtl"?-1:1},CO=function(t,n,r,s,i){var c=_O(t,window.getComputedStyle(n).direction),u=c*s,f=r.target,g=n.contains(f),p=!1,v=u>0,y=0,w=0;do{if(!f)break;var C=K1(t,f),S=C[0],E=C[1],_=C[2],R=E-_-c*S;(S||R)&&X1(t,f)&&(y+=R,w+=S);var O=f.parentNode;f=O&&O.nodeType===Node.DOCUMENT_FRAGMENT_NODE?O.host:O}while(!g&&f!==document.body||g&&(n.contains(f)||n===f));return(v&&Math.abs(y)<1||!v&&Math.abs(w)<1)&&(p=!0),p},Gc=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Rx=function(t){return[t.deltaX,t.deltaY]},Ax=function(t){return t&&"current"in t?t.current:t},NO=function(t,n){return t[0]===n[0]&&t[1]===n[1]},RO=function(t){return`
|
||||||
|
.block-interactivity-`.concat(t,` {pointer-events: none;}
|
||||||
|
.allow-interactivity-`).concat(t,` {pointer-events: all;}
|
||||||
|
`)},AO=0,wo=[];function jO(t){var n=b.useRef([]),r=b.useRef([0,0]),s=b.useRef(),i=b.useState(AO++)[0],c=b.useState(Y1)[0],u=b.useRef(t);b.useEffect(function(){u.current=t},[t]),b.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var E=Kk([t.lockRef.current],(t.shards||[]).map(Ax),!0).filter(Boolean);return E.forEach(function(_){return _.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),E.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var f=b.useCallback(function(E,_){if("touches"in E&&E.touches.length===2||E.type==="wheel"&&E.ctrlKey)return!u.current.allowPinchZoom;var R=Gc(E),O=r.current,A="deltaX"in E?E.deltaX:O[0]-R[0],D="deltaY"in E?E.deltaY:O[1]-R[1],B,I=E.target,U=Math.abs(A)>Math.abs(D)?"h":"v";if("touches"in E&&U==="h"&&I.type==="range")return!1;var $=window.getSelection(),me=$&&$.anchorNode,fe=me?me===I||me.contains(I):!1;if(fe)return!1;var pe=Nx(U,I);if(!pe)return!0;if(pe?B=U:(B=U==="v"?"h":"v",pe=Nx(U,I)),!pe)return!1;if(!s.current&&"changedTouches"in E&&(A||D)&&(s.current=B),!B)return!0;var re=s.current||B;return CO(re,_,E,re==="h"?A:D)},[]),g=b.useCallback(function(E){var _=E;if(!(!wo.length||wo[wo.length-1]!==c)){var R="deltaY"in _?Rx(_):Gc(_),O=n.current.filter(function(B){return B.name===_.type&&(B.target===_.target||_.target===B.shadowParent)&&NO(B.delta,R)})[0];if(O&&O.should){_.cancelable&&_.preventDefault();return}if(!O){var A=(u.current.shards||[]).map(Ax).filter(Boolean).filter(function(B){return B.contains(_.target)}),D=A.length>0?f(_,A[0]):!u.current.noIsolation;D&&_.cancelable&&_.preventDefault()}}},[]),p=b.useCallback(function(E,_,R,O){var A={name:E,delta:_,target:R,should:O,shadowParent:TO(R)};n.current.push(A),setTimeout(function(){n.current=n.current.filter(function(D){return D!==A})},1)},[]),v=b.useCallback(function(E){r.current=Gc(E),s.current=void 0},[]),y=b.useCallback(function(E){p(E.type,Rx(E),E.target,f(E,t.lockRef.current))},[]),w=b.useCallback(function(E){p(E.type,Gc(E),E.target,f(E,t.lockRef.current))},[]);b.useEffect(function(){return wo.push(c),t.setCallbacks({onScrollCapture:y,onWheelCapture:y,onTouchMoveCapture:w}),document.addEventListener("wheel",g,xo),document.addEventListener("touchmove",g,xo),document.addEventListener("touchstart",v,xo),function(){wo=wo.filter(function(E){return E!==c}),document.removeEventListener("wheel",g,xo),document.removeEventListener("touchmove",g,xo),document.removeEventListener("touchstart",v,xo)}},[]);var C=t.removeScrollBar,S=t.inert;return b.createElement(b.Fragment,null,S?b.createElement(c,{styles:RO(i)}):null,C?b.createElement(vO,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function TO(t){for(var n=null;t!==null;)t instanceof ShadowRoot&&(n=t.host,t=t.host),t=t.parentNode;return n}const kO=sO(G1,jO);var Vu=b.forwardRef(function(t,n){return b.createElement(Hu,Aa({},t,{ref:n,sideCar:kO}))});Vu.classNames=Hu.classNames;var OO=function(t){if(typeof document>"u")return null;var n=Array.isArray(t)?t[0]:t;return n.ownerDocument.body},So=new WeakMap,Yc=new WeakMap,Zc={},Om=0,Q1=function(t){return t&&(t.host||Q1(t.parentNode))},MO=function(t,n){return n.map(function(r){if(t.contains(r))return r;var s=Q1(r);return s&&t.contains(s)?s:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},DO=function(t,n,r,s){var i=MO(n,Array.isArray(t)?t:[t]);Zc[r]||(Zc[r]=new WeakMap);var c=Zc[r],u=[],f=new Set,g=new Set(i),p=function(y){!y||f.has(y)||(f.add(y),p(y.parentNode))};i.forEach(p);var v=function(y){!y||g.has(y)||Array.prototype.forEach.call(y.children,function(w){if(f.has(w))v(w);else try{var C=w.getAttribute(s),S=C!==null&&C!=="false",E=(So.get(w)||0)+1,_=(c.get(w)||0)+1;So.set(w,E),c.set(w,_),u.push(w),E===1&&S&&Yc.set(w,!0),_===1&&w.setAttribute(r,"true"),S||w.setAttribute(s,"true")}catch(R){console.error("aria-hidden: cannot operate on ",w,R)}})};return v(n),f.clear(),Om++,function(){u.forEach(function(y){var w=So.get(y)-1,C=c.get(y)-1;So.set(y,w),c.set(y,C),w||(Yc.has(y)||y.removeAttribute(s),Yc.delete(y)),C||y.removeAttribute(r)}),Om--,Om||(So=new WeakMap,So=new WeakMap,Yc=new WeakMap,Zc={})}},Yh=function(t,n,r){r===void 0&&(r="data-aria-hidden");var s=Array.from(Array.isArray(t)?t:[t]),i=OO(t);return i?(s.push.apply(s,Array.from(i.querySelectorAll("[aria-live], script"))),DO(s,i,r,"aria-hidden")):function(){return null}},Iu="Dialog",[W1]=Ts(Iu),[zO,ba]=W1(Iu),J1=t=>{const{__scopeDialog:n,children:r,open:s,defaultOpen:i,onOpenChange:c,modal:u=!0}=t,f=b.useRef(null),g=b.useRef(null),[p,v]=Fh({prop:s,defaultProp:i??!1,onChange:c,caller:Iu});return m.jsx(zO,{scope:n,triggerRef:f,contentRef:g,contentId:To(),titleId:To(),descriptionId:To(),open:p,onOpenChange:v,onOpenToggle:b.useCallback(()=>v(y=>!y),[v]),modal:u,children:r})};J1.displayName=Iu;var ew="DialogTrigger",LO=b.forwardRef
Line truncated
|
||||||
|
|
||||||
|
If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
|
||||||
|
|
||||||
|
For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return b.useEffect(()=>{t&&(document.getElementById(t)||console.error(r))},[r,t]),null},qO="DialogDescriptionWarning",FO=({contentRef:t,descriptionId:n})=>{const s=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${fw(qO).contentName}}.`;return b.useEffect(()=>{var c;const i=(c=t.current)==null?void 0:c.getAttribute("aria-describedby");n&&i&&(document.getElementById(n)||console.warn(s))},[s,t,n]),null},$O=J1,GO=nw,mw=aw,hw=rw,YO=ow,ZO=lw,XO=uw,KO=Symbol.for("react.lazy"),du=Au[" use ".trim().toString()];function QO(t){return typeof t=="object"&&t!==null&&"then"in t}function pw(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===KO&&"_payload"in t&&QO(t._payload)}function gw(t){const n=WO(t),r=b.forwardRef((s,i)=>{let{children:c,...u}=s;pw(c)&&typeof du=="function"&&(c=du(c._payload));const f=b.Children.toArray(c),g=f.find(eM);if(g){const p=g.props.children,v=f.map(y=>y===g?b.Children.count(p)>1?b.Children.only(null):b.isValidElement(p)?p.props.children:null:y);return m.jsx(n,{...u,ref:i,children:b.isValidElement(p)?b.cloneElement(p,void 0,v):null})}return m.jsx(n,{...u,ref:i,children:c})});return r.displayName=`${t}.Slot`,r}var yw=gw("Slot");function WO(t){const n=b.forwardRef((r,s)=>{let{children:i,...c}=r;if(pw(i)&&typeof du=="function"&&(i=du(i._payload)),b.isValidElement(i)){const u=nM(i),f=tM(c,i.props);return i.type!==b.Fragment&&(f.ref=s?wl(s,u):u),b.cloneElement(i,f)}return b.Children.count(i)>1?b.Children.only(null):null});return n.displayName=`${t}.SlotClone`,n}var JO=Symbol("radix.slottable");function eM(t){return b.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===JO}function tM(t,n){const r={...n};for(const s in n){const i=t[s],c=n[s];/^on[A-Z]/.test(s)?i&&c?r[s]=(...f)=>{const g=c(...f);return i(...f),g}:i&&(r[s]=i):s==="style"?r[s]={...i,...c}:s==="className"&&(r[s]=[i,c].filter(Boolean).join(" "))}return{...t,...r}}function nM(t){var s,i;let n=(s=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:s.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?t.ref:(n=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var aM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],rM=aM.reduce((t,n)=>{const r=gw(`Primitive.${n}`),s=b.forwardRef((i,c)=>{const{asChild:u,...f}=i,g=u?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(g,{...f,ref:c})});return s.displayName=`Primitive.${n}`,{...t,[n]:s}},{});function sM(t){const[n,r]=b.useState(void 0);return Fr(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const s=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const c=i[0];let u,f;if("borderBoxSize"in c){const g=c.borderBoxSize,p=Array.isArray(g)?g[0]:g;u=p.inlineSize,f=p.blockSize}else u=t.offsetWidth,f=t.offsetHeight;r({width:u,height:f})});return s.observe(t,{box:"border-box"}),()=>s.unobserve(t)}else r(void 0)},[t]),n}const oM=["top","right","bottom","left"],$r=Math.min,In=Math.max,fu=Math.round,Xc=Math.floor,Oa=t=>({x:t,y:t}),iM={left:"right",right:"left",bottom:"top",top:"bottom"};function ch(t,n,r){return In(t,$r(n,r))}function or(t,n){return typeof t=="function"?t(n):t}function ir(t){return t.split("-")[0]}function Zo(t){return t.split("-")[1]}function Qh(t){return t==="x"?"y":"x"}function Wh(t){return t==="y"?"height":"width"}function Ta(t){const n=t[0];return n==="t"||n==="b"?"y":"x"}function Jh(t){return Qh(Ta(t))}function lM(t,n,r){r===void 0&&(r=!1);const s=Zo(t),i=Jh(t),c=Wh(i);let u=i==="x"?s===(r?"end":"start")?"right":"left":s==="start"?"bottom":"top";return n.reference[c]>n.floating[c]&&(u=mu(u)),[u,mu(u)]}function cM(t){const n=mu(t);return[uh(t),n,uh(n)]}function uh(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const jx=["left","right"],Tx=["right","left"],uM=["top","bottom"],dM=["bottom","top"];function fM(t,n,r){switch(t){case"top":case"bottom":return r?n?Tx:jx:n?jx:Tx;case"left":case"right":return n?uM:dM;default:return[]}}function mM(t,n,r,s){const i=Zo(t);let c=fM(ir(t),r==="start",s);return i&&(c=c.map(u=>u+"-"+i),n&&(c=c.concat(c.map(uh)))),c}function mu(t){const n=ir(t);return iM[n]+t.slice(n.length)}function hM(t){return{top:0,right:0,bottom:0,left:0,...t}}function vw(t){return typeof t!="number"?hM(t):{top:t,right:t,bottom:t,left:t}}function hu(t){const{x:n,y:r,width:s,height:i}=t;return{width:s,height:i,top:r,left:n,right:n+s,bottom:r+i,x:n,y:r}}function kx(t,n,r){let{reference:s,floating:i}=t;const c=Ta(n),u=Jh(n),f=Wh(u),g=ir(n),p=c==="y",v=s.x+s.width/2-i.width/2,y=s.y+s.height/2-i.height/2,w=s[f]/2-i[f]/2;let C;switch(g){case"top":C={x:v,y:s.y-i.height};break;case"bottom":C={x:v,y:s.y+s.height};break;case"right":C={x:s.x+s.width,y};break;case"left":C={x:s.x-i.width,y};brea
Line truncated
|
||||||
|
[data-state=closed]
|
||||||
|
){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function SD(t,n){typeof t=="function"?t(n):t!=null&&(t.current=n)}function ED(...t){return n=>t.forEach(r=>SD(r,n))}function gS(...t){return b.useCallback(ED(...t),t)}const Vx=t=>{switch(t){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return t}};function Um(t,n){if(!t)return()=>{};const r=t.style.cssText;return Object.assign(t.style,n),()=>{t.style.cssText=r}}function _D(...t){return(...n)=>{for(const r of t)typeof r=="function"&&r(...n)}}const Bm={DURATION:.5,EASE:[.32,.72,0,1]},CD=8,ND=26,RD=()=>()=>{};function AD(){const{direction:t,isOpen:n,shouldScaleBackground:r,setBackgroundColorOnScale:s,noBodyStyles:i}=Ku(),c=oe.useRef(null),u=b.useMemo(()=>document.body.style.backgroundColor,[]);function f(){return(window.innerWidth-ND)/window.innerWidth}oe.useEffect(()=>{if(n&&r){c.current&&clearTimeout(c.current);const g=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!g)return;_D(s&&!i?Um(document.body,{background:"black"}):RD,Um(g,{transformOrigin:Vx(t)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${Bm.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Bm.EASE.join(",")})`}));const p=Um(g,{borderRadius:`${CD}px`,overflow:"hidden",...Vx(t)?{transform:`scale(${f()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${f()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{p(),c.current=window.setTimeout(()=>{u?document.body.style.background=u:document.body.style.removeProperty("background")},Bm.DURATION*1e3)}}},[n,r,u])}const jD=oe.forwardRef(function({...t},n){const{overlayRef:r,snapPoints:s,onRelease:i,shouldFade:c,isOpen:u,modal:f,shouldAnimate:g}=Ku(),p=gS(n,r),v=s&&s.length>0;if(!f)return null;const y=oe.useCallback(w=>i(w),[i]);return oe.createElement(mw,{onMouseUp:y,ref:p,"data-vaul-overlay":"","data-vaul-snap-points":u&&v?"true":"false","data-vaul-snap-points-overlay":u&&c?"true":"false","data-vaul-animate":g!=null&&g.current?"true":"false",...t})});jD.displayName="Drawer.Overlay";const TD=oe.forwardRef(function({onPointerDownOutside:t,style:n,onOpenAutoFocus:r,...s},i){const{drawerRef:c,onPress:u,onRelease:f,onDrag:g,keyboardIsOpen:p,snapPointsOffset:v,activeSnapPointIndex:y,modal:w,isOpen:C,direction:S,snapPoints:E,container:_,handleOnly:R,shouldAnimate:O,autoFocus:A}=Ku(),[D,B]=oe.useState(!1),I=gS(i,c),U=oe.useRef(null),$=oe.useRef(null),me=oe.useRef(!1),fe=E&&E.length>0;AD();const pe=(Y,ue,ye=0)=>{if(me.current)return!0;const j=Math.abs(Y.y),X=Math.abs(Y.x),te=X>j,se=["bottom","right"].includes(ue)?1:-1;if(ue==="left"||ue==="right"){if(!(Y.x*se<0)&&X>=0&&X<=ye)return te}else if(!(Y.y*se<0)&&j>=0&&j<=ye)return!te;return me.current=!0,!0};oe.useEffect(()=>{fe&&window.requestAnimationFrame(()=>{B(!0)})},[]);function re(Y){U.current=null,me.current=!1,f(Y)}return oe.createElement(hw,{"data-vaul-drawer-direction":S,"data-vaul-drawer":"","data-vaul-delayed-snap-points":D?"true":"false","data-vaul-snap-points":C&&fe?"true":"false","data-vaul-custom-container":_?"true":"false","data-vaul-animate":O!=null&&O.current?"true":"false",...s,ref:I,style:v&&v.length>0?{"--snap-point-height":`${v[y??0]}px`,...n}:n,onPointerDown:Y=>{R||(s.onPointerDown==null||s.onPointerDown.call(s,Y),U.current={x:Y.pageX,y:Y.pageY},u(Y))},onOpenAutoFocus:Y=>{r==null||r(Y),A||Y.preventDefault()},onPointerDownOutside:Y=>{i
Line truncated
|
||||||
|
[data-input-otp] {
|
||||||
|
--nojs-bg: white !important;
|
||||||
|
--nojs-fg: black !important;
|
||||||
|
|
||||||
|
background-color: var(--nojs-bg) !important;
|
||||||
|
color: var(--nojs-fg) !important;
|
||||||
|
caret-color: var(--nojs-fg) !important;
|
||||||
|
letter-spacing: .25em !important;
|
||||||
|
text-align: center !important;
|
||||||
|
border: 1px solid var(--nojs-fg) !important;
|
||||||
|
border-radius: 4px !important;
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
[data-input-otp] {
|
||||||
|
--nojs-bg: black !important;
|
||||||
|
--nojs-fg: white !important;
|
||||||
|
}
|
||||||
|
}`,BS="Popover",[PS]=Ts(BS,[Yu]),Ju=Yu(),[qL,Qr]=PS(BS),HS="PopoverAnchor",Z5=b.forwardRef((t,n)=>{const{__scopePopover:r,...s}=t,i=Qr(HS,r),c=Ju(r),{onCustomAnchorAdd:u,onCustomAnchorRemove:f}=i;return b.useEffect(()=>(u(),()=>f()),[u,f]),m.jsx(sp,{...c,...s,ref:n})});Z5.displayName=HS;var VS="PopoverTrigger",X5=b.forwardRef((t,n)=>{const{__scopePopover:r,...s}=t,i=Qr(VS,r),c=Ju(r),u=Wt(n,i.triggerRef),f=m.jsx(Mt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":GS(i.open),...s,ref:u,onClick:Xe(t.onClick,i.onOpenToggle)});return i.hasCustomAnchor?f:m.jsx(sp,{asChild:!0,...c,children:f})});X5.displayName=VS;var bp="PopoverPortal",[K5,Q5]=PS(bp,{forceMount:void 0}),IS=t=>{const{__scopePopover:n,forceMount:r,children:s,container:i}=t,c=Qr(bp,n);return m.jsx(K5,{scope:n,forceMount:r,children:m.jsx(za,{present:r||c.open,children:m.jsx(Pu,{asChild:!0,container:i,children:s})})})};IS.displayName=bp;var Bo="PopoverContent",qS=b.forwardRef((t,n)=>{const r=Q5(Bo,t.__scopePopover),{forceMount:s=r.forceMount,...i}=t,c=Qr(Bo,t.__scopePopover);return m.jsx(za,{present:s||c.open,children:c.modal?m.jsx(J5,{...i,ref:n}):m.jsx(e3,{...i,ref:n})})});qS.displayName=Bo;var W5=zo("PopoverContent.RemoveScroll"),J5=b.forwardRef((t,n)=>{const r=Qr(Bo,t.__scopePopover),s=b.useRef(null),i=Wt(n,s),c=b.useRef(!1);return b.useEffect(()=>{const u=s.current;if(u)return Yh(u)},[]),m.jsx(Vu,{as:W5,allowPinchZoom:!0,children:m.jsx(FS,{...t,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Xe(t.onCloseAutoFocus,u=>{var f;u.preventDefault(),c.current||(f=r.triggerRef.current)==null||f.focus()}),onPointerDownOutside:Xe(t.onPointerDownOutside,u=>{const f=u.detail.originalEvent,g=f.button===0&&f.ctrlKey===!0,p=f.button===2||g;c.current=p},{checkForDefaultPrevented:!1}),onFocusOutside:Xe(t.onFocusOutside,u=>u.preventDefault(),{checkForDefaultPrevented:!1})})})}),e3=b.forwardRef((t,n)=>{const r=Qr(Bo,t.__scopePopover),s=b.useRef(!1),i=b.useRef(!1);return m.jsx(FS,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{var u,f;(u=t.onCloseAutoFocus)==null||u.call(t,c),c.defaultPrevented||(s.current||(f=r.triggerRef.current)==null||f.focus(),c.preventDefault()),s.current=!1,i.current=!1},onInteractOutside:c=>{var g,p;(g=t.onInteractOutside)==null||g.call(t,c),c.defaultPrevented||(s.current=!0,c.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const u=c.target;((p=r.triggerRef.current)==null?void 0:p.contains(u))&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&i.current&&c.preventDefault()}})}),FS=b.forwardRef((t,n)=>{const{__scopePopover:r,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:c,disableOutsidePointerEvents:u,onEscapeKeyDown:f,onPointerDownOutside:g,onFocusOutside:p,onInteractOutside:v,...y}=t,w=Qr(Bo,r),C=Ju(r);return Gh(),m.jsx(Bu,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:i,onUnmountAutoFocus:c,children:m.jsx(Uu,{asChild:!0,disableOutsidePointerEvents:u,onInteractOutside:v,onEscapeKeyDown:f,onPointerDownOutside:g,onFocusOutside:p,onDismiss:()=>w.onOpenChange(!1),children:m.jsx(Pw,{"data-state":GS(w.open),role:"dialog",id:w.contentId,...C,...y,ref:n,style:{...y.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),$S="PopoverClose",t3=b.forwardRef((t,n)=>{const{__scopePopover:r,...s}=t,i=Qr($S,r);return m.jsx(Mt.button,{type:"button",...s,ref:n,onClick:Xe(t.onClick,()=>i.onOpenChange(!1))})});t3.displayName=$S;var n3="PopoverArrow",a3=b.forwardRef((t,n)=>{const{__scopePopover:r,...s}=t,i=Ju(r);return m.jsx(Hw,{...i,...s,ref:n})});a3.displayName=n3;function GS(t){return t?"open":"closed"}var r3=IS,YS=qS;const xp=b.createContext(null);xp.displayName="PanelGroupContext";const qn={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandleId:"data-panel-resize-handle-id"},wp=10,Mo=b.useLayoutEffect,e0=Au.useId,s3=typeof e0=="function"?e0:()=>null;let o3=0;function ZS(t=null){const n=s3(),r=b.useRef(t||n||null);return r.current===null&&(r.current=""+o3++),t??r.current}function XS({children:t,className:n="",collapsedSize:r,collapsible:s,defaultSize:i,forwardedRef:c,id:u,maxSize:f,minSize:g,onCollapse:p,onExpand:v,onResize:y,order:w,style:C,tagName:S="div",...E}){const _=b.useContext(xp);if(_===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:R,expandPanel:O,getPanelSize:A,getPanelStyle:D,groupId:B,isPanelCollapsed:I,reevaluatePanelConstraints:U,registerPanel:$,resizeP
Line truncated
|
||||||
|
`)){const ke=Ee.indexOf(":");if(ke>0){const ce=Ee.slice(0,ke).trim(),_e=Ee.slice(ke+1).trim();ce&&(ae[ce]=_e)}}}return ae},ge=async()=>{if(!V)return;if(!t){Fe.error("apiUrl nao definida no store");return}Y(!0),ye(null),X(null);const q=t.replace(/\/$/,""),ae=W(),Ee=`${q}${ae}`,ke={...le(D)};L&&(ke.apikey=L);let ce;if(["POST","PUT","PATCH","DELETE"].includes(V.method)&&O.trim())try{ce=JSON.parse(O),ke["Content-Type"]=ke["Content-Type"]||"application/json"}catch{X("Body nao e um JSON valido."),Y(!1);return}const be=performance.now();try{const Re=await Tt.request({url:Ee,method:V.method,headers:ke,data:ce,validateStatus:()=>!0,transformRequest:Le=>Le===void 0?void 0:JSON.stringify(Le)}),Pe=Math.round(performance.now()-be),qe={},Ue=Re.headers;if(Ue instanceof ek)Ue.forEach((Le,pt)=>{qe[pt]=String(Le)});else if(Ue&&typeof Ue=="object")for(const[Le,pt]of Object.entries(Ue))qe[Le]=String(pt);ye({status:Re.status,statusText:Re.statusText||"",durationMs:Pe,data:Re.data,headers:qe,finalUrl:Ee,request:{method:V.method,url:Ee,headers:ke,body:ce}})}catch(Re){const Pe=Math.round(performance.now()-be),qe=(Re==null?void 0:Re.message)||"Erro de rede desconhecido";X(`${qe} (em ${Pe}ms)`)}finally{Y(!1)}};return m.jsxs("div",{className:"flex h-[calc(100vh-4rem)] overflow-hidden",children:[m.jsxs("aside",{className:"flex w-80 flex-col border-r border-sidebar-border bg-sidebar/60",children:[m.jsxs("div",{className:"border-b border-sidebar-border p-3",children:[m.jsxs("h2",{className:"mb-2 flex items-center gap-2 text-sm font-semibold text-foreground",children:[m.jsx(wR,{className:"h-4 w-4 text-purple-500"}),"Endpoints",m.jsx("button",{type:"button",onClick:te,className:"ml-auto rounded-md p-1 text-muted-foreground hover:bg-accent hover:text-foreground",title:"Recarregar swagger",children:m.jsx(nA,{className:"h-3.5 w-3.5"})})]}),m.jsxs("div",{className:"relative",children:[m.jsx(K0,{className:"pointer-events-none absolute left-2 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),m.jsx("input",{type:"text",placeholder:"Filtrar por path, metodo, tag...",value:v,onChange:q=>y(q.target.value),className:"w-full rounded-md border border-input bg-background py-1.5 pl-8 pr-2 text-xs text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring"})]})]}),m.jsxs("div",{className:"flex-1 overflow-y-auto p-2",children:[u&&m.jsxs("div",{className:"p-4 text-center text-sm text-muted-foreground",children:[m.jsx(ol,{className:"mx-auto mb-2 h-5 w-5 animate-spin"}),"Carregando swagger..."]}),g&&m.jsx("div",{className:"rounded-md border border-destructive/40 bg-destructive/10 p-3 text-xs text-destructive",children:g}),!u&&!g&&T.length===0&&m.jsx("p",{className:"p-4 text-center text-xs text-muted-foreground",children:"Nenhum endpoint encontrado."}),T.map(([q,ae])=>m.jsxs("div",{className:"mb-3",children:[m.jsx("p",{className:"mb-1 px-2 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:q}),m.jsx("div",{className:"space-y-0.5",children:ae.map(Ee=>{const ke=C0[Ee.method.toLowerCase()]||"",ce=Ee.key===w;return m.jsxs("button",{onClick:()=>C(Ee.key),className:`group flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-xs transition-colors ${ce?"bg-primary/10 ring-1 ring-primary/40":"hover:bg-accent"}`,children:[m.jsx("span",{className:`inline-block w-12 shrink-0 rounded border px-1.5 py-0.5 text-center font-mono text-[10px] font-bold ${ke}`,children:Ee.method}),m.jsx("span",{className:"flex-1 truncate font-mono text-foreground",children:Ee.path}),m.jsx(Qm,{className:"h-3 w-3 shrink-0 text-muted-foreground opacity-0 group-hover:opacity-100"})]},Ee.key)})})]},q))]})]}),m.jsx("section",{className:"flex flex-1 flex-col overflow-hidden",children:V?m.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[m.jsxs("div",{className:"border-b border-sidebar-border bg-sidebar/30 px-5 py-3",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("span",{className:`rounded border px-2 py-0.5 font-mono text-xs font-bold ${C0[V.method.toLowerCase()]||""}`,children:V.method}),m.jsx("code",{className:"flex-1 truncate font-mono text-sm text-foreground",children:V.path}),m.jsx("button",{type:"button",onClick:ge,disabled:re,className:"inline-flex items-center gap-1.5 rounded-md bg-primary px-3 py-1.5 text-xs font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-50",children:re?m.jsxs(m.Fragment,{children:[m.jsx(ol,{className:"h-3.5 w-3.5 animate-spin"}),"Executando..."]}):m.jsxs(m.Fragment,{children:[m.jsx(XR,{className:"h-3.5 w-3.5"}),"Executar"]})})]}),V.operation.summary&&m.jsx("p",{className:"mt-2 text-xs text-foreground/80",children:V.operation.summary})]}),m.jsxs("div",{className:"grid flex-1 grid-cols-1 gap-0 overflow-hidden lg:grid-cols-2",children:[m.jsx("div",{className:"overflow-y-auto border-r border-sidebar-border p-5",children:m.jsxs("div",{className:"space-y-4",children:[m.jsxs("div",{className:"rounded-md border bor
Line truncated
|
||||||
-1
@@ -1 +0,0 @@
|
|||||||
@layer properties;@layer theme,base,components,utilities;@layer theme{:root,:host{--font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-100: oklch(93.6% .032 17.717);--color-red-500: oklch(63.7% .237 25.331);--color-red-600: oklch(57.7% .245 27.325);--color-red-700: oklch(50.5% .213 27.518);--color-red-800: oklch(44.4% .177 26.899);--color-orange-100: oklch(95.4% .038 75.164);--color-orange-500: oklch(70.5% .213 47.604);--color-orange-600: oklch(64.6% .222 41.116);--color-orange-700: oklch(55.3% .195 38.402);--color-yellow-100: oklch(97.3% .071 103.193);--color-yellow-400: oklch(85.2% .199 91.936);--color-yellow-500: oklch(79.5% .184 86.047);--color-yellow-600: oklch(68.1% .162 75.834);--color-yellow-700: oklch(55.4% .135 66.442);--color-green-50: oklch(98.2% .018 155.826);--color-green-100: oklch(96.2% .044 156.743);--color-green-200: oklch(92.5% .084 155.995);--color-green-400: oklch(79.2% .209 151.711);--color-green-500: oklch(72.3% .219 149.579);--color-green-600: oklch(62.7% .194 149.214);--color-green-700: oklch(52.7% .154 150.069);--color-green-800: oklch(44.8% .119 151.328);--color-blue-50: oklch(97% .014 254.604);--color-blue-100: oklch(93.2% .032 255.585);--color-blue-200: oklch(88.2% .059 254.128);--color-blue-400: oklch(70.7% .165 254.624);--color-blue-500: oklch(62.3% .214 259.815);--color-blue-600: oklch(54.6% .245 262.881);--color-blue-700: oklch(48.8% .243 264.376);--color-blue-800: oklch(42.4% .199 265.638);--color-blue-900: oklch(37.9% .146 265.522);--color-purple-50: oklch(97.7% .014 308.299);--color-purple-100: oklch(94.6% .033 307.174);--color-purple-200: oklch(90.2% .063 306.703);--color-purple-500: oklch(62.7% .265 303.9);--color-purple-600: oklch(55.8% .288 302.321);--color-purple-700: oklch(49.6% .265 301.924);--color-purple-900: oklch(38.1% .176 304.987);--color-pink-50: oklch(97.1% .014 343.198);--color-pink-500: oklch(65.6% .241 354.308);--color-pink-600: oklch(59.2% .249 .584);--color-slate-50: oklch(98.4% .003 247.858);--color-slate-800: oklch(27.9% .041 260.031);--color-slate-900: oklch(20.8% .042 265.755);--color-gray-400: oklch(70.7% .022 261.325);--color-gray-600: oklch(44.6% .03 256.802);--color-gray-700: oklch(37.3% .034 259.733);--color-gray-900: oklch(21% .034 264.665);--color-black: #000;--color-white: #fff;--spacing: .25rem;--container-xs: 20rem;--container-sm: 24rem;--container-md: 28rem;--container-lg: 32rem;--container-2xl: 42rem;--container-4xl: 56rem;--container-6xl: 72rem;--text-xs: .75rem;--text-xs--line-height: calc(1 / .75);--text-sm: .875rem;--text-sm--line-height: calc(1.25 / .875);--text-base: 1rem;--text-base--line-height: 1.5 ;--text-lg: 1.125rem;--text-lg--line-height: calc(1.75 / 1.125);--text-xl: 1.25rem;--text-xl--line-height: calc(1.75 / 1.25);--text-2xl: 1.5rem;--text-2xl--line-height: calc(2 / 1.5);--text-3xl: 1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl: 2.25rem;--text-4xl--line-height: calc(2.5 / 2.25);--font-weight-normal: 400;--font-weight-medium: 500;--font-weight-semibold: 600;--font-weight-bold: 700;--tracking-tight: -.025em;--tracking-widest: .1em;--leading-tight: 1.25;--leading-snug: 1.375;--leading-relaxed: 1.625;--radius-xs: .125rem;--ease-in-out: cubic-bezier(.4, 0, .2, 1);--animate-spin: spin 1s linear infinite;--animate-pulse: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--aspect-video: 16 / 9;--default-transition-duration: .15s;--default-transition-timing-function: cubic-bezier(.4, 0, .2, 1);--default-font-family: var(--font-sans);--default-mono-font-family: var(--font-mono);--color-background: var(--background);--color-foreground: var(--foreground);--color-primary: var(--primary);--color-primary-foreground: var(--primary-foreground);--color-secondary: var(--secondary);--color-secondary-foreground: var(--secondary-foreground);--color-muted: var(--muted);--color-muted-foreground: var(--muted-foreground);--color-accent: var(--accent);--color-accent-foreground: var(--accent-foreground);--color-destructive: var(--destructive);--color-destructive-foreground: var(--destructive-foreground);--color-border: var(--border);--color-input: var(--input);--color-ring: var(--ring)}}@layer base{*,:after,:before,::backdrop,::file-selector-button{box-sizing:border-box;margin:0;padding:0;border:0 solid}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings, normal);font-variation-settings:var(--default-font-variation-settings, normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1Line truncated
|
|
||||||
-340
@@ -1,340 +0,0 @@
|
|||||||
var iC=Object.defineProperty;var lC=(t,n,r)=>n in t?iC(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r;var tb=(t,n,r)=>lC(t,typeof n!="symbol"?n+"":n,r);function cC(t,n){for(var r=0;r<n.length;r++){const s=n[r];if(typeof s!="string"&&!Array.isArray(s)){for(const i in s)if(i!=="default"&&!(i in t)){const c=Object.getOwnPropertyDescriptor(s,i);c&&Object.defineProperty(t,i,c.get?c:{enumerable:!0,get:()=>s[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const c of i)if(c.type==="childList")for(const u of c.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&s(u)}).observe(document,{childList:!0,subtree:!0});function r(i){const c={};return i.integrity&&(c.integrity=i.integrity),i.referrerPolicy&&(c.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?c.credentials="include":i.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function s(i){if(i.ep)return;i.ep=!0;const c=r(i);fetch(i.href,c)}})();function ix(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var om={exports:{}},Pi={};/**
|
|
||||||
* @license React
|
|
||||||
* react-jsx-runtime.production.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/var nb;function uC(){if(nb)return Pi;nb=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function r(s,i,c){var u=null;if(c!==void 0&&(u=""+c),i.key!==void 0&&(u=""+i.key),"key"in i){c={};for(var f in i)f!=="key"&&(c[f]=i[f])}else c=i;return i=c.ref,{$$typeof:t,type:s,key:u,ref:i!==void 0?i:null,props:c}}return Pi.Fragment=n,Pi.jsx=r,Pi.jsxs=r,Pi}var ab;function dC(){return ab||(ab=1,om.exports=uC()),om.exports}var p=dC(),im={exports:{}},Pe={};/**
|
|
||||||
* @license React
|
|
||||||
* react.production.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/var rb;function fC(){if(rb)return Pe;rb=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),w=Symbol.iterator;function N(T){return T===null||typeof T!="object"?null:(T=w&&T[w]||T["@@iterator"],typeof T=="function"?T:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,C={};function A(T,Y,D){this.props=T,this.context=Y,this.refs=C,this.updater=D||E}A.prototype.isReactComponent={},A.prototype.setState=function(T,Y){if(typeof T!="object"&&typeof T!="function"&&T!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,T,Y,"setState")},A.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function O(){}O.prototype=A.prototype;function R(T,Y,D){this.props=T,this.context=Y,this.refs=C,this.updater=D||E}var L=R.prototype=new O;L.constructor=R,S(L,A.prototype),L.isPureReactComponent=!0;var I=Array.isArray;function ee(){}var U={H:null,A:null,T:null,S:null},Q=Object.prototype.hasOwnProperty;function le(T,Y,D){var V=D.ref;return{$$typeof:t,type:T,key:Y,ref:V!==void 0?V:null,props:D}}function ue(T,Y){return le(T.type,Y,T.props)}function me(T){return typeof T=="object"&&T!==null&&T.$$typeof===t}function re(T){var Y={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(D){return Y[D]})}var X=/\/+/g;function he(T,Y){return typeof T=="object"&&T!==null&&T.key!=null?re(""+T.key):Y.toString(36)}function be(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then(ee,ee):(T.status="pending",T.then(function(Y){T.status==="pending"&&(T.status="fulfilled",T.value=Y)},function(Y){T.status==="pending"&&(T.status="rejected",T.reason=Y)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function j(T,Y,D,V,te){var fe=typeof T;(fe==="undefined"||fe==="boolean")&&(T=null);var oe=!1;if(T===null)oe=!0;else switch(fe){case"bigint":case"string":case"number":oe=!0;break;case"object":switch(T.$$typeof){case t:case n:oe=!0;break;case v:return oe=T._init,j(oe(T._payload),Y,D,V,te)}}if(oe)return te=te(T),oe=V===""?"."+he(T,0):V,I(te)?(D="",oe!=null&&(D=oe.replace(X,"$&/")+"/"),j(te,Y,D,"",function(_e){return _e})):te!=null&&(me(te)&&(te=ue(te,D+(te.key==null||T&&T.key===te.key?"":(""+te.key).replace(X,"$&/")+"/")+oe)),Y.push(te)),1;oe=0;var K=V===""?".":V+":";if(I(T))for(var de=0;de<T.length;de++)V=T[de],fe=K+he(V,de),oe+=j(V,Y,D,fe,te);else if(de=N(T),typeof de=="function")for(T=de.call(T),de=0;!(V=T.next()).done;)V=V.value,fe=K+he(V,de++),oe+=j(V,Y,D,fe,te);else if(fe==="object"){if(typeof T.then=="function")return j(be(T),Y,D,V,te);throw Y=String(T),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return oe}function Z(T,Y,D){if(T==null)return T;var V=[],te=0;return j(T,V,"","",function(fe){return Y.call(D,fe,te++)}),V}function P(T){if(T._status===-1){var Y=T._result;Y=Y(),Y.then(function(D){(T._status===0||T._status===-1)&&(T._status=1,T._result=D)},function(D){(T._status===0||T._status===-1)&&(T._status=2,T._result=D)}),T._status===-1&&(T._status=0,T._result=Y)}if(T._status===1)return T._result.default;throw T._result}var se=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof T=="object"&&T!==null&&typeof T.message=="string"?String(T.message):String(T),error:T});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)},we={map:Z,forEach:function(T,Y,D){Z(T,function(){Y.apply(this,arguments)},D)},count:function(T){var Y=0;return Z(T,function(){Y++}),Y},toArray:function(T){return Z(T,function(Y){return Y})||[]},only:function(T){if(!me(T))throw Error("React.Children.only expected to receive a single React element child.");return T}};return Pe.Activity=y,Pe.Children=we,Pe.Component=A,Pe.Fragment=r,Pe.Profiler=i,Pe.PureComponent=R,Pe.StrictMode=s,Pe.Suspense=g,Pe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=U,Pe.__COMPILER_RUNTIME={__proto__:null,c:function(T){return U.H.useMemoCache(T)}},Pe.cache=function(T){return function(){return T.apply(null,arguments)}},Pe.cacheSignal=function(){return null},Pe.cloneElement=function(T,Y,D){if(T==null)throw Error("Line truncated
|
|
||||||
* @license React
|
|
||||||
* scheduler.production.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/var ob;function mC(){return ob||(ob=1,(function(t){function n(j,Z){var P=j.length;j.push(Z);e:for(;0<P;){var se=P-1>>>1,we=j[se];if(0<i(we,Z))j[se]=Z,j[P]=we,P=se;else break e}}function r(j){return j.length===0?null:j[0]}function s(j){if(j.length===0)return null;var Z=j[0],P=j.pop();if(P!==Z){j[0]=P;e:for(var se=0,we=j.length,T=we>>>1;se<T;){var Y=2*(se+1)-1,D=j[Y],V=Y+1,te=j[V];if(0>i(D,P))V<we&&0>i(te,D)?(j[se]=te,j[V]=P,se=V):(j[se]=D,j[Y]=P,se=Y);else if(V<we&&0>i(te,P))j[se]=te,j[V]=P,se=V;else break e}}return Z}function i(j,Z){var P=j.sortIndex-Z.sortIndex;return P!==0?P:j.id-Z.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var u=Date,f=u.now();t.unstable_now=function(){return u.now()-f}}var g=[],h=[],v=1,y=null,w=3,N=!1,E=!1,S=!1,C=!1,A=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function L(j){for(var Z=r(h);Z!==null;){if(Z.callback===null)s(h);else if(Z.startTime<=j)s(h),Z.sortIndex=Z.expirationTime,n(g,Z);else break;Z=r(h)}}function I(j){if(S=!1,L(j),!E)if(r(g)!==null)E=!0,ee||(ee=!0,re());else{var Z=r(h);Z!==null&&be(I,Z.startTime-j)}}var ee=!1,U=-1,Q=5,le=-1;function ue(){return C?!0:!(t.unstable_now()-le<Q)}function me(){if(C=!1,ee){var j=t.unstable_now();le=j;var Z=!0;try{e:{E=!1,S&&(S=!1,O(U),U=-1),N=!0;var P=w;try{t:{for(L(j),y=r(g);y!==null&&!(y.expirationTime>j&&ue());){var se=y.callback;if(typeof se=="function"){y.callback=null,w=y.priorityLevel;var we=se(y.expirationTime<=j);if(j=t.unstable_now(),typeof we=="function"){y.callback=we,L(j),Z=!0;break t}y===r(g)&&s(g),L(j)}else s(g);y=r(g)}if(y!==null)Z=!0;else{var T=r(h);T!==null&&be(I,T.startTime-j),Z=!1}}break e}finally{y=null,w=P,N=!1}Z=void 0}}finally{Z?re():ee=!1}}}var re;if(typeof R=="function")re=function(){R(me)};else if(typeof MessageChannel<"u"){var X=new MessageChannel,he=X.port2;X.port1.onmessage=me,re=function(){he.postMessage(null)}}else re=function(){A(me,0)};function be(j,Z){U=A(function(){j(t.unstable_now())},Z)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(j){j.callback=null},t.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Q=0<j?Math.floor(1e3/j):5},t.unstable_getCurrentPriorityLevel=function(){return w},t.unstable_next=function(j){switch(w){case 1:case 2:case 3:var Z=3;break;default:Z=w}var P=w;w=Z;try{return j()}finally{w=P}},t.unstable_requestPaint=function(){C=!0},t.unstable_runWithPriority=function(j,Z){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var P=w;w=j;try{return Z()}finally{w=P}},t.unstable_scheduleCallback=function(j,Z,P){var se=t.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?se+P:se):P=se,j){case 1:var we=-1;break;case 2:we=250;break;case 5:we=1073741823;break;case 4:we=1e4;break;default:we=5e3}return we=P+we,j={id:v++,callback:Z,priorityLevel:j,startTime:P,expirationTime:we,sortIndex:-1},P>se?(j.sortIndex=P,n(h,j),r(g)===null&&j===r(h)&&(S?(O(U),U=-1):S=!0,be(I,P-se))):(j.sortIndex=we,n(g,j),E||N||(E=!0,ee||(ee=!0,re()))),j},t.unstable_shouldYield=ue,t.unstable_wrapCallback=function(j){var Z=w;return function(){var P=w;w=Z;try{return j.apply(this,arguments)}finally{w=P}}}})(um)),um}var ib;function hC(){return ib||(ib=1,cm.exports=mC()),cm.exports}var dm={exports:{}},cn={};/**
|
|
||||||
* @license React
|
|
||||||
* react-dom.production.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/var lb;function pC(){if(lb)return cn;lb=1;var t=mh();function n(g){var h="https://react.dev/errors/"+g;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)h+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+g+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var s={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},i=Symbol.for("react.portal");function c(g,h,v){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:y==null?null:""+y,children:g,containerInfo:h,implementation:v}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(g,h){if(g==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return cn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,cn.createPortal=function(g,h){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(n(299));return c(g,h,null,v)},cn.flushSync=function(g){var h=u.T,v=s.p;try{if(u.T=null,s.p=2,g)return g()}finally{u.T=h,s.p=v,s.d.f()}},cn.preconnect=function(g,h){typeof g=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,s.d.C(g,h))},cn.prefetchDNS=function(g){typeof g=="string"&&s.d.D(g)},cn.preinit=function(g,h){if(typeof g=="string"&&h&&typeof h.as=="string"){var v=h.as,y=f(v,h.crossOrigin),w=typeof h.integrity=="string"?h.integrity:void 0,N=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;v==="style"?s.d.S(g,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:y,integrity:w,fetchPriority:N}):v==="script"&&s.d.X(g,{crossOrigin:y,integrity:w,fetchPriority:N,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},cn.preinitModule=function(g,h){if(typeof g=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var v=f(h.as,h.crossOrigin);s.d.M(g,{crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&s.d.M(g)},cn.preload=function(g,h){if(typeof g=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var v=h.as,y=f(v,h.crossOrigin);s.d.L(g,v,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},cn.preloadModule=function(g,h){if(typeof g=="string")if(h){var v=f(h.as,h.crossOrigin);s.d.m(g,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else s.d.m(g)},cn.requestFormReset=function(g){s.d.r(g)},cn.unstable_batchedUpdates=function(g,h){return g(h)},cn.useFormState=function(g,h,v){return u.H.useFormState(g,h,v)},cn.useFormStatus=function(){return u.H.useHostTransitionStatus()},cn.version="19.2.0",cn}var cb;function lx(){if(cb)return dm.exports;cb=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}return t(),dm.exports=pC(),dm.exports}/**
|
|
||||||
* @license React
|
|
||||||
* react-dom-client.production.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/var ub;function gC(){if(ub)return Hi;ub=1;var t=hC(),n=mh(),r=lx();function s(e){var a="https://react.dev/errors/"+e;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)a+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+e+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(e){var a=e,o=e;if(e.alternate)for(;a.return;)a=a.return;else{e=a;do a=e,(a.flags&4098)!==0&&(o=a.return),e=a.return;while(e)}return a.tag===3?o:null}function u(e){if(e.tag===13){var a=e.memoizedState;if(a===null&&(e=e.alternate,e!==null&&(a=e.memoizedState)),a!==null)return a.dehydrated}return null}function f(e){if(e.tag===31){var a=e.memoizedState;if(a===null&&(e=e.alternate,e!==null&&(a=e.memoizedState)),a!==null)return a.dehydrated}return null}function g(e){if(c(e)!==e)throw Error(s(188))}function h(e){var a=e.alternate;if(!a){if(a=c(e),a===null)throw Error(s(188));return a!==e?null:e}for(var o=e,l=a;;){var d=o.return;if(d===null)break;var m=d.alternate;if(m===null){if(l=d.return,l!==null){o=l;continue}break}if(d.child===m.child){for(m=d.child;m;){if(m===o)return g(d),e;if(m===l)return g(d),a;m=m.sibling}throw Error(s(188))}if(o.return!==l.return)o=d,l=m;else{for(var x=!1,_=d.child;_;){if(_===o){x=!0,o=d,l=m;break}if(_===l){x=!0,l=d,o=m;break}_=_.sibling}if(!x){for(_=m.child;_;){if(_===o){x=!0,o=m,l=d;break}if(_===l){x=!0,l=m,o=d;break}_=_.sibling}if(!x)throw Error(s(189))}}if(o.alternate!==l)throw Error(s(190))}if(o.tag!==3)throw Error(s(188));return o.stateNode.current===o?e:a}function v(e){var a=e.tag;if(a===5||a===26||a===27||a===6)return e;for(e=e.child;e!==null;){if(a=v(e),a!==null)return a;e=e.sibling}return null}var y=Object.assign,w=Symbol.for("react.element"),N=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),R=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),ee=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),Q=Symbol.for("react.lazy"),le=Symbol.for("react.activity"),ue=Symbol.for("react.memo_cache_sentinel"),me=Symbol.iterator;function re(e){return e===null||typeof e!="object"?null:(e=me&&e[me]||e["@@iterator"],typeof e=="function"?e:null)}var X=Symbol.for("react.client.reference");function he(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===X?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case S:return"Fragment";case A:return"Profiler";case C:return"StrictMode";case I:return"Suspense";case ee:return"SuspenseList";case le:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case E:return"Portal";case R:return e.displayName||"Context";case O:return(e._context.displayName||"Context")+".Consumer";case L:var a=e.render;return e=e.displayName,e||(e=a.displayName||a.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case U:return a=e.displayName||null,a!==null?a:he(e.type)||"Memo";case Q:a=e._payload,e=e._init;try{return he(e(a))}catch{}}return null}var be=Array.isArray,j=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P={pending:!1,data:null,method:null,action:null},se=[],we=-1;function T(e){return{current:e}}function Y(e){0>we||(e.current=se[we],se[we]=null,we--)}function D(e,a){we++,se[we]=e.current,e.current=a}var V=T(null),te=T(null),fe=T(null),oe=T(null);function K(e,a){switch(D(fe,a),D(te,e),D(V,null),a.nodeType){case 9:case 11:e=(e=a.documentElement)&&(e=e.namespaceURI)?_v(e):0;break;default:if(e=a.tagName,a=a.namespaceURI)a=_v(a),e=Cv(a,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Y(V),D(V,e)}function de(){Y(V),Y(te),Y(fe)}function _e(e){e.memoizedState!==null&&D(oe,e);var a=V.current,o=Cv(a,e.type);a!==o&&(D(te,e),D(V,o))}function rt(e){te.current===e&&(Y(V),Y(te)),oe.current===e&&(Y(oe),zi._currentValue=P)}var De,Le;function xe(e){if(De===void 0)try{throw Error()}catch(o){var a=o.stack.trim().match(/\n( *(at )?)/);De=a&&a[1]||"",Le=-1<o.stack.indexOf(`
|
|
||||||
at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
||||||
`+De+e+Le}var je=!1;function at(e,a){if(!e||je)return"";je=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(a){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(J){var G=J}Reflect.construct(e,[],ce)}else{try{ce.call()}catch(J){G=J}e.call(ce.prototype)}}else{try{throw Error()}catch(J){G=J}(ce=e())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(J){if(J&&G&&typeof J.stack=="string")return[J.stack,G.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=l.DetermineComponentFrameRoot(),x=m[0],_=m[1];if(x&&_){var M=x.split(`
|
|
||||||
`),F=_.split(`
|
|
||||||
`);for(d=l=0;l<M.length&&!M[l].includes("DetermineComponentFrameRoot");)l++;for(;d<F.length&&!F[d].includes("DetermineComponentFrameRoot");)d++;if(l===M.length||d===F.length)for(l=M.length-1,d=F.length-1;1<=l&&0<=d&&M[l]!==F[d];)d--;for(;1<=l&&0<=d;l--,d--)if(M[l]!==F[d]){if(l!==1||d!==1)do if(l--,d--,0>d||M[l]!==F[d]){var ne=`
|
|
||||||
`+M[l].replace(" at new "," at ");return e.displayName&&ne.includes("<anonymous>")&&(ne=ne.replace("<anonymous>",e.displayName)),ne}while(1<=l&&0<=d);break}}}finally{je=!1,Error.prepareStackTrace=o}return(o=e?e.displayName||e.name:"")?xe(o):""}function pt(e,a){switch(e.tag){case 26:case 27:case 5:return xe(e.type);case 16:return xe("Lazy");case 13:return e.child!==a&&a!==null?xe("Suspense Fallback"):xe("Suspense");case 19:return xe("SuspenseList");case 0:case 15:return at(e.type,!1);case 11:return at(e.type.render,!1);case 1:return at(e.type,!0);case 31:return xe("Activity");default:return""}}function Je(e){try{var a="",o=null;do a+=pt(e,o),o=e,e=e.return;while(e);return a}catch(l){return`
|
|
||||||
Error generating stack: `+l.message+`
|
|
||||||
`+l.stack}}var Ue=Object.prototype.hasOwnProperty,k=t.unstable_scheduleCallback,H=t.unstable_cancelCallback,$=t.unstable_shouldYield,ye=t.unstable_requestPaint,pe=t.unstable_now,ge=t.unstable_getCurrentPriorityLevel,Se=t.unstable_ImmediatePriority,qe=t.unstable_UserBlockingPriority,Xe=t.unstable_NormalPriority,Ot=t.unstable_LowPriority,on=t.unstable_IdlePriority,dn=t.log,Fn=t.unstable_setDisableYieldValue,Ft=null,Nt=null;function fn(e){if(typeof dn=="function"&&Fn(e),Nt&&typeof Nt.setStrictMode=="function")try{Nt.setStrictMode(Ft,e)}catch{}}var $t=Math.clz32?Math.clz32:ya,Xo=Math.log,cr=Math.LN2;function ya(e){return e>>>=0,e===0?32:31-(Xo(e)/cr|0)|0}var As=256,Rs=262144,Xr=4194304;function va(e){var a=e&42;if(a!==0)return a;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Be(e,a,o){var l=e.pendingLanes;if(l===0)return 0;var d=0,m=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var _=l&134217727;return _!==0?(l=_&~m,l!==0?d=va(l):(x&=_,x!==0?d=va(x):o||(o=_&~e,o!==0&&(d=va(o))))):(_=l&~m,_!==0?d=va(_):x!==0?d=va(x):o||(o=l&~e,o!==0&&(d=va(o)))),d===0?0:a!==0&&a!==d&&(a&m)===0&&(m=d&-d,o=a&-a,m>=o||m===32&&(o&4194048)!==0)?a:d}function Et(e,a){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&a)===0}function Kt(e,a){switch(e){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ln(){var e=Xr;return Xr<<=1,(Xr&62914560)===0&&(Xr=4194304),e}function ur(e){for(var a=[],o=0;31>o;o++)a.push(e);return a}function At(e,a){e.pendingLanes|=a,a!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function gn(e,a,o,l,d,m){var x=e.pendingLanes;e.pendingLanes=o,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=o,e.entangledLanes&=o,e.errorRecoveryDisabledLanes&=o,e.shellSuspendCounter=0;var _=e.entanglements,M=e.expirationTimes,F=e.hiddenUpdates;for(o=x&~o;0<o;){var ne=31-$t(o),ce=1<<ne;_[ne]=0,M[ne]=-1;var G=F[ne];if(G!==null)for(F[ne]=null,ne=0;ne<G.length;ne++){var J=G[ne];J!==null&&(J.lane&=-536870913)}o&=~ce}l!==0&&Kr(e,l,0),m!==0&&d===0&&e.tag!==0&&(e.suspendedLanes|=m&~(x&~a))}function Kr(e,a,o){e.pendingLanes|=a,e.suspendedLanes&=~a;var l=31-$t(a);e.entangledLanes|=a,e.entanglements[l]=e.entanglements[l]|1073741824|o&261930}function yn(e,a){var o=e.entangledLanes|=a;for(e=e.entanglements;o;){var l=31-$t(o),d=1<<l;d&a|e[l]&a&&(e[l]|=a),o&=~d}}function vn(e,a){var o=a&-a;return o=(o&42)!==0?1:Ts(o),(o&(e.suspendedLanes|a))!==0?0:o}function Ts(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function sa(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Xu(){var e=Z.p;return e!==0?e:(e=window.event,e===void 0?32:Zv(e.type))}function up(e,a){var o=Z.p;try{return Z.p=e,a()}finally{Z.p=o}}var dr=Math.random().toString(36).slice(2),en="__reactFiber$"+dr,bn="__reactProps$"+dr,js="__reactContainer$"+dr,Ku="__reactEvents$"+dr,KS="__reactListeners$"+dr,QS="__reactHandles$"+dr,dp="__reactResources$"+dr,Ko="__reactMarker$"+dr;function Qu(e){delete e[en],delete e[bn],delete e[Ku],delete e[KS],delete e[QS]}function Os(e){var a=e[en];if(a)return a;for(var o=e.parentNode;o;){if(a=o[js]||o[en]){if(o=a.alternate,a.child!==null||o!==null&&o.child!==null)for(e=kv(e);e!==null;){if(o=e[en])return o;e=kv(e)}return a}e=o,o=e.parentNode}return null}function ks(e){if(e=e[en]||e[js]){var a=e.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return e}return null}function Qo(e){var a=e.tag;if(a===5||a===26||a===27||a===6)return e.stateNode;throw Error(s(33))}function Ms(e){var a=e[dp];return a||(a=e[dp]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Qt(e){e[Ko]=!0}var fp=new Set,mp={};function Qr(e,a){Ds(e,a),Ds(e+"Capture",a)}function Ds(e,a){for(mp[e]=a,e=0;e<a.length;e++)fp.add(a[e])}var WS=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2
Line truncated
|
|
||||||
`).replace(T_,"")}function Sv(e,a){return a=wv(a),wv(e)===a}function yt(e,a,o,l,d,m){switch(o){case"children":typeof l=="string"?a==="body"||a==="textarea"&&l===""||Ls(e,l):(typeof l=="number"||typeof l=="bigint")&&a!=="body"&&Ls(e,""+l);break;case"className":bl(e,"class",l);break;case"tabIndex":bl(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":bl(e,o,l);break;case"style":Sp(e,l,m);break;case"data":if(a!=="object"){bl(e,"data",l);break}case"src":case"href":if(l===""&&(a!=="a"||o!=="href")){e.removeAttribute(o);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(o);break}l=wl(""+l),e.setAttribute(o,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(o,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof m=="function"&&(o==="formAction"?(a!=="input"&&yt(e,a,"name",d.name,d,null),yt(e,a,"formEncType",d.formEncType,d,null),yt(e,a,"formMethod",d.formMethod,d,null),yt(e,a,"formTarget",d.formTarget,d,null)):(yt(e,a,"encType",d.encType,d,null),yt(e,a,"method",d.method,d,null),yt(e,a,"target",d.target,d,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(o);break}l=wl(""+l),e.setAttribute(o,l);break;case"onClick":l!=null&&(e.onclick=La);break;case"onScroll":l!=null&&Qe("scroll",e);break;case"onScrollEnd":l!=null&&Qe("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(o=l.__html,o!=null){if(d.children!=null)throw Error(s(60));e.innerHTML=o}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}o=wl(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(o,""+l):e.removeAttribute(o);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(o,""):e.removeAttribute(o);break;case"capture":case"download":l===!0?e.setAttribute(o,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(o,l):e.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(o,l):e.removeAttribute(o);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(o):e.setAttribute(o,l);break;case"popover":Qe("beforetoggle",e),Qe("toggle",e),vl(e,"popover",l);break;case"xlinkActuate":za(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":za(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":za(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":za(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":za(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":za(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":za(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":za(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":za(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":vl(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=aE.get(o)||o,vl(e,o,l))}}function If(e,a,o,l,d,m){switch(o){case"style":Sp(e,l,m);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(o=l.__html,o!=null){if(d.children!=null)throw Error(s(60));e.innerHTML=o}}break;case"children":typeof l=="string"?Ls(e,l):(typeof l=="number"||typeof l=="bigint")&&Ls(e,""+l);break;case"onScroll":l!=null&&Qe("scroll",e);break;case"onScrollEnd":l!=null&&Qe("scrollend",e);break;case"onClick":l!=null&&(e.onclick=La);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"inne
Line truncated
|
|
||||||
* react-router v7.9.5
|
|
||||||
*
|
|
||||||
* Copyright (c) Remix Software Inc.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE.md file in the root directory of this source tree.
|
|
||||||
*
|
|
||||||
* @license MIT
|
|
||||||
*/var fb="popstate";function bC(t={}){function n(s,i){let{pathname:c,search:u,hash:f}=s.location;return Um("",{pathname:c,search:u,hash:f},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(s,i){return typeof i=="string"?i:Wi(i)}return wC(n,r,null,t)}function Ct(t,n){if(t===!1||t===null||typeof t>"u")throw new Error(n)}function da(t,n){if(!t){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function xC(){return Math.random().toString(36).substring(2,10)}function mb(t,n){return{usr:t.state,key:t.key,idx:n}}function Um(t,n,r=null,s){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof n=="string"?Bo(n):n,state:r,key:n&&n.key||s||xC()}}function Wi({pathname:t="/",search:n="",hash:r=""}){return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Bo(t){let n={};if(t){let r=t.indexOf("#");r>=0&&(n.hash=t.substring(r),t=t.substring(0,r));let s=t.indexOf("?");s>=0&&(n.search=t.substring(s),t=t.substring(0,s)),t&&(n.pathname=t)}return n}function wC(t,n,r,s={}){let{window:i=document.defaultView,v5Compat:c=!1}=s,u=i.history,f="POP",g=null,h=v();h==null&&(h=0,u.replaceState({...u.state,idx:h},""));function v(){return(u.state||{idx:null}).idx}function y(){f="POP";let C=v(),A=C==null?null:C-h;h=C,g&&g({action:f,location:S.location,delta:A})}function w(C,A){f="PUSH";let O=Um(S.location,C,A);h=v()+1;let R=mb(O,h),L=S.createHref(O);try{u.pushState(R,"",L)}catch(I){if(I instanceof DOMException&&I.name==="DataCloneError")throw I;i.location.assign(L)}c&&g&&g({action:f,location:S.location,delta:1})}function N(C,A){f="REPLACE";let O=Um(S.location,C,A);h=v();let R=mb(O,h),L=S.createHref(O);u.replaceState(R,"",L),c&&g&&g({action:f,location:S.location,delta:0})}function E(C){return SC(C)}let S={get action(){return f},get location(){return t(i,u)},listen(C){if(g)throw new Error("A history only accepts one active listener");return i.addEventListener(fb,y),g=C,()=>{i.removeEventListener(fb,y),g=null}},createHref(C){return n(i,C)},createURL:E,encodeLocation(C){let A=E(C);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:w,replace:N,go(C){return u.go(C)}};return S}function SC(t,n=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),Ct(r,"No window.location.(origin|href) available to create URL");let s=typeof t=="string"?t:Wi(t);return s=s.replace(/ $/,"%20"),!n&&s.startsWith("//")&&(s=r+s),new URL(s,r)}function cx(t,n,r="/"){return EC(t,n,r,!1)}function EC(t,n,r,s){let i=typeof n=="string"?Bo(n):n,c=ar(i.pathname||"/",r);if(c==null)return null;let u=ux(t);_C(u);let f=null;for(let g=0;f==null&&g<u.length;++g){let h=zC(c);f=MC(u[g],h,s)}return f}function ux(t,n=[],r=[],s="",i=!1){let c=(u,f,g=i,h)=>{let v={relativePath:h===void 0?u.path||"":h,caseSensitive:u.caseSensitive===!0,childrenIndex:f,route:u};if(v.relativePath.startsWith("/")){if(!v.relativePath.startsWith(s)&&g)return;Ct(v.relativePath.startsWith(s),`Absolute route path "${v.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),v.relativePath=v.relativePath.slice(s.length)}let y=nr([s,v.relativePath]),w=r.concat(v);u.children&&u.children.length>0&&(Ct(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),ux(u.children,n,w,y,g)),!(u.path==null&&!u.index)&&n.push({path:y,score:OC(y,u.index),routesMeta:w})};return t.forEach((u,f)=>{var g;if(u.path===""||!((g=u.path)!=null&&g.includes("?")))c(u,f);else for(let h of dx(u.path))c(u,f,!0,h)}),n}function dx(t){let n=t.split("/");if(n.length===0)return[];let[r,...s]=n,i=r.endsWith("?"),c=r.replace(/\?$/,"");if(s.length===0)return i?[c,""]:[c];let u=dx(s.join("/")),f=[];return f.push(...u.map(g=>g===""?c:[c,g].join("/"))),i&&f.push(...u),f.map(g=>t.startsWith("/")&&g===""?"/":g)}function _C(t){t.sort((n,r)=>n.score!==r.score?r.score-n.score:kC(n.routesMeta.map(s=>s.childrenIndex),r.routesMeta.map(s=>s.childrenIndex)))}var CC=/^:[\w-]+$/,NC=3,AC=2,RC=1,TC=10,jC=-2,hb=t=>t==="*";function OC(t,n){let r=t.split("/"),s=r.length;return r.some(hb)&&(s+=jC),n&&(s+=AC),r.filter(i=>!hb(i)).reduce((i,c)=>i+(CC.test(c)?NC:c===""?RC:TC),s)}function kC(t,n){return t.length===n.length&&t.slice(0,-1).every((s,i)=>s===n[i])?t[t.length-1]-n[n.length-1]:0}function MC(t,n,r=!1){let{routesMeta:s}=t,i={},c="/",u=[];for(let f=0;f<s.length;++f){let g=s[f],h=f===s.length-1,v=c==="/"?n:n.slice(c.length)||"/",y=Wc({path:g.relativePath,caseSensitive:g.caseSensitive,end:h},v),w=g.route;if(!y&&h&&r&&!s[s.length-1].route.index&&(y=Wc({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},v)),!y)return null;Object.assign(i,y.params),u.push({params:i,pathname:nr([c,y.pathname]),pathnameBase:PC(nr([c,y.pathnameBase])),route:w}),y.pathnameBase!=="/"&&(c=nr([c,y.pathnameBase]))}return u}function Wc(t,n){typeof t=="string"&&(t={path
Line truncated
|
|
||||||
|
|
||||||
Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}/*`}">.`)}let w=Yr(),N;if(n){let R=typeof n=="string"?Bo(n):n;Ct(v==="/"||((O=R.pathname)==null?void 0:O.startsWith(v)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${v}" but pathname "${R.pathname}" was given in the \`location\` prop.`),N=R}else N=w;let E=N.pathname||"/",S=E;if(v!=="/"){let R=v.replace(/^\//,"").split("/");S="/"+E.replace(/^\//,"").split("/").slice(R.length).join("/")}let C=cx(t,{pathname:S});da(y||C!=null,`No routes matched location "${N.pathname}${N.search}${N.hash}" `),da(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${N.pathname}${N.search}${N.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let A=n2(C&&C.map(R=>Object.assign({},R,{params:Object.assign({},g,R.params),pathname:nr([v,c.encodeLocation?c.encodeLocation(R.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?v:nr([v,c.encodeLocation?c.encodeLocation(R.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathnameBase])})),u,r,s,i);return n&&A?b.createElement(il.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...N},navigationType:"POP"}},A):A}function WC(){let t=i2(),n=IC(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,s="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:s},c={padding:"2px 4px",backgroundColor:s},u=null;return console.error("Error handled by React Router default ErrorBoundary:",t),u=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:c},"ErrorBoundary")," or"," ",b.createElement("code",{style:c},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},n),r?b.createElement("pre",{style:i},r):null,u)}var JC=b.createElement(WC,null),e2=class extends b.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){this.props.unstable_onError?this.props.unstable_onError(t,n):console.error("React Router caught the following error during render",t)}render(){return this.state.error!==void 0?b.createElement(aa.Provider,{value:this.props.routeContext},b.createElement(gh.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function t2({routeContext:t,match:n,children:r}){let s=b.useContext(Po);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),b.createElement(aa.Provider,{value:t},r)}function n2(t,n=[],r=null,s=null,i=null){if(t==null){if(!r)return null;if(r.errors)t=r.matches;else if(n.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let c=t,u=r==null?void 0:r.errors;if(u!=null){let h=c.findIndex(v=>v.route.id&&(u==null?void 0:u[v.route.id])!==void 0);Ct(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),c=c.slice(0,Math.min(c.length,h+1))}let f=!1,g=-1;if(r)for(let h=0;h<c.length;h++){let v=c[h];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(g=h),v.route.id){let{loaderData:y,errors:w}=r,N=v.route.loader&&!y.hasOwnProperty(v.route.id)&&(!w||w[v.route.id]===void 0);if(v.route.lazy||N){f=!0,g>=0?c=c.slice(0,g+1):c=[c[0]];break}}}return c.reduceRight((h,v,y)=>{let w,N=!1,E=null,S=null;r&&(w=u&&v.route.id?u[v.route.id]:void 0,E=v.route.errorElement||JC,f&&(g<0&&y===0?(yx("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),N=!0,S=null):g===y&&(N=!0,S=v.route.hydrateFallbackElement||null)));let C=n.concat(c.slice(0,y+1)),A=()=>{let O;return w?O=E:N?O=S:v.route.Component?O=b.createElement(v.route.Component,null):v.route.element?O=v.route.element:O=h,b.createElement(t2,{match:v,routeContext:{outlet:h,matches:C,isDataRoute:r!=null},children:O})};return r&&(v.route.ErrorBoundary||v.route.errorElement||y===0)?b.createElement(e2,{location:r.loLine truncated
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const yN=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),vN=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,r,s)=>s?s.toUpperCase():r.toLowerCase()),bb=t=>{const n=vN(t);return n.charAt(0).toUpperCase()+n.slice(1)},Nx=(...t)=>t.filter((n,r,s)=>!!n&&n.trim()!==""&&s.indexOf(n)===r).join(" ").trim(),bN=t=>{for(const n in t)if(n.startsWith("aria-")||n==="role"||n==="title")return!0};/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/var xN={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const wN=b.forwardRef(({color:t="currentColor",size:n=24,strokeWidth:r=2,absoluteStrokeWidth:s,className:i="",children:c,iconNode:u,...f},g)=>b.createElement("svg",{ref:g,...xN,width:n,height:n,stroke:t,strokeWidth:s?Number(r)*24/Number(n):r,className:Nx("lucide",i),...!c&&!bN(f)&&{"aria-hidden":"true"},...f},[...u.map(([h,v])=>b.createElement(h,v)),...Array.isArray(c)?c:[c]]));/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const ot=(t,n)=>{const r=b.forwardRef(({className:s,...i},c)=>b.createElement(wN,{ref:c,iconNode:n,className:Nx(`lucide-${yN(bb(t))}`,`lucide-${t}`,s),...i}));return r.displayName=bb(t),r};/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const SN=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],xb=ot("arrow-left",SN);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const EN=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],_N=ot("arrow-right",EN);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const CN=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Hm=ot("chevron-down",CN);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const NN=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],wb=ot("chevron-right",NN);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const AN=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],RN=ot("chevron-up",AN);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const TN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],jN=ot("circle-alert",TN);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const ON=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Sb=ot("circle-check",ON);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const kN=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],MN=ot("ellipsis-vertical",kN);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const DN=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],zN=ot("eye-off",DN);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const LN=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],UN=ot("eye",LN);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const BN=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],PN=ot("funnel",BN);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const HN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],VN=ot("globe",HN);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const IN=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],qN=ot("layers",IN);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const FN=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],$N=ot("layout-dashboard",FN);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const GN=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],YN=ot("loader-circle",GN);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const ZN=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],XN=ot("log-out",ZN);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const KN=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]],QN=ot("message-square",KN);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const WN=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],JN=ot("moon",WN);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const eA=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Vm=ot("plus",eA);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const tA=[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15",key:"dxknvb"}],["path",{d:"M6.16 6.16a9 9 0 1 0 12.68 12.68",key:"1x7qb5"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],nA=ot("power-off",tA);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const aA=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],Ax=ot("power",aA);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const rA=[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]],Eb=ot("qr-code",rA);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const sA=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],_b=ot("refresh-cw",sA);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const oA=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],Cb=ot("save",oA);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const iA=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],lA=ot("search",iA);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const cA=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],uA=ot("settings",cA);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const dA=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],fA=ot("shield",dA);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const mA=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],hA=ot("smartphone",mA);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const pA=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],gA=ot("sun",pA);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const yA=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],Sh=ot("trash-2",yA);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const vA=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],bA=ot("triangle-alert",vA);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const xA=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ji=ot("x",xA);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const wA=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],SA=ot("zap",wA);class EA extends b.Component{constructor(r){super(r);tb(this,"handleReset",()=>{this.setState({hasError:!1,error:null,errorInfo:null})});this.state={hasError:!1,error:null,errorInfo:null}}static getDerivedStateFromError(r){return{hasError:!0,error:r,errorInfo:null}}componentDidCatch(r,s){console.error("ErrorBoundary caught an error:",r,s),this.setState({error:r,errorInfo:s})}render(){return this.state.hasError?this.props.fallback?this.props.fallback:p.jsx("div",{className:"flex min-h-screen items-center justify-center bg-gray-50 px-4",children:p.jsxs("div",{className:"w-full max-w-md rounded-lg bg-white p-8 shadow-lg",children:[p.jsx("div",{className:"mb-4 flex items-center justify-center",children:p.jsx("div",{className:"rounded-full bg-red-100 p-3",children:p.jsx(bA,{className:"h-8 w-8 text-red-600"})})}),p.jsx("h1",{className:"mb-2 text-center text-2xl font-bold text-gray-900",children:"Algo deu errado"}),p.jsx("p",{className:"mb-6 text-center text-gray-600",children:"Ocorreu um erro inesperado na aplicação."}),this.state.error&&p.jsxs("div",{className:"mb-6 rounded-md bg-red-50 p-4",children:[p.jsx("p",{className:"text-sm font-medium text-red-800",children:this.state.error.message}),!1]}),p.jsxs("div",{className:"flex gap-3",children:[p.jsx("button",{onClick:this.handleReset,className:"flex-1 rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",children:"Tentar novamente"}),p.jsx("button",{onClick:()=>window.location.href="/",className:"flex-1 rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",children:"Voltar ao início"})]})]})}):this.props.children}}function Rx(t){var n,r,s="";if(typeof t=="string"||typeof t=="number")s+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(n=0;n<i;n++)t[n]&&(r=Rx(t[n]))&&(s&&(s+=" "),s+=r)}else for(r in t)t[r]&&(s&&(s+=" "),s+=r);return s}function Eh(){for(var t,n,r=0,s="",i=arguments.length;r<i;r++)(t=arguments[r])&&(n=Rx(t))&&(s&&(s+=" "),s+=n);return s}const _A=(t,n)=>{const r=new Array(t.length+n.length);for(let s=0;s<t.length;s++)r[s]=t[s];for(let s=0;s<n.length;s++)r[t.length+s]=n[s];return r},CA=(t,n)=>({classGroupId:t,validator:n}),Tx=(t=new Map,n=null,r)=>({nextPart:t,validators:n,classGroupId:r}),Jc="-",Nb=[],NA="arbitrary..",AA=t=>{const n=TA(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:s}=t;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return RA(u);const f=u.split(Jc),g=f[0]===""&&f.length>1?1:0;return jx(f,g,n)},getConflictingClassGroupIds:(u,f)=>{if(f){const g=s[u],h=r[u];return g?h?_A(h,g):g:h||Nb}return r[u]||Nb}}},jx=(t,n,r)=>{if(t.length-n===0)return r.classGroupId;const i=t[n],c=r.nextPart.get(i);if(c){const h=jx(t,n+1,c);if(h)return h}const u=r.validators;if(u===null)return;const f=n===0?t.join(Jc):t.slice(n).join(Jc),g=u.length;for(let h=0;h<g;h++){const v=u[h];if(v.validator(f))return v.classGroupId}},RA=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=t.slice(1,-1),r=n.indexOf(":"),s=n.slice(0,r);return s?NA+s:void 0})(),TA=t=>{const{theme:n,classGroups:r}=t;return jA(r,n)},jA=(t,n)=>{const r=Tx();for(const s in t){const i=t[s];_h(i,r,s,n)}return r},_h=(t,n,r,s)=>{const i=t.length;for(let c=0;c<i;c++){const u=t[c];OA(u,n,r,s)}},OA=(t,n,r,s)=>{if(typeof t=="string"){kA(t,n,r);return}if(typeof t=="function"){MA(t,n,r,s);return}DA(t,n,r,s)},kA=(t,n,r)=>{const s=t===""?n:Ox(n,t);s.classGroupId=r},MA=(t,n,r,s)=>{if(zA(t)){_h(t(s),n,r,s);return}n.validators===null&&(n.validators=[]),n.validators.push(CA(r,t))},DA=(t,n,r,s)=>{const i=Object.entries(t),c=i.length;for(let u=0;u<c;u++){const[f,g]=i[u];_h(g,Ox(n,f),r,s)}},Ox=(t,n)=>{let r=t;const s=n.split(Jc),i=s.length;for(let c=0;c<i;c++){const u=s[c];let f=r.nextPart.get(u);f||(f=Tx(),r.nextPart.set(u,f)),r=f}return r},zA=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,LA=t=>{if(t<1)return{get:()=>{},set:()=>{}};let n=0,r=Object.create(null),s=Object.create(null);const i=(c,u)=>{r[c]=u,n++,n>t&&(n=0,s=r,r=Object.create(null))};return{get(c){let u=r[c];if(u!==void 0)return u;if((u=s[c])!==void 0)return i(c,u),u},set(c,u){c in r?r[c]=u:i(c,u)}}},Im="!",Ab=":",UA=[],Rb=(t,n,r,s,i)=>({modifiers:t,hasImportantModifier:n,baseClassName:r,maybePostfixModifierPosition:s,isExternal:i}),BA=t=>{const{prefix:n,experimentalParseClassName:r}=t;let s=i=>{const c=[];let u=0,f=0,g=0,h;const v=i.length;for(let S=0;S<v;S++){const C=i[S];if(u===0&&f===0){if(C===Ab){c.push(i.slice(g,S)),g=S+1;continue}if(C==="/"){h=S;continue}}C==="["?u++:C==="]"?u--:C==="("?f++:C===")"&&f--}const y=c.length===0?i:i.slice(g);let w=y,N=!1;y.endsWith(ILine truncated
|
|
||||||
`).forEach(function(u){i=u.indexOf(":"),r=u.substring(0,i).trim().toLowerCase(),s=u.substring(i+1).trim(),!(!r||n[r]&&wT[r])&&(r==="set-cookie"?n[r]?n[r].push(s):n[r]=[s]:n[r]=n[r]?n[r]+", "+s:s)}),n},Lb=Symbol("internals");function qi(t){return t&&String(t).trim().toLowerCase()}function Yc(t){return t===!1||t==null?t:W.isArray(t)?t.map(Yc):String(t)}function ET(t){const n=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=r.exec(t);)n[s[1]]=s[2];return n}const _T=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function ym(t,n,r,s,i){if(W.isFunction(s))return s.call(this,n,r);if(i&&(n=r),!!W.isString(n)){if(W.isString(s))return n.indexOf(s)!==-1;if(W.isRegExp(s))return s.test(n)}}function CT(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(n,r,s)=>r.toUpperCase()+s)}function NT(t,n){const r=W.toCamelCase(" "+n);["get","set","has"].forEach(s=>{Object.defineProperty(t,s+r,{value:function(i,c,u){return this[s].call(this,n,i,c,u)},configurable:!0})})}let Tn=class{constructor(n){n&&this.set(n)}set(n,r,s){const i=this;function c(f,g,h){const v=qi(g);if(!v)throw new Error("header name must be a non-empty string");const y=W.findKey(i,v);(!y||i[y]===void 0||h===!0||h===void 0&&i[y]!==!1)&&(i[y||g]=Yc(f))}const u=(f,g)=>W.forEach(f,(h,v)=>c(h,v,g));if(W.isPlainObject(n)||n instanceof this.constructor)u(n,r);else if(W.isString(n)&&(n=n.trim())&&!_T(n))u(ST(n),r);else if(W.isObject(n)&&W.isIterable(n)){let f={},g,h;for(const v of n){if(!W.isArray(v))throw TypeError("Object iterator must return a key-value pair");f[h=v[0]]=(g=f[h])?W.isArray(g)?[...g,v[1]]:[g,v[1]]:v[1]}u(f,r)}else n!=null&&c(r,n,s);return this}get(n,r){if(n=qi(n),n){const s=W.findKey(this,n);if(s){const i=this[s];if(!r)return i;if(r===!0)return ET(i);if(W.isFunction(r))return r.call(this,i,s);if(W.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,r){if(n=qi(n),n){const s=W.findKey(this,n);return!!(s&&this[s]!==void 0&&(!r||ym(this,this[s],s,r)))}return!1}delete(n,r){const s=this;let i=!1;function c(u){if(u=qi(u),u){const f=W.findKey(s,u);f&&(!r||ym(s,s[f],f,r))&&(delete s[f],i=!0)}}return W.isArray(n)?n.forEach(c):c(n),i}clear(n){const r=Object.keys(this);let s=r.length,i=!1;for(;s--;){const c=r[s];(!n||ym(this,this[c],c,n,!0))&&(delete this[c],i=!0)}return i}normalize(n){const r=this,s={};return W.forEach(this,(i,c)=>{const u=W.findKey(s,c);if(u){r[u]=Yc(i),delete r[c];return}const f=n?CT(c):String(c).trim();f!==c&&delete r[c],r[f]=Yc(i),s[f]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const r=Object.create(null);return W.forEach(this,(s,i)=>{s!=null&&s!==!1&&(r[i]=n&&W.isArray(s)?s.join(", "):s)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,r])=>n+": "+r).join(`
|
|
||||||
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...r){const s=new this(n);return r.forEach(i=>s.set(i)),s}static accessor(n){const s=(this[Lb]=this[Lb]={accessors:{}}).accessors,i=this.prototype;function c(u){const f=qi(u);s[f]||(NT(i,u),s[f]=!0)}return W.isArray(n)?n.forEach(c):c(n),this}};Tn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);W.reduceDescriptors(Tn.prototype,({value:t},n)=>{let r=n[0].toUpperCase()+n.slice(1);return{get:()=>t,set(s){this[r]=s}}});W.freezeMethods(Tn);function vm(t,n){const r=this||fl,s=n||r,i=Tn.from(s.headers);let c=s.data;return W.forEach(t,function(f){c=f.call(r,c,i.normalize(),n?n.status:void 0)}),i.normalize(),c}function r1(t){return!!(t&&t.__CANCEL__)}function $o(t,n,r){$e.call(this,t??"canceled",$e.ERR_CANCELED,n,r),this.name="CanceledError"}W.inherits($o,$e,{__CANCEL__:!0});function s1(t,n,r){const s=r.config.validateStatus;!r.status||!s||s(r.status)?t(r):n(new $e("Request failed with status code "+r.status,[$e.ERR_BAD_REQUEST,$e.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function AT(t){const n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return n&&n[1]||""}function RT(t,n){t=t||10;const r=new Array(t),s=new Array(t);let i=0,c=0,u;return n=n!==void 0?n:1e3,function(g){const h=Date.now(),v=s[c];u||(u=h),r[i]=g,s[i]=h;let y=c,w=0;for(;y!==i;)w+=r[y++],y=y%t;if(i=(i+1)%t,i===c&&(c=(c+1)%t),h-u<n)return;const N=v&&h-v;return N?Math.round(w*1e3/N):void 0}}function TT(t,n){let r=0,s=1e3/n,i,c;const u=(h,v=Date.now())=>{r=v,i=null,c&&(clearTimeout(c),c=null),t(...h)};return[(...h)=>{const v=Date.now(),y=v-r;y>=s?u(h,v):(i=h,c||(c=setTimeout(()=>{c=null,u(i)},s-y)))},()=>i&&u(i)]}const eu=(t,n,r=3)=>{let s=0;const i=RT(50,250);return TT(c=>{const u=c.loaded,f=c.lengthComputable?c.total:void 0,g=u-s,h=i(g),v=u<=f;s=u;const y={loaded:u,total:f,progress:f?u/f:void 0,bytes:g,rate:h||void 0,estimated:h&&f&&v?(f-u)/h:void 0,event:c,lengthComputable:f!=null,[n?"download":"upload"]:!0};t(y)},r)},Ub=(t,n)=>{const r=t!=null;return[s=>n[0]({lengthComputable:r,total:t,loaded:s}),n[1]]},Bb=t=>(...n)=>W.asap(()=>t(...n)),jT=un.hasStandardBrowserEnv?((t,n)=>r=>(r=new URL(r,un.origin),t.protocol===r.protocol&&t.host===r.host&&(n||t.port===r.port)))(new URL(un.origin),un.navigator&&/(msie|trident)/i.test(un.navigator.userAgent)):()=>!0,OT=un.hasStandardBrowserEnv?{write(t,n,r,s,i,c,u){if(typeof document>"u")return;const f=[`${t}=${encodeURIComponent(n)}`];W.isNumber(r)&&f.push(`expires=${new Date(r).toUTCString()}`),W.isString(s)&&f.push(`path=${s}`),W.isString(i)&&f.push(`domain=${i}`),c===!0&&f.push("secure"),W.isString(u)&&f.push(`SameSite=${u}`),document.cookie=f.join("; ")},read(t){if(typeof document>"u")return null;const n=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return n?decodeURIComponent(n[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function kT(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function MT(t,n){return n?t.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):t}function o1(t,n,r){let s=!kT(n);return t&&(s||r==!1)?MT(t,n):n}const Pb=t=>t instanceof Tn?{...t}:t;function bs(t,n){n=n||{};const r={};function s(h,v,y,w){return W.isPlainObject(h)&&W.isPlainObject(v)?W.merge.call({caseless:w},h,v):W.isPlainObject(v)?W.merge({},v):W.isArray(v)?v.slice():v}function i(h,v,y,w){if(W.isUndefined(v)){if(!W.isUndefined(h))return s(void 0,h,y,w)}else return s(h,v,y,w)}function c(h,v){if(!W.isUndefined(v))return s(void 0,v)}function u(h,v){if(W.isUndefined(v)){if(!W.isUndefined(h))return s(void 0,h)}else return s(void 0,v)}function f(h,v,y){if(y in n)return s(h,v);if(y in t)return s(void 0,h)}const g={url:c,method:c,data:c,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:f,headers:(h,v,y)=>i(Pb(h),Pb(v),y,!0)};return W.forEach(Object.keys({...t,...n}),function(v){const y=g[v]||i,w=y(t[v],n[v],v);W.isUndefined(w)&&y!==f||(r[v]=w)}),r}const i1=t=>{const n=bs({},t);let{data:r,withXSRFToken:s,xsrfHeaderName:i,xsrfCookieName:c,headers:u,auth:f}=n;if(n.headers=u=Tn.from(u),n.url=t1(o1(n.baseURL,n.url,n.allowAbsoluteUrls),t.params,t.paramsSerializer),f&&u.set("Authorization","Basic "+btoa((f.username||"")+":"+(f.password?unescape(encodeURIComponent(f.password)):""))),W.isFormData(r)){if(un.hasStandardBrowserEnv||un.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if(W.isFunction(r.getHeaders)){const g=r.getHeaders(),h=["content-type","content-length"];Object.entries(g).forEach(([v,y])=>{h.inclu
Line truncated
|
|
||||||
`+u.map($b).join(`
|
|
||||||
`):" "+$b(u[0]):"as no adapter specified";throw new $e("There is no suitable adapter to dispatch the request "+f,"ERR_NOT_SUPPORT")}return i}const c1={getAdapter:FT,adapters:Rh};function bm(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new $o(null,t)}function Gb(t){return bm(t),t.headers=Tn.from(t.headers),t.data=vm.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),c1.getAdapter(t.adapter||fl.adapter,t)(t).then(function(s){return bm(t),s.data=vm.call(t,t.transformResponse,s),s.headers=Tn.from(s.headers),s},function(s){return r1(s)||(bm(t),s&&s.response&&(s.response.data=vm.call(t,t.transformResponse,s.response),s.response.headers=Tn.from(s.response.headers))),Promise.reject(s)})}const u1="1.13.2",Ou={};["object","boolean","number","function","string","symbol"].forEach((t,n)=>{Ou[t]=function(s){return typeof s===t||"a"+(n<1?"n ":" ")+t}});const Yb={};Ou.transitional=function(n,r,s){function i(c,u){return"[Axios v"+u1+"] Transitional option '"+c+"'"+u+(s?". "+s:"")}return(c,u,f)=>{if(n===!1)throw new $e(i(u," has been removed"+(r?" in "+r:"")),$e.ERR_DEPRECATED);return r&&!Yb[u]&&(Yb[u]=!0,console.warn(i(u," has been deprecated since v"+r+" and will be removed in the near future"))),n?n(c,u,f):!0}};Ou.spelling=function(n){return(r,s)=>(console.warn(`${s} is likely a misspelling of ${n}`),!0)};function $T(t,n,r){if(typeof t!="object")throw new $e("options must be an object",$e.ERR_BAD_OPTION_VALUE);const s=Object.keys(t);let i=s.length;for(;i-- >0;){const c=s[i],u=n[c];if(u){const f=t[c],g=f===void 0||u(f,c,t);if(g!==!0)throw new $e("option "+c+" must be "+g,$e.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new $e("Unknown option "+c,$e.ERR_BAD_OPTION)}}const Zc={assertOptions:$T,validators:Ou},_a=Zc.validators;let vs=class{constructor(n){this.defaults=n||{},this.interceptors={request:new zb,response:new zb}}async request(n,r){try{return await this._request(n,r)}catch(s){if(s instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const c=i.stack?i.stack.replace(/^.+\n/,""):"";try{s.stack?c&&!String(s.stack).endsWith(c.replace(/^.+\n.+\n/,""))&&(s.stack+=`
|
|
||||||
`+c):s.stack=c}catch{}}throw s}}_request(n,r){typeof n=="string"?(r=r||{},r.url=n):r=n||{},r=bs(this.defaults,r);const{transitional:s,paramsSerializer:i,headers:c}=r;s!==void 0&&Zc.assertOptions(s,{silentJSONParsing:_a.transitional(_a.boolean),forcedJSONParsing:_a.transitional(_a.boolean),clarifyTimeoutError:_a.transitional(_a.boolean)},!1),i!=null&&(W.isFunction(i)?r.paramsSerializer={serialize:i}:Zc.assertOptions(i,{encode:_a.function,serialize:_a.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Zc.assertOptions(r,{baseUrl:_a.spelling("baseURL"),withXsrfToken:_a.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let u=c&&W.merge(c.common,c[r.method]);c&&W.forEach(["delete","get","head","post","put","patch","common"],E=>{delete c[E]}),r.headers=Tn.concat(u,c);const f=[];let g=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(r)===!1||(g=g&&S.synchronous,f.unshift(S.fulfilled,S.rejected))});const h=[];this.interceptors.response.forEach(function(S){h.push(S.fulfilled,S.rejected)});let v,y=0,w;if(!g){const E=[Gb.bind(this),void 0];for(E.unshift(...f),E.push(...h),w=E.length,v=Promise.resolve(r);y<w;)v=v.then(E[y++],E[y++]);return v}w=f.length;let N=r;for(;y<w;){const E=f[y++],S=f[y++];try{N=E(N)}catch(C){S.call(this,C);break}}try{v=Gb.call(this,N)}catch(E){return Promise.reject(E)}for(y=0,w=h.length;y<w;)v=v.then(h[y++],h[y++]);return v}getUri(n){n=bs(this.defaults,n);const r=o1(n.baseURL,n.url,n.allowAbsoluteUrls);return t1(r,n.params,n.paramsSerializer)}};W.forEach(["delete","get","head","options"],function(n){vs.prototype[n]=function(r,s){return this.request(bs(s||{},{method:n,url:r,data:(s||{}).data}))}});W.forEach(["post","put","patch"],function(n){function r(s){return function(c,u,f){return this.request(bs(f||{},{method:n,headers:s?{"Content-Type":"multipart/form-data"}:{},url:c,data:u}))}}vs.prototype[n]=r(),vs.prototype[n+"Form"]=r(!0)});let GT=class d1{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(c){r=c});const s=this;this.promise.then(i=>{if(!s._listeners)return;let c=s._listeners.length;for(;c-- >0;)s._listeners[c](i);s._listeners=null}),this.promise.then=i=>{let c;const u=new Promise(f=>{s.subscribe(f),c=f}).then(i);return u.cancel=function(){s.unsubscribe(c)},u},n(function(c,u,f){s.reason||(s.reason=new $o(c,u,f),r(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const r=this._listeners.indexOf(n);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const n=new AbortController,r=s=>{n.abort(s)};return this.subscribe(r),n.signal.unsubscribe=()=>this.unsubscribe(r),n.signal}static source(){let n;return{token:new d1(function(i){n=i}),cancel:n}}};function YT(t){return function(r){return t.apply(null,r)}}function ZT(t){return W.isObject(t)&&t.isAxiosError===!0}const Zm={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Zm).forEach(([t,n])=>{Zm[n]=t});function f1(t){const n=new vs(t),r=qx(vs.prototype.request,n);return W.extend(r,vs.prototype,n,{allOwnKeys:!0}),W.extend(r,n,null,{allOwnKeys:!0}),r.create=function(i){return f1(bs(t,i))},r}const zt=f1(fl);zt.Axios=vs;zt.CanceledError=$o;zt.CancelToken=GT;zt.isCancel=r1;zt.VERSION=u1;zt.toFormData=ju;zt.AxiosError=$e;zt.Cancel=zt.CanceledError;zt.all=function(n){return Promise.all(n)};zt.spread=YT;zt.isAxiosError=ZT;zt.mergeConfig=bs;zt.AxiosH
Line truncated
|
|
||||||
* @license lucide-react v0.522.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const Ej=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),_j=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,r,s)=>s?s.toUpperCase():r.toLowerCase()),Kb=t=>{const n=_j(t);return n.charAt(0).toUpperCase()+n.slice(1)},y1=(...t)=>t.filter((n,r,s)=>!!n&&n.trim()!==""&&s.indexOf(n)===r).join(" ").trim(),Cj=t=>{for(const n in t)if(n.startsWith("aria-")||n==="role"||n==="title")return!0};/**
|
|
||||||
* @license lucide-react v0.522.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/var Nj={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
||||||
* @license lucide-react v0.522.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const Aj=b.forwardRef(({color:t="currentColor",size:n=24,strokeWidth:r=2,absoluteStrokeWidth:s,className:i="",children:c,iconNode:u,...f},g)=>b.createElement("svg",{ref:g,...Nj,width:n,height:n,stroke:t,strokeWidth:s?Number(r)*24/Number(n):r,className:y1("lucide",i),...!c&&!Cj(f)&&{"aria-hidden":"true"},...f},[...u.map(([h,v])=>b.createElement(h,v)),...Array.isArray(c)?c:[c]]));/**
|
|
||||||
* @license lucide-react v0.522.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const Rj=(t,n)=>{const r=b.forwardRef(({className:s,...i},c)=>b.createElement(Aj,{ref:c,iconNode:n,className:y1(`lucide-${Ej(Kb(t))}`,`lucide-${t}`,s),...i}));return r.displayName=Kb(t),r};/**
|
|
||||||
* @license lucide-react v0.522.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const Tj=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],jj=Rj("x",Tj),Qb=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Wb=Eh,Oh=(t,n)=>r=>{var s;if((n==null?void 0:n.variants)==null)return Wb(t,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:c}=n,u=Object.keys(i).map(h=>{const v=r==null?void 0:r[h],y=c==null?void 0:c[h];if(v===null)return null;const w=Qb(v)||Qb(y);return i[h][w]}),f=r&&Object.entries(r).reduce((h,v)=>{let[y,w]=v;return w===void 0||(h[y]=w),h},{}),g=n==null||(s=n.compoundVariants)===null||s===void 0?void 0:s.reduce((h,v)=>{let{class:y,className:w,...N}=v;return Object.entries(N).every(E=>{let[S,C]=E;return Array.isArray(C)?C.includes({...c,...f}[S]):{...c,...f}[S]===C})?[...h,y,w]:h},[]);return Wb(t,u,g,r==null?void 0:r.class,r==null?void 0:r.className)};function rr(t){const n=b.useRef(t);return b.useEffect(()=>{n.current=t}),b.useMemo(()=>(...r)=>{var s;return(s=n.current)==null?void 0:s.call(n,...r)},[])}function Oj(t,n=globalThis==null?void 0:globalThis.document){const r=rr(t);b.useEffect(()=>{const s=i=>{i.key==="Escape"&&r(i)};return n.addEventListener("keydown",s,{capture:!0}),()=>n.removeEventListener("keydown",s,{capture:!0})},[r,n])}var kj="DismissableLayer",Xm="dismissableLayer.update",Mj="dismissableLayer.pointerDownOutside",Dj="dismissableLayer.focusOutside",Jb,v1=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ku=b.forwardRef((t,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:c,onInteractOutside:u,onDismiss:f,...g}=t,h=b.useContext(v1),[v,y]=b.useState(null),w=(v==null?void 0:v.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,N]=b.useState({}),E=Zt(n,U=>y(U)),S=Array.from(h.layers),[C]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),A=S.indexOf(C),O=v?S.indexOf(v):-1,R=h.layersWithOutsidePointerEventsDisabled.size>0,L=O>=A,I=Uj(U=>{const Q=U.target,le=[...h.branches].some(ue=>ue.contains(Q));!L||le||(i==null||i(U),u==null||u(U),U.defaultPrevented||f==null||f())},w),ee=Bj(U=>{const Q=U.target;[...h.branches].some(ue=>ue.contains(Q))||(c==null||c(U),u==null||u(U),U.defaultPrevented||f==null||f())},w);return Oj(U=>{O===h.layers.size-1&&(s==null||s(U),!U.defaultPrevented&&f&&(U.preventDefault(),f()))},w),b.useEffect(()=>{if(v)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(Jb=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(v)),h.layers.add(v),e0(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(w.body.style.pointerEvents=Jb)}},[v,w,r,h]),b.useEffect(()=>()=>{v&&(h.layers.delete(v),h.layersWithOutsidePointerEventsDisabled.delete(v),e0())},[v,h]),b.useEffect(()=>{const U=()=>N({});return document.addEventListener(Xm,U),()=>document.removeEventListener(Xm,U)},[]),p.jsx(jt.div,{...g,ref:E,style:{pointerEvents:R?L?"auto":"none":void 0,...t.style},onFocusCapture:Ve(t.onFocusCapture,ee.onFocusCapture),onBlurCapture:Ve(t.onBlurCapture,ee.onBlurCapture),onPointerDownCapture:Ve(t.onPointerDownCapture,I.onPointerDownCapture)})});ku.displayName=kj;var zj="DismissableLayerBranch",Lj=b.forwardRef((t,n)=>{const r=b.useContext(v1),s=b.useRef(null),i=Zt(n,s);return b.useEffect(()=>{const c=s.current;if(c)return r.branches.add(c),()=>{r.branches.delete(c)}},[r.branches]),p.jsx(jt.div,{...t,ref:i})});Lj.displayName=zj;function Uj(t,n=globalThis==null?void 0:globalThis.document){const r=rr(t),s=b.useRef(!1),i=b.useRef(()=>{});return b.useEffect(()=>{const c=f=>{if(f.target&&!s.current){let g=function(){b1(Mj,r,h,{discrete:!0})};const h={originalEvent:f};f.pointerType==="touch"?(n.removeEventListener("click",i.current),i.current=g,n.addEventListener("click",i.current,{once:!0})):g()}else n.removeEventListener("click",i.current);s.current=!1},u=window.setTimeout(()=>{n.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(u),n.removeEventListener("pointerdown",c),n.removeEventListener("click",i.current)}},[n,r]),{onPointerDownCapture:()=>s.current=!0}}function Bj(t,n=globalThis==null?void 0:globalThis.document){const r=rr(t),s=b.useRef(!1);return b.useEffect(()=>{const i=c=>{c.target&&!s.current&&b1(Dj,r,{originalEvent:c},{discrete:!1})};return n.addEventListener("focusin",i),()=>n.removeEventListener("focusin",i)},[n,r]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function e0(){const t=new CustomEvent(Xm);document.dispatchEvent(t)}function b1(t,n,r,{discrete:s}){const i=r.originalEvent.target,c=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});n&&i.addEventListener(t,n,{once:!0}),s?p1(i,c):i.dispatchEvent(c)}var xm="focusScope.autoFocusOnMount",wm="focusScope.autoFocusOnUnmount",t0={bubbles:!1,cancelable:!0},Pj="FocusScope",Mu=b.forwardRef((t,n)=>{const{loop:r=!1,trapped:s=!1,onMountAutoFocus:i,onUnmountAutoFocus:c,...u}=t,[f,g]=b.useState(null),h=rr(i),v=rr(c),y=b.useRef(null),w=Zt(n,S=>Line truncated
|
|
||||||
.`.concat(Zj,` {
|
|
||||||
overflow: hidden `).concat(s,`;
|
|
||||||
padding-right: `).concat(f,"px ").concat(s,`;
|
|
||||||
}
|
|
||||||
body[`).concat(No,`] {
|
|
||||||
overflow: hidden `).concat(s,`;
|
|
||||||
overscroll-behavior: contain;
|
|
||||||
`).concat([n&&"position: relative ".concat(s,";"),r==="margin"&&`
|
|
||||||
padding-left: `.concat(i,`px;
|
|
||||||
padding-top: `).concat(c,`px;
|
|
||||||
padding-right: `).concat(u,`px;
|
|
||||||
margin-left:0;
|
|
||||||
margin-top:0;
|
|
||||||
margin-right: `).concat(f,"px ").concat(s,`;
|
|
||||||
`),r==="padding"&&"padding-right: ".concat(f,"px ").concat(s,";")].filter(Boolean).join(""),`
|
|
||||||
}
|
|
||||||
|
|
||||||
.`).concat(Xc,` {
|
|
||||||
right: `).concat(f,"px ").concat(s,`;
|
|
||||||
}
|
|
||||||
|
|
||||||
.`).concat(Kc,` {
|
|
||||||
margin-right: `).concat(f,"px ").concat(s,`;
|
|
||||||
}
|
|
||||||
|
|
||||||
.`).concat(Xc," .").concat(Xc,` {
|
|
||||||
right: 0 `).concat(s,`;
|
|
||||||
}
|
|
||||||
|
|
||||||
.`).concat(Kc," .").concat(Kc,` {
|
|
||||||
margin-right: 0 `).concat(s,`;
|
|
||||||
}
|
|
||||||
|
|
||||||
body[`).concat(No,`] {
|
|
||||||
`).concat(Xj,": ").concat(f,`px;
|
|
||||||
}
|
|
||||||
`)},i0=function(){var t=parseInt(document.body.getAttribute(No)||"0",10);return isFinite(t)?t:0},hO=function(){b.useEffect(function(){return document.body.setAttribute(No,(i0()+1).toString()),function(){var t=i0()-1;t<=0?document.body.removeAttribute(No):document.body.setAttribute(No,t.toString())}},[])},pO=function(t){var n=t.noRelative,r=t.noImportant,s=t.gapMode,i=s===void 0?"margin":s;hO();var c=b.useMemo(function(){return dO(i)},[i]);return b.createElement(fO,{styles:mO(c,!n,i,r?"":"!important")})},Km=!1;if(typeof window<"u")try{var Lc=Object.defineProperty({},"passive",{get:function(){return Km=!0,!0}});window.addEventListener("test",Lc,Lc),window.removeEventListener("test",Lc,Lc)}catch{Km=!1}var go=Km?{passive:!1}:!1,gO=function(t){return t.tagName==="TEXTAREA"},C1=function(t,n){if(!(t instanceof Element))return!1;var r=window.getComputedStyle(t);return r[n]!=="hidden"&&!(r.overflowY===r.overflowX&&!gO(t)&&r[n]==="visible")},yO=function(t){return C1(t,"overflowY")},vO=function(t){return C1(t,"overflowX")},l0=function(t,n){var r=n.ownerDocument,s=n;do{typeof ShadowRoot<"u"&&s instanceof ShadowRoot&&(s=s.host);var i=N1(t,s);if(i){var c=A1(t,s),u=c[1],f=c[2];if(u>f)return!0}s=s.parentNode}while(s&&s!==r.body);return!1},bO=function(t){var n=t.scrollTop,r=t.scrollHeight,s=t.clientHeight;return[n,r,s]},xO=function(t){var n=t.scrollLeft,r=t.scrollWidth,s=t.clientWidth;return[n,r,s]},N1=function(t,n){return t==="v"?yO(n):vO(n)},A1=function(t,n){return t==="v"?bO(n):xO(n)},wO=function(t,n){return t==="h"&&n==="rtl"?-1:1},SO=function(t,n,r,s,i){var c=wO(t,window.getComputedStyle(n).direction),u=c*s,f=r.target,g=n.contains(f),h=!1,v=u>0,y=0,w=0;do{if(!f)break;var N=A1(t,f),E=N[0],S=N[1],C=N[2],A=S-C-c*E;(E||A)&&N1(t,f)&&(y+=A,w+=E);var O=f.parentNode;f=O&&O.nodeType===Node.DOCUMENT_FRAGMENT_NODE?O.host:O}while(!g&&f!==document.body||g&&(n.contains(f)||n===f));return(v&&Math.abs(y)<1||!v&&Math.abs(w)<1)&&(h=!0),h},Uc=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},c0=function(t){return[t.deltaX,t.deltaY]},u0=function(t){return t&&"current"in t?t.current:t},EO=function(t,n){return t[0]===n[0]&&t[1]===n[1]},_O=function(t){return`
|
|
||||||
.block-interactivity-`.concat(t,` {pointer-events: none;}
|
|
||||||
.allow-interactivity-`).concat(t,` {pointer-events: all;}
|
|
||||||
`)},CO=0,yo=[];function NO(t){var n=b.useRef([]),r=b.useRef([0,0]),s=b.useRef(),i=b.useState(CO++)[0],c=b.useState(_1)[0],u=b.useRef(t);b.useEffect(function(){u.current=t},[t]),b.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var S=Yj([t.lockRef.current],(t.shards||[]).map(u0),!0).filter(Boolean);return S.forEach(function(C){return C.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),S.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var f=b.useCallback(function(S,C){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!u.current.allowPinchZoom;var A=Uc(S),O=r.current,R="deltaX"in S?S.deltaX:O[0]-A[0],L="deltaY"in S?S.deltaY:O[1]-A[1],I,ee=S.target,U=Math.abs(R)>Math.abs(L)?"h":"v";if("touches"in S&&U==="h"&&ee.type==="range")return!1;var Q=l0(U,ee);if(!Q)return!0;if(Q?I=U:(I=U==="v"?"h":"v",Q=l0(U,ee)),!Q)return!1;if(!s.current&&"changedTouches"in S&&(R||L)&&(s.current=I),!I)return!0;var le=s.current||I;return SO(le,C,S,le==="h"?R:L)},[]),g=b.useCallback(function(S){var C=S;if(!(!yo.length||yo[yo.length-1]!==c)){var A="deltaY"in C?c0(C):Uc(C),O=n.current.filter(function(I){return I.name===C.type&&(I.target===C.target||C.target===I.shadowParent)&&EO(I.delta,A)})[0];if(O&&O.should){C.cancelable&&C.preventDefault();return}if(!O){var R=(u.current.shards||[]).map(u0).filter(Boolean).filter(function(I){return I.contains(C.target)}),L=R.length>0?f(C,R[0]):!u.current.noIsolation;L&&C.cancelable&&C.preventDefault()}}},[]),h=b.useCallback(function(S,C,A,O){var R={name:S,delta:C,target:A,should:O,shadowParent:AO(A)};n.current.push(R),setTimeout(function(){n.current=n.current.filter(function(L){return L!==R})},1)},[]),v=b.useCallback(function(S){r.current=Uc(S),s.current=void 0},[]),y=b.useCallback(function(S){h(S.type,c0(S),S.target,f(S,t.lockRef.current))},[]),w=b.useCallback(function(S){h(S.type,Uc(S),S.target,f(S,t.lockRef.current))},[]);b.useEffect(function(){return yo.push(c),t.setCallbacks({onScrollCapture:y,onWheelCapture:y,onTouchMoveCapture:w}),document.addEventListener("wheel",g,go),document.addEventListener("touchmove",g,go),document.addEventListener("touchstart",v,go),function(){yo=yo.filter(function(S){return S!==c}),document.removeEventListener("wheel",g,go),document.removeEventListener("touchmove",g,go),document.removeEventListener("touchstart",v,go)}},[]);var N=t.removeScrollBar,E=t.inert;return b.createElement(b.Fragment,null,E?b.createElement(c,{styles:_O(i)}):null,N?b.createElement(pO,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function AO(t){for(var n=null;t!==null;)t instanceof ShadowRoot&&(n=t.host,t=t.host),t=t.parentNode;return n}const RO=nO(E1,NO);var Lu=b.forwardRef(function(t,n){return b.createElement(zu,Aa({},t,{ref:n,sideCar:RO}))});Lu.classNames=zu.classNames;var TO=function(t){if(typeof document>"u")return null;var n=Array.isArray(t)?t[0]:t;return n.ownerDocument.body},vo=new WeakMap,Bc=new WeakMap,Pc={},Nm=0,R1=function(t){return t&&(t.host||R1(t.parentNode))},jO=function(t,n){return n.map(function(r){if(t.contains(r))return r;var s=R1(r);return s&&t.contains(s)?s:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},OO=function(t,n,r,s){var i=jO(n,Array.isArray(t)?t:[t]);Pc[r]||(Pc[r]=new WeakMap);var c=Pc[r],u=[],f=new Set,g=new Set(i),h=function(y){!y||f.has(y)||(f.add(y),h(y.parentNode))};i.forEach(h);var v=function(y){!y||g.has(y)||Array.prototype.forEach.call(y.children,function(w){if(f.has(w))v(w);else try{var N=w.getAttribute(s),E=N!==null&&N!=="false",S=(vo.get(w)||0)+1,C=(c.get(w)||0)+1;vo.set(w,S),c.set(w,C),u.push(w),S===1&&E&&Bc.set(w,!0),C===1&&w.setAttribute(r,"true"),E||w.setAttribute(s,"true")}catch(A){console.error("aria-hidden: cannot operate on ",w,A)}})};return v(n),f.clear(),Nm++,function(){u.forEach(function(y){var w=vo.get(y)-1,N=c.get(y)-1;vo.set(y,w),c.set(y,N),w||(Bc.has(y)||y.removeAttribute(s),Bc.delete(y)),N||y.removeAttribute(r)}),Nm--,Nm||(vo=new WeakMap,vo=new WeakMap,Bc=new WeakMap,Pc={})}},Mh=function(t,n,r){r===void 0&&(r="data-aria-hidden");var s=Array.from(Array.isArray(t)?t:[t]),i=TO(t);return i?(s.push.apply(s,Array.from(i.querySelectorAll("[aria-live], script"))),OO(s,i,r,"aria-hidden")):function(){return null}};function kO(t){const n=MO(t),r=b.forwardRef((s,i)=>{const{children:c,...u}=s,f=b.Children.toArray(c),g=f.find(zO);if(g){const h=g.props.children,v=f.map(y=>y===g?b.Children.count(h)>1?b.Children.only(null):b.isValidElement(h)?h.props.children:null:y);return p.jsx(n,{...u,ref:i,children:b.isValidElement(h)?b.cloneElement(h,void 0,v):null})}return p.jsx(n,{...u,ref:i,children:c})});return r.displayName=`${t}.Slot`,r}function MO(t){const n=b.forwardRef((r,s)=>{const{children:i,...c}=r;if(b.isValidElement(i)){const u=UO(i),f=LO(c,i.props);return i.type!==b.
Line truncated
|
|
||||||
|
|
||||||
If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
||||||
|
|
||||||
For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return b.useEffect(()=>{t&&(document.getElementById(t)||console.error(r))},[r,t]),null},GO="DialogDescriptionWarning",YO=({contentRef:t,descriptionId:n})=>{const s=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${q1(GO).contentName}}.`;return b.useEffect(()=>{var c;const i=(c=t.current)==null?void 0:c.getAttribute("aria-describedby");n&&i&&(document.getElementById(n)||console.warn(s))},[s,t,n]),null},ZO=j1,XO=M1,F1=D1,$1=z1,KO=U1,QO=P1,WO=V1,JO=Symbol.for("react.lazy"),nu=_u[" use ".trim().toString()];function ek(t){return typeof t=="object"&&t!==null&&"then"in t}function G1(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===JO&&"_payload"in t&&ek(t._payload)}function Y1(t){const n=tk(t),r=b.forwardRef((s,i)=>{let{children:c,...u}=s;G1(c)&&typeof nu=="function"&&(c=nu(c._payload));const f=b.Children.toArray(c),g=f.find(ak);if(g){const h=g.props.children,v=f.map(y=>y===g?b.Children.count(h)>1?b.Children.only(null):b.isValidElement(h)?h.props.children:null:y);return p.jsx(n,{...u,ref:i,children:b.isValidElement(h)?b.cloneElement(h,void 0,v):null})}return p.jsx(n,{...u,ref:i,children:c})});return r.displayName=`${t}.Slot`,r}var Z1=Y1("Slot");function tk(t){const n=b.forwardRef((r,s)=>{let{children:i,...c}=r;if(G1(i)&&typeof nu=="function"&&(i=nu(i._payload)),b.isValidElement(i)){const u=sk(i),f=rk(c,i.props);return i.type!==b.Fragment&&(f.ref=s?lr(s,u):u),b.cloneElement(i,f)}return b.Children.count(i)>1?b.Children.only(null):null});return n.displayName=`${t}.SlotClone`,n}var nk=Symbol("radix.slottable");function ak(t){return b.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===nk}function rk(t,n){const r={...n};for(const s in n){const i=t[s],c=n[s];/^on[A-Z]/.test(s)?i&&c?r[s]=(...f)=>{const g=c(...f);return i(...f),g}:i&&(r[s]=i):s==="style"?r[s]={...i,...c}:s==="className"&&(r[s]=[i,c].filter(Boolean).join(" "))}return{...t,...r}}function sk(t){var s,i;let n=(s=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:s.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?t.ref:(n=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}function ok(t){const[n,r]=b.useState(void 0);return Ir(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const s=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const c=i[0];let u,f;if("borderBoxSize"in c){const g=c.borderBoxSize,h=Array.isArray(g)?g[0]:g;u=h.inlineSize,f=h.blockSize}else u=t.offsetWidth,f=t.offsetHeight;r({width:u,height:f})});return s.observe(t,{box:"border-box"}),()=>s.unobserve(t)}else r(void 0)},[t]),n}const ik=["top","right","bottom","left"],qr=Math.min,Bn=Math.max,au=Math.round,Hc=Math.floor,ja=t=>({x:t,y:t}),lk={left:"right",right:"left",bottom:"top",top:"bottom"},ck={start:"end",end:"start"};function Qm(t,n,r){return Bn(t,qr(n,r))}function sr(t,n){return typeof t=="function"?t(n):t}function or(t){return t.split("-")[0]}function Go(t){return t.split("-")[1]}function Uh(t){return t==="x"?"y":"x"}function Bh(t){return t==="y"?"height":"width"}const uk=new Set(["top","bottom"]);function Ta(t){return uk.has(or(t))?"y":"x"}function Ph(t){return Uh(Ta(t))}function dk(t,n,r){r===void 0&&(r=!1);const s=Go(t),i=Ph(t),c=Bh(i);let u=i==="x"?s===(r?"end":"start")?"right":"left":s==="start"?"bottom":"top";return n.reference[c]>n.floating[c]&&(u=ru(u)),[u,ru(u)]}function fk(t){const n=ru(t);return[Wm(t),n,Wm(n)]}function Wm(t){return t.replace(/start|end/g,n=>ck[n])}const d0=["left","right"],f0=["right","left"],mk=["top","bottom"],hk=["bottom","top"];function pk(t,n,r){switch(t){case"top":case"bottom":return r?n?f0:d0:n?d0:f0;case"left":case"right":return n?mk:hk;default:return[]}}function gk(t,n,r,s){const i=Go(t);let c=pk(or(t),r==="start",s);return i&&(c=c.map(u=>u+"-"+i),n&&(c=c.concat(c.map(Wm)))),c}function ru(t){return t.replace(/left|right|bottom|top/g,n=>lk[n])}function yk(t){return{top:0,right:0,bottom:0,left:0,...t}}function X1(t){return typeof t!="number"?yk(t):{top:t,right:t,bottom:t,left:t}}function su(t){const{x:n,y:r,width:s,height:i}=t;return{width:s,height:i,top:r,left:n,right:n+s,bottom:r+i,x:n,y:r}}function m0(t,n,r){let{reference:s,floating:i}=t;const c=Ta(n),u=Ph(n),f=Bh(u),g=or(n),h=c==="y",v=s.x+s.width/2-i.width/2,y=s.y+s.height/2-i.height/2,w=s[f]/2-i[f]/2;let N;switch(g){case"top":N={x:v,y:s.y-i.height};break;case"bottom":N={x:v,y:s.y+s.height};break;case"right":N={x:s.x+s.width,y};break;case"left":N={x:s.x-i.width,y};break;default:N={x:s.x,y:s.y}}switch(Go(n)){case"start":N[u]-=w*(r&&h?-1:1);break;case"end":N[u]+=w*(r&&h?-1:1);break}return N}const vk=async(t,n,r)=>{const{placement:s="bottom",strategy:i="absolute",middleware:c=[],platform:u}=r,f=c.filter(Boolean),g=await(u.isRTL==null?void 0:u.isRTL(n));let h=await u.getElementRects({reference:t,floating:n,st
Line truncated
|
|
||||||
[data-state=closed]
|
|
||||||
){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function zD(t,n){typeof t=="function"?t(n):t!=null&&(t.current=n)}function LD(...t){return n=>t.forEach(r=>zD(r,n))}function Yw(...t){return b.useCallback(LD(...t),t)}const E0=t=>{switch(t){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return t}};function jm(t,n){if(!t)return()=>{};const r=t.style.cssText;return Object.assign(t.style,n),()=>{t.style.cssText=r}}function UD(...t){return(...n)=>{for(const r of t)typeof r=="function"&&r(...n)}}const Om={DURATION:.5,EASE:[.32,.72,0,1]},BD=8,PD=26,HD=()=>()=>{};function VD(){const{direction:t,isOpen:n,shouldScaleBackground:r,setBackgroundColorOnScale:s,noBodyStyles:i}=$u(),c=ae.useRef(null),u=b.useMemo(()=>document.body.style.backgroundColor,[]);function f(){return(window.innerWidth-PD)/window.innerWidth}ae.useEffect(()=>{if(n&&r){c.current&&clearTimeout(c.current);const g=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!g)return;UD(s&&!i?jm(document.body,{background:"black"}):HD,jm(g,{transformOrigin:E0(t)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${Om.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Om.EASE.join(",")})`}));const h=jm(g,{borderRadius:`${BD}px`,overflow:"hidden",...E0(t)?{transform:`scale(${f()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${f()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{h(),c.current=window.setTimeout(()=>{u?document.body.style.background=u:document.body.style.removeProperty("background")},Om.DURATION*1e3)}}},[n,r,u])}const ID=ae.forwardRef(function({...t},n){const{overlayRef:r,snapPoints:s,onRelease:i,shouldFade:c,isOpen:u,modal:f,shouldAnimate:g}=$u(),h=Yw(n,r),v=s&&s.length>0;if(!f)return null;const y=ae.useCallback(w=>i(w),[i]);return ae.createElement(F1,{onMouseUp:y,ref:h,"data-vaul-overlay":"","data-vaul-snap-points":u&&v?"true":"false","data-vaul-snap-points-overlay":u&&c?"true":"false","data-vaul-animate":g!=null&&g.current?"true":"false",...t})});ID.displayName="Drawer.Overlay";const qD=ae.forwardRef(function({onPointerDownOutside:t,style:n,onOpenAutoFocus:r,...s},i){const{drawerRef:c,onPress:u,onRelease:f,onDrag:g,keyboardIsOpen:h,snapPointsOffset:v,activeSnapPointIndex:y,modal:w,isOpen:N,direction:E,snapPoints:S,container:C,handleOnly:A,shouldAnimate:O,autoFocus:R}=$u(),[L,I]=ae.useState(!1),ee=Yw(i,c),U=ae.useRef(null),Q=ae.useRef(null),le=ae.useRef(!1),ue=S&&S.length>0;VD();const me=(X,he,be=0)=>{if(le.current)return!0;const j=Math.abs(X.y),Z=Math.abs(X.x),P=Z>j,se=["bottom","right"].includes(he)?1:-1;if(he==="left"||he==="right"){if(!(X.x*se<0)&&Z>=0&&Z<=be)return P}else if(!(X.y*se<0)&&j>=0&&j<=be)return!P;return le.current=!0,!0};ae.useEffect(()=>{ue&&window.requestAnimationFrame(()=>{I(!0)})},[]);function re(X){U.current=null,le.current=!1,f(X)}return ae.createElement($1,{"data-vaul-drawer-direction":E,"data-vaul-drawer":"","data-vaul-delayed-snap-points":L?"true":"false","data-vaul-snap-points":N&&ue?"true":"false","data-vaul-custom-container":C?"true":"false","data-vaul-animate":O!=null&&O.current?"true":"false",...s,ref:ee,style:v&&v.length>0?{"--snap-point-height":`${v[y??0]}px`,...n}:n,onPointerDown:X=>{A||(s.onPointerDown==null||s.onPointerDown.call(s,X),U.current={x:X.pageX,y:X.pageY},u(X))},onOpenAutoFocus:X=>{r==null||r(X),R||X.preventDefault()},onPointerDownOutside:X=>{if
Line truncated
|
|
||||||
[data-input-otp] {
|
|
||||||
--nojs-bg: white !important;
|
|
||||||
--nojs-fg: black !important;
|
|
||||||
|
|
||||||
background-color: var(--nojs-bg) !important;
|
|
||||||
color: var(--nojs-fg) !important;
|
|
||||||
caret-color: var(--nojs-fg) !important;
|
|
||||||
letter-spacing: .25em !important;
|
|
||||||
text-align: center !important;
|
|
||||||
border: 1px solid var(--nojs-fg) !important;
|
|
||||||
border-radius: 4px !important;
|
|
||||||
width: 100% !important;
|
|
||||||
}
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
[data-input-otp] {
|
|
||||||
--nojs-bg: black !important;
|
|
||||||
--nojs-fg: white !important;
|
|
||||||
}
|
|
||||||
}`;function cz(t){const n=uz(t),r=b.forwardRef((s,i)=>{const{children:c,...u}=s,f=b.Children.toArray(c),g=f.find(fz);if(g){const h=g.props.children,v=f.map(y=>y===g?b.Children.count(h)>1?b.Children.only(null):b.isValidElement(h)?h.props.children:null:y);return p.jsx(n,{...u,ref:i,children:b.isValidElement(h)?b.cloneElement(h,void 0,v):null})}return p.jsx(n,{...u,ref:i,children:c})});return r.displayName=`${t}.Slot`,r}function uz(t){const n=b.forwardRef((r,s)=>{const{children:i,...c}=r;if(b.isValidElement(i)){const u=hz(i),f=mz(c,i.props);return i.type!==b.Fragment&&(f.ref=s?lr(s,u):u),b.cloneElement(i,f)}return b.Children.count(i)>1?b.Children.only(null):null});return n.displayName=`${t}.SlotClone`,n}var dz=Symbol("radix.slottable");function fz(t){return b.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===dz}function mz(t,n){const r={...n};for(const s in n){const i=t[s],c=n[s];/^on[A-Z]/.test(s)?i&&c?r[s]=(...f)=>{const g=c(...f);return i(...f),g}:i&&(r[s]=i):s==="style"?r[s]={...i,...c}:s==="className"&&(r[s]=[i,c].filter(Boolean).join(" "))}return{...t,...r}}function hz(t){var s,i;let n=(s=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:s.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?t.ref:(n=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var mS="Popover",[hS]=_s(mS,[Iu]),Zu=Iu(),[tL,Zr]=hS(mS),pS="PopoverAnchor",pz=b.forwardRef((t,n)=>{const{__scopePopover:r,...s}=t,i=Zr(pS,r),c=Zu(r),{onCustomAnchorAdd:u,onCustomAnchorRemove:f}=i;return b.useEffect(()=>(u(),()=>f()),[u,f]),p.jsx($h,{...c,...s,ref:n})});pz.displayName=pS;var gS="PopoverTrigger",gz=b.forwardRef((t,n)=>{const{__scopePopover:r,...s}=t,i=Zr(gS,r),c=Zu(r),u=Zt(n,i.triggerRef),f=p.jsx(jt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":wS(i.open),...s,ref:u,onClick:Ve(t.onClick,i.onOpenToggle)});return i.hasCustomAnchor?f:p.jsx($h,{asChild:!0,...c,children:f})});gz.displayName=gS;var sp="PopoverPortal",[yz,vz]=hS(sp,{forceMount:void 0}),yS=t=>{const{__scopePopover:n,forceMount:r,children:s,container:i}=t,c=Zr(sp,n);return p.jsx(yz,{scope:n,forceMount:r,children:p.jsx(Ma,{present:r||c.open,children:p.jsx(Du,{asChild:!0,container:i,children:s})})})};yS.displayName=sp;var ko="PopoverContent",vS=b.forwardRef((t,n)=>{const r=vz(ko,t.__scopePopover),{forceMount:s=r.forceMount,...i}=t,c=Zr(ko,t.__scopePopover);return p.jsx(Ma,{present:s||c.open,children:c.modal?p.jsx(xz,{...i,ref:n}):p.jsx(wz,{...i,ref:n})})});vS.displayName=ko;var bz=cz("PopoverContent.RemoveScroll"),xz=b.forwardRef((t,n)=>{const r=Zr(ko,t.__scopePopover),s=b.useRef(null),i=Zt(n,s),c=b.useRef(!1);return b.useEffect(()=>{const u=s.current;if(u)return Mh(u)},[]),p.jsx(Lu,{as:bz,allowPinchZoom:!0,children:p.jsx(bS,{...t,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ve(t.onCloseAutoFocus,u=>{var f;u.preventDefault(),c.current||(f=r.triggerRef.current)==null||f.focus()}),onPointerDownOutside:Ve(t.onPointerDownOutside,u=>{const f=u.detail.originalEvent,g=f.button===0&&f.ctrlKey===!0,h=f.button===2||g;c.current=h},{checkForDefaultPrevented:!1}),onFocusOutside:Ve(t.onFocusOutside,u=>u.preventDefault(),{checkForDefaultPrevented:!1})})})}),wz=b.forwardRef((t,n)=>{const r=Zr(ko,t.__scopePopover),s=b.useRef(!1),i=b.useRef(!1);return p.jsx(bS,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{var u,f;(u=t.onCloseAutoFocus)==null||u.call(t,c),c.defaultPrevented||(s.current||(f=r.triggerRef.current)==null||f.focus(),c.preventDefault()),s.current=!1,i.current=!1},onInteractOutside:c=>{var g,h;(g=t.onInteractOutside)==null||g.call(t,c),c.defaultPrevented||(s.current=!0,c.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const u=c.target;((h=r.triggerRef.current)==null?void 0:h.contains(u))&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&i.current&&c.preventDefault()}})}),bS=b.forwardRef((t,n)=>{const{__scopePopover:r,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:c,disableOutsidePointerEvents:u,onEscapeKeyDown:f,onPointerDownOutside:g,onFocusOutside:h,onInteractOutside:v,...y}=t,w=Zr(ko,r),N=Zu(r);return kh(),p.jsx(Mu,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:i,onUnmountAutoFocus:c,children:p.jsx(ku,{asChild:!0,disableOutsidePointerEvents:u,onInteractOutside:v,onEscapeKeyDown:f,onPointerDownOutside:g,onFocusOutside:h,onDismiss:()=>w.onOpenChange(!1),children:p.jsx(gw,{"data-state":wS(w.open),role:"dialog",id:w.contentId,...N,...y,ref:n,style:{...y.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popp
Line truncated
|
|
||||||
-350
@@ -1,350 +0,0 @@
|
|||||||
var EC=Object.defineProperty;var _C=(t,n,r)=>n in t?EC(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r;var cb=(t,n,r)=>_C(t,typeof n!="symbol"?n+"":n,r);function CC(t,n){for(var r=0;r<n.length;r++){const s=n[r];if(typeof s!="string"&&!Array.isArray(s)){for(const i in s)if(i!=="default"&&!(i in t)){const c=Object.getOwnPropertyDescriptor(s,i);c&&Object.defineProperty(t,i,c.get?c:{enumerable:!0,get:()=>s[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const c of i)if(c.type==="childList")for(const u of c.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&s(u)}).observe(document,{childList:!0,subtree:!0});function r(i){const c={};return i.integrity&&(c.integrity=i.integrity),i.referrerPolicy&&(c.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?c.credentials="include":i.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function s(i){if(i.ep)return;i.ep=!0;const c=r(i);fetch(i.href,c)}})();function v0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var um={exports:{}},Hi={};/**
|
|
||||||
* @license React
|
|
||||||
* react-jsx-runtime.production.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/var ub;function NC(){if(ub)return Hi;ub=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function r(s,i,c){var u=null;if(c!==void 0&&(u=""+c),i.key!==void 0&&(u=""+i.key),"key"in i){c={};for(var f in i)f!=="key"&&(c[f]=i[f])}else c=i;return i=c.ref,{$$typeof:t,type:s,key:u,ref:i!==void 0?i:null,props:c}}return Hi.Fragment=n,Hi.jsx=r,Hi.jsxs=r,Hi}var db;function RC(){return db||(db=1,um.exports=NC()),um.exports}var h=RC(),dm={exports:{}},Ve={};/**
|
|
||||||
* @license React
|
|
||||||
* react.production.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/var fb;function AC(){if(fb)return Ve;fb=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),w=Symbol.iterator;function C(j){return j===null||typeof j!="object"?null:(j=w&&j[w]||j["@@iterator"],typeof j=="function"?j:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,E={};function R(j,X,L){this.props=j,this.context=X,this.refs=E,this.updater=L||S}R.prototype.isReactComponent={},R.prototype.setState=function(j,X){if(typeof j!="object"&&typeof j!="function"&&j!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,j,X,"setState")},R.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function k(){}k.prototype=R.prototype;function A(j,X,L){this.props=j,this.context=X,this.refs=E,this.updater=L||S}var D=A.prototype=new k;D.constructor=A,_(D,R.prototype),D.isPureReactComponent=!0;var H=Array.isArray;function $(){}var U={H:null,A:null,T:null,S:null},F=Object.prototype.hasOwnProperty;function de(j,X,L){var Y=L.ref;return{$$typeof:t,type:j,key:X,ref:Y!==void 0?Y:null,props:L}}function fe(j,X){return de(j.type,X,j.props)}function me(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function se(j){var X={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(L){return X[L]})}var G=/\/+/g;function he(j,X){return typeof j=="object"&&j!==null&&j.key!=null?se(""+j.key):X.toString(36)}function ve(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then($,$):(j.status="pending",j.then(function(X){j.status==="pending"&&(j.status="fulfilled",j.value=X)},function(X){j.status==="pending"&&(j.status="rejected",j.reason=X)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function T(j,X,L,Y,J){var ie=typeof j;(ie==="undefined"||ie==="boolean")&&(j=null);var pe=!1;if(j===null)pe=!0;else switch(ie){case"bigint":case"string":case"number":pe=!0;break;case"object":switch(j.$$typeof){case t:case n:pe=!0;break;case y:return pe=j._init,T(pe(j._payload),X,L,Y,J)}}if(pe)return J=J(j),pe=Y===""?"."+he(j,0):Y,H(J)?(L="",pe!=null&&(L=pe.replace(G,"$&/")+"/"),T(J,X,L,"",function(Re){return Re})):J!=null&&(me(J)&&(J=fe(J,L+(J.key==null||j&&j.key===J.key?"":(""+J.key).replace(G,"$&/")+"/")+pe)),X.push(J)),1;pe=0;var Q=Y===""?".":Y+":";if(H(j))for(var oe=0;oe<j.length;oe++)Y=j[oe],ie=Q+he(Y,oe),pe+=T(Y,X,L,ie,J);else if(oe=C(j),typeof oe=="function")for(j=oe.call(j),oe=0;!(Y=j.next()).done;)Y=Y.value,ie=Q+he(Y,oe++),pe+=T(Y,X,L,ie,J);else if(ie==="object"){if(typeof j.then=="function")return T(ve(j),X,L,Y,J);throw X=String(j),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return pe}function K(j,X,L){if(j==null)return j;var Y=[],J=0;return T(j,Y,"","",function(ie){return X.call(L,ie,J++)}),Y}function te(j){if(j._status===-1){var X=j._result;X=X(),X.then(function(L){(j._status===0||j._status===-1)&&(j._status=1,j._result=L)},function(L){(j._status===0||j._status===-1)&&(j._status=2,j._result=L)}),j._status===-1&&(j._status=0,j._result=X)}if(j._status===1)return j._result.default;throw j._result}var le=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)},ne={map:K,forEach:function(j,X,L){K(j,function(){X.apply(this,arguments)},L)},count:function(j){var X=0;return K(j,function(){X++}),X},toArray:function(j){return K(j,function(X){return X})||[]},only:function(j){if(!me(j))throw Error("React.Children.only expected to receive a single React element child.");return j}};return Ve.Activity=v,Ve.Children=ne,Ve.Component=R,Ve.Fragment=r,Ve.Profiler=i,Ve.PureComponent=A,Ve.StrictMode=s,Ve.Suspense=g,Ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=U,Ve.__COMPILER_RUNTIME={__proto__:null,c:function(j){return U.H.useMemoCache(j)}},Ve.cache=function(j){return function(){return j.apply(null,arguments)}},Ve.cacheSignal=function(){return null},Ve.cloneElement=function(j,X,L){if(j==null)throw Error("The argument must be
Line truncated
|
|
||||||
* @license React
|
|
||||||
* scheduler.production.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/var hb;function TC(){return hb||(hb=1,(function(t){function n(T,K){var te=T.length;T.push(K);e:for(;0<te;){var le=te-1>>>1,ne=T[le];if(0<i(ne,K))T[le]=K,T[te]=ne,te=le;else break e}}function r(T){return T.length===0?null:T[0]}function s(T){if(T.length===0)return null;var K=T[0],te=T.pop();if(te!==K){T[0]=te;e:for(var le=0,ne=T.length,j=ne>>>1;le<j;){var X=2*(le+1)-1,L=T[X],Y=X+1,J=T[Y];if(0>i(L,te))Y<ne&&0>i(J,L)?(T[le]=J,T[Y]=te,le=Y):(T[le]=L,T[X]=te,le=X);else if(Y<ne&&0>i(J,te))T[le]=J,T[Y]=te,le=Y;else break e}}return K}function i(T,K){var te=T.sortIndex-K.sortIndex;return te!==0?te:T.id-K.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var u=Date,f=u.now();t.unstable_now=function(){return u.now()-f}}var g=[],p=[],y=1,v=null,w=3,C=!1,S=!1,_=!1,E=!1,R=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function D(T){for(var K=r(p);K!==null;){if(K.callback===null)s(p);else if(K.startTime<=T)s(p),K.sortIndex=K.expirationTime,n(g,K);else break;K=r(p)}}function H(T){if(_=!1,D(T),!S)if(r(g)!==null)S=!0,$||($=!0,se());else{var K=r(p);K!==null&&ve(H,K.startTime-T)}}var $=!1,U=-1,F=5,de=-1;function fe(){return E?!0:!(t.unstable_now()-de<F)}function me(){if(E=!1,$){var T=t.unstable_now();de=T;var K=!0;try{e:{S=!1,_&&(_=!1,k(U),U=-1),C=!0;var te=w;try{t:{for(D(T),v=r(g);v!==null&&!(v.expirationTime>T&&fe());){var le=v.callback;if(typeof le=="function"){v.callback=null,w=v.priorityLevel;var ne=le(v.expirationTime<=T);if(T=t.unstable_now(),typeof ne=="function"){v.callback=ne,D(T),K=!0;break t}v===r(g)&&s(g),D(T)}else s(g);v=r(g)}if(v!==null)K=!0;else{var j=r(p);j!==null&&ve(H,j.startTime-T),K=!1}}break e}finally{v=null,w=te,C=!1}K=void 0}}finally{K?se():$=!1}}}var se;if(typeof A=="function")se=function(){A(me)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,he=G.port2;G.port1.onmessage=me,se=function(){he.postMessage(null)}}else se=function(){R(me,0)};function ve(T,K){U=R(function(){T(t.unstable_now())},K)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(T){T.callback=null},t.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<T?Math.floor(1e3/T):5},t.unstable_getCurrentPriorityLevel=function(){return w},t.unstable_next=function(T){switch(w){case 1:case 2:case 3:var K=3;break;default:K=w}var te=w;w=K;try{return T()}finally{w=te}},t.unstable_requestPaint=function(){E=!0},t.unstable_runWithPriority=function(T,K){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var te=w;w=T;try{return K()}finally{w=te}},t.unstable_scheduleCallback=function(T,K,te){var le=t.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?le+te:le):te=le,T){case 1:var ne=-1;break;case 2:ne=250;break;case 5:ne=1073741823;break;case 4:ne=1e4;break;default:ne=5e3}return ne=te+ne,T={id:y++,callback:K,priorityLevel:T,startTime:te,expirationTime:ne,sortIndex:-1},te>le?(T.sortIndex=te,n(p,T),r(g)===null&&T===r(p)&&(_?(k(U),U=-1):_=!0,ve(H,te-le))):(T.sortIndex=ne,n(g,T),S||C||(S=!0,$||($=!0,se()))),T},t.unstable_shouldYield=fe,t.unstable_wrapCallback=function(T){var K=w;return function(){var te=w;w=K;try{return T.apply(this,arguments)}finally{w=te}}}})(hm)),hm}var pb;function OC(){return pb||(pb=1,mm.exports=TC()),mm.exports}var pm={exports:{}},fn={};/**
|
|
||||||
* @license React
|
|
||||||
* react-dom.production.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/var gb;function jC(){if(gb)return fn;gb=1;var t=wh();function n(g){var p="https://react.dev/errors/"+g;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)p+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+g+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var s={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},i=Symbol.for("react.portal");function c(g,p,y){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:v==null?null:""+v,children:g,containerInfo:p,implementation:y}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(g,p){if(g==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return fn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,fn.createPortal=function(g,p){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(n(299));return c(g,p,null,y)},fn.flushSync=function(g){var p=u.T,y=s.p;try{if(u.T=null,s.p=2,g)return g()}finally{u.T=p,s.p=y,s.d.f()}},fn.preconnect=function(g,p){typeof g=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,s.d.C(g,p))},fn.prefetchDNS=function(g){typeof g=="string"&&s.d.D(g)},fn.preinit=function(g,p){if(typeof g=="string"&&p&&typeof p.as=="string"){var y=p.as,v=f(y,p.crossOrigin),w=typeof p.integrity=="string"?p.integrity:void 0,C=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;y==="style"?s.d.S(g,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:v,integrity:w,fetchPriority:C}):y==="script"&&s.d.X(g,{crossOrigin:v,integrity:w,fetchPriority:C,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},fn.preinitModule=function(g,p){if(typeof g=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var y=f(p.as,p.crossOrigin);s.d.M(g,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&s.d.M(g)},fn.preload=function(g,p){if(typeof g=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var y=p.as,v=f(y,p.crossOrigin);s.d.L(g,y,{crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},fn.preloadModule=function(g,p){if(typeof g=="string")if(p){var y=f(p.as,p.crossOrigin);s.d.m(g,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else s.d.m(g)},fn.requestFormReset=function(g){s.d.r(g)},fn.unstable_batchedUpdates=function(g,p){return g(p)},fn.useFormState=function(g,p,y){return u.H.useFormState(g,p,y)},fn.useFormStatus=function(){return u.H.useHostTransitionStatus()},fn.version="19.2.4",fn}var vb;function y0(){if(vb)return pm.exports;vb=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}return t(),pm.exports=jC(),pm.exports}/**
|
|
||||||
* @license React
|
|
||||||
* react-dom-client.production.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/var yb;function kC(){if(yb)return Vi;yb=1;var t=OC(),n=wh(),r=y0();function s(e){var a="https://react.dev/errors/"+e;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)a+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+e+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(e){var a=e,o=e;if(e.alternate)for(;a.return;)a=a.return;else{e=a;do a=e,(a.flags&4098)!==0&&(o=a.return),e=a.return;while(e)}return a.tag===3?o:null}function u(e){if(e.tag===13){var a=e.memoizedState;if(a===null&&(e=e.alternate,e!==null&&(a=e.memoizedState)),a!==null)return a.dehydrated}return null}function f(e){if(e.tag===31){var a=e.memoizedState;if(a===null&&(e=e.alternate,e!==null&&(a=e.memoizedState)),a!==null)return a.dehydrated}return null}function g(e){if(c(e)!==e)throw Error(s(188))}function p(e){var a=e.alternate;if(!a){if(a=c(e),a===null)throw Error(s(188));return a!==e?null:e}for(var o=e,l=a;;){var d=o.return;if(d===null)break;var m=d.alternate;if(m===null){if(l=d.return,l!==null){o=l;continue}break}if(d.child===m.child){for(m=d.child;m;){if(m===o)return g(d),e;if(m===l)return g(d),a;m=m.sibling}throw Error(s(188))}if(o.return!==l.return)o=d,l=m;else{for(var x=!1,N=d.child;N;){if(N===o){x=!0,o=d,l=m;break}if(N===l){x=!0,l=d,o=m;break}N=N.sibling}if(!x){for(N=m.child;N;){if(N===o){x=!0,o=m,l=d;break}if(N===l){x=!0,l=m,o=d;break}N=N.sibling}if(!x)throw Error(s(189))}}if(o.alternate!==l)throw Error(s(190))}if(o.tag!==3)throw Error(s(188));return o.stateNode.current===o?e:a}function y(e){var a=e.tag;if(a===5||a===26||a===27||a===6)return e;for(e=e.child;e!==null;){if(a=y(e),a!==null)return a;e=e.sibling}return null}var v=Object.assign,w=Symbol.for("react.element"),C=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),A=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),de=Symbol.for("react.activity"),fe=Symbol.for("react.memo_cache_sentinel"),me=Symbol.iterator;function se(e){return e===null||typeof e!="object"?null:(e=me&&e[me]||e["@@iterator"],typeof e=="function"?e:null)}var G=Symbol.for("react.client.reference");function he(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===G?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case _:return"Fragment";case R:return"Profiler";case E:return"StrictMode";case H:return"Suspense";case $:return"SuspenseList";case de:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case S:return"Portal";case A:return e.displayName||"Context";case k:return(e._context.displayName||"Context")+".Consumer";case D:var a=e.render;return e=e.displayName,e||(e=a.displayName||a.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case U:return a=e.displayName||null,a!==null?a:he(e.type)||"Memo";case F:a=e._payload,e=e._init;try{return he(e(a))}catch{}}return null}var ve=Array.isArray,T=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},le=[],ne=-1;function j(e){return{current:e}}function X(e){0>ne||(e.current=le[ne],le[ne]=null,ne--)}function L(e,a){ne++,le[ne]=e.current,e.current=a}var Y=j(null),J=j(null),ie=j(null),pe=j(null);function Q(e,a){switch(L(ie,a),L(J,e),L(Y,null),a.nodeType){case 9:case 11:e=(e=a.documentElement)&&(e=e.namespaceURI)?ky(e):0;break;default:if(e=a.tagName,a=a.namespaceURI)a=ky(a),e=My(a,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}X(Y),L(Y,e)}function oe(){X(Y),X(J),X(ie)}function Re(e){e.memoizedState!==null&&L(pe,e);var a=Y.current,o=My(a,e.type);a!==o&&(L(J,e),L(Y,o))}function et(e){J.current===e&&(X(Y),X(J)),pe.current===e&&(X(pe),Li._currentValue=te)}var Me,ze;function be(e){if(Me===void 0)try{throw Error()}catch(o){var a=o.stack.trim().match(/\n( *(at )?)/);Me=a&&a[1]||"",ze=-1<o.stack.indexOf(`
|
|
||||||
at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
||||||
`+Me+e+ze}var je=!1;function at(e,a){if(!e||je)return"";je=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(a){var ue=function(){throw Error()};if(Object.defineProperty(ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ue,[])}catch(ee){var Z=ee}Reflect.construct(e,[],ue)}else{try{ue.call()}catch(ee){Z=ee}e.call(ue.prototype)}}else{try{throw Error()}catch(ee){Z=ee}(ue=e())&&typeof ue.catch=="function"&&ue.catch(function(){})}}catch(ee){if(ee&&Z&&typeof ee.stack=="string")return[ee.stack,Z.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=l.DetermineComponentFrameRoot(),x=m[0],N=m[1];if(x&&N){var M=x.split(`
|
|
||||||
`),q=N.split(`
|
|
||||||
`);for(d=l=0;l<M.length&&!M[l].includes("DetermineComponentFrameRoot");)l++;for(;d<q.length&&!q[d].includes("DetermineComponentFrameRoot");)d++;if(l===M.length||d===q.length)for(l=M.length-1,d=q.length-1;1<=l&&0<=d&&M[l]!==q[d];)d--;for(;1<=l&&0<=d;l--,d--)if(M[l]!==q[d]){if(l!==1||d!==1)do if(l--,d--,0>d||M[l]!==q[d]){var re=`
|
|
||||||
`+M[l].replace(" at new "," at ");return e.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",e.displayName)),re}while(1<=l&&0<=d);break}}}finally{je=!1,Error.prepareStackTrace=o}return(o=e?e.displayName||e.name:"")?be(o):""}function ht(e,a){switch(e.tag){case 26:case 27:case 5:return be(e.type);case 16:return be("Lazy");case 13:return e.child!==a&&a!==null?be("Suspense Fallback"):be("Suspense");case 19:return be("SuspenseList");case 0:case 15:return at(e.type,!1);case 11:return at(e.type.render,!1);case 1:return at(e.type,!0);case 31:return be("Activity");default:return""}}function Qe(e){try{var a="",o=null;do a+=ht(e,o),o=e,e=e.return;while(e);return a}catch(l){return`
|
|
||||||
Error generating stack: `+l.message+`
|
|
||||||
`+l.stack}}var Pe=Object.prototype.hasOwnProperty,Tt=t.unstable_scheduleCallback,Zt=t.unstable_cancelCallback,O=t.unstable_shouldYield,B=t.unstable_requestPaint,V=t.unstable_now,we=t.unstable_getCurrentPriorityLevel,ge=t.unstable_ImmediatePriority,ye=t.unstable_UserBlockingPriority,Se=t.unstable_NormalPriority,Ue=t.unstable_LowPriority,Ge=t.unstable_IdlePriority,Pt=t.log,Mt=t.unstable_setDisableYieldValue,mt=null,Dt=null;function an(e){if(typeof Pt=="function"&&Mt(e),Dt&&typeof Dt.setStrictMode=="function")try{Dt.setStrictMode(mt,e)}catch{}}var Ht=Math.clz32?Math.clz32:Yn,Ko=Math.log,ur=Math.LN2;function Yn(e){return e>>>=0,e===0?32:31-(Ko(e)/ur|0)|0}var Ua=256,ks=262144,Wr=4194304;function xa(e){var a=e&42;if(a!==0)return a;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function He(e,a,o){var l=e.pendingLanes;if(l===0)return 0;var d=0,m=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var N=l&134217727;return N!==0?(l=N&~m,l!==0?d=xa(l):(x&=N,x!==0?d=xa(x):o||(o=N&~e,o!==0&&(d=xa(o))))):(N=l&~m,N!==0?d=xa(N):x!==0?d=xa(x):o||(o=l&~e,o!==0&&(d=xa(o)))),d===0?0:a!==0&&a!==d&&(a&m)===0&&(m=d&-d,o=a&-a,m>=o||m===32&&(o&4194048)!==0)?a:d}function _t(e,a){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&a)===0}function en(e,a){switch(e){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function dn(){var e=Wr;return Wr<<=1,(Wr&62914560)===0&&(Wr=4194304),e}function dr(e){for(var a=[],o=0;31>o;o++)a.push(e);return a}function Rt(e,a){e.pendingLanes|=a,a!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function bn(e,a,o,l,d,m){var x=e.pendingLanes;e.pendingLanes=o,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=o,e.entangledLanes&=o,e.errorRecoveryDisabledLanes&=o,e.shellSuspendCounter=0;var N=e.entanglements,M=e.expirationTimes,q=e.hiddenUpdates;for(o=x&~o;0<o;){var re=31-Ht(o),ue=1<<re;N[re]=0,M[re]=-1;var Z=q[re];if(Z!==null)for(q[re]=null,re=0;re<Z.length;re++){var ee=Z[re];ee!==null&&(ee.lane&=-536870913)}o&=~ue}l!==0&&Jr(e,l,0),m!==0&&d===0&&e.tag!==0&&(e.suspendedLanes|=m&~(x&~a))}function Jr(e,a,o){e.pendingLanes|=a,e.suspendedLanes&=~a;var l=31-Ht(a);e.entangledLanes|=a,e.entanglements[l]=e.entanglements[l]|1073741824|o&261930}function xn(e,a){var o=e.entangledLanes|=a;for(e=e.entanglements;o;){var l=31-Ht(o),d=1<<l;d&a|e[l]&a&&(e[l]|=a),o&=~d}}function wn(e,a){var o=a&-a;return o=(o&42)!==0?1:Ms(o),(o&(e.suspendedLanes|a))!==0?0:o}function Ms(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ca(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ju(){var e=K.p;return e!==0?e:(e=window.event,e===void 0?32:nb(e.type))}function yp(e,a){var o=K.p;try{return K.p=e,a()}finally{K.p=o}}var fr=Math.random().toString(36).slice(2),rn="__reactFiber$"+fr,Sn="__reactProps$"+fr,Ds="__reactContainer$"+fr,ed="__reactEvents$"+fr,fE="__reactListeners$"+fr,mE="__reactHandles$"+fr,bp="__reactResources$"+fr,Qo="__reactMarker$"+fr;function td(e){delete e[rn],delete e[Sn],delete e[ed],delete e[fE],delete e[mE]}function zs(e){var a=e[rn];if(a)return a;for(var o=e.parentNode;o;){if(a=o[Ds]||o[rn]){if(o=a.alternate,a.child!==null||o!==null&&o.child!==null)for(e=Hy(e);e!==null;){if(o=e[rn])return o;e=Hy(e)}return a}e=o,o=e.parentNode}return null}function Ls(e){if(e=e[rn]||e[Ds]){var a=e.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return e}return null}function Wo(e){var a=e.tag;if(a===5||a===26||a===27||a===6)return e.stateNode;throw Error(s(33))}function Us(e){var a=e[bp];return a||(a=e[bp]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function tn(e){e[Qo]=!0}var xp=new Set,wp={};function es(e,a){Bs(e,a),Bs(e+"Capture",a)}function Bs(e,a){for(wp[e]=a,e=0;e<a.length;e++)xp.add(a[e])}var hE=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\
Line truncated
|
|
||||||
`).replace($_,"")}function Oy(e,a){return a=Ty(a),Ty(e)===a}function yt(e,a,o,l,d,m){switch(o){case"children":typeof l=="string"?a==="body"||a==="textarea"&&l===""||Hs(e,l):(typeof l=="number"||typeof l=="bigint")&&a!=="body"&&Hs(e,""+l);break;case"className":wl(e,"class",l);break;case"tabIndex":wl(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":wl(e,o,l);break;case"style":Op(e,l,m);break;case"data":if(a!=="object"){wl(e,"data",l);break}case"src":case"href":if(l===""&&(a!=="a"||o!=="href")){e.removeAttribute(o);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(o);break}l=El(""+l),e.setAttribute(o,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(o,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof m=="function"&&(o==="formAction"?(a!=="input"&&yt(e,a,"name",d.name,d,null),yt(e,a,"formEncType",d.formEncType,d,null),yt(e,a,"formMethod",d.formMethod,d,null),yt(e,a,"formTarget",d.formTarget,d,null)):(yt(e,a,"encType",d.encType,d,null),yt(e,a,"method",d.method,d,null),yt(e,a,"target",d.target,d,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(o);break}l=El(""+l),e.setAttribute(o,l);break;case"onClick":l!=null&&(e.onclick=Pa);break;case"onScroll":l!=null&&Je("scroll",e);break;case"onScrollEnd":l!=null&&Je("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(o=l.__html,o!=null){if(d.children!=null)throw Error(s(60));e.innerHTML=o}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}o=El(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(o,""+l):e.removeAttribute(o);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(o,""):e.removeAttribute(o);break;case"capture":case"download":l===!0?e.setAttribute(o,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(o,l):e.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(o,l):e.removeAttribute(o);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(o):e.setAttribute(o,l);break;case"popover":Je("beforetoggle",e),Je("toggle",e),xl(e,"popover",l);break;case"xlinkActuate":Ba(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Ba(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Ba(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Ba(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Ba(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Ba(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Ba(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Ba(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Ba(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":xl(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=bE.get(o)||o,xl(e,o,l))}}function Gf(e,a,o,l,d,m){switch(o){case"style":Op(e,l,m);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(o=l.__html,o!=null){if(d.children!=null)throw Error(s(60));e.innerHTML=o}}break;case"children":typeof l=="string"?Hs(e,l):(typeof l=="number"||typeof l=="bigint")&&Hs(e,""+l);break;case"onScroll":l!=null&&Je("scroll",e);break;case"onScrollEnd":l!=null&&Je("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Pa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"inne
Line truncated
|
|
||||||
* react-router v7.13.2
|
|
||||||
*
|
|
||||||
* Copyright (c) Remix Software Inc.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE.md file in the root directory of this source tree.
|
|
||||||
*
|
|
||||||
* @license MIT
|
|
||||||
*/var xb="popstate";function wb(t){return typeof t=="object"&&t!=null&&"pathname"in t&&"search"in t&&"hash"in t&&"state"in t&&"key"in t}function zC(t={}){function n(s,i){var p;let c=(p=i.state)==null?void 0:p.masked,{pathname:u,search:f,hash:g}=c||s.location;return Fm("",{pathname:u,search:f,hash:g},i.state&&i.state.usr||null,i.state&&i.state.key||"default",c?{pathname:s.location.pathname,search:s.location.search,hash:s.location.hash}:void 0)}function r(s,i){return typeof i=="string"?i:Ji(i)}return UC(n,r,null,t)}function Nt(t,n){if(t===!1||t===null||typeof t>"u")throw new Error(n)}function oa(t,n){if(!t){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function LC(){return Math.random().toString(36).substring(2,10)}function Sb(t,n){return{usr:t.state,key:t.key,idx:n,masked:t.unstable_mask?{pathname:t.pathname,search:t.search,hash:t.hash}:void 0}}function Fm(t,n,r=null,s,i){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof n=="string"?qo(n):n,state:r,key:n&&n.key||s||LC(),unstable_mask:i}}function Ji({pathname:t="/",search:n="",hash:r=""}){return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function qo(t){let n={};if(t){let r=t.indexOf("#");r>=0&&(n.hash=t.substring(r),t=t.substring(0,r));let s=t.indexOf("?");s>=0&&(n.search=t.substring(s),t=t.substring(0,s)),t&&(n.pathname=t)}return n}function UC(t,n,r,s={}){let{window:i=document.defaultView,v5Compat:c=!1}=s,u=i.history,f="POP",g=null,p=y();p==null&&(p=0,u.replaceState({...u.state,idx:p},""));function y(){return(u.state||{idx:null}).idx}function v(){f="POP";let E=y(),R=E==null?null:E-p;p=E,g&&g({action:f,location:_.location,delta:R})}function w(E,R){f="PUSH";let k=wb(E)?E:Fm(_.location,E,R);p=y()+1;let A=Sb(k,p),D=_.createHref(k.unstable_mask||k);try{u.pushState(A,"",D)}catch(H){if(H instanceof DOMException&&H.name==="DataCloneError")throw H;i.location.assign(D)}c&&g&&g({action:f,location:_.location,delta:1})}function C(E,R){f="REPLACE";let k=wb(E)?E:Fm(_.location,E,R);p=y();let A=Sb(k,p),D=_.createHref(k.unstable_mask||k);u.replaceState(A,"",D),c&&g&&g({action:f,location:_.location,delta:0})}function S(E){return BC(E)}let _={get action(){return f},get location(){return t(i,u)},listen(E){if(g)throw new Error("A history only accepts one active listener");return i.addEventListener(xb,v),g=E,()=>{i.removeEventListener(xb,v),g=null}},createHref(E){return n(i,E)},createURL:S,encodeLocation(E){let R=S(E);return{pathname:R.pathname,search:R.search,hash:R.hash}},push:w,replace:C,go(E){return u.go(E)}};return _}function BC(t,n=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),Nt(r,"No window.location.(origin|href) available to create URL");let s=typeof t=="string"?t:Ji(t);return s=s.replace(/ $/,"%20"),!n&&s.startsWith("//")&&(s=r+s),new URL(s,r)}function b0(t,n,r="/"){return PC(t,n,r,!1)}function PC(t,n,r,s){let i=typeof n=="string"?qo(n):n,c=rr(i.pathname||"/",r);if(c==null)return null;let u=x0(t);HC(u);let f=null;for(let g=0;f==null&&g<u.length;++g){let p=QC(c);f=XC(u[g],p,s)}return f}function x0(t,n=[],r=[],s="",i=!1){let c=(u,f,g=i,p)=>{let y={relativePath:p===void 0?u.path||"":p,caseSensitive:u.caseSensitive===!0,childrenIndex:f,route:u};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(s)&&g)return;Nt(y.relativePath.startsWith(s),`Absolute route path "${y.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(s.length)}let v=ja([s,y.relativePath]),w=r.concat(y);u.children&&u.children.length>0&&(Nt(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),x0(u.children,n,w,v,g)),!(u.path==null&&!u.index)&&n.push({path:v,score:YC(v,u.index),routesMeta:w})};return t.forEach((u,f)=>{var g;if(u.path===""||!((g=u.path)!=null&&g.includes("?")))c(u,f);else for(let p of w0(u.path))c(u,f,!0,p)}),n}function w0(t){let n=t.split("/");if(n.length===0)return[];let[r,...s]=n,i=r.endsWith("?"),c=r.replace(/\?$/,"");if(s.length===0)return i?[c,""]:[c];let u=w0(s.join("/")),f=[];return f.push(...u.map(g=>g===""?c:[c,g].join("/"))),i&&f.push(...u),f.map(g=>t.startsWith("/")&&g===""?"/":g)}function HC(t){t.sort((n,r)=>n.score!==r.score?r.score-n.score:ZC(n.routesMeta.map(s=>s.childrenIndex),r.routesMeta.map(s=>s.childrenIndex)))}var VC=/^:[\w-]+$/,IC=3,qC=2,FC=1,$C=10,GC=-2,Eb=t=>t==="*";function YC(t,n){let r=t.split("/"),s=r.length;return r.some(Eb)&&(s+=GC),n&&(s+=qC),r.filter(i=>!Eb(i)).reduce((i,c)=>i+(VC.test(c)?IC:c===""?FC:$C),s)}function ZC(t,n){return t.length===n.length&&t.slice(0,-1).every((s,i)=>s===n[i])?t[t.length-1]-n[n.length-1]:0}function XC(t,n,r=!1){let{routesMeta:s}=t,i={},c="/",u=[];for(let f=0;f<s.length;++f){let g=s[f],p=f===s.length-1,y=c==="/"?n:n.slice(c.length)||"/",v=eu({path:g.relativePath,cas
Line truncated
|
|
||||||
|
|
||||||
Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}/*`}">.`)}let y=Da(),v;if(n){let R=typeof n=="string"?qo(n):n;Nt(g==="/"||((E=R.pathname)==null?void 0:E.startsWith(g)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${g}" but pathname "${R.pathname}" was given in the \`location\` prop.`),v=R}else v=y;let w=v.pathname||"/",C=w;if(g!=="/"){let R=g.replace(/^\//,"").split("/");C="/"+w.replace(/^\//,"").split("/").slice(R.length).join("/")}let S=b0(t,{pathname:C});oa(p||S!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),oa(S==null||S[S.length-1].route.element!==void 0||S[S.length-1].route.Component!==void 0||S[S.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let _=CN(S&&S.map(R=>Object.assign({},R,{params:Object.assign({},u,R.params),pathname:ja([g,s.encodeLocation?s.encodeLocation(R.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?g:ja([g,s.encodeLocation?s.encodeLocation(R.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathnameBase])})),i,r);return n&&_?b.createElement(il.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...v},navigationType:"POP"}},_):_}function wN(){let t=ON(),n=sN(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,s="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:s},c={padding:"2px 4px",backgroundColor:s},u=null;return console.error("Error handled by React Router default ErrorBoundary:",t),u=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:c},"ErrorBoundary")," or"," ",b.createElement("code",{style:c},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},n),r?b.createElement("pre",{style:i},r):null,u)}var SN=b.createElement(wN,null),O0=class extends b.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){this.props.onError?this.props.onError(t,n):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const r=hN(t.digest);r&&(t=r)}let n=t!==void 0?b.createElement(ia.Provider,{value:this.props.routeContext},b.createElement(Eh.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?b.createElement(EN,{error:t},n):n}};O0.contextType=lN;var vm=new WeakMap;function EN({children:t,error:n}){let{basename:r}=b.useContext(Gn);if(typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){let s=mN(n.digest);if(s){let i=vm.get(n);if(i)throw i;let c=E0(s.location,r);if(S0&&!vm.get(n))if(c.isExternal||s.reloadDocument)window.location.href=c.absoluteURL||c.to;else{const u=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(c.to,{replace:s.replace}));throw vm.set(n,u),u}return b.createElement("meta",{httpEquiv:"refresh",content:`0;url=${c.absoluteURL||c.to}`})}}return t}function _N({routeContext:t,match:n,children:r}){let s=b.useContext(Fo);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),b.createElement(ia.Provider,{value:t},r)}function CN(t,n=[],r){let s=r==null?void 0:r.state;if(t==null){if(!s)return null;if(s.errors)t=s.matches;else if(n.length===0&&!s.initialized&&s.matches.length>0)t=s.matches;else return null}let i=t,c=s==null?void 0:s.errors;if(c!=null){let y=i.findIndex(v=>v.route.id&&(c==null?void 0:c[v.route.id])!==void 0);Nt(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),i=i.slice(0,Math.min(i.length,y+1))}let u=!1,f=-1;if(r&&s){u=s.renderFallback;for(let y=0;y<i.length;y++){let v=i[y];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(f=y),v.route.id){let{loaderData:w,errors:C}=s,S=vLine truncated
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const q2=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),F2=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,r,s)=>s?s.toUpperCase():r.toLowerCase()),Tb=t=>{const n=F2(t);return n.charAt(0).toUpperCase()+n.slice(1)},P0=(...t)=>t.filter((n,r,s)=>!!n&&n.trim()!==""&&s.indexOf(n)===r).join(" ").trim(),$2=t=>{for(const n in t)if(n.startsWith("aria-")||n==="role"||n==="title")return!0};/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/var G2={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const Y2=b.forwardRef(({color:t="currentColor",size:n=24,strokeWidth:r=2,absoluteStrokeWidth:s,className:i="",children:c,iconNode:u,...f},g)=>b.createElement("svg",{ref:g,...G2,width:n,height:n,stroke:t,strokeWidth:s?Number(r)*24/Number(n):r,className:P0("lucide",i),...!c&&!$2(f)&&{"aria-hidden":"true"},...f},[...u.map(([p,y])=>b.createElement(p,y)),...Array.isArray(c)?c:[c]]));/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const st=(t,n)=>{const r=b.forwardRef(({className:s,...i},c)=>b.createElement(Y2,{ref:c,iconNode:n,className:P0(`lucide-${q2(Tb(t))}`,`lucide-${t}`,s),...i}));return r.displayName=Tb(t),r};/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const Z2=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Ob=st("arrow-left",Z2);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const X2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],K2=st("arrow-right",X2);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const Q2=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Zm=st("chevron-down",Q2);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const W2=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],jb=st("chevron-right",W2);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const J2=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],eR=st("chevron-up",J2);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const tR=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],nR=st("circle-alert",tR);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const aR=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],rR=st("circle-check-big",aR);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const sR=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],kb=st("circle-check",sR);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const oR=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],iR=st("circle-x",oR);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const lR=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],cR=st("ellipsis-vertical",lR);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const uR=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],dR=st("eye-off",uR);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const fR=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],mR=st("eye",fR);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const hR=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],pR=st("funnel",hR);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const gR=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],vR=st("globe",gR);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const yR=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],bR=st("layers",yR);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const xR=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],wR=st("layout-dashboard",xR);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const SR=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],H0=st("loader-circle",SR);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const ER=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],_R=st("log-out",ER);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const CR=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]],NR=st("message-square",CR);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const RR=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],AR=st("moon",RR);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const TR=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Xm=st("plus",TR);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const OR=[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15",key:"dxknvb"}],["path",{d:"M6.16 6.16a9 9 0 1 0 12.68 12.68",key:"1x7qb5"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],jR=st("power-off",OR);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const kR=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],V0=st("power",kR);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const MR=[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]],Mb=st("qr-code",MR);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const DR=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Db=st("refresh-cw",DR);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const zR=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],zb=st("save",zR);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const LR=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],UR=st("search",LR);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const BR=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],PR=st("settings",BR);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const HR=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],VR=st("shield",HR);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const IR=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],qR=st("smartphone",IR);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const FR=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],$R=st("sun",FR);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const GR=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],Th=st("trash-2",GR);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const YR=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],ZR=st("triangle-alert",YR);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const XR=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],el=st("x",XR);/**
|
|
||||||
* @license lucide-react v0.525.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const KR=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],QR=st("zap",KR);class WR extends b.Component{constructor(r){super(r);cb(this,"handleReset",()=>{this.setState({hasError:!1,error:null,errorInfo:null})});this.state={hasError:!1,error:null,errorInfo:null}}static getDerivedStateFromError(r){return{hasError:!0,error:r,errorInfo:null}}componentDidCatch(r,s){console.error("ErrorBoundary caught an error:",r,s),this.setState({error:r,errorInfo:s})}render(){return this.state.hasError?this.props.fallback?this.props.fallback:h.jsx("div",{className:"flex min-h-screen items-center justify-center bg-gray-50 px-4",children:h.jsxs("div",{className:"w-full max-w-md rounded-lg bg-white p-8 shadow-lg",children:[h.jsx("div",{className:"mb-4 flex items-center justify-center",children:h.jsx("div",{className:"rounded-full bg-red-100 p-3",children:h.jsx(ZR,{className:"h-8 w-8 text-red-600"})})}),h.jsx("h1",{className:"mb-2 text-center text-2xl font-bold text-gray-900",children:"Algo deu errado"}),h.jsx("p",{className:"mb-6 text-center text-gray-600",children:"Ocorreu um erro inesperado na aplicação."}),this.state.error&&h.jsxs("div",{className:"mb-6 rounded-md bg-red-50 p-4",children:[h.jsx("p",{className:"text-sm font-medium text-red-800",children:this.state.error.message}),!1]}),h.jsxs("div",{className:"flex gap-3",children:[h.jsx("button",{onClick:this.handleReset,className:"flex-1 rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",children:"Tentar novamente"}),h.jsx("button",{onClick:()=>window.location.href="/",className:"flex-1 rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",children:"Voltar ao início"})]})]})}):this.props.children}}function I0(t){var n,r,s="";if(typeof t=="string"||typeof t=="number")s+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(n=0;n<i;n++)t[n]&&(r=I0(t[n]))&&(s&&(s+=" "),s+=r)}else for(r in t)t[r]&&(s&&(s+=" "),s+=r);return s}function Oh(){for(var t,n,r=0,s="",i=arguments.length;r<i;r++)(t=arguments[r])&&(n=I0(t))&&(s&&(s+=" "),s+=n);return s}const JR=(t,n)=>{const r=new Array(t.length+n.length);for(let s=0;s<t.length;s++)r[s]=t[s];for(let s=0;s<n.length;s++)r[t.length+s]=n[s];return r},eA=(t,n)=>({classGroupId:t,validator:n}),q0=(t=new Map,n=null,r)=>({nextPart:t,validators:n,classGroupId:r}),tu="-",Lb=[],tA="arbitrary..",nA=t=>{const n=rA(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:s}=t;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return aA(u);const f=u.split(tu),g=f[0]===""&&f.length>1?1:0;return F0(f,g,n)},getConflictingClassGroupIds:(u,f)=>{if(f){const g=s[u],p=r[u];return g?p?JR(p,g):g:p||Lb}return r[u]||Lb}}},F0=(t,n,r)=>{if(t.length-n===0)return r.classGroupId;const i=t[n],c=r.nextPart.get(i);if(c){const p=F0(t,n+1,c);if(p)return p}const u=r.validators;if(u===null)return;const f=n===0?t.join(tu):t.slice(n).join(tu),g=u.length;for(let p=0;p<g;p++){const y=u[p];if(y.validator(f))return y.classGroupId}},aA=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=t.slice(1,-1),r=n.indexOf(":"),s=n.slice(0,r);return s?tA+s:void 0})(),rA=t=>{const{theme:n,classGroups:r}=t;return sA(r,n)},sA=(t,n)=>{const r=q0();for(const s in t){const i=t[s];jh(i,r,s,n)}return r},jh=(t,n,r,s)=>{const i=t.length;for(let c=0;c<i;c++){const u=t[c];oA(u,n,r,s)}},oA=(t,n,r,s)=>{if(typeof t=="string"){iA(t,n,r);return}if(typeof t=="function"){lA(t,n,r,s);return}cA(t,n,r,s)},iA=(t,n,r)=>{const s=t===""?n:$0(n,t);s.classGroupId=r},lA=(t,n,r,s)=>{if(uA(t)){jh(t(s),n,r,s);return}n.validators===null&&(n.validators=[]),n.validators.push(eA(r,t))},cA=(t,n,r,s)=>{const i=Object.entries(t),c=i.length;for(let u=0;u<c;u++){const[f,g]=i[u];jh(g,$0(n,f),r,s)}},$0=(t,n)=>{let r=t;const s=n.split(tu),i=s.length;for(let c=0;c<i;c++){const u=s[c];let f=r.nextPart.get(u);f||(f=q0(),r.nextPart.set(u,f)),r=f}return r},uA=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,dA=t=>{if(t<1)return{get:()=>{},set:()=>{}};let n=0,r=Object.create(null),s=Object.create(null);const i=(c,u)=>{r[c]=u,n++,n>t&&(n=0,s=r,r=Object.create(null))};return{get(c){let u=r[c];if(u!==void 0)return u;if((u=s[c])!==void 0)return i(c,u),u},set(c,u){c in r?r[c]=u:i(c,u)}}},Km="!",Ub=":",fA=[],Bb=(t,n,r,s,i)=>({modifiers:t,hasImportantModifier:n,baseClassName:r,maybePostfixModifierPosition:s,isExternal:i}),mA=t=>{const{prefix:n,experimentalParseClassName:r}=t;let s=i=>{const c=[];let u=0,f=0,g=0,p;const y=i.length;for(let _=0;_<y;_++){const E=i[_];if(u===0&&f===0){if(E===Ub){c.push(i.slice(g,_)),g=_+1;continue}if(E==="/"){p=_;continue}}E==="["?u++:E==="]"?u--:E==="("?f++:E===")"&&f--}const v=c.length===0?i:i.slice(g);let w=v,C=!1;v.endsWith(KLine truncated
|
|
||||||
`).forEach(function(u){i=u.indexOf(":"),r=u.substring(0,i).trim().toLowerCase(),s=u.substring(i+1).trim(),!(!r||n[r]&&eO[r])&&(r==="set-cookie"?n[r]?n[r].push(s):n[r]=[s]:n[r]=n[r]?n[r]+", "+s:s)}),n},Zb=Symbol("internals");function Fi(t){return t&&String(t).trim().toLowerCase()}function Xc(t){return t===!1||t==null?t:W.isArray(t)?t.map(Xc):String(t)}function nO(t){const n=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=r.exec(t);)n[s[1]]=s[2];return n}const aO=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Sm(t,n,r,s,i){if(W.isFunction(s))return s.call(this,n,r);if(i&&(n=r),!!W.isString(n)){if(W.isString(s))return n.indexOf(s)!==-1;if(W.isRegExp(s))return s.test(n)}}function rO(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(n,r,s)=>r.toUpperCase()+s)}function sO(t,n){const r=W.toCamelCase(" "+n);["get","set","has"].forEach(s=>{Object.defineProperty(t,s+r,{value:function(i,c,u){return this[s].call(this,n,i,c,u)},configurable:!0})})}let kn=class{constructor(n){n&&this.set(n)}set(n,r,s){const i=this;function c(f,g,p){const y=Fi(g);if(!y)throw new Error("header name must be a non-empty string");const v=W.findKey(i,y);(!v||i[v]===void 0||p===!0||p===void 0&&i[v]!==!1)&&(i[v||g]=Xc(f))}const u=(f,g)=>W.forEach(f,(p,y)=>c(p,y,g));if(W.isPlainObject(n)||n instanceof this.constructor)u(n,r);else if(W.isString(n)&&(n=n.trim())&&!aO(n))u(tO(n),r);else if(W.isObject(n)&&W.isIterable(n)){let f={},g,p;for(const y of n){if(!W.isArray(y))throw TypeError("Object iterator must return a key-value pair");f[p=y[0]]=(g=f[p])?W.isArray(g)?[...g,y[1]]:[g,y[1]]:y[1]}u(f,r)}else n!=null&&c(r,n,s);return this}get(n,r){if(n=Fi(n),n){const s=W.findKey(this,n);if(s){const i=this[s];if(!r)return i;if(r===!0)return nO(i);if(W.isFunction(r))return r.call(this,i,s);if(W.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,r){if(n=Fi(n),n){const s=W.findKey(this,n);return!!(s&&this[s]!==void 0&&(!r||Sm(this,this[s],s,r)))}return!1}delete(n,r){const s=this;let i=!1;function c(u){if(u=Fi(u),u){const f=W.findKey(s,u);f&&(!r||Sm(s,s[f],f,r))&&(delete s[f],i=!0)}}return W.isArray(n)?n.forEach(c):c(n),i}clear(n){const r=Object.keys(this);let s=r.length,i=!1;for(;s--;){const c=r[s];(!n||Sm(this,this[c],c,n,!0))&&(delete this[c],i=!0)}return i}normalize(n){const r=this,s={};return W.forEach(this,(i,c)=>{const u=W.findKey(s,c);if(u){r[u]=Xc(i),delete r[c];return}const f=n?rO(c):String(c).trim();f!==c&&delete r[c],r[f]=Xc(i),s[f]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const r=Object.create(null);return W.forEach(this,(s,i)=>{s!=null&&s!==!1&&(r[i]=n&&W.isArray(s)?s.join(", "):s)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,r])=>n+": "+r).join(`
|
|
||||||
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...r){const s=new this(n);return r.forEach(i=>s.set(i)),s}static accessor(n){const s=(this[Zb]=this[Zb]={accessors:{}}).accessors,i=this.prototype;function c(u){const f=Fi(u);s[f]||(sO(i,u),s[f]=!0)}return W.isArray(n)?n.forEach(c):c(n),this}};kn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);W.reduceDescriptors(kn.prototype,({value:t},n)=>{let r=n[0].toUpperCase()+n.slice(1);return{get:()=>t,set(s){this[r]=s}}});W.freezeMethods(kn);function Em(t,n){const r=this||fl,s=n||r,i=kn.from(s.headers);let c=s.data;return W.forEach(t,function(f){c=f.call(r,c,i.normalize(),n?n.status:void 0)}),i.normalize(),c}function y1(t){return!!(t&&t.__CANCEL__)}let ml=class extends Be{constructor(n,r,s){super(n??"canceled",Be.ERR_CANCELED,r,s),this.name="CanceledError",this.__CANCEL__=!0}};function b1(t,n,r){const s=r.config.validateStatus;!r.status||!s||s(r.status)?t(r):n(new Be("Request failed with status code "+r.status,[Be.ERR_BAD_REQUEST,Be.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function oO(t){const n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return n&&n[1]||""}function iO(t,n){t=t||10;const r=new Array(t),s=new Array(t);let i=0,c=0,u;return n=n!==void 0?n:1e3,function(g){const p=Date.now(),y=s[c];u||(u=p),r[i]=g,s[i]=p;let v=c,w=0;for(;v!==i;)w+=r[v++],v=v%t;if(i=(i+1)%t,i===c&&(c=(c+1)%t),p-u<n)return;const C=y&&p-y;return C?Math.round(w*1e3/C):void 0}}function lO(t,n){let r=0,s=1e3/n,i,c;const u=(p,y=Date.now())=>{r=y,i=null,c&&(clearTimeout(c),c=null),t(...p)};return[(...p)=>{const y=Date.now(),v=y-r;v>=s?u(p,y):(i=p,c||(c=setTimeout(()=>{c=null,u(i)},s-v)))},()=>i&&u(i)]}const nu=(t,n,r=3)=>{let s=0;const i=iO(50,250);return lO(c=>{const u=c.loaded,f=c.lengthComputable?c.total:void 0,g=u-s,p=i(g),y=u<=f;s=u;const v={loaded:u,total:f,progress:f?u/f:void 0,bytes:g,rate:p||void 0,estimated:p&&f&&y?(f-u)/p:void 0,event:c,lengthComputable:f!=null,[n?"download":"upload"]:!0};t(v)},r)},Xb=(t,n)=>{const r=t!=null;return[s=>n[0]({lengthComputable:r,total:t,loaded:s}),n[1]]},Kb=t=>(...n)=>W.asap(()=>t(...n)),cO=mn.hasStandardBrowserEnv?((t,n)=>r=>(r=new URL(r,mn.origin),t.protocol===r.protocol&&t.host===r.host&&(n||t.port===r.port)))(new URL(mn.origin),mn.navigator&&/(msie|trident)/i.test(mn.navigator.userAgent)):()=>!0,uO=mn.hasStandardBrowserEnv?{write(t,n,r,s,i,c,u){if(typeof document>"u")return;const f=[`${t}=${encodeURIComponent(n)}`];W.isNumber(r)&&f.push(`expires=${new Date(r).toUTCString()}`),W.isString(s)&&f.push(`path=${s}`),W.isString(i)&&f.push(`domain=${i}`),c===!0&&f.push("secure"),W.isString(u)&&f.push(`SameSite=${u}`),document.cookie=f.join("; ")},read(t){if(typeof document>"u")return null;const n=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return n?decodeURIComponent(n[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function dO(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function fO(t,n){return n?t.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):t}function x1(t,n,r){let s=!dO(n);return t&&(s||r==!1)?fO(t,n):n}const Qb=t=>t instanceof kn?{...t}:t;function Es(t,n){n=n||{};const r={};function s(p,y,v,w){return W.isPlainObject(p)&&W.isPlainObject(y)?W.merge.call({caseless:w},p,y):W.isPlainObject(y)?W.merge({},y):W.isArray(y)?y.slice():y}function i(p,y,v,w){if(W.isUndefined(y)){if(!W.isUndefined(p))return s(void 0,p,v,w)}else return s(p,y,v,w)}function c(p,y){if(!W.isUndefined(y))return s(void 0,y)}function u(p,y){if(W.isUndefined(y)){if(!W.isUndefined(p))return s(void 0,p)}else return s(void 0,y)}function f(p,y,v){if(v in n)return s(p,y);if(v in t)return s(void 0,p)}const g={url:c,method:c,data:c,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:f,headers:(p,y,v)=>i(Qb(p),Qb(y),v,!0)};return W.forEach(Object.keys({...t,...n}),function(y){if(y==="__proto__"||y==="constructor"||y==="prototype")return;const v=W.hasOwnProp(g,y)?g[y]:i,w=v(t[y],n[y],y);W.isUndefined(w)&&v!==f||(r[y]=w)}),r}const w1=t=>{const n=Es({},t);let{data:r,withXSRFToken:s,xsrfHeaderName:i,xsrfCookieName:c,headers:u,auth:f}=n;if(n.headers=u=kn.from(u),n.url=g1(x1(n.baseURL,n.url,n.allowAbsoluteUrls),t.params,t.paramsSerializer),f&&u.set("Authorization","Basic "+btoa((f.username||"")+":"+(f.password?unescape(encodeURIComponent(f.password)):""))),W.isFormData(r)){if(mn.hasStandardBrowserEnv||mn.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if(W.isFunction(r.getHeader
Line truncated
|
|
||||||
`+u.map(ax).join(`
|
|
||||||
`):" "+ax(u[0]):"as no adapter specified";throw new Be("There is no suitable adapter to dispatch the request "+f,"ERR_NOT_SUPPORT")}return i}const E1={getAdapter:EO,adapters:Uh};function _m(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ml(null,t)}function rx(t){return _m(t),t.headers=kn.from(t.headers),t.data=Em.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),E1.getAdapter(t.adapter||fl.adapter,t)(t).then(function(s){return _m(t),s.data=Em.call(t,t.transformResponse,s),s.headers=kn.from(s.headers),s},function(s){return y1(s)||(_m(t),s&&s.response&&(s.response.data=Em.call(t,t.transformResponse,s.response),s.response.headers=kn.from(s.response.headers))),Promise.reject(s)})}const _1="1.13.6",Du={};["object","boolean","number","function","string","symbol"].forEach((t,n)=>{Du[t]=function(s){return typeof s===t||"a"+(n<1?"n ":" ")+t}});const sx={};Du.transitional=function(n,r,s){function i(c,u){return"[Axios v"+_1+"] Transitional option '"+c+"'"+u+(s?". "+s:"")}return(c,u,f)=>{if(n===!1)throw new Be(i(u," has been removed"+(r?" in "+r:"")),Be.ERR_DEPRECATED);return r&&!sx[u]&&(sx[u]=!0,console.warn(i(u," has been deprecated since v"+r+" and will be removed in the near future"))),n?n(c,u,f):!0}};Du.spelling=function(n){return(r,s)=>(console.warn(`${s} is likely a misspelling of ${n}`),!0)};function _O(t,n,r){if(typeof t!="object")throw new Be("options must be an object",Be.ERR_BAD_OPTION_VALUE);const s=Object.keys(t);let i=s.length;for(;i-- >0;){const c=s[i],u=n[c];if(u){const f=t[c],g=f===void 0||u(f,c,t);if(g!==!0)throw new Be("option "+c+" must be "+g,Be.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Be("Unknown option "+c,Be.ERR_BAD_OPTION)}}const Kc={assertOptions:_O,validators:Du},ra=Kc.validators;let Ss=class{constructor(n){this.defaults=n||{},this.interceptors={request:new Yb,response:new Yb}}async request(n,r){try{return await this._request(n,r)}catch(s){if(s instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const c=i.stack?i.stack.replace(/^.+\n/,""):"";try{s.stack?c&&!String(s.stack).endsWith(c.replace(/^.+\n.+\n/,""))&&(s.stack+=`
|
|
||||||
`+c):s.stack=c}catch{}}throw s}}_request(n,r){typeof n=="string"?(r=r||{},r.url=n):r=n||{},r=Es(this.defaults,r);const{transitional:s,paramsSerializer:i,headers:c}=r;s!==void 0&&Kc.assertOptions(s,{silentJSONParsing:ra.transitional(ra.boolean),forcedJSONParsing:ra.transitional(ra.boolean),clarifyTimeoutError:ra.transitional(ra.boolean),legacyInterceptorReqResOrdering:ra.transitional(ra.boolean)},!1),i!=null&&(W.isFunction(i)?r.paramsSerializer={serialize:i}:Kc.assertOptions(i,{encode:ra.function,serialize:ra.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Kc.assertOptions(r,{baseUrl:ra.spelling("baseURL"),withXsrfToken:ra.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let u=c&&W.merge(c.common,c[r.method]);c&&W.forEach(["delete","get","head","post","put","patch","common"],S=>{delete c[S]}),r.headers=kn.concat(u,c);const f=[];let g=!0;this.interceptors.request.forEach(function(_){if(typeof _.runWhen=="function"&&_.runWhen(r)===!1)return;g=g&&_.synchronous;const E=r.transitional||zh;E&&E.legacyInterceptorReqResOrdering?f.unshift(_.fulfilled,_.rejected):f.push(_.fulfilled,_.rejected)});const p=[];this.interceptors.response.forEach(function(_){p.push(_.fulfilled,_.rejected)});let y,v=0,w;if(!g){const S=[rx.bind(this),void 0];for(S.unshift(...f),S.push(...p),w=S.length,y=Promise.resolve(r);v<w;)y=y.then(S[v++],S[v++]);return y}w=f.length;let C=r;for(;v<w;){const S=f[v++],_=f[v++];try{C=S(C)}catch(E){_.call(this,E);break}}try{y=rx.call(this,C)}catch(S){return Promise.reject(S)}for(v=0,w=p.length;v<w;)y=y.then(p[v++],p[v++]);return y}getUri(n){n=Es(this.defaults,n);const r=x1(n.baseURL,n.url,n.allowAbsoluteUrls);return g1(r,n.params,n.paramsSerializer)}};W.forEach(["delete","get","head","options"],function(n){Ss.prototype[n]=function(r,s){return this.request(Es(s||{},{method:n,url:r,data:(s||{}).data}))}});W.forEach(["post","put","patch"],function(n){function r(s){return function(c,u,f){return this.request(Es(f||{},{method:n,headers:s?{"Content-Type":"multipart/form-data"}:{},url:c,data:u}))}}Ss.prototype[n]=r(),Ss.prototype[n+"Form"]=r(!0)});let CO=class C1{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(c){r=c});const s=this;this.promise.then(i=>{if(!s._listeners)return;let c=s._listeners.length;for(;c-- >0;)s._listeners[c](i);s._listeners=null}),this.promise.then=i=>{let c;const u=new Promise(f=>{s.subscribe(f),c=f}).then(i);return u.cancel=function(){s.unsubscribe(c)},u},n(function(c,u,f){s.reason||(s.reason=new ml(c,u,f),r(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const r=this._listeners.indexOf(n);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const n=new AbortController,r=s=>{n.abort(s)};return this.subscribe(r),n.signal.unsubscribe=()=>this.unsubscribe(r),n.signal}static source(){let n;return{token:new C1(function(i){n=i}),cancel:n}}};function NO(t){return function(r){return t.apply(null,r)}}function RO(t){return W.isObject(t)&&t.isAxiosError===!0}const nh={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(nh).forEach(([t,n])=>{nh[n]=t});function N1(t){const n=new Ss(t),r=s1(Ss.prototype.request,n);return W.extend(r,Ss.prototype,n,{allOwnKeys:!0}),W.extend(r,n,null,{allOwnKeys:!0}),r.create=function(i){return N1(Es(t,i))},r}const Bt=N1(fl);Bt.Axios=Ss;Bt.CanceledError=ml;Bt.CancelToken=CO;Bt.isCancel=y1;Bt.VERSION=_1;
Line truncated
|
|
||||||
* @license lucide-react v0.522.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const JO=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ej=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,r,s)=>s?s.toUpperCase():r.toLowerCase()),ix=t=>{const n=ej(t);return n.charAt(0).toUpperCase()+n.slice(1)},j1=(...t)=>t.filter((n,r,s)=>!!n&&n.trim()!==""&&s.indexOf(n)===r).join(" ").trim(),tj=t=>{for(const n in t)if(n.startsWith("aria-")||n==="role"||n==="title")return!0};/**
|
|
||||||
* @license lucide-react v0.522.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/var nj={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
||||||
* @license lucide-react v0.522.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const aj=b.forwardRef(({color:t="currentColor",size:n=24,strokeWidth:r=2,absoluteStrokeWidth:s,className:i="",children:c,iconNode:u,...f},g)=>b.createElement("svg",{ref:g,...nj,width:n,height:n,stroke:t,strokeWidth:s?Number(r)*24/Number(n):r,className:j1("lucide",i),...!c&&!tj(f)&&{"aria-hidden":"true"},...f},[...u.map(([p,y])=>b.createElement(p,y)),...Array.isArray(c)?c:[c]]));/**
|
|
||||||
* @license lucide-react v0.522.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const rj=(t,n)=>{const r=b.forwardRef(({className:s,...i},c)=>b.createElement(aj,{ref:c,iconNode:n,className:j1(`lucide-${JO(ix(t))}`,`lucide-${t}`,s),...i}));return r.displayName=ix(t),r};/**
|
|
||||||
* @license lucide-react v0.522.0 - ISC
|
|
||||||
*
|
|
||||||
* This source code is licensed under the ISC license.
|
|
||||||
* See the LICENSE file in the root directory of this source tree.
|
|
||||||
*/const sj=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],oj=rj("x",sj),lx=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,cx=Oh,Ph=(t,n)=>r=>{var s;if((n==null?void 0:n.variants)==null)return cx(t,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:c}=n,u=Object.keys(i).map(p=>{const y=r==null?void 0:r[p],v=c==null?void 0:c[p];if(y===null)return null;const w=lx(y)||lx(v);return i[p][w]}),f=r&&Object.entries(r).reduce((p,y)=>{let[v,w]=y;return w===void 0||(p[v]=w),p},{}),g=n==null||(s=n.compoundVariants)===null||s===void 0?void 0:s.reduce((p,y)=>{let{class:v,className:w,...C}=y;return Object.entries(C).every(S=>{let[_,E]=S;return Array.isArray(E)?E.includes({...c,...f}[_]):{...c,...f}[_]===E})?[...p,v,w]:p},[]);return cx(t,u,g,r==null?void 0:r.class,r==null?void 0:r.className)};function sr(t){const n=b.useRef(t);return b.useEffect(()=>{n.current=t}),b.useMemo(()=>(...r)=>{var s;return(s=n.current)==null?void 0:s.call(n,...r)},[])}function ij(t,n=globalThis==null?void 0:globalThis.document){const r=sr(t);b.useEffect(()=>{const s=i=>{i.key==="Escape"&&r(i)};return n.addEventListener("keydown",s,{capture:!0}),()=>n.removeEventListener("keydown",s,{capture:!0})},[r,n])}var lj="DismissableLayer",ah="dismissableLayer.update",cj="dismissableLayer.pointerDownOutside",uj="dismissableLayer.focusOutside",ux,k1=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Lu=b.forwardRef((t,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:c,onInteractOutside:u,onDismiss:f,...g}=t,p=b.useContext(k1),[y,v]=b.useState(null),w=(y==null?void 0:y.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,C]=b.useState({}),S=Wt(n,U=>v(U)),_=Array.from(p.layers),[E]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),R=_.indexOf(E),k=y?_.indexOf(y):-1,A=p.layersWithOutsidePointerEventsDisabled.size>0,D=k>=R,H=mj(U=>{const F=U.target,de=[...p.branches].some(fe=>fe.contains(F));!D||de||(i==null||i(U),u==null||u(U),U.defaultPrevented||f==null||f())},w),$=hj(U=>{const F=U.target;[...p.branches].some(fe=>fe.contains(F))||(c==null||c(U),u==null||u(U),U.defaultPrevented||f==null||f())},w);return ij(U=>{k===p.layers.size-1&&(s==null||s(U),!U.defaultPrevented&&f&&(U.preventDefault(),f()))},w),b.useEffect(()=>{if(y)return r&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(ux=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(y)),p.layers.add(y),dx(),()=>{r&&p.layersWithOutsidePointerEventsDisabled.size===1&&(w.body.style.pointerEvents=ux)}},[y,w,r,p]),b.useEffect(()=>()=>{y&&(p.layers.delete(y),p.layersWithOutsidePointerEventsDisabled.delete(y),dx())},[y,p]),b.useEffect(()=>{const U=()=>C({});return document.addEventListener(ah,U),()=>document.removeEventListener(ah,U)},[]),h.jsx(kt.div,{...g,ref:S,style:{pointerEvents:A?D?"auto":"none":void 0,...t.style},onFocusCapture:qe(t.onFocusCapture,$.onFocusCapture),onBlurCapture:qe(t.onBlurCapture,$.onBlurCapture),onPointerDownCapture:qe(t.onPointerDownCapture,H.onPointerDownCapture)})});Lu.displayName=lj;var dj="DismissableLayerBranch",fj=b.forwardRef((t,n)=>{const r=b.useContext(k1),s=b.useRef(null),i=Wt(n,s);return b.useEffect(()=>{const c=s.current;if(c)return r.branches.add(c),()=>{r.branches.delete(c)}},[r.branches]),h.jsx(kt.div,{...t,ref:i})});fj.displayName=dj;function mj(t,n=globalThis==null?void 0:globalThis.document){const r=sr(t),s=b.useRef(!1),i=b.useRef(()=>{});return b.useEffect(()=>{const c=f=>{if(f.target&&!s.current){let g=function(){M1(cj,r,p,{discrete:!0})};const p={originalEvent:f};f.pointerType==="touch"?(n.removeEventListener("click",i.current),i.current=g,n.addEventListener("click",i.current,{once:!0})):g()}else n.removeEventListener("click",i.current);s.current=!1},u=window.setTimeout(()=>{n.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(u),n.removeEventListener("pointerdown",c),n.removeEventListener("click",i.current)}},[n,r]),{onPointerDownCapture:()=>s.current=!0}}function hj(t,n=globalThis==null?void 0:globalThis.document){const r=sr(t),s=b.useRef(!1);return b.useEffect(()=>{const i=c=>{c.target&&!s.current&&M1(uj,r,{originalEvent:c},{discrete:!1})};return n.addEventListener("focusin",i),()=>n.removeEventListener("focusin",i)},[n,r]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function dx(){const t=new CustomEvent(ah);document.dispatchEvent(t)}function M1(t,n,r,{discrete:s}){const i=r.originalEvent.target,c=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});n&&i.addEventListener(t,n,{once:!0}),s?T1(i,c):i.dispatchEvent(c)}var Cm="focusScope.autoFocusOnMount",Nm="focusScope.autoFocusOnUnmount",fx={bubbles:!1,cancelable:!0},pj="FocusScope",Uu=b.forwardRef((t,n)=>{const{loop:r=!1,trapped:s=!1,onMountAutoFocus:i,onUnmountAutoFocus:c,...u}=t,[f,g]=b.useState(null),p=sr(i),y=sr(c),v=b.useRef(null),w=Wt(n,_=>g(_Line truncated
|
|
||||||
.`.concat(_j,` {
|
|
||||||
overflow: hidden `).concat(s,`;
|
|
||||||
padding-right: `).concat(f,"px ").concat(s,`;
|
|
||||||
}
|
|
||||||
body[`).concat(Oo,`] {
|
|
||||||
overflow: hidden `).concat(s,`;
|
|
||||||
overscroll-behavior: contain;
|
|
||||||
`).concat([n&&"position: relative ".concat(s,";"),r==="margin"&&`
|
|
||||||
padding-left: `.concat(i,`px;
|
|
||||||
padding-top: `).concat(c,`px;
|
|
||||||
padding-right: `).concat(u,`px;
|
|
||||||
margin-left:0;
|
|
||||||
margin-top:0;
|
|
||||||
margin-right: `).concat(f,"px ").concat(s,`;
|
|
||||||
`),r==="padding"&&"padding-right: ".concat(f,"px ").concat(s,";")].filter(Boolean).join(""),`
|
|
||||||
}
|
|
||||||
|
|
||||||
.`).concat(Qc,` {
|
|
||||||
right: `).concat(f,"px ").concat(s,`;
|
|
||||||
}
|
|
||||||
|
|
||||||
.`).concat(Wc,` {
|
|
||||||
margin-right: `).concat(f,"px ").concat(s,`;
|
|
||||||
}
|
|
||||||
|
|
||||||
.`).concat(Qc," .").concat(Qc,` {
|
|
||||||
right: 0 `).concat(s,`;
|
|
||||||
}
|
|
||||||
|
|
||||||
.`).concat(Wc," .").concat(Wc,` {
|
|
||||||
margin-right: 0 `).concat(s,`;
|
|
||||||
}
|
|
||||||
|
|
||||||
body[`).concat(Oo,`] {
|
|
||||||
`).concat(Cj,": ").concat(f,`px;
|
|
||||||
}
|
|
||||||
`)},yx=function(){var t=parseInt(document.body.getAttribute(Oo)||"0",10);return isFinite(t)?t:0},Fj=function(){b.useEffect(function(){return document.body.setAttribute(Oo,(yx()+1).toString()),function(){var t=yx()-1;t<=0?document.body.removeAttribute(Oo):document.body.setAttribute(Oo,t.toString())}},[])},$j=function(t){var n=t.noRelative,r=t.noImportant,s=t.gapMode,i=s===void 0?"margin":s;Fj();var c=b.useMemo(function(){return Vj(i)},[i]);return b.createElement(Ij,{styles:qj(c,!n,i,r?"":"!important")})},rh=!1;if(typeof window<"u")try{var Bc=Object.defineProperty({},"passive",{get:function(){return rh=!0,!0}});window.addEventListener("test",Bc,Bc),window.removeEventListener("test",Bc,Bc)}catch{rh=!1}var bo=rh?{passive:!1}:!1,Gj=function(t){return t.tagName==="TEXTAREA"},P1=function(t,n){if(!(t instanceof Element))return!1;var r=window.getComputedStyle(t);return r[n]!=="hidden"&&!(r.overflowY===r.overflowX&&!Gj(t)&&r[n]==="visible")},Yj=function(t){return P1(t,"overflowY")},Zj=function(t){return P1(t,"overflowX")},bx=function(t,n){var r=n.ownerDocument,s=n;do{typeof ShadowRoot<"u"&&s instanceof ShadowRoot&&(s=s.host);var i=H1(t,s);if(i){var c=V1(t,s),u=c[1],f=c[2];if(u>f)return!0}s=s.parentNode}while(s&&s!==r.body);return!1},Xj=function(t){var n=t.scrollTop,r=t.scrollHeight,s=t.clientHeight;return[n,r,s]},Kj=function(t){var n=t.scrollLeft,r=t.scrollWidth,s=t.clientWidth;return[n,r,s]},H1=function(t,n){return t==="v"?Yj(n):Zj(n)},V1=function(t,n){return t==="v"?Xj(n):Kj(n)},Qj=function(t,n){return t==="h"&&n==="rtl"?-1:1},Wj=function(t,n,r,s,i){var c=Qj(t,window.getComputedStyle(n).direction),u=c*s,f=r.target,g=n.contains(f),p=!1,y=u>0,v=0,w=0;do{if(!f)break;var C=V1(t,f),S=C[0],_=C[1],E=C[2],R=_-E-c*S;(S||R)&&H1(t,f)&&(v+=R,w+=S);var k=f.parentNode;f=k&&k.nodeType===Node.DOCUMENT_FRAGMENT_NODE?k.host:k}while(!g&&f!==document.body||g&&(n.contains(f)||n===f));return(y&&Math.abs(v)<1||!y&&Math.abs(w)<1)&&(p=!0),p},Pc=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},xx=function(t){return[t.deltaX,t.deltaY]},wx=function(t){return t&&"current"in t?t.current:t},Jj=function(t,n){return t[0]===n[0]&&t[1]===n[1]},ek=function(t){return`
|
|
||||||
.block-interactivity-`.concat(t,` {pointer-events: none;}
|
|
||||||
.allow-interactivity-`).concat(t,` {pointer-events: all;}
|
|
||||||
`)},tk=0,xo=[];function nk(t){var n=b.useRef([]),r=b.useRef([0,0]),s=b.useRef(),i=b.useState(tk++)[0],c=b.useState(B1)[0],u=b.useRef(t);b.useEffect(function(){u.current=t},[t]),b.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var _=Ej([t.lockRef.current],(t.shards||[]).map(wx),!0).filter(Boolean);return _.forEach(function(E){return E.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),_.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var f=b.useCallback(function(_,E){if("touches"in _&&_.touches.length===2||_.type==="wheel"&&_.ctrlKey)return!u.current.allowPinchZoom;var R=Pc(_),k=r.current,A="deltaX"in _?_.deltaX:k[0]-R[0],D="deltaY"in _?_.deltaY:k[1]-R[1],H,$=_.target,U=Math.abs(A)>Math.abs(D)?"h":"v";if("touches"in _&&U==="h"&&$.type==="range")return!1;var F=window.getSelection(),de=F&&F.anchorNode,fe=de?de===$||de.contains($):!1;if(fe)return!1;var me=bx(U,$);if(!me)return!0;if(me?H=U:(H=U==="v"?"h":"v",me=bx(U,$)),!me)return!1;if(!s.current&&"changedTouches"in _&&(A||D)&&(s.current=H),!H)return!0;var se=s.current||H;return Wj(se,E,_,se==="h"?A:D)},[]),g=b.useCallback(function(_){var E=_;if(!(!xo.length||xo[xo.length-1]!==c)){var R="deltaY"in E?xx(E):Pc(E),k=n.current.filter(function(H){return H.name===E.type&&(H.target===E.target||E.target===H.shadowParent)&&Jj(H.delta,R)})[0];if(k&&k.should){E.cancelable&&E.preventDefault();return}if(!k){var A=(u.current.shards||[]).map(wx).filter(Boolean).filter(function(H){return H.contains(E.target)}),D=A.length>0?f(E,A[0]):!u.current.noIsolation;D&&E.cancelable&&E.preventDefault()}}},[]),p=b.useCallback(function(_,E,R,k){var A={name:_,delta:E,target:R,should:k,shadowParent:ak(R)};n.current.push(A),setTimeout(function(){n.current=n.current.filter(function(D){return D!==A})},1)},[]),y=b.useCallback(function(_){r.current=Pc(_),s.current=void 0},[]),v=b.useCallback(function(_){p(_.type,xx(_),_.target,f(_,t.lockRef.current))},[]),w=b.useCallback(function(_){p(_.type,Pc(_),_.target,f(_,t.lockRef.current))},[]);b.useEffect(function(){return xo.push(c),t.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:w}),document.addEventListener("wheel",g,bo),document.addEventListener("touchmove",g,bo),document.addEventListener("touchstart",y,bo),function(){xo=xo.filter(function(_){return _!==c}),document.removeEventListener("wheel",g,bo),document.removeEventListener("touchmove",g,bo),document.removeEventListener("touchstart",y,bo)}},[]);var C=t.removeScrollBar,S=t.inert;return b.createElement(b.Fragment,null,S?b.createElement(c,{styles:ek(i)}):null,C?b.createElement($j,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function ak(t){for(var n=null;t!==null;)t instanceof ShadowRoot&&(n=t.host,t=t.host),t=t.parentNode;return n}const rk=kj(U1,nk);var Hu=b.forwardRef(function(t,n){return b.createElement(Pu,Aa({},t,{ref:n,sideCar:rk}))});Hu.classNames=Pu.classNames;var sk=function(t){if(typeof document>"u")return null;var n=Array.isArray(t)?t[0]:t;return n.ownerDocument.body},wo=new WeakMap,Hc=new WeakMap,Vc={},jm=0,I1=function(t){return t&&(t.host||I1(t.parentNode))},ok=function(t,n){return n.map(function(r){if(t.contains(r))return r;var s=I1(r);return s&&t.contains(s)?s:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},ik=function(t,n,r,s){var i=ok(n,Array.isArray(t)?t:[t]);Vc[r]||(Vc[r]=new WeakMap);var c=Vc[r],u=[],f=new Set,g=new Set(i),p=function(v){!v||f.has(v)||(f.add(v),p(v.parentNode))};i.forEach(p);var y=function(v){!v||g.has(v)||Array.prototype.forEach.call(v.children,function(w){if(f.has(w))y(w);else try{var C=w.getAttribute(s),S=C!==null&&C!=="false",_=(wo.get(w)||0)+1,E=(c.get(w)||0)+1;wo.set(w,_),c.set(w,E),u.push(w),_===1&&S&&Hc.set(w,!0),E===1&&w.setAttribute(r,"true"),S||w.setAttribute(s,"true")}catch(R){console.error("aria-hidden: cannot operate on ",w,R)}})};return y(n),f.clear(),jm++,function(){u.forEach(function(v){var w=wo.get(v)-1,C=c.get(v)-1;wo.set(v,w),c.set(v,C),w||(Hc.has(v)||v.removeAttribute(s),Hc.delete(v)),C||v.removeAttribute(r)}),jm--,jm||(wo=new WeakMap,wo=new WeakMap,Hc=new WeakMap,Vc={})}},Vh=function(t,n,r){r===void 0&&(r="data-aria-hidden");var s=Array.from(Array.isArray(t)?t:[t]),i=sk(t);return i?(s.push.apply(s,Array.from(i.querySelectorAll("[aria-live], script"))),ik(s,i,r,"aria-hidden")):function(){return null}},Vu="Dialog",[q1]=Ts(Vu),[lk,ba]=q1(Vu),F1=t=>{const{__scopeDialog:n,children:r,open:s,defaultOpen:i,onOpenChange:c,modal:u=!0}=t,f=b.useRef(null),g=b.useRef(null),[p,y]=Bh({prop:s,defaultProp:i??!1,onChange:c,caller:Vu});return h.jsx(lk,{scope:n,triggerRef:f,contentRef:g,contentId:To(),titleId:To(),descriptionId:To(),open:p,onOpenChange:y,onOpenToggle:b.useCallback(()=>y(v=>!v),[y]),modal:u,children:r})};F1.displayName=Vu;var $1="DialogTrigger",ck=b.forwardRef
Line truncated
|
|
||||||
|
|
||||||
If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
||||||
|
|
||||||
For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return b.useEffect(()=>{t&&(document.getElementById(t)||console.error(r))},[r,t]),null},gk="DialogDescriptionWarning",vk=({contentRef:t,descriptionId:n})=>{const s=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${aw(gk).contentName}}.`;return b.useEffect(()=>{var c;const i=(c=t.current)==null?void 0:c.getAttribute("aria-describedby");n&&i&&(document.getElementById(n)||console.warn(s))},[s,t,n]),null},yk=F1,bk=Y1,rw=Z1,sw=X1,xk=Q1,wk=J1,Sk=tw,Ek=Symbol.for("react.lazy"),ru=Nu[" use ".trim().toString()];function _k(t){return typeof t=="object"&&t!==null&&"then"in t}function ow(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===Ek&&"_payload"in t&&_k(t._payload)}function iw(t){const n=Ck(t),r=b.forwardRef((s,i)=>{let{children:c,...u}=s;ow(c)&&typeof ru=="function"&&(c=ru(c._payload));const f=b.Children.toArray(c),g=f.find(Rk);if(g){const p=g.props.children,y=f.map(v=>v===g?b.Children.count(p)>1?b.Children.only(null):b.isValidElement(p)?p.props.children:null:v);return h.jsx(n,{...u,ref:i,children:b.isValidElement(p)?b.cloneElement(p,void 0,y):null})}return h.jsx(n,{...u,ref:i,children:c})});return r.displayName=`${t}.Slot`,r}var lw=iw("Slot");function Ck(t){const n=b.forwardRef((r,s)=>{let{children:i,...c}=r;if(ow(i)&&typeof ru=="function"&&(i=ru(i._payload)),b.isValidElement(i)){const u=Tk(i),f=Ak(c,i.props);return i.type!==b.Fragment&&(f.ref=s?hl(s,u):u),b.cloneElement(i,f)}return b.Children.count(i)>1?b.Children.only(null):null});return n.displayName=`${t}.SlotClone`,n}var Nk=Symbol("radix.slottable");function Rk(t){return b.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Nk}function Ak(t,n){const r={...n};for(const s in n){const i=t[s],c=n[s];/^on[A-Z]/.test(s)?i&&c?r[s]=(...f)=>{const g=c(...f);return i(...f),g}:i&&(r[s]=i):s==="style"?r[s]={...i,...c}:s==="className"&&(r[s]=[i,c].filter(Boolean).join(" "))}return{...t,...r}}function Tk(t){var s,i;let n=(s=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:s.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?t.ref:(n=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var Ok=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],jk=Ok.reduce((t,n)=>{const r=iw(`Primitive.${n}`),s=b.forwardRef((i,c)=>{const{asChild:u,...f}=i,g=u?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(g,{...f,ref:c})});return s.displayName=`Primitive.${n}`,{...t,[n]:s}},{});function kk(t){const[n,r]=b.useState(void 0);return Fr(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const s=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const c=i[0];let u,f;if("borderBoxSize"in c){const g=c.borderBoxSize,p=Array.isArray(g)?g[0]:g;u=p.inlineSize,f=p.blockSize}else u=t.offsetWidth,f=t.offsetHeight;r({width:u,height:f})});return s.observe(t,{box:"border-box"}),()=>s.unobserve(t)}else r(void 0)},[t]),n}const Mk=["top","right","bottom","left"],$r=Math.min,In=Math.max,su=Math.round,Ic=Math.floor,ka=t=>({x:t,y:t}),Dk={left:"right",right:"left",bottom:"top",top:"bottom"};function sh(t,n,r){return In(t,$r(n,r))}function or(t,n){return typeof t=="function"?t(n):t}function ir(t){return t.split("-")[0]}function Yo(t){return t.split("-")[1]}function $h(t){return t==="x"?"y":"x"}function Gh(t){return t==="y"?"height":"width"}function Oa(t){const n=t[0];return n==="t"||n==="b"?"y":"x"}function Yh(t){return $h(Oa(t))}function zk(t,n,r){r===void 0&&(r=!1);const s=Yo(t),i=Yh(t),c=Gh(i);let u=i==="x"?s===(r?"end":"start")?"right":"left":s==="start"?"bottom":"top";return n.reference[c]>n.floating[c]&&(u=ou(u)),[u,ou(u)]}function Lk(t){const n=ou(t);return[oh(t),n,oh(n)]}function oh(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const Sx=["left","right"],Ex=["right","left"],Uk=["top","bottom"],Bk=["bottom","top"];function Pk(t,n,r){switch(t){case"top":case"bottom":return r?n?Ex:Sx:n?Sx:Ex;case"left":case"right":return n?Uk:Bk;default:return[]}}function Hk(t,n,r,s){const i=Yo(t);let c=Pk(ir(t),r==="start",s);return i&&(c=c.map(u=>u+"-"+i),n&&(c=c.concat(c.map(oh)))),c}function ou(t){const n=ir(t);return Dk[n]+t.slice(n.length)}function Vk(t){return{top:0,right:0,bottom:0,left:0,...t}}function cw(t){return typeof t!="number"?Vk(t):{top:t,right:t,bottom:t,left:t}}function iu(t){const{x:n,y:r,width:s,height:i}=t;return{width:s,height:i,top:r,left:n,right:n+s,bottom:r+i,x:n,y:r}}function _x(t,n,r){let{reference:s,floating:i}=t;const c=Oa(n),u=Yh(n),f=Gh(u),g=ir(n),p=c==="y",y=s.x+s.width/2-i.width/2,v=s.y+s.height/2-i.height/2,w=s[f]/2-i[f]/2;let C;switch(g){case"top":C={x:y,y:s.y-i.height};break;case"bottom":C={x:y,y:s.y+s.height};break;case"right":C={x:s.x+s.width,y:v};break;case"left":C={x:s.x-i.width,y:v};
Line truncated
|
|
||||||
[data-state=closed]
|
|
||||||
){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function XD(t,n){typeof t=="function"?t(n):t!=null&&(t.current=n)}function KD(...t){return n=>t.forEach(r=>XD(r,n))}function iS(...t){return b.useCallback(KD(...t),t)}const Dx=t=>{switch(t){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return t}};function Lm(t,n){if(!t)return()=>{};const r=t.style.cssText;return Object.assign(t.style,n),()=>{t.style.cssText=r}}function QD(...t){return(...n)=>{for(const r of t)typeof r=="function"&&r(...n)}}const Um={DURATION:.5,EASE:[.32,.72,0,1]},WD=8,JD=26,e4=()=>()=>{};function t4(){const{direction:t,isOpen:n,shouldScaleBackground:r,setBackgroundColorOnScale:s,noBodyStyles:i}=Xu(),c=ae.useRef(null),u=b.useMemo(()=>document.body.style.backgroundColor,[]);function f(){return(window.innerWidth-JD)/window.innerWidth}ae.useEffect(()=>{if(n&&r){c.current&&clearTimeout(c.current);const g=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!g)return;QD(s&&!i?Lm(document.body,{background:"black"}):e4,Lm(g,{transformOrigin:Dx(t)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${Um.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Um.EASE.join(",")})`}));const p=Lm(g,{borderRadius:`${WD}px`,overflow:"hidden",...Dx(t)?{transform:`scale(${f()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${f()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{p(),c.current=window.setTimeout(()=>{u?document.body.style.background=u:document.body.style.removeProperty("background")},Um.DURATION*1e3)}}},[n,r,u])}const n4=ae.forwardRef(function({...t},n){const{overlayRef:r,snapPoints:s,onRelease:i,shouldFade:c,isOpen:u,modal:f,shouldAnimate:g}=Xu(),p=iS(n,r),y=s&&s.length>0;if(!f)return null;const v=ae.useCallback(w=>i(w),[i]);return ae.createElement(rw,{onMouseUp:v,ref:p,"data-vaul-overlay":"","data-vaul-snap-points":u&&y?"true":"false","data-vaul-snap-points-overlay":u&&c?"true":"false","data-vaul-animate":g!=null&&g.current?"true":"false",...t})});n4.displayName="Drawer.Overlay";const a4=ae.forwardRef(function({onPointerDownOutside:t,style:n,onOpenAutoFocus:r,...s},i){const{drawerRef:c,onPress:u,onRelease:f,onDrag:g,keyboardIsOpen:p,snapPointsOffset:y,activeSnapPointIndex:v,modal:w,isOpen:C,direction:S,snapPoints:_,container:E,handleOnly:R,shouldAnimate:k,autoFocus:A}=Xu(),[D,H]=ae.useState(!1),$=iS(i,c),U=ae.useRef(null),F=ae.useRef(null),de=ae.useRef(!1),fe=_&&_.length>0;t4();const me=(G,he,ve=0)=>{if(de.current)return!0;const T=Math.abs(G.y),K=Math.abs(G.x),te=K>T,le=["bottom","right"].includes(he)?1:-1;if(he==="left"||he==="right"){if(!(G.x*le<0)&&K>=0&&K<=ve)return te}else if(!(G.y*le<0)&&T>=0&&T<=ve)return!te;return de.current=!0,!0};ae.useEffect(()=>{fe&&window.requestAnimationFrame(()=>{H(!0)})},[]);function se(G){U.current=null,de.current=!1,f(G)}return ae.createElement(sw,{"data-vaul-drawer-direction":S,"data-vaul-drawer":"","data-vaul-delayed-snap-points":D?"true":"false","data-vaul-snap-points":C&&fe?"true":"false","data-vaul-custom-container":E?"true":"false","data-vaul-animate":k!=null&&k.current?"true":"false",...s,ref:$,style:y&&y.length>0?{"--snap-point-height":`${y[v??0]}px`,...n}:n,onPointerDown:G=>{R||(s.onPointerDown==null||s.onPointerDown.call(s,G),U.current={x:G.pageX,y:G.pageY},u(G))},onOpenAutoFocus:G=>{r==null||r(G),A||G.preventDefault()},onPointerDownOutside:G=>{i
Line truncated
|
|
||||||
[data-input-otp] {
|
|
||||||
--nojs-bg: white !important;
|
|
||||||
--nojs-fg: black !important;
|
|
||||||
|
|
||||||
background-color: var(--nojs-bg) !important;
|
|
||||||
color: var(--nojs-fg) !important;
|
|
||||||
caret-color: var(--nojs-fg) !important;
|
|
||||||
letter-spacing: .25em !important;
|
|
||||||
text-align: center !important;
|
|
||||||
border: 1px solid var(--nojs-fg) !important;
|
|
||||||
border-radius: 4px !important;
|
|
||||||
width: 100% !important;
|
|
||||||
}
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
[data-input-otp] {
|
|
||||||
--nojs-bg: black !important;
|
|
||||||
--nojs-fg: white !important;
|
|
||||||
}
|
|
||||||
}`,TS="Popover",[OS]=Ts(TS,[Gu]),Wu=Gu(),[cL,Qr]=OS(TS),jS="PopoverAnchor",wz=b.forwardRef((t,n)=>{const{__scopePopover:r,...s}=t,i=Qr(jS,r),c=Wu(r),{onCustomAnchorAdd:u,onCustomAnchorRemove:f}=i;return b.useEffect(()=>(u(),()=>f()),[u,f]),h.jsx(Jh,{...c,...s,ref:n})});wz.displayName=jS;var kS="PopoverTrigger",Sz=b.forwardRef((t,n)=>{const{__scopePopover:r,...s}=t,i=Qr(kS,r),c=Wu(r),u=Wt(n,i.triggerRef),f=h.jsx(kt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":US(i.open),...s,ref:u,onClick:qe(t.onClick,i.onOpenToggle)});return i.hasCustomAnchor?f:h.jsx(Jh,{asChild:!0,...c,children:f})});Sz.displayName=kS;var mp="PopoverPortal",[Ez,_z]=OS(mp,{forceMount:void 0}),MS=t=>{const{__scopePopover:n,forceMount:r,children:s,container:i}=t,c=Qr(mp,n);return h.jsx(Ez,{scope:n,forceMount:r,children:h.jsx(za,{present:r||c.open,children:h.jsx(Bu,{asChild:!0,container:i,children:s})})})};MS.displayName=mp;var Uo="PopoverContent",DS=b.forwardRef((t,n)=>{const r=_z(Uo,t.__scopePopover),{forceMount:s=r.forceMount,...i}=t,c=Qr(Uo,t.__scopePopover);return h.jsx(za,{present:s||c.open,children:c.modal?h.jsx(Nz,{...i,ref:n}):h.jsx(Rz,{...i,ref:n})})});DS.displayName=Uo;var Cz=Do("PopoverContent.RemoveScroll"),Nz=b.forwardRef((t,n)=>{const r=Qr(Uo,t.__scopePopover),s=b.useRef(null),i=Wt(n,s),c=b.useRef(!1);return b.useEffect(()=>{const u=s.current;if(u)return Vh(u)},[]),h.jsx(Hu,{as:Cz,allowPinchZoom:!0,children:h.jsx(zS,{...t,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:qe(t.onCloseAutoFocus,u=>{var f;u.preventDefault(),c.current||(f=r.triggerRef.current)==null||f.focus()}),onPointerDownOutside:qe(t.onPointerDownOutside,u=>{const f=u.detail.originalEvent,g=f.button===0&&f.ctrlKey===!0,p=f.button===2||g;c.current=p},{checkForDefaultPrevented:!1}),onFocusOutside:qe(t.onFocusOutside,u=>u.preventDefault(),{checkForDefaultPrevented:!1})})})}),Rz=b.forwardRef((t,n)=>{const r=Qr(Uo,t.__scopePopover),s=b.useRef(!1),i=b.useRef(!1);return h.jsx(zS,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{var u,f;(u=t.onCloseAutoFocus)==null||u.call(t,c),c.defaultPrevented||(s.current||(f=r.triggerRef.current)==null||f.focus(),c.preventDefault()),s.current=!1,i.current=!1},onInteractOutside:c=>{var g,p;(g=t.onInteractOutside)==null||g.call(t,c),c.defaultPrevented||(s.current=!0,c.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const u=c.target;((p=r.triggerRef.current)==null?void 0:p.contains(u))&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&i.current&&c.preventDefault()}})}),zS=b.forwardRef((t,n)=>{const{__scopePopover:r,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:c,disableOutsidePointerEvents:u,onEscapeKeyDown:f,onPointerDownOutside:g,onFocusOutside:p,onInteractOutside:y,...v}=t,w=Qr(Uo,r),C=Wu(r);return Hh(),h.jsx(Uu,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:i,onUnmountAutoFocus:c,children:h.jsx(Lu,{asChild:!0,disableOutsidePointerEvents:u,onInteractOutside:y,onEscapeKeyDown:f,onPointerDownOutside:g,onFocusOutside:p,onDismiss:()=>w.onOpenChange(!1),children:h.jsx(Ow,{"data-state":US(w.open),role:"dialog",id:w.contentId,...C,...v,ref:n,style:{...v.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),LS="PopoverClose",Az=b.forwardRef((t,n)=>{const{__scopePopover:r,...s}=t,i=Qr(LS,r);return h.jsx(kt.button,{type:"button",...s,ref:n,onClick:qe(t.onClick,()=>i.onOpenChange(!1))})});Az.displayName=LS;var Tz="PopoverArrow",Oz=b.forwardRef((t,n)=>{const{__scopePopover:r,...s}=t,i=Wu(r);return h.jsx(jw,{...i,...s,ref:n})});Oz.displayName=Tz;function US(t){return t?"open":"closed"}var jz=MS,BS=DS;const hp=b.createContext(null);hp.displayName="PanelGroupContext";const qn={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandleId:"data-panel-resize-handle-id"},pp=10,ko=b.useLayoutEffect,Yx=Nu.useId,kz=typeof Yx=="function"?Yx:()=>null;let Mz=0;function PS(t=null){const n=kz(),r=b.useRef(t||n||null);return r.current===null&&(r.current=""+Mz++),t??r.current}function HS({children:t,className:n="",collapsedSize:r,collapsible:s,defaultSize:i,forwardedRef:c,id:u,maxSize:f,minSize:g,onCollapse:p,onExpand:y,onResize:v,order:w,style:C,tagName:S="div",..._}){const E=b.useContext(hp);if(E===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:R,expandPanel:k,getPanelSize:A,getPanelStyle:D,groupId:H,isPanelCollapsed:$,reevaluatePanelConstraints:U,registerPanel:F,resizeP
Line truncated
|
|
||||||
Vendored
+2
-2
@@ -5,8 +5,8 @@
|
|||||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Evolution GO Manager</title>
|
<title>Evolution GO Manager</title>
|
||||||
<script type="module" crossorigin src="/assets/index-CRnVAbpY.js"></script>
|
<script type="module" crossorigin src="/assets/index-B7iM18f_.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-BsMXpWP7.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-B6NZfWVh.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
|||||||
@@ -0,0 +1,66 @@
|
|||||||
|
# Evolution Passkey Helper
|
||||||
|
|
||||||
|
Extensão de navegador que conclui o pareamento por **chave de acesso (passkey)**
|
||||||
|
do WhatsApp Web para o Evolution GO.
|
||||||
|
|
||||||
|
Desde que o WhatsApp passou a exigir passkey ao vincular um novo dispositivo, o
|
||||||
|
QR Code sozinho não basta em algumas contas: é preciso executar uma cerimônia
|
||||||
|
WebAuthn (`navigator.credentials.get`), e o navegador só permite isso quando o
|
||||||
|
código roda no origin da _relying party_ — `whatsapp.com`. Esta extensão roda
|
||||||
|
**somente** em `web.whatsapp.com` e serve apenas como "palco" com o origin
|
||||||
|
correto para a biometria/PIN. Ela **não** interage com o login do WhatsApp Web e
|
||||||
|
**não** coleta nem envia dados para terceiros.
|
||||||
|
|
||||||
|
## Como funciona
|
||||||
|
|
||||||
|
1. Você escaneia o QR normalmente no Evolution (manager). Se a conta exigir
|
||||||
|
passkey, o painel de conexão mostra o botão **"Abrir WhatsApp Web"**.
|
||||||
|
2. Esse botão abre `https://web.whatsapp.com/#wapk=<payload>`, onde `payload` é
|
||||||
|
um base64url de `{ "t": "<token da instância>", "b": "<url base da API>" }`.
|
||||||
|
3. O content script lê esse payload, consulta o status da cerimônia na API,
|
||||||
|
executa a cerimônia WebAuthn no origin `whatsapp.com` e envia a assinatura de
|
||||||
|
volta para o Evolution.
|
||||||
|
4. Se o pareamento exigir confirmação manual do código, o painel mostra o código
|
||||||
|
e um botão **"Confirmar código"**. Na maioria dos casos (QR escaneado antes),
|
||||||
|
o Evolution confirma automaticamente e você só precisa voltar ao manager.
|
||||||
|
|
||||||
|
Nenhuma `host_permission` é necessária: as chamadas partem do origin
|
||||||
|
`web.whatsapp.com` e o backend do Evolution já libera CORS para essa origem.
|
||||||
|
|
||||||
|
## Endpoints usados (Evolution GO)
|
||||||
|
|
||||||
|
- `GET {base}/passkey-ceremony/{token}` — status/desafio da cerimônia
|
||||||
|
- `POST {base}/passkey-ceremony/{token}/response` — envia a assertion WebAuthn
|
||||||
|
- `POST {base}/passkey-ceremony/{token}/confirm` — confirma o código (quando aplicável)
|
||||||
|
|
||||||
|
Onde `base` é a URL da sua API Evolution e `token` é o token da instância.
|
||||||
|
|
||||||
|
## Instalar no Google Chrome
|
||||||
|
|
||||||
|
1. Baixe/descompacte esta pasta (a que contém `manifest.json`).
|
||||||
|
2. Abra `chrome://extensions`.
|
||||||
|
3. Ative o **Modo do desenvolvedor** (canto superior direito).
|
||||||
|
4. Clique em **Carregar sem compactação**.
|
||||||
|
5. Selecione esta pasta.
|
||||||
|
6. Volte ao Evolution e clique em **"Abrir WhatsApp Web"**.
|
||||||
|
|
||||||
|
## Instalar no Microsoft Edge
|
||||||
|
|
||||||
|
1. Baixe/descompacte esta pasta (a que contém `manifest.json`).
|
||||||
|
2. Abra `edge://extensions`.
|
||||||
|
3. Ative o **Modo de desenvolvedor** (canto inferior esquerdo).
|
||||||
|
4. Clique em **Carregar sem pacote**.
|
||||||
|
5. Selecione esta pasta.
|
||||||
|
6. Volte ao Evolution e clique em **"Abrir WhatsApp Web"**.
|
||||||
|
|
||||||
|
## Dicas
|
||||||
|
|
||||||
|
- Use o navegador logado na mesma conta (Google/iCloud) onde a passkey do
|
||||||
|
WhatsApp está salva, ou tenha o celular por perto para o fluxo de biometria.
|
||||||
|
- A cerimônia tem validade curta. Se expirar, gere um novo QR no Evolution.
|
||||||
|
|
||||||
|
## Whitelabel
|
||||||
|
|
||||||
|
A extensão é genérica: nada de URL ou token fica embutido no código — tudo vem
|
||||||
|
no `payload` da URL. Para personalizar nome/ícone, edite o `manifest.json` e o
|
||||||
|
título/descrição do painel em `content.js`.
|
||||||
@@ -0,0 +1,481 @@
|
|||||||
|
/*
|
||||||
|
* Evolution Passkey Helper
|
||||||
|
* ------------------------
|
||||||
|
* Executa a cerimonia WebAuthn (passkey) do WhatsApp Web no dominio correto
|
||||||
|
* (web.whatsapp.com) para concluir um pareamento iniciado pelo Evolution GO.
|
||||||
|
*
|
||||||
|
* Fluxo:
|
||||||
|
* 1. O manager/CRM abre https://web.whatsapp.com/#wapk=<payload>, onde payload
|
||||||
|
* e um base64url de JSON { t: <token_da_instancia>, b: <url_base_da_api> }.
|
||||||
|
* 2. Este content script le o payload, faz polling do status da cerimonia na
|
||||||
|
* API, e quando o desafio (publicKey) esta disponivel executa
|
||||||
|
* navigator.credentials.get() (permitido pois roda no origin whatsapp.com).
|
||||||
|
* 3. A assertion e enviada de volta para a API; quando o pareamento exige a
|
||||||
|
* confirmacao manual do codigo, um botao de confirmar e exibido.
|
||||||
|
*
|
||||||
|
* Nenhuma host_permission e necessaria: as chamadas partem do origin
|
||||||
|
* web.whatsapp.com e o backend libera CORS para essa origem.
|
||||||
|
*
|
||||||
|
* A extensao e whitelabel: nada e hardcoded, tudo vem no payload da URL.
|
||||||
|
*/
|
||||||
|
(function () {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
var STORAGE_KEY = "__evo_wapk_ceremony__";
|
||||||
|
var POLL_INTERVAL_MS = 2000;
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// base64url helpers
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
function b64uToBuf(value) {
|
||||||
|
var b64 = String(value || "").replace(/-/g, "+").replace(/_/g, "/");
|
||||||
|
while (b64.length % 4) b64 += "=";
|
||||||
|
var bin = atob(b64);
|
||||||
|
var bytes = new Uint8Array(bin.length);
|
||||||
|
for (var i = 0; i < bin.length; i++) bytes[i] = bin.charCodeAt(i);
|
||||||
|
return bytes.buffer;
|
||||||
|
}
|
||||||
|
|
||||||
|
function bufToB64u(buf) {
|
||||||
|
var bytes = new Uint8Array(buf);
|
||||||
|
var bin = "";
|
||||||
|
for (var i = 0; i < bytes.length; i++) bin += String.fromCharCode(bytes[i]);
|
||||||
|
return btoa(bin).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/g, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// Ceremony payload (URL hash -> sessionStorage)
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
function readCeremonyFromHash() {
|
||||||
|
try {
|
||||||
|
var m = (location.hash || "").match(/[#&]wapk=([^&]+)/);
|
||||||
|
if (!m) return null;
|
||||||
|
var json = atob(m[1].replace(/-/g, "+").replace(/_/g, "/"));
|
||||||
|
var obj = JSON.parse(json);
|
||||||
|
if (obj && obj.t && obj.b) return { t: obj.t, b: obj.b };
|
||||||
|
} catch (e) {}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getCeremony() {
|
||||||
|
var fromHash = readCeremonyFromHash();
|
||||||
|
if (fromHash) {
|
||||||
|
try {
|
||||||
|
sessionStorage.setItem(STORAGE_KEY, JSON.stringify(fromHash));
|
||||||
|
} catch (e) {}
|
||||||
|
try {
|
||||||
|
history.replaceState(null, "", location.pathname + location.search);
|
||||||
|
} catch (e) {}
|
||||||
|
return fromHash;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
var raw = sessionStorage.getItem(STORAGE_KEY);
|
||||||
|
if (raw) return JSON.parse(raw);
|
||||||
|
} catch (e) {}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
function clearCeremony() {
|
||||||
|
try {
|
||||||
|
sessionStorage.removeItem(STORAGE_KEY);
|
||||||
|
} catch (e) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// API calls (Evolution GO passkey ceremony endpoints)
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
function apiBase(cer) {
|
||||||
|
return String(cer.b || "").replace(/\/+$/, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
async function fetchStatus(cer) {
|
||||||
|
var res = await fetch(apiBase(cer) + "/passkey-ceremony/" + encodeURIComponent(cer.t), {
|
||||||
|
method: "GET",
|
||||||
|
headers: { Accept: "application/json" },
|
||||||
|
});
|
||||||
|
var json = await res.json().catch(function () {
|
||||||
|
return null;
|
||||||
|
});
|
||||||
|
if (!res.ok) {
|
||||||
|
throw new Error((json && json.error) || "Falha ao consultar o status (HTTP " + res.status + ").");
|
||||||
|
}
|
||||||
|
return (json && json.data) || json || {};
|
||||||
|
}
|
||||||
|
|
||||||
|
async function sendResponse(cer, webauthnResponse) {
|
||||||
|
var res = await fetch(apiBase(cer) + "/passkey-ceremony/" + encodeURIComponent(cer.t) + "/response", {
|
||||||
|
method: "POST",
|
||||||
|
headers: { "Content-Type": "application/json" },
|
||||||
|
body: JSON.stringify(webauthnResponse),
|
||||||
|
});
|
||||||
|
var json = await res.json().catch(function () {
|
||||||
|
return null;
|
||||||
|
});
|
||||||
|
if (!res.ok) {
|
||||||
|
throw new Error((json && json.error) || "Falha ao enviar a chave de acesso.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function sendConfirm(cer) {
|
||||||
|
var res = await fetch(apiBase(cer) + "/passkey-ceremony/" + encodeURIComponent(cer.t) + "/confirm", {
|
||||||
|
method: "POST",
|
||||||
|
headers: { "Content-Type": "application/json" },
|
||||||
|
});
|
||||||
|
var json = await res.json().catch(function () {
|
||||||
|
return null;
|
||||||
|
});
|
||||||
|
if (!res.ok) {
|
||||||
|
throw new Error((json && json.error) || "Falha ao confirmar o codigo.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// WebAuthn ceremony
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
function buildPublicKeyOptions(pk) {
|
||||||
|
return {
|
||||||
|
challenge: b64uToBuf(pk.challenge),
|
||||||
|
timeout: pk.timeout || 60000,
|
||||||
|
rpId: pk.rpId || "whatsapp.com",
|
||||||
|
allowCredentials: (pk.allowCredentials || []).map(function (c) {
|
||||||
|
return {
|
||||||
|
type: c.type || "public-key",
|
||||||
|
id: b64uToBuf(c.id),
|
||||||
|
transports: c.transports,
|
||||||
|
};
|
||||||
|
}),
|
||||||
|
userVerification: pk.userVerification || "required",
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function toWebAuthnResponse(cred) {
|
||||||
|
var r = cred.response;
|
||||||
|
var body = {
|
||||||
|
id: cred.id,
|
||||||
|
rawId: bufToB64u(cred.rawId),
|
||||||
|
type: cred.type,
|
||||||
|
response: {
|
||||||
|
clientDataJSON: bufToB64u(r.clientDataJSON),
|
||||||
|
authenticatorData: bufToB64u(r.authenticatorData),
|
||||||
|
signature: bufToB64u(r.signature),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
if (r.userHandle && r.userHandle.byteLength) {
|
||||||
|
body.response.userHandle = bufToB64u(r.userHandle);
|
||||||
|
}
|
||||||
|
return body;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// UI
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
var prefersDark = false;
|
||||||
|
try {
|
||||||
|
prefersDark = window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches;
|
||||||
|
} catch (e) {}
|
||||||
|
|
||||||
|
var THEME = prefersDark
|
||||||
|
? { bg: "#111b21", fg: "#e9edef", sub: "#8696a0", border: "#25d366", card: "#202c33" }
|
||||||
|
: { bg: "#ffffff", fg: "#111b21", sub: "#667781", border: "#25d366", card: "#f0f2f5" };
|
||||||
|
|
||||||
|
function el(tag, styles, text) {
|
||||||
|
var node = document.createElement(tag);
|
||||||
|
if (styles) node.setAttribute("style", styles);
|
||||||
|
if (text != null) node.textContent = text;
|
||||||
|
return node;
|
||||||
|
}
|
||||||
|
|
||||||
|
var PANEL_STYLE = [
|
||||||
|
"position:fixed",
|
||||||
|
"top:18px",
|
||||||
|
"right:18px",
|
||||||
|
"z-index:2147483647",
|
||||||
|
"width:340px",
|
||||||
|
"max-width:calc(100vw - 36px)",
|
||||||
|
"background:" + THEME.bg,
|
||||||
|
"color:" + THEME.fg,
|
||||||
|
"border:1px solid " + THEME.border,
|
||||||
|
"border-radius:14px",
|
||||||
|
"box-shadow:0 12px 34px rgba(0,0,0,0.28)",
|
||||||
|
"font-family:-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif",
|
||||||
|
"padding:18px",
|
||||||
|
].join(";");
|
||||||
|
|
||||||
|
var BTN_STYLE = [
|
||||||
|
"display:block",
|
||||||
|
"width:100%",
|
||||||
|
"box-sizing:border-box",
|
||||||
|
"background:#25d366",
|
||||||
|
"color:#04391f",
|
||||||
|
"border:none",
|
||||||
|
"border-radius:9px",
|
||||||
|
"padding:11px 14px",
|
||||||
|
"font-size:14px",
|
||||||
|
"font-weight:700",
|
||||||
|
"cursor:pointer",
|
||||||
|
"margin-top:12px",
|
||||||
|
].join(";");
|
||||||
|
|
||||||
|
var ui = null;
|
||||||
|
|
||||||
|
function ensurePanel() {
|
||||||
|
if (ui) return ui;
|
||||||
|
|
||||||
|
var panel = el("div", PANEL_STYLE);
|
||||||
|
panel.id = "evo-wapk-panel";
|
||||||
|
|
||||||
|
var closeBtn = el(
|
||||||
|
"div",
|
||||||
|
"position:absolute;top:10px;right:14px;cursor:pointer;color:" + THEME.sub + ";font-size:20px;line-height:1;",
|
||||||
|
"\u00d7"
|
||||||
|
);
|
||||||
|
closeBtn.title = "Fechar";
|
||||||
|
closeBtn.addEventListener("click", function () {
|
||||||
|
panel.remove();
|
||||||
|
ui = null;
|
||||||
|
stopPolling();
|
||||||
|
});
|
||||||
|
|
||||||
|
var title = el("div", "font-size:15px;font-weight:800;margin-bottom:4px;display:flex;align-items:center;gap:8px;");
|
||||||
|
title.appendChild(el("span", "font-size:16px;", "\uD83D\uDD11"));
|
||||||
|
title.appendChild(el("span", null, "Chave de acesso (passkey)"));
|
||||||
|
|
||||||
|
var desc = el("div", "font-size:13px;line-height:1.5;color:" + THEME.sub + ";", "");
|
||||||
|
|
||||||
|
var codeBox = el(
|
||||||
|
"div",
|
||||||
|
"display:none;margin-top:12px;padding:10px;border-radius:9px;background:" +
|
||||||
|
THEME.card +
|
||||||
|
";text-align:center;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:22px;font-weight:800;letter-spacing:3px;"
|
||||||
|
);
|
||||||
|
|
||||||
|
var status = el("div", "font-size:12px;margin-top:10px;color:" + THEME.sub + ";min-height:16px;");
|
||||||
|
|
||||||
|
var btn = el("button", BTN_STYLE, "Autenticar com chave de acesso");
|
||||||
|
btn.style.display = "none";
|
||||||
|
|
||||||
|
panel.appendChild(closeBtn);
|
||||||
|
panel.appendChild(title);
|
||||||
|
panel.appendChild(desc);
|
||||||
|
panel.appendChild(codeBox);
|
||||||
|
panel.appendChild(btn);
|
||||||
|
panel.appendChild(status);
|
||||||
|
document.body.appendChild(panel);
|
||||||
|
|
||||||
|
ui = { panel: panel, desc: desc, codeBox: codeBox, status: status, btn: btn };
|
||||||
|
return ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
function setDesc(text) {
|
||||||
|
ensurePanel().desc.textContent = text;
|
||||||
|
}
|
||||||
|
|
||||||
|
function setStatus(text, kind) {
|
||||||
|
var u = ensurePanel();
|
||||||
|
u.status.textContent = text || "";
|
||||||
|
u.status.style.color = kind === "error" ? "#e02e2a" : kind === "success" ? "#1fa855" : THEME.sub;
|
||||||
|
}
|
||||||
|
|
||||||
|
function showButton(label, onClick) {
|
||||||
|
var u = ensurePanel();
|
||||||
|
u.btn.textContent = label;
|
||||||
|
u.btn.style.display = "block";
|
||||||
|
u.btn.disabled = false;
|
||||||
|
u.btn.style.opacity = "1";
|
||||||
|
u.btn.style.cursor = "pointer";
|
||||||
|
u.btn.onclick = onClick;
|
||||||
|
}
|
||||||
|
|
||||||
|
function hideButton() {
|
||||||
|
ensurePanel().btn.style.display = "none";
|
||||||
|
}
|
||||||
|
|
||||||
|
function disableButton() {
|
||||||
|
var u = ensurePanel();
|
||||||
|
u.btn.disabled = true;
|
||||||
|
u.btn.style.opacity = "0.6";
|
||||||
|
u.btn.style.cursor = "default";
|
||||||
|
}
|
||||||
|
|
||||||
|
function showCode(code) {
|
||||||
|
var u = ensurePanel();
|
||||||
|
if (code) {
|
||||||
|
u.codeBox.textContent = code;
|
||||||
|
u.codeBox.style.display = "block";
|
||||||
|
} else {
|
||||||
|
u.codeBox.style.display = "none";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// State machine driven by polling
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
var pollTimer = null;
|
||||||
|
var started = false; // ja passamos por algum estagio ativo
|
||||||
|
var busy = false; // executando credentials.get / POST
|
||||||
|
|
||||||
|
function stopPolling() {
|
||||||
|
if (pollTimer) {
|
||||||
|
clearTimeout(pollTimer);
|
||||||
|
pollTimer = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function schedulePoll(cer) {
|
||||||
|
stopPolling();
|
||||||
|
pollTimer = setTimeout(function () {
|
||||||
|
poll(cer);
|
||||||
|
}, POLL_INTERVAL_MS);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function authenticate(cer, pk) {
|
||||||
|
busy = true;
|
||||||
|
disableButton();
|
||||||
|
showCode("");
|
||||||
|
setStatus("Aguardando a sua chave de acesso...");
|
||||||
|
try {
|
||||||
|
var cred = await navigator.credentials.get({ publicKey: buildPublicKeyOptions(pk) });
|
||||||
|
if (!cred) throw new Error("Autenticacao cancelada.");
|
||||||
|
setStatus("Enviando assinatura...");
|
||||||
|
await sendResponse(cer, toWebAuthnResponse(cred));
|
||||||
|
hideButton();
|
||||||
|
setStatus("Assinatura enviada. Concluindo pareamento...");
|
||||||
|
} catch (e) {
|
||||||
|
setStatus((e && e.message) || String(e), "error");
|
||||||
|
showButton("Tentar novamente", function () {
|
||||||
|
authenticate(cer, pk);
|
||||||
|
});
|
||||||
|
} finally {
|
||||||
|
busy = false;
|
||||||
|
schedulePoll(cer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function confirmCode(cer) {
|
||||||
|
busy = true;
|
||||||
|
disableButton();
|
||||||
|
setStatus("Confirmando...");
|
||||||
|
try {
|
||||||
|
await sendConfirm(cer);
|
||||||
|
hideButton();
|
||||||
|
setStatus("Confirmado. Concluindo pareamento...");
|
||||||
|
} catch (e) {
|
||||||
|
setStatus((e && e.message) || String(e), "error");
|
||||||
|
showButton("Tentar novamente", function () {
|
||||||
|
confirmCode(cer);
|
||||||
|
});
|
||||||
|
} finally {
|
||||||
|
busy = false;
|
||||||
|
schedulePoll(cer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function poll(cer) {
|
||||||
|
if (busy) {
|
||||||
|
schedulePoll(cer);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var st;
|
||||||
|
try {
|
||||||
|
st = await fetchStatus(cer);
|
||||||
|
} catch (e) {
|
||||||
|
setStatus((e && e.message) || String(e), "error");
|
||||||
|
schedulePoll(cer);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var stage = st.stage || "";
|
||||||
|
|
||||||
|
switch (stage) {
|
||||||
|
case "challenge":
|
||||||
|
started = true;
|
||||||
|
setDesc("Clique para concluir o pareamento com a sua chave de acesso do WhatsApp.");
|
||||||
|
showCode("");
|
||||||
|
if (!busy) {
|
||||||
|
showButton("Autenticar com chave de acesso", function () {
|
||||||
|
authenticate(cer, st.publicKey);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
schedulePoll(cer);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "awaiting_confirmation":
|
||||||
|
started = true;
|
||||||
|
hideButton();
|
||||||
|
showCode("");
|
||||||
|
setDesc("Assinatura enviada ao WhatsApp.");
|
||||||
|
setStatus("Aguardando codigo de confirmacao...");
|
||||||
|
schedulePoll(cer);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "confirmation":
|
||||||
|
started = true;
|
||||||
|
setDesc("Verifique se o codigo abaixo e o mesmo exibido no seu celular.");
|
||||||
|
showCode(st.code);
|
||||||
|
if (st.skipHandoffUX) {
|
||||||
|
hideButton();
|
||||||
|
setStatus("Confirmando automaticamente...");
|
||||||
|
} else {
|
||||||
|
setStatus("");
|
||||||
|
showButton("Confirmar codigo", function () {
|
||||||
|
confirmCode(cer);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
schedulePoll(cer);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "confirmed":
|
||||||
|
started = true;
|
||||||
|
hideButton();
|
||||||
|
showCode("");
|
||||||
|
setDesc("Chave de acesso confirmada.");
|
||||||
|
setStatus("Concluindo pareamento...");
|
||||||
|
schedulePoll(cer);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "error":
|
||||||
|
started = true;
|
||||||
|
showCode("");
|
||||||
|
setDesc("Ocorreu um erro no pareamento por chave de acesso.");
|
||||||
|
setStatus(st.error || "Erro desconhecido.", "error");
|
||||||
|
// Permite reiniciar caso o backend reemita o desafio
|
||||||
|
schedulePoll(cer);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "":
|
||||||
|
default:
|
||||||
|
if (started) {
|
||||||
|
// Estado limpo apos ter iniciado = pareamento concluido (PairSuccess)
|
||||||
|
hideButton();
|
||||||
|
showCode("");
|
||||||
|
setDesc("Pareamento concluido com sucesso!");
|
||||||
|
setStatus("Pode voltar ao Evolution. Esta aba ja pode ser fechada.", "success");
|
||||||
|
clearCeremony();
|
||||||
|
stopPolling();
|
||||||
|
} else {
|
||||||
|
setDesc("Aguardando o desafio de chave de acesso do WhatsApp...");
|
||||||
|
setStatus("Escaneie o QR no Evolution para iniciar.");
|
||||||
|
schedulePoll(cer);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// Init
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
function start() {
|
||||||
|
var cer = getCeremony();
|
||||||
|
if (!cer) return;
|
||||||
|
ensurePanel();
|
||||||
|
setDesc("Preparando cerimonia de chave de acesso...");
|
||||||
|
poll(cer);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (document.body) {
|
||||||
|
start();
|
||||||
|
} else {
|
||||||
|
document.addEventListener("DOMContentLoaded", start);
|
||||||
|
}
|
||||||
|
})();
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"manifest_version": 3,
|
||||||
|
"name": "Evolution Passkey Helper",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "Conclui o pareamento por chave de acesso (passkey) do WhatsApp Web para o Evolution GO. Roda apenas em web.whatsapp.com e nao coleta dados.",
|
||||||
|
"content_scripts": [
|
||||||
|
{
|
||||||
|
"matches": ["https://web.whatsapp.com/*"],
|
||||||
|
"js": ["content.js"],
|
||||||
|
"run_at": "document_idle"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -3,8 +3,8 @@ package call_handler
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
call_service "github.com/EvolutionAPI/evolution-go/pkg/call/service"
|
call_service "github.com/evolution-foundation/evolution-go/pkg/call/service"
|
||||||
instance_model "github.com/EvolutionAPI/evolution-go/pkg/instance/model"
|
instance_model "github.com/evolution-foundation/evolution-go/pkg/instance/model"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
instance_model "github.com/EvolutionAPI/evolution-go/pkg/instance/model"
|
instance_model "github.com/evolution-foundation/evolution-go/pkg/instance/model"
|
||||||
logger_wrapper "github.com/EvolutionAPI/evolution-go/pkg/logger"
|
logger_wrapper "github.com/evolution-foundation/evolution-go/pkg/logger"
|
||||||
whatsmeow_service "github.com/EvolutionAPI/evolution-go/pkg/whatsmeow/service"
|
whatsmeow_service "github.com/evolution-foundation/evolution-go/pkg/whatsmeow/service"
|
||||||
"github.com/gomessguii/logger"
|
"github.com/gomessguii/logger"
|
||||||
"go.mau.fi/whatsmeow"
|
"go.mau.fi/whatsmeow"
|
||||||
"go.mau.fi/whatsmeow/types"
|
"go.mau.fi/whatsmeow/types"
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package chat_handler
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
chat_service "github.com/EvolutionAPI/evolution-go/pkg/chat/service"
|
chat_service "github.com/evolution-foundation/evolution-go/pkg/chat/service"
|
||||||
instance_model "github.com/EvolutionAPI/evolution-go/pkg/instance/model"
|
instance_model "github.com/evolution-foundation/evolution-go/pkg/instance/model"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -302,7 +302,7 @@ func (c *chatHandler) ChatUnmute(ctx *gin.Context) {
|
|||||||
// @Success 200 {object} gin.H "success"
|
// @Success 200 {object} gin.H "success"
|
||||||
// @Failure 400 {object} gin.H "Error on validation"
|
// @Failure 400 {object} gin.H "Error on validation"
|
||||||
// @Failure 500 {object} gin.H "Internal server error"
|
// @Failure 500 {object} gin.H "Internal server error"
|
||||||
// @Router /chat/history-sync-request [post]
|
// @Router /chat/history-sync [post]
|
||||||
func (c *chatHandler) HistorySyncRequest(ctx *gin.Context) {
|
func (c *chatHandler) HistorySyncRequest(ctx *gin.Context) {
|
||||||
getInstance := ctx.MustGet("instance")
|
getInstance := ctx.MustGet("instance")
|
||||||
|
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
instance_model "github.com/EvolutionAPI/evolution-go/pkg/instance/model"
|
instance_model "github.com/evolution-foundation/evolution-go/pkg/instance/model"
|
||||||
logger_wrapper "github.com/EvolutionAPI/evolution-go/pkg/logger"
|
logger_wrapper "github.com/evolution-foundation/evolution-go/pkg/logger"
|
||||||
"github.com/EvolutionAPI/evolution-go/pkg/utils"
|
"github.com/evolution-foundation/evolution-go/pkg/utils"
|
||||||
whatsmeow_service "github.com/EvolutionAPI/evolution-go/pkg/whatsmeow/service"
|
whatsmeow_service "github.com/evolution-foundation/evolution-go/pkg/whatsmeow/service"
|
||||||
"go.mau.fi/whatsmeow"
|
"go.mau.fi/whatsmeow"
|
||||||
"go.mau.fi/whatsmeow/appstate"
|
"go.mau.fi/whatsmeow/appstate"
|
||||||
"go.mau.fi/whatsmeow/types"
|
"go.mau.fi/whatsmeow/types"
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package community_handler
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
community_service "github.com/EvolutionAPI/evolution-go/pkg/community/service"
|
community_service "github.com/evolution-foundation/evolution-go/pkg/community/service"
|
||||||
instance_model "github.com/EvolutionAPI/evolution-go/pkg/instance/model"
|
instance_model "github.com/evolution-foundation/evolution-go/pkg/instance/model"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
instance_model "github.com/EvolutionAPI/evolution-go/pkg/instance/model"
|
instance_model "github.com/evolution-foundation/evolution-go/pkg/instance/model"
|
||||||
logger_wrapper "github.com/EvolutionAPI/evolution-go/pkg/logger"
|
logger_wrapper "github.com/evolution-foundation/evolution-go/pkg/logger"
|
||||||
"github.com/EvolutionAPI/evolution-go/pkg/utils"
|
"github.com/evolution-foundation/evolution-go/pkg/utils"
|
||||||
whatsmeow_service "github.com/EvolutionAPI/evolution-go/pkg/whatsmeow/service"
|
whatsmeow_service "github.com/evolution-foundation/evolution-go/pkg/whatsmeow/service"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.mau.fi/whatsmeow"
|
"go.mau.fi/whatsmeow"
|
||||||
"go.mau.fi/whatsmeow/types"
|
"go.mau.fi/whatsmeow/types"
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import (
|
|||||||
"gorm.io/driver/postgres"
|
"gorm.io/driver/postgres"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
|
|
||||||
config_env "github.com/EvolutionAPI/evolution-go/pkg/config/env"
|
config_env "github.com/evolution-foundation/evolution-go/pkg/config/env"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
@@ -47,6 +47,7 @@ type Config struct {
|
|||||||
WhatsappVersionMajor int
|
WhatsappVersionMajor int
|
||||||
WhatsappVersionMinor int
|
WhatsappVersionMinor int
|
||||||
WhatsappVersionPatch int
|
WhatsappVersionPatch int
|
||||||
|
ProxyProtocol string
|
||||||
ProxyHost string
|
ProxyHost string
|
||||||
ProxyPort string
|
ProxyPort string
|
||||||
ProxyUsername string
|
ProxyUsername string
|
||||||
@@ -67,7 +68,6 @@ type Config struct {
|
|||||||
LogMaxAge int
|
LogMaxAge int
|
||||||
LogDirectory string
|
LogDirectory string
|
||||||
LogCompress bool
|
LogCompress bool
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// EnsureDBExists connects to postgres (without the target database) and creates it if it doesn't exist.
|
// EnsureDBExists connects to postgres (without the target database) and creates it if it doesn't exist.
|
||||||
@@ -265,6 +265,7 @@ func Load() *Config {
|
|||||||
whatsappVersionMinor := os.Getenv(config_env.WHATSAPP_VERSION_MINOR)
|
whatsappVersionMinor := os.Getenv(config_env.WHATSAPP_VERSION_MINOR)
|
||||||
whatsappVersionPatch := os.Getenv(config_env.WHATSAPP_VERSION_PATCH)
|
whatsappVersionPatch := os.Getenv(config_env.WHATSAPP_VERSION_PATCH)
|
||||||
|
|
||||||
|
proxyProtocol := os.Getenv(config_env.PROXY_PROTOCOL)
|
||||||
proxyHost := os.Getenv(config_env.PROXY_HOST)
|
proxyHost := os.Getenv(config_env.PROXY_HOST)
|
||||||
proxyPort := os.Getenv(config_env.PROXY_PORT)
|
proxyPort := os.Getenv(config_env.PROXY_PORT)
|
||||||
proxyUsername := os.Getenv(config_env.PROXY_USERNAME)
|
proxyUsername := os.Getenv(config_env.PROXY_USERNAME)
|
||||||
@@ -365,6 +366,7 @@ func Load() *Config {
|
|||||||
WhatsappVersionMajor: major,
|
WhatsappVersionMajor: major,
|
||||||
WhatsappVersionMinor: minor,
|
WhatsappVersionMinor: minor,
|
||||||
WhatsappVersionPatch: patch,
|
WhatsappVersionPatch: patch,
|
||||||
|
ProxyProtocol: proxyProtocol,
|
||||||
ProxyHost: proxyHost,
|
ProxyHost: proxyHost,
|
||||||
ProxyPort: proxyPort,
|
ProxyPort: proxyPort,
|
||||||
ProxyUsername: proxyUsername,
|
ProxyUsername: proxyUsername,
|
||||||
|
|||||||
Vendored
+1
@@ -33,6 +33,7 @@ const (
|
|||||||
WHATSAPP_VERSION_MAJOR = "WHATSAPP_VERSION_MAJOR"
|
WHATSAPP_VERSION_MAJOR = "WHATSAPP_VERSION_MAJOR"
|
||||||
WHATSAPP_VERSION_MINOR = "WHATSAPP_VERSION_MINOR"
|
WHATSAPP_VERSION_MINOR = "WHATSAPP_VERSION_MINOR"
|
||||||
WHATSAPP_VERSION_PATCH = "WHATSAPP_VERSION_PATCH"
|
WHATSAPP_VERSION_PATCH = "WHATSAPP_VERSION_PATCH"
|
||||||
|
PROXY_PROTOCOL = "PROXY_PROTOCOL"
|
||||||
PROXY_HOST = "PROXY_HOST"
|
PROXY_HOST = "PROXY_HOST"
|
||||||
PROXY_PORT = "PROXY_PORT"
|
PROXY_PORT = "PROXY_PORT"
|
||||||
PROXY_USERNAME = "PROXY_USERNAME"
|
PROXY_USERNAME = "PROXY_USERNAME"
|
||||||
|
|||||||
+364
-223
File diff suppressed because it is too large.
Load diff
@@ -1,8 +1,8 @@
|
|||||||
package nats_producer
|
package nats_producer
|
||||||
|
|
||||||
import (
|
import (
|
||||||
producer_interfaces "github.com/EvolutionAPI/evolution-go/pkg/events/interfaces"
|
producer_interfaces "github.com/evolution-foundation/evolution-go/pkg/events/interfaces"
|
||||||
logger_wrapper "github.com/EvolutionAPI/evolution-go/pkg/logger"
|
logger_wrapper "github.com/evolution-foundation/evolution-go/pkg/logger"
|
||||||
"github.com/gomessguii/logger"
|
"github.com/gomessguii/logger"
|
||||||
"github.com/nats-io/nats.go"
|
"github.com/nats-io/nats.go"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
producer_interfaces "github.com/EvolutionAPI/evolution-go/pkg/events/interfaces"
|
producer_interfaces "github.com/evolution-foundation/evolution-go/pkg/events/interfaces"
|
||||||
logger_wrapper "github.com/EvolutionAPI/evolution-go/pkg/logger"
|
logger_wrapper "github.com/evolution-foundation/evolution-go/pkg/logger"
|
||||||
"github.com/gomessguii/logger"
|
"github.com/gomessguii/logger"
|
||||||
amqp "github.com/rabbitmq/amqp091-go"
|
amqp "github.com/rabbitmq/amqp091-go"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
producer_interfaces "github.com/EvolutionAPI/evolution-go/pkg/events/interfaces"
|
producer_interfaces "github.com/evolution-foundation/evolution-go/pkg/events/interfaces"
|
||||||
logger_wrapper "github.com/EvolutionAPI/evolution-go/pkg/logger"
|
logger_wrapper "github.com/evolution-foundation/evolution-go/pkg/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
type webhookProducer struct {
|
type webhookProducer struct {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
logger_wrapper "github.com/EvolutionAPI/evolution-go/pkg/logger"
|
logger_wrapper "github.com/evolution-foundation/evolution-go/pkg/logger"
|
||||||
"github.com/gomessguii/logger"
|
"github.com/gomessguii/logger"
|
||||||
"github.com/gorilla/websocket"
|
"github.com/gorilla/websocket"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package group_handler
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
group_service "github.com/EvolutionAPI/evolution-go/pkg/group/service"
|
group_service "github.com/evolution-foundation/evolution-go/pkg/group/service"
|
||||||
instance_model "github.com/EvolutionAPI/evolution-go/pkg/instance/model"
|
instance_model "github.com/evolution-foundation/evolution-go/pkg/instance/model"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -20,6 +20,7 @@ type GroupHandler interface {
|
|||||||
GetMyGroups(ctx *gin.Context)
|
GetMyGroups(ctx *gin.Context)
|
||||||
JoinGroupLink(ctx *gin.Context)
|
JoinGroupLink(ctx *gin.Context)
|
||||||
LeaveGroup(ctx *gin.Context)
|
LeaveGroup(ctx *gin.Context)
|
||||||
|
UpdateGroupSettings(ctx *gin.Context)
|
||||||
}
|
}
|
||||||
|
|
||||||
type groupHandler struct {
|
type groupHandler struct {
|
||||||
@@ -477,6 +478,52 @@ func (g *groupHandler) LeaveGroup(ctx *gin.Context) {
|
|||||||
ctx.JSON(http.StatusOK, gin.H{"message": "success"})
|
ctx.JSON(http.StatusOK, gin.H{"message": "success"})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Update group settings
|
||||||
|
// @Summary Update group settings
|
||||||
|
// @Description Update group settings (announcement, not_announcement, locked, unlocked, approval_on, approval_off, admin_add, all_member_add)
|
||||||
|
// @Tags Group
|
||||||
|
// @Accept json
|
||||||
|
// @Produce json
|
||||||
|
// @Param message body group_service.UpdateGroupSettingsStruct true "Group data"
|
||||||
|
// @Success 200 {object} gin.H "success"
|
||||||
|
// @Failure 400 {object} gin.H "Error on validation"
|
||||||
|
// @Failure 500 {object} gin.H "Internal server error"
|
||||||
|
// @Router /group/settings [post]
|
||||||
|
func (g *groupHandler) UpdateGroupSettings(ctx *gin.Context) {
|
||||||
|
getInstance := ctx.MustGet("instance")
|
||||||
|
|
||||||
|
instance, ok := getInstance.(*instance_model.Instance)
|
||||||
|
if !ok {
|
||||||
|
ctx.JSON(http.StatusInternalServerError, gin.H{"error": "instance not found"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var data *group_service.UpdateGroupSettingsStruct
|
||||||
|
err := ctx.ShouldBindBodyWithJSON(&data)
|
||||||
|
if err != nil {
|
||||||
|
ctx.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if data.GroupJID == "" {
|
||||||
|
ctx.JSON(http.StatusBadRequest, gin.H{"error": "groupJid is required"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if data.Action == "" {
|
||||||
|
ctx.JSON(http.StatusBadRequest, gin.H{"error": "action is required"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
err = g.groupService.UpdateGroupSettings(data, instance)
|
||||||
|
if err != nil {
|
||||||
|
ctx.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
ctx.JSON(http.StatusOK, gin.H{"message": "success"})
|
||||||
|
}
|
||||||
|
|
||||||
func NewGroupHandler(
|
func NewGroupHandler(
|
||||||
groupService group_service.GroupService,
|
groupService group_service.GroupService,
|
||||||
) GroupHandler {
|
) GroupHandler {
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
instance_model "github.com/EvolutionAPI/evolution-go/pkg/instance/model"
|
instance_model "github.com/evolution-foundation/evolution-go/pkg/instance/model"
|
||||||
logger_wrapper "github.com/EvolutionAPI/evolution-go/pkg/logger"
|
logger_wrapper "github.com/evolution-foundation/evolution-go/pkg/logger"
|
||||||
"github.com/EvolutionAPI/evolution-go/pkg/utils"
|
"github.com/evolution-foundation/evolution-go/pkg/utils"
|
||||||
whatsmeow_service "github.com/EvolutionAPI/evolution-go/pkg/whatsmeow/service"
|
whatsmeow_service "github.com/evolution-foundation/evolution-go/pkg/whatsmeow/service"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/vincent-petithory/dataurl"
|
"github.com/vincent-petithory/dataurl"
|
||||||
"go.mau.fi/whatsmeow"
|
"go.mau.fi/whatsmeow"
|
||||||
@@ -116,7 +116,6 @@ type UpdateGroupRequestParticipantsStruct struct {
|
|||||||
Participants []string `json:"participants"`
|
Participants []string `json:"participants"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func (g *groupService) ensureClientConnected(instanceId string) (*whatsmeow.Client, error) {
|
func (g *groupService) ensureClientConnected(instanceId string) (*whatsmeow.Client, error) {
|
||||||
client := g.clientPointer[instanceId]
|
client := g.clientPointer[instanceId]
|
||||||
g.loggerWrapper.GetLogger(instanceId).LogInfo("[%s] Checking client connection status - Client exists: %v", instanceId, client != nil)
|
g.loggerWrapper.GetLogger(instanceId).LogInfo("[%s] Checking client connection status - Client exists: %v", instanceId, client != nil)
|
||||||
|
|||||||
@@ -6,9 +6,10 @@ import (
|
|||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
|
|
||||||
config "github.com/EvolutionAPI/evolution-go/pkg/config"
|
config "github.com/evolution-foundation/evolution-go/pkg/config"
|
||||||
instance_model "github.com/EvolutionAPI/evolution-go/pkg/instance/model"
|
instance_model "github.com/evolution-foundation/evolution-go/pkg/instance/model"
|
||||||
instance_service "github.com/EvolutionAPI/evolution-go/pkg/instance/service"
|
instance_service "github.com/evolution-foundation/evolution-go/pkg/instance/service"
|
||||||
|
"github.com/evolution-foundation/evolution-go/pkg/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type InstanceHandler interface {
|
type InstanceHandler interface {
|
||||||
@@ -358,7 +359,7 @@ func (i *instanceHandler) All(ctx *gin.Context) {
|
|||||||
// @Success 200 {object} gin.H "Instance"
|
// @Success 200 {object} gin.H "Instance"
|
||||||
// @Failure 400 {object} gin.H "Error on validation"
|
// @Failure 400 {object} gin.H "Error on validation"
|
||||||
// @Failure 500 {object} gin.H "Internal server error"
|
// @Failure 500 {object} gin.H "Internal server error"
|
||||||
// @Router /instance/get/{instanceId} [get]
|
// @Router /instance/info/{instanceId} [get]
|
||||||
func (i *instanceHandler) Info(ctx *gin.Context) {
|
func (i *instanceHandler) Info(ctx *gin.Context) {
|
||||||
instanceId := ctx.Param("instanceId")
|
instanceId := ctx.Param("instanceId")
|
||||||
|
|
||||||
@@ -449,9 +450,10 @@ func (i *instanceHandler) SetProxy(ctx *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
responseData := gin.H{
|
responseData := gin.H{
|
||||||
"host": data.Host,
|
"protocol": utils.NormalizeProxyProtocol(data.Protocol, data.Port),
|
||||||
"port": data.Port,
|
"host": data.Host,
|
||||||
"hasAuth": data.Username != "" && data.Password != "",
|
"port": data.Port,
|
||||||
|
"hasAuth": data.Username != "" && data.Password != "",
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx.JSON(http.StatusOK, gin.H{"message": "success", "data": responseData})
|
ctx.JSON(http.StatusOK, gin.H{"message": "success", "data": responseData})
|
||||||
@@ -536,6 +538,20 @@ type GetLogsQuery struct {
|
|||||||
Limit int `form:"limit"`
|
Limit int `form:"limit"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetLogs returns the log entries for an instance
|
||||||
|
// @Summary Get instance logs
|
||||||
|
// @Description Returns log entries for an instance, filterable by date range, level and limit
|
||||||
|
// @Tags Instance
|
||||||
|
// @Produce json
|
||||||
|
// @Param instanceId path string true "Instance Id"
|
||||||
|
// @Param start_date query string false "Start date (YYYY-MM-DD, defaults to 7 days ago)"
|
||||||
|
// @Param end_date query string false "End date (YYYY-MM-DD, defaults to now)"
|
||||||
|
// @Param level query string false "Log level filter"
|
||||||
|
// @Param limit query int false "Max number of entries"
|
||||||
|
// @Success 200 {object} gin.H "Logs"
|
||||||
|
// @Failure 400 {object} gin.H "Error on validation"
|
||||||
|
// @Failure 500 {object} gin.H "Internal server error"
|
||||||
|
// @Router /instance/logs/{instanceId} [get]
|
||||||
func (h *instanceHandler) GetLogs(c *gin.Context) {
|
func (h *instanceHandler) GetLogs(c *gin.Context) {
|
||||||
instanceId := c.Param("instanceId")
|
instanceId := c.Param("instanceId")
|
||||||
|
|
||||||
|
|||||||
@@ -3,16 +3,16 @@ package instance_repository
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
instance_model "github.com/EvolutionAPI/evolution-go/pkg/instance/model"
|
instance_model "github.com/evolution-foundation/evolution-go/pkg/instance/model"
|
||||||
"github.com/gomessguii/logger"
|
"github.com/gomessguii/logger"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
|
|
||||||
label_model "github.com/EvolutionAPI/evolution-go/pkg/label/model"
|
label_model "github.com/evolution-foundation/evolution-go/pkg/label/model"
|
||||||
label_repository "github.com/EvolutionAPI/evolution-go/pkg/label/repository"
|
label_repository "github.com/evolution-foundation/evolution-go/pkg/label/repository"
|
||||||
|
|
||||||
message_model "github.com/EvolutionAPI/evolution-go/pkg/message/model"
|
message_model "github.com/evolution-foundation/evolution-go/pkg/message/model"
|
||||||
message_repository "github.com/EvolutionAPI/evolution-go/pkg/message/repository"
|
message_repository "github.com/evolution-foundation/evolution-go/pkg/message/repository"
|
||||||
)
|
)
|
||||||
|
|
||||||
type InstanceRepository interface {
|
type InstanceRepository interface {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package instance_service
|
|||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
"context"
|
"context"
|
||||||
|
"encoding/base64"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
@@ -13,12 +14,13 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/EvolutionAPI/evolution-go/pkg/config"
|
"github.com/evolution-foundation/evolution-go/pkg/config"
|
||||||
instance_model "github.com/EvolutionAPI/evolution-go/pkg/instance/model"
|
instance_model "github.com/evolution-foundation/evolution-go/pkg/instance/model"
|
||||||
instance_repository "github.com/EvolutionAPI/evolution-go/pkg/instance/repository"
|
instance_repository "github.com/evolution-foundation/evolution-go/pkg/instance/repository"
|
||||||
event_types "github.com/EvolutionAPI/evolution-go/pkg/internal/event_types"
|
event_types "github.com/evolution-foundation/evolution-go/pkg/internal/event_types"
|
||||||
logger_wrapper "github.com/EvolutionAPI/evolution-go/pkg/logger"
|
logger_wrapper "github.com/evolution-foundation/evolution-go/pkg/logger"
|
||||||
whatsmeow_service "github.com/EvolutionAPI/evolution-go/pkg/whatsmeow/service"
|
"github.com/evolution-foundation/evolution-go/pkg/utils"
|
||||||
|
whatsmeow_service "github.com/evolution-foundation/evolution-go/pkg/whatsmeow/service"
|
||||||
"go.mau.fi/whatsmeow"
|
"go.mau.fi/whatsmeow"
|
||||||
"go.mau.fi/whatsmeow/types"
|
"go.mau.fi/whatsmeow/types"
|
||||||
)
|
)
|
||||||
@@ -55,6 +57,7 @@ type instances struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type ProxyConfig struct {
|
type ProxyConfig struct {
|
||||||
|
Protocol string `json:"protocol,omitempty"`
|
||||||
Port string `json:"port"`
|
Port string `json:"port"`
|
||||||
Password string `json:"password"`
|
Password string `json:"password"`
|
||||||
Username string `json:"username"`
|
Username string `json:"username"`
|
||||||
@@ -87,8 +90,15 @@ type StatusStruct struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type QrcodeStruct struct {
|
type QrcodeStruct struct {
|
||||||
Qrcode string
|
Qrcode string `json:"qrcode"`
|
||||||
Code string
|
Code string `json:"code"`
|
||||||
|
// Passkey ceremony fields. Populated when the account requires a WebAuthn
|
||||||
|
// passkey to finish linking (no QR to scan at that point). The manager uses
|
||||||
|
// PasskeyStage to switch its UI and PasskeyOpenUrl for the
|
||||||
|
// "Abrir WhatsApp Web" button that launches the passkey ceremony.
|
||||||
|
PasskeyStage string `json:"passkeyStage,omitempty"`
|
||||||
|
PasskeyOpenURL string `json:"passkeyOpenUrl,omitempty"`
|
||||||
|
PasskeyCode string `json:"passkeyCode,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type PairStruct struct {
|
type PairStruct struct {
|
||||||
@@ -101,6 +111,7 @@ type PairReturnStruct struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type SetProxyStruct struct {
|
type SetProxyStruct struct {
|
||||||
|
Protocol string `json:"protocol,omitempty"`
|
||||||
Host string `json:"host" validate:"required"`
|
Host string `json:"host" validate:"required"`
|
||||||
Port string `json:"port" validate:"required"`
|
Port string `json:"port" validate:"required"`
|
||||||
Username string `json:"username"`
|
Username string `json:"username"`
|
||||||
@@ -152,6 +163,10 @@ func (i *instances) ensureClientConnected(instanceId string) (*whatsmeow.Client,
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (i instances) Create(data *CreateStruct) (*instance_model.Instance, error) {
|
func (i instances) Create(data *CreateStruct) (*instance_model.Instance, error) {
|
||||||
|
if data.Proxy != nil {
|
||||||
|
data.Proxy.Protocol = utils.NormalizeProxyProtocol(data.Proxy.Protocol, data.Proxy.Port)
|
||||||
|
}
|
||||||
|
|
||||||
proxyJson, err := json.Marshal(data.Proxy)
|
proxyJson, err := json.Marshal(data.Proxy)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@@ -369,9 +384,13 @@ func (i instances) Logout(instance *instance_model.Instance) (*instance_model.In
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (i instances) Status(instance *instance_model.Instance) (*StatusStruct, error) {
|
func (i instances) Status(instance *instance_model.Instance) (*StatusStruct, error) {
|
||||||
client, err := i.ensureClientConnected(instance.Id)
|
client := i.clientPointer[instance.Id]
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
if client == nil {
|
||||||
|
return &StatusStruct{
|
||||||
|
Connected: false,
|
||||||
|
LoggedIn: false,
|
||||||
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
isConnected := client.IsConnected()
|
isConnected := client.IsConnected()
|
||||||
@@ -384,14 +403,12 @@ func (i instances) Status(instance *instance_model.Instance) (*StatusStruct, err
|
|||||||
name = client.Store.PushName
|
name = client.Store.PushName
|
||||||
}
|
}
|
||||||
|
|
||||||
status := &StatusStruct{
|
return &StatusStruct{
|
||||||
Connected: isConnected,
|
Connected: isConnected,
|
||||||
LoggedIn: isLoggedIn,
|
LoggedIn: isLoggedIn,
|
||||||
myJid: myJid,
|
myJid: myJid,
|
||||||
Name: name,
|
Name: name,
|
||||||
}
|
}, nil
|
||||||
|
|
||||||
return status, nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (i instances) GetQr(instance *instance_model.Instance) (*QrcodeStruct, error) {
|
func (i instances) GetQr(instance *instance_model.Instance) (*QrcodeStruct, error) {
|
||||||
@@ -433,6 +450,21 @@ func (i instances) GetQr(instance *instance_model.Instance) (*QrcodeStruct, erro
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If a passkey ceremony is in progress, there is no QR to scan — return the
|
||||||
|
// passkey stage + the #wapk openUrl so the manager can render the
|
||||||
|
// "Abrir WhatsApp Web" button. Checked before the empty-QR branch because
|
||||||
|
// during a passkey ceremony instance.Qrcode is empty.
|
||||||
|
if store := i.whatsmeowService.PasskeyCeremonyStore(); store != nil {
|
||||||
|
if token, state, ok := store.StateByInstance(instance.Id); ok {
|
||||||
|
logger.LogInfo("[%s] Passkey ceremony active (stage=%s) — returning passkey info instead of QR", instance.Id, state.Stage)
|
||||||
|
return &QrcodeStruct{
|
||||||
|
PasskeyStage: state.Stage,
|
||||||
|
PasskeyCode: state.Code,
|
||||||
|
PasskeyOpenURL: buildPasskeyOpenURL(token),
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
code := instance.Qrcode
|
code := instance.Qrcode
|
||||||
if code == "" {
|
if code == "" {
|
||||||
// Se não há QR code ainda, aguardar um pouco mais e tentar novamente
|
// Se não há QR code ainda, aguardar um pouco mais e tentar novamente
|
||||||
@@ -463,10 +495,50 @@ func (i instances) GetQr(instance *instance_model.Instance) (*QrcodeStruct, erro
|
|||||||
return qr, nil
|
return qr, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// buildPasskeyOpenURL builds the URL the manager opens to start the passkey
|
||||||
|
// ceremony: https://web.whatsapp.com/#wapk=<base64url({t:token,b:publicBase})>.
|
||||||
|
// publicBase must be the PUBLICLY reachable API base the browser can hit; set it
|
||||||
|
// via PASSKEY_PUBLIC_URL. Kept in sync with the event handler in whatsmeow.go.
|
||||||
|
func buildPasskeyOpenURL(token string) string {
|
||||||
|
publicBase := os.Getenv("PASSKEY_PUBLIC_URL")
|
||||||
|
if publicBase == "" {
|
||||||
|
publicBase = "<SET_PASSKEY_PUBLIC_URL>"
|
||||||
|
}
|
||||||
|
payload := fmt.Sprintf(`{"t":%q,"b":%q}`, token, publicBase)
|
||||||
|
wapk := base64.RawURLEncoding.EncodeToString([]byte(payload))
|
||||||
|
return "https://web.whatsapp.com/#wapk=" + wapk
|
||||||
|
}
|
||||||
|
|
||||||
func (i instances) Pair(data *PairStruct, instance *instance_model.Instance) (*PairReturnStruct, error) {
|
func (i instances) Pair(data *PairStruct, instance *instance_model.Instance) (*PairReturnStruct, error) {
|
||||||
code, err := i.clientPointer[instance.Id].PairPhone(context.Background(), data.Phone, true, whatsmeow.PairClientChrome, "Chrome (Linux)")
|
logger := i.loggerWrapper.GetLogger(instance.Id)
|
||||||
|
client := i.clientPointer[instance.Id]
|
||||||
|
|
||||||
|
if client == nil || !client.IsConnected() {
|
||||||
|
if client != nil && client.IsLoggedIn() {
|
||||||
|
return nil, fmt.Errorf("instance is already authenticated")
|
||||||
|
}
|
||||||
|
logger.LogInfo("[%s] No active connection, starting instance for phone pairing", instance.Id)
|
||||||
|
if err := i.whatsmeowService.StartInstance(instance.Id); err != nil {
|
||||||
|
logger.LogError("[%s] Failed to start instance for pairing: %v", instance.Id, err)
|
||||||
|
return nil, fmt.Errorf("failed to start instance: %w", err)
|
||||||
|
}
|
||||||
|
// Wait for the WA websocket connection and initial QR generation to establish.
|
||||||
|
// PairPhone must be called after the QR event is received per whatsmeow docs.
|
||||||
|
time.Sleep(3 * time.Second)
|
||||||
|
client = i.clientPointer[instance.Id]
|
||||||
|
if client == nil {
|
||||||
|
return nil, fmt.Errorf("failed to initialize client for pairing")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if client.IsLoggedIn() {
|
||||||
|
return nil, fmt.Errorf("instance is already authenticated")
|
||||||
|
}
|
||||||
|
|
||||||
|
code, err := client.PairPhone(context.Background(), data.Phone, true, whatsmeow.PairClientChrome, "Chrome (Linux)")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
i.loggerWrapper.GetLogger(instance.Id).LogError("[%s] something went wrong calling pair phone", instance.Id)
|
logger.LogError("[%s] PairPhone failed: %v", instance.Id, err)
|
||||||
|
return nil, fmt.Errorf("pairing failed: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return &PairReturnStruct{PairingCode: code}, nil
|
return &PairReturnStruct{PairingCode: code}, nil
|
||||||
@@ -562,6 +634,8 @@ func (i instances) SetProxy(id string, proxyConfig *ProxyConfig) error {
|
|||||||
return fmt.Errorf("proxy port is required")
|
return fmt.Errorf("proxy port is required")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
proxyConfig.Protocol = utils.NormalizeProxyProtocol(proxyConfig.Protocol, proxyConfig.Port)
|
||||||
|
|
||||||
// Convert proxy config to JSON
|
// Convert proxy config to JSON
|
||||||
proxyJSON, err := json.Marshal(proxyConfig)
|
proxyJSON, err := json.Marshal(proxyConfig)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -578,7 +652,7 @@ func (i instances) SetProxy(id string, proxyConfig *ProxyConfig) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
i.loggerWrapper.GetLogger(id).LogInfo("[%s] Proxy configuration updated: %s:%s", id, proxyConfig.Host, proxyConfig.Port)
|
i.loggerWrapper.GetLogger(id).LogInfo("[%s] Proxy configuration updated: %s://%s:%s", id, proxyConfig.Protocol, proxyConfig.Host, proxyConfig.Port)
|
||||||
|
|
||||||
// Reconnect to apply proxy changes
|
// Reconnect to apply proxy changes
|
||||||
go i.Reconnect(instance)
|
go i.Reconnect(instance)
|
||||||
@@ -592,6 +666,7 @@ func (i instances) SetProxyFromStruct(id string, data *SetProxyStruct) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
proxyConfig := &ProxyConfig{
|
proxyConfig := &ProxyConfig{
|
||||||
|
Protocol: data.Protocol,
|
||||||
Host: data.Host,
|
Host: data.Host,
|
||||||
Port: data.Port,
|
Port: data.Port,
|
||||||
Username: data.Username,
|
Username: data.Username,
|
||||||
|
|||||||
@@ -15,6 +15,9 @@ const (
|
|||||||
GROUP = "GROUP"
|
GROUP = "GROUP"
|
||||||
NEWSLETTER = "NEWSLETTER"
|
NEWSLETTER = "NEWSLETTER"
|
||||||
QRCODE = "QRCODE"
|
QRCODE = "QRCODE"
|
||||||
|
BUTTON_CLICK = "BUTTON_CLICK"
|
||||||
|
PICTURE = "PICTURE"
|
||||||
|
USER_ABOUT = "USER_ABOUT"
|
||||||
)
|
)
|
||||||
|
|
||||||
var AllEventTypes = []string{
|
var AllEventTypes = []string{
|
||||||
@@ -31,6 +34,9 @@ var AllEventTypes = []string{
|
|||||||
GROUP,
|
GROUP,
|
||||||
NEWSLETTER,
|
NEWSLETTER,
|
||||||
QRCODE,
|
QRCODE,
|
||||||
|
BUTTON_CLICK,
|
||||||
|
PICTURE,
|
||||||
|
USER_ABOUT,
|
||||||
}
|
}
|
||||||
|
|
||||||
var validEventTypes = map[string]bool{
|
var validEventTypes = map[string]bool{
|
||||||
@@ -48,6 +54,9 @@ var validEventTypes = map[string]bool{
|
|||||||
GROUP: true,
|
GROUP: true,
|
||||||
NEWSLETTER: true,
|
NEWSLETTER: true,
|
||||||
QRCODE: true,
|
QRCODE: true,
|
||||||
|
BUTTON_CLICK: true,
|
||||||
|
PICTURE: true,
|
||||||
|
USER_ABOUT: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
func IsEventType(eventType string) bool {
|
func IsEventType(eventType string) bool {
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package label_handler
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
instance_model "github.com/EvolutionAPI/evolution-go/pkg/instance/model"
|
instance_model "github.com/evolution-foundation/evolution-go/pkg/instance/model"
|
||||||
label_service "github.com/EvolutionAPI/evolution-go/pkg/label/service"
|
label_service "github.com/evolution-foundation/evolution-go/pkg/label/service"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -269,7 +269,7 @@ func (l *labelHandler) MessageUnlabel(ctx *gin.Context) {
|
|||||||
// @Produce json
|
// @Produce json
|
||||||
// @Success 200 {object} gin.H "success"
|
// @Success 200 {object} gin.H "success"
|
||||||
// @Failure 500 {object} gin.H "Internal server error"
|
// @Failure 500 {object} gin.H "Internal server error"
|
||||||
// @Router /label [get]
|
// @Router /label/list [get]
|
||||||
func (l *labelHandler) GetLabels(ctx *gin.Context) {
|
func (l *labelHandler) GetLabels(ctx *gin.Context) {
|
||||||
getInstance := ctx.MustGet("instance")
|
getInstance := ctx.MustGet("instance")
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package label_repository
|
package label_repository
|
||||||
|
|
||||||
import (
|
import (
|
||||||
label_model "github.com/EvolutionAPI/evolution-go/pkg/label/model"
|
label_model "github.com/evolution-foundation/evolution-go/pkg/label/model"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
"gorm.io/gorm/clause"
|
"gorm.io/gorm/clause"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,12 +5,12 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
instance_model "github.com/EvolutionAPI/evolution-go/pkg/instance/model"
|
instance_model "github.com/evolution-foundation/evolution-go/pkg/instance/model"
|
||||||
label_model "github.com/EvolutionAPI/evolution-go/pkg/label/model"
|
label_model "github.com/evolution-foundation/evolution-go/pkg/label/model"
|
||||||
label_repository "github.com/EvolutionAPI/evolution-go/pkg/label/repository"
|
label_repository "github.com/evolution-foundation/evolution-go/pkg/label/repository"
|
||||||
logger_wrapper "github.com/EvolutionAPI/evolution-go/pkg/logger"
|
logger_wrapper "github.com/evolution-foundation/evolution-go/pkg/logger"
|
||||||
"github.com/EvolutionAPI/evolution-go/pkg/utils"
|
"github.com/evolution-foundation/evolution-go/pkg/utils"
|
||||||
whatsmeow_service "github.com/EvolutionAPI/evolution-go/pkg/whatsmeow/service"
|
whatsmeow_service "github.com/evolution-foundation/evolution-go/pkg/whatsmeow/service"
|
||||||
"go.mau.fi/whatsmeow"
|
"go.mau.fi/whatsmeow"
|
||||||
"go.mau.fi/whatsmeow/appstate"
|
"go.mau.fi/whatsmeow/appstate"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/EvolutionAPI/evolution-go/pkg/config"
|
"github.com/evolution-foundation/evolution-go/pkg/config"
|
||||||
"github.com/gomessguii/logger"
|
"github.com/gomessguii/logger"
|
||||||
"gopkg.in/natefinch/lumberjack.v2"
|
"gopkg.in/natefinch/lumberjack.v2"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package message_handler
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
instance_model "github.com/EvolutionAPI/evolution-go/pkg/instance/model"
|
instance_model "github.com/evolution-foundation/evolution-go/pkg/instance/model"
|
||||||
message_service "github.com/EvolutionAPI/evolution-go/pkg/message/service"
|
message_service "github.com/evolution-foundation/evolution-go/pkg/message/service"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -12,6 +12,7 @@ type MessageHandler interface {
|
|||||||
React(ctx *gin.Context)
|
React(ctx *gin.Context)
|
||||||
ChatPresence(ctx *gin.Context)
|
ChatPresence(ctx *gin.Context)
|
||||||
MarkRead(ctx *gin.Context)
|
MarkRead(ctx *gin.Context)
|
||||||
|
MarkPlayed(ctx *gin.Context)
|
||||||
DownloadMedia(ctx *gin.Context)
|
DownloadMedia(ctx *gin.Context)
|
||||||
GetMessageStatus(ctx *gin.Context)
|
GetMessageStatus(ctx *gin.Context)
|
||||||
DeleteMessageEveryone(ctx *gin.Context)
|
DeleteMessageEveryone(ctx *gin.Context)
|
||||||
@@ -168,17 +169,67 @@ func (m *messageHandler) MarkRead(ctx *gin.Context) {
|
|||||||
ctx.JSON(http.StatusOK, gin.H{"message": "success", "data": responseData})
|
ctx.JSON(http.StatusOK, gin.H{"message": "success", "data": responseData})
|
||||||
}
|
}
|
||||||
|
|
||||||
// DownloadImage download an image
|
// MarkPlayed mark an audio message as played (blue mic icon)
|
||||||
// @Summary Download an image
|
// @Summary Mark an audio message as played
|
||||||
// @Description Download an image
|
// @Description Mark an audio message as played
|
||||||
// @Tags Message
|
// @Tags Message
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param message body message_service.DownloadImageStruct true "Download an image"
|
// @Param message body message_service.MarkPlayedStruct true "Mark an audio message as played"
|
||||||
// @Success 200 {object} gin.H "success"
|
// @Success 200 {object} gin.H "success"
|
||||||
// @Failure 400 {object} gin.H "Error on validation"
|
// @Failure 400 {object} gin.H "Error on validation"
|
||||||
// @Failure 500 {object} gin.H "Internal server error"
|
// @Failure 500 {object} gin.H "Internal server error"
|
||||||
// @Router /message/downloadimage [post]
|
// @Router /message/markplayed [post]
|
||||||
|
func (m *messageHandler) MarkPlayed(ctx *gin.Context) {
|
||||||
|
getInstance := ctx.MustGet("instance")
|
||||||
|
|
||||||
|
instance, ok := getInstance.(*instance_model.Instance)
|
||||||
|
if !ok {
|
||||||
|
ctx.JSON(http.StatusInternalServerError, gin.H{"error": "instance not found"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var data *message_service.MarkPlayedStruct
|
||||||
|
err := ctx.ShouldBindBodyWithJSON(&data)
|
||||||
|
if err != nil {
|
||||||
|
ctx.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if data.Number == "" {
|
||||||
|
ctx.JSON(http.StatusBadRequest, gin.H{"error": "phone number is required"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(data.Id) < 1 {
|
||||||
|
ctx.JSON(http.StatusBadRequest, gin.H{"error": "id is required"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
ts, err := m.messageService.MarkPlayed(data, instance)
|
||||||
|
if err != nil {
|
||||||
|
ctx.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
responseData := gin.H{
|
||||||
|
"timestamp": ts,
|
||||||
|
}
|
||||||
|
|
||||||
|
ctx.JSON(http.StatusOK, gin.H{"message": "success", "data": responseData})
|
||||||
|
}
|
||||||
|
|
||||||
|
// DownloadMedia download a media message (image, video, audio, document)
|
||||||
|
// @Summary Download media
|
||||||
|
// @Description Download the media content of a message (image, video, audio or document)
|
||||||
|
// @Tags Message
|
||||||
|
// @Accept json
|
||||||
|
// @Produce json
|
||||||
|
// @Param message body message_service.DownloadMediaStruct true "Download media"
|
||||||
|
// @Success 200 {object} gin.H "success"
|
||||||
|
// @Failure 400 {object} gin.H "Error on validation"
|
||||||
|
// @Failure 500 {object} gin.H "Internal server error"
|
||||||
|
// @Router /message/downloadmedia [post]
|
||||||
func (m *messageHandler) DownloadMedia(ctx *gin.Context) {
|
func (m *messageHandler) DownloadMedia(ctx *gin.Context) {
|
||||||
getInstance := ctx.MustGet("instance")
|
getInstance := ctx.MustGet("instance")
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,19 @@
|
|||||||
package message_model
|
package message_model
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Message struct {
|
type Message struct {
|
||||||
Id string `json:"id" gorm:"type:uuid;primaryKey"`
|
Id string `json:"id" gorm:"type:uuid;primaryKey"`
|
||||||
MessageID string `json:"message_id" gorm:"unique"`
|
MessageID string `json:"message_id" gorm:"unique"`
|
||||||
Timestamp string `json:"timestamp"`
|
Timestamp string `json:"timestamp"`
|
||||||
Status string `json:"status"`
|
Status string `json:"status"`
|
||||||
Source string `json:"source"`
|
Source string `json:"source"`
|
||||||
|
Referral json.RawMessage `json:"referral,omitempty" gorm:"type:jsonb"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Message) BeforeCreate(tx *gorm.DB) (err error) {
|
func (m *Message) BeforeCreate(tx *gorm.DB) (err error) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package message_repository
|
package message_repository
|
||||||
|
|
||||||
import (
|
import (
|
||||||
message_model "github.com/EvolutionAPI/evolution-go/pkg/message/model"
|
message_model "github.com/evolution-foundation/evolution-go/pkg/message/model"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
"gorm.io/gorm/clause"
|
"gorm.io/gorm/clause"
|
||||||
)
|
)
|
||||||
@@ -17,10 +17,19 @@ type messageRepository struct {
|
|||||||
db *gorm.DB
|
db *gorm.DB
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func messageUpdateColumns(message message_model.Message) []string {
|
||||||
|
updates := []string{"timestamp", "status", "source"}
|
||||||
|
if len(message.Referral) > 0 {
|
||||||
|
updates = append(updates, "referral")
|
||||||
|
}
|
||||||
|
|
||||||
|
return updates
|
||||||
|
}
|
||||||
|
|
||||||
func (m *messageRepository) InsertMessage(message message_model.Message) error {
|
func (m *messageRepository) InsertMessage(message message_model.Message) error {
|
||||||
return m.db.Clauses(clause.OnConflict{
|
return m.db.Clauses(clause.OnConflict{
|
||||||
Columns: []clause.Column{{Name: "message_id"}},
|
Columns: []clause.Column{{Name: "message_id"}},
|
||||||
DoUpdates: clause.AssignmentColumns([]string{"timestamp", "status", "source"}),
|
DoUpdates: clause.AssignmentColumns(messageUpdateColumns(message)),
|
||||||
}).Create(&message).Error
|
}).Create(&message).Error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,80 @@
|
|||||||
|
package message_repository
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"encoding/json"
|
||||||
|
"log"
|
||||||
|
"strings"
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"github.com/DATA-DOG/go-sqlmock"
|
||||||
|
message_model "github.com/evolution-foundation/evolution-go/pkg/message/model"
|
||||||
|
"gorm.io/driver/postgres"
|
||||||
|
"gorm.io/gorm"
|
||||||
|
gormlogger "gorm.io/gorm/logger"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestInsertMessagePreservesReferralOnStatusUpdate(t *testing.T) {
|
||||||
|
sqlDB, _, err := sqlmock.New()
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("open sqlmock db: %v", err)
|
||||||
|
}
|
||||||
|
defer sqlDB.Close()
|
||||||
|
|
||||||
|
var logBuffer bytes.Buffer
|
||||||
|
gormDB, err := gorm.Open(postgres.New(postgres.Config{
|
||||||
|
Conn: sqlDB,
|
||||||
|
WithoutReturning: true,
|
||||||
|
}), &gorm.Config{
|
||||||
|
DryRun: true,
|
||||||
|
SkipDefaultTransaction: true,
|
||||||
|
Logger: gormlogger.New(
|
||||||
|
log.New(&logBuffer, "", 0),
|
||||||
|
gormlogger.Config{LogLevel: gormlogger.Info, Colorful: false},
|
||||||
|
),
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("open gorm db: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
repo := NewMessageRepository(gormDB)
|
||||||
|
referral := json.RawMessage(`{"ctwaClid":"abc123","showAdAttribution":true}`)
|
||||||
|
|
||||||
|
initial := message_model.Message{
|
||||||
|
MessageID: "msg-1",
|
||||||
|
Timestamp: "2026-05-09 10:00:00",
|
||||||
|
Status: "Received",
|
||||||
|
Source: "1551999999999",
|
||||||
|
Referral: referral,
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := repo.InsertMessage(initial); err != nil {
|
||||||
|
t.Fatalf("insert initial message: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
initialSQL := logBuffer.String()
|
||||||
|
if !strings.Contains(initialSQL, `"referral"="excluded"."referral"`) {
|
||||||
|
t.Fatalf("expected initial upsert SQL to update referral, got %q", initialSQL)
|
||||||
|
}
|
||||||
|
|
||||||
|
logBuffer.Reset()
|
||||||
|
|
||||||
|
updated := message_model.Message{
|
||||||
|
MessageID: "msg-1",
|
||||||
|
Timestamp: "2026-05-09 10:05:00",
|
||||||
|
Status: "Read",
|
||||||
|
Source: "1551999999999",
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := repo.InsertMessage(updated); err != nil {
|
||||||
|
t.Fatalf("insert updated message: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
updatedSQL := logBuffer.String()
|
||||||
|
if strings.Contains(updatedSQL, `"referral"="excluded"."referral"`) {
|
||||||
|
t.Fatalf("expected updated upsert SQL to omit referral update, got %q", updatedSQL)
|
||||||
|
}
|
||||||
|
if !strings.Contains(updatedSQL, `"timestamp"="excluded"."timestamp","status"="excluded"."status","source"="excluded"."source"`) {
|
||||||
|
t.Fatalf("expected updated upsert SQL to keep core columns, got %q", updatedSQL)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -9,12 +9,12 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
instance_model "github.com/EvolutionAPI/evolution-go/pkg/instance/model"
|
instance_model "github.com/evolution-foundation/evolution-go/pkg/instance/model"
|
||||||
logger_wrapper "github.com/EvolutionAPI/evolution-go/pkg/logger"
|
logger_wrapper "github.com/evolution-foundation/evolution-go/pkg/logger"
|
||||||
message_model "github.com/EvolutionAPI/evolution-go/pkg/message/model"
|
message_model "github.com/evolution-foundation/evolution-go/pkg/message/model"
|
||||||
message_repository "github.com/EvolutionAPI/evolution-go/pkg/message/repository"
|
message_repository "github.com/evolution-foundation/evolution-go/pkg/message/repository"
|
||||||
"github.com/EvolutionAPI/evolution-go/pkg/utils"
|
"github.com/evolution-foundation/evolution-go/pkg/utils"
|
||||||
whatsmeow_service "github.com/EvolutionAPI/evolution-go/pkg/whatsmeow/service"
|
whatsmeow_service "github.com/evolution-foundation/evolution-go/pkg/whatsmeow/service"
|
||||||
"github.com/vincent-petithory/dataurl"
|
"github.com/vincent-petithory/dataurl"
|
||||||
"go.mau.fi/whatsmeow"
|
"go.mau.fi/whatsmeow"
|
||||||
"go.mau.fi/whatsmeow/proto/waCommon"
|
"go.mau.fi/whatsmeow/proto/waCommon"
|
||||||
@@ -27,6 +27,7 @@ type MessageService interface {
|
|||||||
React(data *ReactStruct, instance *instance_model.Instance) (*MessageSendStruct, error)
|
React(data *ReactStruct, instance *instance_model.Instance) (*MessageSendStruct, error)
|
||||||
ChatPresence(data *ChatPresenceStruct, instance *instance_model.Instance) (string, error)
|
ChatPresence(data *ChatPresenceStruct, instance *instance_model.Instance) (string, error)
|
||||||
MarkRead(data *MarkReadStruct, instance *instance_model.Instance) (string, error)
|
MarkRead(data *MarkReadStruct, instance *instance_model.Instance) (string, error)
|
||||||
|
MarkPlayed(data *MarkPlayedStruct, instance *instance_model.Instance) (string, error)
|
||||||
DownloadMedia(data *DownloadMediaStruct, instance *instance_model.Instance, request *http.Request) (*dataurl.DataURL, string, error)
|
DownloadMedia(data *DownloadMediaStruct, instance *instance_model.Instance, request *http.Request) (*dataurl.DataURL, string, error)
|
||||||
GetMessageStatus(data *MessageStatusStruct, instance *instance_model.Instance) (*message_model.Message, string, error)
|
GetMessageStatus(data *MessageStatusStruct, instance *instance_model.Instance) (*message_model.Message, string, error)
|
||||||
DeleteMessageEveryone(data *MessageStruct, instance *instance_model.Instance) (string, string, error)
|
DeleteMessageEveryone(data *MessageStruct, instance *instance_model.Instance) (string, string, error)
|
||||||
@@ -52,6 +53,10 @@ type ChatPresenceStruct struct {
|
|||||||
Number string `json:"number"`
|
Number string `json:"number"`
|
||||||
State string `json:"state"`
|
State string `json:"state"`
|
||||||
IsAudio bool `json:"isAudio"`
|
IsAudio bool `json:"isAudio"`
|
||||||
|
// Delay, in milliseconds, keeps the "composing"/"recording" indicator alive
|
||||||
|
// for the given duration (re-sending it periodically) and then sends "paused".
|
||||||
|
// Only applies when State is "composing". 0 = single fire (legacy behaviour).
|
||||||
|
Delay int `json:"delay"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type MarkReadStruct struct {
|
type MarkReadStruct struct {
|
||||||
@@ -59,6 +64,11 @@ type MarkReadStruct struct {
|
|||||||
Number string `json:"number"`
|
Number string `json:"number"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type MarkPlayedStruct struct {
|
||||||
|
Id []string `json:"id"`
|
||||||
|
Number string `json:"number"`
|
||||||
|
}
|
||||||
|
|
||||||
type DownloadMediaStruct struct {
|
type DownloadMediaStruct struct {
|
||||||
Message *waE2E.Message `json:"message"`
|
Message *waE2E.Message `json:"message"`
|
||||||
}
|
}
|
||||||
@@ -137,6 +147,13 @@ func (m *messageService) React(data *ReactStruct, instance *instance_model.Insta
|
|||||||
return nil, errors.New("invalid phone number")
|
return nil, errors.New("invalid phone number")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Strip the "+" that ParseJID/CreateJID adds. The recipient is used both as
|
||||||
|
// the SendMessage target (usync/device resolution) AND as the MessageKey
|
||||||
|
// RemoteJID that references the reacted message's chat. A malformed "+JID"
|
||||||
|
// breaks device resolution (usync) and prevents the reaction from matching
|
||||||
|
// the original message's chat. See utils.CanonicalJID.
|
||||||
|
recipient = utils.CanonicalJID(recipient)
|
||||||
|
|
||||||
if data.Id == "" {
|
if data.Id == "" {
|
||||||
m.loggerWrapper.GetLogger(instance.Id).LogError("[%s] Missing Id in Payload", instance.Id)
|
m.loggerWrapper.GetLogger(instance.Id).LogError("[%s] Missing Id in Payload", instance.Id)
|
||||||
return nil, errors.New("missing id in payload")
|
return nil, errors.New("missing id in payload")
|
||||||
@@ -150,7 +167,8 @@ func (m *messageService) React(data *ReactStruct, instance *instance_model.Insta
|
|||||||
reaction = ""
|
reaction = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create MessageKey
|
// Create MessageKey — msgId is the ID of the message being reacted to,
|
||||||
|
// NOT the ID of the reaction envelope itself.
|
||||||
messageKey := &waCommon.MessageKey{
|
messageKey := &waCommon.MessageKey{
|
||||||
RemoteJID: proto.String(recipient.String()),
|
RemoteJID: proto.String(recipient.String()),
|
||||||
FromMe: proto.Bool(fromMe),
|
FromMe: proto.Bool(fromMe),
|
||||||
@@ -161,22 +179,23 @@ func (m *messageService) React(data *ReactStruct, instance *instance_model.Insta
|
|||||||
if data.Participant != "" {
|
if data.Participant != "" {
|
||||||
participantJID, ok := utils.ParseJID(data.Participant)
|
participantJID, ok := utils.ParseJID(data.Participant)
|
||||||
if ok {
|
if ok {
|
||||||
messageKey.Participant = proto.String(participantJID.String())
|
messageKey.Participant = proto.String(utils.CanonicalJID(participantJID).String())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
msg := &waE2E.Message{
|
msg := &waE2E.Message{
|
||||||
ReactionMessage: &waE2E.ReactionMessage{
|
ReactionMessage: &waE2E.ReactionMessage{
|
||||||
Key: messageKey,
|
Key: messageKey,
|
||||||
Text: proto.String(reaction),
|
Text: proto.String(reaction),
|
||||||
// GroupingKey: proto.String(reaction),
|
|
||||||
SenderTimestampMS: proto.Int64(time.Now().UnixMilli()),
|
SenderTimestampMS: proto.Int64(time.Now().UnixMilli()),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
response, err := client.SendMessage(context.Background(), recipient, msg, whatsmeow.SendRequestExtra{
|
// Do NOT pass ID: msgId in SendRequestExtra. Doing so would reuse the
|
||||||
ID: msgId,
|
// original message ID as the reaction envelope ID; WhatsApp silently
|
||||||
})
|
// deduplicates it and drops the reaction. Let whatsmeow generate a
|
||||||
|
// fresh, unique ID for the envelope.
|
||||||
|
response, err := client.SendMessage(context.Background(), recipient, msg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -191,7 +210,7 @@ func (m *messageService) React(data *ReactStruct, instance *instance_model.Insta
|
|||||||
IsFromMe: true,
|
IsFromMe: true,
|
||||||
IsGroup: isGroup,
|
IsGroup: isGroup,
|
||||||
},
|
},
|
||||||
ID: msgId,
|
ID: response.ID,
|
||||||
Timestamp: time.Now(),
|
Timestamp: time.Now(),
|
||||||
ServerID: response.ServerID,
|
ServerID: response.ServerID,
|
||||||
Type: messageType,
|
Type: messageType,
|
||||||
@@ -219,18 +238,70 @@ func (m *messageService) ChatPresence(data *ChatPresenceStruct, instance *instan
|
|||||||
return "", errors.New("invalid phone number")
|
return "", errors.New("invalid phone number")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// chatstate (typing) is a RAW node sent without usync normalization, so it
|
||||||
|
// needs a canonical digits-only JID or WhatsApp silently drops it. See
|
||||||
|
// utils.CanonicalJID for the full rationale.
|
||||||
|
recipient = utils.CanonicalJID(recipient)
|
||||||
|
|
||||||
media := ""
|
media := ""
|
||||||
|
|
||||||
if data.IsAudio {
|
if data.IsAudio {
|
||||||
media = "audio"
|
media = "audio"
|
||||||
}
|
}
|
||||||
|
|
||||||
err = client.SendChatPresence(context.Background(), recipient, types.ChatPresence(data.State), types.ChatPresenceMedia(media))
|
// WhatsApp only forwards chatstate (typing / recording) events to the
|
||||||
|
// recipient while the sender is marked online. SendChatPresence merely
|
||||||
|
// sends the chatstate node — it does NOT mark us available. Background
|
||||||
|
// presence handling (events.AppStateSyncComplete) may have set us to
|
||||||
|
// Unavailable, in which case the server silently drops the typing
|
||||||
|
// indicator. Mark ourselves available first to guarantee delivery.
|
||||||
|
if presErr := client.SendPresence(context.Background(), types.PresenceAvailable); presErr != nil {
|
||||||
|
m.loggerWrapper.GetLogger(instance.Id).LogWarn("[%s] SendPresence(available) before chatstate failed (non-fatal): %v", instance.Id, presErr)
|
||||||
|
}
|
||||||
|
|
||||||
|
state := types.ChatPresence(data.State)
|
||||||
|
mediaType := types.ChatPresenceMedia(media)
|
||||||
|
|
||||||
|
err = client.SendChatPresence(context.Background(), recipient, state, mediaType)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
m.loggerWrapper.GetLogger(instance.Id).LogInfo("Message sent to %s", data.Number)
|
// A single "composing" indicator is ephemeral: WhatsApp expires it after a
|
||||||
|
// few seconds unless refreshed. When a Delay is provided (and we're typing),
|
||||||
|
// keep the indicator alive for the requested duration by re-sending it, then
|
||||||
|
// send "paused" so the indicator clears cleanly instead of timing out.
|
||||||
|
if data.Delay > 0 && state == types.ChatPresenceComposing {
|
||||||
|
const keepAliveInterval = 5 * time.Second
|
||||||
|
const maxDelay = 60 * time.Second
|
||||||
|
|
||||||
|
remaining := time.Duration(data.Delay) * time.Millisecond
|
||||||
|
if remaining > maxDelay {
|
||||||
|
remaining = maxDelay
|
||||||
|
}
|
||||||
|
|
||||||
|
for remaining > 0 {
|
||||||
|
sleep := keepAliveInterval
|
||||||
|
if remaining < sleep {
|
||||||
|
sleep = remaining
|
||||||
|
}
|
||||||
|
time.Sleep(sleep)
|
||||||
|
remaining -= sleep
|
||||||
|
|
||||||
|
if remaining > 0 {
|
||||||
|
// Refresh the indicator so it doesn't expire mid-delay.
|
||||||
|
if refreshErr := client.SendChatPresence(context.Background(), recipient, state, mediaType); refreshErr != nil {
|
||||||
|
m.loggerWrapper.GetLogger(instance.Id).LogWarn("[%s] Refresh chatstate failed (non-fatal): %v", instance.Id, refreshErr)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if pausedErr := client.SendChatPresence(context.Background(), recipient, types.ChatPresencePaused, mediaType); pausedErr != nil {
|
||||||
|
m.loggerWrapper.GetLogger(instance.Id).LogWarn("[%s] SendChatPresence(paused) failed (non-fatal): %v", instance.Id, pausedErr)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
m.loggerWrapper.GetLogger(instance.Id).LogInfo("Presence (%s) sent to %s", data.State, data.Number)
|
||||||
|
|
||||||
return ts.String(), nil
|
return ts.String(), nil
|
||||||
}
|
}
|
||||||
@@ -249,6 +320,10 @@ func (m *messageService) MarkRead(data *MarkReadStruct, instance *instance_model
|
|||||||
return "", errors.New("invalid phone number")
|
return "", errors.New("invalid phone number")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Read receipts are RAW nodes (no usync) — strip the "+" so the receipt
|
||||||
|
// reaches the recipient. Same root cause as the typing fix above.
|
||||||
|
jid = utils.CanonicalJID(jid)
|
||||||
|
|
||||||
err = client.MarkRead(context.Background(), data.Id, time.Now(), jid, jid)
|
err = client.MarkRead(context.Background(), data.Id, time.Now(), jid, jid)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
m.loggerWrapper.GetLogger(instance.Id).LogError("[%s] error marking message as read: %v", instance.Id, err)
|
m.loggerWrapper.GetLogger(instance.Id).LogError("[%s] error marking message as read: %v", instance.Id, err)
|
||||||
@@ -258,6 +333,33 @@ func (m *messageService) MarkRead(data *MarkReadStruct, instance *instance_model
|
|||||||
return ts.String(), nil
|
return ts.String(), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *messageService) MarkPlayed(data *MarkPlayedStruct, instance *instance_model.Instance) (string, error) {
|
||||||
|
client, err := m.ensureClientConnected(instance.Id)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
|
||||||
|
var ts time.Time
|
||||||
|
|
||||||
|
jid, ok := utils.ParseJID(data.Number)
|
||||||
|
if !ok {
|
||||||
|
m.loggerWrapper.GetLogger(instance.Id).LogError("[%s] Error validating message fields", instance.Id)
|
||||||
|
return "", errors.New("invalid phone number")
|
||||||
|
}
|
||||||
|
|
||||||
|
// Played receipts are RAW nodes (no usync) — strip the "+" so the receipt
|
||||||
|
// reaches the recipient. Same root cause as the MarkRead fix.
|
||||||
|
jid = utils.CanonicalJID(jid)
|
||||||
|
|
||||||
|
err = client.MarkRead(context.Background(), data.Id, time.Now(), jid, jid, types.ReceiptTypePlayed)
|
||||||
|
if err != nil {
|
||||||
|
m.loggerWrapper.GetLogger(instance.Id).LogError("[%s] error marking message as played: %v", instance.Id, err)
|
||||||
|
return "", errors.New("error marking message as played")
|
||||||
|
}
|
||||||
|
|
||||||
|
return ts.String(), nil
|
||||||
|
}
|
||||||
|
|
||||||
func (m *messageService) DownloadMedia(data *DownloadMediaStruct, instance *instance_model.Instance, request *http.Request) (*dataurl.DataURL, string, error) {
|
func (m *messageService) DownloadMedia(data *DownloadMediaStruct, instance *instance_model.Instance, request *http.Request) (*dataurl.DataURL, string, error) {
|
||||||
client, err := m.ensureClientConnected(instance.Id)
|
client, err := m.ensureClientConnected(instance.Id)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -398,8 +500,6 @@ func (m *messageService) EditMessage(data *EditMessageStruct, instance *instance
|
|||||||
return "", "", err
|
return "", "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
var ts time.Time
|
|
||||||
|
|
||||||
recipient, ok := utils.ParseJID(data.Chat)
|
recipient, ok := utils.ParseJID(data.Chat)
|
||||||
if !ok {
|
if !ok {
|
||||||
m.loggerWrapper.GetLogger(instance.Id).LogError("[%s] Error validating message fields", instance.Id)
|
m.loggerWrapper.GetLogger(instance.Id).LogError("[%s] Error validating message fields", instance.Id)
|
||||||
@@ -413,16 +513,16 @@ func (m *messageService) EditMessage(data *EditMessageStruct, instance *instance
|
|||||||
recipient,
|
recipient,
|
||||||
data.MessageID,
|
data.MessageID,
|
||||||
&waE2E.Message{
|
&waE2E.Message{
|
||||||
Conversation: proto.String(data.Message),
|
ExtendedTextMessage: &waE2E.ExtendedTextMessage{
|
||||||
|
Text: &data.Message,
|
||||||
|
},
|
||||||
}))
|
}))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
m.loggerWrapper.GetLogger(instance.Id).LogError("[%s] error revoking message: %v", instance.Id, err)
|
m.loggerWrapper.GetLogger(instance.Id).LogError("[%s] error revoking message: %v", instance.Id, err)
|
||||||
return "", "", err
|
return "", "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
response := resp.ID
|
return resp.ID, resp.Timestamp.String(), nil
|
||||||
|
|
||||||
return response, ts.String(), nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewMessageService(
|
func NewMessageService(
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package auth_middleware
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/EvolutionAPI/evolution-go/pkg/config"
|
"github.com/evolution-foundation/evolution-go/pkg/config"
|
||||||
instance_service "github.com/EvolutionAPI/evolution-go/pkg/instance/service"
|
instance_service "github.com/evolution-foundation/evolution-go/pkg/instance/service"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/EvolutionAPI/evolution-go/pkg/utils"
|
"github.com/evolution-foundation/evolution-go/pkg/utils"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/gomessguii/logger"
|
"github.com/gomessguii/logger"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package newsletter_handler
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
instance_model "github.com/EvolutionAPI/evolution-go/pkg/instance/model"
|
instance_model "github.com/evolution-foundation/evolution-go/pkg/instance/model"
|
||||||
newsletter_service "github.com/EvolutionAPI/evolution-go/pkg/newsletter/service"
|
newsletter_service "github.com/evolution-foundation/evolution-go/pkg/newsletter/service"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
instance_model "github.com/EvolutionAPI/evolution-go/pkg/instance/model"
|
instance_model "github.com/evolution-foundation/evolution-go/pkg/instance/model"
|
||||||
logger_wrapper "github.com/EvolutionAPI/evolution-go/pkg/logger"
|
logger_wrapper "github.com/evolution-foundation/evolution-go/pkg/logger"
|
||||||
whatsmeow_service "github.com/EvolutionAPI/evolution-go/pkg/whatsmeow/service"
|
whatsmeow_service "github.com/evolution-foundation/evolution-go/pkg/whatsmeow/service"
|
||||||
"go.mau.fi/whatsmeow"
|
"go.mau.fi/whatsmeow"
|
||||||
"go.mau.fi/whatsmeow/types"
|
"go.mau.fi/whatsmeow/types"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -0,0 +1,251 @@
|
|||||||
|
// Package ceremony holds the in-memory state of WhatsApp passkey (WebAuthn)
|
||||||
|
// pairing ceremonies. It is written by the whatsmeow event goroutine and read
|
||||||
|
// by the public HTTP polling endpoint, so every access is mutex-guarded.
|
||||||
|
//
|
||||||
|
// The lifecycle mirrors the browser-extension contract (tools/passkey-helper):
|
||||||
|
// the extension polls GET /passkey-ceremony/{token} and drives the ceremony
|
||||||
|
// through the stages below.
|
||||||
|
package ceremony
|
||||||
|
|
||||||
|
import (
|
||||||
|
"crypto/rand"
|
||||||
|
"encoding/hex"
|
||||||
|
"encoding/json"
|
||||||
|
"sync"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Stage is the ceremony state the extension polls for. The values are the
|
||||||
|
// literal strings the extension's content.js switches on.
|
||||||
|
const (
|
||||||
|
StageChallenge = "challenge" // publicKey available; extension runs navigator.credentials.get()
|
||||||
|
StageAwaitingConfirmation = "awaiting_confirmation" // response sent to WhatsApp, waiting for the confirmation code
|
||||||
|
StageConfirmation = "confirmation" // code available; user must verify + confirm
|
||||||
|
StageConfirmed = "confirmed" // confirmation sent, pairing completing
|
||||||
|
StageError = "error" // something failed
|
||||||
|
)
|
||||||
|
|
||||||
|
// defaultTTL mirrors the whatsmeow passkey handoff validity window (~5 min).
|
||||||
|
const defaultTTL = 5 * time.Minute
|
||||||
|
|
||||||
|
// State is the snapshot the poll endpoint serializes back to the extension.
|
||||||
|
// The extension reads json.data || json, so a flat object is fine; keys match
|
||||||
|
// what content.js expects.
|
||||||
|
//
|
||||||
|
// PublicKey is stored pre-serialized (json.RawMessage) because whatsmeow's
|
||||||
|
// types.WebAuthnPublicKey already carries the exact json tags the extension
|
||||||
|
// needs (challenge, rpId, allowCredentials[].{id,type,transports},
|
||||||
|
// userVerification, base64url-unpadded via jsonbytes). The event goroutine
|
||||||
|
// json.Marshals the WebAuthnPublicKey once and hands the bytes here — no
|
||||||
|
// field-by-field remap, no base64 re-encoding mismatch.
|
||||||
|
type State struct {
|
||||||
|
Stage string `json:"stage"`
|
||||||
|
PublicKey json.RawMessage `json:"publicKey,omitempty"`
|
||||||
|
Code string `json:"code,omitempty"`
|
||||||
|
SkipHandoffUX bool `json:"skipHandoffUX"`
|
||||||
|
Error string `json:"error,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type entry struct {
|
||||||
|
instanceID string
|
||||||
|
state State
|
||||||
|
expiresAt time.Time
|
||||||
|
}
|
||||||
|
|
||||||
|
// Store keeps token -> ceremony entry. It is shared (pointer) across the
|
||||||
|
// value-receiver whatsmeowService copies and the HTTP handler, so its internal
|
||||||
|
// map is protected by a RWMutex.
|
||||||
|
type Store struct {
|
||||||
|
mu sync.RWMutex
|
||||||
|
byToken map[string]*entry // ephemeral ceremony token -> entry
|
||||||
|
byInst map[string]string // instanceID -> active token (for event-goroutine writes)
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewStore builds an empty ceremony store.
|
||||||
|
func NewStore() *Store {
|
||||||
|
return &Store{
|
||||||
|
byToken: make(map[string]*entry),
|
||||||
|
byInst: make(map[string]string),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func newToken() string {
|
||||||
|
b := make([]byte, 32)
|
||||||
|
// crypto/rand.Read never returns a short read on supported platforms.
|
||||||
|
_, _ = rand.Read(b)
|
||||||
|
return hex.EncodeToString(b)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *Store) prune(now time.Time) {
|
||||||
|
for tok, e := range s.byToken {
|
||||||
|
if now.After(e.expiresAt) {
|
||||||
|
delete(s.byToken, tok)
|
||||||
|
if s.byInst[e.instanceID] == tok {
|
||||||
|
delete(s.byInst, e.instanceID)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Start begins (or restarts) a ceremony for an instance with the challenge
|
||||||
|
// publicKey (pre-serialized JSON), mints a fresh ephemeral token, and returns
|
||||||
|
// it. Any previous ceremony for the same instance is replaced.
|
||||||
|
func (s *Store) Start(instanceID string, pk json.RawMessage) string {
|
||||||
|
s.mu.Lock()
|
||||||
|
defer s.mu.Unlock()
|
||||||
|
now := time.Now()
|
||||||
|
s.prune(now)
|
||||||
|
|
||||||
|
// Drop any previous token for this instance.
|
||||||
|
if old, ok := s.byInst[instanceID]; ok {
|
||||||
|
delete(s.byToken, old)
|
||||||
|
}
|
||||||
|
|
||||||
|
tok := newToken()
|
||||||
|
s.byToken[tok] = &entry{
|
||||||
|
instanceID: instanceID,
|
||||||
|
state: State{Stage: StageChallenge, PublicKey: pk, SkipHandoffUX: false},
|
||||||
|
expiresAt: now.Add(defaultTTL),
|
||||||
|
}
|
||||||
|
s.byInst[instanceID] = tok
|
||||||
|
return tok
|
||||||
|
}
|
||||||
|
|
||||||
|
// setStateByInstance updates the state of the active ceremony for an instance.
|
||||||
|
// No-op if the instance has no active ceremony.
|
||||||
|
func (s *Store) setStateByInstance(instanceID string, mutate func(*State)) {
|
||||||
|
s.mu.Lock()
|
||||||
|
defer s.mu.Unlock()
|
||||||
|
tok, ok := s.byInst[instanceID]
|
||||||
|
if !ok {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
e, ok := s.byToken[tok]
|
||||||
|
if !ok {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
mutate(&e.state)
|
||||||
|
e.expiresAt = time.Now().Add(defaultTTL)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetConfirmation moves the ceremony to the confirmation stage with a code.
|
||||||
|
// skipHandoffUX is intentionally forced to false by callers (DOC2 §4.2: never
|
||||||
|
// auto-confirm), so the extension always shows the manual "Confirmar" button.
|
||||||
|
func (s *Store) SetConfirmation(instanceID, code string, skipHandoffUX bool) {
|
||||||
|
s.setStateByInstance(instanceID, func(st *State) {
|
||||||
|
st.Stage = StageConfirmation
|
||||||
|
st.Code = code
|
||||||
|
st.SkipHandoffUX = skipHandoffUX
|
||||||
|
st.Error = ""
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetAwaitingConfirmation is set right after the WebAuthn response is submitted.
|
||||||
|
func (s *Store) SetAwaitingConfirmation(instanceID string) {
|
||||||
|
s.setStateByInstance(instanceID, func(st *State) {
|
||||||
|
st.Stage = StageAwaitingConfirmation
|
||||||
|
st.PublicKey = nil
|
||||||
|
st.Error = ""
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetConfirmed marks the confirmation as sent; pairing is finishing.
|
||||||
|
func (s *Store) SetConfirmed(instanceID string) {
|
||||||
|
s.setStateByInstance(instanceID, func(st *State) {
|
||||||
|
st.Stage = StageConfirmed
|
||||||
|
st.Error = ""
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetError records a ceremony error.
|
||||||
|
func (s *Store) SetError(instanceID, msg string) {
|
||||||
|
s.setStateByInstance(instanceID, func(st *State) {
|
||||||
|
st.Stage = StageError
|
||||||
|
st.Error = msg
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clear removes the ceremony for an instance (e.g. on PairSuccess). After this,
|
||||||
|
// the poll endpoint returns not-found, and the extension treats a cleared state
|
||||||
|
// after having started as "pairing concluded".
|
||||||
|
func (s *Store) Clear(instanceID string) {
|
||||||
|
s.mu.Lock()
|
||||||
|
defer s.mu.Unlock()
|
||||||
|
if tok, ok := s.byInst[instanceID]; ok {
|
||||||
|
delete(s.byToken, tok)
|
||||||
|
delete(s.byInst, instanceID)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Lookup resolves a ceremony token to its instance id and current state.
|
||||||
|
// ok is false if the token is unknown or expired.
|
||||||
|
func (s *Store) Lookup(token string) (instanceID string, state State, ok bool) {
|
||||||
|
s.mu.Lock()
|
||||||
|
defer s.mu.Unlock()
|
||||||
|
s.prune(time.Now())
|
||||||
|
e, found := s.byToken[token]
|
||||||
|
if !found {
|
||||||
|
return "", State{}, false
|
||||||
|
}
|
||||||
|
return e.instanceID, e.state, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// InstanceForToken resolves just the instance id for a token (used by the
|
||||||
|
// response/confirm endpoints to reach the right whatsmeow client).
|
||||||
|
func (s *Store) InstanceForToken(token string) (string, bool) {
|
||||||
|
s.mu.RLock()
|
||||||
|
defer s.mu.RUnlock()
|
||||||
|
e, ok := s.byToken[token]
|
||||||
|
if !ok {
|
||||||
|
return "", false
|
||||||
|
}
|
||||||
|
if time.Now().After(e.expiresAt) {
|
||||||
|
return "", false
|
||||||
|
}
|
||||||
|
return e.instanceID, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// StateByInstance returns the active ceremony token and state for an instance,
|
||||||
|
// or ok=false if there is no non-expired ceremony. Used by the authenticated
|
||||||
|
// instance/QR poll so the manager can render the passkey UI (the token lets it
|
||||||
|
// rebuild the #wapk openUrl).
|
||||||
|
func (s *Store) StateByInstance(instanceID string) (token string, state State, ok bool) {
|
||||||
|
s.mu.RLock()
|
||||||
|
defer s.mu.RUnlock()
|
||||||
|
tok, has := s.byInst[instanceID]
|
||||||
|
if !has {
|
||||||
|
return "", State{}, false
|
||||||
|
}
|
||||||
|
e, has := s.byToken[tok]
|
||||||
|
if !has {
|
||||||
|
return "", State{}, false
|
||||||
|
}
|
||||||
|
if time.Now().After(e.expiresAt) {
|
||||||
|
return "", State{}, false
|
||||||
|
}
|
||||||
|
return tok, e.state, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasActiveByInstance reports whether an instance has a non-expired passkey
|
||||||
|
// ceremony in progress that is NOT yet in a terminal (error) stage. The QR
|
||||||
|
// rotation uses this to avoid tearing down the socket/client while a passkey
|
||||||
|
// ceremony — which is driven by a human in a browser and can easily outlast the
|
||||||
|
// QR rotation window — is still in flight. Without this, teardownQR would delete
|
||||||
|
// the client mid-ceremony and the /response and /confirm steps would fail.
|
||||||
|
func (s *Store) HasActiveByInstance(instanceID string) bool {
|
||||||
|
s.mu.RLock()
|
||||||
|
defer s.mu.RUnlock()
|
||||||
|
tok, ok := s.byInst[instanceID]
|
||||||
|
if !ok {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
e, ok := s.byToken[tok]
|
||||||
|
if !ok {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if time.Now().After(e.expiresAt) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
// A ceremony in the error stage is terminal — QR teardown may proceed.
|
||||||
|
return e.state.Stage != StageError
|
||||||
|
}
|
||||||
@@ -0,0 +1,183 @@
|
|||||||
|
// Package handler exposes the PUBLIC passkey-ceremony HTTP endpoints that the
|
||||||
|
// Evolution Passkey Helper browser extension calls from the web.whatsapp.com
|
||||||
|
// origin. These routes are intentionally unauthenticated (no apikey): access is
|
||||||
|
// gated only by an opaque, short-lived ceremony token minted per pairing.
|
||||||
|
//
|
||||||
|
// Contract (tools/passkey-helper/content.js):
|
||||||
|
//
|
||||||
|
// GET /passkey-ceremony/:token -> { stage, publicKey?, code?, skipHandoffUX, error? }
|
||||||
|
// POST /passkey-ceremony/:token/response -> body = WebAuthn assertion
|
||||||
|
// POST /passkey-ceremony/:token/confirm -> finish pairing
|
||||||
|
package handler
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
whatsmeow_service "github.com/evolution-foundation/evolution-go/pkg/whatsmeow/service"
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
"go.mau.fi/whatsmeow/types"
|
||||||
|
)
|
||||||
|
|
||||||
|
// PasskeyHandler wires the public ceremony endpoints to the whatsmeow service.
|
||||||
|
type PasskeyHandler struct {
|
||||||
|
whatsmeowService whatsmeow_service.WhatsmeowService
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPasskeyHandler builds the handler.
|
||||||
|
func NewPasskeyHandler(svc whatsmeow_service.WhatsmeowService) *PasskeyHandler {
|
||||||
|
return &PasskeyHandler{whatsmeowService: svc}
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetCeremony returns the current ceremony state for a token. The extension
|
||||||
|
// polls this and drives its UI off the `stage` field.
|
||||||
|
// @Summary Get passkey ceremony state
|
||||||
|
// @Description Returns the current WebAuthn passkey-pairing ceremony state for a token. PUBLIC endpoint (no apikey) — access is gated by the opaque short-lived ceremony token. Polled by the Evolution Passkey Helper browser extension.
|
||||||
|
// @Tags Passkey
|
||||||
|
// @Produce json
|
||||||
|
// @Param token path string true "Ceremony token"
|
||||||
|
// @Success 200 {object} gin.H "Ceremony state ({stage, skipHandoffUX, publicKey?, code?, error?})"
|
||||||
|
// @Failure 400 {object} gin.H "token is required"
|
||||||
|
// @Failure 404 {object} gin.H "ceremony not found or expired"
|
||||||
|
// @Failure 503 {object} gin.H "passkey ceremony unavailable"
|
||||||
|
// @Router /passkey-ceremony/{token} [get]
|
||||||
|
func (h *PasskeyHandler) GetCeremony(c *gin.Context) {
|
||||||
|
token := c.Param("token")
|
||||||
|
if token == "" {
|
||||||
|
c.JSON(http.StatusBadRequest, gin.H{"error": "token is required"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
store := h.whatsmeowService.PasskeyCeremonyStore()
|
||||||
|
if store == nil {
|
||||||
|
c.JSON(http.StatusServiceUnavailable, gin.H{"error": "passkey ceremony unavailable"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
_, state, ok := store.Lookup(token)
|
||||||
|
if !ok {
|
||||||
|
// Unknown/expired token. The extension treats an empty/cleared state
|
||||||
|
// after having started as "pairing concluded"; before that it keeps
|
||||||
|
// waiting. Return 404 so a never-valid token is distinguishable.
|
||||||
|
c.JSON(http.StatusNotFound, gin.H{"error": "ceremony not found or expired"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// gin.H keeps keys verbatim (publicKey, skipHandoffUX) — no struct-tag risk.
|
||||||
|
resp := gin.H{
|
||||||
|
"stage": state.Stage,
|
||||||
|
"skipHandoffUX": state.SkipHandoffUX,
|
||||||
|
}
|
||||||
|
if len(state.PublicKey) > 0 {
|
||||||
|
resp["publicKey"] = state.PublicKey // json.RawMessage — emitted as-is
|
||||||
|
}
|
||||||
|
if state.Code != "" {
|
||||||
|
resp["code"] = state.Code
|
||||||
|
}
|
||||||
|
if state.Error != "" {
|
||||||
|
resp["error"] = state.Error
|
||||||
|
}
|
||||||
|
c.JSON(http.StatusOK, resp)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SubmitResponse receives the WebAuthn assertion produced by the extension and
|
||||||
|
// forwards it to WhatsApp via SendPasskeyResponse.
|
||||||
|
// @Summary Submit passkey WebAuthn response
|
||||||
|
// @Description Receives the WebAuthn assertion produced by the browser extension and forwards it to WhatsApp. PUBLIC endpoint (no apikey) — gated by the ceremony token. Body is the WebAuthnResponse shape (id, rawId, type, response{clientDataJSON, authenticatorData, signature, userHandle?}), base64url-unpadded.
|
||||||
|
// @Tags Passkey
|
||||||
|
// @Accept json
|
||||||
|
// @Produce json
|
||||||
|
// @Param token path string true "Ceremony token"
|
||||||
|
// @Param response body types.WebAuthnResponse true "WebAuthn assertion"
|
||||||
|
// @Success 200 {object} gin.H "ok"
|
||||||
|
// @Failure 400 {object} gin.H "token is required / invalid body"
|
||||||
|
// @Failure 404 {object} gin.H "ceremony not found or expired"
|
||||||
|
// @Failure 500 {object} gin.H "Internal server error"
|
||||||
|
// @Failure 503 {object} gin.H "passkey ceremony unavailable"
|
||||||
|
// @Router /passkey-ceremony/{token}/response [post]
|
||||||
|
func (h *PasskeyHandler) SubmitResponse(c *gin.Context) {
|
||||||
|
token := c.Param("token")
|
||||||
|
if token == "" {
|
||||||
|
c.JSON(http.StatusBadRequest, gin.H{"error": "token is required"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
store := h.whatsmeowService.PasskeyCeremonyStore()
|
||||||
|
if store == nil {
|
||||||
|
c.JSON(http.StatusServiceUnavailable, gin.H{"error": "passkey ceremony unavailable"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
instanceID, ok := store.InstanceForToken(token)
|
||||||
|
if !ok {
|
||||||
|
c.JSON(http.StatusNotFound, gin.H{"error": "ceremony not found or expired"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// The extension posts exactly the WebAuthnResponse shape (id, rawId, type,
|
||||||
|
// response{clientDataJSON, authenticatorData, signature, userHandle?}),
|
||||||
|
// base64url-unpadded, which matches types.WebAuthnResponse's json tags.
|
||||||
|
var resp types.WebAuthnResponse
|
||||||
|
if err := c.ShouldBindJSON(&resp); err != nil {
|
||||||
|
c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := h.whatsmeowService.SubmitPasskeyResponse(instanceID, &resp); err != nil {
|
||||||
|
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
c.JSON(http.StatusOK, gin.H{"ok": true})
|
||||||
|
}
|
||||||
|
|
||||||
|
// Confirm finishes the pairing after the user verified the confirmation code.
|
||||||
|
// @Summary Confirm passkey pairing
|
||||||
|
// @Description Finishes the passkey pairing after the user verified the confirmation code. PUBLIC endpoint (no apikey) — gated by the ceremony token.
|
||||||
|
// @Tags Passkey
|
||||||
|
// @Produce json
|
||||||
|
// @Param token path string true "Ceremony token"
|
||||||
|
// @Success 200 {object} gin.H "ok"
|
||||||
|
// @Failure 400 {object} gin.H "token is required"
|
||||||
|
// @Failure 404 {object} gin.H "ceremony not found or expired"
|
||||||
|
// @Failure 500 {object} gin.H "Internal server error"
|
||||||
|
// @Failure 503 {object} gin.H "passkey ceremony unavailable"
|
||||||
|
// @Router /passkey-ceremony/{token}/confirm [post]
|
||||||
|
func (h *PasskeyHandler) Confirm(c *gin.Context) {
|
||||||
|
token := c.Param("token")
|
||||||
|
if token == "" {
|
||||||
|
c.JSON(http.StatusBadRequest, gin.H{"error": "token is required"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
store := h.whatsmeowService.PasskeyCeremonyStore()
|
||||||
|
if store == nil {
|
||||||
|
c.JSON(http.StatusServiceUnavailable, gin.H{"error": "passkey ceremony unavailable"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
instanceID, ok := store.InstanceForToken(token)
|
||||||
|
if !ok {
|
||||||
|
c.JSON(http.StatusNotFound, gin.H{"error": "ceremony not found or expired"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := h.whatsmeowService.ConfirmPasskey(instanceID); err != nil {
|
||||||
|
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
c.JSON(http.StatusOK, gin.H{"ok": true})
|
||||||
|
}
|
||||||
|
|
||||||
|
// RegisterRoutes wires the 3 PUBLIC ceremony endpoints directly on the engine,
|
||||||
|
// with NO auth group (mirrors core.LicenseRoutes). Call from main.go right
|
||||||
|
// after the license routes.
|
||||||
|
func RegisterRoutes(eng *gin.Engine, svc whatsmeow_service.WhatsmeowService) {
|
||||||
|
h := NewPasskeyHandler(svc)
|
||||||
|
grp := eng.Group("/passkey-ceremony")
|
||||||
|
{
|
||||||
|
grp.GET("/:token", h.GetCeremony)
|
||||||
|
grp.POST("/:token/response", h.SubmitResponse)
|
||||||
|
grp.POST("/:token/confirm", h.Confirm)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,11 +4,16 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
logger_wrapper "github.com/EvolutionAPI/evolution-go/pkg/logger"
|
logger_wrapper "github.com/evolution-foundation/evolution-go/pkg/logger"
|
||||||
poll_service "github.com/EvolutionAPI/evolution-go/pkg/poll/service"
|
poll_model "github.com/evolution-foundation/evolution-go/pkg/poll/model"
|
||||||
|
poll_service "github.com/evolution-foundation/evolution-go/pkg/poll/service"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Keep poll_model referenced so the package import is not dropped
|
||||||
|
// (swag reads Go source, not pre-processed, and needs the alias to be in scope).
|
||||||
|
var _ = poll_model.PollResults{}
|
||||||
|
|
||||||
type PollHandler struct {
|
type PollHandler struct {
|
||||||
pollService poll_service.PollService
|
pollService poll_service.PollService
|
||||||
loggerWrapper *logger_wrapper.LoggerManager
|
loggerWrapper *logger_wrapper.LoggerManager
|
||||||
@@ -29,7 +34,7 @@ func NewPollHandler(pollService poll_service.PollService, loggerWrapper *logger_
|
|||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param pollMessageId path string true "ID da mensagem da enquete"
|
// @Param pollMessageId path string true "ID da mensagem da enquete"
|
||||||
// @Success 200 {object} model.PollResults
|
// @Success 200 {object} poll_model.PollResults
|
||||||
// @Failure 400 {object} gin.H
|
// @Failure 400 {object} gin.H
|
||||||
// @Failure 404 {object} gin.H
|
// @Failure 404 {object} gin.H
|
||||||
// @Failure 500 {object} gin.H
|
// @Failure 500 {object} gin.H
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
logger_wrapper "github.com/EvolutionAPI/evolution-go/pkg/logger"
|
logger_wrapper "github.com/evolution-foundation/evolution-go/pkg/logger"
|
||||||
"github.com/EvolutionAPI/evolution-go/pkg/poll/model"
|
"github.com/evolution-foundation/evolution-go/pkg/poll/model"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
waProto "go.mau.fi/whatsmeow/proto/waE2E"
|
waProto "go.mau.fi/whatsmeow/proto/waE2E"
|
||||||
"go.mau.fi/whatsmeow/types"
|
"go.mau.fi/whatsmeow/types"
|
||||||
|
|||||||
+19
-15
@@ -7,20 +7,20 @@ import (
|
|||||||
swaggerFiles "github.com/swaggo/files"
|
swaggerFiles "github.com/swaggo/files"
|
||||||
ginSwagger "github.com/swaggo/gin-swagger"
|
ginSwagger "github.com/swaggo/gin-swagger"
|
||||||
|
|
||||||
_ "github.com/EvolutionAPI/evolution-go/docs"
|
_ "github.com/evolution-foundation/evolution-go/docs"
|
||||||
call_handler "github.com/EvolutionAPI/evolution-go/pkg/call/handler"
|
call_handler "github.com/evolution-foundation/evolution-go/pkg/call/handler"
|
||||||
chat_handler "github.com/EvolutionAPI/evolution-go/pkg/chat/handler"
|
chat_handler "github.com/evolution-foundation/evolution-go/pkg/chat/handler"
|
||||||
community_handler "github.com/EvolutionAPI/evolution-go/pkg/community/handler"
|
community_handler "github.com/evolution-foundation/evolution-go/pkg/community/handler"
|
||||||
group_handler "github.com/EvolutionAPI/evolution-go/pkg/group/handler"
|
group_handler "github.com/evolution-foundation/evolution-go/pkg/group/handler"
|
||||||
instance_handler "github.com/EvolutionAPI/evolution-go/pkg/instance/handler"
|
instance_handler "github.com/evolution-foundation/evolution-go/pkg/instance/handler"
|
||||||
label_handler "github.com/EvolutionAPI/evolution-go/pkg/label/handler"
|
label_handler "github.com/evolution-foundation/evolution-go/pkg/label/handler"
|
||||||
message_handler "github.com/EvolutionAPI/evolution-go/pkg/message/handler"
|
message_handler "github.com/evolution-foundation/evolution-go/pkg/message/handler"
|
||||||
auth_middleware "github.com/EvolutionAPI/evolution-go/pkg/middleware"
|
auth_middleware "github.com/evolution-foundation/evolution-go/pkg/middleware"
|
||||||
newsletter_handler "github.com/EvolutionAPI/evolution-go/pkg/newsletter/handler"
|
newsletter_handler "github.com/evolution-foundation/evolution-go/pkg/newsletter/handler"
|
||||||
poll_handler "github.com/EvolutionAPI/evolution-go/pkg/poll/handler"
|
poll_handler "github.com/evolution-foundation/evolution-go/pkg/poll/handler"
|
||||||
send_handler "github.com/EvolutionAPI/evolution-go/pkg/sendMessage/handler"
|
send_handler "github.com/evolution-foundation/evolution-go/pkg/sendMessage/handler"
|
||||||
server_handler "github.com/EvolutionAPI/evolution-go/pkg/server/handler"
|
server_handler "github.com/evolution-foundation/evolution-go/pkg/server/handler"
|
||||||
user_handler "github.com/EvolutionAPI/evolution-go/pkg/user/handler"
|
user_handler "github.com/evolution-foundation/evolution-go/pkg/user/handler"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Routes struct {
|
type Routes struct {
|
||||||
@@ -121,7 +121,9 @@ func (r *Routes) AssignRoutes(eng *gin.Engine) {
|
|||||||
routes.POST("/contact", r.jidValidationMiddleware.ValidateContactFields(), r.sendHandler.SendContact) // TODO: send multiple contacts
|
routes.POST("/contact", r.jidValidationMiddleware.ValidateContactFields(), r.sendHandler.SendContact) // TODO: send multiple contacts
|
||||||
routes.POST("/button", r.jidValidationMiddleware.ValidateNumberFieldWithFormatJid(), r.sendHandler.SendButton)
|
routes.POST("/button", r.jidValidationMiddleware.ValidateNumberFieldWithFormatJid(), r.sendHandler.SendButton)
|
||||||
routes.POST("/list", r.jidValidationMiddleware.ValidateNumberFieldWithFormatJid(), r.sendHandler.SendList)
|
routes.POST("/list", r.jidValidationMiddleware.ValidateNumberFieldWithFormatJid(), r.sendHandler.SendList)
|
||||||
// TODO: send status
|
routes.POST("/carousel", r.jidValidationMiddleware.ValidateNumberFieldWithFormatJid(), r.sendHandler.SendCarousel)
|
||||||
|
routes.POST("/status/text", r.sendHandler.SendStatusText)
|
||||||
|
routes.POST("/status/media", r.sendHandler.SendStatusMedia)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
routes = eng.Group("/user")
|
routes = eng.Group("/user")
|
||||||
@@ -149,6 +151,7 @@ func (r *Routes) AssignRoutes(eng *gin.Engine) {
|
|||||||
routes.POST("/react", r.jidValidationMiddleware.ValidateJIDFields("number"), r.messageHandler.React)
|
routes.POST("/react", r.jidValidationMiddleware.ValidateJIDFields("number"), r.messageHandler.React)
|
||||||
routes.POST("/presence", r.jidValidationMiddleware.ValidateNumberField(), r.messageHandler.ChatPresence)
|
routes.POST("/presence", r.jidValidationMiddleware.ValidateNumberField(), r.messageHandler.ChatPresence)
|
||||||
routes.POST("/markread", r.jidValidationMiddleware.ValidateNumberField(), r.messageHandler.MarkRead)
|
routes.POST("/markread", r.jidValidationMiddleware.ValidateNumberField(), r.messageHandler.MarkRead)
|
||||||
|
routes.POST("/markplayed", r.jidValidationMiddleware.ValidateNumberField(), r.messageHandler.MarkPlayed)
|
||||||
routes.POST("/downloadmedia", r.messageHandler.DownloadMedia)
|
routes.POST("/downloadmedia", r.messageHandler.DownloadMedia)
|
||||||
routes.POST("/status", r.messageHandler.GetMessageStatus)
|
routes.POST("/status", r.messageHandler.GetMessageStatus)
|
||||||
routes.POST("/delete", r.jidValidationMiddleware.ValidateNumberField(), r.messageHandler.DeleteMessageEveryone)
|
routes.POST("/delete", r.jidValidationMiddleware.ValidateNumberField(), r.messageHandler.DeleteMessageEveryone)
|
||||||
@@ -183,6 +186,7 @@ func (r *Routes) AssignRoutes(eng *gin.Engine) {
|
|||||||
routes.GET("/myall", r.groupHandler.GetMyGroups) // TODO: not working
|
routes.GET("/myall", r.groupHandler.GetMyGroups) // TODO: not working
|
||||||
routes.POST("/join", r.groupHandler.JoinGroupLink)
|
routes.POST("/join", r.groupHandler.JoinGroupLink)
|
||||||
routes.POST("/leave", r.jidValidationMiddleware.ValidateNumberField(), r.groupHandler.LeaveGroup)
|
routes.POST("/leave", r.jidValidationMiddleware.ValidateNumberField(), r.groupHandler.LeaveGroup)
|
||||||
|
routes.POST("/settings", r.jidValidationMiddleware.ValidateNumberField(), r.groupHandler.UpdateGroupSettings)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
routes = eng.Group("/call")
|
routes = eng.Group("/call")
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
package send_handler
|
package send_handler
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"encoding/base64"
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
instance_model "github.com/EvolutionAPI/evolution-go/pkg/instance/model"
|
instance_model "github.com/evolution-foundation/evolution-go/pkg/instance/model"
|
||||||
send_service "github.com/EvolutionAPI/evolution-go/pkg/sendMessage/service"
|
send_service "github.com/evolution-foundation/evolution-go/pkg/sendMessage/service"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -21,6 +22,9 @@ type SendHandler interface {
|
|||||||
SendContact(ctx *gin.Context)
|
SendContact(ctx *gin.Context)
|
||||||
SendButton(ctx *gin.Context)
|
SendButton(ctx *gin.Context)
|
||||||
SendList(ctx *gin.Context)
|
SendList(ctx *gin.Context)
|
||||||
|
SendCarousel(ctx *gin.Context)
|
||||||
|
SendStatusText(ctx *gin.Context)
|
||||||
|
SendStatusMedia(ctx *gin.Context)
|
||||||
}
|
}
|
||||||
|
|
||||||
type sendHandler struct {
|
type sendHandler struct {
|
||||||
@@ -171,6 +175,23 @@ func (s *sendHandler) SendMedia(ctx *gin.Context) {
|
|||||||
delay = int32(delay64)
|
delay = int32(delay64)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mentionAll := ctx.PostForm("mentionAll") == "true"
|
||||||
|
|
||||||
|
var mentionedJID []string
|
||||||
|
// Accept multiple values (mentionedJid=x&mentionedJid=y) or a single
|
||||||
|
// comma-separated string (mentionedJid=x,y).
|
||||||
|
for _, raw := range ctx.PostFormArray("mentionedJid") {
|
||||||
|
for _, v := range strings.Split(raw, ",") {
|
||||||
|
if trimmed := strings.TrimSpace(v); trimmed != "" {
|
||||||
|
mentionedJID = append(mentionedJID, trimmed)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var quoted send_service.QuotedStruct
|
||||||
|
quoted.MessageID = ctx.PostForm("quoted.messageId")
|
||||||
|
quoted.Participant = ctx.PostForm("quoted.participant")
|
||||||
|
|
||||||
// Get file
|
// Get file
|
||||||
file, err := ctx.FormFile("file")
|
file, err := ctx.FormFile("file")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -193,13 +214,15 @@ func (s *sendHandler) SendMedia(ctx *gin.Context) {
|
|||||||
|
|
||||||
// Create MediaStruct
|
// Create MediaStruct
|
||||||
data = &send_service.MediaStruct{
|
data = &send_service.MediaStruct{
|
||||||
Number: number,
|
Number: number,
|
||||||
Type: mediaType,
|
Type: mediaType,
|
||||||
Caption: caption,
|
Caption: caption,
|
||||||
Filename: filename,
|
Filename: filename,
|
||||||
Id: id,
|
Id: id,
|
||||||
Delay: delay,
|
Delay: delay,
|
||||||
// Other fields as necessary
|
MentionAll: mentionAll,
|
||||||
|
MentionedJID: mentionedJID,
|
||||||
|
Quoted: quoted,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pass fileBytes to the send service
|
// Pass fileBytes to the send service
|
||||||
@@ -234,10 +257,26 @@ func (s *sendHandler) SendMedia(ctx *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
message, err := s.sendMessageService.SendMediaUrl(data, instance)
|
var message *send_service.MessageSendStruct
|
||||||
if err != nil {
|
|
||||||
ctx.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
|
if !strings.HasPrefix(data.Url, "http://") && !strings.HasPrefix(data.Url, "https://") {
|
||||||
return
|
// Treat as base64-encoded media
|
||||||
|
fileBytes, err := base64.StdEncoding.DecodeString(data.Url)
|
||||||
|
if err != nil {
|
||||||
|
ctx.JSON(http.StatusBadRequest, gin.H{"error": "invalid base64 encoding"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
message, err = s.sendMessageService.SendMediaFile(data, fileBytes, instance)
|
||||||
|
if err != nil {
|
||||||
|
ctx.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
message, err = s.sendMessageService.SendMediaUrl(data, instance)
|
||||||
|
if err != nil {
|
||||||
|
ctx.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx.JSON(http.StatusOK, gin.H{"message": "success", "data": message})
|
ctx.JSON(http.StatusOK, gin.H{"message": "success", "data": message})
|
||||||
@@ -455,11 +494,22 @@ func (s *sendHandler) SendContact(ctx *gin.Context) {
|
|||||||
|
|
||||||
// Send a button message
|
// Send a button message
|
||||||
// @Summary Send a button message
|
// @Summary Send a button message
|
||||||
// @Description Send a button message
|
// @Description Send an interactive message with buttons. Each button has a `type`: `reply`, `copy`, `url`, `call` or `pix`.
|
||||||
|
// @Description
|
||||||
|
// @Description Combination rules enforced by the server:
|
||||||
|
// @Description - Up to 3 `reply` buttons per message.
|
||||||
|
// @Description - `reply` buttons cannot be mixed with any other type.
|
||||||
|
// @Description - `pix` button must be sent ALONE (no other button in the same message).
|
||||||
|
// @Description
|
||||||
|
// @Description WhatsApp client rendering quirks (NOT enforced by the server, but verified in the field):
|
||||||
|
// @Description - WhatsApp Web: only `reply`-only messages (up to 3) OR CTAs grouped together (`copy` + `url` + `call`) render correctly.
|
||||||
|
// @Description - Do NOT mix `reply` with CTA buttons (`copy`/`url`/`call`) — the message will not appear on WhatsApp Web.
|
||||||
|
// @Description
|
||||||
|
// @Description Required body fields: `number`, `title`, `description`, `footer`, `buttons`.
|
||||||
// @Tags Send Message
|
// @Tags Send Message
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param message body send_service.ContactStruct true "Message data"
|
// @Param message body send_service.ButtonStruct true "Message data"
|
||||||
// @Success 200 {object} gin.H "success"
|
// @Success 200 {object} gin.H "success"
|
||||||
// @Failure 400 {object} gin.H "Error on validation"
|
// @Failure 400 {object} gin.H "Error on validation"
|
||||||
// @Failure 500 {object} gin.H "Internal server error"
|
// @Failure 500 {object} gin.H "Internal server error"
|
||||||
@@ -511,11 +561,17 @@ func (s *sendHandler) SendButton(ctx *gin.Context) {
|
|||||||
|
|
||||||
// Send a list message
|
// Send a list message
|
||||||
// @Summary Send a list message
|
// @Summary Send a list message
|
||||||
// @Description Send a list message
|
// @Description Send an interactive list message (single-select) rendered as a tappable menu.
|
||||||
|
// @Description
|
||||||
|
// @Description Required body fields: `number`, `title`, `description`, `footerText`, `buttonText`, `sections`.
|
||||||
|
// @Description Each section must contain one or more `rows`. When `rowId` is omitted, the server generates a fallback ID.
|
||||||
|
// @Description When `buttonText` is empty, the server falls back to "Ver Menu".
|
||||||
|
// @Description
|
||||||
|
// @Description Uses legacy `ListMessage` format (no ViewOnceMessage wrapper) so it renders on iOS, Android and WhatsApp Web.
|
||||||
// @Tags Send Message
|
// @Tags Send Message
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param message body send_service.ContactStruct true "Message data"
|
// @Param message body send_service.ListStruct true "Message data"
|
||||||
// @Success 200 {object} gin.H "success"
|
// @Success 200 {object} gin.H "success"
|
||||||
// @Failure 400 {object} gin.H "Error on validation"
|
// @Failure 400 {object} gin.H "Error on validation"
|
||||||
// @Failure 500 {object} gin.H "Internal server error"
|
// @Failure 500 {object} gin.H "Internal server error"
|
||||||
@@ -570,6 +626,210 @@ func (s *sendHandler) SendList(ctx *gin.Context) {
|
|||||||
ctx.JSON(http.StatusOK, gin.H{"message": "success", "data": message})
|
ctx.JSON(http.StatusOK, gin.H{"message": "success", "data": message})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Send a carousel message
|
||||||
|
// @Summary Send a carousel message
|
||||||
|
// @Description Send an interactive carousel (multiple swipeable cards). Each card carries its own image or video, body and optional buttons.
|
||||||
|
// @Description
|
||||||
|
// @Description Card button `type` accepted values (case-insensitive, uppercased internally): `REPLY` (default), `URL`, `CALL`, `COPY`.
|
||||||
|
// @Description The `PIX` button type is NOT supported in carousel cards — use `/send/button` for PIX.
|
||||||
|
// @Description
|
||||||
|
// @Description IMPORTANT — `CarouselButtonStruct` is different from the flat button used in `/send/button`:
|
||||||
|
// @Description - URL button: put the link in the `id` field (NOT in a `url` field).
|
||||||
|
// @Description - CALL button: put the phone number in the `id` field (NOT in a `phoneNumber` field).
|
||||||
|
// @Description - COPY button: put the code to be copied in `copyCode`.
|
||||||
|
// @Description - REPLY button: put the payload/callback ID in `id`.
|
||||||
|
// @Description
|
||||||
|
// @Description Per-card combination rules (NOT enforced by the server, but verified in the field):
|
||||||
|
// @Description - Same WhatsApp Web quirk as `/send/button`: avoid mixing REPLY with CTA buttons (URL/CALL/COPY) in the same card — mixed sets do not render on Web.
|
||||||
|
// @Description - Stick to either "only REPLY" or "only CTAs grouped together" per card.
|
||||||
|
// @Description
|
||||||
|
// @Description Required body fields: `number`, `cards` (at least one). Each card requires `header` + `body`.
|
||||||
|
// @Tags Send Message
|
||||||
|
// @Accept json
|
||||||
|
// @Produce json
|
||||||
|
// @Param message body send_service.CarouselStruct true "Message data"
|
||||||
|
// @Success 200 {object} gin.H "success"
|
||||||
|
// @Failure 400 {object} gin.H "Error on validation"
|
||||||
|
// @Failure 500 {object} gin.H "Internal server error"
|
||||||
|
// @Router /send/carousel [post]
|
||||||
|
func (s *sendHandler) SendCarousel(ctx *gin.Context) {
|
||||||
|
getInstance := ctx.MustGet("instance")
|
||||||
|
|
||||||
|
instance, ok := getInstance.(*instance_model.Instance)
|
||||||
|
if !ok {
|
||||||
|
ctx.JSON(http.StatusInternalServerError, gin.H{"error": "instance not found"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var data *send_service.CarouselStruct
|
||||||
|
err := ctx.ShouldBindBodyWithJSON(&data)
|
||||||
|
if err != nil {
|
||||||
|
ctx.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if data.Number == "" {
|
||||||
|
ctx.JSON(http.StatusBadRequest, gin.H{"error": "phone number is required"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(data.Cards) == 0 {
|
||||||
|
ctx.JSON(http.StatusBadRequest, gin.H{"error": "at least one card is required"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
message, err := s.sendMessageService.SendCarousel(data, instance)
|
||||||
|
if err != nil {
|
||||||
|
ctx.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
ctx.JSON(http.StatusOK, gin.H{"message": "success", "data": message})
|
||||||
|
}
|
||||||
|
|
||||||
|
// Send a text status message
|
||||||
|
// @Summary Send a WhatsApp text status
|
||||||
|
// @Description Send a WhatsApp text status to status@broadcast
|
||||||
|
// @Tags Send Message
|
||||||
|
// @Accept json
|
||||||
|
// @Produce json
|
||||||
|
// @Param message body send_service.StatusTextStruct true "Status text data"
|
||||||
|
// @Success 200 {object} gin.H "success"
|
||||||
|
// @Failure 400 {object} gin.H "Error on validation"
|
||||||
|
// @Failure 500 {object} gin.H "Internal server error"
|
||||||
|
// @Router /send/status/text [post]
|
||||||
|
func (s *sendHandler) SendStatusText(ctx *gin.Context) {
|
||||||
|
getInstance := ctx.MustGet("instance")
|
||||||
|
|
||||||
|
instance, ok := getInstance.(*instance_model.Instance)
|
||||||
|
if !ok {
|
||||||
|
ctx.JSON(http.StatusInternalServerError, gin.H{"error": "instance not found"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
data := new(send_service.StatusTextStruct)
|
||||||
|
err := ctx.ShouldBindBodyWithJSON(data)
|
||||||
|
if err != nil {
|
||||||
|
ctx.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if data.Text == "" {
|
||||||
|
ctx.JSON(http.StatusBadRequest, gin.H{"error": "text is required"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
message, err := s.sendMessageService.SendStatusText(data, instance)
|
||||||
|
if err != nil {
|
||||||
|
ctx.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
ctx.JSON(http.StatusOK, gin.H{"message": "success", "data": message})
|
||||||
|
}
|
||||||
|
|
||||||
|
// Send a media status message (image or video)
|
||||||
|
// @Summary Send a WhatsApp media status (image/video)
|
||||||
|
// @Description Send an image or video status to status@broadcast. Supports JSON (URL) or multipart/form-data (file upload)
|
||||||
|
// @Tags Send Message
|
||||||
|
// @Accept json, multipart/form-data
|
||||||
|
// @Produce json
|
||||||
|
// @Param type formData string true "Media type: image or video"
|
||||||
|
// @Param file formData file false "Media file (for multipart upload)"
|
||||||
|
// @Param url formData string false "Media URL (for JSON upload)"
|
||||||
|
// @Param caption formData string false "Caption for the media"
|
||||||
|
// @Param id formData string false "Custom message ID"
|
||||||
|
// @Success 200 {object} gin.H "success"
|
||||||
|
// @Failure 400 {object} gin.H "Error on validation"
|
||||||
|
// @Failure 500 {object} gin.H "Internal server error"
|
||||||
|
// @Router /send/status/media [post]
|
||||||
|
func (s *sendHandler) SendStatusMedia(ctx *gin.Context) {
|
||||||
|
getInstance := ctx.MustGet("instance")
|
||||||
|
|
||||||
|
instance, ok := getInstance.(*instance_model.Instance)
|
||||||
|
if !ok {
|
||||||
|
ctx.JSON(http.StatusInternalServerError, gin.H{"error": "instance not found"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
contentType := ctx.ContentType()
|
||||||
|
|
||||||
|
data := new(send_service.StatusMediaStruct)
|
||||||
|
|
||||||
|
if strings.HasPrefix(contentType, "multipart/form-data") {
|
||||||
|
mediaType := ctx.PostForm("type")
|
||||||
|
if mediaType == "" {
|
||||||
|
ctx.JSON(http.StatusBadRequest, gin.H{"error": "media type is required"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if mediaType != "image" && mediaType != "video" {
|
||||||
|
ctx.JSON(http.StatusBadRequest, gin.H{"error": "type must be 'image' or 'video'"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
caption := ctx.PostForm("caption")
|
||||||
|
id := ctx.PostForm("id")
|
||||||
|
|
||||||
|
file, err := ctx.FormFile("file")
|
||||||
|
if err != nil {
|
||||||
|
ctx.JSON(http.StatusBadRequest, gin.H{"error": "file is required"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
fileData, err := file.Open()
|
||||||
|
if err != nil {
|
||||||
|
ctx.JSON(http.StatusInternalServerError, gin.H{"error": "cannot open file"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
defer fileData.Close()
|
||||||
|
fileBytes, err := io.ReadAll(fileData)
|
||||||
|
if err != nil {
|
||||||
|
ctx.JSON(http.StatusInternalServerError, gin.H{"error": "cannot read file"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
data = &send_service.StatusMediaStruct{
|
||||||
|
Type: mediaType,
|
||||||
|
Caption: caption,
|
||||||
|
Id: id,
|
||||||
|
}
|
||||||
|
|
||||||
|
message, err := s.sendMessageService.SendStatusMediaFile(data, fileBytes, instance)
|
||||||
|
if err != nil {
|
||||||
|
ctx.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
ctx.JSON(http.StatusOK, gin.H{"message": "success", "data": message})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
err := ctx.ShouldBindBodyWithJSON(data)
|
||||||
|
if err != nil {
|
||||||
|
ctx.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if data.Url == "" {
|
||||||
|
ctx.JSON(http.StatusBadRequest, gin.H{"error": "url is required"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if data.Type != "image" && data.Type != "video" {
|
||||||
|
ctx.JSON(http.StatusBadRequest, gin.H{"error": "type must be 'image' or 'video'"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
message, err := s.sendMessageService.SendStatusMediaUrl(data, instance)
|
||||||
|
if err != nil {
|
||||||
|
ctx.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
ctx.JSON(http.StatusOK, gin.H{"message": "success", "data": message})
|
||||||
|
}
|
||||||
|
|
||||||
func NewSendHandler(
|
func NewSendHandler(
|
||||||
sendMessageService send_service.SendService,
|
sendMessageService send_service.SendService,
|
||||||
) SendHandler {
|
) SendHandler {
|
||||||
|
|||||||
+1160
-334
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,142 @@
|
|||||||
|
package send_service
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"image"
|
||||||
|
"image/color"
|
||||||
|
"image/jpeg"
|
||||||
|
"image/png"
|
||||||
|
"os/exec"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
// encodePNG builds a simple solid-color PNG of the given size for testing.
|
||||||
|
func encodePNG(t *testing.T, w, h int) []byte {
|
||||||
|
t.Helper()
|
||||||
|
img := image.NewRGBA(image.Rect(0, 0, w, h))
|
||||||
|
for y := 0; y < h; y++ {
|
||||||
|
for x := 0; x < w; x++ {
|
||||||
|
img.Set(x, y, color.RGBA{R: 10, G: 120, B: 200, A: 255})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var buf bytes.Buffer
|
||||||
|
if err := png.Encode(&buf, img); err != nil {
|
||||||
|
t.Fatalf("failed to encode test PNG: %v", err)
|
||||||
|
}
|
||||||
|
return buf.Bytes()
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestMakeJPEGThumbnail_ResizesLandscape(t *testing.T) {
|
||||||
|
src := encodePNG(t, 800, 400)
|
||||||
|
|
||||||
|
thumb := makeJPEGThumbnail(src, 72)
|
||||||
|
if thumb == nil {
|
||||||
|
t.Fatal("expected a thumbnail, got nil")
|
||||||
|
}
|
||||||
|
|
||||||
|
cfg, format, err := image.DecodeConfig(bytes.NewReader(thumb))
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("thumbnail is not a decodable image: %v", err)
|
||||||
|
}
|
||||||
|
if format != "jpeg" {
|
||||||
|
t.Fatalf("expected jpeg thumbnail, got %q", format)
|
||||||
|
}
|
||||||
|
if cfg.Width != 72 {
|
||||||
|
t.Fatalf("expected width 72, got %d", cfg.Width)
|
||||||
|
}
|
||||||
|
// Aspect ratio (2:1) must be preserved: 72 wide -> 36 tall.
|
||||||
|
if cfg.Height != 36 {
|
||||||
|
t.Fatalf("expected height 36 to preserve aspect ratio, got %d", cfg.Height)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestMakeJPEGThumbnail_DoesNotUpscaleSmallImages(t *testing.T) {
|
||||||
|
src := encodePNG(t, 40, 40)
|
||||||
|
|
||||||
|
thumb := makeJPEGThumbnail(src, 72)
|
||||||
|
if thumb == nil {
|
||||||
|
t.Fatal("expected a thumbnail, got nil")
|
||||||
|
}
|
||||||
|
|
||||||
|
cfg, _, err := image.DecodeConfig(bytes.NewReader(thumb))
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("thumbnail is not a decodable image: %v", err)
|
||||||
|
}
|
||||||
|
if cfg.Width != 40 || cfg.Height != 40 {
|
||||||
|
t.Fatalf("expected the thumbnail to keep the original 40x40 size, got %dx%d", cfg.Width, cfg.Height)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestMakeJPEGThumbnail_InvalidInputReturnsNil(t *testing.T) {
|
||||||
|
if thumb := makeJPEGThumbnail([]byte("not an image"), 72); thumb != nil {
|
||||||
|
t.Fatalf("expected nil for non-image input, got %d bytes", len(thumb))
|
||||||
|
}
|
||||||
|
if thumb := makeJPEGThumbnail(nil, 72); thumb != nil {
|
||||||
|
t.Fatalf("expected nil for nil input, got %d bytes", len(thumb))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestMakeJPEGThumbnail_DefaultsInvalidMaxWidth(t *testing.T) {
|
||||||
|
src := encodePNG(t, 800, 800)
|
||||||
|
|
||||||
|
thumb := makeJPEGThumbnail(src, 0)
|
||||||
|
if thumb == nil {
|
||||||
|
t.Fatal("expected a thumbnail with defaulted maxWidth, got nil")
|
||||||
|
}
|
||||||
|
cfg, _, err := image.DecodeConfig(bytes.NewReader(thumb))
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("thumbnail is not a decodable image: %v", err)
|
||||||
|
}
|
||||||
|
if cfg.Width != 72 {
|
||||||
|
t.Fatalf("expected defaulted width 72, got %d", cfg.Width)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestMakePDFThumbnail_InvalidInputReturnsNil(t *testing.T) {
|
||||||
|
// With or without pdftoppm installed, garbage input must never panic and
|
||||||
|
// must yield nil so the caller falls back to sending without a preview.
|
||||||
|
if thumb := makePDFThumbnail([]byte("%PDF-not-really"), 200); thumb != nil {
|
||||||
|
t.Fatalf("expected nil for invalid PDF input, got %d bytes", len(thumb))
|
||||||
|
}
|
||||||
|
if thumb := makePDFThumbnail(nil, 200); thumb != nil {
|
||||||
|
t.Fatalf("expected nil for nil input, got %d bytes", len(thumb))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestMakePDFThumbnail_RendersFirstPageWhenPopplerAvailable(t *testing.T) {
|
||||||
|
if _, err := exec.LookPath("pdftoppm"); err != nil {
|
||||||
|
t.Skip("pdftoppm not installed; skipping PDF rasterization test")
|
||||||
|
}
|
||||||
|
|
||||||
|
pdf := minimalPDF(t)
|
||||||
|
thumb := makePDFThumbnail(pdf, 200)
|
||||||
|
if thumb == nil {
|
||||||
|
t.Fatal("expected a thumbnail from a valid PDF, got nil")
|
||||||
|
}
|
||||||
|
|
||||||
|
cfg, format, err := image.DecodeConfig(bytes.NewReader(thumb))
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("PDF thumbnail is not a decodable image: %v", err)
|
||||||
|
}
|
||||||
|
if format != "jpeg" {
|
||||||
|
t.Fatalf("expected jpeg thumbnail, got %q", format)
|
||||||
|
}
|
||||||
|
if cfg.Width < 1 || cfg.Width > 200 {
|
||||||
|
t.Fatalf("expected width within (0, 200], got %d", cfg.Width)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// minimalPDF returns the bytes of a tiny, valid single-page PDF.
|
||||||
|
func minimalPDF(t *testing.T) []byte {
|
||||||
|
t.Helper()
|
||||||
|
const doc = "%PDF-1.1\n" +
|
||||||
|
"1 0 obj<< /Type /Catalog /Pages 2 0 R >>endobj\n" +
|
||||||
|
"2 0 obj<< /Type /Pages /Kids [3 0 R] /Count 1 >>endobj\n" +
|
||||||
|
"3 0 obj<< /Type /Page /Parent 2 0 R /MediaBox [0 0 200 200] /Resources << >> >>endobj\n" +
|
||||||
|
"trailer<< /Root 1 0 R >>\n" +
|
||||||
|
"%%EOF\n"
|
||||||
|
return []byte(doc)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ensure the jpeg encoder import stays referenced even if the helper changes.
|
||||||
|
var _ = jpeg.DefaultQuality
|
||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
storage_interfaces "github.com/EvolutionAPI/evolution-go/pkg/storage/interfaces"
|
storage_interfaces "github.com/evolution-foundation/evolution-go/pkg/storage/interfaces"
|
||||||
"github.com/minio/minio-go/v7"
|
"github.com/minio/minio-go/v7"
|
||||||
"github.com/minio/minio-go/v7/pkg/credentials"
|
"github.com/minio/minio-go/v7/pkg/credentials"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package user_handler
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
instance_model "github.com/EvolutionAPI/evolution-go/pkg/instance/model"
|
instance_model "github.com/evolution-foundation/evolution-go/pkg/instance/model"
|
||||||
user_service "github.com/EvolutionAPI/evolution-go/pkg/user/service"
|
user_service "github.com/evolution-foundation/evolution-go/pkg/user/service"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
instance_model "github.com/EvolutionAPI/evolution-go/pkg/instance/model"
|
instance_model "github.com/evolution-foundation/evolution-go/pkg/instance/model"
|
||||||
logger_wrapper "github.com/EvolutionAPI/evolution-go/pkg/logger"
|
logger_wrapper "github.com/evolution-foundation/evolution-go/pkg/logger"
|
||||||
"github.com/EvolutionAPI/evolution-go/pkg/utils"
|
"github.com/evolution-foundation/evolution-go/pkg/utils"
|
||||||
whatsmeow_service "github.com/EvolutionAPI/evolution-go/pkg/whatsmeow/service"
|
whatsmeow_service "github.com/evolution-foundation/evolution-go/pkg/whatsmeow/service"
|
||||||
"go.mau.fi/whatsmeow"
|
"go.mau.fi/whatsmeow"
|
||||||
"go.mau.fi/whatsmeow/types"
|
"go.mau.fi/whatsmeow/types"
|
||||||
"go.mau.fi/whatsmeow/types/events"
|
"go.mau.fi/whatsmeow/types/events"
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package utils
|
|||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"runtime"
|
"runtime"
|
||||||
@@ -214,6 +215,21 @@ func ParseJID(arg string) (whatsmeow_types.JID, bool) {
|
|||||||
return recipient, true
|
return recipient, true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CanonicalJID returns a JID safe for RAW protocol nodes (chatstate / typing,
|
||||||
|
// read receipts, presence subscribe, reactions, etc.).
|
||||||
|
//
|
||||||
|
// CreateJID intentionally prefixes phone numbers with "+" (e.g.
|
||||||
|
// "[email protected]") to match the IsOnWhatsApp/display convention.
|
||||||
|
// Message sending tolerates this because whatsmeow normalizes the JID during
|
||||||
|
// usync/device resolution. RAW nodes are sent WITHOUT usync, so a malformed
|
||||||
|
// "+JID" reaches the server and the node is silently dropped (e.g. the "typing"
|
||||||
|
// indicator never reaches the recipient). WhatsApp user JIDs are digits-only, so
|
||||||
|
// strip the leading "+" to get the canonical form.
|
||||||
|
func CanonicalJID(jid whatsmeow_types.JID) whatsmeow_types.JID {
|
||||||
|
jid.User = strings.TrimPrefix(jid.User, "+")
|
||||||
|
return jid
|
||||||
|
}
|
||||||
|
|
||||||
func CreateHTTPProxy(httpHost, httpPort, user, password string) (func(*http.Request) (*url.URL, error), error) {
|
func CreateHTTPProxy(httpHost, httpPort, user, password string) (func(*http.Request) (*url.URL, error), error) {
|
||||||
address := fmt.Sprintf("http://%s:%s@%s:%s", user, password, httpHost, httpPort)
|
address := fmt.Sprintf("http://%s:%s@%s:%s", user, password, httpHost, httpPort)
|
||||||
|
|
||||||
@@ -253,6 +269,66 @@ func CreateSocks5Proxy(socks5Host, socks5Port, user, password string) (proxy.Dia
|
|||||||
// }, nil
|
// }, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NormalizeProxyProtocol returns the proxy protocol normalized to one of
|
||||||
|
// http/https/socks5. If not supplied, it is inferred from the port — ports
|
||||||
|
// 1080, 2080, and 42000-43000 map to socks5; everything else defaults to http.
|
||||||
|
func NormalizeProxyProtocol(protocol, port string) string {
|
||||||
|
normalized := strings.ToLower(strings.TrimSpace(protocol))
|
||||||
|
|
||||||
|
switch normalized {
|
||||||
|
case "socks":
|
||||||
|
return "socks5"
|
||||||
|
case "http", "https", "socks5":
|
||||||
|
return normalized
|
||||||
|
}
|
||||||
|
|
||||||
|
switch strings.TrimSpace(port) {
|
||||||
|
case "1080", "2080":
|
||||||
|
return "socks5"
|
||||||
|
}
|
||||||
|
|
||||||
|
portNum, err := strconv.Atoi(strings.TrimSpace(port))
|
||||||
|
if err == nil && portNum >= 42000 && portNum <= 43000 {
|
||||||
|
return "socks5"
|
||||||
|
}
|
||||||
|
|
||||||
|
return "http"
|
||||||
|
}
|
||||||
|
|
||||||
|
// BuildProxyAddress builds a proxy URL string suitable for whatsmeow's
|
||||||
|
// client.SetProxyAddress — it supports http, https, and socks5 with optional
|
||||||
|
// basic auth credentials.
|
||||||
|
func BuildProxyAddress(protocol, host, port, user, password string) (string, error) {
|
||||||
|
if strings.TrimSpace(host) == "" {
|
||||||
|
return "", fmt.Errorf("proxy host is required")
|
||||||
|
}
|
||||||
|
|
||||||
|
if strings.TrimSpace(port) == "" {
|
||||||
|
return "", fmt.Errorf("proxy port is required")
|
||||||
|
}
|
||||||
|
|
||||||
|
normalizedProtocol := NormalizeProxyProtocol(protocol, port)
|
||||||
|
|
||||||
|
if normalizedProtocol != "http" && normalizedProtocol != "https" && normalizedProtocol != "socks5" {
|
||||||
|
return "", fmt.Errorf("unsupported proxy protocol %q", protocol)
|
||||||
|
}
|
||||||
|
|
||||||
|
proxyURL := &url.URL{
|
||||||
|
Scheme: normalizedProtocol,
|
||||||
|
Host: net.JoinHostPort(strings.TrimSpace(host), strings.TrimSpace(port)),
|
||||||
|
}
|
||||||
|
|
||||||
|
if user != "" {
|
||||||
|
if password != "" {
|
||||||
|
proxyURL.User = url.UserPassword(user, password)
|
||||||
|
} else {
|
||||||
|
proxyURL.User = url.User(user)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return proxyURL.String(), nil
|
||||||
|
}
|
||||||
|
|
||||||
func UpdateUserInfo(values interface{}, field string, value string) interface{} {
|
func UpdateUserInfo(values interface{}, field string, value string) interface{} {
|
||||||
v, ok := values.(Values)
|
v, ok := values.(Values)
|
||||||
if !ok {
|
if !ok {
|
||||||
@@ -447,6 +523,8 @@ func GetMessageType(waMsg *waE2E.Message) string {
|
|||||||
return "template button reply"
|
return "template button reply"
|
||||||
case waMsg.InteractiveMessage != nil:
|
case waMsg.InteractiveMessage != nil:
|
||||||
return "interactive"
|
return "interactive"
|
||||||
|
case waMsg.GetInteractiveResponseMessage() != nil:
|
||||||
|
return "interactive response"
|
||||||
case waMsg.ListMessage != nil:
|
case waMsg.ListMessage != nil:
|
||||||
return "list"
|
return "list"
|
||||||
case waMsg.ProductMessage != nil:
|
case waMsg.ProductMessage != nil:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package utils
|
package utils
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -325,3 +326,61 @@ func TestParseJID(t *testing.T) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestCanonicalJID locks in the fix for the silent typing-indicator / receipt
|
||||||
|
// drop: ParseJID (via CreateJID) prefixes phone numbers with "+", which is
|
||||||
|
// tolerated by message sending (usync normalizes it) but breaks RAW nodes
|
||||||
|
// (chatstate, read receipts, reactions). CanonicalJID must strip that "+" while
|
||||||
|
// leaving already-canonical JIDs (LID, group, digits-only) untouched.
|
||||||
|
func TestCanonicalJID(t *testing.T) {
|
||||||
|
tests := []struct {
|
||||||
|
name string
|
||||||
|
input string
|
||||||
|
expectedJID string // canonical JID expected after ParseJID -> CanonicalJID
|
||||||
|
}{
|
||||||
|
{
|
||||||
|
name: "BR phone strips the leading +",
|
||||||
|
input: "554187083284",
|
||||||
|
expectedJID: "[email protected]",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "US phone strips the leading +",
|
||||||
|
input: "15551234567",
|
||||||
|
expectedJID: "[email protected]",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Already-canonical JID is unchanged",
|
||||||
|
input: "[email protected]",
|
||||||
|
expectedJID: "[email protected]",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "LID JID is left untouched",
|
||||||
|
input: "15883309207561@lid",
|
||||||
|
expectedJID: "15883309207561@lid",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Group JID is left untouched",
|
||||||
|
input: "[email protected]",
|
||||||
|
expectedJID: "[email protected]",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, tt := range tests {
|
||||||
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
|
jid, ok := ParseJID(tt.input)
|
||||||
|
if !ok {
|
||||||
|
t.Fatalf("ParseJID(%q) failed", tt.input)
|
||||||
|
}
|
||||||
|
|
||||||
|
canonical := CanonicalJID(jid)
|
||||||
|
|
||||||
|
if got := canonical.String(); got != tt.expectedJID {
|
||||||
|
t.Errorf("CanonicalJID for input %q = %q, want %q", tt.input, got, tt.expectedJID)
|
||||||
|
}
|
||||||
|
|
||||||
|
if strings.HasPrefix(canonical.User, "+") {
|
||||||
|
t.Errorf("CanonicalJID for input %q still has '+' in User: %q", tt.input, canonical.User)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
package whatsmeow_service
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
|
||||||
|
"go.mau.fi/whatsmeow/proto/waE2E"
|
||||||
|
"google.golang.org/protobuf/encoding/protojson"
|
||||||
|
)
|
||||||
|
|
||||||
|
func extractReferralFromMessage(message *waE2E.Message) json.RawMessage {
|
||||||
|
contextInfo := getContextInfoFromMessage(message)
|
||||||
|
if contextInfo == nil || contextInfo.GetExternalAdReply() == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
referral, err := protojson.Marshal(contextInfo.GetExternalAdReply())
|
||||||
|
if err != nil || len(referral) == 0 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
return json.RawMessage(referral)
|
||||||
|
}
|
||||||
|
|
||||||
|
func getContextInfoFromMessage(message *waE2E.Message) *waE2E.ContextInfo {
|
||||||
|
if message == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if extendedText := message.GetExtendedTextMessage(); extendedText != nil {
|
||||||
|
return extendedText.GetContextInfo()
|
||||||
|
}
|
||||||
|
|
||||||
|
if image := message.GetImageMessage(); image != nil {
|
||||||
|
return image.GetContextInfo()
|
||||||
|
}
|
||||||
|
|
||||||
|
if audio := message.GetAudioMessage(); audio != nil {
|
||||||
|
return audio.GetContextInfo()
|
||||||
|
}
|
||||||
|
|
||||||
|
if document := message.GetDocumentMessage(); document != nil {
|
||||||
|
return document.GetContextInfo()
|
||||||
|
}
|
||||||
|
|
||||||
|
if video := message.GetVideoMessage(); video != nil {
|
||||||
|
return video.GetContextInfo()
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
package whatsmeow_service
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"go.mau.fi/whatsmeow/proto/waE2E"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestExtractReferralFromMessage(t *testing.T) {
|
||||||
|
message := &waE2E.Message{
|
||||||
|
ExtendedTextMessage: &waE2E.ExtendedTextMessage{
|
||||||
|
Text: stringPtr("Hello! I want to know more about this ad."),
|
||||||
|
ContextInfo: &waE2E.ContextInfo{
|
||||||
|
ExternalAdReply: &waE2E.ContextInfo_ExternalAdReplyInfo{
|
||||||
|
Title: stringPtr("Your Dream Farm"),
|
||||||
|
Body: stringPtr("Discover exclusive rural properties in the countryside."),
|
||||||
|
CtwaClid: stringPtr("FAKE_CLID_abc123xyz"),
|
||||||
|
Ref: stringPtr("landing_page_01"),
|
||||||
|
SourceApp: stringPtr("facebook"),
|
||||||
|
SourceType: stringPtr("ad"),
|
||||||
|
SourceID: stringPtr("123456789012345"),
|
||||||
|
SourceURL: stringPtr("https://fb.me/fake-ad-link"),
|
||||||
|
ShowAdAttribution: boolPtr(true),
|
||||||
|
ClickToWhatsappCall: boolPtr(true),
|
||||||
|
AutomatedGreetingMessageShown: boolPtr(true),
|
||||||
|
GreetingMessageBody: stringPtr("Hello! I want to know more about this ad."),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
referral := extractReferralFromMessage(message)
|
||||||
|
if len(referral) == 0 {
|
||||||
|
t.Fatal("expected referral payload, got empty")
|
||||||
|
}
|
||||||
|
|
||||||
|
var got map[string]any
|
||||||
|
if err := json.Unmarshal(referral, &got); err != nil {
|
||||||
|
t.Fatalf("unmarshal referral: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if got["ctwaClid"] != "FAKE_CLID_abc123xyz" {
|
||||||
|
t.Fatalf("expected ctwaClid to be preserved, got %#v", got["ctwaClid"])
|
||||||
|
}
|
||||||
|
|
||||||
|
if got["sourceURL"] != "https://fb.me/fake-ad-link" {
|
||||||
|
t.Fatalf("expected sourceURL to be preserved, got %#v", got["sourceURL"])
|
||||||
|
}
|
||||||
|
|
||||||
|
if got["showAdAttribution"] != true {
|
||||||
|
t.Fatalf("expected showAdAttribution to be preserved, got %#v", got["showAdAttribution"])
|
||||||
|
}
|
||||||
|
|
||||||
|
if got["automatedGreetingMessageShown"] != true {
|
||||||
|
t.Fatalf("expected automatedGreetingMessageShown to be preserved, got %#v", got["automatedGreetingMessageShown"])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func stringPtr(v string) *string {
|
||||||
|
return &v
|
||||||
|
}
|
||||||
|
|
||||||
|
func boolPtr(v bool) *bool {
|
||||||
|
return &v
|
||||||
|
}
|
||||||
+633
-264
File diff suppressed because it is too large.
Load diff
Binary file not shown.
|
After Width: | Height: | Size: 7.1 KiB |
Reference in new issue
Block a user