Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa364b57e8 | ||
|
|
ea973d0de4 | ||
|
|
1a1b64cbb2 | ||
|
|
09c7e11dbc | ||
|
|
3450a56756 | ||
|
|
f37f4466ae | ||
|
|
451834b219 | ||
|
|
91924353e2 | ||
|
|
67cf94fc95 | ||
|
|
36a343c09f | ||
|
|
4a37aebbf1 | ||
|
|
d5fa9f8d72 | ||
|
|
08c244334b | ||
|
|
23dd1c2726 | ||
|
|
23a309d394 | ||
|
|
3c1bb4e145 | ||
|
|
87b320a3e3 | ||
|
|
e4fb9615c7 | ||
|
|
efad4de0af | ||
|
|
04f62700a2 | ||
|
|
08415f7931 | ||
|
|
8bc86af3c8 | ||
|
|
fa2c5e42dc | ||
|
|
e3d3952b81 | ||
|
|
a9171addde | ||
|
|
440ac087ad | ||
|
|
9dd5eb4eeb | ||
|
|
26c2c9abc9 | ||
|
|
663b07c07e | ||
|
|
5add6a0e73 | ||
|
|
5c4912feb4 | ||
|
|
75e115f390 | ||
|
|
8e443d23f4 | ||
|
|
c43c9c319b | ||
|
|
e32b128b0f | ||
|
|
5287421cea | ||
|
|
9bc95ef350 | ||
|
|
028de6addb | ||
|
|
a107605937 | ||
|
|
cec5d0147b | ||
|
|
e46b879fc4 | ||
|
|
b6764fbb29 | ||
|
|
e8899cc314 | ||
|
|
2b2054dd6b | ||
|
|
92705b0ae2 | ||
|
|
2ae8a36b7f | ||
|
|
899139dda1 | ||
|
|
b6b571e84b | ||
|
|
9e098fa997 | ||
|
|
13d00f954f | ||
|
|
fee75d0c8a | ||
|
|
abae3f14cd | ||
|
|
b8a98e2c6e | ||
|
|
d990572b5b | ||
|
|
2d37d392bc | ||
|
|
59015fc3bb | ||
|
|
c3be68f988 | ||
|
|
8610784958 | ||
|
|
f01d71c34a | ||
|
|
a06501e4b1 | ||
|
|
7c2c30fa1b | ||
|
|
903dc714f2 | ||
|
|
b1bd2c8805 | ||
|
|
0e4b4f6d8c | ||
|
|
d8d0eaf247 | ||
|
|
90096faef3 | ||
|
|
f794f75394 | ||
|
|
8de63e486c | ||
|
|
4308efca47 | ||
|
|
877fa292d6 | ||
|
|
df6ea6f497 | ||
|
|
5e9be391e1 | ||
|
|
49960b8234 | ||
|
|
d669dbe54b | ||
|
|
2d1859ac0c | ||
|
|
dc864055a3 | ||
|
|
bad9537aba | ||
|
|
303b1adc0a | ||
|
|
c582904d41 | ||
|
|
65eabf6153 | ||
|
|
cc9c9e2253 | ||
|
|
8747ae9564 | ||
|
|
9253e54958 | ||
|
|
fb774f2caa | ||
|
|
ba120024a6 | ||
|
|
1fe0e69914 | ||
|
|
0fe04e411c | ||
|
|
35074f959f | ||
|
|
0d698fbaf1 | ||
|
|
c9e2a52327 | ||
|
|
a58e06109b | ||
|
|
65375e4836 | ||
|
|
edc517d33f | ||
|
|
354c82dc34 | ||
|
|
fe2acd0665 | ||
|
|
19b5b1a90c | ||
|
|
e7281e2118 | ||
|
|
10f334cf15 | ||
|
|
a057fd6458 | ||
|
|
3bafabeb0a | ||
|
|
edefbe17da | ||
|
|
a65041ffcd | ||
|
|
0962c60844 | ||
|
|
3d72eceac0 | ||
|
|
57b5deff5b | ||
|
|
1163dee352 | ||
|
|
f7fe562bba | ||
|
|
3394f98a8a | ||
|
|
a575b35286 | ||
|
|
0f41e79e98 | ||
|
|
24bf22a31f | ||
|
|
05a1b8802e | ||
|
|
9c409d9507 | ||
|
|
4ee7161c36 | ||
|
|
4cd9ce0ff7 | ||
|
|
a2d0dfd8b2 | ||
|
|
d4164fe0ba | ||
|
|
6bbecdd7c0 | ||
|
|
0784c3ae05 | ||
|
|
679757ccfa | ||
|
|
63a4e693e3 | ||
|
|
b21041d9e0 | ||
|
|
f014bb4587 | ||
|
|
9030f7c4ce | ||
|
|
bde6c38bd4 | ||
|
|
0aefb6c6ec | ||
|
|
da650ccdef | ||
|
|
92d3e70c1f | ||
|
|
cb5dfaf066 | ||
|
|
cd75e5e4cc | ||
|
|
7bd6ab5ec0 | ||
|
|
92f9c89cf1 | ||
|
|
eb2632b23a | ||
|
|
8c90bc6808 | ||
|
|
66146532e1 | ||
|
|
dbf3a41c1d | ||
|
|
942bbf9c6c | ||
|
|
a9d7cc527c | ||
|
|
2d362722ed | ||
|
|
f81638e625 | ||
|
|
8ae77df0ff | ||
|
|
110bd0e5f7 | ||
|
|
1b3a366cb7 | ||
|
|
3b5d9a145f | ||
|
|
fc37fc067a | ||
|
|
bb18a28484 | ||
|
|
86ca08b9aa | ||
|
|
9522df7835 | ||
|
|
55e0fd0226 | ||
|
|
ff9a986a2e | ||
|
|
df31fe2a8b | ||
|
|
1aeaf996bc | ||
|
|
cb0e59e91a | ||
|
|
5f02f49e9d | ||
|
|
ce9f91fe2c | ||
|
|
ac37745721 | ||
|
|
e44aeefda8 | ||
|
|
dbff2b659a | ||
|
|
52ef8e8b76 | ||
|
|
b71567c754 | ||
|
|
d1670c743f | ||
|
|
009b38f471 | ||
|
|
0cf5f30c0d | ||
|
|
cd4e1f179d | ||
|
|
b89f9d6b35 | ||
|
|
c3ece96390 | ||
|
|
770739b44e | ||
|
|
84984c2cde | ||
|
|
86393c8674 | ||
|
|
d4aed3bc45 | ||
|
|
818cd77450 | ||
|
|
dc26c70400 | ||
|
|
6547d713ea | ||
|
|
e8dcb0c242 | ||
|
|
100d0be513 | ||
|
|
fc8db2d977 | ||
|
|
e5d98d7889 | ||
|
|
c7b1a05ed3 | ||
|
|
649a90bd5e | ||
|
|
0fc880cf21 | ||
|
|
0d82a4c2c6 | ||
|
|
fb3aa59683 | ||
|
|
b938792ca8 | ||
|
|
bb74946d54 | ||
|
|
3e78105509 | ||
|
|
c6adf0ac89 | ||
|
|
219b4dca94 | ||
|
|
acec292b0f | ||
|
|
7ba86cbd23 | ||
|
|
3002eaf479 | ||
|
|
15422ca504 | ||
|
|
7067f00bee | ||
|
|
a0616eb251 | ||
|
|
5d4da0e4c7 | ||
|
|
546e3475fb | ||
|
|
56c44ebb58 | ||
|
|
bd03bc730c | ||
|
|
e0e1e58104 | ||
|
|
940de662b6 | ||
|
|
d151c1192b | ||
|
|
15ae10579c | ||
|
|
359696408d | ||
|
|
d3766368f8 | ||
|
|
73af7451fc | ||
|
|
e27fcefe45 | ||
|
|
aa5ade5517 | ||
|
|
94b6a66ce4 | ||
|
|
a51e486fa6 | ||
|
|
2b608daea4 | ||
|
|
aa60c2afd1 | ||
|
|
cff22c74a9 | ||
|
|
b77b8ee0da | ||
|
|
610aef2f14 | ||
|
|
e15ca41d6e | ||
|
|
60e9e53af4 | ||
|
|
9812000724 | ||
|
|
d72401fc39 | ||
|
|
822eba7982 | ||
|
|
9327564e6e | ||
|
|
6e9fe42a83 | ||
|
|
a32cf28ccb | ||
|
|
55b101802a | ||
|
|
ecda8b4394 | ||
|
|
6d4f8d4c26 | ||
|
|
26aa53f3fa |
No files matched your search
@@ -2,12 +2,18 @@
|
||||
example.ts
|
||||
.*sessions
|
||||
.secrets
|
||||
.minio
|
||||
.media
|
||||
tokens
|
||||
files
|
||||
venv
|
||||
.wwebjs_auth
|
||||
src/test.ts
|
||||
src/test.js
|
||||
test.js
|
||||
.wwebjs_cache
|
||||
src/dashboard
|
||||
.eslintcache
|
||||
|
||||
# compiled output
|
||||
/dist
|
||||
|
||||
+27
-1
@@ -6,12 +6,21 @@ exclude: |
|
||||
)$
|
||||
|
||||
repos:
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: commit-message-prefix
|
||||
name: Validate Commit Message for src/plus Changes
|
||||
entry: python ./.precommit/validate_commit_message.py
|
||||
language: python
|
||||
stages: [commit-msg]
|
||||
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: lint
|
||||
stages: [pre-commit]
|
||||
name: lint
|
||||
language: system
|
||||
entry: bash -c '$HOME/.nvm/nvm-exec npm run lint'
|
||||
entry: bash -c '$HOME/.nvm/nvm-exec npm run lint-cache'
|
||||
pass_filenames: false
|
||||
files: |
|
||||
(?x)^(
|
||||
@@ -22,6 +31,7 @@ repos:
|
||||
rev: 'v3.1.0'
|
||||
hooks:
|
||||
- id: prettier
|
||||
stages: [pre-commit]
|
||||
exclude: |
|
||||
(?x)^(
|
||||
docs/.*|
|
||||
@@ -31,11 +41,13 @@ repos:
|
||||
rev: v1.1.2
|
||||
hooks:
|
||||
- id: markdown-toc
|
||||
stages: [pre-commit]
|
||||
name: README.md
|
||||
files: ^README.md$
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: no-plus-in-core
|
||||
stages: [pre-commit]
|
||||
name: No "plus" in core
|
||||
language: pygrep
|
||||
entry: 'plus'
|
||||
@@ -46,3 +58,17 @@ repos:
|
||||
src/structures/.*|
|
||||
src/config.service.ts|
|
||||
)$
|
||||
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: no-console-log
|
||||
stages: [pre-commit]
|
||||
name: No console.log() calls
|
||||
language: pygrep
|
||||
entry: 'console\.log'
|
||||
exclude: |
|
||||
(?x)^(
|
||||
entrypoint.sh|
|
||||
.pre-commit-config.yaml|
|
||||
^src/core/engines/webjs/session.webjs.core.ts|
|
||||
)$
|
||||
@@ -0,0 +1,38 @@
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
def get_staged_files():
|
||||
result = subprocess.run(["git", "diff", "--cached", "--name-only"], stdout=subprocess.PIPE, text=True)
|
||||
files = result.stdout.splitlines()
|
||||
return files
|
||||
|
||||
|
||||
def get_commit_message(commit_msg_filepath):
|
||||
with open(commit_msg_filepath, 'r') as f:
|
||||
return f.readline().strip()
|
||||
|
||||
|
||||
def main():
|
||||
commit_msg_filepath = sys.argv[1]
|
||||
commit_message = get_commit_message(commit_msg_filepath)
|
||||
staged_files = get_staged_files()
|
||||
|
||||
has_plus_changes = any(f.startswith('src/plus') for f in staged_files)
|
||||
print(commit_message)
|
||||
starts_with_plus = commit_message.startswith('[PLUS]')
|
||||
|
||||
if has_plus_changes and not starts_with_plus:
|
||||
print("'[PLUS]' not found in commit message, but there's changes are from 'src/plus'.")
|
||||
return 1
|
||||
|
||||
if starts_with_plus and not all(f.startswith('src/plus') for f in staged_files):
|
||||
print("'[PLUS]' found in commit message, but there's changes from other directories. \n"
|
||||
"Changes MUST be only from 'src/plus'.")
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
+27
-9
@@ -6,23 +6,33 @@ FROM node:${NODE_VERSION} as build
|
||||
ENV PUPPETEER_SKIP_DOWNLOAD=True
|
||||
|
||||
# npm packages
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y openssh-client
|
||||
RUN apt install openssh-client
|
||||
RUN mkdir -p -m 0700 ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts
|
||||
|
||||
WORKDIR /src
|
||||
COPY package.json .
|
||||
COPY yarn.lock .
|
||||
RUN yarn set version 3.6.3
|
||||
RUN --mount=type=ssh yarn install
|
||||
RUN yarn install
|
||||
|
||||
# App
|
||||
WORKDIR /src
|
||||
ADD . /src
|
||||
RUN --mount=type=ssh yarn install
|
||||
RUN yarn install
|
||||
RUN yarn build && find ./dist -name "*.d.ts" -delete
|
||||
|
||||
#
|
||||
# Dashboard
|
||||
#
|
||||
FROM node:${NODE_VERSION} as dashboard
|
||||
|
||||
# Download WAHA Dashboard
|
||||
ENV WAHA_DASHBOARD_SHA c1a91f879a35f0ae32d46ddb2e061ac1819a3d4f
|
||||
RUN \
|
||||
wget https://github.com/devlikeapro/dashboard/archive/${WAHA_DASHBOARD_SHA}.zip \
|
||||
&& unzip ${WAHA_DASHBOARD_SHA}.zip -d /tmp/dashboard \
|
||||
&& mkdir -p /dashboard \
|
||||
&& mv /tmp/dashboard/dashboard-${WAHA_DASHBOARD_SHA}/* /dashboard/ \
|
||||
&& rm -rf ${WAHA_DASHBOARD_SHA}.zip \
|
||||
&& rm -rf /tmp/dashboard/dashboard-${WAHA_DASHBOARD_SHA}
|
||||
|
||||
#
|
||||
# Final
|
||||
#
|
||||
@@ -38,6 +48,9 @@ RUN echo "USE_BROWSER=$USE_BROWSER"
|
||||
# Install ffmpeg to generate previews for videos
|
||||
RUN apt-get update && apt-get install -y ffmpeg --no-install-recommends && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install zip and unzip
|
||||
RUN apt-get update && apt-get install -y zip unzip --no-install-recommends && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install fonts if using either chromium or chrome
|
||||
RUN if [ "$USE_BROWSER" = "chromium" ] || [ "$USE_BROWSER" = "chrome" ]; then \
|
||||
apt-get update \
|
||||
@@ -58,7 +71,7 @@ RUN if [ "$USE_BROWSER" = "chromium" ]; then \
|
||||
# Install Chrome
|
||||
# Available versions:
|
||||
# https://www.ubuntuupdates.org/package/google_chrome/stable/main/base/google-chrome-stable
|
||||
ARG CHROME_VERSION="122.0.6261.128-1"
|
||||
ARG CHROME_VERSION="126.0.6478.182-1"
|
||||
RUN if [ "$USE_BROWSER" = "chrome" ]; then \
|
||||
wget --no-verbose -O /tmp/chrome.deb https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}_amd64.deb \
|
||||
&& apt-get update \
|
||||
@@ -72,11 +85,16 @@ WORKDIR /app
|
||||
COPY package.json ./
|
||||
COPY --from=build /src/node_modules ./node_modules
|
||||
COPY --from=build /src/dist ./dist
|
||||
COPY --from=dashboard /dashboard ./dist/dashboard
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
|
||||
# Chokidar options to monitor file changes
|
||||
ENV CHOKIDAR_USEPOLLING=1
|
||||
ENV CHOKIDAR_INTERVAL=5000
|
||||
|
||||
# WAHA variables
|
||||
ENV WAHA_ZIPPER=ZIPUNZIP
|
||||
|
||||
# Run command, etc
|
||||
EXPOSE 3000
|
||||
CMD yarn start:prod
|
||||
CMD ["/entrypoint.sh"]
|
||||
@@ -31,10 +31,11 @@ push:
|
||||
for-swagger:
|
||||
WHATSAPP_SWAGGER_CONFIG_ADVANCED=true . ${NVM_DIR}/nvm.sh && nvm exec yarn start
|
||||
|
||||
update-dependencies:
|
||||
. ${NVM_DIR}/nvm.sh && nvm exec yarn up whatsapp-web.js@https://github.com/devlikeapro/whatsapp-web.js#main-fork
|
||||
. ${NVM_DIR}/nvm.sh && nvm exec yarn up @adiwajshing/baileys@github:WhiskeySockets/Baileys
|
||||
. ${NVM_DIR}/nvm.sh && nvm exec yarn up venom-bot
|
||||
up-noweb:
|
||||
. ${NVM_DIR}/nvm.sh && nvm exec yarn up @adiwajshing/baileys@github:devlikeapro/Baileys#fork-master-channels-2
|
||||
|
||||
up-webjs:
|
||||
. ${NVM_DIR}/nvm.sh && nvm exec yarn up whatsapp-web.js@github:devlikeapro/whatsapp-web.js#fork-webpack-exodus-channels
|
||||
|
||||
start-proxy:
|
||||
docker run --rm -d --name squid-container -e TZ=UTC -p 3128:3128 ubuntu/squid:5.2-22.04_beta
|
||||
@@ -141,7 +141,7 @@ later:
|
||||
How to log in - the instruction on WhatsApp site
|
||||
</a>
|
||||
|
||||
When your ready - find `POST /api/session/start`, click on **Try it out**, then **Execute** a bit below.
|
||||
When your ready - find `POST /api/sessions`, click on **Try it out**, then **Execute** a bit below.
|
||||
|
||||
|
||||
The example payload:
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
services:
|
||||
waha:
|
||||
# Check available Docker images:
|
||||
# https://waha.devlike.pro/docs/how-to/engines/#docker-images
|
||||
image: devlikeapro/waha
|
||||
container_name: waha
|
||||
ports:
|
||||
- '3000:3000/tcp'
|
||||
environment:
|
||||
# Environment variables from https://waha.devlike.pro/docs/how-to/config/
|
||||
# https://docs.webhook.site/
|
||||
- WHATSAPP_HOOK_URL=https://webhook.site/11111111-1111-1111-1111-11111111
|
||||
- WHATSAPP_HOOK_EVENTS=message
|
||||
- WHATSAPP_DEFAULT_ENGINE=WEBJS
|
||||
restart: always
|
||||
|
||||
waha-plus:
|
||||
# Check available Docker images:
|
||||
# https://waha.devlike.pro/docs/how-to/engines/#docker-images
|
||||
image: devlikeapro/waha-plus:chrome
|
||||
container_name: waha-plus
|
||||
ports:
|
||||
- '3000:3000/tcp'
|
||||
volumes:
|
||||
- './.sessions:/app/.sessions'
|
||||
environment:
|
||||
# Environment variables from https://waha.devlike.pro/docs/how-to/config/
|
||||
# - WHATSAPP_RESTART_ALL_SESSIONS=True
|
||||
# - WHATSAPP_HOOK_URL=https://webhook.site/11111111-1111-1111-1111-11111111
|
||||
# - WHATSAPP_HOOK_EVENTS=message
|
||||
# - WHATSAPP_API_HOSTNAME=localhost
|
||||
- WHATSAPP_DEFAULT_ENGINE=WEBJS
|
||||
- WHATSAPP_API_KEY=321
|
||||
# Username and password for Swagger
|
||||
- WHATSAPP_SWAGGER_USERNAME=swagger
|
||||
- WHATSAPP_SWAGGER_PASSWORD=admin
|
||||
# Username and password for WAHA Dashboard
|
||||
# you can use the same username and password for both Swagger and Dashboard
|
||||
# Default - waha / waha
|
||||
- WAHA_DASHBOARD_USERNAME=waha
|
||||
- WAHA_DASHBOARD_PASSWORD=waha
|
||||
# Engine specific environment variables
|
||||
# - WAHA_WEBJS_WEB_VERSION=2.2412.54-videofix
|
||||
restart: always
|
||||
|
||||
waha-plus--mongodb:
|
||||
# Check available Docker images:
|
||||
# https://waha.devlike.pro/docs/how-to/engines/#docker-images
|
||||
image: devlikeapro/waha-plus:chrome
|
||||
container_name: waha-plus--mongodb
|
||||
ports:
|
||||
- '3000:3000/tcp'
|
||||
volumes:
|
||||
- './.sessions:/app/.sessions'
|
||||
environment:
|
||||
# Environment variables from https://waha.devlike.pro/docs/how-to/config/
|
||||
# - WHATSAPP_RESTART_ALL_SESSIONS=True
|
||||
# - WHATSAPP_HOOK_URL=https://webhook.site/11111111-1111-1111-1111-11111111
|
||||
# - WHATSAPP_HOOK_EVENTS=message
|
||||
# - WHATSAPP_API_KEY=321
|
||||
# - WHATSAPP_SWAGGER_USERNAME=admin
|
||||
# - WHATSAPP_SWAGGER_PASSWORD=123
|
||||
# - WAHA_DASHBOARD_USERNAME=admin
|
||||
# - WAHA_DASHBOARD_PASSWORD=123
|
||||
# - WHATSAPP_API_HOSTNAME=localhost
|
||||
- WHATSAPP_DEFAULT_ENGINE=WEBJS
|
||||
- WHATSAPP_SESSIONS_MONGO_URL=mongodb://mongodb:27017
|
||||
restart: always
|
||||
|
||||
# Let's Encrypt + Certbot
|
||||
# https://waha.devlike.pro/docs/how-to/security/#https
|
||||
waha-https--certbot:
|
||||
image: devlikeapro/waha-plus
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- '3000:3000'
|
||||
volumes:
|
||||
- './.sessions:/app/.sessions'
|
||||
- '/etc/letsencrypt:/etc/letsencrypt'
|
||||
environment:
|
||||
- DOMAIN=waha.example.pro
|
||||
- WHATSAPP_API_HOSTNAME=${DOMAIN}
|
||||
- WAHA_HTTPS_ENABLED=true
|
||||
- WAHA_HTTPS_PATH_KEY=/etc/letsencrypt/live/${DOMAIN}/privkey.pem
|
||||
- WAHA_HTTPS_PATH_CERT=/etc/letsencrypt/live/${DOMAIN}/cert.pem
|
||||
- WAHA_HTTPS_PATH_CA=/etc/letsencrypt/live/${DOMAIN}/chain.pem
|
||||
|
||||
# Self-signed certificates example
|
||||
# https://waha.devlike.pro/docs/how-to/security/#https
|
||||
waha-https--self-signed:
|
||||
image: devlikeapro/waha-plus
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- '3000:3000'
|
||||
volumes:
|
||||
- './.sessions:/app/.sessions'
|
||||
- './.secrets:/app/.secrets'
|
||||
environment:
|
||||
- WAHA_HTTPS_ENABLED=true
|
||||
- WAHA_HTTPS_PATH_KEY=.secrets/privkey.pem
|
||||
- WAHA_HTTPS_PATH_CERT=.secrets/cert.pem
|
||||
- WAHA_HTTPS_PATH_CA=.secrets/chain.pem
|
||||
|
||||
mongodb:
|
||||
image: mongo
|
||||
container_name: mongodb
|
||||
ports:
|
||||
- '27017:27017/tcp'
|
||||
volumes:
|
||||
- mongodb_data:/data/db
|
||||
restart: always
|
||||
|
||||
volumes:
|
||||
mongodb_data: {}
|
||||
+214
-85
@@ -1,106 +1,215 @@
|
||||
version: '3'
|
||||
#
|
||||
# https://waha.devlike.pro/docs/how-to/install/
|
||||
# Here's we provide a simple example of how to install WAHA using Docker Compose.
|
||||
#
|
||||
# We're assuming you have Docker and Docker Compose installed.
|
||||
# If you don't have Docker Compose installed, you can follow the official guide:
|
||||
# https://docs.docker.com/compose/install/
|
||||
#
|
||||
|
||||
services:
|
||||
waha:
|
||||
# Check available Docker images:
|
||||
# https://waha.devlike.pro/docs/how-to/engines/#docker-images
|
||||
image: devlikeapro/waha
|
||||
container_name: waha
|
||||
ports:
|
||||
- '3000:3000/tcp'
|
||||
environment:
|
||||
# Environment variables from https://waha.devlike.pro/docs/how-to/config/
|
||||
- WHATSAPP_HOOK_URL=https://httpbin.org/post
|
||||
- WHATSAPP_HOOK_EVENTS=message
|
||||
- WHATSAPP_DEFAULT_ENGINE=WEBJS
|
||||
# Always restart the container on failure
|
||||
restart: always
|
||||
|
||||
waha-plus:
|
||||
# Check available Docker images:
|
||||
#
|
||||
# Image
|
||||
#
|
||||
image: devlikeapro/waha-plus:latest # or devlikeapro/waha:latest if you're using WAHA Core
|
||||
#
|
||||
# We strongly recommend using the pinned version of WAHA
|
||||
# https://waha.devlike.pro/docs/how-to/engines/#versions
|
||||
# image: devlikeapro/waha-plus:latest-2024.7.6 # 'latest' is not mistaken here
|
||||
#
|
||||
# Multiple images are available
|
||||
# https://waha.devlike.pro/docs/how-to/engines/#docker-images
|
||||
image: devlikeapro/waha-plus:chrome
|
||||
container_name: waha-plus
|
||||
# image: devlikeapro/waha-plus:chrome
|
||||
#
|
||||
|
||||
# The first port can be any free port you want
|
||||
# The second port must be the same as WHATSAPP_API_PORT or 3000 by default
|
||||
# Consider using the same port for simplicity
|
||||
ports:
|
||||
- '3000:3000/tcp'
|
||||
# NOTE: if you're using HTTP, you can use the following port mapping
|
||||
#- '80:3000/tcp'
|
||||
# NOTE: if you're using HTTPS, you can use the following port mapping
|
||||
#- '443:3000/tcp'
|
||||
|
||||
volumes:
|
||||
# Store sessions in the .sessions folder (comment it if you're using MongoDB)
|
||||
# Doesn't work with WAHA Core
|
||||
- './.sessions:/app/.sessions'
|
||||
|
||||
# https://waha.devlike.pro/docs/how-to/storages/#save-media-files-between-the-container-restarts
|
||||
- './.media:/app/.media'
|
||||
|
||||
# If you're using certbot for HTTPS, you can use the following volume mapping
|
||||
# https://waha.devlike.pro/blog/setting-up-https-for-waha/#lets-encrypt-certbot--waha
|
||||
# - '/etc/letsencrypt:/etc/letsencrypt'
|
||||
|
||||
# WAHA Configuration
|
||||
# https://waha.devlike.pro/docs/how-to/config/
|
||||
environment:
|
||||
# Environment variables from https://waha.devlike.pro/docs/how-to/config/
|
||||
# - WHATSAPP_RESTART_ALL_SESSIONS=True
|
||||
# - WHATSAPP_HOOK_URL=https://httpbin.org/post
|
||||
# - WHATSAPP_HOOK_EVENTS=message
|
||||
# - WHATSAPP_API_HOSTNAME=localhost
|
||||
- WHATSAPP_DEFAULT_ENGINE=WEBJS
|
||||
#
|
||||
# Common
|
||||
#
|
||||
# If you know the right URL, you can use it here.
|
||||
# Use any port in WHATSAPP_API_PORT and domain in WHATSAPP_API_HOSTNAME
|
||||
# https://waha.devlike.pro/docs/how-to/config/#common
|
||||
#- WHATSAPP_API_SCHEMA=http
|
||||
#- WHATSAPP_API_PORT=3000
|
||||
#- WHATSAPP_API_HOSTNAME=localhost
|
||||
|
||||
#
|
||||
# Security
|
||||
#
|
||||
# https://waha.devlike.pro/docs/how-to/security/
|
||||
#
|
||||
- WHATSAPP_API_KEY=321
|
||||
# Username and password for Swagger
|
||||
- WHATSAPP_SWAGGER_USERNAME=swagger
|
||||
- WHATSAPP_SWAGGER_PASSWORD=admin
|
||||
# Username and password for WAHA Dashboard
|
||||
# you can use the same username and password for both Swagger and Dashboard
|
||||
# Default - waha / waha
|
||||
- WAHA_DASHBOARD_USERNAME=waha
|
||||
- WAHA_DASHBOARD_PASSWORD=waha
|
||||
# Engine specific environment variables
|
||||
# - WAHA_WEBJS_WEB_VERSION=2.2412.54-videofix
|
||||
restart: always
|
||||
#- WHATSAPP_SWAGGER_USERNAME=admin
|
||||
#- WHATSAPP_SWAGGER_PASSWORD=admin
|
||||
|
||||
waha-plus--mongodb:
|
||||
# Check available Docker images:
|
||||
# https://waha.devlike.pro/docs/how-to/engines/#docker-images
|
||||
image: devlikeapro/waha-plus:chrome
|
||||
container_name: waha-plus--mongodb
|
||||
ports:
|
||||
- '3000:3000/tcp'
|
||||
volumes:
|
||||
- './.sessions:/app/.sessions'
|
||||
environment:
|
||||
# Environment variables from https://waha.devlike.pro/docs/how-to/config/
|
||||
# - WHATSAPP_RESTART_ALL_SESSIONS=True
|
||||
# - WHATSAPP_HOOK_URL=https://httpbin.org/post
|
||||
# - WHATSAPP_HOOK_EVENTS=message
|
||||
# - WHATSAPP_API_KEY=321
|
||||
# - WHATSAPP_SWAGGER_USERNAME=admin
|
||||
# - WHATSAPP_SWAGGER_PASSWORD=123
|
||||
# - WAHA_DASHBOARD_USERNAME=admin
|
||||
# - WAHA_DASHBOARD_PASSWORD=123
|
||||
# - WHATSAPP_API_HOSTNAME=localhost
|
||||
#
|
||||
# Dashboard
|
||||
#
|
||||
# https://waha.devlike.pro/docs/how-to/waha-dashboard/#configuration
|
||||
# Enabled by default
|
||||
#- WAHA_DASHBOARD_ENABLED=true
|
||||
#- WAHA_DASHBOARD_USERNAME=waha
|
||||
#- WAHA_DASHBOARD_PASSWORD=waha
|
||||
|
||||
#
|
||||
# Logging
|
||||
# https://waha.devlike.pro/docs/how-to/observability/#logging
|
||||
#
|
||||
- WAHA_LOG_FORMAT=PRETTY
|
||||
# Set log format to JSON if you consume logs with log management systems
|
||||
#- WAHA_LOG_FORMAT=JSON
|
||||
- WAHA_LOG_LEVEL=info
|
||||
# If you want to see more logs, you can set the log level to debug
|
||||
#- WAHA_LOG_LEVEL=debug
|
||||
# DEBUG=1 # shortcut for setting log level to debug
|
||||
|
||||
#
|
||||
# Engine
|
||||
#
|
||||
# Choose the right engine for your needs (WEBJS by default)
|
||||
# https://waha.devlike.pro/docs/how-to/engines/
|
||||
- WHATSAPP_DEFAULT_ENGINE=WEBJS
|
||||
- WHATSAPP_SESSIONS_MONGO_URL=mongodb://mongodb:27017
|
||||
restart: always
|
||||
# Use NOWEB engine for the fastest performance
|
||||
#- WHATSAPP_DEFAULT_ENGINE=NOWEB
|
||||
|
||||
# Let's Encrypt + Certbot
|
||||
# https://waha.devlike.pro/docs/how-to/security/#https
|
||||
waha-https--certbot:
|
||||
image: devlikeapro/waha-plus
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- '3000:3000'
|
||||
volumes:
|
||||
- './.sessions:/app/.sessions'
|
||||
- '/etc/letsencrypt:/etc/letsencrypt'
|
||||
environment:
|
||||
- DOMAIN=waha.example.pro
|
||||
- WHATSAPP_API_HOSTNAME=${DOMAIN}
|
||||
- WAHA_HTTPS_ENABLED=true
|
||||
- WAHA_HTTPS_PATH_KEY=/etc/letsencrypt/live/${DOMAIN}/privkey.pem
|
||||
- WAHA_HTTPS_PATH_CERT=/etc/letsencrypt/live/${DOMAIN}/cert.pem
|
||||
- WAHA_HTTPS_PATH_CA=/etc/letsencrypt/live/${DOMAIN}/chain.pem
|
||||
#
|
||||
# Sessions
|
||||
#
|
||||
# https://waha.devlike.pro/docs/how-to/config/#sessions
|
||||
# Restart all sessions when container starts
|
||||
- WHATSAPP_RESTART_ALL_SESSIONS=True
|
||||
# Do not print QR codes in logs
|
||||
- WAHA_PRINT_QR=False
|
||||
#
|
||||
# OR you can specify sessions by name, if you have handful amount of sessions
|
||||
#- WHATSAPP_START_SESSION=session1,session2
|
||||
# Do not use both WHATSAPP_RESTART_ALL_SESSIONS and WHATSAPP_START_SESSION parameters
|
||||
#
|
||||
|
||||
# Self-signed certificates example
|
||||
# https://waha.devlike.pro/docs/how-to/security/#https
|
||||
waha-https--self-signed:
|
||||
image: devlikeapro/waha-plus
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- '3000:3000'
|
||||
volumes:
|
||||
- './.sessions:/app/.sessions'
|
||||
- './.secrets:/app/.secrets'
|
||||
environment:
|
||||
- WAHA_HTTPS_ENABLED=true
|
||||
- WAHA_HTTPS_PATH_KEY=.secrets/privkey.pem
|
||||
- WAHA_HTTPS_PATH_CERT=.secrets/cert.pem
|
||||
- WAHA_HTTPS_PATH_CA=.secrets/chain.pem
|
||||
#
|
||||
# Swagger
|
||||
#
|
||||
# https://waha.devlike.pro/docs/how-to/swagger/
|
||||
#- WHATSAPP_SWAGGER_USERNAME=admin
|
||||
#- WHATSAPP_SWAGGER_PASSWORD=admin
|
||||
# Disable Swagger
|
||||
#- WHATSAPP_SWAGGER_ENABLED=false
|
||||
# Enable advanced Swagger configuration
|
||||
#- WHATSAPP_SWAGGER_CONFIG_ADVANCED=true
|
||||
#
|
||||
# Swagger White Label customization
|
||||
# https://waha.devlike.pro/docs/how-to/swagger/#white-label
|
||||
#- WHATSAPP_SWAGGER_TITLE=WAHA API
|
||||
#
|
||||
|
||||
#
|
||||
# Global Proxy Settings
|
||||
# https://waha.devlike.pro/docs/how-to/config/#global-proxy-configuration
|
||||
# You can also set proxy settings for each session later when starting it
|
||||
# https://waha.devlike.pro/docs/how-to/sessions/#configure-proxy
|
||||
#- WHATSAPP_PROXY_SERVER=proxy.example.com:3128
|
||||
#-WHATSAPP_PROXY_SERVER_USERNAME=user
|
||||
#-WHATSAPP_PROXY_SERVER_PASSWORD=pass
|
||||
#
|
||||
|
||||
#
|
||||
# HTTPS Configuration
|
||||
#
|
||||
# https://waha.devlike.pro/docs/how-to/config/#https
|
||||
# Consider using certbot for HTTPS
|
||||
# https://waha.devlike.pro/blog/setting-up-https-for-waha/#lets-encrypt-certbot--waha
|
||||
#- WAHA_HTTPS_ENABLED=true
|
||||
#- WAHA_HTTPS_PATH_KEY=/etc/letsencrypt/live/waha.example.pro/privkey.pem
|
||||
#- WAHA_HTTPS_PATH_CERT=/etc/letsencrypt/live/waha.example.pro/cert.pem \
|
||||
#- WAHA_HTTPS_PATH_CA=/etc/letsencrypt/live/waha.example.pro/chain.pem
|
||||
#- WHATSAPP_API_SCHEMA=https
|
||||
#- WHATSAPP_API_PORT=3000
|
||||
#- WHATSAPP_API_HOSTNAME=waha.example.pro
|
||||
#
|
||||
|
||||
#
|
||||
# Media Configuration
|
||||
#
|
||||
# https://waha.devlike.pro/docs/how-to/config/#files
|
||||
#
|
||||
# Disable media (images, videos, files) download for incoming messages
|
||||
#- WHATSAPP_DOWNLOAD_MEDIA=false
|
||||
#
|
||||
# Download only specific media types
|
||||
#- WHATSAPP_FILES_MIMETYPES=image/jpeg,image/png
|
||||
#
|
||||
|
||||
# Media - Local Storage
|
||||
# https://waha.devlike.pro/docs/how-to/storages/#media---local
|
||||
#
|
||||
# Set to 0 to keep media files forever
|
||||
# https://waha.devlike.pro/docs/how-to/storages/#save-media-files-between-the-container-restarts
|
||||
- WAHA_MEDIA_STORAGE=LOCAL
|
||||
- WHATSAPP_FILES_LIFETIME=0
|
||||
- WHATSAPP_FILES_FOLDER=/app/.media
|
||||
# Keep media files for 180 seconds (3 minutes)
|
||||
#- WHATSAPP_FILES_LIFETIME=180
|
||||
#
|
||||
|
||||
# Media - S3 Storage
|
||||
# https://waha.devlike.pro/docs/how-to/storages/#media---s3
|
||||
#- WAHA_MEDIA_STORAGE=S3
|
||||
#- WAHA_S3_REGION=eu-west-2
|
||||
#- WAHA_S3_BUCKET=waha
|
||||
#- WAHA_S3_ACCESS_KEY_ID=minioadmin
|
||||
#- WAHA_S3_SECRET_ACCESS_KEY=minioadmin
|
||||
#- WAHA_S3_ENDPOINT=http://minio:9000 # Not required if you're using AWS S3
|
||||
#- WAHA_S3_FORCE_PATH_STYLE=True # Required for Minio
|
||||
#- WAHA_S3_PROXY_FILES=True # Required for docker-compose setup
|
||||
|
||||
#
|
||||
# Global Webhooks
|
||||
#
|
||||
# https://waha.devlike.pro/docs/how-to/config/#webhooks
|
||||
# https://waha.devlike.pro/docs/how-to/webhooks/
|
||||
#- WHATSAPP_HOOK_URL=https://webhook.site/11111111-1111-1111-1111-11111111
|
||||
#- WHATSAPP_HOOK_EVENTS=session.status,message,message.reaction
|
||||
#
|
||||
|
||||
#
|
||||
# MongoDB Configuration
|
||||
# https://waha.devlike.pro/docs/how-to/storages/#sessions---mongodb
|
||||
#- WHATSAPP_SESSIONS_MONGO_URL=mongodb://mongodb:27017
|
||||
#
|
||||
|
||||
# NOTE: Only if you're using MongoDB
|
||||
# https://waha.devlike.pro/docs/how-to/storages/#sessions---mongodb
|
||||
# Comment this block if you're using MongoDB
|
||||
mongodb:
|
||||
image: mongo
|
||||
container_name: mongodb
|
||||
@@ -110,5 +219,25 @@ services:
|
||||
- mongodb_data:/data/db
|
||||
restart: always
|
||||
|
||||
# NOTE: Only if you're using S3 to save media files
|
||||
# https://waha.devlike.pro/docs/how-to/storages/#media---s3
|
||||
# Comment this block if you're using AWS S3
|
||||
minio:
|
||||
image: quay.io/minio/minio
|
||||
container_name: minio
|
||||
restart: always
|
||||
ports:
|
||||
- '9000:9000'
|
||||
- '9001:9001'
|
||||
environment:
|
||||
MINIO_REGION: 'eu-west-2'
|
||||
MINIO_ROOT_USER: 'minioadmin'
|
||||
MINIO_ROOT_PASSWORD: 'minioadmin'
|
||||
volumes:
|
||||
- minio_data:/data
|
||||
command: server /data --console-address ":9001"
|
||||
|
||||
volumes:
|
||||
# NOTE: Only if you're using MongoDB
|
||||
mongodb_data: {}
|
||||
minio_data: {}
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Calculate UV_THREADPOOL_SIZE based on number of CPUs
|
||||
cpus=$(node -e "const os = require('os'); console.log(os.cpus().length);")
|
||||
uv_threadpool_size=$(($cpus * 2))
|
||||
|
||||
# Set UV_THREADPOOL_SIZE as an environment variable
|
||||
export UV_THREADPOOL_SIZE="${UV_THREADPOOL_SIZE:-$uv_threadpool_size}"
|
||||
|
||||
# Start your application using yarn
|
||||
yarn start:prod
|
||||
Binary file not shown.
@@ -50,8 +50,8 @@ docker run -it --rm --network=host -e WHATSAPP_HOOK_URL=http://localhost:5000/bo
|
||||
|
||||
2. Open Swagger API in the browser http://localhost:3000/
|
||||
3. Start session and scan QR code in swagger
|
||||
1. Find `POST /api/session/start` request press **Try it out** and
|
||||
**Execute** it with `default` session name
|
||||
1. Find `POST /api/sessions/` request press **Try it out** and **Execute** it
|
||||
with `default` session name
|
||||
2. Find `GET /api/screenshot` and execute it - it must show QR code
|
||||
3. Scan QR code on your mobile WhatsApp application (that installed on your
|
||||
phone)
|
||||
|
||||
+16
-3
@@ -15,6 +15,7 @@
|
||||
"start:prod": "node dist/main",
|
||||
"start:prod-exit": "node dist/main",
|
||||
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix --max-warnings=0",
|
||||
"lint-cache": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix --cache --max-warnings=0",
|
||||
"test": "jest",
|
||||
"test:watch": "jest --watch",
|
||||
"test:cov": "jest --coverage",
|
||||
@@ -22,20 +23,25 @@
|
||||
"test:e2e": "jest --config ./test/jest-e2e.json"
|
||||
},
|
||||
"dependencies": {
|
||||
"@adiwajshing/baileys": "github:WhiskeySockets/Baileys",
|
||||
"@adiwajshing/baileys": "github:devlikeapro/Baileys#fork-master-channels-2",
|
||||
"@adiwajshing/keyed-db": "^0.2.4",
|
||||
"@aws-sdk/client-s3": "^3.633.0",
|
||||
"@aws-sdk/s3-request-presigner": "^3.633.0",
|
||||
"@nestjs/axios": "^3.0.2",
|
||||
"@nestjs/common": "^9.0.9",
|
||||
"@nestjs/config": "^0.5.0",
|
||||
"@nestjs/config": "^3.2.3",
|
||||
"@nestjs/core": "^9.0.9",
|
||||
"@nestjs/passport": "^9.0.0",
|
||||
"@nestjs/platform-express": "^9.0.9",
|
||||
"@nestjs/platform-ws": "^9.0.9",
|
||||
"@nestjs/serve-static": "^2.1.3",
|
||||
"@nestjs/swagger": "^7.1.11",
|
||||
"@nestjs/terminus": "^10.2.3",
|
||||
"@nestjs/websockets": "^9.0.9",
|
||||
"@types/better-sqlite3": "^7.6.10",
|
||||
"@types/lodash": "^4.14.194",
|
||||
"@types/ws": "^8.5.4",
|
||||
"adm-zip": "0.5.10",
|
||||
"async-lock": "^1.4.1",
|
||||
"better-sqlite3": "9.6.0",
|
||||
"check-disk-space": "^3.4.0",
|
||||
@@ -45,15 +51,22 @@
|
||||
"del": "^6.0.0",
|
||||
"express-basic-auth": "^1.2.1",
|
||||
"file-type": "16.5.4",
|
||||
"fs-extra": "^11.2.0",
|
||||
"https-proxy-agent": "^7.0.0",
|
||||
"joi": "^17.13.3",
|
||||
"knex": "^3.1.0",
|
||||
"libphonenumber-js": "^1.10.36",
|
||||
"link-preview-js": "^3.0.4",
|
||||
"lodash": "^4.17.21",
|
||||
"mime-types": "^2.1.27",
|
||||
"mongodb": "^6.3.0",
|
||||
"nestjs-pino": "^4.1.0",
|
||||
"passport": "^0.6.0",
|
||||
"passport-headerapikey": "^1.2.2",
|
||||
"pino-http": "^10.2.0",
|
||||
"pino-pretty": "^11.2.1",
|
||||
"pretty-bytes": "5.6.0",
|
||||
"promise-retry": "^2.0.1",
|
||||
"puppeteer": "^21.0.0",
|
||||
"qrcode": "^1.5.1",
|
||||
"qrcode-terminal": "^0.12.0",
|
||||
@@ -65,7 +78,7 @@
|
||||
"sharp": "^0.33.4",
|
||||
"swagger-ui-express": "^4.1.4",
|
||||
"venom-bot": "5.0.1",
|
||||
"whatsapp-web.js": "https://github.com/devlikeapro/whatsapp-web.js#main-fork-update"
|
||||
"whatsapp-web.js": "github:devlikeapro/whatsapp-web.js#fork-webpack-exodus-channels"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "^9.0.0",
|
||||
|
||||
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
echo "Starting WAHA..."
|
||||
|
||||
docker run -d \
|
||||
--restart=always \
|
||||
--name waha \
|
||||
-p 3000:3000/tcp \
|
||||
-v ./.sessions:/app/.sessions \
|
||||
-v ./.media:/app/.media \
|
||||
--env WHATSAPP_API_KEY=321 \
|
||||
--env WAHA_DASHBOARD_USERNAME=waha \
|
||||
--env WAHA_DASHBOARD_PASSWORD=waha \
|
||||
--env WAHA_LOG_FORMAT=PRETTY \
|
||||
--env WAHA_LOG_LEVEL=info \
|
||||
--env WHATSAPP_DEFAULT_ENGINE=WEBJS \
|
||||
--env WHATSAPP_RESTART_ALL_SESSIONS=True \
|
||||
--env WAHA_PRINT_QR=False \
|
||||
--env WHATSAPP_FILES_LIFETIME=0 \
|
||||
--env WHATSAPP_FILES_FOLDER=/app/.media \
|
||||
devlikeapro/waha-plus:latest
|
||||
|
||||
echo "WAHA started."
|
||||
Executable
+21
@@ -0,0 +1,21 @@
|
||||
set -e
|
||||
echo "Updating WAHA..."
|
||||
echo "Logging in to Docker..."
|
||||
docker login -u devlikeapro # -p {KEY} - you can hard code key here https://portal.devlike.pro/
|
||||
|
||||
echo "Pulling the latest image..."
|
||||
docker pull devlikeapro/waha-plus
|
||||
|
||||
echo "Logging out of Docker..."
|
||||
docker logout
|
||||
|
||||
# Just pull if you're using WAHA Core
|
||||
# docker pull devlikeapro/waha
|
||||
|
||||
echo "Stopping the current container..."
|
||||
docker stop waha || true
|
||||
echo "Removing the current container..."
|
||||
docker rm waha || true
|
||||
|
||||
echo "Running WAHA..."
|
||||
sh ./waha-run.sh
|
||||
@@ -8,9 +8,15 @@ import {
|
||||
} from '@nestjs/common';
|
||||
import { UnprocessableEntityException } from '@nestjs/common/exceptions/unprocessable-entity.exception';
|
||||
import { ApiOperation, ApiSecurity, ApiTags } from '@nestjs/swagger';
|
||||
import { ApiFileAcceptHeader } from '@waha/nestjs/ApiFileAcceptHeader';
|
||||
import {
|
||||
SessionApiParam,
|
||||
SessionParam,
|
||||
} from '@waha/nestjs/params/SessionApiParam';
|
||||
|
||||
import { SessionManager } from '../core/abc/manager.abc';
|
||||
import { WhatsappSession } from '../core/abc/session.abc';
|
||||
import { BufferResponseInterceptor } from '../nestjs/BufferResponseInterceptor';
|
||||
import {
|
||||
CaptchaBody,
|
||||
OTPRequest,
|
||||
@@ -21,18 +27,16 @@ import {
|
||||
} from '../structures/auth.dto';
|
||||
import { WAHASessionStatus } from '../structures/enums.dto';
|
||||
import { Base64File } from '../structures/files.dto';
|
||||
import { BufferResponseInterceptor } from './BufferResponseInterceptor';
|
||||
import { ApiFileAcceptHeader, SessionApiParam, SessionParam } from './helpers';
|
||||
|
||||
@ApiSecurity('api_key')
|
||||
@Controller('api/:session/auth')
|
||||
@ApiTags('auth')
|
||||
@ApiTags('🔑 Auth')
|
||||
class AuthController {
|
||||
constructor(private manager: SessionManager) {}
|
||||
|
||||
@Get('qr')
|
||||
@ApiOperation({
|
||||
summary: 'Get QR code for pairing WhatsApp Web.',
|
||||
summary: 'Get QR code for pairing WhatsApp API.',
|
||||
})
|
||||
@SessionApiParam
|
||||
@ApiFileAcceptHeader(Base64File, QRCodeValue)
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
import {
|
||||
Body,
|
||||
Controller,
|
||||
Delete,
|
||||
Get,
|
||||
Param,
|
||||
Post,
|
||||
Query,
|
||||
} from '@nestjs/common';
|
||||
import { ApiOperation, ApiSecurity, ApiTags } from '@nestjs/swagger';
|
||||
import {
|
||||
SessionApiParam,
|
||||
SessionParam,
|
||||
} from '@waha/nestjs/params/SessionApiParam';
|
||||
import {
|
||||
Channel,
|
||||
CreateChannelRequest,
|
||||
ListChannelsQuery,
|
||||
NewsletterIdApiParam,
|
||||
NewsletterIdOrInviteCodeApiParam,
|
||||
} from '@waha/structures/channels.dto';
|
||||
|
||||
import { SessionManager } from '../core/abc/manager.abc';
|
||||
import { isNewsletter, WhatsappSession } from '../core/abc/session.abc';
|
||||
|
||||
@ApiSecurity('api_key')
|
||||
@Controller('api/:session/channels')
|
||||
@ApiTags('📢 Channels')
|
||||
export class ChannelsController {
|
||||
constructor(private manager: SessionManager) {}
|
||||
|
||||
@Get('')
|
||||
@SessionApiParam
|
||||
@ApiOperation({ summary: 'Get list of know channels' })
|
||||
async list(
|
||||
@SessionParam session: WhatsappSession,
|
||||
@Query() query: ListChannelsQuery,
|
||||
): Promise<Channel[]> {
|
||||
return session.channelsList(query);
|
||||
}
|
||||
|
||||
@Post('')
|
||||
@SessionApiParam
|
||||
@ApiOperation({ summary: 'Create a new channel.' })
|
||||
create(
|
||||
@SessionParam session: WhatsappSession,
|
||||
@Body() request: CreateChannelRequest,
|
||||
): Promise<Channel> {
|
||||
return session.channelsCreateChannel(request);
|
||||
}
|
||||
|
||||
@Delete(':id')
|
||||
@SessionApiParam
|
||||
@NewsletterIdApiParam
|
||||
@ApiOperation({ summary: 'Delete the channel.' })
|
||||
delete(@SessionParam session: WhatsappSession, @Param('id') id: string) {
|
||||
return session.channelsDeleteChannel(id);
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
@SessionApiParam
|
||||
@NewsletterIdOrInviteCodeApiParam
|
||||
@ApiOperation({
|
||||
summary: 'Get the channel info',
|
||||
description:
|
||||
'You can use either id (123@newsletter) ' +
|
||||
'OR invite code (https://www.whatsapp.com/channel/123)',
|
||||
})
|
||||
get(
|
||||
@SessionParam session: WhatsappSession,
|
||||
@Param('id') id: string,
|
||||
): Promise<Channel> {
|
||||
if (isNewsletter(id)) {
|
||||
return session.channelsGetChannel(id);
|
||||
} else {
|
||||
// https://www.whatsapp.com/channel/123 => 123
|
||||
const inviteCode = id.split('/').pop();
|
||||
return session.channelsGetChannelByInviteCode(inviteCode);
|
||||
}
|
||||
}
|
||||
|
||||
@Post('follow')
|
||||
@SessionApiParam
|
||||
@NewsletterIdApiParam
|
||||
@ApiOperation({ summary: 'Follow the channel.' })
|
||||
follow(
|
||||
@SessionParam session: WhatsappSession,
|
||||
@Param('id') id: string,
|
||||
): Promise<void> {
|
||||
return session.channelsFollowChannel(id);
|
||||
}
|
||||
|
||||
@Post('unfollow')
|
||||
@SessionApiParam
|
||||
@NewsletterIdApiParam
|
||||
@ApiOperation({ summary: 'Unfollow the channel.' })
|
||||
unfollow(
|
||||
@SessionParam session: WhatsappSession,
|
||||
@Param('id') id: string,
|
||||
): Promise<void> {
|
||||
return session.channelsUnfollowChannel(id);
|
||||
}
|
||||
|
||||
@Post('mute')
|
||||
@SessionApiParam
|
||||
@NewsletterIdApiParam
|
||||
@ApiOperation({ summary: 'Mute the channel.' })
|
||||
mute(
|
||||
@SessionParam session: WhatsappSession,
|
||||
@Param('id') id: string,
|
||||
): Promise<void> {
|
||||
return session.channelsMuteChannel(id);
|
||||
}
|
||||
|
||||
@Post('unmute')
|
||||
@SessionApiParam
|
||||
@NewsletterIdApiParam
|
||||
@ApiOperation({ summary: 'Unmute the channel.' })
|
||||
unmute(
|
||||
@SessionParam session: WhatsappSession,
|
||||
@Param('id') id: string,
|
||||
): Promise<void> {
|
||||
return session.channelsUnmuteChannel(id);
|
||||
}
|
||||
}
|
||||
@@ -4,28 +4,29 @@ import {
|
||||
Delete,
|
||||
Get,
|
||||
Param,
|
||||
Post,
|
||||
Put,
|
||||
Query,
|
||||
UsePipes,
|
||||
ValidationPipe,
|
||||
} from '@nestjs/common';
|
||||
import { ApiOperation, ApiSecurity, ApiTags } from '@nestjs/swagger';
|
||||
import { ChatIdApiParam } from '@waha/nestjs/params/ChatIdApiParam';
|
||||
import { MessageIdApiParam } from '@waha/nestjs/params/MessageIdApiParam';
|
||||
import {
|
||||
SessionApiParam,
|
||||
SessionParam,
|
||||
} from '@waha/nestjs/params/SessionApiParam';
|
||||
|
||||
import { SessionManager } from '../core/abc/manager.abc';
|
||||
import { WhatsappSession } from '../core/abc/session.abc';
|
||||
import { parseBool } from '../helpers';
|
||||
import { GetChatMessagesQuery, GetChatsQuery } from '../structures/chats.dto';
|
||||
import { EditMessageRequest } from '../structures/chatting.dto';
|
||||
import {
|
||||
ChatIdApiParam,
|
||||
MessageIdApiParam,
|
||||
SessionApiParam,
|
||||
SessionParam,
|
||||
} from './helpers';
|
||||
|
||||
@ApiSecurity('api_key')
|
||||
@Controller('api/:session/chats')
|
||||
@ApiTags('chats')
|
||||
@ApiTags('💬 Chats')
|
||||
@UsePipes(new ValidationPipe({ transform: true }))
|
||||
class ChatsController {
|
||||
constructor(private manager: SessionManager) {}
|
||||
@@ -43,6 +44,7 @@ class ChatsController {
|
||||
@Delete(':chatId')
|
||||
@SessionApiParam
|
||||
@ApiOperation({ summary: 'Deletes the chat' })
|
||||
@ChatIdApiParam
|
||||
deleteChat(
|
||||
@SessionParam session: WhatsappSession,
|
||||
@Param('chatId') chatId: string,
|
||||
@@ -53,6 +55,7 @@ class ChatsController {
|
||||
@Get(':chatId/messages')
|
||||
@SessionApiParam
|
||||
@ApiOperation({ summary: 'Gets messages in the chat' })
|
||||
@ChatIdApiParam
|
||||
getChatMessages(
|
||||
@Query() query: GetChatMessagesQuery,
|
||||
@SessionParam session: WhatsappSession,
|
||||
@@ -65,6 +68,7 @@ class ChatsController {
|
||||
@Delete(':chatId/messages')
|
||||
@SessionApiParam
|
||||
@ApiOperation({ summary: 'Clears all messages from the chat' })
|
||||
@ChatIdApiParam
|
||||
clearMessages(
|
||||
@SessionParam session: WhatsappSession,
|
||||
@Param('chatId') chatId: string,
|
||||
@@ -98,6 +102,28 @@ class ChatsController {
|
||||
) {
|
||||
return session.editMessage(chatId, messageId, body);
|
||||
}
|
||||
|
||||
@Post(':chatId/archive')
|
||||
@SessionApiParam
|
||||
@ChatIdApiParam
|
||||
@ApiOperation({ summary: 'Archive the chat' })
|
||||
archiveChat(
|
||||
@SessionParam session: WhatsappSession,
|
||||
@Param('chatId') chatId: string,
|
||||
) {
|
||||
return session.chatsArchiveChat(chatId);
|
||||
}
|
||||
|
||||
@Post(':chatId/unarchive')
|
||||
@SessionApiParam
|
||||
@ChatIdApiParam
|
||||
@ApiOperation({ summary: 'Unarchive the chat' })
|
||||
unarchiveChat(
|
||||
@SessionParam session: WhatsappSession,
|
||||
@Param('chatId') chatId: string,
|
||||
) {
|
||||
return session.chatsUnarchiveChat(chatId);
|
||||
}
|
||||
}
|
||||
|
||||
export { ChatsController };
|
||||
@@ -26,35 +26,10 @@ import { WAMessage } from '../structures/responses.dto';
|
||||
|
||||
@ApiSecurity('api_key')
|
||||
@Controller('api')
|
||||
@ApiTags('chatting')
|
||||
@ApiTags('📤 Chatting')
|
||||
export class ChattingController {
|
||||
constructor(private manager: SessionManager) {}
|
||||
|
||||
@Get('/checkNumberStatus')
|
||||
@ApiOperation({ summary: 'Check number status' })
|
||||
async checkNumberStatus(
|
||||
@Query() request: CheckNumberStatusQuery,
|
||||
): Promise<WANumberExistResult> {
|
||||
const whatsapp = this.manager.getSession(request.session);
|
||||
return whatsapp.checkNumberStatus(request);
|
||||
}
|
||||
|
||||
@Post('/sendContactVcard')
|
||||
sendContactVcard(@Body() request: MessageContactVcardRequest) {
|
||||
const whatsapp = this.manager.getSession(request.session);
|
||||
return whatsapp.sendContactVCard(request);
|
||||
}
|
||||
|
||||
@Get('/sendText')
|
||||
@ApiOperation({ summary: 'Send a text message' })
|
||||
sendTextGet(@Query() query: MessageTextQuery) {
|
||||
const whatsapp = this.manager.getSession(query.session);
|
||||
const msg = new MessageTextRequest();
|
||||
msg.chatId = query.phone;
|
||||
msg.text = query.text;
|
||||
return whatsapp.sendText(msg);
|
||||
}
|
||||
|
||||
@Post('/sendText')
|
||||
@ApiOperation({ summary: 'Send a text message' })
|
||||
sendText(@Body() request: MessageTextRequest): Promise<WAMessage> {
|
||||
@@ -62,31 +37,11 @@ export class ChattingController {
|
||||
return whatsapp.sendText(request);
|
||||
}
|
||||
|
||||
@Post('/sendPoll')
|
||||
@ApiOperation({
|
||||
summary: 'Send a poll with options. You can use it as buttons replace',
|
||||
})
|
||||
sendPoll(@Body() request: MessagePollRequest) {
|
||||
const whatsapp = this.manager.getSession(request.session);
|
||||
return whatsapp.sendPoll(request);
|
||||
}
|
||||
|
||||
@Post('/sendLocation')
|
||||
sendLocation(@Body() request: MessageLocationRequest) {
|
||||
const whatsapp = this.manager.getSession(request.session);
|
||||
return whatsapp.sendLocation(request);
|
||||
}
|
||||
|
||||
@Post('/sendLinkPreview')
|
||||
sendLinkPreview(@Body() request: MessageLinkPreviewRequest) {
|
||||
const whatsapp = this.manager.getSession(request.session);
|
||||
return whatsapp.sendLinkPreview(request);
|
||||
}
|
||||
|
||||
@Post('/sendImage')
|
||||
@ApiOperation({
|
||||
summary:
|
||||
'Send an image. Either from an URL or base64 data - look at the request schemas for details.',
|
||||
summary: 'Send an image',
|
||||
description:
|
||||
'Either from an URL or base64 data - look at the request schemas for details.',
|
||||
})
|
||||
sendImage(@Body() request: MessageImageRequest) {
|
||||
const whatsapp = this.manager.getSession(request.session);
|
||||
@@ -95,8 +50,9 @@ export class ChattingController {
|
||||
|
||||
@Post('/sendFile')
|
||||
@ApiOperation({
|
||||
summary:
|
||||
'Send a file. Either from an URL or base64 data - look at the request schemas for details.',
|
||||
summary: 'Send a file',
|
||||
description:
|
||||
'Either from an URL or base64 data - look at the request schemas for details.',
|
||||
})
|
||||
sendFile(@Body() request: MessageFileRequest) {
|
||||
const whatsapp = this.manager.getSession(request.session);
|
||||
@@ -105,8 +61,9 @@ export class ChattingController {
|
||||
|
||||
@Post('/sendVoice')
|
||||
@ApiOperation({
|
||||
summary:
|
||||
'Send an voice message. Either from an URL or base64 data - look at the request schemas for details.',
|
||||
summary: 'Send an voice message',
|
||||
description:
|
||||
'Either from an URL or base64 data - look at the request schemas for details.',
|
||||
})
|
||||
sendVoice(@Body() request: MessageVoiceRequest) {
|
||||
const whatsapp = this.manager.getSession(request.session);
|
||||
@@ -115,21 +72,15 @@ export class ChattingController {
|
||||
|
||||
@Post('/sendVideo')
|
||||
@ApiOperation({
|
||||
summary:
|
||||
'Send a video. Either from an URL or base64 data - look at the request schemas for details.',
|
||||
summary: 'Send a video',
|
||||
description:
|
||||
'Either from an URL or base64 data - look at the request schemas for details.',
|
||||
})
|
||||
sendVideo(@Body() request: MessageVideoRequest) {
|
||||
const whatsapp = this.manager.getSession(request.session);
|
||||
return whatsapp.sendVideo(request);
|
||||
}
|
||||
|
||||
@Post('/reply')
|
||||
@ApiOperation({ summary: 'Reply to a text message' })
|
||||
reply(@Body() request: MessageReplyRequest) {
|
||||
const whatsapp = this.manager.getSession(request.session);
|
||||
return whatsapp.reply(request);
|
||||
}
|
||||
|
||||
@Post('/sendSeen')
|
||||
sendSeen(@Body() chat: SendSeenRequest) {
|
||||
const whatsapp = this.manager.getSession(chat.session);
|
||||
@@ -166,10 +117,72 @@ export class ChattingController {
|
||||
return;
|
||||
}
|
||||
|
||||
@Post('/sendPoll')
|
||||
@ApiOperation({
|
||||
summary: 'Send a poll with options',
|
||||
description: 'You can use it as buttons or list replacement',
|
||||
})
|
||||
sendPoll(@Body() request: MessagePollRequest) {
|
||||
const whatsapp = this.manager.getSession(request.session);
|
||||
return whatsapp.sendPoll(request);
|
||||
}
|
||||
|
||||
@Post('/sendLocation')
|
||||
sendLocation(@Body() request: MessageLocationRequest) {
|
||||
const whatsapp = this.manager.getSession(request.session);
|
||||
return whatsapp.sendLocation(request);
|
||||
}
|
||||
|
||||
@Post('/sendLinkPreview')
|
||||
sendLinkPreview(@Body() request: MessageLinkPreviewRequest) {
|
||||
const whatsapp = this.manager.getSession(request.session);
|
||||
return whatsapp.sendLinkPreview(request);
|
||||
}
|
||||
|
||||
@Get('/messages')
|
||||
@ApiOperation({ summary: 'Get messages in a chat' })
|
||||
getMessages(@Query() query: GetMessageQuery) {
|
||||
const whatsapp = this.manager.getSession(query.session);
|
||||
return whatsapp.getMessages(query);
|
||||
}
|
||||
|
||||
@Get('/sendText')
|
||||
@ApiOperation({ summary: 'Send a text message', deprecated: true })
|
||||
sendTextGet(@Query() query: MessageTextQuery) {
|
||||
const whatsapp = this.manager.getSession(query.session);
|
||||
const msg = new MessageTextRequest();
|
||||
msg.chatId = query.phone;
|
||||
msg.text = query.text;
|
||||
return whatsapp.sendText(msg);
|
||||
}
|
||||
|
||||
@Post('/sendContactVcard')
|
||||
sendContactVcard(@Body() request: MessageContactVcardRequest) {
|
||||
const whatsapp = this.manager.getSession(request.session);
|
||||
return whatsapp.sendContactVCard(request);
|
||||
}
|
||||
|
||||
@Get('/checkNumberStatus')
|
||||
@ApiOperation({
|
||||
summary: 'Check number status',
|
||||
description: 'DEPRECATED. Use "POST /contacts/check-exists" instead',
|
||||
deprecated: true,
|
||||
})
|
||||
async DEPRECATED_checkNumberStatus(
|
||||
@Query() request: CheckNumberStatusQuery,
|
||||
): Promise<WANumberExistResult> {
|
||||
const whatsapp = this.manager.getSession(request.session);
|
||||
return whatsapp.checkNumberStatus(request);
|
||||
}
|
||||
|
||||
@Post('/reply')
|
||||
@ApiOperation({
|
||||
summary:
|
||||
'DEPRECATED - you can set "reply_to" field when sending text, image, etc',
|
||||
deprecated: true,
|
||||
})
|
||||
reply(@Body() request: MessageReplyRequest) {
|
||||
const whatsapp = this.manager.getSession(request.session);
|
||||
return whatsapp.reply(request);
|
||||
}
|
||||
}
|
||||
@@ -11,14 +11,15 @@ import { ContactQuery, ContactRequest } from '../structures/contacts.dto';
|
||||
|
||||
@ApiSecurity('api_key')
|
||||
@Controller('api/contacts')
|
||||
@ApiTags('contacts')
|
||||
@ApiTags('👤 Contacts')
|
||||
export class ContactsController {
|
||||
constructor(private manager: SessionManager) {}
|
||||
|
||||
@Get('/')
|
||||
@ApiOperation({
|
||||
summary:
|
||||
'Get contact basic info. The method always return result, even if the phone number is not registered in WhatsApp. For that - use /check-exists endpoint below.',
|
||||
summary: 'Get contact basic info',
|
||||
description:
|
||||
'The method always return result, even if the phone number is not registered in WhatsApp. For that - use /contacts/check-exists endpoint below.',
|
||||
})
|
||||
get(@Query() query: ContactQuery) {
|
||||
const whatsapp = this.manager.getSession(query.session);
|
||||
@@ -43,8 +44,9 @@ export class ContactsController {
|
||||
|
||||
@Get('/about')
|
||||
@ApiOperation({
|
||||
summary:
|
||||
'Gets the Contact\'s current "about" info. Returns null if you don\'t have permission to read their status.',
|
||||
summary: 'Gets the Contact\'s "about" info',
|
||||
description:
|
||||
'Returns null if you do not have permission to read their status.',
|
||||
})
|
||||
getAbout(@Query() query: ContactQuery) {
|
||||
const whatsapp = this.manager.getSession(query.session);
|
||||
@@ -53,8 +55,9 @@ export class ContactsController {
|
||||
|
||||
@Get('/profile-picture')
|
||||
@ApiOperation({
|
||||
summary:
|
||||
"Returns the contact's profile picture URL, if privacy settings allow it.",
|
||||
summary: "Get contact's profile picture URL",
|
||||
description:
|
||||
'If privacy settings do not allow to get the picture, the method will return null.',
|
||||
})
|
||||
getProfilePicture(@Query() query: ContactQuery) {
|
||||
const whatsapp = this.manager.getSession(query.session);
|
||||
|
||||
@@ -8,6 +8,11 @@ import {
|
||||
Put,
|
||||
} from '@nestjs/common';
|
||||
import { ApiOperation, ApiSecurity, ApiTags } from '@nestjs/swagger';
|
||||
import { GroupIdApiParam } from '@waha/nestjs/params/ChatIdApiParam';
|
||||
import {
|
||||
SessionApiParam,
|
||||
SessionParam,
|
||||
} from '@waha/nestjs/params/SessionApiParam';
|
||||
|
||||
import { SessionManager } from '../core/abc/manager.abc';
|
||||
import { WhatsappSession } from '../core/abc/session.abc';
|
||||
@@ -18,11 +23,10 @@ import {
|
||||
SettingsSecurityChangeInfo,
|
||||
SubjectRequest,
|
||||
} from '../structures/groups.dto';
|
||||
import { SessionApiParam, SessionParam } from './helpers';
|
||||
|
||||
@ApiSecurity('api_key')
|
||||
@Controller('api/:session/groups')
|
||||
@ApiTags('groups')
|
||||
@ApiTags('👥 Groups')
|
||||
export class GroupsController {
|
||||
constructor(private manager: SessionManager) {}
|
||||
|
||||
@@ -44,6 +48,7 @@ export class GroupsController {
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
@GroupIdApiParam
|
||||
@SessionApiParam
|
||||
@ApiOperation({ summary: 'Get the group.' })
|
||||
getGroup(@SessionParam session: WhatsappSession, @Param('id') id: string) {
|
||||
@@ -52,9 +57,11 @@ export class GroupsController {
|
||||
|
||||
@Put(':id/settings/security/info-admin-only')
|
||||
@SessionApiParam
|
||||
@GroupIdApiParam
|
||||
@ApiOperation({
|
||||
summary:
|
||||
'Updates the group settings to only allow admins to edit group info (title, description, photo).',
|
||||
summary: 'Updates the group "info admin only" settings.',
|
||||
description:
|
||||
'You can allow only admins to edit group info (title, description, photo).',
|
||||
})
|
||||
setInfoAdminOnly(
|
||||
@SessionParam session: WhatsappSession,
|
||||
@@ -66,9 +73,11 @@ export class GroupsController {
|
||||
|
||||
@Get(':id/settings/security/info-admin-only')
|
||||
@SessionApiParam
|
||||
@GroupIdApiParam
|
||||
@ApiOperation({
|
||||
summary:
|
||||
'Gets the group settings to only allow admins to edit group info (title, description, photo).',
|
||||
summary: "Get the group's 'info admin only' settings.",
|
||||
description:
|
||||
'You can allow only admins to edit group info (title, description, photo).',
|
||||
})
|
||||
getInfoAdminOnly(
|
||||
@SessionParam session: WhatsappSession,
|
||||
@@ -79,8 +88,10 @@ export class GroupsController {
|
||||
|
||||
@Put(':id/settings/security/messages-admin-only')
|
||||
@SessionApiParam
|
||||
@GroupIdApiParam
|
||||
@ApiOperation({
|
||||
summary:
|
||||
summary: 'Update settings - who can send messages',
|
||||
description:
|
||||
'Updates the group settings to only allow admins to send messages.',
|
||||
})
|
||||
setMessagesAdminOnly(
|
||||
@@ -93,8 +104,10 @@ export class GroupsController {
|
||||
|
||||
@Get(':id/settings/security/messages-admin-only')
|
||||
@SessionApiParam
|
||||
@GroupIdApiParam
|
||||
@ApiOperation({
|
||||
summary: 'Gets the group settings to only allow admins to send messages.',
|
||||
summary: 'Get settings - who can send messages',
|
||||
description: 'The group settings to only allow admins to send messages.',
|
||||
})
|
||||
getMessagesAdminOnly(
|
||||
@SessionParam session: WhatsappSession,
|
||||
@@ -105,6 +118,7 @@ export class GroupsController {
|
||||
|
||||
@Delete(':id')
|
||||
@SessionApiParam
|
||||
@GroupIdApiParam
|
||||
@ApiOperation({ summary: 'Delete the group.' })
|
||||
deleteGroup(@SessionParam session: WhatsappSession, @Param('id') id: string) {
|
||||
return session.deleteGroup(id);
|
||||
@@ -112,6 +126,7 @@ export class GroupsController {
|
||||
|
||||
@Post(':id/leave')
|
||||
@SessionApiParam
|
||||
@GroupIdApiParam
|
||||
@ApiOperation({ summary: 'Leave the group.' })
|
||||
leaveGroup(@SessionParam session: WhatsappSession, @Param('id') id: string) {
|
||||
return session.leaveGroup(id);
|
||||
@@ -119,11 +134,12 @@ export class GroupsController {
|
||||
|
||||
@Put(':id/description')
|
||||
@ApiOperation({
|
||||
summary:
|
||||
'Updates the group description.\n' +
|
||||
'Returns true if the subject was properly updated. This can return false if the user does not have the necessary permissions.\n',
|
||||
summary: 'Updates the group description.',
|
||||
description:
|
||||
'Returns "true" if the subject was properly updated. This can return "false" if the user does not have the necessary permissions.',
|
||||
})
|
||||
@SessionApiParam
|
||||
@GroupIdApiParam
|
||||
setDescription(
|
||||
@SessionParam session: WhatsappSession,
|
||||
@Param('id') id: string,
|
||||
@@ -134,10 +150,11 @@ export class GroupsController {
|
||||
|
||||
@Put(':id/subject')
|
||||
@SessionApiParam
|
||||
@GroupIdApiParam
|
||||
@ApiOperation({
|
||||
summary:
|
||||
'Updates the group subject.\n' +
|
||||
'Returns true if the subject was properly updated. This can return false if the user does not have the necessary permissions.\n',
|
||||
summary: 'Updates the group subject',
|
||||
description:
|
||||
'Returns "true" if the subject was properly updated. This can return "false" if the user does not have the necessary permissions.',
|
||||
})
|
||||
setSubject(
|
||||
@SessionParam session: WhatsappSession,
|
||||
@@ -149,7 +166,8 @@ export class GroupsController {
|
||||
|
||||
@Get(':id/invite-code')
|
||||
@SessionApiParam
|
||||
@ApiOperation({ summary: 'Gets the invite code for a specific group.' })
|
||||
@GroupIdApiParam
|
||||
@ApiOperation({ summary: 'Gets the invite code for the group.' })
|
||||
getInviteCode(
|
||||
@SessionParam session: WhatsappSession,
|
||||
@Param('id') id: string,
|
||||
@@ -159,6 +177,7 @@ export class GroupsController {
|
||||
|
||||
@Post(':id/invite-code/revoke')
|
||||
@SessionApiParam
|
||||
@GroupIdApiParam
|
||||
@ApiOperation({
|
||||
summary:
|
||||
'Invalidates the current group invite code and generates a new one.',
|
||||
@@ -172,7 +191,8 @@ export class GroupsController {
|
||||
|
||||
@Get(':id/participants/')
|
||||
@SessionApiParam
|
||||
@ApiOperation({ summary: 'Get a list of participants by in the group.' })
|
||||
@GroupIdApiParam
|
||||
@ApiOperation({ summary: 'Get participants' })
|
||||
getParticipants(
|
||||
@SessionParam session: WhatsappSession,
|
||||
@Param('id') id: string,
|
||||
@@ -182,7 +202,8 @@ export class GroupsController {
|
||||
|
||||
@Post(':id/participants/add')
|
||||
@SessionApiParam
|
||||
@ApiOperation({ summary: 'Adds a list of participants by ID to the group.' })
|
||||
@GroupIdApiParam
|
||||
@ApiOperation({ summary: 'Add participants' })
|
||||
addParticipants(
|
||||
@SessionParam session: WhatsappSession,
|
||||
@Param('id') id: string,
|
||||
@@ -193,8 +214,9 @@ export class GroupsController {
|
||||
|
||||
@Post(':id/participants/remove')
|
||||
@SessionApiParam
|
||||
@GroupIdApiParam
|
||||
@ApiOperation({
|
||||
summary: 'Removes a list of participants by ID to the group.',
|
||||
summary: 'Remove participants',
|
||||
})
|
||||
removeParticipants(
|
||||
@SessionParam session: WhatsappSession,
|
||||
@@ -206,6 +228,7 @@ export class GroupsController {
|
||||
|
||||
@Post(':id/admin/promote')
|
||||
@SessionApiParam
|
||||
@GroupIdApiParam
|
||||
@ApiOperation({ summary: 'Promote participants to admin users.' })
|
||||
promoteToAdmin(
|
||||
@SessionParam session: WhatsappSession,
|
||||
@@ -217,7 +240,8 @@ export class GroupsController {
|
||||
|
||||
@Post(':id/admin/demote')
|
||||
@SessionApiParam
|
||||
@ApiOperation({ summary: 'Demotes participants by to regular users.' })
|
||||
@GroupIdApiParam
|
||||
@ApiOperation({ summary: 'Demotes participants to regular users.' })
|
||||
demoteToAdmin(
|
||||
@SessionParam session: WhatsappSession,
|
||||
@Param('id') id: string,
|
||||
|
||||
@@ -1,16 +1,22 @@
|
||||
import { Controller, Get } from '@nestjs/common';
|
||||
import { ApiTags } from '@nestjs/swagger';
|
||||
import { ApiOperation, ApiSecurity, ApiTags } from '@nestjs/swagger';
|
||||
import { HealthCheck } from '@nestjs/terminus';
|
||||
|
||||
import { WAHAHealthCheckService } from '../core/abc/WAHAHealthCheckService';
|
||||
|
||||
@ApiSecurity('api_key')
|
||||
@Controller('health')
|
||||
@ApiTags('other')
|
||||
@ApiTags('🔍 Observability')
|
||||
export class HealthController {
|
||||
constructor(private wahaHealth: WAHAHealthCheckService) {}
|
||||
|
||||
@Get()
|
||||
@HealthCheck()
|
||||
@ApiOperation({
|
||||
summary: 'Check the health of the server',
|
||||
description:
|
||||
"Perform all health checks and return the server's health status.",
|
||||
})
|
||||
async check() {
|
||||
return this.wahaHealth.check();
|
||||
}
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
import {
|
||||
applyDecorators,
|
||||
Injectable,
|
||||
Param,
|
||||
PipeTransform,
|
||||
} from '@nestjs/common';
|
||||
import {
|
||||
ApiExtraModels,
|
||||
ApiParam,
|
||||
ApiResponse,
|
||||
getSchemaPath,
|
||||
} from '@nestjs/swagger';
|
||||
|
||||
import { SessionManager } from '../core/abc/manager.abc';
|
||||
import { WhatsappSession } from '../core/abc/session.abc';
|
||||
import { Base64File } from '../structures/files.dto';
|
||||
|
||||
/**
|
||||
* Get session name and return Whatsapp session back (if exists)
|
||||
* use it as
|
||||
@Param('session', SessionPipe) session: WhatsappSession,
|
||||
*/
|
||||
@Injectable()
|
||||
export class SessionPipe implements PipeTransform<WhatsappSession> {
|
||||
constructor(private manager: SessionManager) {}
|
||||
|
||||
async transform(value: any) {
|
||||
return this.manager.getSession(value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Decorator for a method that uses SessionPipe above
|
||||
*/
|
||||
export const SessionApiParam = ApiParam({
|
||||
name: 'session',
|
||||
required: true,
|
||||
type: 'string',
|
||||
schema: {
|
||||
default: 'default',
|
||||
},
|
||||
description: 'WhatsApp session name',
|
||||
});
|
||||
|
||||
/**
|
||||
* Session param
|
||||
@SessionParam session: WhatsappSession,
|
||||
*/
|
||||
export const SessionParam = Param('session', SessionPipe);
|
||||
|
||||
export const ChatIdApiParam = ApiParam({
|
||||
name: 'chatId',
|
||||
required: true,
|
||||
type: 'string',
|
||||
description: 'Chat ID',
|
||||
example: '123456789@c.us',
|
||||
});
|
||||
|
||||
export const MessageIdApiParam = ApiParam({
|
||||
name: 'messageId',
|
||||
required: true,
|
||||
type: 'string',
|
||||
description: 'Message ID',
|
||||
example: 'true_123456789@c.us_BAE6A33293978B16',
|
||||
});
|
||||
|
||||
function getRefSchemaPaths(models) {
|
||||
return models.map((model) => {
|
||||
return { $ref: getSchemaPath(model) };
|
||||
});
|
||||
}
|
||||
|
||||
export function ApiFileAcceptHeader(...models) {
|
||||
models = models.length ? models : [Base64File];
|
||||
return applyDecorators(
|
||||
// Add extra models, otherwise it'll give a error
|
||||
// $ref not found
|
||||
ApiExtraModels(...models),
|
||||
ApiResponse({
|
||||
status: 200,
|
||||
content: {
|
||||
'image/png': {
|
||||
schema: {
|
||||
type: 'string',
|
||||
format: 'binary',
|
||||
},
|
||||
},
|
||||
'application/json': {
|
||||
schema: {
|
||||
oneOf: getRefSchemaPaths(models),
|
||||
},
|
||||
},
|
||||
},
|
||||
}),
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
import { Body, Controller, Get, Param, Put } from '@nestjs/common';
|
||||
import { ApiOperation, ApiSecurity, ApiTags } from '@nestjs/swagger';
|
||||
import { WhatsappSession } from '@waha/core/abc/session.abc';
|
||||
import { ChatIdApiParam } from '@waha/nestjs/params/ChatIdApiParam';
|
||||
import {
|
||||
SessionApiParam,
|
||||
SessionParam,
|
||||
} from '@waha/nestjs/params/SessionApiParam';
|
||||
import { Label, SetLabelsRequest } from '@waha/structures/labels.dto';
|
||||
|
||||
import { SessionManager } from '../core/abc/manager.abc';
|
||||
|
||||
@ApiSecurity('api_key')
|
||||
@Controller('api/:session/labels')
|
||||
@ApiTags('🏷️ Labels')
|
||||
export class LabelsController {
|
||||
constructor(private manager: SessionManager) {}
|
||||
|
||||
@Get('/')
|
||||
@SessionApiParam
|
||||
@ApiOperation({ summary: 'Get all labels' })
|
||||
getAll(@SessionParam session: WhatsappSession): Promise<Label[]> {
|
||||
return session.getLabels();
|
||||
}
|
||||
|
||||
@Get('/chats/:chatId')
|
||||
@SessionApiParam
|
||||
@ChatIdApiParam
|
||||
@ApiOperation({ summary: 'Get labels for the chat' })
|
||||
getChatLabels(
|
||||
@SessionParam session: WhatsappSession,
|
||||
@Param('chatId') chatId: string,
|
||||
): Promise<Label[]> {
|
||||
return session.getChatLabels(chatId);
|
||||
}
|
||||
|
||||
@Put('/chats/:chatId')
|
||||
@SessionApiParam
|
||||
@ChatIdApiParam
|
||||
@ApiOperation({ summary: 'Save labels for the chat' })
|
||||
putChatLabels(
|
||||
@SessionParam session: WhatsappSession,
|
||||
@Param('chatId') chatId: string,
|
||||
@Body() request: SetLabelsRequest,
|
||||
) {
|
||||
return session.putLabelsToChat(chatId, request.labels);
|
||||
}
|
||||
|
||||
@Get('/:labelId/chats')
|
||||
@SessionApiParam
|
||||
@ApiOperation({ summary: 'Get chats by label' })
|
||||
getChatsByLabel(
|
||||
@SessionParam session: WhatsappSession,
|
||||
@Param('labelId') labelId: string,
|
||||
) {
|
||||
return session.getChatsByLabelId(labelId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import { Controller, Get } from '@nestjs/common';
|
||||
import { ApiOperation, ApiSecurity, ApiTags } from '@nestjs/swagger';
|
||||
import { PingResponse } from '@waha/structures/ping.dto';
|
||||
|
||||
@ApiSecurity('api_key')
|
||||
@Controller('ping')
|
||||
@ApiTags('🔍 Observability')
|
||||
export class PingController {
|
||||
@Get()
|
||||
@ApiOperation({
|
||||
summary: 'Ping the server',
|
||||
description: 'Check if the server is alive and responding to requests.',
|
||||
})
|
||||
ping(): PingResponse {
|
||||
return { message: 'pong' };
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,11 @@ import {
|
||||
Post,
|
||||
} from '@nestjs/common';
|
||||
import { ApiOperation, ApiSecurity, ApiTags } from '@nestjs/swagger';
|
||||
import { ChatIdApiParam } from '@waha/nestjs/params/ChatIdApiParam';
|
||||
import {
|
||||
SessionApiParam,
|
||||
SessionParam,
|
||||
} from '@waha/nestjs/params/SessionApiParam';
|
||||
|
||||
import { SessionManager } from '../core/abc/manager.abc';
|
||||
import { WhatsappSession } from '../core/abc/session.abc';
|
||||
@@ -15,11 +20,10 @@ import {
|
||||
WAHAChatPresences,
|
||||
WAHASessionPresence,
|
||||
} from '../structures/presence.dto';
|
||||
import { SessionApiParam, SessionParam } from './helpers';
|
||||
|
||||
@ApiSecurity('api_key')
|
||||
@Controller('api/:session/presence')
|
||||
@ApiTags('presence')
|
||||
@ApiTags('✅ Presence')
|
||||
export class PresenceController {
|
||||
constructor(private manager: SessionManager) {}
|
||||
|
||||
@@ -64,6 +68,7 @@ export class PresenceController {
|
||||
|
||||
@Get(':chatId')
|
||||
@SessionApiParam
|
||||
@ChatIdApiParam
|
||||
@ApiOperation({
|
||||
summary:
|
||||
"Get the presence for the chat id. If it hasn't been subscribed - it also subscribes to it.",
|
||||
@@ -77,6 +82,7 @@ export class PresenceController {
|
||||
|
||||
@Post(':chatId/subscribe')
|
||||
@SessionApiParam
|
||||
@ChatIdApiParam
|
||||
@ApiOperation({
|
||||
summary: 'Subscribe to presence events for the chat.',
|
||||
})
|
||||
|
||||
@@ -7,16 +7,16 @@ import {
|
||||
UseInterceptors,
|
||||
} from '@nestjs/common';
|
||||
import { ApiSecurity, ApiTags } from '@nestjs/swagger';
|
||||
import { ApiFileAcceptHeader } from '@waha/nestjs/ApiFileAcceptHeader';
|
||||
import { Response } from 'express';
|
||||
|
||||
import { SessionManager } from '../core/abc/manager.abc';
|
||||
import { BufferResponseInterceptor } from '../nestjs/BufferResponseInterceptor';
|
||||
import { SessionQuery } from '../structures/base.dto';
|
||||
import { BufferResponseInterceptor } from './BufferResponseInterceptor';
|
||||
import { ApiFileAcceptHeader } from './helpers';
|
||||
|
||||
@ApiSecurity('api_key')
|
||||
@Controller('api')
|
||||
@ApiTags('screenshot')
|
||||
@ApiTags('🖼️ Screenshot')
|
||||
export class ScreenshotController {
|
||||
constructor(private manager: SessionManager) {}
|
||||
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
import * as process from 'node:process';
|
||||
|
||||
import {
|
||||
Body,
|
||||
Controller,
|
||||
Get,
|
||||
Logger,
|
||||
Post,
|
||||
Query,
|
||||
UsePipes,
|
||||
} from '@nestjs/common';
|
||||
import { ApiOperation, ApiSecurity, ApiTags } from '@nestjs/swagger';
|
||||
import { getApp } from '@waha/main';
|
||||
import { WAHAValidationPipe } from '@waha/nestjs/pipes/WAHAValidationPipe';
|
||||
import { WAHAEnvironment } from '@waha/structures/environment.dto';
|
||||
import {
|
||||
EnvironmentQuery,
|
||||
ServerStatusResponse,
|
||||
StopRequest,
|
||||
} from '@waha/structures/server.dto';
|
||||
import { VERSION } from '@waha/version';
|
||||
import * as lodash from 'lodash';
|
||||
|
||||
@ApiSecurity('api_key')
|
||||
@Controller('api/server')
|
||||
@ApiTags('🔍 Observability')
|
||||
export class ServerController {
|
||||
private logger: Logger;
|
||||
|
||||
constructor() {
|
||||
this.logger = new Logger('ServerController');
|
||||
}
|
||||
|
||||
@Get('version')
|
||||
@ApiOperation({ summary: 'Get the version of the server' })
|
||||
get(): WAHAEnvironment {
|
||||
return VERSION;
|
||||
}
|
||||
|
||||
@Get('environment')
|
||||
@ApiOperation({ summary: 'Get the server environment' })
|
||||
environment(
|
||||
@Query(new WAHAValidationPipe()) query: EnvironmentQuery,
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
): object {
|
||||
let result = process.env;
|
||||
if (!query.all) {
|
||||
result = lodash.pickBy(result, (value, key) => {
|
||||
return (
|
||||
key.startsWith('WAHA_') ||
|
||||
key.startsWith('WHATSAPP_') ||
|
||||
key === 'DEBUG'
|
||||
);
|
||||
});
|
||||
}
|
||||
const map = new Map<string, string>();
|
||||
// sort and set
|
||||
Object.keys(result)
|
||||
.sort()
|
||||
.forEach((key) => {
|
||||
map.set(key, result[key]);
|
||||
});
|
||||
return Object.fromEntries(map);
|
||||
}
|
||||
|
||||
@Get('status')
|
||||
@ApiOperation({ summary: 'Get the server status' })
|
||||
async status(): Promise<ServerStatusResponse> {
|
||||
const now = Date.now();
|
||||
const uptime = Math.floor(process.uptime() * 1000);
|
||||
const startTimestamp = now - uptime;
|
||||
return {
|
||||
startTimestamp: startTimestamp,
|
||||
uptime: uptime,
|
||||
};
|
||||
}
|
||||
|
||||
@Post('stop')
|
||||
@ApiOperation({
|
||||
summary: 'Stop (and restart) the server',
|
||||
description:
|
||||
"If you're using docker, after calling this endpoint Docker will start a new container, " +
|
||||
'so you can use this endpoint to restart the server',
|
||||
})
|
||||
@UsePipes(new WAHAValidationPipe())
|
||||
async stop(@Body() request: StopRequest) {
|
||||
const timeout = 1_000;
|
||||
if (request.force) {
|
||||
this.logger.log(`Force stopping the server in ${timeout}ms`);
|
||||
setTimeout(() => {
|
||||
this.logger.log('Force stopping the server');
|
||||
process.kill(process.pid, 'SIGKILL');
|
||||
}, timeout);
|
||||
} else {
|
||||
this.logger.log(`Gracefully stopping the server in ${timeout}ms`);
|
||||
setTimeout(async () => {
|
||||
this.logger.log('Gracefully closing the application...');
|
||||
const app = getApp();
|
||||
if (app) {
|
||||
await app.close();
|
||||
}
|
||||
this.logger.log('Application closed');
|
||||
process.exit(0);
|
||||
}, timeout);
|
||||
}
|
||||
}
|
||||
}
|
||||
+256
-48
@@ -6,69 +6,66 @@ import {
|
||||
NotFoundException,
|
||||
Param,
|
||||
Post,
|
||||
Put,
|
||||
Query,
|
||||
UsePipes,
|
||||
} from '@nestjs/common';
|
||||
import { UnprocessableEntityException } from '@nestjs/common/exceptions/unprocessable-entity.exception';
|
||||
import { ApiOperation, ApiSecurity, ApiTags } from '@nestjs/swagger';
|
||||
import {
|
||||
ApiExtraModels,
|
||||
ApiOperation,
|
||||
ApiSecurity,
|
||||
ApiTags,
|
||||
} from '@nestjs/swagger';
|
||||
SessionApiParam,
|
||||
SessionParam,
|
||||
} from '@waha/nestjs/params/SessionApiParam';
|
||||
import { WAHAValidationPipe } from '@waha/nestjs/pipes/WAHAValidationPipe';
|
||||
import { WAHASessionStatus } from '@waha/structures/enums.dto';
|
||||
import {
|
||||
SessionLogoutDeprecatedRequest,
|
||||
SessionStartDeprecatedRequest,
|
||||
SessionStopDeprecatedRequest,
|
||||
} from '@waha/structures/sessions.deprecated.dto';
|
||||
import { generatePrefixedId } from '@waha/utils/ids';
|
||||
import { sleep } from '@waha/utils/promiseTimeout';
|
||||
|
||||
import { SessionManager } from '../core/abc/manager.abc';
|
||||
import { WhatsappSession } from '../core/abc/session.abc';
|
||||
import { parseBool } from '../helpers';
|
||||
import {
|
||||
ListSessionsQuery,
|
||||
MeInfo,
|
||||
SessionCreateRequest,
|
||||
SessionDTO,
|
||||
SessionInfo,
|
||||
SessionLogoutRequest,
|
||||
SessionStartRequest,
|
||||
SessionStopRequest,
|
||||
SessionUpdateRequest,
|
||||
} from '../structures/sessions.dto';
|
||||
import { SessionApiParam, SessionParam } from './helpers';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const AsyncLock = require('async-lock');
|
||||
|
||||
@ApiSecurity('api_key')
|
||||
@Controller('api/sessions')
|
||||
@ApiTags('sessions')
|
||||
@ApiTags('🖥️ Sessions')
|
||||
class SessionsController {
|
||||
constructor(private manager: SessionManager) {}
|
||||
private lock: any;
|
||||
|
||||
@Post('/start/')
|
||||
async start(@Body() request: SessionStartRequest): Promise<SessionDTO> {
|
||||
const result = await this.manager.start(request);
|
||||
await this.manager.sessionConfigRepository.save(
|
||||
request.name,
|
||||
request.config || null,
|
||||
);
|
||||
return result;
|
||||
constructor(private manager: SessionManager) {
|
||||
this.lock = new AsyncLock({ maxPending: Infinity });
|
||||
}
|
||||
|
||||
@Post('/stop/')
|
||||
@ApiOperation({ summary: 'Stop session' })
|
||||
async stop(@Body() request: SessionStopRequest): Promise<void> {
|
||||
if (request.logout) {
|
||||
await this.manager.logout(request);
|
||||
} else {
|
||||
await this.manager.stop(request);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@Post('/logout/')
|
||||
@ApiOperation({ summary: 'Logout from session.' })
|
||||
clean(@Body() request: SessionLogoutRequest): Promise<void> {
|
||||
return this.manager.logout(request);
|
||||
private withLock(name: string, fn: () => any) {
|
||||
return this.lock.acquire(name, fn);
|
||||
}
|
||||
|
||||
@Get('/')
|
||||
async list(@Query() query: ListSessionsQuery): Promise<SessionInfo[]> {
|
||||
const all = parseBool(query.all);
|
||||
return this.manager.getSessions(all);
|
||||
@ApiOperation({ summary: 'List all sessions' })
|
||||
list(
|
||||
@Query(new WAHAValidationPipe()) query: ListSessionsQuery,
|
||||
): Promise<SessionInfo[]> {
|
||||
return this.manager.getSessions(query.all);
|
||||
}
|
||||
|
||||
@Get('/:session')
|
||||
@ApiOperation({ summary: 'Get session information' })
|
||||
@SessionApiParam
|
||||
@UsePipes(new WAHAValidationPipe())
|
||||
async get(@Param('session') name: string): Promise<SessionInfo> {
|
||||
const session = this.manager.getSessionInfo(name);
|
||||
if (session === null) {
|
||||
@@ -76,20 +73,231 @@ class SessionsController {
|
||||
}
|
||||
return session;
|
||||
}
|
||||
}
|
||||
|
||||
@ApiSecurity('api_key')
|
||||
@Controller('api/sessions/:session')
|
||||
@ApiTags('sessions')
|
||||
class SessionController {
|
||||
constructor(private manager: SessionManager) {}
|
||||
|
||||
@Get('me')
|
||||
@Get(':session/me')
|
||||
@SessionApiParam
|
||||
@ApiOperation({ summary: 'Get information about the authenticated account' })
|
||||
getMe(@SessionParam session: WhatsappSession): Promise<MeInfo | null> {
|
||||
getMe(@SessionParam session: WhatsappSession): MeInfo | null {
|
||||
return session.getSessionMeInfo();
|
||||
}
|
||||
|
||||
@Post('')
|
||||
@ApiOperation({
|
||||
summary: 'Create a session',
|
||||
description:
|
||||
'Create session a new session (and start it at the same time if required).',
|
||||
})
|
||||
@UsePipes(new WAHAValidationPipe())
|
||||
async create(@Body() request: SessionCreateRequest): Promise<SessionDTO> {
|
||||
const name = request.name || generatePrefixedId('session');
|
||||
await this.withLock(name, async () => {
|
||||
if (await this.manager.exists(name)) {
|
||||
const msg = `Session '${name}' already exists. Use PUT to update it.`;
|
||||
throw new UnprocessableEntityException(msg);
|
||||
}
|
||||
|
||||
const config = request.config;
|
||||
const start = request.start || false;
|
||||
await this.manager.upsert(name, config);
|
||||
if (start) {
|
||||
await this.manager.start(name);
|
||||
}
|
||||
});
|
||||
return await this.manager.getSessionInfo(name);
|
||||
}
|
||||
|
||||
@Put(':session')
|
||||
@ApiOperation({
|
||||
summary: 'Update a session',
|
||||
description: '',
|
||||
})
|
||||
@SessionApiParam
|
||||
@UsePipes(new WAHAValidationPipe())
|
||||
async update(
|
||||
@Param('session') name: string,
|
||||
@Body() request: SessionUpdateRequest,
|
||||
): Promise<SessionDTO> {
|
||||
await this.withLock(name, async () => {
|
||||
if (!(await this.manager.exists(name))) {
|
||||
throw new NotFoundException('Session not found');
|
||||
}
|
||||
const config = request.config;
|
||||
const isRunning = this.manager.isRunning(name);
|
||||
await this.manager.stop(name, true);
|
||||
await this.manager.upsert(name, config);
|
||||
if (isRunning) {
|
||||
await this.manager.start(name);
|
||||
}
|
||||
});
|
||||
return await this.manager.getSessionInfo(name);
|
||||
}
|
||||
|
||||
@Delete(':session')
|
||||
@SessionApiParam
|
||||
@ApiOperation({
|
||||
summary: 'Delete the session',
|
||||
description:
|
||||
'Delete the session with the given name. Stop and logout as well. Idempotent operation.',
|
||||
})
|
||||
@UsePipes(new WAHAValidationPipe())
|
||||
async delete(@Param('session') name: string): Promise<void> {
|
||||
await this.withLock(name, async () => {
|
||||
await this.manager.stop(name, true);
|
||||
await this.manager.logout(name);
|
||||
await this.manager.delete(name);
|
||||
});
|
||||
}
|
||||
|
||||
@Post(':session/start')
|
||||
@SessionApiParam
|
||||
@ApiOperation({
|
||||
summary: 'Start the session',
|
||||
description:
|
||||
'Start the session with the given name. The session must exist. Identity operation.',
|
||||
})
|
||||
@UsePipes(new WAHAValidationPipe())
|
||||
async start(@Param('session') name: string): Promise<SessionDTO> {
|
||||
await this.withLock(name, async () => {
|
||||
const exists = await this.manager.exists(name);
|
||||
if (!exists) {
|
||||
throw new NotFoundException('Session not found');
|
||||
}
|
||||
const isRunning = this.manager.isRunning(name);
|
||||
if (!isRunning) {
|
||||
await this.manager.start(name);
|
||||
}
|
||||
});
|
||||
return await this.manager.getSessionInfo(name);
|
||||
}
|
||||
|
||||
@Post(':session/stop')
|
||||
@SessionApiParam
|
||||
@ApiOperation({
|
||||
summary: 'Stop the session',
|
||||
description: 'Stop the session with the given name. Idempotent operation.',
|
||||
})
|
||||
@UsePipes(new WAHAValidationPipe())
|
||||
async stop(@Param('session') name: string): Promise<SessionDTO> {
|
||||
await this.withLock(name, async () => {
|
||||
const exists = await this.manager.exists(name);
|
||||
if (!exists) {
|
||||
throw new NotFoundException('Session not found');
|
||||
}
|
||||
await this.manager.stop(name, false);
|
||||
});
|
||||
return await this.manager.getSessionInfo(name);
|
||||
}
|
||||
|
||||
@Post(':session/logout')
|
||||
@SessionApiParam
|
||||
@ApiOperation({
|
||||
summary: 'Logout from the session',
|
||||
description: 'Logout the session, restart a session if it was not STOPPED',
|
||||
})
|
||||
@UsePipes(new WAHAValidationPipe())
|
||||
async logout(@Param('session') name: string): Promise<SessionDTO> {
|
||||
await this.withLock(name, async () => {
|
||||
const exists = await this.manager.exists(name);
|
||||
if (!exists) {
|
||||
throw new NotFoundException('Session not found');
|
||||
}
|
||||
const isRunning = this.manager.isRunning(name);
|
||||
await this.manager.stop(name, true);
|
||||
await this.manager.logout(name);
|
||||
if (isRunning) {
|
||||
await this.manager.start(name);
|
||||
}
|
||||
});
|
||||
return await this.manager.getSessionInfo(name);
|
||||
}
|
||||
|
||||
@Post(':session/restart')
|
||||
@SessionApiParam
|
||||
@ApiOperation({
|
||||
summary: 'Restart the session',
|
||||
description: 'Restart the session with the given name.',
|
||||
})
|
||||
@UsePipes(new WAHAValidationPipe())
|
||||
async restart(@Param('session') name: string): Promise<SessionDTO> {
|
||||
await this.withLock(name, async () => {
|
||||
const exists = await this.manager.exists(name);
|
||||
if (!exists) {
|
||||
throw new NotFoundException('Session not found');
|
||||
}
|
||||
await this.manager.stop(name, true);
|
||||
await this.manager.start(name);
|
||||
});
|
||||
|
||||
return await this.manager.getSessionInfo(name);
|
||||
}
|
||||
|
||||
@Post('/start/')
|
||||
@ApiOperation({
|
||||
summary: 'Upsert and Start session',
|
||||
description:
|
||||
'Create session (if not exists) or update a config (if exists) and start it.',
|
||||
deprecated: true,
|
||||
})
|
||||
async DEPRACATED_start(
|
||||
@Body() request: SessionStartDeprecatedRequest,
|
||||
): Promise<SessionDTO> {
|
||||
const name = request.name;
|
||||
if (this.manager.isRunning(name)) {
|
||||
const msg = `Session '${name}' is already started.`;
|
||||
throw new UnprocessableEntityException(msg);
|
||||
}
|
||||
|
||||
return await this.withLock(name, async () => {
|
||||
const config = request.config;
|
||||
if (config) {
|
||||
await this.manager.upsert(name, config);
|
||||
}
|
||||
return await this.manager.start(name);
|
||||
});
|
||||
}
|
||||
|
||||
@Post('/stop/')
|
||||
@ApiOperation({
|
||||
summary: 'Stop (and Logout if asked) session',
|
||||
description: 'Stop session and Logout by default.',
|
||||
deprecated: true,
|
||||
})
|
||||
async DEPRECATED_stop(
|
||||
@Body() request: SessionStopDeprecatedRequest,
|
||||
): Promise<void> {
|
||||
const name = request.name;
|
||||
if (request.logout) {
|
||||
// Old API did remove the session complete
|
||||
await this.withLock(name, async () => {
|
||||
await this.manager.stop(name, true);
|
||||
await this.manager.logout(name);
|
||||
await this.manager.delete(name);
|
||||
});
|
||||
} else {
|
||||
await this.withLock(name, async () => {
|
||||
await this.manager.stop(name, false);
|
||||
});
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@Post('/logout/')
|
||||
@ApiOperation({
|
||||
summary: 'Logout and Delete session.',
|
||||
description: 'Stop, Logout and Delete session.',
|
||||
deprecated: true,
|
||||
})
|
||||
async DEPRECATED_logout(
|
||||
@Body() request: SessionLogoutDeprecatedRequest,
|
||||
): Promise<void> {
|
||||
const name = request.name;
|
||||
await this.withLock(name, async () => {
|
||||
await this.manager.stop(name, true);
|
||||
await this.manager.logout(name);
|
||||
await this.manager.delete(name);
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
export { SessionController, SessionsController };
|
||||
export { SessionsController };
|
||||
@@ -1,33 +1,29 @@
|
||||
import {
|
||||
Body,
|
||||
Controller,
|
||||
Delete,
|
||||
Get,
|
||||
Param,
|
||||
Post,
|
||||
Query,
|
||||
} from '@nestjs/common';
|
||||
import { Body, Controller, Post } from '@nestjs/common';
|
||||
import { ApiOperation, ApiSecurity, ApiTags } from '@nestjs/swagger';
|
||||
import {
|
||||
SessionApiParam,
|
||||
SessionParam,
|
||||
} from '@waha/nestjs/params/SessionApiParam';
|
||||
|
||||
import { SessionManager } from '../core/abc/manager.abc';
|
||||
import { WhatsappSession } from '../core/abc/session.abc';
|
||||
import {
|
||||
DeleteStatusRequest,
|
||||
ImageStatus,
|
||||
TextStatus,
|
||||
VideoStatus,
|
||||
VoiceStatus,
|
||||
} from '../structures/status.dto';
|
||||
import { SessionApiParam, SessionParam } from './helpers';
|
||||
|
||||
@ApiSecurity('api_key')
|
||||
@Controller('api/:session/status')
|
||||
@ApiTags('status')
|
||||
@ApiTags('🟢 Status')
|
||||
class StatusController {
|
||||
constructor(private manager: SessionManager) {}
|
||||
|
||||
@Post('text')
|
||||
@SessionApiParam
|
||||
@ApiOperation({ summary: 'Send text status.' })
|
||||
@ApiOperation({ summary: 'Send text status' })
|
||||
sendTextStatus(
|
||||
@SessionParam session: WhatsappSession,
|
||||
@Body() status: TextStatus,
|
||||
@@ -37,7 +33,7 @@ class StatusController {
|
||||
|
||||
@Post('image')
|
||||
@SessionApiParam
|
||||
@ApiOperation({ summary: 'Send image status.' })
|
||||
@ApiOperation({ summary: 'Send image status' })
|
||||
sendImageStatus(
|
||||
@SessionParam session: WhatsappSession,
|
||||
@Body() status: ImageStatus,
|
||||
@@ -47,7 +43,7 @@ class StatusController {
|
||||
|
||||
@Post('voice')
|
||||
@SessionApiParam
|
||||
@ApiOperation({ summary: 'Send voice status.' })
|
||||
@ApiOperation({ summary: 'Send voice status' })
|
||||
sendVoiceStatus(
|
||||
@SessionParam session: WhatsappSession,
|
||||
@Body() status: VoiceStatus,
|
||||
@@ -57,13 +53,23 @@ class StatusController {
|
||||
|
||||
@Post('video')
|
||||
@SessionApiParam
|
||||
@ApiOperation({ summary: 'Send video status.' })
|
||||
@ApiOperation({ summary: 'Send video status' })
|
||||
sendVideoStatus(
|
||||
@SessionParam session: WhatsappSession,
|
||||
@Body() status: VideoStatus,
|
||||
) {
|
||||
return session.sendVideoStatus(status);
|
||||
}
|
||||
|
||||
@Post('delete')
|
||||
@SessionApiParam
|
||||
@ApiOperation({ summary: 'DELETE sent status' })
|
||||
deleteStatus(
|
||||
@SessionParam session: WhatsappSession,
|
||||
@Body() status: DeleteStatusRequest,
|
||||
) {
|
||||
return session.deleteStatus(status);
|
||||
}
|
||||
}
|
||||
|
||||
export { StatusController };
|
||||
@@ -1,14 +1,24 @@
|
||||
import { Controller, Get } from '@nestjs/common';
|
||||
import { ApiExtraModels, ApiSecurity, ApiTags } from '@nestjs/swagger';
|
||||
import {
|
||||
ApiExtraModels,
|
||||
ApiOperation,
|
||||
ApiSecurity,
|
||||
ApiTags,
|
||||
} from '@nestjs/swagger';
|
||||
|
||||
import { WAHAEnvironment } from '../structures/environment.dto';
|
||||
import { VERSION } from '../version';
|
||||
|
||||
@ApiSecurity('api_key')
|
||||
@Controller('api/version')
|
||||
@ApiTags('other')
|
||||
@ApiTags('🔍 Observability')
|
||||
export class VersionController {
|
||||
@Get('')
|
||||
@ApiOperation({
|
||||
summary: 'Get the server version ',
|
||||
deprecated: true,
|
||||
description: "Use 'GET /api/server/version' instead ",
|
||||
})
|
||||
get(): WAHAEnvironment {
|
||||
return VERSION;
|
||||
}
|
||||
|
||||
+17
-21
@@ -1,20 +1,16 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { ConfigService } from '@nestjs/config';
|
||||
import { WAHAEvents } from '@waha/structures/enums.dto';
|
||||
|
||||
import { parseBool } from './helpers';
|
||||
import { WAHAEngine } from './structures/enums.dto';
|
||||
import { WebhookConfig } from './structures/webhooks.config.dto';
|
||||
import { getEngineName } from './version';
|
||||
|
||||
@Injectable()
|
||||
export class WhatsappConfigService {
|
||||
public filesUri = '/api/files';
|
||||
public schema = 'http';
|
||||
|
||||
constructor(private configService: ConfigService) {}
|
||||
|
||||
get filesURL(): string {
|
||||
return `${this.schema}://${this.hostname}:${this.port}${this.filesUri}/`;
|
||||
get schema() {
|
||||
return this.configService.get('WHATSAPP_API_SCHEMA', 'http');
|
||||
}
|
||||
|
||||
get hostname(): string {
|
||||
@@ -25,17 +21,6 @@ export class WhatsappConfigService {
|
||||
return this.configService.get('WHATSAPP_API_PORT', '3000');
|
||||
}
|
||||
|
||||
get filesFolder(): string {
|
||||
return this.configService.get(
|
||||
'WHATSAPP_FILES_FOLDER',
|
||||
'/tmp/whatsapp-files',
|
||||
);
|
||||
}
|
||||
|
||||
get filesLifetime(): number {
|
||||
return this.configService.get<number>('WHATSAPP_FILES_LIFETIME', 180);
|
||||
}
|
||||
|
||||
get mimetypes(): string[] {
|
||||
if (!this.shouldDownloadMedia) {
|
||||
return ['mimetype/ignore-all-media'];
|
||||
@@ -66,8 +51,11 @@ export class WhatsappConfigService {
|
||||
}
|
||||
|
||||
get proxyServer(): string[] | string | undefined {
|
||||
const single = this.configService.get('WHATSAPP_PROXY_SERVER', undefined);
|
||||
const multipleValues = this.configService.get(
|
||||
const single = this.configService.get<string>(
|
||||
'WHATSAPP_PROXY_SERVER',
|
||||
undefined,
|
||||
);
|
||||
const multipleValues = this.configService.get<string>(
|
||||
'WHATSAPP_PROXY_SERVER_LIST',
|
||||
undefined,
|
||||
);
|
||||
@@ -103,7 +91,7 @@ export class WhatsappConfigService {
|
||||
return this.get('WHATSAPP_HOOK_URL');
|
||||
}
|
||||
|
||||
private getWebhookEvents(): string[] {
|
||||
private getWebhookEvents(): WAHAEvents[] {
|
||||
const value = this.get('WHATSAPP_HOOK_EVENTS', '');
|
||||
return value ? value.split(',') : [];
|
||||
}
|
||||
@@ -120,6 +108,14 @@ export class WhatsappConfigService {
|
||||
return this.configService.get('WHATSAPP_API_KEY', '');
|
||||
}
|
||||
|
||||
getExcludedPaths(): string[] {
|
||||
const value = this.configService.get('WHATSAPP_API_KEY_EXCLUDE_PATH', '');
|
||||
if (!value) {
|
||||
return [];
|
||||
}
|
||||
return value.split(',');
|
||||
}
|
||||
|
||||
getHealthMediaFilesThreshold(): number {
|
||||
return this.configService.get<number>(
|
||||
'WHATSAPP_HEALTH_MEDIA_FILES_THRESHOLD_MB',
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
import { INestApplication } from '@nestjs/common';
|
||||
import { DocumentBuilder, OpenAPIObject, SwaggerModule } from '@nestjs/swagger';
|
||||
import { DECORATORS } from '@nestjs/swagger/dist/constants';
|
||||
import { Logger } from 'nestjs-pino';
|
||||
|
||||
import { WhatsappConfigService } from '../config.service';
|
||||
import { VERSION } from '../version';
|
||||
import { SwaggerConfigServiceCore } from './config/SwaggerConfigServiceCore';
|
||||
|
||||
export class SwaggerConfiguratorCore {
|
||||
constructor(protected app: INestApplication) {}
|
||||
protected logger: any;
|
||||
|
||||
constructor(protected app: INestApplication) {
|
||||
this.logger = app.get(Logger);
|
||||
}
|
||||
|
||||
get title() {
|
||||
return 'WAHA - WhatsApp HTTP API';
|
||||
@@ -24,8 +29,8 @@ export class SwaggerConfiguratorCore {
|
||||
'<li><a href="https://github.com/devlikeapro/waha" target="_blank">GitHub - WAHA Core</a></li>' +
|
||||
'<li><a href="https://github.com/devlikeapro/waha-plu' + // Separate line to pass pre-commit check
|
||||
's" target="_blank">GitHub - WAHA Plus</a></li>' +
|
||||
'<li><b>NEW!</b> - <a href="/dashboard">WAHA Dashboard</a></li>' +
|
||||
'<li><b>NEW!</b> - <a href="https://waha.devlike.pro/docs/how-to/waha-dashboard">WAHA Dashboard Documentation</a></li>' +
|
||||
'<li><a href="/dashboard">WAHA Dashboard</a></li>' +
|
||||
'<li><a href="https://waha.devlike.pro/docs/how-to/waha-dashboard">WAHA Dashboard Documentation</a></li>' +
|
||||
'</ul>' +
|
||||
'<p>Support the project and get WAHA Plus version!</p>' +
|
||||
'<ul>' +
|
||||
@@ -51,24 +56,30 @@ export class SwaggerConfiguratorCore {
|
||||
.setDescription(this.description)
|
||||
.setExternalDoc(this.title, this.externalDocUrl)
|
||||
.setVersion(VERSION.version)
|
||||
.addTag('sessions', 'Control WhatsApp sessions')
|
||||
.addTag('auth', 'Authentication')
|
||||
.addTag('screenshot', 'Get screenshot of WhatsApp and show QR code')
|
||||
.addTag('chatting', 'Chatting methods')
|
||||
.addTag('🖥️ Sessions', 'Control WhatsApp sessions (accounts)')
|
||||
.addTag('🔑 Auth', 'Authentication')
|
||||
.addTag('🖼️ Screenshot', 'Get screenshot of WhatsApp and show QR code')
|
||||
.addTag('📤 Chatting', 'Chatting methods')
|
||||
.addTag('📢 Channels', 'Channels (newsletters) methods')
|
||||
.addTag(
|
||||
'status',
|
||||
'🟢 Status',
|
||||
'Status (aka stories) methods. <b>NOWEB</b> engine only!',
|
||||
)
|
||||
.addTag('chats', `Chats methods`)
|
||||
.addTag('💬 Chats', `Chats methods`)
|
||||
.addTag(
|
||||
'contacts',
|
||||
'👤 Contacts',
|
||||
`Contacts methods.<br>
|
||||
Use phone number (without +) or phone number and \`@c.us\` at the end as \`contactId\`.<br>
|
||||
'E.g: \`12312312310\` OR \`12312312310@c.us\`<br>`,
|
||||
)
|
||||
.addTag('groups', `Groups methods.<br>`)
|
||||
.addTag('presence', `Presence information`)
|
||||
.addTag('other', 'Other methods')
|
||||
.addTag('👥 Groups', `Groups methods.<br>`)
|
||||
.addTag('✅ Presence', `Presence information`)
|
||||
.addTag(
|
||||
'🏷️ Labels',
|
||||
'Labels - available only for WhatsApp Business accounts',
|
||||
)
|
||||
.addTag('🔍 Observability', 'Other methods')
|
||||
.addTag('🗄️ Storage', 'Storage methods')
|
||||
.addApiKey({
|
||||
type: 'apiKey',
|
||||
description: 'Your secret api key',
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
export abstract class DataStore {}
|
||||
export abstract class DataStore {
|
||||
abstract init(sessionName?: string): Promise<void>;
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ConsoleLogger, Injectable } from '@nestjs/common';
|
||||
import { DiskHealthIndicator, HealthCheckService } from '@nestjs/terminus';
|
||||
import { Injectable, Logger, LoggerService } from '@nestjs/common';
|
||||
import { HealthCheckService } from '@nestjs/terminus';
|
||||
import type { HealthCheckResult } from '@nestjs/terminus/dist/health-check/health-check-result.interface';
|
||||
|
||||
import { WhatsappConfigService } from '../../config.service';
|
||||
@@ -7,12 +7,14 @@ import { SessionManager } from './manager.abc';
|
||||
|
||||
@Injectable()
|
||||
export abstract class WAHAHealthCheckService {
|
||||
protected logger: LoggerService;
|
||||
constructor(
|
||||
protected sessionManager: SessionManager,
|
||||
protected health: HealthCheckService,
|
||||
protected log: ConsoleLogger,
|
||||
protected config: WhatsappConfigService,
|
||||
) {}
|
||||
) {
|
||||
this.logger = new Logger('WAHAHealthCheckService');
|
||||
}
|
||||
|
||||
abstract check(): Promise<HealthCheckResult>;
|
||||
}
|
||||
+39
-10
@@ -1,22 +1,24 @@
|
||||
import { OnApplicationShutdown } from '@nestjs/common';
|
||||
import { BeforeApplicationShutdown } from '@nestjs/common';
|
||||
import { WAHAWebhook } from '@waha/structures/webhooks.dto';
|
||||
import { VERSION } from '@waha/version';
|
||||
import { EventEmitter } from 'events';
|
||||
|
||||
import { WAHAEngine } from '../../structures/enums.dto';
|
||||
import { WAHAEngine, WAHAEvents } from '../../structures/enums.dto';
|
||||
import {
|
||||
SessionConfig,
|
||||
SessionDTO,
|
||||
SessionInfo,
|
||||
SessionLogoutRequest,
|
||||
SessionStartRequest,
|
||||
SessionStopRequest,
|
||||
} from '../../structures/sessions.dto';
|
||||
import { ISessionAuthRepository } from '../storage/ISessionAuthRepository';
|
||||
import { ISessionConfigRepository } from '../storage/ISessionConfigRepository';
|
||||
import { WhatsappSession } from './session.abc';
|
||||
import { WebhookConductor } from './webhooks.abc';
|
||||
|
||||
export abstract class SessionManager implements OnApplicationShutdown {
|
||||
export abstract class SessionManager implements BeforeApplicationShutdown {
|
||||
public store: any;
|
||||
public sessionAuthRepository: ISessionAuthRepository;
|
||||
public sessionConfigRepository: ISessionConfigRepository;
|
||||
public events: EventEmitter;
|
||||
|
||||
protected abstract getEngine(engine: WAHAEngine): typeof WhatsappSession;
|
||||
|
||||
@@ -24,20 +26,47 @@ export abstract class SessionManager implements OnApplicationShutdown {
|
||||
|
||||
protected abstract get WebhookConductorClass(): typeof WebhookConductor;
|
||||
|
||||
abstract onApplicationShutdown(signal?: string);
|
||||
abstract beforeApplicationShutdown(signal?: string);
|
||||
|
||||
//
|
||||
// API Methods
|
||||
//
|
||||
abstract start(request: SessionStartRequest): Promise<SessionDTO>;
|
||||
/**
|
||||
* Either create or update
|
||||
*/
|
||||
abstract exists(name: string): Promise<boolean>;
|
||||
|
||||
abstract stop(request: SessionStopRequest): Promise<void>;
|
||||
abstract isRunning(name: string): boolean;
|
||||
|
||||
abstract logout(request: SessionLogoutRequest): Promise<void>;
|
||||
abstract upsert(name: string, config?: SessionConfig): Promise<void>;
|
||||
|
||||
abstract delete(name: string): Promise<void>;
|
||||
|
||||
abstract start(name: string): Promise<SessionDTO>;
|
||||
|
||||
abstract stop(name: string, silent: boolean): Promise<void>;
|
||||
|
||||
abstract logout(name: string): Promise<void>;
|
||||
|
||||
abstract getSession(name: string): WhatsappSession;
|
||||
|
||||
abstract getSessionInfo(name: string): Promise<SessionInfo | null>;
|
||||
|
||||
abstract getSessions(all: boolean): Promise<SessionInfo[]>;
|
||||
|
||||
handleSessionEvent(event: WAHAEvents, session: WhatsappSession) {
|
||||
return (payload: any) => {
|
||||
const me = session.getSessionMeInfo();
|
||||
const data: WAHAWebhook = {
|
||||
event: event,
|
||||
session: session.name,
|
||||
metadata: session.sessionConfig?.metadata,
|
||||
me: me,
|
||||
payload: payload,
|
||||
engine: session.engine,
|
||||
environment: VERSION,
|
||||
};
|
||||
this.events.emit(event, data);
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
abstract class MediaStorage {
|
||||
abstract save(
|
||||
messageId: string,
|
||||
mimetype: string,
|
||||
buffer: Buffer,
|
||||
): Promise<string>;
|
||||
}
|
||||
|
||||
interface IEngineMediaProcessor<Message> {
|
||||
hasMedia(message: Message): boolean;
|
||||
|
||||
getFilename(message: Message): string | null;
|
||||
|
||||
getMimetype(message: Message): string;
|
||||
|
||||
getMessageId(message: Message): string;
|
||||
|
||||
getMediaBuffer(message: Message): Promise<Buffer | null>;
|
||||
}
|
||||
|
||||
interface MediaManager {
|
||||
processMedia<Message>(
|
||||
processor: IEngineMediaProcessor<Message>,
|
||||
message: Message,
|
||||
): Promise<Message>;
|
||||
}
|
||||
|
||||
export { IEngineMediaProcessor, MediaManager, MediaStorage };
|
||||
+137
-35
@@ -1,7 +1,14 @@
|
||||
import { ConsoleLogger } from '@nestjs/common';
|
||||
import {
|
||||
Channel,
|
||||
CreateChannelRequest,
|
||||
ListChannelsQuery,
|
||||
} from '@waha/structures/channels.dto';
|
||||
import { GetChatsQuery } from '@waha/structures/chats.dto';
|
||||
import { Label, LabelID } from '@waha/structures/labels.dto';
|
||||
import { LoggerBuilder } from '@waha/utils/logging';
|
||||
import { EventEmitter } from 'events';
|
||||
import * as fs from 'fs';
|
||||
import { Logger } from 'pino';
|
||||
import { MessageId } from 'whatsapp-web.js';
|
||||
|
||||
import {
|
||||
@@ -41,6 +48,7 @@ import {
|
||||
SessionConfig,
|
||||
} from '../../structures/sessions.dto';
|
||||
import {
|
||||
DeleteStatusRequest,
|
||||
ImageStatus,
|
||||
TextStatus,
|
||||
VideoStatus,
|
||||
@@ -48,9 +56,9 @@ import {
|
||||
} from '../../structures/status.dto';
|
||||
import { WASessionStatusBody } from '../../structures/webhooks.dto';
|
||||
import { NotImplementedByEngineError } from '../exceptions';
|
||||
import { IMediaManager } from '../media/IMediaManager';
|
||||
import { QR } from '../QR';
|
||||
import { DataStore } from './DataStore';
|
||||
import { MediaManager } from './media.abc';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const qrcode = require('qrcode-terminal');
|
||||
@@ -75,14 +83,13 @@ export function ensureSuffix(phone) {
|
||||
|
||||
export enum WAHAInternalEvent {
|
||||
ENGINE_START = 'engine.start',
|
||||
SESSION_STATUS_CHANGED = 'session.status.changed',
|
||||
}
|
||||
|
||||
export interface SessionParams {
|
||||
name: string;
|
||||
printQR: boolean;
|
||||
mediaManager: MediaManager;
|
||||
log: ConsoleLogger;
|
||||
mediaManager: IMediaManager;
|
||||
loggerBuilder: LoggerBuilder;
|
||||
sessionStore: DataStore;
|
||||
proxyConfig?: ProxyConfig;
|
||||
sessionConfig?: SessionConfig;
|
||||
@@ -94,8 +101,9 @@ export abstract class WhatsappSession {
|
||||
public engine: WAHAEngine;
|
||||
|
||||
public name: string;
|
||||
protected mediaManager: MediaManager;
|
||||
protected log: ConsoleLogger;
|
||||
protected mediaManager: IMediaManager;
|
||||
public loggerBuilder: LoggerBuilder;
|
||||
protected logger: Logger;
|
||||
protected sessionStore: DataStore;
|
||||
protected proxyConfig?: ProxyConfig;
|
||||
public sessionConfig?: SessionConfig;
|
||||
@@ -107,7 +115,7 @@ export abstract class WhatsappSession {
|
||||
public constructor({
|
||||
name,
|
||||
printQR,
|
||||
log,
|
||||
loggerBuilder,
|
||||
sessionStore,
|
||||
proxyConfig,
|
||||
mediaManager,
|
||||
@@ -117,7 +125,8 @@ export abstract class WhatsappSession {
|
||||
this.events = new EventEmitter();
|
||||
this.name = name;
|
||||
this.proxyConfig = proxyConfig;
|
||||
this.log = log;
|
||||
this.loggerBuilder = loggerBuilder;
|
||||
this.logger = loggerBuilder.child({ name: 'WhatsappSession' });
|
||||
this.sessionStore = sessionStore;
|
||||
this.mediaManager = mediaManager;
|
||||
this.sessionConfig = sessionConfig;
|
||||
@@ -127,7 +136,8 @@ export abstract class WhatsappSession {
|
||||
|
||||
protected set status(value: WAHASessionStatus) {
|
||||
this._status = value;
|
||||
this.events.emit(WAHAInternalEvent.SESSION_STATUS_CHANGED, value);
|
||||
const body: WASessionStatusBody = { name: this.name, status: value };
|
||||
this.events.emit(WAHAEvents.SESSION_STATUS, body);
|
||||
}
|
||||
|
||||
public get status() {
|
||||
@@ -142,34 +152,48 @@ export abstract class WhatsappSession {
|
||||
// Run optimized version of Chrome
|
||||
// References:
|
||||
// https://github.com/pedroslopez/whatsapp-web.js/issues/1420
|
||||
// https://github.com/wppconnect-team/wppconnect/issues/1326
|
||||
// https://www.bannerbear.com/blog/ways-to-speed-up-puppeteer-screenshots/
|
||||
return [
|
||||
'--no-sandbox',
|
||||
'--aggressive-cache-discard',
|
||||
'--disable-accelerated-2d-canvas',
|
||||
'--disable-application-cache',
|
||||
'--disable-background-networking',
|
||||
'--disable-cache',
|
||||
'--disable-client-side-phishing-detection',
|
||||
'--disable-setuid-sandbox',
|
||||
'--disable-component-update',
|
||||
'--disable-default-apps',
|
||||
'--disable-popup-blocking',
|
||||
'--disable-offer-store-unmasked-wallet-cards',
|
||||
'--disable-speech-api',
|
||||
'--hide-scrollbars',
|
||||
'--mute-audio',
|
||||
'--disable-extensions',
|
||||
'--disable-dev-shm-usage',
|
||||
'--disable-accelerated-2d-canvas',
|
||||
'--no-first-run',
|
||||
'--no-default-browser-check',
|
||||
'--no-pings',
|
||||
'--password-store=basic',
|
||||
'--use-mock-keychain',
|
||||
'--no-zygote',
|
||||
'--single-process',
|
||||
'--disable-extensions',
|
||||
'--disable-gpu',
|
||||
'--disable-offer-store-unmasked-wallet-cards',
|
||||
'--disable-offline-load-stale-cache',
|
||||
'--disable-popup-blocking',
|
||||
'--disable-setuid-sandbox',
|
||||
'--disable-speech-api',
|
||||
'--disable-sync',
|
||||
'--disable-translate',
|
||||
'--disable-web-security',
|
||||
'--disk-cache-size=0',
|
||||
'--hide-scrollbars',
|
||||
'--ignore-certificate-errors',
|
||||
'--ignore-ssl-errors',
|
||||
'--metrics-recording-only',
|
||||
'--mute-audio',
|
||||
'--no-default-browser-check',
|
||||
'--no-first-run',
|
||||
'--no-pings',
|
||||
'--no-sandbox',
|
||||
'--no-zygote',
|
||||
'--password-store=basic',
|
||||
'--safebrowsing-disable-auto-update',
|
||||
'--single-process',
|
||||
'--use-mock-keychain',
|
||||
];
|
||||
}
|
||||
|
||||
protected isDebugEnabled() {
|
||||
return this.log.isLevelEnabled('debug');
|
||||
return this.logger.isLevelEnabled('debug');
|
||||
}
|
||||
|
||||
/** Start the session */
|
||||
@@ -185,10 +209,7 @@ export abstract class WhatsappSession {
|
||||
): boolean {
|
||||
switch (hook) {
|
||||
case WAHAEvents.SESSION_STATUS:
|
||||
this.events.on(WAHAInternalEvent.SESSION_STATUS_CHANGED, (value) => {
|
||||
const body: WASessionStatusBody = { name: this.name, status: value };
|
||||
handler(body);
|
||||
});
|
||||
this.events.on(WAHAEvents.SESSION_STATUS, handler);
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
@@ -222,8 +243,8 @@ export abstract class WhatsappSession {
|
||||
|
||||
abstract getScreenshot(): Promise<Buffer>;
|
||||
|
||||
public getSessionMeInfo(): Promise<MeInfo | null> {
|
||||
throw new NotImplementedByEngineError();
|
||||
public getSessionMeInfo(): MeInfo | null {
|
||||
return null;
|
||||
}
|
||||
|
||||
public getCaptcha(): Promise<QR> {
|
||||
@@ -318,6 +339,34 @@ export abstract class WhatsappSession {
|
||||
throw new NotImplementedByEngineError();
|
||||
}
|
||||
|
||||
public chatsArchiveChat(chatId: string): Promise<any> {
|
||||
throw new NotImplementedByEngineError();
|
||||
}
|
||||
|
||||
public chatsUnarchiveChat(chatId: string): Promise<any> {
|
||||
throw new NotImplementedByEngineError();
|
||||
}
|
||||
|
||||
/**
|
||||
* Labels methods
|
||||
*/
|
||||
|
||||
public getLabels(): Promise<Label[]> {
|
||||
throw new NotImplementedByEngineError();
|
||||
}
|
||||
|
||||
public getChatsByLabelId(labelId: string) {
|
||||
throw new NotImplementedByEngineError();
|
||||
}
|
||||
|
||||
public getChatLabels(chatId: string): Promise<Label[]> {
|
||||
throw new NotImplementedByEngineError();
|
||||
}
|
||||
|
||||
public putLabelsToChat(chatId: string, labels: LabelID[]) {
|
||||
throw new NotImplementedByEngineError();
|
||||
}
|
||||
|
||||
/**
|
||||
* Contacts methods
|
||||
*/
|
||||
@@ -436,6 +485,47 @@ export abstract class WhatsappSession {
|
||||
throw new NotImplementedByEngineError();
|
||||
}
|
||||
|
||||
/**
|
||||
* Channels methods
|
||||
*/
|
||||
public channelsList(query: ListChannelsQuery): Promise<Channel[]> {
|
||||
throw new NotImplementedByEngineError();
|
||||
}
|
||||
|
||||
public channelsCreateChannel(
|
||||
request: CreateChannelRequest,
|
||||
): Promise<Channel> {
|
||||
throw new NotImplementedByEngineError();
|
||||
}
|
||||
|
||||
public channelsGetChannel(id: string): Promise<Channel> {
|
||||
throw new NotImplementedByEngineError();
|
||||
}
|
||||
|
||||
public channelsGetChannelByInviteCode(inviteCode: string): Promise<Channel> {
|
||||
throw new NotImplementedByEngineError();
|
||||
}
|
||||
|
||||
public channelsDeleteChannel(id: string): Promise<void> {
|
||||
throw new NotImplementedByEngineError();
|
||||
}
|
||||
|
||||
public channelsFollowChannel(id: string): Promise<void> {
|
||||
throw new NotImplementedByEngineError();
|
||||
}
|
||||
|
||||
public channelsUnfollowChannel(id: string): Promise<void> {
|
||||
throw new NotImplementedByEngineError();
|
||||
}
|
||||
|
||||
public channelsMuteChannel(id: string): Promise<void> {
|
||||
throw new NotImplementedByEngineError();
|
||||
}
|
||||
|
||||
public channelsUnmuteChannel(id: string): Promise<void> {
|
||||
throw new NotImplementedByEngineError();
|
||||
}
|
||||
|
||||
/**
|
||||
* Status methods
|
||||
*/
|
||||
@@ -455,6 +545,10 @@ export abstract class WhatsappSession {
|
||||
throw new NotImplementedByEngineError();
|
||||
}
|
||||
|
||||
public deleteStatus(request: DeleteStatusRequest) {
|
||||
throw new NotImplementedByEngineError();
|
||||
}
|
||||
|
||||
public async getEngineInfo(): Promise<any> {
|
||||
return {};
|
||||
}
|
||||
@@ -486,14 +580,22 @@ export abstract class WhatsappSession {
|
||||
return;
|
||||
}
|
||||
if (!qr.raw) {
|
||||
this.log.error(
|
||||
this.logger.error(
|
||||
'QR.raw is not available, can not print it in the console',
|
||||
);
|
||||
return;
|
||||
}
|
||||
this.log.log(
|
||||
this.logger.info(
|
||||
"You can disable QR in console by setting 'WAHA_PRINT_QR=false' in your environment variables.",
|
||||
);
|
||||
qrcode.generate(qr.raw, { small: true });
|
||||
}
|
||||
}
|
||||
|
||||
export function isNewsletter(jid: string) {
|
||||
return jid.endsWith('@newsletter');
|
||||
}
|
||||
|
||||
export function getChannelInviteLink(code: string) {
|
||||
return `https://whatsapp.com/channel/${code}`;
|
||||
}
|
||||
@@ -1,15 +1,19 @@
|
||||
import { ConsoleLogger } from '@nestjs/common';
|
||||
import { LoggerBuilder } from '@waha/utils/logging';
|
||||
import { Logger } from 'pino';
|
||||
|
||||
import { WebhookConfig } from '../../structures/webhooks.config.dto';
|
||||
import { WhatsappSession } from './session.abc';
|
||||
|
||||
export abstract class WebhookSender {
|
||||
protected url: string;
|
||||
protected logger: Logger;
|
||||
|
||||
constructor(
|
||||
protected log: ConsoleLogger,
|
||||
loggerBuilder: LoggerBuilder,
|
||||
protected webhookConfig: WebhookConfig,
|
||||
) {
|
||||
this.url = webhookConfig.url;
|
||||
this.logger = loggerBuilder.child({ name: WebhookSender.name });
|
||||
}
|
||||
|
||||
abstract send(json);
|
||||
|
||||
@@ -0,0 +1,140 @@
|
||||
import {
|
||||
BeforeApplicationShutdown,
|
||||
Logger,
|
||||
LoggerService,
|
||||
} from '@nestjs/common';
|
||||
import { sleep } from '@nestjs/terminus/dist/utils';
|
||||
import {
|
||||
OnGatewayConnection,
|
||||
OnGatewayDisconnect,
|
||||
OnGatewayInit,
|
||||
WebSocketGateway,
|
||||
WebSocketServer,
|
||||
} from '@nestjs/websockets';
|
||||
import { SessionManager } from '@waha/core/abc/manager.abc';
|
||||
import { WebsocketHeartbeatJob } from '@waha/nestjs/ws/WebsocketHeartbeatJob';
|
||||
import { WebSocket } from '@waha/nestjs/ws/ws';
|
||||
import { WAHAEvents } from '@waha/structures/enums.dto';
|
||||
import { generatePrefixedId } from '@waha/utils/ids';
|
||||
import { IncomingMessage } from 'http';
|
||||
import * as lodash from 'lodash';
|
||||
import * as url from 'url';
|
||||
import { Server } from 'ws';
|
||||
|
||||
@WebSocketGateway({
|
||||
path: '/ws',
|
||||
cors: true,
|
||||
})
|
||||
export class WebsocketGatewayCore
|
||||
implements
|
||||
OnGatewayInit,
|
||||
OnGatewayConnection,
|
||||
OnGatewayDisconnect,
|
||||
BeforeApplicationShutdown
|
||||
{
|
||||
HEARTBEAT_INTERVAL = 10_000;
|
||||
|
||||
@WebSocketServer()
|
||||
server: Server;
|
||||
|
||||
private listeners: Map<WebSocket, { session: string; events: string[] }> =
|
||||
new Map();
|
||||
|
||||
private readonly logger: LoggerService;
|
||||
private heartbeat: WebsocketHeartbeatJob;
|
||||
|
||||
constructor(private manager: SessionManager) {
|
||||
this.logger = new Logger('WebsocketGateway');
|
||||
this.heartbeat = new WebsocketHeartbeatJob(
|
||||
this.logger,
|
||||
this.HEARTBEAT_INTERVAL,
|
||||
);
|
||||
}
|
||||
|
||||
handleConnection(socket: WebSocket, request: IncomingMessage, ...args): any {
|
||||
// wsc - websocket client
|
||||
const id = generatePrefixedId('wsc');
|
||||
socket.id = id;
|
||||
this.logger.debug(`New client connected: ${request.url}`);
|
||||
const params = this.getParams(id, request, socket);
|
||||
if (!params) {
|
||||
return;
|
||||
}
|
||||
const { session, events } = params;
|
||||
this.logger.debug(
|
||||
`Client connected to session: '${session}', events: ${events}, ${id}`,
|
||||
);
|
||||
this.listeners.set(socket, { session, events });
|
||||
}
|
||||
|
||||
private getParams(id: string, request: IncomingMessage, socket: WebSocket) {
|
||||
const query = url.parse(request.url, true).query;
|
||||
const session = (query.session as string) || '*';
|
||||
if (session !== '*') {
|
||||
this.logger.warn(
|
||||
`Only connecting to all sessions is allowed for now, use session=*, ${id}`,
|
||||
);
|
||||
const error =
|
||||
'Only connecting to all sessions is allowed for now, use session=*';
|
||||
socket.close(4001, JSON.stringify({ error }));
|
||||
return null;
|
||||
}
|
||||
|
||||
const events = ((query.events as string) || '*').split(',');
|
||||
if (
|
||||
!lodash.isEqual(events, ['*']) &&
|
||||
!lodash.isEqual(events, [WAHAEvents.SESSION_STATUS])
|
||||
) {
|
||||
this.logger.warn(
|
||||
`Only \'session.status\' event is allowed for now, use events=session.status or events=*, ${id}`,
|
||||
);
|
||||
const error =
|
||||
"Only 'session.status' event is allowed for now, use events=session.status or events=*";
|
||||
socket.close(4001, JSON.stringify({ error }));
|
||||
return null;
|
||||
}
|
||||
return { session, events };
|
||||
}
|
||||
|
||||
handleDisconnect(socket: WebSocket): any {
|
||||
this.logger.debug(`Client disconnected - ${socket.id}`);
|
||||
this.listeners.delete(socket);
|
||||
}
|
||||
|
||||
async beforeApplicationShutdown(signal?: string) {
|
||||
this.logger.log('Shutting down websocket server');
|
||||
// Allow pending messages to be sent, it can be even 1ms, just to release the event loop
|
||||
await sleep(100);
|
||||
this.server?.clients.forEach((options, client) => {
|
||||
// @ts-ignore
|
||||
this.logger.debug(`Closing client connection - ${client.id}...`);
|
||||
client.close(1001, 'Server is shutting down');
|
||||
});
|
||||
// Do not turn off heartbeat service here,
|
||||
// it's responsible for terminating the connection that is not alive
|
||||
this.logger.log('Websocket server is down');
|
||||
}
|
||||
|
||||
afterInit(server: Server) {
|
||||
this.logger.debug('Websocket server initialized');
|
||||
this.manager.events.on(
|
||||
WAHAEvents.SESSION_STATUS,
|
||||
this.sendToAll.bind(this),
|
||||
);
|
||||
this.logger.debug('Subscribed to manager events');
|
||||
|
||||
this.logger.debug('Starting heartbeat service...');
|
||||
this.heartbeat.start(server);
|
||||
this.logger.debug('Heartbeat service started');
|
||||
}
|
||||
|
||||
sendToAll(data: any) {
|
||||
this.listeners.forEach((options, client) => {
|
||||
if (options.events.length === 0) {
|
||||
return;
|
||||
}
|
||||
this.logger.debug('Sending data to client', data);
|
||||
client.send(JSON.stringify(data));
|
||||
});
|
||||
}
|
||||
}
|
||||
+73
-29
@@ -1,11 +1,23 @@
|
||||
import { ConsoleLogger, INestApplication, Module } from '@nestjs/common';
|
||||
import { INestApplication, Module } from '@nestjs/common';
|
||||
import { ConfigModule } from '@nestjs/config';
|
||||
import { APP_INTERCEPTOR } from '@nestjs/core';
|
||||
import { PassportModule } from '@nestjs/passport';
|
||||
import { ServeStaticModule } from '@nestjs/serve-static';
|
||||
import { TerminusModule } from '@nestjs/terminus';
|
||||
import { BufferJsonReplacerInterceptor } from '@waha/api/BufferJsonReplacerInterceptor';
|
||||
import { ChannelsController } from '@waha/api/channels.controller';
|
||||
import { ServerController } from '@waha/api/server.controller';
|
||||
import { WebsocketGatewayCore } from '@waha/core/api/websocket.gateway.core';
|
||||
import { MediaLocalStorageConfig } from '@waha/core/media/local/MediaLocalStorageConfig';
|
||||
import { BufferJsonReplacerInterceptor } from '@waha/nestjs/BufferJsonReplacerInterceptor';
|
||||
import {
|
||||
getPinoHttpUseLevel,
|
||||
getPinoLogLevel,
|
||||
getPinoTransport,
|
||||
} from '@waha/utils/logging';
|
||||
import * as Joi from 'joi';
|
||||
import { LoggerModule } from 'nestjs-pino';
|
||||
import { join } from 'path';
|
||||
import { Logger } from 'pino';
|
||||
|
||||
import { AuthController } from '../api/auth.controller';
|
||||
import { ChatsController } from '../api/chats.controller';
|
||||
@@ -13,12 +25,11 @@ import { ChattingController } from '../api/chatting.controller';
|
||||
import { ContactsController } from '../api/contacts.controller';
|
||||
import { GroupsController } from '../api/groups.controller';
|
||||
import { HealthController } from '../api/health.controller';
|
||||
import { LabelsController } from '../api/labels.controller';
|
||||
import { PingController } from '../api/ping.controller';
|
||||
import { PresenceController } from '../api/presence.controller';
|
||||
import { ScreenshotController } from '../api/screenshot.controller';
|
||||
import {
|
||||
SessionController,
|
||||
SessionsController,
|
||||
} from '../api/sessions.controller';
|
||||
import { SessionsController } from '../api/sessions.controller';
|
||||
import { StatusController } from '../api/status.controller';
|
||||
import { VersionController } from '../api/version.controller';
|
||||
import { WhatsappConfigService } from '../config.service';
|
||||
@@ -31,31 +42,56 @@ import { WAHAHealthCheckServiceCore } from './health/WAHAHealthCheckServiceCore'
|
||||
import { SessionManagerCore } from './manager.core';
|
||||
|
||||
export const IMPORTS = [
|
||||
LoggerModule.forRoot({
|
||||
renameContext: 'name',
|
||||
pinoHttp: {
|
||||
quietReqLogger: true,
|
||||
level: getPinoLogLevel(),
|
||||
useLevel: getPinoHttpUseLevel(),
|
||||
transport: getPinoTransport(),
|
||||
autoLogging: {
|
||||
ignore: (req) => {
|
||||
return (
|
||||
req.url.startsWith('/dashboard/') ||
|
||||
req.url.startsWith('/api/files/') ||
|
||||
req.url.startsWith('/api/s3/')
|
||||
);
|
||||
},
|
||||
},
|
||||
serializers: {
|
||||
req: (req) => ({
|
||||
id: req.id,
|
||||
method: req.method,
|
||||
url: req.url,
|
||||
query: req.query,
|
||||
params: req.params,
|
||||
}),
|
||||
res: (res) => ({
|
||||
statusCode: res.statusCode,
|
||||
}),
|
||||
},
|
||||
},
|
||||
}),
|
||||
ConfigModule.forRoot({
|
||||
isGlobal: true,
|
||||
validationSchema: Joi.object({
|
||||
WHATSAPP_API_SCHEMA: Joi.string().valid('http', 'https').default('http'),
|
||||
}),
|
||||
}),
|
||||
ServeStaticModule.forRootAsync({
|
||||
imports: [],
|
||||
extraProviders: [WhatsappConfigService, DashboardConfigServiceCore],
|
||||
inject: [WhatsappConfigService, DashboardConfigServiceCore],
|
||||
useFactory: (
|
||||
config: WhatsappConfigService,
|
||||
dashboardConfig: DashboardConfigServiceCore,
|
||||
) => {
|
||||
const options = [
|
||||
// Serve files (media)
|
||||
extraProviders: [DashboardConfigServiceCore],
|
||||
inject: [DashboardConfigServiceCore],
|
||||
useFactory: (dashboardConfig: DashboardConfigServiceCore) => {
|
||||
if (!dashboardConfig.enabled) {
|
||||
return [];
|
||||
}
|
||||
return [
|
||||
{
|
||||
rootPath: config.filesFolder,
|
||||
serveRoot: config.filesUri,
|
||||
},
|
||||
];
|
||||
if (dashboardConfig.enabled) {
|
||||
options.push({
|
||||
rootPath: join(__dirname, '..', 'dashboard'),
|
||||
serveRoot: dashboardConfig.dashboardUri,
|
||||
});
|
||||
}
|
||||
return options;
|
||||
},
|
||||
];
|
||||
},
|
||||
}),
|
||||
PassportModule,
|
||||
@@ -64,16 +100,19 @@ export const IMPORTS = [
|
||||
export const CONTROLLERS = [
|
||||
AuthController,
|
||||
SessionsController,
|
||||
SessionController,
|
||||
ChattingController,
|
||||
ChatsController,
|
||||
ChannelsController,
|
||||
StatusController,
|
||||
LabelsController,
|
||||
ContactsController,
|
||||
GroupsController,
|
||||
PresenceController,
|
||||
ScreenshotController,
|
||||
VersionController,
|
||||
PingController,
|
||||
HealthController,
|
||||
ServerController,
|
||||
VersionController,
|
||||
];
|
||||
const PROVIDERS = [
|
||||
{
|
||||
@@ -92,7 +131,8 @@ const PROVIDERS = [
|
||||
SwaggerConfigServiceCore,
|
||||
WhatsappConfigService,
|
||||
EngineConfigService,
|
||||
ConsoleLogger,
|
||||
WebsocketGatewayCore,
|
||||
MediaLocalStorageConfig,
|
||||
];
|
||||
|
||||
@Module({
|
||||
@@ -101,13 +141,17 @@ const PROVIDERS = [
|
||||
providers: PROVIDERS,
|
||||
})
|
||||
export class AppModuleCore {
|
||||
constructor(protected config: WhatsappConfigService) {}
|
||||
public startTimestamp: number;
|
||||
|
||||
static getHttpsOptions() {
|
||||
constructor(protected config: WhatsappConfigService) {
|
||||
this.startTimestamp = Date.now();
|
||||
}
|
||||
|
||||
static getHttpsOptions(logger: Logger) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
static appReady(app: INestApplication) {
|
||||
static appReady(app: INestApplication, logger: Logger) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
import { ConfigService } from '@nestjs/config';
|
||||
import { InjectPinoLogger, PinoLogger } from 'nestjs-pino';
|
||||
|
||||
import { parseBool } from '../../helpers';
|
||||
|
||||
@@ -7,7 +8,11 @@ import { parseBool } from '../../helpers';
|
||||
export class DashboardConfigServiceCore {
|
||||
public dashboardUri = '/dashboard';
|
||||
|
||||
constructor(protected configService: ConfigService) {}
|
||||
constructor(
|
||||
protected configService: ConfigService,
|
||||
@InjectPinoLogger('DashboardConfigService')
|
||||
protected logger: PinoLogger,
|
||||
) {}
|
||||
|
||||
get enabled(): boolean {
|
||||
const value = this.configService.get('WAHA_DASHBOARD_ENABLED', 'true');
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
import { ConfigService } from '@nestjs/config';
|
||||
|
||||
import { parseBool } from '../../helpers';
|
||||
@@ -7,14 +7,18 @@ import { getEngineName } from '../../version';
|
||||
|
||||
@Injectable()
|
||||
export class EngineConfigService {
|
||||
constructor(protected configService: ConfigService) {}
|
||||
private logger: Logger;
|
||||
|
||||
constructor(protected configService: ConfigService) {
|
||||
this.logger = new Logger('EngineConfigService');
|
||||
}
|
||||
|
||||
getDefaultEngineName(): WAHAEngine {
|
||||
const value = getEngineName();
|
||||
if (value in WAHAEngine) {
|
||||
return WAHAEngine[value];
|
||||
}
|
||||
console.log(
|
||||
this.logger.warn(
|
||||
`Unknown WhatsApp default engine WHATSAPP_DEFAULT_ENGINE=${value}. Using WEBJS`,
|
||||
);
|
||||
return WAHAEngine.WEBJS;
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { ConfigService } from '@nestjs/config';
|
||||
import { InjectPinoLogger, PinoLogger } from 'nestjs-pino';
|
||||
|
||||
import { parseBool } from '../../helpers';
|
||||
|
||||
@Injectable()
|
||||
export class SwaggerConfigServiceCore {
|
||||
constructor(protected configService: ConfigService) {}
|
||||
constructor(
|
||||
protected configService: ConfigService,
|
||||
@InjectPinoLogger('SwaggerConfigService')
|
||||
protected logger: PinoLogger,
|
||||
) {}
|
||||
|
||||
get advancedConfigEnabled(): boolean {
|
||||
const value = this.configService.get(
|
||||
|
||||
@@ -4,33 +4,59 @@ import makeWASocket, {
|
||||
DisconnectReason,
|
||||
extractMessageContent,
|
||||
getAggregateVotesInPollMessage,
|
||||
getContentType,
|
||||
getKeyAuthor,
|
||||
getUrlFromDirectPath,
|
||||
isJidGroup,
|
||||
isJidStatusBroadcast,
|
||||
isRealMessage,
|
||||
jidNormalizedUser,
|
||||
makeCacheableSignalKeyStore,
|
||||
NewsletterMetadata,
|
||||
normalizeMessageContent,
|
||||
PresenceData,
|
||||
proto,
|
||||
WAMessageContent,
|
||||
WAMessageKey,
|
||||
} from '@adiwajshing/baileys';
|
||||
import { WACallEvent } from '@adiwajshing/baileys/lib/Types/Call';
|
||||
import { Label as NOWEBLabel } from '@adiwajshing/baileys/lib/Types/Label';
|
||||
import { LabelAssociationType } from '@adiwajshing/baileys/lib/Types/LabelAssociation';
|
||||
import { isLidUser } from '@adiwajshing/baileys/lib/WABinary/jid-utils';
|
||||
import { Logger as BaileysLogger } from '@adiwajshing/baileys/node_modules/pino';
|
||||
import { UnprocessableEntityException } from '@nestjs/common';
|
||||
import { NowebInMemoryStore } from '@waha/core/engines/noweb/store/NowebInMemoryStore';
|
||||
import { flipObject, getLogLevels, parseBool, splitAt } from '@waha/helpers';
|
||||
import { IMediaEngineProcessor } from '@waha/core/media/IMediaEngineProcessor';
|
||||
import { flipObject, parseBool, splitAt } from '@waha/helpers';
|
||||
import { PairingCodeResponse } from '@waha/structures/auth.dto';
|
||||
import { CallData } from '@waha/structures/calls.dto';
|
||||
import {
|
||||
Channel,
|
||||
ChannelRole,
|
||||
CreateChannelRequest,
|
||||
ListChannelsQuery,
|
||||
} from '@waha/structures/channels.dto';
|
||||
import { GetChatsQuery } from '@waha/structures/chats.dto';
|
||||
import { ContactQuery, ContactRequest } from '@waha/structures/contacts.dto';
|
||||
import {
|
||||
Label,
|
||||
LabelChatAssociation,
|
||||
LabelID,
|
||||
} from '@waha/structures/labels.dto';
|
||||
import { ReplyToMessage } from '@waha/structures/message.dto';
|
||||
import {
|
||||
PollVote,
|
||||
PollVotePayload,
|
||||
WAMessageAckBody,
|
||||
} from '@waha/structures/webhooks.dto';
|
||||
import { waitUntil } from '@waha/utils/promiseTimeout';
|
||||
import { SingleDelayedJobRunner } from '@waha/utils/SingleDelayedJobRunner';
|
||||
import { SinglePeriodicJobRunner } from '@waha/utils/SinglePeriodicJobRunner';
|
||||
import * as Buffer from 'buffer';
|
||||
import { Agent } from 'https';
|
||||
import * as lodash from 'lodash';
|
||||
import { toNumber } from 'lodash';
|
||||
import * as NodeCache from 'node-cache';
|
||||
|
||||
import {
|
||||
ChatRequest,
|
||||
@@ -74,10 +100,15 @@ import {
|
||||
WAMessageReaction,
|
||||
} from '../../../structures/responses.dto';
|
||||
import { MeInfo } from '../../../structures/sessions.dto';
|
||||
import { BROADCAST_ID, TextStatus } from '../../../structures/status.dto';
|
||||
import { IEngineMediaProcessor } from '../../abc/media.abc';
|
||||
import {
|
||||
BROADCAST_ID,
|
||||
DeleteStatusRequest,
|
||||
TextStatus,
|
||||
} from '../../../structures/status.dto';
|
||||
import {
|
||||
ensureSuffix,
|
||||
getChannelInviteLink,
|
||||
isNewsletter,
|
||||
WAHAInternalEvent,
|
||||
WhatsappSession,
|
||||
} from '../../abc/session.abc';
|
||||
@@ -87,7 +118,6 @@ import {
|
||||
} from '../../exceptions';
|
||||
import { toVcard } from '../../helpers';
|
||||
import { createAgentProxy } from '../../helpers.proxy';
|
||||
import { buildLogger } from '../../manager.core';
|
||||
import { QR } from '../../QR';
|
||||
import { NowebAuthFactoryCore } from './NowebAuthFactoryCore';
|
||||
import { INowebStore } from './store/INowebStore';
|
||||
@@ -97,8 +127,6 @@ import { extractMediaContent } from './utils';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const QRCode = require('qrcode');
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const logger = require('pino')();
|
||||
|
||||
export const BaileysEvents = {
|
||||
CONNECTION_UPDATE: 'connection.update',
|
||||
@@ -121,13 +149,15 @@ const ToEnginePresenceStatus = flipObject(PresenceStatuses);
|
||||
|
||||
export class WhatsappSessionNoWebCore extends WhatsappSession {
|
||||
private START_ATTEMPT_DELAY_SECONDS = 2;
|
||||
private AUTO_RESTART_AFTER_SECONDS = 30 * 60;
|
||||
private AUTO_RESTART_AFTER_SECONDS = 28 * 60;
|
||||
|
||||
engine = WAHAEngine.NOWEB;
|
||||
authFactory = new NowebAuthFactoryCore();
|
||||
storageFactory = new NowebStorageFactoryCore();
|
||||
private startTimeoutId: null | ReturnType<typeof setTimeout> = null;
|
||||
private autoRestartTimeoutId: null | ReturnType<typeof setTimeout> = null;
|
||||
private startDelayedJob: SingleDelayedJobRunner;
|
||||
private autoRestartJob: SinglePeriodicJobRunner;
|
||||
private msgRetryCounterCache: NodeCache;
|
||||
protected engineLogger: BaileysLogger;
|
||||
|
||||
get listenConnectionEventsFromTheStart() {
|
||||
return true;
|
||||
@@ -140,14 +170,40 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
|
||||
public constructor(config) {
|
||||
super(config);
|
||||
this.qr = new QR();
|
||||
// external map to store retry counts of messages when decryption/encryption fails
|
||||
// keep this out of the socket itself, to prevent a message decryption/encryption loop across socket restarts
|
||||
this.msgRetryCounterCache = new NodeCache({
|
||||
stdTTL: 60 * 60, // 1 hour
|
||||
useClones: false,
|
||||
});
|
||||
|
||||
this.engineLogger = this.loggerBuilder.child({
|
||||
name: 'NOWEBEngine',
|
||||
}) as unknown as BaileysLogger;
|
||||
|
||||
// Restart job if session failed
|
||||
this.startDelayedJob = new SingleDelayedJobRunner(
|
||||
'start-engine',
|
||||
this.START_ATTEMPT_DELAY_SECONDS * SECOND,
|
||||
this.logger,
|
||||
);
|
||||
|
||||
// Enable auto-restart
|
||||
const shiftSeconds = Math.floor(Math.random() * 30);
|
||||
const delay = this.AUTO_RESTART_AFTER_SECONDS + shiftSeconds;
|
||||
this.autoRestartJob = new SinglePeriodicJobRunner(
|
||||
'auto-restart',
|
||||
delay * SECOND,
|
||||
this.logger,
|
||||
);
|
||||
}
|
||||
|
||||
start() {
|
||||
async start() {
|
||||
this.status = WAHASessionStatus.STARTING;
|
||||
this.buildClient();
|
||||
await this.buildClient();
|
||||
}
|
||||
|
||||
getSocketConfig(agent, state) {
|
||||
getSocketConfig(agent, state): any {
|
||||
const fullSyncEnabled = this.sessionConfig?.noweb?.store?.fullSync || false;
|
||||
const browser = fullSyncEnabled
|
||||
? Browsers.ubuntu('Desktop')
|
||||
@@ -158,19 +214,21 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
|
||||
auth: {
|
||||
creds: state.creds,
|
||||
/** caching makes the store faster to send/recv messages */
|
||||
keys: makeCacheableSignalKeyStore(state.keys, logger),
|
||||
keys: makeCacheableSignalKeyStore(state.keys, this.engineLogger),
|
||||
},
|
||||
printQRInTerminal: false,
|
||||
browser: browser,
|
||||
logger: logger,
|
||||
logger: this.engineLogger,
|
||||
mobile: false,
|
||||
defaultQueryTimeoutMs: undefined,
|
||||
defaultQueryTimeoutMs: 120_000,
|
||||
keepAliveIntervalMs: 30_000,
|
||||
getMessage: (key) => this.getMessage(key),
|
||||
syncFullHistory: fullSyncEnabled,
|
||||
msgRetryCounterCache: this.msgRetryCounterCache,
|
||||
};
|
||||
}
|
||||
|
||||
async makeSocket() {
|
||||
async makeSocket(): Promise<any> {
|
||||
const { state, saveCreds } = await this.authFactory.buildAuth(
|
||||
this.sessionStore,
|
||||
this.name,
|
||||
@@ -190,31 +248,32 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
|
||||
}
|
||||
|
||||
async connectStore() {
|
||||
this.log.debug(`Connecting store...`);
|
||||
this.logger.debug(`Connecting store...`);
|
||||
if (!this.store) {
|
||||
this.log.debug(`Making a new store...`);
|
||||
const levels = getLogLevels(false);
|
||||
const log = buildLogger(`NowebStore - ${this.name}`, levels);
|
||||
this.logger.debug(`Making a new store...`);
|
||||
const storeEnabled = this.sessionConfig?.noweb?.store?.enabled || false;
|
||||
if (storeEnabled) {
|
||||
this.log.debug('Using NowebPersistentStore');
|
||||
this.logger.debug('Using NowebPersistentStore');
|
||||
const storage = this.storageFactory.createStorage(
|
||||
this.sessionStore,
|
||||
this.name,
|
||||
);
|
||||
this.store = new NowebPersistentStore(log, storage);
|
||||
this.store = new NowebPersistentStore(
|
||||
this.loggerBuilder.child({ name: NowebPersistentStore.name }),
|
||||
storage,
|
||||
);
|
||||
await this.store.init().catch((err) => {
|
||||
this.log.error(`Failed to initialize storage or store: ${err}`);
|
||||
this.logger.error(`Failed to initialize storage or store: ${err}`);
|
||||
this.status = WAHASessionStatus.FAILED;
|
||||
this.end();
|
||||
throw err;
|
||||
});
|
||||
} else {
|
||||
this.log.debug('Using NowebInMemoryStore');
|
||||
this.logger.debug('Using NowebInMemoryStore');
|
||||
this.store = new NowebInMemoryStore();
|
||||
}
|
||||
}
|
||||
this.log.debug(`Binding store to socket...`);
|
||||
this.logger.debug(`Binding store to socket...`);
|
||||
this.store.bind(this.sock.ev, this.sock);
|
||||
}
|
||||
|
||||
@@ -227,6 +286,7 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
|
||||
async buildClient() {
|
||||
this.sock = await this.makeSocket();
|
||||
this.issueMessageUpdateOnEdits();
|
||||
this.issuePresenceUpdateOnMessageUpsert();
|
||||
if (this.isDebugEnabled()) {
|
||||
this.listenEngineEventsInDebugMode();
|
||||
}
|
||||
@@ -238,20 +298,15 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
|
||||
this.enableAutoRestart();
|
||||
}
|
||||
|
||||
protected enableAutoRestart() {
|
||||
if (this.autoRestartTimeoutId) {
|
||||
return;
|
||||
}
|
||||
|
||||
// add random delay to avoid multiple restarts at the same time
|
||||
const shiftSeconds = Math.floor(Math.random() * 30);
|
||||
const delay = this.AUTO_RESTART_AFTER_SECONDS + shiftSeconds;
|
||||
this.log.debug(`Auto-restart is enabled, after ${delay} seconds`);
|
||||
this.autoRestartTimeoutId = setTimeout(() => {
|
||||
this.autoRestartTimeoutId = null;
|
||||
this.log.log('Auto-restarting the client connection...');
|
||||
this.sock?.end(new Error('auto-restart'));
|
||||
}, delay * SECOND);
|
||||
private enableAutoRestart() {
|
||||
this.autoRestartJob.start(async () => {
|
||||
this.logger.info('Auto-restarting the client connection...');
|
||||
if (this.sock?.ws?.isConnecting) {
|
||||
this.logger.warn('Auto-restart skipped, the client is connecting...');
|
||||
return;
|
||||
}
|
||||
this.sock?.end(undefined);
|
||||
});
|
||||
}
|
||||
|
||||
protected async getMessage(
|
||||
@@ -266,28 +321,18 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
|
||||
|
||||
protected listenEngineEventsInDebugMode() {
|
||||
this.sock.ev.process((events) => {
|
||||
this.log.debug(`NOWEB events: ${JSON.stringify(events)}`);
|
||||
this.logger.debug({ events: events }, `NOWEB events`);
|
||||
});
|
||||
}
|
||||
|
||||
private restartClient() {
|
||||
if (this.startTimeoutId) {
|
||||
this.log.log(
|
||||
'Request to restart is already in progress, ignoring this request',
|
||||
);
|
||||
return;
|
||||
}
|
||||
this.log.log(
|
||||
`Setting up client start in ${this.START_ATTEMPT_DELAY_SECONDS} seconds...`,
|
||||
);
|
||||
this.startTimeoutId = setTimeout(() => {
|
||||
this.startTimeoutId = undefined;
|
||||
this.buildClient();
|
||||
}, this.START_ATTEMPT_DELAY_SECONDS * SECOND);
|
||||
this.startDelayedJob.schedule(async () => {
|
||||
await this.buildClient();
|
||||
});
|
||||
}
|
||||
|
||||
protected listenConnectionEvents() {
|
||||
this.log.debug(`Start listening ${BaileysEvents.CONNECTION_UPDATE}...`);
|
||||
this.logger.debug(`Start listening ${BaileysEvents.CONNECTION_UPDATE}...`);
|
||||
this.sock.ev.on('connection.update', async (update) => {
|
||||
const { connection, lastDisconnect, qr, isNewLogin } = update;
|
||||
if (isNewLogin) {
|
||||
@@ -305,12 +350,14 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
|
||||
this.qr.save('');
|
||||
// reconnect if not logged out
|
||||
if (shouldReconnect) {
|
||||
this.log.log(
|
||||
`Connection closed due to '${lastDisconnect.error}', reconnecting...`,
|
||||
);
|
||||
if (lastDisconnect.error) {
|
||||
this.logger.info(
|
||||
`Connection closed due to '${lastDisconnect.error}', reconnecting...`,
|
||||
);
|
||||
}
|
||||
this.restartClient();
|
||||
} else {
|
||||
this.log.error(
|
||||
this.logger.error(
|
||||
`Connection closed due to '${lastDisconnect.error}', do not reconnect the session.`,
|
||||
);
|
||||
await this.end();
|
||||
@@ -329,8 +376,9 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
|
||||
}
|
||||
|
||||
async stop() {
|
||||
await this.end();
|
||||
this.status = WAHASessionStatus.STOPPED;
|
||||
this.events.removeAllListeners();
|
||||
await this.end();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -360,27 +408,61 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
|
||||
});
|
||||
}
|
||||
|
||||
private issuePresenceUpdateOnMessageUpsert() {
|
||||
//
|
||||
// Fix for "typing" after sending a message
|
||||
// https://github.com/devlikeapro/waha/issues/379
|
||||
//
|
||||
this.sock.ev.on('messages.upsert', ({ messages }) => {
|
||||
const meId = this.sock?.authState?.creds?.me?.id;
|
||||
for (const message of messages) {
|
||||
if (!isRealMessage(message, meId)) {
|
||||
continue;
|
||||
}
|
||||
if (message.key.fromMe) {
|
||||
continue;
|
||||
}
|
||||
const jid = message.key.remoteJid;
|
||||
const participant = message.key.participant || jid;
|
||||
const jidPresences = this.store?.presences?.[jid];
|
||||
const participantPresence = jidPresences?.[participant];
|
||||
if (participantPresence?.lastKnownPresence === 'composing') {
|
||||
this.logger.debug(
|
||||
`Fixing presence for '${participant}' in '${jid} since it's typing`,
|
||||
);
|
||||
const presence: PresenceData = { lastKnownPresence: 'available' };
|
||||
this.sock?.ev?.emit('presence.update', {
|
||||
id: jid,
|
||||
presences: { [participant]: presence },
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private async end() {
|
||||
clearTimeout(this.autoRestartTimeoutId);
|
||||
clearTimeout(this.startTimeoutId);
|
||||
this.autoRestartJob.stop();
|
||||
this.startDelayedJob.cancel();
|
||||
// @ts-ignore
|
||||
this.sock?.ev?.removeAllListeners();
|
||||
this.sock?.ws?.removeAllListeners();
|
||||
await this.store?.close();
|
||||
// wait until connection is not connecting to avoid error:
|
||||
// "WebSocket was closed before the connection was established"
|
||||
await waitUntil(async () => !this.sock?.ws?.isConnecting, 1_000, 10_000);
|
||||
this.sock?.end(undefined);
|
||||
this.store?.close();
|
||||
}
|
||||
|
||||
async getSessionMeInfo(): Promise<MeInfo | null> {
|
||||
const me = this.sock.authState?.creds?.me;
|
||||
getSessionMeInfo(): MeInfo | null {
|
||||
const me = this.sock?.authState?.creds?.me;
|
||||
if (!me) {
|
||||
return null;
|
||||
}
|
||||
const meId = jidNormalizedUser(me.id);
|
||||
const meInfo: MeInfo = {
|
||||
return {
|
||||
id: toCusFormat(meId),
|
||||
pushName: me.name,
|
||||
};
|
||||
return meInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -405,7 +487,7 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
|
||||
}
|
||||
|
||||
if (this.status == WAHASessionStatus.STARTING) {
|
||||
this.log.debug('Waiting for connection update...');
|
||||
this.logger.debug('Waiting for connection update...');
|
||||
await this.sock.waitForConnectionUpdate((update) => !!update.qr);
|
||||
}
|
||||
|
||||
@@ -414,12 +496,12 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
|
||||
throw new UnprocessableEntityException(err);
|
||||
}
|
||||
|
||||
this.log.log(`Requesting pairing code for '${phoneNumber}'...`);
|
||||
this.logger.info(`Requesting pairing code for '${phoneNumber}'...`);
|
||||
const code: string = await this.sock.requestPairingCode(phoneNumber);
|
||||
// show it as ABCD-ABCD
|
||||
const parts = splitAt(code, 4);
|
||||
const codeRepr = parts.join('-');
|
||||
this.log.log(`Your code: ${codeRepr}`);
|
||||
this.logger.info(`Your code: ${codeRepr}`);
|
||||
return { code: codeRepr };
|
||||
}
|
||||
|
||||
@@ -456,18 +538,19 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
|
||||
};
|
||||
}
|
||||
|
||||
sendText(request: MessageTextRequest) {
|
||||
async sendText(request: MessageTextRequest) {
|
||||
const chatId = toJID(this.ensureSuffix(request.chatId));
|
||||
const message = {
|
||||
text: request.text,
|
||||
mentions: request.mentions?.map(toJID),
|
||||
};
|
||||
return this.sock.sendMessage(chatId, message);
|
||||
const options = await this.getMessageOptions(request);
|
||||
return this.sock.sendMessage(chatId, message, options);
|
||||
}
|
||||
|
||||
public deleteMessage(chatId: string, messageId: string) {
|
||||
const jid = toJID(this.ensureSuffix(chatId));
|
||||
const key = parseMessageId(messageId);
|
||||
const key = parseMessageIdSerialized(messageId);
|
||||
return this.sock.sendMessage(jid, { delete: key });
|
||||
}
|
||||
|
||||
@@ -477,7 +560,7 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
|
||||
request: EditMessageRequest,
|
||||
) {
|
||||
const jid = toJID(this.ensureSuffix(chatId));
|
||||
const key = parseMessageId(messageId);
|
||||
const key = parseMessageIdSerialized(messageId);
|
||||
const message = {
|
||||
text: request.text,
|
||||
mentions: request.mentions?.map(toJID),
|
||||
@@ -507,23 +590,18 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
|
||||
};
|
||||
const message = { poll: poll };
|
||||
const remoteJid = toJID(request.chatId);
|
||||
const result = await this.sock.sendMessage(remoteJid, message);
|
||||
const options = await this.getMessageOptions(request);
|
||||
const result = await this.sock.sendMessage(remoteJid, message, options);
|
||||
return this.toWAMessage(result);
|
||||
}
|
||||
|
||||
async reply(request: MessageReplyRequest) {
|
||||
const { id } = parseMessageId(request.reply_to);
|
||||
const quotedMessage = await this.store.loadMessage(
|
||||
toJID(request.chatId),
|
||||
id,
|
||||
);
|
||||
const options = await this.getMessageOptions(request);
|
||||
const message = {
|
||||
text: request.text,
|
||||
mentions: request.mentions?.map(toJID),
|
||||
};
|
||||
return await this.sock.sendMessage(request.chatId, message, {
|
||||
quoted: quotedMessage,
|
||||
});
|
||||
return await this.sock.sendMessage(request.chatId, message, options);
|
||||
}
|
||||
|
||||
sendImage(request: MessageImageRequest) {
|
||||
@@ -554,11 +632,14 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
|
||||
}
|
||||
|
||||
async sendSeen(request: SendSeenRequest) {
|
||||
const key = parseMessageId(request.messageId);
|
||||
const key = parseMessageIdSerialized(request.messageId);
|
||||
const participant = request.participant
|
||||
? toJID(this.ensureSuffix(request.participant))
|
||||
: undefined;
|
||||
const data = {
|
||||
remoteJid: key.remoteJid,
|
||||
id: key.id,
|
||||
participant: request.participant,
|
||||
participant: participant,
|
||||
};
|
||||
return this.sock.readMessages([data]);
|
||||
}
|
||||
@@ -585,19 +666,18 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
|
||||
toJID(chatId),
|
||||
toNumber(limit),
|
||||
);
|
||||
const result = [];
|
||||
|
||||
const promises = [];
|
||||
for (const msg of messages) {
|
||||
const wamsg = await this.processIncomingMessage(msg, downloadMedia);
|
||||
if (!wamsg) {
|
||||
continue;
|
||||
}
|
||||
result.push(wamsg);
|
||||
promises.push(this.processIncomingMessage(msg, downloadMedia));
|
||||
}
|
||||
let result = await Promise.all(promises);
|
||||
result = result.filter(Boolean);
|
||||
return result;
|
||||
}
|
||||
|
||||
async setReaction(request: MessageReactionRequest) {
|
||||
const key = parseMessageId(request.messageId);
|
||||
const key = parseMessageIdSerialized(request.messageId);
|
||||
const reactionMessage = {
|
||||
react: {
|
||||
text: request.reaction,
|
||||
@@ -608,7 +688,7 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
|
||||
}
|
||||
|
||||
async setStar(request: MessageStarRequest) {
|
||||
const key = parseMessageId(request.messageId);
|
||||
const key = parseMessageIdSerialized(request.messageId);
|
||||
await this.sock.chatModify(
|
||||
{
|
||||
star: {
|
||||
@@ -631,6 +711,73 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
|
||||
return chats;
|
||||
}
|
||||
|
||||
protected async chatsPutArchive(
|
||||
chatId: string,
|
||||
archive: boolean,
|
||||
): Promise<any> {
|
||||
const jid = toJID(chatId);
|
||||
const messages = await this.store.getMessagesByJid(jid, 1);
|
||||
return await this.sock.chatModify(
|
||||
{ archive: archive, lastMessages: messages },
|
||||
jid,
|
||||
);
|
||||
}
|
||||
|
||||
public chatsArchiveChat(chatId: string): Promise<any> {
|
||||
return this.chatsPutArchive(chatId, true);
|
||||
}
|
||||
|
||||
public chatsUnarchiveChat(chatId: string): Promise<any> {
|
||||
return this.chatsPutArchive(chatId, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Labels methods
|
||||
*/
|
||||
|
||||
public async getLabels(): Promise<Label[]> {
|
||||
const labels = await this.store.getLabels();
|
||||
return labels.map(this.toLabel);
|
||||
}
|
||||
|
||||
public async getChatsByLabelId(labelId: string) {
|
||||
const chats = await this.store.getChatsByLabelId(labelId);
|
||||
// Remove unreadCount, it's not ready yet
|
||||
chats.forEach((chat) => delete chat.unreadCount);
|
||||
return chats;
|
||||
}
|
||||
|
||||
public async getChatLabels(chatId: string): Promise<Label[]> {
|
||||
const jid = toJID(chatId);
|
||||
const labels = await this.store.getChatLabels(jid);
|
||||
return labels.map(this.toLabel);
|
||||
}
|
||||
|
||||
public async putLabelsToChat(chatId: string, labels: LabelID[]) {
|
||||
const jid = toJID(chatId);
|
||||
const labelsIds = labels.map((label) => label.id);
|
||||
const currentLabels = await this.store.getChatLabels(jid);
|
||||
const currentLabelsIds = currentLabels.map((label) => label.id);
|
||||
const addLabelsIds = lodash.difference(labelsIds, currentLabelsIds);
|
||||
const removeLabelsIds = lodash.difference(currentLabelsIds, labelsIds);
|
||||
for (const labelId of addLabelsIds) {
|
||||
await this.sock.addChatLabel(jid, labelId);
|
||||
}
|
||||
for (const labelId of removeLabelsIds) {
|
||||
await this.sock.removeChatLabel(jid, labelId);
|
||||
}
|
||||
}
|
||||
|
||||
protected toLabel(label: NOWEBLabel): Label {
|
||||
const color = label.color;
|
||||
return {
|
||||
id: label.id,
|
||||
name: label.name,
|
||||
color: color,
|
||||
colorHex: Label.toHex(color),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Contacts methods
|
||||
*/
|
||||
@@ -753,20 +900,13 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
|
||||
}
|
||||
|
||||
public async getPresence(chatId: string): Promise<WAHAChatPresences> {
|
||||
await this.subscribePresence(chatId);
|
||||
const remoteJid = toJID(chatId);
|
||||
const storedPresences = this.store.presences[remoteJid];
|
||||
return this.toWahaPresences(remoteJid, storedPresences || []);
|
||||
}
|
||||
|
||||
public async subscribePresence(chatId: string): Promise<void> {
|
||||
const remoteJid = toJID(chatId);
|
||||
if (this.store.presences[remoteJid]) {
|
||||
return;
|
||||
if (!(remoteJid in this.store.presences)) {
|
||||
this.store.presences[remoteJid] = [];
|
||||
await this.sock.presenceSubscribe(remoteJid);
|
||||
}
|
||||
// Have no info - subscribe to listen for events
|
||||
await this.sock.presenceSubscribe(remoteJid);
|
||||
return;
|
||||
const result = this.store.presences[remoteJid];
|
||||
return this.toWahaPresences(remoteJid, result);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -781,9 +921,22 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
|
||||
font: status.font,
|
||||
statusJidList: JIDs,
|
||||
};
|
||||
|
||||
return this.sock.sendMessage(BROADCAST_ID, message, options);
|
||||
}
|
||||
|
||||
public deleteStatus(request: DeleteStatusRequest) {
|
||||
const messageId = request.id;
|
||||
const key = parseMessageIdSerialized(messageId, true);
|
||||
key.fromMe = true;
|
||||
key.remoteJid = BROADCAST_ID;
|
||||
const JIDs = request.contacts.map(toJID);
|
||||
const options = {
|
||||
statusJidList: JIDs,
|
||||
};
|
||||
return this.sock.sendMessage(BROADCAST_ID, { delete: key }, options);
|
||||
}
|
||||
|
||||
protected upsertMeInJIDs(JIDs: string[]) {
|
||||
if (!this.sock?.authState?.creds?.me) {
|
||||
return;
|
||||
@@ -794,6 +947,81 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Channels methods
|
||||
*/
|
||||
protected toChannel(newsletter: NewsletterMetadata): Channel {
|
||||
const role =
|
||||
// @ts-ignore
|
||||
newsletter.viewer_metadata?.role ||
|
||||
(newsletter.viewer_metadata?.view_role as ChannelRole) ||
|
||||
ChannelRole.GUEST;
|
||||
const preview = newsletter.preview
|
||||
? getUrlFromDirectPath(newsletter.preview)
|
||||
: null;
|
||||
const picture = newsletter.picture
|
||||
? getUrlFromDirectPath(newsletter.picture)
|
||||
: null;
|
||||
return {
|
||||
id: newsletter.id,
|
||||
name: newsletter.name,
|
||||
description: newsletter.description,
|
||||
invite: getChannelInviteLink(newsletter.invite),
|
||||
preview: preview,
|
||||
picture: picture,
|
||||
verified: newsletter.verification === 'VERIFIED',
|
||||
role: role,
|
||||
};
|
||||
}
|
||||
|
||||
public async channelsList(query: ListChannelsQuery): Promise<Channel[]> {
|
||||
const newsletters = await this.sock.newsletterSubscribed();
|
||||
let channels = newsletters.map(this.toChannel);
|
||||
if (query.role) {
|
||||
// @ts-ignore
|
||||
channels = channels.filter((channel) => channel.role === query.role);
|
||||
}
|
||||
return channels;
|
||||
}
|
||||
|
||||
public async channelsCreateChannel(request: CreateChannelRequest) {
|
||||
const newsletter = await this.sock.newsletterCreate(
|
||||
request.name,
|
||||
request.description,
|
||||
);
|
||||
return this.toChannel(newsletter);
|
||||
}
|
||||
|
||||
public async channelsGetChannel(id: string) {
|
||||
const newsletter = await this.sock.newsletterMetadata('jid', id);
|
||||
return this.toChannel(newsletter);
|
||||
}
|
||||
|
||||
public async channelsGetChannelByInviteCode(inviteCode: string) {
|
||||
const newsletter = await this.sock.newsletterMetadata('invite', inviteCode);
|
||||
return this.toChannel(newsletter);
|
||||
}
|
||||
|
||||
public async channelsDeleteChannel(id: string) {
|
||||
return await this.sock.newsletterDelete(id);
|
||||
}
|
||||
|
||||
public async channelsFollowChannel(id: string): Promise<void> {
|
||||
return await this.sock.newsletterAction(id, 'follow');
|
||||
}
|
||||
|
||||
public async channelsUnfollowChannel(id: string): Promise<void> {
|
||||
return await this.sock.newsletterAction(id, 'unfollow');
|
||||
}
|
||||
|
||||
public async channelsMuteChannel(id: string): Promise<void> {
|
||||
return await this.sock.newsletterAction(id, 'mute');
|
||||
}
|
||||
|
||||
public async channelsUnmuteChannel(id: string): Promise<void> {
|
||||
return await this.sock.newsletterAction(id, 'unmute');
|
||||
}
|
||||
|
||||
/**
|
||||
* END - Methods for API
|
||||
*/
|
||||
@@ -857,6 +1085,99 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
|
||||
);
|
||||
});
|
||||
return true;
|
||||
case WAHAEvents.CALL_RECEIVED:
|
||||
this.sock.ev.on('call', (calls: WACallEvent[]) => {
|
||||
calls = lodash.filter(calls, { status: 'offer' });
|
||||
for (const call of calls) {
|
||||
const body = this.toCallData(call);
|
||||
handler(body);
|
||||
}
|
||||
});
|
||||
return true;
|
||||
case WAHAEvents.CALL_ACCEPTED:
|
||||
this.sock.ev.on('call', (calls: WACallEvent[]) => {
|
||||
calls = lodash.filter(calls, { status: 'accept' });
|
||||
for (const call of calls) {
|
||||
const body = this.toCallData(call);
|
||||
handler(body);
|
||||
}
|
||||
});
|
||||
return true;
|
||||
case WAHAEvents.CALL_REJECTED:
|
||||
this.sock.ev.on('call', (calls: WACallEvent[]) => {
|
||||
const acceptCalls = lodash.filter(calls, { status: 'accept' });
|
||||
if (acceptCalls.length > 0) {
|
||||
// We got two events when accepting calls - reject and accept
|
||||
// Like for each device
|
||||
// So if we see accepted call - ignore rejected
|
||||
return;
|
||||
}
|
||||
|
||||
calls = lodash.filter(calls, { status: 'reject' });
|
||||
for (const call of calls) {
|
||||
const body = this.toCallData(call);
|
||||
if (body.isGroup == null) {
|
||||
// We get two "reject" events, one with null property, ignore it
|
||||
return;
|
||||
}
|
||||
handler(body);
|
||||
}
|
||||
});
|
||||
return true;
|
||||
case WAHAEvents.LABEL_UPSERT:
|
||||
this.sock.ev.on('labels.edit', (data: NOWEBLabel) => {
|
||||
if (data.deleted) {
|
||||
return;
|
||||
}
|
||||
const body = this.toLabel(data);
|
||||
handler(body);
|
||||
});
|
||||
return true;
|
||||
case WAHAEvents.LABEL_DELETED:
|
||||
this.sock.ev.on('labels.edit', (data: NOWEBLabel) => {
|
||||
if (!data.deleted) {
|
||||
return;
|
||||
}
|
||||
const body = this.toLabel(data);
|
||||
handler(body);
|
||||
});
|
||||
return true;
|
||||
case WAHAEvents.LABEL_CHAT_ADDED:
|
||||
this.sock.ev.on('labels.association', async ({ association, type }) => {
|
||||
if (type !== 'add') {
|
||||
return;
|
||||
}
|
||||
if (association.type !== LabelAssociationType.Chat) {
|
||||
return;
|
||||
}
|
||||
const labelData = await this.store.getLabelById(association.labelId);
|
||||
const label = labelData ? this.toLabel(labelData) : null;
|
||||
const body: LabelChatAssociation = {
|
||||
labelId: association.labelId,
|
||||
chatId: toCusFormat(association.chatId),
|
||||
label: label,
|
||||
};
|
||||
handler(body);
|
||||
});
|
||||
return true;
|
||||
case WAHAEvents.LABEL_CHAT_DELETED:
|
||||
this.sock.ev.on('labels.association', async ({ association, type }) => {
|
||||
if (type !== 'remove') {
|
||||
return;
|
||||
}
|
||||
if (association.type !== LabelAssociationType.Chat) {
|
||||
return;
|
||||
}
|
||||
const labelData = await this.store.getLabelById(association.labelId);
|
||||
const label = labelData ? this.toLabel(labelData) : null;
|
||||
const body: LabelChatAssociation = {
|
||||
labelId: association.labelId,
|
||||
chatId: toCusFormat(association.chatId),
|
||||
label: label,
|
||||
};
|
||||
handler(body);
|
||||
});
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
@@ -918,16 +1239,16 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
|
||||
try {
|
||||
message = await this.downloadMedia(message);
|
||||
} catch (e) {
|
||||
this.log.error('Failed when tried to download media for a message');
|
||||
this.log.error(e, e.stack);
|
||||
this.logger.error('Failed when tried to download media for a message');
|
||||
this.logger.error(e, e.stack);
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
return await this.toWAMessage(message);
|
||||
} catch (error) {
|
||||
this.log.error('Failed to process incoming message');
|
||||
this.log.error(error);
|
||||
this.logger.error('Failed to process incoming message');
|
||||
this.logger.error(error);
|
||||
console.trace(error);
|
||||
return null;
|
||||
}
|
||||
@@ -936,18 +1257,8 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
|
||||
protected toWAMessage(message): Promise<WAMessage> {
|
||||
const fromToParticipant = getFromToParticipant(message);
|
||||
const id = buildMessageId(message.key);
|
||||
let body = message.message.conversation;
|
||||
if (!body) {
|
||||
// Some of the messages have no conversation, but instead have text in extendedTextMessage
|
||||
// https://github.com/devlikeapro/waha/issues/90
|
||||
body = message.message.extendedTextMessage?.text;
|
||||
}
|
||||
if (!body) {
|
||||
// Populate from caption
|
||||
const mediaContent = extractMediaContent(message.message);
|
||||
// @ts-ignore - AudioMessage doesn't have caption field
|
||||
body = mediaContent?.caption;
|
||||
}
|
||||
const body = this.extractBody(message.message);
|
||||
const replyTo = this.extractReplyTo(message.message);
|
||||
const ack = message.ack || message.status - 1;
|
||||
return Promise.resolve({
|
||||
id: id,
|
||||
@@ -967,10 +1278,45 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
|
||||
ackName: WAMessageAck[ack] || ACK_UNKNOWN,
|
||||
location: message.location,
|
||||
vCards: message.vCards,
|
||||
replyTo: replyTo,
|
||||
_data: message,
|
||||
});
|
||||
}
|
||||
|
||||
protected extractBody(message): string | null {
|
||||
if (!message) {
|
||||
return null;
|
||||
}
|
||||
let body = message.conversation;
|
||||
if (!body) {
|
||||
// Some of the messages have no conversation, but instead have text in extendedTextMessage
|
||||
// https://github.com/devlikeapro/waha/issues/90
|
||||
body = message.extendedTextMessage?.text;
|
||||
}
|
||||
if (!body) {
|
||||
// Populate from caption
|
||||
const mediaContent = extractMediaContent(message);
|
||||
// @ts-ignore - AudioMessage doesn't have caption field
|
||||
body = mediaContent?.caption;
|
||||
}
|
||||
return body;
|
||||
}
|
||||
|
||||
protected extractReplyTo(message): ReplyToMessage | null {
|
||||
const msgType = getContentType(message);
|
||||
const contextInfo = message[msgType]?.contextInfo;
|
||||
if (!contextInfo) {
|
||||
return null;
|
||||
}
|
||||
const quotedMessage = contextInfo.quotedMessage;
|
||||
const body = this.extractBody(quotedMessage);
|
||||
return {
|
||||
id: contextInfo.stanzaId,
|
||||
participant: toCusFormat(contextInfo.participant),
|
||||
body: body,
|
||||
};
|
||||
}
|
||||
|
||||
protected toWAContact(contact: Contact) {
|
||||
contact.id = toCusFormat(contact.id);
|
||||
// @ts-ignore
|
||||
@@ -1094,6 +1440,20 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
|
||||
handler(payload);
|
||||
}
|
||||
|
||||
private toCallData(call: WACallEvent): CallData {
|
||||
// call.date can be either string 2024-07-18T09:45:55.000Z or Date
|
||||
const date = new Date(call.date);
|
||||
// convert to timestamp in seconds
|
||||
const timestamp: number = date.getTime() / 1000;
|
||||
return {
|
||||
id: call.id,
|
||||
from: toCusFormat(call.from),
|
||||
timestamp: timestamp,
|
||||
isVideo: call.isVideo,
|
||||
isGroup: call.isGroup,
|
||||
};
|
||||
}
|
||||
|
||||
private toWahaPresences(
|
||||
remoteJid: string,
|
||||
storedPresences: { [participant: string]: PresenceData },
|
||||
@@ -1120,11 +1480,23 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
|
||||
|
||||
protected downloadMedia(message) {
|
||||
const processor = new EngineMediaProcessor(this);
|
||||
return this.mediaManager.processMedia(processor, message);
|
||||
return this.mediaManager.processMedia(processor, message, this.name);
|
||||
}
|
||||
|
||||
protected async getMessageOptions(request: any): Promise<any> {
|
||||
let quoted;
|
||||
if (request.reply_to) {
|
||||
const key = parseMessageIdSerialized(request.reply_to, true);
|
||||
quoted = await this.store.loadMessage(toJID(request.chatId), key.id);
|
||||
}
|
||||
|
||||
return {
|
||||
quoted: quoted,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export class EngineMediaProcessor implements IEngineMediaProcessor<any> {
|
||||
export class EngineMediaProcessor implements IMediaEngineProcessor<any> {
|
||||
constructor(public session: WhatsappSessionNoWebCore) {}
|
||||
|
||||
hasMedia(message: any): boolean {
|
||||
@@ -1153,6 +1525,9 @@ export class EngineMediaProcessor implements IEngineMediaProcessor<any> {
|
||||
* Convert from 11111111111@s.whatsapp.net to 11111111111@c.us
|
||||
*/
|
||||
function toCusFormat(remoteJid) {
|
||||
if (!remoteJid) {
|
||||
return remoteJid;
|
||||
}
|
||||
if (isJidGroup(remoteJid)) {
|
||||
return remoteJid;
|
||||
}
|
||||
@@ -1162,6 +1537,9 @@ function toCusFormat(remoteJid) {
|
||||
if (isLidUser(remoteJid)) {
|
||||
return remoteJid;
|
||||
}
|
||||
if (isNewsletter(remoteJid)) {
|
||||
return remoteJid;
|
||||
}
|
||||
if (!remoteJid) {
|
||||
return;
|
||||
}
|
||||
@@ -1183,6 +1561,9 @@ export function toJID(chatId) {
|
||||
if (isJidStatusBroadcast(chatId)) {
|
||||
return chatId;
|
||||
}
|
||||
if (isNewsletter(chatId)) {
|
||||
return chatId;
|
||||
}
|
||||
const number = chatId.split('@')[0];
|
||||
return number + '@s.whatsapp.net';
|
||||
}
|
||||
@@ -1202,7 +1583,11 @@ function buildMessageId({ id, remoteJid, fromMe }) {
|
||||
* false_11111111111@c.us_AAA
|
||||
* {id: "AAA", remoteJid: "11111111111@s.whatsapp.net", "fromMe": false}
|
||||
*/
|
||||
function parseMessageId(messageId) {
|
||||
function parseMessageIdSerialized(messageId: string, soft: boolean = false) {
|
||||
if (!messageId.includes('_') && soft) {
|
||||
return { id: messageId };
|
||||
}
|
||||
|
||||
const parts = messageId.split('_');
|
||||
if (parts.length != 3) {
|
||||
throw new Error(
|
||||
|
||||
@@ -3,6 +3,8 @@ import { Chat } from '@adiwajshing/baileys';
|
||||
export interface IChatRepository {
|
||||
getAll(): Promise<Chat[]>;
|
||||
|
||||
getAllByIds(ids: string[]): Promise<Chat[]>;
|
||||
|
||||
getAllWithMessages(limit?: number, offset?: number): Promise<Chat[]>;
|
||||
|
||||
getById(id: string): Promise<Chat | null>;
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
import {
|
||||
LabelAssociation,
|
||||
LabelAssociationType,
|
||||
} from '@adiwajshing/baileys/lib/Types/LabelAssociation';
|
||||
|
||||
export interface ILabelAssociationRepository {
|
||||
deleteOne(association: LabelAssociation): Promise<void>;
|
||||
|
||||
save(association: LabelAssociation): Promise<void>;
|
||||
|
||||
deleteByLabelId(labelId: string): Promise<void>;
|
||||
|
||||
getAssociationsByLabelId(
|
||||
labelId: string,
|
||||
type: LabelAssociationType,
|
||||
): Promise<LabelAssociation[]>;
|
||||
|
||||
getAssociationsByChatId(chatId: string): Promise<LabelAssociation[]>;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import { Contact } from '@adiwajshing/baileys';
|
||||
import { Label } from '@adiwajshing/baileys/lib/Types/Label';
|
||||
|
||||
export interface ILabelsRepository {
|
||||
getById(id: string): Promise<Label | null>;
|
||||
|
||||
getAll(): Promise<Label[]>;
|
||||
|
||||
getAllByIds(ids: string[]): Promise<Label[]>;
|
||||
|
||||
deleteById(id: string): Promise<void>;
|
||||
|
||||
save(label: Label): Promise<void>;
|
||||
}
|
||||
@@ -1,15 +1,40 @@
|
||||
import { WAMessage } from '@adiwajshing/baileys';
|
||||
import { LabelAssociation } from '@adiwajshing/baileys/lib/Types/LabelAssociation';
|
||||
import { ILabelAssociationRepository } from '@waha/core/engines/noweb/store/ILabelAssociationsRepository';
|
||||
import { ILabelsRepository } from '@waha/core/engines/noweb/store/ILabelsRepository';
|
||||
|
||||
import { IChatRepository } from './IChatRepository';
|
||||
import { IContactRepository } from './IContactRepository';
|
||||
import { IMessagesRepository } from './IMessagesRepository';
|
||||
|
||||
export interface INowebStorage {
|
||||
init(): Promise<void>;
|
||||
export abstract class INowebStorage {
|
||||
abstract init(): Promise<void>;
|
||||
|
||||
close(): Promise<void>;
|
||||
abstract close(): Promise<void>;
|
||||
|
||||
getContactsRepository(): IContactRepository;
|
||||
abstract getContactsRepository(): IContactRepository;
|
||||
|
||||
getChatRepository(): IChatRepository;
|
||||
abstract getChatRepository(): IChatRepository;
|
||||
|
||||
getMessagesRepository(): IMessagesRepository;
|
||||
abstract getMessagesRepository(): IMessagesRepository;
|
||||
|
||||
abstract getLabelsRepository(): ILabelsRepository;
|
||||
|
||||
abstract getLabelAssociationRepository(): ILabelAssociationRepository;
|
||||
|
||||
protected getMessagesMetadata(): Map<string, any> {
|
||||
return new Map()
|
||||
.set('jid', (msg: WAMessage) => msg.key.remoteJid)
|
||||
.set('id', (msg: WAMessage) => msg.key.id)
|
||||
.set('messageTimestamp', (msg: WAMessage) => msg.messageTimestamp);
|
||||
}
|
||||
|
||||
protected getLabelAssociationMetadata() {
|
||||
return new Map().set(
|
||||
'id',
|
||||
(a: LabelAssociation) =>
|
||||
// @ts-ignore
|
||||
`${a.type}_${a.labelId}_${a.chatId}_${a.messageId}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import {
|
||||
Contact,
|
||||
proto,
|
||||
} from '@adiwajshing/baileys';
|
||||
import { Label } from '@adiwajshing/baileys/lib/Types/Label';
|
||||
|
||||
export interface INowebStore {
|
||||
presences: any;
|
||||
@@ -23,4 +24,12 @@ export interface INowebStore {
|
||||
getContacts(): Promise<Contact[]>;
|
||||
|
||||
getContactById(jid: string): Promise<Contact>;
|
||||
|
||||
getLabels(): Promise<Label[]>;
|
||||
|
||||
getLabelById(labelId: string): Promise<Label | null>;
|
||||
|
||||
getChatsByLabelId(labelId: string): Promise<Chat[]>;
|
||||
|
||||
getChatLabels(chatId: string): Promise<Label[]>;
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Chat, Contact, makeInMemoryStore, proto } from '@adiwajshing/baileys';
|
||||
import { BadRequestException, ConsoleLogger } from '@nestjs/common';
|
||||
import { Label } from '@adiwajshing/baileys/lib/Types/Label';
|
||||
import { BadRequestException } from '@nestjs/common';
|
||||
|
||||
import { INowebStore } from './INowebStore';
|
||||
|
||||
@@ -51,4 +52,20 @@ export class NowebInMemoryStore implements INowebStore {
|
||||
getContactById(jid: string): Promise<Contact> {
|
||||
throw new BadRequestException(this.errorMessage);
|
||||
}
|
||||
|
||||
getLabels(): Promise<Label[]> {
|
||||
throw new BadRequestException(this.errorMessage);
|
||||
}
|
||||
|
||||
getLabelById(labelId: string): Promise<Label | null> {
|
||||
throw new BadRequestException(this.errorMessage);
|
||||
}
|
||||
|
||||
getChatsByLabelId(labelId: string): Promise<Chat[]> {
|
||||
throw new BadRequestException(this.errorMessage);
|
||||
}
|
||||
|
||||
getChatLabels(chatId: string): Promise<Label[]> {
|
||||
throw new BadRequestException(this.errorMessage);
|
||||
}
|
||||
}
|
||||
@@ -9,8 +9,15 @@ import {
|
||||
updateMessageWithReaction,
|
||||
updateMessageWithReceipt,
|
||||
} from '@adiwajshing/baileys';
|
||||
import { ConsoleLogger } from '@nestjs/common';
|
||||
import { Label } from '@adiwajshing/baileys/lib/Types/Label';
|
||||
import {
|
||||
LabelAssociation,
|
||||
LabelAssociationType,
|
||||
} from '@adiwajshing/baileys/lib/Types/LabelAssociation';
|
||||
import { ILabelAssociationRepository } from '@waha/core/engines/noweb/store/ILabelAssociationsRepository';
|
||||
import { ILabelsRepository } from '@waha/core/engines/noweb/store/ILabelsRepository';
|
||||
import { toNumber } from 'lodash';
|
||||
import { Logger } from 'pino';
|
||||
|
||||
import { toJID } from '../session.noweb.core';
|
||||
import { IChatRepository } from './IChatRepository';
|
||||
@@ -27,17 +34,21 @@ export class NowebPersistentStore implements INowebStore {
|
||||
private chatRepo: IChatRepository;
|
||||
private contactRepo: IContactRepository;
|
||||
private messagesRepo: IMessagesRepository;
|
||||
private labelsRepo: ILabelsRepository;
|
||||
private labelAssociationsRepo: ILabelAssociationRepository;
|
||||
public presences: any;
|
||||
private lock: any;
|
||||
|
||||
constructor(
|
||||
private log: ConsoleLogger,
|
||||
private logger: Logger,
|
||||
public storage: INowebStorage,
|
||||
) {
|
||||
this.socket = null;
|
||||
this.chatRepo = storage.getChatRepository();
|
||||
this.contactRepo = storage.getContactsRepository();
|
||||
this.messagesRepo = storage.getMessagesRepository();
|
||||
this.labelsRepo = storage.getLabelsRepository();
|
||||
this.labelAssociationsRepo = storage.getLabelAssociationRepository();
|
||||
this.presences = {};
|
||||
this.lock = new AsyncLock({ maxPending: Infinity });
|
||||
}
|
||||
@@ -82,6 +93,10 @@ export class NowebPersistentStore implements INowebStore {
|
||||
ev.on('contacts.update', (data) =>
|
||||
this.withLock('contacts', () => this.onContactUpdate(data)),
|
||||
);
|
||||
ev.on('labels.edit', (data) => this.onLabelsEdit(data));
|
||||
ev.on('labels.association', ({ association, type }) =>
|
||||
this.onLabelsAssociation(association, type),
|
||||
);
|
||||
// Presence
|
||||
ev.on('presence.update', (data) => this.onPresenceUpdate(data));
|
||||
this.socket = socket;
|
||||
@@ -89,7 +104,7 @@ export class NowebPersistentStore implements INowebStore {
|
||||
|
||||
async close(): Promise<void> {
|
||||
await this.storage?.close().catch((error) => {
|
||||
this.log.warn(`Failed to close storage: ${error}`);
|
||||
this.logger.warn(`Failed to close storage: ${error}`);
|
||||
});
|
||||
return;
|
||||
}
|
||||
@@ -97,7 +112,7 @@ export class NowebPersistentStore implements INowebStore {
|
||||
private async onMessagingHistorySet(history) {
|
||||
const { contacts, chats, messages, isLatest } = history;
|
||||
if (isLatest) {
|
||||
this.log.debug(
|
||||
this.logger.debug(
|
||||
'history sync - clearing all entities, got latest history',
|
||||
);
|
||||
await Promise.all([
|
||||
@@ -110,7 +125,7 @@ export class NowebPersistentStore implements INowebStore {
|
||||
await Promise.all([
|
||||
this.withLock('contacts', async () => {
|
||||
await this.onContactsUpsert(contacts);
|
||||
this.log.log(`history sync - '${contacts.length}' synced contacts`);
|
||||
this.logger.info(`history sync - '${contacts.length}' synced contacts`);
|
||||
}),
|
||||
this.withLock('chats', () => this.onChatUpsert(chats)),
|
||||
this.withLock('messages', () => this.syncMessagesHistory(messages)),
|
||||
@@ -120,7 +135,7 @@ export class NowebPersistentStore implements INowebStore {
|
||||
private async syncMessagesHistory(messages) {
|
||||
const realMessages = messages.filter(isRealMessage);
|
||||
await this.messagesRepo.upsert(realMessages);
|
||||
this.log.log(
|
||||
this.logger.info(
|
||||
`history sync - '${messages.length}' got messages, '${realMessages.length}' real messages`,
|
||||
);
|
||||
}
|
||||
@@ -128,12 +143,12 @@ export class NowebPersistentStore implements INowebStore {
|
||||
private async onMessagesUpsert(update) {
|
||||
const { messages, type } = update;
|
||||
if (type !== 'notify' && type !== 'append') {
|
||||
this.log.debug(`unexpected type for messages.upsert: '${type}'`);
|
||||
this.logger.debug(`unexpected type for messages.upsert: '${type}'`);
|
||||
return;
|
||||
}
|
||||
const realMessages = messages.filter(isRealMessage);
|
||||
await this.messagesRepo.upsert(realMessages);
|
||||
this.log.debug(
|
||||
this.logger.debug(
|
||||
`messages.upsert - ${messages.length} got messages, ${realMessages.length} real messages`,
|
||||
);
|
||||
}
|
||||
@@ -178,7 +193,7 @@ export class NowebPersistentStore implements INowebStore {
|
||||
chat.conversationTimestamp = toNumber(chat.conversationTimestamp);
|
||||
await this.chatRepo.save(chat);
|
||||
}
|
||||
this.log.log(`history sync - '${chats.length}' synced chats`);
|
||||
this.logger.info(`history sync - '${chats.length}' synced chats`);
|
||||
}
|
||||
|
||||
private async onChatUpdate(updates: ChatUpdate[]) {
|
||||
@@ -219,7 +234,7 @@ export class NowebPersistentStore implements INowebStore {
|
||||
const contact = await this.contactRepo.getById(update.id);
|
||||
|
||||
if (!contact) {
|
||||
this.log.warn(
|
||||
this.logger.warn(
|
||||
`got update for non-existent contact. update: '${JSON.stringify(
|
||||
update,
|
||||
)}'`,
|
||||
@@ -246,7 +261,7 @@ export class NowebPersistentStore implements INowebStore {
|
||||
for (const { key, reaction } of reactions) {
|
||||
const msg = await this.messagesRepo.getByJidById(key.remoteJid, key.id);
|
||||
if (!msg) {
|
||||
this.log.warn(
|
||||
this.logger.warn(
|
||||
`got reaction update for non-existent message. key: '${JSON.stringify(
|
||||
key,
|
||||
)}'`,
|
||||
@@ -262,7 +277,7 @@ export class NowebPersistentStore implements INowebStore {
|
||||
for (const { key, receipt } of updates) {
|
||||
const msg = await this.messagesRepo.getByJidById(key.remoteJid, key.id);
|
||||
if (!msg) {
|
||||
this.log.warn(
|
||||
this.logger.warn(
|
||||
`got receipt update for non-existent message. key: '${JSON.stringify(
|
||||
key,
|
||||
)}'`,
|
||||
@@ -274,6 +289,26 @@ export class NowebPersistentStore implements INowebStore {
|
||||
}
|
||||
}
|
||||
|
||||
private async onLabelsEdit(label: Label) {
|
||||
if (label.deleted) {
|
||||
await this.labelsRepo.deleteById(label.id);
|
||||
await this.labelAssociationsRepo.deleteByLabelId(label.id);
|
||||
} else {
|
||||
await this.labelsRepo.save(label);
|
||||
}
|
||||
}
|
||||
|
||||
private async onLabelsAssociation(
|
||||
association: LabelAssociation,
|
||||
type: 'add' | 'remove',
|
||||
) {
|
||||
if (type === 'remove') {
|
||||
await this.labelAssociationsRepo.deleteOne(association);
|
||||
} else {
|
||||
await this.labelAssociationsRepo.save(association);
|
||||
}
|
||||
}
|
||||
|
||||
private async onPresenceUpdate({ id, presences: update }) {
|
||||
this.presences[id] = this.presences[id] || {};
|
||||
Object.assign(this.presences[id], update);
|
||||
@@ -302,4 +337,29 @@ export class NowebPersistentStore implements INowebStore {
|
||||
getContacts() {
|
||||
return this.contactRepo.getAll();
|
||||
}
|
||||
|
||||
getLabels(): Promise<Label[]> {
|
||||
return this.labelsRepo.getAll();
|
||||
}
|
||||
|
||||
getLabelById(labelId: string): Promise<Label | null> {
|
||||
return this.labelsRepo.getById(labelId);
|
||||
}
|
||||
|
||||
async getChatsByLabelId(labelId: string): Promise<Chat[]> {
|
||||
const associations =
|
||||
await this.labelAssociationsRepo.getAssociationsByLabelId(
|
||||
labelId,
|
||||
LabelAssociationType.Chat,
|
||||
);
|
||||
const ids = associations.map((association) => association.chatId);
|
||||
return await this.chatRepo.getAllByIds(ids);
|
||||
}
|
||||
|
||||
async getChatLabels(chatId: string): Promise<Label[]> {
|
||||
const associations =
|
||||
await this.labelAssociationsRepo.getAssociationsByChatId(chatId);
|
||||
const ids = associations.map((association) => association.labelId);
|
||||
return await this.labelsRepo.getAllByIds(ids);
|
||||
}
|
||||
}
|
||||
@@ -53,4 +53,26 @@ export const NOWEB_STORE_SCHEMA = [
|
||||
new Index('timestamp_index', ['messageTimestamp']),
|
||||
],
|
||||
),
|
||||
new Schema(
|
||||
'labels',
|
||||
[new Field('id', 'TEXT'), new Field('data', 'TEXT')],
|
||||
[new Index('labels_id_index', ['id'])],
|
||||
),
|
||||
new Schema(
|
||||
'labelAssociations',
|
||||
[
|
||||
new Field('id', 'TEXT'),
|
||||
new Field('type', 'TEXT'),
|
||||
new Field('labelId', 'TEXT'),
|
||||
new Field('chatId', 'TEXT'),
|
||||
new Field('messageId', 'TEXT'),
|
||||
new Field('data', 'TEXT'),
|
||||
],
|
||||
[
|
||||
new Index('label_assoc_id_index', ['id']),
|
||||
new Index('label_assoc_type_label_index', ['type', 'labelId']),
|
||||
new Index('label_assoc_type_chat_index', ['type', 'chatId']),
|
||||
new Index('label_assoc_type_message_index', ['type', 'messageId']),
|
||||
],
|
||||
),
|
||||
];
|
||||
@@ -38,6 +38,15 @@ export class Sqlite3KVRepository<Entity> {
|
||||
return this.all(this.select());
|
||||
}
|
||||
|
||||
getAllByIds(ids: string[]) {
|
||||
return this.all(this.select().whereIn('id', ids));
|
||||
}
|
||||
|
||||
protected getAllBy(filters: any) {
|
||||
const query = this.select().where(filters);
|
||||
return this.all(query);
|
||||
}
|
||||
|
||||
protected async getBy(filters: any) {
|
||||
const query = this.select().where(filters).limit(1);
|
||||
return this.get(query);
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
import {
|
||||
LabelAssociation,
|
||||
LabelAssociationType,
|
||||
} from '@adiwajshing/baileys/lib/Types/LabelAssociation';
|
||||
import { ILabelAssociationRepository } from '@waha/core/engines/noweb/store/ILabelAssociationsRepository';
|
||||
|
||||
import { Sqlite3KVRepository } from './Sqlite3KVRepository';
|
||||
|
||||
export class Sqlite3LabelAssociationsRepository
|
||||
extends Sqlite3KVRepository<LabelAssociation>
|
||||
implements ILabelAssociationRepository
|
||||
{
|
||||
async deleteOne(association: LabelAssociation): Promise<void> {
|
||||
await this.deleteBy({
|
||||
type: association.type,
|
||||
chatId: association.chatId,
|
||||
labelId: association.labelId,
|
||||
// @ts-ignore: messageId doesn't existing in ChatLabelAssociation
|
||||
messageId: association.messageId || null,
|
||||
});
|
||||
}
|
||||
|
||||
async deleteByLabelId(labelId: string): Promise<void> {
|
||||
await this.deleteBy({ labelId: labelId });
|
||||
}
|
||||
|
||||
getAssociationsByLabelId(
|
||||
labelId: string,
|
||||
type: LabelAssociationType,
|
||||
): Promise<LabelAssociation[]> {
|
||||
return this.getAllBy({
|
||||
type: type,
|
||||
labelId: labelId,
|
||||
});
|
||||
}
|
||||
|
||||
getAssociationsByChatId(chatId: string): Promise<LabelAssociation[]> {
|
||||
return this.getAllBy({ chatId: chatId, type: LabelAssociationType.Chat });
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
import { Label } from '@adiwajshing/baileys/lib/Types/Label';
|
||||
import { ILabelsRepository } from '@waha/core/engines/noweb/store/ILabelsRepository';
|
||||
|
||||
import { Sqlite3KVRepository } from './Sqlite3KVRepository';
|
||||
|
||||
export class Sqlite3LabelsRepository
|
||||
extends Sqlite3KVRepository<Label>
|
||||
implements ILabelsRepository {}
|
||||
@@ -1,4 +1,9 @@
|
||||
import { WAMessage } from '@adiwajshing/baileys';
|
||||
import { LabelAssociation } from '@adiwajshing/baileys/lib/Types/LabelAssociation';
|
||||
import { ILabelAssociationRepository } from '@waha/core/engines/noweb/store/ILabelAssociationsRepository';
|
||||
import { ILabelsRepository } from '@waha/core/engines/noweb/store/ILabelsRepository';
|
||||
import { Sqlite3LabelAssociationsRepository } from '@waha/core/engines/noweb/store/sqlite3/Sqlite3LabelAssociationsRepository';
|
||||
import { Sqlite3LabelsRepository } from '@waha/core/engines/noweb/store/sqlite3/Sqlite3LabelsRepository';
|
||||
|
||||
import { INowebStorage } from '../INowebStorage';
|
||||
import { Field, Index, NOWEB_STORE_SCHEMA, Schema } from '../Schema';
|
||||
@@ -10,11 +15,12 @@ import { Sqlite3SchemaValidation } from './Sqlite3SchemaValidation';
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const Database = require('better-sqlite3');
|
||||
|
||||
export class Sqlite3Storage implements INowebStorage {
|
||||
export class Sqlite3Storage extends INowebStorage {
|
||||
private readonly db: any;
|
||||
private readonly tables: Schema[];
|
||||
|
||||
constructor(filePath: string) {
|
||||
super();
|
||||
this.db = new Database(filePath);
|
||||
this.tables = NOWEB_STORE_SCHEMA;
|
||||
}
|
||||
@@ -71,6 +77,33 @@ export class Sqlite3Storage implements INowebStorage {
|
||||
this.db.exec(
|
||||
'CREATE INDEX IF NOT EXISTS timestamp_index ON messages (messageTimestamp)',
|
||||
);
|
||||
|
||||
//
|
||||
// Labels
|
||||
//
|
||||
this.db.exec(
|
||||
'CREATE TABLE IF NOT EXISTS labels (id TEXT PRIMARY KEY, data TEXT)',
|
||||
);
|
||||
this.db.exec(
|
||||
'CREATE UNIQUE INDEX IF NOT EXISTS labels_id_index ON labels (id)',
|
||||
);
|
||||
|
||||
// Label associations
|
||||
this.db.exec(
|
||||
'CREATE TABLE IF NOT EXISTS labelAssociations (id TEXT PRIMARY KEY, type TEXT, labelId TEXT, chatId TEXT, messageId TEXT, data TEXT)',
|
||||
);
|
||||
this.db.exec(
|
||||
'CREATE UNIQUE INDEX IF NOT EXISTS label_assoc_id_index ON labelAssociations (id)',
|
||||
);
|
||||
this.db.exec(
|
||||
'CREATE INDEX IF NOT EXISTS label_assoc_type_label_index ON labelAssociations (type, labelId)',
|
||||
);
|
||||
this.db.exec(
|
||||
'CREATE INDEX IF NOT EXISTS label_assoc_type_chat_index ON labelAssociations (type, chatId)',
|
||||
);
|
||||
this.db.exec(
|
||||
'CREATE INDEX IF NOT EXISTS label_assoc_type_message_index ON labelAssociations (type, messageId)',
|
||||
);
|
||||
}
|
||||
|
||||
async close() {
|
||||
@@ -85,11 +118,21 @@ export class Sqlite3Storage implements INowebStorage {
|
||||
return new Sqlite3ChatRepository(this.db, this.getSchema('chats'));
|
||||
}
|
||||
|
||||
getLabelsRepository(): ILabelsRepository {
|
||||
return new Sqlite3LabelsRepository(this.db, this.getSchema('labels'));
|
||||
}
|
||||
|
||||
getLabelAssociationRepository(): ILabelAssociationRepository {
|
||||
const metadata = this.getLabelAssociationMetadata();
|
||||
return new Sqlite3LabelAssociationsRepository(
|
||||
this.db,
|
||||
this.getSchema('labelAssociations'),
|
||||
metadata,
|
||||
);
|
||||
}
|
||||
|
||||
getMessagesRepository() {
|
||||
const metadata = new Map()
|
||||
.set('jid', (msg: WAMessage) => msg.key.remoteJid)
|
||||
.set('id', (msg: WAMessage) => msg.key.id)
|
||||
.set('messageTimestamp', (msg: WAMessage) => msg.messageTimestamp);
|
||||
const metadata = this.getMessagesMetadata();
|
||||
return new Sqlite3MessagesRepository(
|
||||
this.db,
|
||||
this.getSchema('messages'),
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { UnprocessableEntityException } from '@nestjs/common/exceptions/unprocessable-entity.exception';
|
||||
import { IMediaEngineProcessor } from '@waha/core/media/IMediaEngineProcessor';
|
||||
import * as Buffer from 'buffer';
|
||||
import { create, CreateConfig, Message, Whatsapp } from 'venom-bot';
|
||||
|
||||
@@ -21,7 +22,6 @@ import {
|
||||
WAHASessionStatus,
|
||||
} from '../../../structures/enums.dto';
|
||||
import { WAMessage } from '../../../structures/responses.dto';
|
||||
import { IEngineMediaProcessor } from '../../abc/media.abc';
|
||||
import { WAHAInternalEvent, WhatsappSession } from '../../abc/session.abc';
|
||||
import { NotImplementedByEngineError } from '../../exceptions';
|
||||
import { QR } from '../../QR';
|
||||
@@ -69,7 +69,7 @@ export class WhatsappSessionVenomCore extends WhatsappSession {
|
||||
this.qr.save(base64Qrimg, urlCode);
|
||||
this.printQR(this.qr);
|
||||
this.status = WAHASessionStatus.SCAN_QR_CODE;
|
||||
this.log.debug('Number of attempts to read the qrcode: ', attempts);
|
||||
this.logger.debug('Number of attempts to read the qrcode: ', attempts);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ export class WhatsappSessionVenomCore extends WhatsappSession {
|
||||
this.whatsapp = await this.buildClient();
|
||||
} catch (error) {
|
||||
this.status = WAHASessionStatus.FAILED;
|
||||
this.log.error(error);
|
||||
this.logger.error(error);
|
||||
this.qr.save('');
|
||||
return;
|
||||
}
|
||||
@@ -90,8 +90,9 @@ export class WhatsappSessionVenomCore extends WhatsappSession {
|
||||
}
|
||||
|
||||
async stop() {
|
||||
await this.whatsapp.close();
|
||||
this.status = WAHASessionStatus.STOPPED;
|
||||
this.events.removeAllListeners();
|
||||
await this.whatsapp.close();
|
||||
}
|
||||
|
||||
subscribeEngineEvent(event: WAHAEvents | string, handler: (message) => void) {
|
||||
@@ -247,7 +248,7 @@ export class WhatsappSessionVenomCore extends WhatsappSession {
|
||||
|
||||
protected downloadMedia(message: Message) {
|
||||
const processor = new EngineMediaProcessor(this);
|
||||
return this.mediaManager.processMedia(processor, message);
|
||||
return this.mediaManager.processMedia(processor, message, this.name);
|
||||
}
|
||||
|
||||
private processIncomingMessage(message: Message) {
|
||||
@@ -279,7 +280,7 @@ export class WhatsappSessionVenomCore extends WhatsappSession {
|
||||
}
|
||||
}
|
||||
|
||||
export class EngineMediaProcessor implements IEngineMediaProcessor<Message> {
|
||||
export class EngineMediaProcessor implements IMediaEngineProcessor<Message> {
|
||||
constructor(public session: WhatsappSessionVenomCore) {}
|
||||
|
||||
hasMedia(message: any): boolean {
|
||||
|
||||
@@ -1,535 +0,0 @@
|
||||
<!doctype html>
|
||||
<html class="no-js" dir="ltr" loc="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
<title>WhatsApp Web</title>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<meta name="google" content="notranslate" />
|
||||
<meta name="format-detection" content="telephone=no" />
|
||||
<meta
|
||||
name="description"
|
||||
content="Quickly send and receive WhatsApp messages right from your computer."
|
||||
/>
|
||||
<meta
|
||||
name="og:description"
|
||||
content="Quickly send and receive WhatsApp messages right from your computer."
|
||||
/>
|
||||
<meta name="og:url" content="https://web.whatsapp.com/" />
|
||||
<meta name="og:title" content="WhatsApp Web" />
|
||||
<meta
|
||||
name="og:image"
|
||||
content="https://static.facebook.com/images/whatsapp/www/whatsapp-promo.png"
|
||||
/>
|
||||
<link
|
||||
id="favicon"
|
||||
rel="shortcut icon"
|
||||
href="/img/favicon/1x/favicon.png"
|
||||
type="image/png"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-icon"
|
||||
sizes="192x192"
|
||||
href="/apple-touch-icon.png"
|
||||
type="image/png"
|
||||
/>
|
||||
<meta
|
||||
name="theme-color"
|
||||
content="#111b21"
|
||||
media="(prefers-color-scheme: dark)"
|
||||
/>
|
||||
<meta name="theme-color" content="#f0f2f5" />
|
||||
<link
|
||||
id="whatsapp-pwa-manifest-link"
|
||||
rel="manifest"
|
||||
href="/manifest.json"
|
||||
crossorigin="use-credentials"
|
||||
/>
|
||||
<style>
|
||||
#initial_startup {
|
||||
--startup-background: #f0f2f5;
|
||||
--startup-background-rgb: 240, 242, 245;
|
||||
--startup-icon: #bbc5cb;
|
||||
--secondary-lighter: #8696a0;
|
||||
--primary-title: #41525d;
|
||||
--progress-primary: #00c298;
|
||||
--progress-background: #e9edef;
|
||||
}
|
||||
.dark #initial_startup {
|
||||
--startup-background: #111b21;
|
||||
--startup-background-rgb: 17, 27, 33;
|
||||
--startup-icon: #676f73;
|
||||
--primary-title: rgba(233, 237, 239, 0.88);
|
||||
--secondary-lighter: #667781;
|
||||
--progress-primary: #0b846d;
|
||||
--progress-background: #233138;
|
||||
}
|
||||
#app,
|
||||
body,
|
||||
html {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
#app {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
#initial_startup {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
user-select: none;
|
||||
background-color: var(--startup-background);
|
||||
}
|
||||
#initial_startup .graphic {
|
||||
margin-top: -40px;
|
||||
color: var(--startup-icon);
|
||||
}
|
||||
#initial_startup .graphic .resume-logo {
|
||||
transform: translateX(calc(50% - 52px / 2));
|
||||
}
|
||||
#initial_startup .graphic::after {
|
||||
position: relative;
|
||||
top: -100%;
|
||||
left: calc(50% - 72px * 2 - 72px / 2);
|
||||
display: block;
|
||||
width: calc(72px * 3);
|
||||
height: 100%;
|
||||
content: '';
|
||||
background: linear-gradient(
|
||||
to right,
|
||||
rgba(var(--startup-background-rgb), 0.5) 0,
|
||||
rgba(var(--startup-background-rgb), 0.5) 33.33%,
|
||||
rgba(var(--startup-background-rgb), 0) 44.1%,
|
||||
rgba(var(--startup-background-rgb), 0) 55.8%,
|
||||
rgba(var(--startup-background-rgb), 0.5) 66.66%,
|
||||
rgba(var(--startup-background-rgb), 0.5) 100%
|
||||
);
|
||||
opacity: 1;
|
||||
animation: shimmer 1.5s linear 0.6s infinite;
|
||||
}
|
||||
html[dir='rtl'] #initial_startup .graphic::after {
|
||||
animation-direction: reverse;
|
||||
}
|
||||
@keyframes shimmer {
|
||||
from {
|
||||
left: calc(50% - 72px * 2 - 72px / 2);
|
||||
}
|
||||
to {
|
||||
left: calc(50% - 72px / 2);
|
||||
}
|
||||
}
|
||||
#initial_startup .progress {
|
||||
position: relative;
|
||||
width: 420px;
|
||||
height: 3px;
|
||||
margin-top: 40px;
|
||||
}
|
||||
#initial_startup .progress progress {
|
||||
vertical-align: top;
|
||||
}
|
||||
#initial_startup .main {
|
||||
margin-top: 40px;
|
||||
font-size: 17px;
|
||||
color: var(--primary-title);
|
||||
}
|
||||
#initial_startup .secondary {
|
||||
margin-top: 12px;
|
||||
font-size: 14px;
|
||||
color: var(--secondary-lighter);
|
||||
}
|
||||
#initial_startup .secondary span {
|
||||
display: inline-block;
|
||||
margin-bottom: 2px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
progress {
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
width: 100%;
|
||||
height: 3px;
|
||||
margin: 0;
|
||||
color: var(--progress-primary);
|
||||
background-color: var(--progress-background);
|
||||
border: none;
|
||||
}
|
||||
progress[value]::-webkit-progress-bar {
|
||||
background-color: var(--progress-background);
|
||||
}
|
||||
progress[value]::-moz-progress-bar,
|
||||
progress[value]::-webkit-progress-value {
|
||||
background-color: var(--progress-primary);
|
||||
transition: width 0.45s ease;
|
||||
}
|
||||
</style>
|
||||
<link
|
||||
href="/stylex-f0601c57714fe972a8c4d2c2562f8082.css"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
<link href="/app-6113f1562d101247269b.css" rel="stylesheet" />
|
||||
</head>
|
||||
<body class="web">
|
||||
<script
|
||||
data-binary-transparency-hash-key="inline-js-d11c72a06542fc3b43af600028cf0f996e4b9b178dfa047e18730efaf74aab0b"
|
||||
>
|
||||
try {
|
||||
var systemThemeDark,
|
||||
theme = window.localStorage.getItem('theme'),
|
||||
systemThemeMode = window.localStorage.getItem('system-theme-mode');
|
||||
if (('true' === systemThemeMode || !theme) && window.matchMedia) {
|
||||
var systemTheme = window.matchMedia('(prefers-color-scheme: dark)');
|
||||
systemThemeDark = systemTheme && systemTheme.matches;
|
||||
}
|
||||
var darkTheme = '"dark"' === theme || Boolean(systemThemeDark);
|
||||
darkTheme && document.body.classList.add('dark');
|
||||
} catch (e) {}
|
||||
</script>
|
||||
<div id="app"></div>
|
||||
<div id="hard_expire_time" data-time="1719543128.405"></div>
|
||||
<div id="initial_startup">
|
||||
<div class="graphic">
|
||||
<span
|
||||
><svg width="250" height="52" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
class="resume-logo"
|
||||
d="M37.7 31.2c-.6-.4-3.8-2-4.4-2.1-.6-.2-1-.4-1.4.3l-2 2.5c-.4.4-.8.5-1.5.2-.6-.3-2.7-1-5.1-3.2-2-1.7-3.2-3.8-3.6-4.5-.4-.6 0-1 .3-1.3l1-1.1.6-1.1c.2-.4 0-.8 0-1.1l-2-4.8c-.6-1.3-1.1-1-1.5-1.1h-1.2c-.5 0-1.2.1-1.8.8-.5.6-2.2 2.2-2.2 5.3 0 3.2 2.3 6.3 2.6 6.7.3.4 4.6 7 11 9.7l3.7 1.4c1.5.5 3 .4 4 .2 1.3-.1 3.9-1.5 4.4-3 .5-1.5.5-2.8.4-3-.2-.4-.6-.5-1.3-.8M26 47.2c-3.9 0-7.6-1-11-3l-.7-.4-8.1 2L8.4 38l-.6-.8A21.4 21.4 0 0126 4.4a21.3 21.3 0 0121.4 21.4c0 11.8-9.6 21.4-21.4 21.4M44.2 7.6a25.8 25.8 0 00-40.6 31L0 52l13.7-3.6A25.8 25.8 0 0044.3 7.5"
|
||||
fill="currentColor"
|
||||
></path></svg
|
||||
></span>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<progress value="0" max="100" dir="ltr"></progress>
|
||||
</div>
|
||||
<div class="main">WhatsApp</div>
|
||||
<div class="secondary">
|
||||
<span
|
||||
><svg width="10" height="12" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="M5 1.6c1.4 0 2.5 1 2.6 2.4v1.5h.2c.5 0 1 .4 1 1V10c0 .6-.5 1-1 1H2.3a1 1 0 01-1.1-1V6.5c0-.6.5-1 1-1h.2V4.2c0-1.4 1-2.5 2.4-2.6H5zm0 1.2c-.7 0-1.3.6-1.3 1.3v1.4h2.6V4.2c0-.7-.4-1.2-1-1.3H5z"
|
||||
fill="currentColor"
|
||||
></path>
|
||||
</svg> </span
|
||||
> End-to-end encrypted
|
||||
</div>
|
||||
</div>
|
||||
<link
|
||||
rel="preload"
|
||||
crossorigin="anonymous"
|
||||
as="fetch"
|
||||
href="/binary-transparency-manifest-2.2412.54.json"
|
||||
id="binary-transparency-manifest-preload"
|
||||
/>
|
||||
<script src="/libsignal-protocol-ee5b8ba.min.js"></script>
|
||||
<script defer="defer" src="/runtime.295f0230b6dbd8983513.js"></script>
|
||||
<script
|
||||
data-binary-transparency-hash-key="inline-js-cdf06293c99d00ee0c1bc0fcfdbd76a7ae9aef6290926dbff0cba3a7994b7fca"
|
||||
>
|
||||
/*! Copyright (c) 2024 WhatsApp Inc. All Rights Reserved. */
|
||||
(self.webpackChunkwhatsapp_web_client =
|
||||
self.webpackChunkwhatsapp_web_client || []).push([
|
||||
[5617],
|
||||
{
|
||||
307914: (e) => {
|
||||
e.exports = function (e) {
|
||||
return e && e.__esModule ? e : { default: e };
|
||||
};
|
||||
},
|
||||
595318: (e) => {
|
||||
(e.exports = function (e) {
|
||||
return e && e.__esModule ? e : { default: e };
|
||||
}),
|
||||
(e.exports.default = e.exports),
|
||||
(e.exports.__esModule = !0);
|
||||
},
|
||||
415227: (e, t) => {
|
||||
'use strict';
|
||||
Object.defineProperty(t, '__esModule', { value: !0 }),
|
||||
(t.default = function (e) {
|
||||
const t = new Error(e);
|
||||
if (void 0 === t.stack)
|
||||
try {
|
||||
throw t;
|
||||
} catch (e) {}
|
||||
return t;
|
||||
});
|
||||
},
|
||||
670983: (e, t, r) => {
|
||||
'use strict';
|
||||
var n = r(307914);
|
||||
Object.defineProperty(t, '__esModule', { value: !0 }),
|
||||
(t.default = function (e) {
|
||||
let t =
|
||||
arguments.length > 1 && void 0 !== arguments[1]
|
||||
? arguments[1]
|
||||
: '?';
|
||||
if (null == e)
|
||||
throw (0, o.default)('Unexpected null or undefined: ' + t);
|
||||
return e;
|
||||
});
|
||||
var o = n(r(415227));
|
||||
},
|
||||
250473: (e, t, r) => {
|
||||
'use strict';
|
||||
Object.defineProperty(t, '__esModule', { value: !0 }),
|
||||
(t.UNIQUE_UPLOADS_ALLOWED_BEFORE_THROTTLE =
|
||||
t.TICKET_URL =
|
||||
t.CLB_URL =
|
||||
t.CLB_TOKEN =
|
||||
t.CLB_CHECK_URL =
|
||||
void 0);
|
||||
var n = r(508247);
|
||||
(t.CLB_CHECK_URL =
|
||||
'https://crashlogs.whatsapp.net/wa_fls_upload_check'),
|
||||
(t.CLB_TOKEN =
|
||||
'1063127757113399|745146ffa34413f9dbb5469f5370b7af'),
|
||||
(t.CLB_URL = 'https://crashlogs.whatsapp.net/wa_clb_data');
|
||||
const o = n.DYN_ORIGIN + 'web-contact-us';
|
||||
(t.TICKET_URL = o), (t.UNIQUE_UPLOADS_ALLOWED_BEFORE_THROTTLE = 0);
|
||||
},
|
||||
207024: (e, t, r) => {
|
||||
'use strict';
|
||||
var n = r(595318);
|
||||
Object.defineProperty(t, '__esModule', { value: !0 }),
|
||||
(t.getDistribution = function () {
|
||||
let e = 'unknown';
|
||||
return (e = 'prod'), 'web_prod';
|
||||
}),
|
||||
(t.getLogUserAgent = function (e) {
|
||||
let t,
|
||||
{ appVersion: r, browser: n, device: o } = e;
|
||||
return (t = 'Web/' + n), `WhatsApp/${r} ${t} Device/${o}`;
|
||||
}),
|
||||
n(r(472514)),
|
||||
n(r(556869));
|
||||
},
|
||||
794858: (e, t, r) => {
|
||||
'use strict';
|
||||
var n = r(595318),
|
||||
o = n(r(670983)),
|
||||
a = r(508247),
|
||||
s = r(250473),
|
||||
c = r(207024),
|
||||
_ = n(r(174285)),
|
||||
u = r(425017);
|
||||
function i(e) {
|
||||
!(function (e, t) {
|
||||
const r = window.navigator.userAgent;
|
||||
if (r === p && e.includes('getElementsByTagName')) return;
|
||||
const n = new FormData(),
|
||||
i = new Blob([e], { type: 'text/plain' });
|
||||
n.append(
|
||||
'from_jid',
|
||||
(function () {
|
||||
if (f) return f;
|
||||
try {
|
||||
(f = JSON.parse(
|
||||
(0, o.default)(_.default, 'localStorage').getItem(
|
||||
d.UNKNOWN_ID,
|
||||
),
|
||||
)),
|
||||
f && (f = f.replace('-', ''));
|
||||
} catch (e) {}
|
||||
if (!f) {
|
||||
f = 'unknown' + Math.floor(1e10 * Math.random());
|
||||
const e = f;
|
||||
try {
|
||||
(0, o.default)(_.default, 'localStorage').setItem(
|
||||
d.UNKNOWN_ID,
|
||||
JSON.stringify(e),
|
||||
);
|
||||
} catch (e) {}
|
||||
}
|
||||
return (0, o.default)(f, 'id');
|
||||
})(),
|
||||
),
|
||||
n.append(
|
||||
'agent',
|
||||
(0, c.getLogUserAgent)(
|
||||
(0, u.parseUASimple)(r, a.VERSION_BASE),
|
||||
),
|
||||
),
|
||||
n.append('file', i, 'logs.txt'),
|
||||
n.append('tags', 'load');
|
||||
const l = new XMLHttpRequest(),
|
||||
I =
|
||||
s.CLB_URL +
|
||||
'?access_token=' +
|
||||
encodeURIComponent(s.CLB_TOKEN);
|
||||
l.open('POST', I, !0), l.send(n);
|
||||
})(e);
|
||||
}
|
||||
function l(e) {
|
||||
let { error: t, reason: r, stack: n } = e;
|
||||
const o = new Date().toISOString();
|
||||
return `${o}: error: ${t}\n${o}: reason for logs: ${r}\n${o}: userAgent: ${window.navigator.userAgent}\n${n}`;
|
||||
}
|
||||
null == window.onerror &&
|
||||
(window.onerror = function (e, t, r) {
|
||||
const n = t.split('?')[0];
|
||||
return "Uncaught SyntaxError: Unexpected token '<'" === e
|
||||
? ((function (e) {
|
||||
i(
|
||||
l({
|
||||
error: 'failed to load a js or css bundle',
|
||||
reason: `failed to load [${e
|
||||
.split('/')[3]
|
||||
.replace(/^\//, '')}]`,
|
||||
stack: '',
|
||||
}),
|
||||
);
|
||||
})(n),
|
||||
!0)
|
||||
: (i(
|
||||
l({
|
||||
error: e,
|
||||
reason: `Error at [${n}:${r}]`,
|
||||
stack: '',
|
||||
}),
|
||||
),
|
||||
!1);
|
||||
});
|
||||
const d = { UNKNOWN_ID: a.UNKNOWN_ID },
|
||||
p =
|
||||
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36';
|
||||
let f;
|
||||
},
|
||||
425017: (e, t) => {
|
||||
'use strict';
|
||||
function r(e) {
|
||||
return e.includes('windows')
|
||||
? 'Windows'
|
||||
: e.includes('mac')
|
||||
? 'Mac OS'
|
||||
: e.includes('linux')
|
||||
? 'Linux'
|
||||
: 'Unparsed';
|
||||
}
|
||||
Object.defineProperty(t, '__esModule', { value: !0 }),
|
||||
(t.parseUASimple = function (e, t) {
|
||||
const n = e.toLowerCase();
|
||||
return { browser: s(n), device: r(n), appVersion: t };
|
||||
});
|
||||
const n = /(chrome|firefox)\/([\w\.]+)/i,
|
||||
o = /(edge|opr)\/([\w\.]+)/i,
|
||||
a = {
|
||||
chrome: 'Chrome',
|
||||
edge: 'Edge',
|
||||
opr: 'Opera',
|
||||
firefox: 'Firefox',
|
||||
};
|
||||
function s(e) {
|
||||
const t = e.match(o) || e.match(n);
|
||||
return null == t ? 'Unparsed' : `${a[t[1]]} ${t[2]}`;
|
||||
}
|
||||
},
|
||||
174285: (e, t) => {
|
||||
'use strict';
|
||||
let r;
|
||||
Object.defineProperty(t, '__esModule', { value: !0 }),
|
||||
(t.default = void 0);
|
||||
try {
|
||||
r = window.localStorage;
|
||||
} catch (e) {}
|
||||
var n = r;
|
||||
t.default = n;
|
||||
},
|
||||
508247: (e, t) => {
|
||||
'use strict';
|
||||
Object.defineProperty(t, '__esModule', { value: !0 }),
|
||||
(t.WS_ORIGIN =
|
||||
t.WEB_PUBLIC_PATH =
|
||||
t.VERSION_TERTIARY =
|
||||
t.VERSION_STR =
|
||||
t.VERSION_SECONDARY =
|
||||
t.VERSION_PRIMARY =
|
||||
t.VERSION_BASE =
|
||||
t.USER_TIMINGS =
|
||||
t.UNKNOWN_ID =
|
||||
t.LOCALHOST_ENV_CONFIG =
|
||||
t.HASH_PLACEHOLDER =
|
||||
t.FLB_PLATFORM =
|
||||
t.FB_APP_ID =
|
||||
t.DYN_ORIGIN =
|
||||
t.DIFF_VERSION =
|
||||
t.DIFF_ID =
|
||||
t.BUILD_URL =
|
||||
t.BUILD_TIMESTAMP =
|
||||
t.BUILD_ID =
|
||||
void 0);
|
||||
t.DIFF_ID = '';
|
||||
(t.DIFF_VERSION = ''),
|
||||
(t.LOCALHOST_ENV_CONFIG = !1),
|
||||
(t.HASH_PLACEHOLDER = '507042ed75b89fb00e8ef35da3541122cbc261e6'),
|
||||
(t.VERSION_PRIMARY = '2'),
|
||||
(t.VERSION_SECONDARY = '2412'),
|
||||
(t.VERSION_TERTIARY = '54'),
|
||||
(t.VERSION_BASE = '2.2412.54'),
|
||||
(t.VERSION_STR = '2.2412.54'),
|
||||
(t.DYN_ORIGIN = 'https://web.whatsapp.com/'),
|
||||
(t.WS_ORIGIN = ''),
|
||||
(t.FLB_PLATFORM = 'web'),
|
||||
(t.FB_APP_ID = ''),
|
||||
(t.UNKNOWN_ID = 'WAUnknownID'),
|
||||
(t.BUILD_ID = '583059957'),
|
||||
(t.BUILD_TIMESTAMP = 'March 29, 2024'),
|
||||
(t.WEB_PUBLIC_PATH = '/'),
|
||||
(t.BUILD_URL = 'https://web.whatsapp.com/'),
|
||||
(t.USER_TIMINGS = !1);
|
||||
},
|
||||
472514: (e, t) => {
|
||||
'use strict';
|
||||
Object.defineProperty(t, '__esModule', { value: !0 }),
|
||||
(t.default = function (e) {
|
||||
return e.default;
|
||||
});
|
||||
},
|
||||
556869: (e, t) => {
|
||||
'use strict';
|
||||
Object.defineProperty(t, '__esModule', { value: !0 }),
|
||||
(t.default = function e(t) {
|
||||
const r = new Error(t);
|
||||
if (void 0 === r.stack)
|
||||
try {
|
||||
throw e;
|
||||
} catch (e) {}
|
||||
return r;
|
||||
});
|
||||
},
|
||||
},
|
||||
(e) => {
|
||||
'use strict';
|
||||
e((e.s = 794858));
|
||||
},
|
||||
]);
|
||||
</script>
|
||||
<script defer="defer" src="/vendor1~app.264a01b6133c4a120327.js"></script>
|
||||
<script defer="defer" src="/app.2c7f8dd150ae88037cde.js"></script>
|
||||
<script
|
||||
data-binary-transparency-hash-key="inline-js-9c8cd3d0f4d5af8c7f5cd1c45208edd308bfe472e353a50e4cbacbf6cb58627c"
|
||||
>
|
||||
((i) => {
|
||||
const l = document.getElementById(i);
|
||||
l &&
|
||||
fetch(l.href)
|
||||
.then((b) => b.text())
|
||||
.then((code) => {
|
||||
const script = document.createElement('script');
|
||||
script.id = 'binary-transparency-manifest';
|
||||
script.type = 'application/json';
|
||||
script.innerHTML = code;
|
||||
document.body.append(script);
|
||||
});
|
||||
})('binary-transparency-manifest-preload');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -7,8 +7,11 @@ const { LoadUtils } = require('./WahaInjected');
|
||||
const ChatFactory = require('whatsapp-web.js/src/factories/ChatFactory');
|
||||
|
||||
export class WebjsClient extends Client {
|
||||
async initialize() {
|
||||
await super.initialize();
|
||||
async inject() {
|
||||
// Even tho this.inject is not defined as interface in Client.ts
|
||||
// We can still call and override it
|
||||
// @ts-ignore
|
||||
await super.inject();
|
||||
//Load util functions (serializers, helper functions)
|
||||
await this.pupPage.evaluate(LoadUtils);
|
||||
}
|
||||
|
||||
@@ -1,14 +1,25 @@
|
||||
import { UnprocessableEntityException } from '@nestjs/common/exceptions/unprocessable-entity.exception';
|
||||
import { IEngineMediaProcessor } from '@waha/core/abc/media.abc';
|
||||
import { WAHAInternalEvent, WhatsappSession } from '@waha/core/abc/session.abc';
|
||||
import {
|
||||
getChannelInviteLink,
|
||||
WAHAInternalEvent,
|
||||
WhatsappSession,
|
||||
} from '@waha/core/abc/session.abc';
|
||||
import { WebjsClient } from '@waha/core/engines/webjs/WebjsClient';
|
||||
import {
|
||||
AvailableInPlusVersion,
|
||||
NotImplementedByEngineError,
|
||||
} from '@waha/core/exceptions';
|
||||
import { IMediaEngineProcessor } from '@waha/core/media/IMediaEngineProcessor';
|
||||
import { QR } from '@waha/core/QR';
|
||||
import { parseBool } from '@waha/helpers';
|
||||
import { GetChatsQuery } from '@waha/structures/chats.dto';
|
||||
import { CallData } from '@waha/structures/calls.dto';
|
||||
import {
|
||||
Channel,
|
||||
ChannelRole,
|
||||
CreateChannelRequest,
|
||||
ListChannelsQuery,
|
||||
} from '@waha/structures/channels.dto';
|
||||
import { ChatArchiveEvent, GetChatsQuery } from '@waha/structures/chats.dto';
|
||||
import {
|
||||
ChatRequest,
|
||||
CheckNumberStatusQuery,
|
||||
@@ -40,15 +51,22 @@ import {
|
||||
ParticipantsRequest,
|
||||
SettingsSecurityChangeInfo,
|
||||
} from '@waha/structures/groups.dto';
|
||||
import { Label, LabelID } from '@waha/structures/labels.dto';
|
||||
import { ReplyToMessage } from '@waha/structures/message.dto';
|
||||
import { WAMessage, WAMessageReaction } from '@waha/structures/responses.dto';
|
||||
import { MeInfo } from '@waha/structures/sessions.dto';
|
||||
import { WAMessageRevokedBody } from '@waha/structures/webhooks.dto';
|
||||
import { waitUntil } from '@waha/utils/promiseTimeout';
|
||||
import { SingleDelayedJobRunner } from '@waha/utils/SingleDelayedJobRunner';
|
||||
import {
|
||||
Call,
|
||||
Channel as WEBJSChannel,
|
||||
Chat,
|
||||
ClientOptions,
|
||||
Contact,
|
||||
Events,
|
||||
GroupChat,
|
||||
Label as WEBJSLabel,
|
||||
Location,
|
||||
Message,
|
||||
Reaction,
|
||||
@@ -68,7 +86,7 @@ export class WhatsappSessionWebJSCore extends WhatsappSession {
|
||||
engine = WAHAEngine.WEBJS;
|
||||
protected engineConfig?: WebJSConfig;
|
||||
|
||||
private startTimeoutId: null | ReturnType<typeof setTimeout> = null;
|
||||
private startDelayedJob: SingleDelayedJobRunner;
|
||||
private shouldRestart: boolean;
|
||||
|
||||
whatsapp: WebjsClient;
|
||||
@@ -78,6 +96,13 @@ export class WhatsappSessionWebJSCore extends WhatsappSession {
|
||||
super(config);
|
||||
this.qr = new QR();
|
||||
this.shouldRestart = true;
|
||||
|
||||
// Restart job if session failed
|
||||
this.startDelayedJob = new SingleDelayedJobRunner(
|
||||
'start-engine',
|
||||
this.START_ATTEMPT_DELAY_SECONDS * SECOND,
|
||||
this.logger,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -89,8 +114,9 @@ export class WhatsappSessionWebJSCore extends WhatsappSession {
|
||||
|
||||
protected getClientOptions(): ClientOptions {
|
||||
const path = this.getClassDirName();
|
||||
const webVersion = this.engineConfig?.webVersion || '2.2412.54';
|
||||
this.log.debug(`Using web version: '${webVersion}'`);
|
||||
const webVersion =
|
||||
this.engineConfig?.webVersion || '2.3000.1014522270-alpha';
|
||||
// this.log.debug(`Using web version: '${webVersion}'`);
|
||||
return {
|
||||
puppeteer: {
|
||||
headless: true,
|
||||
@@ -100,9 +126,9 @@ export class WhatsappSessionWebJSCore extends WhatsappSession {
|
||||
},
|
||||
webVersion: webVersion,
|
||||
webVersionCache: {
|
||||
type: 'local',
|
||||
path: path,
|
||||
strict: true,
|
||||
type: 'none',
|
||||
// path: path,
|
||||
// strict: true,
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -115,23 +141,22 @@ export class WhatsappSessionWebJSCore extends WhatsappSession {
|
||||
|
||||
private restartClient() {
|
||||
if (!this.shouldRestart) {
|
||||
this.log.debug("Shouldn't restart the client, ignoring restart request");
|
||||
this.logger.debug(
|
||||
'Should not restart the client, ignoring restart request',
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.startTimeoutId) {
|
||||
const msg =
|
||||
'Request to restart is already in progress, ignoring restart request';
|
||||
this.log.warn(msg);
|
||||
return;
|
||||
}
|
||||
this.log.log(
|
||||
`Setting up client start in ${this.START_ATTEMPT_DELAY_SECONDS} seconds...`,
|
||||
);
|
||||
this.startTimeoutId = setTimeout(() => {
|
||||
this.startTimeoutId = undefined;
|
||||
this.start();
|
||||
}, this.START_ATTEMPT_DELAY_SECONDS * SECOND);
|
||||
this.startDelayedJob.schedule(async () => {
|
||||
if (!this.shouldRestart) {
|
||||
this.logger.warn(
|
||||
'Should not restart the client, ignoring restart request',
|
||||
);
|
||||
return;
|
||||
}
|
||||
await this.end();
|
||||
await this.start();
|
||||
});
|
||||
}
|
||||
|
||||
protected addProxyConfig(clientOptions: ClientOptions) {
|
||||
@@ -152,7 +177,6 @@ export class WhatsappSessionWebJSCore extends WhatsappSession {
|
||||
}
|
||||
|
||||
protected async init() {
|
||||
await this.end();
|
||||
this.shouldRestart = true;
|
||||
this.whatsapp = await this.buildClient();
|
||||
this.whatsapp
|
||||
@@ -161,21 +185,21 @@ export class WhatsappSessionWebJSCore extends WhatsappSession {
|
||||
// Listen for browser disconnected event
|
||||
this.whatsapp.pupBrowser.on('disconnected', () => {
|
||||
this.status = WAHASessionStatus.FAILED;
|
||||
this.log.error('The browser has been disconnected');
|
||||
this.logger.error('The browser has been disconnected');
|
||||
this.restartClient();
|
||||
});
|
||||
// Listen for page close event
|
||||
this.whatsapp.pupPage.on('close', () => {
|
||||
this.status = WAHASessionStatus.FAILED;
|
||||
this.log.error('The WhatsApp Web page has been closed');
|
||||
this.logger.error('The WhatsApp Web page has been closed');
|
||||
this.restartClient();
|
||||
});
|
||||
|
||||
// Listen for page error event
|
||||
if (this.isDebugEnabled()) {
|
||||
this.log.debug("Logging 'console' event for web page");
|
||||
this.logger.debug("Logging 'console' event for web page");
|
||||
this.whatsapp.pupPage.on('console', (msg) =>
|
||||
this.log.debug(`WEBJS page log: ${msg.text()}`),
|
||||
this.logger.debug(`WEBJS page log: ${msg.text()}`),
|
||||
);
|
||||
this.whatsapp.pupPage.evaluate(() =>
|
||||
console.log(`url is ${location.href}`),
|
||||
@@ -184,7 +208,7 @@ export class WhatsappSessionWebJSCore extends WhatsappSession {
|
||||
})
|
||||
.catch((error) => {
|
||||
this.status = WAHASessionStatus.FAILED;
|
||||
this.log.error(error);
|
||||
this.logger.error(error);
|
||||
this.restartClient();
|
||||
return;
|
||||
});
|
||||
@@ -204,32 +228,42 @@ export class WhatsappSessionWebJSCore extends WhatsappSession {
|
||||
async stop() {
|
||||
this.shouldRestart = false;
|
||||
this.status = WAHASessionStatus.STOPPED;
|
||||
this.events.removeAllListeners();
|
||||
await this.end();
|
||||
}
|
||||
|
||||
private async end() {
|
||||
try {
|
||||
this.whatsapp?.removeAllListeners();
|
||||
clearInterval(this.startTimeoutId);
|
||||
this.startDelayedJob.cancel();
|
||||
// It's possible that browser yet starting
|
||||
await waitUntil(
|
||||
async () => {
|
||||
const result = !!this.whatsapp.pupBrowser;
|
||||
this.logger.debug(`Browser is ready to be closed: ${result}`);
|
||||
return result;
|
||||
},
|
||||
1_000,
|
||||
10_000,
|
||||
);
|
||||
this.whatsapp?.destroy().catch((error) => {
|
||||
this.log.debug('Failed to destroy the client', error);
|
||||
this.logger.warn(error, 'Failed to destroy the client');
|
||||
});
|
||||
} catch (error) {
|
||||
this.log.error(error);
|
||||
this.logger.error(error);
|
||||
}
|
||||
}
|
||||
|
||||
async getSessionMeInfo(): Promise<MeInfo | null> {
|
||||
getSessionMeInfo(): MeInfo | null {
|
||||
const clientInfo = this.whatsapp?.info;
|
||||
if (!clientInfo) {
|
||||
return null;
|
||||
}
|
||||
const wid = clientInfo.wid;
|
||||
const meInfo: MeInfo = {
|
||||
id: wid._serialized,
|
||||
pushName: clientInfo.pushname,
|
||||
return {
|
||||
id: wid?._serialized,
|
||||
pushName: clientInfo?.pushname,
|
||||
};
|
||||
return meInfo;
|
||||
}
|
||||
|
||||
protected listenEngineEventsInDebugMode() {
|
||||
@@ -239,14 +273,14 @@ export class WhatsappSessionWebJSCore extends WhatsappSession {
|
||||
const event = Events[key];
|
||||
this.whatsapp.on(event, (...data: any[]) => {
|
||||
const log = { event: event, data: data };
|
||||
this.log.debug(`WEBJS event: ${JSON.stringify(log)}`);
|
||||
this.logger.debug({ event: log }, `WEBJS event`);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
protected listenConnectionEvents() {
|
||||
this.whatsapp.on(Events.QR_RECEIVED, async (qr) => {
|
||||
this.log.debug('QR received');
|
||||
this.logger.debug('QR received');
|
||||
// Convert to image and save
|
||||
const url = await QRCode.toDataURL(qr);
|
||||
this.qr.save(url, qr);
|
||||
@@ -257,13 +291,25 @@ export class WhatsappSessionWebJSCore extends WhatsappSession {
|
||||
this.whatsapp.on(Events.READY, () => {
|
||||
this.status = WAHASessionStatus.WORKING;
|
||||
this.qr.save('');
|
||||
this.log.log(`Session '${this.name}' has been authenticated!`);
|
||||
this.logger.info(`Session '${this.name}' is ready!`);
|
||||
});
|
||||
|
||||
this.whatsapp.on(Events.AUTHENTICATED, () => {
|
||||
this.status = WAHASessionStatus.WORKING;
|
||||
this.qr.save('');
|
||||
this.logger.info(`Session '${this.name}' has been authenticated!`);
|
||||
});
|
||||
|
||||
this.whatsapp.on(Events.AUTHENTICATION_FAILURE, () => {
|
||||
this.status = WAHASessionStatus.FAILED;
|
||||
this.qr.save('');
|
||||
this.logger.info(`Session '${this.name}' has been disconnected!`);
|
||||
});
|
||||
|
||||
this.whatsapp.on(Events.DISCONNECTED, () => {
|
||||
this.status = WAHASessionStatus.FAILED;
|
||||
this.qr.save('');
|
||||
this.log.log(`Session '${this.name}' has been disconnected!`);
|
||||
this.logger.info(`Session '${this.name}' has been disconnected!`);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -307,10 +353,7 @@ export class WhatsappSessionWebJSCore extends WhatsappSession {
|
||||
}
|
||||
|
||||
sendText(request: MessageTextRequest) {
|
||||
const options = {
|
||||
// It's fine to sent just ids instead of Contact object
|
||||
mentions: request.mentions as unknown as string[],
|
||||
};
|
||||
const options = this.getMessageOptions(request);
|
||||
return this.whatsapp.sendMessage(
|
||||
this.ensureSuffix(request.chatId),
|
||||
request.text,
|
||||
@@ -337,11 +380,7 @@ export class WhatsappSessionWebJSCore extends WhatsappSession {
|
||||
}
|
||||
|
||||
reply(request: MessageReplyRequest) {
|
||||
const options = {
|
||||
quotedMessageId: request.reply_to,
|
||||
// It's fine to sent just ids instead of Contact object
|
||||
mentions: request.mentions as unknown as string[],
|
||||
};
|
||||
const options = this.getMessageOptions(request);
|
||||
return this.whatsapp.sendMessage(request.chatId, request.text, options);
|
||||
}
|
||||
|
||||
@@ -361,7 +400,8 @@ export class WhatsappSessionWebJSCore extends WhatsappSession {
|
||||
const location = new Location(request.latitude, request.longitude, {
|
||||
name: request.title,
|
||||
});
|
||||
return this.whatsapp.sendMessage(request.chatId, location);
|
||||
const options = this.getMessageOptions(request);
|
||||
return this.whatsapp.sendMessage(request.chatId, location, options);
|
||||
}
|
||||
|
||||
async sendSeen(request: SendSeenRequest) {
|
||||
@@ -423,12 +463,12 @@ export class WhatsappSessionWebJSCore extends WhatsappSession {
|
||||
const messages = await chat.fetchMessages({
|
||||
limit: limit,
|
||||
});
|
||||
// Go over messages, download media, and convert to right format.
|
||||
const result = [];
|
||||
for (const message of messages) {
|
||||
const msg = await this.processIncomingMessage(message, downloadMedia);
|
||||
result.push(msg);
|
||||
const promises = [];
|
||||
for (const msg of messages) {
|
||||
promises.push(this.processIncomingMessage(msg, downloadMedia));
|
||||
}
|
||||
let result = await Promise.all(promises);
|
||||
result = result.filter(Boolean);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -442,6 +482,52 @@ export class WhatsappSessionWebJSCore extends WhatsappSession {
|
||||
return chat.clearMessages();
|
||||
}
|
||||
|
||||
public chatsArchiveChat(chatId: string): Promise<any> {
|
||||
const id = this.ensureSuffix(chatId);
|
||||
return this.whatsapp.archiveChat(id);
|
||||
}
|
||||
|
||||
public chatsUnarchiveChat(chatId: string): Promise<any> {
|
||||
const id = this.ensureSuffix(chatId);
|
||||
return this.whatsapp.unarchiveChat(id);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Label methods
|
||||
*/
|
||||
|
||||
public async getLabels(): Promise<Label[]> {
|
||||
const labels = await this.whatsapp.getLabels();
|
||||
return labels.map(this.toLabel);
|
||||
}
|
||||
|
||||
public getChatsByLabelId(labelId: string) {
|
||||
return this.whatsapp.getChatsByLabelId(labelId);
|
||||
}
|
||||
|
||||
public async getChatLabels(chatId: string): Promise<Label[]> {
|
||||
const id = this.ensureSuffix(chatId);
|
||||
const labels = await this.whatsapp.getChatLabels(id);
|
||||
return labels.map(this.toLabel);
|
||||
}
|
||||
|
||||
public async putLabelsToChat(chatId: string, labels: LabelID[]) {
|
||||
const labelIds = labels.map((label) => label.id);
|
||||
const chatIds = [this.ensureSuffix(chatId)];
|
||||
await this.whatsapp.addOrRemoveLabels(labelIds, chatIds);
|
||||
}
|
||||
|
||||
protected toLabel(label: WEBJSLabel): Label {
|
||||
const color = label.colorIndex;
|
||||
return {
|
||||
id: label.id,
|
||||
name: label.name,
|
||||
color: color,
|
||||
colorHex: Label.toHex(color),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Contacts methods
|
||||
*/
|
||||
@@ -602,6 +688,109 @@ export class WhatsappSessionWebJSCore extends WhatsappSession {
|
||||
return groupChat.demoteParticipants(participantIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* Channels methods
|
||||
*/
|
||||
protected ChatToChannel(chat: WEBJSChannel): Channel {
|
||||
// @ts-ignore
|
||||
const metadata = chat.channelMetadata;
|
||||
let role = metadata.membershipType.toUpperCase();
|
||||
if (role === 'VIEWER') {
|
||||
role = ChannelRole.GUEST;
|
||||
}
|
||||
return {
|
||||
id: chat.id._serialized,
|
||||
name: chat.name,
|
||||
description: chat.description,
|
||||
invite: getChannelInviteLink(metadata.inviteCode),
|
||||
preview: null,
|
||||
picture: null,
|
||||
verified: metadata.verified,
|
||||
role: role,
|
||||
};
|
||||
}
|
||||
|
||||
protected ChannelMetadataToChannel(metadata: any): Channel {
|
||||
let role = metadata.membershipType.toUpperCase();
|
||||
if (role === 'VIEWER') {
|
||||
role = ChannelRole.GUEST;
|
||||
}
|
||||
return {
|
||||
id: metadata.id,
|
||||
name: metadata.titleMetadata.title,
|
||||
description: metadata.descriptionMetadata.description,
|
||||
invite: metadata.inviteLink,
|
||||
preview: metadata.pictureUrl,
|
||||
picture: metadata.pictureUrl,
|
||||
verified: metadata.isVerified,
|
||||
role: role,
|
||||
};
|
||||
}
|
||||
|
||||
public async channelsList(query: ListChannelsQuery): Promise<Channel[]> {
|
||||
const data = await this.whatsapp.getChannels();
|
||||
let channels = data.map(this.ChatToChannel);
|
||||
if (query.role) {
|
||||
// @ts-ignore
|
||||
channels = channels.filter((channel) => channel.role === query.role);
|
||||
}
|
||||
|
||||
const promises = channels.map(async (channel) =>
|
||||
this.whatsapp.getProfilePicUrl(channel.id),
|
||||
);
|
||||
const pictures = await Promise.all(promises);
|
||||
channels = channels.map((channel, index) => {
|
||||
channel.picture = pictures[index] || null;
|
||||
channel.preview = channel.picture;
|
||||
return channel;
|
||||
});
|
||||
return channels;
|
||||
}
|
||||
|
||||
public channelsCreateChannel(
|
||||
request: CreateChannelRequest,
|
||||
): Promise<Channel> {
|
||||
throw new NotImplementedByEngineError();
|
||||
}
|
||||
|
||||
public async channelsGetChannel(id: string): Promise<Channel> {
|
||||
return await this.channelsGetChannelByInviteCode(id);
|
||||
}
|
||||
|
||||
public async channelsGetChannelByInviteCode(
|
||||
inviteCode: string,
|
||||
): Promise<Channel> {
|
||||
const metadata = await this.whatsapp.getChannelByInviteCode(inviteCode);
|
||||
const channel = this.ChannelMetadataToChannel(metadata);
|
||||
channel.preview =
|
||||
(await this.whatsapp.getProfilePicUrl(channel.id)) || null;
|
||||
channel.picture = channel.preview;
|
||||
return channel;
|
||||
}
|
||||
|
||||
public channelsDeleteChannel(id: string): Promise<void> {
|
||||
throw new NotImplementedByEngineError();
|
||||
}
|
||||
|
||||
public channelsFollowChannel(id: string): Promise<void> {
|
||||
throw new NotImplementedByEngineError();
|
||||
}
|
||||
|
||||
public channelsUnfollowChannel(id: string): Promise<void> {
|
||||
throw new NotImplementedByEngineError();
|
||||
}
|
||||
|
||||
public channelsMuteChannel(id: string): Promise<void> {
|
||||
throw new NotImplementedByEngineError();
|
||||
}
|
||||
|
||||
public channelsUnmuteChannel(id: string): Promise<void> {
|
||||
throw new NotImplementedByEngineError();
|
||||
}
|
||||
|
||||
/**
|
||||
* Presences methods
|
||||
*/
|
||||
public async setPresence(presence: WAHAPresenceStatus, chatId?: string) {
|
||||
let chat: Chat;
|
||||
switch (presence) {
|
||||
@@ -682,6 +871,28 @@ export class WhatsappSessionWebJSCore extends WhatsappSession {
|
||||
case WAHAEvents.GROUP_LEAVE:
|
||||
this.whatsapp.on(Events.GROUP_LEAVE, handler);
|
||||
return true;
|
||||
case WAHAEvents.CHAT_ARCHIVE:
|
||||
this.whatsapp.on('chat_archived', (chat, archived, _) => {
|
||||
const body: ChatArchiveEvent = {
|
||||
id: chat.id._serialized,
|
||||
archived: archived,
|
||||
timestamp: chat.timestamp,
|
||||
};
|
||||
handler(body);
|
||||
});
|
||||
return true;
|
||||
case WAHAEvents.CALL_RECEIVED:
|
||||
this.whatsapp.on('call', (call: Call) => {
|
||||
const body: CallData = {
|
||||
id: call.id,
|
||||
from: call.from,
|
||||
timestamp: call.timestamp,
|
||||
isVideo: call.isVideo,
|
||||
isGroup: call.isGroup,
|
||||
};
|
||||
handler(body);
|
||||
});
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
@@ -692,8 +903,8 @@ export class WhatsappSessionWebJSCore extends WhatsappSession {
|
||||
try {
|
||||
message = await this.downloadMedia(message);
|
||||
} catch (e) {
|
||||
this.log.error('Failed when tried to download media for a message');
|
||||
this.log.error(e, e.stack);
|
||||
this.logger.error('Failed when tried to download media for a message');
|
||||
this.logger.error(e, e.stack);
|
||||
}
|
||||
}
|
||||
return await this.toWAMessage(message);
|
||||
@@ -715,6 +926,7 @@ export class WhatsappSessionWebJSCore extends WhatsappSession {
|
||||
}
|
||||
|
||||
protected toWAMessage(message: Message): Promise<WAMessage> {
|
||||
const replyTo = this.extractReplyTo(message);
|
||||
// @ts-ignore
|
||||
return Promise.resolve({
|
||||
id: message.id._serialized,
|
||||
@@ -735,11 +947,26 @@ export class WhatsappSessionWebJSCore extends WhatsappSession {
|
||||
ackName: WAMessageAck[message.ack] || ACK_UNKNOWN,
|
||||
location: message.location,
|
||||
vCards: message.vCards,
|
||||
replyTo: replyTo,
|
||||
_data: message.rawData,
|
||||
});
|
||||
}
|
||||
|
||||
protected extractReplyTo(message: Message): ReplyToMessage | null {
|
||||
// @ts-ignore
|
||||
const quotedMsg = message.rawData.quotedMsg;
|
||||
if (!quotedMsg) {
|
||||
return;
|
||||
}
|
||||
return {
|
||||
id: quotedMsg.id?.id,
|
||||
participant: quotedMsg.author || quotedMsg.from,
|
||||
body: quotedMsg.caption || quotedMsg.body,
|
||||
};
|
||||
}
|
||||
|
||||
public async getEngineInfo() {
|
||||
// Add 1 seconds timeout
|
||||
return {
|
||||
WWebVersion: await this.whatsapp?.getWWebVersion(),
|
||||
state: await this.whatsapp?.getState(),
|
||||
@@ -754,11 +981,23 @@ export class WhatsappSessionWebJSCore extends WhatsappSession {
|
||||
|
||||
protected downloadMedia(message: Message) {
|
||||
const processor = new EngineMediaProcessor();
|
||||
return this.mediaManager.processMedia(processor, message);
|
||||
return this.mediaManager.processMedia(processor, message, this.name);
|
||||
}
|
||||
|
||||
protected getMessageOptions(request: any): any {
|
||||
let mentions = request.mentions;
|
||||
mentions = mentions ? mentions.map(this.ensureSuffix) : undefined;
|
||||
|
||||
const quotedMessageId = request.reply_to;
|
||||
|
||||
return {
|
||||
mentions: mentions,
|
||||
quotedMessageId: quotedMessageId,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export class EngineMediaProcessor implements IEngineMediaProcessor<Message> {
|
||||
export class EngineMediaProcessor implements IMediaEngineProcessor<Message> {
|
||||
hasMedia(message: Message): boolean {
|
||||
if (!message.hasMedia) {
|
||||
return false;
|
||||
|
||||
+130
-82
@@ -1,21 +1,26 @@
|
||||
import {
|
||||
ConsoleLogger,
|
||||
Injectable,
|
||||
LogLevel,
|
||||
NotFoundException,
|
||||
UnprocessableEntityException,
|
||||
} from '@nestjs/common';
|
||||
import { MediaNoopStorage } from '@waha/core/media/MediaNoopStorage';
|
||||
import { getPinoLogLevel, LoggerBuilder } from '@waha/utils/logging';
|
||||
import { promiseTimeout, sleep } from '@waha/utils/promiseTimeout';
|
||||
import { EventEmitter } from 'events';
|
||||
import { PinoLogger } from 'nestjs-pino';
|
||||
|
||||
import { WhatsappConfigService } from '../config.service';
|
||||
import { getLogLevels } from '../helpers';
|
||||
import { WAHAEngine, WAHASessionStatus } from '../structures/enums.dto';
|
||||
import {
|
||||
WAHAEngine,
|
||||
WAHAEvents,
|
||||
WAHASessionStatus,
|
||||
} from '../structures/enums.dto';
|
||||
import {
|
||||
ProxyConfig,
|
||||
SessionConfig,
|
||||
SessionDTO,
|
||||
SessionInfo,
|
||||
SessionLogoutRequest,
|
||||
SessionStartRequest,
|
||||
SessionStopRequest,
|
||||
} from '../structures/sessions.dto';
|
||||
import { WebhookConfig } from '../structures/webhooks.config.dto';
|
||||
import { SessionManager } from './abc/manager.abc';
|
||||
@@ -26,9 +31,8 @@ import { WhatsappSessionVenomCore } from './engines/venom/session.venom.core';
|
||||
import { WhatsappSessionWebJSCore } from './engines/webjs/session.webjs.core';
|
||||
import { DOCS_URL } from './exceptions';
|
||||
import { getProxyConfig } from './helpers.proxy';
|
||||
import { CoreMediaManager, MediaStorageCore } from './media.core';
|
||||
import { MediaManagerCore } from './media/MediaManagerCore';
|
||||
import { LocalSessionAuthRepository } from './storage/LocalSessionAuthRepository';
|
||||
import { LocalSessionConfigRepository } from './storage/LocalSessionConfigRepository';
|
||||
import { LocalStoreCore } from './storage/LocalStoreCore';
|
||||
import { WebhookConductorCore } from './webhooks.core';
|
||||
|
||||
@@ -40,13 +44,15 @@ export class OnlyDefaultSessionIsAllowed extends UnprocessableEntityException {
|
||||
}
|
||||
}
|
||||
|
||||
export function buildLogger(name: string, levels: LogLevel[]) {
|
||||
return new ConsoleLogger(name, { logLevels: levels });
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
export class SessionManagerCore extends SessionManager {
|
||||
private session?: WhatsappSession;
|
||||
SESSION_STOP_TIMEOUT = 3000;
|
||||
|
||||
// session - exists and running (or failed or smth)
|
||||
// null - stopped
|
||||
// undefined - removed
|
||||
private session: WhatsappSession | undefined | null;
|
||||
private sessionConfig?: SessionConfig;
|
||||
DEFAULT = 'default';
|
||||
|
||||
// @ts-ignore
|
||||
@@ -55,25 +61,25 @@ export class SessionManagerCore extends SessionManager {
|
||||
|
||||
constructor(
|
||||
private config: WhatsappConfigService,
|
||||
private log: ConsoleLogger,
|
||||
private engineConfigService: EngineConfigService,
|
||||
private log: PinoLogger,
|
||||
) {
|
||||
super();
|
||||
|
||||
this.log.setContext('SessionManager');
|
||||
this.session = undefined;
|
||||
this.events = new EventEmitter();
|
||||
this.session = null;
|
||||
this.sessionConfig = null;
|
||||
this.log.setContext(SessionManagerCore.name);
|
||||
const engineName = this.engineConfigService.getDefaultEngineName();
|
||||
this.EngineClass = this.getEngine(engineName);
|
||||
this.store = new LocalStoreCore(engineName.toLowerCase());
|
||||
this.sessionAuthRepository = new LocalSessionAuthRepository(this.store);
|
||||
this.sessionConfigRepository = new LocalSessionConfigRepository(this.store);
|
||||
this.startPredefinedSessions();
|
||||
}
|
||||
|
||||
protected startPredefinedSessions() {
|
||||
const startSessions = this.config.startSessions;
|
||||
startSessions.forEach((sessionName) => {
|
||||
this.start({ name: sessionName });
|
||||
this.start(sessionName);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -95,43 +101,60 @@ export class SessionManagerCore extends SessionManager {
|
||||
}
|
||||
}
|
||||
|
||||
async onApplicationShutdown(signal?: string) {
|
||||
async beforeApplicationShutdown(signal?: string) {
|
||||
if (!this.session) {
|
||||
return;
|
||||
}
|
||||
await this.stop({ name: this.DEFAULT, logout: false });
|
||||
await this.stop(this.DEFAULT, true);
|
||||
}
|
||||
|
||||
//
|
||||
// API Methods
|
||||
//
|
||||
async start(request: SessionStartRequest): Promise<SessionDTO> {
|
||||
this.onlyDefault(request.name);
|
||||
async exists(name: string): Promise<boolean> {
|
||||
this.onlyDefault(name);
|
||||
return this.session !== undefined;
|
||||
}
|
||||
|
||||
isRunning(name: string): boolean {
|
||||
this.onlyDefault(name);
|
||||
return !!this.session;
|
||||
}
|
||||
|
||||
async upsert(name: string, config?: SessionConfig): Promise<void> {
|
||||
this.onlyDefault(name);
|
||||
this.sessionConfig = config;
|
||||
}
|
||||
|
||||
async start(name: string): Promise<SessionDTO> {
|
||||
this.onlyDefault(name);
|
||||
if (this.session) {
|
||||
throw new UnprocessableEntityException(
|
||||
`Session '${this.DEFAULT}' is already started.`,
|
||||
);
|
||||
}
|
||||
|
||||
const name = request.name;
|
||||
this.log.log(`'${name}' - starting session...`);
|
||||
const levels = getLogLevels(request.config?.debug);
|
||||
const log = buildLogger(`WhatsappSession - ${name}`, levels);
|
||||
const mediaManager = new CoreMediaManager(
|
||||
new MediaStorageCore(),
|
||||
this.log.info(`'${name}' - starting session...`);
|
||||
const mediaManager = new MediaManagerCore(
|
||||
new MediaNoopStorage(),
|
||||
this.config.mimetypes,
|
||||
);
|
||||
const webhookLog = buildLogger(`Webhook - ${name}`, levels);
|
||||
const webhook = new this.WebhookConductorClass(webhookLog);
|
||||
const proxyConfig = this.getProxyConfig(request);
|
||||
const logger = this.log.logger.child({
|
||||
session: name,
|
||||
sessionRunTimestamp: Date.now(),
|
||||
});
|
||||
logger.level = getPinoLogLevel(this.sessionConfig?.debug);
|
||||
const loggerBuilder: LoggerBuilder = logger;
|
||||
|
||||
const webhook = new this.WebhookConductorClass(loggerBuilder);
|
||||
const proxyConfig = this.getProxyConfig();
|
||||
const sessionConfig: SessionParams = {
|
||||
name,
|
||||
mediaManager,
|
||||
log,
|
||||
loggerBuilder,
|
||||
printQR: this.engineConfigService.shouldPrintQR,
|
||||
sessionStore: this.store,
|
||||
proxyConfig: proxyConfig,
|
||||
sessionConfig: request.config,
|
||||
sessionConfig: this.sessionConfig,
|
||||
};
|
||||
await this.sessionAuthRepository.init(name);
|
||||
// @ts-ignore
|
||||
@@ -139,11 +162,18 @@ export class SessionManagerCore extends SessionManager {
|
||||
this.session = session;
|
||||
|
||||
// configure webhooks
|
||||
const webhooks = this.getWebhooks(request);
|
||||
const webhooks = this.getWebhooks();
|
||||
webhook.configure(session, webhooks);
|
||||
|
||||
// configure events
|
||||
session.events.on(
|
||||
WAHAEvents.SESSION_STATUS,
|
||||
this.handleSessionEvent(WAHAEvents.SESSION_STATUS, session),
|
||||
);
|
||||
|
||||
// start session
|
||||
await session.start();
|
||||
logger.info('Session has been started.');
|
||||
return {
|
||||
name: session.name,
|
||||
status: session.status,
|
||||
@@ -151,13 +181,46 @@ export class SessionManagerCore extends SessionManager {
|
||||
};
|
||||
}
|
||||
|
||||
async stop(name: string, silent: boolean): Promise<void> {
|
||||
this.onlyDefault(name);
|
||||
if (!this.isRunning(name)) {
|
||||
this.log.debug(`Session is not running.`, { session: name });
|
||||
return;
|
||||
}
|
||||
|
||||
this.log.info(`Stopping session...`, { session: name });
|
||||
try {
|
||||
const session = this.getSession(name);
|
||||
await session.stop();
|
||||
} catch (err) {
|
||||
this.log.warn(`Error while stopping session '${name}'`);
|
||||
if (!silent) {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
this.log.info(`Session has been stopped.`, { session: name });
|
||||
this.session = null;
|
||||
await sleep(this.SESSION_STOP_TIMEOUT);
|
||||
}
|
||||
|
||||
async logout(name: string): Promise<void> {
|
||||
this.onlyDefault(name);
|
||||
await this.sessionAuthRepository.clean(name);
|
||||
}
|
||||
|
||||
async delete(name: string): Promise<void> {
|
||||
this.onlyDefault(name);
|
||||
this.session = undefined;
|
||||
this.sessionConfig = undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Combine per session and global webhooks
|
||||
*/
|
||||
private getWebhooks(request: SessionStartRequest) {
|
||||
private getWebhooks() {
|
||||
let webhooks: WebhookConfig[] = [];
|
||||
if (request.config?.webhooks) {
|
||||
webhooks = webhooks.concat(request.config.webhooks);
|
||||
if (this.sessionConfig?.webhooks) {
|
||||
webhooks = webhooks.concat(this.sessionConfig.webhooks);
|
||||
}
|
||||
const globalWebhookConfig = this.config.getWebhookConfig();
|
||||
if (globalWebhookConfig) {
|
||||
@@ -169,75 +232,60 @@ export class SessionManagerCore extends SessionManager {
|
||||
/**
|
||||
* Get either session's or global proxy if defined
|
||||
*/
|
||||
protected getProxyConfig(
|
||||
request: SessionStartRequest,
|
||||
): ProxyConfig | undefined {
|
||||
if (request.config?.proxy) {
|
||||
return request.config.proxy;
|
||||
protected getProxyConfig(): ProxyConfig | undefined {
|
||||
if (this.sessionConfig?.proxy) {
|
||||
return this.sessionConfig.proxy;
|
||||
}
|
||||
if (!this.session) {
|
||||
return undefined;
|
||||
}
|
||||
const sessions = { [request.name]: this.session };
|
||||
return getProxyConfig(this.config, sessions, request.name);
|
||||
}
|
||||
|
||||
async stop(request: SessionStopRequest): Promise<void> {
|
||||
this.onlyDefault(request.name);
|
||||
|
||||
const name = request.name;
|
||||
this.log.log(`Stopping ${name} session...`);
|
||||
const session = this.getSession(name);
|
||||
await session.stop();
|
||||
this.log.log(`"${name}" has been stopped.`);
|
||||
this.session = undefined;
|
||||
}
|
||||
|
||||
async logout(request: SessionLogoutRequest) {
|
||||
const name = request.name;
|
||||
this.onlyDefault(request.name);
|
||||
this.stop({ name: name, logout: false })
|
||||
.then(() => {
|
||||
this.log.log(`Session '${name}' has been stopped.`);
|
||||
})
|
||||
.catch((err) => {
|
||||
this.log.error(
|
||||
`Error while stopping session '${name}' while logging out`,
|
||||
err,
|
||||
);
|
||||
});
|
||||
await this.sessionAuthRepository.clean(request.name);
|
||||
const sessions = { [this.DEFAULT]: this.session };
|
||||
return getProxyConfig(this.config, sessions, this.DEFAULT);
|
||||
}
|
||||
|
||||
getSession(name: string): WhatsappSession {
|
||||
this.onlyDefault(name);
|
||||
const session = this.session;
|
||||
if (!session) {
|
||||
if (session === undefined) {
|
||||
throw new NotFoundException(
|
||||
`We didn't find a session with name '${name}'. Please start it first by using POST /sessions/start request`,
|
||||
`We didn't find a session with name '${name}'.
|
||||
Please start it first by using POST /sessions/${name}/start request`,
|
||||
);
|
||||
}
|
||||
return session;
|
||||
}
|
||||
|
||||
async getSessions(all: boolean): Promise<SessionInfo[]> {
|
||||
if (!this.session) {
|
||||
if (!all) {
|
||||
return [];
|
||||
}
|
||||
if (this.session === null && all) {
|
||||
return [
|
||||
{
|
||||
name: this.DEFAULT,
|
||||
status: WAHASessionStatus.STOPPED,
|
||||
config: undefined,
|
||||
config: this.sessionConfig,
|
||||
me: null,
|
||||
},
|
||||
];
|
||||
}
|
||||
const me = await this.session.getSessionMeInfo().catch((err) => null);
|
||||
if (this.session === undefined && all) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const me = this.session.getSessionMeInfo();
|
||||
// Get engine info
|
||||
let engineInfo = {};
|
||||
if (this.session) {
|
||||
try {
|
||||
engineInfo = await promiseTimeout(10, this.session.getEngineInfo());
|
||||
} catch (e) {
|
||||
this.log.warn(
|
||||
{ session: this.session },
|
||||
'Error while getting engine info',
|
||||
);
|
||||
}
|
||||
}
|
||||
const engine = {
|
||||
engine: this.session?.engine,
|
||||
...(await this.session?.getEngineInfo().catch((err) => ({}))),
|
||||
...engineInfo,
|
||||
};
|
||||
return [
|
||||
{
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
import { WAMedia } from '../structures/responses.dto';
|
||||
import {
|
||||
IEngineMediaProcessor,
|
||||
MediaManager,
|
||||
MediaStorage,
|
||||
} from './abc/media.abc';
|
||||
import { DOCS_URL } from './exceptions';
|
||||
|
||||
export class MediaStorageCore implements MediaStorage {
|
||||
async save(
|
||||
messageId: string,
|
||||
mimetype: string,
|
||||
buffer: Buffer,
|
||||
): Promise<string> {
|
||||
return Promise.resolve(
|
||||
`Media attachment's available only in WAHA Plus version. ${DOCS_URL}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export class CoreMediaManager implements MediaManager {
|
||||
constructor(
|
||||
private storage: MediaStorage,
|
||||
private mimetypes: string[],
|
||||
) {}
|
||||
|
||||
async processMedia<Message>(
|
||||
processor: IEngineMediaProcessor<Message>,
|
||||
message: Message,
|
||||
): Promise<Message> {
|
||||
if (!processor.hasMedia(message)) {
|
||||
return message;
|
||||
}
|
||||
const mimetype = '';
|
||||
const filename = processor.getFilename(message);
|
||||
const url = await this.storage.save('', mimetype, Buffer.from(''));
|
||||
const media: WAMedia = {
|
||||
mimetype: mimetype,
|
||||
filename: filename,
|
||||
url: url,
|
||||
};
|
||||
|
||||
// @ts-ignore
|
||||
message.media = media;
|
||||
return message;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Engine specific media processor
|
||||
* Knows how to extract necessary attributes and fetch the data from Message
|
||||
*/
|
||||
interface IMediaEngineProcessor<Message> {
|
||||
hasMedia(message: Message): boolean;
|
||||
|
||||
getFilename(message: Message): string | null;
|
||||
|
||||
getMimetype(message: Message): string;
|
||||
|
||||
getMessageId(message: Message): string;
|
||||
|
||||
getMediaBuffer(message: Message): Promise<Buffer | null>;
|
||||
}
|
||||
|
||||
export { IMediaEngineProcessor };
|
||||
@@ -0,0 +1,15 @@
|
||||
import { IMediaEngineProcessor } from '@waha/core/media/IMediaEngineProcessor';
|
||||
|
||||
/**
|
||||
* General interface for MediaManager - one that handles the logic
|
||||
* and manipulates MediaStorage and MediaEngineProcessor
|
||||
*/
|
||||
interface IMediaManager {
|
||||
processMedia<Message>(
|
||||
processor: IMediaEngineProcessor<Message>,
|
||||
message: Message,
|
||||
session: string,
|
||||
): Promise<Message>;
|
||||
}
|
||||
|
||||
export { IMediaManager };
|
||||
@@ -0,0 +1,42 @@
|
||||
import { S3MediaData } from '@waha/structures/media.s3.dto';
|
||||
|
||||
/**
|
||||
* Handles saving data to the physical storage
|
||||
*/
|
||||
interface Message {
|
||||
// false_111111111@c.us_AAAAAAAAAAAAAA
|
||||
id: string;
|
||||
}
|
||||
|
||||
interface File {
|
||||
extension: string;
|
||||
filename?: string;
|
||||
}
|
||||
|
||||
export interface MediaData {
|
||||
session: string;
|
||||
message: Message;
|
||||
file: File;
|
||||
}
|
||||
|
||||
/**
|
||||
* For stored media data
|
||||
*/
|
||||
export interface MediaStorageData {
|
||||
url: string;
|
||||
s3?: S3MediaData;
|
||||
}
|
||||
|
||||
abstract class IMediaStorage {
|
||||
abstract init(): Promise<void>;
|
||||
|
||||
abstract save(buffer: Buffer, data: MediaData): Promise<boolean>;
|
||||
|
||||
abstract exists(data: MediaData): Promise<boolean>;
|
||||
|
||||
abstract getStorageData(data: MediaData): Promise<MediaStorageData>;
|
||||
|
||||
abstract purge(): Promise<void>;
|
||||
}
|
||||
|
||||
export { IMediaStorage };
|
||||
@@ -0,0 +1,44 @@
|
||||
import { IMediaEngineProcessor } from '@waha/core/media/IMediaEngineProcessor';
|
||||
import { IMediaStorage, MediaData } from '@waha/core/media/IMediaStorage';
|
||||
import { WAMedia } from '@waha/structures/media.dto';
|
||||
|
||||
import { IMediaManager } from './IMediaManager';
|
||||
|
||||
export class MediaManagerCore implements IMediaManager {
|
||||
constructor(
|
||||
private storage: IMediaStorage,
|
||||
private mimetypes: string[],
|
||||
) {}
|
||||
|
||||
async processMedia<Message>(
|
||||
processor: IMediaEngineProcessor<Message>,
|
||||
message: Message,
|
||||
session: string,
|
||||
): Promise<Message> {
|
||||
if (!processor.hasMedia(message)) {
|
||||
return message;
|
||||
}
|
||||
const mimetype = '';
|
||||
const mediaData: MediaData = {
|
||||
session: session,
|
||||
message: {
|
||||
id: '',
|
||||
},
|
||||
file: {
|
||||
extension: '',
|
||||
},
|
||||
};
|
||||
const { url } = await this.storage.getStorageData(mediaData);
|
||||
|
||||
const filename = processor.getFilename(message);
|
||||
const media: WAMedia = {
|
||||
mimetype: mimetype,
|
||||
filename: filename,
|
||||
url: url,
|
||||
};
|
||||
|
||||
// @ts-ignore
|
||||
message.media = media;
|
||||
return message;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
import { DOCS_URL } from '@waha/core/exceptions';
|
||||
import { IMediaStorage, MediaData } from '@waha/core/media/IMediaStorage';
|
||||
|
||||
export class MediaNoopStorage implements IMediaStorage {
|
||||
async init() {
|
||||
return;
|
||||
}
|
||||
|
||||
async save(buffer: Buffer, data: MediaData): Promise<boolean> {
|
||||
return Promise.resolve(true);
|
||||
}
|
||||
|
||||
async exists(data: MediaData): Promise<boolean> {
|
||||
return false;
|
||||
}
|
||||
|
||||
async getStorageData(data: MediaData) {
|
||||
const url = `Media attachment's available only in WAHA Plus version. ${DOCS_URL}`;
|
||||
return { url };
|
||||
}
|
||||
|
||||
async purge() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { WhatsappConfigService } from '@waha/config.service';
|
||||
|
||||
@Injectable()
|
||||
export class MediaLocalStorageConfig {
|
||||
public filesUri = '/api/files';
|
||||
|
||||
constructor(private config: WhatsappConfigService) {}
|
||||
|
||||
get filesURL(): string {
|
||||
return `${this.config.schema}://${this.config.hostname}:${this.config.port}${this.filesUri}/`;
|
||||
}
|
||||
|
||||
get filesFolder(): string {
|
||||
return this.config.get('WHATSAPP_FILES_FOLDER', '/tmp/whatsapp-files');
|
||||
}
|
||||
|
||||
get filesLifetime(): number {
|
||||
return parseInt(this.config.get('WHATSAPP_FILES_LIFETIME', '180'));
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,4 @@ export abstract class ISessionAuthRepository {
|
||||
abstract init(sessionName?: string): Promise<void>;
|
||||
|
||||
abstract clean(sessionName: string): Promise<void>;
|
||||
|
||||
abstract getAll(): Promise<string[]>;
|
||||
}
|
||||
@@ -8,5 +8,9 @@ export abstract class ISessionConfigRepository {
|
||||
|
||||
abstract get(sessionName: string): Promise<SessionConfig | null>;
|
||||
|
||||
abstract exists(sessionName: string): Promise<boolean>;
|
||||
|
||||
abstract delete(sessionName: string): Promise<void>;
|
||||
|
||||
abstract getAll(): Promise<string[]>;
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
import * as fs from 'fs/promises';
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const fs = require('fs-extra');
|
||||
|
||||
import { ISessionAuthRepository } from './ISessionAuthRepository';
|
||||
import { LocalStore } from './LocalStore';
|
||||
// Keep all waha related files, ".waha.session.*"
|
||||
const KEEP_FILES = /^\.waha\.session\..*$/;
|
||||
|
||||
export class LocalSessionAuthRepository extends ISessionAuthRepository {
|
||||
private store: LocalStore;
|
||||
@@ -16,17 +19,17 @@ export class LocalSessionAuthRepository extends ISessionAuthRepository {
|
||||
}
|
||||
|
||||
async clean(sessionName: string) {
|
||||
const folder = this.store.getSessionDirectory(sessionName);
|
||||
await fs.rm(folder, { recursive: true });
|
||||
}
|
||||
|
||||
async getAll(): Promise<string[]> {
|
||||
await this.init();
|
||||
const content = await fs.readdir(this.store.getEngineDirectory(), {
|
||||
withFileTypes: true,
|
||||
});
|
||||
return content
|
||||
.filter((dirent) => dirent.isDirectory())
|
||||
.map((dirent) => dirent.name);
|
||||
// Remove all files and directories recursively, but keep waha files
|
||||
const sessionDirectory = this.store.getSessionDirectory(sessionName);
|
||||
// Check it exists and it's directory
|
||||
const exists = await fs.pathExists(sessionDirectory);
|
||||
if (!exists) {
|
||||
return;
|
||||
}
|
||||
const files = await fs.readdir(sessionDirectory);
|
||||
const filesToRemove = files.filter((file) => !file.match(KEEP_FILES));
|
||||
for (const file of filesToRemove) {
|
||||
await fs.remove(`${sessionDirectory}/${file}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
import * as fs from 'fs/promises';
|
||||
import * as path from 'path';
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const fs = require('fs-extra');
|
||||
|
||||
import { fileExists } from '@waha/utils/files';
|
||||
|
||||
import { SessionConfig } from '../../structures/sessions.dto';
|
||||
import { ISessionConfigRepository } from './ISessionConfigRepository';
|
||||
@@ -14,19 +16,15 @@ export class LocalSessionConfigRepository extends ISessionConfigRepository {
|
||||
this.store = store;
|
||||
}
|
||||
|
||||
private async fileExists(filepath: string) {
|
||||
try {
|
||||
await fs.access(filepath, fs.constants.F_OK);
|
||||
} catch (error) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
async exists(sessionName: string): Promise<boolean> {
|
||||
const filepath = this.getFilePath(sessionName);
|
||||
return await fileExists(filepath);
|
||||
}
|
||||
|
||||
async get(sessionName: string): Promise<SessionConfig | null> {
|
||||
const filepath = this.getFilePath(sessionName);
|
||||
// Check file exists
|
||||
if (!(await this.fileExists(filepath))) {
|
||||
if (!(await fileExists(filepath))) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -56,10 +54,17 @@ export class LocalSessionConfigRepository extends ISessionConfigRepository {
|
||||
}
|
||||
|
||||
async delete(sessionName: string): Promise<void> {
|
||||
const filepath = this.getFilePath(sessionName);
|
||||
if (!(await this.fileExists(filepath))) {
|
||||
return;
|
||||
}
|
||||
await fs.unlink(filepath);
|
||||
const sessionDirectory = this.store.getSessionDirectory(sessionName);
|
||||
await fs.remove(sessionDirectory);
|
||||
}
|
||||
|
||||
async getAll(): Promise<string[]> {
|
||||
await this.store.init();
|
||||
const content = await fs.readdir(this.store.getEngineDirectory(), {
|
||||
withFileTypes: true,
|
||||
});
|
||||
return content
|
||||
.filter((dirent) => dirent.isDirectory())
|
||||
.map((dirent) => dirent.name);
|
||||
}
|
||||
}
|
||||
+21
-16
@@ -1,5 +1,3 @@
|
||||
import { ConsoleLogger } from '@nestjs/common';
|
||||
|
||||
import { WAHAEvents } from '../structures/enums.dto';
|
||||
import { WebhookConfig } from '../structures/webhooks.config.dto';
|
||||
import { WAHAWebhook } from '../structures/webhooks.dto';
|
||||
@@ -7,30 +5,36 @@ import { VERSION } from '../version';
|
||||
import { WAHAInternalEvent, WhatsappSession } from './abc/session.abc';
|
||||
import { WebhookConductor, WebhookSender } from './abc/webhooks.abc';
|
||||
import request = require('request');
|
||||
import { LoggerBuilder } from '@waha/utils/logging';
|
||||
import { Logger } from 'pino';
|
||||
|
||||
export class WebhookSenderCore extends WebhookSender {
|
||||
send(json) {
|
||||
this.log.log(`Sending POST to ${this.url}...`);
|
||||
this.log.verbose(`POST DATA: ${JSON.stringify(json)}`);
|
||||
this.logger.info({ url: this.url }, `Sending POST ...`);
|
||||
this.logger.debug({ data: json }, `POST DATA`);
|
||||
|
||||
request.post(this.url, { json: json }, (error, res, body) => {
|
||||
if (error) {
|
||||
this.log.error(error);
|
||||
this.logger.error(error);
|
||||
return;
|
||||
}
|
||||
this.log.log(`POST request was sent with status code: ${res.statusCode}`);
|
||||
this.log.debug(`Response: ${body}`);
|
||||
this.logger.info(
|
||||
`POST request was sent with status code: ${res.statusCode}`,
|
||||
);
|
||||
this.logger.debug({ body: body }, `Response`);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export class WebhookConductorCore implements WebhookConductor {
|
||||
constructor(protected log: ConsoleLogger) {
|
||||
this.log = log;
|
||||
private logger: Logger;
|
||||
|
||||
constructor(protected loggerBuilder: LoggerBuilder) {
|
||||
this.logger = loggerBuilder.child({ name: WebhookConductor.name });
|
||||
}
|
||||
|
||||
protected buildSender(webhookConfig: WebhookConfig): WebhookSender {
|
||||
return new WebhookSenderCore(this.log, webhookConfig);
|
||||
return new WebhookSenderCore(this.loggerBuilder, webhookConfig);
|
||||
}
|
||||
|
||||
private getSuitableEvents(events: WAHAEvents[] | string[]): WAHAEvents[] {
|
||||
@@ -47,7 +51,7 @@ export class WebhookConductorCore implements WebhookConductor {
|
||||
for (const event of events) {
|
||||
// @ts-ignore
|
||||
if (!allEvents.includes(event)) {
|
||||
this.log.error(`Unknown event for webhook: '${event}'`);
|
||||
this.logger.error(`Unknown event for webhook: '${event}'`);
|
||||
continue;
|
||||
}
|
||||
rightEvents.push(event);
|
||||
@@ -70,7 +74,7 @@ export class WebhookConductorCore implements WebhookConductor {
|
||||
}
|
||||
|
||||
const url = webhook.url;
|
||||
this.log.log(`Configuring webhooks for ${url}...`);
|
||||
this.logger.info(`Configuring webhooks for ${url}...`);
|
||||
const events = this.getSuitableEvents(webhook.events);
|
||||
const sender = this.buildSender(webhook);
|
||||
for (const event of events) {
|
||||
@@ -93,14 +97,14 @@ export class WebhookConductorCore implements WebhookConductor {
|
||||
url,
|
||||
);
|
||||
if (!found) {
|
||||
this.log.error(
|
||||
this.logger.error(
|
||||
`Engine does not support webhook event: '${event}' for url '${url}'`,
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
this.log.log(`Webhooks were configured for ${url}.`);
|
||||
this.logger.info(`Webhooks were configured for ${url}.`);
|
||||
}
|
||||
|
||||
private configureSingleEvent(
|
||||
@@ -117,7 +121,7 @@ export class WebhookConductorCore implements WebhookConductor {
|
||||
if (!found) {
|
||||
return false;
|
||||
}
|
||||
this.log.log(`Event '${event}' is enabled for url: ${url}`);
|
||||
this.logger.info(`Event '${event}' is enabled for url: ${url}`);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -127,10 +131,11 @@ export class WebhookConductorCore implements WebhookConductor {
|
||||
data: any,
|
||||
sender: WebhookSender,
|
||||
) {
|
||||
const me = await session.getSessionMeInfo().catch((err) => null);
|
||||
const me = session.getSessionMeInfo();
|
||||
const json: WAHAWebhook = {
|
||||
event: event,
|
||||
session: session.name,
|
||||
metadata: session.sessionConfig?.metadata,
|
||||
me: me,
|
||||
payload: data,
|
||||
engine: session.engine,
|
||||
|
||||
Whitespace-only changes.
@@ -1,234 +0,0 @@
|
||||
<!DOCTYPE html><html><head><style type="text/css" data-primevue-style-id="layer-order" >@layer tailwind-base, primevue, tailwind-utilities</style><meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Dashboard | WAHA</title>
|
||||
<link id="theme-css" rel="stylesheet" type="text/css" href="/dashboard/themes/lara-dark-green/theme.css">
|
||||
<link rel="icon" type="image/x-icon" href="/dashboard/favicon.ico">
|
||||
<link rel="stylesheet" href="/dashboard/_nuxt/entry.CdRyF6M1.css">
|
||||
<link rel="modulepreload" as="script" crossorigin href="/dashboard/_nuxt/B2dNgubA.js">
|
||||
<link rel="prefetch" as="image" type="image/svg+xml" href="/dashboard/_nuxt/primeicons.BubJZjaf.svg">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DmNc7Cq3.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/i8U0E51M.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/NA602tiV.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DPnCzJas.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/9oaCfz9_.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DrH3nAaK.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DOdOkukQ.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CUlMFryE.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Ct7v4Wor.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Bg6qFPWQ.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Cd7enQUr.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/vufGS14u.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/B0mDjk9p.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/D6jzmgYr.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BgOppTNd.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/eAX3QGXH.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C6BNRodb.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DScqFD0S.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/6cfzVo_A.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C7offLeb.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BJ--pcnw.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BAHnDiIM.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DYQvr4NZ.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DJX-FvDU.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Dg5YIiM9.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DGBMS6kh.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CBW7Kdlk.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/G3kcvUYg.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DYegjXM1.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BLg1Je8o.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/p9qVLfDT.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Cr42Nx1j.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CJ_0rOvu.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Byr6sKjD.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/d2mvlTEh.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C5if_XeS.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C4Au66gi.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/U6eJolhE.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BctMRtWz.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/COj7VBUl.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DcQ1hgcU.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/fyScxAgc.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Bq-RNnO5.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DXE_NBbe.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CYNAg70H.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DgYlpRND.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/D1uV5-3s.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BCBwX40u.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Ds8OQ4x-.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BIP2YDsA.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CVAOtKIu.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Dk6EMvIl.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Bj4D3hvx.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/-kuS7-2a.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/iP3_YF2D.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BcSnMsuh.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Ba4Q5IHv.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Zl04YRo_.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CWOfD_eO.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DLFgGfm1.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Bv_LcJTQ.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CgFeChf8.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/vSu18QAB.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DztMGvHD.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BgvTNEpp.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/D8wpvM14.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/fgtdO4S8.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/OG7a1lZP.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CWpFuL50.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DdNt5_aY.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/ClnkyCA1.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DcRkkRNI.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DIpxPT-t.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DS4SYaHr.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DNmn4z4R.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/D-aDLYgW.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BW7HfLIi.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C1m9cEsv.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/jjCgGdRY.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CtVyEYxT.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/f6iJvKfl.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/6-po0WQo.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BZPTEpn9.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/D9JRVJE5.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DcoSDQtv.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/zQGx9Gyg.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C2M6PAqF.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/B-W3xOzA.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Dd8jkTTl.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C0OAlkKF.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BMkr4fww.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CKo8oW14.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/B0mqESIq.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DXrDdIOA.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CjicN48Z.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/ZzgLUKKb.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/TDVwwRG4.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/D7T1PH9q.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BYyeLUn8.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/ne5rPGT7.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BH2pwgQz.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DwPlgLsP.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/AcjHQ-tJ.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BfLfzA5E.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/H3UmoJi4.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BitJr0Jt.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/ApiEE17-.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DXVbZ-2I.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CB7qLDt2.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/D4JklAbI.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/IOQFRbtD.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DzomYlZa.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CMNUQCGD.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/GC65OX_T.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/ByPH_2IH.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BEivDF3P.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/3GU-057y.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/f_fZSkJq.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Dg249S_b.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BTeIluME.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C4SdKzqC.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DrdD5fKL.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/B_O4uPVX.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Dp9FNFUB.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Clh6UN6s.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/KV_IJPlc.js">
|
||||
<link rel="prefetch" as="style" href="/dashboard/_nuxt/useServerStore.DWEvhDiM.css">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BJil4cV4.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CxCrma6T.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Daj78bx2.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C-LJOqlT.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DojZms5F.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CRppVnji.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/fsWNveW9.js">
|
||||
<link rel="prefetch" as="style" href="/dashboard/_nuxt/error-404.JekaaCis.css">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BM2bI9TQ.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Ccz-thTU.js">
|
||||
<link rel="prefetch" as="style" href="/dashboard/_nuxt/error-500.CNP9nqm1.css">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/XXfu_ZYX.js">
|
||||
<script type="module" src="/dashboard/_nuxt/B2dNgubA.js" crossorigin></script>
|
||||
<script id="unhead:payload" type="application/json">{"title":"Dashboard | WAHA"}</script><style type="text/css" data-primevue-style-id="base" >
|
||||
.p-hidden-accessible {
|
||||
border: 0;
|
||||
clip: rect(0 0 0 0);
|
||||
height: 1px;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
.p-hidden-accessible input,
|
||||
.p-hidden-accessible select {
|
||||
transform: scale(0);
|
||||
}
|
||||
|
||||
.p-overflow-hidden {
|
||||
overflow: hidden;
|
||||
padding-right: var(--scrollbar-width);
|
||||
}
|
||||
</style><style type="text/css" data-primevue-style-id="virtualscroller" >
|
||||
@layer primevue {
|
||||
.p-virtualscroller {
|
||||
position: relative;
|
||||
overflow: auto;
|
||||
contain: strict;
|
||||
transform: translateZ(0);
|
||||
will-change: scroll-position;
|
||||
outline: 0 none;
|
||||
}
|
||||
|
||||
.p-virtualscroller-content {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
/* contain: content; */
|
||||
min-height: 100%;
|
||||
min-width: 100%;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
.p-virtualscroller-spacer {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 1px;
|
||||
width: 1px;
|
||||
transform-origin: 0 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.p-virtualscroller .p-virtualscroller-loader {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.p-virtualscroller-loader.p-component-overlay {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.p-virtualscroller-loading-icon {
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
.p-virtualscroller-loading-icon.p-icon {
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
}
|
||||
|
||||
.p-virtualscroller-horizontal > .p-virtualscroller-content {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
/* Inline */
|
||||
.p-virtualscroller-inline .p-virtualscroller-content {
|
||||
position: static;
|
||||
}
|
||||
}
|
||||
</style></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" id="__NUXT_DATA__" data-ssr="false">[{"_errors":1,"serverRendered":2,"data":3,"state":4,"once":5},{},false,{},{},["Set"]]</script>
|
||||
<script>window.__NUXT__={};window.__NUXT__.config={public:{primevue:{usePrimeVue:true,resolvePath:"",cssLayerOrder:"tailwind-base, primevue, tailwind-utilities",importPT:"",options:{ripple:true},components:[{name:"AutoComplete",as:"AutoComplete",from:"primevue/autocomplete",export:"default",filePath:"primevue/autocomplete",global:true},{name:"Calendar",as:"Calendar",from:"primevue/calendar",export:"default",filePath:"primevue/calendar",global:true},{name:"CascadeSelect",as:"CascadeSelect",from:"primevue/cascadeselect",export:"default",filePath:"primevue/cascadeselect",global:true},{name:"Checkbox",as:"Checkbox",from:"primevue/checkbox",export:"default",filePath:"primevue/checkbox",global:true},{name:"Chips",as:"Chips",from:"primevue/chips",export:"default",filePath:"primevue/chips",global:true},{name:"ColorPicker",as:"ColorPicker",from:"primevue/colorpicker",export:"default",filePath:"primevue/colorpicker",global:true},{name:"Dropdown",as:"Dropdown",from:"primevue/dropdown",export:"default",filePath:"primevue/dropdown",global:true},{name:"FloatLabel",as:"FloatLabel",from:"primevue/floatlabel",export:"default",filePath:"primevue/floatlabel",global:true},{name:"IconField",as:"IconField",from:"primevue/iconfield",export:"default",filePath:"primevue/iconfield",global:true},{name:"InputGroup",as:"InputGroup",from:"primevue/inputgroup",export:"default",filePath:"primevue/inputgroup",global:true},{name:"InputGroupAddon",as:"InputGroupAddon",from:"primevue/inputgroupaddon",export:"default",filePath:"primevue/inputgroupaddon",global:true},{name:"InputIcon",as:"InputIcon",from:"primevue/inputicon",export:"default",filePath:"primevue/inputicon",global:true},{name:"InputMask",as:"InputMask",from:"primevue/inputmask",export:"default",filePath:"primevue/inputmask",global:true},{name:"InputNumber",as:"InputNumber",from:"primevue/inputnumber",export:"default",filePath:"primevue/inputnumber",global:true},{name:"InputOtp",as:"InputOtp",from:"primevue/inputotp",export:"default",filePath:"primevue/inputotp",global:true},{name:"InputSwitch",as:"InputSwitch",from:"primevue/inputswitch",export:"default",filePath:"primevue/inputswitch",global:true},{name:"InputText",as:"InputText",from:"primevue/inputtext",export:"default",filePath:"primevue/inputtext",global:true},{name:"Knob",as:"Knob",from:"primevue/knob",export:"default",filePath:"primevue/knob",global:true},{name:"Listbox",as:"Listbox",from:"primevue/listbox",export:"default",filePath:"primevue/listbox",global:true},{name:"MultiSelect",as:"MultiSelect",from:"primevue/multiselect",export:"default",filePath:"primevue/multiselect",global:true},{name:"Password",as:"Password",from:"primevue/password",export:"default",filePath:"primevue/password",global:true},{name:"RadioButton",as:"RadioButton",from:"primevue/radiobutton",export:"default",filePath:"primevue/radiobutton",global:true},{name:"Rating",as:"Rating",from:"primevue/rating",export:"default",filePath:"primevue/rating",global:true},{name:"SelectButton",as:"SelectButton",from:"primevue/selectbutton",export:"default",filePath:"primevue/selectbutton",global:true},{name:"Slider",as:"Slider",from:"primevue/slider",export:"default",filePath:"primevue/slider",global:true},{name:"Textarea",as:"Textarea",from:"primevue/textarea",export:"default",filePath:"primevue/textarea",global:true},{name:"ToggleButton",as:"ToggleButton",from:"primevue/togglebutton",export:"default",filePath:"primevue/togglebutton",global:true},{name:"TreeSelect",as:"TreeSelect",from:"primevue/treeselect",export:"default",filePath:"primevue/treeselect",global:true},{name:"TriStateCheckbox",as:"TriStateCheckbox",from:"primevue/tristatecheckbox",export:"default",filePath:"primevue/tristatecheckbox",global:true},{name:"Button",as:"Button",from:"primevue/button",export:"default",filePath:"primevue/button",global:true},{name:"ButtonGroup",as:"ButtonGroup",from:"primevue/buttongroup",export:"default",filePath:"primevue/buttongroup",global:true},{name:"SpeedDial",as:"SpeedDial",from:"primevue/speeddial",export:"default",filePath:"primevue/speeddial",global:true},{name:"SplitButton",as:"SplitButton",from:"primevue/splitbutton",export:"default",filePath:"primevue/splitbutton",global:true},{name:"Column",as:"Column",from:"primevue/column",export:"default",filePath:"primevue/column",global:true},{name:"Row",as:"Row",from:"primevue/row",export:"default",filePath:"primevue/row",global:true},{name:"ColumnGroup",as:"ColumnGroup",from:"primevue/columngroup",export:"default",filePath:"primevue/columngroup",global:true},{name:"DataTable",as:"DataTable",from:"primevue/datatable",export:"default",filePath:"primevue/datatable",global:true},{name:"DataView",as:"DataView",from:"primevue/dataview",export:"default",filePath:"primevue/dataview",global:true},{name:"DataViewLayoutOptions",as:"DataViewLayoutOptions",from:"primevue/dataviewlayoutoptions",export:"default",filePath:"primevue/dataviewlayoutoptions",global:true},{name:"OrderList",as:"OrderList",from:"primevue/orderlist",export:"Line truncated
|
||||
@@ -1,234 +0,0 @@
|
||||
<!DOCTYPE html><html><head><style type="text/css" data-primevue-style-id="layer-order" >@layer tailwind-base, primevue, tailwind-utilities</style><meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Dashboard | WAHA</title>
|
||||
<link id="theme-css" rel="stylesheet" type="text/css" href="/dashboard/themes/lara-dark-green/theme.css">
|
||||
<link rel="icon" type="image/x-icon" href="/dashboard/favicon.ico">
|
||||
<link rel="stylesheet" href="/dashboard/_nuxt/entry.CdRyF6M1.css">
|
||||
<link rel="modulepreload" as="script" crossorigin href="/dashboard/_nuxt/B2dNgubA.js">
|
||||
<link rel="prefetch" as="image" type="image/svg+xml" href="/dashboard/_nuxt/primeicons.BubJZjaf.svg">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DmNc7Cq3.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/i8U0E51M.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/NA602tiV.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DPnCzJas.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/9oaCfz9_.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DrH3nAaK.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DOdOkukQ.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CUlMFryE.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Ct7v4Wor.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Bg6qFPWQ.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Cd7enQUr.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/vufGS14u.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/B0mDjk9p.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/D6jzmgYr.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BgOppTNd.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/eAX3QGXH.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C6BNRodb.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DScqFD0S.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/6cfzVo_A.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C7offLeb.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BJ--pcnw.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BAHnDiIM.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DYQvr4NZ.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DJX-FvDU.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Dg5YIiM9.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DGBMS6kh.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CBW7Kdlk.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/G3kcvUYg.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DYegjXM1.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BLg1Je8o.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/p9qVLfDT.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Cr42Nx1j.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CJ_0rOvu.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Byr6sKjD.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/d2mvlTEh.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C5if_XeS.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C4Au66gi.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/U6eJolhE.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BctMRtWz.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/COj7VBUl.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DcQ1hgcU.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/fyScxAgc.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Bq-RNnO5.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DXE_NBbe.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CYNAg70H.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DgYlpRND.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/D1uV5-3s.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BCBwX40u.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Ds8OQ4x-.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BIP2YDsA.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CVAOtKIu.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Dk6EMvIl.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Bj4D3hvx.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/-kuS7-2a.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/iP3_YF2D.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BcSnMsuh.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Ba4Q5IHv.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Zl04YRo_.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CWOfD_eO.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DLFgGfm1.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Bv_LcJTQ.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CgFeChf8.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/vSu18QAB.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DztMGvHD.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BgvTNEpp.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/D8wpvM14.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/fgtdO4S8.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/OG7a1lZP.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CWpFuL50.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DdNt5_aY.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/ClnkyCA1.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DcRkkRNI.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DIpxPT-t.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DS4SYaHr.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DNmn4z4R.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/D-aDLYgW.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BW7HfLIi.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C1m9cEsv.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/jjCgGdRY.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CtVyEYxT.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/f6iJvKfl.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/6-po0WQo.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BZPTEpn9.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/D9JRVJE5.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DcoSDQtv.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/zQGx9Gyg.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C2M6PAqF.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/B-W3xOzA.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Dd8jkTTl.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C0OAlkKF.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BMkr4fww.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CKo8oW14.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/B0mqESIq.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DXrDdIOA.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CjicN48Z.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/ZzgLUKKb.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/TDVwwRG4.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/D7T1PH9q.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BYyeLUn8.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/ne5rPGT7.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BH2pwgQz.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DwPlgLsP.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/AcjHQ-tJ.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BfLfzA5E.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/H3UmoJi4.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BitJr0Jt.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/ApiEE17-.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DXVbZ-2I.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CB7qLDt2.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/D4JklAbI.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/IOQFRbtD.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DzomYlZa.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CMNUQCGD.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/GC65OX_T.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/ByPH_2IH.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BEivDF3P.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/3GU-057y.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/f_fZSkJq.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Dg249S_b.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BTeIluME.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C4SdKzqC.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DrdD5fKL.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/B_O4uPVX.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Dp9FNFUB.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Clh6UN6s.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/KV_IJPlc.js">
|
||||
<link rel="prefetch" as="style" href="/dashboard/_nuxt/useServerStore.DWEvhDiM.css">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BJil4cV4.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CxCrma6T.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Daj78bx2.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C-LJOqlT.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DojZms5F.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CRppVnji.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/fsWNveW9.js">
|
||||
<link rel="prefetch" as="style" href="/dashboard/_nuxt/error-404.JekaaCis.css">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BM2bI9TQ.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Ccz-thTU.js">
|
||||
<link rel="prefetch" as="style" href="/dashboard/_nuxt/error-500.CNP9nqm1.css">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/XXfu_ZYX.js">
|
||||
<script type="module" src="/dashboard/_nuxt/B2dNgubA.js" crossorigin></script>
|
||||
<script id="unhead:payload" type="application/json">{"title":"Dashboard | WAHA"}</script><style type="text/css" data-primevue-style-id="base" >
|
||||
.p-hidden-accessible {
|
||||
border: 0;
|
||||
clip: rect(0 0 0 0);
|
||||
height: 1px;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
.p-hidden-accessible input,
|
||||
.p-hidden-accessible select {
|
||||
transform: scale(0);
|
||||
}
|
||||
|
||||
.p-overflow-hidden {
|
||||
overflow: hidden;
|
||||
padding-right: var(--scrollbar-width);
|
||||
}
|
||||
</style><style type="text/css" data-primevue-style-id="virtualscroller" >
|
||||
@layer primevue {
|
||||
.p-virtualscroller {
|
||||
position: relative;
|
||||
overflow: auto;
|
||||
contain: strict;
|
||||
transform: translateZ(0);
|
||||
will-change: scroll-position;
|
||||
outline: 0 none;
|
||||
}
|
||||
|
||||
.p-virtualscroller-content {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
/* contain: content; */
|
||||
min-height: 100%;
|
||||
min-width: 100%;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
.p-virtualscroller-spacer {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 1px;
|
||||
width: 1px;
|
||||
transform-origin: 0 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.p-virtualscroller .p-virtualscroller-loader {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.p-virtualscroller-loader.p-component-overlay {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.p-virtualscroller-loading-icon {
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
.p-virtualscroller-loading-icon.p-icon {
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
}
|
||||
|
||||
.p-virtualscroller-horizontal > .p-virtualscroller-content {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
/* Inline */
|
||||
.p-virtualscroller-inline .p-virtualscroller-content {
|
||||
position: static;
|
||||
}
|
||||
}
|
||||
</style></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" id="__NUXT_DATA__" data-ssr="false">[{"_errors":1,"serverRendered":2,"data":3,"state":4,"once":5},{},false,{},{},["Set"]]</script>
|
||||
<script>window.__NUXT__={};window.__NUXT__.config={public:{primevue:{usePrimeVue:true,resolvePath:"",cssLayerOrder:"tailwind-base, primevue, tailwind-utilities",importPT:"",options:{ripple:true},components:[{name:"AutoComplete",as:"AutoComplete",from:"primevue/autocomplete",export:"default",filePath:"primevue/autocomplete",global:true},{name:"Calendar",as:"Calendar",from:"primevue/calendar",export:"default",filePath:"primevue/calendar",global:true},{name:"CascadeSelect",as:"CascadeSelect",from:"primevue/cascadeselect",export:"default",filePath:"primevue/cascadeselect",global:true},{name:"Checkbox",as:"Checkbox",from:"primevue/checkbox",export:"default",filePath:"primevue/checkbox",global:true},{name:"Chips",as:"Chips",from:"primevue/chips",export:"default",filePath:"primevue/chips",global:true},{name:"ColorPicker",as:"ColorPicker",from:"primevue/colorpicker",export:"default",filePath:"primevue/colorpicker",global:true},{name:"Dropdown",as:"Dropdown",from:"primevue/dropdown",export:"default",filePath:"primevue/dropdown",global:true},{name:"FloatLabel",as:"FloatLabel",from:"primevue/floatlabel",export:"default",filePath:"primevue/floatlabel",global:true},{name:"IconField",as:"IconField",from:"primevue/iconfield",export:"default",filePath:"primevue/iconfield",global:true},{name:"InputGroup",as:"InputGroup",from:"primevue/inputgroup",export:"default",filePath:"primevue/inputgroup",global:true},{name:"InputGroupAddon",as:"InputGroupAddon",from:"primevue/inputgroupaddon",export:"default",filePath:"primevue/inputgroupaddon",global:true},{name:"InputIcon",as:"InputIcon",from:"primevue/inputicon",export:"default",filePath:"primevue/inputicon",global:true},{name:"InputMask",as:"InputMask",from:"primevue/inputmask",export:"default",filePath:"primevue/inputmask",global:true},{name:"InputNumber",as:"InputNumber",from:"primevue/inputnumber",export:"default",filePath:"primevue/inputnumber",global:true},{name:"InputOtp",as:"InputOtp",from:"primevue/inputotp",export:"default",filePath:"primevue/inputotp",global:true},{name:"InputSwitch",as:"InputSwitch",from:"primevue/inputswitch",export:"default",filePath:"primevue/inputswitch",global:true},{name:"InputText",as:"InputText",from:"primevue/inputtext",export:"default",filePath:"primevue/inputtext",global:true},{name:"Knob",as:"Knob",from:"primevue/knob",export:"default",filePath:"primevue/knob",global:true},{name:"Listbox",as:"Listbox",from:"primevue/listbox",export:"default",filePath:"primevue/listbox",global:true},{name:"MultiSelect",as:"MultiSelect",from:"primevue/multiselect",export:"default",filePath:"primevue/multiselect",global:true},{name:"Password",as:"Password",from:"primevue/password",export:"default",filePath:"primevue/password",global:true},{name:"RadioButton",as:"RadioButton",from:"primevue/radiobutton",export:"default",filePath:"primevue/radiobutton",global:true},{name:"Rating",as:"Rating",from:"primevue/rating",export:"default",filePath:"primevue/rating",global:true},{name:"SelectButton",as:"SelectButton",from:"primevue/selectbutton",export:"default",filePath:"primevue/selectbutton",global:true},{name:"Slider",as:"Slider",from:"primevue/slider",export:"default",filePath:"primevue/slider",global:true},{name:"Textarea",as:"Textarea",from:"primevue/textarea",export:"default",filePath:"primevue/textarea",global:true},{name:"ToggleButton",as:"ToggleButton",from:"primevue/togglebutton",export:"default",filePath:"primevue/togglebutton",global:true},{name:"TreeSelect",as:"TreeSelect",from:"primevue/treeselect",export:"default",filePath:"primevue/treeselect",global:true},{name:"TriStateCheckbox",as:"TriStateCheckbox",from:"primevue/tristatecheckbox",export:"default",filePath:"primevue/tristatecheckbox",global:true},{name:"Button",as:"Button",from:"primevue/button",export:"default",filePath:"primevue/button",global:true},{name:"ButtonGroup",as:"ButtonGroup",from:"primevue/buttongroup",export:"default",filePath:"primevue/buttongroup",global:true},{name:"SpeedDial",as:"SpeedDial",from:"primevue/speeddial",export:"default",filePath:"primevue/speeddial",global:true},{name:"SplitButton",as:"SplitButton",from:"primevue/splitbutton",export:"default",filePath:"primevue/splitbutton",global:true},{name:"Column",as:"Column",from:"primevue/column",export:"default",filePath:"primevue/column",global:true},{name:"Row",as:"Row",from:"primevue/row",export:"default",filePath:"primevue/row",global:true},{name:"ColumnGroup",as:"ColumnGroup",from:"primevue/columngroup",export:"default",filePath:"primevue/columngroup",global:true},{name:"DataTable",as:"DataTable",from:"primevue/datatable",export:"default",filePath:"primevue/datatable",global:true},{name:"DataView",as:"DataView",from:"primevue/dataview",export:"default",filePath:"primevue/dataview",global:true},{name:"DataViewLayoutOptions",as:"DataViewLayoutOptions",from:"primevue/dataviewlayoutoptions",export:"default",filePath:"primevue/dataviewlayoutoptions",global:true},{name:"OrderList",as:"OrderList",from:"primevue/orderlist",export:"Line truncated
|
||||
@@ -1,234 +0,0 @@
|
||||
<!DOCTYPE html><html><head><style type="text/css" data-primevue-style-id="layer-order" >@layer tailwind-base, primevue, tailwind-utilities</style><meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Dashboard | WAHA</title>
|
||||
<link id="theme-css" rel="stylesheet" type="text/css" href="/dashboard/themes/lara-dark-green/theme.css">
|
||||
<link rel="icon" type="image/x-icon" href="/dashboard/favicon.ico">
|
||||
<link rel="stylesheet" href="/dashboard/_nuxt/entry.CdRyF6M1.css">
|
||||
<link rel="modulepreload" as="script" crossorigin href="/dashboard/_nuxt/B2dNgubA.js">
|
||||
<link rel="prefetch" as="image" type="image/svg+xml" href="/dashboard/_nuxt/primeicons.BubJZjaf.svg">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DmNc7Cq3.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/i8U0E51M.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/NA602tiV.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DPnCzJas.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/9oaCfz9_.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DrH3nAaK.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DOdOkukQ.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CUlMFryE.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Ct7v4Wor.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Bg6qFPWQ.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Cd7enQUr.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/vufGS14u.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/B0mDjk9p.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/D6jzmgYr.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BgOppTNd.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/eAX3QGXH.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C6BNRodb.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DScqFD0S.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/6cfzVo_A.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C7offLeb.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BJ--pcnw.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BAHnDiIM.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DYQvr4NZ.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DJX-FvDU.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Dg5YIiM9.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DGBMS6kh.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CBW7Kdlk.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/G3kcvUYg.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DYegjXM1.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BLg1Je8o.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/p9qVLfDT.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Cr42Nx1j.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CJ_0rOvu.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Byr6sKjD.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/d2mvlTEh.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C5if_XeS.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C4Au66gi.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/U6eJolhE.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BctMRtWz.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/COj7VBUl.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DcQ1hgcU.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/fyScxAgc.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Bq-RNnO5.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DXE_NBbe.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CYNAg70H.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DgYlpRND.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/D1uV5-3s.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BCBwX40u.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Ds8OQ4x-.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BIP2YDsA.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CVAOtKIu.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Dk6EMvIl.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Bj4D3hvx.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/-kuS7-2a.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/iP3_YF2D.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BcSnMsuh.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Ba4Q5IHv.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Zl04YRo_.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CWOfD_eO.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DLFgGfm1.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Bv_LcJTQ.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CgFeChf8.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/vSu18QAB.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DztMGvHD.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BgvTNEpp.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/D8wpvM14.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/fgtdO4S8.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/OG7a1lZP.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CWpFuL50.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DdNt5_aY.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/ClnkyCA1.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DcRkkRNI.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DIpxPT-t.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DS4SYaHr.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DNmn4z4R.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/D-aDLYgW.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BW7HfLIi.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C1m9cEsv.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/jjCgGdRY.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CtVyEYxT.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/f6iJvKfl.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/6-po0WQo.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BZPTEpn9.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/D9JRVJE5.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DcoSDQtv.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/zQGx9Gyg.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C2M6PAqF.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/B-W3xOzA.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Dd8jkTTl.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C0OAlkKF.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BMkr4fww.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CKo8oW14.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/B0mqESIq.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DXrDdIOA.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CjicN48Z.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/ZzgLUKKb.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/TDVwwRG4.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/D7T1PH9q.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BYyeLUn8.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/ne5rPGT7.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BH2pwgQz.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DwPlgLsP.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/AcjHQ-tJ.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BfLfzA5E.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/H3UmoJi4.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BitJr0Jt.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/ApiEE17-.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DXVbZ-2I.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CB7qLDt2.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/D4JklAbI.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/IOQFRbtD.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DzomYlZa.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CMNUQCGD.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/GC65OX_T.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/ByPH_2IH.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BEivDF3P.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/3GU-057y.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/f_fZSkJq.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Dg249S_b.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BTeIluME.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C4SdKzqC.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DrdD5fKL.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/B_O4uPVX.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Dp9FNFUB.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Clh6UN6s.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/KV_IJPlc.js">
|
||||
<link rel="prefetch" as="style" href="/dashboard/_nuxt/useServerStore.DWEvhDiM.css">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BJil4cV4.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CxCrma6T.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Daj78bx2.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C-LJOqlT.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DojZms5F.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CRppVnji.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/fsWNveW9.js">
|
||||
<link rel="prefetch" as="style" href="/dashboard/_nuxt/error-404.JekaaCis.css">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BM2bI9TQ.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Ccz-thTU.js">
|
||||
<link rel="prefetch" as="style" href="/dashboard/_nuxt/error-500.CNP9nqm1.css">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/XXfu_ZYX.js">
|
||||
<script type="module" src="/dashboard/_nuxt/B2dNgubA.js" crossorigin></script>
|
||||
<script id="unhead:payload" type="application/json">{"title":"Dashboard | WAHA"}</script><style type="text/css" data-primevue-style-id="base" >
|
||||
.p-hidden-accessible {
|
||||
border: 0;
|
||||
clip: rect(0 0 0 0);
|
||||
height: 1px;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
.p-hidden-accessible input,
|
||||
.p-hidden-accessible select {
|
||||
transform: scale(0);
|
||||
}
|
||||
|
||||
.p-overflow-hidden {
|
||||
overflow: hidden;
|
||||
padding-right: var(--scrollbar-width);
|
||||
}
|
||||
</style><style type="text/css" data-primevue-style-id="virtualscroller" >
|
||||
@layer primevue {
|
||||
.p-virtualscroller {
|
||||
position: relative;
|
||||
overflow: auto;
|
||||
contain: strict;
|
||||
transform: translateZ(0);
|
||||
will-change: scroll-position;
|
||||
outline: 0 none;
|
||||
}
|
||||
|
||||
.p-virtualscroller-content {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
/* contain: content; */
|
||||
min-height: 100%;
|
||||
min-width: 100%;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
.p-virtualscroller-spacer {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 1px;
|
||||
width: 1px;
|
||||
transform-origin: 0 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.p-virtualscroller .p-virtualscroller-loader {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.p-virtualscroller-loader.p-component-overlay {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.p-virtualscroller-loading-icon {
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
.p-virtualscroller-loading-icon.p-icon {
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
}
|
||||
|
||||
.p-virtualscroller-horizontal > .p-virtualscroller-content {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
/* Inline */
|
||||
.p-virtualscroller-inline .p-virtualscroller-content {
|
||||
position: static;
|
||||
}
|
||||
}
|
||||
</style></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" id="__NUXT_DATA__" data-ssr="false">[{"_errors":1,"serverRendered":2,"data":3,"state":4,"once":5},{},false,{},{},["Set"]]</script>
|
||||
<script>window.__NUXT__={};window.__NUXT__.config={public:{primevue:{usePrimeVue:true,resolvePath:"",cssLayerOrder:"tailwind-base, primevue, tailwind-utilities",importPT:"",options:{ripple:true},components:[{name:"AutoComplete",as:"AutoComplete",from:"primevue/autocomplete",export:"default",filePath:"primevue/autocomplete",global:true},{name:"Calendar",as:"Calendar",from:"primevue/calendar",export:"default",filePath:"primevue/calendar",global:true},{name:"CascadeSelect",as:"CascadeSelect",from:"primevue/cascadeselect",export:"default",filePath:"primevue/cascadeselect",global:true},{name:"Checkbox",as:"Checkbox",from:"primevue/checkbox",export:"default",filePath:"primevue/checkbox",global:true},{name:"Chips",as:"Chips",from:"primevue/chips",export:"default",filePath:"primevue/chips",global:true},{name:"ColorPicker",as:"ColorPicker",from:"primevue/colorpicker",export:"default",filePath:"primevue/colorpicker",global:true},{name:"Dropdown",as:"Dropdown",from:"primevue/dropdown",export:"default",filePath:"primevue/dropdown",global:true},{name:"FloatLabel",as:"FloatLabel",from:"primevue/floatlabel",export:"default",filePath:"primevue/floatlabel",global:true},{name:"IconField",as:"IconField",from:"primevue/iconfield",export:"default",filePath:"primevue/iconfield",global:true},{name:"InputGroup",as:"InputGroup",from:"primevue/inputgroup",export:"default",filePath:"primevue/inputgroup",global:true},{name:"InputGroupAddon",as:"InputGroupAddon",from:"primevue/inputgroupaddon",export:"default",filePath:"primevue/inputgroupaddon",global:true},{name:"InputIcon",as:"InputIcon",from:"primevue/inputicon",export:"default",filePath:"primevue/inputicon",global:true},{name:"InputMask",as:"InputMask",from:"primevue/inputmask",export:"default",filePath:"primevue/inputmask",global:true},{name:"InputNumber",as:"InputNumber",from:"primevue/inputnumber",export:"default",filePath:"primevue/inputnumber",global:true},{name:"InputOtp",as:"InputOtp",from:"primevue/inputotp",export:"default",filePath:"primevue/inputotp",global:true},{name:"InputSwitch",as:"InputSwitch",from:"primevue/inputswitch",export:"default",filePath:"primevue/inputswitch",global:true},{name:"InputText",as:"InputText",from:"primevue/inputtext",export:"default",filePath:"primevue/inputtext",global:true},{name:"Knob",as:"Knob",from:"primevue/knob",export:"default",filePath:"primevue/knob",global:true},{name:"Listbox",as:"Listbox",from:"primevue/listbox",export:"default",filePath:"primevue/listbox",global:true},{name:"MultiSelect",as:"MultiSelect",from:"primevue/multiselect",export:"default",filePath:"primevue/multiselect",global:true},{name:"Password",as:"Password",from:"primevue/password",export:"default",filePath:"primevue/password",global:true},{name:"RadioButton",as:"RadioButton",from:"primevue/radiobutton",export:"default",filePath:"primevue/radiobutton",global:true},{name:"Rating",as:"Rating",from:"primevue/rating",export:"default",filePath:"primevue/rating",global:true},{name:"SelectButton",as:"SelectButton",from:"primevue/selectbutton",export:"default",filePath:"primevue/selectbutton",global:true},{name:"Slider",as:"Slider",from:"primevue/slider",export:"default",filePath:"primevue/slider",global:true},{name:"Textarea",as:"Textarea",from:"primevue/textarea",export:"default",filePath:"primevue/textarea",global:true},{name:"ToggleButton",as:"ToggleButton",from:"primevue/togglebutton",export:"default",filePath:"primevue/togglebutton",global:true},{name:"TreeSelect",as:"TreeSelect",from:"primevue/treeselect",export:"default",filePath:"primevue/treeselect",global:true},{name:"TriStateCheckbox",as:"TriStateCheckbox",from:"primevue/tristatecheckbox",export:"default",filePath:"primevue/tristatecheckbox",global:true},{name:"Button",as:"Button",from:"primevue/button",export:"default",filePath:"primevue/button",global:true},{name:"ButtonGroup",as:"ButtonGroup",from:"primevue/buttongroup",export:"default",filePath:"primevue/buttongroup",global:true},{name:"SpeedDial",as:"SpeedDial",from:"primevue/speeddial",export:"default",filePath:"primevue/speeddial",global:true},{name:"SplitButton",as:"SplitButton",from:"primevue/splitbutton",export:"default",filePath:"primevue/splitbutton",global:true},{name:"Column",as:"Column",from:"primevue/column",export:"default",filePath:"primevue/column",global:true},{name:"Row",as:"Row",from:"primevue/row",export:"default",filePath:"primevue/row",global:true},{name:"ColumnGroup",as:"ColumnGroup",from:"primevue/columngroup",export:"default",filePath:"primevue/columngroup",global:true},{name:"DataTable",as:"DataTable",from:"primevue/datatable",export:"default",filePath:"primevue/datatable",global:true},{name:"DataView",as:"DataView",from:"primevue/dataview",export:"default",filePath:"primevue/dataview",global:true},{name:"DataViewLayoutOptions",as:"DataViewLayoutOptions",from:"primevue/dataviewlayoutoptions",export:"default",filePath:"primevue/dataviewlayoutoptions",global:true},{name:"OrderList",as:"OrderList",from:"primevue/orderlist",export:"Line truncated
|
||||
@@ -1,234 +0,0 @@
|
||||
<!DOCTYPE html><html><head><style type="text/css" data-primevue-style-id="layer-order" >@layer tailwind-base, primevue, tailwind-utilities</style><meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Dashboard | WAHA</title>
|
||||
<link id="theme-css" rel="stylesheet" type="text/css" href="/dashboard/themes/lara-dark-green/theme.css">
|
||||
<link rel="icon" type="image/x-icon" href="/dashboard/favicon.ico">
|
||||
<link rel="stylesheet" href="/dashboard/_nuxt/entry.CdRyF6M1.css">
|
||||
<link rel="modulepreload" as="script" crossorigin href="/dashboard/_nuxt/B2dNgubA.js">
|
||||
<link rel="prefetch" as="image" type="image/svg+xml" href="/dashboard/_nuxt/primeicons.BubJZjaf.svg">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DmNc7Cq3.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/i8U0E51M.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/NA602tiV.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DPnCzJas.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/9oaCfz9_.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DrH3nAaK.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DOdOkukQ.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CUlMFryE.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Ct7v4Wor.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Bg6qFPWQ.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Cd7enQUr.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/vufGS14u.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/B0mDjk9p.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/D6jzmgYr.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BgOppTNd.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/eAX3QGXH.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C6BNRodb.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DScqFD0S.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/6cfzVo_A.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C7offLeb.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BJ--pcnw.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BAHnDiIM.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DYQvr4NZ.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DJX-FvDU.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Dg5YIiM9.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DGBMS6kh.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CBW7Kdlk.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/G3kcvUYg.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DYegjXM1.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BLg1Je8o.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/p9qVLfDT.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Cr42Nx1j.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CJ_0rOvu.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Byr6sKjD.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/d2mvlTEh.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C5if_XeS.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C4Au66gi.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/U6eJolhE.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BctMRtWz.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/COj7VBUl.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DcQ1hgcU.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/fyScxAgc.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Bq-RNnO5.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DXE_NBbe.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CYNAg70H.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DgYlpRND.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/D1uV5-3s.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BCBwX40u.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Ds8OQ4x-.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BIP2YDsA.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CVAOtKIu.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Dk6EMvIl.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Bj4D3hvx.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/-kuS7-2a.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/iP3_YF2D.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BcSnMsuh.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Ba4Q5IHv.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Zl04YRo_.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CWOfD_eO.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DLFgGfm1.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Bv_LcJTQ.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CgFeChf8.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/vSu18QAB.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DztMGvHD.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BgvTNEpp.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/D8wpvM14.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/fgtdO4S8.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/OG7a1lZP.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CWpFuL50.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DdNt5_aY.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/ClnkyCA1.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DcRkkRNI.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DIpxPT-t.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DS4SYaHr.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DNmn4z4R.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/D-aDLYgW.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BW7HfLIi.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C1m9cEsv.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/jjCgGdRY.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CtVyEYxT.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/f6iJvKfl.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/6-po0WQo.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BZPTEpn9.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/D9JRVJE5.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DcoSDQtv.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/zQGx9Gyg.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C2M6PAqF.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/B-W3xOzA.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Dd8jkTTl.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C0OAlkKF.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BMkr4fww.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CKo8oW14.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/B0mqESIq.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DXrDdIOA.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CjicN48Z.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/ZzgLUKKb.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/TDVwwRG4.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/D7T1PH9q.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BYyeLUn8.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/ne5rPGT7.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BH2pwgQz.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DwPlgLsP.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/AcjHQ-tJ.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BfLfzA5E.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/H3UmoJi4.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BitJr0Jt.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/ApiEE17-.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DXVbZ-2I.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CB7qLDt2.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/D4JklAbI.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/IOQFRbtD.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DzomYlZa.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CMNUQCGD.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/GC65OX_T.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/ByPH_2IH.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BEivDF3P.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/3GU-057y.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/f_fZSkJq.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Dg249S_b.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BTeIluME.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C4SdKzqC.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DrdD5fKL.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/B_O4uPVX.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Dp9FNFUB.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Clh6UN6s.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/KV_IJPlc.js">
|
||||
<link rel="prefetch" as="style" href="/dashboard/_nuxt/useServerStore.DWEvhDiM.css">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BJil4cV4.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CxCrma6T.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Daj78bx2.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C-LJOqlT.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DojZms5F.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CRppVnji.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/fsWNveW9.js">
|
||||
<link rel="prefetch" as="style" href="/dashboard/_nuxt/error-404.JekaaCis.css">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BM2bI9TQ.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Ccz-thTU.js">
|
||||
<link rel="prefetch" as="style" href="/dashboard/_nuxt/error-500.CNP9nqm1.css">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/XXfu_ZYX.js">
|
||||
<script type="module" src="/dashboard/_nuxt/B2dNgubA.js" crossorigin></script>
|
||||
<script id="unhead:payload" type="application/json">{"title":"Dashboard | WAHA"}</script><style type="text/css" data-primevue-style-id="base" >
|
||||
.p-hidden-accessible {
|
||||
border: 0;
|
||||
clip: rect(0 0 0 0);
|
||||
height: 1px;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
.p-hidden-accessible input,
|
||||
.p-hidden-accessible select {
|
||||
transform: scale(0);
|
||||
}
|
||||
|
||||
.p-overflow-hidden {
|
||||
overflow: hidden;
|
||||
padding-right: var(--scrollbar-width);
|
||||
}
|
||||
</style><style type="text/css" data-primevue-style-id="virtualscroller" >
|
||||
@layer primevue {
|
||||
.p-virtualscroller {
|
||||
position: relative;
|
||||
overflow: auto;
|
||||
contain: strict;
|
||||
transform: translateZ(0);
|
||||
will-change: scroll-position;
|
||||
outline: 0 none;
|
||||
}
|
||||
|
||||
.p-virtualscroller-content {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
/* contain: content; */
|
||||
min-height: 100%;
|
||||
min-width: 100%;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
.p-virtualscroller-spacer {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 1px;
|
||||
width: 1px;
|
||||
transform-origin: 0 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.p-virtualscroller .p-virtualscroller-loader {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.p-virtualscroller-loader.p-component-overlay {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.p-virtualscroller-loading-icon {
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
.p-virtualscroller-loading-icon.p-icon {
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
}
|
||||
|
||||
.p-virtualscroller-horizontal > .p-virtualscroller-content {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
/* Inline */
|
||||
.p-virtualscroller-inline .p-virtualscroller-content {
|
||||
position: static;
|
||||
}
|
||||
}
|
||||
</style></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" id="__NUXT_DATA__" data-ssr="false">[{"_errors":1,"serverRendered":2,"data":3,"state":4,"once":5},{},false,{},{},["Set"]]</script>
|
||||
<script>window.__NUXT__={};window.__NUXT__.config={public:{primevue:{usePrimeVue:true,resolvePath:"",cssLayerOrder:"tailwind-base, primevue, tailwind-utilities",importPT:"",options:{ripple:true},components:[{name:"AutoComplete",as:"AutoComplete",from:"primevue/autocomplete",export:"default",filePath:"primevue/autocomplete",global:true},{name:"Calendar",as:"Calendar",from:"primevue/calendar",export:"default",filePath:"primevue/calendar",global:true},{name:"CascadeSelect",as:"CascadeSelect",from:"primevue/cascadeselect",export:"default",filePath:"primevue/cascadeselect",global:true},{name:"Checkbox",as:"Checkbox",from:"primevue/checkbox",export:"default",filePath:"primevue/checkbox",global:true},{name:"Chips",as:"Chips",from:"primevue/chips",export:"default",filePath:"primevue/chips",global:true},{name:"ColorPicker",as:"ColorPicker",from:"primevue/colorpicker",export:"default",filePath:"primevue/colorpicker",global:true},{name:"Dropdown",as:"Dropdown",from:"primevue/dropdown",export:"default",filePath:"primevue/dropdown",global:true},{name:"FloatLabel",as:"FloatLabel",from:"primevue/floatlabel",export:"default",filePath:"primevue/floatlabel",global:true},{name:"IconField",as:"IconField",from:"primevue/iconfield",export:"default",filePath:"primevue/iconfield",global:true},{name:"InputGroup",as:"InputGroup",from:"primevue/inputgroup",export:"default",filePath:"primevue/inputgroup",global:true},{name:"InputGroupAddon",as:"InputGroupAddon",from:"primevue/inputgroupaddon",export:"default",filePath:"primevue/inputgroupaddon",global:true},{name:"InputIcon",as:"InputIcon",from:"primevue/inputicon",export:"default",filePath:"primevue/inputicon",global:true},{name:"InputMask",as:"InputMask",from:"primevue/inputmask",export:"default",filePath:"primevue/inputmask",global:true},{name:"InputNumber",as:"InputNumber",from:"primevue/inputnumber",export:"default",filePath:"primevue/inputnumber",global:true},{name:"InputOtp",as:"InputOtp",from:"primevue/inputotp",export:"default",filePath:"primevue/inputotp",global:true},{name:"InputSwitch",as:"InputSwitch",from:"primevue/inputswitch",export:"default",filePath:"primevue/inputswitch",global:true},{name:"InputText",as:"InputText",from:"primevue/inputtext",export:"default",filePath:"primevue/inputtext",global:true},{name:"Knob",as:"Knob",from:"primevue/knob",export:"default",filePath:"primevue/knob",global:true},{name:"Listbox",as:"Listbox",from:"primevue/listbox",export:"default",filePath:"primevue/listbox",global:true},{name:"MultiSelect",as:"MultiSelect",from:"primevue/multiselect",export:"default",filePath:"primevue/multiselect",global:true},{name:"Password",as:"Password",from:"primevue/password",export:"default",filePath:"primevue/password",global:true},{name:"RadioButton",as:"RadioButton",from:"primevue/radiobutton",export:"default",filePath:"primevue/radiobutton",global:true},{name:"Rating",as:"Rating",from:"primevue/rating",export:"default",filePath:"primevue/rating",global:true},{name:"SelectButton",as:"SelectButton",from:"primevue/selectbutton",export:"default",filePath:"primevue/selectbutton",global:true},{name:"Slider",as:"Slider",from:"primevue/slider",export:"default",filePath:"primevue/slider",global:true},{name:"Textarea",as:"Textarea",from:"primevue/textarea",export:"default",filePath:"primevue/textarea",global:true},{name:"ToggleButton",as:"ToggleButton",from:"primevue/togglebutton",export:"default",filePath:"primevue/togglebutton",global:true},{name:"TreeSelect",as:"TreeSelect",from:"primevue/treeselect",export:"default",filePath:"primevue/treeselect",global:true},{name:"TriStateCheckbox",as:"TriStateCheckbox",from:"primevue/tristatecheckbox",export:"default",filePath:"primevue/tristatecheckbox",global:true},{name:"Button",as:"Button",from:"primevue/button",export:"default",filePath:"primevue/button",global:true},{name:"ButtonGroup",as:"ButtonGroup",from:"primevue/buttongroup",export:"default",filePath:"primevue/buttongroup",global:true},{name:"SpeedDial",as:"SpeedDial",from:"primevue/speeddial",export:"default",filePath:"primevue/speeddial",global:true},{name:"SplitButton",as:"SplitButton",from:"primevue/splitbutton",export:"default",filePath:"primevue/splitbutton",global:true},{name:"Column",as:"Column",from:"primevue/column",export:"default",filePath:"primevue/column",global:true},{name:"Row",as:"Row",from:"primevue/row",export:"default",filePath:"primevue/row",global:true},{name:"ColumnGroup",as:"ColumnGroup",from:"primevue/columngroup",export:"default",filePath:"primevue/columngroup",global:true},{name:"DataTable",as:"DataTable",from:"primevue/datatable",export:"default",filePath:"primevue/datatable",global:true},{name:"DataView",as:"DataView",from:"primevue/dataview",export:"default",filePath:"primevue/dataview",global:true},{name:"DataViewLayoutOptions",as:"DataViewLayoutOptions",from:"primevue/dataviewlayoutoptions",export:"default",filePath:"primevue/dataviewlayoutoptions",global:true},{name:"OrderList",as:"OrderList",from:"primevue/orderlist",export:"Line truncated
|
||||
@@ -1,234 +0,0 @@
|
||||
<!DOCTYPE html><html><head><style type="text/css" data-primevue-style-id="layer-order" >@layer tailwind-base, primevue, tailwind-utilities</style><meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Dashboard | WAHA</title>
|
||||
<link id="theme-css" rel="stylesheet" type="text/css" href="/dashboard/themes/lara-dark-green/theme.css">
|
||||
<link rel="icon" type="image/x-icon" href="/dashboard/favicon.ico">
|
||||
<link rel="stylesheet" href="/dashboard/_nuxt/entry.CdRyF6M1.css">
|
||||
<link rel="modulepreload" as="script" crossorigin href="/dashboard/_nuxt/B2dNgubA.js">
|
||||
<link rel="prefetch" as="image" type="image/svg+xml" href="/dashboard/_nuxt/primeicons.BubJZjaf.svg">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DmNc7Cq3.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/i8U0E51M.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/NA602tiV.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DPnCzJas.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/9oaCfz9_.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DrH3nAaK.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DOdOkukQ.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CUlMFryE.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Ct7v4Wor.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Bg6qFPWQ.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Cd7enQUr.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/vufGS14u.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/B0mDjk9p.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/D6jzmgYr.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BgOppTNd.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/eAX3QGXH.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C6BNRodb.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DScqFD0S.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/6cfzVo_A.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C7offLeb.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BJ--pcnw.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BAHnDiIM.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DYQvr4NZ.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DJX-FvDU.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Dg5YIiM9.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DGBMS6kh.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CBW7Kdlk.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/G3kcvUYg.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DYegjXM1.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BLg1Je8o.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/p9qVLfDT.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Cr42Nx1j.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CJ_0rOvu.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Byr6sKjD.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/d2mvlTEh.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C5if_XeS.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C4Au66gi.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/U6eJolhE.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BctMRtWz.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/COj7VBUl.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DcQ1hgcU.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/fyScxAgc.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Bq-RNnO5.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DXE_NBbe.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CYNAg70H.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DgYlpRND.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/D1uV5-3s.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BCBwX40u.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Ds8OQ4x-.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BIP2YDsA.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CVAOtKIu.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Dk6EMvIl.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Bj4D3hvx.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/-kuS7-2a.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/iP3_YF2D.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BcSnMsuh.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Ba4Q5IHv.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Zl04YRo_.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CWOfD_eO.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DLFgGfm1.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Bv_LcJTQ.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CgFeChf8.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/vSu18QAB.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DztMGvHD.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BgvTNEpp.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/D8wpvM14.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/fgtdO4S8.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/OG7a1lZP.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CWpFuL50.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DdNt5_aY.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/ClnkyCA1.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DcRkkRNI.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DIpxPT-t.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DS4SYaHr.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DNmn4z4R.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/D-aDLYgW.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BW7HfLIi.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C1m9cEsv.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/jjCgGdRY.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CtVyEYxT.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/f6iJvKfl.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/6-po0WQo.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BZPTEpn9.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/D9JRVJE5.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DcoSDQtv.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/zQGx9Gyg.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C2M6PAqF.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/B-W3xOzA.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Dd8jkTTl.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C0OAlkKF.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BMkr4fww.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CKo8oW14.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/B0mqESIq.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DXrDdIOA.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CjicN48Z.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/ZzgLUKKb.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/TDVwwRG4.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/D7T1PH9q.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BYyeLUn8.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/ne5rPGT7.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BH2pwgQz.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DwPlgLsP.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/AcjHQ-tJ.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BfLfzA5E.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/H3UmoJi4.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BitJr0Jt.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/ApiEE17-.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DXVbZ-2I.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CB7qLDt2.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/D4JklAbI.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/IOQFRbtD.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DzomYlZa.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CMNUQCGD.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/GC65OX_T.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/ByPH_2IH.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BEivDF3P.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/3GU-057y.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/f_fZSkJq.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Dg249S_b.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BTeIluME.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C4SdKzqC.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DrdD5fKL.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/B_O4uPVX.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Dp9FNFUB.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Clh6UN6s.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/KV_IJPlc.js">
|
||||
<link rel="prefetch" as="style" href="/dashboard/_nuxt/useServerStore.DWEvhDiM.css">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BJil4cV4.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CxCrma6T.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Daj78bx2.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/C-LJOqlT.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/DojZms5F.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/CRppVnji.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/fsWNveW9.js">
|
||||
<link rel="prefetch" as="style" href="/dashboard/_nuxt/error-404.JekaaCis.css">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/BM2bI9TQ.js">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/Ccz-thTU.js">
|
||||
<link rel="prefetch" as="style" href="/dashboard/_nuxt/error-500.CNP9nqm1.css">
|
||||
<link rel="prefetch" as="script" crossorigin href="/dashboard/_nuxt/XXfu_ZYX.js">
|
||||
<script type="module" src="/dashboard/_nuxt/B2dNgubA.js" crossorigin></script>
|
||||
<script id="unhead:payload" type="application/json">{"title":"Dashboard | WAHA"}</script><style type="text/css" data-primevue-style-id="base" >
|
||||
.p-hidden-accessible {
|
||||
border: 0;
|
||||
clip: rect(0 0 0 0);
|
||||
height: 1px;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
.p-hidden-accessible input,
|
||||
.p-hidden-accessible select {
|
||||
transform: scale(0);
|
||||
}
|
||||
|
||||
.p-overflow-hidden {
|
||||
overflow: hidden;
|
||||
padding-right: var(--scrollbar-width);
|
||||
}
|
||||
</style><style type="text/css" data-primevue-style-id="virtualscroller" >
|
||||
@layer primevue {
|
||||
.p-virtualscroller {
|
||||
position: relative;
|
||||
overflow: auto;
|
||||
contain: strict;
|
||||
transform: translateZ(0);
|
||||
will-change: scroll-position;
|
||||
outline: 0 none;
|
||||
}
|
||||
|
||||
.p-virtualscroller-content {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
/* contain: content; */
|
||||
min-height: 100%;
|
||||
min-width: 100%;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
.p-virtualscroller-spacer {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 1px;
|
||||
width: 1px;
|
||||
transform-origin: 0 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.p-virtualscroller .p-virtualscroller-loader {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.p-virtualscroller-loader.p-component-overlay {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.p-virtualscroller-loading-icon {
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
.p-virtualscroller-loading-icon.p-icon {
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
}
|
||||
|
||||
.p-virtualscroller-horizontal > .p-virtualscroller-content {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
/* Inline */
|
||||
.p-virtualscroller-inline .p-virtualscroller-content {
|
||||
position: static;
|
||||
}
|
||||
}
|
||||
</style></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" id="__NUXT_DATA__" data-ssr="false">[{"_errors":1,"serverRendered":2,"data":3,"state":4,"once":5},{},false,{},{},["Set"]]</script>
|
||||
<script>window.__NUXT__={};window.__NUXT__.config={public:{primevue:{usePrimeVue:true,resolvePath:"",cssLayerOrder:"tailwind-base, primevue, tailwind-utilities",importPT:"",options:{ripple:true},components:[{name:"AutoComplete",as:"AutoComplete",from:"primevue/autocomplete",export:"default",filePath:"primevue/autocomplete",global:true},{name:"Calendar",as:"Calendar",from:"primevue/calendar",export:"default",filePath:"primevue/calendar",global:true},{name:"CascadeSelect",as:"CascadeSelect",from:"primevue/cascadeselect",export:"default",filePath:"primevue/cascadeselect",global:true},{name:"Checkbox",as:"Checkbox",from:"primevue/checkbox",export:"default",filePath:"primevue/checkbox",global:true},{name:"Chips",as:"Chips",from:"primevue/chips",export:"default",filePath:"primevue/chips",global:true},{name:"ColorPicker",as:"ColorPicker",from:"primevue/colorpicker",export:"default",filePath:"primevue/colorpicker",global:true},{name:"Dropdown",as:"Dropdown",from:"primevue/dropdown",export:"default",filePath:"primevue/dropdown",global:true},{name:"FloatLabel",as:"FloatLabel",from:"primevue/floatlabel",export:"default",filePath:"primevue/floatlabel",global:true},{name:"IconField",as:"IconField",from:"primevue/iconfield",export:"default",filePath:"primevue/iconfield",global:true},{name:"InputGroup",as:"InputGroup",from:"primevue/inputgroup",export:"default",filePath:"primevue/inputgroup",global:true},{name:"InputGroupAddon",as:"InputGroupAddon",from:"primevue/inputgroupaddon",export:"default",filePath:"primevue/inputgroupaddon",global:true},{name:"InputIcon",as:"InputIcon",from:"primevue/inputicon",export:"default",filePath:"primevue/inputicon",global:true},{name:"InputMask",as:"InputMask",from:"primevue/inputmask",export:"default",filePath:"primevue/inputmask",global:true},{name:"InputNumber",as:"InputNumber",from:"primevue/inputnumber",export:"default",filePath:"primevue/inputnumber",global:true},{name:"InputOtp",as:"InputOtp",from:"primevue/inputotp",export:"default",filePath:"primevue/inputotp",global:true},{name:"InputSwitch",as:"InputSwitch",from:"primevue/inputswitch",export:"default",filePath:"primevue/inputswitch",global:true},{name:"InputText",as:"InputText",from:"primevue/inputtext",export:"default",filePath:"primevue/inputtext",global:true},{name:"Knob",as:"Knob",from:"primevue/knob",export:"default",filePath:"primevue/knob",global:true},{name:"Listbox",as:"Listbox",from:"primevue/listbox",export:"default",filePath:"primevue/listbox",global:true},{name:"MultiSelect",as:"MultiSelect",from:"primevue/multiselect",export:"default",filePath:"primevue/multiselect",global:true},{name:"Password",as:"Password",from:"primevue/password",export:"default",filePath:"primevue/password",global:true},{name:"RadioButton",as:"RadioButton",from:"primevue/radiobutton",export:"default",filePath:"primevue/radiobutton",global:true},{name:"Rating",as:"Rating",from:"primevue/rating",export:"default",filePath:"primevue/rating",global:true},{name:"SelectButton",as:"SelectButton",from:"primevue/selectbutton",export:"default",filePath:"primevue/selectbutton",global:true},{name:"Slider",as:"Slider",from:"primevue/slider",export:"default",filePath:"primevue/slider",global:true},{name:"Textarea",as:"Textarea",from:"primevue/textarea",export:"default",filePath:"primevue/textarea",global:true},{name:"ToggleButton",as:"ToggleButton",from:"primevue/togglebutton",export:"default",filePath:"primevue/togglebutton",global:true},{name:"TreeSelect",as:"TreeSelect",from:"primevue/treeselect",export:"default",filePath:"primevue/treeselect",global:true},{name:"TriStateCheckbox",as:"TriStateCheckbox",from:"primevue/tristatecheckbox",export:"default",filePath:"primevue/tristatecheckbox",global:true},{name:"Button",as:"Button",from:"primevue/button",export:"default",filePath:"primevue/button",global:true},{name:"ButtonGroup",as:"ButtonGroup",from:"primevue/buttongroup",export:"default",filePath:"primevue/buttongroup",global:true},{name:"SpeedDial",as:"SpeedDial",from:"primevue/speeddial",export:"default",filePath:"primevue/speeddial",global:true},{name:"SplitButton",as:"SplitButton",from:"primevue/splitbutton",export:"default",filePath:"primevue/splitbutton",global:true},{name:"Column",as:"Column",from:"primevue/column",export:"default",filePath:"primevue/column",global:true},{name:"Row",as:"Row",from:"primevue/row",export:"default",filePath:"primevue/row",global:true},{name:"ColumnGroup",as:"ColumnGroup",from:"primevue/columngroup",export:"default",filePath:"primevue/columngroup",global:true},{name:"DataTable",as:"DataTable",from:"primevue/datatable",export:"default",filePath:"primevue/datatable",global:true},{name:"DataView",as:"DataView",from:"primevue/dataview",export:"default",filePath:"primevue/dataview",global:true},{name:"DataViewLayoutOptions",as:"DataViewLayoutOptions",from:"primevue/dataviewlayoutoptions",export:"default",filePath:"primevue/dataviewlayoutoptions",global:true},{name:"OrderList",as:"OrderList",from:"primevue/orderlist",export:"Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
import{s as r}from"./DrH3nAaK.js";import{t,v as o,aa as s,x as a}from"./B2dNgubA.js";var C={name:"PlusIcon",extends:r},n=a("path",{d:"M7.67742 6.32258V0.677419C7.67742 0.497757 7.60605 0.325452 7.47901 0.198411C7.35197 0.0713707 7.17966 0 7 0C6.82034 0 6.64803 0.0713707 6.52099 0.198411C6.39395 0.325452 6.32258 0.497757 6.32258 0.677419V6.32258H0.677419C0.497757 6.32258 0.325452 6.39395 0.198411 6.52099C0.0713707 6.64803 0 6.82034 0 7C0 7.17966 0.0713707 7.35197 0.198411 7.47901C0.325452 7.60605 0.497757 7.67742 0.677419 7.67742H6.32258V13.3226C6.32492 13.5015 6.39704 13.6725 6.52358 13.799C6.65012 13.9255 6.82106 13.9977 7 14C7.17966 14 7.35197 13.9286 7.47901 13.8016C7.60605 13.6745 7.67742 13.5022 7.67742 13.3226V7.67742H13.3226C13.5022 7.67742 13.6745 7.60605 13.8016 7.47901C13.9286 7.35197 14 7.17966 14 7C13.9977 6.82106 13.9255 6.65012 13.799 6.52358C13.6725 6.39704 13.5015 6.32492 13.3226 6.32258H7.67742Z",fill:"currentColor"},null,-1),i=[n];function p(e,l,c,d,h,m){return t(),o("svg",s({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.pti()),i,16)}C.render=p;export{C as s};
|
||||
@@ -1 +0,0 @@
|
||||
import v from"./i8U0E51M.js";import{a3 as b,av as h,i as P,Z as g,$ as O,t as i,v as c,aa as a,ag as w,Y as p,P as u,A as B,ab as S,O as j}from"./B2dNgubA.js";import{s as I}from"./DJX-FvDU.js";import{s as $}from"./DPnCzJas.js";import"./NA602tiV.js";import"./9oaCfz9_.js";import"./DrH3nAaK.js";var C={root:function(t){var r=t.props;return["p-inplace p-component",{"p-inplace-closable":r.closable}]},display:function(t){var r=t.props;return["p-inplace-display",{"p-disabled":r.disabled}]},content:"p-inplace-content"},D=b.extend({name:"inplace",classes:C}),k={name:"BaseInplace",extends:$,props:{closable:{type:Boolean,default:!1},active:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},closeIcon:{type:String,default:void 0},displayProps:{type:null,default:null},closeButtonProps:{type:null,default:null}},style:D,provide:function(){return{$parentInstance:this}}},A={name:"Inplace",extends:k,inheritAttrs:!1,emits:["open","close","update:active"],data:function(){return{d_active:this.active}},watch:{active:function(t){this.d_active=t}},methods:{open:function(t){this.disabled||(this.$emit("open",t),this.d_active=!0,this.$emit("update:active",!0))},close:function(t){var r=this;this.$emit("close",t),this.d_active=!1,this.$emit("update:active",!1),setTimeout(function(){r.$refs.display.focus()},0)}},computed:{closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},components:{IPButton:v,TimesIcon:I},directives:{focustrap:h}};function s(e){"@babel/helpers - typeof";return s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(e)}function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?f(Object(r),!0).forEach(function(n){T(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function T(e,t,r){return t=E(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function E(e){var t=K(e,"string");return s(t)=="symbol"?t:String(t)}function K(e,t){if(s(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(s(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var L=["tabindex"];function N(e,t,r,n,l,o){var m=P("IPButton"),y=g("focustrap");return O((i(),c("div",a({class:e.cx("root"),"aria-live":"polite"},e.ptmi("root")),[l.d_active?(i(),c("div",a({key:1,class:e.cx("content")},e.ptm("content")),[p(e.$slots,"content"),e.closable?(i(),u(m,a({key:0,"aria-label":o.closeAriaLabel,onClick:o.close,unstyled:e.unstyled,pt:e.ptm("closeButton")},e.closeButtonProps),{icon:B(function(){return[p(e.$slots,"closeicon",{},function(){return[(i(),u(S(e.closeIcon?"span":"TimesIcon"),a({class:e.closeIcon},e.ptm("closeButton").icon,{"data-pc-section":"closebuttonicon"}),null,16,["class"]))]})]}),_:3},16,["aria-label","onClick","unstyled","pt"])):j("",!0)],16)):(i(),c("div",a({key:0,ref:"display",class:e.cx("display"),tabindex:e.$attrs.tabindex||"0",role:"button",onClick:t[0]||(t[0]=function(){return o.open&&o.open.apply(o,arguments)}),onKeydown:t[1]||(t[1]=w(function(){return o.open&&o.open.apply(o,arguments)},["enter"]))},d(d({},e.displayProps),e.ptm("display"))),[p(e.$slots,"display")],16,L))],16)),[[y]])}A.render=N;export{A as default};
|
||||
@@ -1 +0,0 @@
|
||||
import{s as r}from"./DPnCzJas.js";import{a3 as a,t as i,v as l,Y as o,aa as p}from"./B2dNgubA.js";var u={root:function(t){var n=t.instance;return["p-splitter-panel",{"p-splitter-panel-nested":n.isNested}]}},d=a.extend({name:"splitterpanel",classes:u}),c={name:"BaseSplitterPanel",extends:r,props:{size:{type:Number,default:null},minSize:{type:Number,default:null}},style:d,provide:function(){return{$parentInstance:this}}},f={name:"SplitterPanel",extends:c,inheritAttrs:!1,data:function(){return{nestedState:null}},computed:{isNested:function(){var t=this;return this.$slots.default().some(function(n){return t.nestedState=n.type.name==="Splitter"?!0:null,t.nestedState})},getPTOptions:function(){return{context:{nested:this.isNested}}}}};function m(e,t,n,S,v,s){return i(),l("div",p({ref:"container",class:e.cx("root")},e.ptmi("root",s.getPTOptions)),[o(e.$slots,"default")],16)}f.render=m;export{f as default};
|
||||
@@ -1 +0,0 @@
|
||||
import{s as r}from"./DrH3nAaK.js";import{t,v as o,aa as s,x as a}from"./B2dNgubA.js";var C={name:"CheckIcon",extends:r},n=a("path",{d:"M4.86199 11.5948C4.78717 11.5923 4.71366 11.5745 4.64596 11.5426C4.57826 11.5107 4.51779 11.4652 4.46827 11.4091L0.753985 7.69483C0.683167 7.64891 0.623706 7.58751 0.580092 7.51525C0.536478 7.44299 0.509851 7.36177 0.502221 7.27771C0.49459 7.19366 0.506156 7.10897 0.536046 7.03004C0.565935 6.95111 0.613367 6.88 0.674759 6.82208C0.736151 6.76416 0.8099 6.72095 0.890436 6.69571C0.970973 6.67046 1.05619 6.66385 1.13966 6.67635C1.22313 6.68886 1.30266 6.72017 1.37226 6.76792C1.44186 6.81567 1.4997 6.8786 1.54141 6.95197L4.86199 10.2503L12.6397 2.49483C12.7444 2.42694 12.8689 2.39617 12.9932 2.40745C13.1174 2.41873 13.2343 2.47141 13.3251 2.55705C13.4159 2.64268 13.4753 2.75632 13.4938 2.87973C13.5123 3.00315 13.4888 3.1292 13.4271 3.23768L5.2557 11.4091C5.20618 11.4652 5.14571 11.5107 5.07801 11.5426C5.01031 11.5745 4.9368 11.5923 4.86199 11.5948Z",fill:"currentColor"},null,-1),i=[n];function p(e,c,l,d,h,m){return t(),o("svg",s({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.pti()),i,16)}C.render=p;export{C as s};
|
||||
@@ -1 +0,0 @@
|
||||
import{s as C}from"./DrH3nAaK.js";import{t as r,v as t,aa as o,x as s}from"./B2dNgubA.js";var a={name:"SpinnerIcon",extends:C},n=s("path",{d:"M6.99701 14C5.85441 13.999 4.72939 13.7186 3.72012 13.1832C2.71084 12.6478 1.84795 11.8737 1.20673 10.9284C0.565504 9.98305 0.165424 8.89526 0.041387 7.75989C-0.0826496 6.62453 0.073125 5.47607 0.495122 4.4147C0.917119 3.35333 1.59252 2.4113 2.46241 1.67077C3.33229 0.930247 4.37024 0.413729 5.4857 0.166275C6.60117 -0.0811796 7.76026 -0.0520535 8.86188 0.251112C9.9635 0.554278 10.9742 1.12227 11.8057 1.90555C11.915 2.01493 11.9764 2.16319 11.9764 2.31778C11.9764 2.47236 11.915 2.62062 11.8057 2.73C11.7521 2.78503 11.688 2.82877 11.6171 2.85864C11.5463 2.8885 11.4702 2.90389 11.3933 2.90389C11.3165 2.90389 11.2404 2.8885 11.1695 2.85864C11.0987 2.82877 11.0346 2.78503 10.9809 2.73C9.9998 1.81273 8.73246 1.26138 7.39226 1.16876C6.05206 1.07615 4.72086 1.44794 3.62279 2.22152C2.52471 2.99511 1.72683 4.12325 1.36345 5.41602C1.00008 6.70879 1.09342 8.08723 1.62775 9.31926C2.16209 10.5513 3.10478 11.5617 4.29713 12.1803C5.48947 12.7989 6.85865 12.988 8.17414 12.7157C9.48963 12.4435 10.6711 11.7264 11.5196 10.6854C12.3681 9.64432 12.8319 8.34282 12.8328 7C12.8328 6.84529 12.8943 6.69692 13.0038 6.58752C13.1132 6.47812 13.2616 6.41667 13.4164 6.41667C13.5712 6.41667 13.7196 6.47812 13.8291 6.58752C13.9385 6.69692 14 6.84529 14 7C14 8.85651 13.2622 10.637 11.9489 11.9497C10.6356 13.2625 8.85432 14 6.99701 14Z",fill:"currentColor"},null,-1),i=[n];function p(e,c,l,d,h,m){return r(),t("svg",o({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.pti()),i,16)}a.render=p;export{a as s};
|
||||
@@ -1 +0,0 @@
|
||||
import{s as V}from"./vSu18QAB.js";import{a3 as z,a5 as D,a4 as m,a6 as M,a7 as b,aa as c,a9 as N,i as K,Z as O,t as l,v as d,y as A,O as g,N as y,Q as x,x as P,$ as T,P as p,W as E,ab as k,aD as B,Y as L,z as S,ae as R,af as G}from"./B2dNgubA.js";import{s as F}from"./DPnCzJas.js";import{s as U}from"./Cr42Nx1j.js";import{s as H}from"./C6BNRodb.js";import"./DrH3nAaK.js";var q={submenu:function(e){var i=e.instance,s=e.processedItem;return{display:i.isItemActive(s)?"block":"none"}}},j={root:function(e){var i=e.instance;return["p-megamenu p-component",{"p-megamenu-mobile":i.queryMatches,"p-megamenu-mobile-active":i.mobileActive,"p-megamenu-horizontal":i.horizontal,"p-megamenu-vertical":i.vertical}]},start:"p-megamenu-start",menubutton:"p-megamenu-button",menu:"p-megamenu-root-list",submenuHeader:function(e){var i=e.instance,s=e.processedItem;return["p-megamenu-submenu-header p-submenu-header",{"p-disabled":i.isItemDisabled(s)}]},menuitem:function(e){var i=e.instance,s=e.processedItem;return["p-menuitem",{"p-menuitem-active p-highlight":i.isItemActive(s),"p-focus":i.isItemFocused(s),"p-disabled":i.isItemDisabled(s)}]},content:"p-menuitem-content",action:"p-menuitem-link",icon:"p-menuitem-icon",label:"p-menuitem-text",submenuIcon:"p-submenu-icon",panel:"p-megamenu-panel",grid:"p-megamenu-grid",column:function(e){var i=e.instance,s=e.processedItem,r=i.isItemGroup(s)?s.items.length:0,n;if(i.$parentInstance.queryMatches)n="p-megamenu-col-12";else switch(r){case 2:n="p-megamenu-col-6";break;case 3:n="p-megamenu-col-4";break;case 4:n="p-megamenu-col-3";break;case 6:n="p-megamenu-col-2";break;default:n="p-megamenu-col-12";break}return n},submenu:"p-submenu-list p-megamenu-submenu",submenuLabel:"p-menuitem-text",separator:"p-menuitem-separator",end:"p-megamenu-end"},W=z.extend({name:"megamenu",classes:j,inlineStyles:q}),Z={name:"BaseMegaMenu",extends:F,props:{model:{type:Array,default:null},orientation:{type:String,default:"horizontal"},breakpoint:{type:String,default:"960px"},disabled:{type:Boolean,default:!1},tabindex:{type:Number,default:0},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:W,provide:function(){return{$parentInstance:this}}},w={name:"MegaMenuSub",hostName:"MegaMenu",extends:F,emits:["item-click","item-mouseenter"],props:{menuId:{type:String,default:null},focusedItemId:{type:String,default:null},horizontal:{type:Boolean,default:!1},submenu:{type:Object,default:null},mobileActive:{type:Boolean,default:!1},items:{type:Array,default:null},level:{type:Number,default:0},templates:{type:Object,default:null},activeItem:{type:Object,default:null},tabindex:{type:Number,default:0}},methods:{getSubListId:function(e){return"".concat(this.getItemId(e),"_list")},getSubListKey:function(e){return this.getSubListId(e)},getItemId:function(e){return"".concat(this.menuId,"_").concat(e.key)},getItemKey:function(e){return this.getItemId(e)},getItemProp:function(e,i,s){return e&&e.item?m.getItemValue(e.item[i],s):void 0},getItemLabel:function(e){return this.getItemProp(e,"label")},getPTOptions:function(e,i,s){return this.ptm(s,{context:{item:e,index:i,active:this.isItemActive(e),focused:this.isItemFocused(e),disabled:this.isItemDisabled(e)}})},isItemActive:function(e){return m.isNotEmpty(this.activeItem)?this.activeItem.key===e.key:!1},isItemVisible:function(e){return this.getItemProp(e,"visible")!==!1},isItemDisabled:function(e){return this.getItemProp(e,"disabled")},isItemFocused:function(e){return this.focusedItemId===this.getItemId(e)},isItemGroup:function(e){return m.isNotEmpty(e.items)},onItemClick:function(e,i){this.getItemProp(i,"command",{originalEvent:e,item:i.item}),this.$emit("item-click",{originalEvent:e,processedItem:i,isFocus:!0})},onItemMouseEnter:function(e,i){this.$emit("item-mouseenter",{originalEvent:e,processedItem:i})},getAriaSetSize:function(){var e=this;return this.items.filter(function(i){return e.isItemVisible(i)&&!e.getItemProp(i,"separator")}).length},getAriaPosInset:function(e){var i=this;return e-this.items.slice(0,e).filter(function(s){return i.isItemVisible(s)&&i.getItemProp(s,"separator")}).length+1},getMenuItemProps:function(e,i){return{action:c({class:this.cx("action"),tabindex:-1,"aria-hidden":!0},this.getPTOptions(e,i,"action")),icon:c({class:[this.cx("icon"),this.getItemProp(e,"icon")]},this.getPTOptions(e,i,"icon")),label:c({class:this.cx("label")},this.getPTOptions(e,i,"label")),submenuicon:c({class:this.cx("submenuIcon")},this.getPTOptions(e,i,"submenuIcon"))}}},components:{AngleRightIcon:H,AngleDownIcon:U},directives:{ripple:N}},Q=["tabindex"],Y=["id","aria-label","aria-disabled","aria-expanded","aria-haspopup","aria-level","aria-setsize","aria-posinset","data-p-highlight","data-p-focused","data-p-disabled"],J=["onClick","onMouseenter"],X=["href","target"],_=["id"];function $(t,e,i,s,r,n){var o=K("MegaMenuSub",!0),h=O("ripple");return l(),d("ul",c({class:i.level===0?t.cx("menu"):t.cx("submenu"),tabindex:i.tabindex},i.level===0?t.ptm("menu"):t.ptm("Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
import{a3 as h,aG as f,t as p,v as d,x as m,aa as o}from"./B2dNgubA.js";import{s as y}from"./DPnCzJas.js";var g={root:{position:"relative"}},v={root:"p-chart"},b=h.extend({name:"chart",inlineStyles:g,classes:v}),O={name:"BaseChart",extends:y,props:{type:String,data:null,options:null,plugins:null,width:{type:Number,default:300},height:{type:Number,default:150},canvasProps:{type:null,default:null}},style:b,provide:function(){return{$parentInstance:this}}},P={name:"Chart",extends:O,inheritAttrs:!1,emits:["select","loaded"],chart:null,watch:{data:{handler:function(){this.reinit()},deep:!0},type:function(){this.reinit()},options:function(){this.reinit()}},mounted:function(){this.initChart()},beforeUnmount:function(){this.chart&&(this.chart.destroy(),this.chart=null)},methods:{initChart:function(){var e=this;f(()=>import("./ZmloDkWs.js"),[],import.meta.url).then(function(r){e.chart&&(e.chart.destroy(),e.chart=null),r&&r.default&&(e.chart=new r.default(e.$refs.canvas,{type:e.type,data:e.data,options:e.options,plugins:e.plugins})),e.$emit("loaded",e.chart)})},getCanvas:function(){return this.$canvas},getChart:function(){return this.chart},getBase64Image:function(){return this.chart.toBase64Image()},refresh:function(){this.chart&&this.chart.update()},reinit:function(){this.initChart()},onCanvasClick:function(e){if(this.chart){var r=this.chart.getElementsAtEventForMode(e,"nearest",{intersect:!0},!1),n=this.chart.getElementsAtEventForMode(e,"dataset",{intersect:!0},!1);r&&r[0]&&n&&this.$emit("select",{originalEvent:e,element:r[0],dataset:n})}},generateLegend:function(){if(this.chart)return this.chart.generateLegend()}}};function i(t){"@babel/helpers - typeof";return i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(t)}function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function c(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?s(Object(r),!0).forEach(function(n){C(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function C(t,e,r){return e=w(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function w(t){var e=S(t,"string");return i(e)=="symbol"?e:String(e)}function S(t,e){if(i(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(i(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var j=["width","height"];function E(t,e,r,n,a,u){return p(),d("div",o({class:t.cx("root"),style:t.sx("root")},t.ptmi("root")),[m("canvas",o({ref:"canvas",width:t.width,height:t.height,onClick:e[0]||(e[0]=function(l){return u.onCanvasClick(l)})},c(c({},t.canvasProps),t.ptm("canvas"))),null,16,j)],16)}P.render=E;export{P as default};
|
||||
@@ -1 +0,0 @@
|
||||
import B from"./i8U0E51M.js";import{a3 as L,au as a,i as g,t as s,P as m,a1 as p,A as r,Y as l,z as j,W as u,x as d,aa as f,v as b,N as v,ab as C,O as k,y as S}from"./B2dNgubA.js";import D from"./Dd8jkTTl.js";import{s as I}from"./DPnCzJas.js";import"./NA602tiV.js";import"./9oaCfz9_.js";import"./DrH3nAaK.js";import"./DJX-FvDU.js";import"./Bg6qFPWQ.js";var F={root:"p-confirm-dialog",icon:"p-confirm-dialog-icon",message:"p-confirm-dialog-message",rejectButton:function(t){var i=t.instance;return["p-confirm-dialog-reject",i.confirmation&&!i.confirmation.rejectClass?"p-button-text":null]},acceptButton:"p-confirm-dialog-accept"},O=L.extend({name:"confirmdialog",classes:F}),E={name:"BaseConfirmDialog",extends:I,props:{group:String,breakpoints:{type:Object,default:null},draggable:{type:Boolean,default:!0}},style:O,provide:function(){return{$parentInstance:this}}},A={name:"ConfirmDialog",extends:E,confirmListener:null,closeListener:null,data:function(){return{visible:!1,confirmation:null}},mounted:function(){var t=this;this.confirmListener=function(i){i&&i.group===t.group&&(t.confirmation=i,t.confirmation.onShow&&t.confirmation.onShow(),t.visible=!0)},this.closeListener=function(){t.visible=!1,t.confirmation=null},a.on("confirm",this.confirmListener),a.on("close",this.closeListener)},beforeUnmount:function(){a.off("confirm",this.confirmListener),a.off("close",this.closeListener)},methods:{accept:function(){this.confirmation.accept&&this.confirmation.accept(),this.visible=!1},reject:function(){this.confirmation.reject&&this.confirmation.reject(),this.visible=!1},onHide:function(){this.confirmation.onHide&&this.confirmation.onHide(),this.visible=!1},getCXOptions:function(t,i){return{contenxt:{icon:t,iconClass:i.class}}}},computed:{header:function(){return this.confirmation?this.confirmation.header:null},message:function(){return this.confirmation?this.confirmation.message:null},blockScroll:function(){return this.confirmation?this.confirmation.blockScroll:!0},position:function(){return this.confirmation?this.confirmation.position:null},acceptLabel:function(){return this.confirmation?this.confirmation.acceptLabel||this.$primevue.config.locale.accept:null},rejectLabel:function(){return this.confirmation?this.confirmation.rejectLabel||this.$primevue.config.locale.reject:null},acceptIcon:function(){return this.confirmation?this.confirmation.acceptIcon:null},rejectIcon:function(){return this.confirmation?this.confirmation.rejectIcon:null},autoFocusAccept:function(){return this.confirmation.defaultFocus===void 0||this.confirmation.defaultFocus==="accept"},autoFocusReject:function(){return this.confirmation.defaultFocus==="reject"},closeOnEscape:function(){return this.confirmation?this.confirmation.closeOnEscape:!0}},components:{CDialog:D,CDButton:B}};function H(e,t,i,N,c,n){var h=g("CDButton"),y=g("CDialog");return s(),m(y,{visible:c.visible,"onUpdate:visible":[t[2]||(t[2]=function(o){return c.visible=o}),n.onHide],role:"alertdialog",class:u(e.cx("root")),modal:!0,header:n.header,blockScroll:n.blockScroll,position:n.position,breakpoints:e.breakpoints,closeOnEscape:n.closeOnEscape,draggable:e.draggable,pt:e.pt,unstyled:e.unstyled},p({default:r(function(){return[e.$slots.container?k("",!0):(s(),b(v,{key:0},[e.$slots.message?(s(),m(C(e.$slots.message),{key:1,message:c.confirmation},null,8,["message"])):(s(),b(v,{key:0},[l(e.$slots,"icon",{},function(){return[e.$slots.icon?(s(),m(C(e.$slots.icon),{key:0,class:u(e.cx("icon"))},null,8,["class"])):c.confirmation.icon?(s(),b("span",f({key:1,class:[c.confirmation.icon,e.cx("icon")]},e.ptm("icon")),null,16)):k("",!0)]}),d("span",f({class:e.cx("message")},e.ptm("message")),S(n.message),17)],64))],64))]}),_:2},[e.$slots.container?{name:"container",fn:r(function(o){return[l(e.$slots,"container",{message:c.confirmation,onClose:o.onClose,onAccept:n.accept,onReject:n.reject,closeCallback:o.onclose,acceptCallback:n.accept,rejectCallback:n.reject})]}),key:"0"}:void 0,e.$slots.container?void 0:{name:"footer",fn:r(function(){return[j(h,{label:n.rejectLabel,class:u([e.cx("rejectButton"),c.confirmation.rejectClass]),onClick:t[0]||(t[0]=function(o){return n.reject()}),autofocus:n.autoFocusReject,unstyled:e.unstyled,pt:e.ptm("rejectButton")},p({_:2},[n.rejectIcon||e.$slots.rejecticon?{name:"icon",fn:r(function(o){return[l(e.$slots,"rejecticon",{},function(){return[d("span",f({class:[n.rejectIcon,o.class]},e.ptm("rejectButton").icon,{"data-pc-section":"rejectbuttonicon"}),null,16)]})]}),key:"0"}:void 0]),1032,["label","class","autofocus","unstyled","pt"]),j(h,{label:n.acceptLabel,class:u([e.cx("acceptButton"),c.confirmation.acceptClass]),onClick:t[1]||(t[1]=function(o){return n.accept()}),autofocus:n.autoFocusAccept,unstyled:e.unstyled,pt:e.ptm("acceptButton")},p({_:2},[n.acceptIcon||e.$slots.accepticon?{name:"icon",fn:r(function(o){return[l(e.$slots,"accepticon",{},function(){return[d("span",f({class:[n.acceptIcon,o.class]},e.ptm("acceptButton").icon,{"data-pc-section":"acceptbuttonicon"}),null,16)Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
import{s as r}from"./DrH3nAaK.js";import{t,v as o,aa as s,x as a}from"./B2dNgubA.js";var n={name:"ChevronLeftIcon",extends:r},i=a("path",{d:"M9.61296 13C9.50997 13.0005 9.40792 12.9804 9.3128 12.9409C9.21767 12.9014 9.13139 12.8433 9.05902 12.7701L3.83313 7.54416C3.68634 7.39718 3.60388 7.19795 3.60388 6.99022C3.60388 6.78249 3.68634 6.58325 3.83313 6.43628L9.05902 1.21039C9.20762 1.07192 9.40416 0.996539 9.60724 1.00012C9.81032 1.00371 10.0041 1.08597 10.1477 1.22959C10.2913 1.37322 10.3736 1.56698 10.3772 1.77005C10.3808 1.97313 10.3054 2.16968 10.1669 2.31827L5.49496 6.99022L10.1669 11.6622C10.3137 11.8091 10.3962 12.0084 10.3962 12.2161C10.3962 12.4238 10.3137 12.6231 10.1669 12.7701C10.0945 12.8433 10.0083 12.9014 9.91313 12.9409C9.81801 12.9804 9.71596 13.0005 9.61296 13Z",fill:"currentColor"},null,-1),p=[i];function C(e,c,l,d,h,m){return t(),o("svg",s({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.pti()),p,16)}n.render=C;export{n as s};
|
||||
@@ -1 +0,0 @@
|
||||
import{a3 as S,a6 as m,a7 as c,av as B,a9 as g,i as w,Z as h,t as o,P as p,A as b,v as l,aa as s,z as D,ac as I,$ as v,Y as d,N as E,x as k,W as y,y as K,O as u,ab as R}from"./B2dNgubA.js";import{s as A}from"./DJX-FvDU.js";import{s as O}from"./Bg6qFPWQ.js";import{s as V}from"./DPnCzJas.js";import"./DrH3nAaK.js";var Z={mask:function(t){var i=t.position;return{position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex",justifyContent:i==="left"?"flex-start":i==="right"?"flex-end":"center",alignItems:i==="top"?"flex-start":i==="bottom"?"flex-end":"center"}}},M={mask:function(t){var i=t.instance,r=t.props,a=["left","right","top","bottom"],n=a.find(function(f){return f===r.position});return["p-sidebar-mask",{"p-component-overlay p-component-overlay-enter":r.modal,"p-sidebar-mask-scrollblocker":r.blockScroll,"p-sidebar-visible":i.containerVisible,"p-sidebar-full":i.fullScreen},n?"p-sidebar-".concat(n):""]},root:function(t){var i=t.instance;return["p-sidebar p-component",{"p-ripple-disabled":i.$primevue.config.ripple===!1,"p-sidebar-full":i.fullScreen}]},header:"p-sidebar-header",title:"p-sidebar-header-content",closeButton:"p-sidebar-close p-sidebar-icon p-link",closeIcon:"p-sidebar-close-icon",content:"p-sidebar-content"},N=S.extend({name:"sidebar",classes:M,inlineStyles:Z}),P={name:"BaseSidebar",extends:V,props:{visible:{type:Boolean,default:!1},position:{type:String,default:"left"},header:{type:null,default:null},baseZIndex:{type:Number,default:0},autoZIndex:{type:Boolean,default:!0},dismissable:{type:Boolean,default:!0},showCloseIcon:{type:Boolean,default:!0},closeIcon:{type:String,default:void 0},modal:{type:Boolean,default:!0},blockScroll:{type:Boolean,default:!1}},style:N,provide:function(){return{$parentInstance:this}}},T={name:"Sidebar",extends:P,inheritAttrs:!1,emits:["update:visible","show","hide","after-hide"],data:function(){return{containerVisible:this.visible}},container:null,mask:null,content:null,headerContainer:null,closeButton:null,outsideClickListener:null,documentKeydownListener:null,updated:function(){this.visible&&(this.containerVisible=this.visible)},beforeUnmount:function(){this.disableDocumentSettings(),this.mask&&this.autoZIndex&&m.clear(this.mask),this.container=null,this.mask=null},methods:{hide:function(){this.$emit("update:visible",!1)},onEnter:function(){this.$emit("show"),this.focus(),this.bindDocumentKeyDownListener(),this.autoZIndex&&m.set("modal",this.mask,this.baseZIndex||this.$primevue.config.zIndex.modal)},onAfterEnter:function(){this.enableDocumentSettings()},onBeforeLeave:function(){this.modal&&!this.isUnstyled&&c.addClass(this.mask,"p-component-overlay-leave")},onLeave:function(){this.$emit("hide")},onAfterLeave:function(){this.autoZIndex&&m.clear(this.mask),this.unbindDocumentKeyDownListener(),this.containerVisible=!1,this.disableDocumentSettings(),this.$emit("after-hide")},onMaskClick:function(t){this.dismissable&&this.modal&&this.mask===t.target&&this.hide()},focus:function(){var t=function(a){return a&&a.querySelector("[autofocus]")},i=this.$slots.header&&t(this.headerContainer);i||(i=this.$slots.default&&t(this.container),i||(i=this.closeButton)),i&&c.focus(i)},enableDocumentSettings:function(){this.dismissable&&!this.modal&&this.bindOutsideClickListener(),this.blockScroll&&c.blockBodyScroll()},disableDocumentSettings:function(){this.unbindOutsideClickListener(),this.blockScroll&&c.unblockBodyScroll()},onKeydown:function(t){t.code==="Escape"&&this.hide()},containerRef:function(t){this.container=t},maskRef:function(t){this.mask=t},contentRef:function(t){this.content=t},headerContainerRef:function(t){this.headerContainer=t},closeButtonRef:function(t){this.closeButton=t},bindDocumentKeyDownListener:function(){this.documentKeydownListener||(this.documentKeydownListener=this.onKeydown,document.addEventListener("keydown",this.documentKeydownListener))},unbindDocumentKeyDownListener:function(){this.documentKeydownListener&&(document.removeEventListener("keydown",this.documentKeydownListener),this.documentKeydownListener=null)},bindOutsideClickListener:function(){var t=this;this.outsideClickListener||(this.outsideClickListener=function(i){t.isOutsideClicked(i)&&t.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},isOutsideClicked:function(t){return this.container&&!this.container.contains(t.target)}},computed:{fullScreen:function(){return this.position==="full"},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},directives:{focustrap:B,ripple:g},components:{Portal:O,TimesIcon:A}},$=["aria-modal"],F=["aria-label"];function U(e,t,i,r,a,n){var f=w("Portal"),L=h("ripple"),C=h("focustrap");return o(),p(f,null,{default:b(function(){return[a.containerVisible?(o(),l("div",s({key:0,ref:n.maskRef,onMousedown:t[1]||(t[1]=functionLine truncated
|
||||
@@ -1,844 +0,0 @@
|
||||
function __vite__mapDeps(indexes) {
|
||||
if (!__vite__mapDeps.viteFileDeps) {
|
||||
__vite__mapDeps.viteFileDeps = ["./rm97vm_C.js","./BTeIluME.js","./DPnCzJas.js","./BL-zrU7E.js","./Daj78bx2.js","./C4SdKzqC.js","./useServerStore.DWEvhDiM.css","./i8U0E51M.js","./NA602tiV.js","./9oaCfz9_.js","./DrH3nAaK.js","./DYegjXM1.js","./Byr6sKjD.js","./DGBMS6kh.js","./Ba4Q5IHv.js","./CIRkOkCZ.js","./DrdD5fKL.js","./C0OAlkKF.js","./Ct7v4Wor.js","./Bg6qFPWQ.js","./DLFgGfm1.js","./Bv_LcJTQ.js","./CgFeChf8.js","./BAHnDiIM.js","./6cfzVo_A.js","./DOdOkukQ.js","./DYQvr4NZ.js","./DJX-FvDU.js","./Cd7enQUr.js","./p9qVLfDT.js","./Cr42Nx1j.js","./CJ_0rOvu.js","./C6BNRodb.js","./D6jzmgYr.js","./vSu18QAB.js","./DScqFD0S.js","./fyScxAgc.js","./-kuS7-2a.js","./DztMGvHD.js","./DXVbZ-2I.js","./ZzgLUKKb.js","./CUlMFryE.js","./COj7VBUl.js","./DcQ1hgcU.js","./Dd8jkTTl.js","./BwMTMBHh.js","./BEivDF3P.js","./TDVwwRG4.js","./CKo8oW14.js","./DgYlpRND.js","./BW7HfLIi.js","./D1uV5-3s.js","./DS4SYaHr.js","./DIpxPT-t.js","./BctMRtWz.js","./SessionTable.Co1Dab1P.css","./DxUp9oqP.js","./Clh6UN6s.js","./Dp9FNFUB.js","./C5if_XeS.js","./DXE_NBbe.js","./B0mqESIq.js","./Login.vrb7Jofl.css","./NUvLFU-4.js","./DbPJ4Qnu.js","./DmNc7Cq3.js","./vufGS14u.js","./B0mDjk9p.js","./BgOppTNd.js","./eAX3QGXH.js","./C7offLeb.js","./BJ--pcnw.js","./Dg5YIiM9.js","./CBW7Kdlk.js","./G3kcvUYg.js","./BLg1Je8o.js","./d2mvlTEh.js","./C4Au66gi.js","./U6eJolhE.js","./Bq-RNnO5.js","./CYNAg70H.js","./BCBwX40u.js","./Ds8OQ4x-.js","./BIP2YDsA.js","./CVAOtKIu.js","./Dk6EMvIl.js","./Bj4D3hvx.js","./iP3_YF2D.js","./BcSnMsuh.js","./Zl04YRo_.js","./CWOfD_eO.js","./BgvTNEpp.js","./D8wpvM14.js","./fgtdO4S8.js","./OG7a1lZP.js","./CWpFuL50.js","./DdNt5_aY.js","./ClnkyCA1.js","./DcRkkRNI.js","./DNmn4z4R.js","./D-aDLYgW.js","./C1m9cEsv.js","./jjCgGdRY.js","./CtVyEYxT.js","./f6iJvKfl.js","./6-po0WQo.js","./BZPTEpn9.js","./D9JRVJE5.js","./DcoSDQtv.js","./zQGx9Gyg.js","./C2M6PAqF.js","./B-W3xOzA.js","./BMkr4fww.js","./DXrDdIOA.js","./CjicN48Z.js","./D7T1PH9q.js","./BYyeLUn8.js","./ne5rPGT7.js","./BH2pwgQz.js","./DwPlgLsP.js","./AcjHQ-tJ.js","./BfLfzA5E.js","./H3UmoJi4.js","./BitJr0Jt.js","./ApiEE17-.js","./CB7qLDt2.js","./D4JklAbI.js","./IOQFRbtD.js","./DzomYlZa.js","./CMNUQCGD.js","./GC65OX_T.js","./ByPH_2IH.js","./3GU-057y.js","./f_fZSkJq.js","./Dg249S_b.js","./B_O4uPVX.js","./KV_IJPlc.js","./BJil4cV4.js","./CxCrma6T.js","./C-LJOqlT.js","./DojZms5F.js","./CRppVnji.js","./fsWNveW9.js","./BM2bI9TQ.js","./Ccz-thTU.js","./error-404.JekaaCis.css","./XXfu_ZYX.js","./error-500.CNP9nqm1.css"]
|
||||
}
|
||||
return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
|
||||
}
|
||||
/**
|
||||
* @vue/shared v3.4.21
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/function v5(e,c){const a=new Set(e.split(","));return c?t=>a.has(t.toLowerCase()):t=>a.has(t)}const h2={},w3=[],e1=()=>{},sm=()=>!1,F4=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),H5=e=>e.startsWith("onUpdate:"),x2=Object.assign,z5=(e,c)=>{const a=e.indexOf(c);a>-1&&e.splice(a,1)},im=Object.prototype.hasOwnProperty,l2=(e,c)=>im.call(e,c),J=Array.isArray,_3=e=>B4(e)==="[object Map]",Ia=e=>B4(e)==="[object Set]",om=e=>B4(e)==="[object RegExp]",c2=e=>typeof e=="function",M2=e=>typeof e=="string",j3=e=>typeof e=="symbol",p2=e=>e!==null&&typeof e=="object",$a=e=>(p2(e)||c2(e))&&c2(e.then)&&c2(e.catch),Ua=Object.prototype.toString,B4=e=>Ua.call(e),lm=e=>B4(e).slice(8,-1),ja=e=>B4(e)==="[object Object]",g5=e=>M2(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,N3=v5(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),e0=e=>{const c=Object.create(null);return a=>c[a]||(c[a]=e(a))},fm=/-(\w)/g,l1=e0(e=>e.replace(fm,(c,a)=>a?a.toUpperCase():"")),um=/\B([A-Z])/g,Z1=e0(e=>e.replace(um,"-$1").toLowerCase()),c0=e0(e=>e.charAt(0).toUpperCase()+e.slice(1)),b6=e0(e=>e?`on${c0(e)}`:""),H1=(e,c)=>!Object.is(e,c),A3=(e,c)=>{for(let a=0;a<e.length;a++)e[a](c)},E6=(e,c,a)=>{Object.defineProperty(e,c,{configurable:!0,enumerable:!1,value:a})},z8=e=>{const c=parseFloat(e);return isNaN(c)?e:c},Wa=e=>{const c=M2(e)?Number(e):NaN;return isNaN(c)?e:c};let dc;const qa=()=>dc||(dc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function a0(e){if(J(e)){const c={};for(let a=0;a<e.length;a++){const t=e[a],r=M2(t)?pm(t):a0(t);if(r)for(const n in r)c[n]=r[n]}return c}else if(M2(e)||p2(e))return e}const mm=/;(?![^(]*\))/g,dm=/:([^]+)/,hm=/\/\*[^]*?\*\//g;function pm(e){const c={};return e.replace(hm,"").split(mm).forEach(a=>{if(a){const t=a.split(dm);t.length>1&&(c[t[0].trim()]=t[1].trim())}}),c}function t0(e){let c="";if(M2(e))c=e;else if(J(e))for(let a=0;a<e.length;a++){const t=t0(e[a]);t&&(c+=t+" ")}else if(p2(e))for(const a in e)e[a]&&(c+=a+" ");return c.trim()}function vm(e){if(!e)return null;let{class:c,style:a}=e;return c&&!M2(c)&&(e.class=t0(c)),a&&(e.style=a0(a)),e}const Hm="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",zm=v5(Hm);function Ga(e){return!!e||e===""}const mJ=e=>M2(e)?e:e==null?"":J(e)||p2(e)&&(e.toString===Ua||!c2(e.toString))?JSON.stringify(e,Ka,2):String(e),Ka=(e,c)=>c&&c.__v_isRef?Ka(e,c.value):_3(c)?{[`Map(${c.size})`]:[...c.entries()].reduce((a,[t,r],n)=>(a[I0(t,n)+" =>"]=r,a),{})}:Ia(c)?{[`Set(${c.size})`]:[...c.values()].map(a=>I0(a))}:j3(c)?I0(c):p2(c)&&!J(c)&&!ja(c)?String(c):c,I0=(e,c="")=>{var a;return j3(e)?`Symbol(${(a=e.description)!=null?a:c})`:e};/**
|
||||
* @vue/reactivity v3.4.21
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/let X2;class Ya{constructor(c=!1){this.detached=c,this._active=!0,this.effects=[],this.cleanups=[],this.parent=X2,!c&&X2&&(this.index=(X2.scopes||(X2.scopes=[])).push(this)-1)}get active(){return this._active}run(c){if(this._active){const a=X2;try{return X2=this,c()}finally{X2=a}}}on(){X2=this}off(){X2=this.parent}stop(c){if(this._active){let a,t;for(a=0,t=this.effects.length;a<t;a++)this.effects[a].stop();for(a=0,t=this.cleanups.length;a<t;a++)this.cleanups[a]();if(this.scopes)for(a=0,t=this.scopes.length;a<t;a++)this.scopes[a].stop(!0);if(!this.detached&&this.parent&&!c){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0,this._active=!1}}}function V5(e){return new Ya(e)}function gm(e,c=X2){c&&c.active&&c.effects.push(e)}function Xa(){return X2}function Vm(e){X2&&X2.cleanups.push(e)}let o3;class M5{constructor(c,a,t,r){this.fn=c,this.trigger=a,this.scheduler=t,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,gm(this,r)}get dirty(){if(this._dirtyLevel===2||this._dirtyLevel===3){this._dirtyLevel=1,v3();for(let c=0;c<this._depsLength;c++){const a=this.deps[c];if(a.computed&&(Mm(a.computed),this._dirtyLevel>=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),H3()}return this._dirtyLevel>=4}set dirty(c){this._dirtyLevel=c?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let c=K1,a=o3;try{return K1=!0,o3=this,this._runnings++,hc(this),this.fn()}finally{pc(this),this._runnings--,o3=a,K1=c}}stop(){var c;this.active&&(hc(this),pc(this),(c=this.onStop)==null||c.call(this),this.active=!1)}}function Mm(e){return e.value}function hc(e){e._trackId++,e._depsLength=0}function pc(e){if(e.deps.length>e._depsLength){for(let c=e._depsLength;c<e.deps.length;c++)Qa(e.deps[c],e);e.deps.length=e._depsLength}}function Qa(e,c){const a=e.get(c);a!==void 0&&c._trackId!==a&&(e.delete(c),e.size===0&&e.cleanup())}let K1=!0,g8=0;const Ja=[];function v3(){Ja.push(K1),K1=!1}function H3(){const e=Ja.pop();K1=e===void 0?!0:e}function C5(){g8++}function L5(){for(g8--;!g8&&V8.length;)V8.shift()()}function Za(e,c,a){if(c.get(e)!==e._trackId){c.set(e,e._trackId);const t=e.deps[e._depsLength];t!==c?(t&&Qa(t,e),e.deps[e._depsLength++]=c):e._depsLength++}}const V8=[];function e9(e,c,a){C5();for(const t of e.keys()){let r;t._dirtyLevel<c&&(r??(r=e.get(t)===t._trackId))&&(t._shouldSchedule||(t._shouldSchedule=t._dirtyLevel===0),t._dirtyLevel=c),t._shouldSchedule&&(r??(r=e.get(t)===t._trackId))&&(t.trigger(),(!t._runnings||t.allowRecurse)&&t._dirtyLevel!==2&&(t._shouldSchedule=!1,t.scheduler&&V8.push(t.scheduler)))}L5()}const c9=(e,c)=>{const a=new Map;return a.cleanup=e,a.computed=c,a},P6=new WeakMap,l3=Symbol(""),M8=Symbol("");function q2(e,c,a){if(K1&&o3){let t=P6.get(e);t||P6.set(e,t=new Map);let r=t.get(a);r||t.set(a,r=c9(()=>t.delete(a))),Za(o3,r)}}function y1(e,c,a,t,r,n){const s=P6.get(e);if(!s)return;let i=[];if(c==="clear")i=[...s.values()];else if(a==="length"&&J(e)){const o=Number(t);s.forEach((f,l)=>{(l==="length"||!j3(l)&&l>=o)&&i.push(f)})}else switch(a!==void 0&&i.push(s.get(a)),c){case"add":J(e)?g5(a)&&i.push(s.get("length")):(i.push(s.get(l3)),_3(e)&&i.push(s.get(M8)));break;case"delete":J(e)||(i.push(s.get(l3)),_3(e)&&i.push(s.get(M8)));break;case"set":_3(e)&&i.push(s.get(l3));break}C5();for(const o of i)o&&e9(o,4);L5()}function Cm(e,c){var a;return(a=P6.get(e))==null?void 0:a.get(c)}const Lm=v5("__proto__,__v_isRef,__isVue"),a9=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(j3)),vc=ym();function ym(){const e={};return["includes","indexOf","lastIndexOf"].forEach(c=>{e[c]=function(...a){const t=i2(this);for(let n=0,s=this.length;n<s;n++)q2(t,"get",n+"");const r=t[c](...a);return r===-1||r===!1?t[c](...a.map(i2)):r}}),["push","pop","shift","unshift","splice"].forEach(c=>{e[c]=function(...a){v3(),C5();const t=i2(this)[c].apply(this,a);return L5(),H3(),t}}),e}function bm(e){const c=i2(this);return q2(c,"has",e),c.hasOwnProperty(e)}class t9{constructor(c=!1,a=!1){this._isReadonly=c,this._isShallow=a}get(c,a,t){const r=this._isReadonly,n=this._isShallow;if(a==="__v_isReactive")return!r;if(a==="__v_isReadonly")return r;if(a==="__v_isShallow")return n;if(a==="__v_raw")return t===(r?n?Dm:i9:n?s9:n9).get(c)||Object.getPrototypeOf(c)===Object.getPrototypeOf(t)?c:void 0;const s=J(c);if(!r){if(s&&l2(vc,a))return Reflect.get(vc,a,t);if(a==="hasOwnProperty")return bm}const i=Reflect.get(c,a,t);return(j3(a)?a9.has(a):Lm(a))||(r||q2(c,"get",a),n)?i:S2(i)?s&&g5(a)?i:i.value:p2(i)?r?x5(i):z1(i):i}}class r9 extends t9{constructor(c=!1){super(!1,c)}set(c,a,t,r){let n=c[a];if(!this._isShallow){const o=m3(n);if(!R6(t)&&!m3(t)&&(n=i2(n),t=i2(t)),!J(c)&&S2(n)&&!S2(t))return o?!1:(n.value=t,!0)}const s=J(c)&&g5(a)?Number(a)<c.length:l2(c,a),i=Reflect.set(c,a,t,r);return c===i2(r)&&(s?H1(t,n)&&y1(c,"set",a,t):y1(c,"add",a,t)),i}deletePropertLine truncated
|
||||
* @vue/runtime-core v3.4.21
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/function Y1(e,c,a,t){try{return t?e(...t):e()}catch(r){W3(r,c,a)}}function a1(e,c,a,t){if(c2(e)){const n=Y1(e,c,a,t);return n&&$a(n)&&n.catch(s=>{W3(s,c,a)}),n}const r=[];for(let n=0;n<e.length;n++)r.push(a1(e[n],c,a,t));return r}function W3(e,c,a,t=!0){const r=c?c.vnode:null;if(c){let n=c.parent;const s=c.proxy,i=`https://vuejs.org/error-reference/#runtime-${a}`;for(;n;){const f=n.ec;if(f){for(let l=0;l<f.length;l++)if(f[l](e,s,i)===!1)return}n=n.parent}const o=c.appContext.config.errorHandler;if(o){Y1(o,null,10,[e,s,i]);return}}Ym(e,a,r,t)}function Ym(e,c,a,t=!0){console.error(e)}let z4=!1,C8=!1;const O2=[];let h1=0;const k3=[];let $1=null,r3=0;const h9=Promise.resolve();let N5=null;function e3(e){const c=N5||h9;return e?c.then(this?e.bind(this):e):c}function Xm(e){let c=h1+1,a=O2.length;for(;c<a;){const t=c+a>>>1,r=O2[t],n=g4(r);n<e||n===e&&r.pre?c=t+1:a=t}return c}function n0(e){(!O2.length||!O2.includes(e,z4&&e.allowRecurse?h1+1:h1))&&(e.id==null?O2.push(e):O2.splice(Xm(e.id),0,e),p9())}function p9(){!z4&&!C8&&(C8=!0,N5=h9.then(v9))}function Qm(e){const c=O2.indexOf(e);c>h1&&O2.splice(c,1)}function L8(e){J(e)?k3.push(...e):(!$1||!$1.includes(e,e.allowRecurse?r3+1:r3))&&k3.push(e),p9()}function Mc(e,c,a=z4?h1+1:0){for(;a<O2.length;a++){const t=O2[a];if(t&&t.pre){if(e&&t.id!==e.uid)continue;O2.splice(a,1),a--,t()}}}function O6(e){if(k3.length){const c=[...new Set(k3)].sort((a,t)=>g4(a)-g4(t));if(k3.length=0,$1){$1.push(...c);return}for($1=c,r3=0;r3<$1.length;r3++)$1[r3]();$1=null,r3=0}}const g4=e=>e.id==null?1/0:e.id,Jm=(e,c)=>{const a=g4(e)-g4(c);if(a===0){if(e.pre&&!c.pre)return-1;if(c.pre&&!e.pre)return 1}return a};function v9(e){C8=!1,z4=!0,O2.sort(Jm);try{for(h1=0;h1<O2.length;h1++){const c=O2[h1];c&&c.active!==!1&&Y1(c,null,14)}}finally{h1=0,O2.length=0,O6(),z4=!1,N5=null,(O2.length||k3.length)&&v9()}}function Zm(e,c,...a){if(e.isUnmounted)return;const t=e.vnode.props||h2;let r=a;const n=c.startsWith("update:"),s=n&&c.slice(7);if(s&&s in t){const l=`${s==="modelValue"?"model":s}Modifiers`,{number:u,trim:m}=t[l]||h2;m&&(r=a.map(d=>M2(d)?d.trim():d)),u&&(r=a.map(z8))}let i,o=t[i=b6(c)]||t[i=b6(l1(c))];!o&&n&&(o=t[i=b6(Z1(c))]),o&&a1(o,e,6,r);const f=t[i+"Once"];if(f){if(!e.emitted)e.emitted={};else if(e.emitted[i])return;e.emitted[i]=!0,a1(f,e,6,r)}}function H9(e,c,a=!1){const t=c.emitsCache,r=t.get(e);if(r!==void 0)return r;const n=e.emits;let s={},i=!1;if(!c2(e)){const o=f=>{const l=H9(f,c,!0);l&&(i=!0,x2(s,l))};!a&&c.mixins.length&&c.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return!n&&!i?(p2(e)&&t.set(e,null),null):(J(n)?n.forEach(o=>s[o]=null):x2(s,n),p2(e)&&t.set(e,s),s)}function s0(e,c){return!e||!F4(c)?!1:(c=c.slice(2).replace(/Once$/,""),l2(e,c[0].toLowerCase()+c.slice(1))||l2(e,Z1(c))||l2(e,c))}let w2=null,i0=null;function D6(e){const c=w2;return w2=e,i0=e&&e.type.__scopeId||null,c}function dJ(e){i0=e}function hJ(){i0=null}function A5(e,c=w2,a){if(!c||e._n)return e;const t=(...r)=>{t._d&&Pc(-1);const n=D6(c);let s;try{s=e(...r)}finally{D6(n),t._d&&Pc(1)}return s};return t._n=!0,t._c=!0,t._d=!0,t}function $0(e){const{type:c,vnode:a,proxy:t,withProxy:r,props:n,propsOptions:[s],slots:i,attrs:o,emit:f,render:l,renderCache:u,data:m,setupState:d,ctx:z,inheritAttrs:M}=e;let L,g;const p=D6(e);try{if(a.shapeFlag&4){const V=r||t,C=V;L=Z2(l.call(C,V,u,n,d,m,z)),g=o}else{const V=c;L=Z2(V.length>1?V(n,{attrs:o,slots:i,emit:f}):V(n,null)),g=c.props?o:cd(o)}}catch(V){n4.length=0,W3(V,e,1),L=L2(B2)}let H=L;if(g&&M!==!1){const V=Object.keys(g),{shapeFlag:C}=H;V.length&&C&7&&(s&&V.some(H5)&&(g=ad(g,s)),H=S1(H,g))}return a.dirs&&(H=S1(H),H.dirs=H.dirs?H.dirs.concat(a.dirs):a.dirs),a.transition&&(H.transition=a.transition),L=H,D6(p),L}function ed(e,c=!0){let a;for(let t=0;t<e.length;t++){const r=e[t];if(F3(r)){if(r.type!==B2||r.children==="v-if"){if(a)return;a=r}}else return}return a}const cd=e=>{let c;for(const a in e)(a==="class"||a==="style"||F4(a))&&((c||(c={}))[a]=e[a]);return c},ad=(e,c)=>{const a={};for(const t in e)(!H5(t)||!(t.slice(9)in c))&&(a[t]=e[t]);return a};function td(e,c,a){const{props:t,children:r,component:n}=e,{props:s,children:i,patchFlag:o}=c,f=n.emitsOptions;if(c.dirs||c.transition)return!0;if(a&&o>=0){if(o&1024)return!0;if(o&16)return t?Cc(t,s,f):!!s;if(o&8){const l=c.dynamicProps;for(let u=0;u<l.length;u++){const m=l[u];if(s[m]!==t[m]&&!s0(f,m))return!0}}}else return(r||i)&&(!i||!i.$stable)?!0:t===s?!1:t?s?Cc(t,s,f):!0:!!s;return!1}function Cc(e,c,a){const t=Object.keys(c);if(t.length!==Object.keys(e).length)return!0;for(let r=0;r<t.length;r++){const n=t[r];if(c[n]!==e[n]&&!s0(a,n))return!0}return!1}function k5({vnode:e,parent:c},a){for(;c;){const t=c.subTree;if(t.suspense&&t.suspense.activeBranch===e&&(t.el=e.el),t===e)(e=c.vnode).el=a,c=c.parent;else break}}const T5="components",rd="directives";function pJ(e,c){return E5(T5,e,!0,c)||e}const z9=Symbol.for("v-ndc");function nd(e){return M2(e)?E5(T5,e,!1)||e:e||z9}function vJ(e){return E5(rd,e)}function
Line truncated
|
||||
* @vue/runtime-dom v3.4.21
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/const nh="http://www.w3.org/2000/svg",sh="http://www.w3.org/1998/Math/MathML",W1=typeof document<"u"?document:null,Dc=W1&&W1.createElement("template"),ih={insert:(e,c,a)=>{c.insertBefore(e,a||null)},remove:e=>{const c=e.parentNode;c&&c.removeChild(e)},createElement:(e,c,a,t)=>{const r=c==="svg"?W1.createElementNS(nh,e):c==="mathml"?W1.createElementNS(sh,e):W1.createElement(e,a?{is:a}:void 0);return e==="select"&&t&&t.multiple!=null&&r.setAttribute("multiple",t.multiple),r},createText:e=>W1.createTextNode(e),createComment:e=>W1.createComment(e),setText:(e,c)=>{e.nodeValue=c},setElementText:(e,c)=>{e.textContent=c},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>W1.querySelector(e),setScopeId(e,c){e.setAttribute(c,"")},insertStaticContent(e,c,a,t,r,n){const s=a?a.previousSibling:c.lastChild;if(r&&(r===n||r.nextSibling))for(;c.insertBefore(r.cloneNode(!0),a),!(r===n||!(r=r.nextSibling)););else{Dc.innerHTML=t==="svg"?`<svg>${e}</svg>`:t==="mathml"?`<math>${e}</math>`:e;const i=Dc.content;if(t==="svg"||t==="mathml"){const o=i.firstChild;for(;o.firstChild;)i.appendChild(o.firstChild);i.removeChild(o)}c.insertBefore(i,a)}return[s?s.nextSibling:c.firstChild,a?a.previousSibling:c.lastChild]}},O1="transition",Y3="animation",B3=Symbol("_vtc"),d0=(e,{slots:c})=>W2(Hd,X9(e),c);d0.displayName="Transition";const Y9={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},oh=d0.props=x2({},L9,Y9),a3=(e,c=[])=>{J(e)?e.forEach(a=>a(...c)):e&&e(...c)},Fc=e=>e?J(e)?e.some(c=>c.length>1):e.length>1:!1;function X9(e){const c={};for(const O in e)O in Y9||(c[O]=e[O]);if(e.css===!1)return c;const{name:a="v",type:t,duration:r,enterFromClass:n=`${a}-enter-from`,enterActiveClass:s=`${a}-enter-active`,enterToClass:i=`${a}-enter-to`,appearFromClass:o=n,appearActiveClass:f=s,appearToClass:l=i,leaveFromClass:u=`${a}-leave-from`,leaveActiveClass:m=`${a}-leave-active`,leaveToClass:d=`${a}-leave-to`}=e,z=lh(r),M=z&&z[0],L=z&&z[1],{onBeforeEnter:g,onEnter:p,onEnterCancelled:H,onLeave:V,onLeaveCancelled:C,onBeforeAppear:y=g,onAppear:N=p,onAppearCancelled:x=H}=c,S=(O,Z,f2)=>{B1(O,Z?l:i),B1(O,Z?f:s),f2&&f2()},P=(O,Z)=>{O._isLeaving=!1,B1(O,u),B1(O,d),B1(O,m),Z&&Z()},G=O=>(Z,f2)=>{const o2=O?N:p,I=()=>S(Z,O,f2);a3(o2,[Z,I]),Bc(()=>{B1(Z,O?o:n),M1(Z,O?l:i),Fc(o2)||Ic(Z,t,M,I)})};return x2(c,{onBeforeEnter(O){a3(g,[O]),M1(O,n),M1(O,s)},onBeforeAppear(O){a3(y,[O]),M1(O,o),M1(O,f)},onEnter:G(!1),onAppear:G(!0),onLeave(O,Z){O._isLeaving=!0;const f2=()=>P(O,Z);M1(O,u),J9(),M1(O,m),Bc(()=>{O._isLeaving&&(B1(O,u),M1(O,d),Fc(V)||Ic(O,t,L,f2))}),a3(V,[O,f2])},onEnterCancelled(O){S(O,!1),a3(H,[O])},onAppearCancelled(O){S(O,!0),a3(x,[O])},onLeaveCancelled(O){P(O),a3(C,[O])}})}function lh(e){if(e==null)return null;if(p2(e))return[Y0(e.enter),Y0(e.leave)];{const c=Y0(e);return[c,c]}}function Y0(e){return Wa(e)}function M1(e,c){c.split(/\s+/).forEach(a=>a&&e.classList.add(a)),(e[B3]||(e[B3]=new Set)).add(c)}function B1(e,c){c.split(/\s+/).forEach(t=>t&&e.classList.remove(t));const a=e[B3];a&&(a.delete(c),a.size||(e[B3]=void 0))}function Bc(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let fh=0;function Ic(e,c,a,t){const r=e._endId=++fh,n=()=>{r===e._endId&&t()};if(a)return setTimeout(n,a);const{type:s,timeout:i,propCount:o}=Q9(e,c);if(!s)return t();const f=s+"end";let l=0;const u=()=>{e.removeEventListener(f,m),n()},m=d=>{d.target===e&&++l>=o&&u()};setTimeout(()=>{l<o&&u()},i+1),e.addEventListener(f,m)}function Q9(e,c){const a=window.getComputedStyle(e),t=z=>(a[z]||"").split(", "),r=t(`${O1}Delay`),n=t(`${O1}Duration`),s=$c(r,n),i=t(`${Y3}Delay`),o=t(`${Y3}Duration`),f=$c(i,o);let l=null,u=0,m=0;c===O1?s>0&&(l=O1,u=s,m=n.length):c===Y3?f>0&&(l=Y3,u=f,m=o.length):(u=Math.max(s,f),l=u>0?s>f?O1:Y3:null,m=l?l===O1?n.length:o.length:0);const d=l===O1&&/\b(transform|all)(,|$)/.test(t(`${O1}Property`).toString());return{type:l,timeout:u,propCount:m,hasTransform:d}}function $c(e,c){for(;e.length<c.length;)e=e.concat(e);return Math.max(...c.map((a,t)=>Uc(a)+Uc(e[t])))}function Uc(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function J9(){return document.body.offsetHeight}function uh(e,c,a){const t=e[B3];t&&(c=(c?[c,...t]:[...t]).join(" ")),c==null?e.removeAttribute("class"):a?e.setAttribute("class",c):e.className=c}const U6=Symbol("_vod"),Z9=Symbol("_vsh"),wJ={beforeMount(e,{value:c},{transition:a}){e[U6]=e.style.display==="none"?"":e.style.display,a&&c?a.beforeEnter(e):X3(e,c)},mounted(e,{value:c},{transition:a}){a&&c&&a.enter(e)},updated(e,{value:c,oldValue:a},{transition:t}){!c!=!a&&(t?c?(t.beforeEnter(e),X3(e,!0),t.enter(e)):t.leave(e,()=>{X3(e,!1)}):X3(e,c))},beforeUnmount(e,{value:c}){X3(e,c)}};function X3(e,c){e.style.display=c?e[U6]:"none",e[Z9]=!c}const mh=Symbol(""),dh=/(^
Line truncated
|
||||
* vue-router v4.3.0
|
||||
* (c) 2024 Eduardo San Martin Morote
|
||||
* @license MIT
|
||||
*/const y3=typeof document<"u";function uH(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const m2=Object.assign;function a8(e,c){const a={};for(const t in c){const r=c[t];a[t]=f1(r)?r.map(e):e(r)}return a}const i4=()=>{},f1=Array.isArray,kt=/#/g,mH=/&/g,dH=/\//g,hH=/=/g,pH=/\?/g,Tt=/\+/g,vH=/%5B/g,HH=/%5D/g,Et=/%5E/g,zH=/%60/g,Pt=/%7B/g,gH=/%7C/g,Rt=/%7D/g,VH=/%20/g;function ee(e){return encodeURI(""+e).replace(gH,"|").replace(vH,"[").replace(HH,"]")}function MH(e){return ee(e).replace(Pt,"{").replace(Rt,"}").replace(Et,"^")}function q8(e){return ee(e).replace(Tt,"%2B").replace(VH,"+").replace(kt,"%23").replace(mH,"%26").replace(zH,"`").replace(Pt,"{").replace(Rt,"}").replace(Et,"^")}function CH(e){return q8(e).replace(hH,"%3D")}function LH(e){return ee(e).replace(kt,"%23").replace(pH,"%3F")}function yH(e){return e==null?"":LH(e).replace(dH,"%2F")}function L4(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const bH=/\/$/,xH=e=>e.replace(bH,"");function t8(e,c,a="/"){let t,r={},n="",s="";const i=c.indexOf("#");let o=c.indexOf("?");return i<o&&i>=0&&(o=-1),o>-1&&(t=c.slice(0,o),n=c.slice(o+1,i>-1?i:c.length),r=e(n)),i>-1&&(t=t||c.slice(0,i),s=c.slice(i,c.length)),t=NH(t??c,a),{fullPath:t+(n&&"?")+n+s,path:t,query:r,hash:L4(s)}}function SH(e,c){const a=c.query?e(c.query):"";return c.path+(a&&"?")+a+(c.hash||"")}function v7(e,c){return!c||!e.toLowerCase().startsWith(c.toLowerCase())?e:e.slice(c.length)||"/"}function wH(e,c,a){const t=c.matched.length-1,r=a.matched.length-1;return t>-1&&t===r&&I3(c.matched[t],a.matched[r])&&Ot(c.params,a.params)&&e(c.query)===e(a.query)&&c.hash===a.hash}function I3(e,c){return(e.aliasOf||e)===(c.aliasOf||c)}function Ot(e,c){if(Object.keys(e).length!==Object.keys(c).length)return!1;for(const a in e)if(!_H(e[a],c[a]))return!1;return!0}function _H(e,c){return f1(e)?H7(e,c):f1(c)?H7(c,e):e===c}function H7(e,c){return f1(c)?e.length===c.length&&e.every((a,t)=>a===c[t]):e.length===1&&e[0]===c}function NH(e,c){if(e.startsWith("/"))return e;if(!e)return c;const a=c.split("/"),t=e.split("/"),r=t[t.length-1];(r===".."||r===".")&&t.push("");let n=a.length-1,s,i;for(s=0;s<t.length;s++)if(i=t[s],i!==".")if(i==="..")n>1&&n--;else break;return a.slice(0,n).join("/")+"/"+t.slice(s).join("/")}var y4;(function(e){e.pop="pop",e.push="push"})(y4||(y4={}));var o4;(function(e){e.back="back",e.forward="forward",e.unknown=""})(o4||(o4={}));function AH(e){if(!e)if(y3){const c=document.querySelector("base");e=c&&c.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),xH(e)}const kH=/^[^#]+#/;function TH(e,c){return e.replace(kH,"#")+c}function EH(e,c){const a=document.documentElement.getBoundingClientRect(),t=e.getBoundingClientRect();return{behavior:c.behavior,left:t.left-a.left-(c.left||0),top:t.top-a.top-(c.top||0)}}const g0=()=>({left:window.scrollX,top:window.scrollY});function PH(e){let c;if("el"in e){const a=e.el,t=typeof a=="string"&&a.startsWith("#"),r=typeof a=="string"?t?document.getElementById(a.slice(1)):document.querySelector(a):a;if(!r)return;c=EH(r,e)}else c=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(c):window.scrollTo(c.left!=null?c.left:window.scrollX,c.top!=null?c.top:window.scrollY)}function z7(e,c){return(history.state?history.state.position-c:-1)+e}const G8=new Map;function RH(e,c){G8.set(e,c)}function OH(e){const c=G8.get(e);return G8.delete(e),c}let DH=()=>location.protocol+"//"+location.host;function Dt(e,c){const{pathname:a,search:t,hash:r}=c,n=e.indexOf("#");if(n>-1){let i=r.includes(e.slice(n))?e.slice(n).length:1,o=r.slice(i);return o[0]!=="/"&&(o="/"+o),v7(o,"")}return v7(a,e)+t+r}function FH(e,c,a,t){let r=[],n=[],s=null;const i=({state:m})=>{const d=Dt(e,location),z=a.value,M=c.value;let L=0;if(m){if(a.value=d,c.value=m,s&&s===z){s=null;return}L=M?m.position-M.position:0}else t(d);r.forEach(g=>{g(a.value,z,{delta:L,type:y4.pop,direction:L?L>0?o4.forward:o4.back:o4.unknown})})};function o(){s=a.value}function f(m){r.push(m);const d=()=>{const z=r.indexOf(m);z>-1&&r.splice(z,1)};return n.push(d),d}function l(){const{history:m}=window;m.state&&m.replaceState(m2({},m.state,{scroll:g0()}),"")}function u(){for(const m of n)m();n=[],window.removeEventListener("popstate",i),window.removeEventListener("beforeunload",l)}return window.addEventListener("popstate",i),window.addEventListener("beforeunload",l,{passive:!0}),{pauseListeners:o,listen:f,destroy:u}}function g7(e,c,a,t=!1,r=!1){return{back:e,current:c,forward:a,replaced:t,position:window.history.length,scroll:r?g0():null}}function BH(e){const{history:c,location:a}=window,t={value:Dt(e,a)},r={value:c.state};r.value||n(t.value,{back:null,current:t.value,forward:null,position:c.length-1,replaced:!0,scroll:null},!0);function n(o,f,l){const u=e.indexOf("#"),m=u>-1?(a.host&&document.querySelector("base")?e:e.slice(u))+o:DH()+e+o;try{c[l?"replaceState":"pushState"](f,"",m),r.value=f}catch(d){console.error(d),a[l?"replace":"assignLine truncated
|
||||
* pinia v2.1.7
|
||||
* (c) 2023 Eduardo San Martin Morote
|
||||
* @license MIT
|
||||
*/let qt;const G4=e=>qt=e,Gt=Symbol();function X8(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var f4;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(f4||(f4={}));function Sz(){const e=V5(!0),c=e.run(()=>j2({}));let a=[],t=[];const r=$4({install(n){G4(r),r._a=n,n.provide(Gt,r),n.config.globalProperties.$pinia=r,t.forEach(s=>a.push(s)),t=[]},use(n){return!this._a&&!xz?t.push(n):a.push(n),this},_p:a,_a:null,_e:e,_s:new Map,state:c});return r}const Kt=()=>{};function R7(e,c,a,t=Kt){e.push(c);const r=()=>{const n=e.indexOf(c);n>-1&&(e.splice(n,1),t())};return!a&&Xa()&&Vm(r),r}function C3(e,...c){e.slice().forEach(a=>{a(...c)})}const wz=e=>e();function Q8(e,c){e instanceof Map&&c instanceof Map&&c.forEach((a,t)=>e.set(t,a)),e instanceof Set&&c instanceof Set&&c.forEach(e.add,e);for(const a in c){if(!c.hasOwnProperty(a))continue;const t=c[a],r=e[a];X8(r)&&X8(t)&&e.hasOwnProperty(a)&&!S2(t)&&!b1(t)?e[a]=Q8(r,t):e[a]=t}return e}const _z=Symbol();function Nz(e){return!X8(e)||!e.hasOwnProperty(_z)}const{assign:I1}=Object;function Az(e){return!!(S2(e)&&e.effect)}function kz(e,c,a,t){const{state:r,actions:n,getters:s}=c,i=a.state.value[e];let o;function f(){i||(a.state.value[e]=r?r():{});const l=qm(a.state.value[e]);return I1(l,n,Object.keys(s||{}).reduce((u,m)=>(u[m]=$4(N2(()=>{G4(a);const d=a._s.get(e);return s[m].call(d,d)})),u),{}))}return o=Yt(e,f,c,a,t,!0),o}function Yt(e,c,a={},t,r,n){let s;const i=I1({actions:{}},a),o={deep:!0};let f,l,u=[],m=[],d;const z=t.state.value[e];!n&&!z&&(t.state.value[e]={}),j2({});let M;function L(x){let S;f=l=!1,typeof x=="function"?(x(t.state.value[e]),S={type:f4.patchFunction,storeId:e,events:d}):(Q8(t.state.value[e],x),S={type:f4.patchObject,payload:x,storeId:e,events:d});const P=M=Symbol();e3().then(()=>{M===P&&(f=!0)}),l=!0,C3(u,S,t.state.value[e])}const g=n?function(){const{state:S}=a,P=S?S():{};this.$patch(G=>{I1(G,P)})}:Kt;function p(){s.stop(),u=[],m=[],t._s.delete(e)}function H(x,S){return function(){G4(t);const P=Array.from(arguments),G=[],O=[];function Z(I){G.push(I)}function f2(I){O.push(I)}C3(m,{args:P,name:x,store:C,after:Z,onError:f2});let o2;try{o2=S.apply(this&&this.$id===e?this:C,P)}catch(I){throw C3(O,I),I}return o2 instanceof Promise?o2.then(I=>(C3(G,I),I)).catch(I=>(C3(O,I),Promise.reject(I))):(C3(G,o2),o2)}}const V={_p:t,$id:e,$onAction:R7.bind(null,m),$patch:L,$reset:g,$subscribe(x,S={}){const P=R7(u,x,S.detached,()=>G()),G=s.run(()=>x1(()=>t.state.value[e],O=>{(S.flush==="sync"?l:f)&&x({storeId:e,type:f4.direct,events:d},O)},I1({},o,S)));return P},$dispose:p},C=z1(V);t._s.set(e,C);const N=(t._a&&t._a.runWithContext||wz)(()=>t._e.run(()=>(s=V5()).run(c)));for(const x in N){const S=N[x];if(S2(S)&&!Az(S)||b1(S))n||(z&&Nz(S)&&(S2(S)?S.value=z[x]:Q8(S,z[x])),t.state.value[e][x]=S);else if(typeof S=="function"){const P=H(x,S);N[x]=P,i.actions[x]=S}}return I1(C,N),I1(i2(C),N),Object.defineProperty(C,"$state",{get:()=>t.state.value[e],set:x=>{L(S=>{I1(S,x)})}}),t._p.forEach(x=>{I1(C,s.run(()=>x({store:C,app:t._a,pinia:t,options:i})))}),z&&n&&a.hydrate&&a.hydrate(C.$state,z),f=!0,l=!0,C}function FJ(e,c,a){let t,r;const n=typeof c=="function";typeof e=="string"?(t=e,r=n?a:c):(r=e,t=e.id);function s(i,o){const f=I5();return i=i||(f?_2(Gt,null):null),i&&G4(i),i=qt,i._s.has(t)||(n?Yt(t,c,r,i):kz(t,r,i)),i._s.get(t)}return s.$id=t,s}function BJ(e){{e=i2(e);const c={};for(const a in e){const t=e[a];(S2(t)||b1(t))&&(c[a]=m9(e,a))}return c}}function Tz(e={}){const c=e.path||window.location.pathname;let a={};try{a=W6(sessionStorage.getItem("nuxt:reload")||"{}")}catch{}if(e.force||(a==null?void 0:a.path)!==c||(a==null?void 0:a.expires)<Date.now()){try{sessionStorage.setItem("nuxt:reload",JSON.stringify({path:c,expires:Date.now()+(e.ttl??1e4)}))}catch{}if(e.persistState)try{sessionStorage.setItem("nuxt:reload:state",JSON.stringify({state:b2().payload.state}))}catch{}window.location.pathname!==c?window.location.href=c:window.location.reload()}}const Ez=t1(e=>{const c=Sz();return e.vueApp.use(c),G4(c),e.payload&&e.payload.pinia&&(c.state.value=e.payload.pinia),{provide:{pinia:c}}}),Pz=E(()=>_(()=>import("./DmNc7Cq3.js"),__vite__mapDeps([65,7,8,2,9,10,25,41,18,19,28]),import.meta.url).then(e=>e.default||e.default||e)),Rz=E(()=>_(()=>import("./vufGS14u.js"),__vite__mapDeps([66,7,8,2,9,10,25,67,33,68,18,19]),import.meta.url).then(e=>e.default||e.default||e)),Oz=E(()=>_(()=>import("./eAX3QGXH.js"),__vite__mapDeps([69,32,10,2,25,9,18,19]),import.meta.url).then(e=>e.default||e.default||e)),Dz=E(()=>_(()=>import("./DScqFD0S.js"),__vite__mapDeps([35,24,10,2]),import.meta.url).then(e=>e.default||e.default||e)),Fz=E(()=>_(()=>import("./C7offLeb.js"),__vite__mapDeps([70,41,10,2]),import.meta.url).then(e=>e.default||e.default||e)),Bz=E(()=>_(()=>import("./BJ--pcnw.js"),__vite__mapDeps([71,18,19,2]),import.meta.url).then(e=>e.default||e.default||e)),Iz=E(()=>_(()=>import("./Line truncated
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var n=!0,s=!1,i;return{s:function(){a=a.call(e)},n:function(){var f=a.next();return n=f.done,f},e:function(f){s=!0,i=f},f:function(){try{!n&&a.return!=null&&a.return()}finally{if(s)throw i}}}}function _V(e){return kV(e)||AV(e)||te(e)||NV()}function NV(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AV(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function kV(e){if(Array.isArray(e))return J8(e)}function u4(e){"@babel/helpers - typeof";return u4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},u4(e)}function l8(e,c){return PV(e)||EV(e,c)||te(e,c)||TV()}function TV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function te(e,c){if(e){if(typeof e=="string")return J8(e,c);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return J8(e,c)}}function J8(e,c){(c==null||c>e.length)&&(c=e.length);for(var a=0,t=new Array(c);a<c;a++)t[a]=e[a];return t}function EV(e,c){var a=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(a!=null){var t,r,n,s,i=[],o=!0,f=!1;try{if(n=(a=a.call(e)).next,c===0){if(Object(a)!==a)return;o=!1}else for(;!(o=(t=n.call(a)).done)&&(i.push(t.value),i.length!==c);o=!0);}catch(l){f=!0,r=l}finally{try{if(!o&&a.return!=null&&(s=a.return(),Object(s)!==s))return}finally{if(f)throw r}}return i}}function PV(e){if(Array.isArray(e))return e}var T={innerWidth:function(c){if(c){var a=c.offsetWidth,t=getComputedStyle(c);return a+=parseFloat(t.paddingLeft)+parseFloat(t.paddingRight),a}return 0},width:function(c){if(c){var a=c.offsetWidth,t=getComputedStyle(c);return a-=parseFloat(t.paddingLeft)+parseFloat(t.paddingRight),a}return 0},getWindowScrollTop:function(){var c=document.documentElement;return(window.pageYOffset||c.scrollTop)-(c.clientTop||0)},getWindowScrollLeft:function(){var c=document.documentElement;return(window.pageXOffset||c.scrollLeft)-(c.clientLeft||0)},getOuterWidth:function(c,a){if(c){var t=c.offsetWidth;if(a){var r=getComputedStyle(c);t+=parseFloat(r.marginLeft)+parseFloat(r.marginRight)}return t}return 0},getOuterHeight:function(c,a){if(c){var t=c.offsetHeight;if(a){var r=getComputedStyle(c);t+=parseFloat(r.marginTop)+parseFloat(r.marginBottom)}return t}return 0},getClientHeight:function(c,a){if(c){var t=c.clientHeight;if(a){var r=getComputedStyle(c);t+=parseFloat(r.marginTop)+parseFloat(r.marginBottom)}return t}return 0},getViewport:function(){var c=window,a=document,t=a.documentElement,r=a.getElementsByTagName("body")[0],n=c.innerWidth||t.clientWidth||r.clientWidth,s=c.innerHeight||t.clientHeight||r.clientHeight;return{width:n,height:s}},getOffset:function(c){if(c){var a=c.getBoundingClientRect();return{top:a.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:a.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}return{top:"auto",left:"auto"}},index:function(c){if(c)for(var a,t=(a=this.getParentNode(c))===null||a===void 0?void 0:a.childNodes,r=0,n=0;n<t.length;n++){if(t[n]===c)return r;t[n].nodeType===1&&r++}return-1},addMultipleClasses:function(c,a){var t=this;c&&a&&[a].flat().filter(Boolean).forEach(function(r){return r.split(" ").forEach(function(n){return t.addClass(c,n)})})},removeMultipleClasses:function(c,a){var t=this;c&&a&&[a].flat().filter(Boolean).forEach(function(r){return r.split(" ").forEach(function(n){return t.removeClass(c,n)})})},addClass:function(c,a){c&&a&&!this.hasClass(c,a)&&(c.classList?c.classList.add(a):c.className+=" "+a)},removeClass:function(c,a){c&&a&&(c.classList?c.classList.remove(a):c.className=c.className.replace(new RegExp("(^|\\b)"+a.split(" ").join("|")+"(\\b|$)","gi")," "))},hasClass:function(c,a){return c?c.classList?c.classList.contains(a):new RegExp("(^| )"+a+"( |$)","gi").test(c.className):!1},addStyles:function(c){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};c&&Object.entries(a).forEach(function(t){var r=l8(t,2),n=r[0],s=r[1];return c.style[n]=s})},find:function(c,a){return this.isElement(c)?c.querySelectorAll(a):[]},findSingle:function(c,a){return this.isElement(c)?c.querySelector(a):null},createElement:function(c){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(c){var t=document.createElement(c);this.setAttributes(t,a);for(var r=arguments.length,n=new Array(r>2?r-2:0),s=2;s<r;s++)n[s-2]=arguments[s];return t.append.apply(t,n),t}},setAttribute:function(c){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",t=arguments.length>2?arguments[2]:void 0;this.isElement(c)&&t!==null&&t!==void 0&&c.setAttribute(a,t)},setAttributes:function(c){var a=this,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.isElement(c)){var r=function n(s,i){var o,f,l=c!=null&&(o=c.$attrs)!==null&&o!==void 0&&o[s]?[c==null||(f=c.$attrs)===null||f===void 0?void 0:f[s]]:[];return[i].flat().reduce(function(u,m){if(m!=null){var d=u4(m);if(d==="string"||d==="number")u.push(m);else if(d==="object"){var z=Array.isArray(m)?n(s,m):Object.entries(m).map(function(M){var L=l8(M,2),g=L[0],p=L[1];return s==="style"&&(p||p===0)?"".concat(g.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),":").concat(p):p?g:void 0});u=z.length?u.concat(z.filter(function(M){return!!M})):u}}return u},l)};Object.entries(t).forEach(function(n){var s=l8(n,2),i=s[0],o=s[1];if(o!=null){var f=i.match(/^on(.+)/);f?c.addEventListener(f[1].toLowerCase(),o):i==="p-bind"?a.setAttributes(c,o):(o=i==="class"?
Line truncated
|
||||
[href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(a,`,
|
||||
input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(a,`,
|
||||
select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(a,`,
|
||||
textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(a,`,
|
||||
[tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(a,`,
|
||||
[contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(a)):!1},getFocusableElements:function(c){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",t=this.find(c,'button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])'.concat(a,`,
|
||||
[href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(a,`,
|
||||
input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(a,`,
|
||||
select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(a,`,
|
||||
textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(a,`,
|
||||
[tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(a,`,
|
||||
[contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(a)),r=[],n=o8(t),s;try{for(n.s();!(s=n.n()).done;){var i=s.value;getComputedStyle(i).display!="none"&&getComputedStyle(i).visibility!="hidden"&&r.push(i)}}catch(o){n.e(o)}finally{n.f()}return r},getFirstFocusableElement:function(c,a){var t=this.getFocusableElements(c,a);return t.length>0?t[0]:null},getLastFocusableElement:function(c,a){var t=this.getFocusableElements(c,a);return t.length>0?t[t.length-1]:null},getNextFocusableElement:function(c,a,t){var r=this.getFocusableElements(c,t),n=r.length>0?r.findIndex(function(i){return i===a}):-1,s=n>-1&&r.length>=n+1?n+1:-1;return s>-1?r[s]:null},getPreviousElementSibling:function(c,a){for(var t=c.previousElementSibling;t;){if(t.matches(a))return t;t=t.previousElementSibling}return null},getNextElementSibling:function(c,a){for(var t=c.nextElementSibling;t;){if(t.matches(a))return t;t=t.nextElementSibling}return null},isClickable:function(c){if(c){var a=c.nodeName,t=c.parentElement&&c.parentElement.nodeName;return a==="INPUT"||a==="TEXTAREA"||a==="BUTTON"||a==="A"||t==="INPUT"||t==="TEXTAREA"||t==="BUTTON"||t==="A"||!!c.closest(".p-button, .p-checkbox, .p-radiobutton")}return!1},applyStyle:function(c,a){if(typeof a=="string")c.style.cssText=a;else for(var t in a)c.style[t]=a[t]},isIOS:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream},isAndroid:function(){return/(android)/i.test(navigator.userAgent)},isTouchDevice:function(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0},hasCSSAnimation:function(c){if(c){var a=getComputedStyle(c),t=parseFloat(a.getPropertyValue("animation-duration")||"0");return t>0}return!1},hasCSSTransition:function(c){if(c){var a=getComputedStyle(c),t=parseFloat(a.getPropertyValue("transition-duration")||"0");return t>0}return!1},exportCSV:function(c,a){var t=new Blob([c],{type:"application/csv;charset=utf-8;"});if(window.navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(t,a+".csv");else{var r=document.createElement("a");r.download!==void 0?(r.setAttribute("href",URL.createObjectURL(t)),r.setAttribute("download",a+".csv"),r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r)):(c="data:text/csv;charset=utf-8,"+c,window.open(encodeURI(c)))}},blockBodyScroll:function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"p-overflow-hidden";document.body.style.setProperty("--scrollbar-width",this.calculateBodyScrollbarWidth()+"px"),this.addClass(document.body,c)},unblockBodyScroll:function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"p-overflow-hidden";document.body.style.removeProperty("--scrollbar-width"),this.removeClass(document.body,c)}};function b4(e){"@babel/helpers - typeof";return b4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},b4(e)}function RV(e,c){if(!(e instanceof c))throw new TypeError("Cannot call a class as a function")}function O7(e,c){for(var a=0;a<c.length;a++){var t=c[a];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,DV(t.key),t)}}function OV(e,c,a){return c&&O7(e.prototype,c),a&&O7(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e}function DV(e){var c=FV(e,"string");return b4(c)=="symbol"?c:String(c)}function FV(e,c){if(b4(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var t=a.call(e,c||"default");if(b4(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(c==="string"?String:Number)(e)}var BV=function(){function e(c){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){};RV(this,e),this.element=c,this.listener=a}return OV(e,[{key:"bindScrollListener",value:function(){this.scrollableParents=T.getScrollableParents(this.element);for(var a=0;a<this.scrollableParents.length;a++)this.scrollableParents[a].addEventListener("scroll",this.listener)}},{key:"unbindScrollListener",value:function(){if(this.scrollableParents)for(var a=0;a<this.scrollableParents.length;a++)this.scrollableParents[a].removeEventListener("scroll",this.listener)}},{key:"destroy",value:function(){this.unbindScrollListener(),this.element=null,this.listener=null,this.scrollableParents=null}}]),e}();function re(){var e=new Map;return{on:function(a,t){var r=e.get(a);r?r.push(t):r=[t],e.set(a,r)},off:function(a,t){var r=e.get(a);r&&r.splice(r.indexOf(t)>>>0,1)},emit:function(a,t){var r=e.get(a);r&&r.slice().map(function(n){n(t)})}}}function D7(e,c){return UV(e)||$V(e,c)||ne(e,c)||IV()}function IV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $V(e,c){var a=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(a!=null){var t,r,n,s,i=[],o=!0,f=!1;try{if(n=(a=a.call(e)).next,c===0){if(Object(a)!==a)return;o=!1}else for(;!(o=(t=n.call(a)).done)&&(i.push(t.value),i.length!==c);o=!0);}catch(l){f=!0,r=l}finally{try{if(!o&&a.return!=null&&(s=a.return(),Object(s)!==s))return}finally{if(f)throw r}}return i}}function UV(e){if(Array.isArray(e))return e}function F7(e){return qV(e)||WV(e)||ne(e)||jV()}function jV(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WV(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function qV(e){if(Array.isArray(e))return Z8(e)}function f8(e,c){var a=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!a){if(Array.isArray(e)||(a=ne(e))||c&&e&&typeof e.length=="number"){a&&(e=a);var t=0,r=function(){};return{s:r,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(f){throw f},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var n=!0,s=!1,i;return{s:function(){a=a.call(e)},n:function(){var f=a.next();return n=f.done,f},e:function(f){s=!0,i=f},f:function(){try{!n&&a.return!=null&&a.return()}finally{if(s)throw i}}}}function ne(e,c){if(e){if(typeof e=="string")return Z8(e,c);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Z8(e,c)}}function Z8(e,c){(c==null||c>e.length)&&(c=e.length);for(var a=0,t=new Array(c);a<c;a++)t[a]=e[a];return t}function m4(e){"@babel/helpers - typeof";return m4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},m4(e)}var n2={equals:function(c,a,t){return t?this.resolveFieldData(c,t)===this.resolveFieldData(a,t):this.deepEquals(c,a)},deepEquals:function(c,a){if(c===a)return!0;if(c&&a&&m4(c)=="object"&&m4(a)=="object"){var t=Array.isArray(c),r=Array.isArray(a),n,s,i;if(t&&r){if(s=c.length,s!=a.length)return!1;for(n=s;n--!==0;)if(!this.deepEquals(c[n],a[n]))return!1;return!0}if(t!=r)return!1;var o=c instanceof Date,f=a instanceof Date;if(o!=f)return!1;if(o&&f)return c.getTime()==a.getTime();var l=c instanceof RegExp,u=a instanceof RegExp;if(l!=u)return!1;if(l&&u)return c.toString()==a.toString();var m=Object.keys(c);if(s=m.length,s!==Object.keys(a).length)return!1;for(n=s;n--!==0;)if(!Object.prototype.hasOwnProperty.call(a,m[n]))return!1;for(n=s;n--!==0;)if(i=m[n],!this.deepEquals(c[i],a[i]))return!1;return!0}return c!==c&&a!==a},resolveFieldData:function(c,a){if(!c||!a)return null;try{var t=c[a];if(this.isNotEmpty(t))return t}catch{}if(Object.keys(c).length){if(this.isFunction(a))return a(c);if(a.indexOf(".")===-1)return c[a];for(var r=a.split("."),n=c,s=0,i=r.length;s<i;++s){if(n==null)return null;n=n[r[s]]}return n}return null},getItemValue:function(c){for(var a=arguments.length,t=new Array(a>1?a-1:0),r=1;r<a;r++)t[r-1]=arguments[r];return this.isFunction(c)?c.apply(void 0,t):c},filter:function(c,a,t){var r=[];if(c){var n=f8(c),s;try{for(n.s();!(s=n.n()).done;){var i=s.value,o=f8(a),f;try{for(o.s();!(f=o.n()).done;){var l=f.value;if(String(this.resolveFieldData(i,l)).toLowerCase().indexOf(t.toLowerCase())>-1){r.push(i);break}}}catch(u){o.e(u)}finally{o.f()}}}catch(u){n.e(u)}finally{n.f()}}return r},reorderArray:function(c,a,t){c&&a!==t&&(t>=c.length&&(t%=c.length,a%=c.length),c.splice(t,0,c.splice(a,1)[0]))},findIndexInList:function(c,a){var t=-1;if(a){for(var r=0;r<a.length;r++)if(a[r]===c){t=r;break}}return t},contains:function(c,a){if(c!=null&&a&&a.length){var t=f8(a),r;try{for(t.s();!(r=t.n()).done;){var n=r.value;if(this.equals(c,n))return!0}}catch(s){t.e(s)}finally{t.f()}}return!1},insertIntoOrderedArray:function(c,a,t,r){if(t.length>0){for(var n=!1,s=0;s<t.length;s++){var i=this.findIndexInList(t[s],r);if(i>a){t.splice(s,0,c),n=!0;break}}n||t.push(c)}else t.push(c)},removeAccents:function(c){return c&&c.search(/[\xC0-\xFF]/g)>-1&&(c=c.replace(/[\xC0-\xC5]/g,"A").replace(/[\xC6]/g,"AE").replace(/[\xC7]/g,"C").replace(/[\xC8-\xCB]/g,"E").replace(/[\xCC-\xCF]/g,"I").replace(/[\xD0]/g,"D").replace(/[\xD1]/g,"N").replace(/[\xD2-\xD6\xD8]/g,"O").replace(/[\xD9-\xDC]/g,"U").replace(/[\xDD]/g,"Y").replace(/[\xDE]/g,"P").replace(/[\xE0-\xE5]/g,"a").replace(/[\xE6]/g,"ae").replace(/[\xE7]/g,"c").replace(/[\xE8-\xEB]/g,"e").replace(/[\xEC-\xEF]/g,"i").replace(/[\xF1]/g,"n").replace(/[\xF2-\xF6\xF8]/g,"o").replace(/[\xF9-\xFC]/g,"u").replace(/[\xFE]/g,"p").replace(/[\xFD\xFF]/g,"y")),c},getVNodeProp:function(c,a){if(c){var t=c.props;if(t){var r=a.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),n=Object.prototype.hasOwnProperty.call(t,r)?r:a;return c.type.extends.props[a].type===Boolean&&t[n]===""?!0:t[n]}}return null},toFlatCase:function(c){return this.isString(c)?c.replace(/(-|_)/g,"").toLowerCase():c},toKebabCase:function(c){return this.isString(c)?c.replace(/(_)/g,"-").replace(/[A-Z]/g,function(a,t){return t===0?a:"-"+a.toLowerCase()}).toLowerCase():c},toCapitalCase:function(c){return this.isString(c,{empty:!1})?c[0].toUpperCase()+c.slice(1):c},isEmpty:function(c){return c==null||c===""||Array.isArray(c)&&c.length===0||!(c instanceof Date)&&m4(c)==="object"&&Object.keys(c).length===0},isNotEmpty:function(c){return!this.isEmpty(c)},isFunction:function(c){return!!(c&&c.constructor&&c.call&&c.apply)},isObject:function(c){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return c instanceof Object&&c.constructor===Object&&(a||Object.keys(c).length!==0)},isDate:function(c){return c instanceof Date&&c.constructor===Date},isArray:function(c){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return Array.isArray(c)&&(a||c.length!==0)},isString:function(c){var a=arguments.length>1
Line truncated
|
||||
`+Object.entries(c).map(function(i){var o=D7(i,2),f=o[0],l=o[1];return"".concat(s).concat(f,": ").concat(a.stringify(l,t,r+t))}).join(`,
|
||||
`)+`
|
||||
`.concat(n)+"}":JSON.stringify(c)}};function x4(e){"@babel/helpers - typeof";return x4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},x4(e)}function GV(e){return QV(e)||XV(e)||YV(e)||KV()}function KV(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YV(e,c){if(e){if(typeof e=="string")return e5(e,c);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return e5(e,c)}}function XV(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function QV(e){if(Array.isArray(e))return e5(e)}function e5(e,c){(c==null||c>e.length)&&(c=e.length);for(var a=0,t=new Array(c);a<c;a++)t[a]=e[a];return t}function JV(e,c){if(!(e instanceof c))throw new TypeError("Cannot call a class as a function")}function B7(e,c){for(var a=0;a<c.length;a++){var t=c[a];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,Xt(t.key),t)}}function ZV(e,c,a){return c&&B7(e.prototype,c),a&&B7(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e}function I7(e,c,a){return c=Xt(c),c in e?Object.defineProperty(e,c,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[c]=a,e}function Xt(e){var c=eM(e,"string");return x4(c)=="symbol"?c:String(c)}function eM(e,c){if(x4(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var t=a.call(e,c||"default");if(x4(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(c==="string"?String:Number)(e)}var IJ=function(){function e(c){var a=c.init,t=c.type;JV(this,e),I7(this,"helpers",void 0),I7(this,"type",void 0),this.helpers=new Set(a),this.type=t}return ZV(e,[{key:"add",value:function(a){this.helpers.add(a)}},{key:"update",value:function(){}},{key:"delete",value:function(a){this.helpers.delete(a)}},{key:"clear",value:function(){this.helpers.clear()}},{key:"get",value:function(a,t){var r=this._get(a,t),n=r?this._recursive(GV(this.helpers),r):null;return n2.isNotEmpty(n)?n:null}},{key:"_isMatched",value:function(a,t){var r,n=a==null?void 0:a.parent;return(n==null||(r=n.vnode)===null||r===void 0?void 0:r.key)===t||n&&this._isMatched(n,t)||!1}},{key:"_get",value:function(a,t){var r,n;return((r=t||(a==null?void 0:a.$slots))===null||r===void 0||(n=r.default)===null||n===void 0?void 0:n.call(r))||null}},{key:"_recursive",value:function(){var a=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=[];return r.forEach(function(s){s.children instanceof Array?n=n.concat(a._recursive(n,s.children)):s.type.name===a.type?n.push(s):n2.isNotEmpty(s.key)&&(n=n.concat(t.filter(function(i){return a._isMatched(i,s.key)}).map(function(i){return i.vnode})))}),n}}]),e}(),$7=0;function e4(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"pv_id_";return $7++,"".concat(e).concat($7)}function cM(e){return nM(e)||rM(e)||tM(e)||aM()}function aM(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tM(e,c){if(e){if(typeof e=="string")return c5(e,c);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return c5(e,c)}}function rM(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function nM(e){if(Array.isArray(e))return c5(e)}function c5(e,c){(c==null||c>e.length)&&(c=e.length);for(var a=0,t=new Array(c);a<c;a++)t[a]=e[a];return t}function sM(){var e=[],c=function(i,o){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:999,l=r(i,o,f),u=l.value+(l.key===i?0:f)+1;return e.push({key:i,value:u}),u},a=function(i){e=e.filter(function(o){return o.value!==i})},t=function(i,o){return r(i,o).value},r=function(i,o){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return cM(e).reverse().find(function(l){return o?!0:l.key===i})||{key:i,value:f}},n=function(i){return i&&parseInt(i.style.zIndex,10)||0};return{get:n,set:function(i,o,f){o&&(o.style.zIndex=String(c(i,!0,f)))},clear:function(i){i&&(a(n(i)),i.style.zIndex="")},getCurrent:function(i){return t(i,!0)}}}var U7=sM(),R2={STARTS_WITH:"startsWith",CONTAINS:"contains",NOT_CONTAINS:"notContains",ENDS_WITH:"endsWith",EQUALS:"equals",NOT_EQUALS:"notEquals",IN:"in",LESS_THAN:"lt",LESS_THAN_OR_EQUAL_TO:"lte",GREATER_THAN:"gt",GREATER_THAN_OR_EQUAL_TO:"gte",BETWEEN:"between",DATE_IS:"dateIs",DATE_IS_NOT:"dateIsNot",DATE_BEFORE:"dateBefore",DATE_AFTER:"dateAfter"},$J={AND:"and",OR:"or"};function j7(e,c){var a=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!a){if(Array.isArray(e)||(a=iM(e))||c&&e&&typeof e.length=="number"){a&&(e=a);var t=0,r=function(){};return{s:r,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(f){throw f},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var n=!0,s=!1,i;return{s:function(){a=a.call(e)},n:function(){var f=a.next();return n=f.done,f},e:function(f){s=!0,i=f},f:function(){try{!n&&a.return!=null&&a.return()}finally{if(s)throw i}}}}function iM(e,c){if(e){if(typeof e=="string")return W7(e,c);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return W7(e,c)}}function W7(e,c){(c==null||c>e.length)&&(c=e.length);for(var a=0,t=new Array(c);a<c;a++)t[a]=e[a];return t}var UJ={filter:function(c,a,t,r,n){var s=[];if(!c)return s;var i=j7(c),o;try{for(i.s();!(o=i.n()).done;){var f=o.value;if(typeof f=="string"){if(this.filters[r](f,t,n)){s.push(f);continue}}else{var l=j7(a),u;try{for(l.s();!(u=l.n()).done;){var m=u.value,d=n2.resolveFieldData(f,m);if(this.filters[r](d,t,n)){s.push(f);break}}}catch(z){l.e(z)}finally{l.f()}}}}catch(z){i.e(z)}finally{i.f()}return s},filters:{startsWith:function(c,a,t){if(a==null||a==="")return!0;if(c==null)return!1;var r=n2.removeAccents(a.toString()).toLocaleLowerCase(t),n=n2.removeAccents(c.toString()).toLocaleLowerCase(t);return n.slice(0,r.length)===r},contains:function(c,a,t){if(a==null||a==="")return!0;if(c==null)return!1;var r=n2.removeAccents(a.toString()).toLocaleLowerCase(t),n=n2.removeAccents(c.toString()).toLocaleLowerCase(t);return n.indexOf(r)!==-1},notContains:function(c,a,t){if(a==null||a==="")return!0;if(c==null)return!1;var r=n2.removeAccents(a.toString()).toLocaleLowerCase(t),n=n2.removeAccents(c.toString()).toLocaleLowerCase(t);return n.indexOf(r)===-1},endsWith:function(c,a,t){if(a==null||a==="")return!0;if(c==null)return!1;var r=n2.removeAccents(a.toString()).toLocaleLowerCase(t),n=n2.removeAccents(c.toString()).toLocaleLowerCase(t);return n.indexOf(r,n.length-r.length)!==-1},equals:function(c,a,t){return a==null||a===""?!0:c==null?!1:c.getTime&&a.getTime?c.getTime()===a.getTime():n2.removeAccents(c.toString()).toLocaleLowerCase(t)==n2.removeAccents(a.toString()).toLocaleLowerCase(t)},notEquals:function(c,a,t){return a==null||a===""?!1:c==null?!0:c.getTime&&a.getTime?c.getTime()!==a.getTime():n2.removeAccents(c.toString()).toLocaleLowerCase(t)!=n2.removeAccents(a.toString()).toLocaleLowerCase(t)},in:function(c,a){if(a==null||a.length===0)return!0;for(var t=0;t<a.length;t++)if(n2.equals(c,a[t]))return!0;return!1},between:function(c,a){return a==null||a[0]==null||a[1]==null?!0:c==null?!1:c.getTime?a[0].getTime()<=c.getTime()&&c.getTime()<=a[1].getTime():a[0]<=c&&c<=a[1]},lt:function(c,a){return a==null?!0:c==null?!1:c.getTime&&a.getTime?c.getTime()<a.getTime():c<a},lte:function(c,a){return a==null?!0:c==null?!1:c.getTime&&a.getTime?c.getTime()<=a.getTime():c<=a},gt:function(c,a){return a==null?!0:c==null?!1:c.getTime&&a.getTime?c.getTime()>a.getTime():c>a},gte:function(c,a){return a==null?!0:c==null?!1:c.getTime&&a.getTime?c.getTime()>=a.getTime():c>=a},dateIs:function(c,a){return a==null?!0:c==null?!1:c.toDateString()===a.toDateString()},dateIsNot:function(c,a){return a==null?!0:c==null?!1:c.toDateString()!==a.toDateString()},dateBefore:function(c,a){return a==null?!0:c==null?!1:c.getTime()<a.getTime()},dateAfter:function(c,a){return a==null?!0:c==null?!1:c.getTime()>a.getTime()}},register:function(c,a){this.filters[c]=a}};function S4(e){"@babel/helpers - typeof";return S4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},S4(e)}function q7(e,c){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);c&&(t=t.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,t)}return a}function u8(e){for(var c=1;c<arguments.length;c++){var a=arguments[c]!=null?arguments[c]:{};c%2?q7(Object(a),!0).forEach(function(t){oM(e,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):q7(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}function oM(e,c,a){return c=lM(c),c in e?Object.defineProperty(e,c,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[c]=a,e}function lM(e){var c=fM(e,"string");return S4(c)=="symbol"?c:String(c)}function fM(e,c){if(S4(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var t=a.call(e,c||"default");if(S4(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(c==="string"?String:Number)(e)}var G7={ripple:!1,inputStyle:null,locale:{startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than o
Line truncated
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bM(e,c){if(e){if(typeof e=="string")return J7(e,c);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return J7(e,c)}}function J7(e,c){(c==null||c>e.length)&&(c=e.length);for(var a=0,t=new Array(c);a<c;a++)t[a]=e[a];return t}function xM(e,c){var a=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(a!=null){var t,r,n,s,i=[],o=!0,f=!1;try{if(n=(a=a.call(e)).next,c===0){if(Object(a)!==a)return;o=!1}else for(;!(o=(t=n.call(a)).done)&&(i.push(t.value),i.length!==c);o=!0);}catch(l){f=!0,r=l}finally{try{if(!o&&a.return!=null&&(s=a.return(),Object(s)!==s))return}finally{if(f)throw r}}return i}}function SM(e){if(Array.isArray(e))return e}function Z7(e,c){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);c&&(t=t.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,t)}return a}function m8(e){for(var c=1;c<arguments.length;c++){var a=arguments[c]!=null?arguments[c]:{};c%2?Z7(Object(a),!0).forEach(function(t){wM(e,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Z7(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}function wM(e,c,a){return c=_M(c),c in e?Object.defineProperty(e,c,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[c]=a,e}function _M(e){var c=NM(e,"string");return _4(c)=="symbol"?c:String(c)}function NM(e,c){if(_4(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var t=a.call(e,c||"default");if(_4(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(c==="string"?String:Number)(e)}var AM=`
|
||||
.p-hidden-accessible {
|
||||
border: 0;
|
||||
clip: rect(0 0 0 0);
|
||||
height: 1px;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
.p-hidden-accessible input,
|
||||
.p-hidden-accessible select {
|
||||
transform: scale(0);
|
||||
}
|
||||
|
||||
.p-overflow-hidden {
|
||||
overflow: hidden;
|
||||
padding-right: var(--scrollbar-width);
|
||||
}
|
||||
`,kM={},TM={},N4={name:"base",css:AM,classes:kM,inlineStyles:TM,loadStyle:function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.css?CM(this.css,m8({name:this.name},c)):{}},getStyleSheet:function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.css){var t=Object.entries(a).reduce(function(r,n){var s=LM(n,2),i=s[0],o=s[1];return r.push("".concat(i,'="').concat(o,'"'))&&r},[]).join(" ");return'<style type="text/css" data-primevue-style-id="'.concat(this.name,'" ').concat(t,">").concat(this.css).concat(c,"</style>")}return""},extend:function(c){return m8(m8({},this),{},{css:void 0},c)}},EM={root:"p-badge p-component"},PM=N4.extend({name:"badge",classes:EM});function A4(e){"@babel/helpers - typeof";return A4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},A4(e)}function ea(e,c){return FM(e)||DM(e,c)||OM(e,c)||RM()}function RM(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OM(e,c){if(e){if(typeof e=="string")return ca(e,c);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return ca(e,c)}}function ca(e,c){(c==null||c>e.length)&&(c=e.length);for(var a=0,t=new Array(c);a<c;a++)t[a]=e[a];return t}function DM(e,c){var a=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(a!=null){var t,r,n,s,i=[],o=!0,f=!1;try{if(n=(a=a.call(e)).next,c===0){if(Object(a)!==a)return;o=!1}else for(;!(o=(t=n.call(a)).done)&&(i.push(t.value),i.length!==c);o=!0);}catch(l){f=!0,r=l}finally{try{if(!o&&a.return!=null&&(s=a.return(),Object(s)!==s))return}finally{if(f)throw r}}return i}}function FM(e){if(Array.isArray(e))return e}function aa(e,c){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);c&&(t=t.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,t)}return a}function C2(e){for(var c=1;c<arguments.length;c++){var a=arguments[c]!=null?arguments[c]:{};c%2?aa(Object(a),!0).forEach(function(t){a5(e,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):aa(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}function a5(e,c,a){return c=BM(c),c in e?Object.defineProperty(e,c,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[c]=a,e}function BM(e){var c=IM(e,"string");return A4(c)=="symbol"?c:String(c)}function IM(e,c){if(A4(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var t=a.call(e,c||"default");if(A4(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(c==="string"?String:Number)(e)}var r2={_getMeta:function(){return[n2.isObject(arguments.length<=0?void 0:arguments[0])||arguments.length<=0?void 0:arguments[0],n2.getItemValue(n2.isObject(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:arguments.length<=1?void 0:arguments[1])]},_getConfig:function(c,a){var t,r,n;return(t=(c==null||(r=c.instance)===null||r===void 0?void 0:r.$primevue)||(a==null||(n=a.ctx)===null||n===void 0||(n=n.appContext)===null||n===void 0||(n=n.config)===null||n===void 0||(n=n.globalProperties)===null||n===void 0?void 0:n.$primevue))===null||t===void 0?void 0:t.config},_getOptionValue:function(c){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n2.toFlatCase(a).split("."),n=r.shift();return n?n2.isObject(c)?r2._getOptionValue(n2.getItemValue(c[Object.keys(c).find(function(s){return n2.toFlatCase(s)===n})||""],t),r.join("."),t):void 0:n2.getItemValue(c,t)},_getPTValue:function(){var c,a,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"",s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=function(){var p=r2._getOptionValue.apply(r2,arguments);return n2.isString(p)||n2.isArray(p)?{class:p}:p},f=((c=t.binding)===null||c===void 0||(c=c.value)===null||c===void 0?void 0:c.ptOptions)||((a=t.$config)===null||a===void 0?void 0:a.ptOptions)||{},l=f.mergeSections,u=l===void 0?!0:l,m=f.mergeProps,d=m===void 0?!1:m,z=i?r2._useDefaultPT(t,t.defaultPT(),o,n,s):void 0,M=r2._usePT(t,r2._getPT(r,t.$name),o,n,C2(C2({},s),{},{global:z||{}})),L=r2._getPTDatasets(t,n);return u||!u&&M?d?r2._mergeProps(t,d,z,M,L):C2(C2(C2({},z),M),L):C2(C2({},M),L)},_getPTDatasets:function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",t="data-pc-";return C2(C2({},a==="root"&&a5({},"".concat(t,"name"),n2.toFlatCase(c.$name))),{},a5({},"".concat(t,"section"),n2.toFlatCase(a)))},_getPT:function(c){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",t=arguments.length>2?arguments[2]:void 0,r=function(s){var i,o=t?t(s):s,f=n2.toFlatCase(a);return(i=o==null?void 0:o[f])!==null&&i!==void 0?i:o};return c!=null&&c.hasOwnProperty("_usept")?{_usept:c._usept,originalValue:r(c.originalValue),value:r(c.value)}:r(c)},_usePT:function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0,t=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,n=arguments.length>4?arguments[4]:void 0,s=function(L){return t(L,r,n)};if(a!=null&&a.hasOwnProperty("_usept")){var i,o=a._usept||((i=c.$config)===null||i===void 0?void 0:i.ptOptions)||{},f=o.mergeSections,l=f===void 0?!0:f,u=o.mergeProps,m=u===void 0?!1:u,d=s(a.originalValue),z=s(a.value);return d===void 0&&z===void 0?void 0:n2.isString(z)?z:n2.isStrin
Line truncated
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JM(e,c){if(e){if(typeof e=="string")return na(e,c);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return na(e,c)}}function na(e,c){(c==null||c>e.length)&&(c=e.length);for(var a=0,t=new Array(c);a<c;a++)t[a]=e[a];return t}function ZM(e,c){var a=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(a!=null){var t,r,n,s,i=[],o=!0,f=!1;try{if(n=(a=a.call(e)).next,c===0){if(Object(a)!==a)return;o=!1}else for(;!(o=(t=n.call(a)).done)&&(i.push(t.value),i.length!==c);o=!0);}catch(l){f=!0,r=l}finally{try{if(!o&&a.return!=null&&(s=a.return(),Object(s)!==s))return}finally{if(f)throw r}}return i}}function eC(e){if(Array.isArray(e))return e}function d4(e){"@babel/helpers - typeof";return d4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},d4(e)}var cC=YM.extend("tooltip",{beforeMount:function(c,a){var t,r=this.getTarget(c);if(r.$_ptooltipModifiers=this.getModifiers(a),a.value){if(typeof a.value=="string")r.$_ptooltipValue=a.value,r.$_ptooltipDisabled=!1,r.$_ptooltipEscape=!0,r.$_ptooltipClass=null,r.$_ptooltipFitContent=!0,r.$_ptooltipIdAttr=e4()+"_tooltip",r.$_ptooltipShowDelay=0,r.$_ptooltipHideDelay=0,r.$_ptooltipAutoHide=!0;else if(d4(a.value)==="object"&&a.value){if(n2.isEmpty(a.value.value)||a.value.value.trim()==="")return;r.$_ptooltipValue=a.value.value,r.$_ptooltipDisabled=!!a.value.disabled===a.value.disabled?a.value.disabled:!1,r.$_ptooltipEscape=!!a.value.escape===a.value.escape?a.value.escape:!0,r.$_ptooltipClass=a.value.class||"",r.$_ptooltipFitContent=!!a.value.fitContent===a.value.fitContent?a.value.fitContent:!0,r.$_ptooltipIdAttr=a.value.id||e4()+"_tooltip",r.$_ptooltipShowDelay=a.value.showDelay||0,r.$_ptooltipHideDelay=a.value.hideDelay||0,r.$_ptooltipAutoHide=!!a.value.autoHide===a.value.autoHide?a.value.autoHide:!0}}else return;r.$_ptooltipZIndex=(t=a.instance.$primevue)===null||t===void 0||(t=t.config)===null||t===void 0||(t=t.zIndex)===null||t===void 0?void 0:t.tooltip,this.bindEvents(r,a),c.setAttribute("data-pd-tooltip",!0)},updated:function(c,a){var t=this.getTarget(c);if(t.$_ptooltipModifiers=this.getModifiers(a),this.unbindEvents(t),!!a.value){if(typeof a.value=="string")t.$_ptooltipValue=a.value,t.$_ptooltipDisabled=!1,t.$_ptooltipEscape=!0,t.$_ptooltipClass=null,t.$_ptooltipIdAttr=t.$_ptooltipIdAttr||e4()+"_tooltip",t.$_ptooltipShowDelay=0,t.$_ptooltipHideDelay=0,t.$_ptooltipAutoHide=!0,this.bindEvents(t,a);else if(d4(a.value)==="object"&&a.value)if(n2.isEmpty(a.value.value)||a.value.value.trim()===""){this.unbindEvents(t,a);return}else t.$_ptooltipValue=a.value.value,t.$_ptooltipDisabled=!!a.value.disabled===a.value.disabled?a.value.disabled:!1,t.$_ptooltipEscape=!!a.value.escape===a.value.escape?a.value.escape:!0,t.$_ptooltipClass=a.value.class||"",t.$_ptooltipFitContent=!!a.value.fitContent===a.value.fitContent?a.value.fitContent:!0,t.$_ptooltipIdAttr=a.value.id||t.$_ptooltipIdAttr||e4()+"_tooltip",t.$_ptooltipShowDelay=a.value.showDelay||0,t.$_ptooltipHideDelay=a.value.hideDelay||0,t.$_ptooltipAutoHide=!!a.value.autoHide===a.value.autoHide?a.value.autoHide:!0,this.bindEvents(t,a)}},unmounted:function(c,a){var t=this.getTarget(c);this.remove(t),this.unbindEvents(t,a),t.$_ptooltipScrollHandler&&(t.$_ptooltipScrollHandler.destroy(),t.$_ptooltipScrollHandler=null)},timer:void 0,methods:{bindEvents:function(c,a){var t=this,r=c.$_ptooltipModifiers;r.focus?(c.$_focusevent=function(n){return t.onFocus(n,a)},c.addEventListener("focus",c.$_focusevent),c.addEventListener("blur",this.onBlur.bind(this))):(c.$_mouseenterevent=function(n){return t.onMouseEnter(n,a)},c.addEventListener("mouseenter",c.$_mouseenterevent),c.addEventListener("mouseleave",this.onMouseLeave.bind(this)),c.addEventListener("click",this.onClick.bind(this))),c.addEventListener("keydown",this.onKeydown.bind(this))},unbindEvents:function(c){var a=c.$_ptooltipModifiers;a.focus?(c.removeEventListener("focus",c.$_focusevent),c.$_focusevent=null,c.removeEventListener("blur",this.onBlur.bind(this))):(c.removeEventListener("mouseenter",c.$_mouseenterevent),c.$_mouseenterevent=null,c.removeEventListener("mouseleave",this.onMouseLeave.bind(this)),c.removeEventListener("click",this.onClick.bind(this))),c.removeEventListener("keydown",this.onKeydown.bind(this))},bindScrollListener:function(c){var a=this;c.$_ptooltipScrollHandler||(c.$_ptooltipScrollHandler=new BV(c,function(){a.hide(c)})),c.$_ptooltipScrollHandler.bindScrollListener()},unbindScrollListener:function(c){c.$_ptooltipScrollHandler&&c.$_ptooltipScrollHandler.unbindScrollListener()},onMouseEnter:function(c,a){var t=c.currentTarget,r=t.$_ptooltipShow
Line truncated
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iC(e,c){if(e){if(typeof e=="string")return t5(e,c);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return t5(e,c)}}function oC(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function lC(e){if(Array.isArray(e))return t5(e)}function t5(e,c){(c==null||c>e.length)&&(c=e.length);for(var a=0,t=new Array(c);a<c;a++)t[a]=e[a];return t}var fC=rC.extend("ripple",{mounted:function(c){var a,t=c==null||(a=c.$instance)===null||a===void 0?void 0:a.$config;t&&t.ripple&&(this.create(c),this.bindEvents(c),c.setAttribute("data-pd-ripple",!0))},unmounted:function(c){this.remove(c)},timeout:void 0,methods:{bindEvents:function(c){c.addEventListener("mousedown",this.onMouseDown.bind(this))},unbindEvents:function(c){c.removeEventListener("mousedown",this.onMouseDown.bind(this))},create:function(c){var a=T.createElement("span",{role:"presentation","aria-hidden":!0,"data-p-ink":!0,"data-p-ink-active":!1,class:!this.isUnstyled()&&this.cx("root"),onAnimationEnd:this.onAnimationEnd.bind(this),"p-bind":this.ptm("root")});c.appendChild(a),this.$el=a},remove:function(c){var a=this.getInk(c);a&&(this.unbindEvents(c),a.removeEventListener("animationend",this.onAnimationEnd),a.remove())},onMouseDown:function(c){var a=this,t=c.currentTarget,r=this.getInk(t);if(!(!r||getComputedStyle(r,null).display==="none")){if(!this.isUnstyled()&&T.removeClass(r,"p-ink-active"),r.setAttribute("data-p-ink-active","false"),!T.getHeight(r)&&!T.getWidth(r)){var n=Math.max(T.getOuterWidth(t),T.getOuterHeight(t));r.style.height=n+"px",r.style.width=n+"px"}var s=T.getOffset(t),i=c.pageX-s.left+document.body.scrollTop-T.getWidth(r)/2,o=c.pageY-s.top+document.body.scrollLeft-T.getHeight(r)/2;r.style.top=o+"px",r.style.left=i+"px",!this.isUnstyled()&&T.addClass(r,"p-ink-active"),r.setAttribute("data-p-ink-active","true"),this.timeout=setTimeout(function(){r&&(!a.isUnstyled()&&T.removeClass(r,"p-ink-active"),r.setAttribute("data-p-ink-active","false"))},401)}},onAnimationEnd:function(c){this.timeout&&clearTimeout(this.timeout),!this.isUnstyled()&&T.removeClass(c.currentTarget,"p-ink-active"),c.currentTarget.setAttribute("data-p-ink-active","false")},getInk:function(c){return c&&c.children?nC(c.children).find(function(a){return T.getAttribute(a,"data-pc-name")==="ripple"}):void 0}}}),uC=r2.extend({}),mC=uC.extend("styleclass",{mounted:function(c,a){c.setAttribute("data-pd-styleclass",!0),this.bind(c,a)},unmounted:function(c){this.unbind(c)},methods:{bind:function(c,a){var t=this,r=this.resolveTarget(c,a);this.$el=r,c.$_pstyleclass_clicklistener=function(){a.value.toggleClass?T.hasClass(r,a.value.toggleClass)?T.removeClass(r,a.value.toggleClass):T.addClass(r,a.value.toggleClass):r.offsetParent===null?t.enter(r,c,a):t.leave(r,a)},c.addEventListener("click",c.$_pstyleclass_clicklistener)},unbind:function(c){c.$_pstyleclass_clicklistener&&(c.removeEventListener("click",c.$_pstyleclass_clicklistener),c.$_pstyleclass_clicklistener=null),this.unbindDocumentListener(c)},enter:function(c,a,t){t.value.enterActiveClass?c.$_pstyleclass_animating||(c.$_pstyleclass_animating=!0,t.value.enterActiveClass==="slidedown"&&(c.style.height="0px",T.removeClass(c,"hidden"),c.style.maxHeight=c.scrollHeight+"px",T.addClass(c,"hidden"),c.style.height=""),T.addClass(c,t.value.enterActiveClass),t.value.enterClass&&T.removeClass(c,t.value.enterClass),t.value.enterFromClass&&T.removeClass(c,t.value.enterFromClass),c.$p_styleclass_enterlistener=function(){T.removeClass(c,t.value.enterActiveClass),t.value.enterToClass&&T.addClass(c,t.value.enterToClass),c.removeEventListener("animationend",c.$p_styleclass_enterlistener),t.value.enterActiveClass==="slidedown"&&(c.style.maxHeight=""),c.$_pstyleclass_animating=!1},c.addEventListener("animationend",c.$p_styleclass_enterlistener)):(t.value.enterClass&&T.removeClass(c,t.value.enterClass),t.value.enterFromClass&&T.removeClass(c,t.value.enterFromClass),t.value.enterToClass&&T.addClass(c,t.value.enterToClass)),t.value.hideOnOutsideClick&&this.bindDocumentListener(c,a,t)},leave:function(c,a){a.value.leaveActiveClass?c.$_pstyleclass_animating||(c.$_pstyleclass_animating=!0,T.addClass(c,a.value.leaveActiveClass),a.value.leaveClass&&T.removeClass(c,a.value.leaveClass),a.value.leaveFromClass&&T.removeClass(c,a.value.leaveFromClass),c.$p_styleclass_leavelistener=function(){T.removeClass(c,a.value.leaveActiveClass),a.value.leaveToClass&&T.addClass(c,a.value.leaveToClass),c.removeEventListener("animationend",c.$p_styleclass_leavelistener),c.$_pstyleclass_animating=!1},c.addEventListener("animationend",c.$p_styleclass_leavelistener)):(a.value.leaveClass&&T.removeClass(c,a.value.leaveClass),a.value.leaveFromClass&&T.removeClass(c,a.value.leaveFromClass),a.value
Line truncated
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yC(e,c){if(e){if(typeof e=="string")return ua(e,c);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return ua(e,c)}}function ua(e,c){(c==null||c>e.length)&&(c=e.length);for(var a=0,t=new Array(c);a<c;a++)t[a]=e[a];return t}function bC(e,c){var a=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(a!=null){var t,r,n,s,i=[],o=!0,f=!1;try{if(n=(a=a.call(e)).next,c===0){if(Object(a)!==a)return;o=!1}else for(;!(o=(t=n.call(a)).done)&&(i.push(t.value),i.length!==c);o=!0);}catch(l){f=!0,r=l}finally{try{if(!o&&a.return!=null&&(s=a.return(),Object(s)!==s))return}finally{if(f)throw r}}return i}}function xC(e){if(Array.isArray(e))return e}var SC=gC.extend("animateonscroll",{created:function(){this.$value=this.$value||{},this.$el.style.opacity=this.$value.enterClass?"0":""},mounted:function(){this.$el.setAttribute("data-pd-animateonscroll",!0),this.bindIntersectionObserver()},unmounted:function(){this.unbindAnimationEvents(),this.unbindIntersectionObserver()},observer:void 0,resetObserver:void 0,isObserverActive:!1,animationState:void 0,animationEndListener:void 0,methods:{bindAnimationEvents:function(){var c=this;this.animationEndListener||(this.animationEndListener=function(){T.removeMultipleClasses(c.$el,[c.$value.enterClass,c.$value.leaveClass]),!c.$modifiers.once&&c.resetObserver.observe(c.$el),c.unbindAnimationEvents()},this.$el.addEventListener("animationend",this.animationEndListener))},bindIntersectionObserver:function(){var c=this,a=this.$value,t=a.root,r=a.rootMargin,n=a.threshold,s=n===void 0?.5:n,i={root:t,rootMargin:r,threshold:s};this.observer=new IntersectionObserver(function(o){var f=fa(o,1),l=f[0];c.isObserverActive?l.boundingClientRect.top>0&&(l.isIntersecting?c.enter():c.leave()):l.isIntersecting&&c.enter(),c.isObserverActive=!0},i),setTimeout(function(){return c.observer.observe(c.$el)},0),this.resetObserver=new IntersectionObserver(function(o){var f=fa(o,1),l=f[0];l.boundingClientRect.top>0&&!l.isIntersecting&&(c.$el.style.opacity=c.$value.enterClass?"0":"",T.removeMultipleClasses(c.$el,[c.$value.enterClass,c.$value.leaveClass]),c.resetObserver.unobserve(c.$el)),c.animationState=void 0},la(la({},i),{},{threshold:0}))},enter:function(){this.animationState!=="enter"&&this.$value.enterClass&&(this.$el.style.opacity="",T.removeMultipleClasses(this.$el,this.$value.leaveClass),T.addMultipleClasses(this.$el,this.$value.enterClass),this.$modifiers.once&&this.unbindIntersectionObserver(this.$el),this.bindAnimationEvents(),this.animationState="enter")},leave:function(){this.animationState!=="leave"&&this.$value.leaveClass&&(this.$el.style.opacity=this.$value.enterClass?"0":"",T.removeMultipleClasses(this.$el,this.$value.enterClass),T.addMultipleClasses(this.$el,this.$value.leaveClass),this.bindAnimationEvents(),this.animationState="leave")},unbindAnimationEvents:function(){this.animationEndListener&&(this.$el.removeEventListener("animationend",this.animationEndListener),this.animationEndListener=void 0)},unbindIntersectionObserver:function(){var c,a;(c=this.observer)===null||c===void 0||c.unobserve(this.$el),(a=this.resetObserver)===null||a===void 0||a.unobserve(this.$el),this.isObserverActive=!1}}});const wC=t1(({vueApp:e})=>{var s;const c=p0(),a=((s=c==null?void 0:c.public)==null?void 0:s.primevue)??{},{usePrimeVue:t=!0,options:r={}}=a,n={};t&&e.use(mM,{...r,...n}),e.use(dM),e.use(pM),e.use(vM),e.directive("badge",qM),e.directive("tooltip",cC),e.directive("ripple",fC),e.directive("styleclass",mC),e.directive("focustrap",zC),e.directive("animateonscroll",SC)}),_C=t1(({vueApp:e})=>{}),NC=t1({name:"nuxt:chunk-reload",setup(e){const c=g1(),a=p0(),t=new Set;c.beforeEach(()=>{t.clear()}),e.hook("app:chunkError",({error:n})=>{t.add(n)});function r(n){const i="href"in n&&n.href[0]==="#"?a.app.baseURL+n.href:K5(a.app.baseURL,n.fullPath);Tz({path:i,persistState:!0})}e.hook("app:manifest:update",()=>{c.beforeResolve(r)}),c.onError((n,s)=>{t.has(n)&&r(s)})}});function ma(e,c){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);c&&(t=t.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,t)}return a}function j(e){for(var c=1;c<arguments.length;c++){var a=arguments[c]!=null?arguments[c]:{};c%2?ma(Object(a),!0).forEach(function(t){k2(e,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):ma(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}function X6(e){"@babel/helpers - typeof";return X6=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Sym
Line truncated
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DC(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ha=function(){},ie={},cr={},ar=null,tr={mark:ha,measure:ha};try{typeof window<"u"&&(ie=window),typeof document<"u"&&(cr=document),typeof MutationObserver<"u"&&(ar=MutationObserver),typeof performance<"u"&&(tr=performance)}catch{}var FC=ie.navigator||{},pa=FC.userAgent,va=pa===void 0?"":pa,X1=ie,z2=cr,Ha=ar,v6=tr;X1.document;var T1=!!z2.documentElement&&!!z2.head&&typeof z2.addEventListener=="function"&&typeof z2.createElement=="function",rr=~va.indexOf("MSIE")||~va.indexOf("Trident/"),H6,z6,g6,V6,M6,w1="___FONT_AWESOME___",n5=16,nr="fa",sr="svg-inline--fa",h3="data-fa-i2svg",s5="data-fa-pseudo-element",BC="data-fa-pseudo-element-pending",oe="data-prefix",le="data-icon",za="fontawesome-i2svg",IC="async",$C=["HTML","HEAD","STYLE","SCRIPT"],ir=function(){try{return!0}catch{return!1}}(),H2="classic",y2="sharp",fe=[H2,y2];function Y4(e){return new Proxy(e,{get:function(a,t){return t in a?a[t]:a[H2]}})}var E4=Y4((H6={},k2(H6,H2,{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fad:"duotone","fa-duotone":"duotone",fab:"brands","fa-brands":"brands",fak:"kit",fakd:"kit","fa-kit":"kit","fa-kit-duotone":"kit"}),k2(H6,y2,{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light",fast:"thin","fa-thin":"thin"}),H6)),P4=Y4((z6={},k2(z6,H2,{solid:"fas",regular:"far",light:"fal",thin:"fat",duotone:"fad",brands:"fab",kit:"fak"}),k2(z6,y2,{solid:"fass",regular:"fasr",light:"fasl",thin:"fast"}),z6)),R4=Y4((g6={},k2(g6,H2,{fab:"fa-brands",fad:"fa-duotone",fak:"fa-kit",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"}),k2(g6,y2,{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"}),g6)),UC=Y4((V6={},k2(V6,H2,{"fa-brands":"fab","fa-duotone":"fad","fa-kit":"fak","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"}),k2(V6,y2,{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"}),V6)),jC=/fa(s|r|l|t|d|b|k|ss|sr|sl|st)?[\-\ ]/,or="fa-layers-text",WC=/Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp|Kit)?.*/i,qC=Y4((M6={},k2(M6,H2,{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"}),k2(M6,y2,{900:"fass",400:"fasr",300:"fasl",100:"fast"}),M6)),lr=[1,2,3,4,5,6,7,8,9,10],GC=lr.concat([11,12,13,14,15,16,17,18,19,20]),KC=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],s3={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},O4=new Set;Object.keys(P4[H2]).map(O4.add.bind(O4));Object.keys(P4[y2]).map(O4.add.bind(O4));var YC=[].concat(fe,K4(O4),["2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","fw","inverse","layers-counter","layers-text","layers","li","pull-left","pull-right","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul",s3.GROUP,s3.SWAP_OPACITY,s3.PRIMARY,s3.SECONDARY]).concat(lr.map(function(e){return"".concat(e,"x")})).concat(GC.map(function(e){return"w-".concat(e)})),h4=X1.FontAwesomeConfig||{};function XC(e){var c=z2.querySelector("script["+e+"]");if(c)return c.getAttribute(e)}function QC(e){return e===""?!0:e==="false"?!1:e==="true"?!0:e}if(z2&&typeof z2.querySelector=="function"){var JC=[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]];JC.forEach(function(e){var c=se(e,2),a=c[0],t=c[1],r=QC(XC(a));r!=null&&(h4[t]=r)})}var fr={styleDefault:"solid",familyDefault:"classic",cssPrefix:nr,replacementClass:sr,autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};h4.familyPrefix&&(h4.cssPrefix=h4.familyPrefix);var U3=j(j({},fr),h4);U3.autoReplaceSvg||(U3.observeMutations=!1);var K={};Object.keys(fr).forEach(function(e){Object.defineProperty(K,e,{enumerable:!0,set:function(a){U3[e]=a,p4.forEach(function(t){return t(K)})},get:function(){return U3[e]}})});Object.defineProperty(K,"familyPrefix",{enumerable:!0,set:function(c){U3.cssPrefix=c,p4.forEach(function(a){return a(K)})},get:function(){return U3.cssPrefix}});X1.FontAwesomeConfig=K;var p4=[];function ZC(e){return p4.push(e),function(){p4.splice(p4.indexOf(e),1)}}var F1=n5,v1={size:16,x:0
Line truncated
|
||||
--fa-font-solid: normal 900 1em/1 "Font Awesome 6 Solid";
|
||||
--fa-font-regular: normal 400 1em/1 "Font Awesome 6 Regular";
|
||||
--fa-font-light: normal 300 1em/1 "Font Awesome 6 Light";
|
||||
--fa-font-thin: normal 100 1em/1 "Font Awesome 6 Thin";
|
||||
--fa-font-duotone: normal 900 1em/1 "Font Awesome 6 Duotone";
|
||||
--fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 6 Sharp";
|
||||
--fa-font-sharp-regular: normal 400 1em/1 "Font Awesome 6 Sharp";
|
||||
--fa-font-sharp-light: normal 300 1em/1 "Font Awesome 6 Sharp";
|
||||
--fa-font-sharp-thin: normal 100 1em/1 "Font Awesome 6 Sharp";
|
||||
--fa-font-brands: normal 400 1em/1 "Font Awesome 6 Brands";
|
||||
}
|
||||
|
||||
svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
|
||||
overflow: visible;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
.svg-inline--fa {
|
||||
display: var(--fa-display, inline-block);
|
||||
height: 1em;
|
||||
overflow: visible;
|
||||
vertical-align: -0.125em;
|
||||
}
|
||||
.svg-inline--fa.fa-2xs {
|
||||
vertical-align: 0.1em;
|
||||
}
|
||||
.svg-inline--fa.fa-xs {
|
||||
vertical-align: 0em;
|
||||
}
|
||||
.svg-inline--fa.fa-sm {
|
||||
vertical-align: -0.0714285705em;
|
||||
}
|
||||
.svg-inline--fa.fa-lg {
|
||||
vertical-align: -0.2em;
|
||||
}
|
||||
.svg-inline--fa.fa-xl {
|
||||
vertical-align: -0.25em;
|
||||
}
|
||||
.svg-inline--fa.fa-2xl {
|
||||
vertical-align: -0.3125em;
|
||||
}
|
||||
.svg-inline--fa.fa-pull-left {
|
||||
margin-right: var(--fa-pull-margin, 0.3em);
|
||||
width: auto;
|
||||
}
|
||||
.svg-inline--fa.fa-pull-right {
|
||||
margin-left: var(--fa-pull-margin, 0.3em);
|
||||
width: auto;
|
||||
}
|
||||
.svg-inline--fa.fa-li {
|
||||
width: var(--fa-li-width, 2em);
|
||||
top: 0.25em;
|
||||
}
|
||||
.svg-inline--fa.fa-fw {
|
||||
width: var(--fa-fw-width, 1.25em);
|
||||
}
|
||||
|
||||
.fa-layers svg.svg-inline--fa {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
margin: auto;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.fa-layers-counter, .fa-layers-text {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.fa-layers {
|
||||
display: inline-block;
|
||||
height: 1em;
|
||||
position: relative;
|
||||
text-align: center;
|
||||
vertical-align: -0.125em;
|
||||
width: 1em;
|
||||
}
|
||||
.fa-layers svg.svg-inline--fa {
|
||||
-webkit-transform-origin: center center;
|
||||
transform-origin: center center;
|
||||
}
|
||||
|
||||
.fa-layers-text {
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
-webkit-transform: translate(-50%, -50%);
|
||||
transform: translate(-50%, -50%);
|
||||
-webkit-transform-origin: center center;
|
||||
transform-origin: center center;
|
||||
}
|
||||
|
||||
.fa-layers-counter {
|
||||
background-color: var(--fa-counter-background-color, #ff253a);
|
||||
border-radius: var(--fa-counter-border-radius, 1em);
|
||||
box-sizing: border-box;
|
||||
color: var(--fa-inverse, #fff);
|
||||
line-height: var(--fa-counter-line-height, 1);
|
||||
max-width: var(--fa-counter-max-width, 5em);
|
||||
min-width: var(--fa-counter-min-width, 1.5em);
|
||||
overflow: hidden;
|
||||
padding: var(--fa-counter-padding, 0.25em 0.5em);
|
||||
right: var(--fa-right, 0);
|
||||
text-overflow: ellipsis;
|
||||
top: var(--fa-top, 0);
|
||||
-webkit-transform: scale(var(--fa-counter-scale, 0.25));
|
||||
transform: scale(var(--fa-counter-scale, 0.25));
|
||||
-webkit-transform-origin: top right;
|
||||
transform-origin: top right;
|
||||
}
|
||||
|
||||
.fa-layers-bottom-right {
|
||||
bottom: var(--fa-bottom, 0);
|
||||
right: var(--fa-right, 0);
|
||||
top: auto;
|
||||
-webkit-transform: scale(var(--fa-layers-scale, 0.25));
|
||||
transform: scale(var(--fa-layers-scale, 0.25));
|
||||
-webkit-transform-origin: bottom right;
|
||||
transform-origin: bottom right;
|
||||
}
|
||||
|
||||
.fa-layers-bottom-left {
|
||||
bottom: var(--fa-bottom, 0);
|
||||
left: var(--fa-left, 0);
|
||||
right: auto;
|
||||
top: auto;
|
||||
-webkit-transform: scale(var(--fa-layers-scale, 0.25));
|
||||
transform: scale(var(--fa-layers-scale, 0.25));
|
||||
-webkit-transform-origin: bottom left;
|
||||
transform-origin: bottom left;
|
||||
}
|
||||
|
||||
.fa-layers-top-right {
|
||||
top: var(--fa-top, 0);
|
||||
right: var(--fa-right, 0);
|
||||
-webkit-transform: scale(var(--fa-layers-scale, 0.25));
|
||||
transform: scale(var(--fa-layers-scale, 0.25));
|
||||
-webkit-transform-origin: top right;
|
||||
transform-origin: top right;
|
||||
}
|
||||
|
||||
.fa-layers-top-left {
|
||||
left: var(--fa-left, 0);
|
||||
right: auto;
|
||||
top: var(--fa-top, 0);
|
||||
-webkit-transform: scale(var(--fa-layers-scale, 0.25));
|
||||
transform: scale(var(--fa-layers-scale, 0.25));
|
||||
-webkit-transform-origin: top left;
|
||||
transform-origin: top left;
|
||||
}
|
||||
|
||||
.fa-1x {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.fa-2x {
|
||||
font-size: 2em;
|
||||
}
|
||||
|
||||
.fa-3x {
|
||||
font-size: 3em;
|
||||
}
|
||||
|
||||
.fa-4x {
|
||||
font-size: 4em;
|
||||
}
|
||||
|
||||
.fa-5x {
|
||||
font-size: 5em;
|
||||
}
|
||||
|
||||
.fa-6x {
|
||||
font-size: 6em;
|
||||
}
|
||||
|
||||
.fa-7x {
|
||||
font-size: 7em;
|
||||
}
|
||||
|
||||
.fa-8x {
|
||||
font-size: 8em;
|
||||
}
|
||||
|
||||
.fa-9x {
|
||||
font-size: 9em;
|
||||
}
|
||||
|
||||
.fa-10x {
|
||||
font-size: 10em;
|
||||
}
|
||||
|
||||
.fa-2xs {
|
||||
font-size: 0.625em;
|
||||
line-height: 0.1em;
|
||||
vertical-align: 0.225em;
|
||||
}
|
||||
|
||||
.fa-xs {
|
||||
font-size: 0.75em;
|
||||
line-height: 0.0833333337em;
|
||||
vertical-align: 0.125em;
|
||||
}
|
||||
|
||||
.fa-sm {
|
||||
font-size: 0.875em;
|
||||
line-height: 0.0714285718em;
|
||||
vertical-align: 0.0535714295em;
|
||||
}
|
||||
|
||||
.fa-lg {
|
||||
font-size: 1.25em;
|
||||
line-height: 0.05em;
|
||||
vertical-align: -0.075em;
|
||||
}
|
||||
|
||||
.fa-xl {
|
||||
font-size: 1.5em;
|
||||
line-height: 0.0416666682em;
|
||||
vertical-align: -0.125em;
|
||||
}
|
||||
|
||||
.fa-2xl {
|
||||
font-size: 2em;
|
||||
line-height: 0.03125em;
|
||||
vertical-align: -0.1875em;
|
||||
}
|
||||
|
||||
.fa-fw {
|
||||
text-align: center;
|
||||
width: 1.25em;
|
||||
}
|
||||
|
||||
.fa-ul {
|
||||
list-style-type: none;
|
||||
margin-left: var(--fa-li-margin, 2.5em);
|
||||
padding-left: 0;
|
||||
}
|
||||
.fa-ul > li {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.fa-li {
|
||||
left: calc(var(--fa-li-width, 2em) * -1);
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
width: var(--fa-li-width, 2em);
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
.fa-border {
|
||||
border-color: var(--fa-border-color, #eee);
|
||||
border-radius: var(--fa-border-radius, 0.1em);
|
||||
border-style: var(--fa-border-style, solid);
|
||||
border-width: var(--fa-border-width, 0.08em);
|
||||
padding: var(--fa-border-padding, 0.2em 0.25em 0.15em);
|
||||
}
|
||||
|
||||
.fa-pull-left {
|
||||
float: left;
|
||||
margin-right: var(--fa-pull-margin, 0.3em);
|
||||
}
|
||||
|
||||
.fa-pull-right {
|
||||
float: right;
|
||||
margin-left: var(--fa-pull-margin, 0.3em);
|
||||
}
|
||||
|
||||
.fa-beat {
|
||||
-webkit-animation-name: fa-beat;
|
||||
animation-name: fa-beat;
|
||||
-webkit-animation-delay: var(--fa-animation-delay, 0s);
|
||||
animation-delay: var(--fa-animation-delay, 0s);
|
||||
-webkit-animation-direction: var(--fa-animation-direction, normal);
|
||||
animation-direction: var(--fa-animation-direction, normal);
|
||||
-webkit-animation-duration: var(--fa-animation-duration, 1s);
|
||||
animation-duration: var(--fa-animation-duration, 1s);
|
||||
-webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||||
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||||
-webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out);
|
||||
animation-timing-function: var(--fa-animation-timing, ease-in-out);
|
||||
}
|
||||
|
||||
.fa-bounce {
|
||||
-webkit-animation-name: fa-bounce;
|
||||
animation-name: fa-bounce;
|
||||
-webkit-animation-delay: var(--fa-animation-delay, 0s);
|
||||
animation-delay: var(--fa-animation-delay, 0s);
|
||||
-webkit-animation-direction: var(--fa-animation-direction, normal);
|
||||
animation-direction: var(--fa-animation-direction, normal);
|
||||
-webkit-animation-duration: var(--fa-animation-duration, 1s);
|
||||
animation-duration: var(--fa-animation-duration, 1s);
|
||||
-webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||||
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||||
-webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));
|
||||
animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));
|
||||
}
|
||||
|
||||
.fa-fade {
|
||||
-webkit-animation-name: fa-fade;
|
||||
animation-name: fa-fade;
|
||||
-webkit-animation-delay: var(--fa-animation-delay, 0s);
|
||||
animation-delay: var(--fa-animation-delay, 0s);
|
||||
-webkit-animation-direction: var(--fa-animation-direction, normal);
|
||||
animation-direction: var(--fa-animation-direction, normal);
|
||||
-webkit-animation-duration: var(--fa-animation-duration, 1s);
|
||||
animation-duration: var(--fa-animation-duration, 1s);
|
||||
-webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||||
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||||
-webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));
|
||||
animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));
|
||||
}
|
||||
|
||||
.fa-beat-fade {
|
||||
-webkit-animation-name: fa-beat-fade;
|
||||
animation-name: fa-beat-fade;
|
||||
-webkit-animation-delay: var(--fa-animation-delay, 0s);
|
||||
animation-delay: var(--fa-animation-delay, 0s);
|
||||
-webkit-animation-direction: var(--fa-animation-direction, normal);
|
||||
animation-direction: var(--fa-animation-direction, normal);
|
||||
-webkit-animation-duration: var(--fa-animation-duration, 1s);
|
||||
animation-duration: var(--fa-animation-duration, 1s);
|
||||
-webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||||
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||||
-webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));
|
||||
animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));
|
||||
}
|
||||
|
||||
.fa-flip {
|
||||
-webkit-animation-name: fa-flip;
|
||||
animation-name: fa-flip;
|
||||
-webkit-animation-delay: var(--fa-animation-delay, 0s);
|
||||
animation-delay: var(--fa-animation-delay, 0s);
|
||||
-webkit-animation-direction: var(--fa-animation-direction, normal);
|
||||
animation-direction: var(--fa-animation-direction, normal);
|
||||
-webkit-animation-duration: var(--fa-animation-duration, 1s);
|
||||
animation-duration: var(--fa-animation-duration, 1s);
|
||||
-webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||||
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||||
-webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out);
|
||||
animation-timing-function: var(--fa-animation-timing, ease-in-out);
|
||||
}
|
||||
|
||||
.fa-shake {
|
||||
-webkit-animation-name: fa-shake;
|
||||
animation-name: fa-shake;
|
||||
-webkit-animation-delay: var(--fa-animation-delay, 0s);
|
||||
animation-delay: var(--fa-animation-delay, 0s);
|
||||
-webkit-animation-direction: var(--fa-animation-direction, normal);
|
||||
animation-direction: var(--fa-animation-direction, normal);
|
||||
-webkit-animation-duration: var(--fa-animation-duration, 1s);
|
||||
animation-duration: var(--fa-animation-duration, 1s);
|
||||
-webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||||
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||||
-webkit-animation-timing-function: var(--fa-animation-timing, linear);
|
||||
animation-timing-function: var(--fa-animation-timing, linear);
|
||||
}
|
||||
|
||||
.fa-spin {
|
||||
-webkit-animation-name: fa-spin;
|
||||
animation-name: fa-spin;
|
||||
-webkit-animation-delay: var(--fa-animation-delay, 0s);
|
||||
animation-delay: var(--fa-animation-delay, 0s);
|
||||
-webkit-animation-direction: var(--fa-animation-direction, normal);
|
||||
animation-direction: var(--fa-animation-direction, normal);
|
||||
-webkit-animation-duration: var(--fa-animation-duration, 2s);
|
||||
animation-duration: var(--fa-animation-duration, 2s);
|
||||
-webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||||
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||||
-webkit-animation-timing-function: var(--fa-animation-timing, linear);
|
||||
animation-timing-function: var(--fa-animation-timing, linear);
|
||||
}
|
||||
|
||||
.fa-spin-reverse {
|
||||
--fa-animation-direction: reverse;
|
||||
}
|
||||
|
||||
.fa-pulse,
|
||||
.fa-spin-pulse {
|
||||
-webkit-animation-name: fa-spin;
|
||||
animation-name: fa-spin;
|
||||
-webkit-animation-direction: var(--fa-animation-direction, normal);
|
||||
animation-direction: var(--fa-animation-direction, normal);
|
||||
-webkit-animation-duration: var(--fa-animation-duration, 1s);
|
||||
animation-duration: var(--fa-animation-duration, 1s);
|
||||
-webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||||
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||||
-webkit-animation-timing-function: var(--fa-animation-timing, steps(8));
|
||||
animation-timing-function: var(--fa-animation-timing, steps(8));
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.fa-beat,
|
||||
.fa-bounce,
|
||||
.fa-fade,
|
||||
.fa-beat-fade,
|
||||
.fa-flip,
|
||||
.fa-pulse,
|
||||
.fa-shake,
|
||||
.fa-spin,
|
||||
.fa-spin-pulse {
|
||||
-webkit-animation-delay: -1ms;
|
||||
animation-delay: -1ms;
|
||||
-webkit-animation-duration: 1ms;
|
||||
animation-duration: 1ms;
|
||||
-webkit-animation-iteration-count: 1;
|
||||
animation-iteration-count: 1;
|
||||
-webkit-transition-delay: 0s;
|
||||
transition-delay: 0s;
|
||||
-webkit-transition-duration: 0s;
|
||||
transition-duration: 0s;
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes fa-beat {
|
||||
0%, 90% {
|
||||
-webkit-transform: scale(1);
|
||||
transform: scale(1);
|
||||
}
|
||||
45% {
|
||||
-webkit-transform: scale(var(--fa-beat-scale, 1.25));
|
||||
transform: scale(var(--fa-beat-scale, 1.25));
|
||||
}
|
||||
}
|
||||
@keyframes fa-beat {
|
||||
0%, 90% {
|
||||
-webkit-transform: scale(1);
|
||||
transform: scale(1);
|
||||
}
|
||||
45% {
|
||||
-webkit-transform: scale(var(--fa-beat-scale, 1.25));
|
||||
transform: scale(var(--fa-beat-scale, 1.25));
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes fa-bounce {
|
||||
0% {
|
||||
-webkit-transform: scale(1, 1) translateY(0);
|
||||
transform: scale(1, 1) translateY(0);
|
||||
}
|
||||
10% {
|
||||
-webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);
|
||||
transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);
|
||||
}
|
||||
30% {
|
||||
-webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));
|
||||
transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));
|
||||
}
|
||||
50% {
|
||||
-webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);
|
||||
transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);
|
||||
}
|
||||
57% {
|
||||
-webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));
|
||||
transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));
|
||||
}
|
||||
64% {
|
||||
-webkit-transform: scale(1, 1) translateY(0);
|
||||
transform: scale(1, 1) translateY(0);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: scale(1, 1) translateY(0);
|
||||
transform: scale(1, 1) translateY(0);
|
||||
}
|
||||
}
|
||||
@keyframes fa-bounce {
|
||||
0% {
|
||||
-webkit-transform: scale(1, 1) translateY(0);
|
||||
transform: scale(1, 1) translateY(0);
|
||||
}
|
||||
10% {
|
||||
-webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);
|
||||
transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);
|
||||
}
|
||||
30% {
|
||||
-webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));
|
||||
transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));
|
||||
}
|
||||
50% {
|
||||
-webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);
|
||||
transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);
|
||||
}
|
||||
57% {
|
||||
-webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));
|
||||
transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));
|
||||
}
|
||||
64% {
|
||||
-webkit-transform: scale(1, 1) translateY(0);
|
||||
transform: scale(1, 1) translateY(0);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: scale(1, 1) translateY(0);
|
||||
transform: scale(1, 1) translateY(0);
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes fa-fade {
|
||||
50% {
|
||||
opacity: var(--fa-fade-opacity, 0.4);
|
||||
}
|
||||
}
|
||||
@keyframes fa-fade {
|
||||
50% {
|
||||
opacity: var(--fa-fade-opacity, 0.4);
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes fa-beat-fade {
|
||||
0%, 100% {
|
||||
opacity: var(--fa-beat-fade-opacity, 0.4);
|
||||
-webkit-transform: scale(1);
|
||||
transform: scale(1);
|
||||
}
|
||||
50% {
|
||||
opacity: 1;
|
||||
-webkit-transform: scale(var(--fa-beat-fade-scale, 1.125));
|
||||
transform: scale(var(--fa-beat-fade-scale, 1.125));
|
||||
}
|
||||
}
|
||||
@keyframes fa-beat-fade {
|
||||
0%, 100% {
|
||||
opacity: var(--fa-beat-fade-opacity, 0.4);
|
||||
-webkit-transform: scale(1);
|
||||
transform: scale(1);
|
||||
}
|
||||
50% {
|
||||
opacity: 1;
|
||||
-webkit-transform: scale(var(--fa-beat-fade-scale, 1.125));
|
||||
transform: scale(var(--fa-beat-fade-scale, 1.125));
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes fa-flip {
|
||||
50% {
|
||||
-webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));
|
||||
transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));
|
||||
}
|
||||
}
|
||||
@keyframes fa-flip {
|
||||
50% {
|
||||
-webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));
|
||||
transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes fa-shake {
|
||||
0% {
|
||||
-webkit-transform: rotate(-15deg);
|
||||
transform: rotate(-15deg);
|
||||
}
|
||||
4% {
|
||||
-webkit-transform: rotate(15deg);
|
||||
transform: rotate(15deg);
|
||||
}
|
||||
8%, 24% {
|
||||
-webkit-transform: rotate(-18deg);
|
||||
transform: rotate(-18deg);
|
||||
}
|
||||
12%, 28% {
|
||||
-webkit-transform: rotate(18deg);
|
||||
transform: rotate(18deg);
|
||||
}
|
||||
16% {
|
||||
-webkit-transform: rotate(-22deg);
|
||||
transform: rotate(-22deg);
|
||||
}
|
||||
20% {
|
||||
-webkit-transform: rotate(22deg);
|
||||
transform: rotate(22deg);
|
||||
}
|
||||
32% {
|
||||
-webkit-transform: rotate(-12deg);
|
||||
transform: rotate(-12deg);
|
||||
}
|
||||
36% {
|
||||
-webkit-transform: rotate(12deg);
|
||||
transform: rotate(12deg);
|
||||
}
|
||||
40%, 100% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
}
|
||||
@keyframes fa-shake {
|
||||
0% {
|
||||
-webkit-transform: rotate(-15deg);
|
||||
transform: rotate(-15deg);
|
||||
}
|
||||
4% {
|
||||
-webkit-transform: rotate(15deg);
|
||||
transform: rotate(15deg);
|
||||
}
|
||||
8%, 24% {
|
||||
-webkit-transform: rotate(-18deg);
|
||||
transform: rotate(-18deg);
|
||||
}
|
||||
12%, 28% {
|
||||
-webkit-transform: rotate(18deg);
|
||||
transform: rotate(18deg);
|
||||
}
|
||||
16% {
|
||||
-webkit-transform: rotate(-22deg);
|
||||
transform: rotate(-22deg);
|
||||
}
|
||||
20% {
|
||||
-webkit-transform: rotate(22deg);
|
||||
transform: rotate(22deg);
|
||||
}
|
||||
32% {
|
||||
-webkit-transform: rotate(-12deg);
|
||||
transform: rotate(-12deg);
|
||||
}
|
||||
36% {
|
||||
-webkit-transform: rotate(12deg);
|
||||
transform: rotate(12deg);
|
||||
}
|
||||
40%, 100% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes fa-spin {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
@keyframes fa-spin {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
.fa-rotate-90 {
|
||||
-webkit-transform: rotate(90deg);
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
.fa-rotate-180 {
|
||||
-webkit-transform: rotate(180deg);
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
.fa-rotate-270 {
|
||||
-webkit-transform: rotate(270deg);
|
||||
transform: rotate(270deg);
|
||||
}
|
||||
|
||||
.fa-flip-horizontal {
|
||||
-webkit-transform: scale(-1, 1);
|
||||
transform: scale(-1, 1);
|
||||
}
|
||||
|
||||
.fa-flip-vertical {
|
||||
-webkit-transform: scale(1, -1);
|
||||
transform: scale(1, -1);
|
||||
}
|
||||
|
||||
.fa-flip-both,
|
||||
.fa-flip-horizontal.fa-flip-vertical {
|
||||
-webkit-transform: scale(-1, -1);
|
||||
transform: scale(-1, -1);
|
||||
}
|
||||
|
||||
.fa-rotate-by {
|
||||
-webkit-transform: rotate(var(--fa-rotate-angle, 0));
|
||||
transform: rotate(var(--fa-rotate-angle, 0));
|
||||
}
|
||||
|
||||
.fa-stack {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
height: 2em;
|
||||
position: relative;
|
||||
width: 2.5em;
|
||||
}
|
||||
|
||||
.fa-stack-1x,
|
||||
.fa-stack-2x {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
margin: auto;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
z-index: var(--fa-stack-z-index, auto);
|
||||
}
|
||||
|
||||
.svg-inline--fa.fa-stack-1x {
|
||||
height: 1em;
|
||||
width: 1.25em;
|
||||
}
|
||||
.svg-inline--fa.fa-stack-2x {
|
||||
height: 2em;
|
||||
width: 2.5em;
|
||||
}
|
||||
|
||||
.fa-inverse {
|
||||
color: var(--fa-inverse, #fff);
|
||||
}
|
||||
|
||||
.sr-only,
|
||||
.fa-sr-only {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
padding: 0;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
white-space: nowrap;
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
.sr-only-focusable:not(:focus),
|
||||
.fa-sr-only-focusable:not(:focus) {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
padding: 0;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
white-space: nowrap;
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
.svg-inline--fa .fa-primary {
|
||||
fill: var(--fa-primary-color, currentColor);
|
||||
opacity: var(--fa-primary-opacity, 1);
|
||||
}
|
||||
|
||||
.svg-inline--fa .fa-secondary {
|
||||
fill: var(--fa-secondary-color, currentColor);
|
||||
opacity: var(--fa-secondary-opacity, 0.4);
|
||||
}
|
||||
|
||||
.svg-inline--fa.fa-swap-opacity .fa-primary {
|
||||
opacity: var(--fa-secondary-opacity, 0.4);
|
||||
}
|
||||
|
||||
.svg-inline--fa.fa-swap-opacity .fa-secondary {
|
||||
opacity: var(--fa-primary-opacity, 1);
|
||||
}
|
||||
|
||||
.svg-inline--fa mask .fa-primary,
|
||||
.svg-inline--fa mask .fa-secondary {
|
||||
fill: black;
|
||||
}
|
||||
|
||||
.fad.fa-inverse,
|
||||
.fa-duotone.fa-inverse {
|
||||
color: var(--fa-inverse, #fff);
|
||||
}`;function mr(){var e=nr,c=sr,a=K.cssPrefix,t=K.replacementClass,r=nL;if(a!==e||t!==c){var n=new RegExp("\\.".concat(e,"\\-"),"g"),s=new RegExp("\\--".concat(e,"\\-"),"g"),i=new RegExp("\\.".concat(c),"g");r=r.replace(n,".".concat(a,"-")).replace(s,"--".concat(a,"-")).replace(i,".".concat(t))}return r}var ga=!1;function d8(){K.autoAddCss&&!ga&&(eL(mr()),ga=!0)}var sL={mixout:function(){return{dom:{css:mr,insertCss:d8}}},hooks:function(){return{beforeDOMElementCreation:function(){d8()},beforeI2svg:function(){d8()}}}},_1=X1||{};_1[w1]||(_1[w1]={});_1[w1].styles||(_1[w1].styles={});_1[w1].hooks||(_1[w1].hooks={});_1[w1].shims||(_1[w1].shims=[]);var o1=_1[w1],dr=[],iL=function e(){z2.removeEventListener("DOMContentLoaded",e),Q6=1,dr.map(function(c){return c()})},Q6=!1;T1&&(Q6=(z2.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(z2.readyState),Q6||z2.addEventListener("DOMContentLoaded",iL));function oL(e){T1&&(Q6?setTimeout(e,0):dr.push(e))}function X4(e){var c=e.tag,a=e.attributes,t=a===void 0?{}:a,r=e.children,n=r===void 0?[]:r;return typeof e=="string"?ur(e):"<".concat(c," ").concat(aL(t),">").concat(n.map(X4).join(""),"</").concat(c,">")}function Va(e,c,a){if(e&&e[c]&&e[c][a])return{prefix:c,iconName:a,icon:e[c][a]}}var lL=function(c,a){return function(t,r,n,s){return c.call(a,t,r,n,s)}},h8=function(c,a,t,r){var n=Object.keys(c),s=n.length,i=r!==void 0?lL(a,r):a,o,f,l;for(t===void 0?(o=1,l=c[n[0]]):(o=0,l=t);o<s;o++)f=n[o],l=i(l,c[f],f,c);return l};function fL(e){for(var c=[],a=0,t=e.length;a<t;){var r=e.charCodeAt(a++);if(r>=55296&&r<=56319&&a<t){var n=e.charCodeAt(a++);(n&64512)==56320?c.push(((r&1023)<<10)+(n&1023)+65536):(c.push(r),a--)}else c.push(r)}return c}function i5(e){var c=fL(e);return c.length===1?c[0].toString(16):null}function uL(e,c){var a=e.length,t=e.charCodeAt(c),r;return t>=55296&&t<=56319&&a>c+1&&(r=e.charCodeAt(c+1),r>=56320&&r<=57343)?(t-55296)*1024+r-56320+65536:t}function Ma(e){return Object.keys(e).reduce(function(c,a){var t=e[a],r=!!t.icon;return r?c[t.iconName]=t.icon:c[a]=t,c},{})}function o5(e,c){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},t=a.skipHooks,r=t===void 0?!1:t,n=Ma(c);typeof o1.hooks.addPack=="function"&&!r?o1.hooks.addPack(e,Ma(c)):o1.styles[e]=j(j({},o1.styles[e]||{}),n),e==="fas"&&o5("fa",c)}var C6,L6,y6,x3=o1.styles,mL=o1.shims,dL=(C6={},k2(C6,H2,Object.values(R4[H2])),k2(C6,y2,Object.values(R4[y2])),C6),de=null,hr={},pr={},vr={},Hr={},zr={},hL=(L6={},k2(L6,H2,Object.keys(E4[H2])),k2(L6,y2,Object.keys(E4[y2])),L6);function pL(e){return~YC.indexOf(e)}function vL(e,c){var a=c.split("-"),t=a[0],r=a.slice(1).join("-");return t===e&&r!==""&&!pL(r)?r:null}var gr=function(){var c=function(n){return h8(x3,function(s,i,o){return s[o]=h8(i,n,{}),s},{})};hr=c(function(r,n,s){if(n[3]&&(r[n[3]]=s),n[2]){var i=n[2].filter(function(o){return typeof o=="number"});i.forEach(function(o){r[o.toString(16)]=s})}return r}),pr=c(function(r,n,s){if(r[s]=s,n[2]){var i=n[2].filter(function(o){return typeof o=="string"});i.forEach(function(o){r[o]=s})}return r}),zr=c(function(r,n,s){var i=n[2];return r[s]=s,i.forEach(function(o){r[o]=s}),r});var a="far"in x3||K.autoFetchSvg,t=h8(mL,function(r,n){var s=n[0],i=n[1],o=n[2];return i==="far"&&!a&&(i="fas"),typeof s=="string"&&(r.names[s]={prefix:i,iconName:o}),typeof s=="number"&&(r.unicodes[s.toString(16)]={prefix:i,iconName:o}),r},{names:{},unicodes:{}});vr=t.names,Hr=t.unicodes,de=C0(K.styleDefault,{family:K.familyDefault})};ZC(function(e){de=C0(e.styleDefault,{family:K.familyDefault})});gr();function he(e,c){return(hr[e]||{})[c]}function HL(e,c){return(pr[e]||{})[c]}function i3(e,c){return(zr[e]||{})[c]}function Vr(e){return vr[e]||{prefix:null,iconName:null}}function zL(e){var c=Hr[e],a=he("fas",e);return c||(a?{prefix:"fas",iconName:a}:null)||{prefix:null,iconName:null}}function Q1(){return de}var pe=function(){return{prefix:null,iconName:null,rest:[]}};function C0(e){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=c.family,t=a===void 0?H2:a,r=E4[t][e],n=P4[t][e]||P4[t][r],s=e in o1.styles?e:null;return n||s||null}var Ca=(y6={},k2(y6,H2,Object.keys(R4[H2])),k2(y6,y2,Object.keys(R4[y2])),y6);function L0(e){var c,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=a.skipLookups,r=t===void 0?!1:t,n=(c={},k2(c,H2,"".concat(K.cssPrefix,"-").concat(H2)),k2(c,y2,"".concat(K.cssPrefix,"-").concat(y2)),c),s=null,i=H2;(e.includes(n[H2])||e.some(function(f){return Ca[H2].includes(f)}))&&(i=H2),(e.includes(n[y2])||e.some(function(f){return Ca[y2].includes(f)}))&&(i=y2);var o=e.reduce(function(f,l){var u=vL(K.cssPrefix,l);if(x3[l]?(l=dL[i].includes(l)?UC[i][l]:l,s=l,f.prefix=l):hL[i].indexOf(l)>-1?(s=l,f.prefix=C0(l,{family:i})):u?f.iconName=u:l!==K.replacementClass&&l!==n[H2]&&l!==n[y2]&&f.rest.push(l),!r&&f.prefix&&f.iconName){var m=s==="fa"?Vr(f.iconName):{},d=i3(f.prefix,f.iconName);m.prefix&&(s=null),f.iconName=m.iconName||d||f.iconName,f.prefix=m.prefix||f.prefix,f.prefix==="far"&&!x3.f
Line truncated
|
||||
`);a.setAttribute(h3,""),a.innerHTML=s}};function Sa(e){e()}function yr(e,c){var a=typeof c=="function"?c:k6;if(e.length===0)a();else{var t=Sa;K.mutateApproach===IC&&(t=X1.requestAnimationFrame||Sa),t(function(){var r=EL(),n=He.begin("mutate");e.map(r),n(),a()})}}var ze=!1;function br(){ze=!0}function h5(){ze=!1}var J6=null;function wa(e){if(Ha&&K.observeMutations){var c=e.treeCallback,a=c===void 0?k6:c,t=e.nodeCallback,r=t===void 0?k6:t,n=e.pseudoElementsCallback,s=n===void 0?k6:n,i=e.observeMutationsRoot,o=i===void 0?z2:i;J6=new Ha(function(f){if(!ze){var l=Q1();G3(f).forEach(function(u){if(u.type==="childList"&&u.addedNodes.length>0&&!xa(u.addedNodes[0])&&(K.searchPseudoElements&&s(u.target),a(u.target)),u.type==="attributes"&&u.target.parentNode&&K.searchPseudoElements&&s(u.target.parentNode),u.type==="attributes"&&xa(u.target)&&~KC.indexOf(u.attributeName))if(u.attributeName==="class"&&kL(u.target)){var m=L0(ue(u.target)),d=m.prefix,z=m.iconName;u.target.setAttribute(oe,d||l),z&&u.target.setAttribute(le,z)}else TL(u.target)&&r(u.target)})}}),T1&&J6.observe(o,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function DL(){J6&&J6.disconnect()}function FL(e){var c=e.getAttribute("style"),a=[];return c&&(a=c.split(";").reduce(function(t,r){var n=r.split(":"),s=n[0],i=n.slice(1);return s&&i.length>0&&(t[s]=i.join(":").trim()),t},{})),a}function BL(e){var c=e.getAttribute("data-prefix"),a=e.getAttribute("data-icon"),t=e.innerText!==void 0?e.innerText.trim():"",r=L0(ue(e));return r.prefix||(r.prefix=Q1()),c&&a&&(r.prefix=c,r.iconName=a),r.iconName&&r.prefix||(r.prefix&&t.length>0&&(r.iconName=HL(r.prefix,e.innerText)||he(r.prefix,i5(e.innerText))),!r.iconName&&K.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(r.iconName=e.firstChild.data)),r}function IL(e){var c=G3(e.attributes).reduce(function(r,n){return r.name!=="class"&&r.name!=="style"&&(r[n.name]=n.value),r},{}),a=e.getAttribute("title"),t=e.getAttribute("data-fa-title-id");return K.autoA11y&&(a?c["aria-labelledby"]="".concat(K.replacementClass,"-title-").concat(t||D4()):(c["aria-hidden"]="true",c.focusable="false")),c}function $L(){return{iconName:null,title:null,titleId:null,prefix:null,transform:v1,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function _a(e){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},a=BL(e),t=a.iconName,r=a.prefix,n=a.rest,s=IL(e),i=l5("parseNodeAttributes",{},e),o=c.styleParser?FL(e):[];return j({iconName:t,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:r,transform:v1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:n,styles:o,attributes:s}},i)}var UL=o1.styles;function xr(e){var c=K.autoReplaceSvg==="nest"?_a(e,{styleParser:!1}):_a(e);return~c.extra.classes.indexOf(or)?N1("generateLayersText",e,c):N1("generateSvgReplacementMutation",e,c)}var J1=new Set;fe.map(function(e){J1.add("fa-".concat(e))});Object.keys(E4[H2]).map(J1.add.bind(J1));Object.keys(E4[y2]).map(J1.add.bind(J1));J1=K4(J1);function Na(e){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!T1)return Promise.resolve();var a=z2.documentElement.classList,t=function(u){return a.add("".concat(za,"-").concat(u))},r=function(u){return a.remove("".concat(za,"-").concat(u))},n=K.autoFetchSvg?J1:fe.map(function(l){return"fa-".concat(l)}).concat(Object.keys(UL));n.includes("fa")||n.push("fa");var s=[".".concat(or,":not([").concat(h3,"])")].concat(n.map(function(l){return".".concat(l,":not([").concat(h3,"])")})).join(", ");if(s.length===0)return Promise.resolve();var i=[];try{i=G3(e.querySelectorAll(s))}catch{}if(i.length>0)t("pending"),r("complete");else return Promise.resolve();var o=He.begin("onTree"),f=i.reduce(function(l,u){try{var m=xr(u);m&&l.push(m)}catch(d){ir||d.name==="MissingIcon"&&console.error(d)}return l},[]);return new Promise(function(l,u){Promise.all(f).then(function(m){yr(m,function(){t("active"),t("complete"),r("pending"),typeof c=="function"&&c(),o(),l()})}).catch(function(m){o(),u(m)})})}function jL(e){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;xr(e).then(function(a){a&&yr([a],c)})}function WL(e){return function(c){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=(c||{}).icon?c:f5(c||{}),r=a.mask;return r&&(r=(r||{}).icon?r:f5(r||{})),e(t,j(j({},a),{},{mask:r}))}}var qL=function(c){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=a.transform,r=t===void 0?v1:t,n=a.symbol,s=n===void 0?!1:n,i=a.mask,o=i===void 0?null:i,f=a.maskId,l=f===void 0?null:f,u=a.title,m=u===void 0?null:u,d=a.titleId,z=d===void 0?null:d,M=a.classes,L=M===void 0?[]:M,g=a.attributes,p=g===void 0?{}:g,H=a.styles,V=H===void 0?{}:H;if(c){var C=c.prefix,y=c.iconName,N=c.icon;return y0(j({type:"icon"},c),function(){return p3("beforeDOMElementCreation",{iconDefinition:c,params:a}),K.autoA11y&&(m?p["aria-labelledby"]="".concat(K.replacem
Line truncated
|
||||
`),e.removeAttribute(a),t()}).catch(r)}else t()}else t()})}function ZL(e){return Promise.all([ka(e,"::before"),ka(e,"::after")])}function ey(e){return e.parentNode!==document.head&&!~$C.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(s5)&&(!e.parentNode||e.parentNode.tagName!=="svg")}function Ta(e){if(T1)return new Promise(function(c,a){var t=G3(e.querySelectorAll("*")).filter(ey).map(ZL),r=He.begin("searchPseudoElements");br(),Promise.all(t).then(function(){r(),h5(),c()}).catch(function(){r(),h5(),a()})})}var cy={hooks:function(){return{mutationObserverCallbacks:function(a){return a.pseudoElementsCallback=Ta,a}}},provides:function(c){c.pseudoElements2svg=function(a){var t=a.node,r=t===void 0?z2:t;K.searchPseudoElements&&Ta(r)}}},Ea=!1,ay={mixout:function(){return{dom:{unwatch:function(){br(),Ea=!0}}}},hooks:function(){return{bootstrap:function(){wa(l5("mutationObserverCallbacks",{}))},noAuto:function(){DL()},watch:function(a){var t=a.observeMutationsRoot;Ea?h5():wa(l5("mutationObserverCallbacks",{observeMutationsRoot:t}))}}}},Pa=function(c){var a={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return c.toLowerCase().split(" ").reduce(function(t,r){var n=r.toLowerCase().split("-"),s=n[0],i=n.slice(1).join("-");if(s&&i==="h")return t.flipX=!0,t;if(s&&i==="v")return t.flipY=!0,t;if(i=parseFloat(i),isNaN(i))return t;switch(s){case"grow":t.size=t.size+i;break;case"shrink":t.size=t.size-i;break;case"left":t.x=t.x-i;break;case"right":t.x=t.x+i;break;case"up":t.y=t.y-i;break;case"down":t.y=t.y+i;break;case"rotate":t.rotate=t.rotate+i;break}return t},a)},ty={mixout:function(){return{parse:{transform:function(a){return Pa(a)}}}},hooks:function(){return{parseNodeAttributes:function(a,t){var r=t.getAttribute("data-fa-transform");return r&&(a.transform=Pa(r)),a}}},provides:function(c){c.generateAbstractTransformGrouping=function(a){var t=a.main,r=a.transform,n=a.containerWidth,s=a.iconWidth,i={transform:"translate(".concat(n/2," 256)")},o="translate(".concat(r.x*32,", ").concat(r.y*32,") "),f="scale(".concat(r.size/16*(r.flipX?-1:1),", ").concat(r.size/16*(r.flipY?-1:1),") "),l="rotate(".concat(r.rotate," 0 0)"),u={transform:"".concat(o," ").concat(f," ").concat(l)},m={transform:"translate(".concat(s/2*-1," -256)")},d={outer:i,inner:u,path:m};return{tag:"g",attributes:j({},d.outer),children:[{tag:"g",attributes:j({},d.inner),children:[{tag:t.icon.tag,children:t.icon.children,attributes:j(j({},t.icon.attributes),d.path)}]}]}}}},v8={x:0,y:0,width:"100%",height:"100%"};function Ra(e){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.attributes&&(e.attributes.fill||c)&&(e.attributes.fill="black"),e}function ry(e){return e.tag==="g"?e.children:[e]}var ny={hooks:function(){return{parseNodeAttributes:function(a,t){var r=t.getAttribute("data-fa-mask"),n=r?L0(r.split(" ").map(function(s){return s.trim()})):pe();return n.prefix||(n.prefix=Q1()),a.mask=n,a.maskId=t.getAttribute("data-fa-mask-id"),a}}},provides:function(c){c.generateAbstractMask=function(a){var t=a.children,r=a.attributes,n=a.main,s=a.mask,i=a.maskId,o=a.transform,f=n.width,l=n.icon,u=s.width,m=s.icon,d=tL({transform:o,containerWidth:u,iconWidth:f}),z={tag:"rect",attributes:j(j({},v8),{},{fill:"white"})},M=l.children?{children:l.children.map(Ra)}:{},L={tag:"g",attributes:j({},d.inner),children:[Ra(j({tag:l.tag,attributes:j(j({},l.attributes),d.path)},M))]},g={tag:"g",attributes:j({},d.outer),children:[L]},p="mask-".concat(i||D4()),H="clip-".concat(i||D4()),V={tag:"mask",attributes:j(j({},v8),{},{id:p,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[z,g]},C={tag:"defs",children:[{tag:"clipPath",attributes:{id:H},children:ry(m)},V]};return t.push(C,{tag:"rect",attributes:j({fill:"currentColor","clip-path":"url(#".concat(H,")"),mask:"url(#".concat(p,")")},v8)}),{children:t,attributes:r}}}},sy={provides:function(c){var a=!1;X1.matchMedia&&(a=X1.matchMedia("(prefers-reduced-motion: reduce)").matches),c.missingIconAbstract=function(){var t=[],r={fill:"currentColor"},n={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};t.push({tag:"path",attributes:j(j({},r),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66
Line truncated
|
||||
`).splice(1).map(u=>({text:u.replace("webpack:/","").replace(".vue",".js").trim(),internal:u.includes("node_modules")&&!u.includes(".cache")||u.includes("internal")||u.includes("new Promise")})).map(u=>`<span class="stack${u.internal?" internal":""}">${u.text}</span>`).join(`
|
||||
`);const t=Number(a.statusCode||500),r=t===404,n=a.statusMessage??(r?"Page Not Found":"Internal Server Error"),s=a.message||a.toString(),i=void 0,l=r?E(()=>_(()=>import("./BM2bI9TQ.js"),__vite__mapDeps([143,144,145]),import.meta.url).then(u=>u.default||u)):E(()=>_(()=>import("./XXfu_ZYX.js"),__vite__mapDeps([146,144,147]),import.meta.url).then(u=>u.default||u));return(u,m)=>(p1(),C1(v2(l),vm(j9({statusCode:v2(t),statusMessage:v2(n),description:v2(s),stack:v2(i)})),null,16))}},Fa={__name:"nuxt-root",setup(e){const c=()=>null,a=b2(),t=a.deferHydration();if(a.isHydrating){const i=a.hooks.hookOnce("app:error",t);g1().beforeEach(i)}const r=!1;u3(q4,Q5()),a.hooks.callHookWith(i=>i.map(o=>o()),"vue:setup");const n=v0();S9((i,o,f)=>{if(a.hooks.callHook("vue:error",i,o,f).catch(l=>console.error("[nuxt] Error in `vue:error` hook",l)),sv(i)&&(i.fatal||i.unhandled))return a.runWithContext(()=>b3(i)),!1});const s=!1;return(i,o)=>(p1(),C1(P5,{onResolve:v2(t)},{default:A5(()=>[v2(n)?(p1(),C1(v2(uJ),{key:0,error:v2(n)},null,8,["error"])):v2(s)?(p1(),C1(v2(c),{key:1,context:v2(s)},null,8,["context"])):v2(r)?(p1(),C1(nd(v2(r)),{key:2})):(p1(),C1(v2(fJ),{key:3}))]),_:1},8,["onResolve"]))}};let Ba;{let e;Ba=async function(){var s,i;if(e)return e;const t=!!((s=window.__NUXT__)!=null&&s.serverRendered||((i=document.getElementById("__NUXT_DATA__"))==null?void 0:i.dataset.ssr)==="true")?Fh(Fa):Dh(Fa),r=Wp({vueApp:t});async function n(o){await r.callHook("app:error",o),r.payload.error=r.payload.error||H0(o)}t.config.errorHandler=n;try{await Gp(r,JQ)}catch(o){n(o)}try{await r.hooks.callHook("app:created",t),await r.hooks.callHook("app:beforeMount",t),t.mount(cH),await r.hooks.callHook("app:mounted",t),await e3()}catch(o){n(o)}return t.config.errorHandler===n&&(t.config.errorHandler=void 0),t},e=Ba().catch(c=>{throw console.error("Error while mounting app:",c),c})}export{zJ as $,A5 as A,W9 as B,dJ as C,hJ as D,EJ as E,HJ as F,x1 as G,Md as H,Vd as I,$8 as J,q3 as K,Ld as L,v2 as M,F2 as N,xJ as O,C1 as P,gJ as Q,SJ as R,WJ as S,OJ as T,BJ as U,R2 as V,t0 as W,LJ as X,MJ as Y,vJ as Z,iJ as _,Wt as a,qJ as a0,VJ as a1,$J as a2,N4 as a3,n2 as a4,e4 as a5,U7 as a6,T as a7,BV as a8,fC as a9,qm as aA,jJ as aB,cC as aC,a0 as aD,_J as aE,Y7 as aF,_ as aG,p6 as aH,dz as aI,W5 as aa,nd as ab,d0 as ac,wJ as ad,vm as ae,j9 as af,kJ as ag,UJ as ah,NJ as ai,AJ as aj,RJ as ak,H4 as al,m9 as am,x9 as an,Vm as ao,H0 as ap,Xa as aq,FJ as ar,z1 as as,CM as at,K7 as au,zC as av,IJ as aw,re as ax,yJ as ay,CJ as az,P7 as b,N2 as c,A1 as d,F5 as e,DJ as f,W2 as g,z3 as h,pJ as i,K5 as j,ap as k,p0 as l,b2 as m,PJ as n,f0 as o,h0 as p,TJ as q,j2 as r,G5 as s,p1 as t,g1 as u,bJ as v,P8 as w,U9 as x,mJ as y,L2 as z};
|
||||
@@ -1,2 +0,0 @@
|
||||
import{t as o,v as p,aa as l,x as y,a3 as J,a5 as X,a6 as T,a4 as c,a7 as a,a8 as $,ah as _,a9 as ee,i as w,Z as te,Y as h,B as P,y as O,P as v,ab as A,W as x,O as I,z as B,A as K,ac as ie,a1 as ne,N as H,Q as re,$ as se}from"./B2dNgubA.js";import{s as le}from"./DrH3nAaK.js";import{s as oe}from"./6cfzVo_A.js";import{s as ae}from"./DOdOkukQ.js";import{s as ue}from"./DYQvr4NZ.js";import{s as de}from"./9oaCfz9_.js";import{s as ce}from"./DJX-FvDU.js";import{O as pe}from"./Ct7v4Wor.js";import{s as fe}from"./Bg6qFPWQ.js";import he from"./Cd7enQUr.js";import{s as ye}from"./DPnCzJas.js";var z={name:"BlankIcon",extends:le},be=y("rect",{width:"1",height:"1",fill:"currentColor","fill-opacity":"0"},null,-1),me=[be];function ge(t,e,i,r,s,n){return o(),p("svg",l({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),me,16)}z.render=ge;var Oe={root:function(e){var i=e.instance,r=e.props,s=e.state;return["p-dropdown p-component p-inputwrapper",{"p-disabled":r.disabled,"p-invalid":r.invalid,"p-variant-filled":r.variant?r.variant==="filled":i.$primevue.config.inputStyle==="filled","p-dropdown-clearable":r.showClear,"p-focus":s.focused,"p-inputwrapper-filled":i.hasSelectedOption,"p-inputwrapper-focus":s.focused||s.overlayVisible,"p-overlay-open":s.overlayVisible}]},input:function(e){var i,r=e.instance,s=e.props;return["p-dropdown-label p-inputtext",{"p-placeholder":!s.editable&&r.label===s.placeholder,"p-dropdown-label-empty":!s.editable&&!r.$slots.value&&(r.label==="p-emptylabel"||((i=r.label)===null||i===void 0?void 0:i.length)===0)}]},clearIcon:"p-dropdown-clear-icon",trigger:"p-dropdown-trigger",loadingicon:"p-dropdown-trigger-icon",dropdownIcon:"p-dropdown-trigger-icon",panel:function(e){e.props;var i=e.instance;return["p-dropdown-panel p-component",{"p-ripple-disabled":i.$primevue.config.ripple===!1}]},header:"p-dropdown-header",filterContainer:"p-dropdown-filter-container",filterInput:function(e){var i=e.props,r=e.instance;return["p-dropdown-filter p-inputtext p-component",{"p-variant-filled":i.variant?i.variant==="filled":r.$primevue.config.inputStyle==="filled"}]},filterIcon:"p-dropdown-filter-icon",wrapper:"p-dropdown-items-wrapper",list:"p-dropdown-items",itemGroup:"p-dropdown-item-group",itemGroupLabel:"p-dropdown-item-group-label",item:function(e){var i=e.instance,r=e.props,s=e.state,n=e.option,d=e.focusedOption;return["p-dropdown-item",{"p-highlight":i.isSelected(n)&&r.highlightOnSelect,"p-focus":s.focusedOptionIndex===d,"p-disabled":i.isOptionDisabled(n)}]},itemLabel:"p-dropdown-item-label",checkIcon:"p-dropdown-check-icon",blankIcon:"p-dropdown-blank-icon",emptyMessage:"p-dropdown-empty-message"},ve=J.extend({name:"dropdown",classes:Oe}),Ie={name:"BaseDropdown",extends:ye,props:{modelValue:null,options:Array,optionLabel:[String,Function],optionValue:[String,Function],optionDisabled:[String,Function],optionGroupLabel:[String,Function],optionGroupChildren:[String,Function],scrollHeight:{type:String,default:"200px"},filter:Boolean,filterPlaceholder:String,filterLocale:String,filterMatchMode:{type:String,default:"contains"},filterFields:{type:Array,default:null},editable:Boolean,placeholder:{type:String,default:null},variant:{type:String,default:null},invalid:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},dataKey:null,showClear:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},panelClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},panelProps:{type:null,default:null},filterInputProps:{type:null,default:null},clearIconProps:{type:null,default:null},appendTo:{type:[String,Object],default:"body"},loading:{type:Boolean,default:!1},clearIcon:{type:String,default:void 0},dropdownIcon:{type:String,default:void 0},filterIcon:{type:String,default:void 0},loadingIcon:{type:String,default:void 0},resetFilterOnHide:{type:Boolean,default:!1},resetFilterOnClear:{type:Boolean,default:!1},virtualScrollerOptions:{type:Object,default:null},autoOptionFocus:{type:Boolean,default:!1},autoFilterFocus:{type:Boolean,default:!1},selectOnFocus:{type:Boolean,default:!1},focusOnHover:{type:Boolean,default:!0},highlightOnSelect:{type:Boolean,default:!0},checkmark:{type:Boolean,default:!1},filterMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptyFilterMessage:{type:String,default:null},emptyMessage:{type:String,default:null},tabindex:{type:Number,default:0},ariaLabel:{type:String,default:null},ariaLabelledby:{type:String,default:null}},style:ve,provide:function(){return{$parentInstance:this}}};function L(t){"@babel/helpers - typeof";return L=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},L(t)}Line truncated
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Le(t,e){if(t){if(typeof t=="string")return j(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set")return Array.from(t);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return j(t,e)}}function ke(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Fe(t){if(Array.isArray(t))return j(t)}function j(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,r=new Array(e);i<e;i++)r[i]=t[i];return r}function G(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),i.push.apply(i,r)}return i}function R(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?G(Object(i),!0).forEach(function(r){N(t,r,i[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):G(Object(i)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))})}return t}function N(t,e,i){return e=Ce(e),e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function Ce(t){var e=Ve(t,"string");return L(e)=="symbol"?e:String(e)}function Ve(t,e){if(L(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var r=i.call(t,e||"default");if(L(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var xe={name:"Dropdown",extends:Ie,inheritAttrs:!1,emits:["update:modelValue","change","focus","blur","before-show","before-hide","show","hide","filter"],outsideClickListener:null,scrollHandler:null,resizeListener:null,labelClickListener:null,overlay:null,list:null,virtualScroller:null,searchTimeout:null,searchValue:null,isModelValueChanged:!1,data:function(){return{id:this.$attrs.id,clicked:!1,focused:!1,focusedOptionIndex:-1,filterValue:null,overlayVisible:!1}},watch:{"$attrs.id":{immediate:!0,handler:function(e){this.id=e||X()}},modelValue:function(){this.isModelValueChanged=!0},options:function(){this.autoUpdateModel()}},mounted:function(){this.autoUpdateModel(),this.bindLabelClickListener()},updated:function(){this.overlayVisible&&this.isModelValueChanged&&this.scrollInView(this.findSelectedOptionIndex()),this.isModelValueChanged=!1},beforeUnmount:function(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.unbindLabelClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(T.clear(this.overlay),this.overlay=null)},methods:{getOptionIndex:function(e,i){return this.virtualScrollerDisabled?e:i&&i(e).index},getOptionLabel:function(e){return this.optionLabel?c.resolveFieldData(e,this.optionLabel):e},getOptionValue:function(e){return this.optionValue?c.resolveFieldData(e,this.optionValue):e},getOptionRenderKey:function(e,i){return(this.dataKey?c.resolveFieldData(e,this.dataKey):this.getOptionLabel(e))+"_"+i},getPTItemOptions:function(e,i,r,s){return this.ptm(s,{context:{option:e,index:r,selected:this.isSelected(e),focused:this.focusedOptionIndex===this.getOptionIndex(r,i),disabled:this.isOptionDisabled(e)}})},isOptionDisabled:function(e){return this.optionDisabled?c.resolveFieldData(e,this.optionDisabled):!1},isOptionGroup:function(e){return this.optionGroupLabel&&e.optionGroup&&e.group},getOptionGroupLabel:function(e){return c.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupChildren:function(e){return c.resolveFieldData(e,this.optionGroupChildren)},getAriaPosInset:function(e){var i=this;return(this.optionGroupLabel?e-this.visibleOptions.slice(0,e).filter(function(r){return i.isOptionGroup(r)}).length:e)+1},show:function(e){this.$emit("before-show"),this.overlayVisible=!0,this.focusedOptionIndex=this.focusedOptionIndex!==-1?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():this.editable?-1:this.findSelectedOptionIndex(),e&&a.focus(this.$refs.focusInput)},hide:function(e){var i=this,r=function(){i.$emit("before-hide"),i.overlayVisible=!1,i.clicked=!1,i.focusedOptionIndex=-1,i.searchValue="",i.resetFilterOnHide&&(i.filterValue=null),e&&a.focus(i.$refs.focusInput)};setTimeout(function(){r()},0)},onFocus:function(e){this.disabled||(this.focused=!0,this.overlayVisible&&(this.focusedOptionIndex=this.focusedOptionIndex!==-1?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():this.editable?-1:this.findSelectedOptionIndex(),this.scrollInView(this.focusedOptionIndex)),this.$emit("focus",e))},onBlur:function(e){this.focused=!1,this.focusedOptionIndex=-1,this.searchValue="",this.$emit("blur",e)},onKeyDown:function(e){if(this.disabled||a.isAndroid()){e.preventDefault();return}var i=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;c
Line truncated
|
||||
@@ -1,3 +0,0 @@
|
||||
import{s as A}from"./DOdOkukQ.js";import{O as D}from"./Ct7v4Wor.js";import{s as H}from"./Bg6qFPWQ.js";import{a3 as $,a5 as B,a6 as C,a7 as o,a8 as z,a9 as M,i as I,t as c,v as y,x as f,aa as a,Y as b,N as S,B as E,y as O,Q as U,O as w,P as R,ab as W,W as T,z as K,A as L,ac as q,a1 as Q}from"./B2dNgubA.js";import Y from"./Ds8OQ4x-.js";import{s as Z}from"./DPnCzJas.js";import"./DrH3nAaK.js";import"./DYQvr4NZ.js";import"./9oaCfz9_.js";import"./DScqFD0S.js";import"./6cfzVo_A.js";import"./D6jzmgYr.js";import"./BIP2YDsA.js";var x={root:function(t){var n=t.props;return{position:n.appendTo==="self"?"relative":void 0}}},G={root:function(t){var n=t.instance,r=t.props;return["p-treeselect p-component p-inputwrapper",{"p-treeselect-chip":r.display==="chip","p-disabled":r.disabled,"p-invalid":r.invalid,"p-focus":n.focused,"p-variant-filled":r.variant?r.variant==="filled":n.$primevue.config.inputStyle==="filled","p-inputwrapper-filled":!n.emptyValue,"p-inputwrapper-focus":n.focused||n.overlayVisible}]},labelContainer:"p-treeselect-label-container",label:function(t){var n=t.instance,r=t.props;return["p-treeselect-label",{"p-placeholder":n.label===r.placeholder,"p-treeselect-label-empty":!r.placeholder&&n.emptyValue}]},token:"p-treeselect-token",tokenLabel:"p-treeselect-token-label",trigger:"p-treeselect-trigger",triggerIcon:"p-treeselect-trigger-icon",panel:function(t){t.props;var n=t.instance;return["p-treeselect-panel p-component",{"p-ripple-disabled":n.$primevue.config.ripple===!1}]},wrapper:"p-treeselect-items-wrapper",emptyMessage:"p-treeselect-empty-message"},J=$.extend({name:"treeselect",classes:G,inlineStyles:x}),X={name:"BaseTreeSelect",extends:Z,props:{modelValue:null,options:Array,scrollHeight:{type:String,default:"400px"},placeholder:{type:String,default:null},invalid:{type:Boolean,default:!1},variant:{type:String,default:null},disabled:{type:Boolean,default:!1},tabindex:{type:Number,default:null},selectionMode:{type:String,default:"single"},appendTo:{type:[String,Object],default:"body"},emptyMessage:{type:String,default:null},display:{type:String,default:"comma"},metaKeySelection:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},panelClass:{type:[String,Object],default:null},panelProps:{type:null,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:J,provide:function(){return{$parentInstance:this}}};function v(e){"@babel/helpers - typeof";return v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},v(e)}function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function j(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?P(Object(n),!0).forEach(function(r){_(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _(e,t,n){return t=ee(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ee(e){var t=te(e,"string");return v(t)=="symbol"?t:String(t)}function te(e,t){if(v(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(v(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function m(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=F(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,s=function(){};return{s,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(d){throw d},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,p=!1,u;return{s:function(){n=n.call(e)},n:function(){var d=n.next();return i=d.done,d},e:function(d){p=!0,u=d},f:function(){try{!i&&n.return!=null&&n.return()}finally{if(p)throw u}}}}function ne(e){return le(e)||ie(e)||F(e)||re()}function re(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function F(e,t){if(e){if(typeof e=="string")return V(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return V(e,t)}}function ie(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function le(e){if(Array.isArray(e))return V(e)}function V(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var se={name:"TreeSelect",extends:X,inheritAttrs:!1,emits:["update:modelValue","before-show","before-hide","change","show","hide","node-select","node-unselect","node-expand","node-collapse","focus","blur"],data:function(){return{id:this.$attrs.id,focused:!1,overlayVisible:!1,expandedKeys:{}}},watch:{"$attrs.id":{immediate:!0,handler:function(t){this.id=t||B()}},modelValue:{handler:function(){this.selfChange||this.updateTreeState(),this.selfChange=!1},immediate:!0},options:function(){this.updateTreeState()}},outsideClickListener:null,resizeListener:null,scrollHandler:null,overlay:null,selfChange:!1,selfClick:!1,beforeUnmount:function(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(C.clear(this.overlay),this.overlay=null)},mounted:function(){this.updateTreeState()},methods:{show:function(){this.$emit("before-show"),this.overlayVisible=!0},hide:function(){this.$emit("before-hide"),this.overlayVisible=!1,this.$refs.focusInput.focus()},onFocus:function(t){this.focused=!0,this.$emit("focus",t)},onBlur:function(t){this.focused=!1,this.$emit("blur",t)},onClick:function(t){this.disabled||!this.disabled&&(!this.overlay||!this.overlay.contains(t.target))&&(this.overlayVisible?this.hide():this.show(),o.focus(this.$refs.focusInput))},onSelectionChange:function(t){this.selfChange=!0,this.$emit("update:modelValue",t),this.$emit("change",t)},onNodeSelect:function(t){this.$emit("node-select",t),this.selectionMode==="single"&&this.hide()},onNodeUnselect:function(t){this.$emit("node-unselect",t)},onNodeToggle:function(t){this.expandedKeys=t},onFirstHiddenFocus:function(t){var n=t.relatedTarget===this.$refs.focusInput?o.getFirstFocusableElement(this.overlay,':not([data-p-hidden-focusable="true"])'):this.$refs.focusInput;o.focus(n)},onLastHiddenFocus:function(t){var n=t.relatedTarget===this.$refs.focusInput?o.getLastFocusableElement(this.overlay,':not([data-p-hidden-focusable="true"])'):this.$refs.focusInput;o.focus(n)},onKeyDown:function(t){switch(t.code){case"ArrowDown":this.onArrowDownKey(t);break;case"Space":case"Enter":case"NumpadEnter":this.onEnterKey(t);break;case"Escape":this.onEscapeKey(t);break;case"Tab":this.onTabKey(t);break}},onArrowDownKey:function(t){var n=this;this.overlayVisible||(this.show(),this.$nextTick(function(){var r=o.find(n.$refs.tree.$el,'[data-pc-section="treeitem"]'),s=ne(r).find(function(i){return i.getAttribute("tabindex")==="0"});o.focus(s)}),t.preventDefault())},onEnterKey:function(t){this.overlayVisible?this.hide():this.onArrowDownKey(t),t.preventDefault()},onEscapeKey:function(t){this.overlayVisible&&(this.hide(),t.preventDefault())},onTabKey:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;n||this.overlayVisible&&this.hasFocusableElements()&&(o.focus(this.$refs.firstHiddenFocusableElementOnOverlay),t.preventDefault())},hasFocusableElements:function(){return o.getFocusableElements(this.overlay,':not([data-p-hidden-focusable="true"])').length>0},onOverlayEnter:function(t){C.set("overlay",t,this.$primevue.config.zIndex.overlay),o.addStyles(t,{position:"absolute",top:"0",left:"0"}),this.alignOverlay(),this.focus()},onOverlayAfterEnter:function(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.scrollValueInView(),this.$emit("show")},onOverlayLeave:function(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.overlay=null},onOverlayAfterLeave:function(t){C.clear(t)},focus:function(){var t=o.getFocusableElements(this.overlay);t&&t.length>0&&t[0].focus()},alignOverlay:function(){this.appendTo==="self"?o.relativePosition(this.overlay,this.$el):(this.overlay.style.minWidth=o.getOuterWidth(this.$el)+"px",o.absolutePosition(this.overlay,this.$el))},bindOutsideClickListener:function(){var t=this;this.outsideClickListener||(this.outsideClickListener=function(n){t.overlayVisible&&!t.selfClick&&t.isOutsideClicked(n)&&t.hide(),t.selfClick=!1},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener:function(){var t=this;this.scrollHandler||(this.scrollHandler=new z(t
Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
import{s as u}from"./CUlMFryE.js";import{s as d}from"./DPnCzJas.js";import{a3 as y,t as a,v as r,Y as t,aa as l,P as c,ab as p,O as s,y as v}from"./B2dNgubA.js";import"./DrH3nAaK.js";var f={root:function(o){var i=o.props;return["p-chip p-component",{"p-chip-image":i.image!=null}]},icon:"p-chip-icon",label:"p-chip-text",removeIcon:"p-chip-remove-icon"},b=y.extend({name:"chip",classes:f}),h={name:"BaseChip",extends:d,props:{label:{type:String,default:null},icon:{type:String,default:null},image:{type:String,default:null},removable:{type:Boolean,default:!1},removeIcon:{type:String,default:void 0}},style:b,provide:function(){return{$parentInstance:this}}},k={name:"Chip",extends:h,inheritAttrs:!1,emits:["remove"],data:function(){return{visible:!0}},methods:{onKeydown:function(o){(o.key==="Enter"||o.key==="Backspace")&&this.close(o)},close:function(o){this.visible=!1,this.$emit("remove",o)}},components:{TimesCircleIcon:u}},g=["aria-label"],C=["src"];function w(e,o,i,I,m,n){return m.visible?(a(),r("div",l({key:0,class:e.cx("root"),"aria-label":e.label},e.ptmi("root")),[t(e.$slots,"default",{},function(){return[e.image?(a(),r("img",l({key:0,src:e.image},e.ptm("image")),null,16,C)):e.$slots.icon?(a(),c(p(e.$slots.icon),l({key:1,class:e.cx("icon")},e.ptm("icon")),null,16,["class"])):e.icon?(a(),r("span",l({key:2,class:[e.cx("icon"),e.icon]},e.ptm("icon")),null,16)):s("",!0),e.label?(a(),r("div",l({key:3,class:e.cx("label")},e.ptm("label")),v(e.label),17)):s("",!0)]}),e.removable?t(e.$slots,"removeicon",{key:0,onClick:n.close,onKeydown:n.onKeydown,removeCallback:n.close,keydownCallback:n.onKeydown},function(){return[(a(),c(p(e.removeIcon?"span":"TimesCircleIcon"),l({tabindex:"0",class:[e.cx("removeIcon"),e.removeIcon],onClick:n.close,onKeydown:n.onKeydown},e.ptm("removeIcon")),null,16,["class","onClick","onKeydown"]))]}):s("",!0)],16,g)):s("",!0)}k.render=w;export{k as default};
|
||||
@@ -1,2 +0,0 @@
|
||||
import{O as P}from"./Ct7v4Wor.js";import{s as K}from"./Bg6qFPWQ.js";import{a3 as T,a5 as z,a6 as g,a7 as o,a8 as D,a4 as H,aa as l,a9 as V,Z as F,t as r,v as d,x as O,$ as B,P as b,W as R,ab as L,O as f,y as M,i as x,A as C,z as N,ac as U,Y as I,N as h,Q as w,B as Z}from"./B2dNgubA.js";import{s as A}from"./DPnCzJas.js";var W={root:function(e){var i=e.instance,s=e.props;return["p-menu p-component",{"p-menu-overlay":s.popup,"p-ripple-disabled":i.$primevue.config.ripple===!1}]},start:"p-menu-start",menu:"p-menu-list p-reset",submenuHeader:"p-submenu-header",separator:"p-menuitem-separator",end:"p-menu-end",menuitem:function(e){var i=e.instance;return["p-menuitem",{"p-focus":i.id===i.focusedOptionId,"p-disabled":i.disabled()}]},content:"p-menuitem-content",action:"p-menuitem-link",icon:"p-menuitem-icon",label:"p-menuitem-text"},j=T.extend({name:"menu",classes:W}),q={name:"BaseMenu",extends:A,props:{popup:{type:Boolean,default:!1},model:{type:Array,default:null},appendTo:{type:[String,Object],default:"body"},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},tabindex:{type:Number,default:0},ariaLabel:{type:String,default:null},ariaLabelledby:{type:String,default:null}},style:j,provide:function(){return{$parentInstance:this}}},E={name:"Menuitem",hostName:"Menu",extends:A,inheritAttrs:!1,emits:["item-click","item-mousemove"],props:{item:null,templates:null,id:null,focusedOptionId:null,index:null},methods:{getItemProp:function(e,i){return e&&e.item?H.getItemValue(e.item[i]):void 0},getPTOptions:function(e){return this.ptm(e,{context:{item:this.item,index:this.index,focused:this.isItemFocused(),disabled:this.disabled()}})},isItemFocused:function(){return this.focusedOptionId===this.id},onItemClick:function(e){var i=this.getItemProp(this.item,"command");i&&i({originalEvent:e,item:this.item.item}),this.$emit("item-click",{originalEvent:e,item:this.item,id:this.id})},onItemMouseMove:function(e){this.$emit("item-mousemove",{originalEvent:e,item:this.item,id:this.id})},visible:function(){return typeof this.item.visible=="function"?this.item.visible():this.item.visible!==!1},disabled:function(){return typeof this.item.disabled=="function"?this.item.disabled():this.item.disabled},label:function(){return typeof this.item.label=="function"?this.item.label():this.item.label},getMenuItemProps:function(e){return{action:l({class:this.cx("action"),tabindex:"-1","aria-hidden":!0},this.getPTOptions("action")),icon:l({class:[this.cx("icon"),e.icon]},this.getPTOptions("icon")),label:l({class:this.cx("label")},this.getPTOptions("label"))}}},directives:{ripple:V}},Q=["id","aria-label","aria-disabled","data-p-focused","data-p-disabled"],Y=["href","target"];function G(t,e,i,s,u,n){var v=F("ripple");return n.visible()?(r(),d("li",l({key:0,id:i.id,class:[t.cx("menuitem"),i.item.class],role:"menuitem",style:i.item.style,"aria-label":n.label(),"aria-disabled":n.disabled()},n.getPTOptions("menuitem"),{"data-p-focused":n.isItemFocused(),"data-p-disabled":n.disabled()||!1}),[O("div",l({class:t.cx("content"),onClick:e[0]||(e[0]=function(p){return n.onItemClick(p)}),onMousemove:e[1]||(e[1]=function(p){return n.onItemMouseMove(p)})},n.getPTOptions("content")),[i.templates.item?i.templates.item?(r(),b(L(i.templates.item),{key:1,item:i.item,label:n.label(),props:n.getMenuItemProps(i.item)},null,8,["item","label","props"])):f("",!0):B((r(),d("a",l({key:0,href:i.item.url,class:t.cx("action"),target:i.item.target,tabindex:"-1","aria-hidden":"true"},n.getPTOptions("action")),[i.templates.itemicon?(r(),b(L(i.templates.itemicon),{key:0,item:i.item,class:R(t.cx("icon"))},null,8,["item","class"])):i.item.icon?(r(),d("span",l({key:1,class:[t.cx("icon"),i.item.icon]},n.getPTOptions("icon")),null,16)):f("",!0),O("span",l({class:t.cx("label")},n.getPTOptions("label")),M(n.label()),17)],16,Y)),[[v]])],16)],16,Q)):f("",!0)}E.render=G;function S(t){return $(t)||_(t)||X(t)||J()}function J(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function X(t,e){if(t){if(typeof t=="string")return k(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set")return Array.from(t);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return k(t,e)}}function _(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function $(t){if(Array.isArray(t))return k(t)}function k(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,s=new Array(e);i<e;i++)s[i]=t[i];return s}var ee={name:"Menu",extends:q,inheritAttrs:!1,emits:["show","hide","focus","blur"],data:function(){return{id:this.$attrs.id,overlayVisible:!1,focused:!1,focusedOptionIndex:-1,selectedOptionIndex:-1}},watch:{"$attrs.id":{immediate:!0,handler:function(e){this.id=e||z()}}},target:null,outsideClickListener:null,scrollHandler:null,resizeListener:null,container:null,list:null,mounted:function(){this.popup||(this.bindResizeListener(),this.bindOutsideClickListener())},beforeUnmount:function(){this.unbindResizeListener(),this.unbindOutsideClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.target=null,this.container&&this.autoZIndex&&g.clear(this.container),this.container=null},methods:{itemClick:function(e){var i=e.item;this.disabled(i)||(i.command&&i.command(e),this.overlayVisible&&this.hide(),!this.popup&&this.focusedOptionIndex!==e.id&&(this.focusedOptionIndex=e.id))},itemMouseMove:function(e){this.focused&&(this.focusedOptionIndex=e.id)},onListFocus:function(e){this.focused=!0,!this.popup&&this.changeFocusedOptionIndex(0),this.$emit("focus",e)},onListBlur:function(e){this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onListKeyDown:function(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Space":this.onSpaceKey(e);break;case"Escape":this.popup&&(o.focus(this.target),this.hide());case"Tab":this.overlayVisible&&this.hide();break}},onArrowDownKey:function(e){var i=this.findNextOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(i),e.preventDefault()},onArrowUpKey:function(e){if(e.altKey&&this.popup)o.focus(this.target),this.hide(),e.preventDefault();else{var i=this.findPrevOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(i),e.preventDefault()}},onHomeKey:function(e){this.changeFocusedOptionIndex(0),e.preventDefault()},onEndKey:function(e){this.changeFocusedOptionIndex(o.find(this.container,'li[data-pc-section="menuitem"][data-p-disabled="false"]').length-1),e.preventDefault()},onEnterKey:function(e){var i=o.findSingle(this.list,'li[id="'.concat("".concat(this.focusedOptionIndex),'"]')),s=i&&o.findSingle(i,'a[data-pc-section="action"]');this.popup&&o.focus(this.target),s?s.click():i&&i.click(),e.preventDefault()},onSpaceKey:function(e){this.onEnterKey(e)},findNextOptionIndex:function(e){var i=o.find(this.container,'li[data-pc-section="menuitem"][data-p-disabled="false"]'),s=S(i).findIndex(function(u){return u.id===e});return s>-1?s+1:0},findPrevOptionIndex:function(e){var i=o.find(this.container,'li[data-pc-section="menuitem"][data-p-disabled="false"]'),s=S(i).findIndex(function(u){return u.id===e});return s>-1?s-1:0},changeFocusedOptionIndex:function(e){var i=o.find(this.container,'li[data-pc-section="menuitem"][data-p-disabled="false"]'),s=e>=i.length?i.length-1:e<0?0:e;s>-1&&(this.focusedOptionIndex=i[s].getAttribute("id"))},toggle:function(e){this.overlayVisible?this.hide():this.show(e)},show:function(e){this.overlayVisible=!0,this.target=e.currentTarget},hide:function(){this.overlayVisible=!1,this.target=null},onEnter:function(e){o.addStyles(e,{position:"absolute",top:"0",left:"0"}),this.alignOverlay(),this.bindOutsideClickListener(),this.bindResizeListener(),this.bindScrollListener(),this.autoZIndex&&g.set("menu",e,this.baseZIndex+this.$primevue.config.zIndex.menu),this.popup&&o.focus(this.list),this.$emit("show")},onLeave:function(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.unbindScrollListener(),this.$emit("hide")},onAfterLeave:function(e){this.autoZIndex&&g.clear(e)},alignOverlay:function(){o.absolutePosition(this.container,this.target);var e=o.getOuterWidth(this.target);e>o.getOuterWidth(this.container)&&(this.container.style.minWidth=o.getOuterWidth(this.target)+"px")},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(i){var s=e.container&&!e.container.contains(i.target),u=!(e.target&&(e.target===i.target||e.target.contains(i.target)));e.overlayVisible&&s&&u?e.hide():!e.popup&&s&&u&&(e.focusedOptionIndex=-1)},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickList
Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
import{s as r}from"./DrH3nAaK.js";import{t,v as o,aa as s,x as a}from"./B2dNgubA.js";var n={name:"MinusIcon",extends:r},i=a("path",{d:"M13.2222 7.77778H0.777778C0.571498 7.77778 0.373667 7.69584 0.227806 7.54998C0.0819442 7.40412 0 7.20629 0 7.00001C0 6.79373 0.0819442 6.5959 0.227806 6.45003C0.373667 6.30417 0.571498 6.22223 0.777778 6.22223H13.2222C13.4285 6.22223 13.6263 6.30417 13.7722 6.45003C13.9181 6.5959 14 6.79373 14 7.00001C14 7.20629 13.9181 7.40412 13.7722 7.54998C13.6263 7.69584 13.4285 7.77778 13.2222 7.77778Z",fill:"currentColor"},null,-1),p=[i];function c(e,l,d,C,h,m){return t(),o("svg",s({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.pti()),p,16)}n.render=c;export{n as s};
|
||||
@@ -1,72 +0,0 @@
|
||||
import{O as g}from"./Ct7v4Wor.js";import{s as k}from"./Bg6qFPWQ.js";import{a3 as H,a6 as p,a7 as d,a8 as y,i as L,t as h,v as f,aa as a,O as v,z as m,A as b,ac as M,x as c}from"./B2dNgubA.js";import{s as C}from"./DPnCzJas.js";var S={root:function(e){var t=e.props;return["p-colorpicker p-component",{"p-colorpicker-overlay":!t.inline}]},input:function(e){var t=e.props;return["p-colorpicker-preview p-inputtext",{"p-disabled":t.disabled}]},panel:function(e){var t=e.instance,o=e.props;return["p-colorpicker-panel",{"p-colorpicker-overlay-panel":!o.inline,"p-disabled":o.disabled,"p-ripple-disabled":t.$primevue.config.ripple===!1}]},content:"p-colorpicker-content",selector:"p-colorpicker-color-selector",color:"p-colorpicker-color",colorHandle:"p-colorpicker-color-handle",hue:"p-colorpicker-hue",hueHandle:"p-colorpicker-hue-handle"},B=H.extend({name:"colorpicker",classes:S}),D={name:"BaseColorPicker",extends:C,props:{modelValue:{type:null,default:null},defaultColor:{type:null,default:"ff0000"},inline:{type:Boolean,default:!1},format:{type:String,default:"hex"},disabled:{type:Boolean,default:!1},tabindex:{type:String,default:null},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},appendTo:{type:[String,Object],default:"body"},panelClass:null},style:B,provide:function(){return{$parentInstance:this}}},x={name:"ColorPicker",extends:D,inheritAttrs:!1,emits:["update:modelValue","change","show","hide"],data:function(){return{overlayVisible:!1}},hsbValue:null,outsideClickListener:null,documentMouseMoveListener:null,documentMouseUpListener:null,scrollHandler:null,resizeListener:null,hueDragging:null,colorDragging:null,selfUpdate:null,picker:null,colorSelector:null,colorHandle:null,hueView:null,hueHandle:null,watch:{modelValue:{immediate:!0,handler:function(e){this.hsbValue=this.toHSB(e),this.selfUpdate?this.selfUpdate=!1:this.updateUI()}}},beforeUnmount:function(){this.unbindOutsideClickListener(),this.unbindDragListeners(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.picker&&this.autoZIndex&&p.clear(this.picker),this.clearRefs()},mounted:function(){this.updateUI()},methods:{pickColor:function(e){var t=this.colorSelector.getBoundingClientRect(),o=t.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),r=t.left+document.body.scrollLeft,i=Math.floor(100*Math.max(0,Math.min(150,(e.pageX||e.changedTouches[0].pageX)-r))/150),l=Math.floor(100*(150-Math.max(0,Math.min(150,(e.pageY||e.changedTouches[0].pageY)-o)))/150);this.hsbValue=this.validateHSB({h:this.hsbValue.h,s:i,b:l}),this.selfUpdate=!0,this.updateColorHandle(),this.updateInput(),this.updateModel(e)},pickHue:function(e){var t=this.hueView.getBoundingClientRect().top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0);this.hsbValue=this.validateHSB({h:Math.floor(360*(150-Math.max(0,Math.min(150,(e.pageY||e.changedTouches[0].pageY)-t)))/150),s:100,b:100}),this.selfUpdate=!0,this.updateColorSelector(),this.updateHue(),this.updateModel(e),this.updateInput()},updateModel:function(e){var t=this.modelValue;switch(this.format){case"hex":t=this.HSBtoHEX(this.hsbValue);break;case"rgb":t=this.HSBtoRGB(this.hsbValue);break;case"hsb":t=this.hsbValue;break}this.$emit("update:modelValue",t),this.$emit("change",{event:e,value:t})},updateColorSelector:function(){if(this.colorSelector){var e=this.validateHSB({h:this.hsbValue.h,s:100,b:100});this.colorSelector.style.backgroundColor="#"+this.HSBtoHEX(e)}},updateColorHandle:function(){this.colorHandle&&(this.colorHandle.style.left=Math.floor(150*this.hsbValue.s/100)+"px",this.colorHandle.style.top=Math.floor(150*(100-this.hsbValue.b)/100)+"px")},updateHue:function(){this.hueHandle&&(this.hueHandle.style.top=Math.floor(150-150*this.hsbValue.h/360)+"px")},updateInput:function(){this.$refs.input&&(this.$refs.input.style.backgroundColor="#"+this.HSBtoHEX(this.hsbValue))},updateUI:function(){this.updateHue(),this.updateColorHandle(),this.updateInput(),this.updateColorSelector()},validateHSB:function(e){return{h:Math.min(360,Math.max(0,e.h)),s:Math.min(100,Math.max(0,e.s)),b:Math.min(100,Math.max(0,e.b))}},validateRGB:function(e){return{r:Math.min(255,Math.max(0,e.r)),g:Math.min(255,Math.max(0,e.g)),b:Math.min(255,Math.max(0,e.b))}},validateHEX:function(e){var t=6-e.length;if(t>0){for(var o=[],r=0;r<t;r++)o.push("0");o.push(e),e=o.join("")}return e},HEXtoRGB:function(e){var t=parseInt(e.indexOf("#")>-1?e.substring(1):e,16);return{r:t>>16,g:(t&65280)>>8,b:t&255}},HEXtoHSB:function(e){return this.RGBtoHSB(this.HEXtoRGB(e))},RGBtoHSB:function(e){var t={h:0,s:0,b:0},o=Math.min(e.r,e.g,e.b),r=Math.max(e.r,e.g,e.b),i=r-o;return t.b=r,t.s=r!==0?255*i/r:0,t.s!==0?e.r===r?t.h=(e.g-e.b)/i:e.g===r?t.h=2+(e.b-e.r)/i:t.h=4+(e.r-e.g)/i:t.h=-1,t.h*=60,t.h<0&&(t.h+=360),t.s*=100/255,t.b*=100/255,t},HSBtoRGB:function(e){var t={r:null,g:null,b:null},o=Math.round(e.h),r=Math.round(e.s*255/100),i=Math.round(e.b*255/10Line truncated
|
||||
.p-colorpicker {
|
||||
display: inline-block;
|
||||
}
|
||||
.p-colorpicker-dragging {
|
||||
cursor: pointer;
|
||||
}
|
||||
.p-colorpicker-overlay {
|
||||
position: relative;
|
||||
}
|
||||
.p-colorpicker-panel {
|
||||
position: relative;
|
||||
width: 193px;
|
||||
height: 166px;
|
||||
}
|
||||
.p-colorpicker-overlay-panel {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
.p-colorpicker-preview {
|
||||
cursor: pointer;
|
||||
}
|
||||
.p-colorpicker-panel .p-colorpicker-content {
|
||||
position: relative;
|
||||
}
|
||||
.p-colorpicker-panel .p-colorpicker-color-selector {
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
top: 8px;
|
||||
left: 8px;
|
||||
position: absolute;
|
||||
}
|
||||
.p-colorpicker-panel .p-colorpicker-color {
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
}
|
||||
.p-colorpicker-panel .p-colorpicker-color-handle {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 150px;
|
||||
border-radius: 100%;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
margin: -5px 0 0 -5px;
|
||||
cursor: pointer;
|
||||
opacity: 0.85;
|
||||
}
|
||||
.p-colorpicker-panel .p-colorpicker-hue {
|
||||
width: 17px;
|
||||
height: 150px;
|
||||
top: 8px;
|
||||
left: 167px;
|
||||
position: absolute;
|
||||
opacity: 0.85;
|
||||
}
|
||||
.p-colorpicker-panel .p-colorpicker-hue-handle {
|
||||
position: absolute;
|
||||
top: 150px;
|
||||
left: 0px;
|
||||
width: 21px;
|
||||
margin-left: -2px;
|
||||
margin-top: -5px;
|
||||
height: 10px;
|
||||
border-width: 2px;
|
||||
border-style: solid;
|
||||
opacity: 0.85;
|
||||
cursor: pointer;
|
||||
}
|
||||
`;E(V);x.render=R;export{x as default};
|
||||
@@ -1 +0,0 @@
|
||||
import d from"./CB7qLDt2.js";import _ from"./CxCrma6T.js";import y from"./KV_IJPlc.js";import f from"./C-LJOqlT.js";import k from"./Dp9FNFUB.js";import{useLayout as b}from"./Clh6UN6s.js";import{r as h,G as M,c as g,v as C,x as r,z as i,W as A,N as L,i as S,t as E}from"./B2dNgubA.js";import"./Bg6qFPWQ.js";import"./DPnCzJas.js";import"./6cfzVo_A.js";import"./DrH3nAaK.js";import"./ZzgLUKKb.js";import"./DJX-FvDU.js";import"./CUlMFryE.js";import"./Daj78bx2.js";import"./C4SdKzqC.js";import"./DojZms5F.js";import"./CRppVnji.js";import"./i8U0E51M.js";import"./NA602tiV.js";import"./9oaCfz9_.js";import"./C5if_XeS.js";import"./DXE_NBbe.js";import"./B0mqESIq.js";const N={class:"layout-sidebar"},w={class:"layout-main-container"},$={class:"layout-main"},x=r("div",{class:"layout-mask"},null,-1),at={__name:"AppLayout",setup(B){const{layoutConfig:e,layoutState:o,isSidebarActive:n}=b(),a=h(null);M(n,t=>{t?u():m()});const c=g(()=>({"layout-theme-light":e.darkTheme.value==="light","layout-theme-dark":e.darkTheme.value==="dark","layout-overlay":e.menuMode.value==="overlay","layout-static":e.menuMode.value==="static","layout-static-inactive":o.staticMenuDesktopInactive.value&&e.menuMode.value==="static","layout-overlay-active":o.overlayMenuActive.value,"layout-mobile-active":o.staticMenuMobileActive.value,"p-ripple-disabled":e.ripple.value===!1})),u=()=>{a.value||(a.value=t=>{p(t)&&(o.overlayMenuActive.value=!1,o.staticMenuMobileActive.value=!1,o.menuHoverActive.value=!1)},document.addEventListener("click",a.value))},m=()=>{a.value&&(document.removeEventListener("click",a),a.value=null)},p=t=>{const l=document.querySelector(".layout-sidebar"),s=document.querySelector(".layout-menu-button");return!(l.isSameNode(t.target)||l.contains(t.target)||s.isSameNode(t.target)||s.contains(t.target))};return(t,l)=>{const s=S("router-view"),v=d;return E(),C(L,null,[r("div",{class:A(["layout-wrapper",c.value])},[i(_),r("div",N,[i(f)]),r("div",w,[r("div",$,[i(s)]),i(y)]),i(k),x],2),i(v,{position:"bottom-right"})],64)}}};export{at as default};
|
||||
@@ -1 +0,0 @@
|
||||
import{l as L,u as A,a as J,_ as X}from"./Daj78bx2.js";import j from"./i8U0E51M.js";import Z from"./DYegjXM1.js";import W from"./Byr6sKjD.js";import ee from"./DGBMS6kh.js";import ne from"./Ba4Q5IHv.js";import{_ as oe,u as K,a as te}from"./CIRkOkCZ.js";import se from"./BTeIluME.js";import{c as N,t as r,v as $,Q as le,P as h,M as u,N as B,R as q,r as S,A as l,z as t,x as e,B as i,O as y,S as ie,T as re,U as ce,L as ae,V as ue,y as M,W as de}from"./B2dNgubA.js";import pe from"./C0OAlkKF.js";import ve from"./DLFgGfm1.js";import _e from"./DXVbZ-2I.js";import me from"./COj7VBUl.js";import fe from"./Dd8jkTTl.js";const he={__name:"ServerSessionSummary",props:{sessions:{required:!0}},setup(C){const b=C,n=N(()=>L.groupBy(b.sessions||[],"status"));return(w,g)=>{const a=oe;return r(!0),$(B,null,le(u(n),(d,p)=>(r(),h(a,{key:p+d.length,status:p,value:`${p}: ${d.length}`},null,8,["status","value"]))),128)}}},be={class:"mb-4"},ye=e("b",null,"browser's local storage",-1),ge=e("br",null,null,-1),ke={class:"field"},Se=e("label",{for:"name"},"Name",-1),$e={key:0,class:"p-invalid"},Ce={class:"field"},we=e("label",{for:"connection-url"},"API URL",-1),xe={key:0,class:"p-invalid"},Ve={key:1,class:"p-invalid"},Ie=e("b",null,"https://",-1),Me=e("b",null,"http://",-1),Ne=e("br",null,null,-1),Ue=e("a",{href:"https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content#developer_console",target:"_blank"}," Mixed Content ",-1),De=e("b",null,"http://",-1),Te=e("br",null,null,-1),Fe=e("br",null,null,-1),Be=e("a",{href:"https://waha.devlike.pro/docs/how-to/security/#https",target:"_blank"},"🔒 Security ->",-1),Pe={class:"field"},Re=e("label",{for:"connection-key"},"API Key (optional)",-1),qe={__name:"ServerDialog",props:{visible:{},visibleModifiers:{},server:{},serverModifiers:{}},emits:["update:visible","update:server"],setup(C){const b=q(C,"visible"),n=q(C,"server"),w=A(),g=K(),a=S(!1),d=N(()=>{var s;const v=(s=n.value.connection)==null?void 0:s.url;return v?v.startsWith("http://")||v.startsWith("https://"):!1});async function p(){a.value=!0,!(!n.value.name||!d.value)&&(n.value.id?await g(w.editServer(n.value.id,n.value),"Server updated","Failed to update server"):await g(w.addServer(n.value),"Connected to server","Failed to connect to server"),f(),n.value={connection:{}})}function f(){a.value=!1,b.value=!1}const V=N(()=>{var s;const v=(s=n.value.connection)==null?void 0:s.url;return v?v.startsWith("http://"):!1}),U=N(()=>location.protocol==="https:");return(v,s)=>{const k=_e,I=W,D=me,_=j,c=fe;return r(),h(c,{visible:b.value,"onUpdate:visible":s[3]||(s[3]=m=>b.value=m),header:"Server",modal:!0,class:"p-fluid"},{footer:l(()=>[t(_,{label:"Cancel",icon:"pi pi-times",text:"",onClick:f,severity:"secondary"}),t(_,{label:n.value.id?"Save":"Connect",icon:{"pi pi-check":!!n.value.id,"pi pi-link":!n.value.id},text:"",onClick:p},null,8,["label","icon"])]),default:l(()=>[e("div",be,[t(k,{severity:"info"},{default:l(()=>[i(" Servers data is saved in your "),ye,i(". "),ge,i(" It's safe to put server API and key here. ")]),_:1})]),e("div",ke,[Se,t(I,{id:"name",modelValue:n.value.name,"onUpdate:modelValue":s[0]||(s[0]=m=>n.value.name=m),modelModifiers:{trim:!0},required:"true",autofocus:"",invalid:a.value&&!n.value.name},null,8,["modelValue","invalid"]),a.value&&!n.value.name?(r(),$("small",$e,"Name is required.")):y("",!0)]),e("div",Ce,[we,t(I,{id:"connection-url",modelValue:n.value.connection.url,"onUpdate:modelValue":s[1]||(s[1]=m=>n.value.connection.url=m),modelModifiers:{trim:!0},required:"true",invalid:a.value&&!u(d)},null,8,["modelValue","invalid"]),a.value&&!n.value.connection.url?(r(),$("small",xe,"URL is required.")):y("",!0),a.value&&!u(d)?(r(),$("small",Ve,"URL is not correct.")):y("",!0),u(U)&&u(V)?(r(),h(k,{key:2,severity:"error",class:"mt-2"},{default:l(()=>[i(" You're using "),Ie,i(" connection but server is using "),Me,i(" connection. "),Ne,i(" It's not possible to use it due to "),Ue]),_:1})):y("",!0),u(V)?(r(),h(k,{key:3,severity:"warn",class:"mt-2"},{default:l(()=>[i(" You're using "),De,i(" connection which is not secure. "),Te,i(" Kindly configure HTTPS Connection. "),Fe,i(" Read more about "),Be]),_:1})):y("",!0)]),e("div",Pe,[Re,t(D,{id:"connection-key",modelValue:n.value.connection.key,"onUpdate:modelValue":s[2]||(s[2]=m=>n.value.connection.key=m),modelModifiers:{trim:!0},feedback:!1,toggleMask:""},null,8,["modelValue"])])]),_:1},8,["visible"])}}},Le={class:"flex justify-content-between"},Ae={class:"flex align-items-center gap-1"},je=e("i",{class:"pi pi-server"},null,-1),We=e("span",{class:"mr-1"}," Servers ",-1),Ke=["disabled"],ze=e("i",{class:"pi pi-refresh"},null,-1),Oe=[ze],Ye={class:"flex justify-content-between flex-column sm:flex-row gap-2 sm:gap-0"},He=["href"],Ee=e("code",null," (",-1),Ge=e("code",null,")",-1),Qe={class:"flex gap-1"},Je={class:"flex flex-row gap-2 justify-content-end"},vn={__name:"ServerTable",setup(C){const b=ie();re();const n=A(),w=K(),{servers:g,refreshing:a}=ce(n),d=S({connection:{}}),p=S(Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
import{a3 as o,a7 as h,t as d,v as c,aa as p}from"./B2dNgubA.js";import{s as m}from"./DPnCzJas.js";var g={root:function(e){var s=e.props,t=e.instance;return["p-inputmask p-inputtext p-component",{"p-filled":t.filled,"p-invalid":s.invalid,"p-variant-filled":s.variant?s.variant==="filled":t.$primevue.config.inputStyle==="filled"}]}},k=o.extend({name:"inputmask",classes:g}),v={name:"BaseInputMask",extends:m,props:{modelValue:null,slotChar:{type:String,default:"_"},mask:{type:String,default:null},autoClear:{type:Boolean,default:!0},unmask:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},invalid:{type:Boolean,default:!1},variant:{type:String,default:null}},style:k},b={name:"InputMask",extends:v,inheritAttrs:!1,emits:["update:modelValue","focus","blur","keydown","complete","keypress","paste"],watch:{mask:function(e,s){s!==e&&this.initMask()}},mounted:function(){this.initMask()},updated:function(){this.isValueUpdated()&&this.updateValue()},methods:{onInput:function(e){this.androidChrome?this.handleAndroidInput(e):this.handleInputChange(e),this.$emit("update:modelValue",e.target.value)},onFocus:function(e){var s=this;if(!this.readonly){this.focus=!0,clearTimeout(this.caretTimeoutId);var t;this.focusText=this.$el.value,t=this.checkVal(),this.caretTimeoutId=setTimeout(function(){s.$el===document.activeElement&&(s.writeBuffer(),t===s.mask.replace("?","").length?s.caret(0,t):s.caret(t))},10),this.$emit("focus",e)}},onBlur:function(e){if(this.focus=!1,this.checkVal(),this.updateModel(e),this.$el.value!==this.focusText){var s=document.createEvent("HTMLEvents");s.initEvent("change",!0,!1),this.$el.dispatchEvent(s)}this.$emit("blur",e)},onKeyDown:function(e){if(!this.readonly){var s=e.code,t,i,a,n=/iphone/i.test(h.getUserAgent());this.oldVal=this.$el.value,s==="Backspace"||s==="Delete"||n&&s==="Escape"?(t=this.caret(),i=t.begin,a=t.end,a-i===0&&(i=s!=="Delete"?this.seekPrev(i):a=this.seekNext(i-1),a=s==="Delete"?this.seekNext(a):a),this.clearBuffer(i,a),this.shiftL(i,a-1),this.updateModel(e),e.preventDefault()):s==="Enter"?(this.$el.blur(),this.updateModel(e)):s==="Escape"&&(this.$el.value=this.focusText,this.caret(0,this.checkVal()),this.updateModel(e),e.preventDefault()),this.$emit("keydown",e)}},onKeyPress:function(e){var s=this;if(!this.readonly){var t=e.code,i=this.caret(),a,n,r,u;if(!(e.ctrlKey||e.altKey||e.metaKey||e.shiftKey||e.key==="CapsLock"||e.key==="Escape"||e.key==="Tab")){if(t&&t!=="Enter"){if(i.end-i.begin!==0&&(this.clearBuffer(i.begin,i.end),this.shiftL(i.begin,i.end-1)),a=this.seekNext(i.begin-1),a<this.len&&(n=e.key,this.tests[a].test(n))){if(this.shiftR(a),this.buffer[a]=n,this.writeBuffer(),r=this.seekNext(a),/android/i.test(h.getUserAgent())){var f=function(){s.caret(r)};setTimeout(f,0)}else this.caret(r);i.begin<=this.lastRequiredNonMaskPos&&(u=this.isCompleted())}e.preventDefault()}this.updateModel(e),u&&this.$emit("complete",e),this.$emit("keypress",e)}}},onPaste:function(e){this.handleInputChange(e),this.$emit("paste",e)},caret:function(e,s){var t,i,a;if(!(!this.$el.offsetParent||this.$el!==document.activeElement))if(typeof e=="number")i=e,a=typeof s=="number"?s:i,this.$el.setSelectionRange?this.$el.setSelectionRange(i,a):this.$el.createTextRange&&(t=this.$el.createTextRange(),t.collapse(!0),t.moveEnd("character",a),t.moveStart("character",i),t.select());else return this.$el.setSelectionRange?(i=this.$el.selectionStart,a=this.$el.selectionEnd):document.selection&&document.selection.createRange&&(t=document.selection.createRange(),i=0-t.duplicate().moveStart("character",-1e5),a=i+t.text.length),{begin:i,end:a}},isCompleted:function(){for(var e=this.firstNonMaskPos;e<=this.lastRequiredNonMaskPos;e++)if(this.tests[e]&&this.buffer[e]===this.getPlaceholder(e))return!1;return!0},getPlaceholder:function(e){return e<this.slotChar.length?this.slotChar.charAt(e):this.slotChar.charAt(0)},seekNext:function(e){for(;++e<this.len&&!this.tests[e];);return e},seekPrev:function(e){for(;--e>=0&&!this.tests[e];);return e},shiftL:function(e,s){var t,i;if(!(e<0)){for(t=e,i=this.seekNext(s);t<this.len;t++)if(this.tests[t]){if(i<this.len&&this.tests[t].test(this.buffer[i]))this.buffer[t]=this.buffer[i],this.buffer[i]=this.getPlaceholder(i);else break;i=this.seekNext(i)}this.writeBuffer(),this.caret(Math.max(this.firstNonMaskPos,e))}},shiftR:function(e){var s,t,i,a;for(s=e,t=this.getPlaceholder(e);s<this.len;s++)if(this.tests[s])if(i=this.seekNext(s),a=this.buffer[s],this.buffer[s]=t,i<this.len&&this.tests[i].test(a))t=a;else break},handleAndroidInput:function(e){var s=this.$el.value,t=this.caret();if(this.oldVal&&this.oldVal.length&&this.oldVal.length>s.length){for(this.checkVal(!0);t.begin>0&&!this.tests[t.begin-1];)t.begin--;if(t.begin===0)for(;t.begin<this.firstNonMaskPos&&!this.tests[t.begin];)t.begin++;this.caret(t.begin,t.begin)}else{for(this.checkVal(!0);t.begin<this.len&&!this.tests[t.begin];)t.begin++;this.caret(t.begin,t.begin)}this.isCompleted()&&this.$emit("complete",e)},clearBuffer:function(e,sLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
import{u as P,d as A,c as y,h as N,r as C,o as B,a as j,b as I,e as L,f as E,g as S,i as T,j as U,p as V,k as D,n as H,l as F,m as q,q as O,w as $,s as M,_ as G,t as Q,v as W,x as m,y as k,z as J,A as K,B as X,C as Y,D as Z}from"./B2dNgubA.js";import{u as ee}from"./Ccz-thTU.js";async function z(t,a=P()){const{path:i,matched:e}=a.resolve(t);if(!e.length||(a._routePreloaded||(a._routePreloaded=new Set),a._routePreloaded.has(i)))return;const r=a._preloadPromises=a._preloadPromises||[];if(r.length>4)return Promise.all(r).then(()=>z(t,a));a._routePreloaded.add(i);const s=e.map(u=>{var n;return(n=u.components)==null?void 0:n.default}).filter(u=>typeof u=="function");for(const u of s){const n=Promise.resolve(u()).catch(()=>{}).finally(()=>r.splice(r.indexOf(n)));r.push(n)}await Promise.all(r)}const te=(...t)=>t.find(a=>a!==void 0);function ae(t){const a=t.componentName||"NuxtLink";function i(e,r){if(!e||t.trailingSlash!=="append"&&t.trailingSlash!=="remove")return e;if(typeof e=="string")return w(e,t.trailingSlash);const s="path"in e&&e.path!==void 0?e.path:r(e).path;return{...e,name:void 0,path:w(s,t.trailingSlash)}}return A({name:a,props:{to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1},custom:{type:Boolean,default:void 0,required:!1}},setup(e,{slots:r}){const s=P(),u=F(),n=y(()=>{const o=e.to||e.href||"";return i(o,s.resolve)}),d=y(()=>typeof n.value=="string"&&N(n.value,{acceptRelative:!0})),g=y(()=>e.target&&e.target!=="_self"),b=y(()=>e.external||g.value?!0:typeof n.value=="object"?!1:n.value===""||d.value),_=C(!1),h=C(null),R=o=>{var f;h.value=e.custom?(f=o==null?void 0:o.$el)==null?void 0:f.nextElementSibling:o==null?void 0:o.$el};if(e.prefetch!==!1&&e.noPrefetch!==!0&&e.target!=="_blank"&&!oe()){const f=q();let p,l=null;B(()=>{const x=re();j(()=>{p=I(()=>{var c;(c=h==null?void 0:h.value)!=null&&c.tagName&&(l=x.observe(h.value,async()=>{l==null||l(),l=null;const v=typeof n.value=="string"?n.value:s.resolve(n.value).fullPath;await Promise.all([f.hooks.callHook("link:prefetch",v).catch(()=>{}),!b.value&&z(n.value,s).catch(()=>{})]),_.value=!0}))})})}),L(()=>{p&&E(p),l==null||l(),l=null})}return()=>{var l,x;if(!b.value){const c={ref:R,to:n.value,activeClass:e.activeClass||t.activeClass,exactActiveClass:e.exactActiveClass||t.exactActiveClass,replace:e.replace,ariaCurrentValue:e.ariaCurrentValue,custom:e.custom};return e.custom||(_.value&&(c.class=e.prefetchedClass||t.prefetchedClass),c.rel=e.rel||void 0),S(T("RouterLink"),c,r.default)}const o=typeof n.value=="object"?((l=s.resolve(n.value))==null?void 0:l.href)??null:n.value&&!e.external&&!d.value?i(U(u.app.baseURL,n.value),s.resolve):n.value||null,f=e.target||null,p=te(e.noRel?"":e.rel,t.externalRelAttribute,d.value||g.value?"noopener noreferrer":"")||null;if(e.custom){if(!r.default)return null;const c=()=>O(o,{replace:e.replace,external:e.external});return r.default({href:o,navigate:c,get route(){if(!o)return;const v=V(o);return{path:v.pathname,fullPath:v.pathname,get query(){return D(v.search)},hash:v.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:o}},rel:p,target:f,isExternal:b.value,isActive:!1,isExactActive:!1})}return S("a",{ref:h,href:o,rel:p,target:f},(x=r.default)==null?void 0:x.call(r))}}})}const ne=ae(H);function w(t,a){const i=a==="append"?$:M;return N(t)&&!t.startsWith("http")?t:i(t,!0)}function re(){const t=q();if(t._observer)return t._observer;let a=null;const i=new Map,e=(s,u)=>(a||(a=new IntersectionObserver(n=>{for(const d of n){const g=i.get(d.target);(d.isIntersecting||d.intersectionRatio>0)&&g&&g()}})),i.set(s,u),a.observe(s),()=>{i.delete(s),a.unobserve(s),i.size===0&&(a.disconnect(),a=null)});return t._observer={observe:e}}function oe(){const t=navigator.connection;return!!(t&&(t.saveData||/2g/.test(t.effectiveType)))}const se=t=>(Y("data-v-73a07988"),t=t(),Z(),t),ie={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},le=se(()=>m("div",{class:"fixed left-0 right-0 spotlight z-10"},null,-1)),ue={class:"max-w-520px text-center z-20"},ce=["textContent"],de=["textContent"],fe={class:"w-full flex items-center justify-center"},he={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:404},statusMessage:{type:String,default:"Not Found"},descrLine truncated
|
||||
Loaded 100 of 682 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user